I have a select with multiple columns:  select columnA,AVG(columnB),AVG(columnC),AVG(columnD),AVG(columnE)...   columnA is an Integer and all the others are Double. Here is how i initialize the GenericRawResults object:  GenericRawResults<Object[]>rawResults = dao.queryRaw(     "SELECT columnA,AVG(columnB),AVG(columnC),AVG(columnD),AVG(columnE)...",     new DataType[]{DataType.INTEGER,DataType.DOUBLE,DataType.DOUBLE,...});   When I run a for statement...  for(Object[] result: rawResults) {      //some code here  }   I get this Exception:      Attempt to invoke virtual method 'boolean com.j256.ormlite.stmt.SelectIterator.hasNext()' on a null object reference   Am I doing something wrong?

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?


For the purpose of keeping to this short, Ill excluse the entire code, this is more of a pythonic question. Lets pretend that theres  a list called "plist". This list has a rage of N...  print(plist[0:4]) print(plist[4:8]) print(plist[8:12]) print(plist[12:16]) print(plist[16:20]) print(plist[20:24])   ...  What Im trying to do is imitate this behavior, basically printing out my list into 4 columns...  simple enough right?  also, its a straight up list,nothing nested   Using the len() we can get the number to use for range Im just im banging my head trying to figure out how to use a loop that will use the len() as the max value ...??  Also, I know you can use slice but there's some logic math involved since the length can be od or even and bahhhh.... my brain hurt.    EXAMPLE OF OUTPUT:   >>> plist [178433, 207110, 204805, 140038, 177544, 179979, 166668, 177602, 140559, 170642, 208019, 150809, 161434, 177565, 134814, 175221, 172577, 204708, 177573, 146604, 177694, 180041, 156088, 180064, 172478, 177599, 172608, 141761, 156226, 171718, 170056, 141513, 208082, 162509, 171726, 132431, 204753, 178386, 179923, 178390, 171864, 204772, 207049, 134368, 148961, 169828, 131301, 171754, 144107, 206308, 178415, 151920, 206323, 207988, 134334, 141431, 206328, 176508]   And desired output   forExmple() [178433, 207110, 204805, 140038] [177544, 179979, 166668, 177602] [140559, 170642, 208019, 150809] [161434, 177565, 134814, 175221] [172577, 204708, 177573, 146604] [177694, 180041, 156088, 180064]   UPDATE  AHA!  okay so I figured if I break the list it more list ... durppp Ican chuck it... quick google search.... so I got this..  chunks = [plist[x:x+4] for x in range(0, len(plist))]   THEN, By using lenght of chuncks I can iterate throughthat number as therange,,,  for i in range(0, len(chunks)):     print(chunks[i])   BOOM... any better way?

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 experienced this scenario once before and now today, whenever I updated my QGIS installation on Ubuntu, it didn't reload python plugins under ~/.qgis2/python/plugins when started, only c++  plugins are available. I can't really recall what I did previously but when I restarted my machine it seemed to work out of the box. Any ideas?

Following the QGIS installation guide I have tried both UbuntuGIS and QGIS stable, but both fail with the error message:  The following packages have unmet dependencies:  python-qgis : Depends: python-qgis-common (= 2.6.1.1+trusty1) but it is not going to be installed             Depends: libqgispython2.6.1 but it is not going to be installed            Depends: libqgis-analysis2.6.1 but it is not going to be installed            Depends: libqgis-core2.6.1 but it is not going to be installed            Depends: libqgis-gui2.6.1 but it is not going to be installed            Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed   qgis : Depends: libgdal1h (>= 1.8.0) but it is not going to be installed      Depends: libqgis-analysis2.6.1 but it is not going to be installed     Depends: libqgis-core2.6.1 but it is not going to be installed     Depends: libqgis-gui2.6.1 but it is not going to be installed     Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed     Depends: qgis-providers (= 2.6.1.1+trusty1) but it is not going to be installed     Recommends: qgis-plugin-grass but it is not going to be installed     Recommends: qgis-plugin-globe but it is not going to be installed   E: Unable to correct problems, you have held broken packages.    I had QGISv.2.4 running on my machine with Ubuntu 12.04. After upgrading to Ubuntu 14.04 I was getting error message that pyqgis could not be loaded.  So I uninstalled QGIS using the Ubuntu Software Center and also run  sudo apt-get purge qgis   After that I tried to install the latest version of QGIS Debian Stable and UbuntuGIS unstable but getting the error messages described above.  The weird thing is that neither Ubuntu Software Center nor apt-get list have QGIS listed as installed, but if I run a search for qgis on my file system qgis and all its dependencies are still there. That's why I getting told to have broken packages.


What rules govern "shooting into combat" -- that is making a ranged attack on an enemy who is partially obscured by other creatures.  I know that the rules regarding cover may give the enemy an AC bonus in this case.  Is there any risk of hitting an unintended target on a miss?

While running a session recently, one of the players chose to "assist" his companion who was in melee with a goblin, by firing an arrow at the pair of them. I couldn't find any particular rules for this scenario so just had him roll at a disadvantage, counting a miss as a hit on his companion (damage to be ascertained by a second roll).   This seemed to work okay, and became a running joke for the night as the arrow bounced off the companions back, but are there specific rules for this scenario?


I have been trying to find out what this film was called - I saw it years ago. It was about a man who was the last man on earth, but then found another 2 people. I can't remember the rest until the end where he wakes up on a beach then a huge ringed planet rises above the ocean. I think it was an Australian film but cannot say for certain. If anyone can name it I would be very grateful.  EDIT: I think it was sometime in the 1980s

This was a TV show aired in the UK probably sometime between 1990 and 1993, if memory serves it was only a one-off. The plot starts with the protagonist waking up in bed and being disappointed. He eventually goes outside and everyone is dead, whatever they were doing at the time they died doing it (driving, working, etc.) The protagonist is in a state of panic running around town (I seem to remember it being set in the UK) and he discovers that he's is 'alive' because he'd attempted suicide and died at the exact moment this mysterious event happened. I think he encounters others that 'died' at the time of the event and that's when he realises. I think the protagonist was a bald, white man, probably mid-thirties. Sorry for any vagaries, I was VERY young when it was on. Until recently I assumed it was The Quiet Earth but I've checked and it definitely isn't. It was in colour and was contemporary at the time so it would have been made around 1990.


When I have a file created in Vim/Linux with :set fileencoding=utf-8 and have diacritics (as e.g. german umlauts) in the file, then calling up file myfile.txt results to myfile.txt: UTF-8 Unicode text. If I have no diacritics in the file, then the determination of the file encoding results to myfile.txt: ASCII text.  Why is that? And how can I determine safely, that a whole bunch of files is encoded correctly by using UTF-8 file encoding?  EDIT:  ASCII is 7-bit and is a subset of UTF-8. I want to know if my source files are encoded in UTF-8 so that they can hold diacritics sometime in the future. IMO this is not obvious and I like to find a way to determine this safely.

In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage.  Is there a way to (automatically) detect the codepage of a text file?   The detectEncodingFromByteOrderMarks, on the StreamReader constructor, works for UTF8  and other unicode marked files, but I'm looking for a way to detect code pages, like ibm850, windows1252.     Thanks for your answers, this is what I've done.  The files we receive are from end-users, they do not have a clue about codepages. The receivers are also end-users, by now this is what they know about codepages: Codepages exist, and are annoying.  Solution:    Open the received file in Notepad, look at a garbled piece of text. If somebody is called François or something, with your human intelligence you can guess this. I've created a small app that the user can use to open the file with, and enter a text that user knows it will appear in the file, when the correct codepage is used.  Loop through all codepages, and display the ones that give a solution with the user provided text.  If more as one codepage pops up, ask the user to specify more text.


Jhon horse was tied to a 10-meter-radius circular pasture. The stretched horse rope reached 15 m. How big is the horse able to graze?    My attemp: []  Correct?

What length of rope should be used to tie a cow to an exterior fence post of a circular field so that the cow can only graze half of the grass within that field?  updated: To be clear: the cow should be tied to a post on the exterior of the field, not a post at the center of the field.


I have a problem:  $(5x + 3e^x)(15x^2+e^x)$  My answer is:  $75x^3+5xe^x+45x^2e^x+3e^{2x} $  is this correct?

$(x+2)(x-1$)  Totally forgot how to do it. Isn't this the rule:  $(a+b)(c+d)$  $a*c +a*d +b*c +b*d$  The answer I'm getting is $x^2-x+2x-2$ which is wrong. Please help me out, thanks!


Is there a general advice to go for Intel core processor (i3/5/7/...) devices when using Ubuntu 's instead of Ryzen's (3,5,...) or specifically Ryzen 5 5500 U?

I want to know if there is a centralised community site where all Hardware is listed in terms of compatability with Linux. Something like AppDB for Wine.


If $X,Y$ are independent Poisson random variables with parameter $\lambda_1, \lambda_2$, then $X+Y$ is Poisson random variable with parameter $\lambda_1+\lambda_2$. I am wondering whether the converse if true, given a poisson random variable on a probability space $(\Omega, \mathcal{F},P)$, can we always decompose it into independent poisson random variables with parameter $\lambda_1,\lambda_2$ such that there sum is the given random variable?

Given a Poisson random variable $X$ with parameter $\lambda$, I want to write $X=X_1+X_2$ where $X_i$s are independent Poisson random variables with parameter $\lambda_i$s such that $\lambda=\lambda_1 + \lambda_2$  I understand this intuitively. But given only a function from $\Omega \to  \Bbb R$ how to write these two functions


On desktop devices, the buttons to flag or like a comment appear when you hover over it.  However on my Surface, I cannot hover over it but I am on the desktop site, meaning I cannot flag or up vote comments.  Can this be changed?

I have a Windows 8 tablet with a touch screen (Surface pro) using IE10, I do not like to use the mouse a lot since it is touch, SE sites are not really touch friendly and the mobile version looks ugly on devices other than mobile devices, anyhow I still can manage to navigate SE sites with no much complains except for comments. To upvote a comment, flag it or to delete it you need to hover the mouse to see the buttons for these controls which has no alternative way for touch screens and you will have no choice but to use the mouse to hover the comment. If no mouse available there is only one way, go to the mobile site and upvote then get back to the full website, just boring! and the mobile version does not have a flag button anyway!  Can SE team solve this? Facebook solved a similar issue for posts, if you touch (or tap) a single touch on the post's div the control buttons will show and stay there just like you're hovering the mouse and disappears when selecting another post (the hover effect still there for mouse users). Can something like this be done? it will make SE sites more touch friendly.


This anime movie was released late 90s up until 2004.  All I remember of the movie is that the scientists are at a research facility in a snowy and ice covered place, when a band of Americans shows up and starts killing everyone and one of the mercenaries uses a minigun.

This is one of the few movies I saw on one of my relative's computer screen when I was little. As I was too young to understand anything, it was approximately 15 to 20 years ago (I believe the movie couldn't have come out after 2000, but the quality of the pictures looked good enough that I have my doubts).   The movie I am looking for was fully animated. Potentially a Japanese animated movie, but I can't tell for sure, as I was too young to tell the difference between Japanese, English or any language. There may be blood in the movie, but I can't tell for sure. However, now that I'm looking back, the drawing style looked slightly Japanese, although it was more of the bloody kind (I could slightly compare its style to "Blood: The Last Vampire" (2000)). Maybe it had an Asian tone to it (e.g. it could be a Korean animated movie too).   One of the "bad guys" was a tall, heavy guy, in a very armoured suit. I can't tell whether he was wearing a suit, or if his body was enhanced because he survived an accident (although I have some form of memory about the latter). Most of his body was covered, but I remember his face not being covered. The most distinctive feature he had was the fact that he had a Minigun where one of his arm should be (a bit like Barret in Final Fantasy 7). I think the first time we see him, he's seen crushing a metallic ashtray with his other hand.   A battle scene in the movie includes the heavy guy having a shoot-out against a relatively thin guy (or should I say "normal-sized man"), fighting him with a machine-gun mounted vehicle (he wasn't the one driving; he was shooting from the back of the vehicle). While they were shooting at each others, I remember the heavy guy screaming (nothing in particular, he was just shouting continuous "AAAHH~!!" in pure rage). The fight didn't seem to happen in a city. It slightly looked like a battlefield. The fight ended with some form of explosion, probably killing off the heavy armoured guy.   The other noticable character was a young boy. He looked... pale, almost weird. His skin was almost green, otherwise he looked like a regular child. He seemed to have some psychic powers too: at some point, when he was feeling uneasy and sweating, a man picked a sample of blood from the back of his neck, using a portable device. But when the man was... either incapacitated or down, that boy broke the device containing his blood simply by looking at it.   At some point near the end of the movie, the pale looking boy and some people (with scientists among them) seemed to be inside a huge facility or underground hangar. There was a lot of space, although I can't remember if it was a factory, or if it was an underground weapon storage. The child was also giving some form of speech too, as all the lights turned on suddenly. The others were possibly surprised by what they were seeing.   One last detail I remember about that child is his smile. While it wasn't as scary as the Joker's, his grin was... kind of creepy, because of how he looked at the others with his small round eyes. He was oftenly grinning.   Overall, most of the scenes I remember were quite dark (mostly because there was little light, or it was night time). The two exception being the battle scene (although it was dark, there was a lot of muzzle fire), and the last underground scene with the boy.   When I asked my relative about the movie, all they could tell me was: "The coloured word 'Aiko' was written on the cover of the CD".


