I have a component where I am displaying a list of records querying using APex and displaying data using aura:iteration. I now want to add a search bar so users can search from the aura iteration without making another trip to the server, similar to the standard search in List Views. Could you please point me in the right direction?

                         <lightning:buttonIcon iconName="utility:search" variant="bare" onclick="{! c.handleClick }" alternativeText="Search" class="slds-input__icon" />                         <ui:inputText value="{!v.searchText}" class="slds-lookup__search-input slds-input" placeholder="Search" />

                 <aura:iteration items="{!v.leftCol}" var="tableRow">
                          <lightning:layoutItem  padding="around-small" size="12" largeDeviceSize="6" flexibility="grow">                             <lightning:card>                                 {!tableRow.Name}                             </lightning:card>                         </lightning:layoutItem>
                 </aura:iteration>

Is there a way to search across all rows/columns in a lightning:datatable to narrow down the list, just like jQuery DataTables? If so, how do implement that?  Can I somehow do it all on the client-side to make it super fast (some sort of DOM manipulation)  I'm having some issues with the lightning:datatable not updating. I have attached my code below, maybe you can help me spot the issue:  Markup:  <aura:component extends="c:Base" controller="AccountBrowserForm"> <aura:handler name="init" value="{! this }" action="{! c.doInit }"/> <aura:attribute name="selectedAccountId" type="Id" access="public" /> <aura:attribute name="accounts" type="Object"/> <aura:attribute name="mycolumns" type="List"/> <aura:attribute name="sortedBy" type="String" /> <aura:attribute name="sortedDirection" type="Boolean" default="true" />  <aura:registerEvent name="AccountFilterChange" type="c:AccountFilterChange" />  <aura:attribute name="backingdata" type="List" /> <aura:attribute name="filter" type="String" /> <lightning:input type="text" onchange="{!c.filter}" value="{!v.filter}" label="Filter" />  <lightning:datatable aura:id="lightningTable"                      data="{! v.accounts }"                      columns="{! v.mycolumns }"                      keyField="Id"                      onrowaction="{! c.handleRowAction }"                      onsort="{!c.updateColumnSorting}"                      sortedBy="{!v.sortedBy}"                      sortedDirection="{!v.sortedDirection}"                      hideCheckboxColumn="true" />     Controller:  doInit: function (component, event, helper) {     helper.callServer(component, "c.getAccounts", $A.getCallback(function (response) {         component.set("v.accounts", response);         component.set("v.backingdata", response);         console.log(component.get("v.backingdata") + " /// BACKING DATA INSIDE ")         console.log(component.get("v.accounts") + " // ACCOUTN DATA INSIDE")          component.set('v.mycolumns', [{                 type: "button",                 typeAttributes: {                     label: '',                     iconName: 'utility:add',                     name: 'selectRecord',                     title: 'selectRecord',                     disabled: false,                     value: 'edit',                     variant: {                         fieldName: 'variantValue'                     },                 }             },             {label: 'Name', fieldName: 'Name', type: 'text', sortable: true},             {label: 'Street', fieldName: 'BillingStreet', type: 'text', sortable: true},             {label: 'Postal Code', fieldName: 'BillingPostalCode', type: 'text', sortable: true},             {label: 'City', fieldName: 'BillingCity', type: 'text', sortable: true},             {label: 'Country', fieldName: 'BillingCountry', type: 'text', sortable: true},         ]);          console.log(component.get("v.backingdata") + " *** BACKING DATA OUTSIDE *** ")         console.log(component.get("v.accounts") + " *** ACCOUNT DATA OUTSIDE *** ")     })) },  filter: function (component, event, helper) {     var data = component.get("v.backingdata"),         term = component.get("v.filter"),         results = data,         regex;     try {         regex = new RegExp(term, "i");         // filter checks each row, constructs new array where function returns true         results = data.filter(row => regex.test(row.name) || regex.test(row.age.toString()));     } catch (e) {         // invalid regex, use full list     }     component.set("v.accounts", results); },   For some reason the filter function is completely unresponsive. Also, does it matter that I'm populating the component with a response from a callback function. @sfdcfox, I noticed in your example that you simple created an array with dummy data. My "myaccounts" attribute is of type object


According to Wikipedia:     A Hilbert space is separable if and only if it admits a countable orthonormal basis   While this statement seems very reasonable, it is not clear to me how one would go about proving it.

I want to show that every an infinite-dimensional separable (contains countable dense set) Hilbert space has a countable orthonormal basis.  I know that every orthogonal set in a separable Hilbert space is countable, it is help me with the proof?


I'm probably missing something super simple, but I just can't figure this out. For integers $a,p$ such that $gcd(a,p)=1$ then Fermat's Little Theorem states $$a^{p-1}=1 \mod{p}$$ My textbook then says if $a$ is a primitive root and $x\equiv y \mod{p-1}$ then $a^x=a^y\mod p$. Can someone help me understand this proof?

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


If A occurs exactly two times, one could say "A occurs twice." If A occurs exactly three times, one could say "A occurs thrice." etc.  Not being a native English speaker, I don't know how to properly name these words that compress the expression for "number of occurences", however, I've found articles online that have expanded their realm of existence beyond the numerals of 1, 2 and 3, such as "septence" for 7, etc.    I wonder if there are 'compression words' like this for "odd" and "even number of times". I would find these words extremely useful. There are words like that in Czech, I am however unable to find their English equivalents. Do they exist?

Is there a word for 'four times as much', analogous to once, twice, and thrice?


In Discrete Math, it's trivial to say that $x \ne \{x\}$, why is that?

I'm new to set theory, and the axiom of regularity has been giving me some trouble. It states that every non-empty set A has an element B such that A and B are disjoint sets. Apparently, this axiom implies that a set can't be an element of itself. I've heard (and agree with) arguments like this:  Let A be a set, and apply the axiom of regularity to {A}, which is a set by the axiom of pairing. We see that there must be an element of {A} which is disjoint from {A}. Since the only element of {A} is A, it must be that A is disjoint from {A}. So, since A ∈ {A}, we cannot have A ∈ A (by the definition of disjoint).  However, let's say there's a set A = {{1, 2}, A}. It seems like this set obeys the axiom of regularity, because {1, 2} is an element of A, and {1,2} and A are disjoint sets. However, the axiom of regularity shouldn't allow A to be an element of itself. I suppose there's a flaw in my logic somewhere, and I'm hoping someone knowledgeable can show me why this isn't allowed.


I am using Ubuntu 12.04.3 Kernel 3.8.33 on an Intel N2600/GMA3600 Netbook. Ubuntu currently runs in 1024*600 resolution which is perfect for my netbook.   However the graphic performance is very poor. I am stuck with Unity 2D and video playback is dreary. Glxgears reports framerates (<1) and CPU usage for glxgears is 100% (as reported by top). The driver in use is gma500_gfx.  I read somewhere that the proprietry drivers in repositories can give hardware accelarated video playback and OpenGL ES support. However, the cedarview-graphics-drivers fails to install with kernel>3.2 and Xorg>1.1.   I am planning on downgrading to Ubuntu 12.04.1,   where these drivers can be installed ?  Will it provide better video playback than gma500_gfx ?

I am looking for instructions on how to install cedarview graphics drivers on Ubuntu 13.04 32bit.  My graphics hardware is a GMA3600 aka Power VR SGX545.  EDIT: It seems that they are not in Raring yet, but only Precise:   EDIT2: they seem to be closed source.


So today I noticed something unexpected in java:      long a = 1234567890000l;     float b = 1.2f;     long result_a = (long)(a - b * 1000);     long result_b = a - ((long) (b * 1000));     System.out.println("result_a: " + result_a);     System.out.println("result_b: " + result_b);   You would expect result_a and result_b to be similar (not exactly the same since b is float and not precise by definition), right? right?? Well, no...  result_a: 1234567954432 result_b: 1234567888800   No idea why the huge difference. Any ideas guys?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I understand the proof that shows that if $f$ is monotone on an interval, then it has at most countably many jump discontinuities. I feel like a similar idea also allows us to show that any function can have at most countably many jump discontinuities. Here is my attempt at a proof.  If a jump continuity of $f$ exists at $x$, this means that $f(x^-)$ and $f(x^+)$ exist, but $f(x^-)\neq f(x^+)$. The existence of left and right hand limits means that for any $\epsilon > 0$, we can find a $\delta > 0$ such that if $y\in (x,x+\delta)$, then $|f(x^+) - f(y)| < \epsilon $ and if $y\in (x-\delta, x)$, then $|f(x^-)-f(y)| < \epsilon$. Thus, the only discontinuity (jump or otherwise) in the interval $(x-\delta, x+\delta)$ is at $x$.   I believe that this means that the jump discontinuities only exist within disjoint open intervals, of which there are at most countably many. If there does appear to be an issue at the boundary of the interval, for example, in a case where $x<y$ are both jump discontinuities and $x+\delta_x = y-\delta_y$, then we can make $\delta_x$ or $\delta_y$ a bit smaller to prevent this overlap.   Is this proof correct, or am I missing something? This statement seems a bit strong, especially since I've only heard a similar statement for monotone functions on an interval. If it's not true, can someone give a counterexample?

I know that Dirichlet function has uncountable many discontinuities. I think they are removable, because the discontinuities can be removed by redefining the function values of the rational numbers as 0.  So Dirichlet function is a function that has uncountable many removable discontinuities, then my question is can we construct a function with uncountable  many jump discontinuities? If not, how do we prove it is impossible? Thank you.  An odd but similar question is can we have a function that has uncountable many infinite discontinuities?


