If I have a superclass named Vehicle and a subclass named SportsCar, what is the difference between these 2 codes to create an object of SportsCar? What would be the difference between car1 vs car2? SportsCar car1 = new SportsCar(); Vehicle car2 = new SportsCar();

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I need to get the ASCII values for individual string in C#  Say for example I have an array  string[] ar =  new string{"1", "2", "3", "4", "5"};   I need to get the ASCII values of these individual array elements. Like for ar[0], ar[1]. I do not want to iterate through a loop  So I tried   Encoding.UTF8.GetBytes(ar[0])    and it returns   System.byte[]   How do i convert it to the original ASCII knowing that this return just a byte array.

I want to get the ASCII value of characters in a string in C#.  If my string has the value "9quali52ty3", I want an array with the ASCII values of each of the 11 characters.  How can I get ASCII values in C#?


We see how Charles Xavier getting shot as a young adult (In First Class) and have to sit in a wheelchair. But in the beginning of The Last Stand when he visits Jean Grey with Eric he walks, how can this be?

At the end of First Class, Xavier is paralysed, and him and Magneto split paths. However at the beginning of Last Stand, it flashes back 20 years, and you see the grown up Xavier and Magneto, friends, talking to a young Jean Gray.  Did Xavier get the use of his legs back and then lose it again?  Or is this just a continuity error?


I want to be able to fill down certain formulas in a spreadsheet.  I DO NOT want to use the mouse or trackpad. I only want to know if there is a key combination like Excel's command+D or command+R  I do not even see in any of the menus a fill down or fill right.  Thanks in advance  Doc

I have a 20,000 line spreadsheet in Apple Numbers, and I need to fill a column with data. I don't want to sit there dragging down the fill handle for thousands of rows.   How can I fill the whole column with a value?


I accidentally ran this command chmod -R 755 /usr/bin on my remote server [Ubuntu 12.04.3 LTS], and I don't have the root password.  When I run sudo it gives me sudo: must be setuid root, This is the /bin folder permissions  drwsr-xr-x   2 deployer root 40960 juil. 23 11:54 bin   SSH connexion is the only access I have to my remote server.

I entered chmod -R 777 /usr/bin and now sudo is not working.  It says sudo must be setuid root.  Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo.  On entering chown root:root /usr/bin/sudo it shows an opened in readonly mode error.


I have ping issues meaning that my ping is normal but I get lag spikes, ping reaching 500-600ms. I suspect there is something wrong with the drivers because on windows there is no problem. Also I have checked there are no interferences or anything else. Any idea how to troubleshoot this?  Thanks in advance, Marios

I'm on a Toshiba Satellite C660_EL trying to install .   lspci -v Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)   However, I can't get the driver from there to compile (I've installed build-essentials already). Running make (with or without sudo makes no difference) I get  make -C /lib/modules/3.8.0-19-generic/build M=/root/rtl_driver modules make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'   CC [M]  /root/rtl_driver/base.o In file included from /root/rtl_driver/base.c:39:0: /root/rtl_driver/pci.h:247:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl_pci_probe’ make[2]: *** [/root/rtl_driver/base.o] Error 1 make[1]: *** [_module_/root/rtl_driver] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic' make: *** [all] Error 2   There is a relevant PPA here:  but there's no 13.04 build.   Thanks in advance for any help!


I'm having friends over this weekend and we are going to play Forbidden Island, we are 5 all in all and was wondering if we can play Forbidden Island with 5 players. Are there any adjustments to be made? Will the additional player make the game too easy or all in all break the game?  Thanks!

I don't see any reason why Forbidden Island wouldn't be able to handle 5 or maybe even 6 players with some simple variants. Does anyone have any experience with different player numbers with some wisdom to pass on?  It would be slightly harder to gather the required 4 treasure cards at one person, but there would be more people total to trade with. The island would sink faster and it would take longer for a certain critical player to have their turn, even though the navigator and helicopter can move anyone. How can these disadvantages be offset to keep the game strong and sufficiently difficult?


According to the biblatex manual, the option sortcites = true makes sure that "citations are sorted according to the global sorting order of the bibliography" (§3.1.2.1). This is, however, not what I get (using the latest version of biblatex). As can be seen below, the order in the text citations is the opposite of the bibliography. How can I fix this?  \documentclass{article} \usepackage{filecontents} \usepackage[style=authoryear-comp,sortcites=true]{biblatex} \begin{filecontents}{\jobname.bib} @book{lennon1972a,     AUTHOR = "John Lennon",     TITLE = "Who did what in the Beatles",     YEAR = "1972"} @book{lennon1972b,     AUTHOR = "John Lennon",     TITLE = "This is why I was the best musician in the Beatles",     YEAR = "1972"} \end{filecontents} \addbibresource{\jobname.bib}  \begin{document} \cites{lennon1972a}{lennon1972b} \printbibliography \end{document}

I am using biblatex for citations and bibliography. Now I often have lists of multiple citations, for which biblatex has the \cites command. Now I can get citations to automatically sort if I don't want page numbers, but I cannot get it right with page numbers.  What I want is all citation ordered chronological (oldest first). Is this possible, or must I just do this by hand?  Here is an example.  \documentclass[11pt,oneside]{memoir}  \usepackage[     style=authortitle,     useprefix=false,     maxnames=2,     firstinits=true,     sortcites=true,     uniquename=init,     abbreviate=true,     backend=biber,     sorting=ynt ]{biblatex}  \begin{filecontents}{jobname.bib} @book{tom1,   author = {Author, A.},   year = {2001},   title = {This book is from 2001},   shorttitle = {2001}, } @book{tom2,   author = {Author, A.},   year = {1999},   title = {This book is from 1999},   shorttitle = {1999}, } \end{filecontents}  \addbibresource{jobname.bib}   \begin{document} This one is corrent.\footnote{\Cites{tom1,tom2}.} This one is corrent.\footnote{\Cite{tom1,tom2}.}   This one is incorrent.\footnote{\Cites{tom1}{tom2}.} This one is incorrent.\footnote{\Cites[1]{tom1}[12]{tom2}.} \end{document}


I tried running prcomp() on my training set, which contains some categorical/factor predictors (as well as a binary response), and was given an error saying my data needs to be numeric. Can PCA not be performed at all with categorical features? Or is there a way to work around the function...  Thank you!

I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I go about doing this using SPSS.


The Chinese remainder theorem as stated in my textbook: If $a,b \in \Bbb Z $ such that $\gcd(a,b) = 1$ then for arbitrary $c,d \in \Bbb Z$ there exists an $x \in \Bbb Z $ with $x \equiv c\bmod a$  and $x \equiv d \bmod  b$. It then gives a proof (which I understand) showing that by taking $p,q \in \Bbb Z$ such that $pa + qb = 1$ that $x \equiv pad + qbc \bmod  ab$. What I do not understand is the $\bmod  ab $ part of this equation? Can anyone shed some light on where this came from?

I am reviewing the proof of the Chinese Remainder Theorem and I am confused at one of the concluding sentences in my textbook.  I understand why there is a solution for relatively prime $m,n$ such that for arbitrary integers $s,t$ that $ x \equiv s$ (mod m) and $x \equiv t$ (mod n) but the concluding sentence says that now the solution is  $ x$  mod(mn) . I do not understand this last statement.


I'm working with python on a project using OPT GIGE cameras. What I need now is to show the camera vision and capture a frame with my Python script. I didn't find anyway to connect to the  gige camera with opencv in python, so I decide to use halcon to capture the image. But halcon can only export to .cs file  I wonder is there anyway to use python to execute a .cs script?

How can I call an external program with a python script and retrieve the output and return code?


I run W7 64-bit with windows firewall + MSE running, and there is a firewall on my router also. I want to run a VM (probably using VirtualPC which comes free) but I'm unclear if this is guarded by the host PC, or if I need to run full firewall+AV on every VM?  Thanks for any help.

Does the Virtual PC XP-Mode (or any other virtualized mode) require safety measures, such as antivirus or a firewall?  I'm just wondering if the XP-Mode would be a large security loophole, since it's so much more integrated into Windows 7. Actually I'm wondering the same for Portable Ubuntu, are their any safety measures I should undertake, so that I don't open a backdoor on my computer.


I am writing a function in functions.php under my theme. The function contains a cURL command that uses credentials like "account_id" and "password". These credentials are not from user input.  Where can I store these credentials? And how would I retrieve them to use them in my function?

I'm looking to use a few APIs and many come with keys, secret keys and passwords required to work. Where in WordPress can you store that information? Assuming anyone can hack your DB is there anyway for WordPress to make saving that information more secure? Also, consider the ability to change these keys ever so often so I would need to update the keys on an options page.  UPDATE


I typed iptables -F by mistake, how can I undo it?    I see now strange activity on my routers IP, scanned it and saw that strange ports are open. How can I block these ports?

I made changes to iptables config file in /etc/iptables/filter in Ubuntu and want to reload them. I read the man page and also googled but couldn't find the information. Any help will be appreciated.


Is there a word for the relation between the parents and parents-in-law of a child?

If I am introducing someone to my daughter's husband's parents can I say "Hi, I'd like to you meet my ___". In-laws would not work here because they are my child's in-laws not my own. Is there a word for this relationship?


As we all know, Windows command-line have the white-black color scheme. And we could use:   COLOR   command to change the colors of background and text.   But the command above will change the whole text in the command-line. E.g. the result of command is as follows:  COLOR 04     But I don't want this kind of color-scheme because that makes no difference with the original white-black one. It is hard to distinguish the command you input and the output of the command. What I want is something like this:    I want the color of command prompt is different with other text on the screen so that I can find the command I input easily. But I only get the solution on Linux. It uses:   export PS1=”\[\e[35;1m\][\u@\h: \W]\$\[\e[0m\] “   So my question is:   How can I change the color of command prompt like the above one on Windows?  Thanks very much.   Solution:  Following the prompt of @Luke I finally get the solution. Anyone who is interested in this topic please hit the two links below:   &   It is "ANSI hack developped for the CMD.exe shell".   Wish that would be helpful for you.

Is there any console emulator for Windows that interprets ANSI coloring?   We use rspec and a part of our team use Windows and the special string for coloring are not very useful for them ;).


