I am a postdoc working in one university till 1. July. I am leaving for another university after that. During my stay at my current work, I wrote a paper as a first author for a conference that will kick off in September.  Which affiliation should I use? Taking into account that the conference travel will be covered by the new employer, however, the paper is written at my current university.  By reading , it looks like using the two affiliations is one approach. But I'm not quite sure if the new employer will be happy with this.

I am moving from one job to another (postdoc to tenure track) this summer and I have papers in several stages of being written, these go from handwritten notes with all the necessary arguments to under revision at a journal. All the papers will have my new contact information put on them but where is the line for changing affiliation? It seems obvious to me that the one that is still in the handwritten notes stage will get the new affiliation and that the ones under revision won't. So somewhere in between is a line.   Where is it?  There are some similar questions so far (see  and  but they do not seem to be quite the same situation since I am not changing fields and the appointments are not concurrent.


I am trying to install Ubuntu 18.04 from a USB stick.  My computer setup is as follows:   MB: Asus X99-A USB3.1  CPU: Intel 5960X  GPU: Nvidia GTX 970  Screen (it might be relevant): Asus ROG Swift PG278Q (only possible to run with DP)   I have done some troubleshooting:   Update to latest BIOS and restore to optimized defaults Disabled Fast Boot Disabled Secure Boot   These changes have not had any effect on the current problem.  This system should run as a dual boot with Windows 10 which is installed in UEFI mode. I have also tried to install in legacy mode. I see the purple screen, then after several seconds there is a crash with other graphic errors. The graphical error in the picture below is when trying to install in UEFI mode.   picture of screen as it freezes on install  I know that this is probably not enough information to solve the issue, so please ask for the information you would think is relevant.  I can add that I have had similar errors when installing Ubuntu 16.04 and Linux Mint 19. I did somehow manage to install Linux Mint 18.1 a couple of years ago.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I am a member of a fair number of sites on the Stack Exchange network. On most of them, I see a "vote to close" button on posts. I have 900+ rep on the EE SE, but don't see a close button. That seems odd. Why don't they have one?

Formerly Reputation requirements compared. What are the reputation requirements for privileges on the various sites in the network? Also, how do reputation requirements for various privileges compare on different Stack Exchange sites? Specifically, the following types of sites:  Designed sites e.g. Stack Overflow, Ask Ubuntu, Gaming, etc. Public beta and non-designed sites Private beta sites  ...as well as any site-specific differences.


I have below program:  double tax = 180.09; double gTotal = 277.08;  double total = tax + gTotal;  System.out.println(total);   After execution it outputs 457.16999999999996.  After Google search I found that one of the cause for this behavior is that there may be no precise binary representation of the fraction part.  To verify that I tried below:  double dNum = 457.17; System.out.println(dNum);   It gave correct output as 457.17. In this case, why it is not printing 457.16999999999996.

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


I need to write a java pattern to identify all special characters except "0123456789" or "(" or ")" or "|" or "-" or " ".  Can somebody help me to get an answer?  I wanted to use Pattern.compile and pattern.matcher to find out this.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


According to the rule, the article "a" is for consonants and the article "an" is for vowels. Nevertheless, I have seen it frequently that many use the article "a" with both vowels and consonants. For example, they say "this is a expensive car" not "this is an expensive car" as it should be. Is there a reason for that?

I have noticed that a lot of native American speakers use the indefinite article "a" in front of words beginning with vowels, such as  interesting, old, apple  , etc. Is there any reasonable explanation?


I'm trying to create another workspace in my Ubuntu 18.10 minimal install machine and I cannot figure out how to create a new workspace.  Most websites say to hover your mouse on the right side of the activities screen, however this does not do anything:    Do I need to install a workspace package or enable workspaces in settings?  How do I use a workspace from the basic 18.10 install?  Edit: As it turns out, this is the Applications screen.  Somehow, on the new install of 18.10, the Windows key + tab no longer opens the Activities screen (I believe in 16 it did) and instead mimics the alt + tab shortcut to switch windows.  The new way to open activities is to press the Windows key.

Any idea how to have more than 2 workspaces on Ubuntu 18.04.1?


the determinant is :  $$\left|\begin{matrix} 1&-a_1&\cdots&-a^{n-1}_1\\ 1&a_2&\cdots&a^{n-1}_2\\ 1&a_3&\cdots&a^{n-1}_3\\ \vdots&\vdots&\ddots&\vdots\\ 1&a_n&\cdots&a_n^{n-1} \end{matrix}\right|$$  so i tried and got this :  $$\left|\begin{matrix} 1&0&0&\cdots&0\\ 1&a_2+a_1&a_2(a_2-a_1)&\cdots&a^{n-2}_2(a_2-a_1)\\ 1&a_3+a_1&a_3(a_3-a_1)&\cdots&a^{n-2}_3(a_3-a_1)\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 1&a_n+a_1&a_n(a_n-a_1)&\cdots&a_n^{n-2}(a_n-a_1) \end{matrix}\right|$$  and i dont know how to deal with the $a_k+a_1$  since i need the common factor of $a_k-a_1$. i would very much need a hint .

I reduced a certain determinant to the following which has the form: \begin{vmatrix} 1&1&\cdots & 1 \\ -a_1&a_2&\cdots &a_n\\ -a_1^{2}&a_2^{2}&\cdots&a_n^{2}\\ \vdots&\vdots&\ddots& \vdots\\ -a_1^{n-1}&a_2^{n-1}&\cdots&a_n^{n-1}\\ \end{vmatrix}  To clarify a bit, it is exactly the Vandermonde determinant except the first column is negative, while the $(1,1)$-entry is still $1$.   I think the key is to apply Vandermonde determinant yet I can't proceed. There may be a quick answer to this, however. Any hints?


In Revenge of the Sith, Palpatine told all the Clone Commanders across the galaxy, to execute Order 66.   While the Jedi were on missions, the clones were given an order and not one Jedi sensed anything.  If they did sense it, could they have escaped? Or did the Dark Side hide the clones?

If you go back to Attack of the Clones, Anakin and Obi-Wan sensed that poisonous alien worms were about to kill Padme. Back in Revenge of the Sith, the Jedi could take on the legion or if there were too many, they could at least escape.


For the next U19 CWC happening in bangladesh 2016.  What is the age cut off for full icc member teams?  What is the age cut off for associate icc member teams?

I have some doubts under this topic,   Can a player aged 19 play under 19 international cricket match? (Since 19 is not under 19) Consider a player having birthday during the series/tournament. How the age will be calculated for him?


I read this sometime in the 2000s, in another state, so I can't go back and check the shelves.  A scientist discovers time-travel, or something like it -- it's a time-sea. Swimming in it causes ripples or waves that change the timeline. More and more time-changed civilizations enter the sea to battle. The swimmers have tails, the length which represents their life-span or memories? Chop off the tail, and they remember less. The best warrior is one with a super-short tail and hardly any memories.  It was definitely a novel, and not a short story in a collection. Beyond that -- no idea of author, title, or even the cover. Except that I read it in hard-cover, so not a straight-to-mass-market pulp.

I remember reading a book where people figured out time travel and when they entered "Time" they could swim through it, but it would cause ripples and change things.  They would take certain time zones and physical locations as their new currency, eventually there were wars in the ocean of time.  After a while there was a hardening of the ocean of time.  I also remember that they never went to the beginning for fear of erasing Humans completely.  Characters: No main Characters  Type: A narrative history (Sci-Fi)  I read this book probably close to 12 years ago (2003?)  What book is this?


I'm aware of $.extend, which does almost what I need, but it also seems to 'unwrap' the prototype, by copying over all the methods as members of the new object. Is there any way to tell it to skip inherited members, or do I have to roll my own copy function?  Here's what I currently have, but I'm not sure if it can be improved upon:  function Foo() {   this.x = 3;   this.y = {a: 4}; } Foo.prototype.z = 5; Foo.prototype.clone = function() {   var res = new Foo();   for (var key in this) {     if (this.hasOwnProperty(key)) {       // assuming that all members are plain values or objects/arrays       if (this[key] instanceof Array) {         res[key] = $.extend(true, [], this[key]);       } else if (this[key] instanceof Object) {         res[key] = $.extend(true, {}, this[key]);       } else {         res[key] = this[key];       }     }   }   return res; };  var foo = new Foo(); var bar1 = $.extend(true, {}, foo); // {x: 3, y: {a: 4}, z: 5, clone: function} var bar2 = foo.clone(); // {x: 3, y: {a: 4}}   Update: looking at $.extend implementation, it seems very similar to what I have, except for hasOwnProperty check, so perhaps this is the best way to do it after all?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I am trying to create one form.but at the time of adding spinner it is showing null pointer exception.What should i do?How Can i Solve this? Everytime i use spinner it gets me error at setAdapter() method this is my code...  import android.app.Activity; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Spinner;  import java.util.ArrayList; import java.util.List;  public class Complaint extends AppCompatActivity implements       AdapterView.OnItemSelectedListener {  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.content_complaint);      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);     Spinner sp=(Spinner) findViewById(R.id.spinner);     List<String> categories = new ArrayList<String>();     categories.add("चौकशी");     categories.add("तक्रार");     ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>   (getApplicationContext(), android.R.layout.simple_spinner_item,categories );      // Drop down layout style - list view with radio button     dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);      // attaching data adapter to spinner     sp.setAdapter(dataAdapter);      sp.setOnItemSelectedListener(this);  } @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {  }  @Override public void onNothingSelected(AdapterView<?> parent) {  }}

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I want to integrate QGIS 2.12.3 or 2.13 with GRASS 7, but I still haven't been able to do so.  Can someone please tell me how can I do this with a stable QGIS version.