Is there any reason except being able to reproduce the same sequence of numbers, for using pseudo-random number generators while there is easy access to truly random numbers such as the number of milliseconds of the clock, the fluctuation in electricity, and etc...? I heard that producing truly random sequence of numbers often takes more time and requires extra hardware, but the things I mentioned above shouldn't be like that. So what are the other reasons that pseudo random numbers are so popular?

I've never quite got this. Just say you write a small program in any language at all which rolls some dice (just using dice as an example). After 600,000 rolls, each number would have been rolled around 100,000 times, which is what I'd expect.  Why are there websites dedicated to 'true randomness'? Surely, given the observation above, the chances of getting any number are almost exactly 1 over how ever many numbers it can choose from.  I tried it in : Here's the result of 60 million rolls. The highest variation is like 0.15. Isn't that as random as it's going to get?  1 - 9997653 2347.0 2 - 9997789 2211.0 3 - 9996853 3147.0 4 - 10006533 -6533.0 5 - 10002774 -2774.0 6 - 9998398 1602.0


Does $\displaystyle\sum^{\infty}_{n=1}\left(\frac{n!}{n^n}\right)$ converge or diverge?   I've tried the ratio test, but i'm unsure if I can continue this way.  $$\displaystyle\lim_{n\to\infty}\frac{(n+1)!}{(n+1)^{n+1}}\cdot\frac{n^n}{n!}=\lim_{n\to\infty}\frac{(n+1)n!n^n}{(n+1)^n(n+1)n!}=\lim_{n\to\infty}\frac{n^n}{(n+1)^n}$$  If this approach works, how do we proceed? If not, what test might be worth trying?

I'm working on a problem sheet and it ask to discuss the convergence of  $$\sum \frac{n!}{{n}^{n}}$$ By D'Lembert's ratio test, $$\lim_{n->\infty}\frac{{a}_{n+1}}{{a}_{n}} = 1$$ and so, is inconclusive.  Using Cauchy's root test,  $$\lim_{n->\infty}({\frac{n!}{{n}^{n}}})^\frac{1}{n}=1$$  What are my alternatives?  Should I take the integral of the term of the series above? Would integrating factorial works?


I have two images that I want to show side by side, horizontally centered. I would like to distribute the remaining horizontal space evenly in three parts: To the left of the first image, between the images, and after the second image. So I tried this:  \documentclass{article}  \usepackage{graphicx} \usepackage{blindtext} \usepackage{float} \usepackage{mwe}  \begin{document}  \blindtext  \begin{figure}[H] \centering \hfill \includegraphics[width=4cm]{example-image-a} \hfill \includegraphics[width=4cm]{example-image-a} \hfill \end{figure}  \blindtext  \end{document}   However the last \hfill is ignored:    Why is this happening? How can I achieve the desired result ?

In the  manual on page 183 ,this example is given:  \begin{figure} \centering \hspace*{\fill} {ILLUSTRATION 1} \hfill {ILLUSTRATION 2} \hspace*{\fill} \caption{Example float with two illustrations} \label{fig:mult1} \end{figure}   I have tried to figure out, what the difference between \hspace*{\fill} and \hfill is!?  The  and  did not help me much.


I recently read that in order to conduct electricity over vast distances via power lines they had to step up voltage which results in a decrease in current through the medium. This is reflected in the formula $P=IV$. What I can’t seem to grasp is why this results in current ($I$) dropping and not rather power ($P$) increasing? I’m assuming they have to somehow keep the power constant, preventing it from increasing in some way, but how is this achieved? Please excuse the silly question as I am still very new to the subject, but I just assumed from the formula above that increase in $V$ would naturally result in an increase in $P$? Is there something I am missing? :|

Is the Ohm's law violated here? And also why is electricity generated at 11,000 V in India?


Hello and thanks for helping me in this question. I just have in /ets/sudoers something like this:  # User Aliases User_Alias CLIENT = jhonny  CLIENT myserver = ALL. !ADMIN_CMD,!SU   I just want deny to jhonny the capacity to shut down or reboot the machine.  Server is Red Hat 6.6 Santiago.

Is it possible to edit the sudoers file so a user can use sudo for any command except for a specified one?  I reverse is true, I believe, that the sudoers file can be setup so that a user can only execute a given list of commands.  EDIT: the commands I really want to take away are halt and reboot... this makes me think there are special system calls for halt and reboot.  Can you take system calls away from a user?  If not, is it because the unix permission system abstracts over system calls neglecting this?


It seems like only post flags' declination counts towards the ban.  Do declined comment flags also count towards the ban?

Currently, users can get stuck in a permanent flag hellban from which there is no recovery.     I've asked around before and it doesn't look like recovery is possible. To recover, you'd need to gain flag weight, and to gain flag weight you need someone to handle your flags. Since your flags now go into the void, you can't get any of them marked helpful via any means. – Adam Lear♦    Users can enter this hellban even if they have many more helpful flags than declined flags. Subsequently, their future flags are never reviewed, despite the likelihood of being helpful.  I suggest allowing users to recover from this ban in the following way:   User must have more helpful flags than declined flags (perhaps somewhere in the 1.5:1 to 3:1 range?) Hellban flags are tracked silently. If another user flags the same post (and that flag is marked helpful), or if the post is deleted, the flag counts as "helpful" (not actually marked helpful until the user is unbanned). Once the user reaches a certain threshold (perhaps related to measurments that trip the hellban) of "helpful" flags, and at least 2/3 of their hellbanned flags are "helpful", the ban ends.   This allows good users who get hellbanned because of a bad streak to come back from it.


i want to allow some files to be downloaded if only the user agent or referrer match the following  These are the user agents uTorrent Bittorrent Transmission  This is the http referrer www.niresh12495.com  I'm trying the following code but shows Error 500  RewriteCond %{HTTP_USER_AGENT} !^(*uTorrent*|*BitTorrent*|*Transmission*) [NC,OR] RewriteCond %{HTTP_REFERER} !^http://niresh12495.com/.*$      [NC,OR] RewriteCond %{HTTP_REFERER} !^http://niresh12495.com$ [NC,OR] RewriteCond %{HTTP_REFERER} !^http://www.niresh12495.com/.*$ [NC,OR] RewriteCond %{HTTP_REFERER} !^http://www.niresh12495.com$  [NC,OR] RewriteRule ^*\.(dmg|torrent|pkg|rar|exe|zip|jpeg|jpg|gif|png|bmp|mp3|flv|swf|png|css|pdf|mpg|mp4|mov|wav|wmv|swf|css|js|iso)$ http://www.niresh12495.com [R,F,NC]   Where am i wrong ?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


According to the , the number of items in the queue has been  to avoid scaring people off with a daunting number that makes the task seem like trying to stop a flood with a bailing bucket.  I'm not sure exactly how the "fuzzying" is being done, but based on Shog9's explanation and the fact that the queue keeps dwindling and then suddenly jumping up by several thousand, I take it there's some kind of cyclical prioritizing process going on, in which a batch is selected according to certain criteria, and when that batch is completed, a new set of criteria is applied to select a new batch of reviews on the next rung down the priority scale.  This seems to be a good idea, but there's one problem with that approach:    I thought the maximum daily number of Close Votes reviews was supposed to be 40. Why was it suddenly knocked down to 20? It can't be that the bonfire was so destructive that we no longer need a higher limit in the queue, can it?   Well, apparently the higher limit isn't particular to close vote reviews; .  So, whenever the number of a selected batch drops below 1,000, reviewers are temporarily capped at 20 per day until the next heaping plateful is served up. This is probably not the desired behavior when it's only the fuzzied number that's under 1,000, and there are really tens of thousands of reviews waiting in the wings. Perhaps the script should be changed to allow 40 Close Votes reviews regardless of how many items, or the next batch should be appended whenever the number drops close to 1,000?    UPDATE  @rene cleared this up in a comment, so I'm adding the explanation here. The cyclical process is simple: It's based entirely on a minimum number of close votes, and each time the queue goes to zero, a new batch is selected by reducing minimum by 1. We're now on 2 close votes and up, so it's the last cycle until the number is unfuzzied. I raised the issue because it seemed to me as if they were being served up ~10K at a time, so I thought this would keep happening over and over. Given rene's explanation, this will only happen one more time in the next 30K (the size of the new batch), so it's not a significant issue.  BTW, even though the number went up to 30K a couple of hours ago, it appears that the 20 review cap still applies to people who reached it when the number was < 1K:    I'm wondering, if someone has done more than 20 but fewer than 40 reviews when the number in queue drops below 1K, are they capped at that point, or can they continue to 40 if they've already crossed a threshold at 20? (Not really a problem or concern, just idle curiosity about how it works. Plus it's an excuse to add more freehand red circles to my post.)

I just reviewed 20 items in the close vote queue and got the message     Thank you for reviewing 20 close votes today; come back in 15 hours to continue reviewing.   Normally this is 40 items but .  Can this restriction be removed for Stack Overflow or better the actual queue size be considered since the queue actually contains more items than being displayed?


I am trying to chain the commands in linux, I am using ubuntu 14.04 distribution. The aim to create a directory and go into that directory. Generally we do this  mkdir foldername cd foldername   Perfect, when tried this   mkdir gates cd gates    works as expected. But things are not working as expected when using &  mkdir gates & cd gates, does not work, the error is no such file or directory. When pressed enter, it would create the directory gates in the next step. Why this is happening?. But ls & mkdir gates seems to be working fine

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


What is the greatest integer not exceeding the sum $$\sum_{n=1}^{1599} \frac{1}{\sqrt n}$$ I have already arrived at a solution using calculus but since this came in a Math Olympiad which do not include calculus in their syllabus I wanted to know how I could do this without it. My first thought was to use Titu's Lemma but I couldn't think of what I could do after that. Any hints will be appreciated, thanks

$$\left\lfloor \frac{1}{\sqrt{1}}+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1}{\sqrt{4}}+...+\frac{1}{\sqrt{1024}}\right\rfloor =?$$  I can't find $$? \leq  \frac{1}{\sqrt{1}}+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1}{\sqrt{4}}+...+\frac{1}{\sqrt{n}} \leq ?$$ I remeber there was a sharp bound , Am i right  ? I am thankful if someone help me to find the bound  , or give another idea Last question : Is it possible to find $\frac{1}{\sqrt{1}}+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1}{\sqrt{4}}+...+\frac{1}{\sqrt{1024}}$  by integral  ?