I'm trying to calculate how much gold adventurer's are supossed to earn each day. Unfortunately I can't find an answer on the books. The closer thing I found is the treasure hoards rewards for a full campaign, or the adjusted xp earned per day, but those are far from perfect.   The reason is that I'm running a campaign with a bunch of npc's contractors, but I want a solid way to calculate payments.

I've been running a campaign for a couple of sessions where the PCs are employed by a "Heroes' Guild" a la Fairy Tail or Fable. I don't have a huge grasp on how the game's economy works since I've only been running it for a short amount of time, and as we start taking on paid quests at level 2, I'd like to get a good figure on how much money the quests should be worth.  I know that the DMG has tables for money rewards per individual monster, and per hoard, but what about per adventuring day?  Obviously the rate should go up with the party's level as the quests get harder. I just haven't been able to find a table for that. So, assuming I replace most if not all of the coin a GM is supposed to dish out from session to session and compile it into a lump sum for a party of 4, what would that formula or table look like?


Since we have now confirmed that two black holes can combine into one, I have wondered about the Lagrange point (balancing of gravity) that has to exist between them.  As the two holes approach and get very close, would the Lagrange point temporarily become a place where there is no event horizon?  For a moment, would it be a place where trapped photons and information could escape from the black holes?

I have an intuitive scenario. Consider we have a spaceship just below the event horizon of a BH, which is merging with another black hole.  Finally, the singularities merge and we have a single black hole again.  But, in the transient stage, it is unclear to me if a timelike world-line would exist to leave the system.  I suspect, the metric is probably far too complex for an analytical solution, but in the worst case, it could be maybe solved numerically.  As far I know, black hole merges are examined mainly in an inspiral scenario. I suspect, maybe the escape is possible only if they have a hyperbolic-like orbit (i.e. there is no inspiral, but they simply collide).  Is it possible?


I am going to implement regex to catch url in strin. To do so, I have wrote regex expression but it only captures sub-part of expected input not all. How can I fix it so that it can catch all of the expected input and mark them as url?  expected input  ftp://joe:password@ftp.filetransferprotocal.com http://www.google.com/search?q=good+url+regex&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1 https://some-url.com?query=&name=joe?filter=.#some_anchor www.some-url.com?query=&name=joe?filter=.#some_anchor www.some-url.edu?query=&name=joe?filter=.#some_anchor www.some-url.gov?query=&name=joe?filter=.#some_anchor www.some-url.co.uk?query=&name=joe?filter=.#some_anchor www.some-url.xxx?query=&name=joe?filter=.#some_anchor ww2.some-url.com?query=&name=joe?filter=.#some_anchor http://en.wikipedia.org/wiki/Björn_Andrésen   my code is \(?\bhttp://[-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


Even though moon and satellite orbit the planets in multiple planes why our solar system is co-planar? Not only that, ring systems of several planets are also co-planar. Is it the way they evolved with the time? Or is it the only possible way a planetary system can be formed?

I always see pictures of the solar system where our sun is in the middle and the planets surround the sun. All these planets move on orbits on the same layer. Why?


My update manager shows updates available. When I click on install updates it shows the following and does not update.     The action would require the installation of packages from not authenticated sources.    in details:     accountsservice cups cups-bsd cups-client cups-common cups-ppdc empathy empathy-common libaccountsservice0 libcups2 libcupscgi1 libcupsdriver1 libcupsimage2 libcupsmime1 libcupsppdc1 nautilus-sendto-empathy scribus-trunk   How to get updates ?

I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error.  I searched for hours for a solution to this problem, and finally came upon a suggestion that said to change servers for downloading updates from.  I did this, and it gave me a 404 error when I clicked on "Check" in the Update Manager.  I tried switching my server back to the main one (and after that, several other ones), but I am now still getting a 404 error:   And the other error I get when downloading or updating:   Edit: Output of cat /etc/apt/sources.list:  deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted #Added by software-properties  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse universe #Added by software-properties  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates restricted main multiverse universe #Added by software-properties  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team.  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse #Added by software-properties  deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe #Added by software-properties deb http://us.archive.ubuntu.com/ubuntu/ precise-security universe  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu precise partner deb-src http://archive.canonical.com/ubuntu precise partner  ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software.


I have studied the first five chapters of Carroll's book (up to the Schwarzschild solution). I see similarities to the Yang-Mill theories such as the covariant derivative to account for curvature in GR which is similar to the covariant derivative to account for local gauge transformations in Yang-Mill theories. I have heard that some consider GR to be a gauge theory, but I do not understand what the redundant degrees of freedom are required to make it gauge theory.

In quantum mechanics, we know that a change of frame -- a gauge transform -- leaves the probability of an outcome measurement invariant (well, the square modulus of the wave-function, i.e. the probability), because it is just a multiplication by a phase term.   I was wondering about general relativity. Is there something left invariant by a change of frame? (of course, energy, momentum, ... are invariants of Lorentz transform, but these are special relativity examples. I guess there is something else, more intrinsic and related to the mathematical structure of the theory, like a space-time interval or something).   I've tried looking at the Landau book on field theory, but it is too dense for me to have a quick answer to this question. I have bad understanding about GR -- I apologize for that. I'm trying to understand to which respect one calls the GR theory a gauge theory: for me a gauge transform leaves something invariant.  Best regards.  EDIT: Thanks to the first answers, I think I should refine my question and first ask this: To which extent is general relativity a gauge theory? If you have good references to this topic, that would be great(The Wikipedia pages are obscure for me for the moment). Thanks in advance. Best regards.


Okay, here is another question for you wonderful people. I remember a show where a man dies and wakes up on a beach with a bunch of other people.  They are all from different periods in time, with one of them being a caveman. All of these people try to build a society but of course conflict ensues.  One of the people who end up on this beach is a Roman emperor (I think maybe Nero or Caligula, but it could have been any of them). One scene I remember vividly is the Roman emperor seeing a steam engine and remarking that if he had access to such technology, he would have taken over the world. If I had to guess, I would say that it was a mid-90's American production, and it was either a movie or a mini-series.  I saw it in South Africa on the Sci-fi channel back when it knew how to spell it's name.

I am trying to find the name of a direct to TV movie, possibly a 2-3 part miniseries which I believe aired on the SciFi channel in the 90s. I don't remember who starred in it, but the movie opened with an astronaut attempting reentry whose shuttle ends up exploding. He awakes in a large bubble of air in a river and after reaching the surface and swimming to shore, meets several other people, from seemingly many different times throughout history (including one alien, who died on Earth).  Over the course of the movie, we learn the world is the afterlife, where everyone goes when they die. The major plot involves launching a steamboat (built by Mark Twain, no less) to travel up a river to the mountains, where the beings responsible for bringing everyone to this world are.  Does anyone know what the title of this movie/miniseries is?


A company that I had previously had a subscription with and cancelled continues to charge me, so I contact their support team and they say that their system shows me to be cancelled. They have asked me to give the first 6 digits and last 4 of my credit card over email after a long back and forth. Is this safe details of my credit card to send or should I do it phone or perhaps just contact my bank. The company is SCRIBD, a reading service btw.

A company asked me to provide the first six digits of my credit card, along with the last four, to identify a credit charge to my account.  I'm wondering - that's ten of sixteen digits. How secure is it to give away this information? Given that the formula to generate a credit card number is well-known, am I opening myself to any potential issues by disclosing this information?  This is for a Dropbox charge. I have an account with them that I can't access through conventional means (as it was a contractor account for an old workplace) and so they've required me to send this information so that they can verify my identity along with the charge. While it makes sense, I don't remember any companies asking for the first six before (which identifies the carrier and the type of card you have).


I found two different quotation marks, "cloud" and “cloud”. What's the difference between these? Should I always use "" or “”.

Should I use  or  in very formal English writing?


I recently updated my graphics card (Radeon RX 580 Series) and I haven't been able to make the viewport or the Eevee renderer work (as in the objects appear grey or invisible)

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Two men were, as I recall, walking up a hill on some alien planet, discussing a religious group they had just installed a computer for. The group believed that when they had written down all of the possible names for god, then the universe would end. They were getting near the end of their discussion when one man mentioned that, with their new computer, they should be getting done their task right about then. The other man, looking up at the night sky, sees that the stars were, quietly, starting to go out, one after another. A rather old short story, as I recall, possible 70's or before.

I can't remember the title or the author of the following story:  Some Tibetan monks want to know the name of God. They buy a supercomputer in order to calculate the name. Then...     ...they find the name, and in the end of the story, all stars stop shining.