I stumbled across the GRASS-Tool  but could not find it in my QGIS processing toolbox. I found out that it is an addon for  GRASS 7 that I already installed in GRASS 7 standalone. How can I import Grass 7 into QGIS?  I installed the latest QGIS Version with the OSGeo4W installer and enabled Grass for installation. The thing is, that the OSGeo4W installation installed Grass 6.4.3 and not Grass 7.  I do know how to  (I have already done this for Grass 6.4.3 and for OTB). I am wondering how it is possible to make GRASS 7 (tools and addons) available within the processing toolbox?   I updated Windows 7 to Windows 10.


I am trying to install VLC from Ubuntu Software Center on Ubuntu 14.04. It always says that it failed to download the package and that I have to check my internet connection. I have no problem with my internet connection. Just before I tried to install VLC, I had installed other packages. I tried then " sudo apt-get update " and "sudo apt-get install --fix-missing", but the problem is sitill unsolved. What is the problem, and what are the possible solutions?

After I installed Ubuntu , I cannot update any software with the error message "failed to download package files". After having googled, I have tried:   sudo apt-get update sudo apt-get upgrade changed to another sources   But I still got the same error message. And there is no problem with internet connection as i can connect to internet using Firefox in Ubuntu.  Any ideas?


This was a job interview question someone asked about on Reddit. ()  How can you generate a uniform distribution on $\{1,\dots,7\}$ using a fair die?  Presumably, you are to do this by combining repeated i.i.d draws from $\{1,\dots,6\}$ (and not some Rube-Goldberg-esque rig that involves using the die for something other than rolling it).

What is the most efficient way to simulate a 7-sided die with a 6-sided die? I've put some thought into it but I'm not sure I get somewhere specifically.  To create a 7-sided die we can use a rejection technique. 3-bits give uniform 1-8 and we need uniform 1-7 which means that we have to reject 1/8 i.e. 12.5% rejection probability.  To create $n * 7$-sided die rolls we need $\lceil log_2(  7^n ) \rceil$ bits. This means that our rejection probability is $p_r(n)=1-\frac{7^n}{2^{\lceil log_2(  7^n ) \rceil}}$.  It turns out that the rejection probability varies wildly but for $n=26$ we get $p_r(26) = 1 - \frac{7^{26}}{2^{\lceil log_2(7^{26}) \rceil}} = 1-\frac{7^{26}}{2^{73}} \approx 0.6\%$ rejection probability which is quite good. This means that we can generate with good odds 26 7-die rolls out of 73 bits.  Similarly, if we throw a fair die $n$ times we get number from $0...(6^n-1)$ which gives us $\lfloor log_2(6^{n}) \rfloor$ bits by rejecting everything which is above $2^{\lfloor log_2(6^{n}) \rfloor}$. Consequently the rejection probability is $p_r(n)=1-\frac{2^{\lfloor log_2(  6^{n} ) \rfloor}}{6^n}$.  Again this varies wildly but for $n = 53$, we get $p_r(53) = 1-\frac{2^{137}}{6^{53}} \approx 0.2\%$ which is excellent. As a result, we can roll the 6-face die 53 times and get ~137 bits.  This means that we get about $\frac{137}{53} * \frac{26}{73} = 0.9207$ 7-face die rolls out of 6-face die rolls which is close to the optimum $\frac{log 7}{log6} = 0.9208$.  Is there a way to get the optimum? Is there an way to find those $n$ numbers as above that minimize errors? Is there relevant theory I could have a look at?  P.S. Relevant python expressions:  min([ (i, round(1000*(1-(  7**i )  /  (2**ceil(log(7**i,2)))) )/10)  for i in xrange(1,100)], key=lambda x: x[1]) min([ (i, round(1000*(1- ((2**floor(log(6**i,2))) / (  6**i ))   )    )/10)  for i in xrange(1,100)], key=lambda x: x[1])   P.S.2 Thanks to @Erick Wong for helping me get the question right with his great comments.  Related question:


I found some text, which has weird (for me) usage of auxiliary verb - do:     Although C# doesn't strictly speaking have a pre-processor, it does have conditional compilation symbols which can be used to affect compilation.   I cannot understand correctness of this phrase. I thought that correct variant is:     it has

This morning I read this sentence (see ):     On July 24th and again on July 29th,   Egyptian police did shoot dead unarmed   African migrants attempting to cross   that border.   Why "did shoot" and not "shot"?


I need to prove that $\mathbb{Z}[\sqrt{-3}]$ is not a Euclidean domain. I tried to show that $\mathbb{Z}[\sqrt{-3}]$ is not  a P.I.D. but all ideals that I generate by two elements, turn out to be principal.  I already appreciate your help in advance.

I know that $\mathbb Z[\sqrt{-3}]$ is not a Euclidean domain under the usual norm $N(x + y\sqrt{-3}) = x^2 + 3y^2$, but that does not necessarily mean that it can't be a Euclidean domain. Is it possible to define some norm that could make it into a Euclidean domain?


Suppose that n > 1. Prove that n divides $ φ(2^n - 1) $ .  Hint: Show that 2 has order n mod $ 2^n - 1 $

If $2^p-1$ is a prime, (thus $p$ is a prime, too) then $p\mid 2^p-2=\phi(2^p-1).$  But I find $n\mid \phi(2^n-1)$ is always hold, no matter what $n$ is. Such as $4\mid \phi(2^4-1)=8.$  If we denote $a_n=\dfrac{\phi(2^n-1)}{n}$, then $a_n$ is , but how to prove it is always integer?  Thanks in advance!


Any tips on how I should properly be naming python variables? Like any correct forms or for clean code. Like for instance myNum = 1  or mynum = 1  or my_num = 1

Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase:  // C# example string thisIsMyVariable = "a" public void ThisIsMyMethod()   In Python, I have seen the above but I have also seen underscores being used:  # python example this_is_my_variable = 'a' def this_is_my_function():   Is there a more preferable, definitive coding style for Python?


The email notice that bounties have ended and are entering the grace period as well as the inbox notification seem to happen before the bounty period is actually over.    Several similar requests marked as bugs have been turned away as "by design", but I believe this is kind of silly. This keeps coming up and should be fixed.  If the timing mechanism isn't going to get fixed so that it actually sends notices at a consistent time in relation to the end of the period, then at least update the copy. If you don't know whether the period is up or not, don't pretend like you do. Instead of "has completed" say "completes today at HH:MM UTC" and let the user figure it out when they follow the link. But even if the timing mechanism doesn't know ahead of time you should be able to query the end timestamp and regenerate the string based on the current time. There shouldn't be any reason the notification can't read just like the page does at the time the notification is sent.

Noticed this many times but was too lazy to post.  So I see a message in my inbox that bounty is completed and now in grace period, however its title says that "bounty expiring soon"    Wonderful (not wonderful of course). I click it, and... guess what?    Ok. So 49 mins left. But the main problem is that time traveling is . (if it is not, please forbid it).


Currently I have my program able to achieve this with IP address using regex.Replace() to search the input string for an IP and swap it with the new one keeping the start and end of the URL   so with the following test1 goes from "" > ""  Regex ipAddress = new Regex("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b", RegexOptions.Compiled); string test1 = "https://11.1.11.11:8080/"; Console.WriteLine(ipAddress.Replace(test1,"22.2.22.22"));   however when I try this with a host name for example "" > "" the following code doesn't find the hostname? How come with the IP adresss it is able to find and replace the IP but with hostname it cannot?  Regex hostname = new Regex(@"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9]*)\.)*([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9]*)$"); string test2 = "https://google.com:8080/"; Console.WriteLine(hostname.Replace(test1, "facebook.com"));

What is the nicest way of replacing the host-part of an Uri using .NET?  I.e.:  string ReplaceHost(string original, string newHostName); //... string s = ReplaceHost("http://oldhostname/index.html", "newhostname"); Assert.AreEqual("http://newhostname/index.html", s); //... string s = ReplaceHost("http://user:pass@oldhostname/index.html", "newhostname"); Assert.AreEqual("http://user:pass@newhostname/index.html", s); //... string s = ReplaceHost("ftp://user:pass@oldhostname", "newhostname"); Assert.AreEqual("ftp://user:pass@newhostname", s); //etc.   System.Uri does not seem to help much.


Sometimes I want to install a program when offline. But apt-get downloads as you install.  Is there a way to install a program, like you would install a .exe, on Ubuntu?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


$$\int_0^{\frac{\pi}{2}}\arctan\left(\sin x\right)dx$$   I try to solve it, but failed. Who can help me to find it?  I encountered this integral when trying to solve $\displaystyle{\int_0^\pi\frac{x\cos(x)}{1+\sin^2(x)}\,dx}$.

I came across the following sum: $$\sum_{k=0}^{\infty} \frac{(-1)^k}{(2k+1)^2}\frac{4^k}{{2k \choose k}}$$    I thought that this can be evaluated using the expansion of $\dfrac{\sin^{-1}x}{\sqrt{1-x^2}}$ but I couldn't make any use of it. Then I tried to use the following: $$\frac{1}{(2k+1)}\frac{1}{{2k \choose k}}=\frac{\Gamma(k+1)\Gamma(k+1)}{\Gamma(2k+2)}=\int_0^1 x^k(1-x)^k\,dx$$ but this didn't help either and now I am stuck.   Any help is greatly appreciated. Thanks!    EDIT:  The sum originated from the following definite integral:  $$\int_0^{\pi/2}\tan^{-1}(\sin x)\,dx$$


