I am trying to get my code to keep repeating asking if I want to end my code while "input" is y, but whenever I press y to continue it ends. I am not sure what I am doing wrong here. Is  my logic off?  import java.util.*;  public class InputValidation {    public static void main(String []args) {       String input = "y";       while (input == "y") {          Scanner console = new Scanner(System.in);          System.out.print("Press \"y\" to continue, anything else to end ");          input = console.next();       }    } }


Calculate side of a polygon that touches another feature

How can I measure the length of the side of a polygon that touches another feature (calculate from A to B on the image below)?  I'm creating and measuring lines to figure out the lenght of the 'intersection' and I wish that was a easier method using a geoprocessing tool.  How can it be done?  I don't have programing skills and I am using ArcGIS 10.2.2.


The difference between 'protect from' and 'protect against'

The Longman dictionary suggests two options regarding the word 'protect': protect somebody/something from something and  protect somebody/something against something/  Examples: The cover protects the machine from dust. Physical exercise can protect you against heart disease.  According to the examples, I believe that the verb 'protect' takes  against' when you are talking about something which is not tangible, whereas the preposition 'from' is used with words that can be seen or touch. Am I correct? If not, how to know which preposition is necessary?


The topologies on X defined by d and d' respectively are the same

I have some problems with the following exercise: Suppose $\eta: \mathbb{R}_{\geq 0}\to \mathbb{R}$ is a continuous (with respect to the usual metric $\mathbb{R}$)function such that for all $x,y\in\mathbb{R}_{\geq 0}$ the following three conditions are satisfied: $\eta(x)=0\Leftrightarrow x=0$ If $ y\geq x$ then $\eta(y)\geq \eta(x)$ $\eta(x+y)\leq \eta(x)+\eta(y)$ Suppose that (X,d) is a metric space, and define $d': X\times X\to \mathbb{R}$ by $d'(x,y)=\eta(d(x,y))$. I have already shown that d' is a metric, now I have to show that the topologies on X defined by d and d', respectively are the same. I am a bit confused about how to do that. I am thinking that I have to show that U is open with respect to the metric d if and only if it is open with respect to the metric d'. And I am thinking of showing $"\Rightarrow"$ by showing that for every $x\in U\subset X$ there exists $\delta>0$ such that $B_{d'}(x,\delta)\subset U$, but I am not sure how to do so.


Using lots of words so as to NOT to get to the point

EDIT  The word I am looking for is not pleonasm (it stresses to much on the redundancy of the chosen words, i.e. fewer words would suffice). It is not verbiage (it stresses to much about the complexity of the word choices).  My opinion about the suggested words:     waffle: To speak or write at length without any clear point or aim.      This is almost the meaning I am looking for. My only objection is that   the dictionaries do not seem to agree upon its meaning. For example,          to talk or write foolishly —Webster Online   speak or write at length in a vague or trivial manner —Oxford Online   speech or writing that says nothing important —Cambridge Online         (Yes, they all sound similar, but to my ears there is considerable   difference.)      doublespeak: the quoted meaning below sounds "too evil," as there seems to be deliberate/conscious evil intentions      gobbledegook: sounds too much like the speaker has no idea as to what he is talking about.   Had "waffle" universally been agreed to have the above meaning. I'd opt for it.


Only using some data from shapefile in QGIS

How can I use only a few of the areas outlined in a shapefile? In this case, my shapefile has all of the ZIP codes for a U.S. state, and I would only like to display the ZIP codes for a particular city. Is there any way to do this?  Also, some of the ZIP codes are partially in the city, and partially out of it. How would I go about editing the boundaries of the outlined areas?


What does backslash at sign mean in latex? \@

