I'm trying to understand how the String pool works and what are the rules for a string to be equal to another String.  For example this snippet :  public static void main(String[] hi){     String s1 = "lol";     String s2 = "lol";     String s3 = new String("lol");     System.out.println( s1 == s2 );// true     System.out.println( s2 == s3); // false     s3.intern(); //line 1     System.out.println( s1 == s3); // false     testString(s1);  }  private static void testString(String s1){     String s4 = "lol";     System.out.println( s1 == s4); // true }    At //line 1: the string is added to the string pool. Since it's not equal to s1 I assume there is a duplicate in the string pool. Correct ? What is the rule for having a duplicate in the pool ? In other words when does someString == someString return false even though both string have the same char sequence ?   PS: I use string1.equals(string2) everywhere no matter what. I just want a deeper understanding of the underlying mechanism.

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?


I used the OpenStreet Maps plugin to import automatically landscape. When I look at it in Layout mode, I see nothing that jumps out at me. But, when looking through the camera, a "curtain" that stays at the same distance from the lens stays there as I move through the scene. I can guess this is an easy cutoff or other setting that I am overlooking as a noob.  enough.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I have a query on how to interpret the result for multiple regression with categorical variables. I have categorical variable called Stay_In_current_city_years which has 5 levels. After running the linear model I get an output with 4 different p-values.   How do I interpret this result? Does it mean that Stay_In_current_city_years1 with p-value=.0746 is not a significant predictor and Stay_In_Current_City_Years2 with p-value=.005 is a significant predictor?  If so how would remove the variables which are not statistically significant?    Thanks

After seeking clarification about linear model coefficients  I have a follow up question concerning non-signficant (high p value) for coefficients of factor levels.  Example: If my linear model includes a factor with 10 levels, and only 3 of those levels have significant p values associated with them, when using the model to predict Y can I choose to not include the coefficient term if the subject falls in one of the non-signficant level?  More drastically, would it be wrong to lump the 7 non-significant levels into one level and re-analyze?


Let's say, I have played  (some rounds ago), which allows me to sacrifice a creature (at any time) to force a player to put a number of cards from the top of his or her library into his or her graveyard. Now an opponent casts  (or any similar card) to destroy one of my creatures.  My question: Is it possible to sacrifice my creature before Terror applies to force the opponent to put the accordant amount of cards in his or her graveyard (in respone of Terror)?

This is a broad question so for simplicity I will use  and .  Scenario 1: Common exchange- creating a baseline.   Player A uses Naturalize on Seal of Fire  Player B Sacrifices SoF in response. SoF is highest on the stack and goes off first.  This leaves Naturalize without a valid target.   Scenario 2: Complicated exchange- Is this legal?   Player B Sacrifices SoF. In response Player A targets it with Naturalize. SoF is on the stack and it's ability has not resolved. Player B (as above) sacrifices SoF in response to the Naturalize.    Can Seal of Fire be placed back on the stack by re-activating its ability, potentially with a new target?


Sometimes honey changes its colour; can this affect its taste? How long can I store honey in my home kitchen?

I've heard that "honey never spoils", but I'm incredulous.  Is this true, and if so, how?  Isn't there some indicator that I should throw the honey in my cupboard away?


I just watched a Cosmos episode about Hershel's experiment, of which i think i was not aware. According to it, red light temperature is higher than blue (measured in celsius). As far as I know, however, color temperature is measured in kelvins, and blue has higher temperature than red. Are these two separate concepts?

I know it's dumb to ask this type of questions. But, I still don't get this. I've read the "Black body" story and know that when it's heated, it gives off colors; 'warm' colors (red→orange→yellow..) that have low color temperatures, at low temperatures, (I mean, when it is cooler than afterwards) right? And, the black body gives off 'cold' colors (white→blue..) that have high color temperatures at high temperatures (when it is hotter than before), right? Correct? So there're two, yes, very dumb, questions and the latter one is dumber..     Why are that 'warm' colors said to have low temperatures? And 'cold' colors vice versa? So the redder colors have lower c/t and bluer colors have higher c/t, then   why does the camera's color temperature - adjusting slider has the bluer colors on the left, and the redders on the right?       Please, forgive me for my ignorance...


Given any 30 positive integers, prove that we can find some integers so their sum is divisible by 30. I don't know where to start. Please some hints.

Given any $30$ positive integers we can find some integers so their sum is divided by $30$.  I don't have any idea where to start. First I would like just some hints, then If possible I would like do discuss different ways to solve the problem.


I am trying to understand the Raspberry Pi Model 3's power input circuit, as seen :  However, I am stuck at the purpose/function of the centre subcircuit outlined in black.    What I have gathered so far is that the MOSFET - P channel enhancement type - is regulating the input power somehow based on the two PNP transistors, which are acting as some sort of current mirror. As I understand, the current flowing from the right transistor's emitter to collector should be limited by the left transistor's emitter to collector current. This current is then split to the 47K resistor and the MOSFET's gate. The MOSFET will turn on when its gate voltage is ~-0.7V with respect to its source, so I can only imagine that when the voltage drop across the right transistor is ~0.7V, the MOSFET turns on. However, I do not understand how this effects the overall function of the subcircuit, nor the purpose of the 47K resistor (is it just an arbitrary value as a pull-down for the MOSFET gate?).  Additionally, the subcircuit is marked indicating it only allows (conventional) current flow from left to right, yet since a MOSFET's channel is bidirectional, should it not allow current to pass in reverse also?  So what is the function of the outlined subcircuit?

The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board.  They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse.  I understand why this is the recommendation, but I'd like to understand more about how this circuit works.  I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors.  What are they doing for this circuit?  Also, is this primarily using the body diode?  In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application?  In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.


I've read this strange result of the sum of all positive integers being $-\frac{1}{12}$. Is it really true? Does this also mean this is true? $$\sum_{n=1}^k n = \frac{k\cdot(k+1)}{2}$$ $$\frac{\infty\cdot(\infty+1)}{2} = -\frac{1}{12}$$ $$\infty\cdot(\infty+1) = -\frac{1}{6}$$

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


I can sort the list of questions based on the number of votes and on tags. Can I do the same thing for answers?

Is it possible to view the highest-voted answers of all questions by a tag?  I know that this is already possible for questions but I can't find such a feature for answers. Have I overseen it?