Does anyone know how to download Mavericks from Yosemite?  I'm trying to get the image to put on a different computer but it won't let me download it from the App Store.  I click "download" and it says "OS X 10.10 is already installed on this computer.  Are you sure you want to download OS X 10.9?".  I click "OK" and it does absolutely nothing.  [edit]  Solution for anyone looking for it:   Same thing works here.   Open App Store Modify /System/Library/CoreServices/SystemVersion.plist and set 10.10 to 10.8 Start Download Revert modifications

I have installed the developer preview for Yosemite.  Huge mistake. Everything in my workspace is broken.  I don't have any sort of backup image. I was wondering if I could re-download Mavericks and run the installer - would that effectively downgrade me back to Mavericks?


I run several apps split between two monitors and I'd love to have parent and child windows minimizing/maximizing and brought to top by each other as they behave in Windows. Anyone know if this is possible under Cinnamon?  Note that I'm NOT looking for a hotkey solution, this is about if an app window is active, it and any child windows - or the reverse, should be on top. And I get this might be impossible, but it's such a huge pain in my ***, windows not being linked. :(  And I have not found any solution anywhere. As a former Houdini LoCo TeamLeader, I have a fair bit of Linux experience, so it's not like I haven't digged into this pretty deeply before looking for help here.

I have an application using multiple windows. How can I quickly bring all the windows of that application to the foreground?   When I scroll through the applications with the scroll-wheel it only shows one window. When going to the next window, the last window is brought to the background again.  When I click on the application icon, I get a full-screen overview of all the windows. I have to select each window manually and move my mouse across half the screen several times.  My best solution so far is minimizing all windows (Ctrl+Super+D) and then show the windows of my application using the scroll-wheel.  Is there a better solution?


Looking for a way to choose the proper modules for the system, I reviewed all my notes taken in class.    I know looking is present participle, but I feel it is improper to be used in this meaning. The participial phrase functions as an adjective modifying I (the subject), but the meaning expressed in this sentence is not like an adjective. I think it is clearer if expressed in adverbial clause of purpose.

My case here is that I was writing something for school, and my teacher explained an error which I really can't see. She referred to articles about "dangling participles", which was previously unknown to me. I find it hard to relate the examples I've found about it to my situation. So this is a text I've written and the bold part is where the problem arises: (You could read only the bold part if you please)  Wandering, and lost in his thoughts, there is a deep despair occupying the mind of this man. He is barely aware of his surroundings, except for those few moments when the loud blissful voices break through the protective barriers, developed by his immense sadness and grave frustration, into his mind. ”How can they all possibly be so happy?” he thinks to himself. Staring blindly, with his head low, as he walks in a slow pace, whispering ”Mary, Mary, my Mary,” over and over again. Yesterday was her funeral. She had passed away from a severe type of cancer, at a relatively young age. It was his wife. They had been together since high school and were greatly attached to each other. Having spent nearly half his life by her side, we cannot but imagine his grief. Indeed, he could hardly picture a life without her. So, alone he roams in the midst of all the seemingly incessant cheering and noises, drowned by his sorrow.  Her comments on that part was:  we is slightly out of place here – see my comment below These few sentences are about him and his emotions, so ‘we’ seems out of place. If the sentence starts: ‘Having spent nearly half his life by her side’, the reader expects it to continue: ‘he’. After all we have not spent half our lives by her side.  Is she right? If so, could anyone try to explain why?