otherdata otherdata start_data one two three four end_data otherdata otherdata   The resulting output should just be:  one two three four   This looked like a job for sed to me:  sed -n '/start_data/,/end_data/{1d;$d;p}' myfile   Did not work. First line was deleted, but not the last line! (for no reason that I could explain by logic so far)  OK, so let's try the ugly way:  sed -n '/start_data/,/end_data/{/start_data\|end_data/!p}' myfile   Fair enough, this works. But I'd like to make the shorter method work as well, as the resulting output will always contain the two patterns on first and last line, since we're only extracting the data in between.  Why does sed choke at the attempt of combining the 1d and $d statements in curly braces?

I'm going to submit form using cURL, where some of the contents is come from other file, selected using sed  If param1 is line matching pattern from other file using sed, below command will works fine:  curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit   Now, go to the problem. I want show only text between 2 matching pattern excluding the matching pattern itself.  Lets say file.txt contains:  Bla bla bla firstmatch It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. secondmatch The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.   Currently, lots of "beetween 2 matching pattern" sed command won't remove firstmatch and secondmatch.  I want the result to become:  It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.


I dual-boot my laptop and use Windows 7 Pro primarily and have Ubuntu 13.10.  I've created a raw disk vmdk of the entire drive. I also use the latest VirtualBox. I would like to start Ubuntu in VirtualBox but have issues. It will boot to the log in screen. I log in, but the screen goes black. I have not been able to find a solution so far and hope someone might have an idea to try.  Thanks

I'm having some problems getting Ubuntu to install. I'm running Windows XP Home (32bit) on an older Dell Dimension 2350 with 1GB ram, trying to install either Ubuntu 12.04 LTS (32Bit) or 13.04 (32Bit) inside VirtualBox. Both versions of Ubuntu don't make it past the purple screen with the loading dots. When I change over to the "non-graphical" version, with the scrolling text, it starts to list a series of tests that are either [ok] or [fail]. There are only a few that fail, and my search on those indicates that they're not that important. There are a few settings for this VM that I've tried tweaking based on other searches for an answer (such as Enabling IO APIC, switching the Chipset to ICH9, changing the Video Memory size, Enabling 3D Acceleration, and Enabling PAE/NX. More or less, I get to the same point.  (Once I got to the screen with Desktop in the upper left corner, and the red-ish background. But an error came up that basically said there was an error, and that I could send off a report or hit cancel. I hit cancel, and instead of the installer coming up, nothing happened)  The last check that is run is "Stopping System V runlevel compatibility [ok], and a bunch of Starting [ok]s. Then I get a black screen, then a half purple half black screen graphical error. Sorta looks like snow, I don't know how else to describe it. After a while. That goes away and is replaced by a black screen again. Nothing else happens.    I like to think I'm fairly good at solving problems and following instructions, but I don't even know how to go about diagnosing this. Most of the solutions I've seen seem to involve entering things into a command line, but doesn't the OS have to be installed to be able to do that?  This is a for fun/learning experience project, so it's nothing too pertinent. But I would like to figure this out.


I would like to calculate $ 2^{5^{77}}\bmod 113 $. I solved similar problems but with smaller exponent e.g. $ 2^{185}\bmod 113 $ with successive squaring method. Is there any way to use this method to solve it?

I have to find the remainder of $10^{115}$ divided by 7.   I was following the way my book did it in an example but then I got confused. So far I have, $\overline{10}^{115}$=$\overline{10}^{7*73+4}$=($\overline{10}^{7})^{73}$*$\overline{10}^4$ and that's where I'm stuck.   Also, I don't fully understand what it means to have a bar over a number.


I'd like to know what the difference is between shutdown -H (halt the machine) and shutdown -P (poweroff the machine). I understand what poweroff means; it's rather self-explanatory. But what exactly is "halt"?  Background:  I need to turn off my PC with a terminal-command because otherwise the shutdown/reboot hangs.  I found the command shutdown -H -P +0 . It seems to be combination of the two options and it really works fine.  P.S. I have Lubuntu 18.04.2, 64 bit

When I issue the following:  sudo shutdown now   ..my newly commissioned Ubuntu 14.04 server doesn't shut down. It stops with the following message:  * Stopping System V runlevel compatibility Give root password for maintenance: (or type Control-D to continue):   If I type in the root password, the machine simply sits there at the shell prompt.


I came across this simple proof:     We show that Hermitian operators have real eigenvalues. The definition   of a Hermitian operator is      \begin{equation} \langle \phi_i | \hat A | \phi \rangle = \langle  \phi_i | \hat A | \phi \rangle^* \tag{1} \end{equation}      Then if $|\psi\rangle$ is an eigenvector of $\hat A$, we have      $$ \hat A|\psi\rangle = \lambda|\psi\rangle \tag{2}$$      and therefore       $$ \langle\psi|\hat A|\psi\rangle = \lambda . \tag{3}$$      If $\hat A$ is hermitian, we my apply (1) so that      $$\langle\psi|\hat A|\psi\rangle = \langle\psi|\hat A|\psi\rangle^*$$   $$\lambda = \lambda^*.$$   What I am not getting, is the step from (2) to (3). Seems to me that would be true only if $\psi$ is normed ($\langle\psi|\psi\rangle = \int \psi^*\psi \text d \tau = 1$).  Is it true in general that eigenvectors/eigenfunctions of operators are normed and orthogonal?

Alastair Rae states that there are 4 postulates of Quantum Mechanics in his text on the subject matter.  The first part of his second postulate can be stated as:      Every dynamical variable may be represented by a Hermitian operator whose eigenvalues represent the result of carrying out a measurement of the value of the dynamical variable...   My question is: just how much can we deduce from saying that the some of the operators involved in Quantum Mechanics are Hermitian?  When I use the word Hermitian, I am referring to the property that $A=A^+$ where $A$ is an operator and $A^+$ is the adjoint of $A$.  Does an operator being Hermitian automatically imply that there will exist eigenfunctions and eigenvalues corresponding to this operator?  Does being Hermitian imply that, should there exist eigenfunctions corresponding to this operator, they will form a complete and orthonormal set?  That any wavefunction can be expanded in terms of these eigenfunction?  Just how much is hidden in the word "Hermitian"?


We all know how an electric current causes magnetic fields. But when a single electron is flowing through the wire, how is this electron creating the magnetic field or how are electrons responsible for magnetic field around a wire?

I'm tutoring high school students. I've always taught them that:     A charged particle moving without acceleration produces an electric as well as a magnetic field.   It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts moving, it starts producing a magnetic field. Why? What happens to it when it starts moving? What makes it produce a magnetic field when it starts moving?


Below is my code to which i'm trying to pass a 3 argument like "client name with datacenter" hostname ip so, "client name with Datacenter" is the 1st argument likewise hostname and ip is 2nd and 3rd argument. is there any way i could pass the first argument as it is with spaces, as of now it's now not working as expected, because after space every word it's taking as different argument. Actual issue is i want to pass this whole sentence as argument. "Actual Servers to be added". Is there any way i could do this? So this argument will be further used to look into a text file and search the string where the additional arguments $2 and $3 will get add. #! /bin/bash  user=whoami #file1=/home/xymon/server/bin/ghostlist.cgi logfile=logfile1  ###Local Log file###### client="$@" hostname=$2 ip=$3 ####taking backup while editing hosts file everytime##### #cp -pr /home/xymon/server/etc/hosts.cfg "/home/xymon/server/etc/hosts.$(date +"%Y%m%d")" echo $ip echo $hostname  echo "hostfile is modified @ `date`" >>$logfile printf '%s\n' 'g/"'$client'"/+2i\' ''$ip'     '$hostname'            # testip "TRENDS:*,netstat:netstat|netstat1|netstat2|netstat3"' 'wq' | ed -s hosts

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I'm having trouble creating toon colors, without shadow. Just clear solid color.  I use 2.75 and 2.76   I get this     How can I create flat cartoon colors?

Is there a way to make a true toon shader material in Cycles?  Here's, in order of importance, what would be ideal to find in such a shader:   Must use Cycles Must be an actual shader Must not rely on lighting Must be independent of camera position Must react directly to lighting rather than manually having to change it to emulate it Should be easily made into a node-group Should have the following configurability:   Main color Darkness color Shadow depth (how far the shadow goes from the unlit side)    Below, I'll be listing some already-found methods and their flaws:    Cycles's Toon BDSF:  Source: Blender  Result:    Node setup:    Cons:   Not a clear-cut two-color shading Reacts to diffusion of surrounding objects      Mask & Ramp:  Source:   Result:    Node setup (Compositor):    Cons:   Very grainy Does not support colour textures Not easy to change shadow depth in a nodegroup Not a material, requires compositor Requires use of object indexes     Shadeless Fresnel:  Source:   Result:    Node setup:    Cons:   Uses camera's direction Ignores lighting Not easy to change shadow depth in a nodegroup     Shadeless Normal:  Source:   Result:    Node setup:    Cons:   Ignores lighting Direction of shadow is manually changed Not easy to change shadow depth in a nodegroup   However, this one is easily the best one. It's pretty great, and would work still images very well.    That's all I've got. Does anyone else have any methods that fall under most of the criteria I listed above? Also note that OSL is totally fine, if it works.


I've been told that there are dangers in refreezing defrosted chicken as well as that it changes the taste and texture of the chicken. Is this the case?  I cook for myself but buy bulk - thus I often end up defrosting packs of chicken breasts, for example, in order the get them apart and take out one piece, and then refreezing the rest. I have never had any issues but I would like to know whether this is completely safe and/or whether the culinary quality of the meat gets altered. Also, are there any other issues to be aware of when defrosting and refreezing chicken (or other meat for that matter)?