I have the following code:  public static void main(String[] args)      throws ParserConfigurationException, SAXException, IOException {      DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();     dbFactory.setNamespaceAware(true);     DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();     Document document = dBuilder.parse("NewFile.xml");     String usr = document.getElementsByTagName("username").item(0).getTextContent();     System.out.println(document);  }   This is causing a NullPointerException at String usr line. Any ideas why? The new file is placed in the workspace project folder and i also tried to give the absolute path with no success.  XML file:      <?xml version="1.0"?> <tudorTestUser>     <propertySet>         <property name="username">TudorTest123</property>            <property name="firstName">Ion</property>         <property name="lastName">Vasile</property>         <property name="password">Tester123</property>         <property name="passwordAgain">Tester123</property>     <!-- <property name="location">Bucharest</property> -->         <property name="email">tester@test.com</property>         <property name="Status">active</property>         <property name="thirdParty">No Third Party</property>         <property name="agentID">Tester</property>         <property name="switch">on</property>         <property name="position">Web Master</property>         <property name="clone"></property>         <property name="overrideCode"></property>        </propertySet> </tudorTe

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?


1."There can/may be many reasons for this".  2."It can/may rain tomorrow."  I thought that my concept is clear regarding difference between 'can' and 'may',but I get confused while using them in aforementioned lines.

It can be very cold in winters.   It may be very cold in winters.   What is the difference between these two sentences?  People say when may is used then it means that it may be cold in winters or it may not be cold in winters. In other words, may means 'not sure'.  So does that mean if can is used then it is 100% sure that it will be cold in winters?


I have a very great interest in physics.  I'm in my last year of high school and unfortunately I only have 3 hours of math a week at the moment. Now, I'd like to go and do physics next year and I will have 3 months in the summer to prepare and catch up. (Sorry if this question does not belong here.)  How can I use this time to prepare and have a good base to pursue a bachelor of science in physics? Any recommended literature?

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:


how do i divide a sentences in c++ like :  input from cin  (He said, "that's not a good idea". )  into  He Said That s not a good idea  to test whether a character is a letter, use a statement (ch >='a' && ch <='z') || (ch >='A' && ch <='Z').

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I know that operators in quantum mechanics act on states (kets, assumed to be normalized), and return another state. So, an operator such as $\hat{p}$ when acted on a ket $|\psi\rangle$ will give me another ket $|\phi\rangle$. Thus, $$\hat{p}|\psi\rangle = |\phi\rangle.\tag{1}\label1$$ Also, $\langle x|\psi\rangle =\psi(x)$ if $x$ is the position. Now, since $\psi(x)$ is a complex number, what I don't understand is how can the operator $\hat{p}$ cat on $\psi(x)$? How does the expression $\hat{p}\psi(x)$ make sense if $\psi(x)$ does not lie in the domain of the operator/function $\hat{p}$? And how does $\hat{p}\psi(x) =\langle x|\hat{p}|\psi\rangle$?

I stumbled on this question while answering the following question:  Given a general wavefunction $\psi(x)$ and an operator $\hat Q$, with eigenvalue spectrum $\{q_r\}$ and corresponding eigenfunctions $\{u_r\left(x\right)\}$, show that the expectation value of $\hat Q$ is given by $$\langle\hat Q\rangle = \int_{-\infty}^\infty{\psi^*\hat Q \psi \,dx}$$  I started of with the ususal definition of the expected value and inserted the identity operator in position representation: $$\langle\hat Q\rangle = \langle \psi|\hat Q|\psi\rangle = \langle \psi|\left(\int dx|x\rangle\langle x|\right) \hat Q\left(\int  {dx}'|x'\rangle\langle x'|\right)|\psi\rangle$$  Taking $\langle\psi|$ and $|\psi\rangle$ into the integral gives: $$\left(\int dx\langle \psi|x\rangle\langle x|\right) \hat Q\left(\int  {dx}'|x'\rangle\langle x'|\psi\rangle\right)$$  Pulling the 2nd integral into the first:$$\int dx\int  {dx}'\langle \psi|x\rangle\langle x'|\psi\rangle\langle x| \hat Q|x'\rangle$$  This is the point where I'm stuck. If $\langle x|\hat Q|x'\rangle = \hat Q \delta(x-x')$, then the last expression would evaluate to the answer. However I  don't know why this should be true and even if it is true I wouldn't know how to prove this equality.


What does it mean never say die? I've heard many times the phrase: "Never say die" But I don't know exactly for what it's used. Can anyone help me?

What's the deal with this idiom? I know what it means, but cannot wrap my head around its grammar structure. The sentence structure of     "Never say die"   looks like that of     "Never admit defeat"   but it does not make the same grammatical+semantical sense.  Is it an archaic use? Is it a contraction of a longer phrase? Was it originally misspoken by someone of note and survived memetically? What are its roots?  Edit: Well, the comments made me realize that I worded my question poorly. I'm not saying I think this phrase is ungrammatical. I'm asking how the heck "saying 'die'" came to mean what it means.


I'm following the following , and my attention was caught by Theorem $1.1.4$. I am unable to find any reference of the proof. Could you suggest me some books in which there is a proof of this theorem?

Suppose $X$ is a complex manifold of complex dimension $n$, $Z$ is a subvariety of complex codimension at least $2$. Suppose $\pi_1(X)=0$, do we have $\pi_1(X-Z)=0$? Do we have $\pi_1(X-Z)=\pi_1(X)$ in general?


I have answered a question, and after the bounty expired, I didn't get any bounty.  And the bounty was started by the question owner, the question owner accepted an answer during the bounty period, but the bounty award period expired without an explicit award.  So why?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I had a garage which was full and I had two other garages from other properties so I bought a car and tried to make it deliver to the one that's full as it's my main garage.   When I tried, it said that it's full and I'll have to replace a vehicle in order to get it delivered there. I thought that the vehicle I will choose to replace would just go to my other garage, so I chose Mk II and after it was replaced I can't find it anywhere now. I tried looking at all my garages but nothing. How do I get it back?

I was asked to replace a car in order to put another car in my garage. However I thought I would be able to swap the car I wanted in and take out the other car that was already in there so I could bring it to my other garage. Can I get my car back?


I bought a new computer and I want to install Ubuntu on it. The computer doesn't have a CD drive or OS. I want Ubuntu to be the only OS on the computer. So how can I install Ubuntu on a brand new computer? Until now I was using a dual boot and I installed Ubuntu with a flash drive.

I would like to see a full how-to guide on how to install Ubuntu.


