I want to load a GeoTIFF file from a browser using Leaflet. I have created a custom control button that on click loads a file from local computer.   fileInput.Change() is the function that is called, when a user select a tiff file. Right now I am loading a file from local directory, and it's size is around 57 MB, and I am getting error of 206 in my browser.       // load raster button     var customControl =  L.Control.extend({        options: {         position: 'topleft'       },        onAdd: function (map) {         var container = L.DomUtil.create('input');         container.type="button";         container.title="No cat";         // container.value = "42";          container.style.backgroundColor = 'white';         //container.style.backgroundImage = "url(https://t1.gstatic.com/images?q=tbn:ANd9GcR6FCUMW5bPn8C4PbKak2BJQQsmC-K9-mbYBeFZm1ZM2w2GRy40Ew)";         container.style.backgroundSize = "30px 30px";         container.style.width = '30px';         container.style.height = '30px';          // container.onmouseover = function(){         //   container.style.backgroundColor = 'pink';         // }         // container.onmouseout = function(){         //   container.style.backgroundColor = 'white';         // }          container.onclick = function(){         document.getElementById('fileInput').click();           console.log('buttonClicked');         }          return container;       }     });      fileInput.onchange = function(e) {       debugger;       var bounds = new L.LatLngBounds(             new L.LatLng(-179.9999999999999716,-89.9999999999820091 ),             new L.LatLng(179.9999999999640465, 89.9999999999820091)           );              // var overlay = new L.imageOverlay("GRAY_50M_SR/GRAY_50M_SR.tif", bounds)             //   .addTo(map);   //           var  bounds = new L.LatLngBounds(         // new L.LatLng(40.71222,-74.22655),         // new L.LatLng(40.77394,-74.12544));              var overlay = new L.ImageOverlay("GRAY_50M_SR/GRAY_50M_SR.tif", bounds, {                         opacity: 0.5,                         interactive: true,                         attribution: '&copy; A.B.B Corp.'                     });                     map.addLayer(overlay);       };   How can I load a GeoTIFF file in Leaflet from browser?


Geodesics equations via variational principle

I would like to recover the (timelike) geodesics equations via the variational principle of the following action:  $$ \mathcal{S}[x] = -m \int d\tau = -m \int \sqrt{-g_{\mu\nu}\,dx^{\mu}\,dx^{\nu}} $$  Using an arbitrary auxiliary parameter $\lambda$, then one is able to rewrite the action and obtains: $$ d\tau = \sqrt{-g_{\mu\nu}\, \tfrac{dx^{\mu}}{d\lambda}\tfrac{dx^{\mu}}{d\lambda}} d\lambda $$ $$ -m \int d\tau = -m \int (d\tau / d\lambda) d\lambda =  -m\int\sqrt{-g_{\mu\nu}\, \tfrac{dx^{\mu}}{d\lambda}\tfrac{dx^{\mu}}{d\lambda}} d\lambda $$  Now we can vary the paths $x^{\mu}(\tau) \rightarrow x^{\mu}(\tau) + \delta x^{\mu}(\tau)$.  I need the following equation to be true, so i get the geodesics equations, but I don't know how one can say the following: $$ \int d\tau \,\delta g_{\mu\nu}\frac{dx^{\mu}}{d\tau} \frac{dx^{\nu}}{d\tau} = \int d\tau\, g_{\mu\nu, \rho} \frac{dx^{\mu}}{d\tau} \frac{dx^{\nu}}{d\tau} \delta x^{\rho} $$ I know there is a simpler action, which leads to the same equation of motion, but there one has to do the same manipulation, which I sadly don't understand.  Thanks for helping me!


Finding the smallest positive integer $n$ such that $S_n$ contains an element of order 60.

I am trying to find the smallest positive integer $n$ such that $S_n$ contains an element of order 60. I know that every permutation in $S_n$ can be expressed as the product of disjoint cycles, and I also know that the order of a permutation is the least common multiple of the lengths of the cycles in its disjoint cycle product.   So, suppose $\sigma \in S_n$ such that $|\sigma|=60$. Then $60=lcm \left\{|c_1|, \ldots , |c_m|  \right\}$, where $c_i$ is one of the cycles in the disjoint cycle product of $\sigma$. The prime factorization of 60 is $2^2\cdot 3 \cdot 5$, but the least common multiple of 2, 3, and 5 is 30, so that doesn't help. However, the least common multiple of 3, 4, and 5 is 60. I just don't know where to go from here.  Also, what is meant by a "disjoint cycle pattern"? Thanks for your help!!


Can a composite number $n$ be the arithmetic mean of $\sigma(n)$ and $\varphi(n)$?

Let   $\varphi(n)$ be the totient-function  $\sigma(n)$ be the divisor-sum-function    It is clear that every prime number $n$ is the arithmetic mean of $\varphi(n)$ and $\sigma(n)$, in other words , the equality $$\varphi(n)+\sigma(n)=2n$$ holds.      Can the given equality hold for a composite number $n$ ?   Upto $10^8$, I did not find an example. I conjecture that the equality can only hold for primes or $n=1$. How can I prove it ?


convergence to exponential with order 1/n

We know that  limit $\left(1+\dfrac{x}{n}\right)^n$ converges to $e^x$ but how can we prove that limit $\left(1+\dfrac{x}{n}+o(\frac{1}{n})\right)^n$ converges to $e^x$.


20+4 pin power supply to 24+4 pin motherboard

I'm thinking about making a small custom-build server. It would only use around 60W maximum. I don't want to pay too much so I think using an old power supply would work.   The motherboard I'm thinking about to buy has a 4-pin CPU power connector and 24-pin ATX power connector. The old power supply has multiple power outputs for the motherboard including a 20-pin ATX power connector and a 4-pin connector that was also used in the old computer to power the CPU.   Can I just plug the 20-pin power connector in the 24-pin connector of the motherboard and connect the CPU power supply? I don't know if I need to plug the 4-pin into the extra 4 pins of the 24-pin connector, leave it unplugged or use the 4-pin connector on the MB for it.   I also assume a 250W power supply won't damage anything and will power it even if it's only using 10W? Or does it need a minimum output?  I've already searched but I couldn't find a specific question about using the extra 4-pin connector.


Why is the Ubuntu terminal on Windows considered better than the Ubuntu terminal on a strictly Linux distribution?

I’m new to this Linux stuff... I may have a fundamental misunderstanding, but I need some clarification on why getting the Ubuntu app on windows and using that terminal is so inferior (according to other Linux developers) than actually dual booting or solely using the Ubuntu distribution.  Thanks.


Is the  actually a principle of least action or just one of stationary action? I think I read in Landau/Lifschitz that there are some examples where the action of an actual physical example is not minimal but only stationary. Does anybody of know such a physical example?


Why is an algebra not a $\sigma$-algebra by induction?

I am studying probability theory by reading Sidney Resnick's "A Probability Path". On page 12 and 13, algebra and $\sigma$-algebra are defined. The only difference between the two is the third requirement.   For algebra, it is required that $A, B\in \mathcal A \Rightarrow A\cup B\in \mathcal A.$ That is, algebra is closed under finite union; For $\sigma$-algebra, it is required that $B_i\in \mathcal B, i\geq 1 \Rightarrow \bigcup_{i=1}^\infty B_i\in\mathcal B$. That is, $\sigma$-algebra is closed under countable union.   I find the definition for algebra confusing. If the union of $A$ and $B$ is in $\mathcal A$, then for any $C\in\mathcal A$ one has $(A\cup B)\cup C\in \mathcal A$ and so on. Then by induction, this extends to countable union. Why does induction NOT work in this case, please? Thank you!


I have a question about the phrase "to this day": (from Frederick the Great by Giles MacDonogh)        They started appearing even before his death on 17 August 1786, and they still crop up to this day.   Should "to this day" be read in the sense of "to a point in time" ("he worked from 1 pm to midnight") or "at a point in time" ("at this moment")?


How to clear all files in a folder ending with `.log`?

I have log files in a folder. These files after some size are creating a new file old_name.log1 and writing to it.  Now there are many files and I can't clear them one by one. I want to delete old_name.log1, old_name.log2 etc and clear old_name.log.  The file_name can be anything. But the file ends with .log and it's extended files ends with .log1, .log2, etc. How to do it?


I have a battery pack of 8 Ni-MH 2400 mAh cells connected to a load that draws ~700 mAh (a Raspberry Pi Zero, display, WiFi dongle, USB hub, and a wireless keyboard dongle). I want to add a led that changes from green ( around full battery) to orange (around halfway) to red (nearly empty) depending on the battery voltage. What voltage are Ni-MH batteries at when full, halfway and nearly dead?


Do Android devices contain a BIOS? If not, how does it boot up? What is the software that actually boots it up and can you replace it?


Question: Let If $P\subseteq \mathbb{R}^n$ be a convex set. show that $int(P)$ is a convex set.  I know that a point $x$ is said to be the interior point of the set $P$ if there is an open ball centred at $x$ that is contained entirely in $P$. The set of all interior points of $P$ is denoted by $int(P)$.  Also a set is convex if $x,y \in P$ $\implies$ $(tx+(1-t)y) \in P$ for all $t \in (0,1)$.  How to go about the above proof?


How to know a string array is empty in VBA?

I dim a empty array of string, but how can I get whether the array is empty? I have tried below but get no idea.   Sub arrtest()   Dim myVar() As String   Debug.Print VarType(myVar)   '8200   Debug.Print TypeName(myVar)  'String()   Debug.Print IsEmpty(myVar)   'False   Debug.Print IsNull(myVar)    'False   Debug.Print LBound(myVar)    'Error   Debug.Print UBound(myVar)    'Error   Debug.Print myVar Is Nothing 'Error End Sub


Pointwise Cauchy-Riemann equations suffice?

Another question just now reminded me of something I realized a while ago I didn't know how to do: Say $V\subset\Bbb C$ is open, $f:V\to\Bbb C$, $f=u+iv$, and at every point of $V$ the partials of $u$ and $v$ exist and satisfy the Cauchy-Riemann equations. How do we show that $f$ is holomorphic? I mean it seems it "must" follow. But note if you think this is totally trivial it's possible you're wrong; for instance it's not clear how the hypothesis implies that $f'(z)$ exists.


I can't understand a simple thing. example: A is an interface, B is a class that implement correctly A. What dose exactly mean doing:  A name = new B(some_argument);    I see lot of people using this instead of  B name = new B(some_argument);    But I can't figure out what dose that mean making an object with an interface. And WHY they do this? There are some differences between them? Sometimes one is better than other? for example the opposite dose not work  B name = new A();


Blender 2.8 - Pro Lighting Sky and Studio -

how do I install Pro Lighting Sky and Studio in Blender 2.8?


Upgrading from 12.10 now that it's end of lifed?