I've often been told by people that I shouldn't refreeze meat (particularly hamburger meat) once it has been thawed.  However, this seems a little silly to me.  I can't imagine how meat that hasn't been bought fresh and local could find its way to my kitchen with out thawing and being refrozen a couple of times.  How much damage can one more thawing and refreezing really do?  Can it really be that dangerous disease wise? Or is this just one of those urban myths?


Let me introduce you to the components of my problem. A Array called cards that has been created in the main method. A class called Card that has 2 class variables, suit and number. A ArrayList called ph (stands for playerHand) in a public class called Hand and finally a static public variable called counter. So now let me explain my dilemma.  In the main method the Array cards contains 52 card objects each with their own data. In the hand class I have a method called draw().  Here is some of the code inside the hand class.  ArrayList<Card> ph = new ArrayList<Card>(); public static int cc = 0;        void draw() { ph.add(new Card());  ph.get(cc).num = cards[cc].num; ph.get(cc).suit = cards[cc].suit;  cc = cc + 1; }   However I have the following error on the 2 lines before cc = cc + 1. "cards cannot be resolved to a variable"  How do I transfer the data between the Array and the ArrayList?  EDIT: This is different from the post this is marked as a duplicate of because here the array is in a different class so that solution wouldn't work.

I have an array that is initialized like:  Element[] array = {new Element(1), new Element(2), new Element(3)};   I would like to convert this array into an object of the  class.  ArrayList<Element> arraylist = ???;


Let's assume I have got a List of Flight Objects  public class Flight {     private int passengers;     private int price     ...      //getters and Setters }  List<Flight> flightList = new ArrayList<Flight>();   Now i need to accumulate price per passenger and the Price, because I have to be able to proceed both informations later on. so I would create two methods:  public int calculatePrice(List<Flight> flightList) {     int price = 0;     for (Flight flight : flightList) {         price = price + flight.getPrice();     }     return price; }  public int calculatePricePerPassengers(List<Flight> flightList) {     int pricePerPassenger = 0;     for (Flight flight : flightList) {         pricePerPassenger = (pricePerPassenger) + (flight.getPrice() / flight.getPassgers());     }     return pricePerPassenger; }   I have got like 4-5 methods of the same type. I am not sure whether there is too much redundancy, because I call the for loop 4-5 Times and I could easily do all the operations in one for loop, but that would have the effect of multiple return values. So is this the appropriate way ? (just a dummy example)

I want to return two objects from a Java method and was wondering what could be a good way of doing so?  The possible ways I can think of are: return a HashMap (since the two Objects are related) or return an ArrayList of Object objects.  To be more precise, the two objects I want to return are (a) List of objects and (b) comma separated names of the same.  I want to return these two Objects from one method because I dont want to iterate through the list of objects to get the comma separated names (which I can do in the same loop in this method).  Somehow, returning a HashMap does not look a very elegant way of doing so.


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

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


I am looking for some trick to do a system call after the document is finalized. The idea is that the finished document is copied or converted or emailed or whatever without a shell script or batch file.  The following MWE explains what I try to do:  \documentclass{article} \usepackage{etoolbox}  % just an example for a system call \newcommand{\mycall}{%   \immediate\write18{copy /Y \jobname.pdf dummy.pdf} }  \AfterEndDocument{\mycall}  \begin{document} Hello World. \end{document}   I know that this MWE gives not the desired result because \AfterEndDocument is still too early. I would like to place \mycall after the final shipout, if possible.  I also know a workaround, i.e. writing the document content in a separate file and compile that file (the TikZ externalize approach), but is it possible to do such a call from within the original document? Any ideas?

I like to escape to the shell using \write18 at the very end of the compilation after the PDF file got completely written and was closed, so that I can use it as part the shell command. Is this somehow possible or does TeX simply closed the PDF at the very last thing? Placing it direct before \end{document} or in \AtEndDocument doesn't help (unsurprisingly).  AFAIK \writes are actually whatsit objects and would be normally be part of the document. So I don't have much hopes.  Background  This is used for automatic PDF-to-PNG conversion as a new feature of standalone. At the moment I do this in the preamble in the second run when the old PDF did not yet got opened. This works fine, but I would like to avoid the need to compile standalone diagrams twice.


My fridge door was left open over  night with the fridge light on.  Is my dairy products safe to eat?

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?


Proposition 8.5.10 (Principle of strong induction). Let $X$ be a well-ordered set with an ordering relation $\le$, and let $P(n)$ be a property pertaining to an element $n \in X$ (i.e., for each $n\in X$, $P(n)$ is either a true statement or a false statement). Suppose that for every $n \in X$, we have the following implication: if $P(m)$ is true for all $m \in X$ with $m <_{X} n$, then $P(n)$ is also true. Prove that $P(n)$ is true for all $n \in X$.   Exercise 8.5.10. Prove Proposition 8.5.10, without using the axiom of choice. (Hint: consider the set  $$Y: = \{n \in X : \text{$P(m)$ is false for some $m \in X$ with $m \le_X n$}\},$$ and show that $Y$ being non-empty would lead to a contradiction.)  I know that every non-empty subset of $X$ has a minimum element. I guess that I need to use this to solve this question, but I don't know how.   I appreciate if you give me some help.

Context: I keep running into circular reasoning in attempting to derive strong induction (more generally "induction" whether it be weak or strong) from the well-ordering principle. Assume:     Peano Axioms w/ Well-Order: (I realize these are presented semi-informally)         (P1) $\ \exists x[x\!=\!1]$;   (P2) $\ $there exists an unary ("successor") function $S$ on $\mathbb{N}$ (i.e., $x\!\in\!\mathbb{N}\rightarrow S(x)\!\in\!\mathbb{N}$);   (P3) $\ \forall x[S(x)\!\neq\!1]$;   (P4) $\ \forall x\forall y[x\!\neq\!y\rightarrow S(x)\!\neq\!S(y)]$   (P5') $\ $Well-Ordering Principle: Every non-empty set includes a least-element: $$ \forall B\Big[\emptyset\!\subset\!B\!\subseteq\!\mathbb{N}\longrightarrow\exists m\big[m\!\in\!B\wedge\forall p[p\!\in\!B\rightarrow m\!\leq\!p]\big]\Big] $$   Note: Since I am trying to show the logical equivalency between Induction and the Well-Ordering Principle, I am assuming the latter as an axiom and treating the former as a theorem (below). The relation $\leq$ used above is defined next.         Order Relation         (O1) $\ x\!<\!y\leftrightarrow\exists z[x\!+\!z\!=\!y]$   (O2) $\ x\!\leq\!y\leftrightarrow[x\!=\!y\vee x\!<\!y]$         Addition (since order above is defined with "$+$")         (A1) $\forall x[S(x)=x+1]$   (A2) $\forall x\forall y[x+S(y)=S(x\!+\!y)]$      With this as background, below is the theorem and proof I see most often (or some variation thereof) in textbooks and online forums.     Theorem: The Well-Ordering Principle (P5') implies the Strong Induction Principle.      Proof: Suppose $X\!\subset\!\mathbb{N}$ with: (1) $1\!\in\!X$, and (2) $\forall x[x\!<\!k\rightarrow x\!\in\!X]\rightarrow k\!\in\!X$. Assume $X'\!\equiv\!\mathbb{N}\setminus X$ is non-empty. From Well-Ordering Principle (P5'), $X'$ includes a least element $m$. From (1), $m\!\neq\!1$. Since $m$ is the least element of $X'$, then all $x\!<\!m$ must belong to $X$. However, property (2) implies that $m\!\in\!X$, a contradiction. Thus, $X'$ must be empty and $X\!=\!\mathbb{N}$.   My problem is with the highlighted sentence above, which appears to me to require the result that $\neg(m\!\leq\!x)\leftrightarrow x\!<\!m$, which I believe is based on the Trichotomy Property (exactly one of $x\!<\!y$, $x\!=\!y$, $x\!>\!y$ holds). However, the only proof of the Trichotomy Property (that I am aware of) based on the above axioms/definitions alone uses Induction (see ). Thus, it appears the reasoning is circular (induction is used to prove an intermediate result that is then used to prove induction).  Question: Assuming my understanding above is correct, my question simply put is this: does a proof exist of the Trichotomy Property for $<$ as defined above that does not require a proof based on induction?


I'm trying to recall a story I read several years ago.  It was an urban fantasy with Greek gods involved in the plot.  Our protagonist was a magical hacker of some sort, and he had a familiar, a goblin who could turn into a computer with access to magical networks.  Some of the more powerful characters had "troll mainframes."  The primary antagonist was Eris, and she had computers of her own: Apples.  (Yes, the author really went there.)  Does this ring any bells for anyone?

I recall being somewhat impressed by a novel I read a few years back – this book may be less than five years old – which featured a college-aged man.  He had a laptop which transformed into a troll goblin that served as his familiar.  In the story's universe, mages had switched to the Internet for most of their magic & communication.  The main character was essentially a magical hacker, and spent much of the book fighting against his evil aunt (I think, I know it was a female relative) with the help of his cousin.  Older forms of magic were also featured, including using special paintings as magical portals, and spells being whistled by wizards.  It features a scene at a gas station where the laptop is disabled by a virus, and the main character whistles a spell to reanimate dinosaurs from the gasoline.  Is this ringing any bells?