declare @top  int set @top = 5 select top @top * from tablename   Is it possible?  Or any idea for such a logic (i don't want to use dynamic query)?

How can I have a dynamic variable setting the amount of rows to return in SQL Server? Below is not valid syntax in SQL Server 2005+:  DECLARE @count int SET @count = 20  SELECT TOP @count * FROM SomeTable


I want to prove that $\lim_{n\rightarrow\infty}(1+\frac{1}{n})^n=e$  There is a solution of the sum provided in my text book. There the expansion of $(1+\frac{1}{n})^n$ is like below:  $(1+\frac{1}{n})^n= 1+{n\choose 1}\frac{1}{n}+{n\choose 2}\frac{1}{n^2}+{n\choose 3}\frac{1}{n^3}+.....$  But how can they write it as an infinite expansion? Does not the expansion end in the term $\frac{1}{n^n}$? But then we cannot prove that its limit is $e$, since $e$ has an infinite expansion.   Please help me clear this doubt. Thanks in advance.

I was wondering if it is possible to get a link to a rigorous proof that  $$\displaystyle \lim_{n\to\infty} \left(1+\frac {x}{n}\right)^n=\exp x$$


I have my locale set at (GMT-05:00) Central Daylight Time (America/Chicago). And I am using the below Apex. DateTime d2 = System.Today() ; system.debug('date is '+d2); // date is 2021-04-10 00:00:00 String dateStr1 =  d2.format('MM/dd/yyyy') ; system.debug('formatted date is '+datestr1); // formatted date is 04/09/2021  Why is the date changing before and after formatting?

I am having date field in the UI. I have written code as per below      Datetime XXX = (Datetime)FieldName;     yyy= XXX.format('yyyyMMdd');   But after executing the batch date is decremented by 1 automatically  Can anyone suggest some idea??  Thanks in advance.


When using find what is the correct format to say "Find files that end in .jpg OR .png"?   Is it as simple as using the | operator/character?  find -iname "*.jpg|*.png"

I can get all jpg images by using:    find . -name "*.jpg"     But how can I add png files to the results as well?


Trying to align my container to the center of page and the items inside to the center of the container. The alignment moves further to left when its zoomed out too. Looks uneven atm. Here's my HTML and CSS:  CSS:   .grid-container {   display: grid;   grid-template-columns: auto auto auto;   background-color: white;   border: 5px outset brown;   padding: 10px;   justify-content: space-between;   width: 1000px; } .grid-item {   background-color: rgba(255, 255, 255, 0.8);   border: 1px solid rgba(0, 0, 0, 0.8);   padding: 20px;   font-size: 17px;  }   HTML:

Cake Flavor
         <input type="checkbox" name="style1" value="style1">         White         <input type="checkbox" name="style1" value="style1">         Chocolate         <input type="checkbox" name="style1" value="style1">         Yellow         <input type="checkbox" name="style1" value="style1">         Marble
         <input type="checkbox" name="style1" value="style1">         Confetti (NEW)         <input type="checkbox" name="style1" value="style1">         Red Velvet (NEW)

Filling Option
         <input type="checkbox" name="style1" value="style1">         Lemon         <input type="checkbox" name="style1" value="style1">         Raspberry         <input type="checkbox" name="style1" value="style1">         Strawberry         <input type="checkbox" name="style1" value="style1">         Bavarian Cream

How can I horizontally center a
 within another
 using CSS?

Foo foo


I have one mesh and the object mode count is around 20,000 and the edit mode count on the mesh is 5,000. But when I export and import to unity it says it has more than the limit of vertices, so it splits it into 3 pieces. This is a big mistake... Unitys single mesh limit is 65,000 and it splits into 3... Help? It affects runtime and import/export time. I have a subsurf modifier but I know that's not the issue because when I take it off its around 1,000...  Blend file:

I have modeled a simple pocket watch in Blender. Every time I import it into Unity3D, regardless of whether I export it from Blender as an FBX or 3ds file, it always comes out missing faces! Why is this happening? I have never had problems importing models into Unity3D like this before.  Blender Screenshot    Unity Screenshots     It seems to me that different faces appear when I rotate it differently. How can I prevent this? Thanks!


I am new to SQL and I am using Windows forms and C#.   The following 2 SQL queries work fine with no issues but I am concerned that one of them might cause problems later and I do not know which one is safer to use.   I just want to know what is the difference between the two command parameters deceleration and value assigning in both first and second methods:  The first command parameters deceleration method:  SqlConnection MyConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);  SqlCommand MyCommand = new SqlCommand(); DataTable DataTable = new DataTable();  SqlDataAdapter Sql_Data_Adapter = new SqlDataAdapter();  long PhoneNumber = 07429114523;  MyConnection.Open(); MyCommand.CommandText = "SELECT * FROM List_of_All_Orders WHERE Phone= @PhoneNumber "; MyCommand.Connection = MyConnection;  // command parameters declaration and value assigning MyCommand.Parameters.Add("@PhoneNumber", SqlDbType.BigInt).Value = PhoneNumber;  Sql_Data_Adapter.SelectCommand = MyCommand; Sql_Data_Adapter.Fill(DataTable);  dataGridView1.DataSource = DataTable;             MyCommand.Parameters.Clear(); MyConnection.Close();   The second command parameters declaration method:  long PhoneNumber = 07429114523; MyConnection.Open(); MyCommand.CommandText = "SELECT * FROM List_of_All_Orders WHERE Phone= @PhoneNumber "; MyCommand.Connection = MyConnection;  // command parameters declaration and value assigning MyCommand.Parameters.Add("@PhoneNumber", SqlDbType.BigInt); MyCommand.Parameters["@PhoneNumber"].Value = PhoneNumber;  Sql_Data_Adapter.SelectCommand = MyCommand; Sql_Data_Adapter.Fill(DataTable);  dataGridView1.DataSource = DataTable;  MyCommand.Parameters.Clear(); MyConnection.Close();   Anyone knows which method to choose first or second in terms of command parameters declaration and value assigning and which one is safer.   Please help. Thank you

What's the best method to pass parameters to SQLCommand? You can do:  cmd.Parameters.Add("@Name", SqlDbType.VarChar, 20).Value = "Bob";   or  cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = "Bob";   or  cmd.Parameters.Add("@Name").Value = "Bob";   It seems like the first one might be somehow "better" either performance-wise or error checking-wise. But I would like to know more definitively.


When I type the su command in a terminal I get    su: Authentication failure   Why doesn't this work in Ubuntu? I have tried this command in another Linux distro (Parrot OS) and it does work.

I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure.  So I checked on the internet and then went into recovery mode and changed my username's password to what I was entering before.  Even now entering the same password on su gives me authentication failure.  Please suggest what am I doing wrong??


I don't like unnecessary duplication. Is it possible to install python only once and have both ArcGIS and  using it?

I see a lot of Q&As asking how you can create a separate Python installation (e.g. the Anaconda or Python XY distribution) that can use arcpy, while not 'breaking' the original ArcGIS python installation.  I had this same problem, and I think I have found a 'universal' solution. So far we have done this on about 8 computers at work and it all works fine.   How to install a separate Python distribution that can use ArcGIS?


How can I prove that $F_{2n}$ is divisible by $F_n$ in the Fibonacci sequence?

I have a seemingly simple question to solve by induction. The question says $F_n$ divides $F_{2n}$ in the Fibonacci sequence.  My thoughts on this.   First,since the n-th term of the Fibonacci sequence is given as the sum of the two previous terms, simple induction won't suffice. So I should try composite induction.   That is, supposing that $F_k$ divides $F_{2k}$ for all $k<n$, I must prove $F_{n}$ divides $F_{2n}$. Is this approach valid?  Doesn't seem to work. If I write $F_{2n}=F_{2n-1}+F_{2n-2}$ then by the inductive hypothesis, $F_{n-1}$ divides $F_{2n-2}$ but this does not help me assert that $F_n$ divides $F_{2n}$. Am I doing this wrong?


How do I undelete an answer, after editing, that has been deleted by a moderator?

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


I am developing a Drupal Cron that has a very long-running task. First I tried with a simple Cron, which, of course, did not work because of "Memory exhausted" PHP fatal error.  Then, I developed a Batch with the Batch API which worked fine as a normal Batch. However, I could not make to run it completely inside the Cron. It receives the same PHP error.  After that, I developed a Cron using the Queue API. However, I could not make Drupal to run all queue jobs in the same cron. The execution stops at some point and I am unable to run more jobs. I know that there is an option to define the worker's function time, but my task is a long-running task. So it is limited by PHP.  I also tried to use Background Process module in order to execute my long-running task but it had the same problem as before: the execution stops at some point.  I am sure that the code can be executed completely. The only working way was through Batch page but I want to run it automatically every day (Cron).  Do you know how can I run a Cron until it finishes?  As I said, I tried with Batches and Queues but it did not work. PHP "memory exhausted" or timeout errors appear or the execution can be cut by Drupal.  Thank you.

I have a issue with my Drupal installation, for example:   when I enable or disable the modules, It redirects me to a blank page, when I create a new content type and save it, redirects me to a blank page, when I add a new view and save it, it redirects me to a blank page, when I try to clear the cache, it redirects me back to a blank page, or in similar cases.   Basically all the confirmation pages redirect me to a white screen. When I refresh it again, it shows me the page. I tried to increase the PHP memory value but it doesn't help.  Are there any other solutions for this?  The error which I'm having:      Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 8192 bytes) in sites/all/modules/views/plugins/views_plugin_localization_none.inc on line 1


Would be great to be able to filter by favorite tags.

I wonder if it is possible to search in just my favorited questions?  If not, can it be considered as a feature request?


I'm building a program in a VM then deploying to another machine. This has been working for some time.  Today I've started receiving this error message when I attempt to execute my program:     /usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.19' not found   Both machines are running the same kernel version, and all packages are up to date:  $ uname -a Linux darwin7 3.8.0-23-generic #34-Ubuntu SMP Wed May 29 20:24:54 UTC 2013 i686 i686 i686 GNU/Linux   How might I investigate and repair this issue?

Whey I try to run the program Layout Editor (available on ) on Ubuntu 14.04.1 64-bit LTS I get the following output in the terminal:  $ layout layout: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by layout)   I tried the command strings on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 as following and here is the input and the output:  $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_DEBUG_MESSAGE_LENGTH   How can I resolve this issue I somehow guess that it is related with GCC but cannot figure out how to fix the problem. Furthermore, I have tried a PPA as suggested on  and there is a similar question for an older version of Ubuntu at . However, after I ran sudo update I get numerous warnings and the list I obtained with the strings command did not have new entries after installing gcc 4.9, so I purged the PPA() with ppa-purge. Any help, suggestions on how to proceed are greatly appreciated.


I have been employing logistic regression in my research using glm function in R. However, as the separation problem exists, I am now using firth penalisation through logistf package. I noticed that this results in Chisq value instead of Z value as in glm. My question is could anyone please explain why firth penalisation results in Chisq instead of Z value as in glm?

[A similar question was asked  with no answers] I have fit a logistic regression model with L1 regularization (Lasso logistic regression) and I would like to test the fitted coefficients for significance and get their p-values. I know Wald's tests (for instance) are an option to test the significance of individual coefficients in full regression without regularization, but with Lasso I think further problems arise which do not allow to apply the usual Wald formulas. For instance, the variance estimates neded for the test do not follow the usual expressions. The original Lasso paper:  suggests a bootstrap-based procedure to estimate the coefficients variance, which (again, I think) may be needed for the tests (section 2.5, last paragraph of page 272 and beginning of 273):  One approach is via the bootstrap: either $t$ can be fixed or we may optimize over $t$ for each bootstrap sample. Fixing $t$ is analogous to selecting the best subset (of features) and then using the least squares standard error for that subset  What I understand is: fit a Lasso regression repeatedly to the whole dataset until we find the optimal value for the regularization parameter (this is not part of the bootstrap), and then use only the features selected by the Lasso to fit OLS regressions to subsamples of the data and apply the usual formulas to compute the variances from each of those regressions. (And then what should I do with all those variances of each coefficient to get the final variance estimate of each coefficient?) Furthermore, is it correct to use the usual significance tests (for instance Wald's test which makes use of the estimated betas and variances) with the Lasso estimates of the coefficients and the bootstrap-estimated variances? I am fairly sure it is not, but any help (use a different test, use a more straightforward approach, whaterever...) is more than welcome. According to the answers  I suspect inference and p-values just cannot be obtained. In my case, p-values are an external requirement (although the use of L1 regularization was my choice). Thanks a lot EDIT What if I fit an OLS logistic regression using only the variables selected by a previous run of the Lasso logistic regression? Apparently (see ),  There's no need to run the model again after doing cross-validation (you just get the coefficients from the output of cv.glmnet), and in fact if you fit the new logistic regression model without penalisation then you're defeating the purpose of using lasso  But what if I do this with the sole purpose of being able to compute p-values while keeping the number of variables low? Is it a very dirty approach? :-)