We are given a positive number a and a function $f:[0,a]\rightarrow[0,+\infty)$ that satisfies $f(0)=f(a)=0$ and $\forall_{x\in(0,a)}f(x)+f''(x)>0$. Prove that $a\ge\pi$.  Obviously we can assume that $a$ is the first point after $0$ for which $f(x)=0$. It is so because if $x\in(0,a)$ and $f(x)=0$ then f satisfies all of this problems conditions on the interval $[0,x]$ so we have to show that that $x\ge\pi$ anyway (the first such $x$ must exist since $f$ can't be constantly $0$ on any interval $[0,\epsilon)$ because then $\exists_{x\in[0,\epsilon)}f(x)=0$ and $f''(x)=0$ so $\exists_{x\in(0,a)}f(x)+f''(x)=0$. Contradiction. And it can't be that $f$ hits $0$ infinitely often near $0$ since then $f''$ would be unbounded from the negative side so we would find $x\in(0,a)$ such that $f(x)+f''(x)<0$. Another contradiction.  Having said that I am lost. The condition $\forall_{x\in(0,a)}f(x)+f''(x)>0$ invokes some use of trig functions (both $\sin$ and $\cos$ satisfy $f(x)+f''(x)=0$) and I have experimented with a number of functions. Here are some of my findings (here we assume $a<\pi$):  $\forall_{n\in\Bbb{N}}\space g(x)=f(x)\pm n\sin(x)$ satisfies $g(x)+g''(x)>0$  $\forall_{n\in\Bbb{N}}\space g(x)=f(x)\pm n\cos(x)$ satisfies $g(x)+g''(x)>0$  $g=\dfrac{f}{\sin}$ has a positive second derivative in $x$ if and only if $f'(x)+\dfrac{f(x)}{\tan(x)}>0$  I get that the condition $\forall_{x\in(0,a)}f(x)+f''(x)>0$ somehow dictates how fast can $f$ get back to $0$ from $0$ but my intuiton is out on this one.  Any help would be appreciated.

Please help me to solve this question:  Suppose $f:[a,b] \to \Bbb R$ satisfies:  $f''(x)+f(x)>0$ and $f(x)>0$ for all $x\in(a ,b)$; $f(a)=f(b)=0$.  Prove that $b-a>\pi$.  Thanks in advance.


For a group $G$, if $|G|$ is prime, then I have to prove $G\cong \Bbb{Z}_p$.  Take any element $g\in G$. As $G$ cannot have proper subgroups, and as it also has finite order, $|g|=p$. Hence, $G=\{1,g,g^2,\dots,g^{p-1}\}$. We know $\Bbb{Z}_p=\{0,1,2,\dots,p-1\}$. Hence, $f:G\to\Bbb{Z}_p$ defined by $f(g^r)=r$ for any $r\in\Bbb{Z}_p$ is a homomorphism.   If we can now prove that the kernel of this mapping is $\{1\}$, then we're done. Clearly, $1$ is the only element that maps to $0$ in the above homomorphism.    Is the above reasoning correct? What are some other ways of proving isomorphism between the two groups? Is proving that the kernel is composed of only one element the only way? I read somewhere that if provided you have proven $f$ is a homomorphism, and that $h$ is another mapping from $\Bbb{Z}_p$ to $G$, then proving $fg$ is injective and $gf$ is surjective is sufficient to prove isomorphism. But what are the properties of $g$?

Show that every group of prime order is cyclic.   I was given this problem for homework and I am not sure where to start. I know a solution using Lagrange's theorem, but we have not proven Lagrange's theorem yet, actually our teacher hasn't even mentioned it, so I am guessing there must be another solution. The only thing I could think of was showing that a group of prime order $p$ is isomorphic to $\mathbb{Z}/p\mathbb{Z}$. Would this work?    Any guidance would be appreciated.


I am learning about *nix file systems. In particular, I've been following this tutorial  interspersed with some Googling & whatnot. Is the true form of a Unix directory essentially just a file that consists of (column 1) inode numbers and (column 2) a string indicating the name of the file/directory corresponding to that inode number? And then, what we see as "The files/other directories that are contained in this directory" is really just the fact that the OS prints out the list of items in the table, when you do $ ls (or otherwise browse a particular directory)? So for example is this the true format of a directory file...  if this were done in C, a file with a int inode column and a char * filename column.

Just started reading a bit about the linux file system. In several places I found quotes like this one:      Unix directories are lists of association structures, each of which contains one filename and one inode number.   So I expected to find out that each directory would contain the names of the files under it, with each file mapped to an inode. But when I do vim directory_name in ubuntu, I get something like this:  " ============================================================================ " Netrw Directory Listing                                        (netrw v156) "   /Users/user/workspace/folder "   Sorted by      name "   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$ "   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special " ============================================================================== ../ ./ folder1/ folder2/ file1 file2   I expected to see an inode number next to each file name, why isn't this the case?


When choosing the public key for ElGamal, $\alpha$ must be chosen as a primitive mod p. What if $\alpha$ is not a primitive root ? How will it influence the encryption and decryption ?

Suppose Alice chooses a random Prime $p$ and a random private Key $a \in \mathbb{Z}^*_p$. By accident, she also chooses a random number $g \in \mathbb{Z}^*_p$, which is not a generator of $\mathbb{Z}^*_p$ and therefore  $$\langle g\rangle \subset \mathbb{Z}^*_p$$  as opposed to $\langle g\rangle = \mathbb{Z}^*_p$, which would yield a valid key. Alice then computes $A \equiv g^a \pmod{p} $ and publishes the Tuple $(p,g,A)$ as her public key.  Bob now encrypts a message $M$ using Alices public key by computing  $$C_1 = g^b \pmod{p}$$ $$C_2 = M \cdot A^b \pmod{p}$$  Is it possible for an attacker (Eve) to distinguish a “real” ciphertext $(C_1,C_2)$ from a random ciphertext $(Z_1,Z_2) \stackrel{$}{\longleftarrow} \mathbb{Z}^*_p$ with significant advantage (say $Adv \geq \frac12$)?    Edit: I guess it should be enough to show, that the ciphertext cannot be random, if  $$\langle g \rangle \neq \langle C_1 \rangle \quad(\text{or $Z_1$, respectively})$$  But how can Eve check for this property efficiently? Can someone point me in the right direction here?    Edit: A real-world situation where this flaw occurred


I am working with a dataset that is essentially all categorical data. I have 20-30 distinct columns of categorical data, with some columns having as many as 1000 different categorical values. If I use dummy variables to convert all of my categorical data I will have so many features that I don't know how I could ever interpret my results.  I'm curious as to what is best practice for these sorts of problems? I care more about interpretability of my model than the predictive power. What are the best categorical modeling techniques to use? And is the false numerical relationships label encoder will introduce out weigh the benefits of reduced dimensionality and ease of interpretability.

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


so basically I want to add more commands into a single key for e.g:  When ingame, I need to press Q for skill but after that I must press ctrl+6.   How can I combine both of them into the Q key? when I press Q it will activate the skill AND the ctrl+6.  Thanks

I just bought an IBM Model M keyboard. While awesome, it lacks a windows key and multimedia keys. While there are many programs out there that can map one key to another, or one key to a key sequence, are there any programs that will map a keyboard sequence to a single key?  Edit: OS = Win7


I am having an issue creating a custom console, on the following code: public class UserConsole {      protected static BlockingQueue<String> inputData;      private final static JTextArea textArea = new JTextArea();     private static JTextField textField = new JTextField("");  private void createGUI() {      final KeyListener returnAction = new KeyAdapter() {             @Override             public void keyPressed(KeyEvent e) {                 if (e.getKeyChar() == '\n') {                     returnInput();                    }             }};     }  private void returnInput() {   //Here is the problem, the BlockingQueue throws a NullPointerException, which is strange, because the... //...right after "System.out.println(textField.getText());" works perfectly fine.    inputData.offer(textField.getText());         System.setOut(userStream);         System.out.println(textField.getText());         textField.setText("");         System.setOut(nebulaStream);            } }  I tried searching online, but didn't find anything, also tried adding .toString() but it does not work as well. As far as I know, a BlockingQueue cannot be initialized... So my final question is. Why is the BlockingQueue not reading the JTextField's string, and how can it be solved? I hope it is not something obvious that I missed, every help is appreciated!

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?


$inputYN = Read-Host "(defaults to y in 10 sec) [y/n] ";   If user doesn't provide any input in 10 second then default $inputYN should go to "Yes" and move forward to next task.

I have searched but apparently my google foo is weak. What I need is a way to prompt for user input in the console and have the request time out after a period of time and continue executing the script if no input comes in. As near as I can tell, Read-Host does not provide this functionality. Neither does $host.UI.PromptForChoice() nor does $host.UI.RawUI.ReadKey(). Thanks in advance for any pointers.  EDIT: Much thanks to Lars Truijens for finding the answer. I have taken the code that he pointed out and encapsulated it into a function. Note that the way that I have implemented it means there could be up to one second of delay between when the user hits a key and when script execution continues.  function Pause-Host {     param(             $Delay = 1          )     $counter = 0;     While(!$host.UI.RawUI.KeyAvailable -and ($counter++ -lt $Delay))     {         [Threading.Thread]::Sleep(1000)     } }


I'm a Demon Hunter with  which does up to 1423 Fire damage, however for my primary resource generator , I'm using the Focus rune which makes it Cold damage.  So when I shoot with Evasive fire, do I do fire, cold or both damage at the same time?

I have a weapon that adds Holy damage.  How does this work with my skills that say "Does X% of weapon damage as INSERT ELEMENT damage and things of that nature"?  Example: My wand does 8-14 damage at 1.40 Attacks Per Second.  It has +1-2 Holy Damage for a total DPS rating of 15.4.  Ray of Frost deals 215% weapon damage as Cold damage.  How does this interact with the Holy damage?  What if the two elements are the same?


We have Acer Aspire E15 computers running with Ubuntu 15.10 for students and I am preparing a course.  I cannot access internet via wireless, only via ethernet. The wireless specifications are posted on   Could someone help me?  Thank you very much.

I bought an Acer laptop and installed Ubuntu 14.04LTS but WiFi drivers are not available for it. So I am trying to install a windows driver using wifidocs/driver/ndiswrapper.  On doing lspci -vvnn, it gives:  Network controller ［0280: Qualcomm Atheros Device ［168c:0042］ (rev 30)   Then I also disabled the atheros drivers. Using lspci and lspci -n, I can say PCI id is 168c:0042. But Acer website has three atheros drivers. I could not figure out which one to download but downloaded one on a windows PC and pasted the zip file on my desktop then unzipped it from the terminal using unzip <filename>.zip. The page says you have to go to control panel system hardware and all that on the windows system. I did not do it. Windows computer not being mine, I am afraid I should not install any additional driver on it. After unzipping it has one .inx file and one .bin file but no .sys file. I don't know whether I am completely right till here or have I missed something? And if I am right then how to proceed from here? I also made a new directory and copied the unzipped .inx and .bin files in it. Then in that directory I ran the ndiswrapper -i <filename>.inf but it says ndiswrapper not installed and when I do sudo apt-get install ndiswrapper-common, I get the reply that ndiswrapper-common is already the latest version. What to do? here is my dmesg | grep ath10k result  [   7.882758] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [    8.190016] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [    8.334587] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2 [   10.140677] ath10k_pci 0000:03:00.0: qca9377 hw1.0 (0x05020000, 0x003820ff sub 105b:e09a) fw WLAN.TF.1.0-00267-1 fwapi 5 bdapi 1 htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features ignore-otp [   10.140682] ath10k_pci 0000:03:00.0: debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 Here is the output of lspci -nnk | grep -iA2 net  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Acer Incorporated [ALI] Device [1025:098a]     Kernel driver in use: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]     Kernel driver in use: ath10k_pci


How does a (static) magnetic field accelerate objects (like an iron nail) if we are taught that the magnetic force does always zero work?

I learned that the force from a magnetic field does no work. However I was wondering how magnets can be used to pick up pieces of metal like small paperclips and stuff. I also was wondering how magnets can stick to pieces of metal like a refrigerator?


I am working with population data organised in parish units for the whole of Denmark. Many parishes are very small (ie <500 inhabitants compared to a median of around 1500) so I plan to merge these with the next largest adjacent parish. I am working with shapefiles and can manually merge the polygons using QGIS, but with over 1000 small parishes, it would be nice to be able to automate this process! Any suggestions as to how - in QGIS or other software (I also have access to ArcInfo)?

I have a shapefile with 3800 polygons representing the smallest administrative areas in Ireland. Many of these, in rural areas, have tiny populations, under 100 people. In urban areas, all would have adequate populations.  For each area I have a population figure, and various other attributes, all of which can be intelligently summed to give valid results for areas produced by combining the smaller areas.  I need to merge the areas to get say, 500 or 600 areas of reasonable population. I need to leave the larger (in population) areas alone, where possible. I would greatly prefer to do this automatically. This is necessary for model fitting purposes, primarily.  I've looked at a number of the dissolve questions here:   'Batch Dissolve Polygons based on Attributes in QGIS or FWTools' I think would require me to know which areas to merge, when this is what I need to calculate. 'Practical way of managing polygons and unions of them' and 'How do dissolve polygons from shapefile using open source tools?' have the same issue.   Any suggestions?


Quora users (bots?) are copying a significant amount of Stack Exchange questions to Quora, without proper attribution. It seems quite systematic. Examples from :    :   Examples from :  :  :   I'm guessing that some other Stack Exchange websites are affected. I wonder whether Quora help organize this content theft because when looking at the profiles of the Quora "users" that copy all questions, such as  (he's the one copying https://money.stackexchange.com's questions) and  (he's the one copying https://travel.stackexchange.com's questions), we don't see the questions in the user profiles, which shouldn't be happening and therefore seems to be some kind of cover up only Quora could technically do, as far as I know. Anyway, how can we make this systematic content license infringement stop?  Updates:  2020-01-26: I reported Quora users  and  to Quora on 2020-01-20: Quora has taken no action yet and hasn't communicated with me. I have noticed that some questions posted on Stack Exchange get copied to Quora in less than one minute, which leads me to think that this copyright infringement process from Quora is automated. For example,  got copied to  by  in less than one minute. I've just reported this Jordan-Gambrell-2 user to Quora. If Quora doesn't take action within 1 week,  I will   via .  2020-01-29: I've looked at Quora's content more systematically over the past few days and it is clear that thousands of questions have been copied, and very likely one or two order(s) of magnitude more (I'm guessing >10k questions). Quora still hasn't replied to me.  As a result, I have  via .  2020-03-08: I haven't had any reply from Quora or Stack Exchange.  from a Stack Exchange employee:  [Stack Exchange] don't send any follow-up because we do nothing with about 99.9% of those reports.   2020-07-07: Further examples by Dex Jackson are documented at the Chinese.SE meta: .  It is possible to watch the plagiarism taking place live on . We can see on  that Steve is also actively plagiarizing questions from Stack Exchange.  2020-07-09: Further examples by Dex Jackson are documented at the Math.SE meta:  where there is a response from Quora; they (failing to see the irony) write:  Thank you for your report. It appears from your claim that you do not own the copyright of the and/or are not authorized to act on behalf of the owner. We ask that you provide more specific evidence that you own the copyright to the content in question, such as a copyright registration or other information supporting your claim.  Meanwhile,  continues.   So for now I'm simply double posting my questions on both Stack Exchange and Quora, which on the upside of makes it a bit easier to .

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I tend to think of  when it comes to knowing something. If we look at the history of probability theory it centers on a lack of knowing the exact outcome of certain games/gambling bets. This I have no problem with, as it centers on epistemological considerations of incomplete information.  However, very often I'll hear someone explain Quantum Mechanics or radioactivity in terms of an inherent indeterminism/randomness in nature. This I cannot understand, and I honestly think the people who nonchalantly say "Well the amazing thing is the Universe is inherently random!" really aren't thinking things through.  Where is this indeterministic/random "event" or "interaction" coming from? Does it come from nowhere, like a  in Newtonian dynamics? How is this possible? And why does it seem to follow objective probabilities at the very least? What "fixes" that probabilistic distribution, and why must it be fixed like that instead of being completely random/chaotic (in the sense of completely patternless, not Chaos Theory, which is fully deterministic)?  It seems as if these concerns are never addressed, and in all honesty, true randomness is almost like magic. Someone just has to say "Well something funky happens during the measurement process. Basically a wand is waved and we have a determinate result at the end."  I find that conclusion terribly wanting, and the fact that so many fully deterministic interpretations of QM exist makes it far from something we have to take as settled. If someone can shed some light on these concerns that would be much appreciated. Causal determinism seems like the only way of looking at the world that doesn't suffer from this quasi-mystical "randomness" that no one can seem to adequately explain.

When I say totally random, I mean absolutely random, not pseudorandom. If I want to say "totally random" numbers such as 1,26,17,4,1 and 27, although I see them to be totally random, they aren't. These are numbers that I think are influenced by my childhood, ideology and everything that I've seen. So, what do you think? Is there anything completely random?


I have a problem: I need to delete data from a database, but whenever I run the code, it always throws a NullPointerException.   Here is the code:   public boolean onMenuItemClick(MenuItem item) {         switch (item.getItemId()) {             case R.id.del:                 try {                     String selectedSpinner2 = spinner_2.getSelectedItem().toString();                     System.out.println(selectedSpinner2);                     catlist.deleteCategory(selectedSpinner2);                     Toast.makeText(this, "Task Deleted", Toast.LENGTH_SHORT).show();                     return true;                 }                 catch (NullPointerException e){                     e.printStackTrace();                 }              case R.id.set_cat:                 spinner_2.setOnItemSelectedListener(this);         }         return true; }   And for the database    public boolean deleteCategory(String category){     return DB.delete(TABLE_NAME, CAT_NAME + "=" + category, null) > 0; }   And the stacktrace:  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean za.co.brdsa.kyle.planitto_doapp.CategoryList.deleteCategory(java.lang.String)' on a null object reference      at za.co.brdsa.kyle.planitto_doapp.Activity3.onMenuItemClick(Activity3.java:314)


Does there exist a metric space  $(X,d)$ such that for subsets $A$ and $B$, define $ d(A,B)= inf \{d(a,b): a \in A, b \in B \}$,  $\bar{A} \cap \bar{B} = \phi$, but $d(A,B) \leq 0 $  I think so but don't have an example.

Let $A$ and $B$ be two sets of real numbers. Define the distance from $A$ to $B$ by $$\rho (A,B) = \inf \{ |a-b| : a \in A, b \in B\} \;.$$ Give an example to show that the distance between two closed sets can be $0$ even if the two sets are disjoint.


The radio button is on its own line instead of being aligned with its label.

This week we rolled out a series of changes to  of the question close workflow.  You can read more about the details of these changes .    For context, the overall effort to improve the question close experience will be optimized for Stack Overflow. Given Stack Overflow’s scale, many of the pain points we hear about with question closing and reopening are unique to Stack Overflow and won’t make sense for other network sites. However some  changes are general improvements that should improve usability and guidance overall. Wherever possible, we plan to roll these changes out network wide as well. Any time we roll out a change network wide, we’ll make sure to cross-post here. This first phase is being rolled out to the network and is why I’m posting today.  Let us know if you run into any issues or have questions regarding the network here.


Let $Z$ be the center of a group $G$. Prove that if $G/Z$ is a cyclic   group, then $G$ is abelian.   This is from Michael Artin's algebra chapter 7 section 3. I'm quite unsure as to how I should start.   My first thought was to prove that $G/Z$ is isomorphic to some subgroup of $G$. Then we would have that $G \cong G/Z \times Z$, which is Abelian, assuming that $G/Z \cap Z = \{0\}$. However, I don't see a way to prove that such a subgroup of $G$ exists.   A second idea was to note that $G/Z = \{Z, xZ, (xZ)^2, \cdots, (xZ)^{n-1} \}$ for some $x\not \in Z$. Since $Z$ is the center, which is a normal group, we can say that $(xZ)^k = xZxZxZ\cdots xZ = x^kZ$ for all $k$. Sadly, this only guarantees an $x$ such that $x^n$ is in $Z$, rather than guaranteeing a subgroup, which would allow the first idea to follow.   Some help would be appreciated.

Continuing my work through Dummit & Foote's "Abstract Algebra", 3.1.36 asks the following (which is exactly the same as exercise 5 in ):     Prove that if $G/Z(G)$ is cyclic, then $G$ is abelian. [If $G/Z(G)$ is cyclic with generator $xZ(G)$, show that every element of $G$ can be written in the form $x^az$ for some $a \in \mathbb{Z}$ and some element $z \in Z(G)$]      The hint is actually the hardest part for me, as the quotient groups are somewhat abstract. But once I have the hint, I can write:  $g, h \in G$ implies that $g = x^{a_1}z_1$ and $h = x^{a_2}z_2$, so \begin{align*}gh &= (x^{a_1}z_1)(x^{a_2}z_2)\\\  &= x^{a_1}x^{a_2}z_1z_2\\\ & = x^{a_1 + a_2}z_2z_1\\\ &= \ldots = (x^{a_2}z_2)(x^{a_1}z_1) = hg. \end{align*} Therefore, $G$ is abelian.  1) Is this right so far?  2) How can I prove the "hint"?


I have been researching the Freshman's Dream Quotient Rule for awhile now and have been unable to find an example for which the rule works. I want to know if anyone knows of 2 function which it works for.   Rule is:  $$\left(\frac{f(x)}{g(x)}\right)'=\frac{f'(x)}{g'(x)}$$

This is motivated by looking at the calculus exams of some of my undergraduate students. A recurring mistake is assuming that the derivative of the product of functions is a product of derivatives and the derivative of the quotient of two functions is the quotient of their derivatives.   This might be an ill formed question, but do their exist a pair of functions such that these rules hold. Explicitly, do there exist $f(x),g(x)$ satisfying all of: \begin{align*} f&\neq 0;\\ \frac{d(fg)}{dx}&=\frac{df}{dx}\cdot \frac{dg}{dx}\\ \text{and }\frac{d(f/g)}{dx}&=\frac{df}{dx}/ \frac{dg}{dx}\text{ ?} \end{align*}  EDIT: Just to clarify my question, looking at the responses so far. I am looking for functions satisfying all three conditions above simultaneously.


I was recently given a math question which was stated: "...divisible by 2 OR 3". I believed at that point that this did not include numbers such as 6 as the word OR implies that it is the choice between 2 statements, therefore leading to the conclusion that there when "or" is stated, it does not mean AND. It is true that OR does indeed mean AND as well as just the choice between two statements? I am simply asking for a explanation for what the word OR means; does it include the word AND. Thank you. FULL QUESTION IS, IF YOU WANT IT: How many numbers in a sequence from 0 to 2000 are divisible by 2 OR 3?

My wife and I are playing a game where you roll dice and move so many spaces in a grid "vertically or horizontally".   In the use of English it is very common to say, this or the other when it comes to making a choice  (exclusive or). Now I know that "or" can also be inclusive, for example "she couldn't read or write", or can be clearly used as an xor "you either come or not" making the statement true for only one of the options but not both.   My issue is where it is not clear whether it is an inclusive/exclusive or, the best example being our game.   I argue that you can move in either direction (inclusive) and the normal use of this conjunction in English should be inclusive unless specified otherwise.   Is this right?


I have been playing around with the Ackermann function a bit and realized that it gets very big very fast. (Im going to use $A$ for $Ackermann$ throughout this question)  Already $A(5,1)$ is (according to ) an integer too large to represent. It also presents me with a representation that looks like this:   $$ A(5,1) = 2 \uparrow \uparrow \uparrow 4 - 3 = 2 \uparrow^{3} 4 - 3 $$  After playing around a little I found out that it always represents it like this:  $$ A(n,m) = 2 \uparrow^{n-2} (m+3)-3 $$  After seeing this I started to wonder what would happen if you use Graham's number as the arguments. Since the value of it would uncomprehensible I tried to find something to compare it against. Remembering how the number is defined I asked myself if $G_{G_{64}}$ is bigger than $A(G_{64},G_{64})$?  Or in other words:  $$ A(G_{64},G_{64}) = 2 \uparrow^{G_{64} - 2} (G_{64} + 3) - 3 $$ vs $$ G_{G_{64}} = 3 \uparrow^{G_{G_{64}} - 1} 3 $$  I personally supspect it is $G_{G_{64}}$ since it  has a lot more arrows but I'm not entirely sure.

In  it states that      [xkcd] means calling the Ackermann function with Graham's number as the arguments just to horrify mathematicians.   $A(g_{64},g_{64})$  In  it states that      Even simply making $g_{65}$ dwarfs the number $A( A(g_{64}, g_{64}), A(g_{64}, g_{64}))$ into insignificance.   So:  Is $g_{65}$ greater than $A(g_{64}, g_{64})$?  And is it greater than $A( A(g_{64}, g_{64}), A(g_{64}, g_{64}))$?


I am young...and dumb... so I want to ride fixed gear as all the other cool guys do. But without the trouble of having too high of a gear when starting away from a traffic light.  So is it possible to have a rear derailleur with a two- or three-speed cassette and one front gear, while still having a fixed-gear set up?  I thought of 48 in the front and something like 17-22-37 on the rear cassette?  Thanks in advance

Prompted by a  I was pondering the idea of bikes with variable gearing (derailleur or otherwise) but without the ability to freewheel. Have such bikes ever been widely used?  They would appear to share many of the advantages and disadvantages of fixies but be better at handling hills (up and down) while being more complex.


I have a situation where  there exist a time varying magnetic field and a circular loop place perpendicular to it. Let us assume that the magnetic field is $\vec B=\frac{B_0 t}{\tau}$ . I tried to modify this problem is my own way that I will be discussing later right now is irrelevant. Also please note, the minor details of this problem need not be considered like polarization etc, or anything, think of it as high school level stuff.  So, my question is that, I know that by using Faraday law $e=-\frac{d\phi}{dt}$   I will get the result as $e=-\pi r^2 \frac{dB}{dt}$(not substituting value yet as it's not required).  So, now i have got this emf whose meaning i don't understand, what I mean to say is what would this emf look like , what would be it's direction, end point , start point, etc. Basically I can't understand it's physical sense and direction(loosely speaking here , please note that this direction, i meant to be associated with the path integral).  Also, suppose that I replace the situation with an circuit having equivalent emf what would it look like?  Now continuing with the problem by the $e=-\vec E.\vec dl$ , I was told that there exist a induced electric field having circular loop and direction I don't remember but with upward magnetic field seems to be anti-clockwise(please verify and explain!)  Gives $E=\frac{1}{2}r\frac{dB}{dt}$ so, the only problem is how I can visualize this emf and electric field. As well is there any way to produce current using that emf? Connecting somewhere? Or an equivalent circuit?  EDIT: The equation of electric field of course implies that $E$ is constant for a given $r$ , so this implies the circular nature of  electric field but what about it's direction, suppose that if i connect a wire loop in that electric field would a current flow through it, would that be the direction of emf? (Suppose that material is not affected by magnetic field).

A metal rod of length $l$ is placed (as shown in figure) in a cylindrical time varying magnetic field. Find the potential difference across it.   My answer:  As electric fields as forming circles around the centre with magnitude $$\frac12r\frac{dB}{dt}$$ whose magnitude is same along any chord at a fix distance from centre: $$\Delta V=E.l=\frac12r\frac32at^{\frac12}.l$$ $$\Delta V=\frac34arlt^{\frac12}$$  My question: Is $\Delta V =V_M-V_N$ or $\Delta V=V_N-V_M$ $\bf OR$ equivalently which side is at high potential?  Possible    $(i)$ As Field lines are circular from $M$ to $N$, $M$ must be high potential. $(ii)$ As this field line apply a force on electrons- in the rod- towards left, then $M$ must have excess $e^-$ and $N$ must have deficiency; so $N$ would be high potential as $M$ is $(+)$ and $N$ is $(-)$.


Am not talking about drop down menu indicators , I need a classic menu i can place it at the unity launcher so it will be a good navigator with a lot of tools .

I can't find a drop-down like 10.10 where I could list all the applications/menu. I understand that the launcher is there for it now, but somehow, I currently feel that I was more comfortable with the drop-down menus.  Any fix for this one?  (segregated from  question)


I have just become a DBA for a large company they are currently looking to decommission a 2008 R2 server. Is there any way of being able to find out if the databases are still being used and by which application without taking the databases off line and seeing who yells that it's broken.   Thanks In Advance

We're looking to decommission a SQL Server instance which has a couple databases still remaining on it.  How can I tell if they are still being used by users or a web application?  I found a  which had a T-SQL query you could run to retrieve the last query date. It seems to work but I want to know if this information is valid enough to drop databases. Is it?  If you have alternative methods that would help as well.


This is what I am trying to achieve. But I for some reason I can't get it right, this is what I currently have:    Here is my code:    .blog-lockup   max-width: 1000px   margin: 0 auto      .image    position: relative    +size(250px)        img     +size(250px)         strong     position: absolute     top: 60%     left: 0%     +size(70px)     text-align: center     background: $lightred-color          font-family: Verdana     font-size: 14px     font-weight: 400     font-style: italic          color: #FFF

          04 SEP

Some Title Text with Love

by James Vibar

At vero eos et accusamus et iusto odio dignissimos    ducimus qui blanditis praesantium voluptatum deleniti    atque corrupti qtios dolores et quas molestias excepturi    sint occaecati cupiditate non provident
        Read More

     I'm using sass btw.

How can I horizontally center a
 within another
 using CSS?

Foo foo


After my Windows 10 system gets an update I can clearly see the 'Update and Restart' option, but what happened to 'Update and Shutdown'?

In earlier Windows versions when updates were downloaded they were automatically installed the next time the PC was shutdown (and powered back on later). With Windows 10 this option seems to be gone. I can manuall trigger a restart and installation by using the button under "Windows Update" or I can let Windows reboot automatically when my PC "is not in use" (whatever that means) but I can't configure it so that the Updates get installed automatically the next time I shut down the PC.  Is there a way to get the previous behaviour back?


Well, I have been on the Stack Exchange network for a while and you know, your eyes often go to the Hot Network Questions page or pane, maybe both.   I never saw a question posted to a Meta of the sites, there so, I was wondering if they are eligible for Hot Network Questions or not?

I was curious but couldn't find any definitive listing on this. Is there an official list of sites excluded from Hot Network Questions somewhere?  Additionally, which sites are penalized from Hot Network Questions, to prevent the list from being dominated by that site?


In previous Elder Scrolls games, weapons and armour would have their quality degrade and you would have to repair it with the Armorer skill to fix it. This provided a constant stream of experience which made reaching level 100 Armorer quite natural.  In contrast, Skyrim does not have weapon or armour condition ratings, and the only way to advance Smithing is through creating and improving vast amounts of new equipment. From a roleplaying perspective, this can seem a little contrived. I would like to know the following:   Does crafting higher-level equipment (Dwemer vs Iron, for example) carry a significantly higher experience reward than lower-level equipment? Does crafting higher-cost (more bars, leather) equipment have a significantly higher experience reward, or at least has an experience reward equal to crafting an equivalent number of lower-cost equipment, such as daggers? Does smelting bars of higher-level metals such as ebony carry a significantly higher experience reward to lower-level metals, such as iron?   By "significantly", I mean orders of magnitude, like iron being 1.0x and ebony being 5.0x, rather than slightly better, such as iron being 1.0x and ebony being 1.5x.

As of Skyrim's 1.5 patch, you get differing values for smithing items in part due to their value. More expensive, more experience.  UPDATE 1.5 (all platforms unless noted) NEW FEATURES  New cinematic kill cameras for projectile weapons and spells  New kill moves and animations for melee weapons  Shadows on grass available (PC)  Smithing skill increases now factor in the created item’s value  Improved visual transition when going underwater  Improved distance LOD  transition for snowy landscapes    Emphasis mine. So what's the skinny? Are Iron Daggers and Leather bracers still the best way to skill up, or will I actually be better served with my hundreds of Dwarven Ingots?


In a multiplayer game, I enchanted someone else with Fraying Sanity. They milled out. Does  go to the graveyard when that player loses, or does it still stay attached?

In Magic: The Gathering, the rules for a player losing in a multiplayer game are quite complex, so I'd like to try to understand them by example. I would be happy to ask each of these situations as a separate question if that is preferred, but they all seem related, and I would love to have one place to look up all of these answers.  Let's say I'm playing with two friends, Bob and Chloe, in a simple free for all. Unfortunately, I lose. When I lose, suppose the following:   I controlled an  which has exiled Bob's , does he get his bear back? I have a  on the stack targeting Chloe, does Chloe take the 2 damage still? Earlier in the turn I cast  to prevent damage to one of Bob's . If it later takes 3 damage, will that damage be prevented? Something I controlled gave Bob a 1/1 soldier token. What happens to the token? Something Chloe controlled gave me a 1/1 soldier token. What happens to the token? I had a  enchanting one of Bob's army of . What happens to the bear? I had also played  on Bob's final . What happens to the last bear? Chloe had  my . What happens to the Clone? Are there any other situations specifically addressed by the rules?


I'm currently in the 2nd year of my Ph.D. and I'm really interested in my future career options. I'm attending a double-degree study programme in two European universities, none of them being among the top ones. But, I'm employed as a researcher (not only a Ph.D. student) in a supercomputing center in one of them (member of PRACE, 3 years ago in top 40 from TOP500 list) since the beginning of my Master's degree, thanks to Dean's award for my Bachelor's thesis. Five years ago it was a top university in my country (slightly under 300 in QS WU rankings), but then the directorship changed and the ranking dropped drastically (to my shock completely out of QS WU rankings). The second university shares a pretty similar fate - from about 300th place to 520+ in the last 7 years (I have no idea, what happened), but still maintains at least 151-200 position in my field. In general, I feel, that while both of the labs I'm working in are good and productive, the problem lies in some other faculties who do not focus on research enough.  Is it possible to hope for admission into a researcher position in some well-ranked university in the future? I'm not talking only about post-doc now, but also in a long-time horizon. This situation makes me feel really inferior, so I'd like to now, if my researcher career direction is tightly bounded by this situation or if there is a possibility to overcome rankings with good research results over the years after Ph.D.

What I'm trying to understand is, to what degree does the status/rank of the University (where one completes his/her Ph.D) matter while shaping his/her career after graduation? I would like to know the weight given to one's school in both the following cases:   While applying for post-docs/faculty positions in academia While applying to industrial research labs   For instance, I've read on some forums (I can't locate the link now) that while considering prospective applications for tenure-track faculty positions, very few Universities accept a candidate who has completed his/her Ph.D from a lower ranked school having a lesser "brand" value, irrespective of the fact whether he/she has published equally original work as his/her counterpart from an Ivy league college. How much truth is in this statement? It would be really great if someone already in academia, either as a newly-accepted faculty or someone on the Faculty Hiring committee could share their experiences/statistics on this regard. I'm simply interested to know the answer, without commenting at all on whether such a practice is justifiable.  Similarly, what about recruitment to internationally acclaimed research labs (like  or ) - what importance do they place on the pedigree of a candidate's college, before taking into consideration what they published ?  I'm personally interested in answers related to the field of Computer Science (theory), but the question is applicable to any prospective grad student in any discipline in my opinion. Feel free to share your personal experiences post-Ph.D in detail, as that would give me (and future viewers of this question) about what its like to carve a career once you are out of school!


I am learning to code in c#, so if I do not explain everything ok, do not kill me! I an practising with c#, trying to do a very simple calculator(only add), but when I write a letter(not number), the program crash because the textbox is saving data in a Int. I ask how to prohibit writting letters, but no numbers, so it doesn´t crash. Thanks! Sorry for not commenting the code, i am still forgetting doing that! Here is the relevant code:  using System; using System.Windows.Forms;  namespace calculadora { public partial class Suma : Form {     public Suma()     {         InitializeComponent();     }      private void Suma_Load(object sender, EventArgs e)     {      }     public int resultadoint, op1, op2; //declaracion de variables.     public string resultado; //declaracion de variable a mostrar.      private void button1_Click(object sender, EventArgs e)      {         resultadoint = op1 + op2;         resultadotext.Text = resultadoint.ToString();     }      private void label2_Click(object sender, EventArgs e)     {         //solo indicador de suma     }      private void label4_Click(object sender, EventArgs e)     {      }      private void operador1_TextChanged(object sender, EventArgs e) //se intruduce aquí el primer operador, op1.     {         op1 = int.Parse(operador1.Text);     }      private void operador2_TextChanged(object sender, EventArgs e) //se intruduce aquí el segundo operador, op2.     {         op2 = int.Parse(operador2.Text);      } }   My code do Not use KeyPress.

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


As anyone who has ever used a Mac knows, you can drag left or right on the track pad to switch workspaces. I would love to know if anyone has a way to do this on Ubuntu (14.04) whether this be with tying gestures to key combos or another way.   Thanks for all the answers!

I was talking to a friend who owns a Mac. He has his set up so that when he swipes three fingers across his touchpad, it moves to the workspace in that direction. Is it possible to set this up in Ubuntu?


SQL knowledge Beginner  I have a below table: ScoreTable  Name  Score  Reason  Subject  a1      0     NULL     NULL a2      -1    NULL     NULL a3      -3    fail     Maths a4      -3    fail     History a3       0    NULL     NULL   I want to write a query which will look some thing like below  Select DISTINCT Name, Result,     (If Result = -3        then Concat(Reason,' ',Subject))As FailedIn)   From ScoreTable  Expected Output:  Name  Score  FailedIn  a1      0     0 a2      -1    0 a3      -3    fail Maths a4      -3    fail History

What is the complete and correct syntax for the SQL Case expression?


Prove that any (simple, undirected) graph $G = (V, E)$, with $m = |E|$ edges has chromatic number $χ(G) ≤\sqrt {2m} + 1$.  Could any please give me any hint about this question? I don’t know how to start it. Maybe induction?   Edit: I'd say they seem similar but it's hardly the same question

Can anybody give me any hints about how to prove that for any graph $G$ the number of edges in it is at least $\chi(G)(\chi(G)-1)/2$?  $\chi(G)$ is the minimal number of colors we need to use to color the graph (it's chromatic index in other words).  I tried induction but I'm stuck at an induction step.  I do the induction on the number of edges.  When $|E(G)|=0$ then obviously we can color the graph using only one color, so the theorem holds.  Now induction step from $n \Rightarrow n+1$ edges.  Let's erase any edge $e=\{v,u\}$ from $G$. Then $\chi(G-e)$ is either the same, or $\chi(G-e)<\chi(G)$, because we relaxed the graph an $v$ and $u$ no longer need to have different colors. From the first case the thesis is clear, because $G-e$ has more then $\chi(G)(\chi(G)-1)/2$ edges so with the one we erased it's still more. But from the second case we only know that $G \geq \chi'(G)(\chi'(G)-1)/2$ and $\chi'(G)(\chi'(G)-1)/2 \leq \chi(G)(\chi(G)-1)/2$ so that gives me nothing...


As in my title question. Do they mean a specific region of the US, something else?

I have a book that explains how to speak in standard American English (American Accent Training — Barron's).    What does the term standard American English refer to?  Is there a region in the United States of America that has a pronunciation similar, or closer to standard American English (in the same way standard Italian is derived from a dialect spoken in Tuscany)?


I have à request to display opportunities related to product object by using visualforce page on Product2

I'm trying to display opportunities associated with an OpportunityLineItem on a Visualforce page on the OpportunityLineItem object   I have a problem in the select I do not know how to retrieve the OpportunityLineItem name in this request I have hard code the OpportunityLineItem name  public List<OpportunityLineItem> getOpp() {     return [SELECT TotalPrice, Opportunity.Name, Opportunity.StageName,                     Opportunity.Account.Name, Opportunity.id, Product2.Name              FROM OpportunityLineItem               WHERE Product2.Name='GenWatt Diesel 10kW'     ]; }


According to the terse documentation I managed to find, each file in /proc/$PID/fd is supposed to be a symlink to the actual file associated with that file descriptor. However, that doesn't appear to be what's happening.  # ls -l /proc/5678/fd lr-x------ 1 root root 64 Oct 17 13:31 0 -> /dev/null l-xw------ 1 root root 64 Oct 17 13:31 1 -> pipe:[15967534] lr-x------ 1 root root 64 Oct 17 13:31 10 -> pipe:[54468] lr-x------ 1 root root 64 Oct 17 13:31 11 -> pipe:[876576] lrwx------ 1 root root 64 Oct 17 13:31 14 -> anon_inode:[eventpoll] lrwx------ 1 root root 64 Oct 17 13:31 16 -> /lolrus/write.lock lrwx------ 1 root root 64 Oct 17 13:31 3 -> socket:[5487432] lrwx------ 1 root root 64 Oct 17 13:31 4 -> anon_inode:[eventfd] lr-x------ 1 root root 64 Oct 17 13:31 5 -> /dev/urandom ...etc...   Of these, the only paths that actually exist are /dev/null, /dev/urandom and /lolrus/write.lock (which is a normal, regular file).  What the heck are all those other things? I can't find any documentation about them.

In Linux, in /proc/PID/fd/X, the links for file descriptors that are pipes or sockets have a number, like:  l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839] l-wx------ 1 user user 64 Mar 24 00:05 2 -> pipe:[6839] lrwx------ 1 user user 64 Mar 24 00:05 3 -> socket:[3142925] lrwx------ 1 user user 64 Mar 24 00:05 4 -> socket:[3142926] lr-x------ 1 user user 64 Mar 24 00:05 5 -> pipe:[3142927] l-wx------ 1 user user 64 Mar 24 00:05 6 -> pipe:[3142927] lrwx------ 1 user user 64 Mar 24 00:05 7 -> socket:[3142930] lrwx------ 1 user user 64 Mar 24 00:05 8 -> socket:[3142932] lr-x------ 1 user user 64 Mar 24 00:05 9 -> pipe:[9837788]   Like on the first line: 6839. What is that number representing?


I was able to prove by induction on $n\in\mathbb{N}$ that for any $m:=2^n$ positive real numbers we have $\text{Geometric Average}\leq\text{Arithmetic Average}$, I.e. $\sqrt[m]{\Pi_{i=1}^m a_i} = $$\sqrt[2^n]{\Pi_{i=1}^{2^n} a_i} \leq\frac{\Sigma_{i=1}^{2^n} a_i}{2^n}$$ =\frac{\Sigma_{i=1}^m a_i}{m}$ where $a_1,...,a_m\in\mathbb{R}_+$ are any $m=2^n$ positive real numbers. Now I am trying to prove by using this fact, That for any $n\in\mathbb{N}$ positive real numbers we have $\text{Geometric Average} \leq \text{Arithmetic Average}$, I.e. $\sqrt[n]{\Pi_{i=1}^n a_i} \leq\frac{\Sigma_{i=1}^n a_i}{n}$ where $a_1,...,a_n\in\mathbb{R}_+$ are any $n$ positive real numbers, But then I got stuck and was not able to proceed.  In other words, The problem can be stated as:  Suppose that we know  $\forall n\in\mathbb{N},\forall a_1,...,a_{2^n}\in\mathbb{R}_+, \sqrt[2^n]{\Pi_{i=1}^{2^n} a_i} \leq\frac{\Sigma_{i=1}^{2^n} a_i}{2^n}$ and prove by using this fact that  $\forall n\in\mathbb{N},\forall a_1,...,a_{n}\in\mathbb{R}_+, \sqrt[n]{\Pi_{i=1}^{n} a_i} \leq\frac{\Sigma_{i=1}^{n} a_i}{n}$  Thanks for any hint/help... ($\mathbb{R}_+$ - The set of positive real numbers)

The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations …)?  Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, … are some of the proofs I know.