Recent observations of the accelerating expansion of the universe have been quantified and for the time being given a name as to the cause: Dark Energy. And from what I've read from other, similar questions is that Dark Matter is a pressure that is causing this expansion, although we don't know the details of the mechanism yet behind this pressure.  But is there anything in our present theories of physics or observations that rules out gravity itself as the cause of this expansion? I'm thinking along the lines of an analogy: the nature of the strong nuclear force which, at close distance, tends to bind together nucleons, but at even closer distances repels them.  Couldn't this repulsive force we observe, this dark energy, just be the effects of the gravitational force on a larger scale of space?

I'm a statistician with a little training in physics and would just like to know the general consensus on a few things.  I'm reading a book by  which basically tries to state how GR makes failed predictions in certain situations. I know GR is well extremely tested, but I imagine all physicist are aware it doesn't always hold up.  The book tries to put forth modified theories of gravity that make do without the need of dark matter and dark energy to make GR match real world observations. (ie speed of galaxy rotations etc)  Are modified theories of gravity creditable?  Is dark energy/matter the 'ether' of the 20th/21st century? Is it likely scientists are looking for something that simply doesn't exist and there are unknown fundamental forces at work? What's the best evidence for it's existence other than observations based on the ?


Let's suppose I have  in play, equipped with .  My opponent plays .  Does Emrakul, the Promised End get tapped or does Hexproof prevent that?

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


I should be getting a day of the week. 0 should be monday and 6 should be sunday.I don't know if it's run time error or what. I have tried everything that I can think of.  #include <iostream>  using namespace std; string getDayOfWeek(int dayNum){     string dayName;     switch (dayNum){     case 0:         dayName = "Sunday";         break;     case 1:         dayName = "Monday";         break;     case 2:         dayName = "Tuesday";         break;     case 3:         dayName = "Wednesday";         break;     case 4:         dayName = "Thursday";         break;     case 5:         dayName = "Friday";         break;     case 6:         dayName = "Saturday";         break;     default:         dayName = "Invalid Day Number!";     } }  int main() {   cout << getDayOfWeek(1);     return 0; }

Compiling the following code and got the error of type illegal.  int main() {     // Compilation error - switch expression of type illegal     switch(std::string("raj"))     {     case"sda":     } }   You cannot use string in either switch or case. Why? Is there any solution that works nicely to support logic similar to switch on strings?


I have several apps that I use with keyboard shortcuts that I'm used to and the new shortcuts built into Windows 10 have taken some of them over. These are already ingrained habits and I don't want to change nor do I care too much about what the new shortcuts do.  So, is there a way to override Windows's keyboard shortcuts, at least for the new shortcuts in Windows 10?  Search the interwebs and my windows settings has not yielded anything yet.  Thanks!

As a Linux user, I'm a heavy workspace user. Windows 10 has that, but I would still like to switch between them the way I do in Linux, where I use ctrl+alt+right or left to switch between workspaces.  However, for Windows 10 it's rather ctrl+windows+right or left.  How do I modify these Windows 10 shortcuts to those of Linux?


If Voldemort died almost 8 years (May 1998) before Scorpius was born (January 2006), why did people think he was the son of Voldemort? Why were there rumors that Scorpius is Voldemort's son?   Also, we know that black hair (Voldemort) is dominant over blonde (Scorpius), and that brown eyes (Voldemort) are dominant over grey (Scorpius), which leads to more confusion as to why there were rumors.

From Harry Potter and the Cursed Child - Part I:     Scorpius Malfoy is talking with his best friend Albus Potter: SCORPIUS: So your dad thinks the rumors are true -- I am the son of Voldemort? ALBUS (nods): His department are currently investigating it. SCORPIUS: Good. Let them. Sometimes -- sometimes I find myself thinking -- maybe they're true too. ALBUS: No. They're not true. [...] Harry Potter and the Cursed Child, Part I - Act Two, Scene Sixteen, Hogwarts Library - Page 143 - Scholastic    Harry Potter and the Cursed Child picks up right at the point where Harry Potter and the Deathly Hallows leaves off, at the epilogue. It is nineteen years post-Hogwarts, and Scorpius Malfoy and Albus Potter are eleven-year-old first-years.   I'm about as good at math as J.K. Rowling (meaning I'm terrible at it!), so correct me if I'm wrong. Voldemort was killed at the Battle of Hogwarts in May of 1998. At least eight years post-Battle had to have passed before Albus and Scorpius were born (I'm estimating the boys were born in 2006). Voldemort would have had to have been alive in 2005/2006 in order to have ...      ... fathered Scorpius Malfoy.   As the wizarding world was fully aware of Voldemort's death in 1998, why would anyone even remotely believe that Voldemort is ...      ... Scorpius Malfoy's father?   I can understand the possibility of Harry believing the rumor because ...     ... his scar hurt, and his scar is Harry's connection to Voldemort.   But other than Harry, it doesn't make sense to me why anyone would believe such a ridiculous rumor. So, why?


What is the difference between a Framework, a Toolkit and a Library?

What is the difference between a framework and a library?   I always thought of a library as a set of objects and functions that focuses on solving a particular problem or a specific area of application development (i.e. database access); and a framework on the other hand as a collection of libraries centered on a particular methodology (i.e. MVC) and which covers all areas of application development.


I want to restore my installation back to default by reinstalling all packages that are shipped by default by Ubuntu 16.10.

In an attempt to uninstall wine I ran the command sudo apt-get purge wine* which as you may have guessed removed many of the default packages. I am wondering if there is a way to use the installation disk to reinstall the default packages without overwriting the file system. Not sure if it makes a difference or not, but I am duel booting Windows 8 and Ubuntu 14.04 which was updated from Ubuntu 12.04.  Thanks in advance.


"...illustrates another philosophical divide between you and [I/me]." I'm currently in an argument with a friend about this little bit here. Which is the correct pronoun for this sentance, "me" or "I"?

I am quite confused with the usage of I and me, Can anybody tell me what should be used in the following sentence: Your husband doesn't believe that You're older than (I / Me).


Can someone explain why the coordinates on these two objects are so drastically different? The Y direction, which is UP/DOWN in this view, should be the same between these two objects.  But they differ by 1000. I figure that this must have something to do with the object that I have both of these objects parented to.  It is a reference which I sometimes move between location Y=0 and Y=1000.  Perhaps I added one object while the parent was at Y=0, and another when it was at Y=1000, but it seems like the coordinates should change when the parent does, or they should remain fixed to the parent's coordinate system.  But this is just...baffling. How do I fix this?   EDIT: Here is a simple blend file showing the issue. The cubes are named "Parent", "Child 1", and "Child 2". They all started out on the X axis, 5 meters apart. I parented "Child 1" to Parent. Then I move Parent and Child 2 up by 10 meters on the Y axis.  Child 1 followed along, because it's parented to Parent 1. I then parented Child 2 to Parent. Now when you click on Child 1, the Y coord is 0.  On Child 2, the Y coord is 10.

I used Blender2.79 and I think I just find the problem.  I have two objects and I want to make parent relations to each other,   when I used CTRL + P, the child's transform location still relate to the world's location.    However, when I manually use (properties -> object -> Relations: Parent) and select the object that I want to set it to parent. It used the parent's transform.    I belive those two ways are doing the same things and I miss the setting or this is a bug??


I'm trying to access the data from a single row fetched by a select query. When I try to access the data through rs.getString() it throws NullPointerException.  Any method to access the data from the result set leads to a NullPointerException. Why does this happen?  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     doGet(request, response);      boolean status=true;     String email=request.getParameter("user");     String password=request.getParameter("pass");      PrintWriter pw = response.getWriter();      if (status) {         String driverName = "org.hsqldb.jdbcDriver";         String URL = "jdbc:hsqldb:hsql://localhost/";         String UID = "SA";         String PWD = "";         Connection con = null;         PreparedStatement sql = null;         ResultSet rs = null;          try {             Class.forName(driverName);             con = DriverManager.getConnection(URL, UID, PWD);              System.out.println("connected = " + con);              sql = con.prepareStatement("SELECT * FROM \"USER\" where email='"+email+"' and password='"+password+"'");             boolean sql_st=sql.execute();             System.out.println(sql_st);             rs=sql.getResultSet();              if(rs.next())             {                 HttpSession hp = request.getSession(true);                 rs=sql.getResultSet();                  hp.setAttribute("name", rs.getString("name"));                 pw.println("
Welcome "+rs.getString("name")+"
");             }             else             {                 pw.println("
invalid credentials
");                 pw.println("go back");             }         } catch (SQLException e) {             e.printStackTrace();         } catch (ClassNotFoundException e) {             e.printStackTrace();         }      }     else     {         pw.println("
Invalid Input
");         pw.println("go back");     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


The reason I am asking is because higher energy would cause greater gravitational time dilation. Therefore I would expect, from the perspective of a radio wave, a gamma ray having more energy would appear slower than its lower energy radio wave counterpart.

Quite a few of the questions given on this site mention a photon in vacuum having a rest frame such as it having a zero mass in its rest frame. I find this contradictory since photons must travel at the speed of light in all frames according to special relativity.  Does a photon in vacuum have a rest frame?


I've been having this wifi problem on my Qualcomm Atheros for a very long time and have looked for solutions everywhere, I've tried wicd, updating my driver from kvalo, etc..   I have though ran lspci -nnk | grep -iA2 net; dmesg | grep ath10k and get this error:  Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2   Please I really need help, my wireless-info will be found below    Edit: Forgot to mention this is a dual boot system along with windows 10