I am trying to get my wifi or ethernet connection to work on Ubuntu 10.04.  Neither will. I therefor have no internet access. There seems to be driver issue.   From what I've seen, the first step to resolving this is to install b43-fwcutter.  Multiple sources state this, including the "official docs" about such.  Here's the problem - when I attempt this installation it fails because it apparently requires internet access!  It uses wget in it's process.  Why?  How do I skip that?  It's trying to get the file wl_apsta-3.130.20.0.o from a remote source.  I have that file locally.  I thought that am supposed to install that with b43-fwcutter AFTER b43-fwcutter is installed first?  COMMAND:  sudo dpkg -i /media/UBUNTUSB/pool/main/b/b43-fwcutter/*   RESULT:  (Reading database ... 122496 files and directories currently installed.) Preparing to replace b43-fwcutter 1:012-1build1 (using .../b43-fwcutter_012-1build1_amd64.deb) ... Unpacking replacement b43-fwcutter ... Setting up b43-fwcutter (1:012-1build1) ... --2017-03-29 10:43:33--  http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o Resolving downloads.openwrt.org... failed: Name or service not known. wget: unable to resolve host address `downloads.openwrt.org' dpkg: error processing b43-fwcutter (--install):  subprocess installed post-installation script returned error exit status 4 Processing triggers for man-db ... Errors were encountered while processing:  b43-fwcutter   *BTW: I'm pretty sure firmware-b43-installer is not an option on Ubuntu v10.

How can I install firmware-b43-installer driver if I can't connect to internet by wire?


How to create a new file merging the columns from two separate files  with the same beginning information, but different number of lines   For example:   File 1:  *row*   *col*   *A*     1       0      23  1       1      34  1       2      34     File 2:  *row*   *col*   *B*   1       0      100  1       2      110     Merged file:  *row*   *col*    *A*    *B*  1       0       23     100                1       1       34  1       2       34     110

How can I add another 2 values after matching the values from 2 columns in another file just like VLOOKUP?  Sample below. Value in column 6 & 7 from file1, when matched with column 1 & 2 from file2, will add column 9 & 10 in file1 with the value of column 3 & 4 from file2.  file1.txt  1 1 1 1 1 5 9 1  2 2 2 2 2 7 8 2  3 3 3 3 3 7 7 3  4 4 4 4 4 8 6 4   file2.txt  5 9 A B  8 6 E F  7 7 G H  7 8 C D   output.txt  1 1 1 1 1 5 9 1 A B  2 2 2 2 2 7 8 2 C D  3 3 3 3 3 7 7 3 G H  4 4 4 4 4 8 6 4 E F   Thanks,


I was following a tutorial on throttling and this was the code the guy used. However I am unable to understand how the code functions. Shouldn't last be set to zero every time we call throttle? const throttle = (fn, delay ) => {     let last = 0     return (...args) => {         const now = new Date().getTime();         if(now-last<delay){             return;         }         last=now; //how does this work - wouldn't last be set to zero the next time the function runs?          return fn(...args)     }    } document.getElementById('myid').addEventListener('click',throttle(()=>{     console.log('you clicked me') },5000))

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


I am trying to obtain the  in my Beamer presentation. Since the relative RGB combination should be {0,150,136}, I wrote this in the beginning of my .tex file: \usetheme{Warsaw} \definecolor{mygreen}{rgb}{0,150,136} \usecolortheme[named=mygreen]{structure}  But instead of obtaining this desired colour:  I obtain this one:  What am I doing wrong? What values should I use instead to obtain that darker shade of green?

I am trying to define an rgb color. More specifically I want to create this color    which in rgb mode it's (98,190,177).  I tried to define this color using the following code  \documentclass{standalone}  \usepackage{tikz}  \begin{document}  \definecolor{tank}{rgb}{0.098,0.190,0.177}  %\definecolor{tank}{rgb}{98,190,177}  \begin{tikzpicture}   \coordinate (tank) at (0,0);   \draw[red, fill=tank] (-2,0.5)--(-0.5,1)--(0.5,1)--(2,0.5)--(2,-0.5)--(0.5,-1)--(-0.5,-1)--(-2,-0.5)--cycle;  \end{tikzpicture} \end{document}   but the output is totally different from what I am trying to achieve    I also tried to use \definecolor{tank}{rgb}{98,190,177} but I get no color at all. How to properly define an rgb color?


I am very new to Blender. I have an irregular-shaped object which is a tumor (Figure 1). In order to completely remove the tumor from patient's body, some healthy-looking structures around the tumor also needs to be taken together with the tumor. The margin of the actual removal is 1 cm away from tumor's surface in all aspects (Figure 2). The hand-drawn images are used for illustration I have done the segmentation and reconstructed tumor on Blender (Figure 3 - don't worry about the cubical part, it's not important). Now I would like to develop the removal mass from the tumor by increasing the tumor object size so that the new object surface will be 1 cm away from the tumor object surface. Could you please show me how to do that? Thank you very much

So I made this structure by subdividing a plane and elevating parts to make hallways:    Then I realized that I wanted to make the walls have a certain thickness.  Is there a way to do this?  Extruding didn't really work for me.


I fail to print out any question with answers on any SE site without considerable trouble.  Simply printing it out results in only the first page (paper page, not WWW page) being printed. For reasons beyond my comprehension the rest is truncated.  More manual approach to printing (copy&pasting to an office suite document) is possible, but is a PITA.  Any chance for this to be fixed? I must admit being able to print out some questions is pretty important for me for personal reasons.  Happens at least on the recent version of firefox and has been happening for quite a long time now. I don't have time to test other browsers atm, but will test MSEdge in the evening.

I used to print Q&A pages to keep a base of PDFs. I used either the 'print edit' addon or simply the print function of Firefox, which both allow to print a webpage in a file.  Usually the printed file for a webpage extends on 2 or 3 pages. But I'm not able to print more than one page on this site expressly anymore. No matter the method. I just get the top of each discussion.


Consider the following code snippet:  name1 = "Nadya" name2 = "Jim"  def print_string():     string = f"{name1}\n\ {name2}"     print(string)  print_string()   which produces  Nadya Jim   This works, but the 'break' in indentation on the second line of the string definition looks ugly. I've found that if I indent the {name2} line, this indentation shows up in the final string.  I'm trying to find a way to continue the f-string on a new line and indent it without the indentation showing up in the final string. Following something similar I've seen for ordinary strings, I've tried  name1 = "Nadya" name2 = "Jim"  def print_string():     string = f"{name1}\n"              f"{name2}"     print(string)  print_string()   but this leads to an IndentationError: unexpected indent. Is what I am trying possible in another way?

I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax?  For example, adding a bunch of strings,  e = 'a' + 'b' + 'c' + 'd'   and have it in two lines like this:  e = 'a' + 'b' +     'c' + 'd'


I have this body: \begin{center}   \includegraphics[scale=0.8]{image.png}   \captionof{figure}{Image Caption} \end{center}  But I'd like to simplify it to: \mygraphics[scale=0.8]{image.png}{Image Caption}  with: \newcommand{\mygraphics}[2][???]{%   \begin{center}%     \includegraphics[???]{#1}%     \captionon{figure}{#2}%   \end{center}% }

I have made a command  \newcommand{\mysec}[2]{%  \textbf{#1} \\ #2 }   I use it with \mysec{A}{B}.  But sometimes I also want a third parameter. I could make a whole new command for those situations where I need 3 parameters. But I thought if I could handle it with an optional parameter in my original command?  So I have to check if the third parameter is set and how to print if it is set.


So far I have  Assume $a,b,x,y$ are integers; $\frac xy$ is rational; and that $\frac xy$ is in simplest form.  WTS: $\frac xy$ is integer  So $(\frac xy)^2 + a(\frac xy) + b = 0$;  ${x^2\over y^2} = -b - a(\frac xy)$;  $x^2 = -by^2- axy$;  $x^2 = y(-by - ax)$;  so $y$ divides $x^2.$  I am having trouble on how to show that $\text{gcd}(x,y)=1.$

I have tried as follows. Please help to double check the proof! Thank you!  Since $x=p/q$ ($p$, $q$ are integers), $(p/q)^2+(p/q)a+b=0$  So, $(p/q)^2=-b-a(p/q)$  then, $p^2=-bq^2-a(p/q)q^2$  and, $p = \dfrac {q(-bq-a(p/q)q)}{p}$  now, it is clear that $q \mid p$, thus $p/q$ must be an integer.


I've seen quite a few users have this on their profile description.    It looks an image format of the user with his rep and badges. So, what is it exactly? How can I add this to my profile?

How do you put a card like this on your profile?    Which groups all your Stack Exchange sites' reputation points, medals and icons.    Is there a minimum reputation check for an Icon to appear on the card?


[WARNING]    java.lang.NoClassDefFoundError: org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume$1       at org.eclipse.jetty.util.thread.strategy.ProduceExecuteConsume.produce(ProduceExecuteConsume.java:58)       at org.eclipse.jetty.io.ManagedSelector$2.run(ManagedSelector.java:97)       at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)       at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)       at java.lang.Thread.run(Thread.java:745)   This is the Warning i get when running Jetty:run in eclipse. Is there any way to fix that ? Jetty server wont start and it wont terminate. I am using 9.4.0.MO Jetty server and previously it worked just fine.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I'm constructing a Deck and I want to make all the mana Temple Cards. More Specifically I want them to be , , and . Are these mana cards limited to only four per deck like regular cards or can you put an unlimited amount of them in your deck?


In the following sentence ( taking it as an example )     Everyone applying for scholarship has to fill the form. He/She must also provide his/her result card with his/her form.    I am wondering, can I possibly use some word instead of "He/She" and "his/her" which will provide the same meaning? ( I need a word if possible. I know that changing the structure of sentence can be done to avoid using he/she and his/her )

I know that one can use "they" / "them" / "their" in place of "he" / "him" / "his" or "she" / "her" / "hers" when the subject's / direct object's gender is not known; for instance, just looking at the default user's about me section on Stack Exchange sites:     Apparently, this user prefers to keep an air of mystery about them   My question is what happens when someone wants to reference the subject using a pronoun instead.  Should the verb be conjugated accordingly to the pronoun? E.g.:     Apparently, they prefer to keep an air of mystery about them   Or should the conjugation be retained? E.g.:     Apparently, they prefers to keep an air of mystery about them   The former looks unclear because it wouldn't allow the reader / listener to understand if the writer / speaker is talking about a single person or about a group of people, however the latter sounds very weird, at least just to the non-native speaker which I am.


I have a Centos7 server in which when executing the command df -h the occupied disk space is of 90GB but if I do a du -sh / * the sum of all directories does not correspond to 90GB, in this case it is around 60GB.  What could be causing this difference in occupied disk space values?

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown.  However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some Samba mounts).  So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?  I rebooted the machine for a fsck that went w/out errors. Should I run badblocks? lsof shows me no open deleted files, lost+found is empty and there is no obvious warn/err/fail statement in the messages file.  Feel free to ask for further details of the setup.


I'm having trouble trying to buy land in Falkreath.  I am level 30 and I am the Thane of Falkreath, yet when I try to buy the land from the steward, it will not give me the option of buying land.  I am playing the legendary edition on Xbox 360.

I am playing Skyrim on the Xbox 360 and experiencing a major glitch.  Here is my current situation:  My character is currently at level 75 and I am Thane in the following cities:   Winterhold Windhelm Falkreath Solitude Morthal Markarth Dawnstar Riften   I downloaded Hearthfire DLC around level 60 and received two notices from the courier:   Adoption letter Letter from Steward in Falkreath about buying land   I ignored both letters and went about my business (messing up trolls and skeevers).  I eventually grew tired of that and finished the Dark Brotherhood quests.  After the last mission, I made my way back to Falkreath and talked to the steward.  But, no matter what I do, I cannot buy land from the steward! WHY!? I am holding a note that says I can buy land in Falkreath.    I even threw the note at , the Jarl's incompetent steward, hoping she would realize the error of her ways, but to no avail.  I have no miscellaneous tasks left so it is not a matter of doing favors for the Jarl. My last major save was 15 levels ago and I would prefer not to restart the game from scratch.  Has anyone else experienced this? Any suggestions on what to do??


How does this function() in addEventListener work, with regards to the arguments I can pass in? someObj.addEventListener("click", function(someVar) { });  What is someVar, and is there a way for me to pass in a variable I want? I can't just define it above because I am calling addEventListener inside of a forEach function..

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


I have installed Ubuntu 14.04 which comes with Python 3.4 installed by default. But I wish to downgrade it to Python 3.3 for my needs. However, when I try to remove it, it also wants to remove other packages along with it which seem to be using Python.  Is it possible to safely downgrade the default version of Python? What other options do I have in this regard?

When I eventually upgrade to 11.04 I will need to install Python 2.6 for development purposes. The 11.04 default is 2.7. Can I just install the python2.6 package alongside the default python package? I don't want anything else to depend on it, I need it for only one purpose. I will be using Distribute and virtualenv to install any further dependencies for Python 2.6.


I created a partiton on my hard drive (160GB) and then made used Universal USB Installer to make it bootable for Ubuntu 16.04. So I restarted my PC and displayed ubuntu install options. Then I clicked on install ubuntu and gives the error End Kernel panic -not syncing: VFS: Unable to mount root fs on unknown-block(2,0). I also tried to boot from first hard drive but it also failed. So I'm stuck at the ubuntu install options.  How can I resolve this?

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


Which one is right?       1 I'm free Thursday.   2 I'm free on Thursday.   I thought if you want to say that something happens during a particular day, you should use on, as in 'They’ll be here on Tuesday.' But I came across the title sentence without on, and now I don't know exactly when to use on before a specific day and when not to!

I came across an English learner writing     It snowed hard Monday.   After saying that it didn't snow on Friday and Saturday.  It didn't quite feel right to me.  I'd be okay with     It snowed hard.   or     It snowed Monday.   Is it okay for there to be two things ("hard" and "Monday") modifying the snowing without an "on" breaking things up a bit?


In the picture below (taken from ), it is explained what the clock signal would look like depending upon the value of Driver and Series Resistance value compared to the transmission line impedance.   The video explains what the clock would look in each of the cases. I am trying to understand WHY?  Clearly, I am learning Transmission lines so any pointers or help would be helpful.

I am a licensed radio amateur, and find bewildering the many different explanations, which range from folksy urban myth to Maxwell-Heaviside Equations, of what happens at the termination of a transmission line or feeder. I realise that they all come to the same thing in the end (or should do, pun perfect), but none of them give me a gut feeling for what is going on.  I like diagrams, so an answer in terms of (graphical) phasors for the currents and voltages at the load would suit me best. How, for instance, does a step pulse down the line cause twice the voltage at an open circuit termination? Similarly for current at a short circuit. And how is the reflected step generated by the inductance and capacitance of the line?  Can anyone help, without getting all mathematical, and not telling any "lies to children"?


So my Lenovo G50 is running as standard with 4 GB RAM. I have got the idea to make an upgrade and when I have Ubuntu on the Lenovo G50 I was thinking this was the right place.  How many RAM does Ubuntu supports?  I have found this:

I have just downloaded "ubuntu-14.04.1-desktop-amd64.iso" and "ubuntu-14.04.1-server-amd64.iso" through "".   Please can someone confirm the maximum RAM that is supported.  According to many sites, Maximum RAM supported by the OS  ubuntu-14.04.1-desktop : " 2^64 bytes " -- Kindly confirm  ubuntu-14.04.1-server : " 2^64 bytes " -- Kindly confirm


I accidentally attacked the moth priest in Dawnguard. How do I settle him down? I've got it on PS3.

So whilst going to rescue the Moth Priest 'Dexion Evicus', I think I accidentally might have hit him, not sure how. Anyhow the bearded maniac has taken this as a personal attack and refuses to accept a yield. Because he's so angry with me he'll just not quit, but being a quest NPC he can't die, nor can my companion Mjoll. So aside from the hilarious infinity battle, I thought, fair enough I'll talk to him whilst he's 'downed' and lo, I progressed the quest.  So I go back to the Dawnguard fortress, and he's there in the middle shouting murder and attacking everyone in the fortress! Clearly his rage knows no bounds.    Is there a way to forcibly pacify him without interring him? Or do I need to roll back and do over?


I searched stack and net for use gif in beamer presentation. most of result are about at-least for two or three years ago. most of them used converted images, and some of them had serious problem with frames, autoplay, footline and so on. now my question is after these years there is not a simple way to use gif in beamer presentation. if problem is with readers is there any plugin for reader softwares to handle this problem?  as you see this  asked 2 years ago but still do not have best answer mark.  as matter of fact I hope there be a way that \includegraphic support gif or new command or package created to solve this issue.  using gif in presentation is very common today, and still hope developers who are joined this site pay much attention to it.

I'm very new to presentations in LaTeX (I've been using PowerPoint for years but have finally converted). I am wondering how to get a GIF into a section. If need be, I can convert a GIF into lots of pictures and have them overlay to give the impression of movement.


Where can I find a reference to the proof of the fact that a $\sigma$-algebra $\mathcal{G} \subset \mathcal{F}$ is countably generated if and only if there is a random variable $X$ such that $\mathcal{G} = \sigma(X)$? There is not a proof in Durrett's Probability: Theory and Examples, of which I am reading right now, and searching online, there doesn't seem to be a complete proof of this fundamental fact anywhere on this site either.

Suppose I have a sigma algebra which is countably generated. I want to find a random variable such that it is generated by that random variable. If the countable class is just a single set then my random variable is indicator function. But, how to do in this case ? If we sum up all the indicators to define our random variable then the sum may diverge. How to make sure it converge ?


Recently, I am studying whether C language is strong type language or not.  As far as I know, it is said that C language cannot be strongly typed language due to Union, void pointer, and type casting operator, but I couldn't find a detailed explanation for the specific example.  Could you explain it by giving an example with a specific code?

To quote :     Two commonly used languages that   support many kinds of implicit   conversion are C and C++, and it is   sometimes claimed that these are   weakly typed languages. However,   others argue that these languages   place enough restrictions on how   operands of different types can be   mixed, that the two should be regarded   as strongly typed languages.   Is there a more definitive answer?


I have a desktop computer and a lot of external hard disk cases. I coiled all cables to make them organized and easy to clean. But an electrician told me; if you are using a cable, coiling (wrapping) cables is wrong. It could damage your computer, electronic devices, etc. You should un-wrap cables of devices if you want to use them. So;  Are there any bad effects of coiling electrical cables?  Note: I found this on a Stack Exchange site, but still I'm not sure enough:   A quick answer that I learned; If cable is long and power usage will be high (up to 200 W), don't use a coiled cable. It melt and start a fire.

What aspect using a coiled extension cord makes it more dangerous than using an unrolled power cord.  Many fire safety websites reference that an extension cord should not be used while coiled.  Is this due to the cord acting as an air core inductor (I can't really see why this should cause fires). If this is the case, if every second loop is in the opposite direction is it safe.  My theory is that if the cord is getting heated from high current draw, when coiled all of this heat is in a much more condensed location, causing a greater temperature rise than if the cable was unrolled.  Is it dangerous, if so what is the cause. Am I missing anything, do parameters like loop size, loop direction etc make any appreciable difference.


I have the problem given in Irodov stated as follows   Two positive charges $q_1$ and $q_2$ are placed a distance $r$ apart in air, now a dielectric slab of thickness $t$ $(t\lt r)$ with relative permittivity $k$. Find the force of electrostatic interaction between the two charges.   My question is what effect does the dielectric have on the field outside the dielectric medium.  The answer which I had been directed to just states the dielectric behaves as though it's thickness was t√k, but there is no mathematical proof for that. Hence, I request for a proper mathematical proof for the effect.

I am given two charged particles of same charge at a distance of $r$. They initially apply force $F$.  Now an infinite dielectric (of dielectric constant $4$) of width $\frac{r}{2}$ is introduced between the particles. What will be the new force?   I find this problem confusing because I have only been told about forces when its either fully dielectric or fully vaccum given by Coulomb's law. How do we get forces when only partial space is dielectric?


Hi I have an array like below.    $arr = Array ( [My_name] => Sam [My_location] => United_Kingdom [My_id] => 1 );   And im trying to change the keys from     My_name, My_Location, My_id   to    Your_name, Your_Location, Your_id   So the final array would look like    Array ( [Your_name] => Sam [Your_location] => United_Kingdom [Your_id] => 1 );   I was hoping something like str_replace would work     $arrnew = str_replace("My","Your",$arr);   But this is only replacing "My" to "Your" if "My" is a value, not a key.  So how would I change the keys?  Thanks for any help.

Is there a way to change all the numeric keys to "Name" without looping through the array (so a php function)? [     0 => 'blabla',     1 => 'blabla',     2 => 'blblll',     // etc ... ]


Which variant is correct grammatically and is used more often among native speakers?

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


Getting 'unable to resolve host' error and need to change name. How do I do this?  Hostname is brian-HP-G60-Notebook-PC  $ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   linux  # The following lines are desirable for IPv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters   Think my hostname is way to difficult to remember :-)   No need for security on this machine.   Beginner in Linux so explicit help would be appreciated.

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


I just want to know if there are any other tools available in QGIS apart from the Point Sampling tool to extract elevation data from ASTER/SRTM/CartoDEM (for India) data? When I convert these images to XYZ, I can see 1 to 2m differences in certain points with respect to the Point Sampling tool results. More over, the results obtained through point sampling are integers, not decimals like that of the extracted XYZ.

How can I extract values from a raster by points?  I prefer not in Arcgis.   I prefer in Qgis or Mapwindow or other open source gis.


Say I have 4 arrays:  a = [1,2,3] b = [1,2,3,4] c = [1,2,3,4,5] d = [1,2,3,4,5,6]   I could iterate like so:  tups = []  for i in a:     for j in b:         for k in c:             for l in d:                 t = i,j,k,l                 tups.append(t)   tups would then be an array of tuples and  will look something like this:  1,1,1,1 1,1,1,2 1,1,1,3 ... 1,1,1,6 ...   This seems rather long winded and I feel that there should be a faster/more efficient way of doing this, but I'm not really a python expert.  How can I make this faster, without looping over each array? Is there some functional approach which I can use?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I'm trying to create an animation, everything is set up in the animation, including the composition. However since creating it, I wanted to add a logo at the end. I've created the logo and put it into the scene. However when it's on it's own and has it's own personal lighting it looks much better. In the scene the lighting which is needed for the rest of the animation to look good ruins it. Is it possible to fix this?  The compositor nodes, the logo in the scene and the logo before it goes into the scene is as follows:      As you can see the quality of the initial image (even though all settings are the same) is bad when it's placed into the new environment. It no longer looks metallic or shiny.  Ideally i'd like the stars (which are caused by another scene and added in the compositing section) to not shine through the Logo either. So it essentially blocks out the light from behind it.  The light at the moment is coming from two sources, One placed just above and behind the camera at an angle, and one just behind and below the text.  Just for context in case it's needed: The logo spins in from the background to the foreground landing just behind the text which is placed right up against the "lens".  Thank you for any help :)  Edit: Thank you cegaton, the link you posted solved my problem with the stars and already it looks MILES better. Thank you so much for that.  Still struggling to make the D Logo look Darker and more metallic. Going to have a mess around with angles and moving the lights to see what I can come up with. Thank you though cegaton. Big Help!

I have multiple scenes each with different objects. I want to combine all these scenes in the compositor but when they render, all the objects from each scene overlap each other and are all transparent, so I can see all the objects when some should be hidden behind others.   To join my scenes I'm using a mix node with add.


Is it possible to change the inode of a file. What are the different conditions when the inode of a file can be changed ?

When a file is updated then the corresponding inode gets updated. But sometimes the following condition occurs    file is same and inode is new  file gets changed but corresponding inode is older   Why ?


Let $d$ be a metric on $X$ and $(X,d)$ a non-compact metric space i.e. $X = \mathbb{R}$ or $\mathbb{Q}$   For $x,y \in X$ define   $$ \tilde{d}(x,y) := \begin{cases} d(x,y), & \text{if }d(x,y) < 1, \\ 1,      & \text{else.} \end{cases} $$   Show that $\tilde{d}$ is metric on $X$.   My attempts  Because $d$ is a metric, $\tilde{d}(x,y) \ge 0$ for all $x,y \in X$. If $x = y$, we have $d(x,y) = 0 < 1$ and therefore $\tilde{d}(x,y) = 0$ If $\tilde{d}(x,y) = 0 \neq 1$, we have $\tilde{d}(x,y) = d(x,y) = 0$ and therefore somit $x = y$.  This metric is trivially symmetric, since $d$ is.  Let $x,y,z \in X$.  Case 1: $d(x,z) < 1$. Then we have             $$     \tilde{d}(x,z)     = d(x,z)     \le d(x,y) + d(y,z).    $$  Case 2: $d(x,z) \ge 1$. Then, we have             $$     1     = \tilde{d}(x,z)     \le d(x,z)     \le d(x,y) + d(y,z).    $$  But I know know how to continue from here, I know that we have $\tilde{d}(x,y) \le d(x,y)$ für alle $x,y \in X$, but I don't know how to use it.  Is my approach for the positive definiteness and symmetry correct? How can I prove the triangle inequality?

The actual problem looks like-     Let, $(X,d)$ be a metric space where $X\ne\emptyset$. Define $d_1$ and   $d_2$ on $X\times X$ by $d_1(x,y)=\frac{d(x,y)}{1+d(x,y)}$,   $d_2(x,y)=\min\{1, d(x,y)\}\quad\forall(x,y)\in X\times X.$(It is easy   to verify $d_1,d_2$ are two metrics on $X$.) Show that, $d_1, d_2$ are   equivalent metrics on $X$.   Firstly, I'll use the standard theorem to prove two metrics on a non-empty set are equivalent- Two metrics $d_1$ and $d_2$ on a non-empty set $X$ are equivalent if and only if for each $x\in X$ and each open ball $B_{d_i} (x,r)$ in $(X,d_i)$(for some $r>0$), there is an $s>0$ such that $B_{d_j} (x,s)\subseteq B_{d_i} (x,r)$, for $i, j=1,2$ and $i\ne j$. Now, to solve the problem, I break it into to parts- If I can show that both of $d_1,d_2$ are equivalent with the metric $d$, then we are done. I'm able to show $d$ and $d_2$ are equivalent in the following way- Let, $x\in X$ and $B_{d_2} (x,r)$ be an open ball in $(X, d_2)$ for some $r>0$. Then $B_{d} (x,r)\subseteq B_{d_2} (x,r)$. Again, if we take an open ball $B_{d} (x,t)$ in $(X,d)$ for some $t>0$. Then $B_{d_2} (x,s)\subseteq B_{d} (x,t)$, where $s=\min \{1,t\}$.  But how to show $d_1$ and $d$ are equivalent metrics in $X$? Can anyone assist me to prove $d_1$ and $d$ are equivalent metrics on $X$? Thanks for your help in advance.


I am trying to run bash script:  export LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH export SUBJECTS_DIR=/output timefmt="%C --- CPU:\t%E real,\t%U user,\t%S sys\t%P\tMem:\t%KkiBavg.,\t%MkiB max.\tExit:\t%x" all_ids=() for dirname in /input/*; do  id=${dirname#/input/}    # remove "/input/sub-" id=${id%/}             # remove trailing "/"  printf 'Adding ID to recon-all processing list: %s\n' "${id}" >&2 if [ ! -e "/output/$id" ]; then     # no output file corresponding to this ID found,     # add it to he list            all_ids+=( "$id" )     /usr/bin/time -f "$timefmt" \     recon-all -s "${id}" -i /input/${id}/unprocessed/3T/T1w_MPR1/${id}_3T_T1w_MPR1.nii.gz -i /input/${id}/unprocessed/3T/T2w_SPC1/${id}_3T_T2w_SPC1.nii.gz     printf 'Series with t1 found, subjects matched: %s ; %s ; %s\n' "${id}" fi done  printf 'Found ID: %s\n' "${all_ids[@]}" >&2  printf '%s\n' "${all_ids[@]}" | parallel --jobs 6 --timeout 300% --progress recon-all -s {.} -all -qcache   I made a docker container and it executed without any result, it just goes to the place and prints printf 'Adding ID to recon-all processing list: %s\n' "${id}" >&2, how ever if i run it with entrypoint=bash option with seperated command it executed properly.  Output of bash -x script.sh:  + for dirname in '/input/*' + id=102311 + id=102311 + printf 'Adding ID to recon-all processing list: %s\n' 102311 Adding ID to recon-all processing list: 102311 + '[' '!' -e /output/102311 ']' + all_ids+=("$id") + /usr/bin/time -f '%C --- CPU:\t%E real,\t%U user,\t%Ssys\t%P\tMem:\t%KkiB avg.,\t%MkiB max.\tExit:\t%x' recon-all -s 102311 -i /input/102311/unprocessed/3T/T1w_MPR1/102311_3T_T1w_MPR1.nii.gz -i /input/102311/unprocessed/3T/T2w_SPC1/102 311_3T_T2w_SPC1.nii.gz  + printf '%s\n' 100408 100610 101006 101107 101309 101410 101915 102008 102109 102311 + parallel --jobs 6 --timeout 300% --progress recon-all -s '{.}' -all -qcache

Suppose the default shell for my account is zsh but I opened the terminal and fired up bash and executed a script named prac002.sh, which shell interpreter would be used to execute the script, zsh or bash? Consider the following example:  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % sudo cat /etc/passwd | grep papagolf [sudo] password for papagolf:  papagolf:x:1000:1001:Rex,,,:/home/papagolf:/usr/bin/zsh # papagolf's default shell is zsh  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % bash # I fired up bash. (See that '%' prompt in zsh changes to '$' prompt, indicating bash.)  papagolf@Sierra:~/My Files/My Programs/Learning/Shell$ ./prac002.sh  Enter username : Rex Rex # Which interpreter did it just use?   **EDIT : ** Here's the content of the script  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % cat ./prac002.sh  read -p "Enter username : " uname echo $uname


The following XML fragment has incorrect syntax highlighting for comments and nested attributes:    <style name="MyApp.ActionBarTheme" parent="@style/ThemeOverlay.ActionBar">     <!-- This comment should be grey -->     <item name="colorControlNormal">@color/my_awesome_color</item> </style>   The following similar fragment looks better:  <stylez name="MyApp.ActionBarTheme" parent="@style/ThemeOverlay.ActionBar">     <!-- This comment should be grey -->     <item name="colorControlNormal">@color/my_awesome_color</item> </stylez>   Spot the difference. By changing <stylez> to <style>:   Comment text is black instead of grey The item element is black instead of brown The item.name attribute black instead of red The item.name attribute value is brown instead of blue   Here's a META image of this post, for reference if using a different theme, or for when this issue is fixed:

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I am trying to get current UTC date time in millis. But every code I used for this returns me the device's current date time. When I chenge my device's date, time it shows me chenged one. So, I want to get GMT/UTC date time so that it will show me correct date even if user changes the date, time of his/her device.  Codes I tried:  Calendar calendar = Calendar.getInstance();         long now = calendar.getTimeInMillis();   and  DateFormat df = DateFormat.getTimeInstance();         df.setTimeZone(TimeZone.getTimeZone("UTC"));         String gmtTime = df.format(new Date());         Date gmtDate = df.parse(gmtTime);   Actually I want to set an alarm at November 15 2017, 5 PM using AlarmManager, receive that event hide some activities in my app which I don't want to show after this date, time.  How can I acheive this?  Thanks in advance!

When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT?


Being the "family freeloader," as Tom liked to call himself, he felt as though he had no right to complain.  Should the comma come after the quotation marks, or is the current placement correct? Should there even be quotation marks at all?

In , I used quotes to demark specific terms, but after I posted the question, I wondered if I'm doing it right.  Usually, when quoting something a person says, the quotation mark goes after the comma or period, like so:     "This is my opinion," she said.   However, I sometimes use quotes not to represent something said by anyone, but instead for delineating a set term or phrase to make it clear that those words go together and none of them should be mistaken for a part of the rest of the sentence. Like this:     Should I say "stand up", "standup", or "stand-up"?   This looks weird to me:     Should I say "stand up," "standup," or "stand-up"?   ... but maybe I'm wrong about the rules.  Is it correct to use quotes in this way? And if so, are the quotes positioned correctly relative to the other punctuation marks?  Are there other alternatives for delineating terms without the use of quotes?


I have a view which uses a custom field called article type as it's sorting criteria to sort articles. This article type field, has the following options:  0Editorials|Editorial 2Feature|Feature 5Spotlight|Spotlight 6Special|Portraits 3Perspective|Perspective 8Research in Translation|Research in Translation 7Columns|Column 4Interviews|Interview 1PhotoEssay|Photo Essay 0Introduction|Special   The reason I have a number preceding the text in every option is so that, when I use this field as a sort criteria and choose the order as ascending, Views actually looks for the key text and arranges the results in that order (0 to 8 in this case).  Now, I want to achieve this same order without having to tamper with the key|value pairs like I have done. I have heard of Draggable Views, but I'm not sure that solves the issue here, since this view takes a contextual filter value and the results are always dynamic based on the filter value that is passed to it from the URL.  So is there another way to use a select list's options as a sorting criteria, but in an order that we want it to be in?

Take a look at the  and the Priority column.  If sorted in descending order you get critical, major, normal, and minor issues, in that order.  Since "normal" would not go between "major" and "minor" in alphabetical order, they've obviously defined a custom sequence to use for sorting.  How is this done in Drupal?  Is it merely sorting based on a numeric value that is not displayed?  Or is it more clever than that?


As an alternative to winbindd, I have setup SSSD on a machine so that it can authenticate AD domain accounts, which is working great. However, this same machine also needs to act as a file server, so I believe I need to have SAMBA running (with winbindd not running).   The clients which need to access the file share are not joined to the domain, however I want the clients to authenticate with the server using AD credentials.   Is it possible to have a server which is joined to a domain with SSSD and sharing files using SAMBA, also have clients that are not joined to the domain access said shares using AD credentials?  /etc/samba/smb.conf      [global]        workgroup = DOMAIN        kerberos method = secrets and keytab        log file = /var/log/samba/%m.log        log level = 3        passdb backend = ldapsam:"ldap://domain.net"        realm = DOMAIN.NET      [files]        guest ok = yes        path = /srv/files        read only = no   I am attempting to mount the share from the client using the following command:  mount.cifs //192.168.1.101/files /mnt/ -o user=user,pass=password,domain=domain.net   Here is a cleaned up log of the access attempt from the server side:  get_dc_list: preferred server list: "ad.domain.net, ad.domain.net" Connecting to 192.168.1.100 at port 445  check_ntlm_password:  Checking password for unmapped user [domain.net]\    [user]@[] with the new password interface check_ntlm_password:  mapped user is: [computername]\[user]@[] check_sam_security: Couldn't find user 'user' in passdb. check_winbind_security: Not using winbind, requested domain [computername] was for this SAM. check_ntlm_password:  Authentication for user [tevans] -> [tevans] FAILED with error NT_STATUS_NO_SUCH_USER  NT error packet at ../source3/smbd/sesssetup.c(267) cmd=115 (SMBsesssetupX) NT_STATUS_LOGON_FAILURE Server exit (failed to receive smb request)

My company has asked me to look into connecting our CentOS 7 instance's to our Active Directory to make it easier for user management.  I have so far looked at:   Kerberos, doing it via command line -   OpenLDAP -     Is there any other tool or resource I should look into to do my due diligence?


I have seen multiple times that physicists used a formula to find the number of vacua in string theory, What formula was used to calculate the number of vacua in string theory? How did they arrive at 10^500? This is somewhat different from the question of why string theory has such a large landscape; I am asking for the mathematical details of the situation not just the logic. I want to know what math led to this, not "because there are a lot of manifolds"

I was browsing through Foundations of Space and Time, a compilation of essays on various theories of quantum gravity. The following passage in the introduction intrigued me:     Each compactification leads to a different vacuum state.... at least one state should describe our Universe in its entirety.... the enormous number (~10^500 at last count) of solutions, with no perturbative mechanism to select mechanism to select among them, leads some critics to question the predictive power of the theory..Even more worrying is that, while the theory is perturbatively finite order by order, the perturbation series does not seem to converge.   I don't know anything about string theory and so I could not make head or tails this. All I know is that ~$10^{500}$    is a very large number.    What exactly is a 'solution' in string theory? Is it a spacetime metric of some sort or the terms of a S-matrix of some sort?   Why are there so many 'solutions'?  I thought string theory was supposed to be finite, why do perturbative series still diverge? Is there any experimental technique to limit the number of 'solutions'?   Will experimental techniques be able to pinpoint a solution within present day string theorists' lifetimes too? If not, how long will it take before we can experimentally probe these things?  Are string theorists completely relaxed about these issues? Or are they in anguish?


VirtualBox has a window showing the display of the guest OS. I am connecting to VirtualBox with Remote Desktop, so I don't need VirtualBox to show that window in the host OS.   Of course, I can minimize it, but is there a way to tell VirtualBox not to display that window?

I was wondering if it's possible to run an Ubuntu virtual machine using VirtualBox in background, I mean, without any window open.  The idea is to connect via SSH to the Linux host, that would be running in background.  Has anyone ever done something like this? Is it possible?


I want to apply a decorator to every method in a class. I don't have source code of the class, so I can't directly apply the decorator. I want to call some function that accepts the class and adds the decorators.  But the problem is testclass.__dict__ is a mappingproxy object and it doesn't support any assignment or modification, directly at least. So the question is how to avoid that restriction and apply decorator?  Here is code of the failed attempt:  class qwer:     def test(self):         print('test')  def decor(func):     def w(*args, **named_args):         print('decor')         func(*args, **named_args)     return w  qwer.__dict__['test'] = decor(qwer.__dict__['test'])   Error:  TypeError: 'mappingproxy' object does not support item assignment

I want to assign a class attribute via a string object - but how?  Example:  class test(object):   pass  a = test() test.value = 5 a.value # -> 5 test.__dict__['value'] # -> 5  # BUT: attr_name = 'next_value'  test.__dict__[attr_name] = 10 # -> 'dictproxy' object does not support item assignment


I have an error in this code  void f(list<CClass*> mylist,CP* Database,string namePoi){ //some code list <CClass*>::reverse_iterator ite;             for (ite=mylist.rbegin(); ite!= mylist.rend(); ite++) {                     mylist.insert(++ite,Database->getPointer(namePoi));//compiler error                 } }   The error is  : no matching function for call to 'std::list::insert(std::list::reverse_iterator&, CPOI*)' the lineDatabase->getPointer(namePoi)  is giving the right output but I think I m not using the right insert command because when I use a normal iterator(not reverse_iterator), it works perfect. Thanks

I want to insert something into a STL list in C++, but I only have a reverse iterator. What is the usual way to accomplish this?  This works: (of course it does)  std::list<int> l; std::list<int>::iterator forward = l.begin(); l.insert(forward, 5);   This doesn't work: (what should I do instead?)  std::list<int> l; std::list<int>::reverse_iterator reverse = l.rbegin(); l.insert(reverse, 10);


can  you help me with this error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.FloatingActionButton.setOnClickListener(android.view.View$OnClickListener)' on a null object reference                                                                     at com.sadface.tutorapp.FirstFragment.onCreateView(FirstFragment.java:23)   I want to handle FAB in fragment, so here's code:  FirstFragment.class  public class FirstFragment extends Fragment {  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {      View view = inflater.inflate(R.layout.fragment_first,             container, false);     FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);     fab.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)                     .setAction("Action", null).show();         }     });     return view; }   }  And fragment_first.xml :  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/holo_green_dark">  <TextView     android:id="@+id/textView3"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerHorizontal="true"     android:layout_centerVertical="true"     android:text="First Fragment"     android:textAppearance="?android:attr/textAppearanceLarge"/>  <android.support.design.widget.FloatingActionButton     android:id="@+id/fab"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_gravity="bottom|end"     android:layout_margin="@dimen/fab_margin"     app:srcCompat="@android:drawable/ic_input_add" /></RelativeLayout>   I read on stackoverflow, that i have use view.findById, but it isn't work, i don't understand what's a problem?

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


I have a directory which contains other directories and files of unknown depth. How can I delete only the content of the directory -- nested directories and files -- but not directory itself?   I've tried these and they didn't work - nothing was deleted:  rm -rf my_dir/*/* rm -rf my_dir/** rm -rf my_dir/*  # and cd my_dir rm -rf */*   How to do that?