What are the quantum circumstances that manifest reflection?  Also, to what precision does the wave reflect and is that verified or only speculated by model?

In Newton's model of light as being composed of particles, it's easy to imagine reflection as being the rebounding of individual corpuscles off a surface. However, since light can also behave like a wave, it poses a challenge in visualizing reflection.  How does a wave reflect off of a surface, whether it be specular reflection or diffuse reflection? Must the wave be first absorbed, and then re-emitted? Or is there a different mechanism?


Can you find an example where   E(E(X|F)|G) $\neq$ E(E(X|G)|F) (F and G is $\sigma$-field in probability theory)

If $\Omega=\{a,b,c\}$ give an example that $E(E(X|\mathcal F_1)|\mathcal F_2)\neq E(E(X|\mathcal F_2)|\mathcal F_1)$   If I choose the $\sigma$-algebras disjoint (or better said: one is not fully contained in the other) is the inequality always satisfied ?


$P_n[0,1]$ be the set of all polynomial of degree atmost $n$ with supnorm is it a closed in $C[0,1]$? and $P[0,1]$ is set of all polynomials in $C[0,1]$  I know which is dense in $C[0,1]$ as we know by Weirstrass Polynomial approximation theorem any continous function can be uniformly approximated by sequence of polynomials.   Thank you for  help.