I have a report that pulls some information IP address and host name, etc.  Some some servers have a heading like: NOTICE TO USERS (followed by about 17 lines of text information) when I cat the file, I do not need the NOTICE (and 17 more line after that on some servers).  How can I get rid of it?

I use this  cat foo.txt | sed '/bar/d'  to remove lines containing the string bar in the file.  I would like however to remove those lines and the line directly after it. Preferably in sed, awk or other tool that's available in MinGW32.  It's a kind of reverse of what I can get in grep with -A and -B to print matching lines as well as lines before/after the matched line.  Is there any easy way to achieve it?


In the first SpongeBob SquarePants movie, SpongeBob stated that he has been employee of the month over 370 times. If you divide that by 12, that means he's been working at the Krusty Krab for over 30 years.   Let's not forget, SpongeBob was supposedly born on July 14, 1985. Today, that means he's in his 30's.   Additionally, he was supposedly 13 when he started working at the Krusty Krab.   With all these facts, the math kind of doesn't make sense.  If we stick with the theory that he started working at the Krusty Krab when he was 13, add 30+ years at the Krusty Krab and that means SpongeBob is in his 40's today.    So, how old is he?

How old is SpongeBob? I don't mean how old is the series, I mean what is SpongeBob's age if he were a real person. I ask because his age seems to be ambiguous in the show.   He has a full-time job He has his own house He is always referred to as a kid (especially in the movie) He acts childish and immature In one episode, he was pretending to be an adult/grown-up


I really don't want to download 5.5 gigs on every Mac in my house - how can I recover and reuse the Maverick's download from one Mac to another?

I have three Macs I want to upgrade to Mavericks.  Is there a way of re-using the install files, so I don't have to do three separate 5gb downloads?


I want to order the result of my query result and put it via Query activity into a data extension (DE has no primary key). The order by MAWE is pretty important for me.  select  count (SubscriberKey) AS amount, country, MAWE, variant  from Sendfinal1  group by country,MAWE,variant  order by MAWE,country   SF seems not to accept the order by:      Message: An error occurred while checking the query syntax. Errors: The ORDER   BY clause is invalid in views, inline functions, derived tables,   subqueries, and common table expressions, unless TOP, OFFSET or FOR   XML is also specified.   Is there a workaround for that?

I'm trying to create a query activity in order to show, from a Data Extension, only the last 5 articles ids. I tried with the formula ORDER BY xxx DESC LIMIT 0,5 as in SQL but it is not working and it is returning this exception:     The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified   How can I use ORDER BY in a Data Extension?


It looks something is going wrong with persist method of EntityManager class. I use apache tomcat and recieve HTTP Status 500- page every time I try.  This is DataQuery class:  public class DataQuery {     EntityManagerFactory emf;     EntityManager em;      public DataQuery() {         emf = Persistence.createEntityManagerFactory("com.sbu.ac.jobyab");         em = emf.createEntityManager();         em.getTransaction().begin();     }      public void registerUser(Employee e){         em.persist(e);     } }   And this is the registerController class that recieves input from user and do the registeration task:  public class registerController extends HttpServlet {     private DataQuery query;     @Override     protected void doPost(HttpServletRequest request, HttpServletResponse response)             throws ServletException, IOException {         String email = request.getParameter("register_email");         String pwd = request.getParameter("register_password");         Employee e = new Employee(10, email, pwd);         query.registerUser(e);     } }   This is full stack error :     type Exception report      message      description The server encountered an internal error that prevented it   from fulfilling this request.      exception      java.lang.NullPointerException     com.jobyab.controllers.registerController.doPost(registerController.java:39)     javax.servlet.http.HttpServlet.service(HttpServlet.java:648)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   note The full stack trace of the root cause is available in the Apache   Tomcat/8.0.33 logs.

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 decided to go on holiday for a week. I think 10 days is too many for me."    Am I correct using 'is' instead of 'are'? Or the only way is to change the phrase to '10-days period is too long for me?'

I was just copyediting  and my native English speaker Sprachgefühl told me I had to correct the grammar of one sentence:     ... 5–6 weeks are a lot of time ...   by changing the are to is. But as I was doing so I started wondering why is it that in this case it seems that I have to make the verb disagree with the plural subject?  So is my feeling for English going bad or if I did the right thing, how could I explain this to somebody who's learning English for instance?


I have SQL Server 2008 and I want to restore a database from SQL Server 2008 R2. When I try to restore, SQL Server produces an error message that the database came from a newer version of SQL Server than the one I have.

When trying to restore a backup to a SQL Server Express 2008 database I got the following error:  Restore failed for Server '...\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600.  That version is incompatible with this server, which is running version 10.00.2531.  Either restore the database on a server that supports the backup, or use a backup  that is compatible with this server. (Microsoft.SqlServer.Smo)   Is there a way to get a backup which is compatible with the older (in my case 10.00.2531) version from the newer (in my case 10.50.1600) version of SQL Server Express?


Any explanation why a mp4 comprised of png would be smaller than all of it's images? Ultimately, I would like to lower the quality of my renders (png) if they are being butchered during "lossless" encoding. Why wait 2 minutes for each render when they eventually get dissolved to a lower resolution during processing? So what's the target png file size for lossless mp4 files to converge on a sum of their parts? Sorry if this question get's asked a lot.

I just made a video in mov-formate containing 300pngs in 4k. Every single png ist roughly 6MB in filesize. The mov-file is just 8MB. Seems weird to me. Is there maybe a quality loss in the video? The video looks fine but the size just seems so small.


then $\phi(I)=[s'\in R'|s=\phi(s)\space \forall\space s\in I]$ is an ideal in R'  So I know that for something to be an ideal, it needs to be closed under subtraction and it must absorb products. I guess I get overwhelmed when there is a lot going on.  I want to say something along the lines of  Let $r,s\in \phi(I)$, then $\phi(r-s)=\phi(r+(-s))=\phi(r)+\phi(-s)=r+(-s)=r-s\in I$ since $I$ is an ideal...  Then let $t\in R'$ and $s\in \phi(I)$, so $t(s)=t(\phi(s))$ .... Not sure if I'm headed down the right path