I want to delete the content of a folder without deleting a folder: all files and all sub folders with sub files. This doesn't delete anything  sudo rm -rf /folder1/*   Why not? How to get it to work?


Is there a mathematical equation for:  2 + 2^2 + 2^3 + 2^4 + 2^5 + ... 2^n  I'm not sure what this type of pattern is called.

Firstly, this is a homework problem so please do not just give an answer away. Hints and suggestions are really all I'm looking for.  I must prove the following using mathematical induction:     For all $n\in\mathbb{Z^+}$, $1+2+2^2+2^3+\cdots+2^n=2^{n+1}-1$.   This is what I have in my proof so far:     Proof: Let $p\left(n\right)$ be $\sum_{j=0}^n 2^j=1+2+2^2+\cdots+2^n=2^{n+1}-1$. Then $P\left(0\right)$ is    \begin{align} \sum\limits_{j=0}^0 2^j=1=2^1-1.\tag{1} \end{align} Hence    $P\left(0\right)$ is true. Next, for some $k\in\mathbb{Z^+}$, assume    $P\left(k\right)$ is true. Then \begin{align}  \sum\limits_{j=0}^{k+1}2^j&=\left(\sum\limits_{j=0}^k  2^j\right)+2^{k+1}\tag{2}\\ &=2^{k+1}-1+2^{k+1}\tag{3} \\ &=2\cdot 2^{k+1}-1\tag{4}\\ &=2^{k+2}-1\tag{5}\\ &=2^{\left(k+1\right)+1}-1.\tag{6} \end{align}   Therefore, $P\left(n\right)$ holds for all $n$.$\;\;\;\;\blacksquare$   Is everything right? My professor went over the methodology in class quite fast (and I had a bit too much coffee that night) and I want to make sure I have it down for tomorrow night's exam.


