Suppose I have a categorical variable neighborhood, which can take the classes Neighborhood1, Neighborhood2, Neighborhood3.  I would like to know which neighborhoods can be grouped and what neighborhoods differ in their effect from the rest, and then merge the ones with similar effects into one class.  I thought about running a logistic regression model and group all the classes with no statistical significance into one. (A note here, I would run the model with no intercept, because the baseline class method wouldn't be appropriate)  Do you think that is viable? Any other suggestion on how to proceed?

I've read that it's bad to do this, but am looking for details as to why.  Suppose we're trying to fit the linear model $Y_i = \beta_0 + \beta_1 X_{1i} + \beta_2 X_{2i} + \epsilon_i$ where $Y$ is continuous and $X$s are categorical with many levels. We don't have any opinion on how the levels should be grouped. We then calculate the average response for each level of the predictors, then collapse levels with similar averages.  How badly does this screw up parameter estimates and inferences on them, and why?


I've got a LaTeX novel writing project with lots of character quotations.  I use Focuswriter to create chapter text files (ASCII, UTF-8).  There is no LaTeX markup in the chapter files.  A LaTeX master file will include all the code, and have lots of \include{chapter} files, etc.  So, I need LaTeX to be able to understand that right and left quotes are not special characters, and I don't want to have to code them into the chapter files.  Does UTF-8 add this automatically within LaTeX or XeTeX?  Or, is there a package that understand those for pdfTeX or XeTeX?

There are several types of  in the English language (and in other languages there are even more). There are also several ways in LaTeX to represent these. I have seen editors, that are capable of directly entering “ and ”. And I have also seen things like this `''.  So, what is the best way to do English quotation marks in LaTeX?


I've gotten a couple of meshes from the internet and I need to texture them for a class project. I've learnt the basics of unwrapping cones, spheres, cubes etc. but when it comes to more complex objects, I'm clueless.  So how would I UV unwrap something like a blanket draped over a bed?  Thanks in advance!

I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping?


I have a very simple circuit but have no idea on what or how to chose a diode for it.   It is for a uni project and we are being marked on our justification for choosing the diodes.   Is there such thing as a normal diode? That simply blocks current in one direction and is not designed for anything else? There are so many different types I don't know where to start.  I need to place diodes where I have indicated on the schematic. Can anyone suggest any specific models? I've figure the highest forward current will be around 25A, while voltage is around 100V.          – Schematic created using

I am trying to find a suitable diode to place on the wire that connects c and e in the circuit, with the cathode on the right hand side. I need to justify why I chose the specific diode as well.   However I have no idea on what to chose in terms of forward current and voltage rating as when I start putting other diodes in the circuit later (which is the next step), the currents and voltages through that wire change.   I suppose my question is, am I suppose to find out what the highest current is in that wire out of all possible future diode configurations and then use that?   And would I be right in using a power (rectifier) diode rather than Zener etc?         – Schematic created using


For the Quadratic Form $X^TAX; X\in\mathbb{R}^n, A\in\mathbb{R}^{n \times n}$ (which simplifies to $\Sigma_{i=0}^n\Sigma_{j=0}^nA_{ij}x_ix_j$), I tried to take the derivative wrt. X ($\Delta_X X^TAX$) and ended up with the following:  The $k^{th}$ element of the derivative represented as  $\Delta_{X_k}X^TAX=[\Sigma_{i=1}^n(A_{ik}x_k+A_{ki})x_i] + A_{kk}x_k(1-x_k)$  Does this result look right? Is there an alternative form?  I'm trying to get to the $\mu_0$ of Gaussian Discriminant Analysis by maximizing the log likelihood and I need to take the derivative of a Quadratic form. Either the result I mentioned above is wrong (shouldn't be because I went over my arithmetic several times) or the form I arrived at above is not the terribly useful to my problem (because I'm unable to proceed).  I can give more details about the problem or the steps I put down to arrive at the above result, but I didn't want to clutter to start off. Please let me know if more details are necessary.  Any link to related material is also much appreciated.

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


I found the two meanings of the verb 'to catch the train, bus etc' in British English:  1) we are getting the stop/station, waiting and boarding  2) we are getting the stop/station, waiting and boarding and do all these things IN TIME.  There is the example from the related topic (BrE):  How shall we get to London next week?" "I've looked at the timetable, and I think we should catch the 10:49"  and I can't undestarnd how this example reffers with my two meanings of the verb 'to catch the train, bus etc'? I think it is more natural to use 'to take' or 'to get' instead of 'to catch'.

Could anyone help me with finding the difference between saying "catch a bus/train/etc" and  "take a train/bus/etc"? I'm afraid I haven't been able to glean one from my dictionary.


I'm fairly noobish over here, but delving into the details of the major experiments. The particle nature of a photon has me stumped though. So hopefully there is already an explanation to this I have missed that someone can link too.  I can't figure out why light is considered to have a particle nature: We use the photoelectric effect to kick off a tiny amount of energy (at some point the amplitude isn't enough to excite an electron when we hit infrared) and a photo multiplier tube to detect that tiny amount of energy on the other end. We are measuring, though, that an electron has been excited and produced a tiny current that is then multiplied. Why do we then say that that electron was excited by a particle? As opposed to a peak of a tiny wave from one or more electron(s) being excited on the emission side? How do we know it comes from a point and ends at at point; assuming that this is the fundamental essence of 'particle' nature?

Lamb 1969 states,     A misconception which most physicists acquire in their formative years is that the photoelectric effect requires the quantization of the electromagnetic field for its explanation. [...] In fact we shall see that the photoelectric effect may be completely explained without invoking the concept of "light quanta."   The paper gives a description in which an atom is ionized by light, with the atom being treated quantum-mechanically but the light being treated as a classical wave.  Is it true that all the standard treatments in textbooks are getting this wrong?  Lamb and Scully "The photoelectric effect without photons," in "Polarization, Matière et Rayonnement," Volume in Honour of A. Kastler (Presses Universitaires de France, Paris, 1969) -- can be found online by googling


I have tried installing this package (needed for android studio).  This is the error i'm getting  E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by glob 'lib32bz2-1.0' E: Couldn't find any package by regex 'lib32bz2-1.0'   I have already tried:  sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0   &  sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0:i386   I also searched on  and did not find lib32bz2-1.0 for Ubuntu 16.04. So how do i get this package which is available for trusty and precise?

I am trying to install Simplicity studio on Ubuntu 15.04 (64-bit) and I get this error  E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by regex 'lib32bz2-1.0'   I tried to install lib32bz2-1.0 package, again I get the same error. How to install package lib32bz2-1.0 on Ubuntu 15.04(64-bit)


Hi I am using opengl and I am having a problem if I go further from the skybox with the camera I get black areas, a smaller radius of the skybox will make the camera too close to the object to stay inside the skybox and increasing it obviously doesn't help. :     Here is the code for the skybox:    glEnable(GL_TEXTURE_2D);     glPushMatrix();     qobj = gluNewQuadric();     glTranslated(50,0,0);     glBindTexture(GL_TEXTURE_2D, underwater);     gluQuadricTexture(qobj,true);     gluQuadricNormals(qobj,GL_SMOOTH);     gluSphere(qobj,100,100,100);     glPopMatrix();

I created a skybox in OpenGL (through LWJGL), but the only way I found to render it behind all objects was to make it very big. This leads to ugly edges between the 6 skybox planes.  Optimally, I would draw a small skybox and disable DepthTesting on all other objects, but since I want those to display in the right depth order, that isn't possible.  How can I do this?


Is there a way to remove a header and footer from a Google Drive document?

Once you add a header to a Google document, it offsets the top of the document even if empty, and receives click events. How can you then remove the header?  I am aware that you can reduce the header's effects by decreasing the page's top margin, and reducing the font size in the header—those are not the solutions I am looking for. I would like a way to actually REMOVE it.


I am very confused!!  In my Question class, I am trying to print a question in an array and the corresponding multiple choice answers stored in a separate 2D array. I put that in a loop and am passing int row from the main method and trying to get user input and pass that back to my Question class. Probably doesn't make sense but I get a null point error.  Here's all of my code  public class Question{     private int selectedAnswer;     public String[] questions =     {         "Favourite sweet",         "Favourite subject at Hogwarts",         "Dream vacation",         "Favourite Drink",         "Dream House",         "What do you desire the most?",         "Favourite dress robe colour",         "Pick a muggle career",         "Pick a creature"     };  private String[][] options = {     {"1.Acid Pops","2.Sherbert Lemons","3.Bertie Bott's Every Flavour Beans",      "4.Cake","5.Hagrid's Rock Cakes","6.Chocolate Frogs","7.Ginger Newt",     "8.I hate sweets"},      {"1.Care of Magical Creatures","2.Charms","3.Defense Against the Dark Arts",     "4.Divination","5.Herbology","6.History of Magic","7.Muggle Studies","8.Potions",     "9.Study of Ancient Runes","10.Transfiguration"},      {"1.Anywhere with friends","2.Egypt","3.Hogwarts","4.Museum","5.India","6.Forest",     "7.Can't be bothered with a vacation"},      {"1.Unicorn blood", "2.Pumpkin Juice", "3.Butter beer", "4.Coca-Cola", "5.Tea", "6.Coffee", "7.Brandy"},      {"1.The Burrow", "2.A Cottage", "3.Thirteen Grimmauld Place", "4.Malfoy Manor"},      {"1.Friends", "2.Success", "3.Money", "4.Power"},      {"1.Black", "2.Red", "3.Pink", "4.Green", "5.Orange", "6.Blue"},      {"1.Lawyer", "2.Teacher", "3.Social Worker", "4.Prime Minister", "5.Google Employee"},      {"1.Centaur", "2.Basilisk", "3.Unicorn", "4.Thestral", "5.Phoenix", "6.Hippogriff", "7.Dementor"}   };     private String[] quizQuestion;     private String[][] quizOptions;  //new update:     private String quizQuestion;     private String[] quizOptions      public Question(int row){        for(int i= row; i< questions.length; i++){         **quizQuestion[i] = questions[i];** //null point error           quizQuestion = questions[i]; // new update         for(int j = row; j < options[i].length; j++){             quizOptions[i][j] = options[i][j];             quizOptions[i] = options[i][j];  // new update              }           }       }      public String[] getQuizQuestion(){        **return this.quizQuestion;** //null point error     }      public String[][] getQuizOptions(){       return this.quizOptions;     }     public void setSelectedAnswer(int userInput){        selectedAnswer = userInput;     } }   Main method   import java.util.Scanner; public class Main{ public static void main(String[] args){     Question q = new Question(0);     System.out.println(q.getQuizQuestion());     System.out.println(q.getQuizOptions());      Scanner keyboard = new Scanner (System.in);     int userInput = keyboard.nextInt();      System.out.println("Select an answer: ");     q.setSelectedAnswer(userInput);     } }

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'm having trouble resizing my hard drive partition. Before, I was running OS X Lion in the free space above Macintosh HD 2. Now that I deleted the Lion partition, I am unable to resize Macintosh HD 2 to the full capacity of my hard drive.

I have 2 partitions, I reduced the size of one and want to expand the other to fill the now available space.   How do I expand the Lion Partition into the empty grey space beneath Macintosh HD partition?


For the line integral of non-vector field functions, I know that you can kind of consider the line integral to be the area of a fence, with the base of the fence slinking along the curve of interest and the roof of the fence bordering on a function f(x,y). But for the line integral of a vector field, I'm not sure how I should visualize or conceptualize it. Any help would be awesome!

I can understand how the line integral of a scalar function has pure-mathematical significance, representing an area beneath a curve. But is there a pure significance to the line integral of a vector field? The only understanding I have of this is the physical example of work done on a moving particle. Thanks for any insight.


How can I change the arrow color in beamer? by default they're blue triangles  I tried  \setbeamertemplate{itemize items}[triangle, red]   and  \setbeamertemplate{itemize items}[triangle]{\color{red}}   I want to make this for all slides in my presentation.  (Note to self: 20 years coding experience and nothing in Latex is where I expect it to be).

I would like to change the color of itemize item and itemize subitem (the bullet) throughout the presentation. I was wondering how I can do that. Here is my MWE:  \documentclass [11 pt, xcolor=pdftex,x11names,table]{beamer}  \usepackage{pgf, pgfpages} \usepackage[latin1]{inputenc}  \usepackage[english]{babel} \usepackage{beamerhighlight} \usepackage{colortbl} \usepackage{color} \usepackage{pdfpages} \usepackage[absolute,overlay]{textpos} \usepackage{url} \usepackage{graphicx}  \mode<presentation> {     \usetheme{Madrid}     \usefonttheme{professionalfonts}      \setbeamertemplate{itemize item}{$\blacksquare$}     \setbeamertemplate{itemize subitem}{$\blacktriangleright$} } \usepackage{hyperref} \begin{document} \begin{frame} \begin{itemize}     \item hey \end{itemize} \end{frame} \end {document}


Suppose $E$ is a splitting field of a polynomial $f(x)$ over $F$ and $K$ a subfield of $E/F$. Can any monomorphism of $K \to E$ be extended to an automorphism of $E$?

It's a common theorem in field theory that if $\varphi: F\to\overline{F}$ is a field isomorphism, and if $E$ and $\overline{E}$ are splitting fields of monic polynomials $f(x)$ and $\overline{f}(x)$, respectively, where $\overline{f}$ is the image of $f$ under $\varphi$, then $\varphi$ can be extended to an isomorphism of $E$ and $\overline{E}$.   I'm wondering about the following: Suppose $E$ is a splitting field of a polynomial $f(x)$, and $k$ is a subfield of $E/F$. Can any monomorphism of $\varphi:k\hookrightarrow E$ be extended to a field isomorphism of $E$? Defining $\overline{k}:=\varphi(k)$, I get the case that $\varphi:k\to\overline{k}$ is a field isomorphism, and $f(x)$ and $\overline{f}(x)$ both  split over $E$, when regarded as polynomials in $k$ and $\overline{k}$. But is $E$ still a splitting field of $f(x)$ and $\overline{f}(x)$ as polynomials in $k$ and $\overline{k}$, or is it possibly too big to be a splitting field?  If it is a splitting field, then I suppose it would follow that any monomorphism on a subfield can be extended to an isomorphism of the splitting field.


An Echo knight's echo is an object, which makes it hard to turn invisible, as invisibility and greater invisibility only affect creatures.  What options, from any non-homebrew source, allow you to turn an object (thats not being worn or carried by an invisible creature) invisible in 5e?

I'm the DM of a 5th-level party whose PCs have a handful of illusion spells in their repertoire. The players have on at least one occasion mentioned the idea of using one of these spells to hide some important object -- not by covering it with the image of another solid object, but with an illusion of open air. The question "" already covers that scenario, where the accepted answer strongly implies it shouldn't work. But what about spells that are expressly designed to make objects invisible?  Invisibility (and Greater Invisibility) works on creatures and their equipment, but the types of objects the players want to hide are things that can't exactly be carried on someone's person (e.g. a cart, a statue, a mound of dirt from digging a deep hole). The only spell in the Player's Handbook I found that describes making an object invisible is Sequester, but it's overkill for this situation (7th-level spell, 5k gp in material components, also blocks divination, lasts until dispelled).  Are there any other effects (spells, items, or otherwise) that can make an object or volume invisible? I'll accept any official or playtest publication as a valid resource. I don't necessarily need it to be available/affordable to 5th-level PCs, but I'd prefer something near the level/value of Invisibility, since I'm looking for similar utility.


I have just installed TeX Live 2015 using "install-tl-WINDOWS.bat"on windows 10-64bits.  When I click in "TeX Live Manager",nothing happens.  if I execute "tlmgr-gui" in a command line, nothing happens & no message appear.  if I execute "tlmgr -gui" or "tlmgr --gui" in a command line,I got this:  The locale codeset (cp720) isn't one that perl can decode, stopped at C:\texlive\2015\tlpkg\tlperl\lib/Encode/Locale.pm line 123. Compilation failed in require at C:\texlive\2015\tlpkg\tlperl\lib/LWP/UserAgent.pm line 1001..  what is the mistake?

When I want to update packages of texlive 2015 I get this error? what is the problem?  tlmgr update --list  The locale codeset (cp720) isn't one that perl can decode, stopped at   C:\texlive \2015\tlpkg\tlperl\lib/Encode/Locale.pm line 123. Compilation  failed in require at C:\texlive\2015\tlpkg\tlperl\lib/LWP/UserAgent. pm  line 1001.


Why is this happening? I've updated my machine last week.  W: GPG error: http://repo.mysql.com trusty InRelease: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823

The error I am having when trying to update my package list.  W: GPG error: http://download.opensuse.org ./ Release: The following signatures were invalid: KEYEXPIRED 1436387333  W: Failed to fetch http://ppa.launchpad.net/samrog131/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.


Cannot find a logout-link/button.  Yes, asked before - answered before. Lots of time. Know that. Unfortunetaly no one of the answers do the job.  If I log off Google, I'm still logged in to stackoverflow. If I'm logged off stackoverflow I'm still seing my credentials, as I see them - not how "foreign" people should see them.  Reason? I want to see my profile as other see it.  Suggestion: There should be a "how people see you"-feature.

Why does logging in to Stack Overflow keep me signed in to my Gmail email after logging out and regardless of the Stay signed in checkbox?  Steps to reproduce:   Browse to  and confirm you are logged out Browse to  and confirm you are logged out Click login Click Google Enter Email/Password and confirm Stay signed in is unchecked Click Sign in Click logout (up top) Click Logout (down below) Browse to  and confirm you are still logged in Click Sign out <- Shouldn't clicking Logout on Stack Overflow be doing the same thing as this? Browse to  and confirm you are logged out     Answers are making sense but my frustration is that clicking Logout (twice) on StackOverflow essentially does nothing. If I proceed to click login and Gmail I am immediately authenticated because I still have an active Gmail cookie. In order to effectively logout I need to click Logout twice on Stack Overflow and then manually browse to  and Sign out.


I am using Java and have been trying to split my string input into 3 parts. For example, my input will be "AND 1 1", and I am expecting it to go into my if-loop where the condition is parts[0] == "AND". But this is not the case, and I am not sure why.  My code is listed below  Scanner stringInput = new Scanner(System.in); String input = stringInput.next(); System.out.printf("%s\n", input); String[] parts = input.split(" ");  if (parts[0] == "AND") {     if (parts[1] == parts[2] && parts[1] == "1")          System.out.printf("1\n");     else          System.out.printf("0\n"); } else {     if (parts[1] == "1" || parts[2] == "0")         System.out.printf("1\n");     else          System.out.printf("0\n"); }

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


Recently my minecraft account was hacked. I was lucky and got an email from mojang asking to confirm if it was me who logged in and changed my name. I changed that password and kicked out any logged in people. When i logged back on I noticed that my username and skin was changed. I changed my skin back and then tried to change back my username. It said i had to wait 30 days. I was wondering if i am able to email mojang or anyone on their support team about this. anyways im really hoping some people can help. (I WILL NOT HACK OR DO ANYTHING ILLEGAL)

How do I change my name in minecraft name earlier than the 30 days please, I need help. My name is really dumb and I would like to change it early.   I do not hack and I would like to change it early with NO hacks. I already looked up this question but I got no help . I tried looking up and I am quite impatient.  is the link I used


Things I know already  1) Rubber sheet analogy of GR is yet another misleading piece of info 2) differential geometry makes sense 3) equivalence principle makes sense 4) special relativity makes sense     I am trying to develop a better understanding of curvature in space-time.    Current Dilema  Trying to refine understanding of the effect of curved space-time on a stationary object. We all know that stationary objects do fall. Curvature, I reasoned, can surely only be experienced, (and therefore only cause an effect, such as an apparent acceleration), if an object has a trajectory; if it is moving relative to the curve.  Massive stationary objects have a trajectory only in time, so the answer must be that curvature of time alone can be responsible for the effects we call gravity.  Question I Think I Need to Ask  This is a theoretical scenario. A point mass is; a) stationary in b) a spatially flat volume, which c) is curved in time in a simple way (a geometry that is purely theoretical, but allows the question to focus on the effects of time) d) by what mechanism does this mass experience a change in velocity?     I know I haven't used many mainstream GR terms, but I hope the question makes sense.  Other Aspects  Curved space is not a massive conceptual challenge, but curvature in space-time is more difficult. There seem to be less familiar concepts to relate distortions of the temporal dimension to.   The answer I am not looking for is that GR can only be "understood" by directly using the maths. In this case I would initially think that would really just mean you don't know (It's not like the philosophy struggle people go through with, for example, the meaning of wave-functions).  However, I'd be happy to be pointed to a mathematical treatment of this kind of scenario that I can scrutinise; (that will be easier for me if lower level constructs are used).  Thanks in advance for your help.

They say that gravity is technically not a real force and that it's caused by objects traveling a straight path through curved space, and that space becomes curved by mass, giving the illusion of a force of gravity.  That makes perfect sense for planetary orbits, but a lot less sense for the expression of gravity that we are the most familiar with in our day-to-day lives: "what goes up must come down."  Imagine that I hold a ball in my hand, several feet off the ground, with my fingers curled around it, and my hand is above the ball.  Then I open my fingers, releasing my grip on it, being very careful to not impart any momentum to the ball from my hand as I do so.  An object at rest remains at rest unless acted upon by an outside force.  If the ball is not moving (relative to my inertial reference frame), it has no path to travel that's any different from the Earth's path through space.  It should remain at rest, hanging there in the air.  And yet it falls, demonstrating that an outside force (gravity) did indeed act upon it.  How does curved space explain this?


Consider the system of simultaneous linear equations  \begin{align} a_{11} &x_1 &&\; + \;&& a_{12} x_2   &&\; + \cdots + \;&& a_{1n} x_n &&\; = \;&&& 0 \\ a_{21} &x_1 &&\; + \;&& a_{22} x_2   &&\; + \cdots + \;&& a_{2n} x_n &&\; = \;&&& 0 \\ \vdots\;&\; &&     && \;\;\;\vdots\;\;\; &&                && \;\;\;\vdots\;\;\; &&     &&& \vdots \\ a_{m1} &x_1 &&\; + \;&& a_{m2} x_2   &&\; + \cdots + \;&& a_{mn} x_n &&\; = \;&&& 0 \\ \end{align}  for constants $a_{ij}$ and unknowns $x_j$ , in the case where $m < n$ prove that there  must exist infinitely many solutions to this system of equations.  Okay, so it's pretty easy to prove that this set of equations must have solutions because we have m equations and n values, we x_1=x_n=0 is our trivial solution and if we have more than this one solution, then out null space will be greater than {0} which implies we don't have an injective set of equations. As m is less than n we know the system is not injective, which tells us there must be non-zero solutions. But I want to show these solutions are infinite which means for x_n solutions, the solution should include a parameter. How can I go about this?

I learnt that for the equation: $Ax=b$   There is one solution if $A$ is invertible.  But if $A$ is singular there are infinity solutions or no solutions at all.  If $A$ is singular is it possible to determine whether there are no solutions or infinity solutions?


I've just put Ubuntu 13.04 on my ASUS B400A-XH51 laptop and am having a problem with the touchpad: It has discrete left and right buttons, and the left one works fine, but the right one does nothing when pressed. (I can still do a right click by using a two-finger tap, although I would rather disable tapping and just use the discrete buttons.)  Also, if I put my finger on the lower-right area of the touchpad while clicking the discrete left button, it acts as a right-click -- as though Ubuntu thinks it is a clickpad.  Any ideas for how to make the right button work?  (Similar to an issue with ASUS G46VW: )  Here is the output of "xinput --list"  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ ETPS/2 Elantech Touchpad                  id=13   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Power Button                              id=8    [slave  keyboard (3)]     ↳ Sleep Button                              id=9    [slave  keyboard (3)]     ↳ USB2.0 HD UVC WebCam                      id=10   [slave  keyboard (3)]     ↳ Asus WMI hotkeys                          id=11   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]

I have a Sony VAIO E14. The touchpad detects all clicks as Left clicks. In Windows 7, pressing on the right side of the touchpad is recognised as a right click.  How can I enable right clicking?  greg@greg-SVE14A1C5E:~$ xinput ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)] ...  greg@greg-SVE14A1C5E:~$ grep "TouchPad: buttons:" /var/log/Xorg.0.log [    23.112] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left double triple


I wanted to create a method to search through a array list to see if the objects in the array list end with the given char character and then return the count of the character as a int.   public int OccurencesOfCharacter(Char givenCharacter){ .... }   Here's my array List  private ArrayList<Class> list;   For example if the Array List Contained [ Games, iphones] and my given occurrence character was 's' i want to return 2 because it appears twice at the end of the strings.

I have the string   a.b.c.d   I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner.  (Previously I had expressed this constraint as "without a loop", in case you're wondering why everyone's trying to answer without using a loop).


My son got lost in the Nether  and can't find the portal back to his world. He tried building another portal but it didn't take him back. He's using the app on an iPad and I have no clue on how to help him, he's pretty devastated and thinks everything is lost forever.

I made a castle on Minecraft Pocket Edition that was far away from the place that I spawned. Once I had made my castle, I went to the Nether and got lost. I made a new Nether portal, went through, and ended up at a completely different portal than the one I made at the castle. Now I'm lost. I have used the compass to get back to the place that I spawned, but I still need to get back to my castle. I'm in creative mode.


I'm making JKnRnS master slave flip-flop, here is my code:  library IEEE; use IEEE.std_logic_1164.all;  entity JKnRnS is   port(        C : in STD_LOGIC;        J : in STD_LOGIC;        K : in STD_LOGIC;        nR : in STD_LOGIC;        nS : in STD_LOGIC;        Q : inout STD_LOGIC;        nQ : inout STD_LOGIC   ); end entity;  architecture JKnRnS of JKnRnS is                                                              signal Q_int: std_logic := '1'; signal NQ_int: std_logic := '0';  signal a,b,c1,d,f,e,notC: STD_LOGIC; begin     a<=not(C and J and nS and NQ_int);                                   c1<=not(d and a and nS);  d <= not(nR and b and c1);  b <= not(Q_int and nR and K and C);  e <= not(notC and c1);  f <= not(d and notC);  Q_int <= not(NQ_int and e and nS);  NQ_int <= not(nR and f and Q_int);  notC <= not(C);  Q<=Q_int; nQ<=NQ_int;   end architecture;   which works fine, but when I change it into:  library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_MISC.all;  entity nand_3 is                                     generic (t_rise: TIME:= 0 ns; t_fall : TIME:= 0 ns);      port(          in1 : in STD_LOGIC;          in2 : in STD_LOGIC;          in3 : in STD_LOGIC;          out1: out STD_LOGIC          ); end entity;   architecture nand_3 of nand_3 is  begin        process (in1, in2, in3) is     begin     out1 <= not(in1 and in2 and in3);       end process; end architecture;   library IEEE; use IEEE.STD_LOGIC_1164.all;  entity nand_4 is      port(          in1 : in STD_LOGIC;          in2 : in STD_LOGIC;          in3 : in STD_LOGIC;          in4 : in STD_LOGIC;          out1 : out STD_LOGIC          ); end entity;                                                 architecture nand_4 of nand_4 is begin      process (in1, in2, in3, in4) is      begin          out1<=not(in1 and in2 and in3 and in4);      end process; end architecture;  library IEEE; use IEEE.std_logic_1164.all;  entity JKnRnS is   port(        C : in STD_LOGIC;        J : in STD_LOGIC;        K : in STD_LOGIC;        nR : in STD_LOGIC;        nS : in STD_LOGIC;        Q : inout STD_LOGIC;        nQ : inout STD_LOGIC   ); end entity;  architecture JKnRnS of JKnRnS is                                                              signal Q_int: std_logic := '1'; signal NQ_int: std_logic := '0';  signal a,b,c1,d,f,e,notC: STD_LOGIC; begin      E1: entity work.nand_4(nand_4)     port map(in1=>C, in2=>J, in3=>nS, in4=>NQ_int, out1=>a); E2: entity work.nand_3(nand_3)     port map(in1=>d, in2=>a, in3=>nS, out1=>c1);  d <= not(nR and b and c1);  b <= not(Q_int and nR and K and C);  e <= not(notC and c1);  f <= not(d and notC);  Q_int <= not(NQ_int and e and nS);  NQ_int <= not(nR and f and Q_int);  notC <= not(C);  Q<=Q_int; nQ<=NQ_int;   end architecture;   I get an error:  KERNEL: Error: KERNEL_0160 Delta count overflow. Increase the iteration limit using -i argument for asim or the matching entry in simulation preferences. What is wrong here?

I'm using quartus II to design a JK Flip Flop. However, my results show unknown output. Why is it?  Intended design circuit:    VHDL code:  library IEEE;  use IEEE.STD_LOGIC_1164.ALL;  entity JKFlipFlopGate is     port(         J,K,Clk : in std_logic;             --JK Flip-Flop gate input 1 & 2         Q,Qbar : out std_logic              --JK Flip-Flop gate output     ); end JKFlipFlopGate;  architecture result of JKFlipFlopGate is         signal out1,out2,out3,out4 : std_logic;  begin     out1    <= NOT(J AND Clk AND out4);                      out2    <= NOT(K AND Clk AND out3);      out3    <= out1 NAND out4;     out4    <= out2 NAND out3;      Q       <= out3;     Qbar    <= out4;     end result;


I am trying to install ubuntu alongside windows 7 using a usb flash drive and when I went to install it I got this message:  "This machine's firmware has started the installer in UEFI mode but it looks like there may be existing operating systems already installed using "BIOS compatibility mode". If you continue to install Debian in UEFI mode, it might be difficult to reboot the machine into any BIOS-mode operating systems later. If you wish to install in UEFI mode and don't care about keeping the ability to boot one of the existing systems, you have the option to force that here. If you wish to keep the option to boot an existing operating system, you should choose NOT to force UEFI installation here."  Then I have to options, 1. Go Back and 2. Continue in UEFI mode  I clicked go back and it still proceeded to the next part of the installation, so I quit so I can ask here if I am doing something wrong because I don't want to mess with anything in windows 7 or my BIOS after I install ubuntu. I have used this flash drive to install ubuntu alongside windows 7 on two other pcs and never got that message.  What does this message mean? Should I be doing something differently? I don't even know what Debian is (I am trying to install Ubuntu)?

I try to install Ubuntu 16.04 next to Windows 10. Windows is installed on legacy bios and then upgraded to Windows 10. When I try to install Ubuntu from USB stick, it shows a message titled "Force UEFI installation?". It says that the machine's firmware started the installer in UEFI mode but there is an OS installed using BIOS compatibility mode. If I force installation I won't be able to boot Windows.  How can I start the installer in legacy mode?  BIOS of the machine supports legacy and UEFI modes. Legacy support is enabled. But USB disk is always recognized as EFI. USB disk's name is shown as "EFI USB Disk" in BIOS. I cannot change that. I burned the USB with both startup disk creator on ubuntu 14.04 and pendrive software on Windows. Same result.  Thanks.


I ran a proc univariate on a SAS data set and one of the output results was:  Test           -Statistic-    -----p Value------ Student's t    t  73.93231    Pr > |t|    <.0001   How should I interpret this? Does it mean that the probability that an observation will be > 73.93 is very small (< .0001)

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


The integral $$ \int_0^\infty \int_0^\infty \frac{e^{-(x+y)}}{x + y}\,dx\,dy $$  is  (A) infinite  (B) finite, but cannot be evaluated in closed form  (C) $1$  (D) $2$  I have tried with integration by parts in succession and ending up with value $1/2$. But there is no such option. The correct option is (C) $1$.   Where I am going wrong?

Question : The integral   $$ \int_{0}^{ \infty} \int_{0}^{ \infty} \frac { e^{-(x+y)}}{x+y} \mathop{dx}\mathop{dy} $$  is   (a) infinite   (b) finite but can not be evaluated in closed form   (c) 1  (d) 2 .  I tried substituting $u=x+y$ and $v=y$ that led me no where . I'm not even sure about convergence of integral .Any help would be greatly appreciated .


A box contains 10 pens, and the probability that any given pen is defective is $p$.  The expected value is $\sum_{X = 0}^{10} X \binom{10}{X}p^X(1-p)^{10-X}$.  Using the binomial theorem, I know that $\sum_{X = 0}^{10} \binom{10}{X}p^X(1-p)^{10-X} = 1$.  By testing different values of $p$, I found that the expected value is $10p$.  Is there a way of proving this?

If $\mathrm P(X=k)=\binom nkp^k(1-p)^{n-k}$ for a binomial distribution, then from the definition of the expected value $$\mathrm E(X) = \sum^n_{k=0}k\mathrm P(X=k)=\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}$$ but the expected value of a Binomal distribution is $np$,  so how is      $$\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}=np$$


I wish to draw a rounded corner box (top-left side as a square, top-right side with 6pt radius curve and the bottom of two sides also with radius curve), in addition to that there should be shading, how can I get such a style? Is there any package available for this task?

This is my minimal example:  \documentclass{article}  \usepackage{tikz}  \begin{document}     \begin{tikzpicture}            \node[rounded corners=3pt, draw, fill=red!20]{Hallo!};    \end{tikzpicture} \end{document}   I'd like to define different values for rounded corners (i.e. 5pt for north-west and north-east and 2pt for south-east and south-west).


I have a map built with a shapefile for country contours and a raster from .hgt files with elevation representation. How can I only select the area corresponding to the country?  I found some thing for matlab  but not in QGIS. I'm thinking of using a polygon, but I am not familiar with how to do so. Or in a subtraction of the outside, but how to determine that? On the image, the red lines show the parts I want to eliminate.

I have 2 satellite images (jpeg2000 format) and 2 xyz-files from the same area. I am trying to extract certain region from the area including contour lines and the satellite image in order to import these into Google Sketchup for terrain modeling.    I have been able to create contour lines from xyz-files. Anyway, I would like to first merge contours and then satellite pictures and finally extract only certain part of the data (both contours and satellite pictures). Is there some kind of instruction available that would help in a problem like this?


I want to delete all my photos from my iPhone 4s running iOS 7.0.3 but it wont let me. I have tried in numerous ways, but they don't work.    I don't want to delete them one-by-one. Usage → Camera and Photos, swipe Camera Roll and delete does not work on iOS 7.  I tried using Image Capture on my computer, and my device shows up on the left, but there are no image files. I tried manually deleting them from my iPhone files on my Windows 7 PC but it wont let me delete them.

How do I delete photo albums that I accidentally imported to my iPhone 4S from my PC? There is no delete available for either album or individual pictures.


My techno g9 device shows internal storage 0.99G Usb storage 12 G and Sd Card 27G. All installed apps go to the .99G which is full. So i cant dowload any new apps. Please how can i change the instal folder to the 12G usb storage or the 27G Sd card.

I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually.  Thanks


I found the code that is blocking the home button and I did want to try it, but when I run it nothing happens, even my layout doesn't show  and also I have an error when I go to the home screen (see below the code). What do I do wrong?  public  class LockActivity extends Activity{     private LockscreenUtils mLockscreenUtils;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);             setContentView(R.layout.layout_lock);             lockHomeButton();          }         public void unLockHomeButton() {             mLockscreenUtils.unlock();         }         public void lockHomeButton() {              mLockscreenUtils.lock(LockActivity.this);         }  }   This is where I block the home button:  public class LockscreenUtils {     private OverlayDialog mOverlayDialog;      public void lock(Activity activity) {         if (mOverlayDialog == null) {             mOverlayDialog = new OverlayDialog(activity);             mOverlayDialog.show();         }     }      public void unlock() {         if (mOverlayDialog != null) {             mOverlayDialog.dismiss();             mOverlayDialog = null;         }     }      private static class OverlayDialog extends AlertDialog {          public OverlayDialog(Activity activity) {             super(activity, R.style.OverlayDialog);             WindowManager.LayoutParams params = getWindow().getAttributes();             params.type = TYPE_SYSTEM_ERROR;             params.dimAmount = 0.0F; // transparent             params.width = 0;             params.height = 0;             params.gravity = Gravity.BOTTOM;             getWindow().setAttributes(params);             getWindow().setFlags(FLAG_SHOW_WHEN_LOCKED | FLAG_NOT_TOUCH_MODAL, 0xffffff);             setOwnerActivity(activity);             setCancelable(false);         }          public final boolean dispatchTouchEvent(MotionEvent motionevent) {             return true;         }          protected final void onCreate(Bundle bundle) {             super.onCreate(bundle);             FrameLayout framelayout = new FrameLayout(getContext());             framelayout.setBackgroundColor(0);             setContentView(framelayout);         }     } }   These are the errors that I have:  Caused by: java.lang.NullPointerException             at com.example.amadey.pre_final_version.LockActivity.lockHomeButton(LockActivity.java:46)             at com.example.amadey.pre_final_version.LockActivity.onCreate(LockActivity.java:31)             at android.app.Activity.performCreate(Activity.java:5231)             at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5001)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)             at dalvik.system.NativeStart.main(Native Method)

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 an Aspera Jazz 7.0 which had frp  turned on. Because of weird network issue, I had to reset it. But I forgot my account password and the phone number. I can go with a new account, but I can't turn off the frp . I tried fastboot. But can't hard reset it. How can I turn it off?

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


I have a problem. I'm going to make "One commandblock creation", but 'Unbalanced Curly Brackets' Error pops out, when trying to use this:  /summon FallingSand ~ ~1 ~ {Block:stone,Time:1,Passengers:[{id:FallingSand,Block:redstone_block,Time:1,Passengers:[{id:FallingSand,Block:activator_rail,Time:1,Passengers:[{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false},{id:MinecartCommandBlock,Command:kill @e[type=MinecartCommandBlock,r=1]},{id:MinecartCommandBlock,Command:fill ~ ~-3 ~ ~ ~ ~ air}]}]}]}   I was trying to find mistake using Notepad++ but everything looked fine there...

I am trying to make a chest that is called 'I' that has another chest inside called 'II' that has another chest inside called 'III' that has another chest inside called 'IV' that has another chest called 'V' that has a piece of paper called 'An important message...' and it has a lore saying      自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。   I keep getting 'Unbalanced Curly Brackets' every time I try use this command. I checked with Notepad++, I'm pretty sure the curly brackets are right? Here's the command below, but what am I doing wrong?  /setblock ~ ~ ~ chest 0 replace {Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"II"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"III"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"IV"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"V"},Items:[{id:339,Count:1,Slot:13,tag:{display:{Name:"An important message...",Lore:[自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。]}}}]}}}]}}}}],display:{Name:"I"}}}


Using Java's enhanced for loop, I have for quite some time avoided using the structure if I needed the processing to be in any particular order (for example: printing out the values in a table in the same order as the collection). It seems obvious that that should be the case, but on the other hand, the syntax of the structure seems to imply that I should not rely or know about that.   Perhaps embarrassingly, I have not been able to track down any documentation that explicitly says enhanced for loops are processed in first-to-last order. Does such documentation exist, and if so, where can I find it?

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


On my iOS 14.5.1 iPhone 7 how can I check if an SMS message has actually been sent or not? It is just a green bubble with no sent confirmation nor 'pending' indication anywhere near it in the Messages app. I don't trust my 1-0 bar fluctuating network connection. How can I find out if the message has been sent or not?

I have an iPhone 4, sometimes I get the green sms bubble and sometimes an iMessage bubble.  At times it states sent as text message and sometimes it doesn't.  When it doesn't does that mean the message has been sent out?


We see the mix of red light and green light as yellow light (#FFFF00). The wavelength of yellow light lies between red and green.    But the wavelength of purple light lies outside of red and blue. Why can we also see the mix of red and blue as purple? Is it real ?

In computer science, we reference colours using the RGB system and TVs have pixels which consist of groups of red, green and blue lines which turn on and off to create colours.  But how does this work? Why would certain amounts of red, blue and green light make something seem yellow? Is this a biological thing, where our brain performs some kind of averaging operation, or are the waves actually interacting to make light of a new wavelength?  It seems RGB is a "universal triplet", as every colour within the visible spectrum can be created by combining the three in different intensities. Is RGB the only such triplet? If so, why? If not, what features must a triplet of colours have to be universal?


I can dynamically change the CQL filter, but I want to reset it to default (get WMS without any filter).  Class I am using  "ol.source.TileWMS" as source from GeoServer   Here is my code to which I used to update the CQL filter:  overlay_layer_definition_array[selected_layer].getSource().updateParams({  'LAYERS': Lay_Param[selected_layer][1] + ':'         + Lay_Param[selected_layer][2]   ,'cql_filter': ''+strUser+strUser1+strUser2});   The above code works fine, but now I don't want to pass any filter, tried all of below     does not work   refresh() does not work   'cql_filter': nil does not work   'cql_filter': 'nil'  does not work

I'm using OpenLayers to show my map with some layers. I've a field where I can add some filters with CQL code. I can successfully add a new filter to my map, and only the right points appear in my map but when I try to remove the filters it's deleting my Layer instead of my previous CQL_Filter result, so is deleting ALL the points from the map.   //My var map is previously declared var layerFromMap = map.getLayersByName(input.name)[0]; //If my input is empty then I should delete the filters, like resetting the search if (input.value.length > 0) {     layerFromMap.mergeNewParams({ 'CQL_FILTER': input.value });     layerFromMap.redraw(); } else {     delete layerFromMap.params.CQL_FILTER;     layerFromMap.redraw(); }   When input is empty layerFromMapparams.CQL_FILTER is deleting my layer from the map, so all the points are deleted. Why is this happening? How can I only remove the filter so all the points appear again?


Question is to factorise $x^5+x^2+1$ into irreducible polynomials in $\mathbb{Z}$[x].   But I'm fairly sure $x^5+x^2+1$ is already irreducible, but not sure how to prove this as neither Eisenstein's criterion nor showing that it is irreducible mod(p) will work.   The only thing I have so far is to write it as $x^2(x+1)(x^2-x+1)+1$ and show that these are all irreducible, but not sure that that counts.

So here is my question: i would like to determine if whether or not the polynomial $x^5+x^2+1$ in $Z[x]$ is irreducible and if not then find the factors.  I tried a lot to find it. I really think it is already irreducible but I don't know how to prove it.  I tried Eisenstein's criteria which doesn't work here, I tried to check this criteria also after changing $x$ as $ax+b$ but everything I check was too complicated.  I tried for the modulus with prime numbers of $Z$, and I'm not sure of my following argument:  The polynomial $\mod 2$ stays $x^5+x^2+1$.  But if $x$ is odd then $x^5$ and $x^2$ are odd too. Then the polynomial is given by $1+1+1=3=1 \mod 2$ which is irreducible (not sure if I have the right to say that).  And if $x$ is even, then $x^5$ and $x^2$ are even too. The polynomial is thus given by $0+0+1=1 \mod 2$ which is irreducible.  Hence the polynomial is irreducible $\mod 2$ and since it's a monic polynomial it implies it is irreducible in $Z[x]$  Is my argument correct? If not if you have any clue please I would like to have some :)  Thank you and good night!


I'm using biblatex, with the biber backend on pdflatex.  The default line-spacing in my document is double spaced and the line-spacing in my bibliography is also double spaced. How can I make the spacing within individual entries single spaced while keeping the spacing between entries as it is (double spaced).

How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use   \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing}   and  \setlength{\bibsep}{0.0pt}.  But how do you do the equivalent in biblatex?  EDIT: I should maybe have mentioned I am using   \begin{refsection}  \printbibliography[heading=subbibliography]  \end{refsection}  [..]   \begin{refsection}   to get multiple bibliographies and I would like to be able to control the spacing per bib.  \printbibliography[heading=subbibliography]  \end{refsection}


The highest energy accelerator till date is the LHC which operates at an energy scale of perhaps 10-100 TeV. In SI units this is about $\sim 10^{-6}-10^{-5}$ Joule which is several orders of magnitude smaller than the energy scales we are used to in daily life. For example, the work done and heat produced by thermodynamic engines are hundreds of Joules.  Why is then particle physics regarded as the 'high energy physics'? 'High' with respect to what? I feel this has something to do with very small masses of the elementary particles. Incidentally, why is it difficult to reach energies as high as hundreds of Joules for elementary particles?

Considering that $7$ TeV is more or less the same kinetic energy as a mosquito flying, why is it considered to be a great amount of energy at the LHC?  I mean, a giant particle accelerator that can only provide 7 TeV of energy? (14 in the mass center, if I understood well). Is it because particles are so small that this amount of energy, in proportions, is then really huge?


I found this Python script that prints all permutations of given variables. I am a complete Python newby, but after a few modifications it does almost exactly what I need.   Here is what I got so far:  blocks =  [ "0", "1a", "2a", "2b" ] # variables num_blocks = len( blocks ) num_places = 4  # number of places  for i in range( pow( len( blocks ), num_places ) ):      value = i     indexes = []      while value:             indexes.append( value % num_blocks )         value = value // num_blocks      # print( i + 1 ) # alternatively print number of each permutation      for j in range( len( indexes ), num_places ):         print blocks[ num_blocks - 1 ]      for j in range( len( indexes ) - 1, -1, -1 ):         print( blocks[ num_blocks - 1 - indexes[ j ] ] )      print " "  # add a line break after each entry   The output is  2b 2b 2b 2b  2b 2b 2b 2a   etc.  How can I A) change the output to   2b2b2b2b 2b2b2b2a   etc.  and B) only print occurences that include the last variable, in this case "2b".  For the purpose of this example, I only included four variables: 0, 1a, 2a, 2b. The script prints all possible combinations of these four variables, from 0000 to 2b2b2b2b and anything in between. Is it possible to print only combinations that include the last variable 2b? So for example 2b2a1a0 or 1a1a02b, but not 2a2a1a0 or 2a01a1a? Later on, many more variables will be included (3a, 3b, etc.), but the script shall only list permutations including the last variable.  Thanks in advance!  George  EDITED to clarify second question.

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I was encoding (from terminal) into base64. But I guess the commands are not executing properly.   $ echo 123456789 | base64 MTIzNDU2Nzg5Cg==   And then when I did the same on , I got this result  MTIzNDU2Nzg5   I thought that maybe echo is being encoded as well so i ran  $ echo | base64 Cg==   I guess i was right, but that didn't help either as in another instance:  $ echo qwertyuiop | base64 cXdlcnR5dWlvcAo=   and when the same was encoded using  the result was  cXdlcnR5dWlvcA==   And not suprisingly i the results from base64encode were accepted(in SMTP)  So, what am i missing here? and how can i sucessfully convert the string or number into base64?

I am using the java based neo4j graph database on lubuntu 15.04.   The neo4j HTTP authentication header uses base64 encoding of 'username:password' (not including quotes). Using wireshark I can see the base64 code generated by neo4j.   However if I use the ubuntu coreutils base64 to encode the same string I get a slightly different encoding. This encoding is not accepted by neo4j.  Both encodings decode to the correct username:password string  Example   username=neo4j and password=@N  Neo4j gives the encoded value of neo4j:@N as bmVvNGo6QE4= which decodes to neo4j:@N as expected  $ echo 'bmVvNGo6QE4=' | base64 --decode neo4j:@N   Ubuntu coreutils base64 returns the encoded value of neo4j:@N as bmVvNGo6QE4K (which differs in the last character) but still decodes correctly;  $ echo 'neo4j:@N' | base64 bmVvNGo6QE4K $ echo 'bmVvNGo6QE4K' | base64 --decode neo4j:@N   Why is this? What do I need to do get consistent encoding?


is there any way in typescript by which I can get length of an object:  Something like this:  say I have an object:  public customer:any={      "name":"Bhushan",      "eid":"879546",      "dept":"IT" }   Now I am trying to get its length in typescript.   ie. when I am doing customer.length(), I should be able to get value 3 as it has 3 elements.  I tried Object.getOwnPropertyNames(customer.value) but its returning 2 whereas I have 3 elements in my object.  any inputs?

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


So I am making a wheat beer and am adding lemons and oranges into the second stage of fermenting. I have heard through the beer vine that shandy's are lemonade and beer. Can I just add the lemonade or the soda pop before the bottling, and can it substitute the priming sugar? Also what would you recommend pop or lemonade?

So I was told I can add lemonade or orange juice to my wheat beer to make a summer shandy, can I just put fruit in the second fermentation stage instead?


I'm relatively new to Linux (coming from Windows) and one thing that always bugs me is how restrictive the system is. For example I'm trying to install Sublime Text 2 into /opt/ right now, but when I open the tar archive and try to extract the folder, I get the following error:     You don't have the right permissions to extract archives in the folder "file:///opt"   In Windows or Mac I usually would have some sort of option "As Administrator..", which would elevate the privileges instantly (possibly prompting a password) and then perform the operation.  With Linux I seem to be stuck to somehow figure out the Archive Manager's exact name and then run it with sudo from the terminal. In the menu there isn't even a right-click "Run as root.." option or anything similar.  Isn't there an easier way of handling this in general?  I'm running Xubuntu with XFCE but I had this problem with every desktop distribution I tried so far.

Say I have a folder open in Nautilus that's in my /home/user/temp directory. I'd like to move a folder from there to my /opt directory (it's a program). Is there a way I can elevate the copy command up to a sudo so that I can copy the folder without having to start a new instance of Nautilus from the command line?


I've received an offer for admission next year. I would very much like to accept the offer, but I'm not sure the 50% TA position will be enough to cover the costs of commuting and an apartment near the university.  During the interviews last weekend, one of my likely advisors stressed the point that when an offer was made (they didn't come out and tell me then, but were very clear that my chances were good) it would be negotiable, but he didn't elaborate and I didn't feel comfortable asking what he meant.  How should I broach the subject of receiving more funding without coming across as ungrateful, and is there any way to know what kinds of additional aid the university might have available?

I have been fortunate enough to get accepted with 5 years guaranteed funding to my 2nd choice graduate school. While the guarantee is great, the funding is only for 9/months out of the year. Would it be rude to ask them to guarantee summer funding to me for the first year until I can write a grant to get on a RAship? I know I should be more appreciative, since not everyone gets funding, but just an increase of about ~3k a year would make living there so much better and I do not want to accept an offer at a lesser institution just because of money.  What would be the most polite way of doing this?  I want to make it clear that I am not trying to get more money for the sake of getting more money, moreover that I am just not comfortable with so little money and such a high living cost in that area.  Thank you for your time.


I'm looking to see what serial ports, USB and ethernet ports are available and what they are labeled as.

Is there any built-in software or terminal method allowing me to view the hardware profiles on my system? Windows equivalent of such a feature would be Device Manager.


I have a input that only allows number. but if I do copy paste something else then number it will allow it.  How can I make sure that he only allows number and nothing else (even after copy paste)    <input type="text" name="people" onkeypress='return event.charCode >= 48 && event.charCode <= 57'/>

Is there a quick way to set an HTML text input (<input type=text />) to only allow numeric keystrokes (plus '.')?


I'm just wondering if there is a configuration to automatically switch between perspectives when one gets out of focus. Example: I'm in the Scala Perspective and start debugging from there. Eclipse automatically switches to the Debugger Perspective as soon as I reach a breakpoint. But when my app terminates, Eclipse does not switch back to the Scala Perspective but stays in Debugger. I have to do it manually. I already know about the hotkey F8, but that still requires some interaction.

Eclipse by default automatically switches to the Debug perspective when you hit a breakpoint.  However, it is annoying me that it doesn't automatically switch back to the previous perspective (say, Java) when terminating the process.  It just stays in the debug perspective even though there is nothing to debug because nothing is running.


A couple weeks ago I received that warning about the disk being likely to fail soon. I ran smartctl and got the following:   As you can see, it claims that my drive has actually passed the test. Also the disk utility no longer claims that my disk is going to fail but it does show a serious amount of bad sectors.     What I want to know is: Is my hard drive really going to fail soon?   P/s: I'm running Ubuntu on my Mac because I kept having boot problems with the original OS. Also, recently I had some problems copying a file which prompt the following error:   Error splicing file: Input/output error.   I bring this up because some have mentioned it indicates problems with the drive.

I have a dual boot of Windows 10 and Ubuntu 16.04. Recently I upgraded it to 18.04. As soon as I did it, it started showing DISK IS LIKELY TO FAIL SOON (37° C / 99° F).    I checked the status of my disk via Windows and it shows it’s perfectly healthy. I assumed the error occurred because my partition size of Ubuntu was 64GB (which I now increased to 86GB). Please help me out with this.    Edit: The results of smartctl - attributes


I have looked for an answer but can't seem to find what I'm looking for so thought I'd ask here.  We have decided to get a connection from a local ISP offering an upload speed of 15Mbps to serve a site we've developed. We expect that the site will have a decent about of traffic after about 5 or 6 months. During the initial 6 months, I don't plan to have any more than maybe 100 to 200 people a day coming to the site.  The site is all image based, so a single pageload may be around 3Mb each.  I'm concerned that maybe 15Mbps may not be able to serve very many nodes simultaneously. Is there a formula to figure this out? Or maybe even a calculator that can address this question?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I have an outdated and unsupported version. I have been racking my brain trying to figure out how to download the latest version, I have run into one brick wall after another. Please help a non-tech savy ubuntu fan.

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


I have read in multiple places that it is a good practice as an academic to keep a research journal. For example, Marie desJardins' paper  says:     Keeping a journal of your research activities and ideas is very useful.   Write down speculations, interesting problems, possible solutions, random ideas, references to look up, notes on papers you've read, outlines of papers to write, and interesting quotes.   Read back through it periodically.   My first attempt was to write my ideas in a log book. I soon gave that up because the book would not always be with me when I wanted to write something in it, and because I knew eventually I would lose it and not be able to retrieve information from it.  My current approach is to write a huge LaTeX file which I store in the cloud. In it, I chronicle my daily thoughts about my research project, to take notes of what is discussed in meetings with my adviser. However, I simply feel overwhelmed by the volume of writing and the amount of repetition that I find in my research journal. I also have other files which serve similar purposes. For example, I have a file called results.pdf where I write out all my theorems and propositions and their proofs.   What have you tried and how has a research journal been of benefit to you? Do you do all your "rough work" in a research journal, so that you can refer to it later? What system do you use as your research journal? Do you log all your experimental results into a chronologically organized research notebook? (Since I am not from a biology/chemistry/experimental background, I am curious as to how people who do lots of experiments manage to organize their results and ideas.)

Question:  Are there any guidelines, sources, or examples of good practices for maintaining theorist's research notebook?  Motivation and context:  Maintaining a  is a much advised (if not a vital) tool for doing research. Many do that nowadays also in . While the methods for writing and maintaining a labbook might differ in details, in "dirty-hands" (no offense!) experimental, or field disciplines, the basics are relatively straightforward and clear. The advice tends to boil down to keep a labbook per single topic one works on and then record all the experiments and thoughts related to those experiments into the notebook. Simplifying a lot, in the end, the researcher (team) would compile a paper from the notes in the notebook.  Now situation of a researcher in a more theoretical discipline is strikingly different. Usually one engages in research on several topics at the same time. The problems a researcher works on are often intertwined and one's view on them changes over time, often merging originally separate streams of thought into a single one, or vice-versa. The work revolves not around experiments which would have a clear objective, but rather around currently prepared papers and then "a cloud of ideas". In summary, theorist's workstyle tends to be very non-linear. Maintaining some kind of a notebook is still a good thing, if for nothing else, then for not forgetting about stuff. My question is about how to go about doing it.  I am after a practical tool helping me to archive my thought process for long-term, as well as efficiently manage and keep an overview of the evolution of the several interacting topics I engage in.


Given a smooth map $f:S^1\to S^1$, there is a smooth map $g:\Bbb R\to\Bbb R$ such that $f(\cos t,\sin t)=(\cos g(t),\sin g(t))$ and $g(2\pi)=g(0)+2\pi q$ for some $q\in\Bbb Z$.   I'm fairly sure one can prove this without using algebraic topology/path lifting. The idea is that $g$ measures the "signed distance along $S^1$" that the image of $f$ travels (at least on $[0,2\pi]$). One then extends $g$ to $\Bbb R$ by setting $g(t+2\pi)=g(t)+2\pi q$. I don't know how to measure that in a smooth manner (I can't even get it to be continuous).   Is there an elementary proof of this?

Let $f\colon S^1\to S^1$ be any smooth map. Prove that there exists a smooth map $g\colon\mathbb{R}\to\mathbb{R}$ such that $f(\cos(t),\sin(t))=(\cos(g(t)),\sin(g(t)))$ and satisfying $g(2π)=g(0)+2\pi q$.  The book told me to show that $g(2\pi)=g(0)+2\pi q$, then extend $g(t+2\pi) =g(t)+2\pi q$.  But I don't understand what they mean. How can I get function $g$ from $f(\cos(t),\sin(t))=(\cos(g(t)),\sin(g(t)))$, and what is $g$?


How can I do this? I'm using a Samsung Galaxy Ace  I've tried this method  I confirmed that it was indeed set to 2. But it wouldnt work.  Then I rooted my phone, installed an app with which I could modify the default installation path, but it also wouldnt work.   What can I do?

I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually.  Thanks


I am having an issue that I can't work out. Another set of eyes on it would be handy. I have already looked at this question  and , I have checked to make sure I am doing as they say and I believe I am as the text input exists in the xml with the correct id, and I can see the declaration of the object, and there is no spelling mistake. I even get the smart popups giving me options when I place the .  I have checked over my code and it seems right to me. I am creating the variable and passing it an element that exists on the view it is referencing. Below is my code. As you can see I am creating an edit text object that has the value of the text input element -- that line seems to run, then it errors on the next line saying that getText() cannot be called on a null object reference. I am entering text before pressing the click so it should not be null. The click is happening in a fragment; I don't see that being the issue but I could be wrong.  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     // Inflate the layout for this fragment     final View view = inflater.inflate(R.layout.fragment_ping, container, false);     Button pingButton = (Button) view.findViewById(R.id.pingButton);     pingButton.setOnClickListener(this);      return view; }  public void onClick(View v) {     switch(v.getId()) {         case R.id.pingButton:             EditText text = (EditText) v.findViewById(R.id.editText);             String value = text.getText().toString();             String s = ping(value);             TextView result = (TextView) v.findViewById(R.id.textView);             result.setText(s);             break;     } }   I am at a bit of a loss with this now. I can't see why it is happening. What can I do to resolve this?  Traceback:  01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime: FATAL EXCEPTION: main 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime: Process: uk.aperture.pinger, PID: 10966 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at uk.aperture.pinger.Ping.onClick(Ping.java:112) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.view.View.performClick(View.java:5198) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.view.View$PerformClick.run(View.java:21147) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 01-05 12:35:49.323 10966-10966/uk.aperture.pinger E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)   EDIT:  For some reason this question has been marked as duplicate -- which it is not -- and then IMHO erroneously closed. This question is perfectly valid; you can see that I have both an assignment and accessing of the assignment. I believe I am passing the whole view through as shown in the extended code I posted.

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?


Is it possible to obtain a list of the user-supplied functions (functions which are not Matlab toolbox functions) called by a  Matlab script?

In order to distribute a function I've written that depends on other functions I've written that have their own dependencies and so on without distributing every m-file I have ever written, I need to figure out what the full list of dependencies is for a given m-file. Is there a built-in/freely downloadable way to do this?  Specifically I am interested in solutions for MATLAB 7.4.0 (R2007a), but if there is a different way to do it in older versions, by all means please add them here.


I i just bought a new dynabook with windows 10 installed on it. I achieved to install Ubuntu 19 alongside windows 10, but after it it's impossible to boot into ubuntu. I tried changing in the bios were ubuntu appears in the boot order, but it keeps booting into windows. I've also executed the bcdedit command in windows and still grub is not appearing. Any help would be appreciated, maybe it's already solved this problem, but i didn't find a solution yet :( Edit based on additional information provided as answer: I'm attaching here some screenshots asked above for further help. My computer is a Dynabook Tecra X40-F-140. I also notice that list partition is not detecting Ubuntu's partition. I created a 600 GB partition and a 1 GB swap space in the missing space (it is a 1TB HDD), the partitions created would be between partition 3 and partition 4. Boot options:  Current HDD boot options:  list partition output:  Thanks in advance!

I installed Ubuntu on a Dell XPS 13 laptop that had Windows 10 preinstalled on it. I installed it from a USB flash drive on a partition. When I boot my computer I can only boot into Windows 10 and Ubuntu is nowhere to be seen.  If I boot into my USB then I can see that Ubuntu is installed, but I can't get to it from the BIOS boot menu.


In my HP Laptop, I use both password and fingerprint for login. Unfortunalely i did not use my laptop long while. now I forgot my password. still i can able to access my system using my fingureprint.   The issue is some times the fingureprint not working properly. Now I forced to reset my password or recover my old password. Even I prefere to recover my old password. Any one help me here please?  I use Windows7 64 bit.  Thanks in Advance.

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


I want to add more than 20 digits in an Excel cell. The current format of the cell is general, and it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits, it gets converted to 0's.  What are the steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?  Example: 12345678901234567890    Excel converts it to 1.23457E+19 in general format.  Excel converts it to 12345678901234500000 in number & accounting format.

I want to add more than 20 digits in an Excel cell.  The current format of the cell is general, it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits it gets converted to 0's.  What are the recommended steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?     Example: 12345678901234567890   Excel converts it to 1.23457E+19 in general format.  Without using ' before the value, is there any other way to keep value same?


I'm trying to make an armorstand have the same rotation as the player. I've done this with storing the data Rotation[0], but you should be able to do it with data merge right?  I tried /data modify entity @e[tag=Armorstand,limit=1] {} merge from entity @p Rotation[0] but it doesn't work. Anyone know what I am doing wrong?   I couldn't get any info on the minecraft wiki about sourcepaths. I'm assuming the sourcepath is different from the one you use when using data get since /data modify entity @e[tag=Armorstand,limit=1] {} merge from entity @p Rotation[0] works if I remove "Rotation[0]", but then the armorstand gets all the data from the player and I only want the rotation.   Thanks for any help

Okay, so I've been searching all over the internet for an explanation of data modify ever since I heard Sethbling passively mention it in one of his videos. The only  thing I could find on it was the wiki and the update log for the 1.14 snapshot. So, I checked these, and they hardly explained it at all. I can get /data modify block 123 20 123... and that's as far as I get.  Minecraft wiki does not at all define clearly what  is (the thing meant to go after coords), nor does it specify what each operation does to what. Operations include (without explanation, and excluding set (which it does explain)): append, insert, merge, and prepend. Then, it has from|value as the next option, which aren't explained either. After this, it just has block/entity and coords/id. So, I know the format (mostly), but I haven't the slightest idea what any of it means. And nothing I've seen on the internet even mentions the command save for Minecraft wiki itself.  Please explain if you know what data modify is. Thanks!


Imagination can't be counted. But I have seen some people using the indefinite article in front of imagination.  For example, "Everyone has an imagination."  What makes that correct, grammatically?

I'm getting confused about these two sentences:        The government should provide education to its citizens.   She has received a great education since high school.      I think education is an uncountable noun.  Why does the second sentence use the article a before education?   It might be a stupid question, but I really want to understand this topic clearly. I looked on many websites but there was no related answer to this.


The  is often said to be about $60\,\mathrm{Hz}$ for humans, meaning that humans tend to perceive cycling events happening faster than 60-times-per-second as a blur rather than as a discrete set of motions.  Obviously light bulbs tend to have a flicker rate faster than $60\,\mathrm{Hz}$ such that they don't look like strobe lights to humans, though I'm concerned about the comfort of other animals, e.g. falcons, who may have a faster flicker fusion threshold than humans.  Question:  For the layperson who knows nothing of this beyond the basic light spectrum, how would I find out the flicker rate of different kinds of light bulbs?

What waveform does the light coming off different types of artificial light sources have and (of course) what are the underlying physical reason for them?    I was inspired to ask this question because of several things I have been hearing lately.  Firstly, there was a recent TED talk about how .  Researchers have been working on the problem for a little while now and they've made a fairly impressive product, but it was only recently made possible by the LED technology, which has such a fast response that it can easily compare to the transfer rates of electric information condiuits that we normally use.  My understanding is that incandescent bulbs flicker because they have 60 Hz AC power being pulsed through them.  In fact, I think 60 Hz was chosen in the first place because it was a threshold that was unnoticeable to humans.  Looking at a  demonstrates that it has a very significant lag time responding to both the normal electrical phasor and being turned off.  In other words, it flickers but it doesn't go dark at any point in the AC waveform.  Looking for more information, however, I was a little disappointed, since nothing seemed to give a graph of lumens emitted over time for all different kinds of bulbs.  Of course, there isn't just one relevant time scale.  A light could flicker with 60 Hz and also flicker with 2000 Hz (I just made that up).  I'm interested in the complete picture of what lights exhibit what patterns.


I am going to install Ubuntu on my laptop/desktop, but I am already using another OS on my computer. After that how can I remove Ubuntu permanently from my computer and still keep my old operating system and data?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have a machine with two hard drives. One hard drive is dual-boot, and has both Ubuntu 14.04 and Windows 10 installed. The other hard drive is reserved for storage. Until recently, this storage hard drive was accessible from both the Windows and Ubuntu partitions. To do this in Ubuntu, I would open Nautilus and then on the left, there are three items under Devices, which are: 250 GB Volume, Storage, and Computer. Clicking on Storage used to give me access to this second hard drive.  However, for some unknown reason, recently I have been receiving the following error message when I try to click on Storage:  Unable to access “Storage”  Error mounting /dev/sdb5 at /media/karnivaurus/Storage: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdb5" "/media/karnivaurus/Storage"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sdb5': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   Please could somebody explain this message to me? I have tried booting into Windows and shutting down fully as suggested, but this did not help.  Thank you.

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I know that the speed of light, the universal constant of gravitation and the Planck's constant are considered to be the three fundamental constants of the universe. But, why is speed of light considered as a fundamental constant? The speed of light changes from medium to medium for satisfying Fermat's principle then, how can it be a constant?

Does it make sense to say, "The speed of light varies?"  Some may say right off the bat "Yes, it changes as a wave passes through a different medium."  However, I'd like to say no, because when I hear someone say the speed of light, I always think of the constant $c$ (unless the medium is specified to not be a vacuum, but then it isn't $c$ anymore), not the speed of a particular wave.  To me, it makes more sense to say something like, "The speed of a particular wave varies." What is the correct way to state this in the professional world? And in general, when professional physicists say "the speed of light," are they referring to the constant or the actual speed of the wave?


I create a chart with many (actually 10) lines in different colors (see example). I want to make it as easy as possible to differentiate the different lines.    Some possibilities I have in mind:   Take most different colors Avoid light colors (e.g. yellow - on prints the line are hard to see) Use patterns (dashed, dotted, different dash pattern)  Use different thickness (I don't believe this is a good idea)   Are there best practices, rules or guides for this task?  My example code:  \documentclass[border=5mm] {standalone} \usepackage{pgfplots, pgfplotstable} \begin{document} \pgfplotstableread[col sep=&, header=true]{ description&A&B&C&D&E&F&G&H&I&K 2009&46&0&33&3&0&74&3&7&2&7 2010&35&0&22&1&0&90&2&5&3&3 2011&38&0&33&3&1&77&1&9&2&8 2012&25&0&15&0&4&55&4&5&0&1 2013&18&0&8&0&0&46&5&4&0&3 2014&37&0&54&1&3&54&5&12&10&2 2015&29&0&63&8&1&77&0&8&7&5 }\datatableentry \begin{tikzpicture} \begin{axis}[   title={My Chart},   enlarge y limits ={value=0.2,upper},   xtick=data,   xticklabels ={2009,2010,2011,2012,2013,2014,2015},     x tick label style={rotate=-45,anchor=west,font=\tiny},   legend style={font=\tiny,legend pos=north west,legend cell align=left}, ] \addlegendentry{A}; \addplot [color=blue] table [y=A, x expr=\coordindex] {\datatableentry}; \addlegendentry{B}; \addplot [color=cyan] table [y=B, x expr=\coordindex] {\datatableentry}; \addlegendentry{C}; \addplot [color=gray] table [y=C, x expr=\coordindex] {\datatableentry}; \addlegendentry{D}; \addplot [color=yellow] table [y=D, x expr=\coordindex] {\datatableentry}; \addlegendentry{E}; \addplot [color=green] table [y=E, x expr=\coordindex] {\datatableentry}; \addlegendentry{F}; \addplot [color=lime] table [y=F, x expr=\coordindex] {\datatableentry}; \addlegendentry{G}; \addplot [color=black,loosely dashed] table [y=G, x expr=\coordindex] {\datatableentry}; \addlegendentry{H}; \addplot [color=red,densely dashed] table [y=H, x expr=\coordindex] {\datatableentry}; \addlegendentry{I}; \addplot [color=blue,dotted] table [y=I, x expr=\coordindex] {\datatableentry}; \addlegendentry{K}; \addplot [color=cyan,dashed] table [y=K, x expr=\coordindex] {\datatableentry}; \end{axis} \end{tikzpicture} \end{document}   Disclaimer: I'm not sure if this question belongs to . The main problem is a design question, but the solution is needed in Tikz.

Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the Economist and on the right my attempt).      Here is the code:  \documentclass[justified]{tufte-book} \usepackage{pgfplots,lipsum} \pgfplotsset{compat=newest} \begin{document} \section{Bar Charts}  \lipsum[1-2]\vfill   \begin{figure*}[htbp]   \fbox{  \begin{tikzpicture}   \centering   \begin{axis}[         ybar,           title={Cumulative Progress of Works},         height=8cm,         width=15.5cm,         bar width=0.4cm,         ymajorgrids, tick align=inside,         enlarge  y limits={value=.2,auto}, % see the upper          ymin=0,         ymax=100,         axis x line=bottom,          axis y line=right,         %enlarge x limits =e,         legend style={at={(0.5,-0.2)},         anchor=north,legend columns=-1},         ylabel={Percentage (\%)},         symbolic x coords={            Sep-11,Oct-11,Nov-11,Dec-11,            Jan-12,Feb-12,            Mar-12,           Apr-12},        xtick=data,        nodes near coords,        every node near coord/.append style={         anchor=mid west,         rotate=70       }     ]     \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 72.7961)        (Nov-11,94.4597)       (Dec-11,66.6786)        (Jan-12,67.5600)        (Feb-12,88.2339)       (Mar-12,78.6138)        (Apr-12,58.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };      \legend{First Fix,Second Fix,Third Fix}   \end{axis}   \end{tikzpicture} }  \caption{\protect\raggedright Cumulative progress for all MEP works. Notice the slower rate of production during the last three months.} \end{figure*}  \lipsum[1-3] \end{document}   I have moved the y-axis to the right, but cannot get rid of the axis line. The plot is also not fitting within the plot width, despite using \enlarge.   Edit  And thanks to Jake the ugly duckling has been transformed to the following, with minor variations to the code as suggested by Jake. I have only added a stronger color for one of the bars in order to highlight it:


So I have a class A and there are multiple classes that extend from class A. I create an instance of this class, is there a way to get all the other classes that extend A?  Something like:  A a = new A(); a.getAllSubclasses();   Only way I tought of doing this is scanning the entire project for all the classes and storing them in a list and then checking manuall if each class extends from A with instanceOf.  List<Class> classList; classList.each{     if(it instanceOf a)         //do stuff }   This seems bad especially for a huge project with hundred of classes.

How does one go about and try to find all subclasses of a given class (or all implementors of a given interface) in Java? As of now, I have a method to do this, but I find it quite inefficient (to say the least). The method is:    Get a list of all class names that exist on the class path Load each class and test to see if it is a subclass or implementor of the desired class or interface   In Eclipse, there is a nice feature called the Type Hierarchy that manages to show this quite efficiently. How does one go about and do it programmatically?


Before I just wrote \usepackage{name} and the package with the according name downloaded successfully.   Now that I need to download cyrtimes package, it fails. I use TexWorks editor running on Windows 7.  Could you give me any hint please?

I'm new to LaTeX, investigating using it for some work projects.  I'm using MiKTeX on Windows.  My employer's locked-down network blocks the application's automatic installation function.  I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.  I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them.  How can I do a manual package installation?


I want to loop throgh all the column of all the tables available in my database to check which column containts string "Kroki Homes".   I have approx. 56 tables in my database. So it is hard to check in all the columns of these 56 tables. is there any easy way to achieve this in sql server?

Given a number, how do I discover in what table and column it could be found within? I don't care if it's fast, it just needs to work.


FileProvider.getUriForFile is returning a nullobject reference and I have no idea why. This worked before. The following error is what I get. I also added my code below the error.  Process: com.example.joche.mywarranty, PID: 2522                                                                         java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference                                                                             at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:584)                                                                             at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:558)                                                                             at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:400)                                                                             at com.example.joche.mywarranty.InputScreen$2.onClick(InputScreen.java:74)                                                                             at android.view.View.performClick(View.java:5610)                                                                             at android.view.View$PerformClick.run(View.java:22265)                                                                             at android.os.Handler.handleCallback(Handler.java:751)                                                                             at android.os.Handler.dispatchMessage(Handler.java:95)                                                                             at android.os.Looper.loop(Looper.java:154)                                                                             at android.app.ActivityThread.main(ActivityThread.java:6077)                                                                             at java.lang.reflect.Method.invoke(Native Method)                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)   Code:  imageUri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".my.package.inputName.provider", new File(fileinputName));   AndroidManifest.xml file:  <provider         android:name=".GenericFileProvider"         android:authorities="${applicationId}.my.package.name.provider"         android:exported="false"         android:grantUriPermissions="true">         <meta-data             android:name="android.support.FILE_PROVIDER_PATHS"             android:resource="@xml/provider_paths"/>     </provider>   And ofcours the xml file with the path:  <?xml version="1.0" encoding="utf-8"?><paths xmlns:android="http://schemas.android.com/apk/res/android"> <external-path name="my_images" path="."/></paths>

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?