After Installing Ubuntu 16.04 in Acer laptop with Qualcom Atheros , it does not work. I tried ,   sudo rfkill list all 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: acer-wireless: Wireless LAN     Soft blocked: no     Hard blocked: no   Then , checked  uname -r 4.4.0-21-generic   and , as suggested I tried ,   lspci -nnk | grep -iA2 net; dmesg | grep ath10k 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Acer Incorporated [ALI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1025:0987]     Kernel driver in use: r8169     Kernel modules: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]     Kernel driver in use: ath10k_pci [    7.100283] ath10k_pci 0000:03:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 [    7.390307] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [    7.390332] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-5.bin failed with error -2 [    7.390336] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-5.bin': -2 [    7.390350] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-4.bin failed with error -2 [    7.390353] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-4.bin': -2 [    7.390365] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-3.bin failed with error -2 [    7.390369] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-3.bin': -2 [    7.390381] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-2.bin failed with error -2 [    7.390384] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-2.bin': -2 [    7.390396] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware.bin failed with error -2 [    7.390398] ath10k_pci 0000:03:00.0: could not fetch firmware (-2) [    7.390401] ath10k_pci 0000:03:00.0: could not fetch firmware files (-2) [    7.390404] ath10k_pci 0000:03:00.0: could not probe fw (-2)   Now what should I do ??


In a preparation question for an exam, I am asked to give an example of a ring $A$ such that the nilradical $\operatorname{Nil}(A)$ is strictly smaller that the Jacobson radical $J(A)$. Here's how I solved the problem:  It is enough to find some ring $A$ with a prime ideal $p$ which is strictly contained in some maximal ideal $m$. Then the localization $A_m$ is a local ring with maximal ideal $m$, and by the correspondence between ideals of $A_m$ and ideals of $A$ contained in $m$ we have that $J(A)=m\supsetneq p\supset\operatorname{Nil}(A)$.  An example is $A=\mathbb{Z}[x]$, $p=(x^2+1)$ and $m=(x^2+1,2)$.  Now I was wondering: are there also any "elementary" examples satisfying the condition above? By this I mean basically examples where I don't have to localize the ring.

Is there a standard example in commutative algebra of a ring where the jacobson radical does not equal the nilradical?


My class already requires two books for the lecture and one for the lab. Is it actually legal to charge $15 for the course outline, written by the professor and published by the community college. I think its unreasonable and kind of suspicious considering it could easily be uploaded to blackboard these days...at no cost and no excuse for any student not looking at the doc or powerpoint. Also, who would i need to speak to at my college concerning the matter and try to persuade for the syllabus.

I'm currently taking a class that doesn't have a required textbook, which is why I took it. My professor is now saying that due to her scanning and printing out handouts for use we are each required to give her $15. I'm confused by this because isn't the money supposed to go through my university, as a fee for the class, rather than through her? I just want to know if she's allowed to do this


How can I do a concatenation of comma separated course IDs that for each student?  select student.ID,   concat(student_course.COURSE_ID,',')    from student.ID join student_course on student.ID=student_course.STUDENT_ID group by student.ID  Student Id  |  Course Id 1           |  101, 230, 432 2           |  293, 101

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Non-static method cannot be referenced from a non-static context. The problem is coming from my PersonHolder.setPerson(person) with setPerson being underlined. Is this because the setPerson is inside of my onCreate?  I have 3 classes and 4 activity_layouts.    my activity_main class is just for the menu activity_main - just a menu Person class ReadFirebase class attached to my activity_read_firebase which is meant to pull the data from firebase and put it into my recycler. WriteToFirebase class used to send data to the firebase.   The last activity is my firebase_item_file that contains the items I require for my recycler in my activity_write_to_firebase.  public class ReadFirebase extends AppCompatActivity {      private FirebaseRecyclerAdapter<Player, PersonHolder> firebaseRecyclerAdapter;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_read_firebase);          RecyclerView recyclerView = findViewById(R.id.recyclerView);         recyclerView.setLayoutManager(new LinearLayoutManager(this));          DatabaseReference roofRef = FirebaseDatabase.getInstance().getReference();         Query query = roofRef.child("adult").child("male");          FirebaseRecyclerOptions<Person> firebaseRecyclerOptions = new FirebaseRecyclerOptions.Builder<Person>()                 .setQuery(query, Person.class)                 .build();          firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Person, PersonHolder>(firebaseRecyclerOptions) {             @Override             protected void onBindViewHolder(@NonNull PersonHolder personHolder, int i, @NonNull Person person) {                 PersonHolder.setPerson(person);             }              @NonNull             @Override             public PersonHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {                 View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.firebase_item_file, parent, false);                  return new PersonHolder(view);             }         };         recyclerView.setAdapter(firebaseRecyclerAdapter);      }     private class PersonHolder extends RecyclerView.ViewHolder {         private TextView name1;         private TextView name2;         private TextView name3;         private TextView age1;         private TextView age2;         private TextView age3;          PersonHolder(View itemView){             super(itemView);             pNameOne = itemView.findViewById(R.id.name1);             pNameTwo = itemView.findViewById(R.id.name2);             pNameThree = itemView.findViewById(R.id.name3);             pAgeOne = itemView.findViewById(R.id.age1);             pAgeTwo = itemView.findViewById(R.id.age2);             pAgeThree = itemView.findViewById(R.id.age3);         }          void setPerson(Person person){              String pName1 = person.getName();             pNameOne.setText(playerName1);             String pName2 = person.getName();             pNameTwo.setText(playerName2);             String pName3= person.getName();             pNameThree.setText(playerName3);             int pAge1= person.getAge();             pAgeOne.setText(Integer.toString(personAge1));             int pAge2 = person.getAge();             pAgeTwo.setText(Integer.toString(personAge2));             int pAge3 = person.getAge();             pAgeThree.setText(Integer.toString(personAge3));          } }

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


NOTE: the answers proposed are for Windows Server 2003. Even the one claiming Windows 7 posted in 2012 appears to fail in 2014. I have tried them and they do not work for Windows 7. This question has not been answered yet.  If you have not tested in Windows 7, please do not post an answer. The answers given are not for this version of windows and are not compatible.  That said I do appreciate the suggestions...  I have a Windows 7 machine that needs to have a fresh boot weekly. This part works fine. The issue is that Google Drive needs to be accessible even if I have not logged into the box. It is attached to a user account so the act of logging in enables it. Is there a way to have the system log into Google Drive on its own at boot time? I attempted to have Windows 7 boot into a specified account on its own, but it did not activate the drive.  The option to start with the computer was chosen, it did not start with the computer but with the account, meaning a username and password is still required to be manually entered.  [I am using 32-bit Windows 7 Professional, Service Pack 1]  UPDATE:  I am going to attempt a different method of syncing files instead of google drive, it may be possible that the 'server' solutions do not equate to Windows 7 deployment. (EG: this question may not have a working answer, or one has not been found yet.)

I have installed Google Drive on Windows Server 2008 R2. When I login to the server, Google Drive starts automatically and synchrnoizes files, pulling changes down from the cloud. All good so far.  However, I would like the sync to run even if I am not logged in. Is there any way to start the sync process automatically, maybe as a scheduled task?  I have other jobs on the server which distribute the files by FTP so I would like the server copies of the files to be up to date.


I am trying to understand the terminology used for various non-volatile memory chips for example as  and .     Is there any preference to use the word EEPROM or Flash for specific type of memory chips or is it some specific technology difference in the two types?

Flash memory storage and EEPROM both use floating gate transistors for storage of data. What differs between the two and why is Flash so much faster?


I do have mods but I removed them and it still did not work  Completely ignored arguments: [--nativeLauncherVersion, 301] [17:21:20] [Client thread/INFO]: Setting user: PixieYAM [17:21:20] [Client thread/INFO]: (Session ID is <censored>) [17:21:22] [Client thread/INFO]: LWJGL Version: 2.9.4 [17:21:23] [Client thread/INFO]: Reloading ResourceManager: Default [17:21:24] [Sound Library Loader/INFO]: Starting up SoundSystem... [17:21:24] [Thread-5/INFO]: Initializing LWJGL OpenAL [17:21:24] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [17:21:25] [Thread-5/INFO]: OpenAL initialized. [17:21:25] [Sound Library Loader/INFO]: Sound engine started [17:21:25] [Client thread/INFO]: Created: 1024x512 textures-atlas [17:23:11] [Client thread/INFO]: Connecting to MC.HYPIXEL.NET, 25565 [17:23:13] [Client thread/INFO]: [CHAT]                           [17:23:13] [Client thread/INFO]: [CHAT] Attempting to send you the resource pack... [17:23:13] [Client thread/INFO]: [CHAT]                           [17:23:13] [Client thread/WARN]: Received unknown passenger for bmu['86twrpp3iz'/282, l='MpServer', x=-96.50, y=30.00, z=48.50] [17:23:13] [Client thread/WARN]: Received unknown passenger for bmu['111j2774s3'/286, l='MpServer', x=-96.50, y=30.00, z=-5.50] # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe9866628c, pid=1048, tid=17736 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C  [ig75icd64.dll+0x55628c] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\sedon_000\AppData\Roaming\.minecraft\hs_err_pid1048.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


At one point, I found an equation that works with complex logarithms, but I lost the book that contains the equation. If I feed this to Wolfram|Alpha, it states that $1^{-i}$ is equal to 1. Why is $1^{-i} = 1$?


So I'm making a command block mechanism, but I need to test if the player is carrying something other than a specified item like testfor @p {SelectedItem:{id:minecraft:stick}}, whereas this instance it'd activate if the player is carrying anything but a stick. If that is impossible is there a way to test if the player is not carrying anything at all?