x = 10 def double(y):     return 2 * x print(double(x))  Output is 20 As far as I know, it should return None because in function "double" I double x which is undefined that block.

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


The rational numbers form a countably infinite set, just as the integers do. For the integers, there is no integer between 4 and 5 (I.e., there is such a thing as two consecutive integers) So, I am thinking that there must be such a thing as two consecutive rational numbers, such that there is no other rational number that is between them. The difference between two consecutive integers is 1. If there is such a thing as two consecutive rational numbers, is the difference between them 0 (even though there are irrationals between them)?  Thanks!

A rational number is one that can be written as $a/b$ where $a$ and $b$ are integers, $b\gt0$ ($a$ can take care of negative rationals), and I suppose $\gcd(a,b) = 1$.  Given some $n\in\mathbb{Q}$ where $n=a/b$, what is the next rational number?  At first, I naively thought that it was $(a+1)/b$ but of course that is absurd. Consider $n=1/2$. The next rational number is obviously not $1$.  I decided that one must make the "granularity" finer. For instance $n=1/2=2/4$, so by the above idea, the next one is $3/4$, which is better.  Extending that, is it correct that the next rational number is:  $$ \frac{1+\prod_{n\in\mathbb{Z^+},n\neq b}n}{\prod_{n\in\mathbb{Z^+}}n} $$  (We can factor in the sign of $a$ if we wanted to make this more correct)


I came across the set of following coupled equations while studying cycloid motion in Griffiths' Intro to ED   $\ddot{y}=\omega \dot{z}$  $\ddot{z}=\omega (\frac{E}{B}-\dot{y})$  I am at a loss as to how I may approach the problem to solve. Any help is appreciated.


Use the polar form of complex numbers to show that every complex number $z\neq0$ has multiplicative inverse $z^{-1}$.  If $z=a+bi$, then the polar form is $z=r(\cos(\alpha)+i\sin(\alpha))$.  I can do it, not using polar coordinates: If $z=a+ib$.  Since $1+0i$ is the multiplicative identity, if $x+iy$ is the multiplicative inverse of $z=a+ib$, then $(a+ib)(x+iy)=1+i0$ $\Rightarrow$ $(ax-by)+i(ay+bx)=1+i0$ $\Rightarrow$ $ax-by=1bx+ay=0$ $\Rightarrow$ $x=\frac{a}{a^2+b^2}$, $y=\frac{-b}{a^2+b^2}$, if $a^2+b^2\neq0$.  Thus, the multiplicative inverse of $a+ib$ is $\frac{a}{a^2+b^2} +\frac{-b}{a^2+b^2}$.  Now, how can I use this information to find it using $z=r(\cos(\alpha)+i\sin(\alpha))$??  I'm stuck...

Use the polar form of complex numbers to show that every complex number $z\neq0$ has multiplicative inverse $z^{-1}$.  If $z=a+bi$, then the polar form is $z=r(cos(\alpha))+i(sin(\alpha))$.  I can do it, not using polar coordinates: Let $z=a+ib$.  Since $1+0i$ is the multiplicative identity, if $x+iy$ is the multiplicative inverse of $z=a+ib$, then $(a+ib)(x+iy)=1+i0$ $\Rightarrow$ $(ax-by)+i(ay+bx)=1+i0$ $\Rightarrow$ $ax-by=1bx+ay=0$ $\Rightarrow$ $x=\frac{a}{a^2+b^2}$, $y=\frac{-b}{a^2+b^2}$, if $a^2+b^2\neq0$.  The multiplicative inverse of $a+ib$ is therefore $\frac{a}{a^2+b^2} +i\frac{-b}{a^2+b^2}$.  Now, should I use this same process and just replace $z=a+ib$ with $z=r(cos(\alpha))+i(sin(\alpha))$??  Or is there another way to go about this process?


I'm using latest Ubuntu GNOME. When I download the steam-installer though software it works, after that nothing happens no update and it won't launch.  Here is the error message I get when I try to launch steam in a terminal:  $ steam Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically  grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc Installing breakpad exception handler for appid(steam)/version(1461972496) libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast

After upgrade to Ubuntu 16.04, Steam doesn't start. When I execute it from the command line, I get the following error:  $ steam Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc Installing breakpad exception handler for appid(steam)/version(1459463254)


I want to show this result:  $$\mathbb{P} \left[ \lim_{t \rightarrow \infty} \frac{B_t}{t} = 0 \right] = 1$$  For $B_t$ a standard brownian motion.  I have no idea how to do this. Naively I tried exchanging limit and probability but that doesn't work.  I just need a hint to get started.  EDIT: In general what is a good way to show almost sure convergence?

The objective is to prove that \begin{align*} \text{$\lim_{t \to \infty} \frac{B_t}{t} =0  \qquad$ a.s.} \end{align*} By the strong Law of Large Numbers, we have that: \begin{align*} \text{$\lim_{t \to \infty} \frac{B_t}{t} = \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^n B_k - B_{k-1} = 0 \qquad$ a.s.} \end{align*} In doing so, the idea is to show that the trajectory of $B$ cannot deviate too much from $B_n$ on $[n, n+1]$. It can be shown that \begin{align*} \sum_{n=0}^\infty P\big(\big\{\sup_{t \in [n,n+1]} |B_t - B_n | \geq n^{\frac{2}{3}}\big\} \big) < \infty. \end{align*} Now, the question is, how does the Borel-Cantelli Lemma finish this prove?  So, the Borel-Cantelli Lemma is saying that \begin{align*} &P\big( \limsup_{n \to \infty} \big\{\sup_{t \in [n,n+1]} |B_t - B_n | \geq n^{\frac{2}{3}}\big\} \big) = 0, \qquad \text{so}  \\ &P\big( \bigcup_{n=1}^\infty \bigcap_{k\geq n} \big\{\sup_{t \in [n,n+1]} |B_t - B_n | \geq n^{\frac{2}{3}}\big\} \big) = 0 \qquad \text{and}  \\ &\lim_{n \to \infty} P\big( \bigcap_{k\geq n} \big\{\sup_{t \in [n,n+1]} |B_t - B_n | \geq n^{\frac{2}{3}}\big\} \big) = 0. \end{align*} How to find again the fraction $\frac{B_t}{t}$?


I got an error when trying to update ubuntu using   sudo apt-get update   The response below  W: Skipping acquire of configured file 'bionic/binary-i386/Packages' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/binary-amd64/Packages' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/i18n/Translation-en' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/i18n/Translation-en_US' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/dep11/Components-amd64.yml' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/dep11/icons-48x48.tar' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/dep11/icons-64x64.tar' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: Skipping acquire of configured file 'bionic/cnf/Commands-amd64' as repository 'http://mirrors.bangmod.cloud/ubuntu bionic InRelease' doesn't have the component 'bionic' (component misspelt in sources.list?) W: GPG error: http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.10  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1488EB46E192A257 E: The repository 'http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.10  Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


I have this night scene and it's pretty clear that something is not right. The lights are strange, like muffled, making everything grainy. Does anyone have an idea that can fix this?

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I'm a PhD student in literature who is nearly half way through my third year.   Recently (last month or two) I feel like I've lost all motivation to work on my thesis. Instead of treating it like a normal 9-5 workday I now go in late most days and procrastinate for a few hours before starting any actual work.   I'm not up to where I wanted to be in terms of chapter drafts at this stage of my program, but instead of this motivating me to work harder I just feel disheartened and like I will never catch up so why try. These defeatist thoughts make me feel even less like working so i end up in a vicious spiral of not working, guilt about not working, no motivation to work, more not working.  I feel overwhelmed by the amount of material I feel I still need to read to be 'across' my field and don't have a good sense of how im going to tie my various chapters into an coherent piece of work connected by an overarching argument and theoretical framework.   I have been managing an anxiety disorder throughout my PhD, and have in the past suffered from depression. I struggle to know if these feelings mean my overall mental health is deteriorating and that's what's causing the negative feelings about the PhD, or if it is the fact that I spend most of my time doing/thinking about PhD and so if I feel good about it then I feel good most of the time, and if I feel the research is going bad I feel bad most of the time. I've been sleeping to avoid going to the office and feel down about the thesis but this doesn't carry over to other aspects of my life - which leads me to think it's more phd-caused than mental health but who knows.   My supervisor is unaware of the underlying mental health issues. I struggled early on in first year which lead to me telling her I felt overwhelmed and she instructed me to take a week off, but I didn't outright disclose the anxiety. I've tried to flag recently with my supervisor that I feel a bit lost and behind, but she didn't seem overly concerned and I think I downplayed the extent to which this is impacting on my day to day work on the thesis. I wonder if I need to be more overt about how much I'm struggling, or disclose the underlying mental health issues. We have a very good r/ship which often feels more like a friendship than a supervision - which has it's upsides as well as downsides when it comes to something like this as I don't want to let her down or for her to be disappointed in me by disclosing how much work I'm not doing, but also don't want to ruin the friendly vibe by getting all serious with how I'm feeling re: thesis. I'm worried that even though she seems happy with where I'm at draft wise, she thinks I've read much more than I have because she doesn't know how much time I'm spending avoiding the thesis.   Part of me feels I should just 'get on with it' and if it is mental health as the underlying cause this is not something my supervisor should have to manage anyway so why bring it up. Another part of me feels I should be more honest with her about how much I feel I'm struggling with the thesis and not worry about seeming needy or incapable.   I feel like the time toward completion draws ever closer and yet the amount of work I need to do to finish doesn't progress at the same rate. I feel like I don't work hard enough at the moment to finish on time, and this feels both terrifying and paralyzing. I've read lots of blogs about procrastination tips and such but struggle to put them into action. I've also read lost about mid phd slump/doldrums so logically know this isn't uncommon, but at the same time I've lost some of self-confidence to think I'll be able get through this phase like others have.

