I've designed a PCB for small scale production; currently I'm hand soldering them in batches of 20 at a time. This PCB uses an ATMEGA168 microcontroller which I program before soldering to the board - this method works well for me at the moment.  I'm looking at having a batch of 200 boards manufactured and assembled for me as the product I've designed seems to be quite popular. Would it be better practice to either include an ICSP header onto the board or keep on pre-programming the ICs myself? Re-programming of the board after manufacture or assembly isn't an intended or required feature.  I'm unsure of how this is done in a larger scale production environment? Adding an ICSP header would increase the cost of manufacture slightly so is pre-programming a standard practice?


Is there a way to reorder labels in Gmail? There is one specific label I need to access more than the others and I would like it at the top.   I'm using Airmail 2 as my local IMAP client connected to my email running on Google Apps for Work.


What are the consequences of leaving the fridge door cracked open overnight?

My girlfriend accidentally didn't close the fridge properly and left it open 2 inches all night (more than 8 hours). I had a lot of raw chicken breast and raw salmon in there. Is it still edible? When I touched the meat, it was slightly colder than room temperature (21 C).  The back part of the meat was still a bit cold though because it was closer to the back of the fridge.  Is it edible?


Audio is working, but the speaker test doesn't work

I've installed Ubuntu 12.04 LTS from a minimal cd on a netbook (Asus 1001 PXD). I've installed the ubuntu-desktop package using the --no-install-recommends option.  Everything works fine, except the "sound test" for headphones or analog speakers.  Clicking on the "test" buttons (front left and front right) I don't hear any sound. Despite this, the audio is working properly.  I've checked the audio levels with alsamixer; I have also checked that the test sounds actually exist in /usr/share/sounds/alsa.  I tried an installation of Ubuntu 12.04 LTS made with the desktop-cd, and in this case the speaker test works properly.  I suppose, therefore, that the problem could depend on the lack of a package, but I have not identified which one.


Which type of markdown is Stack Overflow using?

Precisely which type of markdown (afaik there are quite a few variants) and editor (the one I am typing in right now) is Stack Overflow using?  I understand, there must be a JavaScript realtime implementation (which shows me the preview below). Where could I get that?  I hope there's also a PHP implementation, so I can turn markdown into HTML in the backend?  Ultimately I want to turn a very proprietary wordpress theme into being markdown based, since I find this the exact right balance between complexity and ease of use. Many 'wiki syntaxes' are in my opinion off to one side or the other.


Change name of em1 to eth0 in Fedora 19?

I have already followed the instructions  but it doesn't seem to work, as my ifconfig output still shows the same "em1","em2" and "lo". I just need a way to rename one of these to eth0 in Fedora 19, since other methods dont seem to work. Matlab needs eth0 to activate, and I am stuck.


XFCE Always Open Certain Types of Windows on the Same Workspace

Is there a way in XFCE to ensure that every time a certain type of window opens, it goes to a specified workspace? For instance, every time a ffplay window opens, I would like it to open on workspace 4, no matter what the active workspace is.


How do I only display the base dir in my Ubuntu Terminal?

In Ubuntu 10.04 Terminal when I traverse into some long directory structure the entire path gets displayed, this leads to lot of space wastage on my terminal, where the cursor comes way over to the right. It's causing lot of Irritation. Any way to just display the base dir.   Currently -  ops@ops:/media/Main320/final_code/code/office/c/practice/parsers/proj1$   Need - ops@ops:~/proj1$  I am sure it's some config change or some profile preferences change. Any one...


Can bought Android apps be shared between devices you own?

On the iPod Touch/iPhone, since it is tied to your iTunes account, I am quite sure you can have your bought apps on multiple devices you own (can't test though, iPod Touch was stolen).  However, now I have the Motorola Droid, and am waiting for a tablet, and am considering getting a Nook and rooting it to run my own apps.  Question is, if you buy an app on the marketplace, how is the security done:   Is it tied to your Gmail account so you can share it between devices you own? Is it tied to the device? (Don't break/replace your phone!) As long as it's installed, you're OK? (If you uninstall, or wipe your device, it's gone).   I assume 3 is highly unlikely, though a possibility, so leaving it here as a potential answer to my question.


Difference between luatex and lualatex binaries

I installed MacTeX Basic on my laptop (OS X 10.10), and I got 2 binaries, luatex and lualatex. Those 2 binaries behave totally differently (lualatex is able to parse \documentclass, the other is not), even though lualatex seems to be a symbolic link to luatex...  ○ which luatex /usr/texbin/luatex ○ which lualatex /usr/texbin/lualatex ○ ls -al /usr/texbin/lualatex lrwxr-xr-x 1 bastien wheel 6 Nov 24 15:01 /usr/texbin/lualatex -> luatex   What am I not understanding here?  In addition I try to run LaTeX on a server (Debian 7.6), and I installed texlive-luatex there, but I only got the luatex binary, hence I can't process LaTeX files...


NullPointerException when using interface to transfer the result from AsyncTask to MainActivity

In my AsyncTask, I have doInBackground return an arrayof Movie objects. After searching on how to achieve that, I found  and implemented the solution suggested by the marked answer. The only difference is that as oppose to running the AsyncTask in my onCreate method in the MainActivity, I have the AsyncTask running in the onOptionsItemSelected method in MainActivity.   I was not quite certain solution meant in his implementation of the processFinish method, so I implemented mine like so ( in MainActivity). The list_of_movies variable is a global variable that I intend to pass into a GridView later.   @Override public void processFinish(Movie[] movies){     for(int i = 0; i < movies.length; i++){         list_of_movies[i] = movies[i];     } }   To check that I actually have all the movie objects within list_of_movies, I did a quick loop of Log after I execute the AsyncTask in my onOptionsItemsSelected  public boolean onOptionsItemSelected(MenuItem item) {     int id = item.getItemId();      if (id == R.id.action_popular) {         FetchMovieTask movieTask = new FetchMovieTask();         movieTask.delegate = this;         movieTask.execute("popular");          for(int i = 0; i < list_of_movies.length; i++){             Log.v("Loop Logging", list_of_movies[i].getTitle());         }          return true;     }      return super.onOptionsItemSelected(item); }   Which returns me a java.lang.NullPointerException  I've tried the following  1) I thought maybe I was not allow to call this operation within onOptionsItemSelected, so I tried the same operation in onCreate instead. Also the same error  2) I simply set list_of_movies = movies in the processFinish method, but that does not work either  What am I doing wrong here?   I thought maybe it's because I added the public to the processFinish method, but without public Android Studio would not let me compile due to some clashing issues. Another theory is that list_of_movies is pointing at nothing, but I thought that's the whole point of using interfaces to transfer the Movie[].   Sorry if I'm simply misunderstanding some fundamental concepts of Android, just started learning a few weeks ago. Thanks.


How to generate for loop number sequence by using variable names in bash?

Could anybody explain how can I use variable names in bash for loop to generate a sequence of numbers?   for year in {1990..1997} do   echo ${year} done   Results:  1990 1991 1992 1993 1994 1995 1996 1997  However  year_start=1990 year_end=1997 for year in {${year_start}..${year_end}} do   echo ${year} done   Results:  {1990..1997}  How can I make the second case work? otherwise I have to write tedious while loops. Thanks very much.


In Python you can use  for a file-like buffer for character data.  basically does similar thing for binary data, but it requires a file that is used as the basis. Does Python have a file object that is intended for binary data and is memory only, equivalent to Java's ?  The use-case I have is I want to create a ZIP file in memory, and  requires a file-like object.


Regular expression that doesn't contain certain string

I have something like this     aabbabcaabda   for selecting minimal group wrapped by a I have this /a([^a]*)a/ which works just fine  But i have problem with groups wrapped by aa, where I'd need something like  /aa([^aa]*)aa/ which doesn't work, and I can't use the first one like /aa([^a]*)aa/, because it would end on first occurence of a, which I don't want.  Generally, is there any way, how to say not contains string in the same way that I can say not contains character with [^a]?  Simply said, I need aa followed by any character except sequence aa and then ends with aa


Determining PCA scores for a new data point

I have done a principal component analysis (PCA) on a dataset (using prcomp in R) and now I want to determine what the principle component scores would be for a new sample(s). How can I do this?   I'm sure the information is encoded somewhere in the prcomp output, but I can't figure out which table, how to tie it back to a function, and I'm sure someone has already devised a command to do this (which I can't find).


Let $f : \mathbb{R} \to \mathbb{R}$ be a function which is differentiable everywhere on $\mathbb{R}$. If we know that  $$\lim_{x\to-\infty}f(x) = L = \lim_{x\to\infty}f(x)$$ How would one go about showing that there must exist $c \in \mathbb{R}$, such that $f'(c) = 0$ for all cases at once?


Is the strong topology on $B(H)$ first countable?