I'm trying to upgrade my 12.10 system, but I can't even run the Software Updater because it dies when trying to find the now non-existent quantal packages. Similarly with command line level apt-get upgrading. Very frustrating.  How do you upgrade now that ubuntu's wiped out those packages that are needed to upgrade?


A fair coin is flipped successively at random until the first head is observed. Let the random variable X denote the number of flips of the coin that are required. Then the space of x is  S={x: x=1,2,3,4, ....}. Later we learn that, under certain conditions, we can assign probabilities to these outcomes in S with the function  $f(x)=(1/2)^x, x=1,2,3,4,...$  Compute the mean $ \mu$.   I know $ \mu =E(X)= \sum_{x=1}^ \infty x \cdot f(x)=1 \cdot (1/2)^1+2 \cdot(1/2)^2+3\cdot (1/2)^3+....=1/2+1/2+3/8+...$  I have thought about factoring 1/2 out, but I still could not figure out the mean. I know $\sum_{x=1} ^ \infty f(x)=1.$ I just need the help of rewriting the expected value in terms of $\sum_{x=1} ^ \infty f(x)$. Any help is appreciated. Thank you.   After looking at the multiple ways to solving this, I am going with the summation direction. This is what I have done so far, but I am still not there yet. Any correction of the following is appreciated.   New:   $ \sum_{x=1}^\infty \frac {x}{2^x}= \sum_{x=0}^\infty \frac{x+1}{2^{x+1}}=\sum_{x=0}^\infty \frac {x}{2^{x+1}}+ \sum_{x=0}^\infty \frac {1}{2^{x+1}}= \frac {1}{2} \sum_{x=0}^ \infty \frac {x}{2^x}+ \frac {1}{2} \sum_{x=0}^ \infty \frac {1}{2^x}$  From here, I do not see how $\frac {1}{2} \sum_{x=0}^ \infty \frac {1}{2^x}=1$?


What's the order of the Final Fantasy games?

There are a lot of Final Fantasy video games out there, and I don't know which one to play.  What order should they be played in?


Can Noether's theorem be understood intuitively?

is one of those surprisingly clear results of mathematical calculations, for which I am inclined to think that some kind of intuitive understanding should or must be possible. However I don't know of any, do you?  *Independence of time $\leftrightarrow$ energy conservation. *Independence of position $\leftrightarrow$ momentum conservation. *Independence of direction $\leftrightarrow$ angular momentum conservation.  I know that the mathematics leads in the direction of Lie-algebra and such but I would like to discuss whether this theorem can be understood from a non-mathematical point of view also.


what I should change in this code to return two lists?

def ethos(file):     f = open(file)     raw = f.read()     token = nltk.word_tokenize(raw)     words_to_match = ['love' , 'good' , 'excellent' , 'perfect' , 'brilliant']     words_to_match2 = ['bad' , 'primitive' , 'struggle' , 'annoying' , 'problem' , 'time-consuming', 'fiddly']     positive_tokens = []     negative_tokens = []     for tokens in token:         if tokens in words_to_match:             positive_tokens.append(tokens)         and tokens in words_to_match2:             negative_tokens.append(tokens)     return negative_tokens   I wrote this code with an intention of returning two lists one positive and one negative, I cannot give two return statement, but I want two separate lists. And this program is showing syntax error in the 'and' statement, kindly help.


I have a question regarding the proper usage of I and me

Is it "No one will notice but you and me"  or "no one will notice but you and I" ?


Newsletter registration email field has missized placeholder overlay

I visited a question  and happened to get the newsletter registration prompt, which appears to have a styling issue in the email field:    The quick fix would be for the two fields to just have the same width (149px vs 200px), but it probably also makes sense at this point to just do away with the pseudo placeholders and just use the placeholder attribute universally, with a polyfill for legacy browsers.


if I was sick , and needed someone to give me water , should I say : water me ?

I mean not just giving me water , I need them to put the cup on my lips ... etc ? I know : water the grass .


I'm trying to install Open JRE 8 but it says this and doesn't install

I tried to install Open JRE 8 following  but it gives an error. This is what happens when I do it.  # apt-get install openjdk-8-jre   Reading package lists... Done   Building dependency tree   Reading state information... Done   openjdk-8-jre is already the newest version (8u151-b12-0ubuntu0.16.04.2).   0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   1 not fully installed or removed.   After this operation, 0 B of additional disk space will be used.   Do you want to continue? [Y/n] y   Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...   Downloading Oracle Java 7...   --2018-02-10 02:37:00--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz   Resolving download.oracle.com (download.oracle.com)... 23.45.100.92   Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:80... connected.   HTTP request sent, awaiting response... 302 Moved Temporarily   Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]   --2018-02-10 02:37:00--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz   Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.109.81.24, 2a02:26f0:10:290::2d3e, 2a02:26f0:10:294::2d3e   Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.109.81.24|:443... connected.   HTTP request sent, awaiting response... 302 Moved Temporarily   Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1518226740_e8a44114a192afe1bcec53b144358538 [following]   --2018-02-10 02:37:00--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1518226740_e8a44114a192afe1bcec53b144358538   Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:80... connected.   HTTP request sent, awaiting response... 404 Not Found   2018-02-10 02:37:02 ERROR 404: Not Found.   download failed   Oracle JDK 7 is NOT installed.   dpkg: error processing package oracle-java7-installer (--configure):    subprocess installed post-installation script returned error exit status 1   Errors were encountered while processing:    oracle-java7-installer   E: Sub-process /usr/bin/dpkg returned an error code (1)


Evaluate $\int_{\gamma} \frac{ |dz| }{z} $ where $\gamma $ is the unit circle

I need to evaluate $\int_{\gamma} \frac{ |dz| }{z} $ where $\gamma $ is the unit circle.    Attempt: Let $\gamma(t) = e^{it} $ where $t \in [0,2 \pi]$. How can I get rid of the absolute values in the differential?