Let $\phi: R \longrightarrow R'$ be a surjective ring homomorphism and   $I$ an ideal in $R$. Show that $\phi(I) = \{ \phi (r) : r \in I \}$ is   an ideal in $R'$.   So I asked this question a couple of days ago, but with incorrect notation and symbols. What I've been able to gather thus far is that I know I need to show that it is closed under subtraction and that it absorbs products.  Let $r',s'\in \phi(I)$, then $\exists r,s\in R$ such that $\phi(r)=r', \phi(s)=s'$.   $$\phi(r-s)=\phi(r+(-s))=\phi(r)+\phi(-s)=r'+(-s')=r'-s'\in \operatorname{im}(I)$$  I'm not sure if this is the correct way of showing that subtraction holds, and I'm also not sure of how to show the absorption of products. Any and all help is greatly appreciated, thank you!


I wonder if the number of horcruxes is correct - Harry destroyed the diary, ring, cup, Nagini, locket, diadem and one in himself leaving Voldemort with one piece. Shouldn't one be used in book 4? Voldemort was killed in Godric’s Hollow, or just his soul fled and found Quirrell in Albania 11 years later? Was the same part used in book 4?

A few questions regarding the Horcruxes.   Had Voldemort actually succeeded in using a Horcrux, would he come back the same age (biologically and/or aesthetically) he was when he made the Horcrux, or the age he would biologically be if he had never died (half died)? If Harry was a Horcrux, then in the graveyard, when Wormtail added Harry's blood to the potion to bring Voldemort back, didn't that technically use up the Horcrux inside of Harry? So in Deathly Hallows when Voldemort kills Harry, shouldn't Harry have actually died rather than just have the Horcrux inside him destroyed, seeing as it was technically used in the Goblet of Fire?


I am trying to make a gui that takes a number and returns the sum and avg. I have tried to make it work but it returns 4 errors when useing the java StatClacGui in cmd. Here is the code:  import java.awt.*; import java.awt.event.*; import javax.swing.*;  public class StatCalcGUI extends JPanel implements ActionListener {     double sumt = 0;     double avg;     int count =0;      public static void main(String[] args) {         JFrame window = new JFrame("Stat Calc");         StatCalcGUI content = new StatCalcGUI();         window.setContentPane(content);         window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         window.setLocation(120,70);         window.setSize(450,350);         window.setVisible(true);     }      private JTextField tekst;     private JLabel entry;     private JLabel sum;     private JLabel average;     private JLabel stddev;       private JButton clearButton;     private JButton enterButton;      private JLabel titel;      private StatCalcGUI stats;      public StatCalcGUI(){         setBackground(Color.BLACK);         setLayout(new GridLayout(6,1));         clearButton = new JButton("Clear");         clearButton.addActionListener(this);         enterButton = new JButton("Enter");         enterButton.addActionListener(this);         JPanel ip = new JPanel();         ip.setLayout(new GridLayout(1,3));         ip.add(tekst);         ip.add(enterButton);         ip.add(clearButton);          titel =    makeLabel(" Enter a number in field");         entry =    makeLabel(" Number of entries   "+ count);         sum =      makeLabel(" Sum                 " + sumt);         average =  makeLabel(" Average             " + avg);         stddev =   makeLabel(" Standard Deviation  ");          add(titel);         add(ip);         add(entry);         add(sum);         add(average);         add(stddev);     }      public void actionPerformed(ActionEvent evt) {         if (evt.getSource() == enterButton) {             double add = Double.parseDouble(tekst.getText());             sumt = sumt + add;             count ++;             avg =(double) sumt/count;          }else if (evt.getSource() == clearButton) {             sumt = 0;             avg = 0;             count = 0;         }      }     private JLabel makeLabel(String teskt){         JLabel label = new JLabel(teskt);         label.setBackground(Color.RED );         label.setForeground(Color.BLUE );         label.setFont(new Font("Monospaced", Font.PLAIN, 12));         label.setOpaque(true);         return label;     } }   And the error code is:  Exception in thread "main" java.lang.NullPointerException         at java.awt.Container.addImpl(Unknown Source)         at java.awt.Container.add(Unknown Source)         at StatCalcGUI.<init>(StatCalcGUI.java:43)         at StatCalcGUI.main(StatCalcGUI.java:12)   I Dont really understand the error, can anybody help?


I am working on Lubuntu. Recently I noticed that my disk space is shrinking badly even though it was quite ok at the begin. I remove all tmp, unused apps, downloads and it still gave me almost nothing. Is there a tool (preferably graphical but not necessary) to get some kind of report of directory sizes (even better: recursively so I can run a test and then check subdirs to find the "guilty one")?

How do I list all the files in a directory and their recursive file sizes?  ---edit  I want to see the sizes 'rolled up' to the parent directories in the directory listed. I don't want to see the child directories or their contents or sizes.


I try to construct a matrix with a lists of lists in Python3. When I implement the following function,  def myfunction(h, l):     resultmat = (h+1) * [(l+1) * [0]]     for i in range(1,h):                 for j in range(1, l+1):                resultmat[i][j] = i + j      return resultmat   I get the following result:   myfunction(2,3) Out[42]: [[0, 2, 3, 4], [0, 2, 3, 4], [0, 2, 3, 4]]   I had expected that the first rows and columns would be filled with zeroes, and that all other elements would be the sum of the row and column index. This is not exactly what I get here, where each row is a copy of the others. Can someone explain me (a) what is going on (b) how I can solve this problem?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I just cannot figure out why this keeps pointing to null. I am a fairly new programmer. But here I have made a Dice class and a commands class. I have tried changing variables and all sorts of stuff. I guess I'm just not sure why it's pointing to null.      package com.rs.game.player;  /**  * Created by Kevinpro0 on 2/26/2015.  */ public class Dice {     public int die2;     public int die3;     public int die4;     public int die6;     public int die8;     public int die10;     public int die12;     public int die14;     public int die16;     public int die18;     public static int die20;      public void d2() {         die2 = (int)(Math.random()*2) +1;     }     public void d3() {         die3 = (int)(Math.random()*3) +1;     }     public void d4() {         die4 = (int)(Math.random()*4) +1;     }     public void d6() {         die6 = (int)(Math.random()*6) +1;     }     public void d8() {         die8 = (int)(Math.random()*8) +1;     }     public void d10() {         die10 = (int)(Math.random()*10) +1;     }     public void d12() {         die12 = (int)(Math.random()*12) +1;     }     public void d14() {         die14 = (int)(Math.random()*14) +1;     }     public void d16() {         die16 = (int)(Math.random()*16) +1;     }     public void d18() {         die18 = (int)(Math.random()*18) +1;     }     public static int d20() {         die20 = (int)(Math.random()*20) +1;         return die20;     } }   /***** i am ONLY using d20 for this right now...****/  DM.java  package com.rs.game.player; import com.rs.game.player.*; import com.rs.game.World;  import java.util.Arrays;  /**  * Created by Kevinpro0 on 3/1/2015.  */ public class Dm {     public static Dice init = new Dice();     public static int worldSize = World.getPlayers().size();     public static int[] PlayerInt = new int[worldSize];     //     public static Player player;     public static int initRoll  = init.die20;     public static String playersName;     public static int i = 1;       public static void initiative(){          for (i = 1; i < World.getPlayers().size() + 1; i++) {             //Dice = new Dice();             init.d20();             PlayerInt[i] = initRoll;             player.getPackets().sendPanelBoxMessage(Integer.toString(Dice.d20()));             //player.getPackets().sendPanelBoxMessage("Player " + i + " is " + playersName + " and initiative roll: " + Integer.toString(initRoll));          }     } }    Commands.java   case "init":                 case "initiative":                     Dm dmaster = new Dm();                     //String currentPlayer = player.getUsername();                     //Player Dm = World.getPlayerByDisplayName("Dm");                     if (player.getUsername().equalsIgnoreCase("Dm")) {                         if (World.getPlayers().size() <= 1){                             player.getPackets().sendPanelBoxMessage("Not enough players logged in.");                         } else {                             Dm.initiative();                             player.getPackets().sendPanelBoxMessage(Dm.playersName + " and initiative roll: " + Integer.toString(Dm.initRoll));                          }                      }                  return true;


In PCA, when I extract the principle component vectors, I am choosing the first vector with the largest corresponding eigenvalue. I notice that some of the values in this vector are close to zero. Can I reduce the size of this vector by excluding/removing the dimensions where the entries are close to zero?  My line of thinking is that if a component 'explains', for example 80% of, the variance and is a unit vector of 100 elements, and in this unit vector only a single loading (value in the vector) contributes as much as 90% of the total value making up a size of 1.   I would like to use PCA in a way similar to Lasso regression where the constraint on the total size of used variables is being minimized by some tuned parameter.

I'm new to feature selection and I was wondering how you would use PCA to perform feature selection. Does PCA compute a relative score for each input variable that you can use to filter out noninformative input variables? Basically, I want to be able to order the original features in the data by variance or amount of information contained.


So I want to write a program that checks if the DNA is mutated or not, i'm not quite sure how to explain this, so this is what it says:  Write a program to determine if a patient has a mutation in their DNA sequence which results in a change of amino acid sequence. Your program should work like this:  Enter original DNA: AAT Enter patient DNA: AAC The patient's amino acid sequence is not mutated.  Enter original DNA: AATTGTTCTTCT Enter patient DNA: AACTGCAGCTCA The patient's amino acid sequence is not mutated.  Enter original DNA: TGTCATGCCTTATTAGAAAACGGTGAG Enter patient DNA: TGTCATGTCTTATTAGAAAAAGGTGAG The patient's amino acid sequence is mutated.   And this is part of the text file I use:  The mappings from codon to amino acid are available in a file, called codon_amino.txt, an excerpt of which is shown here:   AAC N AAG K AAT N GCG A GCT A GGA G GGC G GGG G GGT G   So this is my code so far:  n = {} for line in open('codons.txt'):     codon, codons = line.split()     n[codon] = codons   org = input('Enter original DNA: ') pat = input('Enter patient DNA: ')  if n[org] == n[pat]:     print("The patient's amino acid sequence is not mutated.") else:     print("The patient's amino acid sequence is mutated.")   So my code works OK with the first example, where there are only 3 letters being used, but the next two have more than 3, and I was wondering how I could manipulate my code to work with that too? I hope someone understands this question. Thank you in advance!

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have HP Compaq NC6400 with 128mb ATI Mobiltiy X1300 graphics. 1280x800 display. Intel Core 2 Duo 2.0 ghz 3gb ram x64 based processor 2006 model laptop  I know this is Ubuntu site but kindly give me some independent suggestion because there are over 300+ Linux distros.  Thanks.

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?


The first law of thermodynamics is formulated as: the change in internal energy of a system is equal to the heat added to the system minus the work done by the system:  $dU = Q - W$  Then for what reason do many people, like to use the alternative with a plus sign instead:  $dU = Q + W$

Is $Q=\Delta U+W$ for when the the work is done from the system while $\Delta U=Q+W$ is for when the work is done by the system?  Will anybody explain this to me, please?   When do we use $Q=\Delta U+W$ and when do we use $\Delta U=Q+W$?


I am trying to figure out how to download old Twitter DM's from the past few months.  I did a Contaxio sync but the CSV file does not seem to contain any DM's at all.  I tried to build a Twitter app but got stuck not know how to run "twit-backup.pl --generate-session"

I'm looking to view and archive all my old DMs in Twitter, since I would like to revive conversations that took place 1 year ago.  Acording to Twitter they don't delete old messages, they simply archive them in their database.  Is there a way to view and download all of these messages, just like you can view all your old public tweets with third party apps?  UPDATE: I found  but apparently it's not working for DMs now


Questions like      are getting closed as being off topic or non-constructive or for other ridiculous reasons. These questions are often well defined and looking for a tool that solves one specialized problem for which such a tool is difficult to find by search.  It always pisses me off (and I bet others too), because it is not "constructive" only in the Stack Overflow terminology because the community doesn't wanna deal with some questions leading to flames or possibilities of many tools fitting the description.  I can see the reasons why these question are not desired on SO, but I'd expect the Stack Exchange network to create a site focused on these questions as as far as I know, it's currently impossible to get these questions answered elsewhere than IRC/twitter/etc. which is ridiculous considering the SE network already exists and the only barrier is social, not technical or even sensible.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I want to draw a graph in which nodes have labels. I want to put label for each node under it. I want to change the following code to draw a dot for node 5, and below the node, I want to have 5. \begin{tikzpicture}[%auto, node distance=1.5cm, every loop/.style={},                 %thick,main node/.style={scale=0.7,                  %circle,draw,font=\sffamily\small\bfseries}]                 dot/.style={fill,circle, minimum size=5pt,inner sep=0,node contents={}},    circ/.style={draw, circle, minimum size=10pt,inner sep=0pt, node  contents={}}] \node[main node] (5) {5};  \end{tikzpicture}  I wanted to ask how I can do that. Thanks in advance for your help.

I have the following diagram:  \documentclass{article} \usepackage{amsmath,amsfonts,graphicx} \usepackage{algpseudocode} \usepackage{tikz, nth} \usetikzlibrary{arrows.meta,decorations,decorations.pathreplacing,calc,bending,positioning, chains}  \begin{document} \begin{tikzpicture}[scale=0.6]         \draw[thick,]  (0,8) -- (0,0) node[left] {0};         \draw[thick,]  (0,0) -- (8,0) node[right] {8};         \draw[thick,]  (8,8) -- (8,0) node[left] {};         \draw[thick,]  (8,8) -- (0,8) node[left] {8};          \draw[thick,]  (4,0) -- (4,8) node[left] {};          \fill (1, 4) circle[radius=2.5pt] node[below]{$A$};         \fill (2, 6) circle[radius=2.5pt] node[below]{$B$};         \fill (3, 2) circle[radius=2.5pt] node[below]{$C$};         \fill (4, 8) circle[radius=2.5pt] node[below]{$D$};         \fill (7, 3) circle[radius=2.5pt] node[below]{$E$};         \fill (6, 1) circle[radius=2.5pt] node[below]{$F$};         \fill (5, 7) circle[radius=2.5pt] node[below]{$G$};         \fill (3, 8) circle[radius=2.5pt] node[below]{$H$}; \end{tikzpicture} \end{document}   How can I position the caption of the node $D$ both below and left, so that the line doesn't obscure the caption?


In Gaussian Mixture Models, in order to derive the M-step for covariance matrix, I need this result. I have poor knowledge of matrix calculus and result does not exist in  What is the partial derivative of $x^T A x$ w.r.t $A$?

I have seen many times that the gradient of $x^TA\,x$ with respect to $x$ is $2A\,x$. But how do you find its gradient with respect to $A$?


My camera is showing:     Err 01      Communications between that camera and lens is faulty. Clean the lens contacts.   I have been using this camera for a while and when this text first started showing, I would follow steps on YouTube on how to fix it (turning off and on the camera multiple times, wiping everything throughly) and it keeps on happening.  I then came across a photographer and he said he have never sent his camera for service and he would just clean the body-lens connector with a rubber eraser. It surprisingly works — but that worked for two hours at first, after many use, the rubber eraser method fails after only 5 shots. What is happening and what should I do?

So I just got a Canon Rebel T4i and I'm having trouble with my lens (18-135mm STM lens). It's when I have my camera on movie mode, when I'm setting my aperture the blades won't change. I can only set to f/3.5 and f/20, and when I keep trying to change it my camera will give me error 01. So I clean the lens contacts and when I try again, my lens makes a noise and error 01. please help. I don't know what to do...


We are running a server right now and the MySQL database is crashing quite often.   We know that we need to find good settings for MaxClients and MaxRequestsPerChild as we are getting lots of traffic and when we get a spike the database goes down.     Is there a good rule of thumb or formula that would help us figure this out?

This is a  about capacity planning for databases. Related:      I'm looking to create a canonical question of tools and methods of capacity planning for databases. This is intended to be a canonical question. Obviously, the general workflow is:  Put your scenario in place Add monitoring Add traffic Evaluate results Remediate based on results Rinse, repeat until reasonably happy  Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices.


I found an old DVD disc that i burned some stuff on almost 10 years ago. I have no use for that stuff anymore but i need the DVD disk to save some data. I tried deleting it the old fashiond way, and reformatting the disk with the Disk Utility app but no luck it always says that the content on the disk are read only files.

@enzotib mentioned the following command  sudo mount -o remount,rw /cdrom   Does this imply I can mount a CD or DVD in rw mode and use like a (real) filesystem? Does this work with the popular ISO-9660 filesystem, which is read-only by design? Will this create a multsession CD with one session per change (or per mount)?  Would this work (differently) on a ISO image file on a read/write filesystem?


I’ve been trying to convince myself of the veracity of this for a while and I can’t seem to do it.   Given two planes in R3, will an ellipse on one plane necessarily project to an ellipse on the other?  If the planes are parallel, it’s trivially true. Similarly, if the ellipse is a circle, I know it projects to an ellipse. But if they’re not either of those cases? Assuming an orthographic projection, it seems to me the projection could end up some skewed, egg-like shape where the ellipse axes’ intersections point has been shifted away from the center of the ellipse.   Can someone please shed some light on this?

While studying the problem of determining the orbit of a binary star system, my astronomy notes say: "the projection of an ellipse onto a plane is still an ellipse (except the special case in which it's a segment)". How could I prove this?  EDIT: As suggested i'm adding what I know about ellipses. I know the basics of ellipses in the plane, the equation of an ellipse in a plane in cartesia coordinates, the equation of an ellipse in polar coordinates, the fact that ellipses can be obtained by the intersection of planes with a cone. In my geometry course we defined ellipses as the the points of the plane such that the ratio between the distance from a point and a line is constant and less than 1. I also know that the sum of the distances of the points of the ellipse from the foci is constant.


Hi :) I've got a 2017 macbook pro w/ touch bar  According to this site:        2nd Display Support:  Dual/Mirroring*     2nd Max. Resolution:    4096x2304   (x4*) Details:    *In addition to simultaneous support of the internal   display, this model supports a maximum resolution up to 4096x2304 at   60 Hz at millions of colors on four external displays or two external   displays at a maximum resolution up to 5120x2880 at 60 Hz at over a   billion colors via Thunderbolt 3 (USB-C).   If I'm reading that correctly, it means you can connect up to 4 external displays, and they can be 2K or 4K displays.  If it's a 5K display, you are limited to only two of them?  If I wanted to a setup with 3 external displays that are 2K resolution, how would I set that up?  Do I need adapters for all of them? Is there something I can get that would daisy chain all the monitors together from a single USB-C?  Any help or guidance would be appreciated.

I'm thinking about buying the new MacBook Pro with 4 USB-C ports.  I want to attach two screens, mouse and keyboard and ethernet to the MacBook Pro while using the fewest number of USB-C ports possible.  So what I need is an adaptor with:   two DP or HDMI ports (or one DP port with daisy chaining support) two or more USB ports an ethernet port   Best case would be a hub to which all devices are connected with a single connection to the MacBook Pro, including power supply. Worst case if attaching the MacBook Pro to the devices would require me to use all four of USB-C ports.  Given the answers up to far, I can tell that:   Daisy chaining might or might not work with the MacBook Pro (since it requires DP1.2 which is supported by the graphics chipset, but it's uncertain if it's supported by the MacBook Pro itself) I can attach the monitors with two cables as a last resort, leaving me with two ports for the remaining peripherals.   What I still don't know:   Would daisy chaining work with a hub or does it require the first monitor to be directly attached to the MacBook Pro? Does some kind of hub exist supporting attachment of all listed devices with a single upstream connection to the MacBook Pro?


Hi all, Tonight I'm going to see a 3D film so I thought I'd check whether I had any old 3D glasses around the house. Found a pair of "RealD" glasses.  Anyhow, I assume that the glasses use some kind of polarisation to work. So I played around with looking through them in the bathroom mirror.  The first picture shows me holding the glasses facing towards the mirror, and looking through one of the lenses at the reflection in the mirror. One of the reflected lenses looks black and the other looks transparent. Cool! Polarisation in action.  However, the right-hand picture shows me holding the glasses facing away from the mirror - and in that picture, when I look through one of the lenses at the reflection, both reflected lenses appear transparent.  What on earth is going on? Dumbed-down explanation suitable for a mere mathematician, please :-)