This question is in relation to the space $C(I)$, $I = [a, b]$. Define $P_n =\{ a_0+\dots+a_nx^n \mid a_i \in \mathbb{R}\}$ (any or all $a_i$ could be zero); clearly $P_n \subset C(I)$. The norm I'm using is $\lVert f\rVert_I = \sup_I |f(x)|$. Is $P_n$ closed under $\lVert\cdot\rVert_I$?   I am almost sure the answer is "yes", but I can't seem to prove it. My first instinct was to biject  $P_n$ to $\mathbb{R}^{n+1}$, using coefficients as coordinates, and prove that sequences of degree-$n$ polynomials converge to degree-$n$ polynomials, but I can't prove that the metric $\lVert\cdot\rVert_I$ is equivalent to the standard metric on $\mathbb{R}^{n+1}$. Next, intuitively given a function $f \in C(I), \notin P_n$ I should be able to find some $\epsilon > 0$ such that there are no low-degree polynomials "nearby", then that function was not a limit point of $P_n$ so $P_n$ is closed. Again I have no idea how to prove this. What should I do?


I'm learning JS and I need help with the following task:  I need to create a function compile_csv_search(text, key_name) that parses text in the CSV format. (not required to handle quoting and escaping in values; assume field values never contain commas or other special characters.)     A function must return a function that looks up a record by a value of the   field specified as the second argument to compile_csv_search. Assume that all   values in the key field are unique.   Sample usage:  var csv_by_name = compile_csv_search(     "ip,name,desc\n"+     "1.94.0.2,server1,Main Server\n"+     "1.53.8.1,server2,Backup Server\n",     "name"); console.log(csv_by_name("server2")); console.log(csv_by_name("server9"));  ...will print:  {ip: "10.52.5.1", name: "server2", desc: "Backup Server"}   undefined  ** I didn't understand what does it mean "function that return function". How can function return another function?  Thank you!    P.S. attaching my solution for your review  function compile_csv_search(csvServerData){   var header = csvServerData.split('\n')[0].split(",");   var spleatedServerData = csvServerData.split('\n');   return function(serverName)   {   for(var i = 1; i < spleatedServerData.length; i++){         var singleServer = spleatedServerData[i].split(',')           var result = {};         var exist = false;         for (var j = 0; j < header.length; j++) {             if(singleServer.indexOf(serverName) == -1)                    break;                exist = true;             result[header[j]] = singleServer[j];            }         if(exist){          return(result);          break;          }      }  } } var csv_by_name = compile_csv_search(     "ip,name,desc\n"+     "10.49.1.4,server1,Main Server\n"+     "10.52.5.1,server2,Backup Server\n");

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Using a diagram show intervals (0, 1) and (1, 3) have the same cardinality.  When I make the diagram only 1 is overlapped but because these are "(" and not "[" its exclusive so I don't see how the cardinality is the same in any way.