I try to concatenate 2 lambda expressions that are generated dynamically:  public Expression<Func<User, bool>> Expres(int id) {     var argument = Expression.Parameter(typeof(User));     var left = Expression.Property(argument,"id");     var right = Expression.Constant(id);     BinaryExpression binary = Expression.Equal(left, right);     Expression<Func<User, bool>> exp = Expression.Lambda<Func<User, bool>>(         binary,         new[] { argument }     );      return exp; }   Example:  >Expres(255); Param_0.id == 255  >Expres(10); Param_0.id == 10   but, when merge them...  >expression = Expression.And(exp1, exp2);      (Param_0.Id == 255) And (Param_1.Id == 10)   >Expression.Lambda<Func<TEntidad, bool>>(expression, new[] { argument });      Param_0 => ((Param_1.Id == 255) And (Param_2.Id == 10)   but it generates more dependencies than required, and the result of what I expected is:     Param_0 => ((Param_0.Id == 255) And (Param_0.Id == 10)


Prove that if $f:X\to Y$ is a surjective function between sets, then there must exist a function $g:Y\rightarrow X$ such that $f\circ g=1_Y$.   I know that the identity function is onto, and if $f$ has right inverse, then $f$ must be onto; although, I haven't seen a proof of this. A good hint would be nice.


Wireless disabled by hardware switch on an Asus X550V

I'm using Ubuntu 13.04 and I have ASUS X550V laptop. This is my rfkill list:  0: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: yes 3: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   Before you start going: Hey, just turn on your hardware switch, dummy... my hardware switch is Fn + F2 and it works perfectly fine on my Windows boot. But, on my Ubuntu boot it does nothing... All the other Fn + F_ combos work (turn off the touchpad, screen turn off, screen brightness, sound) and they give some kind of visual indicator when I press it.  My lshw log:  *-network DISABLED                 description: Wireless interface                 product: AR9485 Wireless Network Adapter                 vendor: Atheros Communications Inc.                 physical id: 0                 bus info: pci@0000:03:00.0                 logical name: wlan0                 version: 01                 serial: 24:0a:64:28:b4:25                 width: 64 bits                 clock: 33MHz                 capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless                 configuration: broadcast=yes driver=ath9k driverversion=3.8.0-19-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn                 resources: irq:17 memory:f7900000-f797ffff memory:f7980000-f798ffff


For real number functions (if they are differentiable) $f$ and $d$ it holds: $$\frac{\mathbf{d}}{\mathbf{d}t}d(f(t)) = d'(f(t))f'(t).$$  Now let $t$ be a real number but $v$, $f(t)$, and $d(v)$ be vectors. The above formula may not make sense because $d$ is now a function from a vector.  Please help to "save" the formula, that is define how it can be demonstrated a similar formula for vectors.  Maybe it may be described with something like gradient?


(100.0/3.0)*3 == 100, but using variables yields 99.99996. What's the deal?

I am aware of the inherent imprecision of floats. What I'm confused about is why I would get returned "100" from something I would expect to resolve 0.99999999 etc. How could 0.33*3 ever possibly yield 100?  Here is my code: if I say  float x = 100.0/3.0; printf("%f",x*3.0);   The output is "99.999996". Yet if I say  printf("%f",(100.0/3)*3);   The output is "100". Shouldn't they be identical? I would expect x to resolve to (100.0/3.0), exactly what's written there in plaintext -- yet they yield two different results.


I have the list of Arrays of Objects and storing in to the List  Object[] data = [12.0, 0.05, 100.0, 3.0, 5.0, a, cat, 3];  List<Object[]> events = new ArrayList<Object[]>();  events.add(data);  System.out.println(events.toString());   When I am printing I am getting in this format [[Ljava.lang.Object;@23e028a9] , I tried .toString() and other but neither worked.  Please help me to solve this problem to see the correct form in output.


I have the following code working:  SELECT of_Loans__c, Id, ( SELECT id FROM Loans__r WHERE MtgPlanner_CRM_Status__c = 'Closed')  FROM Contact   After some time tinkering around, I was able to access the information of the loan related list (on the Contact page) using the '__r' extension. The above SOQL query does as I want it:    However, I did this in a sandbox environment which may not have the same relationships between objects as I have in live.  A similar SOQL query (in live):  SELECT of_Closed_Loans__c, Id, ( SELECT id FROM Loans__r WHERE MtgPlanner_CRM__Status__c = 'Closed')  FROM Contact   renders the following error:  didn't understand relationship 'Loans__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names  Both environments have Contacts with a related list to the Loan object; I do not know what might I need to tweak on the live env. to replicate the results of the successful first sandbox env.   Any suggestions are appreciated!


Placing a removable discontinuity in the graph of a function using TikZ

I would like to graph the function $y = \sqrt{x^{2} - 4}/\sqrt{x - 2}$ on the domain from -5 to 30. This function will be Sy = \sqrt{x + 2}$ restricted to the open interval $(2, \infty)$.  So, I would like an open circle at (2,0), a dashed line drawn down to the x-axis, and a tick mark there and below it the label "2."  I would also like a tick mark below the x-intercept and below it the label "-2."  Why is solid curve blue and the dashed curve red?  Why is the label of the curve interfering with the curve? What is the "+" in the command "\addplot+"?   \documentclass[10pt]{amsart} \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings} \usepackage{tkz-euclide} \usetkzobj{all} \usepackage{pgfplots} \pgfplotsset{compat=1.11}  \begin{document}      \begin{tikzpicture} \begin{axis}[grid=both,           xmax=41,ymax=6,           axis lines=middle,           restrict y to domain=-1.5:6.5,           enlargelimits,           axis line style={shorten >=-0.25cm,shorten <=-0.25cm,latex-latex},           ticklabel style={fill=white}] \addplot+[domain=2:36,mark=none,samples=200] {sqrt(x + 2)} node[fill=white, below]{$y=\frac{x^{2} - 4}{\sqrt{x-2}}$}; \addplot+[domain=-2:2,dashed,mark=none,samples=200] {sqrt(x + 2)}; \draw[fill] (axis cs:2,2) circle [radius=1.5pt] node[below] {$(2,2)$}; \end{axis} \end{tikzpicture}  \end{document}


If we are in a free fall which implies we are accelerating at 9.8 m/sec every sec. And let's say that we are falling into a pit that has enormous depth. So isn't this be possible that we may accelerate and surpass the magnitude of speed of light?


Given a polynomial $ P(z) = z^n + a_{n-1}z^{n-1} + \cdots + a_0 $, such that   $\max_{|z|=1} |P(z)| = 1 $      Prove: $ P(z) = z^n $      Hint: Use cauchy derivative estimation    $$ |f^{(n)} (z_0)| \leq \frac{n!}{r^n} \max_{|z-z_0|\leq r} |f(z)| $$ and look at the function $ \frac{P(z)}{z^n} $     It seems to be maximum principle related, but I can't see how to use it and I can't understand how to use the hint.


I am trying to code a program that allows to enter various words(step by step) until one types in "quit" . I am having trouble stopping the loop (even with the word quit typed, it doesn't stop) Using System.out.println(sum); I can check that the words are adding up, but it never stops..  ((Summary : if(string == "quit") does not work and for (String end = "quit"; string!=end;) does not work )) Sorry if its hard to read. its my second day coding :(  public static void main(String[] args) {     java.util.Scanner scanner = new java.util.Scanner(System.in);     String sum = "";     System.out.println("Type in a word");     String string = scanner.nextLine();     if (string == "quit")     {System.out.println("Ending system");      }     else{     for(String end = "quit"; string!=end;  )     {         sum = sum + " " + string;         System.out.println(sum);         System.out.println("Type in another word");         String stringextra = scanner.nextLine();         if(stringextra == "quit"){break;}         string = stringextra;      }      scanner.close();     System.out.println("Stopping... due to the word quit");     System.out.println("all the words typed are " + sum);      }  }}


I want to use the mod I've installed. I have Forge installed and I have ended the task "Java", but everytime I delete META-INF it keeps coming back everytime I open the Minecraft Launcher 1.2.1. But I know YouTubers have their mods working fine on 1.6! Someone please tell me the answer to this, it's very annoying. Just to confirm, it regenerates when I try to play Minecraft. I already deleted the entire file, so why does it keep coming back!?


Today I was awarded a new badge, the 'curious' badge.  What exactly is that? What does  Asked a good question on 5 separate days, and maintains a positive question record  mean? The same goes for the   'Inquisitive' and  'Socratic' badges.


How to add multiple relative hyperlinks to single point in ArcGIS for Desktop with Basic level license?

It may be a very obvious one, but how do I add more than one relative hyperlink to a point feature class in ArcGIS for Desktop with a Basic level license?  The Basic level license eliminates using Attachments being a possibility.


Hosting options for people that have Imgur blocked by their ISP

Imgur is blocked by two of the private ISPs we use. Is there a workaround without involving tunnelling?  Bear in mind that Filmot (an Imgur mirror) and Flickr are also blocked.


I'm trying to make a user validation for multiple choices using a while loop and If the user doesn't match the choices then the program has to terminate. This is what I got so far    while(input!="air" || input!="water" || input!="steel"){         System.exit(0);     }   Unfortunately, it doesn't work.  I would prefer to do exceptions, but my professor is strictly against using it for this assignment. I really want to grow as a programmer so any advice, tips and tricks are welcomed, thank you all for trying to help me out.


dpkg error, unable to install anything "resource temporarily unavailable", `dpkg --configure -a` hangs

Every time I try to  sudo apt-get upgrade   I get  E: Could not get lock /var/lib/dpkg/lock - open     (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/),    is another process using it?   Upon running sudo dpkg --configure -a   Setting up linux-image-4.13.0-46-generic (4.13.0-46.51) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-4.13.0-46-generic vmlinuz(/boot/vmlinuz-4.13.0-46-generic) points to /boot/vmlinuz-4.13.0-46-generic  (/boot/vmlinuz-4.13.0-46-generic) --  doing nothing at /var/lib/dpkg/info/linux-image-4.13.0-46-generic.postinst line 491. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-46-generic     /boot/vmlinuz-4.13.0-46-generic run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-46-generic     /boot/vmlinuz-4.13.0-46-generic   After this the upgrading stalls.  I am unable to install anything, there's always dpkg to be fixed. I have tried everything, but still nothing works.


I am currently experiencing a very obvious artifact that occurs when looking at objects on very grazing angles  Here is a picture of the artifact:   I noticed that the issue was coming from my implementation of Cook-Torrance's Specular BRDF.   Here is the equation for the Cook-Torrance Specular BRDF:    More specifically, calculating the denominator is causing the issue:  float denominator = 4 * max(dot(viewDir, normal), 0.0) * max(dot(lightDir, normal), 0.0) + 0.001;  // Prevents any division by zero   When I change the calculation of dot(viewDir, normal) to dot(halfway, normal), the artifact disappears:  float denominator = 4 * max(dot(halfway, normal), 0.0) * max(dot(lightDir, normal), 0.0) + 0.001;  // Prevents any division by zero   But this equation is no longer correct. I was wondering if anyone knows why my implementation causes these artifacts?  If you want to see my fragment shader you can find the code here:    Thank you!


How long can a pre=packaged, un-opened Brined Turkey last if bought 1 week before Thanksgiving? The outer expiration date on this Brined Turkey states to use or freeze by 12/2/2020. Was planning to smoke/cook on 11/24/2020 but wanted to know if Turket might be bad or good. There are too many sites with conflicting answers.


Make debian "apt" (new apt-get / aptitude frontend) cache .deb files in '/var/cache/apt/archives/'

On a current (2018-06) Debian sid, installing .deb packages via apt-get or aptitude or synaptic caches the downloaded packages in /var/cache/apt/archives:  # rm -f /var/cache/apt/archives/nano_* # aptitude install nano   [...] # aptitude purge nano   [...] # ls /var/cache/apt/archives/nano_*  /var/cache/apt/archives/nano_2.9.7-1_amd64.deb   Using the frontend apt does not cache the downloaded files anymore:  # rm -f /var/cache/apt/archives/nano_* # apt install nano   [...] # ls /var/cache/apt/archives/nano_* ls: cannot access '/var/cache/apt/archives/nano_*':       No such file or directory   So switching between two mutually exclusive sets of packages re-downloads everything. How can I change the settings of apt to keep the downloaded files?


Why Couldn't a Time Turner Have been Used to Stop Voldemort?

With the use of a time turner, that opens a whole "Pandora's Box" of possibilities.  While the use of one can be problematical, when the Ministry of Magic found out how dangerous Voldemort was, why didn't they simply use a time turner to go back and stop him before he became dangerous?  (I know this does open a lot of plot holes, but witches and wizards don't seem to worry about laws of science, so it would seem strange that magic that seems to easily supersede laws of physics (like brooms that fly without propulsion) would worry about the problematical issues of time travel.)


General idea behind the hint for an inner product space problem

Prove that if $V$ is an inner product space, then $|\langle x,y\rangle| = \|x\| \cdot \|y\|$ if and only if one of the vectors $x$ or $y$ is a multiple of the other.   Given the hint: identity holds and $y \neq 0$, let $a=\frac{\langle x,y\rangle}{\|y\|^2}$, and let $z=x-ay$. Prove $y$ and $z$ are orthogonal and $|a|=\frac{\|x\|}{\|y\|}$. Then use Pythagorean theorem   I am not able to appreciate this hint, can someone explain the general idea behind this? especially why do we need a $z$ a have to prove $z$ and $y$ are orthogonal? Want the intuition to understand why to do this.


Does the charger consume power after charged device is disconnected?

Quite similar to . If I'm not mistaken any impulse mobile device charger is still consuming power, when plugged into socket, but when cable is disconnected from charged device. Correct?  Does the same rule goes for power sockets equipped with USB ports for charging mobile devices ( to Polish seller):    I was wondering, if this kind of construction means that my socket(s) will be continously draining power, 24 hours a day, no matter if anything is connected to it or not? Or do these have some kind of power-off "switch" (meaning stops draining power when everything is disconnected)?


Why are my wrists the first part of my body to start aching during a long ride?

Most riders seem to say it's their groin, neck or lower back that starts hurting first after a decent distance has been ridden. For me it is my wrists.  I have no history of wrist pain (strains, breaks etc) so it can't be explained by that and I try to adjust my hand positions across my handlebars as often as I can.  My question has 2 parts:   1. Is there anything I can do to minimise pain in terms of riding position, gloves, exercises etc which will reduce soreness?  2. Why might this pain be occurring?  *I do all of my riding on paved roads on a road (Specialized Allez) bike.


Convert int to string in fixed no of characters

I am writing int to a file. if the number is 0, then i want to write it in file as 0000. currently   o.write(str(year))   writes only 0.  How can it be done?


Understanding implication in logic truth tables (excerpt from textbook)

We have the following argument: $P \implies Q$ (Premise 1) $P$ (Premise 2) $—$ $∴Q$ (Conclusion)  The accompanying truth table is:    I don't understand this section of my textbook:     The premises are both true only in line four of the table, and in this   line the conclusion is true as well.      You can also see from the truth table that both premises are needed to   make this argument valid. But if we were to change the truth table for   the conditional statement to make P → Q false in the first line of the   table, then the second premise of this argument would no longer be   needed.       We would end up with the conclusion that, just from the single   premise P → Q, we could infer that Q must be true, since in the two   lines of the truth table in which the premise P → Q would still be   true, lines two and four, the conclusion Q is true too.   My thinking:  If we would change the $P → Q$ to be false in the first line of the truth table. Then why couldn't the conclusion be false as well? I don't understand what line $2$ and $4$ have anything to do with line $1$?


If we consider $\mathbf{F}$ as a vector field, then we say that $\mathrm{div}(\mathrm{curl}(\mathbf{F}))=0$. We can prove this in mathematics easily. But I' am not getting an intuitive explanation due to which it is zero.  Can someone explain intuitively why it is zero?  Thanks


Why is fully homomorphic encryption so slow?

What are the reasons that FHE is so slow? Is it possible to make the FHE algorithm so fast that it can be used in practice (say, the practical FHE algorithm should be slower no more than 10 times compared to conventional calculations)?  Or there is some fundamental limitation and any FHE implementations will always be millions of times slower than usual calculations?


How to unzip and unrar a file from terminal?

I would like to know what are the commands line used to unzip and unrar a file from terminal.


I was modeling a chess set. Bishop was my biggest problem. The slice looks ok without a subsurf. Add a subsurf of 2 and ugliness happens.  I went to just practicing on a cylinder. looks ok, but I'm still get creases/folds. I get the slice by beveling a flat cube and booleaning.    So far this is the best I can get.  Thanks for any help or suggestions. Just another noob wading neck deep in blender water.  Not sure if my solution is a perfect as I would like, but here is what I ended up with.  I removed the edges inside the slice and allowed the Subsurf to create the curve. That eliminated the mega ngons that was being created.


Why does it matter where I'm trying to call my \foreach loop from?

I was trying to post a solution to , but I got stuck with a \foreach loop which wasn't behaving as I expected it to.  Here's my first attempt:  \documentclass[a4paper]{scrartcl}  \usepackage{tikz,pgfplots,amsmath} \usepackage[T1]{fontenc} \usepackage{lmodern,textcomp,siunitx}  \begin{document}  \begin{center} \begin{tikzpicture}[font=\small] \begin{axis}   [     height=5cm,     width=6cm,     scale only axis=true,     %     xlabel={\(\alpha\) in \si{\degree}},     ylabel={\(\sin{(\alpha)}\)},     %     xtick=\empty,      ytick=\empty,      xticklabels={,,},      yticklabels={,,},      xmajorgrids={false},      ymajorgrids={false}   ]   \addplot+[domain=0:360,              samples=25,              only marks,              mark=-]             {sin(x)};   \foreach \myn in {1,...,25}     {       \pgfmathsetmacro{\myx}{360/(25-1) * (\myn-1)}       \pgfmathsetmacro{\myy}{sin(\myx)}       \draw (axis cs:0,\myy) -- (axis cs:360,\myy);     } \end{axis} \end{tikzpicture} \end{center}  \end{document}   I get an error:  ! Undefined control sequence. <argument> axis cs:0,\myy   l.41 \end{axis}  ?    I wasn't expecting such an error.  Nevertheless, I came up with a clunky work around.  Here's my 2nd attempt which works quite well (though a bit clunky):  \documentclass[a4paper]{scrartcl}  \usepackage{tikz,pgfplots,amsmath} \usepackage[T1]{fontenc} \usepackage{lmodern,textcomp,siunitx}  \makeatletter \def\aedrawline#1{%%   \edef\mycontent{#1}   \expandafter\ae@drawline\mycontent\@nil} \def\ae@drawline#1,#2,#3\@nil{%%   \draw (axis cs:#1,#3) -- (axis cs:#2,#3);   } \makeatother  \begin{document}  \begin{center} \begin{tikzpicture}[font=\small] \begin{axis}   [     height=5cm,     width=6cm,     scale only axis=true,     %     xlabel={\(\alpha\) in \si{\degree}},     ylabel={\(\sin{(\alpha)}\)},     %     xtick=\empty,      ytick=\empty,      xticklabels={,,},      yticklabels={,,},      xmajorgrids={false},      ymajorgrids={false}   ]   \addplot+[domain=0:360,              samples=25,              only marks,              mark=-]             {sin(x)};   \foreach \myn in {1,...,25}     {       \pgfmathsetmacro{\myx}{360/(25-1) * (\myn-1)}       \pgfmathsetmacro{\myy}{sin(\myx)}       \aedrawline{0,                   360,                   \myy}     } \end{axis} \end{tikzpicture} \end{center}  \end{document}   All's good until @Tarass posts  which is very similar in concept to mine but avoids the clunky work around of my attempts:  \documentclass[a4paper]{scrartcl}  \usepackage{tikz,pgfplots,amsmath} \usepackage[T1]{fontenc} \usepackage{lmodern,textcomp,siunitx}  \begin{document}  \begin{center} \begin{tikzpicture}[font=\small] \begin{axis}   [     height=5cm,     width=6cm,     scale only axis=true,     %     xlabel={\(\alpha\) in \si{\degree}},     ylabel={\(\sin{(\alpha)}\)},     %     xtick=\empty,      ytick=\empty,      xticklabels={,,},      yticklabels={,,},      xmajorgrids={false},      ymajorgrids={false},     after end axis/.code={%%       \foreach \myn in {1,...,25}         {           \pgfmathsetmacro{\myx}{360/(25-1) * (\myn-1)}           \pgfmathsetmacro{\myy}{sin(\myx)}           \draw (axis cs:0,\myy) -- (axis cs:360,\myy);         }     }   ]   \addplot+[domain=0:360,              samples=25,              only marks,              mark=-]             {sin(x)}; \end{axis} \end{tikzpicture} \end{center}  \end{document}   Could someone explain what's going on here?  In particular, why it that when the \foreach loop is called within the axis environment it is forgetful and needs instead to be processed from after end axis?


How to prove that if $A\subseteq A\times A$, then $A=\varnothing$?

How do I prove that $A\subseteq (A \times A)\rightarrow A = \varnothing$  in axiomatic set theory?   This is theorem 107 of Patrick Suppes "Axiomatic Set Theory". I do not buy his argument that the set $A$ does not contain any empty sets because, according to him, the set $A$ is a subset of $A\times A$. Are there any other arguments that prove this theorem? Why does the set $A$ not have the empty set as a member?


Can I get longer than 15 second exposure with my canon SX 50?

I am new to photography and I was hoping to go take some pictures of star trails this weekend. I just bought this camera this week and I realized that the highest shutter speed is 15 seconds. Is there any way to keep it open longer? I don't think this camera supports bulb mode.


I do not know how to approach this integration problem. $$ \int_{-1}^{1} \frac{1}{(e^x+1)(x^2+1)} $$  I tried some trigonometric change of variable and also tried to break it into two fractions but I failed!


How can I /give myself something stronger than the maximum book enchantment level?

I'm new to commands but I made a few which are a bit complicated, in 1.12.2. But recently after the Aquatic update, I've been unable to use commands to give me items stronger than the enchantment book maximum level. I would like to make a command where I can get items with enchantments of 999. How can I do this?  I have a solution but it gets annoying: go on 1.12.2, use the command for items, turn Minecraft off, and reload it on 1.3.1. The item will be saved in my toolbar. But like I said, this is pretty annoying. Is there another way to do this?


What will happen if I overstay in South Africa?

I arrived in South Africa from Australia at the end of october, so I have 3 months in the country, but in december I left the country for a month and recently re-entered thinking I would get another 3 months. But they didn't give me the extra 3 months because they said I had to return to South Africa, so they only gave me the stamp for 3 more weeks, counting the 3 months from when I first entered.  Does anyone know if this is a new rule that you have to go back to where you came from? Because I thought I would get another 3 months as that is what happened with most people I know that didn't get a visa, and now it is too late to get a visa or an extension, does anyone know what will happen to me if I don't leave in 3 weeks and keep my original ticket which was 3 months?


Combinatory Explanation for $ \sum_{k=1}^{100} {{100} \choose {k}}2^k=3^{100}-1 $

How do I Explain this Combinatory? $$ \sum_{k=1}^{100} {{100} \choose {k}}2^k=3^{100}-1 $$


My application is intended to read an existing text file, line for line, of exactly 1500 items into an array of item class objects. The goal is to get the data into the array so I can use this application as a starting point for converting the archive for a new program I am writing.  package sandboxPackage;  import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader;  public class mainClass {     public static void main(String[]args) throws FileNotFoundException, IOException {     InputStream in = new FileInputStream(new File("C:\\Documents and Settings\\Adam\\Desktop\\Cloud Project\\MasterIndex.library"));     BufferedReader reader = new BufferedReader(new InputStreamReader(in));     StringBuilder out = new StringBuilder();     String line;     itemClass[] m = new itemClass[1500];     int i = 0;     while ((line = reader.readLine()) != null) {         m[i].index = line;       // crash is here         m[i].location = reader.readLine();         m[i].item = reader.readLine();         m[i].description = reader.readLine();         i++;     }      //Print the entire list     for (i = 0; i == 1499; i++) {         System.out.println(m[i].index);         System.out.println(m[i].location);         System.out.println(m[i].item);         System.out.println(m[i].description);         //System.out.println("This is item #" + i + 1);     }      } }   And here is the itemClass:  package sandboxPackage; public class itemClass{     String index;     String item;     String description;     String location; }   The text file looks like this: Index Location Item Description Index Location Item Description Index ..  The compiler claims the NullPointerException is on line 20, which is the first line of the while loop, but I just don't see it. I have looked at about a thousand other examples of this same error but it still does not compute for me.


How is the augmented Dickey–Fuller test (ADF) table of critical values calculated?

Could you please explain in simple terms how the table of critical values for the augmented Dickey–Fuller (ADF) test is created?


I have all the updates needed for windows 8.1 and I still cannot find the update to the 8.1 in the app store. Why can't I get the update?


Help identifying a Scifi series of Novels from the 80's with Robot Overlords

These were a series of novels that I read as a kid in the 80s or early 90s. Humanity was ruled by AI/robot overlords and the plot revolved around a group of humans trying to get two keys to a certain control room at the same time so that they could shut down the robots.  One other character was a being of unknown origin who could steal the form and maybe the memories of its victims. They would fuse their body with their victim and later emerge with their new form. They did not know their true purpose, at least in the earlier books.  I think that I read 2 or 3 books but I lost track and never found out how it ended.


Why is it impossible to have a perfect vacuum?

In  someone mentioned that it couldn't happen. Why not?   For example I asked about the speed an object would have to move at sea level to create a vacuum behind it; in the comments someone asked what I meant by vacuum because there couldn't be a perfect vacuum.


When telling a story about myself from the past, I have found myself in an internal debate over whether the correct way to segue into the present is:     That was me twelve years ago.   Or:     That was I twelve years ago.   My instincts tell me the first is correct (object pronoun after a verb and it sounds better to my ears). But, I'm not sure if pronouns after linking verbs should be object pronouns. Which is correct?


How do I get the coordinates of my data frame always in long/lat?

I want to determine the coordinates of my current data frame. To do so I wrote this script:  def DataFrame ():    mxd = arcpy.mapping.MapDocument("CURRENT")    df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]   return mxd,df  def Center (df):    extent = df.extent    xmin = extent.XMin   xmax = extent.XMax   ymin = extent.YMin   ymax = extent.YMax    x = xmax - ((xmax - xmin)/2)   y = ymax - ((ymax - ymin)/2)   return x,y   As long as I am working with a geographic coordinate system, the results will be exactly the longitude and latitude. But as soon as I have a projected coordinate system it will return map units (i.e. meters). How can I avoid that problem? I always need to get lon/lat independend on the maps projection.


I've installed Netbeans 8.0 on Ubuntu 12.04. After that I updated the operating system and now the Ubuntu version is 14.04.  Netbeans was installed in the default folder. I did not specify any custom folder for installation.  Netbeans asked to install updates, but was unable to continue the operation, because Netbeans was not running under root permissions.  How can I start Netbeans with root permissions?  What sudo command should be executed in terminal to launch Netbeans as root?  I searched this in Google but did not find a working answer.


Export/print QGis: dismatching OSM data on an OSM-layer

On QGIS (2.10, winXP). is there any known problem by exporting or printing .osm-data (from JOSM) onto an Openstreetmap-Mapnik-layer? The imported waypoints always shift from the left less and less to the right-/east side of the map. On the left side, they seem to be good, but on 2.5 Km to the left, they are wrong for about -20 to -100 m - the .osm-data-layer seems to become smaller. I adjusted the coordinate system for QGis von QGIS +proj=longlat +datum=WGS84 +no_defs +proj=longlat +datum=WGS84 +no_defs the layer of the waypoints is "WGS 84, EPSG 4326" +proj=longlat +datum=WGS84 +no_defs the OSM-layer is "WGS 84 / Pseudo Mercator, EPSG 3857" +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs might this mistake caused by mismatching coordinate systems? But it seems for me, that I can't change the systems?


I have a brick wall that I am trying to add a door to. I have already UV mapped it, so when I move the loop cut to the right height, it distorts my UV map. How can I avoid having to unwrap it again?


I have NVIDIA GTX 970 GPU, which is pretty new chip and it is not recognized by nouveau driver shipped with Ubuntu 14.10, hence I am stuck on 1024x768 resolution on Full HD monitor - not so good. There is no proprietary driver in Additional Drivers setting, so I decided to download and install driver directly from NVIDIA web site.  I tried to install NVIDIA driver exactly like I did ten years ago on Slackware:  $ sudo ./NVIDIA-Linux-x86_64-343.36.run  but it says, that it must be run without X Server running. Ctrl+Alt+F1 (or combination with any other F? key) takes me to the black screen and only thing I can do then is to return back to X by Alt+F7.  My next step was to tune GRUB to boot into pure text mode. I edited /etc/default/grub to have:  GRUB_CMDLINE_LINUX_DEFAULT="text"  After  $ sudo update-grub  and reboot, system hangs during boot on some video mode stuff.  My question is: how to run a pure VGA text mode? No famebuffer, no fancy splash, just pure ASCII 80x24 text? I need it only once, just to install NVIDIA driver and have 1920x1080 screen resolution.  PS  I also tried to install NVIDIA driver from Ubuntu repository:  $ sudo apt-get install nvidia-331  No success, it made my system unusable with graphics totally messed up.


Automatically determine tags while writing a question

Can we modify "Ask question" to automatically suggests tags based on your question content.   So instead that user needs to type "team-foundation-server" or "TFS" or "TeamFoundationServer" he will see list of tags auto-populated with ajax which he (or she) can then select and it will be associated with the question. So basically only thing we need is code which will cross-match question content with list of known tags while user is typing and display results in some nice ajax-enabled list/cloud/whatever UI control. This should be separate control for tags suggestions so user still has option to use standard tag list input to type-in tags.  In this case, instead of three (or more) tag variations we would have only one tag for Team-Foundation-Server.


Do closed questions ever get deleted and, if so, is reputation recalculated (subtracted) for that question and all its answers?  What happens here in meta, given that feature request "questions" are closed when they are completed?


Keras - Predictive ANN model converging on a single value. Overfitting?

I'm training an LSTM (using the Keras python library) to generate sequences. My X training data is a list of sequences, and the Y training data is a list of the final values of those sequences.   The training X (padded_training_seqs) data looks something like this (only much larger):   [ [[43.103, 27.092, 19.078], [43.496, 26.746, 19.198], [43.487, 27.363, 19.092], [44.107, 27.779, 18.487], [44.529, 27.888, 17.768]],  [[44.538, 27.901, 17.756], [44.663, 28.073, 17.524], [44.623, 27.83, 17.401], [44.68, 28.034, 17.601], [0,0,0]], [[47.236, 31.43, 13.905], [47.378, 31.148, 13.562], [0,0,0], [0,0,0], [0,0,0]] ]   and the training Y (training_final_steps) data looks like this:  [ [44.652, 39.649], [37.362, 54.106], [37.115, 57.66501] ]   and here is where I build the model:   in_dimension = 3 hidden_neurons = 300 out_dimension = 2  model = Sequential() model.add(BatchNormalization(input_shape=((max_sequence_length, in_dimension)))) model.add(Masking([0,0,0], input_shape=(max_sequence_length, in_dimension))) model.add(LSTM(hidden_neurons, activation='softmax', return_sequences=False)) model.add(Dropout(0.2)) model.add(Dense(out_dimension, activation='linear'))  model.compile(loss="mse", optimizer="sgd") model.fit(padded_training_seqs, training_final_steps, nb_epoch=5, batch_size=1)  The problem is when I try and generate new sequences:  ``` seed_lat = 42.966 seed_long = 39.869 seed_temp = 25.066  current_generated_sequence = np.array([[[seed_lat, seed_long, seed_temp]] + [[0,0,0]] * (max_sequence_length - 1)], dtype=np.dtype(float))  for i in range(0, max_sequence_length - 1):     next_step = model.predict(current_generated_sequence, batch_size=1, verbose=1)[0]     current_generated_sequence[0][i + 1] = loc_with_temp(next_step, i)   I build the new sequence step by step, each time using model.predict to get the next step of the current_generated_sequence. (Then I add in a 3rd dimension to that predicted value so it can be inputted in the next iteration) Problem is, it converges on predicting a single value, so the total generated sequence looks like this:  [[[ 42.966       39.869       25.066     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]   [ 41.38308716  37.68268204  10.387     ]]]   Anything i'm doing clearly wrong? I've done some research and read that this might be a sign of a saturated hidden layer. Or overfitting. My sample size is not exactly enormous.  UPDATE: I changed the batch size to 10 and was able to get a sequence where there was two unique values.   [[[ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.36413574  37.32749557  10.607     ]   [ 41.39291382  37.15774536  10.644     ]   [ 41.36413574  37.32749557  10.607     ]]]   P.S. The full code and data is at


Vector equation of line containing point and perpendicular to plane

How would one find the vector equation of the line that contains the point (x0, y0, z0) and is perpendicular to the plane Ax + By + Cz = D?


Following on from my previous question entitled .   How do I enable the Debug Menu via Terminal command or otherwise, thereby increasing the functionality of Disk Utility ?


Odds of one person getting more odd numbers on a die than another

First player rolls a 6-sided die 100 times and the second player 101 times. What are the odds of the second player getting more odd numbers than the first one?  I tried solving this via listing the options which led to a nasty sum that I wasn't able to solve neither by hand nor by using wolfram alpha. Clearly there has to be a more clever solution using the properties of a binomial distribution, but so far I haven't come across anything useful.


Is it okay to add information without asking a question?

Can you add information without asking a question? For example, I found a Firefox addon that lets you see the generated source of a page, but I don't want to add it to an answered question. Can I just start a "question" to get this information out there?


Find all rational points where $x^2 - y^2 = 1$ (need help simplifying quadratic formula)

The original problem is to find all rational points where $x^2 - y^2 = 1$ I know how to go about the problem, but whenever I get to the point of simplifying my equation, I keep having problems. This is what I have now:  choosing point $(-1, 0)$   So we have:  $x^2 - (m (x+1))^2 = 1$  $= x^2 (1-m^2) + 2xm^2 - m - 1 = 0 $  I need to simplify the quadratic equation where :  $a =  (1-m^2), b = 2m^2, c = -m-1 $  How can I simplify the part under the square root? Namely this part: $ \sqrt{(2m)^2 - 4 (1-m^2) (-m-1)}$  when I simplify I get this:  $- 4m^3 + 4m -4$  but that doesn't help with the square root. Can anyone point out the right direction for this?  thank you!


What is the difference between \includegraphics and \includegraphics*?

I don't understand the description on page two of the graphicx :     The star form is just for compatibility with the standard interface,   and essentially just adds clip to the keys specified.    What is the standard interface? Means adds clip following \includegraphics[clip]{} is the same as \includegraphics*{}?   Thank you for your help and effort in advance!


What are my options for activating previously activated Steam games?

I purchased some games second-hand from someone else. I have the original discs, cases and product codes. However I cannot activate the games because they were activated by the previous owner, whoever that is. I get the "Duplicate Product Code" message.   What are my options?


how can i read Arabic Language from phpmyadmin into html page

I have a problem on reading Arabic language, when I read arabic text it displayed as a question marks like that  ���� ����   Although my php page encoding as Utf8.  And all the table in my database collation Utf8_general_ci.  What should I do ?!!


SEO - handling "duplicate" content on search engine

My site is a search engine for jobs - it crawls website where jobs posted and indexing that content (similar to indeed.com, for example).  I notice that my website constantly has low SEO rating (e.g. I just not getting traffic, despite the fact that I displaying very quality and useful content).  Obviously, since my website is a search engine, it has no content of its own - all content comes from other websites (job boards, agencies, job postings of employers, etc).  I suspect that my low SEO ranking is due to fact that all content on website is "duplicate" - coming from other websites.  Am I right about my suspicions? Is there something I can do about (e.g. some best practices for such scenario).


Can someone summarize as to what are the problems and/or the open questions with the ? (in the context of understanding black-holes or as a computer science question)It gives a framework to see how the black-hole can thermalize in a $log (entropy)$ time scale. What next?   To start off,   The sort of problem with the Hayden-Preskill circuit is that it works via random unitary transformations on disjoint pairs of qubits and hence doesn't have an Hamiltonian interpretation. I believe one has always believed that matrix models (of matrix size $\sqrt{entropy}$) can saturate this logarithmic thermalization bound via Hamiltonian evolution.    Has this above belief about the matrix models been proven yet?  Is there an intuitive explanation as to why a theory with finite dimensional matrices should behave like an infinite dimensional system?


How to restore a database from the SQL 2008R2 log?

Today, for a great oversight, did a deal with a big mistake, which I forgot to put the WHERE keyword in the UPDATE statement... I searched in the google, I found a lot of things of how to restore the database ( FROM BACKUP ), but the backup was done daily database simply disappeared :(  Now, the only information I have remaining is the log file of SQL, I found the ApexSQL log, that program make a SQL undo script, but, just for a 10th process... I have 2024 to restore, and, I don't want to pay U$ 1.5k for this program, now, I want to know, how I can restore the informations, have a FREE program to make this ?


Installing Broadcom Wireless Drivers for "Chip ID": BCM4360, "PCI-ID": 14e4:43a0 (rev 03) on Ubuntu 14.04

I was trying to follow instructions provided in this  AFAIU bcmwl-kernel-source is a proper driver for me. But after installation nothing changed. By "nothing changed" I mean iwconfig shows only eth0 and l0 with no wireless extensions, rfkill list all contains hci0: Bluetooth.   I found that bcm43xx was blacklisted in /etc/modprobe.d/blacklist.conf, after commenting this line and removing previously installed driver I repeated the same actions. The result was the same.   The line above the bcm43xx in /etc/modprobe.d/blacklist.conf file says "replaced by b43 and ssb". So I have removed previously installed driver again and edited back blacklist.conf.  I installed firmware-b43-installer, b43 was listed in the lsmod, but I am still was not be able to see any wlan in iwconfig.  Any help will be highly appreciated.  edit1  lspci -vnn | grep Network 06:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)   edit2  sudo apt-get install --reinstall bcmwl-kernel-source Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/1,126 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 225024 files and directories currently installed.) Preparing to unpack .../bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ... Removing all DKMS Modules Done. Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) over (6.30.223.141+bdcom-0ubuntu2) ... Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Loading new bcmwl-6.30.223.141+bdcom DKMS files... Building only for 3.16.0-31-generic Building for architecture x86_64 Building initial module for 3.16.0-31-generic Error! Bad return status for module build on kernel: 3.16.0-31-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.141+bdcom/build/make.log for more information. modprobe: FATAL: Module wl not found. update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.16.0-31-generic  sudo modprobe wl modprobe: FATAL: Module wl not found.


Can Clerics have divine power without it being provided by a god?

I have an experienced player wanting to create a tempest cleric who doesn't worship a god. His back story will be something along the lines of 'walking through a storm one day he is hit by lightning, which provides him with power'.  I'm happy to entertain the thought, but what aspects might go awry?


i got a virus,CryptoLocker, few weeks ago, and i managed to eliminate it, but all files on my pc are now  encrypted, and they have got this extension, for example  nameFile.docx.imivxjj  when i try to remove the imivxjj i'm able to open it with Word, but at the same time, Word say to me that it's corrupted.  is there any way to open it,it's a very important file for me, and i've no others copy.  thanks in advance.


Showing elements of an array of multiple types

I need to create an array with the following structure:  {int, String, String, int}   I want to insert this array into another array like this:   {int, String, String, int}, {int, String, String, int}, ... and so on.   I have already tried this:  Object[] vector = new Object[100];  public void inserare(int poz, int nr, String nume, String prenume, int nota){      Object[] aux = new Object[4];     aux[0] = new Integer(nr);     aux[1] = new String(nume);     aux[2] = new String(prenume);     aux[3] = new Integer(nota);      vector[poz] = aux;  }  public void afisareLista(){      for(int i = 0; i < vector.length; i++){         System.out.println(vector[i]);     } }   Aux is inserted, but when I want to print all the elements of main array, all I get is something like this:   [Ljava.lang.Object;@15db9742   Any help for display correctly the elements is appreciated.


How to approach a student with bad hygiene?

I teach engineering at a community college in the US. I currently have a student with very poor hygiene. He stinks pretty badly, has obviously greasy hair, doesn’t change his clothes frequently, and I usually seat him in the back of the room (during exams and labs, when I have power over seating arrangements) so I don’t have to smell his (relatively strong) body odor.  This student has also spoken with a colleague of mine about his low self-esteem. He’s worried that he isn’t making friends, and doesn’t know if the people he hangs out with are hanging out with him because they want something from him (help with classwork) or because they are truly friends.   In my opinion, this student follows me around like a puppy, and he tries too hard to impress people (students and faculty alike). I am a young-ish female faculty member and I try to create very large boundaries, especially with my male students. As an example, he frequently finds the need to explain to me (in way too much detail) why he gets questions wrong on exams (I don’t care, and I don’t need to know, which I’ve told him several times with no success).  So, I would like to mention to this student that his hygiene is off-putting and isn’t helping him out in the friends department. However, because he already follows me around like a puppy dog, I don’t want to encourage any more interaction from him. Additionally, it frankly embarrasses me to have to bring up hygiene issues with somebody in their late teens / early twenties. How can I bring this issue up while still maintaining my boundary as a female faculty member who doesn’t want her male students following her around and asking her for advice all the time?  I was hoping that I would be finished up with this student by now, but I am the only professor who teaches Electrical Engineering courses, so I can’t recommend that he take classes with someone else, or ask another colleague to discuss this with him. He will be taking another of my courses next semester and I don’t personally know any of his other intended professors for next semester to ask them to bring it up.


Package list Error, cannot open software updater or Package list

I am getting an error in the Title Bar above  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened. E: _cache->open() failed, please report.   I have removed Spotify, still the error persists. I cannot access Software Updater or Package Manager. I use Ubuntu 14.04 on 64-bit laptop. I am new to Ubuntu, Please help.


How can I curve a design I made to make it perfectly match the curve of a circle?

I would like to make a logo that has two simplified branches of barley that mirror each other and curve to a perfectly circular shape, like the following from :    I have tried to do it in Illustrator, Sketch and Pixelmator, but I can't seem to figure it out and can't find a tutorial. I tried making the pattern straight and curving it and when that didn't work, I tried making it curved, which was a total mess.   Does anyone have an idea how to do this elegantly?


How to write a ContainsAll query using LINQ? (C# LINQ-TO-SQL)

Suppose i have the following  var mustHave = new int [] { 1, 2 }   and a table named db.Numbers  public class Number {      public int id;      public int number; }   populated with  Numbers.add(new Number(){id=8,number=1}); Numbers.add(new Number(){id=8,number=2}); Numbers.add(new Number(){id=8,number=3}); Numbers.add(new Number(){id=9,number=1}); Numbers.add(new Number(){id=9,number=3});   I want to get all ids which are associated to all numbers in the mustHave variable. For example The query must return id=8 but not id=9. The real case is much more complicated and does the query against a database with Linq-To-Sql.


What to do if my question is downvoted for no reason?

Can I consider it as an abuse if I seek for reason but ignored? Can I flag it saying it is an abuse or what can I do to know what is wrong with my question?  Assume the question has 20 downvotes and has no comments at all.


Why does conservation of angular momentum explain why planet orbits lie in a plane?

I just learned about sector velocity and how you can manipulate the equation to show that angular momentum $L$ is conserved by $L/2M$. I know that sector velocity is constant and therefore angular momentum is constant. I have made it that far but I still can't see why a constant angular momentum would explain the coplanar concept.


I'm trying to use a button that is printed by .html(). I've tried .find() after searching through this site but the onclick event still seem not detected.
div
 <button id="printbtn">printbtn</button>     while the #btntest onclick doesn't show an alert, the CSS on #btntest works. There is something I don't know about elements that are created dynamically?


Prove that certain operation is commutative

Suppose we have a set $X$ and a binary operation $\circ : X \times X \to X$, such that $\forall x,y \in X$ the following equalities hold $$y \circ (y\circ x) = x, (x\circ y)\circ y = x.$$ How can prove that this operation is commutative?


Is there a way to increase the maximum horizon render distance in Minecraft?

I am wondering if anyone has discovered a way to increase the view distance to a much larger range. The highest setting is not very far and I can see strange blocks in the distance floating on the edge of what is visible. Ever played Mario Galaxy or Sunshine? Stuff in the distance sooo far away was still rendered. I think the PC could do this no problem, just need a way to tweak the client.


How to create a file system as a non root user?

I'd like to create a filesystem image as a non-root user, the problem I'm facing is that the way I'm currently doing it, it needs a mount and as a non-root can't do a mount.  This is what I'm now doing:  #!/bin/sh  IMG="app.ext4" LBL="PIHU_APP" MNT="/mnt/PIHU_APP" APP="/home/buildroot/board/arctura/PIHU_APP/application"  #64MB: dd if=/dev/zero of=$IMG bs=4096 count=16384  mkfs.ext4 $IMG e2label $IMG $LBL  mkdir -p $MNT mount -o loop $IMG $MNT cp -r $APP $MNT sync umount $MNT   I have full root access, so I can setup/prepare anything, but the script will be executed from a non-root account.  However, I have a feeling there may be a better way that might not even need mounting, but I'm not sure..


What is an example of a nonmetrizable topological space?

Find topological spaces $X$ and $Y$ and a function $f:X\to Y$ which is not continuous, but which has the property that $f(x_n)\to f(x)$ in $Y$ whenever $x_n\to x$ in $X$  I know this is true if $X$ is metrizable, so I want a counterexample when $X$ is not metrizable.


I have STRING and MD5(STRING+SALT) for any infinitely many STRING's. Is their any way that I can recover the SALT itself? (SALT is constant) I actually know SALT, but this is an intellectual exercise.  Also, I know that the salt is of length 21 and consist of lowercase letters and digits. So there are 36^21 possibilities to enumerate if I just try brute force testing all of the possibilities, which is clearly unreasonable.


Problem connecting a login method in my Java program to MySQL table using JDBC

I'm writing a Java program (with Java Swing and JDBC) and in one of my panels, I have a login. I want my program to compare the entered username and password and compare it to the ones U have in my database table (MySQL). This is what I wrote in my "Login" button, see for yourself: try {     Class.forName("com.mysql.jdbc.Driver").newInstance();     String url2 = "jdbc:mysql://localhost:3306/Students?user=root";     Connection connect2 = DriverManager.getConnection(url2);     Statement state2 = connect2.createStatement();     String query2 = "select * from login_data where username='%s'";     query2 = String.format(query2,username1.getText());     ResultSet result2 = state2.executeQuery(query2);     if(result2.next()){         if(result2.getString("password")==password1.getText()){             login.setVisible(false);             Mainmenu();         }else{             result1.setText("Wrong Password");         }     }else{         result1.setText("Wrong Username!!!");     }      state2.close();     connect2.close();  } catch (SQLException e1) {     e1.printStackTrace(); } catch (IllegalAccessException e1) {     e1.printStackTrace(); } catch (InstantiationException e1) {     e1.printStackTrace(); } catch (ClassNotFoundException e1) {     e1.printStackTrace(); }  Now, if I give it a wrong username, it correctly shows the "wrong username" message. However, if the username is correct, it shows the "wrong password" message. It doesn't matter if the password is/isn't correct. I feel there is a logical error here, but I can't see it.


If there is a table called employee  EmpID           EmpName ----------      ------------- 1               Mary 1               John 1               Sam 2               Alaina 2               Edward   Result I need in this format:   EmpID           EmpName ----------      ------------- 1               Mary, John, Sam 2               Alaina, Edward   Q: this record is in same Employee table. I have almost no experience using UDFs, stored procedures, I need to be done this thing through query.Is this possible without using UDFs, SP's.


Finding order of convergence using Taylor Series

The fixed point method $g(x)= x - \frac{f(x)}{2f ^\prime (x)}$  (can also be written as $x_{k+1} = x_k - \frac{f(x_k)}{2f ^\prime (x_k)}$) is similar to Newton's method except for the 1/2 coefficient. My question is how do I show the order of convergence for this method using Taylor series?  EDIT  I believe the goal is to get it into the form $|x_{k+1} - a| = C|x_{k} - a|^n$ and that $n$ is the order of convergence.   I tried getting it into the form $g(y) = g(x) + g^\prime(x)(y-x) + \frac{g ^{\prime\prime}(x)}{2!}(y-x)^2 + ...$  Since $g^\prime (x) = \frac{1}{2} + \frac{1}{2} \cdot  \frac{f ^{\prime \prime} (x) f(x)}{[f^\prime (x)]^2}$   Substituting in I get $g(x_k) = g(a) + \frac{1}{2}(x_k -a) + \frac{g^{\prime \prime}(a)}{2}(x_k-a) $  But I'm not sure what to do from here


How do you use an exclamation mark and a question mark together?

Is it like this:  "Where are my slippers!?"  Or is it like this: "Where are my slippers?!"


es.SO questions aren't excluded from the Hot Questions list

As figured out in  localized SE sites must not be displayed in the HNQ's. But  actually is.        Has to be fixed I guess?


Is the operator $T((x_1,x_2,...,x_n))=(x_1,\frac{x_2}2,\frac{x_3}3,...)$ on $\ell^2$ self-adjoint and unitary

Consider the Hilbert space  $$\ell^2=\{(x_1,x_2,...,x_n),x_i\in\mathbb C\text{ for all }i\text{ and }\sum_{i=1}^\infty |x_i|^2<\infty\}$$ with the inner product $$\langle(x_1,x_2,\dots,x_n)(y_1,y_2,\dots,y_n)\rangle = \sum_{i=1}^\infty x_i \overline y_i.$$ Ddefine $T:\ell^2 \to \ell^2$ by  $$T((x_1,x_2,...,x_n))=(x_1,\frac{x_2}2,\frac{x_3}3,...).$$ Then $T$ is a)neither self-adjoint or unitary b)both self-adjoint and unitary c)unitary but not adjoint d)self-adjoint but unitary  $$\langle Tx,y\rangle=\langle T((x_1,x_2,...,x_n)),(y_1,y_2,...,y_n)\rangle= \langle (x_1,x_2/2,x_3/3,...),(y_1,y_2,..,y_n)\rangle= \sum (x_i\overline y_i/i)= \sum x_i(\overline y_i/i)= \langle (x_1,x_2,...,x_n),(y_i,y_2/2,y_3/3,..y_n/n)\rangle=\langle x,Ty\rangle$$ so T is self-adjoint