Suppose I wanted to refer to a colleague of mine, a young man aged between his teens and maybe his 30s - I would use the phrase:  So there's this guy at work who...  However I am struggling to determine an equivalent for a young woman that retains it's informality and gendered connotation. Here are some possibilities I have thought of:  Young Woman: By specifying the age it resolves one of the problems above but it seems to make it even more formal. Girl: This could work if I was referring to a woman below the age of 18, but it would be very condescending to refer to an adult woman as a girl. Female: Far too formal - it sounds like something a doctor would say, and what's more appears to be a phrasing that online misogynists favour. It seems preferable to use "female" as an adjective only Chick: Very condescending; possibly bordering on misogynistic. Gal: It suffers similar problems to chick, and - though this may be regional - it seems to be quite an antiquated word Woman: Too formal, and (at least to me) would conjure an image of a middle aged woman rather than a young woman. This does, however, seem to me to be the best option because it doesn't come off as condescending.

I commonly use the word 'guys' to refer to a group of males colloquially. It's colloquial but not rude, off putting, condescending, patronizing (though I wouldn't use it with a group of men at a board meeting (hypothetically of course), unless I knew them). So, some that I would not consider as replacements would be    buddies: too old-fashioned dudes: too informal boys: too patronizing men, gentlemen: too formal or false respect   I realized that I had also been using it for any group of people, males and females, even just females. It worked for me and I didn't think of the gender implications, that women might not care for it. No one ever complained, directly or indirectly (rule of life: sometimes people don't complain about things they should).   But it occurred to me (maybe by reading something that sparked realization) that the intended hearers might not all care for it.  What might be a female gendered or non-gendered version of 'guys'?  Some that I've considered don't feel right about (though these may be reasonable answers) are:   dolls: too old-fashioned babes: too informal  ladies: too formal or I've heard from women, too creepy women: too factual girls: too patronizing (as much as 'boys') everyone, you all: too bland y'all: perfectly non-sexist but too regional (might work, but not everywhere)   Hopefully I haven't eliminated all the possibilities -- any suggestions?