I have to prove that $(2,4)$ and $(-1,17)$ have the same cardinality.  I have the definition of cardinality but my prof words things in the most confusing way possible. Help!


I do know several posts exists on Netbeans and autocompletion, but none seems to give me the answer to the basic problem i'm facing:  if i do so:  use Project\Foo; $foo = new Foo; $foo-> //autocompletes properly all the methods   but if do so:  use Project\Foo; use Project\Bar;  $foo = $bar->getSomeObject(); $foo-> //doesn't show anything   I've been used to Visual Studio and VB .NET where the keyword AS simplifies the IDE to know which type to autocomplete  How can i explicitly inform Netebans autocompletion i'm manipulating a specific class ?  Any help or link to the same related topic would be much appreciated.

When I define an object of a class using new like this  $blah = new Whatever();   I get autocomplete for $blah. But how do I do it when I have $blah as a function parameter? Without autocomplete I am incomplete.  Edit: How do I do it if it's in an include and PDT or Netbeans can't figure it out? Is there any way to declare types for variables in PHP?


I have two internet connections available to me. One is via LAN. Not a great ping, but fast downloads. The other is via USB wireless adapter. Good ping, but slow downloads. I want to connect to both of them simultaneously. I want to be able to specify which data or application will use the wireless connection and route everything else through the lan connection.  Is this possible, and how would I do it?  Windows 7 x64 is my operating system.  Here is the data from route print:   I'm still unsure of how to use this to make all of my data go through the Nvidia lan interface, even after reading route /?  Also, if I'm able to achieve that, will it override the ForceBindIP?