I have 3D glasses made up of plastic.  First case: When I hold front side of the 3D glasses (by this I mean that side on which light falls) in front of a computer screen, light coming from screen is not blocked, at any angle of rotation. But I see somewhat (slightly) bluish screen when 3D glasses are held horizontally; and yellowish (slightly) screen when glasses are held vertically.  Second case: Now I flip the side of the glasses i.e. "back" side of glasses is in front of screen and "front" side is closer to eyes. In this second case, when glasses are held horizontally, the light is blocked. When glasses are held vertically, light is not blocked; I can see the screen. For intermediate angle, intensity of light varies from minimum to maximum.  Questions:   Why I get slightly colored screens in the first case and why light is not blocked ? Why light is blocked in the second case ?   I know (after reading somewhere) that glasses consists of a pair of circular polarizer and linear polarizer. Circular polarizer in my first case will be near to computer screen and linear polarizer will be near to eyes; and in second case vice versa.


100% cpu usage when streaming flash video with Chrome, but firefox use less than 50% of my cpu usage.  what causing this?  also any workaround to fix it?  thank you.

Running Flash in Google Chrome drains my CPU massively:    I figured that the cause of this issue would be that hardware acceleration of flash is turned off. When I tried turning it by right clicking a flash application and selecting settings, this window popped up:    No hardware acceleration options can be found.  In Chrome, when I open about:gpu, I get to see this:    How do I turn hardware acceleration on in Flash or is there an alternative way of reducing the CPU usage?