I just finished all of my coursework for my PhD program, and am entering the research phase of my degree with a topic already in mind.  I've already started the research, but I'm already finding that I end up procrastinating a lot of my time away.  When I was taking courses, I felt like i didn't have time to procrastinate because of the pace of the classes and I felt like I had to always keep up with the pace.  But now that I have no specific constraints, I feel like its harder to pace myself.    Of course, I know it's a bad habit to procrastinate and I should probably devote most of my waking hours to my research.  Sometimes, (especially when I get stuck) I find it's so easy to get distracted on the computer (websites, youtube, text messages, etc.).    What are some effective strategies to avoid procrastination during this research phase?  How do you stay on task, especially when you get stuck?


I just recovered more than 2 Million files using PhotoRect, the files in the recovery folder contain more than 2 Thousand folder containing random files extension .  It would be impossible if I sort them manually, I tried to program a bash script but I found this on the INTERNET:    #/bin/sh  # Give directory as argument dir=$1 if [ "x$dir" != "x" -a -d "$dir" ] ; then   cd "$dir" fi  dir=$(pwd) basedir=$(basename "$dir")  exts=$(find . -mindepth 1 -maxdepth 1 -type f -print | grep '^\./.*\.' | sed 's/^.*\.\([^.][^.]*\)$/\1/' | sort -u)  for e in $exts; do     # Skip extension if this directory is already named by extension.    if [ "$basedir" = "$e" ] ; then       continue    fi     mkdir "$e"    for file in *.$e; do       mv "$file" "$e"    done done   It's usage is find . -depth -type d -print -exec /path/to/ext/script {} \;  This script get through the sub-directories in the main directory and creating folders in the directory with the name of the extension of the file   For example :   folder1 is our main directory   folder1                     It becomes  =>      folder1  --- subFolder1                                  -- subFolder1     -------file11.php                               ----php     ------file12.txt                                      file11.php     -------file13.img                                     file14.php     -------file14.php                               ----img  --- subFolder2                                           file13.img     -------file21.php                                   ------file22.txt                                And So On....     -------file23.img     -------file24.php  --- subFolder3     -------file31.php     ------file32.txt     -------file33.img     -------file34.php   But I want it to create another directory newFolder which contains all file with php extension in all the directories and sub directories .  Is that possible, I don't have that much of experience in bash .

I have some files with different extensions such as *.pdf, *.mp3, *.jpg and a few others. All of them are stored in a parent directory.  How can I get a list of all extensions, create some folders based on these  extensions and then move all files into their relevant folders?


Why in the following sentences we omit articles (I'm basing on what I've heard in Game of Thrones - episode 1, season 5):   You will be queen! You will be king one day!   I would say "a king" and "a queen". So should I also apply the same to other nouns like politician, programmer, boss, pope e.t.c. and also say "You will be politician" instead of "You will be a politician"?  And what's more interesting, in the same episode, a few minutes later there was said:  - I'm not a politician. I'm a queen.  I'm really confused about it.

Which is correct?  I am king of the world. I am the king of the world.  Additionally, which would be the better choice, if I wanted to use the expression "king" to signify dominance in a metaphorical way or in slang.  I am king of the backstreet. I am the king of the backstreet.  And is there a difference, if we are not king of a place but of a group of people?  I am king of (the) thieves. I am the king of (the) thieves.  Is there a general grammatical rule for that?


The other day my AC stopped working. I'm thinking the condenser fan motor has gone bad (unit is ~10 years old). Here is what I did to troubleshoot which led me to believe it was the fan motor.  1.Turned on, sounds like the compressor kicks on, but the fan doesn't turn on.   I turned the power off and took the top grate off. The fan blades turn just fine. I took the side panel off and all the wiring looks good. I disconnected the fan from the defrost circuit and tested continuity on the two terminals on the defrost circuit (while thermostat was set to cool, temp was way down, but power was still off). Had continuity. I bypassed the defrost circuit by hooking the two wires together and turned power on. Compressor turns on, fan does not. I checked the contactor to make sure no wires were loose and look for corrosion. Everything looked good. In fact, with thermostat set to cool and temp turned down (high voltage power off), the contactor's electromagnet was working and the switch was on.   Basically I followed the instructions , which incidentally, the unit they are working on is identical to my unit, which was nice. The only thing I didn't check was the capacitor as I don't have a multimeter which checks farads.  I'm going to check the capacitor tonight as I'm borrowing a better multimeter from a friend. Assuming that checks out, does my diagnosis sound good?  Do I need to change the capacitor too?  Being a ~10 year old unit, I'm aware that I'll probably need to replace the whole thing soon. I'm hoping a new fan motor will buy me a few years though. If not, I'd rather waste $100 instead of $200 trying to replace the motor.  Update Based on the info in , I decided to fire up the AC and give the fan a push. It started right up. I got my friend's multimeter, but it only went up to 20μF. My capacitor said 40μF, so I didn't test it. Since spinning the fan blades with the AC on got it going, I'm going to replace the capacitor today.

I have a 15 year old Bryant Central Air unit in my house.  Yesterday it stopped working.  Here is what I have checked.   The breaker in the basement is not tripped. The furnace works fine from the thermostat. The blower downstairs by the furnace runs when AC is on and blows room temp air into the house, but the fan on the compressor is not spinning.  The fan on the compressor does spin freely when I manually spin it with a stick.  Checked for fuses in the outside box.  There are no fuses outside, only an on/off pull thingy with two metal plates that you have to turn upside down to turn off. The capacitor is not flat on top, but far less rounded then any of the examples of blown AC dual capacitors I've seen on youtube. I get 220v in on the contactor. I get 220v out on the contactor. I get 24v from the thermostat. When the air is on at the thermostat the contactor solenoid is in, when the air is off it is out.   When the air is on at the thermostat I hear a buzz coming from the outside compressor but I can't tell what the source of the buzz is. If I push the solenoid in when the AC is off, the compressor does not start up and the fan does not spin, I just hear the buzz. If I wait by the compressor outside for a few seconds while the AC is on there's another buzz sound that goes off for about 3 seconds then stops.  From listening to the AC when it was working this is the buzz sound that goes off before the compressor and fan usually kick in. After leaving the non-functioning unit on for a few minutes while I diagnosed I noticed that the metal on top of the compressor fan motor was VERY hot to the touch.  It cooled after I turned the AC off.   I'm thinking the fan motor on the compressor is dead or the capacitor is bad.  Is there a way to check the capacitor and the fan motor while they're still in the unit?  With the power off of course.  Does anyone think it's something else?  Do I have to buy the overpriced ($485 for the manufacturer fan motor and $200 for the dual capacitor) replacement part from the manufacturer or can I use a third party manufacturer?  Any other help would be appreciated.  As much as I'd love to bring an HVAC guy in here I just can't afford it.  Either I go without AC, or I fix it myself.  EDIT:  With the AC on I manually spun up the fan on the compressor and the fan started spinning and the AC unit fired up.


I heard the horror stories about travelling in India, getting diarrhoea and sometimes even ending up with permanent health problems.   How bad is it really?  Can it be easily avoided with a bit of caution or should I prepare for it to happen anyway? What can I do to minimize the risk while keeping a reasonable budget?  I can't go to high-end hotels and high-end restaurants, nor willing to go to "Western" restaurants all the time.  There's the obvious, such as: hand sanitizer, wash hands, wash fruit, drink only bottled water.  What else is there that might not be obvious or might be specific to India?  Does avoiding meat help?   In your answers please consider that I know very little about India.  I don't have a travel plan yet, in fact haven't even decided to go yet.  So another question is, how do different areas compare in this regard?  I think I'm most interested in the north-east.

Montezuma's revenge or Aztec two step in Central America, mummy's tummy, or Cairo two-step in Egypt, Kurtz Hurtz in Uzbekistan, Bombay belly or Delhi belly in India.  A case of the sh-- or Hershey Squirts or The McSh-- in North America, Down Under Butt Chunder in Australia, Karachi crouch in Pakistan, Suryavarman's Revenge in Cambodia.  Kabulitis in Afghanistan, holiday tummy in United Kingdom, Bali belly in Bali, or Taghazout Tummy in Taghazout or Kathmandu quickstep in Nepal.  Beaver fever in Canada, Thailand it's Thai-dal wave. Peacekeepers to Arabic-speaking countries have called it yalla yalla (Arabic for "fast, fast").  In Central Asia, it was ridiculous, with every second backpacker walking around with toilet paper on them, regularly having to make a 'run' for it. In Egypt, half my tour group got sick, by the time we'd converted into a mobile pharmacy!  Regardless of what it's called, what's the best way to try and prevent it?


All land verterbrates except some frogs have 5 fingers on hands and feet.   The first vertebrate lizards came out of the water and had 7 fingers ( -370mn yrs), and then 6 fingers, and after 30 million years, all their descendents had 5 fingers on both limbs.   someone told me "5 is much more of an accidental number", so if all land vertebrates had 7, then 6 fingers, why did that get selected to 5?