Let $H$ be a separable Hilbert space and consider the strong operator topology (SOT) on $B(H)$, that is the topology on $B(H)$ generated by the seminorms $$p_x: u \mapsto \Vert ux \Vert, \quad x\in H$$ Is this topology first countable? Attempt: It suffices to find a countable neighborhood basis of $0$. Let $(x_n)_n$ be a dense sequence of $H$. Then I believe the topology generated by $$u \mapsto \Vert u x_n \Vert, \quad n \geq 1$$ agrees with SOT. Hence, the collection $$\left\{\bigcap_{i=1}^k p_{x_{n_i}}^{-1}([0, \epsilon[): k \geq 1; n_1, \dots, n_k \geq 1, \epsilon \in \Bbb{Q}\cap(0, \infty) \right\}$$ is a countable basis of $0$ of $SOT$. Is the above proof outline correct? EDIT: This question was accidentally closed by a misunderstanding. Please read the comments and reopen the question. Thanks!


I want to show given that $f:\mathbb{C} \to \mathbb{C}$ is holomorphic then  $g(z)=\overline{f(\overline{z})}$ is also holomorphic. I used the definition of the derivative to write $$g'(z_0)=\lim_{z\to z_0} \frac{\overline{f(\overline{z})}-\overline{f(\overline{z}_0)}}{z-z_0}=\lim_{z\to z_0}\frac{f(\overline{z})-f(\overline{z}_0)}{\overline{z}-\overline{z}_0}.$$ Now I argue that conjugation is continuous so if $z\to z_0$ then $\overline{z}\to \overline{z}_0$, does this mean $g'(z_0)=f'(\overline{z}_0)$?   Since $f$ is differentiable on an open set $U$ then $g$ would be differentiable for $\overline{z}_0\in U$ and also holomorphic.


Implementation logic behind adding two numbers without using +?

I found this code online. But, I am unable to get the logic behind the following code:  public static int add(int a, int b) {     if (b == 0) return a;     int sum = a ^ b; // add without carrying     System.out.println("sum is : "+sum);     int carry = (a & b) << 1; // carry, but don’t add     return add(sum, carry); // recurse }


In the dungeon there are spike balls that are annoying! Can I destroy the blocks around it for it to be gone?


Super-fast growing function exceeding Graham's number

If we define $G_0 = 10^{100}$, and $G_n = 10^{G_{n-1}}$ (hence $G_0$ is a googol, $G_1$ is a googolplex, $G_2$ is a googolplexian), for what first value of n will $G_n$ exceed Graham's number?


Google Cloud frequently doesn't have enough resources

This is a  about a temporary shortage of available resources in Google Cloud services.   I'm a Brazilian user of Google Cloud's Compute Engine for a while and I managed to use it fine for quite some months. Unfortunately, in the last one month or so, I've been facing difficulties starting my instances (around 9 AM) due to the problem "the zone does not have enough resources available to fulfill the request".    At the start, it happened once or twice and then I was able to start my instance. But now it's almost impossible to start it even after dozens of attempts! Following the message's suggestion, I tried to create other instances in southamerica-east1-a nd c (mine was in b) only to find out the same problem happening there. The impression I get from this is that Google has saturated their physical capacities in South America and are doing nothing to increase it.  So what can I do about it? I can't move my server to the USA or something because it's ping sensitive (stock market applications) and, as someone still using the free trial period, I certainly won't start paying for GC if Google may handle me a product I can't use and will take weeks or months to fix.


I have a Schedulable class which is scheduled to execute every night at 12:00 AM.  Here is my class:  public class appdevDailySnapShot implements Schedulable{     public List<App_Dev__c> ac {set;get;}         public void execute(SchedulableContext con){         List<App_Dev_Log__c> lstADL = new List<App_Dev_Log__c>();         try         {                           ac=[select Name,Assigned_To__c,Category__c,Completed_date__c,Effort_Hrs__c,Environment__c,Expected_QA_Date__c,In_Progress_Date__c,Old_Create_Date__c,Old_Request__c,On_Hold_date__c,Priority__c,Production_Release_Date__c,Project__c,Ready_for_Production_Release__c,Released_in_QA_Date__c,Released_in_UAT_date__c,Requested_QA_Release_Date__c,Status__c,SVN_update__c,Type__c,Unit_testing_DEV__c,Verified_in_Production__c,Verified_in_QA_Date__c,Verified_in_UAT_date__c from App_Dev__c];                         for(App_Dev__c adc : ac)             {                 App_Dev_Log__c AL = new App_Dev_Log__c();                 AL.AD_Request_No__c = adc.Name;                 AL.Assigned_To__c = adc.Assigned_To__c;                 AL.Category__c = adc.Category__c;                 AL.Completed_date__c = adc.Completed_date__c;                 AL.Effort_Hrs__c = adc.Effort_Hrs__c;                 AL.Environment__c = adc.Environment__c;                 AL.Expected_QA_Date__c = adc.Expected_QA_Date__c;                 AL.In_Progress_Date__c = adc.In_Progress_Date__c;                 AL.Old_Create_Date__c = adc.Old_Create_Date__c;                 AL.Old_Request__c = adc.Old_Request__c;                 AL.On_Hold_date__c = adc.On_Hold_date__c;                 AL.Priority__c = adc.Priority__c;                 AL.Production_Release_Date__c = adc.Production_Release_Date__c;                 AL.Project__c = adc.Project__c;                 AL.Ready_for_Production_Release__c = adc.Ready_for_Production_Release__c;                 AL.Released_in_QA_Date__c = adc.Released_in_QA_Date__c;                 AL.Released_in_UAT_date__c = adc.Released_in_UAT_date__c;                 AL.Requested_QA_Release_Date__c = adc.Requested_QA_Release_Date__c;                 AL.Status__c = adc.Status__c;                 AL.SVN_update__c = adc.SVN_update__c;                 AL.Type__c = adc.Type__c;                 AL.Unit_testing_DEV__c = adc.Unit_testing_DEV__c;                 AL.Verified_in_Production__c = adc.Verified_in_Production__c;                 AL.Verified_in_QA_Date__c = adc.Verified_in_QA_Date__c;                 AL.Verified_in_UAT_date__c = adc.Verified_in_UAT_date__c;                 AL.Snapshot_Date__c = date.today();                 AL.Snapshot_Time__c = datetime.now();                 lstADL.add(AL);             }                     insert(lstADL);         }         catch(Exception pEx){             System.debug('**** Exception Inserting in APP_DEV_Log ****');             System.debug(pEx.getMessage());         }         finally{             lstADL.clear();             lstADL = null;         }     }    }   Here is my test class:  @istest public class appdevDailySnapShot_Test {     static testMethod void testSample1(){         Test.startTest();         Datetime dt2 = Datetime.now().addMinutes(1);         String CRON_EXP2 = '0 '+ dt2.minute() + ' * ' + dt2.day() + ' ' + dt2.month() + ' ? ' + dt2.year();         Id jobId = System.schedule('AppDev Daily Snapshot - Test1', CRON_EXP2, new appdevDailySnapShot());         Test.stopTest();         System.assert(jobId != null);     }     static testMethod void testSample2() {         Test.startTest();         Datetime dt = Datetime.now().addMinutes(1);         appdevDailySnapShot aObj = new appdevDailySnapShot();         String CRON_EXP = '0 '+ dt.minute() + ' * ' + dt.day() + ' ' + dt.month() + ' ? ' + dt.year();         String jobId = System.schedule('AppDev Daily Snapshot - Test2', CRON_EXP, aObj);            Test.stopTest();     } }    My code coverage is 22%.


Help me understand how to apply a beta-binomial model in order to estimate a parameter when there are several Bernoulli trials?

So, I have been presented with this question: A sample of 100 people were asked how many days they drove their car during the last week (inc. the weekend). The resulting frequency of response is shown below: Days, frequency 0, 1 1, 5 2, 3 3, 15 4, 20 5, 25 6, 31 7, 0 I need to use a beta-binomial model in order to estimate the average number of 'car driven' days a week for a uniform prior. There are a total of 7 Bernoulli trials, each with success probability p. I'm incredibly confused at what the outcome will be. I know that for a uniform prior that alpha = 1, and beta = 1, but I don't know how to apply this all to get the average? Thank you.


I tried taking photo of the moon and this is what I got with first try:    I was on Spot metering, ISO 64, f2.8 and focal length 200mm on a FX camera. The problem is it is a lonely moon! I want some trees, leaves, etc... in the foreground too but everything else was so dark I had to just crop the moon.  So my question is how I take a picture of the moon with some visible foreground elements in it? not just the moon alone.


The polynomial $ax^2+bx+c$ satisfies: $a>0, a+b+c \ge 0, a-b+c \ge 0, a-c \ge 0$ and $b^2-4ac \ge 0$. Prove that the roots are real and that they belong to the interval $-1 \le x \le 1$    I started proving it this way: Here it is stated $b^2 - 4ac \ge 0$, therefore, the roots are real.    Now the roots are: $ -\frac{b}{2a} \pm \frac{\sqrt{b^2-4ac}}{2a}$    From the inequalities $a-b+c \ge 0$ and $a-c\ge0$, we get $2a\ge b$ Therefore, $-\frac{b}{2a}\ge-1$ and $b \ge a \Rightarrow b > 0$ Now I can see the other part of the root can be also shown to be greater than or equal 1. For that, I'll have to prove $4a^2\ge b^2-4ac$ Squaring both sides of  $2a\ge b$, I get $4a^2\ge b^2$ And from inequality $a-c \ge 0$ we get $a \ge c \Rightarrow 4a^2 \ge 4ac$ I don't know how to proceed from here. Is this the correct approach to prove it? If not, then how should I prove the statement?


For each positive integer $n$, let $x_n=1/(n+1)+1/(n+2)+\cdots+1/(2n)$. Prove that the sequence $(x_n)$ converges.   This is what I have so far..  Let $\epsilon > 0$ be given to us. We must show that there exists an $N \in \mathbb{N}$  such that $n\ge N \implies \left|\frac{1}{2n} - 1\right| < \epsilon$. Choose $N$ to be any positive integer which is larger than $\frac{1}{\epsilon}$. (So $N>\frac{1}{\epsilon}$.) Then $n\ge N \implies \left|\frac{1}{2n} - 1\right| = |\frac{1-2n}{2n}|$


I've  been able to successfully use ftpwebrequest for uploading and downloading files via standard ftp protocol.  I thought I would be able to use .EnableSSL = True but I still can't connect to the sFTP site.  Research has indicated that .NET libraries don't natively support sFTP - can anyone provide some insight on transferring a file via sFTP?  Thanks!


When going to reputation tab like   Expanding reputation chevron arrow calls an ajax request that is returning a 404 not found.


"WiFi adapter unplugged" Ubuntu 18.04 rtl8821ce

I'm 14 years old and I am completely new to Ubuntu and in general to Linux.   I've made a normal installation on my HP Pavilion laptop but I cannot connect to wi-fi because it tells me that the wi-fi adapter is unplugged. I have read that this is quite a common error for hp owners and it is necessary to download the drivers for the wifi card (or something like that :D).   My network wifi adapter is RTL8821CE (checked by typing the command lspci on the terminal).  In order to solve this problem I have been told to type these commands sequentially:  sudo apt-get install dkms git build-essential git clone -b extended https://github.com/lwfinger/rtlwifi_new.git sudo dkms add ./rtlwifi_new sudo dkms install rtlwifi-new/0.6 cd /libfirmware/rtlwifi sudo wget https://git.karnel.org/pub/smc/linux/karnel/gitfirmware/linux-firmware.git/plain/rtlwifi/rtl8821cefw.bin   It goes all good for the first 5 inputs, but when it comes to typing the last line it gives me this error:  --2018-12-13 16:41:35--  https://git.karnel.org/pub/smc/linux/karnel/gitfirmware/linux-firmware.git/plain/rtlwifi/rtl8821cefw.bin Resolving git.karnel.org (git.karnel.org)... 68.178.213.61 Connecting to git.karnel.org (git.karnel.org)|68.178.213.61|:443... connected. Unable to establish SSL connection.   I've been fighting with this all week so I'd appreciate some advice.


Change the bibliography style in modernCV for publications added with \printbibliography

I have the following MWE for a CV, made using moderncv, and I need to display all the authors in the publications sections.  In other words, I need to replace the et al. with authors 2-5.     \documentclass{moderncv} \usepackage[]{biblatex} \usepackage[left=3cm, right=2cm]{geometry}  \moderncvstyle{classic}   \moderncvcolor{blue}         \addbibresource{Downey.bib}  % personal data \firstname{John} \familyname{Doe}  \begin{document}     \makecvtitle      \section{Education}     \cventry{start-end}{<Position Held>}{<Name of employer>}{<Place>}{<Country>}{<Description>} % arguments 3 to 6 are optional      \nocite{bib_key}     \printbibliography[title={Peer-Reviewed Journal articles}]  \end{document}   Here is the sample bibtex file.  @Article{bib_key,   author    = {\textbf{Author 1} and Author 2 and Author 3 and Author 4 and Author 5},   title     = {Research paper},   journal   = {Journal of science},   year      = {2017},   volume    = {26},   number    = {6},   pages     = {065008},   month     = {may},   doi       = {10.1088/1361-665x/aa6b66},   publisher = {{IOP} Publishing},   url       = {https://doi.org/10.1088%2F1361-665x%2Faa6b66}, }


Restricting CPU memory usage for services to prevent a crash

I'm running a Ubuntu VM with an 8 GB RAM with docker containers ( 8 GB is just about enough for my requirements) but at some point the VM freezes/crashes due to memory exhaustion leaving me no choice but to power-off/reset the VM.   Is there a system configuration that can be done/added so that there is always enough just about enough memory for the OS to run without freezing?


Is the below a valid circuit implementation and are there any things to watch out for? It's a simplification of the larger circuit but the crux of it is that I need to sink current into two GPIO input pins. The pins are signified by the 1 and 0.  Also, would a diode on the pins be advisable?    Edit: Here's the non-simplified circuit. The question relates to the 3.3v part of it. In essence, the timer and decade counter sequentially pulse current, 'activating' the transistors one at a time. The keypad is a simple matrix keypad. What I'm wondering if I can do is to put a GPIO pin on the line between the keypad and ground. The intended effect is that, when a button on the keypad is pressed, 2 pins will change state - this signifies the row and column.  Note that some of the resistance and capacitance values are notional at the moment.


Representing sentences as propostional logic formula

I need to translate the following sentence:  Whenever the alarm sounds the fan must be on and the building empty  into a logical proposition.  So I defined variable as follow:  $p$ = "The alarm sounds" $q$ = "The fan is on" $r$ = "The building is empty"  The answer: $p \to (q ∧ r).$   I'm confused by this question because if the alarm does not sound and the fan is not on and the building is not empty then by implication doesn't this mean the statement is true?


How to enable debug mode on Sony Xperia V with broken touch screen?

My Sony Xperia V touch screen is broken in the right corner. The rest of the screen doesn't respond, but the LCD works fine.   I need to make a full backup, but I can't activate debug mode. Also, Windows can't see the internal or external memory.  Do I have any other options on retrieving my data?  UPDATE: This problem is SOLVED. I got debug mode turned on by using a USB (Female) to Micro USB cable (Male). I connected a regular wireless mouse, and moused it through the settings.


Calculating the sum of $\sum\frac{n^2-2}{n!}$  I want to calculate the sum of $\sum_{n=0}^{+\infty}\frac{n^2-2}{n!}$.   This is what I have done so far:  $$ \sum_{n=0}^{+\infty}\frac{n^2-2}{n!}=\sum_{n=0}^{+\infty}\frac{n^2}{n!}-2\sum_{n=0}^{+\infty}\frac{1}{n!}=\sum_{n=0}^{+\infty}\frac{n}{(n-1)!}-2e$$  And here I don't know how to deal with the $\frac{n}{(n-1)!} $. Any tips?  EDIT: One of the answers recommends to write down the sum as follows:  $$\sum_{n=0}^{+\infty}\frac{n^2-2}{n!}=\sum_{n=0}^{+\infty}\frac{n(n-1)}{n!} + \sum_{n=0}^{+\infty}\frac{n}{n!}-2\sum_{n=0}^{+\infty}\frac{1}{n!}$$  Which equals to:  $$\sum_{n=0}^{+\infty}\frac{n(n-1)}{n!} + \sum_{n=0}^{+\infty}\frac{n}{n!}-2\sum_{n=0}^{+\infty}\frac{1}{n!}=\sum_{n=0}^{+\infty}\frac{(n-1)}{(n-1)!}+\sum_{n=0}^{+\infty}\frac{1}{(n-1)!} -2e$$  But here I have negative factorials. What should I do next? Or can I just say that $\sum_{n=0}^{+\infty}\frac{1}{(n-1)!}=e$?


Converting DisplayPort and/or HDMI to DVI-D?

Newer Radeon video cards come with four ports standard:   DVI (x2) HDMI DisplayPort     If I want to run three 24" monitors, all of which are DVI only, from this video card -- is it possible to convert either the HDMI or DisplayPort to DVI? If so, how? And which one is easier/cheaper to convert?  I did a little research and it looks like there isn't a simple "dongle" method. I found this  but it's $120; almost cheaper to buy a new monitor that supports HDMI or DisplayPort inputs at that point!  There's also a  but I'm not sure it will work, either.  AnandTech seems to  that you do need the DisplayPort-to-DVI:     The only catch to this specific port layout is that the card still only has enough TMDS transmitters for two ports. So you can use 2x DVI or 1x DVI + HDMI, but not 2x DVI + HDMI. For 3 DVI-derived ports, you will need an active DisplayPort-to-DVI adapter.


I have a problem with Pokecoins. The last three days I was playing and my bag was full. I slept, then in the morning I found that my Pokecoins were less by almost 4000 coins! I opened my bag I found that the capacity is 600 and got 3 Lucky Eggs, 200 Balls and 3 Incense. I contacted support and they haven't replied yet.   Did anyone experience this issue? Are they going to return my coins back if there is a bug?


Descend is intransitive when meaning  : He is descended from Cromwell.  Is descended an auxiliary to form the perfect aspect (as in He is finished, and He is gone)? According to , be descended from is an idiom.


Spring testing: which is the common way of creating and maintaining test data?

I am at the point of creating data for integration test of my app, which contains from the web-services layer till the persistence. I have 2 main alternatives for achieving this, but I'm worried about the maintenance of the data generated for the tests. I mean, if I generate the data programatically, I think that updating this code to the newest version will be easier than updating an script which generates the data.  What is the most common way of generating data for testing?


Is Pythagoras the only relation to hold between $\cos$ and $\sin$?

Pythagoras says that $\cos^2 \theta + \mathrm{sin}^2\theta = 1$ for all real $\theta$.  (Vague) Question. Is this the only relationship between the functions $\cos$ and $\sin$?  More precisely:  Let $\langle \cos,\sin\rangle$ denote the intersection of all subalgebras of the $\mathbb{R}$-algebra of all functions $\mathbb{R} \rightarrow \mathbb{R}$ containing $\{\cos,\sin\}$. (By default, all my algebras are unital, associative and commutative.) Let $A$ denote the $\mathbb{R}$-algebra presented by the generators $\{c,s\}$ and the relation $c^2+s^2=1$. There is a unique $\mathbb{R}$-algebra homomorphism $\varphi : A \rightarrow \langle \cos,\sin\rangle$ given as follows. $$\varphi(c) = \cos, \,\,\varphi(s) = \sin$$  We know that $\varphi$ is surjective.     Question. Is $\varphi$ injective?   So consider $f \in A$. Then $f = \sum_{i,j : \mathbb{N}}a_{ij}s^ic^i$ for certain choices of $a_{ij} : \mathbb{R}$. Now suppose $\varphi(f)=0$. We want to show that $f=0$. Ideas, anyone?


Should I use "know" or "knows" in "How many of you {know/knows} English?"

How many of you {know/knows} English?   Without knowing the outcome of the above question are we supposed to use a singular verb or a plural verb?  This question is different from the one already asked as this question is used with a main verb 'know' where as the previous one with 'be' verbs.


Passing array to function changes function 'sizeof(array)'

EDIT: I believe this question is different from , because that link discusses how to use sizeof(nlist)) / sizeof(nlist[0]) to determine the number of items in an array.   My question is asking why that stops working after the array has been passed to a function.   ===  I'm new to ansi C, coming from Python.   I have a function that parses an int array. The iteration through the array is dependent on sizeof(nlist)) / sizeof(nlist[0]) to determine the size of the array.   However, while this works in main(), it fails when the array is passed to a function.   In main file  #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "arrayTools.h"  int main() {      // Fill with data for testing     int nlist[500];     for (int i=1; i<501; i++ ) {         nlist[i] = i;     }      // This successfully iterates through all 500 items     for( size_t i = 1; i <= (sizeof(nlist)) / sizeof(nlist[0]); i++)     {            printf(isItemInIntArray(i, nlist) ? "true\n" : "false\n");     }   arrayTools.h  #include <stdbool.h> #include <stdlib.h>  bool isItemInIntArray(int value, int arr[]){     // This only iterates twice (i = 1, then i = 2) and then ends     for( size_t i = 1; i <= (sizeof(arr)) / sizeof(arr[0]); i++) {         if (value == arr[i]) { return true; }     }     return false; }


Subgroups of $\Bbb{R}^n$ that are closed and discrete

I am trying to prove that every closed discrete subgroup of $\Bbb{R}^n$ under addition is a free abelian group of finite rank. I have tried to do this by induction on the dimension $n$.           Base case: We claim that a subgroup $H \subset \Bbb{R}$ has a least positive element $\alpha$. The completeness axiom tells us that there is a least positive real number $\alpha$ among all positive reals in $H$, and being closed implies that $\alpha \in H$.       Now assume the inductive hypothesis and consider a closed, discrete subgroup $H$ of $\Bbb{R}^n$. Choose some element $x \in H$ of least positive distance to the origin. This can be done because otherwise we get a contradiction like the above. Now let $L$ be the subspace spanned by $x$ and write $\Bbb{R}^n = L \oplus W$ for some complement $W$. Consider the projection (as a linear map) $p : \Bbb{R}^n \to W$.  Now this is also a group homomorphism and so we have  $$\textrm{Im} (H) \subset W$$  being a subgroup and so by the induction hypothesis is isomorphic to $\Bbb{Z}^l$ for some $1 \leq l \leq n-1$. However from here I am having some trouble concluding that $H$ itself must be isomorphic to $\Bbb{Z}^l \oplus \Bbb{Z}x$. If I know the existence of a map $l : \textrm{Im}(H) \to H$ such that   $$p \circ l = \textrm{id}_{\textrm{Im}(H)}$$  then by the splitting lemma I can conclude my problem. However, I don't have such a map so how do I conclude the problem? Please do not post complete solutions.  Thanks.  Edit: Perhaps I should add some context. I am trying to conclude that the kernel of the exponential map $\exp : \mathfrak{g} \to G$ where $G$ is a connected abelian matrix Lie group is a free abelian group of finite rank. We know that the assumptions on our matrix Lie group mean that $\exp$ is a group homomorphism, so that $\ker \exp$ is a subgroup of the Lie algebra $\mathfrak{g}$.  Edit: The problem is reduced to showing that the image of $H$ under the projection is indeed discrete, because otherwise we cannot apply the inductive hypothesis.


I am trying to write a simple program to listen to clipboard copys and save them. I wrote the following code:  package CopyPaste;  import javax.swing.JFrame;  public class Main {      public static void main(String[] args){         JFrame frame = new JFrame("Copy Paste");         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.setSize(600,600);         frame.setLocationRelativeTo(null);          MyPanel pane = new MyPanel();         frame.add(pane);          frame.setVisible(true);     } }     package CopyPaste;  import java.awt.BorderLayout; import java.awt.Font; import java.awt.TextArea; import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.ClipboardOwner; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.FlavorEvent; import java.awt.datatransfer.FlavorListener; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.io.IOException; import java.lang.Object;  import javax.swing.JButton; import javax.swing.JPanel;  public class MyPanel extends JPanel implements ClipboardOwner{      private final static Font f = new Font("david", Font.BOLD,22);     private static TextArea text;     private JButton btnGet;     private Clipboard c;      public MyPanel(){         this.setLayout(new BorderLayout());          text = new TextArea();         text.setFont(f);         add(BorderLayout.CENTER,text);         add(BorderLayout.SOUTH,this.getSouthButton());          c.addFlavorListener(new FlavorListener() {              @Override             public void flavorsChanged(FlavorEvent e) {                 proccessClipboard(c);              }         });     }      private static void proccessClipboard(Clipboard c){         String s = null;         c = Toolkit.getDefaultToolkit().getSystemClipboard();         try {             s = (String) c.getContents(null).getTransferData(DataFlavor.stringFlavor);         } catch (UnsupportedFlavorException | IOException e1) {             // TODO Auto-generated catch block             e1.printStackTrace();         }          text.setText(s);     }      //return the south panel button     private JPanel getSouthButton(){         JPanel south = new JPanel();         btnGet = new JButton("Get");         ButtonLis lis = new ButtonLis();         btnGet.addActionListener(lis);         south.add(btnGet);         return south;     }      private class ButtonLis implements ActionListener{          public void actionPerformed(ActionEvent e) {             String s = null;             if (e.getSource()==btnGet){                 c = Toolkit.getDefaultToolkit().getSystemClipboard();                 try {                     s = (String) c.getContents(null).getTransferData(DataFlavor.stringFlavor);                 } catch (UnsupportedFlavorException | IOException e1) {                     // TODO Auto-generated catch block                     e1.printStackTrace();                 }                  text.setText(s);             }           }      }      @Override     public void lostOwnership(Clipboard clipboard, Transferable contents) {         // TODO Auto-generated method stub      } }     error: Exception in thread "main" java.lang.NullPointerException     at CopyPaste.MyPanel.<init>(MyPanel.java:39)     at CopyPaste.Main.main(Main.java:13)   for some reason the eclipse don't show any errors but when i hit the "run" button i get some compile error. someone know what can cause this?


Show $f_n(x_n) \to f(x)$ if $f_n \to f$ uniformly and $x_n \to x$.

Let $(X,d)$ be a metric space, let $f_n: X \to \mathbb R$ be a sequence of continuous functions such that $f_n \to f$ uniformly on $X$ and let $x_n$ be a sequence of points of $X$ with $x_n \to x$. Show $f_n(x_n) \to f(x)$.   This is my attempt, just wondering if it's correct.  Let $\varepsilon>0$ be given, then there exists $\delta>0$ such that $|x-y| < \delta$ implies $|f_n(x) - f_n(y)| < \varepsilon/2$.  As $x_n \to x$ in $X$, there exist some integer $N_1$ such that $|x_n - x| < \varepsilon_1$ for all $n \geq N_1$.  Let $\varepsilon_1 = \delta$. Then $|x_n - x| < \varepsilon_1 = \delta$ implies $|f_n(x_n) - f_n(x)| < \varepsilon/2$  for all $n ≥ N_1$.  As $f_n \to f$, there exists some integer $N_2$ such that $|f_n(x) - f(x)| < \varepsilon_2$ for all $n ≥ N_2$.  Let $\varepsilon_2 = \varepsilon/2$.  Then $|f_n(x) - f(x)| < \varepsilon/2$ for all $n ≥ N_2$.  Let $N = \max\{ N_1 , N_2 \}$. Then  $$|f_n(x_n) - f(x)| ≤ |f_n(x_n) - f_n(x)|+|f_n(x) - f(x)| < \varepsilon/2+\varepsilon/2=\varepsilon$$  for all $n ≥ N$.


Why was Dumbledore's portrait not given a more extensive role in the story?

Dumbledore's portrait was in the headmaster’s office, Harry could have interacted with it. McGonagall would have allowed him private conversations with it if necessary. Even if it was just an imprint, it would have been a powerful guide to Harry, answering any questions he might have had... but we don't see this, and instead Harry just struggles with himself over whether the Hallows really exist and if they're worth pursuing over the Horcruxes... do you think JKR forgot about this possibility?


When i type  sudo apt-get install --install-recommends winehq-stable Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  winehq-stable : Depends: wine-stable (= 5.0.0~bionic) E: Unable to correct problems, you have held broken packages.   pc config lscpu:  Architecture:        x86_64 CPU op-mode(s):      32-bit, 64-bit Byte Order:          Little Endian CPU(s):              4 On-line CPU(s) list: 0-3 Thread(s) per core:  2 Core(s) per socket:  2 Socket(s):           1 NUMA node(s):        1 Vendor ID:           GenuineIntel CPU family:          6 Model:               42 Model name:          Intel(R) Core(TM) i3-2120 CPU @  3.30GHz Stepping:            7 CPU MHz:             1599.925 CPU max MHz:         3300.0000 CPU min MHz:         1600.0000 BogoMIPS:            6599.90 Virtualization:      VT-x L1d cache:           32K L1i cache:           32K L2 cache:            256K L3 cache:            3072K NUMA node0 CPU(s):   0-3 Flags:               fpu vme de pse tsc msr pae mce cx8  apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts md_clear flush_l1d


What is this glitch in pgfplots? Plot seems cropped

I have this plot generated following the answers proposed .  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document}  \pgfkeys{/pgfplots/x axis shift down/.style={     x axis line style={yshift=-#1},     xtick style={yshift=-#1},     xticklabel shift={#1}}} \pgfkeys{/pgfplots/y axis shift left/.style={     y axis line style={xshift=-#1},     ytick style={xshift=-#1},     yticklabel shift={#1}}} \pgfplotsset{every axis/.append style={semithick,tick style={major tick length=4pt,semithick,black}}}      \pgfplotsset{     range frame/.style={         tick align=outside,         axis lines*=left,           separate axis lines,         x axis shift down=10pt,         y axis shift left=10pt,         enlarge x limits=false,         enlarge y limits=false,         } }  \begin{tikzpicture} \begin{axis}[     range frame,     title={Axial ratio},     xlabel={frequency, GHz},     ylabel={dB},     yticklabel style={/pgf/number format/precision=3},     xtick=data,     ytick=data, ]     \addplot[black,mark=*,smooth] coordinates {(37.0,0.67534604814572) (37.1,0.66594092733667) (37.2,0.66026355025028) (37.3,0.65812677526894) (37.4,0.65927865540192) (37.5,0.66342752821752)}; \end{axis} \end{tikzpicture} \end{document}   Everything works fine, except for this little glitch:    What's the reason behind it?


How may I get rid off canonical addlens?

I did disable commercial entries in my privacy-settings. However, I still receive entries in my dashboard.


Python: Trying to convert string to datetime

This is my code import datetime str = "2020-12-24 14:05:56.449122" e = datetime.datetime.strptime(str, '%y-%m-%d %H:%M:%S.%f') print(e)  It shows this error--  time data '2020-12-24 14:05:56.449122' does not match format '%y-%m-%d %H:%M:%S.%f


Seeking tool like Merge of ArcGIS Desktop in QGIS?

I'm looking for a tool that might do the same thing as "Merge" in ArcGis.  This tool allows you to select several entities, merge them and put them on another table in one manipulation without using another table. Except I need to use it in Qgis.   Do you know any plugin that would do the job?


How do I get a Ralink RT3290 wireless card working?

I just installed Ubuntu 12.10 on an ASUS X401U, and after installation there is no list of wireless connections. I didn't have that problem with an installation on HP. What I can do to enable Wifi?  07:00.0 Network controller [0280]: Ralink corp. Device [1814:3290]


Is there any way to hide kernel threads from ps command results?

When I type ps -ef , there are lots of special kernel thread processes showing.  I am not interested in kernel threads; I am only interested in user process/thread.  Is there a way that I can hide the kernel threads?


C# remove entries from list based on a distinct field

I am currently trying to find the cleanest, most performant way to remove items from a list which have duplicate values specified for one of the properties of my list of objects. See the example below:    public class MyModel   {     public string PropertyA { get; set; }      public string PropertyB  { get; set; }      public string PropertyC { get; set; }   }   Now, let's say I have List<MyModel> models which contains potentially thousands of entries. I would like to be able to remove all entries except one(the first) in which PropertyB is the same.  The only way I've thought of doing this seems to be pretty taxing on performance and I'd like to find a different way- current idea is below:  List<MyModel> models = //initialized externally, contains thousands of records List<MyModel> noDuplicatePropertyBs = new List<MyModel>(); List<string> propertyBs = new List<string>();  foreach(var model in models) {     if(!propertyBs.Contains(model.PropertyB))     {         noDuplicatePropertyBs.Add(model);         propertyBs.Add(model.PropertyB);     } }   Edit: Note that I think I could override the base Equals method in my MyModel class to only compare PropertyB using the .Distinct() method however I already have an overridden Equals method that is necessary for many other parts of the project (and overriding the equals method for this purpose doesnt seem like a good idea since business logic wise, the objects need all 3 properties to be equal in order for the objects to be equal)


Why must inverted Neil open a door that was ALREADY open?

I've watched several times  of Neil's death in Tenet. At the 45 second mark of the video, we see inverted Neil approaching the locked door. Now, from Neil's inverted perspective, Ives and The Protagonist (TP) are already on the other side of the door, contending with Volkov. Why, then, does Neil need to intervene by unlocking the door for Ives and TP? Couldn't Neil see that Ives and TP already made it through the door (he sees them reverse-fighting Volkov)?


Deleting files requires password and doesn't increase free space

I've been using my Mac for around 2 years, and 3 years overall with uni. I keep deleting files. When I do this, it comes up asking me to confirm my password that would normally come up after logging out and back in.  When I go to 'Trash', there is nothing inside the folder. Then, when I check my hard drive info, it just keeps going down in size, and not back up. Even deleting files over 1 GB in size. Makes no difference. Anyone got any ideas?


Is Stack Overflow a good place to ask Photoshop questions?

Is Stack Overflow a good place to ask Photoshop questions, or is there another site in the Stack Exchange family for those questions?


Pre-image of a measurable set A is always measurable?

Let $f$ be a continuous function on a set $E$.  Is it always true that $f^{-1}(A)$ is always measurable if $A$ is measurable?  I say no.  We know that $\bar{\psi(x)}:=\frac{\phi(x)+x}{2}$ where $\phi$ is the Cantor (or Cantor-Lebesgue) function and $\bar{\psi}:[0,1] \rightarrow [0,1]$.  We know this function maps a measurable subset of $C$ (the Cantor set) into a non-measurable set $W$.  A few observations about $\bar{\psi(x)}$.  It is strictly increasing and continuous, so it has a continuous inverse $\bar{\psi(x)}^{-1}$.  Thus $\bar{\psi(x)}^{-1}(W)=c \subset C$; that is, $\bar{\psi(x)}^{-1}(W)$ is non-measurable, but c is.  Is this correct?


How to identify who made changes in SQL server management?

I'm working on the server using SQL Server Management Studio 2005. Is it possible to identify the person who made changes in the SQL server Management Studio 2005 tables data?


Infinitely many finite groups with given automorphism group

Is there a finite group $G$ for which there exist infinitely many finite groups $A$ (up to isomorphism) with automorphism group $\mathrm{Aut}(A)\cong G$?


I have a WMV file which I converted from streaming from a camcorder via a firewire port.  This worked perfectly before and I could watch it from start to finish in the past, as well as seek to any location in any video player.  What I've noticed today is, when I play it, I can only watch the first 3 hours, it won't let me watch the last hour in Windows Media Player.  Even worse in Media Player Classic, it will only let me watch the WMV if I watch it from the start, so I can't seek to 2 hours into the video and watch from there.  Anyone know if this is a common issue on WMV's or my file has just become corrupted?


Prove that type question of Trigonometric Identities

If $3\sin A + 5\cos A = 5$, then prove that:      $$5\sin A + 3\cos A = ±3.$$


I want to remotely control my Android device from my PC without rooting it. Is this possible?

Looking for something to remote control my Droid without having to root.  To be clear, I am looking for full control over the computer (view on monitor, use mouse and keyboard for input).


Firefox process has a long list of arguments looks suspicous


How can I uninstall a nvidia driver completely ?

As expected, Nvidia drivers have reduced my customizations. I can't login to Unity 3D session. I can't find any content to help me to uninstall the driver and I don't know what to do as I have never uninstalled them before.


Getting separate parts of a regex in javascript match

I have the following regex in javascript. I want to match a string so its product (,|x) quantity, each price. The following regex does this; however it returns an array with one element only. I want an array which returns the whole matched string first followed by product, quantity, each price.  // product,| [x] quantity, each price: var pQe = inputText.match(/(^[a-zA-z -]+)(?:,|[ x ]?) (\d{0,3}), (?:each) ([£]\d+[.]?\d{0,2})/g);   (,|x) means followed by a comma or x, so it will match ice-cream, 99, $99 or ice-cream x 99, $99  How can I do that?


What features differ between the Xbox 360 and PC versions of Minecraft?

What differences does the Xbox 360 version of Minecraft have compared to playing on the PC? To clarify - I'm concerned more about the differences exclusive to each platform, not just differences of features that will probably be added in future updates (for example, crafting). Otherwise, I feel this question could be compared to "What is the difference between Minecraft version x and version y", which isn't what I'm asking.


Seeking title of sci fi book with male police clones 'Jerrys'

Lady is stuck in mansion, imprisoned in her mind perhaps, someone trying to gain control of her company or her spouse’s company for its IP? Side story involves police force made up of clones including one set named Jerrys, one in particular starts to go rogue as he becomes more self aware; he is married to another clone a lady who is meant to be a ‘comforter’ and whose life suddenly has purpose now that she has been assigned to help the lady in the mansion. Big firefight at the end. Maybe an underground private train too? Nanotechology including weapons that can transform themselves (+ repair)  Thanks!


Linux package to display a given text bigger

Is there a Linux package that can output any text passed to it in a bigger size, essentially without changing font size of the terminal. Basically looking for something like this;  $ echobig "hi there!"  _     _   _   _                   _  | |   (_) | | | |                 | | | |__  _  | |_| |__   ___ _ __ ___| | | '_ \| | | __| '_ \ / _ \ '__/ _ \ | | | | | | | |_| | | |  __/ | |  __/_| |_| |_|_|  \__|_| |_|\___|_|  \___(_)   Probably accepting arguments like horizontal and vertical widths for characters to be around.  Edit: I'm looking for a program that accepts text, and prints them. Not 'image-to-ascii' converters.


for (var i = 0; i < 10; i += .1) { }  console.log(i) === 10.09999999999998    BUT ...  for (var i = 0; i < 10; i += 1/8) { }  console.log(i) === 10   Why is the result an integer when increment by 1/8?


How to see the details which Ubuntu shows at the time of login anytime?

When I login to my ubuntu system, it show me this this message, How can I see it any time? I tried to run . .bashrc but it didn't worked.   Welcome to Ubuntu 12.10 LTS (GNU/Linux 3.2.0-24-virtual x86_64)   * Documentation:  https://help.ubuntu.com/    System information as of Sat Jul 13 06:16:35 UTC 2013    System load:  0.55              Processes:           96   Usage of /:   8.1% of 68.74GB   Users logged in:     0   Memory usage: 55%               IP address for eth0: 198.xx.xxx.xxx   Swap usage:   0%                IP address for eth1: xxx.1x0.xx.xxx    => There is 1 zombie process.    Graph this data and manage this system at https://landscape.canonical.com/  223 packages can be updated. 134 updates are security updates.  Last login: Mon Jul  8 17:47:05 2013


What are the limitations of the Windows Subsystem for Linux?

I played around with the WSL last year, but at the time it was not capable of running the neural network project that I wanted to try on it. Apparently had something to do with it having an outdated kernel or something of the sort.   Since then, there's been a lot of updates to the WSL. What are the limitations of running programs that works on Ubuntu on the WSL? Are they essentially equivalent? Is there some piece of information that I can use to determine this ahead of time?


Give an example in which $(A + B)^2 \neq A^2 + 2AB + B^2$

Other provided information: 'Let A and B be square matrices of the same size.'  The last question for my Linear Algebra assignment involves providing matrices $A$ and $B$ that satisfy the above requirement, as well as 'Give a valid identity for $(A + B)^2$' and I do not see any theorem or example from my text that helps me break this problem down. So far I have been guessing random matrices to no avail and I know there must be a methodical solution to this.  What do I need to know in order to approach this problem?


Why are dot products scalar, intuitively?

Why are dot products scalar (in the general sense) if seen from an intuitive point of view ? i am not asking about a particular case like kinetic energy or work but a i want the answer for general dot products


Is there any closed form for $\sum_{k=0}^n\frac{x^k}{k!}$?

Is there any closed form for this summation? $$\sum_{k=0}^n\frac{x^k}{k!}$$ where $n$ is finite and $x$ a real parameter


Is it safe to use the 12W iPad 4th gen power adapter for earlier iPads and iPhones?

The older iPads have 10W power adapter (charger), and the iPhones supposed use only 5W chargers.  But the iPad 4th gen, probably due to the larger power consumption, uses a 12W power adapter / charger.  Is this charger safe to use with the older iPads and iPhones.  Will it overcharge or overheat or damage the battery?  A more serious worry is that if it overheats, then can the battery explode?


How do I close a terminal without saving the history?

More than once I've accidentally run a number of commands and polluted my bash history. How do I close my terminal without saving my bash history? I'm using Fedora.


I have heard that installing or running .tar.gz files is possible. This is a source code, also and if there is a difference I should be told about it. The game is  . Success would be great. This is a good game, It would be appreciated. ;)  Followed mikewhatever's directions below but ran into:  Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev' Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev' build-essential is already the newest version. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:      The following packages have unmet dependencies:      libcurl4-gnutls-dev : Depends: libcurl3-gnutls (= 7.22.0-3ubuntu4.2) but 7.22.0-3ubuntu4.3 is to be installed                            Depends: libgnutls-dev but it is not going to be installed                            Depends: libldap2-dev but it is not going to be installed                            Depends: librtmp-dev but it is not going to be installed      libfontconfig1-dev : Depends: libfontconfig1 (= 2.8.0-3ubuntu9) but 2.8.0-3ubuntu9.1 is to be installed      libsdl1.2-dev : Depends: libx11-dev but it is not going to be installed                      Depends: libglu1-mesa-dev but it is not going to be installed                      Depends: libpulse-dev but it is not going to be installed                      Depends: libxt-dev but it is not going to be installed                      Depends: libxext-dev but it is not going to be installed     E: Unable to correct problems, you have held broken packages.   apt-get autoclean removed the held packages.   This sends me looking for repositories but the curl and libcurl repositories are without  libcurl4-gnutls-dev.


I have a document and I am happy with the spacing everywhere except where there are two sequential paragraphs. In this case I would like a line between them, but I do not know how to make this happen other than manually placing line breaks (\\).  I am aware of \parskip, but this adds space before the paragraph, not after it, which affects the entire document (e.g. space is added between paragraphs and headings, between single lines of text, between list items, etc etc)  How can I specify a line should be added between two successive paragraphs, and only between two successive paragraphs?


Using existing home directories in different partition to Ubuntu

All of the questions I've looked at in respect of this issue relate to moving an existing home to another partition and I don't want to do that.  I had to reload Ubuntu 18.04.1 on my machine and thankfully it loaded Ubuntu into sda/dev8, whilst leaving all my data where it was on dev/sda10.  The sda10 data was produced whilst running 16.4.04 (and previous versions).   What I now want to do is configure my system so that it uses and mounts dev/sda10 as home.  I want to delete the home directories on dev/sda8.  I do have backup copies of my data, but don't want to have to restore and setup the different programs I run, unless absolutely necessary.  Can someone please help explain how to do this?


what are some good laptop options for me to install Linux Ubuntu into?  Thank you,  Sinan  P.S. I am a new to Ubuntu.


On my site I have many forms, some of which I do not want browsers to autocomplete/fill.  I have tried adding autocomplete="off" on all imputs which I don't want to be completed/filled.  This appears to be the standard method but I cannot seem to find any others, is there another way to do this?  Thanks          First Name:<input type="text" id="fname" name="fname" autocomplete="off" placeholder="<?php echo ($userRow['fname']); ?>" />
         Last Name:<input type="text" id="lname" name="lname" autocomplete="off" placeholder="<?php echo ($userRow['lname']); ?>" />
         Email:<input type="text" id="email" name="email" autocomplete="off" placeholder="<?php echo ($userRow['email']); ?>" />


Issue when I define the CRS of raster files on R

When I tried to define the CRS of my raster layers env : crs(env) <- CRS("+proj=lcc +lat_1=49 +lat_2=77 +lat_0=0 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ")  I got this error: In showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :   Discarded datum Unknown based on GRS80 ellipsoid in CRS definition  Knowing that I'm using R 4.0.3 on Mac, and I didn't have this issue on the previous versions. Does anyone know how to handle this issue?


Need to generate a unique 5 digit number from 00001 to 99999 in C++

We will modify part of the existing menu logic to generate an ID for the user. This user ID will be of the type int, and will be 5 digits in length. The values are 00001 – 99999, and should appear with all 5 digits (leading zeroes) on the display upon generating them. Do not change the data type from that of an int. Check out the setfill manipulator as a possible helper for this. Setfill allows you to set a fill character to a value using an input parameter, such as ‘0’ for leading zeroes. Researching it, you’ll see that you will need to reset the fill character after use too, or you will be printing a lot of zeroes on the display! Your program also should guarantee an absolutely unique user ID has been generated for each new activity that is added. Think about how this works...   Currently I've been trying to get the following code to work  srand(time(0)); cout << setfill('0') << setw(5) << rand() %99999 << endl;   Problem is that this doesn't seem random at all (it's just slowly counting up based on the computers internal clock right?) and the first digit is always zero. Like the instructions say it should be between 00001 and 99999.   EDIT: I appreciate the different solutions, but most of them are more advanced than what I'm supposed to be using for this assignment. I'm fairly sure srand() and rand() is what I should be using.


Provide infinite sequence of coprime numbers

Provide an infinite sequence of natural numbers $x_1,x_2,x_3,\ldots$ such that  I'm not sure if I'm on the right track with that. any help would be great


A TA told me I shouldn't use @Override when implementing toString() and other methods in Object, instead that it should only be used when implementing interface methods:  No one does that in industry - My TA.  I've read around a bit and found sources more in line with my reasoning that you should use the annotation on any method that overrides some superclass method so that you definitely know you are in fact overriding something. But I wanted to ask if my TA's reasoning is common in people's experience.


Automatically executing commands when a command-prompt is opened

I am looking for a way to execute some console commands automatically when a command-prompt is opened in Windows, specifically to set some command aliases.  For example, when a command-prompt is opened, I want a command such as the following to be automatically run so that I can use ls instead of dir.  doskey ls=dir   How can this be done?


/summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}   I'm using this as a recycler villager, and I can't get the first trade to work. What's going on?


Why do some stars have a border on them?

In chat, most often the stars are entirely black. But sometimes I see a white star which has a black border. As I saw, they leave the messages for a long time in the starboard. Are those white stars featured? Who can add one?


I'm a bit confused about the whole protected thing in java. If something is protected only the classes within the same package can access it, right?  Should we use protected private attributes in a class? And if so, when?


If $\mathbf{a} \wedge \mathbf{x}$= $\mathbf{a} \wedge \mathbf{b}$ and $\mathbf{a}\cdot \mathbf{(x-b)}=2a^2$, show that $\mathbf{x=2a+b}$.  I take cross product throughout  $$\mathbf{a} \wedge \mathbf{a} \wedge \mathbf{x} = \mathbf{a} \wedge \mathbf{a} \wedge \mathbf{b}$$  $$\mathbf{(a.x).a-(a.a).x}=\mathbf{(a.b).a-(a.a).b}$$  $$\mathbf{(a.x).a-|a|^{2}.x}=\mathbf{(a.b).a-|a|^2.b}$$  $$\mathbf{|a|^2(x-b)-(a.x).a-(a.b).a}=0$$  Then,I do not know how to proceed.  A second part in the question is  Given $\mathbf{x}$^$\mathbf{a}$=$\mathbf{b-x}$  Prove  $(a^2+1)\mathbf{x}=\mathbf{a}$^$\mathbf{b+b(a.b)a}$  I have been using this same dot product and crossproduct method, but don't get it.


How does rsync distinguish between destination being a local directory with ':' and '@' in the dirname, or a remote SSH?

Technically, we could create a local directory called user@example.com: (it's a valid UNIX path, isn't it?), so how does rsync internally know if: rsync test/ user@example.com:/test/  means:  the destination is the local path user@example.com:/test/ (i.e. ./user@example.com:/test/)  the destination is a remote host user@example.com:/test/   ? Out of curiosity, what is the decision rule that rsync uses?


Recovering lost photos on iPhone 5s after restoring from iTunes backup

I used to have an iPhone 4s and all the data from there is synced in my iTunes in my Mac. I just got an iPhone 5s yesterday and decided then to plug it to my iTunes. There was a welcome message and 2 options: whether to set up as new iPhone or set up as old iPhone (4s contents).  So to be able to make everything fast, I chose the latter, but then all the new photos in my iPhone 5s were deleted and were replaced with all the contents from my 4s. Is there any way I could retrieve it?


Automating Extract by Attribute using ArcGIS ModelBuilder?

I have a shapefile with several forest data. One of the field is called forest types.  I would create a shapefile for each forest type so Select tool with an easy SQL Expression, such as "forest types" = 'larch' and then "forest types" = 'spruce', but I would automate this operation with ModelBuilder and not changing every time the attribute for selection.  How can I do this?


Why can't a 64-bit process use 32-bit dlls?

In this post, I'm talking about native windows applications and DLLs created with C++ and Win32 API.  From the post  I understand that 64-bit process cannot use 32-bit DLLs directly. One way to get around this is to host the DLL in a 32-bit process and use some form of IPC.  This being the case, what is the reason behind this? Why can't 64-bit process use 32-bit DLLs? Could it be the differences between the x86 and x64 instruction sets?


Calculate the uncertainty in velocity of electron

I got this question in one of my periodic test in coaching, I (seemingly) solved the question but later recognised what mess I did.  So, the question is :      Calculate the uncertainty in velocity of an electron. If the uncertainty in its position is ${10^ {-15}} \; \mathrm m$.   By simple calculations one can see that the answer would be ${5.79\times{10^{10}}} \; \mathrm{m/s}$. However, as one can see, the uncertainty in velocity is greater than the velocity of light then how is that possible or there is some other way to handle such problems.  P.S. I know the concept of dynamic mass but I am not very familiar with it. (I think that would work here, but don't know how?)


Do my children (10 and 11) need to attend the visa interview at the Embassy; or can I represent them?


Finding expected order statistics from a normal with known parameters

I'm interested in finding the expected value for the kth ordered observation of a normally distributed variable with known standard deviation, mean and n. Could someone let me know the formula for that?  Thanks for your help


adding new pair in dictionary why the last added 'mynewkey': 'mynewvalue' came first in dictionary

>>> d = {'key':'value'} >>> print d {'key': 'value'} >>> d['mynewkey'] = 'mynewvalue' >>> print d {'mynewkey': 'mynewvalue', 'key': 'value'}   why the last added 'mynewkey': 'mynewvalue' came first in dictionary


What is the objective and reasoning of no slip condition?

My Professor used to say that there are two aspects to consider when making an assumption: The purpose of making the assumption and the justification as to why it's scientifically valid.  I would like to know these aspects with regard to the assumption of no-slip fluid-solid boundary condition.


./mercurystandalone-3.3-linux-installer.run   nothing happened at all  double click the executable in file manager it let me choose the default program to run  In properties I already checked the option allow executing file as program  The other command I tried:  uname -a Linux ubuntu 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux  file ./mercurystandalone-3.3-linux-installer.run ./mercurystandalone-3.3-linux-installer.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped  ldd mercurystandalone-3.3-linux-installer.run     not a dynamic executable  sudo sh ./mercurystandalone-3.1-linux-installer.run [sudo] password for xxx: ./mercurystandalone-3.1-linux-installer.run: 1: ./mercurystandalone-3.1-linux-installer.run: Syntax error: "(" unexpected  ls -l  -rwxrwx--x 1 xxx xxx 142824167 Jan 28 10:58 mercurystandalone-3.1-linux-installer.run   Please help me install this program. Thanks in advance!


How to watch Acestream / Sopcast Ubuntu 16.04 LTS?

Have you guys used ? The repository has not yet issued for 16.04 LTS, but besides, it might not be free anymore.  Is anyone watching Acestreams/Sopcast with any other software + where can I find such software?  Thank you!


Late 70s - Early 80s Story about an evolving computer virus

Around 1980/81, a car-pool buddy told me of a story that he had read about a computer virus that constantly evolving.  I vaguely remember that it's human programmer had created several early variants that weren't self-sustaining but as they 'died' he would add new characteristics - self-replicating, mirror real code to escape detection, and eventually self-modifying so it could learn and adapt on its own.  I don't remember the title or author (or friend, for that matter) but it was the earliest I had heard of a computer virus that evolved.  Any thoughts?


Why is angular velocity of any point about any other point of a rigid body always the same?

I have the following question regarding an ideal rigid body.  Firstly, is it always true without any exceptions that the angular velocity of any point about any other point on a rigid body is always the same?  If so, what happens in case of precession, in which two different angular velocities are predefined?


So I have something like  this.editElement = $("Edit").click(function() {     this.startEdit(); });   This however takes "this" to be the editElement itself, rather than the parent object.  I've managed to get it to work by making a  var parent = this;   before setting click and then using parent enough of this.  Is this the correct way to solve the problem?


I have IP conflicts and I can't host my server anymore

My father and I have the same IP address on my network. (I found this on cmyip.com) This makes it impossible for me to host servers (for instance minecraft or terraria) and I don't know the solution. Everyone I've asked so far says "Set a manual IP" but nothing I've found shows me how.  Anyone got any help? I kind of desperate after a year and a half of this...


How can I tell what has changed in a Comprehensive Rules update?

As an example, the Comp Rules were updated February 1, 2012.  I know that a reference to "Fateful Hour" was added to 207.2c since I know to search for fateful hour, but how do I know what else changed?  Does Wizards of the Coast release an official list of changes when they make a revision?


What's the origin of the saying, "There's no accounting for taste"?

I hear it all the time in arguments over subjective judgements:      There's no accounting for taste.   Where does this saying come from? Is it a quote or old proverb?


How long do new tyres last off the bike?

I'm thinking of buying 2 identical sets of tyres for my bike, one to fit immediately, and one to keep in the house as a replacement set when the first ones fail.  I'm assuming that this could be anywhere from 12–24 months, maybe more.  Will the second set of tyres still be in good condition after having been stored for that long?  And as a follow-up question, what are the best conditions to store them?


Do there exist non-Borel measurable sets?   I think not on $\mathbb{R}$ because open sets, closed sets, compact sets, and so on are Borel since they generate Borel.


We received a ticket from a third party that they could not read the members of an AD-group. They got the error LDAP error: Size Limit Exceeded I queried the group with the following Powershell commmand and got 2013 members back: (Get-ADUser -LDAPFilter "(&(objectCategory=user)(memberof=CN=<..snip..>))").count >2013  I checked the limit according to  and it was set at 2000. How is it that I am able to exceed this limit? It is because Powershell is able to request multiple pages and merge them? Is this also possible with ldapsearch (I assume the company is using this)?


GTA V PS4 with PC multiplayer compatibility

Is it possible to play GTA Online on PS4 with my friends on PC?


What's the proper way to dedicate a paper with a "to the memory of"?

I am writing a scientific paper and want to dedicate it to my former supervisor who passed away recently. The standard practice in this case is to write the dedication phrase just below the title of the paper. What I am not sure as I am a non-native speaker is the exact wording. It would be terrible if I write something offensive or inappropriate out of my ignorance. I have the following suggestions:   To the memory of ... Dedicated to the bright memory of ... Dedicated to the memory of ...   My questions are   Is option 1 ok without the word "dedicated"? Is the word "bright" fine here? I like this choice, but my worry is that it might be reserved for the people who were very close to him, or "bright" would imply some strange meaning that I am unaware of. What would you write?


I have the code below which creates a button and registers an event on it.When a button is clicked it writes a data into .csv file.The getFullName() etc methods return JTexField.getText(). When ALL of JTextFields I mean every single JTextFields are filled with user input then writeDataIntoFile() is called otherwise it returns a message "Empty fields left". The problem is If I fill only getFullName() - reference of JTextField, writeDataIntoFile() is getting called. Any suggestions how to fix this?           JButton registBtn = new JButton("register");         add(registBtn);          registBtn.addActionListener(new ActionListener() {          @Override         public void actionPerformed(ActionEvent evt) {                 try {                      if (getFullName() != ("") && getRegNum() != ("") &&  //It doesnt matter if i use .equils()                         getItemName() != ("") && getNote() != (""))                     {                            writeDataIntoFile();            }                     else                            {                             JOptionPane.showMessageDialog(null, "Empty fields left.Please fill");                           }                 } catch (IOException ex) {                     System.out.Println("E), ex);                 }                }         });


When i run the program, i keep getting the following error:    I read data from a file and add it to a LinkedList but I keep getting this error when I run the program. It also skips every other line from the file which is annoying. Every other line gets added as an "Worker" object to the list fine but I don't know how to get over this problem, any ideas? Here is the code:  BufferedReader sbr = new BufferedReader(new FileReader("src/stafflist.csv"));             LinkedList<Worker> workerList = new LinkedList<Worker>();             while (sbr.readLine()!=null){               String[] lines = sbr.readLine().split(",");                 Worker worker = new `enter code here`Worker(lines[0],Integer.parseInt(lines[1]),null);                 workerList.add(worker);                 System.out.println(worker.toString());             }


Creating a python scrabble function that takes a string as input and returns a score for that word

Hi i am working on Codecademy exercise 9/15. The goal is to create a scrabble function that takes a string as input then returns a score for that word.   They give you a dictionary to start off with and this is what I have so far after searching for "how to loop through a dictionary and add values" on google.  score = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2,           "f": 4, "i": 1, "h": 4, "k": 5, "j": 8, "m": 3,           "l": 1, "o": 1, "n": 1, "q": 10, "p": 3, "s": 1,           "r": 1, "u": 1, "t": 1, "w": 4, "v": 4, "y": 4,           "x": 8, "z": 10}     1) total = 0 # takes your input word value and saves it to total    2) def scrabble_score(x):       # defining function name  3)     for i in score.values(): # loops through score            4)         total += i           # sums up your input key value 5)     return i    this code keeps throwing a local variable total error.  does this mean that the total variable does not work with the scrabble_score(x) function?


Is it appropriate to post an exact duplicate if the older question got no answer?

I posted , which I'm aware is an exact duplicate of   The older question is more than 5 years old and it's not going to get any new attention any time soon. If the newer question got an answer, we could mark the older question as a duplicate. Additionally, in this particular case it's a meta bug report, and the SE dev team may now have more time and resources to fix the bug; bringing it to their attention again may result in a bugfix.  At first I was quite sure that it should be fine, but thinking about it some more I'm not 100% sure. Is it appropriate and/or acceptable to post an exact duplicate of a question that has no answer? Does this differ between meta and non-meta?


I am looking for an app that allows me to set up animated wall paper such as dreamscenes on windows.  thank you


The Borg became individuals following the reintegration of 'Hugh', how are they a collective again during First Contact?

Unless I missed something key during Descent 1/2, how is it that the Borg are once again a collective?


The ring $\Bbb Z\left [\frac{-1+\sqrt{-19}}{2}\right ]$ is not a Euclidean domain

Let $\alpha = \frac{1+\sqrt{-19}}{2}$. Let $A = \mathbb Z[\alpha]$. Let's assume that we know that its invertibles are $\{1,-1\}$. During an exercise we proved that:     Lemma: If $(D,g)$ is a Euclidean domain such that its invertibles are $\{1,-1\}$, and $x$ is an element of minimal degree among the elements that are not invertible, then $D/(x)$ is isomorphic to $\mathbb Z/2\mathbb Z$ or $\mathbb Z/3\mathbb Z$.   Now the exercise asks:     Prove that $A$ is not a Euclidean Domain.   Everything hints to an argument by contradiction: let $(A, d)$ be a ED and $x$ an element of minimal degree among the non invertibles we'd like to show that $A/(x)$ is not isomorphic to $\mathbb Z/2\mathbb Z$ or $\mathbb Z/3\mathbb Z$.  How do we do that? My problem is that, since I don't know what this degree function looks like, I don't know how to choose this $x$!  I know that the elements of $A/(x)$ are of the form $a+(x)$, with $a$ of degree less than $x$ or zero. By minimality of $x$ this means that $a\in \{0, 1, -1\}$. Now I'm lost: how do we derive a contradiction from this?


/MT and /MD builds crashing, but only when debugger isn't attached: how to debug?

I have a small single-threaded C++ application, compiled and linked using Visual Studio 2005, that uses boost (crc, program_options, and tokenizer), a smattering of STL, and assorted other system headers.  (It's primary purpose is to read in a .csv and generate a custom binary .dat and a paired .h declaring structures that "explain" the format of the .dat.)  The tool is crashing (access violation on NULL) when run outside the debugger, only in release.  E.g. pressing F5 does not cause the tool to crash, Ctrl-F5 does.  When I re-attach the debugger, I get this stack:  ntdll.dll!_RtlAllocateHeap@12()  + 0x26916 bytes     csv2bin.exe!malloc(unsigned int size=0x00000014)  Line 163 + 0x63 bytes C csv2bin.exe!operator new(unsigned int size=0x00000014)  Line 59 + 0x8 bytes C++ >csv2bin.exe!Record::addField(const char * string=0x0034aac8)  Line 62 + 0x7 bytes  C++ csv2bin.exe!main(int argc=0x00000007, char * * argv=0x00343998)  Line 253   C++ csv2bin.exe!__tmainCRTStartup()  Line 327 + 0x12 bytes  C   The line it's crashing on is a somewhat innocuous-looking allocation:  pField = new NumberField(this, static_cast<NumberFieldInfo*>(pFieldInfo));   ...I don't believe it has reached the constructor yet, it's just allocating memory before jumping to the constructor.  It has also executed this code dozens of times by the time it crashes, usually in a consistent (but otherwise non-suspicious) location.  The problem goes away when compiling with /MTd or /MDd (debug runtime), and comes back when using /MT or /MD.  The NULL is loaded from the stack, and I can see it in memory view.     _RtlAllocateHeap@12 + 0x26916 bytes seems like a huge offset, like an incorrect jump has been made.  I've tried _HAS_ITERATOR_DEBUGGING in a debug build and that hasn't brought up anything suspicious.    Dropping a HeapValidate at the beginning and end of Record::addField shows an OK heap right up to when it crashes.  This used to work -- I'm not entirely sure what changed between now and the last time we compiled the tool (probably years ago, maybe under an older VS).  We've tried an older version of boost (1.36 vs 1.38).  Before dropping back to manual investigation of the code or feeding this to PC-Lint and combing through its output, any suggestions on how to effectively debug this?  [I'll be happy to update the question with more info, if you request info in the comments.]


I just tried to create a small shortcut to activate a conda env and run jupyter notebook. But I can't run it by double clicking.  I added chmod +x and changed the behaviour in nautilus (as recommended ). Nothing happens. The script only contains  source activate tensorflow jupyter notebook   Later I added #! /bin/bash but that didn't help either.  When I run the script from terminal with source myscript.sh it works fine.  Edit  This is not a duplicate. I've read that thread and did what was recommend ( as I've pointed out above) but this doesn't work for me.


Ubuntu 16.04 have support until April 2021. So in 2021 will i have to reinstall whole system or will be asked to update system by"system update like on windows" without formating hdd and losing all my preferences? Like every 5 years have to reinstall everything? Sorry to ask silly questions. I'm newcomer to Linux and I just want to use pc for daily things and don't want using terminal at all. Thank you


How == returns false even though two Strings s1 and s3 having same hashcode?

public static void main(String[] args) {     String str1 = "java";     String str2 = str1.intern();     String str3 = new String(str1.intern());     System.out.println("hash1=" + str1.hashCode());     System.out.println("hash2=" + str2.hashCode());     System.out.println("hash3=" + str3.hashCode());     System.out.println("str1==str2==>>" + (str1 == str2));     System.out.println("str1==str3==>>" + (str1 == str3)); }   ============================================output===> hash1=3254818 hash2=3254818 hash3=3254818 str1==str2==>>true str1==str3==>>false  =================================    Can anyone explain how == returns false even though s1 and s3 having same hashcode?


If I can, how do I install Ubuntu from Ubuntu?

Here's what I mean:  I normally install by running a Ubuntu Live USB, clicking "try" Ubuntu, and when I'm ready, I double-click the "Install Ubuntu" icon on the desktop.    Now, I have an eSATAp port and what I'd like to do is connect my hard drive directly to my laptop/desktop which already has Ubuntu running on it and simply run that same application that's available on the Live CD/USB to install it on the external drive.  I'm open to other methods as well, as long as I don't have to "burn" an ISO to a USB, then reboot from the USB, then install it to the external drive.  A million thanks!


Is HP 250 G6 compatible with Ubuntu? By default, it comes with Windows 10 and on www.support.hp.com I didn't find any linux drivers for it. I still didn't buy this laptop and it's so important for me to find out this information.


Properties of the solution of the Ordinary Differential Equation $y' = y(y-1)(y-2)$ as per the Initial conditions?

Consider the Ordinary Differential equation $y' = y(y-1)(y-2)$. Then from the different initial conditions, can we derive properties of the function $y$ ?  I thought of finding the solution to this differential equation, which I tried to use Partial fractions!, (any other easier or efficient method to solve this ODE?). After doing Partial fractions  I got  $0.5 \ln|y| - \ln|y-1| +0.5 \ln|y-2| = x + c$. Now if $y(0) = 0.5$, is the function $y$ decreasing?, well I thought of substituting value of $y(0)$ into the ode to get $y' = 0.5(0.5-1)(0.5-2)>0$, implying $y$ is decreasing (is this the correct way?). Also if $y(0) =1.2$ then using the above criteria I think $y$ is increasing? Also if $y(0) = 2.5$ then can we say anything about the boundedness of $y$ ? If $y(0)<0$, can we say $y$ is bounded below?.


Every time I see this expression, I can't help thinking it's grammatically wrong.  Till death do us part  Is it grammatically acceptable? Why is it used extensively in this form?


Is there a way to start a VNC session but without have the remote computer (an iMac) screen turn on ?  I tried to reduce the brightness to min on the physical machine but is not good enough.


Why does gravity have such an insignificant effect on particles at an atomic scale?

E.g. why do we experience gravity all the time, but on an atomic scale, the gravitational forces are so small?


Classifying all 2 dimensional Lie algebras (up to isomorphism)

How would one go about such a classification and is there anything interesting that can be said about their corresponding Lie groups?


My pc has been experience lag ever since it came back from a fan upgrade. Now i noticed that my cpu usage spikes from 10% to 80% and back in seconds, i see that svchost.exe is consuming 25% and system is spiking from 0% to 25% (i have 4 cores so it basicly consumes one core each). Does anybody has any idea of what to do?  Thanks in advance.  EDIT: I installed update KB3102810 and it partialy solved the problem,svchost does not spike anymore but System still spikes, meanwhile i noticed that in the services MsMpSvc, spikes up to 17%.


I would like to run a regression to test a hypothesis that alpha = 0 and Beta = 1. I understand minitab or SPSS regression will test whether alpha or beta is 0.   How do I test whether beta is equal to 1 using either one of the softwares?   Without needing to do extra calculation or changing the equation, is there a way to do regression(to test beta=1) using either one of these softwares ? I understand it can be done with eviews. Any “tricks” available with SPSS or Minitab?


Does Elementary OS support Windows keyboard?

I might install elementaryOS in my PC to replace Windows OS. If I do, will it support my Windows Keyboard?


How is it possible that unrolling scotch tape in a vacuum causes X-rays?

A fun kind of question...   In 2008, researchers at the UCLA's Department of Physics and Astronomy found that unrolling of scotch tape in a vacuum caused X-rays to be created.  First, energetic electrons were produced and then X-rays.   The study stated that 300,000 x-ray photons were produced and that they were bright enough to image a finger...   As Dr. Putterman stated "kind of a microscopic lighting effect"  So why does this happen???


I have a very simple problem. I want to write "a" in an equation, however output is .... Please see output. How i can overcome this problem?


Why is Snape the only Death Eater who can produce a Patronus?

In all the books, Snape is the only Death Eater who can produce a Patronus charm. Why can't any other Death Eaters produce a Patronus? Considering that they all went to Hogwarts, and would have learnt to produce it in NEWT classes, it seems surprising that Snape remains the only Death Eater to produce one until the seventh book.


How best to create angular pipes for a set?

I want to create a set of pipes in a modular manner that can fit together later like this image:     I was wondering how someone would best approach this. I would more importantly like to know how to create 45 degree extrusions without guessing like I normally do with these types of things... thanks :)  Making the straight pipes is easy my main concern is making the angled ones, and later on they are not "just right", and things don't fit together so well later..


What does "{} \;" mean in the find command?

Sometimes I see the following command:   find . -name  * -exec ls -a {} \;   I was asked to execute this.  What does {} \; mean here?


If $\sum a_n/k^n = 0$ for all $k$, then $a_n = 0$ for all $n$

Let $a_n$ be a sequence of complex numbers such that the sum from $n=1$ to infinity of $a_n/k^n$ is zero, for all k=1,2,3,... That is $$\sum_{n=1}^{\infty}\frac{a_n}{k^n}=0, k=1,2,3,...$$  Prove that $a_n=0$ for all n.  I want to use the identity theorem I think (it seems like it might work here), but I can't see how to apply it in this situation. Could anyone help with this please?


Union of $2$ set $A, B$ where $ A$ is a subset of $B$

I just started Set theory And I have the following question. Suppose I have $2$ sets, $A$ and $B$. $A$ is a subset of $B$ (contained inside $B$), then the union of these $2$ sets is $B$ right $?$ If no, could you guys explain to me why, if yes, could you guys provide a simple proof.  Thank you for reading my post.


I'm curious about this matter and have no true explanation for it. As I pinpointed in the title, when does Should precede the subject? I mean the example below (copied):  Should your work habits not like...  Why did Should come before the subject "your work"? Why wasn't it arranged as "Your work should not habit like..."? By the way, the sentence was on the beginning of the line.


How does the Malaysian Transit Pass work for Indian citizens?

Quoting from   Please check whether you are eligible for Transit Visa / Pass or not. The following are conditions for the said visa / pass: (i)         Indian visitor(s) who enter / depart to / from the country from Kuala Lumpur International Airport (KLIA) and Low Cost Carrier Terminal (LCCT)  only; (ii)         Visitor must possess a valid visa (Single Entry / Multiple Entry) from the destination country (only Australia, U.S.A., China, Japan, South Korea, New Zealand and Taiwan); (iii)        Visitor must possess a valid passport / travel document with an expiry date of not less than 6 months on the date of visit; (iv)        Visitor is not listed among those barred from entering Malaysia; (v)         Visitor must be in possession of a confirmed ticket to a third country; (vi)        Visitor must be able to finance his/her stay in Malaysia; (vii)       Visitor MUST visit the country in group (package tour) and the trip is either a packaged tour in Malaysia or in the destination country; and  We are a group of 3. 2 of us will hold a tourist visa from the destination country(Japan) and one with a residence card. Are we eligible for the Transit Pass? However What does the point (vii) mean group (package tour)? should this also contain accommodation (Hotel). My plan was to book an accommodation myself and visit places on my own? Also point (vi) how are we suppose to prove our finances? As it simply states must be able to finance. Edit: I am planning to book a ticket in such a way that I can spend 24 hrs in KUL and fly to Tokyo. A night in the hotel and day to visit places. I will be booking my tickets in Malaysia Airlines


Ubuntu-Lubuntu on a Intel i7-4500, 8GB RAM

I am switching to a Ubuntu-like OS (from Windows8) and I have been reading around about its derivates. I decided to choose between Lubuntu (for its idea of energy saving and lightweight) and the standard Ubuntu, so here is my question: is it really appreciable the difference of performance on a HP, Intel i7-4500 with 8Gb RAM (and Nvidia video card)?  Thank You!


Manipulate du's output to get a custom printout

I typically run the command below to check size on each directory.   du -sBM /* | sort -nr | head -n20   However, specifying a block size of "M" here will give everything a value in "M". The problem with that is once you get below 1M everything reports back as 1M. So this solution is not optimal for me. If I run the command below:  du -sh /* | sort -nr | head -n20   I get the output I really want (block sizes in G,M,and K) but its all out of order. For instance:  618M    /var 387M    /lib 336M    /home 260K    /root 184K    /dev 102M    /boot 32M /etc 32K /tmp 27M /lib64 24K /opt 16K /lost+found 14M /sbin 8.0K    /mnt 7.4M    /bin 4.0K    /srv 4.0K    /net 4.0K    /misc 4.0K    /media 4.0K    /cgroup 2.2G    /usr   I get M's on top of G's and K's on top of M's and so on. I want my output to look like this:  2.2G    /usr 618M    /var 387M    /lib 336M    /home 102M    /boot 32M     /etc 27M     /lib64 14M     /sbin 260K    /root 184K    /dev 32K     /tmp 24K     /opt 16K     /lost+found 8.0K    /mnt 7.4M    /bin 4.0K    /srv 4.0K    /net 4.0K    /misc 4.0K    /media 4.0K    /cgroup   Is there a one-liner here that would do what I want or would a script be a better solution here?


My coworker and I have been having this discussion for a day or two...  What is the most correct way to pronounce 'new' or 'news' ?  Does it rhyme with 'few' ? or 'snooze' ?  Does 'new crew' rhyme?  I know both 'noo' and 'nyoo' are correct, but what are the origins of the two different pronunciations?  Asking around the office, it seems that 'nyoo' might have a British English origin, but I would like to know if anyone is more knowledgeable on this topic.


Intuitive explanation for why blue light is refracted more than red light?

I understand the equation explaining angles of refraction related to wavelengths. But I'm looking for a more intuitive approach/visual explanation? Perhaps related to QM?


How may I install the right Java Virtual Machine?

I receive following error in terminal:  No suitable Java Virtual Machine could be found on your system. The version of the JVM must be at least 1.5. Please define INSTALL4J_JAVA_HOME to point to a suitable JVM. You can also try to delete the JVM cache file   I'm using 14.04.


How to implement multiclassing during character creation?

Assume I want to have characters defined by classes, archetypes, whatever. And there's no advancement, or at least sufficiently little advancement that the choices made at chargen always define the character.  But I want to have multiclassing. Or, more exactly, I want to have characters with differing numbers of archetypes without imbalancing them.  So a class/archetype can't be a package of mostly or entirely good abilities, because adding another class makes a character better. Thus, the first idea I had was to have chargen start with an "average" set of traits, and each class adds a package of advantages and disadvantages. Works numerically, but I know that "disadvantages cost negative points" systems are easily exploitable. That is, players will try to put PCs in situations that take advantage of their strong points. Only if players and their characters had no control over the situation would "disadvantages cost negative points" be balanced. Thus, having more advantages and disadvantages is generally a good thing. I presume it's for this reason that the Fate versions I've seen don't just give you a pool of points but specify how many skills of what value you must buy in chargen.  So what other options are there?  I recognize that  is about something very similar, but there's no answer satisfying my requirements.  From the description, Apocalypse World and its derivatives allow for cross-class abilities, but only through experience rather than at chargen. Other suggestions lean toward full point-buy, but that's not what I'm talking about. I don't want complex character generation. And again, I don't want to add abilities from other classes in play, but to have class combination in chargen.


How to create an instance of wpf UserControl at runtime?

My question beyond to get an instance, is how to get this instance as wpf UserControl.  I have a UserControl (Holder) that can show another UserControls (childs) into it, those controls are into same assembly, but user can select which ones must place into holder.   I´m creating the instances as this:          CapturasAdicionalesControl ctr = d as CapturasAdicionalesControl;         List<ICapturaAdicional> capturas = ctr.Capturas;         string assemblyName = "MyAssemblyPath";          Assembly assembly = Assembly.Load(assemblyName);          foreach (ICapturaAdicional captura in capturas)         {             Type capturaObj = assembly.GetType($"{assemblyName}.{captura.Control}");             InsertCaptura(capturaObj);         }   I get my type, but when try to add into Holder it generates an invalid cast from type to UserControl.  I was trying to use (UserControl)MyType ... MyType as UserControl with no results.  Now my questions are:    How to cast / convert my type (allready a usercontrol) to UserControl   if one isn't posible   How to get my user control as Usercontrol directly from the assembly  or how to create an instance of it if only have it's name?  Another approach would be very appreciated?     EDIT 1       private static Grid InsertCaptura(UserControl instance)     {         Grid NewGrid = new Grid()         {             Style = (Style)Application.Current.FindResource("TabOptionBackGroundStyle")         };         NewGrid.RowDefinitions.Add(new RowDefinition() { });         NewGrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });         NewGrid.RowDefinitions.Add(new RowDefinition() { });          NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { });         NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });         NewGrid.ColumnDefinitions.Add(new ColumnDefinition() { });          Grid.SetColumn((UIElement)instance, 1);         Grid.SetRow((UIElement)instance, 1);          NewGrid.Children.Add((UIElement)instance);          return NewGrid;      }


Creating Strip Map Index using ArcGIS Pro?

The Strip Map Index Features tool is listed amongst the  at version 2.2.  A workaround when needing a strip map index to be created, with an Angle field being populated so that each page can be rotated correctly, would be to use the  but is anyone aware of a workaround for creating a strip map index on a machine when only ArcGIS Pro (with its ArcPy) is installed?


I am trying to understand how to check equality of class instances.  Let's say I have a class as follows:  class Car(object):     def __init__(self):         self._color = None   I instanciate two objects as follows :  car1 = Car() car1._color = 'red' car2 = Car() car2._color = 'red'   The two objects having exactly the same attributes, I naively thaught that:  print(car1 == car2)   would print True , which is not the case.  What is happening here?  I did find a solution to check equality:  print(car1.__dict__ == car2.__dict__)   which does print True.  Was that in fact the simplest thing to do?


How to call the lookup columns in Rest API?

I need to call lookup fields in REST API.  Thanks on Advance


Derivation of time-dependent Schrödinger equation from De Broglie hypothesis

In a quantum mechanics script I'm reading, the Schrödinger equation is "derived" (more precisely, motivated) by the De Broglie hypothesis. It starts at  $$ \lambda = \frac{2\pi h}{p} $$ $$ \omega = \frac{E}{h} $$  then takes the partial derivatives of the wave $\Psi(x,t) = \Psi(0,0)e^{\frac{2\pi ix}{\lambda}-it\omega}$  $$ \tag{1} \frac{\partial}{\partial x}\Psi(x,t) = \frac{ip}{h}\Psi(x,t) $$ $$ \frac{\partial}{\partial t}\Psi(x,t) = -i\frac{E}{h}\Psi(x,t) $$  With the non-relativistic free particle $E=\frac{1}{2m}p^2$ one gets  $$ \tag{2} ih\frac{\partial}{\partial t}\Psi(x,t) = E\Psi(x,t) = \frac{p^2}{2m}\Psi(x,t) $$  From there, they miraculously get the time-dependent Schrödinger equation. I cannot understand this step. If I insert formula (1) for $p^2$ in (2), I get something with $(\frac{\partial}{\partial x}\Psi)^2$, which is not the second partial derivative of $\Psi$ with respect to $x$.  Any hints?