Blender fills the screen but the text is all tiny. Too small to read with any ease at all.  Any thoughts or suggestions?

The Blender UI elements are incredibly small by default on high resolution screens on Windows (15" UHD screen).  I found the Preferences -> System -> DPI setting which can be set up to 144.  This makes Blender usable, but still uncomfortable and difficult on the eyes.  Is there a way to make the UI elements even larger?


me and my friend wants to play Minecraft together on my or her world but we don't know how, we live in different buildings and she cant come over, she has a ps4 with Minecraft and i play Minecraft on a pc.

I would like to create a minecraft server for me and and my boyfriend to play on.  How do I set it up? Do I need any additional software? Do you have some links to walkthroughs or tutorials?  I have tried to set this up a few times but have failed every time.


My client wants a map of bus routes rendered as white lines with blue casing.  I'm using QGIS 2.8.2 on Mac OSX 10.10.5.  I found a .kml dataset here: .  I also tried using the .shp.  When I add the layer to the map and apply a cased line styling, some of the routes render as nice unified lines and others render as segmented, like earthworms:    I could easily cheat and render a duplicate layer (featuring only the thin white lines) on top of this one.   Why do the lines render in different ways?    Is there a way to render them all as unified?

I am new to GIS and I am using QGIS 1.7.3 on Windows.  Can any one tell me how to display a map from line shapefile with these two characteristics:   Roads are displayed with borders at the sides and intersect at crossroads Name label for long roads are duplicated at specified intervals   Here is the link to an image that illustrates my idea:    (The map was taken from underdark's blog)  This is the best I can achieve by drawing lines with two overlapping simple line, one slightly bigger than the other:


Update Thiings are looking so much better right now. Thank you.  Right now, by looking at the tin (my connection sucks and I can't open every one)   -- list of X  -- poll  -- poll(ish) / religious war  -- okayish, driven up by the barrel roll internet phenomenon?  -- poll  -- poll  -- looks fine on the tin  -- list of X  -- religious war  -- sounds like a question I'd love to read the answer for!  Well, the overall effect is horrible. The guys on chat inform me that "Hidden Features of Google" is closed, locked, caged, drowned, teared apart, etc., and yet is right now the network's business card to new users, advertisers and venture capitalists... Yuck. The hotness ranking may be accurate and good at measuring hotness (still, why are closed questions listed at all?!), but it's failing to bring up the quality, expert questions StackExchange is all about.

Right now  is fairly broken -- it's a simple descending sort by views. As Joel said , it is "a self-fulfilling prophecy." But this is not intentional, it's only because we haven't had time to improve it yet! As I sit down to write a better algorithm, I thought you guys might have some insight into what would make a good formula to determine the "hot" questions -- over the last 24 hours, the last week, the last month, and all time. Here are the variables we have to work with:  Votes [aka Score] Views Answers Answer Votes [aka Score] Whether the question has an accepted answer or not Time question was originally asked Time of last activity on question Reputation of asker Reputation(s) of answerers  Joel cited the reddit formula as an example, but I think our site is a little different than just a basic link submission site. Plus, we have more variables and data to work with. I found a  describing a few formulas: Y Combinator Hacker News  (p - 1) / (t + 2)^1.5 p = votes (points) from users t = time since submission in hours  Reddit  t = (time of entry post) - (Dec 8, 2005) x = upvotes - downvotes y = {1 if x > 0, 0 if x = 0, -1 if x < 0) z = {1 if x < 0, otherwise x} log(z) + (y * t)/45000  Thoughts? Ideas? I don't want to overthink this; I just want the "hot" questions to be relevant and useful to us. So the simpler the algorithm the better! Based on my analysis of the above and the comments so far, here's the second version of what I have implemented so far. This might suck. I don't know:  (log(Qviews)*4) + ((Qanswers * Qscore)/5) + sum(Ascores) -------------------------------------------------------- ((QageInHours+1) - ((QageInHours - Qupdated)/2)) ^ 1.5  Note that accepted answers weight not at all in hotness. This is intentional, as I feel accepted answers are a fine social contract, but not a good data point for question or answer quality. This algorithm will heavily favor questions with LOTS of answers, as the sum(Ascores) are now included -- one assumes if there are lots of answers, there will be a lot more voting on the answers, too. Update: Note that this formula is what is used on the  linked from the homepage of each site. It is not the formula used to determine the  list. See .


Mathematical structure of classical mechanic is described by symplectic geometry which is a smooth manifold with a non-degenrate closed 2-form $\omega$. I understand the requirement that $\omega$ should be non-degenrate and conservation of energy along flow lines implies $\omega$ to be a 2-form. are not these conditions enough to deal with classical mechanics? What is the physical (not mathematical) motivation for symplectic form to be closed?

Why do we want the 2-form $\omega $ to be closed? What if it is not?


How can I make sure that in the output .pdf file the layout width is adapted automatically, without having to do it manually? Here is what my document looks like when it is opened   I know I should paste the source code, but since there are about 700 lines, I report only about the geometry package      \usepackage[a4paper,                 bindingoffset=0.2in,                 left=1in,                 right=1in,                 top=1in,                 bottom=1in,                 footskip=.25in]    {geometry}

When I open PDF file generated from .tex files in Adobe Reader I obtain 200% view and I'd like it to have much smaller? Are there some settings for my .tex files allowing to do that?


I have been work around a new desktop (with 3 months of use) which has been freezng and crashing multiple times.   In the first 2 months I used the Ubuntu 16.04, and multiple times I have crash with the firefox browser and in java using Pycharm IDE.   One week ago I change to Ubuntu 18.04 (by a erase, repartitioning and reinstall). It have been show the same problem of frozen when I'm use the firefox or brave browser.  I don't know what I can do to find the problem. Maybe is my pci wifi adapter or not (sincerely I don't know what is happing).  In attached is the last crash (occurred at 21hs in Brazil time in 25/06/2018).  Any help I will save my life (I work at computer to finish my phd thesis, in a hurry...).      ################################### Running tests over the disks   Running a SMART test: Apparently there is no problem at the filesystem disk.    Running the SMART test in the data disk 1.     Running the SMART test for the disk 2.     Runnning the SMART test in the backup disk.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


Let $A$, $B$, $C$ be i.i.d uniform random variables on $(0,1)$.      What is the distribution of $(AB)^C$?   What is a good way to go about answering a question like this?  Trying to find the CDF of this distribution and then differentiating to find the PDF doesn't seem to be a particularly nice way to go about this problem.  Instead I have been trying to use  change of variables method (). In particular:  Let $X = A$, $Y = B$, $Z = (AB)^C$.  (So the inverse transformation is $A = X$, $B = Y$, $C = \frac{\log(Z)}{\log(XY)}$.)  Then, the joint probability distribution of $X$, $Y$, $Z$ is given by:  \begin{align} f_{X,Y,Z}(x,y,z) & = f_{A,B,C}(a(x),b(y),z(x,y,z))\cdot|\frac{\partial (a,b,c)}{\partial (x,y,z)}| \\ & = |\frac{\partial (a,b,c)}{\partial (x,y,z)}| \\ & = \frac{-1}{z \cdot \log(xy)} \\ \end{align}  In order to find the distribution of $Z$, I would now need to integrate this w.r.t x and y over $[0,\frac{z}{y}]\times[0,1]$:  $$f_Z(z) = \int_0^1 \int_0^{\frac{z}{y}} \frac{-1}{z \cdot \log(xy)} \,dx  \,dy \,\,\,\,\,\,\,\, (\text{for} \, z \in (0,1))$$  This is not easy (i.e. I don't know how to do this - maybe I am missing a trick as it is a (improper) definite integral?).  The issue seems to be: either I am going about this question in the wrong way, or, I am using the wrong change of variables. Indeed, since finding the distribution of Z using the change of variables method only involves integrating the Jacobian, using a different, more clever set of new variables may lead to a much nicer integral - I just have not been able to find such a set of variables.  Any help would be much appreciated.    Edit: In light of the comment below that the distribution of $(AB)^C$ is just $U[0,1$, it seems that a good way to go forward is to consider the MGF. (This did not originally seem like a particularly good option as I had guessed that the distribution would be somewhat esoteric, rather than a ‘known’ one.)    Note: Wolfram Alpha  that the integral of $\frac{-1}{\log(xy)}$ over $[0,1]^2$, for example is 1 - am I missing something obvious here?

$X,Y$ and $Z$ are independent uniformly distributed on $[0,1]$  How is random variable $(XY)^Z$ distributed?  I had an idea to logarithm this and use convolution integral for the sum, but I'm not sure it's possible.


Which sentences are correct?        1- The cover of book is green.   2- The cover of the book is green.   3- A cover of book is green.   4- A cover of a book is green.      When should we use a or the?

How do I know whether to use the definite (the) or indefinite (a, an) article, and when to omit it altogether?


For example,  $1 + 2 + 3 + ... = -1/12$  or $2 + 4 + 8 + ... = -1$  What caused it to break? Are there some properties of real numbers that do this? Sorry if it's too vague because I was looking at group theory and there were things that didn't hold.  Another thing is why do some problems become ill-posed? For example, Wilkinson Polynomial, why do roots break by having too many multiplication of binomials?

I have been looking at divergent series on wikipedia and other sources and it seems people give finite "values" to specific ones. I understand that these values sometimes reflect the algebraic properties of the series in question, but do not actually represent what the series converges to, which is infinity. Why is it usefull to assign values to divergent series?  The only theory I could come up with, is this:  Say you have 2 divergent series, series' A and B, and you assign each a value,   Series ($A= \sum_{n=0}^\infty a_n$), which I assigned the value Q  and series ($B= \sum_{n=0}^\infty b_n$ ), which I assigned the value P  But it just so happens that series $C=A-B= \sum_{n=0}^\infty (a_n-b_n)$ converges. Could that imply that the actual value of series $C$ is the difference of the two assigned values to $A$ and $B$, that is $\sum_{n=0}^\infty (a_n-b_n)=Q-P$ ?  If so, then that would make some sense to me, as to why people sometimes assign values to divergent series.


$\int_{-2}^{2} \frac{x^2}{1+5^x}dx$  I am stuck at the first step and have tried replacing $5^x$ with $e^{\ln(5^x)}$ but nothing simplifies out in the end.   Any hints how I should proceed?

$$\int^2_{-2}\frac{x^2}{1+5^x}$$  How do I start to integrate this?  I know the basics and tried substituting $5^x$ by $u$ where by changing the base of logarithm I get $\frac{\ln(u)}{\ln 5}=x$, but I got stuck.  Any hints would suffice preferably in the original question and not after my substitution.  (And also using the basic definite integrals property.)  Now I know only basic integration, that is restricted to high school, so would prefer answer in terms of that level.


I have a Huffman Tree, and a character, and I want to return what that character's encoding within the Huffman Tree should be.  I've implemented it using the breadth-first traversal method, and each time I'm checking the left and right tree, I'm checking if the tree's data is equal to character I'm looking for. Each time I go right or left, though, I add 0 or 1 to the encoding so far. Eventually, when I find the character equal to the tree's data, I return that tree's encoding value.  Code:      public static String findCharEncoding(BinaryTree<CharProfile> bTree, char character) {         Queue<BinaryTree<CharProfile>> treeQueue = new LinkedList<BinaryTree<CharProfile>>();          // Create a TreeWithEncoding object from the given arguments and add it to the queue         treeQueue.add(bTree);          while (!treeQueue.isEmpty()) {             BinaryTree<CharProfile> t = treeQueue.remove();  ->          if (t.getLeft().getData().getCharacter() == character) {                 return t.getLeft().getData().getEncoding();             }             if (t.getLeft() != null) {                 t.getLeft().getData().setEncoding(t.getLeft().getData().getEncoding() + "0");                 treeQueue.add(t.getLeft());             }              if (t.getRight().getData().getCharacter() == character) {                 return t.getRight().getData().getEncoding();             }             if (t.getRight() != null) {                 t.getRight().getData().setEncoding(t.getRight().getData().getEncoding() + "1");                 treeQueue.add(t.getRight());             }         }          // If it gets to here, the while loop was unsuccessful in finding the encoding         System.out.println("Unable to find.");         return "-1";     }   Which I've implemented as follows:          for (int i = 0; i < charOccurrences.size(); i++) {             char character = charOccurrences.get(i).getCharacter();              charOccurrences.get(i).setEncoding(findCharEncoding(huffmanTree, character));             System.out.println(charOccurrences.get(i).getEncoding());         }   CharProfile is a custom class that holds the character value, the probability of the character and the encoding.  It keeps returning a NullPointerExceptionError at the line if (t.getLeft().getData().getCharacter() == character) {, which I've indicated with an arrow. I've tried and tried, but I can't seem to figure out why.

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 doing subtitles for some videos on Youtube. I heard the words either and neither spoken in two different ways by the same person. Written it could be:      ee-ther versus i-ther or n-ee-ther versus n-i-ther   Is there a rule for which pronunciation to use? Or is it just a matter of birth/taste/location?

There are two common pronunciations of "either": British /ˈaɪðər/ and American /ˈiːðər/. If Americans are more or less consistent in this regard, then the Brits seem to be freely using both. In fact, from what I can tell, "either this or that" is more often in the first form, whereas "me either" is in the second. But I may be wrong. Is there any kind of an informal rule in the modern British English with regard to this?


There exists (glorious) users on various StackExchange sites with more than 1000 badges. This makes the formatting of the user profile at the bottom of questions/answers a little odd, as the badge information overflows to the next line.        Would it make sense to summarize badge counts larger than 1000 in a similar way to reputation? Using the above screenshot as an example, the users's badge count would instead be:  * 109  * 1k  * 1k  This is a nitpick and low priority, but maybe it would make a good on-boarding task for a new hire?

Recently, this started happening:        Shog9 has an immense amount of badges, so many that the number creates a linebreak in the usercard, resulting in weird space below the usercard of the post's author. It also happens when a well-decorated user is the post's author; then the box is just extra tall:        I first noticed it when looking at "." The problem also appears on Stack Overflow:        I'm using Google Chrome 47.0.2526.73 on Windows 8.1 at 1920x1080 at the default zoom level.  Updated 12/26/2015: This is not fixed. It was, momentarily, fixed on Meta Stack Exchange (but not for Jon Skeet's usercard on Stack Overflow), but now the problem is happening again, even at the page I linked above.  After Winter Bash ended (tested 1/5/2016): It's still happening, both here and .  Related, maybe:  Related, definitely, but not a duplicate:


How can i check if input date is Today, Yesterday or just return the date if it's noone of them? I was trying to do the following:       const checkDate = (someDate) => {       const today = new Date();       let date = new Date(someDate);       today.setHours(0);       today.setMinutes(0);       today.setSeconds(0);       return date.getTime() === today.getTime() ? "Oggi" : date.getTime() === today.setDay(-1) ? "Ieri" : "Il" + date;     }          console.log(checkDate("December 17, 1995 03:24:00"));    Where "Oggi" is Today and "Ieri" is Yesterday..

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


I'm new and need help. When I try to render an animation or image, this screen is all I get. I've followed a bunch of other posts on how to fix it and nothing, I'm using Cycles Render. I don't know what other info to add, I've never done this and it's as simple as my animations won't render and pause like that in the picture every time. That's all I know, this is my first animation ever and I don't know what I did.

So I'm at that step where I am finally ready to Render my first big project. Aaaaaand it's been stuck on the first 4 tiles for the last 2 hours?   I am using a MacBook Pro Processor: 2.5 GHz Intel Core i5 Memory: 4 GB 1600 MHz DDR3 Graphics: intel HD Graphics 4000 1024 MB  (I include these because I have no idea what affects a computers ability to render but I assume it's one of them, most liekly the graphics card).  So anyways here are the pictures, as you can see I played with changing the resolution, the sample size and the max steps to see if I got different results but it just keeps getting stuck at those 1st four tiles. I've rendered a few other small projects successfully but this was my first time changing some values. I assume i've managed to accidentally change the wrong values and thats causing some conflict thats either stopping the render itself or is making it just too much for my computer.  My goal was the render this particular picture at a good enough resolution and clarity that it could then be made into a poster. So i wanted the resolution to be good and the sampling to be high.       Since writing this there has been no change to any of the numbers at the top of the render result (the time left, etc)


I need to solve  $$\int\frac{1}{\sqrt{x^2+1}}$$  but I'm nowhere near the solution. I tried substituting   $u = x^2 + 1$   such that $dx = \frac{1}{2x}$ yielding $$\int u^{-1/2} du = \frac{1}{2x}\frac{u^{1/2}}{1/2}=\frac{\sqrt{u}}{x} =\frac{\sqrt{x^2+1}}{x}$$  but this is nothing near the solution of  $$\int\frac{1}{\sqrt{x^2+1}} = ln|\sqrt{x^2+1}+x|+C$$

How you integrate $\frac{1}{\sqrt{1+x^2}}$ using following substitution? $1+x^2=t$ $\Rightarrow$ $x=\sqrt{t-1} \Rightarrow dx = \frac{dt}{2\sqrt{t-1}}dt$... Now I'm stuck. I don't know how to proceed using substitution rule.


I tried with the following class :  public class EqualMethodTestWithNew {     public static void main(String[] args) {         String value = "xxx";         String name = new String("xxx") ;          System.out.println("hascode : value : "+value.hashCode());         System.out.println("hascode : name  : "+name.hashCode());          if (value == name) {             System.out.println("equal == 1");         } else {             System.out.println("false == 1");         }      } }   though the hasCode is same for the both variable it prints the false == 1. could some one explain the reason why?  thanks

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?


Hey everyone today my friend call me and he told me that 12.04LTS it will be support for 3 years is that correct ? because i think it will be supported for 5 years, i am not sure but i heard from different person told me that 12.04 will be supported for 5 , so please someone tell me 5 OR 3 years ? i am speaking about desktop NOT server version  thanks

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


Let's say a company did something, and I want to know why, where do I ask it? For example, I was going to ask this on Super User but I realized it was out of place:     Windows 10 was said to be free, but now they've taken into account that that's not true; as past July 29 2016 it will no longer be   that way.      So why did Microsoft do this? How would it help filling their wallets?   What was there goal in giving us a free year?       I mean, was their goal to get their OS popular and more famous with   the statistics as "The Most Used OS"? Or did they just be kind or   something?

On which Stack Exchange site can I ask questions like        When will [some new feature] for [some product] be released?   Where can I download an update for [some product]?   I'm getting errors when accessing the customer portal for [some company] – how can I fix this?   Why was I banned for doing [some action] on [some platform]?   Why is [some company] discontinuing [some product]?   Why is [some company] giving away [some product] for free?   What's the price for [some product]?      or any other product support/customer service questions?  It's not a product related to programming (or I've read  on Meta Stack Overflow) so I know Stack Overflow isn't the right place. Which other site in the network will take these kind of questions?


I need to understand what can we deduce from knowing that:  Let $G$ be a group, $H_1, H_2$ its subgroups and $N$ it's normal subgroup contained in both $H_1$ and $H_2$. Assume $H_1/N \cong H_2/N$  Can we really say that then $H_1 \cong H_2$? Or anything else related?

Let $G$ is a group and $N$ is normal in $G$ and $M_1$ and $M_2$ are  subgroups which contain $N$ such that $M_1/N= M_2/N$. Can we deduce that $M_1$ and $M_2$ are isomorphic?  Thank you for hints.


I want to build the  , but the following error appear after running the sell script ./linux_build  :      FAILED to find GTK+... CMake Error at   /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108   (message):   Could NOT find Lua51 (missing: LUA_LIBRARIES   LUA_INCLUDE_DIR) Call Stack (most recent call first):   /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315   (_FPHSA_FAILURE_MESSAGE)   /usr/share/cmake-2.8/Modules/FindLua51.cmake:76   (FIND_PACKAGE_HANDLE_STANDARD_ARGS)   cmake-modules/FindThirdPartyLua.cmake:9 (FIND_PACKAGE)   plugins/processing/stimulation/CMakeLists.txt:22 (INCLUDE)

I was wondering about generic installations of all applications in linux. And what that means? Well, when I was using windows I knew that if I want to install an application I am double-clicking the .exe file and then next,next,next.  In linux, I have understood that maybe there is a common (not generic) way to install any application. Installing from source maybe? Well is there any step by step method that can be used to install  application like in windows or not?  I am asking because I do not want to keep asking the google, how to? So, I have managed to install recently from source freecad from  and I think that it would be a very nice start as common method, right?  But the thing then is where to find the right source and when an application has a very unique method of installation!


Dumbledore explains to Harry in Order of the Phoenix that he is protected so long as he returns once a year to the Dursleys’ home:     While you can still call home the place where your mother's blood dwells, there you cannot be touched or harmed by Voldemort. He shed her blood, but it lives on in you and her sister. Her blood became your refuge. You need return there only once a year, but as long as you can still call it home, there he cannot hurt you.   If Voldemort, or one of his Death Eaters, had killed the Dursleys (perhaps while Harry was away from Hogwarts), then Privet Drive would not be “the place where your mother’s blood dwells”. There are no other relatives of his mother that he could stay with, which would mean that nowhere else would qualify for that magic.   Wouldn’t that mean that the following year, Harry would have nowhere to go and the protection would not renew, thus he would be vulnerable to Voldemort?

Voldemort couldn't kill Harry as long as he called the Dursleys home. Why didn't he just murder the Dursleys? This would prevent Harry from being able to live there.


Creature could be reproduced from a partial tissue It also attacked a dog to grow (it was either opening or closing of the movie) It also attacked a homeless person in a tunnel or something Then passed to multiple hosts, leaving old hosts in dead or vegetable states. Some kind of energy blaster was used to destroyed it but it was in todays earth The Creature was grosser than the Xenomorph alien but less capable The Creature was using living entities as living sources or energy sources or something and it was jumping to another host by a kiss(?) Maybe that wasn't a kiss but an exorcism-style projectile vomit? I really can't remember.  Something like a blend of 'The Thing' and 'Alien3'

I saw part of this movie back in the 80's or early 90's on late night cable TV. I remember the cops were chasing a bad guy, and the bad guy turned out to be possessed by some sort of creature.  This creature had the ability to move from host to host by crawling down their throats (sort of like the Edgar suit in Men in Black). It may have been a bug, or a slug. I think it was black.


I would like to prove the following equality: $$k^{\phi(l)} + l^{\phi(k)} \equiv1\pmod{lk}$$if $\gcd(l,k)=1$. What methods can I use? Thank you for your help.

If $p$ and $q$ are distinct primes , prove that $$p^{q-1}+q^{p-1} \equiv 1 \pmod {pq}$$     Using Fermat's Theorem we can get $$p^{q-1} \equiv 1 \pmod q, \qquad q^{p-1} \equiv 1 \pmod p.$$  After that I have no idea at all. Can anyone help me please


EDIT:  I was aware of the supposed duplicate.  But I'm interested in a clear and focused path through the basics to advanced theoretical physics such as string theory - a path that avoids studying engineering physics - for a pure mathematician with no physics background.  I can't see in the supposed duplicate where this path is outlined.  ...  I'm a pure mathematics PhD student in Riemannian geometry / geometric analysis.  My main interests are in Einstein manifolds, Ricci flow, harmonic maps, and Yang-Mills theory.    I have no training whatsoever in physics:  I've never even picked up the typical 1,500 page textbook titled Physics for Scientists and Engineers etc.  I've only ever read pure mathematics and can handle any level of pure mathematics to any level of abstraction.  I'd like to learn the background and basics in theoretical physics motivating the above areas of geometric analysis to develop physical intuition: general relativity, gauge field theories, and the standard model of particle physics, etc.  Ideally I also want to learn advanced theoretical physics such as quantum field theory, string theory, and sypersymmetry.  I'd like a structured path through basic to advanced theoretical physics for a mathematician with no physics training.  I have looked at many standard references in these areas but their assumptions on the physics background of the reader does not align with my background.  These standard references all start talking and explaining things in physics notation, terminology, concepts, and intuition that is assumed on the reader.  Question:  As a pure mathematician, how do I learn basic through to advanced theoretical physics in an clear, focused and structured way?  What books should I read?  Are there books tailored to a target audience like myself: a pure mathematician with no physics background?  If required, I'm happy to start from scratch by working through a 1,500 page physics textbooks.  However, after progressing through mathematics one realises that starting with working through the typical 1,500 page calculus textbook, such as Stewart Calculus, is unnecessary because those books are tailored to engineers.  Instead, one can start with a book on set theory, proof, and logic, and then go straight into standard undergraduate books like Rudin Principals of Mathematical Analysis and Herstein Topics in Algebra, etc.  Indeed, many universities offer a streamlined program of study for pure mathematics majors that avoids wasting time on engineering calculus.  Question:  Is it the same situation in physics?  Are those 1,500 page physics textbooks targeted mostly at engineers and is there a focused and streamlined path through theoretical physics that starts at the start of theoretical physics and gets to advanced theoretical physics such as quantum field theory and string theory without having to learn engineering physics?  I would be VERY grateful for someone to provide some book recommendations and possibly a structured path for achieving the above.

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


I need to subdivide a pre-existing mesh grid with different values for x & y (like I could in pre-2.8). Is this possible in 2.8? I have looked through the UI and searched online for a few hours...nothing so far.

The tutorial I read is based on 2.79. So I'm not sure if it's still the same name in 2.8. But I can't find anything providing similar functionalities.


Usually the way I do renames to make sense for myself is -   $ git clone <remote URL.git> $ mv remotedir nameIwant    I was wondering if there is a better way to do it.   The reason is sometimes I  wanna try some of the forks and wanna keep the main repo. as pristine and the forks also renamed from where they came from. I do know that in ~/.git/config of the repo you can get the remote path but its easier to remember this way.   Is there a better way to do that ?  I did searches on the web but couldn't find anything which helped me.

This is, how I download various master branches from GitHub, and I aim to have a prettier script (and maybe more reliable?).  wget -P ~/ https://github.com/user/repository/archive/master.zip unzip ~/master.zip mv ~/*-master ~/dir-name   Can this be shorten to one line somehow, maybe with tar and pipe?  Please address issues of downloading directly to the home directory ~/ and having a certain name for the directory (mv really needed?).


In the Half-Blood Prince, Draco Malfoy gained ownership of the Elder wand by disarming Dumbldore when he was holding the Elder wand.  Could someone have used Expelliarmus on Harry to take ownership of the wand, even if he didn’t have it on him? Because Draco Malfoy had ownership, and then Harry got ownership by stealing Draco's normal (original) wand.  Sorry if this is confusing.

At the very end of Deathly Hallows, after Harry repaired his own wand with the Elder Wand, he tells Dumbledore's Portrait in the office:     “I’m putting the Elder Wand,” he told Dumbledore, who was watching him with    enormous affection and admiration, “back where it came from. It can stay there. If I die a    natural death like Ignotus, its power will be broken, won’t it? The previous master will    never have been defeated. That’ll be the end of it.   Now, this seems incredibly foolish to me.  "The previous master will never have been defeated" would only have been assuredely true if Harry had died right after depositing the Elder Wand back into Dumbledore's Tomb.   If not, Harry (the Wand owner) would still be alive, and at the risk of being Disarmed (as was shown with Harry and Draco Malfoy, it doesn't matter if the Elder Wand's owner is defeated by death or simple disarming, AND it's not even required that the Disarming would involve the Elder Wand!).  So, if Harry merely put the Elder Wand back into the Tomb, and some years later, someone would disarm him (or, even worse, kill him) - then that someone would become the Elder Wand owner, either by accident or by design:    By accident - Harry is likely to get into plenty of magical duels in the future. Even discounting friendly one (teaching people the Expelliramus), he plans on becoming an Auror!  By design - plenty of people have been in the Great Hall hearing Harry explaining to Voldemort that he, Harry, was now the owner of the Elder Wand, so the fact of his ownership would most assuredly NOT remain a secret, inviting countless people tempted by owning the Deathstick to hunt Harry down. Oh, and the location is now also known!   So "its power will be broken" is quite unlikely to come true!  Is Harry hopelessly wrong? Or am I missing something in the above logic? Was this addressed in canon/JKR info?


Is it best practice to use the [Flags] ahead of all, even the simplest enum types like this in C# (VS 2015):  [Flags] public enum TValidation {     vUninitialized, vChecksumPass, vChecksumFail, vChecksumZero, vChecksumNone }     Am I clear such use I presented will always be ok with or without [Flags]? Or can it have some unintended side-effects?

From time to time I see an enum like the following:  [Flags] public enum Options  {     None    = 0,     Option1 = 1,     Option2 = 2,     Option3 = 4,     Option4 = 8 }   I don't understand what exactly the [Flags] attribute does.  Anyone have a good explanation or example they could post?


Dim namePriceQuery = From prod In products                      Select prod.Name, prod.Price   OR  Dim namePriceQuery = products.select(function(x) New With{ Key .newName =x.name _  , Key .newPrice= x.price})   To my knowledge the only difference is with with the second expression has the benefits of the  keyword. What exactly is the difference between the two?? And what scenarios would I choose to use one or the other in? What are the pros and cons of one vs the other?   I am assuming the C# syntax equivalent will work the same and should be used in similar before mention scenarios. Thank you very much!

LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code.  However, the fluent syntax seems to come much more natural to me than the query expression syntax.  var title = entries.Where(e => e.Approved)     .OrderBy(e => e.Rating).Select(e => e.Title)     .FirstOrDefault();  var query = (from e in entries              where e.Approved              orderby e.Rating              select e.Title).FirstOrDefault();   Is there any difference between the two or is there any particular benefit of one over other?


I have been trying to install ubuntu (I tried 12.04LTS, 12.10, 12.10-secure-remix) using the wubi installer on Windows 8 and all the three times ran into the same problem showing some cannot find /ubuntu/winboot/wubildr when I tried to start ubuntu.  I tried to change the boot settings from UEFI to Legacy and then my laptop restarted and showed that "No operating System Found".  I then tried to install Ubuntu using a cd and after a lot of effort and using boot repair,etc. I landed into a new trouble. When I select UEFI on, the laptop loads Windows and windows too does not detect ubuntu. When I select Legacy mode, it starts ubuntu, shows me an option to start windows 8 but gives an error showing windows failed to load.  So in legacy mode, i am able to use only ubuntu and in UEFI mode, I am able to use only Win8. Please explain any process of starting windows in legacy mode (which I tried without any success) or starting ubuntu in UEFI mode.

I have Windows 8 Release Customer Preview on my laptop. I tried to install Ubuntu on it with Ubuntu Windows installer (I have always used this to install, although that was on Windows 7), it installs and asks to reboot, then immediately Windows 8 boots up.  I do not have the option to choose what OS to boot. How can I boot to Ubuntu? VM is not exactly what I would like to use, but it is an option, however a last resort. Any help?


I am scheduled to apply for a UK visitor visa on 13 July and have stated that I plan to stay for the whole six months. I've decided to include a cover letter to explain the circumstances of my request. I'd appreciate it if you could provide feedback on the below text:

I'm married have a job with stable income.I have 2 kids. I have applied for UK visit visa about 7 years ago and was refused. I can't remember what exactly was the reason for refusal.  I want to travel for tourism to spend 9 days and my budget is around 1300GBP for the trip. I would be spending part of my annual leave in the UK. I have the following people in UK: Mother, Dad, Sister(she's married), Brother (married), Uncle and Aunt.  I'm travelling alone since my wife is pregnant. I haven't travelled since I was in school then.  I will be on my yearly 21 days annual leave during which I will be spending 9days in UK. I can't think of anything more about my circumstance.  So what should a cover letter look like?  secondly I have just 1 account where my salary is paid in monthly and my savings.I will be submitting the 6 months bank statement for the account.  Additional question:  In the income & expenditure where one is asked to indicate if I have income and savings,should I click Yes or No. And if Yes should state the ending balance as at the time of my application.


:     If a monster you control is destroyed by battle or card effect and sent to the Graveyard: You can Special Summon this card from your hand.   Opponent destroyed 1 monster I controlled on field, and I have 2 cards of  in hand, can I special summon both of them at once?

If one of my monsters is destroyed and I have two s in my hand, can I summon both of them from that one monster destruction (assuming I have space for both monsters)


I have two directories, dir1 and dir2 and I want to remove files in dir2 that do not have a corresponding pair in dir1.  The pair is defined by the first three fields of the filename prefix separated by an underscore.  For example:  dir1 contains:  U006_S2_pr_hrrre_1760-1790_fil.csv U006_S2_ta_hrrre_1760-1790_fil.csv   dir2 contains:  U006_S2_ep_prc4_1660-1790_fil.csv U006_S2_ep_prc8_1760-1899_fil.csv U006_S2_pr_prc8_1260-1090_fil.csv U006_S2_ta_prc4_1860-2790_fil.csv   I would want to get rid of   U006_S2_ep_prc4_1660-1790_fil.csv  U006_S2_ep_prc8_1760-1899_fil.csv   but keep the remaining files. There are thousands of files in each directory.  All files in dir1 have a corresponding pair in dir2, but dir2 has many extra files without corresponding pairs in dir1.

I'm running tests of a variable-size-and-contents test set. Data files are added and removed frequently. I'm looking for an automated way of gathering a file list.  All files are in subdirectories of D; I need the full directory and name added to a text file. However, I only need those files that have a "paired" file, which has the same filename but a different extension (so... different filename, but in a structured way). So, if there is a MyFileName.A and MyFileName.B, then I want D/.../MyFileName added to the file list.  There are .A files without .B files, but no .B files without .A files. If a .A has a .B file, then both files are in the same directory.   Any advice?


When an object displaces a fluid a force acts on the object which is equal to the mass of the fluid displaced by it (for the logic see  ). But the fact that a net (buoyant) force acts on it is due to the fact that there exists a pressure gradient (i.e., there is more pressure at the bottom than at the top).  Now consider the following:  Suppose that there is an object at the bottom of fluid and the object is placed such that there is no fluid beneath it (rather imagine an outward cylindrical projection from the bottom surface). Since the object has a volume therefore it displaces the fluid and a buoyant force must act on it in upward direction. But also consider the fact that there is no fluid beneath it to push upward (i.e., there is a net downward force).  So    Would a buoyant force still act if the object is placed at the bottom the fluid(without any gap for the fluid to enter)?

Let's say a 10N cube (in air, on Earth) rests flat on a scale at the bottom of a tank of water, and the scale reads 8N, so there is 2N of buoyant force on the cube.  How does the buoyant force manifest itself on the cube?  I assume the force is normal to the surface of the scale, but if there isn't any water under the cube, how does the water push up on the cube?


The main core of question is — I did not know what's the name of this type of string. I am getting output function strings in this format %D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82. I don't know what type of code is this. Tell me please how to convert it to Unicode in JavaScript. Actually this string is "Привет". Thank you.

How do you safely encode a URL using JavaScript such that it can be put into a GET string?  var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl;   I assume that you need to encode the myUrl variable on that second line?


We are working on an app which has functionality to perform a large number of record updates in a batch.  We would like to be able to programmatically disable all triggers at the start of the batch logic, execute the record updates, and then reactivate all triggers programmatically once the batch has finished.  Can anyone suggest a solution in terms of api calls we could make via apex (or a solution similar) to achieve this programmatically?  Answers to other issues that already exist or have been highlighted as duplicated point to the  file based method of the metadata api but I can't see how I achieve the above using this method. Would I have to do a metadata api file based retrieve of all trigger objects in the system, change the metadata xml for each to set the trigger as inactive, and then deploy all of the triggers again? (for an org that has a large number of triggers this would be a very significant operation)

How can we disable triggers, Validation Rules and workflow rules in salesforce org.  This becomes really needed and important when we are doing data migration(data imports) in salesforce.  The way I handled this is create a custom label and include it in workflow and validation rule logic.   example - Custom label 'Disable workflow' = True then do not fire workflows.            if its False then fire workflow  But wanted to understand if there is any more efficient way to handle these scenarios.


From Oersted experiment we know " When an electric current is passed through a conducting wire, a magnetic field is produced around it." An electric current is a flow of electric charge or electron. My question is "How does a flow of electron or electric charge create magnetic field?"

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


Let $A$ be an $n\times n$ matrix with real elements so that $I+A$ and $I-A$ are nonsingular and $B=(I−A)(I+A)^{−1}$ is orthogonal. Is $A$ skew symmetric?

$A$ is a real orthogonal matrix and $(I + A)$ is non-singular. Prove that $ (I+A)^{-1}(I-A)$ is a skew-symmetric matrix.  Attempt:  $[(I+A)^{-1}(I-A)]^t=(I-A)^t((I+A)^{-1})^t=(I-A)^t((I+A)^{t})^{-1}=(I-A^t)   ((I+A^t))^{-1}$   Please help me further.


I am a Indian Citizen and am going to Shanghai (China) via Macau and I am going to Macau through Hong Kong via ferry, then from Macau I will visit Shanghai (China). Is this possible with a  single-entry visa for China?

My friend holds an Indian passport and is travelling via Hong Kong to Zhuhai (China) on a single-entry Chinese visa.  Is it possible for him to travel to Macau from Zhuhai and back to China with the same visa, or if not what's the procedure?


I have tried using the blend tool and the envelope warp tool. but I don't think you are able to make the twisting line pattern line the first one below.   Any suggestions ?

I am trying to recreate the line swirl in our compliment slip in Adobe Illustrator? I have been struggling for hours with transforming straight lines, creating waves, rotating, etc. but still can't get there?     If anyone can help it would be greatly appreciated!  Anne


Is this option available somewhere? I have a lot of scanned data that has reorientation from landscape to portrait in Exif files, but not in jpeg data itself. And I can't use some file uploaders like Froala due to this issue, files are not correctly processed.   Link to froala issues:     So any ideas how to explicitly rotate the jpeg image data with some tools, anb better allowing the batch mode?

I know how to . Now I would like to automate that based on EXIF data. I already have exiftool installed, but looks like it can only read the data, but can not rotate the image.  There is . But I'm looking for possible solutions using OSX.


My display turns off when I lock the screen (with ctrl+alt+l). This is pretty anoying, because when I want to unlock immediately after that I need to wait like 3 seconds until my screen turns on.  When I lock my laptop I would like to see the lock screen, I don't need my display to turn off.  Please help me to turn this screensaver off or tell where I can find the source code to fix it :)

I lock my computer a lot, and was wondering if there was a way to get the lock screen when I hit Ctrl + Alt + L. Right now when I use that key combination it turns the screen black, and I have to hit a key or click to bring up the screen where it shows the option to enter your password or switch users, as well as displaying the desktop background behind it.   Is there anyway to avoid having to hit that extra key, to bring up the screen I want? And is there anyway to keep it that way? It's really a matter of personal preference, and I don't see any reason why not to have it stay that way as my monitor eventually is turned off and/or my computer suspended.


I have two (fully independent) measurements of the same quantity X. Each of them reports a measurement $X_{\sigma_L}^{\sigma_R}$, where $\sigma_L$ and $\sigma_R$ are the left and right uncertainties (asymmetric error bars).  In other words, if we call the measurements $A$ and $B$, and the subscripts $A$ and $B$ stand for the measurements, we have  $A_{\sigma_{L,A}}^{\sigma_{R,A}}$  $B_{\sigma_{L,B}}^{\sigma_{R,B}}$  Now, I need to calculate the difference between those measurements, $\Delta = A-B$. What will be $\sigma_{L,\Delta}$, $\sigma_{R,\Delta}$?  In other words, how do I propagate independent asymmetric error bars?

I red the Wikipedia  on error propagation. I get into some trouble when I want to calculate the error propagation in a specific case. I have real numbers $A$ and $B$ with related upper ($\Delta A_u$, $\Delta B_u$) and lower ($\Delta A_l$, $\Delta B_l$) uncertainties. I have two functions calculated as follows: $$F = \sqrt{A^2+B^2}$$ and  $$G = \tan^{-1}\frac{B}{A}$$ What are the related upper and lower errors of $F$ and $G$?  I found general formulae for Gaussian error distributions ($\Delta A_u = \Delta A_l$ and $\Delta B_u = \Delta B_l$), for instance the first formula of the first answer on . Is there a way to generalize that formula for arbitrary distributions with asymmetric errors as in my example?


Is work a medium to convert one form of energy to other? i.e. to say without work you can't convert type of energy?  Similar type of question pertains to heat.heat is also medium of conversion of energy?  can we say that if there is no heat change and work done then energy cant be converted from one form to other?  I am asking it from the perspective of First law of thermodynamics as it often confuses Please guide.

What exactly is ? My book confuses me:     a force can lift an object to a height h, or it can accelerate an object through gravity. In all these cases, a force displaces an object and change the object's total energy.   The examples it gives confuse me. On one hand, there is lifting and on, accelerating through gravity.   I can imagine how lifting will change total energy (kinetic + potential). It essentially gives it more potential energy, and does not take from it any kinetic energy. But just dropping an object and let gravity do the work does not seem to me to increase total energy. Because the total amounts of kinetic and potential energy should be equal.  If just let drop, the object will gain kinetic and lose some potential. Not really anything added to the total energy.


What tools do you use to check if your host/devices on your network are online in one glance. i have multiple companies with APs, servers and NAS. Of course I can ping one by one, but I'm sure you have a better one. I heard Nagios Core seem the solution, but it hell of overkill features.   Same question here asked by  but yet to be answered.   Newbie here.   Thank you in advance,

For a more comprehensive list of monitoring tools and their features, check out .   As the question states, what are the most commonly used tools used for this task and what are their strengths and weaknesses?


I've got a couple strings and I need to pull characters out that appear between double quotes. The problem is, I want to grab them in groups.  var str = 'FF\"J"A4"L"'; var results = str.match(/\"(.*)\"/);   This returns everything between the first and last double quote. In this case it returns J"A4"L but what I need it to return is J and L.  The content between quotes is pretty much any unicode character like letters and numbers including as }, =, and @.  Any ideas on how to complete this with regex?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I asked proving isomorphism between the next structures: $$M_1=<\left(2,\infty\right),\cdot>,\ M_2=<\left({\sqrt2}^{\sqrt2},\infty\right),\cdot>$$ I have tried to call a function: $H(x)=x^{\sqrt{\frac{1}{x}}}$, however, I don't know how to prove that for every real number in the range, there is a real number in the domain. Thanks for the help!

$M_2= \langle(\sqrt{2}^{\sqrt{2}},\infty),\cdot \rangle$ ,  $M_1 =  \langle(2,\infty),\cdot\rangle$ attempt: for all sign of function $f$ 1.$h(F^{M}(a_1,a_2,...a_n))=F^N(h(a_1),h(a_2),...(h(a_n))$ 2.Injective function 3.Surjective function if i try to prove isomorphic in B. between $M_2$ , $M_1$ i dont know how to prove them with in open segment


With Chrome, the only way I can run a bookmarklet is by typing the bookmarklets name into the address bar and then clicking the suggested result. In Safari on iOS, it displays a result saying that JavaScript cannot be run from the address bar. I don't have access to an iPhone that I can continue to use to test the bookmarklets I write, but I attempted running it from the bookmarks menu in Safari and it didn't do anything.  How do I run bookmarklets on iOS in Safari?

I have a 16 GB Apple  Mini iPad using iOS 8.1.2 and am unable to install the bookmark found  that renders LaTeX in the Math Stack Exchange chat room. I can't find a browser with a bookmark bar to drag the given link to.  Other users in the room have also been unable to render LaTeX with their iPad and iPhones. Could you provide instructions that someone who is new to Apple products could follow?


Because this 3rd answer is very good I am creating a Part II post so as not to confuse this answer with the previous two answers as found here in the first post:   To recap: I have an object I am trying to add a secondary graphic across sectioned planks of wood. In other words, (and not outlined in the first Question) is that there is also a wood texture on the crate that the text UVmap has to go OVER. Doubling the images.   Unlike the previous 2 answers this essentially maps two images to the side of the crate.

I have a rough wood board crate I want to apply (UV map) a stencil on, but only on one side of the face AND I want it to disappear in between the boards --just like the attached example image (created in Photoshop). Any suggestions?    UPDATE: Secondary Problem in attempting the 2nd answer below: Following the answer below I could duplicate the nodes as outlined to get the decal on the bars however it still wraps around the edge of the bars and does not show just on the one side as I want it too. What am I doing wrong? (Please note: there is a follow up to this in the 2nd answer below) As you can see I applied the answer / solution  on test bars until I can figure out how to move that to the main wood shelf object's middle section.     UPDATE 2: For a 3rd very good answer please refer to this link


I would like to test for more than 1 item in one's inventory. However, I'm having some difficulties.  I have tried the /testfor @p[r=2] {Inventory [{id:"minecraft:gold_nugget"}]} command, but it doesn't work. It says "UUID incorrect". I would rather not use scoreboards, because I don't really get along too well with it.  Can someone please put the command to set the amount? (I.E. Of the gold nuggets). If it matters, I would like it in command block form.  Thanks in advance.

I'm building a CTF map of sorts, using command blocks in vanilla 1.8. I've discovered two commands for detecting if an item is in a players inventory:  /clear @a[team=Red] banner 4 0  /testfor @a[team=Red] {Inventory:[{id:"minecraft:banner"}]}  Those work fine, unless you want to perform a command ON the player carrying that item. For example: I want to cause the player who picks up a banner of the opposite team, to automatically equip that banner in their head slot with a command similar to this:  /replaceitem entity @a[???????] slot.armor.head banner 1 4  Can this be done? If not, is there a way to mark a specific player carrying an item using scoreboards?


I am using bottom navigation in my layout but when I try to write an on Click for it in my main activity oncreate it gives me an exception:   Attempt to invoke virtual method on a null object reference   private BottomNavigationView bottomNavigationView;  @Override protected void onCreate(Bundle savedInstanceState) {     bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottom_nav);      super.onCreate(savedInstanceState);     bottomNavigationView.setOnNavigationItemReselectedListener(new BottomNavigationView.OnNavigationItemReselectedListener() {         @Override         public void onNavigationItemReselected(@NonNull MenuItem item) {          }     });

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?


package com.example.ben.droidmice2;   import android.hardware.Sensor;  import android.hardware.SensorEvent;  import android.hardware.SensorEventListener;  import android.hardware.SensorManager;  import android.support.v7.app.AppCompatActivity;  import android.os.Bundle;    import com.example.ben.droidmice2.net.NetworkTask;   public class MainActivity extends AppCompatActivity implements   SensorEventListener{      private long lastUpdate = 0;     private static final float TILT_THRESHOLD = 1.1f;      private SensorManager sensorManager;      //sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);     }      private void getAccelerometer(SensorEvent event) {         Sensor mySensor = event.sensor;          if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER) {             float x = event.values[0];             float y = event.values[1];             //float z = event.values[2];             long curTime = System.currentTimeMillis();              if ((curTime - lastUpdate) > (1000/60)) {                 long diffTime = (curTime - lastUpdate);                 lastUpdate = curTime;                  if(Math.abs(x) > TILT_THRESHOLD || Math.abs(y) > TILT_THRESHOLD) {                     int dx = (int)(x  * diffTime);                     int dy = (int)(y  * diffTime);                      new NetworkTask().execute("MOVE " + dx + "," + dy);                 }             }         }     }       @Override     public void onSensorChanged(SensorEvent sensorEvent) {         if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {             getAccelerometer(sensorEvent);         }     }      @Override     public void onAccuracyChanged(Sensor sensor, int i) {         // Ignorable     }       protected void onPause() {         super.onPause();         sensorManager.unregisterListener(this);     }       @Override     public void onResume(){         super.onResume();         // register this class as a listener for the orientation and         // accelerometer sensors         sensorManager.registerListener(this,                 sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),                 SensorManager.SENSOR_DELAY_FASTEST);     }   }   I'm trying to make a app that move phones and let phone acts like a mouse  here's my code it tells me i have some problem on  Attempt to invoke virtual method 'android.hardware.Sensor android.hardware.SensorManager.getDefaultSensor(int)' on a null object reference for me there's no problem inside OnResume() here somebody help?


what's the correct tense here: Is it "the past tense" or "the present tense"? "What if I miss the bus?" "What if I were late to dinner?" "What if I called her tomorrow?" "What if I don't understand?"

From my research online the correct way is to say "If I were you" and not "If I was you" because this is the "subjunctive mood".  However they don't say the underlying reason for it. They just say use "If I were you" when it is subjunctive.  What if I wanted to say "If he was you", should I use "if he were you" instead? Since most post talk about "If I.." I have no way to know what would be the correct way for "If he...", "If she..", etc.  I read that the subjunctive is a mood and not a Tense. With Tenses you know the conjugation. How does it work with the moods?  I found  which has a long list of conjugations, and it has "I were" for the Past subjunctive.   So, when I am saying "If I were you":   Am I using the "Past Subjunctive"?  And therefore I should also say "If he were you"?


After a working break of a couple of weeks, I start do work on my last project. But I can not edit my postgis-layers anymore! Its possible that I did several system-upgrades, and maybe there was also a postgis-update, and I updated to QGIS 2.12 but I can not exactly tell, what could be the reason.  I have the right ownership of the table and all Privileges (arwdDxt*)  As you can see in the editing-bar - I can not make any changes to the layer

I have a problem with postgresql and QGIS :   I can add points/lines/polygons and fillup field   But I can't :   delete points/lines/polygons modify points/lines/polygons (move or modify field)   ex : dbname='Europe' host=localhost port=5432 user='postgres' sslmode=disable key='tid' estimatedmetadata=true srid=900913 type=Point table="public"."planet_osm_point" (way) sql=  QGIS is connected as admin level into database. With pdAdmin III I can do all (create, delete, modify...)  The postgresql database is imported from OSM with osm2pgsql.  On other layer, like .shp, I don't have this issue.  Any idea ?  Config : Ubuntu 14.04 / Posgresql 9.4 / QGIS 2.10


Hello my operating system is Windows 7.  I have 3 hard drives: 1 SSD (which hosts Windows), 2 HDD (just a file storage) Is it possible to turn off HDD after some idle time but leave active SSD?  I checked windows 'Power management settings'. It has some option like 'Turn off hard disc after', but it doesn't have a selection which one to turn off.

I have a number of different drives that I use for different purposes but I only use two of them frequently. I would like for the others to enter sleep mode when not in use, but never my main two.  Is there any way to edit power saving settings for individual drives?


I married Marcelo and I told him to move to Breezehome. I keep going there but he's not there. I've gone to the temple of Mara and to the Bee and Bard in Riften. I don't know where he is.  Where's my husband?   Also I can't find Cicero I spared him and lied to Astrid so he'd be my follower but I don't know where he is.

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


I have more than 50000 users in org. This is hitting limit now.   I want to get all the user managers   Ex:    A user    B is manager for A    C is manager for B    and so on..    There are more than 5 levels Now I want to get A,B,C,D.. user IDs  I checked with Manager.ID,Manager.Manager.ID but i can;t go more than 5.  Is that possible ? any other workaround. ?

Can anyone tell me how to get the Id of all managers based on the user Id? user-->manager1-->manager2-->manager3--->manager4  I wanna get all manager id  My code is:  public static List<Id> getParrentId(Id i){     List<Id> ParentUserId=new List<Id>();     User ur = new User();     ur = [select Id, Name, ManagerId from User  where Id =: i];      if(ur.ManagerId != null)                 ParentUserId.addAll(getParrentId(ur.ManagerId));     return ParentUserId;  }   But it does not gather all manager id  Thanks in advance Karthick


I am creating a warehouse application for a client where goods are received in boxes. The problem is, they contain more boxes in it. Like if I have a product say Apples, then they receive 5 Boxes of Apples each containing 3 boxes in it. So in all there are 15 small boxes of apples. Now, the question is how to simplify this task in my database? Like I want bags in bags, box in bags, bags in box, etc etc. This is critical because, again I have to code algorithm for remaining stock, current stock and returned stock too.

Given the schema:  create table containers (     id int primary key,      name text,      product_id int,      lot int,      qty int,      parent_id int);  create table orders_items (     id int,     position int,     container_id int);   Where containers is a hierarchical table with an unknown number of levels.   containers.parent_id = containers.id OR null   A container can hold other containers, this is a containers tree structure:    23 Box 40 Parent  [ID: NULL, Lot: NULL, Qty: SUM(20+20)=40]    |    |--22 Bag 20     [Parent ID: 23, Lot: NULL, Qty: SUM(10+10)=20]    |   |--21 Bag 10 [Parent ID: 22, Lot: 701, Qty: 10]    |   |--22 Bag 10 [Parent ID: 22, Lot: 703, Qty: 10]    |     |--19 Bag 20     [Parent ID: 23, Lot: NULL, Qty: SUM(10+10)=20]        |--17 Bag 10 [Parent ID: 19, Lot: 700, Qty: 10]        |--18 Bag 10 [Parent ID: 19, Lot: 701, Qty: 10]    For us a container is considered as one expeditionary unit, depending on customer requirements a container can be a simple plastic bag of 10 pieces, or a full pallet with 10 boxes of 5000 pieces each one. Only containers of last level has a lot assigned, parent containers can hold different lots, but always belonging to same product.  We need to list all products included in a single order, group by lot.   Different products can't have the same lot. One container can only hold containers of the same product.   Sample data:  insert into containers values   (23, 'Box 40',  2, null, 40,  null) , (16, 'Pallet',  1, null, 120, null) , (12, 'Bag 20',  1, null, 20,  14) , (13, 'Bag 20',  1, null, 20,  14) , (14, 'Box 40',  1, null, 40,  16) , (19, 'Bag 20',  2, null, 20,  23) , (22, 'Bag 20',  2, null, 20,  23) , (5,  'Bag 20',  1, null, 20,  7) , (6,  'Bag 20',  1, null, 20,  7) , (7,  'Box 40',  1, null, 40,  16) , (1,  'Bag 10',  1, 500,  10,  5) , (2,  'Bag 10',  1, 501,  10,  5) , (3,  'Bag 10',  1, 502,  10,  6) , (4,  'Bag 10',  1, 500,  10,  6) , (8,  'Bag 10',  1, 600,  10,  12) , (9,  'Bag 10',  1, 601,  10,  12) , (10, 'Bag 10',  1, 502,  10,  13) , (11, 'Bag 10',  1, 501,  10,  13) , (15, 'Box 40',  1, 600,  40,  16) , (17, 'Bag 10',  2, 700,  10,  19) , (18, 'Bag 10',  2, 701,  10,  19) , (20, 'Bag 10',  2, 703,  10,  22) , (21, 'Bag 10',  2, 701,  10,  22);  insert into orders_items values (1, 1, 16), (1, 2, 23);   The order number 1 has two details lines, containers 16& 23, I need to get all lots included in these containers.  In this example the result should show this rows:  +----+------------+-------------+------+------+------------+ | id |    name    |  product_id |  lot |  qty |  parent_id | +----+------------+-------------+------+------+------------+ |  1 |  'Bag 10'  |           1 |  500 |   10 |          5 | |  2 |  'Bag 10'  |           1 |  501 |   10 |          5 | |  3 |  'Bag 10'  |           1 |  502 |   10 |          6 | |  4 |  'Bag 10'  |           1 |  500 |   10 |          6 | |  8 |  'Bag 10'  |           1 |  600 |   10 |         12 | |  9 |  'Bag 10'  |           1 |  601 |   10 |         12 | | 10 |  'Bag 10'  |           1 |  502 |   10 |         13 | | 11 |  'Bag 10'  |           1 |  501 |   10 |         13 | | 15 |  'Box 40'  |           1 |  600 |   40 |         16 | | 17 |  'Bag 10'  |           2 |  700 |   10 |         19 | | 18 |  'Bag 10'  |           2 |  701 |   10 |         19 | | 20 |  'Bag 10'  |           2 |  703 |   10 |         22 | | 21 |  'Bag 10'  |           2 |  701 |   10 |         22 | +----+------------+-------------+------+------+------------+   Group by lot:  |----------|---------|-----|----------| | Order ID | Product | Lot | Quantity | |----------|---------|-----|----------| |    1     |    1    | 500 |    20    | |    1     |    1    | 501 |    20    | |    1     |    1    | 502 |    20    | |    1     |    1    | 600 |    50    | |    1     |    1    | 601 |    10    | |    1     |    2    | 700 |    10    | |    1     |    2    | 701 |    20    | |    1     |    2    | 703 |    10    | |----------|---------|-----|----------|   I've created a  example with this values.


A $d$-dimensional topological manifold $M$ is a topological space for which there exists continuous maps (charts) to $R^d$, such that every point $p \in M$ is mapped by at least one of those charts.  A differentiable manifold $M$ is a topological manifold with the additional requirement that its Atlas contains only charts whose transition maps are all differentiable.  I find this second definition (of differentiable manifolds) very strange, because it only makes reference to the charts in the Atlas of manifold $M$, but not to the manifold itself.  If I'm correct, it means we can construct a differentiable manifold out of a non-differentiable continuous function:     `Take the graph $M$ of a non-differentiable function (e.g. $f(x)=|x|$). This clearly is a $1$-dimensional topological manifold. Now we can simply take the Atlas that consists of the single chart map that maps every point on the graph to the $x \in \mathbb R$ that produced it. This clearly is a chart map, and it clearly has a chart transition map to itself that is differentiable.   So this means that manifolds that have "kinks" in them, like the graphs of non-differentiable functions, can still be differentiable manifolds.  Could even a function like the Weierstrass function be a differentiable manifold?  What does "differentiability" of a manifold intuitively mean, since it is not intuitively the same thing as the differentiability of a real function?

Take the manifold: The graph of $|x|$ on $(-1,1)$, with the induced topology from $\mathbb{R}^2$. This is a topological manifold, which is homeomorphic to $(-1,1)$ by projection. Is it a differentiable manifold? I believe it is, because we can take an atlas with only the projection, and then we will have only one transition map which is the identity, and therefore differentiable. But I'm not sure I get the definition of a differentiable manifold right...  Thanks!


I'll try to keep this as short and precise as possible: I am 26 y.o. male from Tunisia. I work as a  with an Australian company. I receive $2500/month through bank transfer. I am not an employee of that company, instead I have my own company here, and we do all the necessary exchange. Everything is legal and I pay my taxes and all that jazz since 2017 Also can provide bank account statement, and the €30k coverage can be provided by my bank (they include that service for companies like mine) My girlfriend is 24 y.o., also from Tunsia. She finished highschool and then studied in a private school and graduated as a pharmacist. She doesn't work cause the max salary here for her field is ~$200/month, and the work condition is awful. We traveled together 3 times in the past (2016, 2017 and 2019), all 3 times where to South Korea (doesn't require Visa for Tunisians), we stayed almost 1 month for each visit, and spent around $10k per visit (can prove that through my Payoneer transactions). Also, not sure if this matter but we've been together since 2012 and we can easily prove that. The questions:  Is it possible for me to support her application and help establish her willingness to return to the country?  Do you happen to know any certain services online that offers premium help for this kinda of situations? Knowing that my main potential destinations (just one of them) are (in order): the Netherlands, Finland, Sweden, Italy and Spain (or Canada if for some reason it's easier)  Is there any other advice that you can recommend?

Lots of people would like to visit the EEA area to take holiday or to visit family or even to go for longer term visa arrangements in the Schengen zone.  In order to do this, they need a Schengen (or national) visa.  This appears to be a fairly straightforward process, but hints and tips can always be helpful.  Without focusing on any individual's circumstances, what are some helpful hints that can improve the likelihood of a successful application?


I am aware that I seem to be approaching the end of the game, if you can't tell you are yet then do not read this as it may include some spoilers of future quests, if this doesn't affect you then continue.  I am trying to get the Brotherhood of Steel ending of the game, currently up to the quest "Blind Betrayal", however trying to clear up as many other faction quests as possible before going too far into the Brotherhood of Steel quest line.  I'm currently at the Institute quest "The Battle of Bunker Hill", it has optional objectives such as inform the Railroad/Brotherhood of Steel or simply continue on behalf of the institute.  I have read somewhere that if I were to simply following the Institute here then it will result in being sided with them.  I'd ultimately like to free the synths from the bunker (Railroad) but side with the Brotherhood of Steel overall, however when I return to the Railroad I am given the quest "Underground undercover", will proceeding with this quest make the Brotherhood of Steel dislike me/prevent me getting the Brotherhood of Steel ending?  If the above is true, it seems I am going to have to kill the synths in the bunker which I was trying to avoid as I have been trying to give synths better lives.

I'm currently a member of four different factions, some of which don't get along at all. I'm wondering at which point I have to decide between the different factions.  The factions I've found so far and that I have joined are:   Minuteman Brotherhood of Steel The Railroad The Institute   How long can I continue doing missions for each one of them, without affecting my standing with the other factions?  I'd appreciate an answer that avoids unnecessary spoilers, I just want to know enough to recognize when I approach a point where I have to decide between the factions.


I installed Ubuntu 16.04 LTS and chose to do full disk encryption as well as home dir encryption.  At startup, I'm asked Please unlock disk sda3_crypt and I have to manually enter the disk decryption password.  I there a way to auto-mount this, i.e. by specifying the password in the boot script somewhere? (not sure about the right terminology for this) I understand this would nullify any security.  Also, is it possible to retrieve the password from a remote URL, and use that to unlock the disk and continue booting automatically?  Note that I don't want to fully disable disk encryption. I wish to keep the option to re-enable it in the future. Furthermore the retrieve password remotely option (if that's possible) would allow for other possibilities, such as enabling/disabling it remotely, or preventing someone can steal the disk or machine and access it from somewhere else.

I recently installed Ubuntu 12.10 and it requires a passphrase to boot up (I installed it with an encrypted file system).  Do I have to reinstall to change to a standard unencrypted file system?


I want to make a USB bootable by cloning an image. I did some research and I haven't found a satisfactory way of making dd provide some feedback back to the console of how the progress is going.  Is there a way, built into the command to do this, aside from polling the PID via the ps command?

is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?


$\sum\limits_{i=1}^{n-1} i$.  I know the answer is $\frac{1}{2}(n-1)n$ but I don't quite understand it how to get there.

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


I used sklearn to compute roc_auc_score for a dataset of 72 instances. The accuracy was at 97% (2 misclassifications), but the ROC AUC score was 1.0. How is this possible? I would think that even one misclassification should have dropped the score to slightly below 1.0.  # Python 3.6.4 # numpy==1.14.3 # scikit-learn==0.19.1 # scipy==1.1.0  from sklearn import metrics import numpy as np  y_true = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]) y_prob = np.array([0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.7, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.7, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.1, 0.1, 0.0, 0.9, 0.0, 0.0, 0.4, 0.0, 0.0, 0.0])  # Show which actuals do not match their expected probabilities for index, (actual, predicted_prob) in enumerate(zip(y_true, y_prob)):   if (actual == 1 and predicted_prob <= 0.5) or (actual == 0 and predicted_prob > 0.5):     print (f'Mismatch at index {index}. Actual={actual}, predicted_prob={predicted_prob}')   rocauc = metrics.roc_auc_score(y_true, y_prob)     print (f'ROCAUC: {rocauc}')  # Outputs: # Mismatch at index 14. Actual=1.0, predicted_prob=0.5 # Mismatch at index 68. Actual=1.0, predicted_prob=0.4 # ROCAUC: 1.0   Then I debugged the score computation itself and looked at the coordinate ROC output.  # In sklearn/metrics/ranking.py, line 271: --> 271         fpr, tpr, tresholds = roc_curve(y_true, y_score,     272                                         sample_weight=sample_weight)  ipdb> fpr array([0.        , 0.        , 0.        , 0.18181818, 1.        ]) ipdb> tpr array([0.33333333, 0.66666667, 1.        , 1.        , 1.        ]) ipdb> tresholds array([0.9, 0.7, 0.4, 0.1, 0. ])  # coords = [] # for x, y in zip(fpr, tpr): #   coords.append((x, y))  ipdb> pp coords [(0.0, 0.3333333333333333),  (0.0, 0.6666666666666666),  (0.0, 1.0),  (0.18181818181818182, 1.0),  (1.0, 1.0)]   All of those coordinates are on x=0 or y=1, meaning ROCAUC is showing 1.0. The only plausible explanation I can think of is that if the alg had more fpr/tpr points, it would show a very tight curve that never reaches x,y = (0, 1), and the ROCAUC would be close to 1, but not exactly 1. Is that a reasonable interpretation or am I missing something?

I am using a classifier which returns probabilities. To calculate AUC, I am using pROC R-package. The output probabilities from classifier are:  probs=c(0.9865780, 0.9996340, 0.9516880, 0.9337157, 0.9778576, 0.8140116, 0.8971550, 0.8967585, 0.6322902, 0.7497237)   probs shows probability of being in class '1'. As shown, the classifier has classified all of samples in class '1'.  True label vector is:  truel=c(1, 1, 1, 1, 1, 0, 0, 0, 0, 0)   As shown, classifier has misclassified 5 samples. But, AUC is:  pROC::auc(truel, probs) Area under the curve: 1   Could you please explain to me why it happens?


This meta post  suggests to flag abusive users by flagging one of the posts, so that the mods can deal with the problem.  However, on The Workplace (where I am a moderator), we had a situation where one new user made rude/abusive suggested edit (specifically, he changed the question title to include "because I'm an idiot"). The user has not made any posts (questions/answers/comments).   In this case, some of our moderators are regulars in the site chat room, so some alert users pinged us there, and it got resolved that way. However, this is more of a workaround and doesn't work if moderators don't hang out in the chat room.   What is the preferred approach to handle this situation?  One alternative I could think of is the alert users could custom flag one of their own posts and post a link to the abusive suggested edit to bring it to moderators' attention. This doesn't seem to be a clean solution though.

It came up in chat that a spammer's account needed destroyed; their posts had been deleted but their name (which was offensive) still showed up on the front page as updates to posts and their user account hadn't been deleted.   Someone in chat wanted this fixed but there "wasn't anything to flag" so they complained in chat rather than flagging, which would have directly notified moderators. For future reference how should I tell users to handle a situation like this? Just flag a related post with the "Other" flag reason and explain the situation? What if there's no "related" post?


Trying to figure out the best way to take this alternating circle cutout pattern and duplicate it around the surface of this cylinder.  This is a file that was given to me- I did not make the initial cutouts.

What would be the best method for making regularly spaced holes in a cylindrical mesh? Similar to the vent holes you'd see on gun barrels like these:       Without creating any n-gons, having good topology, and not excessively increasing the tri/polycount overall (this is for models that would potentially be used in a game). It would be good to know how to do this in a way that would work where the holes overlap on the x axis of the cylinder if you see what I mean, like the MG34 barrel, and where they don't, like the SMG barrel.


In Harry Potter, the portraits of people move and behave as though they are actual people.  It's even possible to converse with them.  So what's the deal with them?  Are they simply extensions of the person(s) they're renderings of?  Do they have the same memories of the actual person?  Can they learn like people do?  As seen in the answer to this question    and this one    Rowling basically says that they repeat catch phrases and then goes on to explain that if Harry had a picture of his parent's that they wouldn't have been able to help him.  Yet Harry actually converses with the portrait of Dumbledore.  Aberforth, actually gives instructions to the portrait of his sister.  Gryffindor's fat lady actually interacts with the students.  So, are the portraits 'sentient' beings that are capable of emotion, memories, and with learning potential?

Does J.K. Rowling address how the interactive portraits work? Would a portrait painted after a Wizard/Witch died become interactive, or does the painting of the portrait have to take place during the Wizard/Witches lifetime?


Apparently after the split, all the tag-links (once they are fixed) will point to MSE instead of SO.  It seems like many questions will want to reference tags on a particular site.  We already had the special magic tag link of [meta-tag:], so how about a syntax to direct tag-links to the site of choice, or at least a subset of the sites that we can make easy abbreviations to?

The  tag in my Stack Exchange profile links to different sites depending on where it's being viewed:  Profile on StackOverflow:  [tag:CSS] => https://stackoverflow.com/questions/tagged/css   Profile on StackExchange:  [tag:CSS] => https://stackexchange.com/questions/tagged/css   Profile on CodeReview:  [tag:CSS] => http://codereview.stackexchange.com/questions/tagged/css    I'd like to have these all link to https://stackoverflow.com/questions/tagged/css. You can ; why not add the ability to specify the site with tags? <!-- tag: stackoverflow -->[tag:css] <!--tag: meta -->[tag:feature-request]  The current behavior also cause a bug on my :    All tags send me to find a Panda aka 404 Page Not Found.


I hear a lot things like:  There's tons of papers.  Is this acceptable? Related:  By the way, what about a contraction there're?

Is the following correct:     There's a sofa, two armchairs, a TV and a big cage for our parrots.   Or should we change it to:     There's a sofa, there are two armchairs, there's a TV and a big cage   for our parrots.


I've just installed 14.0.4 and it freezes if left for any amount of time (more than a few minutes)  The mouse moves, but any input on the keyboard isn't shown on screen (password lock screen)  The lights on the keyboard work and I can toggle the caps lock/ number lock etc.   Many thanks   Andy

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


I'm struggeling with variadic templates in C++: I want to call a variadic template function implemented in class A from class B which inherits from A:  a.hpp  class A{ protected:     template<typename... Ts>     void variadic(Ts... args);  };   a.cpp  #include "a.hpp" template<typename... Ts> void A::variadic(Ts... args) {/*something*/}   b.hpp  #include "a.hpp" class B : public A { public:      void func() {          variadic(4, 3.4, "hello");      } };   When I call the method (e.g. B testobj;testobj.func();) I always get the following linker error:  $ clang++ -std=c++11 main.cpp a.cpp -o main /tmp/main-2e3fd9.o: In function `B::func()': main.cpp:(.text._ZN1B4funcEv[_ZN1B4funcEv]+0x29): undefined reference to    `void A::variadic<int, double, char const*>(int, double, char const*)' clang: error: linker command failed with exit code 1 (use -v to see invocation)   If I implement the variadic method directly in the header file I don't get any error. If I put func in class A it will also compile without error.  It seems to me that the variadic template isn't visible in class B. Is there any way to solve my issue?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I am given the following riddle with complex numbers. But I can't figure what is wrong here:  $1=\sqrt{(-1)\cdot (-1)}=i\cdot i=-1$

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


The escape character not working with the code I write in the questions or answers (but not in the comment).  I can't write:  `\`something\``   As inline code, it appears like \something``, but it should be:  `address 1`   If I want to write \, it shouldn't be:  `\`   but  `\\`   edit  the way to do so as to use   `` `something` ``   it will appears like `something`   but it doesn't work like in comments so why this confusion to do the things in comments differently than the questions and answers i still believe that they should allow the escape character in the inline code for answers and questions but it's not essential now , even so if developers make that it will be a good thing for alot of people

I tried before to post a shell script that contained a ` character as an answer on Stack Overflow. The parser insisted on treating the backtick as formatting instead of part of code.  How can I include it?


I have to implement a simple Timer task for following scenario -   method1(){   .....      if(success){         trigger method2 for next 30 min every 15 sec      }   }   I have implemented this code using java.util.Timer and java.util.TimerTask and its working fine. However, my code will eventually be deployed as a web service in glassfish server. So I want to know will it create any problems due to glassfish container as I am indirectly using threads via Timer.  I am also not sure whether I should EJB Timer Bean. Can somebody please advise what are the pros and cons of both the approaches?

One of the first things I've learned about Java EE development is that I shouldn't spawn my own threads inside a Java EE container. But when I come to think about it, I don't know the reason.  Can you clearly explain why it is discouraged?   I am sure most enterprise applications need some kind of asynchronous jobs like mail daemons, idle sessions, cleanup jobs etc.  So, if indeed one shouldn't spawn threads, what is the correct way to do it when needed?


Given $   A_n =   \left[ {\begin{array}{cc}    2 & 1 & \\    1 & 2 & 1\\     & 1 & 2 \\    & & & ... \\    & & & & 2 & 1 \\    & & & & 1 & 2   \end{array} } \right] \in M_n(\mathbb{R})$. What I have to do is calculate the determinant with respect to $n\in \mathbb{N}$. I already found out $\det(A_n) = n+1$. I tried to show this with induction. I get confronted by the following problem:   I showed the statement for $n=1$. Lets consider the statement is true for one $n \in \mathbb{N}$. Now show that the statement is also true for $n+1$ using laplace expansion for the first row.  We get $\det(A_{n+1}) = (-1)^2\cdot 2\cdot \det(A_n)+(-1)^3\cdot 1\cdot     \begin{vmatrix}    1 & 1 & \\    0 & 2 & 1\\    & 1 & 2 \\    & & & ... \\    & & & & 2 & 1 \\    & & & & 1 & 2 \end{vmatrix} $. The second determinant should be $1\cdot \det(A_{n-1}) = n$ but we only considered the statement tu be true for $n$ and not for $n-1$. How do I continue from here?

Let $A_n$ denote an $n \times n$ tridiagonal matrix.  $$A_n=\begin{pmatrix}2 & -1 & & & 0 \\ -1 & 2 & -1 & & \\ & \ddots & \ddots & \ddots & \\ & & -1 & 2 & -1 \\ 0 & & & -1 & 2 \end{pmatrix} \quad\text{for }n \ge 2$$  Set $D_n = \det(A_n)$  Prove that $D_n = 2D_{n-1} - D_{n-2}$ for $n \ge 4$.


As an existing user, I can get help (such as "what's on topic here? oh yeah"):        But as a nonexistent user, I can't get help (such as "what's on topic here? uhhhhhh...."):        Let's help out the nonexistent users a bit, shall we? It'd help to throw a Help Center link into the top bar?   Us experienced users know to just navigate to /help, but most users probably won't try that.

It seems to me that two of the most helpful pages for introducing new visitors to the StackExchange network and methodology are the respective  and  pages of any StackExchange site.    However, if I go to  (where I have not registered), these two links are nowhere to be found!    No about or help here.  Oh, wait, here they are, relegated to the footer along with the privacy policy and advertising info links.    And we all know how often people look at a website's footer.  I mean, when was the last time you saw that footer?  If users had more of an opportunity to see the well-organized and important information on those pages before they were prompted to register for an account, we would see an improvement in the quality of posts and participation by new users.  I propose that these links be made more visible to new visitors who don't yet have a profile so they can get a better understanding of the website before being prompted to register for it.  Personally, I think that placing them next to "sign up" and "login" would be great, but increasing their visibility at all would be an improvement.


For my taskbar programs are displayed like: (symbol of chromium)askubuntu.com I would like it as:   symbol of chromium [no titles] askubuntu.com imagemagick man page   Like in cinnamon or windows 7. No annoying long titles. Displaying whichever window by title whenever I click on the symbol. I am running xfce xubuntu x64 tried a ton of different options in the settings manager, but cannot locate it, if it is there. How would I go about doing this so my desktop doesn't look like a complete mess?

I find it much faster to identify a window in the taskbar (window list) by its icon,    rather than by its text:    The problem with most graphical interfaces I've  is that they don't group windows, and if you have more terminals or file managers, they'll just clutter the taskbar and you won't know which is which. Windows 7 offers a relatively elegant solution to this by grouping similar window icons together.  Question: What Linux  have this functionality? If addons exist that provide it, that's alright.  For reference, a Cinnamon applet that sort of does this is .


I know most of the information I use in my daily basis is stored in the home folder, however, I want to be sure nothing important is left out of the backup. Edit: Which command I use to copy these files into an external HD?

I'm quite new to Ubuntu and want to create a backup. I'm really not sure what files and folders to include so that if I restore my system it will be as it is now. I can't seem to find good details of this anywhere. Hopefully someone could help me with this. Is it possible to backup everything as it is now so in the event of a system restore I don't have to reinstall programs and settings?


I am new to Java and OOP. I'm having trouble understanding this error that I'm getting:  Exception in thread "main" java.lang.NullPointerException     at main.MyBlock.displayBlock(ProgFunAssignment1.java:66)     at main.ProgFunAssignment1.main(ProgFunAssignment1.java:38)   It also happens with the clearBlock() method as well. I'm assuming it might be to do with me not understanding how to use the methods I've defined in the myBlock class properly in main? or maybe that I haven't initialized block properly?  I've looked through some other answers about the same error but can't really seem to find anything that makes enough sense for me to get started on. I've pasted my code below, please help me! Explanations on what this error actually means would be great too, I'd like to actually understand what I've done wrong.  Please ask me for any extra information you might need, sometimes I'm not great at including everything!  package main; import java.util.Scanner; import java.lang.*;  public class ProgFunAssignment1 {      public static void main(String[] args) {          Scanner console = new Scanner(System.in);          int maxRows;          int maxColumns;           // initial value selection (TASK D)               do { System.out.println("Please enter the desired row and column lengths of your block");          maxRows = console.nextInt();          maxColumns = console.nextInt();          if ((maxRows < 3 || maxRows > 10) || (maxColumns < 3 || maxColumns > 10)) {              System.out.println("Values invalid, please enter values between 3 and 10");}          } while ((maxRows < 3 || maxRows > 10) || (maxColumns < 3 || maxColumns > 10));           MyBlock block = new MyBlock(maxRows, maxColumns);            //Menu creation (TASK E)          int choice;          int colPosition;          int rowPosition;          do { System.out.println("Please select one of the following options \n 1. Add a House \n 2. Display Block \n 3. Clear Block \n 4. Quit");          choice = console.nextInt();           if (choice == 1) {              System.out.println("Please enter position coordinates of the house:");              rowPosition = console.nextInt();              colPosition = console.nextInt();              // If coordinates not valid, go back to menu          }          else if (choice == 2) {              block.displayBlock();          }          else if (choice == 3) {              block.clearBlock();          }          else if (choice == 4) {              System.exit(0);          }          else {              System.out.println("Choice was not valid, please try again.");              }} while (choice < 0 || choice > 4);         } }  class MyBlock {     private int[][] block;     boolean vacant;       public MyBlock(int maxRows, int maxColumns) {          int block[][] = new int[maxRows][maxColumns];         vacant = true;      }      public void displayBlock() {         // content of displayBlock() method here         for (int[] x : block)         {            for (int y : x)            {                 System.out.print(y + " ");            }            System.out.println();         }          }      public void clearBlock() {         // content of clearBlock() method here         vacant = true;         for (int i = 0; i < block.length; i++) {             for (int j = 0; j< block[i].length; j ++)                 block[i][j] = 0;         }     }      public boolean buildHouse(int rowPos, int colPos, int rows, int columns) {         // content of buildHouse() method here          // useful code         if (true)              return true;         else              return false; } }

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


We know that the event of the Big Bang has low entropy (and we don't know why), but... do we know for certain (or through convincing mathematical evidence) that the event of the Big Bang indeed has the lowest amount of entropy possible? To me, it seems that if that's true, then there is only one way the Big Bang could be ordered, and thus, only one version of the Big Bang could occur.

(I asked this question in ; but I was advised to direct it here, despite it is, in my opinion, somewhat too speculative for physics.SE).  High entropy generally means high disorder; and low entropy low disorder; the two paradigmatic cases that illustrate these two possibilities is a gas, for the first, and a crystal for the second.  Since Entropy always increases (in general); its expected that the entropy at the beginning of the universe should be the lowest possible.  Which means it ought to be considered as a crystal.  On the other hand, as the universe is squeezed to something smaller than an atom; one expects the temperature to climb precipitously, and for any structure in matter, and perhaps space and time too to 'melt'; and hence approach the state of a gas (perhaps plasma might be a better description here).  How can one resolve these two possibilities?  Does considering that the singularity is a black hole allow one to make some guarded guesses here?


It would be great if there was a dark theme for the iOS app.  It would make reading readier on the eyes, especially at night.  This is not a dupe of  or , as both of those are for the Android app.

That'd save us some battery while being nice on the eyes at night. I love the black interface that reddit is fun app has and would love to see same on this app. Thanks.