I'm writing a document and my latex code linter is telling me  missing `\@' before `.' in "ABC."   The linter only gives me this warning when there is a capital letter just before a period ending a sentence that precedes another sentence. What does this \@ do? Putting it in my code doesn't seem to make any change to the document.  Minimal example  \documentclass{article} \begin{document} ABC. Hello. \end{document}


Problem :   The sum of non real roots of the polynomial equation $x^3+3x^2+3x+3=0$   (a) equals 0   (b) lies between 0 and 1   (c)lies between -1 and 0    (d) has absolute value bigger than 1   My approach :   The discriminant of cubic equation $ax^3+bx^2+cx+d=0$ is given by   $\Delta = 18abcd -4b^3d +b^2c^2 -4ac^3 -27a^2d^2$  $\Delta = -108 < 0 $ Therefore the equation has one real and two non real roots.  But how to find the roots of this equation not getting any idea please help . thanks


Page looks sparse, space between paragraph is too big (KOMA-Script)

This page looks very sparse, LaTeX inserts way too much space between the paragraphs.  I use \documentclass[paper=a4,twoside,parskip=half,12pt]{scrartcl} for a short manual.  I would not mind if the page ended earlier, but I don't want to insert \newpage manually (content above may change).  Can I set a maximum inter-paragraph space or increase some penalty value?  Hint: There is a longer table on the next side. Please comment if you need a list of all my included packges too.


How can we compare two element values in LWC?

I want to compare the value of two different custom settings field in html like below? Is there any way to do that where I dnt have to write a compare module separately? template if:true={navSubItem.Source__c}={navItem.Item_Name__c}


Where does the number 12 come from and why is it the same 12 in Wilcoxon and Kruskal Wallis?

I see that it has something to do with the variance and one has 12 on the numerator and the other denominator, but why is this the same 12 and how do they become inverse?  Equations:     Kruskal Wallis: The first equation under 3  $$ H = \frac{12}{N(N+1)} \sum_{i=1}^g n_i\bigg(\bar r_{i\cdot}-\frac{N-1}{2} \bigg)^2 $$ Wilcoxon: The one for the variance  \begin{align} z &= \frac{R - \mu_R}{\sigma_R}  \\[5pt] &\text{where}  \\[5pt] \mu_R &= \frac{n_1(n_1 + n_2 + 1)}{2}  \\[8pt] \sigma_R &= \sqrt{\frac{n_1n_2(n_1 + n_2 + 1)}{12}} \end{align}


Do I need a transit visa to fly from a schegen country via London to travel to USA?

I am traveling from Prague to Boston and have a layover in London to change my flight and duration between flight is 2 hours. I hold a valid H1b visa of USA. Am I required to obtain a transit visa?


Can anyone tell the way how to animate a rolling cube? Without bones. In Maya, for example, its quite easy to animate pivot point (origin) or use locators (empties), but in blender it seems to be a problem. There is a Pivot constraint, but besides that snaping doesn't work, it works in a weird way on its own. here is example scene -


How to properly escape exclamation points in bash?

Today, I was caught redhanded while attempting to code golf a password generator for Twitter.  import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))   90 chars. Since that is a lot of spare space, I decided to raise the bar and make it executable too.  echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg   139 chars. Nice, except obviously bash chokes on the exclamation point.  badp@delta:~$ echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg bash: !/usr/bin/python\nimport: event not found   Pesky exclamation point. "Let's escape it," I thought! I do have one spare character after all.  echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg   Obviously...  badp@delta:~$ echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg ./pg: line 2: syntax error near unexpected token `(' ./pg: line 2: `import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))' badp@delta:~$ cat pg #\!/usr/bin/python import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))   Leaving my asinine code golfing aside -- I can't explain this.  With \!, the exclamation point was escaped, except it really wasn't, because the \! was left as-is for echo to pick up.  One solution could have been using \x21 instead, but I'm not convinced that's the proper way of escaping an exclamation point in a bash command.  tl;dr: How do you properly escape an exclamation point in a bash command?


How to use regex to replace random string enclosed in  in PostgreSQL

We would greatly appreciate some help figuring out the following regex for PostgreSQL.  Our Slackbot stores a message as a string and encloses the users' unique ids in "<>" like this:     Just an fyi  agent <@U2LqweSTW> was just added to the Maco campaign, keep an eye out for any rookie questions in <@U2rtyGSTW> help channel...    <@U2yjkGSTW> <@U2byqGSTW> :taco:   We'd like to extract that message and remove the user id in <> to display the message without user ids. Here's what I'm using:  regexp_replace(r.message, '\<.*\>', '', 'gi')   Unfortunately, that returns this result:     Just an fyi  agent  :taco:   It's removing any characters after the first user id but keeping :taco:.  I'm guessing it's because the user ids aren't grouped together, but my newb PostgreSQL skills have me dumbfounded as to why. Any explanations/solutions would be greatly appreciated.  In case another example is needed, the above regexp works correctly on this:     I will give our team a taco for that and as always <@U2124FSLS> we appreciate you always being there for us :taco: :taco:   It returns:     I will give our team a taco for that and as always  we appreciate you always being there for us :taco: :taco:


Why are muons considered to be elementary particles in the Standard Model?

According to , a muon decays into one electron and two neutrinos.    According to , elementary particles or fundamental particles are particles "whose substructure is unknown, thus it is unknown whether it is composed of other particles."  I have also seen somewhere that it is a particle that cannot be reduced into other constituent particles.  While perhaps not a sure thing, seems like the decay indicates that the muon may be just a composite particle, perhaps consisting of one electron and two neutrinos?   Based on this, why does the muon fit with the above definition of an elementary or fundamental particle?    I realize there are much more complicated, historical reasons as to why it was included in the Standard Model, but this question is just related so how it fits (or doesn't fit) the stated definition above.  It seems to me that we really can only get solid evidence of elementary vs. composite when we smash the particles together and see what comes out and compare that to all the masses, energies and momentum before and after?  Until we do that with muons, how can we know with much certainty?  And perhaps we'll have a better answer with a Muon collider:       To that point, seems that electrons may not be fundamental after all:


i want to use blender models in . To import blender models to 3.js we have to use blender exporter    so i follow a tutorial and do every step correctly .i have included folder inside addon directory.but when i restart blender i can't see a three.js addon . i'm using blender 2.72 version .    as you can see there is no addon as 3.js


Settlers of Catan: Building Roads 'Through' Settlements

I think that this idea is a bit ridiculous but my friend insists that: because of ambiguity in the rules, it is perfectly legitimate to build roads 'through' settlements. In case 'through' is unclear, let me explain through an example:  So, say that we have our hexagonal board piece. Now, we have two settlements, one towards the top, another towards the bottom. Now, the bottom settlement wants to build roads, so it starts building around this same hexagon. Now, my question: can you build a road that 'passes through' the other settlement to complete the loop? Also, can you please reference the language in the rules? (My friend is extremely stubborn)   I am trying to get a visual example, sadly I am nowhere near a board. I'll get the picture ASAP. Thanks in advance.


Can both present perfect and present perfect continuous be correct?

My English book has the following exercise:  Which is correct?  I've been working here since 1999. I've worked here since 1999.   I said that only the first one is correct, but the answer key says that both are correct. I've read the theory and it says that (present perfect + since/for) is for non-action verbs and (present perfect continuous + for/since) is for action verbs. "To work" is an action verb, hence saying "I've worked here since 1999" should be wrong, isn't it?


GParted can't move extended partition to the right?

I have a hard disk, which was partitioned before (probably in Windows) like this:   Partition 0 - primary, 20Gb  Partition 1 - extended, 200Gb   I have unallocated space after Partition #1, so I wanted to increase the size of the Partition #0. At first I wanted to move the Partition #1 to the right, so I started Ubuntu from CD and called GParted. All the logical partitions inside the extended partition aren't mounted. I've assigned the Partition #0 as swap (temporarily) because it looks like the Ubuntu needs the swap even when started from CD.  The GParted can resize the extended partition (Partition #1) but it can't move it. The left arrow in the slider is not movable.  What might be a problem?  Also, the Partition #1 has a single flag on - it's "lba" flag. What's it for? Maybe it's the reason the GParted can't move it?


I try to launch Firefox over SSH, using  ssh -X user@hostname   and then  firefox -no-remote   but it's very very slow.  How can I fix this? Is it a connection problem?


Status still " Editor Assignment Pending" after 8 weeks

I submitted my paper in Journal of Intelligent Information Systems (springer) The journal says the average time from submission to decision is 1 month, but after 8 weeks the paper status is still listed as "Editor Assignment Pending". I tried to contact the editor in chief and he said"The Editor is still in the process of evaluating your paper as well as finding suitable and able referees."  is it normal?


I have this site I am working on, its a travel site. Today I saw a very unusual result in Google. For query - "flight from x to y" I am seeing my client site title as - "to y- flight from x to y".   I am not sure why this is happening, why google is showing "to y". Only explanation I have right now is text in schema markup, last element is used is "to y" but again google never grabs content from markup. And I could not find "to y" being used as it is anywhere on the page.  Page does have content targeted towards "flight from x to y" and used many time but not as "to y".


Why wasn't Sauron invisible when he wore the Ring?

When Sauron is shown killing Elendil and then being destroyed by Isildur he is clearly not invisible and he is wearing the Ring.  But any time Bilbo or Frodo put on the Ring they went invisible without fail.  Did the Ring change after Sauron was destroyed or is Sauron capable of controlling the rings power unlike anyone else?


How to make 7-zip do a whole bunch of folders

I got a bunch of pictures that I had to crop into 800x600 pixels. That was easily done, but now I have to upload them so the family can see them all.  Thing is, this is 500MB in pictures. I decided to simply zip the separate folders, which each contain an almost equal amount of pictures. This way I can upload a couple each day. Doing this manually is a very long and hard job. I wonder if there is a way to make 7-zip handle each folder individually?  I think I'll need a batch file to do it, but I'm not good with that. I've put everything under one folder. In the various subfolders is where the pictures are located. What I need is for the contents of that folder to be zipped. I'm not sure if I can just zip the folder along with it. I know PHP has a zip module, I've just never worked with it, so I'm not sure whether it can handle the fact that the content of the zip is a folder which contains the items, instead of just the items.


Uniform convergence of harmonic functions to $0$ on compact subsets

Let $D \subset \mathbb{C}$ be an open, connected set and let $\{ u_n \}$ be a sequence of harmonic functions with $u_n: D \longrightarrow (0, \infty)$. Show that if $u_n(z_0) \rightarrow 0$ for some $z_0 \in D$, then $u_n \rightarrow 0$ uniformly on compact subsets of $D$.  If you could offer a hint or a helpful question to get me started I'd appreciate it.   Progress: I now see why showing it for the unit disk suffices (any compact subset in $D$ can be covered by finitely many disks each which is contained in $D$).


Derivation of $1 = x^2+y^2$ with respect to time

I am studying differential algebraic equations. Given the following equation:  $1 = x^2+y^2$  Differentiate this equation with respect to time. The correct solution is:  $0=2x \dot x + 2y \dot y $  But why?  My wrong idea was:  $0=2x+2y$  Thank you very much!


how to exclude a chapter from numbering?

How can I remove the number of a chapter (preface) both in the table of contents and the first page of this chapter?


In a lecture on Baire's Theorem (for complete metric spaces), I gave, for a rather advanced undergraduate class in Real Analysis (covering the theory of metric spaces and elements of general topology), I realised that all the applications I provided were either straight-forward or could be proved using more elementary tools. For example:  a. $\mathbb Q$ is not complete.  b. $\mathbb R$ is uncountable. (Otherwise, if $\mathbb R=\{x_n\}_{n\in\mathbb N}$, then $\bigcap_{n\in\mathbb N} (\mathbb R\setminus\{x_n\})$ would be dense and empty.)   c. A complete metric, with the property that every point is an accumulation point, is uncountable.  Could you suggest more interesting applications? They do not have to be too easy to prove.


We can use goto and :label in batch. Is there anything like it in Python?


Passing strings to an array through a method

Implement a method for adding elements to the class CacheMemory. The Class cache memory has an array memory whose length is passed through a constructor.Elements can be added to the array only if it has not been added before and if the length of the arrays added is within the boundaries of the array.(within its length).  This is the code I came up with so far:  public class CacheMemory {      private String[] memory;      public CacheMemory(int length) {         this.memory = new String[length];     }      public void addingElementsToCache(String mem) {         for (int i = 0; i < memory.length; i++) {             if (memory[i] != mem) {                 memory[i] = mem;                 System.out.println(mem);                 break;             } else {                 System.out.println("Element already exists");             }         }     } }   If i call this method without break,of course it will print out the string five times,but I don't want the same string to be printed out five times,I want to add five different strings and then,while loop goes through the array,and comes to element that has already been passed,to print out the message.


Is fair enough completely equivalent to OK? If not, under what circumstances should I say fair enough in my response? Any good examples will be most welcomed.


Do both legs in 220V have to be switched?

I posted this question but for some reason I can't get back into my account:    Most things I see with 220V have both hot legs going through the switch or relay, current "returns" through the switch.  Is it against code to wire one leg directly to the equipment and the other leg is switched as opposed to having both legs switched.  It seems useless and a waste of wire to switch both legs.  Basically  vs  (minus the GFCI as I'm not allowed to have that)  As a bonus question.  I assume I need a "motor rated switch" as standard switches can weld due to the high startup current.  Is  one legal\safe?


Get missing index statistics in SQL Server 2014

For example consider a database that has many SP and many query execute on it using ORMs. It's very time consuming that check every SP or profile all queries that ORMs generate for performance and missing index problem.  Is there any way to get missing index statistics for all SP and queries?  thanks


Invalid selectOptions found. Use SelectOption type in Apex (why?)

I was trying to add a dropdown menu inside VF page (where I already have other pageBlockTables). I only need to retrieve one field (c.sfprn) from an existing SOQL query where it is already used for other pageBlockTables.  Here is part of my VF page where I am trying to add a dropdown menu:      <!-- DropDown Menu starts -->          <apex:pageBlockTable value="{!RowList}" var="c">             <apex:column >                 <apex:facet name="header">All Surveys</apex:facet>                 <span>All Surveys: </span>             <apex:selectList id="AllSurvey" size="1">             <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=1>Test1</apex:selectOptions>             <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=2>Test1</apex:selectOptions>             </apex:selectList>              </apex:column>          </apex:pageBlockTable>          <!-- DropDown Menu ends -->    Here is portion of Apex code:  public PageReference searchPatients(){      RowList = new List<TableRow2>();     TableRow2 tr;      for(Patient__c con : [SELECT sfprn__c,                                  mrn__c,                                 LName__c,                                  FName__c,                                 (select SurveySelection__c.SurveySelection__c from SurveySelections__r)                                  FROM Patient__c                                 where mrn__c =:mrn                                  or LName__c =:lname LIMIT 1                                                                 ]){          tr = new TableRow2();         tr.sfprn = con.sfprn__c;         tr.mrn = con.mrn__c;         tr.lname = con.LName__c;         tr.fname = con.FName__c;         tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;          RowList.add(tr);         }      return null;    }      I am curious whether I need to add a new method or I could just call the value="{!RowList}" to bring one field (c.sfprn).  Thanks in advance.


Usually I deal with Linux and other Unix-like OS, but now I have to set up Windows server to run some specific software.  I can't have physical box for it, so I decide to buy and deploy Windows Server 2012 R2 on  virtual machine.  Reading licensing documents on Microsoft website I cannot understand, what is the difference between "installation on physical server" and "installation on virtual machine" in WinServer terminology. I phoned Microsoft store support, but they also can't answer me, course they don't know what KVM is =)  So my first question is: when running under KVM, would Windows Server 2012 R2 "think" that it running under virtual, or physical environment?  The second is related - which type of licence ("for physical server installation" or "for VM installation") do I need?


What is the Coandă effect? How is it defined, and what causes it?

Can anybody explain to me the  well? I am finding that many definitions and explanations conflict.  I am particularly confused about the following points regarding the Coandă effect:   whether the Coandă effect is the same as normal boundary layer attachment to a surface whether the Coandă effect is only defined for convex surfaces over which a jet (of the same state as the surrounding fluid) is tangentially blown what causes the Coandă effect: the jet entraining the ambient fluid or a balance of pressure and centrifugal forces, or something else?


Why do I have to hate hats in order to opt out of Winter Bash?

Why are you, the ever so pink-and-fluffy SE making me hate ?   I don't hate hats. I just don't want to participate because I'm a grumpy old bahumbug kinda guy.   I don't like hating :(  Can we choose not to participate rather than having to hate ?  I am sad.


Constructions: A straight line segment of length pi units.

A line segment of length 22/7 units or 3.14 units can be drawn. But how can a line segment be drawn of exactly pi units?


With git rebase --interactive <commit> you can squash any number of commits together into a single one.  That's all great unless you want to squash commits into the initial commit. That seems impossible to do.  Are there any ways to achieve it?    Moderately related:  In a related question, I managed to come up with a different approach to the need of squashing against the first commit, which is, well, to make it the second one.  If you're interested:


How can you make measurements on a qubit that is in a different basis than your measurement qubit? (i.e. You want to measure a single qubit in the $|+\rangle$/$|-\rangle$ basis but you can only make measurements in the computational basis).


I made a rather simple animation using video sequence editor (mostly blinking between two images), but for some reason I cannot render it. When I clicked render animation, all I see in the render result window is the blank "image" and nothing happens. I made the animation in blender 2.8 and I though maybe there is a problem in blender 2.8, but it didn't work (the same file) in blender 2.79 either. This was the second try of the same animation, first rendered fine, but crashed so I had to start over. This is what I get:  I can render image and get the first image of the video.


Why does variables of class Test for two different objects gives true for == operation and same operation results in false for String Objects?

For == operation on variables of String for two different objects s and p created using new gives result as false (line 1) which I understand but why does line 3 and 4 ( line number commented ) gives true as Output?  I am aware of the fact that == is meant for reference comparison and that's where i have the doubt if it's meant for reference comparison then why line 4 gives true as j is an integer and there is no immutability concept as for String ( String s ) and everytime a new object has to be created ?      class World {     public static void main(String[] args)     {            String s=new String("B");         String p=new String("B");         System.out.println(s==p);                    //false    line 1         Test t1= new Test("A",4);         Test t2= new Test("A",4);         System.out.println(t1==t2);                 //false     line 2         System.out.println(t1.s==t2.s);             //true      line 3         System.out.println(t1.j==t2.j);             //true      line 4     } }  class Test {     String s;     int j;     Test(String s, int j)     {     this.s=s;     this.j=j;     } }


Can you put the article ‘a’ after the verb ‘are’?

So, I just read an article, and was confused by the sentence:     In the study we just described, we found evidence that people’s self-discerning reflections — musings on whether parts of their identity truly define who they are or merely reflect their cultural upbringing — are a critical ingredient in the relationship between living abroad and self-concept clarity."   Source: From How Living Abroad Helps You Develop a Clearer Sense of Self    I always thought that plural verb can't come with the articles 'a' and 'an', as they are incompatible (plural and singular). Well, there are some exceptions like, 'They are a bunch of students'. However, the 'a' in this case is describing one group; it's not a problem.   The quoted sentence is a grammatically correct sentence too, as I've checked on Grammarly. So, can anyone explain to me why is it correct?


While chasing our heroes, why did the T-1000 keep the same face all the time?

T-1000 could morph into anyone's body. Then, what was the point of using the police officer's body all the time when the T-1000 was chasing our heroes? What was the point of notifying them that this is me? Couldn't he simply walk near John Connor as a homeless beggar and finish his task?


Getting "java.lang.NullPointerException" exception when i try to run my POM test

I have 2 classes in my project  First class contains all the webelements  Second one for method where i am using this elements  package facebook;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement;  public class webelement {       private static WebElement element;       public static WebElement firstname(WebDriver driver) {         driver.findElement(By.xpath("//input[@name='firstname']"));         return element;      }     public static WebElement lastname(WebDriver driver)     {         driver.findElement(By.xpath("//input[@name='lastname']"));         return element;     }     public static WebElement email(WebDriver driver)     {         driver.findElement(By.xpath("//input[@name='reg_email__']"));         return element;     }     public static WebElement newpassword(WebDriver driver)     {         driver.findElement(By.xpath("//input[@name='reg_passwd__']"));         return element;     }     public static WebElement day(WebDriver driver)     {         driver.findElement(By.xpath("//select[@name='birthday_day']"));         return element;     }      public static WebElement month(WebDriver driver)     {         driver.findElement(By.xpath("//select[@name='birthday_month']"));         return element;      }     public static WebElement year(WebDriver driver)     {         driver.findElement(By.xpath("//select[@name='birthday_year']"));         return element;      }     public static WebElement sex(WebDriver driver)     {     driver.findElement(By.xpath("(//input[@name='sex'])[2]"));     return element;      }      public static WebElement signup(WebDriver driver) {         driver.findElement(By.xpath("//button[@name='websubmit']"));         return element;     }     }   And this is my second class where i am using this elements  package facebook; import java.util.concurrent.TimeUnit;  import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; import org.testng.annotations.Test;  import facebook.facebook; public class signup {     static WebDriver driver;     @Test     public void login()      {         System.setProperty("webdriver.chrome.driver","C:\\Users\\5558\\eclipse-workspace\\chromedriver.exe");         driver=new ChromeDriver();         driver.get("https://www.facebook.com");         driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS);         driver.manage().window().maximize();         webelement ele = new webelement();         ele.firstname(driver).sendKeys("dixit");          ele.lastname(driver).sendKeys("jani");         ele.email(driver).sendKeys("test@gmail.com");          ele.newpassword(driver).sendKeys("dixit1234");          Select day = new Select(ele.day(driver));          day.selectByIndex(24);          Select month = new Select(ele.month(driver));          month.selectByVisibleText("jul");          Select year = new Select(webelement.year(driver));         year.selectByVisibleText("1997");         ele.sex(driver).click();          ele.signup(driver).click();         driver.close();         }   }


What do Windows 8 Refresh and Reset my PC really do?

In Windows 8 I can reset everything and reinstall Windows. I assume this will clear my drive and start from scratch? Is that right? Does this create a Windows.old folder?  I see this dialog, but aren't my settings and preferences saved in the cloud? If I screw up my settings and reset like this, are my settings also refreshed back to defaults?  Since I use SkyDrive to sync my files, my personal files are safe, right?    Also, in Windows 8 I can refresh my PC without affecting files. Are my desktop and/or Windows store apps uninstalled when I refresh my PC?  I see this dialog, but I still am not sure. For example, when it says apps are "kept" does that mean I don't have to buy them again or are they installed after the refresh is over for me? I assume "from disk" means desktop apps? Or maybe corp apps?    What would motivate a user to choose between these two?


I have a problem with ActionListener. If I use an anonymous class everything works good, if the MainFrame class implements ActionListener everything works good. But if I create an extern class and implement ActionListener I get NullPointerException.   How can I fix this problem using an extern class that implement ActionListener interface?   Thanks in advance!  This is the code:   import javax.swing.JFrame; import javax.swing.SwingUtilities;  public class App {      public static void main(String args[]) {          SwingUtilities.invokeLater(new Runnable() {               @Override             public void run() {                  JFrame frame = new MainFrame("Hello world Swing");                 frame.setSize(500, 400);                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);                  frame.setVisible(true);             }         });     } }   MainFrame code:  import java.awt.BorderLayout; import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextArea;  public class MainFrame extends JFrame {      JTextArea textArea;      public MainFrame(String title) {          super(title);          Container c = getContentPane();          c.setLayout(new BorderLayout());           textArea = new JTextArea();         JButton button = new JButton("Click me!");          c.add(textArea, BorderLayout.CENTER);         c.add(button, BorderLayout.SOUTH);          button.addActionListener(new ListenApp());       } }   ListenApp code:  import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JFrame;  public class ListenApp implements ActionListener {      MainFrame frame;      @Override     public void actionPerformed(ActionEvent e) {              frame.textArea.append("Hello\n");        } }


Show that the intersection of normal subgroups is normal.   Let $H_1$ and $H_2$ be normal in $G$, meaning $\forall a \in G$, $aH_1 = H_1a$ and $aH_2 = H_2a$. We show that $a (H_1 \cap H_2) = (H_1 \cap H_2)a$.  Now notice $aH_1 \cap aH_2 = H_1a \cap H_2 a$, so we are done.   My book does something completely off and they showed that $(H_1 \cap H_2)$ is actually a subgroup first, then they used conjugation to prove normality. I thought showing left and right cosets coinciding is enough?


I accidentally  did these commands while fixing some issues on my Ubuntu system: chmod 644 /etc/apt/sources.list echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list pt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6  And after I did this my Software & Updates tab switched from Ubuntu software to Kali Software. Also when I try to run apt-get update this what terminal shows: $ sudo apt-get update Hit:1 http://38.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://38.archive.ubuntu.com/ubuntu bionic-security InRelease Hit:3 http://38.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:4 http://38.archive.ubuntu.com/ubuntu bionic-proposed InRelease Hit:5 http://38.archive.ubuntu.com/ubuntu bionic-backports InRelease Reading package lists... Done   I know that this could be stupid problem, but I hope that you will help me with this.


Data transfer speed to USB storage connected to wifi router very slow

Here is my setup.   A Linksys Cisco E3200 wifi router.  A MacbookPro running OS X Lion 10.7.4.  A Seagate GoFlex 1TB hard drive connected to wifi router via the USB port.   When I try to transfer data from my MBP to the HDD, the data transfer rate is very low. I'm getting around 3MB/s write speed. This is very slow compared to the speed I get when HDD is directly connected to the MBP.  The HDD is NTFS formatted. And the router provides access to HDD using Samba share. So I connect to the HDD using smb://.  What is the limiting factor here affecting the data transfer rate?


"No application Data found" in Ubuntu software on 16.10

No application Data found is displayed on the starting screen of the Ubuntu software in Ubuntu 16.10. Any help would be greatly appreciated.


If $A^2 = I$, then $A$ is diagonalizable, and is $I$ if $1$ is its only eigenvalue

Let $A$ be a square matrix of order $n$ such that $A^2 = I$.  Prove that if $1$ is the only eigenvalue of $A$, then $A = I$. Prove that $A$ is diagonalizable.   For  (1), I know that there are two eigenvalues which are $1$ and $-1$, how do I go about proving what the question asks me?


How display footnotes in the same line, when the classdocument is beamer

When I want to display the footnotes in the same line, at the end of my first slide; The footnotes are not displayed.  I have include de option [para] in the package footmisc, this is suppose to make shown my footnotes in the same line. But rather, this option has made disappear the footnotes. Although the littler numbers are shown the final footnote is not.  This is the code I am using     \documentclass{beamer} \mode<presentation> {   \usetheme{Madrid}       % or try default, Darmstadt, Warsaw, ...   \usecolortheme{default} % or try albatross, beaver, crane, ...   \usefonttheme{serif}    % or try default, structurebold, ...   \setbeamertemplate{navigation symbols}{}   \setbeamertemplate{caption}[numbered] }  \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} %para pies de pagina horizontales \usepackage[para]{footmisc} \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @book{key,   author = {Author, A.},   year = {2001},   title = {Title},   publisher = {Publisher}, } \end{filecontents} \begin{document} \begin{frame}{Justificación}  \begin{itemize} \item \textbf{Definición:} Desarrollo sostenible(DS). Preservación del equilibrio.\footnote{\cite{key}} \item  \textbf{Enfoques}: Sostenibilidad débil: crecimiento de la riqueza; Sostenibilidad fuerte: Persistencia e integridad de los recursos, resiliencia y estabilidad de las relaciones.\footnote{\cite{key}} \item \textbf{Problema}: Estudio y comprensión de los sistemas desde el desarrollo sostenible: ¡Problema mundial! \item \textbf{Modelos matemáticos}: Pueden ser usados como herramienta de decisión, diseñar estrategias, soluciones responsables \footnote{\cite{key}, \cite{key} \cite{key}\cite{key}}. \end{itemize} \end{frame}  \begin{frame}{Frame Title} \bibliographystyle{plain} \bibliography{\jobname}     \end{frame} \end{document}


Can I send my location in an imessage directly from the messages app?

I know I can go to the Maps app, and then click on the pin for my current location, and then select to share it, and then pick to send a message (vs. an email etc.)  But I can't find any way to send my location from the messages app, the way I might send a photo.  Which is silly - how often are you hanging around in the maps app when you want to tell someone where you are?   It makes sense when you're sending a location where you aren't, say the restaurant you'll meet at tomorrow, but you'd think a solid percentage of shared locations are "here's where I am", and in almost all of those cases, you're starting in the message app, not the map.     A I missing anything?


What is the best way to replace the file browse button in html?

I know that it's possible to replace the browse button, which is generated in html, when you use input tag with type="file.  I'm not sure what is the best way, so if someone has experience with this please contribute.


Is Dabi Endeavors oldest son Toya Todoroki? I need to know because google is not working.


Access Windows 7 Files from Ubuntu 12.04

I'm new to Ubuntu, so can any of you give me a guide of how I can access my windows 7 files from my Ubuntu 12. I installed it using Wubi. Looked around everywhere but failed.


Material preview and Eevee rendering not working

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


I have a few hundred files named hortstu01-01-14 then hortstu01-02-14... Do you get the idea?  Well half of the files are named hortstu_01-03-14 then hortstu_01-04-14.  This messes up sorting the files by name and getting them in the order I'd prefer them to be.  So I'd like to rename the ones without the underscore to hortstu_    Is it possible to do this in a batch operation?  If so how?


I have currently started and completed a lot of Ks3 physics papers. I have decided to go right back to basics so now I feel that I can start working at GCSE level but the only reference I can find to do this is BBC Bitesize. but I find that this only covers some parts and not others, I want something more in depth and can anyone point me in the right direction without me having to pay for an online course?


Use each value of a for loop before the loop finishes

I have a function that gets values using for loops and puts them into 1 variable. This variable is them stuck in a form where its is then submitted. But the problem is that the for loop would finish looping by the time the value is entered and submitted. So everytime I test it, the variable "value" = 9999. Can anyone please tell me how to add 1 to variable every time the function loops? Thanks in advance.  function myFunction() {   var value1;  var value2;  var value3;  var value4;  var value;   for (value1 = 0; value1 < 10; value1++) {   for (value2 = 0; value2 < 10; value2++) {    for (value3 = 0; value3 < 10; value3++) {     for (value4 = 0; value4 < 10; value4++) {      value = value1.toString() + value2.toString() + value3.toString() + value4.toString() + '@2018';      document.getElementById('pswd').value = value;      document.getElementById('uid').value = 'test';      document.getElementById('commentForm').submit();     }    }   }  } }  var loop = setInterval(function() {  myFunction();  }, 2000);


Help identifying a dystopian story with someone traveling to an alternate universe

I read the beginning of this book, and I'd like to finish it. I think the story centered on a scientist, after a nuclear cataclysm, who had tried to help people but everything went wrong, and people were getting killed. I think a rocket or something took him to an alternate reality version of the USA.  I'm pretty sure it had a green cover.


regex not working as a expected when I feed "disp VARIABLE attr stixpaths limit INT"

Hello everyone I have a regex pattern as follows "disp"i VARIABLE ("attr"i stixpaths)? ("limit"i INT)?  and I test it with disp VARIABLE attr stixpaths limit INT  I use to test it online  But I get 0 matches though I believe it should match am I missing anything here?


I want to pass server name which is listed in a file (servers_list) as variable to spawn command which is in another script (user_create_script). Purpose of this script is to create user(david) in multiple servers.  #cat servers_list server1 server2 server3   #cat user_create_script     spawn ssh -t user@$i sudo /usr/sbin/useradd david     expect "password:"     send "pass123\r"     interact


During an exam I tried to prove that the identity element of group (G.•) is unique. I approached this way:  Suppose there are two identity elements $e_1$ and $e_2$. Then:  $a^{-1}•a=e_1$  $a^{-1}•a=e_2$  $e_1=e_2$  What are the potential flaws in my proof?


Can't see a glass object through another glass object in Eevee

I was just testing Eevee and found that you cannot view a glass object through another glass. Is there any workaround? It works fine only If I rotate the glass window or put my camera to the back side of the scene


Does the ground beneath a levitating object change due to the rotation of the earth?

I don't know whether this question pertains to physics. But anyways,  here goes... If I were to hover 1m above the ground in a helicopter, would the ground below me change after 1 hr due to the rotation of the earth?


Prove that for every $n$ there is a multiple of $5^n$ which does not contain a zero.

How to prove that for every $n$ there is a multiple of $5^n$ which does not contain a zero in its decimal representation?


How do I get the difference between two Dates in JavaScript?

I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference.


Why does nature rely on RNA primer for the start of DNA Replication? Why not simply use DNA primer and make life simple !


How to get Remote Desktop icon in taskbar

I'm using my work laptop to connect to my remote work desktop. When I do that, I get an icon of the remote session in the taskbar of my laptop, which means I can (for example) use Alt+Tab to go from Excel to the remote desktop.   However, when working on the (remote) desktop, I don't have an icon which allows me to use Alt+Tab to go back to my laptop. There is only the blue bar at the top of my screen which I can use to go back to my laptop, for which I need the mouse.  Any idea how to solve this? An alternative would be a suggestion on how to use keyboard shortcuts to go back to the laptop screen from the remote desktop screen.  Thanks


Finding $\lim_{(x,y)\to (0,0)} \left(\frac{x^2 y}{x^4 + y^2}\right)$

I have big problem with the the limit of the following function: $$\lim_{(x,y)\to (0,0)} \left(\frac{x^2 y}{x^4 + y^2}\right)$$ I have tried to estimate lower and upper bound for Three-Series Theorem and to to convert it to polar coordinates and it didn't work well :)


What's the formula for the 365 day penny challenge?

Not exactly a duplicate since this is answering a specific instance popular in social media.  You might have seen the viral posts about "save a penny a day for a year and make $667.95!" The mathematicians here already get the concept while some others may be going, "what"? Of course, what the challenge is referring to is adding a number of pennies to a jar for what day you're on. So:  Day 1 = + .01 Day 2 = + .02 Day 3 = + .03 Day 4 = + .04   So that in the end, you add it all up like so:  1 + 2 + 3 + 4 + 5 + 6 + ... = 66795   The real question is, what's a simple formula for getting a sum of consecutive integers, starting at whole number 1, without having to actually count it all out?!


Where is the @ sign in front of my raspbian-bash-prompt coming from?

There is @-sign in front of my raspbian-bash-prompt (headless) which I can't determine where it is coming from.  $ ssh pi@raspberrypi Linux raspberrypi 4.14.98+ #1200 Tue Feb 12 20:11:02 GMT 2019 armv6l (...) @pi@raspberrypi:~$ bash --version GNU bash, version 4.4.12(1)-release (arm-unknown-linux-gnueabihf) (...) @pi@raspberrypi:~ $ echo $PS1 \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\]   It seems only to be there for the user pi and seems not to be part of the $PS1 variable, but it vanishes when i unset the variable.  @pi@raspberrypi:~ $ unset PS1 export PS1="prompt> " @prompt> sudo su - lisa lisa@raspberrypi:~ $ exit logout @prompt>     I temporarily (re)moved .profile, .bashrc, /etc/profile and /etc/bash.bashrc with the expected result except of the still leading @-sign  @-bash-4.4$     Another wild guess was, that it has to do with if I'm using an SSH-Key-File or if the user is part of the sudo group (because both is only the case for my pi user), but that's also not the case. This raspbian-installation is in use for a couple of years and I played a lot around with it, so it is definitly possible that it has to do with something I changed.


c++ template copy constructor not available or explicit

I wrote a code with template copy constructor to get a better understanding of the concept as I am new to it but the following code fails to compile  #include <iostream> #include <vector>  using namespace std;  template <typename T> class Grid { public:     explicit Grid(size_t inWidth = kDefaultWidth, size_t inHeight = kDefaultHeight);     virtual ~Grid();      template <typename E>     Grid(const Grid<T>& src);      static const size_t kDefaultWidth = 10;     static const size_t kDefaultHeight = 10;     std::vector<std::vector<T>> mCells;     size_t mWidth, mHeight; };  template <typename T> template <typename E> Grid<T>::Grid(const Grid<T>& src) {     cout << "Copy constructor working " << endl;  }  int main() {     Grid<double> myDoubleGrid;     Grid<double> newDoubleGrid(myDoubleGrid);     return 0; }   On compiling the above code in visual studio following error appears:-  ERROR:-     Severity   Code    Description Project File    Line    Suppression State   Error   C2558   class 'Grid': no copy constructor available or copy constructor is declared 'explicit'     I have tried to replace the argument's template with E and It shows more errors (strange ones)  template <typename T> template <typename E> Grid<T>::Grid(const Grid<E>& src) {     cout << "Copy constructor working " << endl;  }   Errors:     Severity   Code    Description Project File    Line    Suppression State   Error   LNK2019 unresolved external symbol "public: __thiscall Grid::Grid(unsigned int,unsigned int)" (??0?$Grid@N@@QAE@II@Z) referenced in function _main            Error  LNK1120 2 unresolved externals            Error  LNK2019 unresolved external symbol "public: virtual __thiscall Grid::~Grid(void)" (??1?$Grid@N@@UAE@XZ) referenced in function "public: virtual void * __thiscall Grid::`scalar deleting destructor'(unsigned int)" (??_G?$Grid@N@@UAEPAXI@Z)


A little line under the name of the part

How can i make a little line under the name of the part. My trial is   \part*{PART I} \addcontentsline{toc}{part}{{\huge \textbf{PART I}} \\ \hrule}  but this falis, and here is a screenshot including the part. Thanks in advance.


Received an unexpected cashiers check for over $2K from another state - is this some scam?

This is actually about my sister-in-law who lives in Georgia. She just received a "cashiers check" for $2395 from a company in Indiana. It looks like this:    She said that she has been doing "mystery shopper" work for a company and thought that this would be payment for that, but that usually the payments she received for that work were just a couple of hundreds of dollars.  She said she had not done that much of that "mystery shopper" work that she would have expected to receive anything close to the amount on this check.  She was asking me about it but I thought that if she does not know the sender, perhaps this could be some kind of new scam and she should check with the local police (which she said she was going to do).  Anyway I wanted to ask here if anyone knows of a scam like this? Considering that the check here seems to be a "cashiers check", how would a scam like this even work?  Update: I just found out that there was indeed a letter included with the check (and it seems to have instructions similar to those mentioned in the answer by "BrenBarn"). This is indeed related to that "mystery shopper" work. Turns out the reason she was not sure was because the sender of that check has a different company name than the company she normally dealt with. Here is a part of the letter:


Could someone please explain me how to apply the Descartes's Criterion? For example , how do I find the rational roots of $ x^3 -x +1$.  I've been looking at some examples, but I get confused.


This proof tries to show that  $ \mathbb{R} = \mathbb{C} $  $Let  z \in \mathbb{C}, \exists r \in \mathbb{R}^{+}, \theta \in [0,2\pi]:z=re^{i\theta}$     $\\z=re^{i\theta\frac{2\pi}{2\pi}} = r(e^{2\pi i})^{\frac{\theta}{2\pi}}= r(1)^{\frac{\theta}{2\pi}}=r \\so z \in \mathbb{R} \\\rightarrow\mathbb{C} \subset \mathbb{R} \\ therefore \mathbb{C}=\mathbb{R}$  This proof is clearly false but I can't seem to find any algebraic mistake in it.


Why are my suggested edits here approved by Community♦?

I just noticed that my suggested edits on meta are quickly approved by Community♦, sometimes almost instantaneously.  As a guess: does this have anything to do with the fact that I have edit privileges on the main site?


I just downloaded VSCode-linux-x64 from . It's a 62 MB zip file. How can I install it on my Ubuntu system?


Ability to earn double miles on 2 different airlines. (AA and BA)

I am an awards member with both American Airlines and British Airlines. I work in the Middle East and every month I'm either flying to the Middle East or flying home.   My company only has an account with BA and for the last 3 years after my flights are over I request miles to my AA account and have received them. So in fact I'm actually earning double miles. I don't know why but I have never requested miles for flights I fly with AA on my BA account.  This week I tried to add miles from my recent flights with AA to BA and they were rejected. When I called BA to find out why they had been rejected they told me they had already been credited to my AA rewards account and BA couldn't award me because that would be "double credit"...    I don't want to make too much of the issue if this will hurt me with my AA rewards. But is this correct? Any one else have this issue or could you help me ?


When and why do I need to quote asterisks

I don't think I ever fully grokked the rules of when and why one needs to doublequote things in Linux/Bash (I'm not sure if this problem's domain is Linux, Bash, or something else). I thought that * matched any number of characters (including none), and this seems to align with . But when I tried to use the * wildcard as follows, I got results I don't understand:  >pwd /home/user/foo/foo/test >tree  . ├─ main.opp └─ test    └─ test.opp  >find ../ -name *.opp ../test/test.opp  >find ../ -name "*.opp" ../main.opp ../test/test.opp  >cd .. >pwd /home/user/foo/foo  >find . -name *.opp ./main.opp  >find . -name "*.opp" ./main.opp ./test/test.opp   Why does find with the non-doublequoted *.opp argument only return one hit, whereas doublequoting the same returns the expected two hits?


We know axiom of choice states that:  Given any collection $\{ S_i : i \in I \} $ of nonempty sets, there exists a choice function $f: I \to \bigcup_{i \in I} S_i $ such that $f(i) \in S_i $ for all $i \in I$.  Question: I am bit confused because in one books I saw the axiom of choice as: For any collection $\{ S_i : i \in I \} $ of nonempty sets, $\prod_{i \in I} S_i $ is non empty.   Why are they equivalent?


What is the best way to punctuate a list of questions in a declarative sentence?

In my report a need to write a list of example questions that someone might ask, but I would like to do it in a sentence rather than a separate list. Here is an example:     This poses questions such as "How should I punctuate it?", "Are the quotes necessary?", "Are the commas in the correct place?", and "Should I have used a colon, or a semi-colon?"


I have often heard that advice is uncountable and shouldn't be prefixed with an article. So I often force myself to say "a piece of advice". But I've seen it used with an article on a number of occasions. For example: . (See  for a copy of the original article.) In some cases it's even pluralized as advices. For example:  Our latest advices from Santo Domingo state that the Spanish troops have almost entirely abandoned the island.   Any idea?


How is Harry Potter a distant cousin of Voldemort?

On the , I found that Harry Potter is listed as a distant cousin under the 'Family Members' section.  Is this true? If yes, please provide proper citations from canon.


What happened to Red Skull after Thanos gained the Soul Stone in Avengers: Infinity War?

Red Skull had survived his encounter with the Space Stone in Captain America: The First Avenger after all and was transported to Vormir to become Keeper of the Soul Stone.   What happened to him after Thanos took the Soul Stone he was keeping in Avengers: Infinity War?


What does f-stop mean? Is it the same thing when people say "2 stops" for example?


Suppose I am talking about three people:       John, Jane "," or Joey could finish the task on time.     Do I need the comma before "or"?    EDIT:  This asks about using a comma with "or", not "and". So this question is different from .


How to remove 'Chapter 1.' from 'Chapter 1. Introduction' while using \leftmark?

MWE is below:  \documentclass{report} \usepackage{fancyhdr} %\newcommand{\currentchapter}{} %\let\oldchapter\chapter %\renewcommand{\oldchapter}[1]{\oldchapter{#1}\renewcommand{\currentchapter}{#1}}  %\renewcommand{\sectionmark}[1]{\markright{#1}}  %\renewcommand{\chaptermark}[1]{\markboth{\textbf{#1}}{}} \rhead{\leftmark}   \fancypagestyle{newstyle}{ \fancyhf{} \fancyhead[LE]{{\nouppercase{\leftmark}}} \fancyhead[RO]{{\nouppercase{\rightmark}}} } \begin{document}   I want to have      'Introduction'   in place of     'Chapter 1. Introduction'   as the header for my pages inside the document. So, is there a command set I can use instead of \leftmark to get the desired results? Or can I redefine \leftmark in any way to get the desired results?


How can I reinstall the latest version of R package on Ubuntu virtualbox after I remove the old one?

I tried to remove the old R version after I installed, then I reinstall it but I cannot because it shows me the following things. I want to install R 3.6 in Ubuntu but I cannot even R 3.5 as it always shows me this:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  r-base : Depends: r-base-core (>= 3.6.0-2xenial) but it is not going to be installed           Depends: r-recommended (= 3.6.0-2xenial) but it is not going to be installed           Recommends: r-base-html but it is not going to be installed E: Unable to correct problems, you have held broken packages.


What will Sony do if someone uses my account as primary on another ps4 without my knowledge? Will the account be banned? Or will the other guy that has my account as primary be banned? After how long? I have no credit card on my account so I don't care too much but I want to know.   He uses my account on his ps4 as a primary account. I think to use my digital games as free (Sharing, but without my knowledge).


I am new to Blender and was using it for creating YT Channel Intro with templates available on Velosofy (This one: ). The problem is after rendering it with FFmpeg (I even tried AVI JPEg) and H.264 it doesn't render it as in preview, it becomes dull and even the object have black spots on their edges.   In the Render Properties>Colour Management the value for Display device is sRGB, view transform is Standard and sequences is sRGB still it's the same... And yes it's a video and for trying rendered image...


What are the advantages/disadvantages of the new encryption feature in ubuntu 13.10

I'm in the middle of installing 13.10 and the Ubuntu page I was following on how to install from a USB stick says nothing about these two choices (on the Installation type screen):     1) Encrypt the new Ubuntu installation for security (you will choose a security key in the next step).      2) Use LVM with the new Ubuntu installation (this will set up Logical Volume Management. It allows taking snapshots and easier partition resizing)   I'm a writer using the computer for mostly writing ebooks but I also do all the things most people do: buy stuff online, online banking etc. I want my information to be safe but I don't want to overburden my system with security stuff either. And I've read a lot of the similarly themed questions here on the forum but they've all been about stuff more technical than I'm concerned about.   Can somebody please just tell me in real layman's terms about the implications of these two choices? Thank you.


How do photoreceptors overcome the ambiguity of wavelength vs intensity to determine brightness?

I asked a similar question about the Principle of Univariance yesterday, but now I have another one.  According to the Principle of Univariance, the input to a photoreceptor differs along two dimensions (wavelength and intensity) but the output can only vary along one dimension (the cell's graded potential).  This means that there is inherent ambiguity in the output of the photoreceptor. What I do not understand then is how it is possible for a rod (or cone) to ever distinguish between intensities (or wavelengths) when each photopigment can absorb a range of wavelengths at different probabilities.  For example, say a rod cell absorbs $50\%$ of all photons at wavelength $x$ and $25\%$ at wavelength $y$. If 100 photons reach the rod cell at wavelength $x$ we can roughly assume that $100*0.5=50$ isomerizations will occur. Equally, if 200 photons reach the rod cell at wavelength $y$ then we can roughly assume that $200*0.25=50$ isomerizations will also occur. From the perspective of the cell's synaptic activity, the two responses will be the same despite the large difference in intensity.  Clearly there are an infinite number of permutations to this basic pattern. It is thus unclear to me how the visual system is able to obtain any information about the intensity of light in rod cells.  The same issue also appears present to me in cone cells (the usual explanation is that the relative amount of excitation/inhibition can be compared between cone cells, but this does not seem to solve my overall question).


I have this exercise in my worksheet in the discrete mathematics course.I don't understand the part that deals with prime numbers in .     "Show that for a prime number $p$, if a $p\mid a^n$ then $p\mid a$"    Can somebody show how ?


Can I remove a RAR file's (known) password without recompressing the archive?

I know the password to the RAR file as I locked it myself. Is there a way to do this in WinRAR or an equivalent program? The only thing I knew to do was to extract it, then create a new RAR without the password.


I recently upgraded to QGIS 3.2 and followed the install instructions carefully.  Under the raster and vector menus I have only 1 tool for vector and only 3 for raster. No analysis, geometry, geoprocessing tools etc...  when I use the main search bar to look for any of the tools I would have used in QGIS 2 (polygonize, dissolve, clip) I get no results.  python and GDAL were install as per instructed in the QGIS 3.2 README  Am I missing something?


How to allow contributor users to add web parts

I am working on an enterprise wiki site collection, currently contributor users with the following permission level, cannot add web parts:-    I think that assigning them a Design permission will solve this issue, but at the same time they will be able to modify the site collection, which I do not want to grant.so can anyone advice what is the best approach I can follow to allow contributor users to add web parts without being able to have Design permission level? Thanks


Problem  I'm trying to locate a node using EntityFieldQuery. Using fieldCondition removes all of my search results. What am I doing wrong?  So Far  I've built my function using . It's running in a custom form submit.  function mymodule_form() {     $query = new EntityFieldQuery();     $query      ->entityCondition('entity_type', 'node')      ->entityCondition('bundle', 'contact_details')      ->fieldCondition('field_user_reference_manual', 'value', '154');     $result = $query->execute();  }   If I remove the fieldCondition query line it returns both contact_details nodes that I've created. One has field_user_reference_manual = 154 the other 140   The important values in my MySQL table are:  Field: field_data_field_user_reference_manual  Column: field_user_reference_manual_value


When I click the gear icon to open the system menu on my PC, these options are presented:   Suspend Restart... Shutdown...   The restart options seems redundant, because it literally does the same thing as the shutdown one - brings up the overlay menu that is focused on the shutdown shortcut.  I thought this option was supposed to be already removed. In fact, it doesn't exist on my laptop.  How can I bring the system menu back it its normal/original state?  Both computers running Ubuntu 14.04.


Complete List of Terminal Commands and all their parameters

I was wondering if there was any complete guide to the Linux Terminal (don't mind buying a book or something), specifically, I want the list (or book) to do an A-Z of the commands with all their parameters, reasons why you'd use those commands and examples.  If anyone has recommendations I'd be most appreciative!  Thanks in advance!


How to install CUDA 8.0 on Ubuntu 16.04 with Nvidia GeForce GTX 1080

I am attempting to install CUDA 8.0 within Ubuntu 16.04 for the Nvidia GeForce GTX 1080. I had CUDA 7.5 installed, but it did not appear to be compatible with the GTX 1080. I downloaded the .run installer from Nvidia's developer page, but the installation fails and outputs the following to a nvidia-installer.log     An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in     your kernel.  This may be because it is in use (for example, by an X     server, a CUDA program, or the NVIDIA Persistence Daemon), but this     may also happen if your kernel was configured without support for     module unloading.  Please be sure to exit any programs that may be     using the GPU(s) before attempting to upgrade your driver.  If no     GPU-based programs are running, you know that your kernel supports     module unloading, and you still receive this message, then an error     may have occured that has corrupted an NVIDIA kernel module's usage     count, for which the simplest remedy is to reboot your computer.   I have rebooted the computer, but that did not resolve the problem. How do I unload the 'nvidia-drm' module so that I can install the 8.0 CUDA?


Let $V$ be a finite dimensional vector space over $R$, then is it   possible to write $V$ as union of finitely many proper subspaces?   I am not sure but suppose if we have $B$ as an ordered basis for our vector space $V$, then we may break $B$ into $B_1$ and $B_2$ such that $B1\cap B2=\phi$ and $B1\cup B2=B$  So, isn't it true that $V=L(B1) \cup L(B2)$?  Where $L(B1)$ is linear span of $B1$


Let $X$ be a normed space. Prove that $X$ is complete if and only if $\Sigma_{n=1}^{\infty} x_n$ exists for any sequence $\{x_n\}$ that satisfies $\Sigma_{n = 1}^\infty \|x_n\| < \infty$. Here $\Sigma_{n=1}^{\infty} x_n$ means the limit of $\Sigma_{n=1}^{N} x_n $ as $N \rightarrow \infty$ I have started to learn Introduction to functional analysis, but I am not sure if I understand correctly. Could you give me some answers (or hints) to the question? Thank you.


is there any way to make this code shorter?

//list the controls from the  main form foreach (Control c in Controls) {     if (c is ComboBox)     {         ((ComboBox)c).SelectedIndex = -1;     }     else if (c is TextBox)     {         ((TextBox)c).Text = "";     }     else if (c is CheckBox)     {         ((CheckBox)c).Checked = false;     }     //etc. with FIFTY different types to check against }


When I go in Jorrvaskr, my active quest tells me to go down to the Jorrvaskr living quarters, and the quest arrow leads me to where Kodlak is usually sitting - but there is no one in the seat. Kodlak is dead and everyone is "mourning" but when I speak to anyone in the companions they act as if nothing happened.   For example I have the option to train from them still and ask "Why did you join the companions?"  Will it still work for me if I start the quest to retrieve the helm of winterhold and run through driftshade refuge or use invisibility potions to get the helm without killing anyone? (I have a saved game right when I started Bloods Honor and before I have killed any witches).  Note: I have not cleared driftshade refuge and I have not completed the quest to find the helm of winterhold.


How to starfile with program which I want?

For example: you want to start file "hello.txt" in python, you will use this code:  os.startfile("hello.txt) But the system will open "hello.txt" with default program If I want to start "hello.txt" with Sublime Text or notepad+ or any program which is not a default program. What I have to do:?:( Thanks (and sorry for my bad english)


in nested for loop in JAVA, why is the faster big loop in small loop than small loop in big loop?

When the number of iterations is the same, I wonder if the smaller iterations of the outer 'for loop' are faster.   This is my java code.  total loops iterations is 100 billion.  public class Test {      public static long run1() {         final long start = System.nanoTime();         long cnt = 0;         for(int i = 0; i<1000000000; i++) {             for(int j = 0 ; j<100 ; j++) {                 cnt++;             }         }         final long end = System.nanoTime();          System.out.println("run1 : "+(end-start)*1e-9+" sec");         return start - end;     }        public static long run2() {         final long start = System.nanoTime();         long cnt = 0;         for(int i = 0; i<100; i++) {             for(int j = 0 ; j<1000000000 ; j++) {                 cnt++;             }         }         final long end = System.nanoTime();          System.out.println("run2 : "+(end-start)*1e-9+" sec");         return start - end;     }       public static void main(String[] args) {          for(int i = 0 ; i < 10 ; i++) {             long test1 = run1();             long test2 = run2();             System.out.println("Time diff : "+(test1-test2)*1e-9+" sec\n");         }     } }      and this is result   run1 : 4.5772473950000006 sec run2 : 1.7155700900000002 sec Time diff : -2.861677305 sec  run1 : 4.4107229420000005 sec run2 : 1.6532413140000002 sec Time diff : -2.7574816280000003 sec  run1 : 3.815836296 sec run2 : 1.761153921 sec Time diff : -2.054682375 sec  run1 : 3.913543021 sec run2 : 1.752971717 sec Time diff : -2.1605713040000003 sec  run1 : 3.851766485 sec run2 : 1.7262416440000001 sec Time diff : -2.1255248410000003 sec  run1 : 3.95305219 sec run2 : 1.7323067330000002 sec Time diff : -2.220745457 sec  run1 : 3.924869236 sec run2 : 1.6953032440000002 sec Time diff : -2.229565992 sec  run1 : 3.839871705 sec run2 : 1.692300162 sec Time diff : -2.147571543 sec  run1 : 3.93864626 sec run2 : 1.704322469 sec Time diff : -2.234323791 sec  run1 : 3.863758493 sec run2 : 1.700392962 sec Time diff : -2.163365531 sec   like this,   I wonder why these results are coming.  and, edited by Triple nested loops, Similar results are obtained.


what kind of accuracy (rmse) can be expected by georeferencing a scanned image?

I am trying to understand what is the effective accuracy of a georeferenced image and how to attach a standard to the georeferencing process which can be used for future reference. To explain further, I am trying to assess what kind of RMSE would be acceptable when for example georeferencing an accurate architects drawing with an aerial image, or with a small scale landuse plan drawn with thick outlines using parcel data with an accuracy of plus/minus 1cm.  If I am using an inaccurate base map in which to base my passpoints, does the rms error have any meaning whatsoever? Logically, is it not so, that one can only use the rmse as a standard when the accuracy of the basemap can be certified? If the base map is not accurate, any passpoints referenced to it would be even less accurate and an RMS error meaningless.  Am I on the right track?


I changed my password and shortly afterward was no longer able to access my Gmail account. How can I sign into my email again?


I've read material claiming it comes from the Higgs boson fails while others claim it is from the tensions of quarks in the gluon field... I am only a 15 year old kid in high school so please "dumb it down"


I am trying to show that for any positive integer m,  $$\sum_{i=0}^{2m} (-1)^{i}\binom{2m}{i}^{2} = (-1)^m\binom{2m}{m}$$  Intuitively this seems to be true, $m = 0$ both sides evaluate to $1$, $m = 1$ both sides evaluate to $-2$.   I was looking at this identity for a potential connection, but it seems not applicable here $$\binom{2n}{n} = \binom{n}{0}^{2} + \binom{n}{1}^{2} + \binom{n}{2}^{2} + ... + \binom{n}{n}^{2}$$  Also I was trying to find connections between this and the binomial theorem, but no luck


Can Cersei Lannister claim the Iron Throne and legitimize her act?

At the end of season 6 of Game of Thrones,       Cersei claims the Iron Throne.   It is not explained how.  Is it normal for a Queen regent to assume the throne once there are       no longer any other apparent heirs?   If so, would she need to seek out and destroy any distant blood relations of the Baratheons, or does it not matter as they wouldn't have a significant army?  If it's held by coup powers, shouldn't Jaime be King? He is presumably still Lord of Westerlands and in charge of the Lannister forces.


How to partition for Windows/Ubuntu dual boot on same SSD and on same HDD? [

I have a 256gb SSD and a 1tb HDD on mu laptop. I want to create a dual boot and add a linux OS (with ubuntu) on my SSD. but, I have only 160 gb free out of the 256, so i'd rather install the OS and only the OS on the SSD and then use part of the HDD for the linux. I mean I want to use the SSD only to store both systems, and then also split the hdd and use it for both of them as well. Is it possible? Can it ruin something? the use of one ssd for 2 systems? How can I split the HDD to both of them? I'll try to be more specific. As I said I have free 160gb out of 256gb on my C:\ SSD which already got Windows on it. I want to also install Linux on it. But when i'll be working on Linux, i'll probably download stuff, apps, documents, create projects and etc, which will consume memory and I don't want it to consume memory of the C:\ SSD, I want it to consume memory from my D:\ HDD which got free 1GB. In that way I won't be "scared" to download and create many things that will consume alot of space because I won't care about the space because I got plenty of it on my HDD unline my SSD which got only 160 free gb, and i'll allocate another 50gb for the linux which means it will reduce to 110 free gb, and I don't want it to be reduced any more and I would prefer to use the space that on my 1TB HDD for my projects and things. Thanks.


I am translating something from German to English (my mother-in-law's war stories), and she wrote of having lived in various labor camps while she was in the custody of the Soviets after WW 2.  She writes of having lived "in einer Baracke", and the singular form for it in English is "barrack", but do we really ever use the singular form?  Despite my 8 years in the US Army where this word was used frequently, I never heard the singular form used.  My German-English dictionary says "hut, barrack", and the  says "A building or group of buildings used to house military personnel. Often used in the plural."  Well, always is not often, clearly.  The reason I am asking is because I am considering using the singular form (making her story into a book, you see) in order to keep somewhat of the flavor of the original account.  But is that a good idea, do you think?  It will be English speakers who will read this book, and I don't want them to think I spelled the word wrong.


Proving the existence of a complement subspace $U' \subset V$.

Given a subspace $U \subset V$ of a vector space $V$, show that there exists a subspace $U' \subset V$, such that $U+U'=V$ and $U \cap U'=\{0_V\}$.  I am aware that $U'$ is the complement of $U$ in $V$.   Would it be correct to prove this over the basis extension theorem?  For every subspace $U$ there exists a basis of $U$, let it be $B_U$. It is true that $B_U \subset V$. According to the basis extension theorem one can extend any set of linearly independant vectors in $V$ to a basis of $V$. Thus one can extend $B_U$ to a basis of $V$. Let this basis be $B_V$. It is true, since the vectors in $B_V$ are linearly independant, that $\langle B_U \rangle \cap \langle B_V \setminus B_U \rangle = \{0_V\}$. It is also obviously true that $\langle B_U \rangle + \langle B_V \setminus B_U \rangle =V $. Let $\langle B_V \setminus B_U \rangle=U'$.   Is this correct or am I missing something?


Can't install NetBeans 9.0 "Error occurred during initialization of boot layer"

~/netbeans/bin$ sh ./netbeans Error occurred during initialization of boot layer java.lang.module.FindException: Module java.xml.bind not found   I've installed jdk-11.


Total 24 hours, Bounty ended 22hours ago, grace period ends in 1 hour, why 1 hour gone?

Why the total hours is 23 hours not 24 hours? how does this calculation done?


How to make a paragraph appear closer to the itemization than the preceeding paragraph?

We have done blah blah blah  Reasons:  \begin{itemize} \item The need to blah blah \item The problem of blah blah \item \ldots \end{itemize}   Results:    As you can see the single-word paragraph "Reasons" appears visually much closer to the preceeding paragraph than to the itemization, which looks wrong.  Is there any way to fix this?


Jquery Submit button working first time but not working in second time

I am using jquery for Edit function. This is Working first time after click on submit button. But not working on second time.  $('#btn_editsubmit').click(function() {   var ans_id = $(this).data('ans_id');   var name = $(this).data('name');   var question_id = $(this).data('question_id');   var e_val = 'editor' + ans_id;   var d_text = CKEDITOR.instances[e_val].getData();   // alert(d_text);    $.ajax({     type: "post",     url: '<?= base_url('     answer ') ?>',     data: {       d_text: d_text,       question_id: question_id,       ans_id: ans_id     },     success: function(result) {       //alert(result);       console.log(result);       myObj = $.parseJSON(result);       var d = new Date(myObj["added_on"]);       var day = d.getDate();       var month = d.getMonth() + 1;       var year = d.getFullYear();        if (day < 10) {         day = "0" + day;       }        if (month < 10) {         month = "0" + month;       }        var date = month + " " + day + ", " + year;       var htm = '<div class="answer" id="answer<?= $answer['       id '] ?>">
' + myObj["answer"] + '

' + date + 'By ' + name + ' <?php if ($answer['       user_id '] == $this->session->userdata("UserId")) { ?><a href="javascript:void(0)" class="btn-edit" data-toggle="collapse" onclick="btn_edit(' + ans_id + ')" data-target="#Edit" data-q_id="<?= $answer['       id '] ?>">Edit
<textarea id="' + e_val + '">' + myObj["answer"] + '</textarea><button id="btn_editsubmit" data-question_id="' + question_id + '" data-ans_id="' + ans_id + '" type="button" class="btn btn-info mt-4">Submit</button>
<?php } ?>

';       //alert(htm);       $('#answer' + ans_id).html(htm);     }   }); });


Trouble with comparing 2 dimensional arrays

I keep getting a false boolean value from the following comparison:  public boolean getHz1() {     return board[0][0] == board[0][1]             && board[0][1] == board[0][2]             && board[0][0] != null             && board[0][1] != null             && board[0][2] != null;  }   The relevant call in the driver class is:  do {         System.out.println("Your turn: ");         g1.play(s.nextInt(), s.nextInt(), s.next());         System.out.println(g1.getHz1()); } while (g1.getHz1() == false)   The "play" method takes 2 integers and a string value to put in the array, in this case "x".  When I print out the board[0][0], board[0][1] and board[0][2], all contain the string "x", but getHz1 still returns false.


What is the purpose of the lambda function in this function and what is the advantage of using it?

I have this interesting piece of code: def get_unit_sigmoid_func(alpha: float) -> Callable[[float], float]:     return lambda x, alpha=alpha: 1. / (1 + (1 / np.where(x == 0, 0.01, x) - 1) ** alpha)  I just don't understand what the point of this is. Why wouldn't they write something like: def get_unit_sigmoid_func(alpha,x):     return 1 / (1+(1/np.where(x==0,0.01,x)-1)**alpha)  Is there any advantage to the way it's written in the first way?


(Java) Getting a null pointer exception from creating a JFrame and JPanel

I have a chat client that launches another window when '.play' is sent in. The relevant code follows:  BoardFrame bframe = new BoardFrame(); bframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); bframe.setSize(300,600); frame.setVisible(false); bframe.setVisible(true); BoardPanel bpanel = new BoardPanel(); bpanel.setSize(200,500); bpanel.setOrientation('v'); bpanel.setBackground(Color.GREEN); bpanel.paintComponent(bpanel.getGraphics()); bpanel.setVisible(true); bframe.getContentPane().add(bpanel,"Center"); bframe.pack();   BoardPanel is a class that extends JPanel and BoardFrame is a class that extends JFrame. Frame will be deleted, but for now i just set it to not visible.  I just dont want to go messing around in those other classes if the solution is a quick one here.   Also this is my first post on here so please forgive the hideous formatting.


This should be a fairly trivial problem. I'm trying to open an ofstream using a std::string (or std::wstring) and having problems getting this to work without a messy conversion.  std::string path = ".../file.txt";  ofstream output;  output.open(path);   Ideally I don't want to have to convert this by hand or involve c-style char pointers if there's a nicer way of doing this?


HTML CSS Box with padding and margin and 100% width?

I have a box #box with width: 100%, height: 100%, padding: 5px, margin: 5px; border: 5px;  I need in HTML5 layout correctly display that.  Now i have that:    But i need fit block in body area.  Code:  <!DOCTYPE html>     <style>     body,html {         width: 100%;         height: 100%;         margin: 0;     }      #box {         width: 100%;         height: 100%;         border: 5px solid red;         padding: 15px;         margin: 20px;     }     </style>      <body>     <div id="box">     Text will be here     </div>     </body>


I'm reading Guerino Mazzolla's Comprehensive Mathematics for Computer Scientists 1:     Axiom 3 (Axiom of Union) If $a$ is a set, then there is a set      $$\{x| \text{ there exists an element } b \in a \text{ such that } x\in b \}$$      This set is denoted by $\cup a$ and is called the union of $a$.    This axiom seems to take elements from inside of a set of sets, for example in the set: $a=\{\{u_1,u_2 \},\{u_3,u_4 \} \}$, there are two elements $b\in a$, then the mentioned set created by the axiom is $\{u_1,u_2,u_3,u_4 \}$.           The axiom seems to imply that the set $a$ must have a set inside of it for it to work, what if it  have an element that is not a set? (I'm not sure if this is possible, but I remember of having read something about the difference of sets and elements).         There's also an extension of my proposal, In the same book (and also in others) I've seen that the natural numbers are defined as:   $$\begin{eqnarray*}   {0}&=&{\emptyset} \\    {1}&=&{\{\emptyset\}} \\    {2}&=&{\{ \{\emptyset\}\}} \\    {3}&=&{\{ \{ \{\emptyset\}\}\}} \\   {\vdots}&=&{\vdots} \end{eqnarray*}$$  Then the singleton $\{ 3\}$ could be seen as $\{ \{ \{ \{\emptyset\}\}\}\}$, which could mean that   $$\cup \{ 3 \}=\cup\{ \{ \{ \{\emptyset\}\}\}\}= \{ \{ \{\emptyset\}\}\}=\{2 \}$$          Then the union could also be seen as the antecessor of a number?            Using the framework I provided, I see some ambiguity, look:   $$\{ \{ \{\emptyset\}\}\}=\{2 \}$$          I decided to interpretate it this way, but from the notation it's not clear in which pair of brackets I should stop, I guess that $\{ \{ \{\emptyset\}\}\}=\{2 \}$ but it could also be the case that $\{ \{ \{\emptyset\}\}\}=3$. I could want a singleton with a $2$ inside of it and a $3$ outside a set, no?


Wrong calculation of work done on a spring, how is it wrong?

So I would have thought that this would be how you derive the  on a spring: basically the same way you do with gravity and other contexts, use $$W=\vec{F}\cdot \vec{x}.$$ If you displace a spring by $x$, then it exerts a force $-k x$, so $F=-kx$, since the displacement is $x$.   So $$W=-kx^2.\qquad \leftarrow\text{ (however, apparently wrong!)}$$  I've seen the correct derivation of work in a spring (with an extra half) and don't doubt that it's correct, but also don't see where my logic fails in this alternate derivation.


Mean value theorem for multivariable functions

I`m trying to generalize Lagrange's mean value theorem for $f:A \to \mathbb{R}^n$ , differentiable in  $A \subset \mathbb{R}^m$.  What I have so far is that if $n=1$, we can write $g_i(t)=f(x_1,..tx_i,..,x_n$), where $x_j$ are any real numbers and $x_i$ is 1. We have $g'(t)=D_f(t)\cdot(0,..,1,...0)=\frac {\partial f} {\partial x_i}(t)$, And since $g_i(t):\mathbb{R} \to \mathbb{R}$ , we can apply the single variable mean value theorem to say that there exists a point $c_{x_i}\in [a,b] $ s.t $\frac {\partial f} {\partial x_i}(c_{x_i})=g_i'(c_{x_i})=\frac {g_i(a)-g_i(b)} {a-b}$ , for any partial derivative. However, For any partial derivative we get a different $c_{x_i}$, And I couldn`t find a way to relate $g$ back to $f$.   Also, if $n>1$, And I`d know how to handle the $n=1$ case, I know I can break down $f$ to $n$ different functions, apply the $n=1$ to each of them seperately, but then again, we get $n$ different points $c$ which aren't necessarily the same,So I got stuck here too.  I wonder if this is a good way to try and generalize the Lagrange`s Mean Value theorem for multivariable functions?Can anyone help me complete the idea, or suggest a different way of thinking?


Are there any differences between "I believe" vs "I think" vs "I reckon"?

These are the three most common ways to say "I think." (At least, I believe so. I mean, I think so. Um...)  Are there any subtle differences between them? Are there situations where one of the three is more suitable than the others? Can you say you hear a particular form all the time in the streets, while the other two are much less common?


To comment, one must have at least 50 rep. In , users who are new have good information which would be best suited as a comment but they do not have 50 rep and therefore comment on the question in the answer.  Should all users be able to comment?


How does Double Strike work with Trample?

Player A has a  (4/4 double strike) and decides to use the Bloodrush ability of , so now the Wrecking Ogre is a 7/7 with Double Strike + Trample.  If Player B decides to block it with 3 2/2 creatures, on the first combat, Wrecking Ogre's power will be down to 1/1,and that 1/1 will go to the player because it has trample.  My concern is about the second strike of wrecking ogre. Since there are no more blockers, will it deal 7/7 damage or 1/1 damage?  And if wrecking ogre is blocked by 2 5/5 creatures? Will it be dead before it can attack again? Will the Trample and Double Strike will be useless?


Ok, I answered  for a user some 10 minutes back and it helped him so he thanked me and upvoted my answer. I politely asked him to mark it as an answer also. Is that rep-whoring ? Also, he thanked me a couple of times and i know that SO states that we should refrain from making unnecessary comment but in this case i felt obliged to respond.


Pixelated DSM using LAS Dataset to Raster?

I am using ArcGIS 10.2.2, and I am trying to create a DSM out of some LIDAR data. After checking the LAS Dataset properties, I see that I have an average point spacing of approx 0.3.   I tried creating a dataset with all the basic settings, just setting the sampling value to times three the point spacing, so I set 1.     The image seems ok, but when I add hillshading, I feel it seems kind of clunky. I am wondering if I use the dataset to raster tool right? Is there some approach that is "best practice"?


Can I save energy costs by turning off the refrigerator for 1-2 hours every day?

Now that I'm looking into home automation, I'm thinking about automatically cutting off the fridge power from 3am ~ 5am. Given that modern refrigerators are well insulated, it should be able to withstand 2 hours of non powered cooling.  If I proceed with this project, will I see a big reduction in my monthly electrical bill?


Project Euler - 34 / Find a mathematical approach for upper bound

145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find   the sum of all numbers which are equal to the sum of the factorial of   their digits. Note: as 1! = 1 and 2! = 2 are not sums they are not   included.   So I tried a random enough large upper bound (100000) in my program and it worked.  I deleted this part to not spoil the answer  My question is : How to find the closest upper bound using a mathematical approach ?


Where is the link to the per-site meta in the new top bar?

I'm trying to find the link to my site's meta site on the new top bar and I can't find it. In fact I can't find it anywhere on the page.  For example: electronics.meta.stackexchange.com.  Perhaps I'm just not very perceptive, or possibly this is an opportunity to improve the new design.


Cyrillic letters and Russian hyphenation in Plain XeTeX

What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules?  Ideally i would like to not have to specify anything in the source files, but to get new commands rxetex and ramsxetex to compile sources in Russian.


Is there an analytic solution for the equation $\log_{2}{x}+\log_{3}{x}+\log_{4}{x}=1$?

I am looking for a close form solution for below equation.  $$\log_{2}{x}+\log_{3}{x}+\log_{4}{x}=1.$$   I solve it by graphing, but I don't know is there a way to find $x$ analytically  ?


Hopefully no one gets offended by the title but I had a discussion with a coworker whether or not there is a good word for people who fight for men's rights. If feminists are woman activists, what is the correct term for male activists (really just looking for the word, not for a discussion about activism) Andronists?  Enlighten us :)


consider following,  <body>     <form id="form1" runat="server">         <div>             <input type="text" id="txt1" />             <input type="button" id="btn1" value="Submit"/>                     </div>     </form>     <script>                  $("#txt1").live("blur", function () {             console.log('blur');                         return false;         });          $("#btn1").live("click", function () {             console.log('click');             return false;         });     </script> </body>   Above code will log blur event and click event on trigger of respective events. If click or change something in text box and then click on button btn1 blur and click event will happen respectively.What i want is if blur event is happening because of btn1 then click event should not happen,it should log only blur event,I want to stop click event from happening. How to do this? Can anyone help?


Extend a filesystem when adding HDD without using LVM?

Are there any method to extend a filesystem when i adding more hdd to it without using LVM? What are those ?


Install a single specific package from future distribution

I'm currently using precise. I need to upgrade a certain package (namely  and it's dependencies) to a newer version, which is currently found in raring (alfa at the time of writing this). How to do it ?  What will happen if I just add to my sources.list:  deb http://archive.ubuntu.com/ubuntu raring main   Will the next apt-get update / apt-get upgrade, upgrade most of my system to raring then ?


How to show that there is at least one triangle in G

Let $G$ be a undirected graph and $A$ be a its adjacency graph. How should I proof that there is at least one triangle in $G$ if there exist $i,j$ such that neither $(A)_{ij}$ nor $(A^2)_{ij}$ is $0$? Sorry but I have no idea to show this. Can someone help me to show this? Thank you in advance.


'Just' and 'only' carry a similar meaning, and while my feel for language usually helps me decide which one to use, there are times when I'm at a loss.  From my understanding, 'just' is used as a softener, to add flexibility and politeness. 'Only', on the other hand, is a relatively sharp exclusion. 'Just' also has a wider range of meanings, for instance to denote time.  While this sounds simple enough, it can get messy in practical usage. The sentence that made me stumble was "Not only airports are part of the target customer group, but also other large infrastructures".  Would the meaning of this sentence change when using 'just' instead? The way I see it, there is no difference in this case, except 'just' would make it sound a tad more colloquial.


sed or awk to print between 2 patterns[excluding the patterns]

I have the following text..  [start] this is my line [end]   My output should be:  this is my line   Need help..  Tried a combination of :  sed -n '/start/,/end/p' $File  & sed -e "s/]/']/" -e "s/\[/['/"   $file   but it brings up the pattern too.


Prove that for all $n \in \mathbb{Z}^+$, $\sum_{i=1}^n i^3 = \left(\sum_{i=1}^n i\right)^2$.  I understand how to do the base case using the proof of induction, but I don't know how you would show the inductive step given that there is a summation on either side of the equal sign.


How Do I Collect Redstone Ore in Minecraft PE?

Is this supposed to happen when mining Redstone ore in mine craft PE   Every time I try to mine Redstone ore in mine craft PE it won't let me collect it It lights up the room and then turns dark again  Deletes the block when I hit it


I intend to either reset a password of a user, or add a new user on my windows 10 machine with lost password. All the tutorials point to using utilman as cmd. I know it worked a year ago, but now it does not. I succesfully swapped utilman.exe to cmd.exe but after clicking the utils button the console does not appear. I heard a tip that you have to be in time before windows defender activates in 30 seconds, but even in 6 seconds it did not work.  What can I do now to reset the password to my account?


Build a rotation matrix that rotates 30 degrees along the axis (1,1,1)?

Why does the following image equal what it equals?    Why does x,y,z equal that? 1/sqrt(3),1/sqrt(3),1/sqrt(3)


What should the behavior of Disabled Link/Button be?

What is the best practice for designing disabled states? In general disabled states cannot be interacted with.  Any opinions on presenting a tooltip/pop-up on hover or click when the user interacts with a disabled/greyed out link or button.


I have a theory that uses the gamma function:  $$\Gamma(n)=\int_0^\infty x^{n-1}e^{-x} \space dx$$  Then I was inclined to think that perhaps the derivative is:  $$x^{n-1}e^{-x}$$  But I'm not sure we can just drop the integral along with the bounds to get the derivative. Then I thought about taking the limit:  $$\lim_{x\to\infty}x^{n-1}e^{-x}$$  But now we can't specify at what $x$ value we want to get the rate of change of. At this point I feel like I can't get any further on my own and would appreciate some insight.  EDIT: Looking for derivative in terms of $n$ actually.


Check if input is factor of 100 is not always working correctly in C#

I'm checking if the inputted number is a factor of 100 using the following formula:  100 % n === 0  But when someone enters 0.02 it says that 100 % 0.02 = 0.0199999999999979 which is incorrect.  Why is this happening and how can I solve this?  I also tried using: Math.Abs(100 % 0.02) but it gives me the same result which is 0.0199999999999979.


I'm writing content with dynamic names, e.g. "Alice" or "Bill" may be substituted in place of (name). Without knowing the gender of the name, what is the best way to reference the individual? Using "their" feels clunky. I could try to write the content in a way to avoid this issue but it gets complicated.  Sample: (name1) needs to rewrite their resume, but (name2) does not.   Alice needs to rewrite her resume, but Bill does not. (ok) Alice needs to rewrite their resume, but Bill does not. (feels clunky - is this ok?)   Links to related articles:


Access the same page from multiple urls (wildcard)

I want to serve a specific Wordpress page for multiple urls. Basically I want to point all the urls in a specific format to a known page:  /some-prefix-* => /target-page   And accessing /some-prefix-and-here-something it should load /target-page.  How to do this?  Note I do not want to redirect the user but to be able to serve an existing page to multiple urls.  The .htaccess looks like this:  # BEGIN s2Member GZIP exclusions RewriteEngine On RewriteRule ^prefix-*$ some/path/to/directory-$1 [NC,L] <IfModule rewrite_module>     RewriteEngine On     RewriteBase /     RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]     RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1     RewriteRule .* - [E=no-gzip:1] </IfModule> # END s2Member GZIP exclusions  # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>  # END WordPress  DirectoryIndex index.php index.html   I thought by adding RewriteEngine On RewriteRule ^prefix-*$ some/path/to/directory-$1 [NC,L] will serve /prefix-* from some/path/to/directory-$1. For example: when accessing example.com/prefix-foo should be the same with example.com/some/path/to/directory-foo (which resolves to example.com/some/path/to/directory-foo/index.html).  Also, if there is already a Wordpress page with the name prefix-bar, /prefix-bar should not load example.com/some/path/to/directory-bar/index.html.