Let's say I have two active network connections that let me out to the internet.  I want certain applications to only use Network Connection 1, while some others should use Network Connection 2.  Is this possible in Windows XP? If so, how can it be done?


There is a theorem about inverse transform method says if X is a continuous random variable with cdf F, then U=F(X)~U[0,1]  So I am wondering the logic in this sentence.  Why if X is a continuous random variable with cdf F, then U=F(X)~U[0,1]? Why is it always be uniform and  how does this theorem work in real example?

I read  that given a sample $ X_1,X_2,...,X_n $ from a continuous distribution with cdf $ F_X $, the sample corresponding to $ U_i = F_X(X_i) $ follows a standard uniform distribution.  I have verified this using qualitative simulations in Python, and I was easily able to verify the relationship.  import matplotlib.pyplot as plt import scipy.stats  xs = scipy.stats.norm.rvs(5, 2, 10000)  fig, axes = plt.subplots(1, 2, figsize=(9, 3)) axes[0].hist(xs, bins=50) axes[0].set_title("Samples") axes[1].hist(     scipy.stats.norm.cdf(xs, 5, 2),     bins=50 ) axes[1].set_title("CDF(samples)")   Resulting in the following plot:    I am unable to grasp why this happens. I assume it has to do with the definition of the CDF and it's relationship to the PDF, but I am missing something...  I would appreciate it if someone could point me to some reading on the subject or help me get some intuition on the subject.  EDIT: The CDF looks like this:


I need to convert a draft to the layout of the journal Astronomy & Astrophysics. My MacTex distribution doesn't recognise the document class, so I suppose I have to install it. I downloaded the "A&A LaTeX macro package" . The downloaded folder includes a bunch of files:  The content of the readme files can also be viewed online at . I suppose what is left to do is to put all those files into the proper location. But where are these locations? I am on Max OS 10.15.3 and I have a fairly recently (Feb 2020) installed MacTex distribution. Cheers!

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


I have a 20cm hole in a wallpapered wall. Can I get away with filling the wall with plaster, then painting over it, without stripping the wallpaper off the entire wall first? Or must I strip the wallpaper first?

So I have a wall that has a very hard sort of textured wallpaper. Recently though the wall suffered some damage that turned into a hole. The hole has been patched, and now we need to paint over that. Removing the wallpaper is not an option.  How can I paint over this? Should I use an oil based paint or latex based (or does it even matter)? What are some gotchas to avoid when painting over wallpaper?  EDIT: I'm not really too concerned if the texture shows through. I actually like the texture so it's not a big deal.


Google tend to choose attractive names for their android versions like Jelly Beans, Kitkat, Ice cream sandwich and so on. What is their main purpose from these naming conventions? Does that related to attracting more people from different groups?  EDIT More specifically I'd like to know why they choose names like Jelly Bean, Ice cream. What's their goal?

Less of a pressing question and more a "what happened here"?   At some point in the past decade (most) OS's have switched over to these codenames for their versions with names like Mountain Lion, Jellybean, etc. After a heated discussion with my Dad (who prefers version numbers) about why the names would be done like this, it dawned on me to ask if there was a (valid) UX reason for it vs. just a marketing/trademark one.  I don't think this idea has been explored all that well, just because we have such scattered implementations of it -- Android and Ubuntu are the only ones who use alphabetized naming conventions as a reinforcement of version numbering, Apple uses it for OSX (Snow Leopard, Lion...) but not for iOS (iOS4, iOS5...), and Windows isn't consistent about this stuff at all (XP, then Vista, then 7, then 8...)  Is there any rhyme / reason to all of this?


Can I give to them your emailaddress  May I give to them your emailaddress

Which word to use when we ask for help?  Some conditions:     We know that the person asked is able to do it. We don't know if the person asked is able to do it.


I have fedora server, i want any connection to use my server domain name or otherwise be blocked.. I don't mind if i use iptables (or csf) or if not then through apache configs.

If I ask Apache for domain.com that has no Virtual Host setup in Apache configuration, Apache will show the default Virtual Host. How can I prevent this from happening or simply drop the connection?


Prove for any given  positive integer $N$ there exist only finitely many integers $n$ with $φ(n)=N$, where $φ$ denotes Euler’s $φ$-function. Conclude in particular that $φ(n)$ tend to infinity as n tend to infinity.  How can I prove the above statement? Because Euler’s $φ$-function is bijection?

Let $\varphi: \mathbb{N} \to \mathbb{N}$ be the totient function.   Is there an integer $N > 0$ such that there are infinitely many integers $n > 0$ such that $$\varphi(n) = N?$$


I'm trying to figure out why I'm getting  a NullPointerException despite the fact that the array is populated with card object. What I'm asking is that can my QuickSort algorithm use the compare method I override in my card class?  QuickSort:  package sort;  //All import goes here import java.util.ArrayList; import java.util.Comparator;  //Comment out at the moment //import java.util.List;    public class QuickSort<T> {      private ArrayList<T> list;     private int length;     Comparator<T> pod;        public void sort(ArrayList<T> lst){          //Check if the list is empty         //if(lst.isEmpty() || lst == null){         if(lst == null || lst.isEmpty()){              return;         }         this.list = lst;         length = lst.size();         quickSort(0, length - 1);      }      private void quickSort(int lowIndex, int highIndex){         int low = lowIndex;         int high = highIndex;          //Find the pivot value         T pivot = list.get(lowIndex + (highIndex - lowIndex)/2);          while(low <= high){             /**              * In each iteration, we will find a value from the left side               * which is greater than the pivot value, and also we will              * find a value from the right side which is less then the pivot               * once the search is done, we will then exchange both numbers               */              //o1 < pivot             while(pod.compare(list.get(low), pivot) == -1){                  low++;              }              //o1 > pivot             while(pod.compare(list.get(high), pivot) == 1){                 high--;             }              if(low <= high){                 swap(low, high);                  //Move index to next position on both side                  low++;                 high--;             }         }          //Call quickSort recursively         if(lowIndex < high){             quickSort(lowIndex, high);         }         if(low < highIndex){             quickSort(low, highIndex);         }      }      private void swap(int i, int j){         //Temporary variable to hold the element at index i          T temp = list.get(i);         //Swap i index with the element in j index         list.set(i, list.get(j));         //Swap j index with the element that was in i index         list.set(j, temp);     } }   Card:  //Compare method in my Card class public class Card implements Comparator<Card>{     .....      @Override     public int compare(Card o1, Card o2) {          //Check if o1 has the highest suit         if(o1.getSuit().getVal() > o2.getSuit().getVal()){             return 1;         }          //Check if o2 has highest suit         else if(o1.getSuit().getVal() < o2.getSuit().getVal()){             return -1;         }          //Check if the suit are the same         else if(o1.getSuit().equals(o2.getSuit())){              //Check if o1 has the highest value             if(o1.getValue().getVal() > o2.getValue().getVal()){                 return 1;             }              //Check if o2 has the highest value             else if(o1.getValue().getVal() > o2.getValue().getVal()){                 return -1;             }         }         //Either there duplicate or something wrong with the compare method.          System.out.println("Well there something wrong with the card Compare method or there duplicate of card in the deck.");         return 0;     } }   Spade:  //Sort player hand for easy readability QuickSort<Card> sort = new QuickSort<Card>(); System.out.println(USER.getHand().size()); sort.sort(USER.getHand());   Error:  Exception in thread "main" java.lang.NullPointerException at sort.QuickSort.quickSort(QuickSort.java:48) at sort.QuickSort.sort(QuickSort.java:28) at Spade.main(Spade.java:155)   Update:   I check if the argument were null for the compare method where the exception originate, both argument check return false.

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 have to redirect www.example.com/docs/....pdf to trader.example.com/docs/....pdf on an existing Project. The same applies to *.biz.  I have no Idea how can i extract the wwww-Part from $host-Variable.  server {         listen 80;         server_name www.example.com www.example.biz;          location /docs {                         root /data/http/example/docs;                         rewrite ^ $scheme://trader.$host$request_uri;         } }   Does anyone have any idea how I can solve this?

I had a very long domain, so I decided to change it to a shorter and more friendly one. But since I have a lot of subdomains (in fact, I have a subdomain wildcard), I wanted to keep the subdomain while changing only the domain part. So, I made the following rule:  server {   listen 80;   server_name ~^(\w+)\.olddomain\.com$;    rewrite ^ $scheme://$1.doma.in$request_uri? permanent; }   I have read a lot of other questions where this snippet solved the problem. But with me, Nginx always redirects to .domain.in, without any subdomains. What am I missing? I have tested the regex against regex101 and the examples work fine, Nginx seems unable to redirect it.


I don't want to erase the SSD itself, only a specific folder and the files that are in from the SSD. How do I securely erase that? is there a free software or CMD Windows command? Thanks

From a (very long, but definitely worth to read) :  When you delete a file in your OS, there is no reaction from either a hard drive or SSD. It isn’t until you overwrite the sector (on a hard drive) or page (on a SSD) that you actually lose the data. File recovery programs use this property to their advantage and that’s how they help you recover deleted files. The key distinction between HDDs and SSDs however is what happens when you overwrite a file. While a HDD can simply write the new data to the same sector, a SSD will allocate a new (or previously used) page for the overwritten data. The page that contains the now invalid data will simply be marked as invalid and at some point it’ll get erased.  So, what would be the best way to securely erase files stored on a SSD? Overwriting with random data as we are used to from hard disks (e.g. using the "shred" utility) won't work unless you overwrite the WHOLE drive...


I have created a form in PHP and MySQL. After submitting the data, it is saved into the MySQL table. But I have got a problem: If the form contains an apostrophe then there will be an error while inserting the data, so how can i remove the apostrophe from the post variable?  $description=$_POST['description'];

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I changed the pedals on my bike from clipless to regular pedals. But after pedalling a few kilometers the pedal fell off. I put it back on by hand but it kept falling off. I thought they tighten as you pedal. Is there a certain trick to keep them on? Or is there different/wrong size pedals now? PS It is an old 1990's downhill racing bike and the clipless pedals worked fine and never came loose. But I didn't want to clonk around town with clipless shoes anymore.

On my bike, which I just built out of spare parts, the left pedal seems to constantly be coming loose. It seems to come out about 5m every time I ride ~10km.  It's an old cotter pin crank, and the pedal is a left pedal (there's an L stamped into the end of the screw that goes into the crank). The pedal has a crack in one side of the axle compartment, but I don't think that would affect it.  I thought that these pedals had left-hand threads so that the action of pedalling would work to tighten the screw? If so, why would this be happening, and is there anything I can do about it short of replacing the crank and pedal?


Why when I compare two equal tuples through the operator (is) I get a different result than when I compare two equal lists? (one is True an the other is False)  Nothing really... i am starting with python and i do not want to leave my doubts :)  a=(1,2,3) b=(1,2,3) c=[1,2,3] d=[1,2,3] print(a is b) #True print(c is d) #false   I expected that both were False :(

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?