I know that you can use exclamation marks in Minecraft commands to check for an entity that does not have a specific tag. For example, you can use /kill @e[type=!Player] to kill all entities except for the player. I have, however, encountered two problems with using exclamation marks that I can't find a solution for.  For my first problem, I've set up a series of command blocks to summon shootable fireballs above the player’s head when a certain item is being held;  /scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}} /execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]} /scoreboard players set @a Fireball 0   I used a comparator and a redstone torch so that the last command would activate when the first command would deactivate, that is, when the player is not holding the item.  The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;  /scoreboard players set @a Fireball 0 {SelectedItem:{tag:{display:{Name:!"Summon Fireball"}}}}   I’ve either put it at the wrong place, or you simply can’t use exclamation marks in NBT tags. Could someone tell me where I should put the exclamation mark, or in the latter case, how I can check for anything except for a specific item?  Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;  /scoreboard players set @e[score_arrows_min!=2] Arrows 0 /scoreboard players set @a Arrows 1 {SelectedItem:{tag:{display:{Name:"Rain of Arrows"}}}} /scoreboard players set @e[type=Arrow] Arrows 2 {inGround:1b}   The code does change the scores of entities without scores to 0, but it doesn’t exclude the arrows with a score of 2. Could anyone tell me what I’m doing wrong here?


I've had no wireless connection since I installed Lubuntu 18.04.3 recently (on a Lenovo 3000 N-100 notebook with a BCM4311 802.11 b/g WLAN [14e4:4311] (rev 01) hardware).  I've read several Ask Ubuntu questions. For example,   and followed the section titled Installing The Package (Online), but there is still no wireless connection even after doing a sudo apt-get purge bcmwl-kernel-source and after installing the correct driver with sudo apt install firmware-b43-installer and then rebooting.  I am told that all is OK with the driver, as the response to sudo lspci -knn | grep Net -A3; rfkill list command is   03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)  Subsystem: Broadcom Inc. and subsidiaries BCM4311 802.11b/g WLAN [14e4:0465]  Kernel driver in use: b43-pci-bridge  Kernel modules: ssb   0: phy0: Wireless LAN  Soft blocked: no  Hard blocked: no   I was indeed connected to the internet while installing firmware-b43-installer.  Command 'sudo modprobe b43' does not work.  The output of 'dmesg | tail' is [   15.327311]  excluding 0x60000000-0x60ffffff [   15.327343] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: [   15.331876]  clean [   16.005244] intel_powerclamp: No package C-state available [   16.044635] intel_powerclamp: No package C-state available [   23.255005] 8139too 0000:05:01.0 enp5s1: link up, 100Mbps, full-duplex, lpa 0xC1E1 [   23.431486] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07) [  727.137035] perf: interrupt took too long (2502 > 2500), lowering kernel.perf_event_max_sample_rate to 79750 [ 1173.265545] perf: interrupt took too long (3136 > 3127), lowering kernel.perf_event_max_sample_rate to 63750 [ 2237.034712] perf: interrupt took too long (3929 > 3920), lowering kernel.perf_event_max_sample_rate to 50750  As I'm rather new to Ubuntu, please be clear and provide exact instructions to follow...  POSTSCRIPT TO MY QUESTION  THE WIFI CONNECTION IS NOW WORKING !!!!!! Thanks to combined effort from @Pilot6, @Fabby, and @chili555  After @chili555 advised me as follows: *"Your device requires the driver b43 and firmware and NOT bcmwl-kernel-source Check if the firmware is present and loading: sudo modprobe b43 && dmesg | grep b43  If there are no complaints about firmware, then the hardware switch must be set to airplane mode disabling the wireless; check: rfkill list all If you see Hard block:yes then you need to find the switch and switch it."*  I toggled the wifi hardware switch again (for about the 10th time). Then I ran the commands that chili555 suggested.  Then I noticed that THE WIFI CONNECTION IS NOW WORKING.  Here are the results of the commands that chili555 suggested.  The output from 'sudo modprobe b43 && dmesg | grep b43' is  '[ 4.275681] b43-pci-bridge 0000:03:00.0: Sonics Silicon Backplane found on PCI device 0000:03:00.0 [ 14.725274] b43-phy0: Broadcom 4311 WLAN found (core revision 10) [ 14.767477] b43-phy0: Found PHY: Analog 4, Type 2 (G), Revision 8 [ 14.767488] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2050, Revision 2, Version 0 [ 23.431486] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07) [10967.655484] b43-phy0: Radio hardware status changed to DISABLED [10972.807505] b43-phy0: Radio hardware status changed to ENABLED [10972.983536] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)'  The output from 'rfkill list all' is  '0: phy0: Wireless LAN Soft blocked: no Hard blocked: no'

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


My laptop is connected to two external monitors. When I switch workspaces, only the main monitor will switch, and the second monitor will stay fixed.  Since I want to switch between several task, each requiring the use of two monitors, this is really annoying.  I found another similar question here for Ubuntu 11.10. The answer provided was to execute the command:     gconftool-2 --set   /desktop/gnome/shell/windows/workspaces_only_on_primary false --type   bool   and re-login.  I managed to execute the command (no errors), but the problem continued even after a re-login.   Is this solvable on Ubuntu 14.04?

Im using ubuntu 11.10, running, and loving, the gnome3 interface.  I am running an optimus enabled laptop with bumblebee.   i just figured out how to put the top panel on my external monitor (connected via VGA), which therefore makes my external my 'primary' monitor (a.k.a thats where all the action happens). However now i notice that when i switch workspaces, only the external monitor switches, my laptop screen remains in a fixed workspace.  It should be noted that if move the top panel back to my laptop screen, the problem reverses in that the workspace on my external monitor remains fixed when switching workspaces, i just didn't notice this before.  Is there any way to get my laptop screen to switch as well?  Thank you


X is for continuous random variable and it's nonnegative.  Then this is the formula.  $$E(X)=\int_0^\infty(1-F(x))dx$$  Does anyone know the proof? I appreciate any help.

Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X>  t)$. Although how useful integrating that is, I really have no idea.


The comment with the Flagged Posts that seems to be new as of today states there are posts with flags awaiting my attention but the counter shows zero and when I go into flagged posts there is nothing waiting for me.

I have a "3" currently in the number of flagged posts:    However, when I click on the number, the list is empty. On the side-bar of the list, I can see this here:    But again, on any of the linked lists, nothing is to be found.  Is this a "travel"-issue? Or site-wide? Is this only on my account or do others have the same issue?


I'm running into a numerical issue in a large C programming project. (This is statistical research, not homework for a class). One step involves calculating sqrt(x^2 + y) - x, which I need to be positive, but sometimes I get sqrt(x^2 + y) - x < 0 even when x > 0 and y > 0. Example:  #include <stdio.h> #include <stdlib.h> #include <math.h>  int main(){   float x = 1210.9088134,         y = 0.0062529947;    printf("x =\t\t\t%70.50f\n", x);   printf("y =\t\t\t%70.50f\n", y);    printf("x*x =\t\t\t%70.50f\n", x*x);   printf("x*x + y =\t\t%70.50f\n", x*x + y);   printf("sqrt(x*x + y) =\t\t%70.50f\n", sqrt(x*x + y));    printf("sqrt(x*x + y) - x =\t%70.50f\n", sqrt(x*x + y) - x); }   My output:  x =                        1210.90881347656250000000000000000000000000000000000000 y =                           0.00625299476087093353271484375000000000000000000000 x*x =                   1466300.12500000000000000000000000000000000000000000000000 x*x + y =               1466300.12500000000000000000000000000000000000000000000000 sqrt(x*x + y) =            1210.90880127282912326336372643709182739257812500000000 sqrt(x*x + y) - x =          -0.00001220373337673663627356290817260742187500000000   This output is littered with strange behavior. Highlights:   I assigned y 0.0062529947 but it prints out as 0.00625299476087093353271484375. x*x + y prints out as the same value as x*x. sqrt(x*x + y) - x < 0.   Why are 1-3 happening?  I should mention: I ran this example on both a 64-bit Mac OX 10.9.4 machine with gcc version:  $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.3.0 Thread model: posix   and a 64-bit CentOS server with gcc version:  $ gcc --version gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   Also, compilation returned no errors or warnings on either machine:  $ gcc -lm -Wall -pedantic -ansi test.c -o test

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


I'm having trouble understanding why in the "line with two origins", every neighborhood of the zero in one copy of the real line intersects every neighborhood of the zero of the other copy.  Can someone explain this point to me?  Thanks!

I have seen descriptions of the "line with two origins" using quotient spaces. My professor has defined it in an alternate way. However, I can not wrap my head around how the following descriptions forms a line with two origins.   Consider $X=\mathbb{R} \setminus \{0\} \cup \{p,q\}$, that is $X$ is the union of the reals minus $0$, and two points. Consider sets of the type  $U_a = (-a,0) \cup \{p\} \cup (0,a)$  $V_a=(-a,0) \cup \{q\} \cup (0,a)$  where $a >0$. And let  $\mathcal{B}=\{U_a\}_{a>0} \cup \{V_a\}_{a >0} \cup \{ \text{all open intervals of} \hspace{2mm} \mathbb{R} \hspace{2mm} \text{not containing the origin} \}$  Then $\tau=\{\bigcup_{\alpha} B_{\alpha} \big | B_{\alpha} \in \mathcal{B} \}$.  How is this a line with two origins?


I am running ubuntu 14.04 Trusty Tahr on my laptop. I want to dual boot Windows 8.1 over it so i can boot into any of these. I have the iso file for windows 8.1.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