If a trait would be advantageous to an organism then why hasn't it evolved yet?  Conversely, if a trait is not advantageous or mildly disadvantageous, why does it exist?  In other words why does evolution not make the organism more "perfect"?    This is a general question that would be applicable for any kind of trait. Please keep the answers precise and scientific.   Read this meta post for more information:


Could anyone give a specific example where the intersection of two principal ideals in an integral domain is not a principal ideal?

Let $I$, $J$ be finitely generated ideals in a ring $A$ (commutative with identity). I know that the intersection need not be finitely generated: can somebody give me an example?   Thanks.


I submitted a manuscript, which has been accepted. Its publication is pending payment of publication fees. I need to withdraw the manuscript due to financial constraints.  Is this ethical?

My paper got accepted in a mediocre open access journal. However later I found out that its publishing fees was too high.   What would be the correct way of asking a withdrawal of your article from the journal?


What is $ i^i$, where $i$ is the imaginary unit. Apparently wolfram alpha and google give: $$i^i\approx0.207879576=e^{-\pi/2}$$ But how?    Maybe let me try: $$x=i^i\implies x=\exp(i\ln i)$$ $$x=\exp\left(i\left(i-\frac{i^2}2+\frac{i^3}3-\frac{i^4}4+\cdots\right)\right)$$ $$x=\exp\left(i\left(i-\frac{1}2-\frac{i}3+\frac{1}4+\cdots\right)\right)$$ $$x=\exp\left(-1-\frac{i}2+\frac{1}3+\frac{i}4+\cdots\right)=^{\text {?}}\exp(-\pi/2)$$

According to WolframAlpha,  but I don't know how I can prove it.