I have written a plugin that will convert posts to excel format and then email the .xls to an email id. I can make it work with when function is declared in functions.php but does not work with function defined in plugin file.   if ( ! wp_next_scheduled( 'xls_func_hook1' ) ) {   wp_schedule_event( time(), 'hourly', 'xls_func_hook1' ); }  add_action( 'xls_func_hook1', 'sendxls1' ); //senxls1 is a function in functions.php if ( ! wp_next_scheduled( 'xls_func_hook2' ) ) {    wp_schedule_event( time(), 'hourly', 'xls_func_hook2' ); } add_action( 'xls_func_hook2', 'export2excel' );   The full code is at


How to use LyX to create PDF file from the command line

I'm using LyX for technical documentation and want to automate the process of creating PDF files.  Within LyX, I can simply click the button "View PDF (XeTeX)", and LyX performs the whole build process for me: it creates a .tex file, does some bibliography magic, and uses XeTeX to create the final PDF file.  What I'm looking for is a way to call LyX from the command line and get the same result. So far, I've only managed to generate a plain .tex file (using --export-to xetex). However, when I run xelatex on the generated file, it keeps showing errors that don't occur when building using LyX. Is there a way to get LyX to do the work?  My system: Windows 7 64bit, LyX 2.1.0


I need to run multiple processes at once, which server should I use