We're a very niche domain marketplace, which has a few hundred domain names for sale, and most all of them are redirected to our site. Most get a few clicks a day, as they are non-keyword (generic terms)  We've just gotten a big domain name on board, and it's gotten about 1000 visitors for the day -- MORE THAN our actual site traffic gets without it -- most of all which are bounces. We plan to also have more names like this soon, whereas we'll receive tons of redirect traffic.  Is this bouncing traffic going to negatively affect our ranking or our SEO?  Or is the added number of visitors of greater weight than the increased bounce rate?

This is a question to experienced people that might help us shed some light on the issue.   We noticed a very strange behavior on our site, in Google Analytics. Some dude from Finland, namely, from Kouvola city is hitting one of our pages - only one page on our site, 'bout a hundred times per day, all with an average bounce rate of 90%+...  This is causing our overall bounce rate to go up by 1 to 3% per day... which is very disturbing.. since we're trying to do our best in order to keep it as low as possible. And obviously having it jumped from ~24% to 27%, just because of that crazy dude is not making us happy at all... We tried implementing a geo-targeted script in order to catch this particular visitor and deliver him a juicy message, and it seemed like it helped in the beginning, it has stopped for a day or two, but now he's back...   The geo-targeted script was also logging all IP addresses for page requests originating from Finland in order to find out more details and (in order to block them on the server level, later).. but thing is, it was all mainly cable or DSL connections with various, but not constantly repeating IPs... we are all wondering what is he up to really ?   I think that this page should be kept updated with ideas on how to combat this and perhaps someone could also shed light on what it might be ? What is the reason for doing this "bounce-rate attack", as I call it?  There was a similar question asked on stackoverflow earlier, with no meaningful answer - here -


One of the best Mac OS keyboard shortcuts I've discovered this past year is that by pressing SHIFT+OPTION while pressing the volume up/down keys or brightness up/down keys, the levels change in quarter increments instead of whole increments.  I find that I'm using this so often, that I'd now prefer the quarter increment change to become the default for these keys.  In an ideal scenario, for example, pressing the volume up key (without having to press SHIFT+OPTION) would increase volume by a quarter increment, and pressing the volume up key with SHIFT+OPTION would increase volume by a whole increment.  What would be the best way to accomplish this?  Someone pointed me towards the Karabiner-Elements keyboard remapping software, but I'm not sure if that's the right approach here or if it would even work.

First of all, I only want to disable the standard volume buttons - I do not want to disable the buttons to change brightness, launchpad...   I need this because I want those buttons to trigger  using .


So, in theory I can log in as an admin user and have someone else log in as the same user or a different user over an SSH session and have both users attached to the same screen. In our case we have a rather complex environment setup and sometimes need remote assistance with it. How is this done? Do we both need to be the same user?

I am setting up a server where there are multiple developers working on multiple applications.  I have figured out how to give certain developers shared access to the necessary application directories using the setgid bit and default ACLs to give anyone in a group access.  Many of these applications run under a terminal while in development for easy access. When I work alone, I set up a user for an application and run screen as that user. This has the downside that every developer to use the screen session needs to know the password and it is harder to keep user and application accounts separate.  One way that could work is using screen multiuser features. They do not work out-of-the-box however, screen complains about needing suid root. Does giving that have any downsides? I am pretty careful about using suid root anything. Maybe there is a reason why it isn't the default?  Should I do it with screen or is there some other intelligent way of doing what I want?


I have forgotten both my email id and password, only the mobile number is with me. Please help me to find out it.

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


I want to retrieve user name from my firebase data base   I have written this code and its showing error " java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference"  Here's my code:  `public class MyAccount extends AppCompatActivity {  private Button mSetupButton; private EditText mSetupName; private EditText mSetupBio; private ImageButton mSetupImageButton;  private String mPostKey=null; private DatabaseReference mDatabase;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_my_account);      mDatabase= FirebaseDatabase.getInstance().getReference().child("Profiles");     mPostKey=getIntent().getExtras().getString("profile_id");      mSetupName = (EditText) findViewById(R.id.accountName);     mSetupBio = (EditText) findViewById(R.id.accountBio);     mSetupButton = (Button) findViewById(R.id.accountButton);     mSetupImageButton = (ImageButton) findViewById(R.id.accountImageButton);      mDatabase.child(mPostKey).addValueEventListener(new ValueEventListener() {         @Override         public void onDataChange(DataSnapshot dataSnapshot) {              String post_name = (String) dataSnapshot.child("Name").getValue();             mSetupName.setText(post_name);          }          @Override         public void onCancelled(DatabaseError databaseError) {          }     }); }   }

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 Male nipple serves no evolutionary function, yet it remains in the Genomic code. Is there only one Gene for the human nipple?

I'd be tempted to call nipples in men vestigial, but that suggests they have no modern function. They do have a function, of course, but only in women. So why do men (and all male mammals) have them?


Considering the damage that the rebel Star Cruiser dealt to Snoke's ship when jumping to hyperspace, why is this seemingly the first and only time we've seen this? Why are there not say missiles with the means to jump to hyperspace?  I really hope there's a canonical answer for this, as it makes the movie feel like a fan film rather than actual canon.

This question is related to "The Last Jedi":  The maneuvre that vice admiral Holdo (with the purple hair) uses towards the end of the film seems remarkably effective.   It seems that it would have worked pretty well much earlier. Especially as two other ships were just allowed to run out of fuel and be destroyed.  It seems doing it earlier with different assets would have incurred less losses. Yet nobody seemed to consider it. Any in universe reason why?


on selecting values from the drop down, if the selected  values equals to a certain value, i want the dropdown to change to readonly, how can i do that?   HTML:  <select id="s_id">    <option value="volvo">Volvo</option>    <option value="saab">Saab</option>    <option value="opel">Opel</option>    <option value="audi">Audi</option></select>   Script:  $(document).ready(function () {    $("#s_id").change(function () {      var x = $(this).val();      //alert("something's changed");      alert($(this).val());      if (x === opel) {          alert("iff only.....");          $(this).attr("readOnly", "true");     }    }); });   Fiddle:

According to HTML specs, the select tag in HTML doesn't have a readonly attribute, only a disabled attribute. So if you want to keep the user from changing the dropdown, you have to use disabled.  The only problem is that disabled HTML form inputs don't get included in the POST / GET data.  What's the best way to emulate the readonly attribute for a select tag, and still get the POST data?


Problem: $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$, here $\mathbb{R}$ is the set of real numbers. $f$ cannot be continuous if $f$ takes every value exactly twice.  Now this question is really old and asked many times before on stackexchange. But every solution is by crude manipulation. I want to know if there exists an insightful solution of this.   My problem: I have solved the problem before like this, first assume the function is continuous and then by applying intermediate value property lead to some contradiction. But if the problem is a more general one, like if the function takes every value thrice, the same argument works, but the solution becomes lengthier. That's why I am asking for some more nice solution, may be using some advanced tools.

I need to prove the following:  There's no continuous function $f:[a,b]\to \mathbb{R}$ that takes each of its values $f(x)$, $x\in [a,b]$  exactly twice.  First of all, I didn't understand the question. For example $x^2$ takes $1$ twice, in the interval $[-1,1]$. Is it saying that it does not occur for all $x$ in the interval? But what about $f(x) = c$? Is it saying that it does not occur only exactly $2$ times, then? I have no idea about how to prove it. I know that for $f(x)$ such that $f(a)<f(x)<f(b)$, if $f$ is continuous then there is a $c\in [a,b]$ such that $f(c) = f(x)$.  Now, there's the following proof in my book and I really wanted to understand it, instead of just getting a new proof  Since the interval $[a,b]$ has only $2$ extreme points, then the maximum or minimum of $f$ must be in a point $c\in int([a,b])$ and and in another point $d\in [a,b]$. Then, there exists $\delta>0$ such that in the intervals $[c-\delta, c), (c,c+\delta)$ (and if $d$ is not extreme of $[a,b]$, $[d-\delta, d]$) the function takes values that are less than $f(c) = f(d)$. Let $A$ be the greatest of the numbers $f(c-\delta), f(c+\delta), f(d-\delta)$. By the intermediate value theorem, there are $x\in [c-\delta, c), y\in (c, c+\delta]$ and $z\in [d-\delta, d)$ such that $f(x)=f(y)=f(z)=A$. Contradiction.   Well, why the last part? Why is it that I can apply the intermediate value theorem to these values? For example, $<f(c-\delta)<p<f(c)$, then by the theorem I know that there exists $m\in [c-\delta, c)$ such that $f(m) = p$. Same for the other intervals. But what guarantees thhat the greatest of the values between  $x\in [c-\delta, c), y\in (c, c+\delta]$ will be inside the intervals $[c-\delta), c), (c,c+\delta), [d-\delta, d)$?