I have implemented following classes:  public class Team - has a SortedMap<String, Player> as field. public class Player implements Comparator - has the method int compare(Object o1, Object o2)  Now, I want to have the Map always sorted when putting in String, Player.  How can I realize that, because the Comparator must work with the value Vand not with the key K. However, there is only a constructor with a Comparator of the key.  Thanks!  public class Player implements Comparator   @Override public int compare(Object o1, Object o2) {     if(o1.getClass() != o2.getClass()) return 0;     if(((int)((Player)o1).getName().charAt(0)) == ((int)((Player)o2).getName().charAt(0))) {         if(((Player)o1).getNumber() == ((Player)o2).getNumber()) {             return 0;         } else if(((Player)o1).getNumber() < ((Player)o2).getNumber()) return -1;         else return 1;     } else if(((int)((Player)o1).getName().charAt(0)) < ((int)((Player)o2).getName().charAt(0))) {         return -1;     } else return 1; }   The Team class:  public class Team {      private SortedMap<String,Player> team;      /**      * This is the default constructor without parameters. It initializes the team Map      */     public Team() {         team = new TreeMap(new Player(null, 0, 0));     }      /**      * This method adds a new Player to the team-Map      * @param player is the player to add to the team-Map      */     public void put(Player player) {         if(player != null) {            String name = player.getName();            team.put(name, player);         }     }

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I submitted a paper to Journal of Intelligent and Fuzzy Systems that uses the prosemanager submission system. The manuscript status has changed from "Awaiting Reviewer Assign" to "Awaiting Reviews(8 outstanding)".  And now "Awaiting Reviews(8 outstanding)" changes continuously to "Awaiting Reviews(7 outstanding)", "Awaiting Reviews(6 outstanding)", ..., "Awaiting Reviews(4 outstanding)" with time.   What does this change mean? What is the flow chart of the different statuses for a manuscript for this "Awaiting Reviews"?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


What does g(xs[:-2]) mean? def f(xs):     def g(ys):         return ys[::-1]          return [x-2+(2*7/4) for x in g(xs[:-2])]

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


already discusses the question but I did not understand the marked answer. It does not outright say whether a superconductor has zero resistance or not.   Do superconductors have exactly zero resistance, nearly zero resistance or does the concept of resistance as we know it break down when it comes to superconductors? Or is the question senseless because of experimental errors?

It is known that a superconductor is a material with electrical resistance zero. My question is, it is exactly zero, a theoretical zero, or for practical realistic reasons it is effectively zero?


I have been running 12.04 on a Virtual Box VM for some time.  It's my main development machine, so quite important.  The disk size is 8Gb.  Recently I started to get pop-up warnings about low disk space.  I cleaned up what I could and kept going.  The messages would stop for a while, then start again.  This morning my IDE (phpStorm) started complaining that it was out of disk space and could not save changes.  This seemed odd to me, since the alerts had just started again and were reporting that I had 200Mb left.  (In past days I have received alerts with less than 100Mb left, but have still operated OK).  Anyhow, I did some quick research and decided that I needed to resize the VM disk and then run GParted.  In preparation for this, however, I stopped the machine to make a clone of it.  Now, neither the clone or the original machine will boot.  They just hang with a cursor flicking in the top left.  I'm sure there are a number of ways to deal with this, but I'd like to get a handle on the options before I rush in.  Any ideas?

I have run out of space on my WinXP virtual machine, which I only gave 10 GB space for when I created it.  Is there an easy way to increase it to, say, 20 GB?  I can't see any obvious option in VirtualBox settings.    The suggestion below gives this error  wim@wim-ubuntu:/media/data/winxp_vm$ VBoxManage modifyhd wim.vdi --resize 20000 VBoxManage: error: Cannot register the hard disk '/media/data/winxp_vm/wim.vdi' {46284957-2c09-4e70-8a49-bfbe0f7f681d} because a hard disk '/home/wim/VirtualBox VMs/winxp_vm/wim.vdi' with UUID {46284957-2c09-4e70-8a49-bfbe0f7f681d} already exists VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp     Removing the .vdi from VirtualBox before calling VBoxManage command, then adding it back in, was successful.  But now I can't boot the virtual machine, I get this worrying screen:    By the way, it says FATAL: Could not read from the boot medium!  System halted.    The vdi must be reattached to the VM after VBoxManage command.  Further, the partition will need to be resized from WITHIN windows, because you will have this empty space:    I was able to resize the partition easily using a bit of freeware called .


My laptop has a button to run calculator, but each time I press it, it spawns a new process instead of focusing on an existing one. I've decided to write a small application to focus on calculator's window if it exists or spawn a new one.  #include "pch.h" #include <iostream> #include <Windows.h> #include <WtsApi32.h>  HWND find_top_window(DWORD pid) {     std::pair<HWND, DWORD> params = { 0, pid };      BOOL bResult = EnumWindows([](HWND hwnd, LPARAM lParam) -> BOOL     {         auto pParams = (std::pair<HWND, DWORD>*)(lParam);          DWORD processId;         if (GetWindowThreadProcessId(hwnd, &processId) && processId == pParams->second)         {             SetLastError(-1);             pParams->first = hwnd;             return FALSE;         }          return TRUE;     }, (LPARAM)&params);      if (!bResult && GetLastError() == -1 && params.first)     {         return params.first;     }      return 0; }  /// int main(int argc, char* argv[]) {     LPCWSTR szProcessName = TEXT("Calculator");     WTS_PROCESS_INFO* pWPIs = NULL;     DWORD dwProcCount = 0;      if (WTSEnumerateProcesses(WTS_CURRENT_SERVER_HANDLE, NULL, 1, &pWPIs, &dwProcCount))     {         for (DWORD i = 0; i < dwProcCount; i++)         {             if (wcsstr(pWPIs[i].pProcessName, szProcessName) != NULL)             {                 std::cout << "Found!\npid: " << pWPIs[i].ProcessId << "\n";                  HWND hWnd = find_top_window(pWPIs[i].ProcessId);                  std::cout << "hwnd:" << hWnd << "\n";                  if (hWnd != 0)                 {                     ShowWindow(hWnd, SW_SHOW);                     //ShowWindow(hWnd, SW_RESTORE);                 }                  break;             }         }     }      if (pWPIs)     {         WTSFreeMemory(pWPIs);         pWPIs = NULL;     }      return 0; }   For some reason, it fails to ShowWindow - window is not being shown. Need help on this one - I do not know why it fails.

I have an application which may only have one instance of itself open at a time.  To enforce this, I use this code:          System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses();         System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess();         foreach (System.Diagnostics.Process p in myProcesses)         {             if (p.ProcessName == me.ProcessName)                 if (p.Id != me.Id)                 {                     //if already running, abort this copy.                     return;                 }         }         //launch the application.         //...   It works fine. I would also like it to be able to focus the form of the already-running copy.  That is, before returning, I want to bring the other instance of this application into the foreground.  How do I do that?  Re: SetForeGroundWindow:  SetForeGroundWindow works, to a point:      [System.Runtime.InteropServices.DllImport("user32.dll")]     public static extern bool SetForegroundWindow(IntPtr hWnd);       //...                 if (p.Id != me.Id)                 {                     //if already running, focus it, and then abort this copy.                     SetForegroundWindow(p.MainWindowHandle);                     return;                 }     //...   This does bring the window to the foreground if it is not minimized.  Awesome. If the window IS minimized, however, it remains minimized.  It needs to un-minimize.  Solution via SwitchToThisWindow (Works!):      [System.Runtime.InteropServices.DllImport("user32.dll")]     public static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab);      [STAThread]     static void Main()     {         System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess();         System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcessesByName(me.ProcessName);         foreach (System.Diagnostics.Process p in myProcesses)         {             if (p.Id != me.Id)             {                 SwitchToThisWindow(p.MainWindowHandle, true);                 return;             }         }         //now go ahead and start our application ;-)


I submitted a paper to an Elsevier journal in mathematics, which is right now in "decision in process". The status changed in the following manner: Submitted to journal----(after 1 day)--->with Editor----(after 8 days)-->under review-----(after 15 days)-->decision in process. But there was an intermediate stage ("required reviews completed") between "under review" and "decision in process", which was not followed. What does this mean? Is it a bad sign?

We have submitted a paper to an  and now I want to know how much time each stage in article lifecycle take?  There is an  in Elsevier site which describes different status of a paper from submission to publication:   Submitted to Journal Editor Invited (Conditional - this step may not occurs) With Editor Under Review Required Reviews Complete Decision in Process Completed – Accept   It also noted that:     Please Note: Most journals aim to communicate decisions to authors within four months of the start of the review process. There are a number of factors that may influence the actual time taken, most notably the availability and responsiveness of the article's referees. In consequence, peer review times do vary per journal. During the peer review process your article will show a status of ‘Under Review’.   But our paper status is Technical Check In Progress. this status is not mentioned in Elsevier site! I'm confused about this statuses. and now after 40 days the status is still in that stage. I want an estimation about time of this steps to see if I should be concern or not.


Consider a $X_1, ... X_n \sim~ Poisson(\lambda)$, I want to obtain the UMVUE of $P_{\lambda} (X=r)$. This is my approach: $\operatorname{\mathbb{E}}_{\theta}[h(t)] = P_{\lambda} (X=r)$. The probability is dependent on $\lambda$ so I am inclined to find the conditional probability and proceed as $\operatorname{\mathbb{E}}_{\theta}[h(t)] = P(X=r, \lambda)/ P(\lambda)$. I am not sure if this is necessary but would appreciate some advice. Incorporating provided suggestions I get: $$\sum_{t=0}^{\infty} h(t) \lambda^t\exp(-t)/ t! = \lambda^r\exp(-r)/ r!$$ I will expand the RHS: $\lambda^r\exp(-r)/ r! = \lambda^r\sum_{n=0}^{\infty} (-r)^{n}/ n!r!$ But I am stuck.

Let $X_1,\ldots,X_n \sim$ Poisson$(\lambda)$. I wish to find UMVUE of $e^{-\lambda}$. Here $\overline{X}_n$ is complete and sufficient for $\lambda$ (hence for $e^{-\lambda}$??). Define $Y_i=1$ if $X_i=0,$ $Y_i=0$ otherwise. Clearly (I checked!) each $Y_i$ and hence $\overline{Y}_n$ is unbiased for $e^{-\lambda}$. Then I should be able to use the Lehmann Scheffe theorem to deduce the UMVUE. The estimator I get looks like $$\frac{1}{n} E\left\{\#X_i:X_i=0 \mid \sum_{i=1}^n X_i\right\}$$ whereas the correct answer is $$\left(\frac{n-1}{n}\right)^{\sum_{i=1}^n X_i}$$ I'd appreciate if anyone lets me know where I'm going wrong and guides me into the right path. Thank you.


So I have been doing webdesign or web development as a hobby for two years and recently I made a leap to make it a career and even went back to school for it. I've done two projects, one which fell through but I still have all the code I did for them. Another project I am doing and the website is live and running which is great I have some experience and schooling however...  I don't know where to go to make a portfolio and I am strapped for cash as I have enough to pay bills and make sure my kid is fed.   I know there are few website hosts but they are generally limited I found to let me actually show off my coding skills. But I am just starting out so I was wondering what do many of you recommend I do to start a portfolio? Use a free hosting? Or do I need to buy actual hosting?

I've been happily employed for awhile now, so I've not kept up on various trends and changes in the online portfolio field. I would like to remedy this knowledge gap.  I can do a search for "best online portfolio sites" but a search like that is a little  tainted by people who want you to buy their solution.   If you've made a portfolio site for yourself or a client, what are you using?  It seems to me that you can use a service like Behance (but are there other services that are equal or better in terms of features, ease of use, ads, etc.?), adapt a theme to a blog/CMS WordPress or Tumblr, or build something from scratch.  If it's necessary to narrow the scope of the question a bit, I'd say that the ideal portfolio site looks modern but not trendy, has a great user experience, and is easy to update. Preferably, it can be self-hosted, unless people have found that going on a dedicated social network is better.  It'd be interesting to hear answers from graphic designers who don't code a lot as well as web designers who do it for a living.


EDIT: This does not have to do with randomising numbers. When I tried doing that all I got back was numbers, and not my strings. Could someone at least explain how the Fisher-Yates-shuffle or what it was, would work in my case, if it does actually work for sentences-strings? Because I don't understand it.. I can't be the only one who doesn't understand it?  I have an array of strings that I want to randomise. I want three random strings, that aren't the same, but everything I find online is either for numbers or in another language. At the moment my strings are being randomised, but I sometimes get the same strings, so for example: "Behind a tree, behind a tree, behind a tree".   So it should be like randomHiding1 != randomHiding 2 && randomHiding3; (I know that's not "real code", but just so you get what I mean)   This is my first post here, so I hope this is ok to ask because I haven't been able to find anyone asking a question about randomising "sentences-strings", and not just "abcdefg...." or numbers. Here's my code. Thanks in advance!      Random random = new Random();      // strings with hiding spots         string[] hidingSpot = {             "in a ditch",             "up in a tree",             "behind a stone",             "in a hole in the ground",             "behind a tree",             "in the shadows" };          int hidingChoice1 = random.Next(hidingSpot.Length);         int hidingChoice2 = random.Next(hidingSpot.Length);         int hidingChoice3 = random.Next(hidingSpot.Length);          string randomHiding1 = hidingSpot[hidingChoice1];         string randomHiding2 = hidingSpot[hidingChoice2];         string randomHiding3 = hidingSpot[hidingChoice3];   BTW, I know this code is very bad, and unnecessarily long, but I'm still fairly new to arrays and lists and so my number 1 priority is to get code that works, not code that is short etc. So I don't need tips about reading the documentation, because I am doing that constantly, but I just have a hard time remember things atm due to personal reasons.. I hope that makes sense.

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


I recently find a limit that shows $\pi$:  $$\lim_{n\to \infty }\, 2^{n} \underbrace{\sqrt{2-\sqrt{2+\sqrt{2+\cdots +\sqrt{2}}}}}_n= \pi$$  The problem is that I cannot know what the limit says I talk about positive and negatives.With what order are they?

Wikipedia claims this but only cites an offline proof:  $$\lim_{n\to\infty} 2^n \sqrt{2-\sqrt{2+\cdots+ \sqrt 2}} = \pi$$  for $n$ square roots and one minus sign. The formula is not the "usual" one, like Taylor series or something like that, so I can't easily prove it. I wrote a little script to calculate it and it's clearly visible, but that's not a proof.


No matter which of the basemaps I use in QGIS (Open Map, Google Maps, Google Hybrid, Google Terrain & Streets) when I export as image or pdf the basemap is so faint that all the features are unreadable, even though in looks perfect in Layout View. Just want to get WYSIWYG.

I would like to compose a large format map for printing in QGIS with the highest detail possible.  My process looks like this,    Install "QuickMapServices" plugin Click the "QuickMapServices" button and choose OSM >> OSM Standard Pan to my selection area New print layout (ctrl + p) and make a name add item >> add map (its now at the zoom where I want more detail displayed and I don't know what to do).


I am not by any means a poetry expert, but I know a bit about grammar and writing. Ergo, I can say that in Dylan Thomas’s most famous poem, , the refrain that the poem takes its name from is ungrammatical. The grammatically correct way to write (or say) this would be “Do not go gently into that good night.” What I want to know is as follows:   a) Is there a historical usage of “gentle” as an adverb and b) if there isn’t, why did Thomas determine that it was okay to use an adjective adverbially? Or is there some poetry-grammar exception that I am unaware of?

Is this correct?     That is a real cool answer.   I learned that that was incorrect, since "real" is an adjective which can describe a noun, e.g. "real answer" but it is not an adverb which can describe an adjective, "real cool". Instead you would have to say:     That is a really cool answer.   Since "really" is an adverb.


I'm interested in physical theories taking the form of precise, unambiguous mathematical statements. What significant work has been done to axiomize physical theories? What is left to be done? The theories I'm referring to are:   Newtonian mechanics and its equivalents General relativity Classical electrodynamics (relativistic and otherwise) Whatever big theories of cosmology there are Quantum mechanics (I know von Neumann wrote about this subject) Statistical mechanics (though it might not be a single theory) Thermodynamics (as it might not all have been reducecd to statistical mechanics) The kinetic theory of gases (probably follows from another theory) Quantum mechanics Quantum field theory Quantum electrodynamics Quantum chromodynamics The standard model of particle physics Any big condensed matter theories

I'll write the question but I'm not fully confident of the premises I'm making here. I'm sorry if my proposal is too silly.   consisted roughly about finding axioms for physics (and it was proposed in $1900$). I guess that at the time, such thing was impossible due to the nature of physics which is mainly based on observations and models. But it seems that after Gödel's work on $1931$, the axioms which were seen as self-evident truths started to be seen as unprovable statements and the job of a mathematician is grossly about deriving theorems from these axioms.  So if this shift of axiomatic conception really happened, couldn't we just accept anything (including the physical observations) as axioms and reason about their consequences? Thus somehow solving Hilbert's sixth problem?


I would like to have \addfontfeature scoped around one word in the beginning of a paragraph. However, it turns out it breaks wrapfigure, which does all kinds of weird stuff in this case. Consider the following MWE:  \documentclass[12pt, a4paper]{scrbook}  \usepackage{tikz} \usepackage{wrapfig}  \begin{document}  \begin{wrapfigure}{l}{0pt}     \centering     \begin{tikzpicture}         \draw [thick, red] (0,0) circle [radius = 1.5cm];     \end{tikzpicture} \end{wrapfigure}  {Lorem} ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  \end{document}  The figure goes outside of the paper. I tried hiding {Lorem} inside a macro defined with \NewDocumentCommand, but with no success.

I am hunting a bug in my document in the context of the wrapfig package. For what it's worth, it seems that it fails miserably as soon as the main (i.e., non-wrapfig'ed) text starts with a non-empty group: The first paragraph runs over the figure, whereas all subsequent paragraphs exhibit the gap needed to fit the figure in.  Q: Am I doing something wrong?   \documentclass[12pt,a4paper]{article} \usepackage{lipsum} \usepackage{wrapfig} \newif\iffailmiserably  \failmiserablytrue % set this to false for comparison!  \begin{document} \begin{wrapfigure}{r}{0.33\textwidth} Just a little bit of text in the wrapfigure envoronment. A full lipsum paragraph would be too much. We don't want this to fill the page, after all. \end{wrapfigure}    \iffailmiserably{This} fails miserably. \else This {works fine.} \fi \lipsum \end{document}


Several systems rely on files without extensions but with the same file names, such as  which uses Vagrantfile to define a set of VM boxes.  I know how to set up file extentions to match languages in Notepad++, but these files have no extensions (and adding one almost always causes problems). Is there a way to get Notepad++ to recognize these files by their file name, and use the appropriate language upon opening?

Specifically, I want NPP to remember to use Ruby syntax highlighting whenever I open a Vagrantfile. These don't have an extension, and I tried adding "Vagrantfile" to the user extensions in the style configurator, but it did not work.  Anyone get this working?


What does Visualforce field component resolvable mean?  I tried to bind columns editor to a list of custom Apex class instances, and naturally ran into this error. Rather than taking the workaround and breaking this up into inputXXX's I would prefer to modify the class to make it VF friendly. However, nobody seems to know what "Visualforce field component resolvable" means.  Do I need to decorate the class? Add specific metadata methods? Any ideas?  This is NOT a duplicate question.  My question relates to the second part of the description provided by the error message, stating that inputfield needs SOQL objects OR Objects that are Visualforce field component resolvable, which is not covered by the other answer.  Example:  public class Item {     public Boolean Selected { get; set; }  }  public List<Item> Items;   VF  <apex:pageBlockTable value="{!Items}" var="item" >     <apex:column headerValue="Select" >         <apex:inputField value="{!item.Selected}" />     </apex:column> </apex:pageBlockTable>   Save error:  Could not resolve the entity from  value binding '{!item.Selected}'.   can only be used with SObjects, or objects that are Visualforce field component resolvable.  To reiterate again, I know that inputField works with SOQL, what I want to know about is the meaning and implementation of the second part of the error message. How can one go about making a custom class VF inputField friendly.

I am trying to create a custom visualforce page that saves new opportunity contact roles to an opportunity. I am having trouble creating the first step of listing out all contacts that relate to that account. The error I am getting is...     Save error: Could not resolve the entity from  value binding '{!u.contact}'.   can only be used with SObjects, or objects that are Visualforce field component resolvable.   I do not understand why I am receiving this error. u.contact should resolve to a Contact object, which is an sObject. Am I misunderstanding something?  Here is my code...  Controller  public class ChooseContactController  {     public String accountId = ApexPages.currentPage().getParameters().get('accountId');     public Account account { get; set; }     public List<UnfundedOpportunityContactRole> unfundedOpportunityContactRoles { get; set; }      public ChooseContactController()      {          unfundedOpportunityContactRoles = new List<UnfundedOpportunityContactRole>();         List<Contact> contacts = [SELECT Id, Name FROM Contact WHERE AccountId =: accountId];         account = [SELECT Id, Name FROM Account WHERE Id =: accountId];          for(Contact c: contacts)          {             unfundedOpportunityContactRoles.add(new UnfundedOpportunityContactRole(c, 'The Man'));         }     }      public void Save() {}     public void Create() {}      public class UnfundedOpportunityContactRole     {         public Contact contact { get; set; }         public String role { get; set; }          public UnfundedOpportunityContactRole() { }          public UnfundedOpportunityContactRole(Contact contactParam, String roleParam)         {             this.contact = contactParam;             this.role = roleParam;         }     } }   VF page  <apex:page controller="ChooseContactController">   <apex:form >     <apex:pageBlock title="Choose a contact" mode="edit">       <apex:pageBlockButtons >         <apex:commandButton action="{!create}" value="New"/>         <apex:commandButton action="{!save}" value="Save"/>       </apex:pageBlockButtons>         <apex:pageBlockSection title="{!account.Name}">           <apex:dataTable value="{!unfundedOpportunityContactRoles}" var="u">             <apex:column headerValue="Contact">               <apex:inputField value="{!u.contact}" />             </apex:column>             <apex:column headerValue="Role">               <apex:inputField value="{!u.role}" />             </apex:column>           </apex:dataTable>         </apex:pageBlockSection>     </apex:pageBlock>   </apex:form> </apex:page>


If I would show someone a yellow object and ask them, "is this object yellow?"  That person would say "yes".  But I could never know if my perception of the color yellow is the same as that other person's. Because he or she could actually be seeing, what I know to be the color green. But then tells me that its the color yellow because that has been taught to him or her from young age.  So how can you test if people are really seeing the same color? (originally posted this question on physics.stackexchange but was advised to try it here)

How do our brains actually transform the information that the cones in our eyes  receive into the different colors that we can see and imagine?


How can I remove the two copies of OneDrive in the File Explorer? I'd like to avoid registry hacks, as I don't want to brick my new laptop. It is a small bug and troublesome, but it's very annoying.

I've installed windows 10 on a new pc, with a secondary hard disk containing my onedrive folder, taken from my old pc. I've configured onedrive in order to use that folder, and it's working fine.  The problem is that when I open Explorer I can see two onedrive icons on the sidebar, both of them pointing at the same folder.  How can I remove the duplicated onedrive entry from the sidebar?


I'm wondering about current efforts to provide mathematical foundations and more solid definition for quantum field theories. I am aware of such efforts in the context of the simpler topological or conformal field theories, and of older approaches such as algebraic QFT, and the classic works of Wightman, Streater, etc. etc . I am more interested in more current approaches, in particular such approaches that incorporate the modern understanding of the subject, based on the renormalization group. I know such approaches exists and have had occasions to hear interesting things about them, I'd be interested in a brief overview of what's out there, and perhaps some references.  Edit: Thanks for all the references and the answers, lots of food for thought! As followup: it seems to me that much of that is concerned with formalizing perturbative QFT, which inherits its structure from the free theory, and looking at various interesting patterns and structures which appear in perturbation theory. All of which is interesting, but in addition I am wondering about attempts to define QFT non-perturbatively, by formalizing the way physicists think about QFT (in which the RNG is the basic object, rather than a technical tool). I appreciate this is a vague question, thanks everyone for the help.

Quantum field theory is a broad subject and has the reputation of using methods which are mathematically desiring. For example working with and subtracting infinities or the use of path integrals, which in general have no mathematical meaning (at least not yet) ect. My question is a little vague, but i am interested in hearing what is the status of rigor in QFT. What is known to be mathematically rigorous and consistent, what is known to be not rigorous? Any examples and references are welcome.   Added: Just to clarify by rigorous I meant anything that a mathematician would find satisfactory. Also my question wasn't for books with rigorous (in some sense) approach, although that was welcomed. It was about specific examples of what is considered mathematically satisfactory and what not. For example the quantization of free fields satisfying the Klein-Gordon equation can be done rigorously. There is no mathematical definition in general of the Feynman path integral and so on.


I'm new to Java and trying to get this program to close the input section but when entering 0 as intended, the loop continues rather than closing and printing the ArrayList. Can you help me figure out what I'm not getting here? package csc320.programming.i; import java.util.ArrayList; import java.util.Scanner; public class MPG {     public static void main(String[] args) {         Boolean close = false;         ArrayList<String> vMake = new ArrayList<String>();         ArrayList<String> vModel = new ArrayList<String>();         ArrayList<String> vYear = new ArrayList<String>();         ArrayList<String> startODO = new ArrayList<String>();         ArrayList<String> endODO = new ArrayList<String>();              Scanner scnr = new Scanner(System.in);                  System.out.println("Press 0 and enter to close the program");         System.out.println("Enter Vehicle Make: ");         String answer = scnr.nextLine();         if (answer == "0") {             close = true;             System.out.println("Program closed");         }         else {             vMake.add(answer);                          do {                 System.out.println("Enter Vehicle Model: ");                 answer = scnr.nextLine();                 vModel.add(answer);                 System.out.println("Enter Vehicle Year: ");                 answer = scnr.nextLine();                 vYear.add(answer);                       System.out.println("Enter Vehicle Starting Odometer: ");                 answer = scnr.nextLine();                 startODO.add(answer);                    System.out.println("Enter Vehicle Ending Odometer: ");                 answer = scnr.nextLine();                 endODO.add(answer);                                   }while (answer != "0");                      }            System.out.println("Vehicle Inventory:");         System.out.println(vMake + " " + vModel + " " + vYear);         System.out.println(startODO + " " + endODO);         scnr.close();     } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I've got a couple of little bonuses of gold at some random occasions when I got things like 100 victories or so.  Thing is, it's written nowhere what are those acheivements are and at how much % they are completed.  Is there any way to know what are those "acheivements" are and track the completion of them?

In Hearthstone you can unlock some gold bonus or whatever if you reach specific goals like reaching level 10 with all characters. I am not talking about the daily quests here.  Does anyone have a complete list of all the bonuses?


I have seemingly simple and straightforward segment of code that is a simplified version of a problem I have been having in a game I am writing.  I am trying to set a static field in one class to another value from my main method.  However this code will not and I don't understand why.    I get the error      1>Source.obj : error LNK2001: unresolved external symbol "public:   static class A * B::a" (?a@B@@2PAVA@@A)   class A { public:     A()     {      } };  class B { public:     static A* a; };  int main() {     B::a = new A; }   What is the rule saying that I have to define my static class member outside the class to get it linked?

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


Today, my visa application was refused from the Embassy of Spain, India. The reasons they mentioned are:   Justification for the purpose and conditions of the intended stay was not provided.   You have not provided proof of sufficient means of subsistence, for the duration of the intended stay or for the return to the country of origin or residence, or for the transit to a third country into which you are certain to be admitted, or you are not in a position to acquire such means lawfully.   Your intention to leave the territory of the Member States before the expiry of the visa could not be ascertained.    My questions are:    How can they say this while I have provided them with not only necessary financial documents, but also the letter of intent and return ticket of flight and proof of prepaid accommodations?   Please tell me how much money they like to see in one's account before granting a visa?   How can I overcome this sort of problems?

Schengen refusal formulae can be difficult to understand sometimes.    When an applicant receives a refusal with "Justification for the purpose and conditions of the intended stay was not provided", what does it mean?


I installed Ubuntu 14.04.30 LTS using a USB stick. I didn't dual boot my pc, I deleted my old OS. I can't find Enable Wireless in the network menu. The output for rfkill   ---------------------------------- rfkill list all 0: hci0: Bluetooth          Soft blocked: no         Hard blocked: no -----------------------------------   The output for lshw -c network  *-network       description: Network controller       product: BCM4312 802.11b/g LP-PHY       vendor: Broadcom Corporation        physical id: 0       bus info: pci@0000:03:00.0       version: 01       width: 64 bits       clock: 33MHz       capabilities: bus_master cap_list       configuration: driver=b43-pci-bridge latency=0       resources: irq:18 memory:99700000-99703fff *- network        description: Ethernet interface        product: RTL1801E/RTL8102E PCI Express Fast Ethernet controller        vendor: Related Semiconductor Co., Ltd.       physical id: 0       bus info: pci@0000:04:00.0       logical name: eth0       version: 02       serial: 00:1e:ec:a1:73:dd       size: 10Mbit/s       capacity: 100Mbit/s       width: 64 bits       clock: 33MHz       capabilities: bus_master cap_list rom Ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation   I am new to Linux and have no idea what to do. I can see the WiFi symbol at the top right corner of the screen. But its blank. When I click on it I can see that Enable Networking is checked. The other options are Edit connections & VPN connections. I don't have access to internet. Can't use Ethernet as a WiFi network is all I can access. I have just downloaded Ubuntu 14.04.3 and haven't installed any drivers or packages

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have two questions, each of which I think might be related to each other but I'm not sure. Both concern the definition of variance as:     $var(x) = s_x^2 = \dfrac{1}{n-1}  \sum_{i=1}^{n}(x_i - \bar{x})^2$   (1) How do we prove that $\sum_{i=1}^{n}(x_i - \bar{x}) = 0$? I can see that this is true using a few examples but I'm unsure how to do a general proof.  (2) In this definition, what is the conceptual motivation for having the squared difference squared, as opposed to cubed or some other exponent?

In the definition of standard deviation, why do we have to square the difference from the mean to get the mean (E) and take the square root back at the end? Can't we just simply take the absolute value of the difference instead and get the expected value (mean) of those, and wouldn't that also show the variation of the data? The number is going to be different from square method (the absolute-value method will be smaller), but it should still show the spread of data. Anybody know why we take this square approach as a standard?  The definition of standard deviation:  $\sigma = \sqrt{E\left[\left(X - \mu\right)^2\right]}.$   Can't we just take the absolute value instead and still be a good measurement?  $\sigma = E\left[|X - \mu|\right]$


As the title states, why does Stack Exchange (SE) have Stack Overflow (SO) its' own domain, and yet everything else is just sub-domains under SE?  Is it because SO came first, and then SE was a product of that?  Just curious...

I've found a strange thing: some Stack Exchange sites have their own domain names instead of https://[site name].stackexchange.com. The websites which have their own domain names are:          Are there any parameters for allocating specific URLs to Stack Exchange sites?


I try to delete this file on my solaris machine  rm "-Insi"  rm: illegal option -- I rm: illegal option -- n rm: illegal option -- s   I also try this   rm "\-Insi"   -Insi: No such file or directory    rm '\-Insi'   -Insi: No such file or directory   so what other option do I have?

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


I've read the answers (and linked notes) to another question () and I understand them.  They seem to explain how to organise a perturbative calculation of the solution to a classical non-linear ODE by drawing diagrams which look a bit like Feynman diagrams.  But it is not clear to me how these diagrams correspond to actual Feynman diagrams.  In QFT, when Feynman diagrams are used when doing path integrals (to calculate correlation functions etc.) but not to solve for the fields.  What does the tree-level expansion of a correlation function mean and what is its classical interpretation?

It is well known that scattering cross-sections computed at tree level correspond to cross-sections in the classical theory. For example the tree level cross-section for electron-electron scattering in QED corresponds to scattering of classical point charges. The naive explanation for this is that the power of $\hbar$ in a term of the perturbative expansion is the number of loops in the diagram.  However, it is not clear to me how to state this correspondence in general. In the above example the classical theory regards electrons as particles and photons as a field. This seems arbitrary. Moreover, if we consider for example $\phi^4$ theory than the interaction of the $phi$-quanta is mediated by nothing except the $phi$-field itself. What is the corresponding classical theory? Does it contain both $phi$-particles and a $phi$-field?  Also, does this correspondence extend to anything besides scattering theory?  Summing up, my question is:     What is the precise statement of the correspondence between tree-level QFT and behavior of classical fields and particles?


I have a Gigabyte motherboard. GA-Z77X-UD3H to be specific.  I recently installed Ubuntu and deleted it again, but it still shows up on the UEFI boot option even if I removed all hard drives connected to the motherboard.   So NO hard drives, even CD/DVDs, USB drives connected and I still see the Ubuntu boot option. Any ideas/suggestions?

See this   I have this on my Lenovo s205 too.   Is there some way to remove "ubuntu" from the menu? I don't even have it installed anymore.


I made a map including 3 levels of zoom as shown in the screenshot. The problem is that whenever I save the map to a PDF, the layout of these maps is changed seemingly random.     I have a hunch that it has to do something with 'Lock layers' or 'Lock styles for layers' functions, but they don't really seem to work. Right now, I have the lock layers box checked on all maps and Lock styles for layers unchecked.

I'm having trouble with the OpenLayers Plugin of Qgis and the map composer:  If I create an OSM-background layer and if I want to export this, the OSM-Layer looks perfectly all right in the normal qgis program window. But in the map composer and after export the layer has shifted relatively to my other shape layers (EPSG:32633 - WGS 84 / UTM zone 33N).  The second thing is that the output resolution of the exported osm-layer is very, very poor.   A really bad way of getting around this whole trouble would be to increase the screen resolution and make a screenshot of the map composition window of qgis. But I don't think this would be very professional. It also would cause a lot of pain :)   I'm using Qgis 1.8.0-Lisboa under Linux. The openlayers plugin is version 0.92.


I have a problem receiving a value from a void method  For example:  test() {     var x = this.test2("hi there");     console.log(x); }  test2(data){     return data; }   I want to receive the data from test2 but it keep saying undefined what do I do wrong in here? And how can I make this work?  It is probably so basic but I just want to know why I receive the value undefined

I just came across an interesting situation in JavaScript.  I have a class with a method that defines several objects using object-literal notation.  Inside those objects, the this pointer is being used.  From the behavior of the program, I have deduced that the this pointer is referring to the class on which the method was invoked, and not the object being created by the literal.    This seems arbitrary, though it is the way I would expect it to work.  Is this defined behavior?  Is it cross-browser safe?  Is there any reasoning underlying why it is the way it is beyond "the spec says so" (for instance, is it a consequence of some broader design decision/philosophy)?  Pared-down code example:  // inside class definition, itself an object literal, we have this function: onRender: function() {      this.menuItems = this.menuItems.concat([         {             text: 'Group by Module',             rptletdiv: this         },         {             text: 'Group by Status',             rptletdiv: this         }]);     // etc }


Recently, I tried to install some themes on my laptop, running Ubuntu 18.04. While following the steps provided online, I am met with some error messages for a couple of themes. There are as follows:  E: The repository 'http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_18.04  Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/ravefinity-project/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A7D1D38BEB6D886 E: The repository 'http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04  Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   Please advise. Thank you so much.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Show that there do not exist any non-trivial integer solutions of $x^4+y^4=z^2$   This was asked in a number theory test, so I tried showing that there can't exist any Pythagorean Triple of the form $(x^2, y^2, z)$ and using possible congruence modulos with $3, 4, 5$ etc. but every time I get some case that remains to be disproved. Any help or hint is appreciated.

I need solution check to see if I overlooked something:  If $x^4+y^4=z^2$ has an integer solution then $(\frac{x}{y})^4+1=(\frac{z}{y^2})^2$ has a solution in rationals.   Second equation is equivalent to $X^4+1=Y^2$ which can be written as cubic Weierstrass form $$v^2=u^3-4u$$ where $u=\frac{2(Y+1)}{X^2}$ and $v=\frac{4(Y+1)}{X^3}$.  By using SAGE we can see that Mordell-Weil group of this elliptic curve is empty (SAGE returns empty set, but I'm not sure if that is enough to conclude this), so we can conclude that there are no rational solutions to the second equation and no integer solution to the first one.   edit: No integer solution in positive integers.