I am doing some proofreading using an in-house style guide and the Oxford Style Manual as references. However, I cannot find a convention regarding whether to use chapter or chapters when expressing something like:     see chapter 2-4   Am I not reading the Oxford Manual thoroughly enough? Is it just chapters? This seems obvious but I am unsure.

In an academic text, I need to explain a section of a computer program. This section extends from line 10 to line 15 in the code. Is the following way to refer to these lines gramatically correct?   The scopes of the two declarations overlap from lines 10 to 15.   Or should I use one of these alternative forms:   The scopes of the two declarations overlap from line 10 to line 15. The scopes of the two declarations overlap in lines 10 to 15. Any other possibility?...   Because this need appears frequently in the text, this is not just a matter of choosing the safest approach. I woul like to know what is correct and what is not so that I can use some variation trhoughout the text.


I am trying to make a .desktop file that launches more than one app. This are the commands I tried:  Exec=appcmd & appcmd Exec=appcmd AND appcmd Exec=appcmd && appcmd

I'm running Gnome on Ubuntu 15.4.  I want to execute two or more actions at once, but let's try with two:   sudo pm-suspend gnome-screensaver-command -l   pm-suspend has been added and allowed to be executed without providing passwords by specifying:  %sudo ALL = (root) NOPASSWD: /usr/sbin/pm-suspend`   , and  have no references if having multiple Exec is possible, but unfortunately:  [Desktop Entry] _Name=Sleep and logout _GenericName=Sleep and logout  #Exec=gnome-screensaver-command -l & sudo pm-suspend # does not work  #Exec=gnome-screensaver-command -l #Exec=sudo pm-suspend                                # does not work either  Terminal=false Type=Application Categories=System;Security;   I'm open to any other suggestions how to achieve given functionality except:   make a script and run it as sudo or similar - I consider solutions basing on this insecure, let's not delve into that matter   use gnome power switch or whatever that is called (top right corner) - mine does not have an option to suspend   also, while I'd be happy to have that what is stated above, I'd be even more happy to have an answers that say how to launch multiple different commands (without script/compiling own binary etc), in case I'd like to bundle and automate some other actions.


private void respond(String response) {      httpServletResponse.setContentType("application/json");     httpServletResponse.setCharacterEncoding("UTF-8");      try {         PrintWriter out = httpServletResponse.getWriter();          out.print(response);         out.flush();      } catch (IOException ex) {         log.error("Error while writing response",ex);     }  }   This code throws null pointer at out.flush(). httpServletResponse is instance variable. I have verified that response is not null. This function is being called from inside Apache's aync http client lib's CloseableHttpAsyncClient.execute.completed().  LOG:  Caused by: java.lang.NullPointerException: null     at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:234) ~[tomcat-coyote.jar:8.0.14]     at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189) ~[tomcat-coyote.jar:8.0.14]     at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:177) ~[tomcat-coyote.jar:8.0.14]     at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739) ~[tomcat-coyote.jar:8.0.14]     at org.apache.coyote.Response.action(Response.java:179) ~[tomcat-coyote.jar:8.0.14]     at org.apache.coyote.Response.sendHeaders(Response.java:341) ~[tomcat-coyote.jar:8.0.14]     at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:331) ~[catalina.jar:8.0.14]     at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:313) ~[catalina.jar:8.0.14]     at org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:98) ~[catalina.jar:8.0.14]     at com.thruport.aje.rotator.reward.async.RewardRequest.respond(RewardRequest.java:185) ~[output/:na]     at com.thruport.aje.rotator.reward.async.RewardRequest.lambda$new$2(RewardRequest.java:131) ~[output/:na]     at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[na:1.8.0_121]     ... 8 common frames omitted


What is better for the eyes, a dark color theme or a white color theme?

I am using   (dark background with light text) in my application.    My question is, what are the negative and positive aspects of this color scheme and why this color scheme is not widely used?


Is it possible to put a new line character in an echo line in a batch file?  Basically I want to be able to do the equivalent of:  echo Hello\nWorld   You can do this easily enough in Linux, but I can't work out how to do it in Windows.

How can you you insert a newline from your batch file output?  I want to do something like:  echo hello\nworld   Which would output:  hello world


This is the simulation of a RL circuit with an AC source.   That AC source is connected with the circuit at the moment when the source voltage has zero phase angle with 5 volts peak.  It can be seen from the simulation that the peak voltage of the first half cycle (which is the transient I know) is less than the peak voltage of the negative half cycle and rest of the cycles.  I want to know whether that the peak voltage of the positive half cycle is less than the peak voltage of the rest of the cycles is because of any simulation error or is there any other reason?  Plus  When the value of the resistor is increased the transient current and voltage die off more quickly.  Please anyone tell me that why increasing resistance makes the transient to die off quicker?  Infact why resistance make the transients to die off?  I need detail answers of these question. So please if anybody can help!

If we connect an AC source with a pure inductor when AC source is going through 0 volts we get the following graph of the voltage and current.  There are few things in the graph about which i am confused.  In the first graph/diagram "A" of the picture which shows the voltage when it starts to flow and the corresponding current, the current doesnt seem to be lagging behind the voltage by 90 degrees. What is the reason behind that? Is the statement "current lags behind the voltage in an inductor BY 90 degree" is valid just for the steady state voltage shown in graph "B"?  Second confusion is that for the first half cycle of the voltage in graph "A", current is rising both for increasing and decreasing voltage. How is this possible that current is rising in the inductor for both increasing and decreasing voltage?


Minerva McGonagall's Animagus form is a cat. Her Patronus is also a cat. We know that James Potter was a stag Animagus, and his Patronus was a stag as well. I'm not sure if Sirius Black's Patronus ever appeared in the books, but I am pretty much sure it would have been a dog.  Is the form of an Animagus directly related to the form of a Patronus?  Just to clarify, in an instance that the Patronus changes (as it is ), does this mean that the Animagus form also changes?  Or is it impossible for both to change for an Animagus?

In the two examples shown of an Animagus capable of casting a corporeal Patronus (Minerva McGonagall and James Potter) both had the same animal as their Patronus and as their Animagus animal.  Now, it is also shown that extreme circumstances can change one's Patronus. I think the only example of this was Tonks, which turned from a jackrabbit into a wolf in response for her love of Lupin.  If Tonks (or any other wizard who had their Patronus change) had been an animagus, would her animagus have changed as well?


By router I mean consumer grade that combines router/switch/wireless ap etc. I have a primary router that from the ISP. I want to connect a second router to it via Ethernet cable. The second is to provide the wi-fi (the first would have wi-fi disabled) but I want both to keep Ethernet ports enabled. I know it's strange but this is what I want.  I tried to set it up but ran into trouble. What's the best approach, dmz, port-forwarding or bridging? I had issues with one device not being able to access DNS. Also I find it confusing whether to plug Ethernet into WAN or LAN port on the second router?

My primary router has trouble extending wifi coverage to some bedrooms in the house so I am planning to add a second router to extend the wifi network using the wired Ethernet ports in one of the areas of poor coverage. Basic layout -   The ISP's router is in my family room downstairs (fiber connection) and the internet connects to the fiber via a box in an upstairs closet.   I purchased and installed an unmanaged Ethernet switch/splitter. In the upstairs closet where all of the Ethernet wires meet, the family room Ethernet cable was plugged into the ISP's box. I disconnected this wire and replaced it with a CAT5 cable running from the ISP's box in the closet to the Ethernet switch's port 1.  I think connected the family room Ethernet cable to port 2 and did the same in order for all the remaining Ethernet cables to various bedrooms.   So far, the switch is working fine.  I have wifi working with internet coming off of the router in the living room so I believe the switch is installed correctly otherwise that wifi should not have internet coming off of the living room jack.   Here is where things go awry - I took my second wifi router and connected the WAN/Yellow port to the Ethernet wall jack in another bedroom.  I then connected a lap top to one of the Ethernet ports on this router and found "no internet" after connecting.  On a whim, I changed the connection so that the router was connected to the Ethernet wall jack in one of the white ports but with the same results.   I don't think this counts as cascading and I don't really need a new network since I do not share the connection with any non-family members.  The router has been reset to factory settings to clear out any old instructions - but I still can't get it to connect to the internet or access the router to change the settings even - it's a netgear and the routerlogin.net will not let me access the router even when I am on the working WIFI for internet and have a cable running from the laptop to the netgear router.   I could use some help - just trying to extend the wifi range and it seems like it should be much less complicated. Tried following instructions in several other posts and they did not work for me - because I cannot access the router to change any settings.


I am not from a DBMS background and I couldn't find much help from reading some resources once. I have a requirement like:  There are 5 interfaces with some execution time. My goal is to find the top 2 interfaces which took the most time.   RowNum   Interface    TIME    1        Intf1        0    2        Intf2        3    3        intf5        1    4        Intf2        4    5        intf3        3    6        Intf2        2    7        intf3        5    8        intf3        2    9        inft4        2   10        Intf2        0   11        intf5        1   The max time taken is 5 which corresponds to Intf3 (so print all intf3  with their times) and the second max time taken is 4 corresponding to  Intf2(so print all intf2  with their times). So my expected output is: RowNum  Interface   TIME   7       intf3      5    5       intf3      3    8       intf3      2    4       Intf2      4    2       Intf2      3    6       Intf2      2    10      Intf2      0    I tried something like select Row,Interface,Time  from (select Row,Interface,Time from NAMES order by Time desc)   but it didn't seem to work as I was expecting.

I often need to select a number of rows from each group in a result set.  For example, I might want to list the 'n' highest or lowest recent order values per customer.  In more complex cases, the number of rows to list might vary per group (defined by an attribute of the grouping/parent record). This part is definitely optional/for extra credit and not intended to dissuade people from answering.  What are the main options for solving these types of problems in SQL Server 2005 and later? What are the main advantages and disadvantages of each method?  AdventureWorks examples (for clarity, optional)   List the five most recent recent transaction dates and IDs from the TransactionHistory table, for each product that starts with a letter from M to R inclusive. Same again, but with n history lines per product, where n is five times the DaysToManufacture Product attribute. Same, for the special case where exactly one history line per product is required (the single most recent entry by TransactionDate, tie-break on TransactionID.


I have special HTML entities in my text stored in mysql. When I try to read that data returned from mysql into PHP using json_encode, it fails silently. When I use json_encode(array_map('utf8_encode', $row)); it give output as       ["{\"autoid\":\"2\",\"package_id\":\"a78o5jax32\",\"chapter_title\":\"General Aspects of Surgery\",\"question_text\":\"Capsule Endoscopy-False statement is\",\"explanation\":\" Capsule\\u00dd Endoscopy is not suitable for patients with strictures.<\\\/p>\",\"reference\":\"Bailey and Love 26th Edition P\\\/205\",\"options\":\"Sedation Not RequiredxxxxxxPainless ProcedurexxxxxxVisualize Entire small BowelxxxxxxSuitable For Patients With Stricture Bowel\",\"answer\":\"3\"}","{\"autoid\":\"3\",\"package_id\":\"a78o5jax33\",\"chapter_title\":\"General Aspects of Surgery\",\"question_text\":\"Physiological changes in laparoscopy include all excep\",\"explanation\":\"• Laparoscopy\\u00de causes increased PCWP, Intra cranial Pressure and decreased Functional Residual capacity after expiration is decreased after laparoscopy gas insuffulation. • There will be Hypercarbia and acidosis (pH decrease) \",\"reference\":\"Ref: Schwartz Page 417\\\/ 10th Edition\",\"options\":\"Increases PCWPxxxxxxIncreased ICPxxxxxxDecreased FRCxxxxxxIncreased pH\",\"answer\":\"4\"}"]   which cant be parsed as json.  Please help how can I get special entities sored in mysql text and create json. I will later use that json in jquery ajax.  Special entities are like Ý

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've tried searching for people with similar questions, but haven't found anything.  I have two dates in JavaScript, both set to the same value... Equality Testing fails on ==, but >= and <= evaluate true.  Below is the code I have in play:  var startDate = new Date( 2011, 7, 30, 0, 0, 0, 0 );  var dt = new Date( 2011, 7, 30, 0, 0, 0, 0 );  if( startDate == dt )     document.write('They Equal
');  if( startDate > dt )     document.write('Start Date is > dt
');  if( startDate >= dt )     document.write('Start Date is >= dt
');  if( startDate < dt )     document.write('Start Date is < dt
');  if( startDate <= dt )     document.write('Start Date is <= dt
');  if( dt == startDate )     document.write('They Equal
');  if( dt > startDate )     document.write('dt > startDate
');  if( dt >= startDate )     document.write('dt >= Start Date
');  if( dt < startDate )     document.write('dt < Start Date
');  if( dt <= startDate )     document.write('dt <= Start Date
');    document.write( dt ); document.write( '
'); document.write( startDate );   Has anyone encountered anything like this, or am I doing something fundamentally wrong?  I tested this is Internet Explorer (9), Firefox 5+, and Chrome.  Update:  So two people posted great answers to my problem, and I thank both of you: xdazz and DaveRandom. I had read an earlier post on stackoverflow.com on a similar question and a guy said that date objects could be compared like any others, and any other example I found always did a < or > type of compare, never a full equality so I wasn't able to make the connection as to why I was doing it wrong.  Thanks to you two, and the others that posted similar answers.

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 have trouble with the verb 'wish'. Searching this website, I could not find an answer to my questions, which is 'when we use past simple and when would?' a) I wish I would live in LA --> This is a wish for the future. b) I wish I lived in LA --> This is a regret that I, currently, do not live in LA. So, for me, it seems that we can use would with action, durable verbs if we want something to happen in the future, and past simple with stative, durable verbs when we are not satisfied with the current situation (yet we know the changes are probably unreal). Also, I have heard that we use wish + would only when we are annoyed about something and want it to change, but with the word 'only' it does not sound like the truth.

I've come across the following passage from Mina Murray's diary (from Dracula ). Mina is worried that her finance hasn't written to her for quite a long time.     No news from Jonathan. I am getting quite uneasy about him, though why I should I do not kno; but I do wish that he would write, if it were only a single line.    What will be the difference between would write and wrote in this case? I, personally, think that original sentence is entirely about the present. She wants him to to drop a few lines, and she still hopes that he'll do this. And with "wrote" it would mean sort of she wants him to have written to her. Somewhat she wants not to worry right now, but it's impossible because she got nothing from him, not a line. I've just shared my thoughts, but I'm not so sure  about them. Possibly, someone can make it clear for me.   Many thanks!


I have a file on my Darwin system and the permissions are:  -rwxr-xr-x@   User: read, write, execute Group: read, execute Other: read, execute  What is the 11th notation the @ mean?  In addition to this, I was led to believe that files/directories only had 10 places for their permissions? This, including the missing d from the front, would make 11.

I am using Mac OSX. When I type ls -l I see something like   drwxr-xr-x@ 12 xonic  staff    408 22 Jun 19:00 . drwxr-xr-x   9 xonic  staff    306 22 Jun 19:42 .. -rwxrwxrwx@  1 xonic  staff   6148 25 Mai 23:04 .DS_Store -rw-r--r--@  1 xonic  staff  17284 22 Jun 00:20 filmStrip.cpp -rw-r--r--@  1 xonic  staff   3843 21 Jun 21:20 filmStrip.h   What do the @'s mean?


I accidentally deleted my SSHD's SSD partition. It's connected as RAID. I don't know why, but one day it was shown like AHCI (still RAID in BIOS settings). I thought it was my 16GB flash drive and I deleted it in Ubuntu.  My main OS is Windows 10 and I don't know if my SSHD is working properly (SSD caching). Is there a way to understand if it is caching in SSD like I did that mistake before?

, I'm starting to believe it is not active.  Last night I started up Task Manager and I see 2 disks - Disk 0 (C:) and Disk 1.    Disk 0 appears to be active -    Disk 1 appears to be not active.  It's been this way for at least 3 hours of active use, both Metro and Desktop use.   This is supposed to be the Solid State part of my Hybrid Drive, but it doesn't seem to be doing anything, at least not from the perspective of the Task Manager tool.  Does anyone know of any additional tools that I could you for analysis or do you know if there is some way to activate this part of the drive?  Thank you in advance!


I am trying to process a command line using getopts in bash. I have to pass three arguments after -w option. For example, -w 1 do loop. It should print one line before and after each line from loop that contains the pattern do. This is the code I have now:  #!/bin/bash file=`ls | grep ^$1$` pattern=`cat $file |grep -B$2 -A$2 $3` while getopts":w:" opt do case $opt in     w) $2=$OPTARG ; pattern=$OPTARG ; file=$OPTARG ;array=($OPTARG)     ;;     *)echo " usage: -w <pattern>"     exit 1     ;; esac done  echo "${#array[@]}" echo "line: $2, pattern: $pattern, file: $file"   Is there anyway to retrieve the three variables from one flag?

In below code when I give option r then getopts requires one arguments:  while getopts ":hr::l:" opt; do     case $opt in         r ) echo "Run Numbers - argument = $OPTARG " ;;         l ) echo "Latency range - argument = $OPTARG" ;;         h ) helptext             graceful_exit ;;         * ) usage             clean_up             exit 1     esac done   But I need to pass two arguments after -r option, instead of one. Is there an easy way to do this?


Currently I'm at 1/4 volume (option+shift+volume) but it is still loud.  All of the systemic solutions are out of date or about limiting maximum volume.  Is there a way to permanently lower the lowest volume?

The lowest volume I can get by pressing the volume keys is still too loud when I'm wearing headphones. How can I make it even lower?   I have a Mac Mini 2011 (5,1) running Mountain Lion.


So, I've come across this term while using other software as well. However, with respect to Blender, what are they? How does one use/access them and if possible could a simple animation be demonstrated using this?

What is Animation Nodes addon used for? Where can I find more information about it?


I’m casually learning physics and have noticed that Newton’s law of gravitation and the electrostatic force formulas look similar. I’ve asked this question before but would really appreciate another response. Is it possible that the two laws are related? Can the law of gravitation be seen as the macroscopic averaging of Coulomb’s law? So atoms on average have negative charge (positive mass) and thus on a macroscopic scale we observe that two large bodies (eg planets) attract rather than repel. Would it help if we assume that masses can be positive as well as negative? Apologies as I’m not a physicist (rather a data analyst) and these are probably dumb questions.

It seems paradoxical that the strength of so many phenomena (, ) are calculable by the inverse square of distance.   However, since volume is determined by three dimensions and presumably these phenomena have to travel through all three, how is it possible that their strengths are governed by the inverse of the distance squared?  The gravitational force and intensity of light is merely 4 times weaker at 2 times the distance, but the volume of a sphere between the two is 8 times larger.   Since presumably these phenomena would affect all objects in a spherical shell surrounding the source with equal intensity, they travel in all three dimensions. How come these laws do not obey an inverse-cube relationship while traveling through space?


I recently compiled and installed diffutils-3.3 as I needed the --no-dereference switch that is unavailable in the included version of diff. After configure, make, make check, make clean, and install the new version 3.3 of diff was installed in /usr/local/bin.  Running diff --version resulted in the same 3.2 as before installation.   commands and their output follow:  $ which diff /usr/local/bin/diff  $ whereis -b diff diff: /usr/bin/diff /usr/bin/X11/diff /usr/local/bin/diff  $ echo $PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games   Using full paths, I can confirm that diff version 3.3 is in /usr/local/bin and version 3.2 is in /usr/bin.  Looking at the path, I would expect that since /usr/local/bin appears first, that particular diff should be executed when I call diff without a path. Clearly this is not the case. My question is why and what can I do to obtain the desired result?  Note: Ubuntu 12.04.5  $ uname -a Linux me-AOD270 3.2.0-80-generic #116-Ubuntu SMP Mon Mar 23 17:11:32 UTC 2015 i686 i686 i386 GNU/Linux

First, when I never had installed sl:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   traslaction: "The program 'sl' is not currently installed. You can install it by typing:"  But when I'm tired of it and I remove it by typing sudo apt-get remove sl per example...  I get this when I type sl:  -bash: /usr/games/sl: Ficheiro ou directoria inexistente   translate: "-bash: /usr/games/sl: No such file or directory" instead of:    diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   This appears with others packages too...  How I get rid of this: -bash: /usr/games/sl: Ficheiro ou directoria inexistente ?  I want see the original:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   Output of type sl  sl está hasheado (/usr/games/sl)


I'm developing an app and cannot figure out a good word for the "underlings" of a boss which doesn't sound so pejorative. I've thought of supervisee, but that sounds archaic and I don't like how it's so close to supervisor.

What is the best word to refer to the person that I (directly) supervise, in the context of a corporate workplace? The closest I can think of is employee, but that doesn't directly convey a direct supervisor relationship.  Other options I can think of are apprentice (usually used to refer exclusively to someone who is still learning where I come from), underling (patronizing), and worker (again not specific).  For example when describing a project:   My employee designed the front-end of the system while I worked on the critical business logic.


I am using Ubuntu 12.04 LTS and have been  using it for a while.   I just rebooted today and got this error:  Kernel Panic: not syncing: VFS Unable to mount root fs on unknown_block(0,0)`   Here is a screen shot the . I used the boot repair disk and tried to fix it but it did not work.  Here is there result of that . I am at a loss as to how to fix this.  Thanks for any help.

