I am using a AutoCompleteTextView in a Fragment... but when I use a method which refreshes the Suggestions for AutoCompleteTextView, the App crashes with Null Object Reference here's the method -   private ArrayList<String> sugs = new ArrayList<String>();  public void refreshSugs()  {     ((AutoCompleteTextView) getView().findViewById(R.id.editText1)).setAdapter(new ArrayAdapter(getActivity(), 17367050, this.sugs)); }  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState)  {     //Inflating the Layout      View rootView = inflater.inflate(R.layout.home_fragment, container, false);       Button buttongo = (Button) rootView.findViewById(R.id.button1);     EditText et1 = (EditText) rootView.findViewById(R.id.editText1);     Button buttonsave = (Button) rootView.findViewById(R.id.button2);       bar = (ProgressWheel) rootView.findViewById(R.id.progressBar1);     i = (ImageView) rootView.findViewById(R.id.imageView1);     background2 = (TextView) rootView.findViewById(R.id.textView1);     background3 = (TextView) rootView.findViewById(R.id.textView2);     readSugs();     refreshSugs();      return rootView; }


Visualizing and interpreting principal components

I have performed principal component analysis (PCA) in Matlab via  [U,S,V] = svd(X)  Now I have to show the principal directions of the considered principal components; either by finding a way to plot them or interpret them in terms of the features.  If I have chosen 6 of the 12 PCs, I am still not able to plot them. So how can I interpret them in terms of the features?


Decide whether a series converges (conditionally, absolutely) or diverges.

Show whether the series $\sum_{n=1}^\infty \frac{(-1)^n}{(2+(-1)^n)n}$ converges (absolutely, conditionally) or diverges. Edit: It's clear that the series can't be absolutely convergent since the series is greater than a constant multiple of the harmonic series which diverges. So I just have to check if the original series converges/diverges.


How would one represent/model the effect of air resistance on horizontal motion?

Evidently, there are formulas that allow us to represent the effect of air resistance on the velocity of an object in free fall but how would one calculate the effect of air resistance on horizontal motion, for instance how much air resistance hinders a humans speed or so ?


Infinite series, injective function and rearrangement inequality

Let $f:\mathbb{N^*}\to\mathbb{N^*}$ an injective function. Show that the following infinite series $$\sum_{i=1}^{\infty}\frac{f(n)}{n^2}$$ is divergent. I am supposed to deal with this using the rearrangement inequality. But I don't know how!Could some explain this to me step by step? I really want to understand...