I bough droplet on DigitalOcean 1GB and 1CPU. I'm running cronjob there. Currently I'm able to run 30 background tasks(processes) at once, once I go up server cannot handle that much.  Those background processes are sending requests to an endpoint, collect a data to array and then send it to another endpoint. Each task process 100 data.  Can you help me choose the right server. I'd like to run at least 100 tasks(processes) in the background at once. Should I buy more RAM or CPU?  Here is current usage, I don't see that server is overloaded with 40 tasks but it can't handle it:    What am I doing wrong?


Difference between old Nearby and new Sightings?

Recently, Pokemon Go released an update featuring a reworked Pokemon detection system -- changing "Nearby" to "Sightings".  Is there any difference between the two?


Why do we override equals() and hashCode() methods , how does hashcode works in hashMap and treeSet Operation

Can somebody explain, why do we have to implement hashCode() and equals() method everytime we write a new class? Its a good practice to write hashCode() and equals() for a new class? How Does hashcode() works in hashMap? Why does TreeSet sort like?    Entries  "102. Hello one o two" "12. Hello twelve" "1. Hello One"    in following manner  "1. Hello One" "102. Hello one o two" "12. Hello twelve"   Thanks in Advance.


transforming ordinary generating function into exponential generating function

I have seen a post here that says that you can convert an exponential generating function into an ordinary one with the aid of the Laplace transform. Is it possible to do the reverse transformation? i.e. I want to convert an ordinary generating function into an exponential one.