Upon trying to upgrade from 10.10 to 11.04 all seemed to go well until the restart. This error message is what comes up:  Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)   How do we fix that?


I am trying to active function when clicking on button which is created with createElement.  On html code:  <fieldset class="form-fieldset">    <button type="button" class="btn-ref">Hello</button> </fieldset>   On javascript:  $('.btn-ref').click(function(){    var newButton = document.createElement('button');    newButton.className="btn-ref";    $('.form-fieldset').append(newButton); });   On original code, when clicking on button does create new button. But after clicking on created button, it does not create new button.  Can someone tell me what is wrong?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


To compare multiple groups, one usually runs ANOVA. If ANOVA rejects the null hypothesis, one goes through the multiple comparisons.  The multiple comparisons are necessary to establish which group is different. Multiple comparisons are performed applying  Bonferroni correction (or more recent types of correction, such as Holm's or Hommel's).  Such corrections guarantee the family wise error rate (FWER)  to be at most  alpha. FWER is the probability to return at least one wrong significance statement when comparing populations whose mean is actually the same.  I wonder why is the preceeding ANOVA necessary at all. I think one should run directly the multiple comparison with adjusted p-values.  In fact: a) if all means are equal: the multiple comparison will have the same FWER of ANOVA, because of the correction.  b)Some means are different. Then multiple comparisons are anyway necessary.  The preceeding ANOVA is often done, but I do not see a compelling reason for it.  Thanks.