Got two methods:  public void getBalance(){     balance(root); }  private void balance(TreeNode node) {       if (node != null && node.left != null) {         balance(node.left);         balance(node.right);         System.out.println(node.left);         //sout work fine     } }   need to return value from balance();  if I change return value from void to TreeNode, and change code      private TreeNode balance(TreeNode node) {       if (node != null && node.left != null) {         balance(node.left);         balance(node.right);         return node.left;      }     return balance(node); }   return sStackOverflowError Exception.  I need to return node left from this method.  Please help.


How would you create a cd material in Cycles?

I know you can use the anisotropic BSDF shader to create the blurred effect but how would you make the weirdly reflected colours you get when you hold a CD to a light.  Here's an image example I found on Google Images:  I want it so that you could create the colours without just using an image texture of a CD


how do I configure VLC 2.0.4 to open each file I open in a new instance, meaning not the already opened window (if it is opened) and by that repalcing the currently played file?


"tail -f" show old file after file has been rotated

I have a script running continuously, reading tail -f /var/log/daemon.log  The problem is, when the file /var/log/daemon.log gets rotated by logrotate, tail still has "file handle" for the old (rotated) file and no longer displays the contents of the new /var/log/daemon.log file  Is there any way to fix this, so that tail shows the contents of the new file, if the file was rotated ?


Mankind prepares for a war with aliens by warring among itself

I am looking for the title or author of a atory I read back in the 90's, no idea when it was written. The plot goes something like this: Humanity has gained access to space travel and sends 9 or 12 survey ships towards galactic center, only 1 returns with stories of an enemy so rapacious that humanity starts preparing for war. After a long time, the enemy hasn't shown up and people begin to doubt the need to keep building for war. The government engineers a plan to turn the core systems against the fringe worlds and start warring amongst ourselves so that we may be prepared for when the real enemy shows up.  Written with the focus on one spaceship captain battling in our own internal war.


In the  of dealing with . This question is about the lemma:     Lemma Let $k \ge 2$, $p$ prime and $a$ coprime to $p$. Then $$p^2\!\mid a n^k+ bp\iff p\mid n,b.$$    This lemma answers the following kinds of questions:


Is there a math mode accent giving an ? I have tried \stackrel{frown}{x}, but the alignment and spacing are all wrong when compared to \breve{x}.


Section 3.4.3 "The MixColumns Step"(page 39) of , it states     The columns of the state are considered as polynomials over   $\operatorname{GF}(2^8)$ and multiplied modulo $x^4 + 1$ with a fixed polynomial $c(x)$.      The polynomial $c(x)$ is given by   $c(x) = \mathtt{03} \cdot x^3 + \mathtt{01} \cdot x^2 + \mathtt{01} \cdot x + \mathtt{02}$      Let $b(x) \equiv c(x) \cdot a(x) \pmod{x^4 + 1}$. Then         How this polynomial multiplication modulo $x^4+1$ is converted to Matrix Multiplication?


Change the number of rows and columns in the TTY

I want to resize the terminal which comes up when you press CtrlAltF1 (or F2,F3,...). 25x80 is small for a 24" screen.  Tried using stty, but the commands stty columns 200 and stty rows 50 does not work directly. Am I missing something OR is this a wrong approach.  Ideally looking for a generalized solution, but would be content with something that works in RHEL5 and Ubuntu. It would be better if its possible using some commands which I can put in a script file rather than changing some boot-level stuff.


I always wondered on what algorihm the best league of mine is chosen.    I am in the 0.16% of this quarter. That is rank 171 this quarter. But I am also ranked 113th this month.  Why is the stat for the quarter displayed when I have a better ranking in the month?


Javascript Hoisting, Function delaration

In javascript, what's the purpose of assigning variable to function declaration?  var test = function(){console.log("Hello world")}    over  function test(){ console.log("Hello world")   Also, I don't understand the code below does not work. Is it because hoisting does not care about variable assignment? (cares only about variable declaration)   vartest(); var vartest = function(){   console.log("Hello var function") }


Is it (or will it be) possible to import data already collected by other apps into the new health app in iOS 8?


I have some doubts with first order logic

Good morning,  This is my first time writting in this page, but I am finding trouble solving some exercises about first order logic. I know the tools I have but I am not sure how should I apply them. I attach some exercises and I hope someone could bring me some light about any of them. I need to prove those implications. (The last one says that x does not happen in phi.


Does a creature with blindsight have disadvantage when attacking an invisible target?

As the question states, if a creature has blindsight, do they have disadvantage on a target that is within the range of their blindsight and not otherwise hidden/covered? The wording of the invisible condition suggests that attacks against an invisible creature have disadvantage AND the creature can't be seen without magic/special sense not BECAUSE the creature can't be seen.  Invisible Condition An invisible creature is impossible to see without the aid of magic or a special sense. For the purposes of hiding, the creature is heavily obscured. The creature's location can be detected by any noise it makes or any tracks it leaves. Attack rolls against the creature have disadvantage, and the creature's attack rolls have advantage.


Radio button selected value is not retained in the Stack Exchange network profile reputation tab

In the , there are two options available to show the communities reputations.  Top 5 accounts All accounts  When switching the options in the radio buttons the filter is working but the selected value is not retained in the radio button. GIF for the same:  Update: Instead of single click, if we double clicked the radio button, it retaining the selection.


How to make an object emit light that also iluminates other objects?

I have multiple problems. I wan the wing to emit light. But it doesn't iluminate the body at all. Also is there a way to make the colours visable when it emits light (or only make the parts that aren't black emit light)?


What quotation marks are used for the 3rd quote?

I know that the nested quotes are usually punctuated as follows (British usage):  [...] and then he said: 'I will always remember Churchill's "I have nothing to offer but blood, toil, tears and sweat" as the most powerful quote to ever get me through tough times.'  What quotation mark should be used if that is inserted into yet another quote: eg.  Jules Cocovin gave this precise quote: '[...] and then he said: "I will always remember Churchill's #I have nothing to offer but blood, toil, tears and sweat# as the most powerful quote to ever get me through tough times."'  Please, kindly, refrain from advice regarding how I can restructure the sentence. I know how. I don't know what the 3rd level of quotation marks is in English.


I work on ubuntu 19.04 and want to install Arduino .I can extract the files but I cannot run the install.sh file as it says command not found.


Is there another simpler method to solve this elementary school math problem?

I am teaching an elementary student. He has a homework as follows.     There are $16$ students who use either bicycles or tricycles. The total   number of wheels is $38$. Find the number of students using bicycles.   I have $3$ solutions as follows.  Using a single variable.  Let $x$ be the number of students in question. The number of students using tricycles is $16-x$. The total number of wheels is the sum of the total number of bicycles times $2$ and the total number of tricycles times $3$.  $$ 2\times x + 3 \times (16-x) = 38 $$  The solution is $x=10$.  Using $2$ variables.  Let $x$ and $y$ be the number of students using bicycles and tricycles, respectively. It implies that  \begin{align} x+y&=16\\ 2x+3y&=38 \end{align}  The solution is $x=10$ and $y=6$.  Using multiples  The multiples of $2$ are $2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,24, 26,28,30,32,\dotsc$  The multiples of $3$ are $3,6,9,12,15,18,21,24,27,30,33,36,\dotsc$   The possible wheel combinations with format $(\#\text{bicycle wheels}, \#\text{tricycle wheels})$:  $\hspace{6cm} (32,6)$ but there are $18$ students  $\hspace{6cm} (26,12)$  but there are $17$ students  $\hspace{6cm} (20,18)$ there are $16$ students  $\hspace{6cm} (14, 24)$ there are $15$ students  $\hspace{6cm} (8, 30)$ there are $14$ students  $\hspace{6cm} (2,36)$ there are $13$ students  Thus the correct combination is $10$ bicycles and $6$ tricycles.  My question  Is there any other simpler method?


Prove that $\langle \{(123…n),(12) \} \rangle =S_n$

I know that $\langle \{(123…n),(12) \}\rangle  \subset S_n$. I was thinking that if I could show that $\langle \{(123…n),(12)\} \rangle $ contains all the transpositions of $S_n$ then it would contain $S_n$. How would I go about showing this?


Are there infinitely many primes that are 1 more a square-free number?

Other words, are there infinitely many primes $p$ such that $p-1$ is square-free. This seems likely to be true, but I can't seem to give an easy argument why. This set of primes and all primes 1 more an integer with a square divisor make up the set of primes, so at least one of these is infinite. I looked at this question for enlightenment but to no avail :  as 2 could be included in this product.


Closing or Removing a Trello Board When You are Not the Administrator

I am the top-level organization owner. An employee who was the administrator of a Trello board left recently and I am unable to rename or delete the board. I have already removed his account from the organization.   Is there a way to rename and/or preferably delete the board?


Why can I no longer upload a picture anywhere on the Stack Exchange network?

For some reason I can no longer upload a picture anywhere on the Stack Exchange network. When prompted to "Drag and Drop or Click here" to upload a picture, the prompt is unresponsive. I also cannot add a link to the photo.  As well as the above symptoms, small red text is constantly displayed on the bottom of the window saying, "Your image is too large to upload (over 2 MiB)", before I've even upload a picture yet. In fact, this "bug", is the very thing preventing me from providing a picture of this undesired behavior.  My current browser is Google Chrome, Version 56.0.2924.87 (64-bit). Could anyone confirm if this is something local to me - or if this is affecting all users?


What could I use to search tiles in a game

I'm creating a tile based game similar to . When a user clicks on a tile and its not a mine or a number space I need to search and expose the adjacent tiles that are empty and stop when it hits a number or the edge of the board. I have it working right now so that it will clear the row of the tile clicked and stop at a numbered tile or the edge of the board. What I have is going to get ugly quickly and I am sure there is a easier way of doing this. Is there a searching algorithm I can use that will find all adjacent tiles to the one the player click only stopping once it hits the edge of the board or hit a numbered tile?


Bug when clicking "Save and Copy Profile..." fast

At the moment, you get an error message when you try to update your profile fast.  Steps to reproduce   Go to your profile page in StackOverflow (or another SE site) Press "edit" to edit the profile  Immediately press "Save and Copy Profile To All Stack Exchange Accounts"     How this happened to me:  I wanted to push my SO info to other SE sites.  Possible fix:   Wait for the page to be ready before showing the button Display an appropriate message


How can I make a program executable from everywhere

What should I do if I want to be able to run a given program regardless of my current directory? Should I create a symbolic link to the program in the /bin folder?


I read the book The Not So Short Introduction to LaTeX, and found this line:     LaTeX: Tilde '~' generates a space that cannot be enlarged and...   It seems that the tilde make the space smaller when I compare Mr.~Smith and Mr. Smith.  Question 1: When shall I generate a space that cannot be enlarged?  In addition, same in the section The Space Between Words, there is a line:     If a period follows an uppercase letter, this is not taken as a sentence ending,...   However, no matter uppercase or lowercase I follow a period, I cannot find something different.  Question 2: Can anyone show me an example?  Thirdly,      The command \@ in front of a period specifies that this period terminates a sentence even when it follows an uppercase letter.   Similarly, for those two lines, I cannot find any difference.     I am new to Latex\@. And you?      I am new to Latex. And you?


What do finite, infinite, countable, not countable, countably infinite mean?

Possible Duplicate:          Those terms keep confusing me. Could somebody give a clear and unambiguous definition? How do we prove a set is countable, finite, ...? I know that there are more real numbers than there are integers. How do we prove this? What about other sets like $\mathbb{Z, Q, C}$?


Disable remote logon but still allow su to same user

My company is looking to secure our a Ubuntu 14.04 LTS servers and we wanted to disallow specific users the ability to logon remotely, but still allow people to change over to that user account using SU if needed for support purposes. I found the answer to disallowing SSH logins here:    Would this prevent using SU to change to a user who's been disallowed remote SSH logon ?  Specific example: We don't want people logging over SSH using the account 'specadmin' but user 'mary' may need to log-in and SU to 'specadmin' to perform a few special support duties over a SSH connection, is this possible (while not the best model I am sure). We don't have local access to the servers because they are cloud hosted.


Merging multiple small overlapping polygons into one

I have data like this.   I need to combine these overlapping polygons into a single polygon. I used merging of polygons, but it takes more processing time in QGIS.  Is there any other way to do this?


Why am I getting 50V at a light when the switch is off?

I am trying to put in a switch and a light it controls in a storage building and  is how I wired it.   Click for larger view  When I checked the wiring it registered 120V when the switch was on, and right around 50V when the switch was off.  Why would power still be getting to the light (I'm guessing there is a problem with the switch) and why would it only be 50V?  Oh, and where everything branches off at the beginning I have a junction box there where all of the wires are joined there.


include .mov file in beamer presentation without embedding the file

I'm trying to include a movie in a beamer presentation. I've tried many things, and it seems I finally got it to work by something like this:  \documentclass[xcolor=dvipsnames]{beamer} \usepackage{media9}  \begin{document}  \begin{frame}  \begin{center} \includemedia[   activate=pageopen,   width=300pt,   height=170pt,   keepaspectratio=true,   addresource=./movies/Tacoma.mov,   flashvars={% src=./movies/Tacoma.mov &scaleMode=stretch} ]{}{StrobeMediaPlayback.swf} \end{center}  \end{frame}  \end{document}   where Tacoma.mov is a movie of the collapse of the Tacoma bridge due to wind loading (). The problem I see is that I have the movie, and when I create the presentation, LaTeX is embedding the movie in the pdf file, but this is not what I want to do because I don't want to duplicate the amount of memory. Is there a way to have the same behavior, but without embedding the actual movie in the pdf file?  I've seen that the beamer documentation proposes the use of the multimedia package, but I haven't been able to make it work without setting the externalviewer option. It gives me this error:  Macintosh HD:Users:aaragon:Desktop:hybrida LaTeX template:LaTeX:movies:Tacoma.mp4 cannot be found. Would you like to choose a replacement file?   My question is not restricted to the media9 package.


The problem:  Consider the smooth quadric $Q=V(X_{0}X_{1}+X_{2}X_{3}+X_{4}^{2})\subset\mathbb{P}^{4}$ and the line $L=V(X_{0},X_{2},X_{3})$ contained in it. Prove that there exists a vector bundle $F$ on $Q$ with a section vanishing exactly at $L$.


I want to calculate the derivative of $|x|^\alpha$ with respect to $x$, where $1<\alpha<2$.  $\frac{d|x|^\alpha}{dx}=\alpha|x|^{\alpha-1}\mathrm{sign}(x)$  Is it correct?  And is it true that  $\lim_{x \to 0} \alpha|x|^\alpha\mathrm{sign}(x)=0$?  What with the following derivative $|x|^\alpha\rm{sign}(x)$. I would be grateful for any hints.


I am fitting a model with a dichotomous outcome, large number of subjects measured at differing visit (visit 1-14) with four other categorical and cont outcome variable....the main question is if the probability of infection varies in one variable of interest....thoughts on model selection GLMM vs GEE?


Using residues to evaluate the integral $\int_{-\pi}^{\pi} \frac{\cos(n\theta)}{1-2a\cos(\theta)+a^2}d\theta$, $|a|<1$

Calculate the integral for $\left|a\right|<1$  $$\int_{-\pi}^{\pi} \dfrac{\cos(n\theta)}{1-2a\cos(\theta)+a^2}d\theta$$  I'm supposed to evaluate this using method of residues, but the parameter a is confusing me. I'm not even sure what contour I should use. Any help would be very appreciated.


Can a character take a reaction before their turn?

Can a character use his reaction in the first round of combat before their turn? There is no surprise involved here.


I messed up at some point during modeling and had to reconnect some edges but now I don't have the vertices I need to continue. How can I fix the faces so it fits the rest of the model?


I have met a strange 9(unexpected) output from printf in C.  The code is:   1  #include <stdio.h>  2  3  int  4  main(void) {  5      printf("%lf", 3.14 - 1e20 + 1e20);  6  }   However, the output is 0.000000.  I do not know how it works.  Can anyone help?


foreach loop vs. ForEach method - Differences?

EDIT: This question can be marked as a duplicate of   Is there any differences (performance or otherwise) between using a foreach loop or the ForEach LINQ method?  For context, this is part of one of my methods:  foreach (var property in typeof(Person).GetProperties()) {     Validate(property.Name); }   I can alternatively use this code to perform the same task:  typeof(Person)     .GetProperties()     .ToList()     .ForEach(property => Validate(property.Name));   When would be using the loop structure be better than using method chaining?  Here's another example where I've used the ForEach method, but could just have easily used a foreach loop and a variable:  // LINQ PrivateData.Database.Users            .Cast<User>()            .Where(user => user.LoginType == LoginType.WindowsUser)            .Select(user => new { Name = user.Name, Login = user.Login })            .ToList()            .ForEach(result => WriteObject(result));  // Loop var users = PrivateData.Database.Users                .Cast<User>()                .Where(user => user.LoginType == LoginType.WindowsUser)                .Select(user => new { Name = user.Name, Login = user.Login });  foreach(var user in users) {     WriteObject(user); }


ConcurrentModificationException while trying to delete an item from ArrayList

Actually after pressing a button i have a method which check if in my itemStorico ArrayList exist new added items from itemModel, then if the item exist in the new list called itemModel i'm removing the old item from itemStorico and adding the new one, else just adding the new item without removing the old.  But i'm getting the following error:  2018-12-11 16:34:04.067 29033-29033/it.gabtamagnini.realco E/AndroidRuntime: FATAL EXCEPTION: main     Process: it.gabtamagnini.realco, PID: 29033     java.util.ConcurrentModificationException         at java.util.ArrayList$Itr.next(ArrayList.java:831)         at it.gabtamagnini.realco.OrdiniActivity.saveStorico(OrdiniActivity.java:1396)         at it.gabtamagnini.realco.OrdiniActivity$29.onClick(OrdiniActivity.java:1368)         at android.view.View.performClick(View.java:5637)         at android.view.View$PerformClick.run(View.java:22433)         at android.os.Handler.handleCallback(Handler.java:751)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:154)         at android.app.ActivityThread.main(ActivityThread.java:6130)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   While here is the code from my method:   for(ItemModel itemModels : itemModel){             boolean exist = false;             for(ItemModel itemModel2 : itemStorico){                 if(itemModels.getCodiceArticolo().contains(itemModel2.getCodiceArticolo())) {                     itemStorico.remove(itemModel2);                     itemStorico.add(itemModels);                     exist = true;                 }             }             if(!exist) {                 itemStorico.add(itemModels);             }         }


Finding difference between two vector layers using QGIS

I have two vector layer land cover for 2016 and 2018. I want to get  result layer that will show changes in land cover e.g. the forest has changed into a meadow. What option in QGIS can I use to do that?


Mobile: unusable Close as Duplicate dialog

I can understand how it's useful to see exactly which question you are nominating as the original, non-duplicate one when voting to close a question as an exact duplicate, but this presupposes that you have a screen which is large enough to accommodate this information, and crumbles entirely e.g. on my iPhone.  The content is presented in a JavaScript frame which cannot easily be resized, scaled, zoomed, or otherwise manipulated.  After a while, you get used to just scrolling way, wayyyy down to the Vote button real quickly (and, ideally, check that you really have the right question in a separate browser tab, where you have proper UI controls for scrolling, zooming, etc).  Of course, if both the duplicate and the original question are long, it's very easy to whizz past the button, and end up scrolling back and forth quite a bit just to locate it.  Finding button:   At first, when you paste the URL to nominate the original which this is a duplicate of, if the URL is long enough, you basically only see the tail of the URL, and nothing else:  Nominating:   You have to scroll left to see even the right margin of the actual content.  This further adds to the frustration (but as noted in a comment, there is a workaround for this).  I'm not sure how exactly this should be fixed.  I guess you probably don't want to revert back to the old, less informative design, even though that was much less disruptive on mobile devices.  Maybe a more compact representation would be possible?  Maybe just moving the "Vote to close" button up high would be enough alleviate the aggravation?


I am new to Java and I am creating a simple calculator. I used while loop to run it continuously but I couldn't stop it, Please help me with the code.  My calculator class code is:  package calculator;  import java.util.Scanner;  public class Calculator {      public static void main(String[] args) {         Boolean keepRunning = true;         while (keepRunning) {             double a, b, out;             int n;             String ans = null;             Scanner in = new Scanner(System.in);             System.out.println("Enter two Numbers ");             a = in.nextDouble();             b = in.nextDouble();              System.out.println("Enter the mode of operation:" + "\n"                     + "1. Addition" + "\n"                     + "2. Subtraction" + "\n"                     + "3. Multiplication" + "\n"                     + "4. Division");             n = in.nextInt();             switch(n){                 case 1:                     out = add(a,b);                     System.out.println("The output is: "+ out );                     break;                 case 2:                     out = sub(a,b);                     System.out.println("The output is: "+ out );                     break;                 case 3:                     out = mul(a,b);                     System.out.println("The output is: "+ out );                     break;                 case 4:                     out = div(a,b);                     System.out.println("The output is: "+ out );                     break;                 default:                     System.out.println("Enter Valid option");                     break;                             }             System.out.println("Do you want to continue? (Y/N)");             Scanner in1 = new Scanner(System.in);             ans = in1.next();              if(ans == "Y" || ans == "y"){              }else if(ans == "N" || ans == "n"){                 keepRunning = false;                     System.exit(0);             }                 }           }      public static double add(double a, double b){         return a+b;     }     public static double sub(double a, double b){         return a-b;     }     public static double mul(double a, double b){         return a*b;     }     public static double div(double a, double b){         return a/b;     } }   The if loop is not at all running what's the problem in it.  Note: This question is already exist in Stackoverflow but I can't find my answer.


Prove by double inclusion the set identity $A\cap(A\cup B) = A$   please help with this am stuck with these identities on the set A and B


Is there an elegant way to do this:  SELECT Cols from MyTable WHERE  zip = 90210 OR zip = 23310 OR zip = 74245 OR zip = 77427 OR zip = 18817 OR zip = 94566 OR zip = 34533 OR zip = 96322 OR zip = 34566 OR zip = 52214 OR zip = 73455 OR zip = 52675 OR zip = 54724 OR zip = 98566 OR zip = 92344 OR zip = 90432 OR zip = 91532 OR ...   (zip codes in this post are ficticious and bear no resemblance to actual zip codes living or dead)


$$\tan(\theta) = \dfrac{y}{x}$$ Suppose initially the angle $\theta$ is $0$. As $\theta$ increases to $\pi/2$, the denominator $x$ decreases and the numerator $y$ increases, so $\tan(\theta)$ becomes arbitrarily large.     Exactly at $\theta=\pi/2$ the function becomes +infinity. Now if we increase $\theta$ even slightly, the denominator becomes $-ve$ and the function value suddenly changes to -infinity.     I'm finding it hard to wrap my head around this. Is there anything in real life that behaves like this? that is, changes its value from high positive to high negative abruptly..


There is a smooth map of degree 1 from $S^1 \times S^1$ to $S^2$

I have been told the statement in the title, but I don’t see how to construct such a function. An hint was to “collapse the $S^1$”, but I am not sure what that means. I should find a surjective function that is homotope to the identity, maybe?


Why trapezoidal rule is giving better answers for some functions than Simpson's 1/3 rule?

Use appropriate quadrature formulae out of the trapezoidal and Simpson's rules to numerically integrate $\int_0^1\frac{dx}{1+x^2}$ with $h=0.2$. Hence obtain an approximate value of $\pi$. Justify the use of a particular quadrature formula.   Answer:  In this problem trapezoidal rule gave better solution than Simpson's 1/3 rule. How can I justify?


i wrote the code:  List<Task> tt = new List<Task>(); for (int i = 0; i < 5; i++) {     tt.Add(     new Task((o) =>     {         Thread.Sleep(Convert.ToInt32(o)*1000);         Console.WriteLine("end of {0}!", Convert.ToInt32(o));     },i)); }  tt.ForEach(t => t.Start()); Task.WaitAll(tt.ToArray());   and it show me in console: end of 1!   (interval 1 sec)  end of 2!   (interval 1 sec)  end of 3!   (interval 1 sec)  end of 4!   (interval 1 sec)  end of 5!   (interval 1 sec)  but if i get this code:  List<Task> tt = new List<Task>(); for (int i = 0; i < 5; i++) {     tt.Add(     new Task( () =>     {         Thread.Sleep(i*1000);         Console.Write("end! ");     })); }  tt.ForEach(t => t.Start()); Task.WaitAll(tt.ToArray());   then i have this answer: (interval 5 seconds and all in one moment): end! end! end! end! end!  Could you explain me this phenomenon?  I think that:  This is due to the fact that the variable "i" is continuously incremented and thread has access to the variables? In this case, each thread will remember the last value "i" so each thread will wait for 5 seconds and just send a message?  It's good reason?


Is it possible for someone to send me the DVD to download Ubuntu or is there any other way?


Now I learn about network programming. I wanted to write myself a recvall function. My messages are sent through a TCP sockets and always end with the \r\n. Googling some articles and blog posts, I found a method I do not understand. Can it be written simpler?  def recvuntil(s, needle):     data = ""     while data[-len(needle):] != needle:         data += s.recv(1)     return data   The line I do not understand: while data[-len(needle):] != needle:.  It does not make any sense to me (but, however, it works). -len(needle) should return a negative number and strings are numbered starting from 0 ...


How to get sequential references in my paper?

I'm using TeXnicCenter to write all my documents and generate my bib file by using JabRef. However I noticed that my references are out of order. It seems the addition order to JabRef file forces the numbering in my file. Is there a way to see my references sequentially in my paper?  For example,  In my bib file:        Berkay et al. Using References efficiently.   Alan  et al. Asking better questions in TeX exchange.      In my tex:     Berkay et al [2] proposed a solution for references and recently  Alan et al. [1] criticized him.   My question refers having them [1] and [2], sequentially, in order.


In a specific construction of the sentence below, which one should be use: he or him?

In a college exam reviewer, I encountered a sentence:  I suspect the murderer to be him.  I am confused about whether or not the objective him is the appropriate case to use there when it appears to be a subject complement (since it comes after the linking verb be. Shouldn't it be  I suspect the murderer to be he.?  I tried browsing the internet but failed to find an answer. Thank you in advance.


Can someone help me create a spiral (helix) similar to the one shown in the image? The creator (paper investigator) told me by email that uses Adobe Illustrator, but I don't know how to. Thanks!    ---UPDATE--- Thanks to everybody. I need to improve it but, using the Curvature tool, this is the results:


I know that $$\gcd(a^b-1,a^c-1)=a^{\gcd(b,c)}-1$$ which can be seen by expanding both terms into geometric series. Is there any such simplification for $$\gcd(a^b+1,a^c+1)=?$$  EDIT: When working with polynomials instead of whole numbers, it is $$gcd(x^n+1,x^m+1)=\begin{cases}a^{\gcd(n,m)}+1 & \nu_2(n) =\nu_2(m)\\1 &\text{else}\end{cases}$$ But this gives only a lower bound for the whole-number case.


Long-term visit visa for UAE: after which date should I leave?

I applied for a 90-day visa and got a long-term visit, single-entry tourist visa. The date given is 09-March-2015, and it's valid until 07-May-2015.  My agent says the 7th is the latest date I can travel to Dubai; once I enter I need to count 90 days. I entered on the 10th of March.    Is it true, or where can I get it checked?    Can I stay for another month, or do I need to leave before the 7th of May?


Find $\lim_{n \rightarrow +\infty} n^2(\sqrt[n]{a} - \sqrt[n+1]{a})$ for $a > 0$

To be honest, I didn’t have any meaningful ideas on how to approach this problem. I thought that applying L’Hospital’s rule (if we rewrite it just a bit we get 0/0 in limit). However, derivative appeared to be ugly and not helpful. Any insights on how to solve it?


What is this process and how can I get rid of it? I ran antivirus etc but without any success. Terminating it in the activity monitor won't change anything.   Sampling process 416 for 3 seconds with 1 millisecond of run time between samples Sampling completed, processing symbols... Analysis of sampling usernoted (pid 416) every 1 millisecond Process:         usernoted [416] Path:            /usr/sbin/usernoted Load Address:    0x10ef1f000 Identifier:      usernoted Version:         845.40.3 Code Type:       X86-64 Parent Process:  ??? [1]  Date/Time:       2020-11-02 14:29:16.852 +0100 Launch Time:     2020-11-02 14:24:15.500 +0100 OS Version:      Mac OS X 10.15.7 (19H2) Report Version:  7 Analysis Tool:   /usr/bin/sample  Physical footprint:         11.4M Physical footprint (peak):  11.7M ----  Call graph:     2702 Thread_4148   DispatchQueue_1: com.apple.main-thread  (serial)     + 2702 start  (in libdyld.dylib) + 1  [0x7fff6eaa8cc9]     +   2702 ???  (in usernoted)  load address 0x10ef1f000 + 0x2cd5  [0x10ef21cd5]     +     2702 autoreleasepool<A>(invoking:)  (in libswiftObjectiveC.dylib) + 46  [0x7fff6e75cd8e]     +       2702 ???  (in usernoted)  load address 0x10ef1f000 + 0x3cce  [0x10ef22cce]     +         2702 CFRunLoopRun  (in CoreFoundation) + 40  [0x7fff34c58489]     +           2702 CFRunLoopRunSpecific  (in CoreFoundation) + 462  [0x7fff34bcfe3e]     +             2702 __CFRunLoopRun  (in CoreFoundation) + 1319  [0x7fff34bd09c2]     +               2702 __CFRunLoopServiceMachPort  (in CoreFoundation) + 247  [0x7fff34bd1ef5]     +                 2702 mach_msg  (in libsystem_kernel.dylib) + 60  [0x7fff6ebea170]     +                   2702 mach_msg_trap  (in libsystem_kernel.dylib) + 10  [0x7fff6ebe9dfa]     2702 Thread_4198   DispatchQueue_20: usernoted_server  (serial)     + 2592 start_wqthread  (in libsystem_pthread.dylib) + 15  [0x7fff6eca8b77]     + ! 2592 _pthread_wqthread  (in libsystem_pthread.dylib) + 290  [0x7fff6eca9a3d]     + !   2592 _dispatch_workloop_worker_thread  (in libdispatch.dylib) + 596  [0x7fff6ea5ec09]     + !     2592 _dispatch_lane_invoke  (in libdispatch.dylib) + 363  [0x7fff6ea555d6]     + !       2571 _dispatch_lane_serial_drain  (in libdispatch.dylib) + 597  [0x7fff6ea54c44]     + !       : 2571 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x7fff6ea4f658]     + !       :   2542 _dispatch_call_block_and_release  (in libdispatch.dylib) + 12  [0x7fff6ea4e6c4]     + !       :   | 2534 ???  (in usernoted)  load address 0x10ef1f000 + 0x3829  [0x10ef22829]     + !       :   | + 2532 ???  (in usernoted)  load address 0x10ef1f000 + 0xf6c5a  [0x10f015c5a]     + !       :   | + ! 1427 ???  (in usernoted)  load address 0x10ef1f000 +  Sample analysis of process 416 written to file /dev/stdout


Find  the limit of the series $\sum \frac{1}{n(n+1)(n+2)}$  I tried to wite it as a combination of partial fractions.but ot didn't telescope


Are you able to change mayors on Animal Crossing New Leaf?

Okay, so I bought Animal Crossing a few days ago and my brother decided to start playing it before I did, and now he's the mayor and I'm not. I have progressed with the other account that's not a Mayor, not knowing that I wasn't the mayor, and now I just found out that I can't do anything. Is there any way I can transfer the data from one character to another? Can I at least change the name of the first character?


Windows using too much RAM, how to diagnose resource hog

I have 16GB of system RAM. On startup with no applications open except the task-manager Windows is using about 3gb of RAM. I looked in the processes tab, but nothing seems to be out of the ordinary. How can I find out why my Windows is using so much RAM.    all processes from all users      Reading from the poolmon it seems that my wireless broadcom driver is using about 0.4GB of of RAM. Even if I remove  it would still be using  2.6GB on start-up, which is still too much.      After reinstalling the wireless driver associated with the memory leak. I have a new screenshot and would like to confirm that it was indeed a memory leak.


How do I get this math to calculate correctly

I get this result:  8.01 - 8.0 #=> 0.009999999999999787   I want my answer to be 0.01. What can I do to fix this? How can I get this to happen? I guess this is float math. Is this due to floating point precision?


How can I use parameterized PHP PDO to drop a MySQL event?

Here I is what I have so far:     And I am NOT SURE WHY Hakre closed this because it has to do with dropping MySQL events from the MySQL Event Scheduler NOT with using table names with PDO.  My code is as follows:  public function dMySQLEvent($my_env, $my_event_name) {          $my_success = 0;         $my_message = '';          try {              # declare & set variables using $my_env             list ($db_dbdriver, $db_hostname, $db_database, $db_username, $db_password) = Connection::dbConnect($my_env);              # set default timezone              # create & set connection              # WORKS                 # $conn->exec("DROP EVENT IF EXISTS " . $my_event_name . ";");              # DOES NOT WORK                 # Prepare an SQL statement                 $my_sql = "DROP EVENT IF EXISTS :My_Event_Name";                 $stmt = $conn->prepare($my_sql);              # bind parameters to prevent SQL Injection             $stmt->bindValue(':My_Event_Name', $my_event_name);              # execute the SQL statement             $stmt->execute();              # closes the cursor, enabling the statement to be executed again             $stmt->closeCursor();              # close & unset the connection             $stmt = null;             unset($stmt);             $conn = null;             unset($conn);              # Set success value to TRUE             $my_success = 1;             $my_message = 'success';          } catch(PDOException $e) {              # Append error message to error log          }          return array($my_success, $my_message);      }


How can I calculate the determinant of this type of matrix?

Given the matrix  $$ A = \begin{bmatrix} 1&1&1&1\\ a&b&c&d\\ a^{2}&b^{2}&c^{2}&d^{2}\\ a^{3}&b^{3}&c^{3}&d^{3} \end{bmatrix} $$  How can I prove that $\det(A)=(d-c)(d-b)(d-a)(c-b)(c-a)(b-a)$ ?  And as a second question, what is the general formula for this type of matrix and how can I prove i?    I'm quite certain (though I could be wrong) that the general formula is as follows:  $$ \det( \begin{bmatrix} 1&\dots&1\\ a_{1}&\dots&a_{n}\\ \vdots&&\vdots\\ a_{1}^{n-1}&\dots&a_{n}^{n-1} \end{bmatrix} ) = \prod_{i>j}(a_{i}-a_{j}) $$ It definitely out for $n\leq4$.    I have tried a proof by induction over $n$. It's easy to prove that it holds for $n=1$:  $$ \det(\begin{bmatrix}1\end{bmatrix})=1\ \checkmark $$  For the inductive step, I've tried using row reduction on the last row and got to this:  $$ \det( \begin{bmatrix} 1&\dots&1\\ a_{1}&\dots&a_{n+1}\\ \vdots&&\vdots\\ a_{1}^{n}&\dots&a_{n+1}^{n} \end{bmatrix} ) = \sum_{k=1}^{n+1}(-1)^{n+k+1}\prod_{\begin{align}i&>j\\i,j&\neq k\end{align}}(a_{i}-a_{j}) $$  but I can't figure out how to prove that equals $\prod_{i>j}(a_{i}-a_{j})$. Is there a way to prove this. And if not, how should I go about solving this exercise?  If some of the mathematical notation I used is incorrect or very unusual,  I would also appreciate it if that was pointed out to me.


Dragon Age: Inquisition Import Save File

I keep on hearing about this Dragon Age Keep, but I actually have trouble using it and kinda lazy to select all of my choices again...I'm planning to get myself Dragon Age: Inquisition, but before that I need to confirm if it's possible to do the traditional import save? I still have Dragon Age Origins and Dragon Age 2 installed and completed with the save file on my PC. I be using the same one for Dragon Age: Inquisition. Is using Dragon Keep a 'must' in order to import save or it is just an alternative?


Website not coming in Google local listing?

so i have a website which comes up in Google local listing for the keyword "plastic surgery in mycityname" but does not come up when i enter "plastic surgery mycityname". Notice the missing word "in". Though the website comes up in organic search at 1st and 2nd position. What could be the reason for that? Is this algorithm driven or am i missing something?


How can I individually access two different data types in a string?

So for more context you can look at my last post, but I feel like I went about asking the question all wrong.  What I'm given is one input on one line: month day             eg April 11  What I need to do is, based on the month and day given, determine the season.  So I need to first get the String inputMonth; and get the int inputDay; from the single string providing both.   I am conveniently provided with the months and days of the seasons which resulted in me writing the following:            //I know that the inputDay is wrong           inputMonth = scnr.next();           inputDay = scnr.nextInt();     if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 20) && (inputDay <= 31))){      System.out.println("Spring");     }    else if( ((inputMonth == "April") || (inputMonth == "april")) && ((inputDay >= 1) && (inputDay <= 30))){      System.out.println("Spring");     }    else if( ((inputMonth == "May") || (inputMonth == "may")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Spring");     }    else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 1) && (inputDay <= 20))){      System.out.println("Spring");     }    else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 21) && (inputDay <= 30))){      System.out.println("Summer");     }    else if( ((inputMonth == "July") || (inputMonth == "july")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Summer");     }    else if( ((inputMonth == "August") || (inputMonth == "august")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Summer");     }    else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 1) && (inputDay <= 21))){      System.out.println("Summer");     }   else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 22) && (inputDay <= 30))){      System.out.println("Autumn");     }   else if( ((inputMonth == "October") || (inputMonth == "october")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Autumn");     }   else if( ((inputMonth == "November") || (inputMonth == "november")) && ((inputDay >= 22) && (inputDay <= 30))){      System.out.println("Autumn");     }   else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 1) && (inputDay <= 20))){      System.out.println("Autumn");     }   else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 21) && (inputDay <= 31))){      System.out.println("Winter");     }    else if( ((inputMonth == "January") || (inputMonth == "january")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Winter");     }   else if( ((inputMonth == "February") || (inputMonth == "february")) && ((inputDay >= 1) && (inputDay <= 29))){      System.out.println("Winter");     }   else if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 1) && (inputDay <= 19))){      System.out.println("Winter");     }   else{    System.out.println("Invalid");     }   My issue is that I can't figure out how to determine the month and the day separately from that one input.  Whenever I run this I always end up getting "Invalid". Some people on my last post were showing different ways to go about this but to be honest I'm not familiar with arrays yet (That's next lesson). Thanks in advance guys.


Calculating the number of bound states in a finite 1-D potential well varying according to the depth of the well

I was told that for a finite potential well of depth $V_{0}$ and length(spread) $L$, the number of bound states($n$) that we could get for a particular $V_{0}$ is given by the equation- $$n=\left \lceil{\sqrt{8mV_{0}}L/h} \right \rceil$$How do I arrive at this point after looking at the graphs associated with the finite well problem? My guess is that we've to arrive at $n<\sqrt{8mV_{0}}L/h$, but I don't know how should I start so that I get a relation for the number of bound states in this problem. Can someone help me out in this, cuz I'm fairly new to QM!


Why was a moved question deleted? Moderator to whom deletion is attributed claims they didn't do it

A  appears to have been deleted, and deletion is attributed to a moderator,  deleted by Sathyajith Bhat♦ 12 hours ago , however,  (however, they did previously (unsuccessfully) tried migrating it to another site in the network where they're also a moderator, but migration was rejected by another moderator, it was then on hold on webapps, and then the hold was removed, which was supposed to have been the end of it).  Can someone explain what's going on here?  And restore the question that clearly wasn't meant to have been deleted, was a HNQ, and has 75 votes on the question, plus 74 votes on the top answer, and 56 on second answer; and 19 on third?  There's a lot of links to this question, too, and now they're all broken, making SE look like a community hostile to a popular question ontopic for the site it was on.


Find the recurrence relation a(n) = a(n−1) + n with a(0) = 0

enter preformatted text here  find the recurrence relation.  a(n)=a(n−1)+n with a(0)=0  Do I have to make a replace? Can someone help with initial steps?  Thanks.  Do like this....


I was wondering if windows 10 will install as 32 bit or 64 bit, because one of my computers has a x64 processor with 32 bit windows 7 on it, but I want it to install 64 bit windows 10, will it already do that? Thanks!


Declare a global variable in a Blender session

I have a list declared like this -  m_list = own.get("m_list")   Now the problem is I can't access this list from another object. How do I declare the list so that I can access it from another object. I have to check whether or not an element exists.


How do you install mods for 1.5.2 since you don't have a bin folder. I've tried duplicating the 1.5.2.jar and all that, but it still doesn't work. The mod that I want to install is the "Fossils and Archaeology Revival Mod". I have a Macbook by the way.


Reuse a previous equation with the original numbering

Here I am stuck again!  I have this equation 4.42 but I need to display this same equation, with this original number (4.42), in chapter 6. How can I do that?  The equation is:  \begin{equation} \label{Po}     \Pi=\pi-\frac{1}{3}c_s k_B T \phi \textbf{F}^2 \end{equation}   And below you can see the equation in chapter 4.    How to put this equation in chapter 6, but enumerated 4.42?


How do I color the font in just one row/column without the text jumping a line?

I just want to color the font of a single row and a single column in two different tables. I have found some example for how to do so. How to do row from  and how to do column from  (where I just changed gray to white and added the color green >{\columncolor{white}{\color{green}}}).  But as seen in the examples below the text (for some reason I don't understand) is jumping a line. I have tried many different things, but I can't make it NOT jump a line and just stay in place.   Column:   Row:   Here is my MWE:  \documentclass[a4paper,article,twocolumn]{memoir} \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{geometry} \usepackage{graphicx} \usepackage[table]{xcolor} \usepackage{microtype} \usepackage{booktabs} \usepackage[T1]{fontenc} \usepackage{float} \newgeometry{left=2.5cm,right=2.5cm,bottom=2.5cm,top=2.5cm,head=79pt} \usepackage{array} \makeatletter \newcommand*{\@rowstyle}{} \newcommand*{\rowstyle}[1]{% sets the style of the next row   \gdef\@rowstyle{#1}%   \@rowstyle\ignorespaces% }% \newcolumntype{=}{% resets the row style   >{\gdef\@rowstyle{}}% }% \newcolumntype{+}{% adds the current row style to the next column   >{\@rowstyle}% }% \makeatother \definecolor{lightgray}{gray}{0.9} %-------------------------------------------------- \begin{document} \begin{table*}[ht!] \centering\footnotesize \caption{Text for the caption} \rowcolors{1}{}{lightgray} \begin{tabular}{c p{1.5cm} p{1.5cm} p{1.5cm} >{\columncolor{white}{\color{green}}}p{1.5cm} p{1.5cm} p{2.5cm}}   \toprule Combination & Thing1 \mbox{SOMETHING} & Thing2 \mbox{SOMETHING} & Thing3 \mbox{SOMETHING} & Thing4 \mbox{SOMETHING} & Thing5 \mbox{SOMETHING} & Items \\   \midrule   2803 & 0.8800 &   1 &   2 &   1 &   1 & VR17 LN33 LN58 MR47 R3D4 \\  797 & 0.8800 & 2 & 1 & 1& 1 & VR4 VR19 LN58 MR46 R3D4 \\   1193 & 0.8799 &   1 &   1 &   2 &   1 & VR4 LN34 MR45 MR47 R3D6 \\   929 & 0.8798 &   1 &   2 &   1 &   1 & VR4 LN7 LN34 MR45 R3D6 \\    2798 & 0.8796 &   1 &   2 &   1 &   1 & VR17 LN33 LN58 MR46 R3D4 \\    \bottomrule \end{tabular} \end{table*}  \begin{table*}[ht!] \centering\footnotesize \caption{Text for the next caption} \rowcolors{1}{}{lightgray} \begin{tabular}{=c +p{1.5cm} +p{1.5cm} +p{1.5cm} +p{1.5cm} +p{1.5cm} +p{2.5cm}}   \toprule Combination & Thing1 \mbox{SOMETHING} & Thing2 \mbox{SOMETHING} & Thing3 \mbox{SOMETHING} & Thing4 \mbox{SOMETHING} & Thing5 \mbox{SOMETHING} & Items \\   \midrule   2803 & 0.8800 &   1 &   2 &   1 &   1 & VR17 LN33 LN58 MR47 R3D4 \\  797 & 0.8800 & 2 & 1 & 1& 1 & VR4 VR19 LN58 MR46 R3D4 \\   1193 & 0.8799 &   1 &   1 &   2 &   1 & VR4 LN34 MR45 MR47 R3D6 \\ \rowstyle{\color{green}}  929 & 0.8798 &   1 &   2 &   1 &   1 & VR4 LN7 LN34 MR45 R3D6 \\    2798 & 0.8796 &   1 &   2 &   1 &   1 & VR17 LN33 LN58 MR46 R3D4 \\    \bottomrule \end{tabular} \end{table*}  \end{document}   I hope one of you know what to do, or what I did wrong. Any help is appreciated.


Combining several polygon objects in one polygon object with GeoTools

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like QGIS, I do this with processing option "Combine selected spatial objects" and the result is what I expect but doing programmatically with Java and GeoTools library, I'm not able to get this behaviour.   To give you an idea, I have two polygons in one layer like this:    Each square is an independent polygon in my shapefile (an independent object with its attributes).  Now I want to transform them into one object. I tried with "union" method of Geometry class in this way:      //polygon1 and polygon2 are Polygon objects (the squares in the above image)     Geometry combine = polygon1.union(polygon2);   And this is the result when I visualize the union in the GIS:    As you can see, a line is added between the two figures (although the union is made succesfully and I have only one entity as I wish) but I want this without the line connecting them.  The polygons are well formed because by doing with QGIS the operation is made right.   Anyone know if is it possible?   I'm looking for some time and I'm concluding that maybe my approach to achieve this is bad.


Probability of the $N$th person to get the seat

n passengers board an airplane with exactly $n$ seats. The first passenger has lost the ticket and picks a seat randomly. But after that, the rest of passengers will: Take their own seat if it is still available, Pick other seats randomly when they find their seat occupied  What is the probability that the $n$-th person can get his own seat? The answer is  $1$, if $n = 1 $ $0.5$ if $n > 1$  Following is my attempt For $n = 2$  let's have passengers $A$ and $B$  Sample space = {$AB,BA$}  Favorable = {$AB$}  Probability = #{$AB$}/#{$AB,BA$}= $\frac{1}{2} = 0.5$  For $n = 3$  we have passengers $A,B,C$  Sample Space = {$ABC,ACB,BAC,BCA,CBA,CAB$}  Favorable = {$ABC,BAC$}  Probability = $\frac{2}{6} = \frac{1}{3}$  Can anyone explain me in this way ?


Which is correct: "The teacher spoke to my father and I" or "The teacher spoke to my father and me"?  I don't have any solid reason but I feel "The teacher spoke to my father and me." is the correct one out of the two.  But some claim that the latter is the correct version, i.e. "The teacher spoke to my father and I". Could someone please give reasons as to which one is correct and why? Thank you!


How would you explain the difference between correlation and covariance?

Following up on this question, , which addresses the issue of explaining covariance to a lay person, brought up a similar question in my mind.  How would one explain to a statistics neophyte the difference between covariance and correlation? It seems that both refer to the change in one variable linked back to another variable.  Similar to the referred-to question, a lack of formulae would be preferable.


Show that  $$\sum_{k=0}^{m} \frac{m!(n-k)!}{n!(m-k)!} = \frac{n+1}{n-m+1}$$  Attempt:  It becomes:  $$\sum_{k=0}^{m } \frac{\binom{m}{k}}{\binom{n}{k}}$$  Telescoping, pairing, binomial theorem don't seem to work  Possibly a combinatoric proof?  Considering the cards of numbers 1, 2, 3, 4, ... , m, .... , n on the table.  We must pick k cards from the n on the table.   The probability that we pick these k cards from the first m is  $$P(k) = \frac{\binom{m}{k}}{\binom{n}{k}}$$  So summing these probabilities will give us the LHS.  Now is there a nice way of doing this probability a different way to yield the RHS?


How would I work out a limit of the form:  $$\lim_{x\to 0}\;(1+x)^{1/x}$$  I know these types of limits have a solution based on $e$ but how do I find this solution?


I am not going to bother going into much detail but basically there is a game over alert I want to set up if the player takes too long while playing my game.  var time();  //Game over Alert function fail() {     swal({         title: "Gameover!",         text: "Click Retry To Start Again.",         timer: 1500,         showConfirmButton: false     }); }  //Timer function timer() {     var time = window.setTimeout(function () {         fail();     }, 1000); }  //Timer Reset function stillplaying() {     window.clearTimeout(time);     timer(); }   The problem is the timer doesn't rest when I activate the still playing function. However, if I rapidly activate still playing the same alert flashes again and again. Not to mention the reset button and the game it's self flickering. Can anyone fix the timer and find a way to fix the glitch?


In the book "mathematical logic", it is said that $(a,b)$ is an abbreviation for $\{ \{a,a\},\{a,b \}\}$.  I don't understand this, since firstly, $\{a,a\}=\{a\}$, and secondly, even if this weren't the case, how does  $\{ \{a,a\},\{a,b \}\}$ capture the ordered relation of $(a,b)$?  i.e. how do we see a tuple as a set?


By the given task, the numbers can be 000, 001, 002 and so on. How can I save this number format?   int i = 000; i++;  System.out.println(i);  //the output is 1 but I want 001   So how can I have the value of i like 001?


I know that static variables are part of class and not part of the Object . How can the following lines of code work without any problem  class M {   static int i=0;   void Inc()   {     System.out.println("Global "+M.i);     System.out.println("Local "+this.i);   } }      public class StaticTest {    public static void main(String args[])    {     M m1=new M();     m1.i=99;       //How can the m1 object access i variable of the class     m1.Inc();    }   }   The output i get is   Global 99 Local 99   How can the m1 object access i variable of the class?


I have a list of strings that I would love to change to lower cases and remove punctuations. I am able to change them to lower cases but fail to remove punctuations. Example of the string:  s = 'He is the best doctor. I highly recommend him."   With  slower = s.lower().split(" ")   I obtain  ['he', 'is', 'the', 'best', 'doctor.', 'i', 'like', 'him.']   This is good, but I still would like to detach punctuations from the words.  What's the easy way to do this? Thank you!!


Can I recover my data from a usb drive that is made bootable?

My usb drive had some data. I used it as bootable drive for installing Linux on my pc. Now the data is lost can recover the data ?


Package dependencies cannot be resolved when installing codeblocks

Whenever I try to install codeblocks I get this error:  The following packages have unmet dependencies:   codeblocks : Depends: codeblocks-common (= 12.11-3) but it is not going to be installed


Non-static variable/method cannot be refrenced from static context! What is the prob?

import java.util.Scanner; import java.lang.Math;  public class Assignment1{          //instance variables          double a;      double b;      double c;     // method     public double hypot(double x, double y){         x = x*x;         y = y*y;         double z = x+y;         z = Math.sqrt(z);         return z;      }     // constructor     public Assignment1(double a , double b, double c){             this.a = a;         this.b = b;         this.c = c;     }      public static void main(String [] args){ // execution starts from here             Assignment1 obj = new Assignment1(a,b,c);         Scanner in = new Scanner(System.in);         System.out.println("Enter the values to compute the pythagoras    theorem");          obj.a = in.nextDouble();         obj.b = in.nextDouble();         obj.c = hypot(a,b);         System.out.println("The hypot is"+ c);       }   }   What is the problem with this code... I m creating the objects... then it should worl fine !! Aint it???


“employer” is to “employee”, as “mentor” is to what?

If FOO is mentor to BAR, what term describes BAR's end of that relationship — specifically as “a person to whom FOO is mentor”?  Analogously:   FOO is employer to BAR, ⇒ BAR is employee to FOO.   What is the equivalent term for the recipient of a mentor relationship?  Terms already considered  “mentee”  Some people, recognising a need for a term, use “mentee”. I'm pretty sure that is incorrect – there is no “ment” verb, so a mentor is not “one who ments another” and a “mentee” is not “one who is mented by another”.  So if that's your answer I'd like some strong support for its normal use more than any other.  “student”, “pupil”  A mentor is not the same role as a teacher. To describe BAR as a pupil of FOO would incorrectly imply that FOO is a teacher. So this term doesn't meet the required meaning.  Already answered  “protégé”  As later discovered, the  on this site. The correct term is “protégé”.


Induction proof on Fibonacci sequence: $F(n-1) \cdot F(n+1) - F(n)^2 = (-1)^n$

I can't seem to solve this problem. It is:     The Fibonacci numbers $F(0), F(1), F(2),\dots $ are defined as follows:      \begin{align} F(0) &::= 0 \\ F(1) &::= 1 \\ F(n) &::= F(n-1) + F(n-2)\qquad(\forall n \ge 2)\end{align}      Thus, the first Fibonacci numbers are $0, 1, 1, 2, 3, 5, 8, 13,$ and $21$. Prove by induction that $\forall n \ge1$,      $$F(n-1) \cdot F(n+1) - F(n)^2 = (-1)^n$$   I'm stuck, as I my induction hypothesis was the final equation, and I replaced n in it with n+1, which gave me:  $$F(n) \cdot F(n+2) - F(n+1)^2 = (-1)^{n+1}$$  I then tried simplifying this using the first equation, which gave me: $$[(F(n-1) + F(n-2)]\cdot F(n+2) - F(n+1)^2 = (-1)^{n+1}$$  I then tried replacing $n$ in the first equation with $n+1$, but that just gave me   $$2F(n-1) + F(n-2)$$  I'm really not sure how to proceed, and I was hoping for some help. I'm new to induction and I'm hoping this is just an algebra problem and not a problem with the method, but any help would be greatly appreciated.


Projects in /var/www folder are not accessible?

I am using Ubuntu 13.10 and come from Ubuntu 13.04.   First check locahost, It's work fine. PhpMyAdmin is also work fine. I look some related problem . But some similarities with this answer and still I have problem when I write for-example http://localhost/PHP_Work/ in a browser.  Problem  Forbidden You don't have permission to access /PHP_Work/ on this server.   Path of PHP_Work folder is : /var/www/PHP_Work  Following results of line write by using terminal:  conf.d files  zeb@zeb-Lenovo-B570:/etc/apache2/conf.d$ ls  Result:  empty folder  zeb@zeb-Lenovo-B570:/etc/apache2/conf-available$ ls  Result:   charset.conf            localized-error-pages.conf    security.conf javascript-common.conf  other-vhosts-access-log.conf  serve-cgi-bin.conf   Site File  zeb@zeb-Lenovo-B570:/etc/apache2/sites-available$ ls  Result: 000-default.conf  default-ssl.conf  Don't know how and what changes make in virtual host directives. Or what should I do to sort it out , any help would be appreciated.


I declared String s1=null and s2="Hello" by using s1.equals(s2) it shows NullPointer Exception why?

How the equals function knows s1 having the null reference to the String.


JavaScript Regular Expression Email Validation

This code is always alerting out "null", which means that the string does not match the expression.  var pattern = "^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$";   function isEmailAddress(str) {      str = "azamsharp@gmail.com";            alert(str.match(pattern));      return str.match(pattern);      }


Was there ever a reason for why becoming a super saiyan became easy for the trunks and goten?

Related to , but I would like to know specifically for (young, not future) trunks and goten, how they managed to become super saiyans at such a young age - the others all went through a stressful emotional event that pushed them over the edge, yet while these two were growing up, I can't imagine them going through anything similar - there was no villain at the time.


Target Packages (main/binary-amd64/Packages) is configured multiple times in sources

Reading package lists... Error! W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google-chrome.list:4 E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-amd64_Packages E: The package lists or status file could not be parsed or opened.


Please make close vote review data public

I'd like to play around with the close vote review data to do some basic analysis. Can the review data from the close vote queue please be made public?  User IDs should be included in the data dump, as they are available anyway. The reason I'd like username data to be there is because I want to look at the trend in number of reviews per reviewer over time (and a couple other things); doing so would be impossible without username data.


Make Social/Promotions/Updates/Forums categorization Go Away in Gmail

Somewhat recently, Gmail started automatically labeling new messages as "Social", "Promotions", "Updates", or "Forums".  These labels clash with those that I already have, and Gmail isn't categorizing them right anyway.  I want them gone.  Under [gear image]->Configure Inbox, I found "Select tabs to enable".  I unchecked everything except for "Primary", which can't be.   Under [gear icon]->Settings->Labels (or [any message]->[label icon]->Manage labels), I can find under "Categories" the undesired labels.  I toggled both columns to "hide".   Despite all this, they still appear at the bottom of the label list for each message, and Gmail still tags incoming new messages with them.  To properly categorize new messages, I first need to uncheck any of these tags Gmail adds, and then add my own.  After unchecking, they're still in the label list:   I want these silly things gone entirely.  How can I get rid of them?


Can ksh on AIX be configured to use the tab key for filename completion?

I have some AIX 7 servers that are restricted to what software I can install and wonder if I can get ksh to use the tab key to complete filenames at the shell promot.  The man pages are sparse for ksh and I don't see any relevant questions here covering this ground. Due to the majority of users using ksh, I'm hesitant to shift my shell to bash - but I suppose that's an easy out.  I log in initially from a PC using putty/ssh and work mostly from xterm once the X11 forwarding brings back the traffic to Hummingbird Exceed on the PC.  Can /usr/bin/ksh that ships with bos.rte.shell for AIX 7.1 be configured to trigger filename completion (which is normally triggered by pressing ESC+\ ) by pressing the TAB key?


jquery function stops working after div refresh

I have one function that refreshes the div but the then the jquery function won't work any more. I've seen answers where I have to use the about it losing the bindings but I can't get it to work.  refresh div code working fine   $(document).on('click', '#reload', function () {     //Load next question     $("#new_sen").load(" #new_sen");    });   My code that won't work after div refresh   $(".card_flip").on('click', function() {     $(this).toggleClass('flipped');   })   Thanks for any help.


I'm getting a bitmap font on \mathbb{1} when I use the bbold package. After much searching on bitmap fonts specifically in relation to the bbold package, these articles are the closest I've got to a solution:       However, they don't quite answer my problem. The best advice in the first is to use amssymb, which doesn't work in my particular case because amssymb renders \mathbb{1} as something else entirely (not a blackboard "1"). The second article is a bit general but does suggest the lmodern package, which still doesn't solve the problem.  Note also that I've already installed the cm-super font (using MiKTeX), as many other articles suggest.  Here's my code:  \documentclass{article}  \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{bbold}  \begin{document}  This is a test: $\mathbb{1}$.  \end{document}   Here's a fragment (the important bit) of the output:    As the image shows, only the \mathbb{1} is a problem.


'(base)' appears at the prompt in Linux terminal

suddenly I have a "(base)" before the prompt of my terminal: (base) name@computer:~ $   my prompt was defined in bashrc as case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac  But after installing conda I have an extra:  export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion  # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/gigiux/src/conda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then     eval "$__conda_setup" else     if [ -f "/home/gigiux/src/conda/etc/profile.d/conda.sh" ]; then         . "/home/gigiux/src/conda/etc/profile.d/conda.sh"     else         export PATH="/home/gigiux/src/conda/bin:$PATH"     fi fi unset __conda_setup # <<< conda initialize <<<  would this cause this? can I simply remove the extra lines? Thank you


Coupling particles textures and position

I am generating a set of particles that follow a streamline and I would like the particles to change color according to their position along the line. The tricky part is that the streamline has a image texture shader and I would like the particles to be matching the texture.   Is there a simple way to do so?   Many thanks in advance!


How to prove that $\lim\limits_{n\to \infty}a_{n+1}=\lim\limits_{n\to \infty}a_{n}$

I want to prove the following theorem     Let $\{a_{n}\}$ be a convergent sequence. Prove that $\lim\limits_{n\to \infty}a_{n+1}=\lim\limits_{n\to \infty}a_{n}$   Do I need to show that it is monotone increasing and then use the relation  $$0\leq \lim_{n\to \infty}a_{n+1}- \lim_{n\to \infty}a_{n}\leq 0 \;?$$  Please, I need help on this! Various proofs are welcome! Thank you very much for your time!


How to i prevent sql injection from this code , please add your suggestions in my code

<?php // I fetching data from sql table "product".i want to prevent all unwanted characters and all.please add your suggestions in my code.      if(isset($_GET['search'])){     $search_query = $_GET['user_query'];     $get_pro = "select * from product where title like '%$search_query%'";     $run_pro = mysqli_query($con, $get_pro);      while($row_pro=mysqli_fetch_array($run_pro)){    $pro_title = $row_pro['title'];     echo " <span>$pro_title</span> "    } }    ?>


I've been working on a project with a few friends. Our assignment was to find the Username and Password credentials to log in to a fake database  Here is the source code:  <?php include "config.php"; $con = mysqli_connect("localhost", "sql1", "sql1", "sql1"); $username = $_POST["username"]; $password = $_POST["password"]; $debug = $_POST["debug"]; $query = "SELECT * FROM users WHERE username='$username' AND password='$password'"; $result = mysqli_query($con, $query);  if (intval($debug)) {   echo "
";   echo "username: ", htmlspecialchars($username), "\n";   echo "password: ", htmlspecialchars($password), "\n";   echo "SQL query: ", htmlspecialchars($query), "\n";  if (mysqli_errno($con) !== 0) {  echo "SQL error: ", htmlspecialchars(mysqli_error($con)), "\n";   }   echo "
"; }  if (mysqli_num_rows($result) !== 1) {   echo "
Login failed.
"; } else {   echo "
Logged in!
";   echo "
Your flag is: $FLAG
"; }  ?>   The proctor gave us a hint asking "What happens if username or password contains a single quote '?  I have tried everything from ' or 1=1--  to things like ' OR a=1--  if anyone could help I would greatly appreciate it!


How can I check if a single character appears in a string?

In Java is there a way to check the condition:  "Does this single character appear at all in string x"  without using a loop?


$M$ noetherian, $f$ endomorphism of $M$, $\operatorname{coker}f$ has finite length, then $\operatorname{coker}f^n$ and $\ker f^n$ have finite length.

Let $M$ be noetherian and let $f$ be an endomorphism of $M$. Suppose that $\operatorname{coker}f$ has finite length. Prove that both $\operatorname{coker}f^n$ and $\ker f^n$ have finite length ($n=1,2,...$).   If $M$ is noetherian, then the intersection of $\operatorname{im}f^n$ and $\ker f^n$ equals $0$ for some $n$. On the other hand, by Jordan-Holder theorem, $\operatorname{coker}f$ is both noetherian and artinian, but I have no idea to continue.  I needs some hints to prove it.  Thank you in advance.


Generating Functions to design nonstandard dice

Define a nonstandard die as a $6$-sided die that is equally likely to come up on each side, but has a different set of numbers than the usual $1,2,3,4,5,6$ on its sides. A standard die will be the usual fair die bearing the numbers $1,2,3,4,5,6$.  Is it possible to design a pair of nonstandard dice, with positive integers on the faces (not necessarily all distinct), so that the probability of rolling any given total on those two dice is the same as the probability of rolling that total on two standard dice? The two dice do not need to be identical. If it is possible, do it. If it is not possible, prove that it is not possible.    Construct a pair of nonstandard dice such that the generating function for their sum matches the corresponding g.f. for a pair of standard dice?


How do I manage combat situations without a physical map?

I am about to start running a new DnD campaign and for the first time in a long time I am running it at a table with pencil and paper, in recent years players have had there own laptops at the table, and I have run using roll20. Prior to using online resources I ran my combat systems pretty free not worrying to much about movement speeds or displaying things out on a map but having now got used to players moving on the roll20 map I find that I missed an important aspect of combat. The session this week is a one shot and in the medium term I have plans to order gridded paper and draw out my combat maps, and possibly look at getting some miniatures, what is the best way to manage tings like Player/NPC Monster positions without a physical gridded map or miniatures


Let $p > 2$ be an odd number and let $n$ be a positive integer. Prove that $p$ divides $ \left(1 ^ {p^ n} + 2 ^ {p^ n} +\cdots+ (p-1)^ {p^ n}\right) $.  This is a question from Titu book on number theory and solution straightly goes to below one line. And I have no idea how it resulted.  Define $k = p^n$ and note that $k$ is odd. Then  $$d^k + (p-d)^k = p\left[d ^{(k-1)} - d ^{(k-2)}(p-d) + \cdots+ (p-d)^{(k-1)}\right] $$  Summing up the equalities from $d = 1$ to $d = \frac{p-1}{2}$ implies that $p$ divides $$\left(1 ^ {p^ n} + 2 ^ {p^ n} +\cdots + (p-1)^ {p^ n}\right)$$  Please provide me an intuitive and simple explanation and that I can understand. I found the same question at  but still I am not able to get it.


python: append() to a single list of list appends to all

I have a lists of list, and I would like to append data to each sublist independently.  When I append to one, it seems like ALL of the sublists are getting the same data appended.  Here is my code:  Code:  parent = [[]] * 2 data = [1]*4 parent[0].append(data) print "sublist 0:", parent[0] print "sublist 1:", parent[1]   Output:  sublist 0: [[1, 1, 1, 1]] sublist 1: [[1, 1, 1, 1]]   Expected Output:  sublist 0: [[1, 1, 1, 1]] sublist 1: []   What am I doing wrong or not understanding here?


Story with a spaceship that crashes into a medieval civilization

It’s a science fiction story at least 10 years old where people on spaceship crash into medieval type civilization. I only remember bits and pieces as I read it as a kid and mom made me return it.   They used the ship’s laser to sharpen their swords and have the best medieval weaponry.  Started trading with some people but of course ended up in war.  I still remember the ending after all this time: The commander of the medieval army is attacking and the ship people somehow make their laser expand and take out the whole force, and as the commander is hit the author writes "he watched the ?picture of his family melt, and he along with it."   I’ve searched for this book for 5-10 years now and no luck - one of my biggest regtets is returning it.


What is the impact of , ,  or  elements on SEO?

What is the impact of i, b, strongor span tags on SEO? I quote the :  The HTML <b> Element represents a span of text stylistically different from normal text, without conveying any special importance or relevance. It is typically used for keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced. Another example of its use is to mark the lead sentence of each paragraph of an article. The HTML <i> Element represents a range of text that is set off from the normal text for some reason, for example, technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type. The HTML Strong Element (<strong>) gives text strong importance, and is typically displayed in bold.  From these, the three of them could be used to highlight "important text". But I don't really know what would be the impact on the semantics, from a SEO perspective. Until now, I was mostly using the span tag with styling attribute in order to raise visual importance to important words without polluting the code with visual style items. However, those important words, are indeed important. I mean that it could be smart to highlight them from a SEO perspective. span being meaningless, switching to another tag may be a good idea after all. Do you know if there are any differences between those three alternative tags to optimize search engine results?


If $(2x_{n+1}-x_n)$ converges to $x$, then show that $(x_n)$ converges to $x$.

Let $(x_n)$ be a sequence in $\mathbb{R}$. Show that if $(2x_{n+1}-x_n)$ converges to $x$, then $(x_n)$ converges to $x$.  We don't know if the sequence $(x_n)$ is a convergent sequence or a cauchy sequence. If we are able to prove any one, then the problem is simple. Please provide any clue on how to go about.


I passed level 365, but it doesn't let me move ahead on the phone. Works fine on computer.


While loop with user input- cannot get the while loop to stop asking for user input

I am trying to make the while loop stop asking for user input once the user enters "stop", but i cannot get it to stop asking the user for input. public static void main(String[] args) {     exampletoday llist=new exampletoday();     Scanner keyboard=new Scanner(System.in);     System.out.println("Enter the first operator or operand: ");     String first=keyboard.nextLine();     llist.addNode(first);     while(true)     {     System.out.println("Enter the next operand or operator or stop to stop: ");     String next=keyboard.nextLine();     llist.addNode(next);     if(next=="stop")     break; }


How do I install gcc 6 (latest 6.1?) on Ubuntu 14.04 LTS, make c++14 the default and will my libraries work? Also, what problems can I expect if any? Lastly, please walk me through this because i am rather new at Linux and programming.


Adding more than one author with different affiliation

My goal is adding more than one author with different affiliations, it will look like something:  Author A, Author B, Author C, Author D and Author E        A,B,C Department of Computer Science       D,E Department of Mechanical Engineering          Email A,B,C,D,E @university.edu                  Latex University   is that possible to do it without using any packages, if not packages are welcome.  Thanks  Edit: i came up with Thorsten Donig's solution however i have the problem of symbols that appear weirdly.


How to implement GetHashCode for a pair of 3D vectors

First of all, I found an implementation of GetHashCode for a 3D integer vector, but I can't figure out if this is a good one or not (at least I'm not 100% sure):  public struct Vector3i {     public int x;     public int y;     public int z;      public override int GetHashCode ()     {         return x.GetHashCode () ^ y.GetHashCode () << 2 ^ z.GetHashCode () >> 2;     } }   From this, I would like to create a pair of 3D vectors (let's call them A and B) with a hashcode which is independent from the order of Vectors A and B. In other words I want the pair (A, B) to have the same hashcode than the pair (B, A). I thought of something like this:  public struct Vector3iPair {     public Vector3i a;     public Vector3i b;      public override int GetHashCode ()     {         return a.GetHashCode () ^ b.GetHashCode ();     } }   Do you think this would have the correct behavior?


Is Charm Monster (or similar magic) obvious to bystanders that the spell is being cast?  I've looked at a number of sources, for example I've looked at the "Sage Advice Compendium" which reads:      Do you always know when you’re under the effect of a spell?      You’re aware that a spell is affecting you if it has a perceptible   effect or if its text says you’re aware of it (see PH, 204, under   “Targets”). Most spells are obvious. For example, fireball burns you,   cure wounds heals you, and command forces you to suddenly do something   you didn’t intend. Certain spells are more subtle, yet you become   aware of the spell at a time specified in the spell’s description.   Charm person and detect thoughts are examples of such spells."   Sage Advice Compendium, Page 11  This describes that the target is not aware if it has no perceptible effect; however in the PHB page 203, it reads:     Verbal (V) Most spells require the chanting of mystic words. The   words themselves aren’t the source of the spell’s power; rather, the   particular combination of sounds, with specific pitch and resonance,   sets the threads of magic in motion. Thus, a character who is gagged   or in an area o f silence, such as one created by the silence spell,   can’t cast a spell with a verbal component.      Somatic (S)      Spellcasting gestures might include a forceful gesticulation or an   intricate set of gestures. If a spell requires a somatic component,   the caster must have free use of at least one hand to perform these   gestures.   PHB 203, emphasis mine  This would say to me that a spell is quite obvious it is being cast by just about anyone (assuming you aren't casting it with subtle spell, as part of the sorcerers class features); however, in the PHB, it says this:      Unless a spell has a perceptible effect, a creature might not know it   was targeted by a spell at all. An effect like crackling lightning is   obvious, but a more subtle effect, such as an attempt to read a   creature's thoughts, typically goes unnoticed, unless the spell says   otherwise.   PHB Page 204  So when we review these sources, it would say that the target is not aware, yet casting the spell is quite obvious if we look at what it says about the vocal and somatic components; furthermore, it says nothing about bystanders and if they would notice these charm spells.  So back to our original question...  Do bystanders or the target's allies recognise you are casting a spell?  I'm asking for a RAW answer please.


Different reference numbering per chapter

I have a LaTeX document broken up into chapter, sections, and subsections. The theorems are numbered according to the section.   If I reference a theorem from a particular chapter in the same chapter, I would like it to show up as      Theorem section.#.   If I reference the theorem from a different chapter, I want it to show up as      Theorem chapter.section.#.   How can I do this?  Edit:  I know very little about LaTeX. This is a portion of what appears at the beginning.  \newtheorem{theorem}[subsection]{Theorem}  \newtheorem*{theorem-non}{Theorem}  \theoremstyle{plain}  \newtheorem{acknowledgement}[subsection]{Acknowledgement}  \newtheorem{algorithm}[subsection]{Algorithm}  \newtheorem{axiom}[subsection]{Axiom}  \newtheorem{case}[subsection]{Case}  \newtheorem{claim}[subsection]{Claim}  \newtheorem{conclusion}[subsection]{Conclusion}  \newtheorem{condition}[subsection]{Condition}  \newtheorem{conjecture}[subsection]{Conjecture}  \newtheorem{corollary}[subsection]{Corollary}   I hope this helps. If something more specific/different is needed, please let me know.


Tex Live 2016 bug: "! LaTeX Error: No counter 'd' defined."

I have a file which compiles fine with TeX Live 2015, but which bugs on TeX Live 2016. When compiling with TeX Live 2016, (after I clean up all the non-source files) I get the following error:  ! LaTeX Error: No counter 'd' defined.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...                                                l.27 \begin{defn}  ?    Please have a look at the following minimal working example, in which I encounter this bug.   \documentclass{article}  \usepackage{amsthm}  \usepackage{aliascnt}  \usepackage[colorlinks,citecolor=darkgreen,linkcolor=darkgreen,unicode]{hyperref}  \usepackage[capitalize]{cleveref}  \def\defthm#1#2#3{%   %% Ensure all theorem types are numbered with the same counter   \newaliascnt{#1}{thm}   \newtheorem{#1}[#1]{#2}   \aliascntresetthe{#1}   %% This command tells cleveref's \cref what to call things   \crefname{#1}{#2}{#3}}  \newtheorem{thm}{Theorem}[section] \crefname{thm}{Theorem}{Theorems}  \theoremstyle{definition} \defthm{defn}{Definition}{Definitions}  \begin{document}  \begin{defn} This definition causes trouble in TeX Live 2016, but not in TeX Live 2015. \end{defn}  \end{document}


I need help with getting npcs to move in in terraria

Hello my npcs are not moving in although i have a house with all the requirements and 68 silver coins i have also 30 gold coins i say this because i  want a merchant


I'm a total beginner with Ubuntu and every time I got this message. Please how can I solve it? What do they mean with the message free space on disk '/boot' and how can I fix it?


population and subsamples : mean equality?

I want to perform a two sample test, to see whether theirs means are equals. One of the sample is rather big (#60000 values) and represents the scores of a whole population. This population is partitioned in small classes of less that 1000 people. The other sample of the test is a subsamble of the former. It corresponds to people of the same class. So, each time, there is less than 1000 values in it. I have no idea about the variances, so I'd think of using Welch's t-test.  But I'm concerned regarding the independence hypothesis: can it be valid, considering that the second sample is negligible when compared to the overall population?


Difference between the i386 download and the amd64?

What is the difference between standard i386 download and the amd64 download of Ubuntu 11.04? I am currently running the i386 on an amd machine, would my system work better with the amd64 download instead? (my machine was running Windows 7 64bit, but I neglected to look at that prior to installing Ubuntu).


If photons lack mass, why are they affected by gravity? Is this because photons have a lot of energy and m=e/c^2?


What is the PHP regex to convert text containing a URL into a hyperlink?

What's a regex pattern (in PHP) that replaces a string with hyperlinks, where the text preceding a URL is used as the anchor text for the link?  For example:  text a http://example.com ending text   becomes   text a ending text   In other words, the text preceding the URL becomes the anchor text for the link.   What I really want is a variation of the following function by snipe  but with the twist above.


I'm currently trying to play my all time favorite game, Final Fantasy X, on the PCSX2 emulator and I'm constantly running at around 35-40 FPS, about 70-80% of optimal performance.   Does anyone know what sort of settings I should be looking into configuring to optimize game performance?  My specific specs are:   OS: Windows 7 Motherboard: XFX Nforce 680i Sli CPU: Intel Core2 Quad Q6600 Memory: ~4GB RAM DirectX Version: DX11 Graphics Card: ATI Radeon HD 5800


How can a human expand their lifespan in Pathfinder?

Is there a way for a human character to increase their life span by any significant amount?  I want to expand his lifespan because I want him to eventually raise a dragon, but I know that's way outside of a human's or even elf's lifetime. Fluff-wise, the human is also draconic, as in he has dragon blood, though I'm not planning yet on taking any bloodline stuff for this.  We're playing Pathfinder, though D&D 3.5e material is allowed. Preferably he should remain himself and human. (This includes not becoming an evil lich.)  Also, since this will change answers by A LOT. I am going to be the host of the group. Which means I have GM duty since I'm the only one of us who's read dnd/pathfinder books.  Sources allowed as I know currently for sure  Pathfinder: Core rulebook, ultimate combat, ultimate magic, ultimate equipment, advanced class guide.  3.5: complete arcane. Races of Eberron*. complete warrior. Complete Arcane. Complete mage. PHB 2. Draconomicon. Races of the dragon.  Also pertaining to him he's most likely going to be a magus


Design & Coding - top to bottom or bottom to top?

When coding, what in your experience is a better approach?    Break the problem down into small enough pieces and then implement each piece. Break the problem down, but then implement using a top-down approach. Any other?


Name for pairs of words with a strong association?

English has certain words that almost always go together. For example:  Wreak Excruciating Vastly  Reading that list, most native speakers will expect to see "havoc", "pain", and "superior" respectively. While you could "wreak destruction", that usage is very uncommon compared to "wreak havoc". My primary question: Is there a name for this kind of word relationship? Secondary questions:  Is there a reason this happens in our language? Can you list any other examples of these pairs?  Funny side note: Not knowing what to call this concept makes it a little tricky to pick meaningful tags.


Default low row height of table and tabular environments

Suppose that we have this code:  \begin{table} \caption{xxxx.} \centering \begin{tabular}{|c|c|}   \hline   \rowcolor{Gray}   % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...   1 & AAAAAAAAAAAAAAAA/BBBCCCCCCCC \\   \hline   2 & SDSDSDSDSD/FDFDFDFDF \\   \hline     2 & gGGGGGGGGG/TTTTTTTTTT \\   \hline   \rowcolor{Gray} \end{tabular} \label{table:QQ} \end{table}   The output of this table is:    As you can see the height of table rows is not fix with font size (+texts are not in center of every cell/we have tendency to upward) . Why we have this behavior in default table appearance? How can i have a table with better appearance?


Difference between Stack Exchange and Stack Overflow

I am new to Meta stack Exchange.  I don't know the difference between Stack Exchange and Stack Overflow.  I have been using Stack Overflow for more than 2 years. I know SO is for programming related questions. But what is the purpose of Stack Exchange?


What does ^ means in c++ object declaration?

I have seen ^ this thing in C++ object declaration as    Bitmap^ image1;   but I cannot understand what it means, I tried to find it over google but cannot!


Number of ways to connect sets of k vertices in a perfect n-gon

This is a copy of my post at Mathexchange.com, as my question is still not fully answered and I really wanna find a solution to this. Feel free to refer to there for useful comments and partial solutions:  Let Q(n,k) be the number of ways in which we can connect sets of k vertices (dots), in a given perfect n-gon, such that no two lines intersect at the interior of the n-gon and no vertice remains isolated. Intersection of the lines outisde the n-gon is acceptable. Obviously, k|n, and n can't be prime because otherwise there will be dots left unconnected. The n-gon itself is an acceptable solution to a connection of n vertices, and in the case of k>2, these aren't lines, but a set of connected lines, a sort of a network formed by connected planar graphs with straight edges with k vertices, which are required to be vertices of the n-gon itself. There must always be S=n/k sets of lines. For k=2, there are exactly n/k lines, and for k>2, there are exactly n/k, not lines but sets of such connected planar graphs. Take for example Q(6,2). We have a perfect hexagon. By brute-forcing with pencil and paper, I found that there are 5 ways to connect sets of 2 vertices (dots) such that no two lines intersect inside the hexagon. Hence, Q(6,2) = 5. The following image depicts the case of Q(6,2):  Now let's move one step further: Let U(n,k) be the number of unique ways to connect sets of k dots/vertices in a perfect n-gon, such that no lines intersect inside the n-gon, and rotational symmetry is neglected, i.e, every possible arrangement is unique and can't be formed by rotating another arrangement in any way. U(6,2)=2. Note that U(6,2)=2 because the arrangements of the first line in the image are not unique, and can be formed by rotating one another. The same happens for the second line of arrangements. Hence U(6,2)=2. I'm pretty sure there's a pure combinatorial approach to this problem, perhaps involving Polya's Enumeration Theorem (PET). Is there an elegant solution to these functions? Can they even be solved for k>2? Any light shed on any of the functions will be very much appreciable, as I haven't been successful in deriving a formula for any of them. Both algorithms and formulas will be great! P.S: I can program in java and mathematica Thanks a lot in advance. EDIT - Temporary Solutions + Relevant questions AND progress Q(n,2) = C(n/2) where  C(n) = 1/(n+1) * Binomial (2n , n) And C(n) denotes the n'th Catalan number. Now let us denote W(n) = U(n,2). Can you find a formula for W(n)? Perhaps a connection between Q(n,2) and W(n)?


Is this still valid in 2019 - Do you earn miles for trips that you flew, but you didn't buy?

I know that this question has been answered back in 2012. But is the answer still valid as of today - 2019?


Is it possible to save output from a command to a file after the command already has been executed?

Does an elegant way exist to save the output of a command to a file after the command has been run, while the terminal window is open i.e. once the command has been executed in the terminal?  The output is still present in terminal. Now I could copy & paste all the lines and save it to a file.  But perhaps does a method exist to somehow write the output buffer of a terminal window to a file or even better the output of an already executed command?


three fair six-sided dice are thrown and the dice show three different numbers. find the probability that at least one six is obtained??

I got 91/216 using binomial distribution. I found the probability using how to find no six was obtained and subtracted from 1.  Is this right?


If $q\mid 2^x-1$ and $q\mid 2^y-1$ does $q\mid 2^{\gcd(x,y)} - 1$?    If the answer is yes, please show proof. By factoring $2^x - 1$ to ${2^{\gcd(x,y)}}^\frac{x}{\gcd(x,y)} - 1$ the converse must be true.


How do I find the cheapest date to book a given hotel?

I am looking for a site or service that allows me to search a hotel (or hotels, or a specific beach/location) for the cheapest date.   Most sites want you to tell them when you plan to visit.  I WANT the site to tell me when to visit based off of the best price


Full install to USB drive (not U.S.B installer)

Can you install Ubunta to a USB drive? So it is installed to a USB as you would install it to a hard drive.


I can't install anything from software center

Whenever I try to hit install this shows up:     Detailed errors from the package manager follow:   apt transaction returned result exit-failed   What should I do? Please help...


In Avengers: Endgame we see that:      Loki steals the Tesseract after Tony fails to take it.   Can this action alter the present in the current universe, where they are supposedly dead? What else could be the reason that the scene is included in the movie?


I have the following sum to evaluate:  $$\sum\limits_{n=1}^{\infty}\frac{n}{2^{n+1}}$$ My professor says that I can evaluate this through "differentiating the geometric series" but I am not quite sure what that means. I already know that this converges to $1$, just not sure how to prove.


Three screens with Nvidia video card and Intel HD graphics?

I have a Nvidia video card, but also a built in Intel HD graphics. On windows I can do 3 screens with 2 screens on the nvidia and the third on the Intel card. Is this also possible in Ubuntu? Because Ubuntu doesn't detect the third screen. I have Ubuntu 14.0.