sqlite database default time value 'now'

Is it possible in a sqlite database to craete a table that has a timestamp column that default to DATETIME('now') ?  Like this:  CREATE TABLE test (     id INTEGER PRIMARY KEY AUTOINCREMENT,      t TIMESTAMP DEFAULT DATETIME('now') );   This gives an error... How to resolve?


Cinnamon broke Unity and KDE on Ubuntu 13.10

Something after installing Cinnamon has screwed up my ability to use Unity and KDE on Ubuntu 13.10. When I try to log in to either I get an error that dbus could not start. Any ideas what has happened?  When I try to log in to KDE I get: "Could not start D-Bus. Can you call qbus?"


Using "fair enough" without disagreement

I know that "fair enough" is similar to (but not the same as) OK, used to politely concede or partially agree with a point or to indicate that you understand where they're coming from. But then we have the following:  "I'm terribly sorry, yada yada yada so the system is currently down and and we have to enter everything manually." "Fair enough"  I would use "fair enough" here meaning "yea, that sucks, I understand why this is going to take longer than usual, I'm cool with it", but it just occurred to me that it could be understood as "I'm not sure if that's quite right but that's alright" as if I were questioning them. Is the former indeed a valid use of the phrase, or would it be more likely to be interpreted as the latter? Is it impolite to use it in a such way?  For a bit of extra context, I'm referring to Australian English specifically.