I often hear that post hoc tests after an ANOVA can only be used if the ANOVA itself was significant.    However, post hoc tests adjust $p$-values to keep the global type I error rate at 5%, don't they?  So why do we need the global test first?  If we don't need a global test is the terminology "post hoc" correct? Or are there multiple kinds of post hoc tests, some assuming a significant global test result and others without that assumption?


Is there any way to get my old account + metadata back if I have lost an account ties to MyOpenID?

Janrain has , one of the many OpenID providers. MyOpenID will not be available starting February 1, 2014. (An   hinted at the same but did not set a date for end of service.)   This decision was made by Janrain, and Stack Exchange did not have any part in it. You can still use myOpenID to log in to Stack Exchange, but be aware that any outages in the myOpenID service will mean that you are unable to log in to Stack Exchange until Janrain fixes it – which may take several days, or weeks, or never. After February 1, you will no longer be able to use myOpenID to log in to Stack Exchange. Stack Exchange will not be able to answer any questions about why myOpenID is down or when it will be working again. If you do not have any other login credentials on your account by February 1, you will be locked out, and Stack Exchange will be unlikely to help you recover your account.  To avoid getting locked out of your Stack Exchange account, we strongly suggest that anyone using myOpenID as their primary (or even backup) login add a new login method to their Stack Exchange account.  We're also going to remove the "myOpenID" button from the sign-up/login page soon, in order to discourage new users from signing up using myOpenID.  Here's how to add a new login to your account. You must be logged into your account when you begin. (This information is also available .)  Open up your user profile page (by clicking on your login name at the top of the screen) and click the "my logins" link above the bio box on the right hand side.   You should see a list of all of your logins.  To add a new login, click "add more logins..." at the bottom of the box. Choose the new login from the list and follow the steps to confirm.    If you choose, you can remove your myOpenID login by clicking the same "my logins" link, then clicking "remove" next to myOpenID.  If you are adding a Stack Exchange OpenID, you will receive a confirmation email. You must click the link in the email to confirm your email address before the Stack Exchange OpenID will show up under "my logins". Please make sure that you are already logged into your account when you click the confirmation link; otherwise, you will create a new account that needs to be merged with your old one.    If you encounter any trouble adding logins, or accidentally create a separate account that you would like merged, please fill out our .