Is there an in-universe explanation, not just about the way they look, but for the fact the Borg behave differently in The Next Generation, compared to First Contact and Voyager?  Guinan's comments about the Borg in The Next Generation imply that they are completely different to the Borg in Voyager and First Contact.

When I look at the Star Trek: The Next Generation episode "", I notice that that Borg reacts differently than the Borg in Star Trek: Voyager.   Is there a specific reason for this?


I'm having a problem when trying to echo a variable. The echo output of the variable is different than the output of the command. Why any thing like this happen? I suppose it may have something to do with the text, since this problem didn't appear when applying this on a different text.  me@myPC:~/some/directory/$ grep "frag" link | awk '{print$2}' KETENE OH H2O HCCO CO CH2OH H CH(OH)CO (HCO)2 HCO CH2O CH3O CO2 CH3 me@myPC:~/some/directory/$ frag_list=$(grep "frag" link | awk '{print$2}') me@myPC:~/some/directory/$ echo $frag_list   CH3O)2CO

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


How can I speed up my Aspire ONE D250 manufacturing date 0911 (09 or 11?)?  Details:   Memory: 2.0GB Processor: Intel® Atom™ CPU N270 @ 1.60GHz × 2  Graphics: Intel® 945GME x86/MMX/SSE2 OS Type: 32-bit Disk: 155.3 GB Ubuntu 16.04 LTS   I think it has become gradually slower in the last year. Now I have to wait for websites to load.  I often use several tabs in three separate browsers:  Chromium, Firefox 50.1.0, and Opera 12.16.  Is the computer too old to cope with this workload?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


When I test my hi-speed, I get (approx>):  9.7 Mb/s download .51 Mb/s upload 8ms ping.  Why is there such a disparity between down load and up load?

I have used dial-up and/or broadband services from many service providers (in India) and one thing I noted is that the upload bandwidth is lower than the download bandwidth.  Is there any reason for this?


Among the earliest telescopes were Galilean telescopes, modeled after the simple instruments built by Galileo, the first person having used telescopes to study the stars and planets.    I know "having used" should be changed to "to have." Could someone point out the rule or reasoning behind this?

Some verbs are followed by ing, e.g. I enjoy swimming. We can't say I enjoy to swim. Likewise, some verbs are followed by to, e.g. I decided to make a plan.   Which particular verbs are followed by ing and to? Can you please provide a list for that?  Moreover, which verbs can be followed by both without having the meaning changed?


When I compile the following document, I get the error   ! Dimension too large. <to be read again>                     \relax  l.22 ...le[arc=l,size=0.30 cm, font=\tiny](m',O,m)  ?    When I press H to get help, I receive the following message  I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can.  ?    How I can solve this problem?  \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all}%IMPORTANT--recognizes points, lines, circles, etc \usetikzlibrary{angles,quotes,bending}  \begin{document}   \begin{center} \begin{tikzpicture}[scale=1]  \tkzDefPoint(0,0){O}  \tkzDefPoint(1,0){u} \tkzDefPoint(-2, 1){v}   \tkzDefLine[bisector](u,O,v) \tkzGetPoint{m} \tkzDefLine[bisector](m,O,v) \tkzGetPoint{m"} \tkzDefLine[bisector](u,O,m) \tkzGetPoint{m'}  \tkzMarkAngle[arc=l,size=0.30 cm, font=\tiny](m',O,m) \end{tikzpicture} \end{center} \end{document}

I am a tikz beginning. Here is a figure I am working on. I cannot avoid the "Dimension too large" error.  \documentclass{standalone} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document}   \begin{tikzpicture}[x=2cm,y=2cm,scale=0.75]     \coordinate [label=below:$O$](O) at (0,0);      \coordinate [label=below:$A$](A) at (0,-1);      \coordinate [label=below:$D$](D) at (-1.1,-1);      \coordinate [label=below:$E$] (E) at (1,-1);      \coordinate [label=0:$B$](B) at (15:1);      \coordinate [label=180:$C$](C) at (140:1);     \draw (0,0) circle (1); \draw (C) -- (O) -- (B);     \draw (C) -- (A) -- (B);     \draw (D) -- (E);     \tkzMarkAngle[label=$124^{\circ}$,dist=0.35,arc=l,size=0.2,color=black,fill=none](B,O,C)     \tkzMarkAngle[arc=l,size=0.3,color=black](A,C,O)   \end{tikzpicture} \end{document}   I find it works if I change "scale=0.75" to "scale=1". But I want to keep the figure small.


I have extended I-797 for my H1-B (but not stamped yet, stamped visa is expired). Can I apply for a Schengen visa in the USA? Or, do I have to get the US visa stamped and, only then, I can apply for a Schengen visa from within the USA?

I went to the Italian consulate in Washington, DC today and they would not accept my visa application because they said my US visa stamp cannot expire less than 3 months after the end of my trip to Italy. Here's my relevant visa and trip info:   US visa stamp expires on 16 Dec 2015 I-797 valid until 3 Mar 2017 Trip to Italy is from 15 Oct to 25 Oct 2015   Is it true that my visa stamp needs to be valid for 3 months after my trip, even though I can legally stay in the US until 2017? Does anyone have any suggestions for getting a Schengen visa in my situation?


I just found out that going round trip FRA to SFO directly with Lufthansa is 1100 Euro, while Turkish Airlines (layover in IST) will charge only about 600 Euro.  On the flip side, going round trip IST to SFO directly with Turkish Airlines is 1100 Euro, while Lufthansa (layover in FRA) will charge only about 600 Euro.  Moreover, can I book IST-FRA-SFO, but only take the FRA-SFO legs to save time and money while going FRA to SFO?

Usually I find a flight I like that uses one or more connections with the same or different companies. In these cases, if the distance between the first and the second connection is not too large, I prefer to go by bus or train and then take the flight. The problem is that sometimes it is more expensive to take the flight in the second airport than to take the flight from the first one. I mean, I'm wondering why sometimes it is more expensive to take only a flight than to take the same flight and another one.  A practical example (and real, you can check with SkyScanner). Imagine I am in Madrid (Spain) and would like to go to Rio de Janeiro (Brazil) on April 1st. The cheapest flight I have found is this:     TAM airlines: MAD -> GRU -> GIG : 507 €   Fantastic! GRU is one of São Paulo's airports. That's perfect for me! I'll go on to Rio traveling overland. But then, I look for this flight (MAD -> GRU, non-stop):     TAM airlines: MAD -> GRU : 597 €   It's the same flight, 90 € more expensive! I've found this kind of behavior a lot of times and I'm intrigued to know why it happens.


How can I turn off the two factor authentication on an iphone 8 plus.

Is it possible to turn off the Two-Factor Authentication for an Apple ID?  I have more than one device linked to this Apple ID and I know the password and security questions.


Here is a dummy example:    const obj = {foo: '123'};  function logObj(obj) {     setInterval(function() {         console.log(obj);     }, 100) }  function overWrite(obj) {     setTimeout(function(){         console.log('overwriting')         obj = {foo: 'bar'}     }, 1000); }  logObj(obj) overWrite(obj)     I'm expecting to see { foo: '123' } every 100ms until overwriting is called and then to see { foo: 'bar' }. However the object is never over-written and I always see 123.   EDIT  I do not want to change just one of the keys; I do in fact want to replace the entire object, so doing obj.foo = 'bar' is not a solution

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have just set up a Remote Desktop connection on Ubuntu LTS server and whenever I tries to install something a window prompts and asks for a password. I have tried the password but it’s not accepting it. I don't know what password it is asking for but It's not the one that I have set. I tried looking on the Google and got some ways to resolve it but as soon as I follow it in the terminal I get another error stating User is not in the sudoers file. The incident will be reported. Then I looked on Internet to solve it but then they they say to write su -s in the terminal but then I get the error su:Authentication failure.

Possible Duplicate:          I've added myself back into the admin's group I think, by following   But I still can't do commands like:  sudo aptitude update   I get the message  oshirowanen is not in the sudoers file.  This incident will be reported.   How do I add myself into the sudoers group now that I am in the admin group?


I am using Ubuntu. I want to make python3 be the default python version instead of python2. I tried many ways. For example :  Open your .bashrc file nano ~/.bashrc. Type alias python='python3' alias pip='pip3'  on to a new line at the top of the file then save the file with ctrl+o and close the file with ctrl+x. Then, back at your command line type source ~/.bashrc. Now your alias should be permanent.  I also tried : update-alternatives --remove python /usr/bin/python2 update-alternatives --install /usr/bin/python python /usr/bin/python3  But the problem didn't solve. How can I solve this issue ?

I am using Ubuntu 16.04 LTS . I have python3 installed. There are  two versions installed, python 3.4.3 and python 3.6 . Whenever I use python3 command, it takes python 3.4.3 by default. I want to use python 3.6 with python3. python3 --version shows version 3.4.3 I am installing ansible which supports version > 3.5 . So, whenever, I type ansible in the terminal, it throws error because of python 3.4 sudo update-alternatives --config python3 update-alternatives: error: no alternatives for python3


I am looking for some classical mechanics reference book with a good number of solved problems.

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


Here is the code:  String str="    "; System.out.println("("+str+")"); str=str.trim(); System.out.println(str==null); System.out.println(str==""); System.out.println(str.length()); System.out.println("("+str+")");   and the output is:  (    ) false false 0 ()   What's the return character of Multiple spaces.trim() ? Obviously it can't be null.

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


In other words, which file causes Siri to stop changing PID?  Even though I force process to quit, it will spawn again.

I have answered 'No' to Siri initial prompt, but I can still see it in my process list. I've tried to kill it, but it loads again immediately. How can I unload and remove Siri from my Mac?