How to move "home" to a separate partition in recovery mode?

I accidentally screwed my system so I only am able to boot in the repair mode. Anyway, I want to reinstall it (upgrade to 15.10, if that matters). So I want to save my "home" directory. I have access to "home" via the recovery mode, I've checked that.   How can I move my existing "home" directory to a separate partition to save data?  And how can I create a new partition? I figure I'll have to resize the existing one but how exactly?


I am an admin trying to query all the private messages for my organization through SOAP API. I query the ChatterMessage object:  SELECT Id, ConversationId, SenderId, SendingNetworkId, Body, SentDate, CreatedById FROM ChatterMessage   where this returns the messages that is sent under the Chatter object. However, there is a chat box that does not log the messages under the object ChatterMessage. The documentation states that this object is used for private chat messages but the chat box conversations are not stored in this object. How can private chat messages be retrieved and which object contains this info? The only chatter hierarchy is related to feeds is found .


Electron's eternal "orbit" about the nucleus

My 8th grade student asks me: "Why don't electrons just fall into the nucleus?" I don't want to lie and tell them it's "just like the Moon not falling onto Earth, because of, you know, acceleration". I also don't have time to elaborate on quantum mechanics. What should I tell them?!


I'm very new to Ubuntu, using 14.04. I need to make swap space, so I read, to overcome a garbage collector problem. My RAM is 8 GB, and my code is using big data and uses a lot of RAM.   What is swap space? Does it mean using flash memory or is it a way to use the RAM of the laptop? What should I do (from scratch)?  command lsblk gave   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 465.8G  0 disk  ├─sda1   8:1    0 461.9G  0 part / ├─sda2   8:2    0     1K  0 part  └─sda5   8:5    0   3.9G  0 part [SWAP] sr0     11:0    1  1024M  0 rom    command free-h gave           total        used  free  shared  buffers  cached Mem:      7.6G       7.4G  163M   727M   196M     4.9G -/+ buffers/cache:   2.3G  5.2G Swap:      9.9G       0B   9.9G   swapon -s  gave me   Filename                Type        Size    Used    Priority /dev/sda5               partition   4086780     0       -1 /swapfile               file        6291452     0       -2   blkid gave me   /dev/sda1: UUID="bf8fe3ec-1937-458f-be1e-5e1270111217" TYPE="ext4"  /dev/sda5: UUID="2336032a-d853-4d38-9b2c-c24793586d3c" TYPE="swap"


On the functional square root of $x^2+1$

There are some math quizzes like: find a function $\phi:\mathbb{R}\rightarrow\mathbb{R}$  such that $\phi(\phi(x)) = f(x) \equiv x^2 + 1.$  If such $\phi$ exists (it does in this example), $\phi$ can be viewed as a "square root" of $f$ in the sense of function composition because $\phi\circ\phi = f$.  Is there a general theory on the mathematical properties of this kind of square roots? (For instance, for what $f$ will a real analytic $\phi$ exist?)


How do I move a line in a text file up or down by one line?