I came across a code snippet which used a statement int k=(a++,++a) in it. I don't understand which type of statement is this (a++,++a) and how it will be evaluated. Why is the bracket is used here? Is it a function call?  Here is the code.  #include <stdio.h> int main(void) {     int a=5;     int k=(a++,++a);     printf("%d\n",k);     return 0; }   The output I get is 7 — why is that?

How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  <-  Note comma typo! c = d;


We are switching our environment from windows 7 to windows 8.1 and I have a bunch of Dell computers I need to roll out with windows 10 pro keys in the bios that I have to install windows 8.1 pro on. According to these 2 articles from both Dell and Microsoft this is possible:      The instructions in these articles don't work the installation will always ask for a key and when you call Dell to ask how to do it they tell you to follow the instructions in these articles.  What I need is:   A way to cleanly install and activate windows 8.1 on these computers To automate to process using windows deployment tools   This is not a question about licensing I am trying to figure how to get the windows 8.1 installer to recognize the OEM key in the bios. This isn't a question about if I am in entitled this license or not, I already confirmed with Dell and Microsoft support that I am. I wanted to know I just needed to know how to get the installer to see the license in the bios

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I have a function:  function Check(o) {     alert(/* o is a DOM element ? "true" : "false" */); }   How can I check if the parameter o is a DOM object or not?

I'm trying to get:  document.createElement('div')  //=> true {tagName: 'foobar something'}  //=> false   In my own scripts, I used to just use this since I never needed tagName as a property:  if (!object.tagName) throw ...;   So for the second object, I came up with the following as a quick solution -- which mostly works. ;)  The problem is, it depends on browsers enforcing read-only properties, which not all do.  function isDOM(obj) {   var tag = obj.tagName;   try {     obj.tagName = '';  // Read-only for DOM, should throw exception     obj.tagName = tag; // Restore for normal objects     return false;   } catch (e) {     return true;   } }   Is there a good substitute?


How can I get a business map location displayed along with the Google search results page?

Does anyone know how to get your business map location displayed in the right hand sidebar of the Google search results page? As in the screenshot below:      I already added my business to this link: .  Is adding detail in above link enough or do I need to change my website coding?