I have some text files, and I'd like to be able to move an arbitrary line in any of the files up or down one line (lines at the beginning or end of the file would stay where they are).  I have some working code but it seems kludgy and I'm not convinced I have all the edge cases covered, so I'm wondering if there's some tool or paradigm that does this better (e.g. easier to understand the code (for other readers or me in 6 months), easier to debug, and easier to maintain; "more efficient" isn't very important).  move_up() {   # fetch line with head -<line number> | tail -1   # insert that one line higher   # delete the old line   sed -i -e "$((line_number-1))i$(head -$line_number $file | tail -1)" -e "${line_number}d" "$file" }  move_down() {   file_length=$(wc -l < "$file")   if [[ "$line_number" -ge $((file_length - 1)) ]]; then     # sed can't insert past the end of the file, so append the line     # then delete the old line     echo $(head -$line_number "$file" | tail -1) >> "$file"     sed -i "${line_number}d" "$file"   else     # get the line, and insert it after the next line, and delete the original     sed -i -e "$((line_number+2))i$(head -$line_number $file | tail -1)" -e "${line_number}d" "$file"   fi }   I can do error checking of inputs inside or outside these functions, but bonus points if bad input (like non-integers, non-existent files, or line numbers greater than the length of the file) are handled sanely.  I want it to run in a Bash script on modern Debian/Ubuntu systems.  I don't always have root access but can expect "standard" tools to be installed (think a shared web server), and may be able to request installation of other tools if I can justify the request (though fewer external dependencies is always better).  Example:  $ cat b 1 2 3 4 $ file=b line_number=3 move_up $ cat b 1 3 2 4 $ file=b line_number=3 move_down $ cat b 1 3 4 2 $


How do I use a variable containing a string in brackets with regex?

import re  content = "This is a [story] to be told" tag = r'[story]'  print(re.compile(rf'{tag}').search(content))   this returns: <re.Match object; span=(3, 4), match='s'>  I am using the 'r' prefix in the variable and the 'rf' prefix in the regex. Where am I going wrong? It keeps interpreting my variable as a coded string.  In my actual scenario I have a list of tags: [r'[TAG1]', r'[TAG2]', r'[TAG3]'] which I want to iterate over. I have solved the problem by escaping with '\' in every tag's string assignment but this makes the tags unusable when referencing them later, as 1 of the '\'s is not in the beginning or end of string (since strings are immutable).   I could try using slices but that seems incredibly inefficient. Is there a regex solution?


How to make sure if the residuals are normally distributed?

Hello, I have a fairly big dataset containing 11000 data points. I am doing a ANOVA for my traits. But before that I have to make sure if the residuals are normally distributed or not. So, I did a linear modelling and plotted the residuals. What is your opinion on the residuals? Can I proceed with the ANOVA? I cannot perform the shapiro test as I have more than 5000 data points. I did a leveneTest and Anderson-Darling test of my residuals, but they are all highly significant. Moreover, I also did a lot  of transformation like Box-Cox, log, square and cube root. In each cases the p-value is highly significant for residuals. Can you please suggest something?  Secondly, if I use a transformed data for ANOVA, do I need to use that transformed data for subsequent analyses like correlation, PCA etc.? or can I use non-transformed value for those analyses? I have some outliers which I must not delete. Please help. Regards Anik


I'm using iOS 5.1.1 (9B206). I want to upgrade my iPhone to iOS 6.1.3, but I don't know how to do this. I have tried downloading the IPSW of iOS 6.1.3 to upgrade, but it doesn't make any changes. The second time, I try building file SHSH with IPSW, but that didn't work either. Any ideas for this problem to upgrade from 5.1.1 (9B206) to ios 6.1.3 ?


Does the Archery skill only level up when hitting NPCs?

Will my Archery go up when shooting targets and dummies, or only on NPCs?


In the Harry Potter series, are wizards capable of creating their own spells, or are they limited to the spells that they're taught/learn?  I seem to remember something about Snape creating sectumsempra, but I'm not sure if that really is the case.


Create an action in QGIS 2.18 to show image?

(Windows 10.1 and QGIS 2.18)  I am trying to create an action for a Shapefile layer that will display an image when any of its three polygons are clicked.  I have added an "image" field to the layer's attribute table, and changed it to "File Name" type, so that each of the layer's polygons has an image associated with it.  I then went to layer properties > actions and created the action as shown in the screenshot below.    But when I tried to click on one of the layer's polygons, I got the following error:  "Unable to run command open C:/Users/******/Downloads/QGIS-Training-Data-QGIS-Training-Data-v1.0/training_manual_data/school_property_photos/rugby_field.jpg"  I tried to find what I had done wrong, but as far as I could see, I had done everything right. I tried to research but found nothing helpful. I tried to restart both QGIS and my PC but I still got the same error.


Will the attack strength of my evee carry over to its evolved form?

I have several higher evees, one of which I am going to evolve. One evee, at cp 267, has a 70 dig attack, and the other cp 325 evee has a much weaker 40 attack. Will evolving the lower evee produce an über powerful attack? I am hoping so, as this will be my first vaporeon, and it will complete my evee team.


I am trying to implement an interface on a fragment. For this I created a Class "X" to perform an action. In this class I created a method that uses the interface object and in the fragment, I implement the interface and create an object of class "X", which calls the method that uses the interface object. As you can see in the code below. The public class ClassX {  private NewInterface newInterface;  public void sum(){      newInterface.sum(1,1);  }  }  The interface public interface NewInterface {      public void sum(int a,int b); }  The fragment public class ExampeleFragment extends Fragment implements NewInterface {      private ClassX classx;      public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {            View root = inflater.inflate(R.layout.fragment_example, container, false);          classx.sum(1,1);          return root;     }      @Override     public void sum(int a, int b) {                  int sum = a+b;      } }  And I'm getting the error: java.lang.NullPointerException: Attempt to invoke interface method on a null object reference The NewInterface object in class x is null. However, this procedure works when I implement it in the MainActivity class. Does anyone know what may be happening?


Identification of mid-80s time travel tv show

Hey guys I've been trying to find the name of this show for years and it's bothering me. It was definitely mid-80s (probably about '85-'87). It was about a family who somehow travelled forward through time. They were "on the run" from some evil guy dressed in all black who drove this black futuristic vehicle.  I'm sure it was an entire family who was sort of "lost" in this future world as this guy in black pursued them. It had several character actors from the 80s (I can see their faces but can't place them), especially the evil guy and the father character who I know I've seen in other things from that era.  I know also that it didn't last long, maybe only a few episodes. Maybe only one episode? But it was when the VCR first came out and I watched this one episode over and over.  Thanks.   Entire family travelled forward in time somehow, get "lost" and end up on the run from some security guard type evil guy in all black Mid 1980s - probably 85-87 Television, USA, English Very short-lived Caucasian family, they were always altogether, it was clear they were a family "lost" in the future I only saw the first episode, unsure if there were any more They somehow travelled into the future, clearly accidentally, they didn't intentionally travel through time (I don't remember how they did it) and the security in the future was after them and they were running around, exploring this future world Main character was just the family, but also they focused on the evil guy in black a lot. The evil guy was a 80s character actor I know I've seen in other things.


Sometimes, when I ask for the .position().top value of some object, it does not return the absolute value, i.e. if some picture is added before, the .position().top value does not change. How may I ask for the absolute position of an object (in this case a div)?


How to get window controls back for document in Excel 2007

I have a document, one in particular, that tends to be edited by a lot of contributors with varying versions of Office. This document when opened in Excel 2007 does not open into an MDI window with the full set of controls, but is instead in a fixed size window. How can this be resolved?  See screenshot, ignore the blacked out content:


How can I show $\int _0^{2π} \frac{d\theta}{\alpha^2\cos^2\theta + \beta^2\sin^2\theta}=\frac{2\pi}{\alpha\beta}$ where $\alpha, \beta \in R^+$

When I use residue theorem I have problems to determine the poles in the unit circle. I've tried $\cos \theta = \frac{z^2+1}{2z}$, $\sin \theta = \frac{z^2+1}{2iz}$, $\sin^2\theta=\frac{1}{2}(\cos(2\theta)-1)$ and $\cos^2\theta=\frac{1}{2}(\cos(2\theta)+1)$ to help me but I couldn't make it. Thanks for helping


There was this cool tv show I used to watch as a kid (in the 1990's I think). It was about a world where water was extremely rare and people used to fight over it, however there was this person who had this large 3D polyhedron shaped device (big enough to fit a few people in it) that could synthesise water.  Now, this device was either a time travel device or could just make water (not sure but I remember some time travel aspect as they could either remember the world the way it was where water was plentiful or could travel back to it on occasion).  Anyway, would love to know if this rings any bells?????  It was on in the UK (but maybe the US too, not sure).


I'd say "I get in the plane", but apparently this language tries hard not to make sense.


Is there any anonymous website that authors can rate journal submission experience?

Yet again one of my papers is just stuck in limbo at a journal for over 6 months now. One referee has seemingly returned his review and the second referee is playing truant.  I knew this after a polite email to the administrative secretary 3 months after submission. She promised to send an email to nudge the late referee.  Now, after 6 months, I write to the editor in chief to get to know what is going on and he has not bothered to reply for over 2 weeks now.  When I review for this same journal, all of my reviews are returned in time. I setup a google calender reminder 2 weeks prior to my the deadline that I accept and then push everything aside for those 2 weeks to turn in a high quality report. I am going to politely decline any more invitations to review from this journal. The journal is prestigious but there are other less prestigious journals that offer faster review times. At some point in time, the prestige of the journal has to make way for faster dissemination of important results.  I also suspect that the journal is clubby. I have seen rotten articles written by folks in "elite" universities while I have had rejections from that journal even though I proved more theoretical results on a problem (I am an operations researcher) that was published in the same journal. I suspect the journal worries about the authors' zipcode. I published this article in a different journal eventually.   Is there any website where one can anonymously record such experiences for various journals? Once the website gains sufficient traffic, the editorial board of the journals would hopefully be forced to take notice and set right some of the rotten processes.  Frustrated_researcher.


Why is it bad to use an iteration variable in a lambda expression

I was just writing some quick code and noticed this complier error      Using the iteration variable in a lambda expression may have unexpected results.   Instead, create a local variable within the loop and assign it the value of the iteration variable.   I know what it means and I can easily fix it, not a big deal. But I was wondering why it is a bad idea to use a iteration variable  in a lambda? What problems can I cause later on?


Proof needed for the combinatorial identity $\sum_{a=0}^n\binom{n+a}{a}/{2^{n+a}}=1$

I need some algebraic and combinatorial proofs for the following.  $$\sum_{a=0}^n\frac{\binom{n+a}{a}}{{2^{n+a}}}=1.$$  Every kind of using combinatorial consideration, generating function, algebraic simplification, reduction to some famous formula, etc is appreciated.  Thanks in advance.


Resize partition for Ubuntu/Windows dual-boot

I'm dual-booting Windows 8.1 and Ubuntu 14.04. While installing, I gave Ubuntu 50GB of my disk space but now I'm finding that it is small for me. So is there any way I can decrease my Windows C: drive and increase the Ubuntu partition without affecting dual-boot. I've read posts saying how to do it but I'm afraid that I'll mess up my dual-boot and break my bootloader.  My GParted:    I want to take 50GB from from C: Drive(/dev/sda4) and give it to the Ubuntu drive(/dev/sda9). Please guide me through it.  UPDATE : I removed 50GB from my C: drive but I am now unable to add it to my /home directory. I can only make that 50GB into a new partition which is not what I need. Is there any way how I can add that 50GB to /dev/sda9.    The /dev/sda10 [50GB Volume] is the one I want to delete and add to /dev/sda9.


Can I use this site as a brainstorming/voting site?

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?