How to include named capture groups in java regex?

I'm new to regex in Java and I can't figure out how to include named capture groups in an expression. I'm writing a ScrewTurn Image Converter for . This is what I have:  String image = "\\[image(?<align>auto)?\\|\\|{UP\\(((?<namespace>\\w+)\\.)?(?<pagename>[\\w-]+)\\)}(?<filename>[\\w- ]+\\.[\\w]+)\\]";  Pattern imagePattern = Pattern.compile(image, Pattern.CASE_INSENSITIVE);   It's throwing this exception in Pattern.comiple():  java.util.regex.PatternSyntaxException: Unknown look-behind group near index 19 \[image(?<align>auto)?\|\|{UP\(((?<namespace>\w+)\.)?(?<pagename>[\w-]+)\)}(?<filename>[\w- ]+\.[\w]+)\]                    ^   I've used named capture groups like this before in C# (?<namedgroup>asdf), but not in Java. What am I missing?


Why there is this wired "black" in my transparent material as distance is far

I've imported this word with bounch of flowers. I've thecked the materal, the UV and it looks fine. But somehow, there is this wired "black". And this black even shows up when there is only the World backgroud lighting up the scene. I've tried Blender 2.83 LTS, and 2.9. Some issue. I've tried theck the alpha of the texture image, I've tried change the alpha Clip/Hash/blend. Nothing really helps.... Here's the google drive link the of relavent blender file:


I would like to change the default Java icon (the design of the cup). I used the code below in the constructors of JFrames of my system and it worked only when I run the system in Netbeans, but when I generate the executable can not start my program!  setIconImage(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/ICONES/add.png")));


has been asked before, but not really answered.  If the substring method creates a new object, and this is object is "interned" in the pool, then why does the == return false. Here's my code:  public class StringTest {     public static void main(String[] args) {         String str1 = "The dog was happy";         String str2 = "The hog was happy";         System.out.println(str1.substring(5));// just to make sure         System.out.println(str2.substring(5));          if (str1.substring(5) == str2.substring(5)) {             System.out.println("Equal using equality operator");         } else {             System.out.println("Not equal using equality operator");         }          if (str1.substring(5).equals(str2.substring(5))) {             System.out.println("Equal using equals method");         } else {             System.out.println("Not equal using equals method");         }      } }   Output is: 1. og was happy 2. og was happy 3. Not equal using equality operator 4. Equal using equals method  P.S. This is the substring method source code:  public String substring(int beginIndex, int endIndex) {     if (beginIndex < 0) {         throw new StringIndexOutOfBoundsException(beginIndex);     }     if (endIndex > count) {         throw new StringIndexOutOfBoundsException(endIndex);     }     if (beginIndex > endIndex) {         throw new StringIndexOutOfBoundsException(endIndex - beginIndex);     }     return ((beginIndex == 0) && (endIndex == count)) ? this :         new String(offset + beginIndex, endIndex - beginIndex, value); }   P.S. This question has been marked as asked and answered by several people, yet I could not find one single instance on Stack Overflow where someone actually explained why substring(0) will evaluate to true.


As seen in the image bellow, the help section of the app suggest that bugs are reported to Meta Stack Overflow.  Should this be changed now to show Meta Stack Exchange in the next update, or should we still report bugs to Meta Stack Overflow?


Why is a degree Celsius exactly the same as a Kelvin?

How on earth is it possible that the difference between two temperatures in Celsius and Kelvin is exactly the same. Given the historical definition of Celsius, I find it hard to believe that this is pure coincidence.


Do OLS residuals tell us anything about the distribution of the error term?

I'd like some intuition on a question that has long confused me. Suppose we have a data-generating process  $$y_i = x_i' \beta + \varepsilon_i $$  where $\mathbb{E}[\varepsilon_i] = 0$, $\varepsilon_i \perp x_i$, and $\varepsilon_i$ is drawn i.i.d. from a probability distribution $U$.   When we regress $y$ on $x$ in a finite sample, we will get a set of residuals $\hat{\varepsilon}_i$. My question is, do these residuals tell us anything about $U$?   It seems obvious that the greater the variance of $U$ (i.e. when the DGP is noisier), the greater we can expect the empirical variance of $\hat{\varepsilon}_i$ to be, so clearly they must be somewhat related. Moreover, if you indeed had $y$ and $x$ for the entire population, there would be no estimation error, so the empirical distribution of $\hat{\varepsilon}_i$ would match $U$ exactly. So, for finite samples, what can residuals tell us about the shape of the unknown distribution $U$?


Objects assignment and GC behavior in Java

Given code below. What is the final value of the object objectOfA_In_B ?  Class A  {     // Some parameters and method with complicated logic goes here }   Class B {     A objectOfA_In_B = new A();      B()     {      // Operation done on objectOfA     }      public A getObjectA()     {         return objectOfA_In_B;     }    }   Class C {     public static void main(String[] args)     {         try         {             A objectOfA_In_C = null;             B objectOfB = new B();              objectOfA_In_C = B.getObjectA()              // Rest of logic goes here         }         catch(Exception e)         {             e.printStackTrace();         }         finally         {             objectOfA_In_C = null;         }     } }   Question is: Will objectOfA_In_B be null as well by setting objectOfA_In_C to null in finally block of C's main method simply because they are pointting to the same object ? Are both objectOfA_In_C and objectOfA_In_B are ready to get collected from Garbage Collector ?


I'm trying to use the command predict() to be able to obtain my $x_i\hat{\beta}$ in R predict(logitmodel,type='response')  As long as I'm not specifying any coefficients for the function to predict, does it simply just give me $x_i\hat{\beta}$ or does it return $y_i$? What if I have specified a logit distribution, say logitmodel=glm(y,binomial(),data)  Does it then return the transformed $x_i\hat{\beta}$, i.e. $F(x_i\hat{\beta})$? Which for a logistitic distribution is, $\frac{exp(\hat{\beta}'x_i)}{1+exp\hat{(\beta}'x_i)}$.


I have factory method that returns Type of a POCO given a Key.       public static Type GetType(string key)     {         var name = string.format("MyPOCOClass{0},MyAssembly",key);         return Type.GetType(name);     }   So lets say value of the Key is One and assume that the class MyPOCOClassOneexists in MyAssembly  in above case i wanted type of IEnumerable<MyPOCOClassOne> How do i do that?


Declaring an instance variable and initialize it in main methode

In the code below, the program should read values from a xml file. I declared the double variables as instance variables, and I initialized them in the main method. The problem is the program does not see the initialized values to a1,a2....a7. and I get a  NullPointerException  error. My question is it something has to do with static thing or it's not possible to declare a variable in one place and in another place.   public class ParseXml extends RoboticsAPIApplication {      private Controller kuka_Sunrise_Cabinet_1;     private  LBR lbr_iiwa_14_R820_1;      private static double a1, a2, a3, a4, a5, a6, a7;      public void initialize() {         kuka_Sunrise_Cabinet_1 = getController("KUKA_Sunrise_Cabinet_1");         lbr_iiwa_14_R820_1 = (LBR) getDevice(kuka_Sunrise_Cabinet_1,                 "LBR_iiwa_14_R820_1");      }      public void run() {          lbr_iiwa_14_R820_1.move(ptp(a1, a2, a3, a4, a5, a6, a7));     }      public static void main(String[] args) {          try {             // get instance of the class and use it to parse new file xmlfile              File xmlfile = new File("C:/Users/Acer/Desktop/neues.xml");             DocumentBuilderFactory factory = DocumentBuilderFactory                     .newInstance();             DocumentBuilder db = factory.newDocumentBuilder();             Document doc = db.parse(xmlfile);              // Normalize             doc.getDocumentElement().normalize();              // get the frame Element             NodeList nlist = doc.getElementsByTagName("frame");              // cycle through the Elements             for (int i = 0; i < nlist.getLength(); i++) {                  Node nnode = nlist.item(i);                 if (nnode.getNodeType() == Node.ELEMENT_NODE) {                     Element fframe = (Element) nnode;                      // Initialization                     a1 = Double.parseDouble(fframe.getElementsByTagName("A1")                             .item(0).getTextContent());                     a2 = Double.parseDouble(fframe.getElementsByTagName("A2")                             .item(0).getTextContent());                     a3 = Double.parseDouble(fframe.getElementsByTagName("A3")                             .item(0).getTextContent());                     a4 = Double.parseDouble(fframe.getElementsByTagName("A4")                             .item(0).getTextContent());                     a5 = Double.parseDouble(fframe.getElementsByTagName("A5")                             .item(0).getTextContent());                     a6 = Double.parseDouble(fframe.getElementsByTagName("A6")                             .item(0).getTextContent());                     a7 = Double.parseDouble(fframe.getElementsByTagName("A7")                             .item(0).getTextContent());                  }             }          } catch (ParserConfigurationException e) {             // TODO Automatisch generierter Erfassungsblock             e.printStackTrace();         } catch (SAXException e) {             // TODO Automatisch generierter Erfassungsblock             e.printStackTrace();         } catch (IOException e) {             // TODO Automatisch generierter Erfassungsblock             e.printStackTrace();         }          ParseXml app = new ParseXml();         app.runApplication();      } }


Proof Verification: A group of order $595$ has a normal Sylow 17-subgroup.   $|G|=595=5.7.17$  The divisors of $595$ are $1,5,7,17,35,85,119,595$.  $17|n_{17}-1\implies n_{17}=1,35\\7|n_7-1\implies n_7=1,85,119\\5|n_5-1\implies n_5=1$   If possible let $n_{17}=35.$ Then there is at least $35.17-34=561$ element of order $17.$ Then $n_7=1$ for otherwise the number of elements of order $17,7$ will exceed $595!$  Let $H_5,H_7$ be the normal Sylow 5 and Sylow $7$ subgroups of $G.$ Then $H_5H_7\le G$ and since $H_5\cap H_7=(e),G=H_5\times H_7\simeq H_5\oplus H_7.$ Thus none of the $35$ elements in $H_5H_7$ is of order $17.$ Hence $G$ has at least $561+35=596$ elements!  Please tell me whether the proof is right?


How big can you print a canon 5d iii Image?

I am new into photography as a business, one of my customers have asked if they could get an A2 size print.   My question is, will an A2 size print be clear enough from a canon 5d iii image (No Crop).


I have edited a number of posts on SO, recently there seems to be bug when uploading a image to question.  Consider for example if user uploads an image in their question it looks like below:        So users like me have to add ! before the braces of image description. Then the image works fine from there on. Like below:


Prove that if $A^2=0$, then $0$ is the only eigenvalue of $A$.

Does my proof hold up to prove that $0$ is the only eigenvalue of $A$ if $A^2 = 0$?     Let $A$ be an $n \times n$ matrix. $A^2 = A\times A$ because of matrix multiplication. If $A = k$, where $k \neq 0$, then $A^2 \neq 0$. Therefore if $A^2 = 0$, $A$ is the zero matrix.  If $A$ is the zero matrix, det($A^2) = 0$. $\lambda \neq 0$ if $A$ is non-singular. $A$ is a non-singular matrix IFF $\det(A)$ $\neq 0$. The charcteristic equation is false when $\lambda = 0$ for a non-singular matrix so it can only be true when the matrix is singular, making $\det(A) = 0$. $\lambda = 0$, $\rightarrow$ $\begin{vmatrix} 0I - 0 \end{vmatrix} = 0$


Are there alternative payment methods for donations?

PayPal won't accept the card I have, and I wanted to say "thank you" for all the work on Ubuntu with, well, some cash.  How else can I pay?


Manually aborted CHKDSK /r at this point, was data changed?

I ran chkdsk /r on drive with some bad sectors, and I manually aborted chkdsk at stage 4. I took this screenshot just before exiting chkdsk.    1 ~ 3 stages are passed with no error messages and stage 4 only showed "looking for bad clusters in user file data..." nothing more, I aborted chkdsk at this point as shown in the screenshot.  So, at stage 4, since no messages were recorded on prompt yet, that means stage 4 didn't do anything to data (clusters) yet.  Am I correct?


It says The Java ArrayList clone() method makes the shallow copy of an array list. But when I delete the value from the original list it is not reflected in the cloned list. import java.util.*;    public class Test{        public static void main(String args[]){             ArrayList<String> list=new ArrayList<String>();           list.add("Mango");               list.add("Apple");               list.add("Banana");               list.add("Grapes");                    ArrayList<String> list2;               list2=(ArrayList)list.clone();           list.remove(0);           System.out.println(list); //[Apple, Banana, Grapes]           System.out.println(list2); //[Mango, Apple, Banana, Grapes]      }   }  When I compile this program it shows Note: Test.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details


How to find $$\lim_{n \rightarrow \infty}\; \frac{1}{n}\;\sum_{k=1}^{\Big\lfloor\frac{n}{2}\Big\rfloor} \cos\Big(\frac{k\pi}{n}\Big)$$?  I know the method when the upper limit is simply $n$, namely it converges to $\int_0^1 f(x)\;dx$ where $f$ is monotonically increasing on an interval ( in this case our term is of the form $\frac{1}{n} \sum f(k/n)$ ) But here the upper limit is $\Big\lfloor\frac{n}{2}\Big\rfloor$. How to approach this?


Can length contraction help the moving observer reach a star system 'faster'?

Would an observer moving with close to the speed of light ($\sim 99\%$) towards a star system that's $20$ light years away perceive the distance as being less than $20$ light-years? If yes, how much time would elapse in their frame of reference given the aforementioned speed of $.99c$ and $20$ light-years distance?


how come electric field is o but current is there?

If electric field inside a conductor is zero then why is there an electric current in a resistor when an emf is applied across it for a long time?


Can I add a transparent logo to this material?

This isn't my material, I downloaded it and I'd like to add a PNG logo over the top.   I'm hoping to be able to have the faces with the texture still be metallic looking, just with a logo over the top.   Can this be done? I have duplicated the material so I can make changes as needed. Thanks in advance for any help!   I'm using Cycles render engine   Material:    Where I want my logo:


I need to evaluate, for a certain worded question:   If n is even $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n}$$  If n is odd $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots\binom{n}{n-1}$$   I havent been able to reduce this using the binomial expansion.


Running Ubuntu 14.04 LTS, I tryed to install skype. In terminal:  sudo sh -c ‘echo “deb http://archive.canonical.com/ubuntu trusty partner” >>  /etc/apt/sources.list.d/canonical_partner.list’   sudo apt-get update   sudo apt-get install skype  E: Unable to locate package skype  sudo apt-get -f install   sudo apt-get install skype  E: Unable to locate package skype So, no skype... How do I get skype?


Problems With Sorting A 2D String Array Using Columns In Java

I am creating a leaderboard that is part of a game that I am working on. Basically, the code I have stores the user's name in the first column and the score associated with that user's name in the second column in a 2D array. It sorts the 2D array in descending order according to the score numbers in the second column. This is the code I have:  String line = null; String lineCounter = null;  try {     BufferedReader br = new BufferedReader(new FileReader("scores.txt"));     while ((lineCounter = br.readLine()) != null) {         lineCount++;     }      String[][] scores = new String[lineCount][2];     int x = 0;      BufferedReader BR = new BufferedReader(new FileReader("scores.txt"));     while ((line = BR.readLine()) != null) {         String[] nums = line.split(": ");         scores[x][0] = nums[0];         scores[x][1] = nums[1];         x++;     }      Arrays.sort(scores, new Comparator<String[]>() {         @Override         public int compare(final String[] first, final String[] second) {             // TODO Auto-generated method stub             return Double.valueOf(second[1]).compareTo(                 Double.valueOf(first[1])             );         }     });     String[][] theCopy = Arrays.copyOf(scores, scores.length);      for (int i = 0; i < theCopy.length; i++) {         System.out.print((i + 1) + ". ");         for (int j = 0; j < 2; j++) {             if(j == 0) System.out.print(theCopy[i][j] + ": ");             if(j == 1) System.out.print(theCopy[i][j]);         }         System.out.println();     } } catch (FileNotFoundException e) {     // TODO Auto-generated catch block     e.printStackTrace(); } catch (IOException e) {     // TODO Auto-generated catch block     e.printStackTrace(); }   This code is inside a while loop. The user has the option to see the leaderboard as many times as they want until the press the correct number to terminate the program. So the problem I have is when the user decides to view the leaderboard, it works the first time, but when the user wants to view the leaderboard a second time, the program crashes.  This is the error message I'm getting:  Exception in thread "main" java.lang.NullPointerException     at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)     at sun.misc.FloatingDecimal.parseDouble(Unknown Source)     at java.lang.Double.parseDouble(Unknown Source)     at java.lang.Double.valueOf(Unknown Source)     at prjTicTacToe.TicTacToe$1.compare(TicTacToe.java:200)     at prjTicTacToe.TicTacToe$1.compare(TicTacToe.java:1)     at java.util.TimSort.binarySort(Unknown Source)     at java.util.TimSort.sort(Unknown Source)     at java.util.Arrays.sort(Unknown Source)     at prjTicTacToe.TicTacToe.main(TicTacToe.java:195)   How do I fix this so the user can view the leaderboard as many times as they want before they want to terminate the program?


Regex working in text editor(sublime) but not in python

I want to extract the line using regex. The line that I want to extract from document is:  ":method":"POST",":path":"/api/browser/projects/8bd4d1d3-0b69-515e-8e15-e9c49992f7d5/buckets/b-ao-mock-testing/copy   The regex I am using is:  ":method"[:"a-z,/\d-]{20,1000}/copy   The code for the same in python is:  re.findall('":method"[:"a-z,/\d-]{20,1000}/copy', str(s), re.MULTILINE)   It is working perfectly fine in sublime text but not in python. It is returning an empty list in python. How to resolve this?


This semester I take Introduction to logic and sets theory and for logic our reference is A Mathematical Introduction to Logic by H.B.Enderton.  I have some problems with this course I mean it is somehow unfamiliar ! our professor teach well and I learn at class but when I want to solve my homework ,I have no idea ,how to solve problems !  I don't have any idea how to prove this :  suppose a and b are tautologically equivalent, where A is wff and a is used in A and B is  another wff that b is used in; prove that A and B are tautologically equivalent.  Any one can help me ?


I'm trying to understand the proof of the following limit using epsilon-delta definition.  $$\lim _{x\to3} x^2 = 9$$  In Stewart Calculus, the proof goes like this:    I'm confused at the following points:  1) How the author arrives at this result: $|x-3| < \varepsilon/C = \delta$?   Specifically, how,  $$|(x+3)(x-3)| < \varepsilon$$ and $$|(x+3)(x-3)| < C|(x-3)|$$ leads to $$|x-3| < \varepsilon/C = \delta.$$ This is the part I've trouble understanding.  2) What's the role played by $\delta=\min(1, \varepsilon/7)$ ?  I am trying to understand this epsilon-delta proofs for a week but to no avail.


Can I delete cnijpwgtmp files in /var/tmp?

My /var/tmp folder is 27 GiB. Upon inspection, I've found hundreds of files starting with cnijpwgtmp (fi: cnijpwgtmpk6YaSu).  What are these files and can I delete them safely to restore space?


Is there any well-ordered uncountable set of real numbers under the original ordering?

I know that the usual ordering of $\mathbb R$ is not a well-ordering but is there an uncountable $S\subset \mathbb R$ such that S is well-ordered by $<_\mathbb R$?   Intuitively I'd say there is no such set but intuitively I'd also say there is no well-ordered uncountable set at all, which is obviously wrong. I still struggle to grasp the idea of an uncountable, well-ordered set.


What's wrong with this argument that kinetic energy goes as $v$ rather than $v^2$?

Trying to non-technically explain why (kinetic) energy goes as $v^2$ rather then the perhaps-more-intuitive "double the speed, double the energy" $v$, I ended up putting my foot in my mouth (itself a difficult physical manipulation:) by "proving" precisely what I didn't want to prove, as follows.  Suppose you get an object moving to speed $v$. That'll require some amount of energy, which we'll just call $E_v$ (we won't need to bother calculating it). Now, to somebody else, moving alongside that object, it seems to be stationary. So he can get it moving at $v$ relative to himself with the same energy $E_v$ that you used to get it moving at $v$ relative to yourself.  So the total energy used is $2E_v$, first to get it moving from $0$ to $v$ relative to you, and then to get it moving from $0$ to $v$ relative to that other guy. But now it's moving at $2v$ relative to you, and the total energy used is $2E_v$ rather than the known-right answer $4E_v$.  So what's wrong? I'm guessing it's somehow got to involve those two different lab frames. For example, maybe whatever apparatus the second guy used in his frame first had to acquire it's $v$ relative to your original frame, and that required some energy. But even so, why exactly an extra $2E_v$ (to make up the "missing" difference)? So that can't be precisely the argument's error. But it's the two frames, somehow. Right? Or what?  >>Edit<< This is an extended reply to @StephenG's comment under @PhilipWood's answer below. Stephen: sure energy's a common-sense concept -- everything in physics is (must be) common sense if you can get to the underlying intuition. And after failing miserably with my above-described argument, I came up with a more successful attempt, described below just to prove my point that it ultimately must be common sense. This argument's a bit more elaborate, and I'd like to come up with a correct simpler one. But at least this argument gets the correct result...  Suppose you're hit with a ball going at speed $v$, and then with an identical ball going at speed $2v$. So how much "harder" does the $2v$ ball hit you?  To answer that, suppose the balls are made up of lots and lots of closely-packed identical little particles, all moving side-by-side together. Then each little $2v$-particle carries twice the "punch" of a $v$-particle ("punch" here is, of course, momentum, not energy, but I just said "punch" to avoid introducing big words and unnecessary technicalities).  However, since the $2v$-particles are travelling twice as fast, then in, say, one second, twice as many of them will hit you. Therefore, you'll be hit with twice as many particles, each carrying twice the "punch". So your "total punch" will be four times as great, not two times.  Okay, so this argument involves time, and therefore power rather than energy. So it's not entirely 100% achieving its purpose. But since this was a non-technical discussion, I simply didn't bother mentioning my misgivings about it. Good enough for the time being, I figured.  But, to elaborate my original question, can you make air-tight the above argument, and maybe explain what's wrong with the original one (hopefully so that it's correct and even simpler than this one)?


How do you switch between built-in audio and headphone audio without unplugging?

Once I plug headphones into my iMac I no longer have the option in the sound preferences panel to output audio to the built-in speakers. I have to unplug the headphones to get audio output through the built-in speakers. Since the plug is on the back of the display this is inconvenient. Does anyone know of an audio app that allows me to easily switch between built-in speakers and headphones for audio output?


Determining members of local groups via C#

I wondered whether anybody knows how to obtain membership of local groups on a remote server programmatically via C#. Would this require administrator permissions? And if so is there any way to confirm the currently logged in user's membership (or not) of these groups?


Has the EU sued any site(s) yet for not complying with their cookie "law"?

EUROPA websites must follow the Commission's guidelines on privacy and data protection and inform users that cookies are not being used to gather information unnecessarily.    Many people find this EU cookie directive, when implemented, a broken toy law and a waste of time for all parties involved and because of that don't implement it.  4+ years further, have any of the bodies in the EU sued or attempted to sue any site(s) for not displaying a notice that cookies were in use?  It seems the EU got really quiet about it after the firestorm meteor shower of OP resentment hailed down uponith them and I would love to know how far they actually took it.


Uncaught TypeError: Cannot read property 'replace' of undefined

I have used this jquery script on many of my sites with the same theme, settings, etc.  It's in a wordpress Genesis Child theme.  On my current local build, however, when I click on an a href that has the class "scroll", I am getting a console error that reads:    Line 19 of my app.js is this code that I have never had an issue with before:  $(".scroll").click(function () {         if (location.pathname.replace(/^\//, "") === this.pathname             .replace(/^\//, '') && location.hostname === this.hostname         ) {             var target = $(this.hash);             target = target.length ? target : $("[name=" + this                 .hash.slice(1) + "]");             if (target.length) {                 $("html, body").animate({                     scrollTop: target.offset().top                 }, 1000);                 return false;             }         }     });   I am running jQuery 3.3.1. I have commented out all code in the app.js to identify where the issue may be coming from. This code is right at the top and I have added console.logs all over the document, which show in Console.  What am I doing wrong here?  Thank you!


Why can't I sign in to Area51 automatically?

If I sign in to just one SE community, I'm automatically signed in to all other SE communities that I'm a member of. But this doesn't happen when I visit Area51.   There, I have to sign in separately, although I'm already online on other communities. Why is that?


Polynomial passing through two points with specific tangents

How can I calculate a Polynomial that passes through the origin and a given point (P) having given tangents at the origin (Ot) and the given point (Op)?  The given point will always be to the right of the origin (Px > 0). The polynomial should be a function of x (i.e. it moves from left to right).  I believe a 3rd degree polynomial will always fit these constraints, but I'm not certain.  I am looking for a function f( x, Px, Py, Ot, Pt ) = ? which plots a polynomial for x, satisfying the four given values.  When x = 0,   f()   = 0 When x = Px,  f()   = Py When x = 0,   f'()  = Ot When x = Px,  f'()  = Pt


Why the rationals do not form a countable intersection of open sets?

Why is $\mathbb{Q}$ not a countable intersection of open sets in $\mathbb{R}$?  The hint shown in the book is to recall the Baire Category Theorem: A countable intersection of open dense sets in $\mathbb{R}$ is again dense.


The cheapest way from Krabi town to Krabi airport

I am in krabi Thailand now and tomorrow is my flight  at 2100 to Jakarta.  I am only 1 person and always travel like a backpacker. I would like to ask 1 question here:  What is the most cheapest way to reach krabi airport from krabi town in Thailand ?  I am not interested in taxi and shuttle buses.


Why there is public in variables declartions?

It isn't by default like that? For example:   **public** int [name]; **public** String [name];


Freestyle is not exporting with the object

Here is what it looks like in Blender Render (Not Cycles).   This is how I set it up.   Basically, I'm trying to export it, but it's not including the "Freestyle" lines. When I open up the .dae file in Finder, it looks like this:   What is wrong here? I want it to be exported (COLLIDA .dae) with the black outline. I'm seeming to think that maybe the "Freestyle" is only for the Blender Render. Am I right? How would I go about getting the black outline included in my exported model? Is it an export setting I have to tick? Thanks for any helpful answers.


Is there any way to view rejected edit source?  I have recently suggested an edit which was rejected. All three reviewers decided it better be a comment or an answer. So, how does one find rejected edit source in order to not type everything from scratch especially formatting, citations and links?  Fortunately after seeing first reject I navigated to mine-edited answer, which still displayed my edits, allowing me via edit link obtain source code of my edit.  Now that my edit was rejected it is impossible to obtain its source from any UI. "Suggested Edits" view has only "rendered output" and "markdown" selectors. Although I must admit, markdown diff is good as last resort, it is not good enough. To be more specific, it does not allow easy copying as selection originally started at suggested edit tends to eventually grab original paragraphs if diff is complex.    Searching the Meta similar question was found:  Alas the answer there does not provide any hint on obtaining the source of suggested edit. Thus the answer there could be satisfactory for the problem raised there, but cannot address the issue in this question, so it is not a duplicate.  In the end, if this is not implemented yet, I'm asking to implement a view to see the raw source of suggested edits.


how to avoid the transfer of the outside of a node inside

How to avoid that the styles of a node style pass in a schema included in the node  thus on the ECM below, the node of right becomes green and is cut in 2 and that of left does not change of color but is cut off    \documentclass{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}  \usepackage{tikz} \usetikzlibrary{fit, positioning} \usetikzlibrary{shapes.multipart}  \begin{document} \tikzset{rougelarge/.style={fill=red!20,minimum width=15em,minimum height=4em,text width=15em,draw}}  \newcommand{\nodeUn}{ \begin{tikzpicture} \node[rougelarge](aa){texte sur plusieurs lignes\\texte sur plusieurs lignes}; \node[right=5em of aa,draw](bb){texte}; \end{tikzpicture} } \begin{tikzpicture} \node[rectangle split, rectangle split parts=2,fill=green]{texte sur plusieurs lignes \nodepart{two} \nodeUn }; \end{tikzpicture} \end{document}


Limit of a sequence $a_1=1;a_{n+1}=(n+1)(1+a_n)$


I have a raster of 500m resolution based on MODIS sinusoidal projection, so I first converted it to WGS84. In order to create a 500m fishnet of the WGS84 raster in ArcGIS, I first converted the raster to points. Then, in the Fishnet tool, I entered 0.005 as cell height and width value to approximate a 500m grid polygon based on the approximation that 0.01° = 1.11 km. My area is in the Pacific North West in the US. Did I enter the correct(approximate) cell size value or is there a more accurate way to this?


How to find distance travelled when the change in the force of gravity is not negligible?

Usually when on Earth we can use as an approximation:  g = a = 9.18 $\frac{m}{s^2}$ s = vi + 1/2 a$t^{2}$  However, how would I determine the distance traveled in situations where the the acceleration due to gravity is changing non-negligibly because the distances are so large? I know that the following equation has to be used somehow:  a = $Gmr^{-2}$  I am not sure exactly how though. For example, if given the information that an object is at a certain distance and is being attracted by a larger object of a given mass, the method should calculate where the object will be at a given time.


Prove the edges of a multigraph may be oriented such that the net-degree of any vertex is $\leq 1$.

The net-degree of a vertex $v$, denoted $\text{netdeg}(v)$, in a digraph $G$ is defined by  $$ \text{netdeg}(v)=| ~ \text{outdeg}(v) - \text{indeg}(v) ~| $$  where $\text{outdeg}(v)$ and $\text{indeg}(v)$ are the out-degree and in-degree of $v$.  Show that the edges of any multigraph may be oriented so that $\text{netdeg}(v) \leq 1$ for all its vertices $v$.  My first thought was to order the vertices and alternate edges in and out beginning at the first vertex then move on to the next vertex and orient the remaining edges depending on the net-degree of the remaining vertices, but this approach does not seem to work.


I have a dual-boot laptop with both Windows 10 and Ubuntu 16.04.  Currently, the Windows side has too much disk space, and I want to resize things so that the Ubuntu side has more.  Firstly, I went into the Windows disk management and shrunk the Windows partition by 20GB. I then wanted to expand the Ubuntu partition, but it seemed like this option was greyed out.  Can I expand the Linux partition from Windows or do I need to be in Ubuntu or do I need to create a boot disk and do it that way?  Or do I need third party software?  Any help gratefully received.


How do I display images in the terminal? I am on Mac OSX mountain lion (10.8.5), and the answers in  don't work on OSX. Is it possible at all?


Delete the default folder in SharePoint 2013

i have used the below scripts to delete the folder in SharePoint 2013   This folder is generated by while creating my site  which always creates the same folder name in the "Documents" Document Library of any site or sub-site. I’d like to simply delete it.  But i have another one requirement once site created default folder is available in the site,after running the script folder deleted. one new user joined later again he created new my site so folder available for him,so i want to delete the folder permanently at one time script running.


How can i get all clean links via Regex without pattern string

when i trying this match im getting links like this;  Result:  "video","src":"https:\/\/video-mxp1-1.xx.fbcdn.net\/v\/t42.9040-2\/34384597_178997956146914_227512178675023872_n.mp4"  I want get just cleaned link like this:https:\/\/video-mxp1-1.xx.fbcdn.net\/v\/t42.9040-2\/34384597_178997956146914_227512178675023872_n.mp4  Thanks for your helps; My codes are below:  var VideoLinks='"type":"video","src":"https:\\\/\\\/video-mxp1-1.xx.fbcdn.net\\\/v\\\/t42.9040-2\\\/34333324_n.mp4?_nc_cat=0&efg=ey1&oe=5B211DB0","width":null"type":"video","src":"https:\\\/\\\/video-mxp1-1.xx.fbcdn.net\\\/v\\\/t42.9040-2\\\/34333324_n.mp4?_nc_cat=0&efg=ey1&oe=5B211DB0","width":null';  My Pattern pattern =/"video","src":"(.*?)"/g; var videos=Sitestring.match(pattern); console.log(videos);


I'm originally from stack overflow, so this is my first foray into this particular community.  I've read in numerous places that the Large Hadron Collider is capable of accelerating protons at 0.999999991 c, which mathematically works out to being 3 metres per second slower than the speed of light. That seems so incredibly close to the speed of light, that it's hard for me to understand why we can't quite get all the way there.  My Main Question :   What is preventing the LHC from achieving 1 c, in terms of how fast it can propel these protons?   Side Question :  If we were able to accelerate the protons to the speed of light, what would the results of their collisions be?


Unable to @mention Partner user on chatter feed by Salesforce Internal User

I have a usecase wherein a Partner user creates a Case which gets assigned to internal Salesforce user. The agent resolves the case and wanted to collaborate with the partner user with @mention tags but unfortunately, its not coming up. Is this a bug or work as designed . However, the inverse works, from a partner community chatter feed I am able to @mention salesforce internal user.  Any inputs are welcome  Thanks JJ


Here is my code to combine the three lists. one=['nlo_90', 'nhi_76', 'nhi_88'] two=['12', '44', '84'] three=[['a','a','b','c'], ['g','a','g','g'], ['b','g','g','b']] new_three=[list(dict.fromkeys(q)) for q in three]  z=zip(one,two,new_three) for a,b,c in z:     print(f'a:{a},\tb:{b},\tc:{c}')   Below is the output: a:nlo_90,   b:12,   c:['a', 'b', 'c'] a:nhi_76,   b:44,   c:['g', 'a'] a:nhi_88,   b:84,   c:['b', 'g']  My desired output is: a:nlo_90,   b:12,   c:a, b, c a:nhi_76,   b:44,   c:g, a a:nhi_88,   b:84,   c:b, g


Classifying $\mathbb{Z} \times \mathbb{Z} \times \mathbb{Z} / \langle(3,3,3)\rangle$

Again, my instructor's explanation in class is so confusing to me.  Here we cannot take the original approach of finding the order and limiting our choices.  So instead my instructor says that this is isomorphic to $\mathbb{Z} \times \mathbb{Z} \times \mathbb{Z}_3$.  To justify it he said that $\mathbb{Z} \times \mathbb{Z} \times \mathbb{Z}$ is 3 dimensional and the denominator is one dimensional but this doesn't quite explain where the $\mathbb{Z}_3$ comes from?  Can anyone provide a better way to think about this?  It is making no sense to me at all.


The new hot questions algorithm sometimes recurses

The hot questions algorithm . I like the effects, since I see lots of new interesting stuff every day rather than waiting 6-8 weeks varying amounts of time for the list to update.  However, the new algorithm also has the interesting side effect of recursing the same question:    Of course, this is a world-shattering workflow-breaking unicorn-hating waffle-despising ERROR tremendously minor matter. But, if the SE devs have opportunity during their amazingly large amounts of free time, it might be nice to add a check for the current page before populating the hot questions list.


How do you declare an interest free loan?

In the discussion around  it was said that a loan must be at market rate, or it is not considered a loan.  Respecting the wisdom of the people who said that, I'm unclear about how this would work in the general case, since plenty of people do make interest free loans to family and friends, and the IRS would seem to be unlikely to be in the business of policing loan rates.   Ignoring the issue in the original question about later paying off the loan through a gift,  let's say I make an interest free loan to someone, with the genuine intention that they pay it back in full at some later date, and with no intention of cheating the tax system. It would seem to me that he has no income to declare (because only the loan has occurred) and I have no income from the transaction. What exactly do he and I have to declare on our tax forms? Some links to tax office docs would be nice.  EDIT: Since it's been pointed out that it's hard to distinguish between loans and gifts, let's imagine that both parties have made a written loan agreement.


Separate different applications running in different workspaces

How can I set the taskbar (Ubuntu dock) to show applications running in the current workspace only? Currently clicking on it shows all the different locations where the application is running.    Here, 2 Firefox windows are running in different workspaces, so I do not want all of them being displayed in all workspaces.


How to append to a list in a list of lists?

I was using lists in python and I noticed something I cannot explain.  my_list1 = [[],[],[]] my_list2 = [[]]*3  my_list1[0].append(5) my_list2[0].append(5)   my_list1[0].append(5) behaves as expected. [[5],[],[]]  But for my_list2[0].append[5] gives the result. [[5],[5],[5]]  Essentially both the lists are same but why does the append() behave differently on both?


How is the illusion of light streaks achieved in this photo?

I've seen  with a nice light streaks illusion, that I believe was captured in the camera itself rather than added in post-processing. Can anyone explain how one can replicate it?


So, when a command is not found, by what means is the "did you mean:" list populated? What program finds these alternate commands?  What is the meaning of: "(main), (universe)..."? Can I change which program finds these?


Size of object containing reference variable

This is printing 16 and 4 as the answer but it should be printing as 8 and 4 because both a and b are integer type variables. So can we think this as the compiler stores the address of the variable a in a separate variable while copying to b that is why it is resulting in 4 + 4 + 8 = 16? If not then what is it? #include <iostream> using namespace std;  class C { public:   int a = 45;   int &b = a; };  int main() {   C ob1;   cout << sizeof(ob1) << endl;   cout << sizeof(ob1.b);    return 0; }


Evaluate $$\sqrt{e\sqrt{e\sqrt{e\sqrt{e\cdots}}}}$$   My attempt:  Let $$x=\sqrt{e\sqrt{e\sqrt{e\sqrt{e\cdots}}}}$$  $$x^2=e\sqrt{e\sqrt{e\sqrt{e\cdots}}}$$  But I've no idea, how to proceed. Hope someone can point it out. Thanks.


How to uninstall Intel Linux Graphics Installer and revert to default drivers

Recently Intel released their opensource driver tool () which auto-selects the right drivers for your intel chipset (in my case, I was using the i915 driver).  Because I started using Steam on Linux to play some older games I thought I would use the Intel 'official' drivers to ensure I get the best performance. Unfortunately, since installing the drivers, the computer fan is very loud and the battery doesn't last that long (it's cut battery life in half). On top of that, there's no noticeable difference when playing games on Steam.   My question is, how do I revert back to the original drivers?   If I run the Intel graphic driver installer I get the following output in the terminal (not in the GUI) so I assume I will somehow need to run apt-get with some type of downgrade flag (I'm not sure how to do that) against these packages.  install: [i915-3.4-3.2-dkms libdrm-nouveau2] upgrade: [libcairo2 libcairo-gobject2 libcairo-script-interpreter2 libdrm2 libdrm-intel1 libkms1 libva1 libva-x11-1 libva-glx1 libva-tpi1 libva-egl1 vainfo libxatracker1 libgbm1 libegl1-mesa libegl1-mesa-drivers libopenvg1-mesa libgles1-mesa libgles2-mesa libglapi-mesa libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dri-experimental libosmesa6 libglu1-mesa i965-va-driver libva-intel-vaapi-driver xserver-xorg-video-intel libwayland0]   When I look at the install logs though, it seems there's much more than that.   Any assistance on this would be most appreciated.


How to prove $\lim\limits_{n\to\infty}(1+\frac{1}{n})^n=\sum\limits_{n=0}\frac{1}{n!}$?

How to prove the equality of the two defintions of $e$? $$\lim_{n\to\infty}\left(1+\frac{1}{n}\right)^n=\sum_{n=0}\frac{1}{n!}$$  There are answers in other questions like this: $$\begin{aligned} \lim_{n\to \infty}\left(1+\frac{1}{n}\right)^n &= \lim_{n\to\infty}\sum_{k=0}^n \frac{1}{k!} \prod_{m=0}^{k-1}\left(1-\frac{m}{n}\right)\\ &=^?\sum_{k=0}^\infty\left[\frac{1}{k!}\lim_{n\to\infty}\prod_{m=0}^{k-1}\left(1-\frac{m}{n}\right)\right]\\ &=\sum_{k=0}^\infty\frac{1}{k!} \end{aligned}$$ However, I think this operation of limits is wrong. For example, $\lim\limits_{n\to\infty}\sum\limits_{k=1}^n\frac{1}{n}=1$ and $\sum\limits_{k=1}^\infty\lim\limits_{n\to\infty}\frac{1}{n}=0$.


How to go straight to Windows 10 without GRUB

This is the thing: I have a secondary laptop with both Windows 10 and Ubuntu 19.04 and I use GRUB to select every time which OS to load. This is great for me...BUT my little brother plays a lot of games on this laptop frequently. So now, I just want Windows 10 to load directly without losing Ubuntu because sometimes I need it. How can I do this?


How does the US know if someone has overstayed?

How does the US know whether you have overstayed your tourist visa without having an exit stamp on your passport? How is it really calculated?


What must a Klingon master do in order to be considered a Dahar Master?

Memory Alpha describes a Dahar Master as:     a Klingon warrior who had reached a legendary status among his peers and subordinates.   And Memory Beta:     Dahar Master is the title given to Klingons, who are the best of warriors and have reached legendary status. These warriors are respected by all and the tales of their exploits are often repeated in stories, songs and operas   To me "master" implies that the warrior has mastered some skill, at the very least "Dahar", whatever that is✝   Does any series or novel cover what Kor, Koloth, and Kang did to achieve this "legendary" status?  --  ✝ Bing Klingon seems to have no translation for the word


Physicists say that there are four fundamental forces in the universe: gravity, electromagnetic, and the other two. But when the gravitational phenomena were explained by the General theory of relativity, the belief that gravity is a force becomes weak. So the fundamental question is that if one day someone explained the phenomena associated with the other forces in a similar way as gravity, would they then still be called forces or would they be instead called, for example, curvature in some "other thing"?


Chapter spacing differs on odd and even pages (twoside report)

My horizontal chapter spacings are different on odd and even pages and I don't want this, the titles should be in the same place on all the pages. I believe this is because I use a twosided report as document class, but I want to keep it twosided. How can I fix the chapter spacing? I also use a different titleformat, but even without this the problem occurs. \documentclass[twoside]{report}  %optional changing the titleformat \usepackage{titlesec} \newcommand{\hsp}{\hspace{20pt}} \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp{$|$}\hsp}{0pt}{\Huge\bfseries}  \begin{document} \chapter{chapter 1} \chapter{chapter 2} \end{document}


Filter Object 's Listviews by Users in Apex

We have a requirement to get all Object 's ListView of the organization in apex code and display it on the page. This is easily possible with the query on the ListView.  Select Id,Name,SobjectType From ListView      But ListViews that are private to specific users are also coming in the query. We don't want to show the ListView which is private to user.   So basically we need some kind of filter on ListView to differentiate it by User. Can someone please suggest, if it is possible in Salesforce Apex or not? Or if there is any workaround for the same?


Install linux to hard drive from live partition

I was thinking that I could make a small 4GB partition on my 320GB hard drive. This small partition could be used as a live install partition. What i would do is I would make the partition, boot from it, then use the boted live isntall to install ubuntu to a different partition. then I would boot from the newly created partition and change the live install to a different live install. then i would boot from the new install and install to another partition. then i would do the same 1 or 2 more times. Dont ask me why I want to install the 3 or 4 different derivatives instead of just installing multiple desktop environments on one install. I just do.  Thanks, Ashton.


Why does Scabbers protect Ron and Harry by biting Goyle?

In Harry Potter and the Philosopher's Stone, when Malfoy, Crabe and Goyle are going to fight Harry and Ron, why does Scabbers protect them? After it is later shown in Harry Potter and the Prisoner of Azkaban that Scabbers is in fact Peter Pettigrew who betrayed Potter's parents, why did he protect Ron and Harry?


When I apply a texture to my surface this is what happens.  Can someone help?


Should physical solution to Schrödinger eq. always be real in one dimencional space?

one dimensional Schrödinger equation: $$ \left[-\frac{\hbar^{2}}{2 m}\frac{\partial^2\psi(x)}{\partial{x}^2} +V(x)\right] \psi(x)=E \psi(x)$$  I know that to calculate the eigenfunctions $ \psi(x) $ depends on the potential $V(x)$, but in general, which are the characteristic of $\psi(x)$? it can be a complex function or a real function and how proof that?   What means that $\phi(x)$ is a physical solution if we also care about the probability?   Can unphysical wavefunctions give a right probability?


Question regarding two independent Poisson processess

Given two independent Poisson processes X and Y I am trying to calculate what the probability is of X ever, at any given point, has been above Y as time approaches infinity. ¨  As an example lets assume lambda 2 for X and 3 for Y, process Y starts at 4 and process X starts at 0. A real world illustration, we have two bridges X and Y, average frequency of cars passing per hour is 2 for bridge X and 3 for bridge Y. There have already passed 4 cars on bridge Y, what is the probability that given infinite time more cars at any given point drove over bridge X than bridge Y.  I, with the help of some others, came up with a function that describes this for any given time, however not for all time.  $P(X(t)>Y(t)+n)=1-\sum_{k=0}^{\infty} \bigg [P(X(t)+n\cap Y(t)=k) \bigg] \\ \\ \\ P(X(t)>Y(t)+n)=1-\sum_{k=0}^{\infty} \bigg [\underbrace{P(X(t)\leq k+n)}_{Poisson\: CDF}*\underbrace{P(Y(t)=k)}_{Poisson \: pmf} \bigg] \\$  Any help would be much appreciated as I have been stuck on this for quite some time.


C++ set container can't erase odd numbers

This program asks the user for a number, then stores all numbers up to and including it into a set container. The problem is that I to erase specific numbers, but I can't because the program freezes whenever I try to erase an odd number (signified by NUMBER below). It works fine when I erase even numbers though. However, I noticed that if I change the initial value of y to an even number, I become unable to erase even numbers. Here I have it set to an odd number. What did I do wrong?  #include <iostream> #include <set> using namespace std;  int main() { set<int>s; set<int>::iterator cnt; int n,x,y=1; cout<<"Number: "; cin>>n; for(x=0;x<n-1;x++) {     s.insert(y);     y++; } for(cnt=s.begin();cnt!=s.end();cnt++) {     if(*cnt==NUMBER)     s.erase(cnt); } for(cnt=s.begin();cnt!=s.end();cnt++) cout<<*cnt<<"\n"; return 0; }


I recently installed Ubuntu 20.04. Everything works fine.  I wanted to customize gedit, but I was surprised that the minimap option is not available anymore.  How to get it back? OS: Ubuntu 20.04   Gnome Version: 3.36.2   Windowing System: X11 gedit version: 3.36.2


How to download multiple Google Drive photos from URLs?

I was sent about 500 Google Drive picture files and need a way to download them. The URLs send me to the Google Drive for each individual picture. Is there a way to download them without having to go to each page and hitting download manually?  I have tried to convert the links to the following: http://drive.google.com/uc?export=view&id=, but can't seem to get a Download manager to download it [GetRight].


If the characters avoid the encounter through diplomacy, are they awarded the XP for the monsters?

Let's say that a part of the dungeon with X monsters can be either passed through combat OR through careful diplomacy, can the players be awarded XP points the same way if they choose the latter? It seems like it's a cool way to reward role playing instead of just fighting - and the players can save spell slots/per-rest abilities at the cost of the loot. Is that something that D&D supports?


Laptop power saving or management in Ubuntu 14.04

Is there any sort of installation that can be added to provide power options for when I am running on battery? I wouldn't want to always be on power savings, so I would hope I could switch between Eco and performance like I do with windows 7. Anything like this out there?


I am trying to change the checkboxes for the terms on the backend to radiobuttons. I found this topic:  however wich helped me doing this. However, this will turn ALL terms checkboxes to radio buttons.  Is it possible to apply this only for one taxonomy?  My code:  add_action('add_meta_boxes','mysite_add_meta_boxes',10,2); function mysite_add_meta_boxes($post_type, $post) {   ob_start(); } add_action('dbx_post_sidebar','mysite_dbx_post_sidebar'); function mysite_dbx_post_sidebar() {   $html = ob_get_clean();   $html = str_replace('"checkbox"','"radio"',$html);   echo $html; }   thanks


What's this equation called (one more each iteration, find total for given iteration)?

Say you have +1 on first iteration, +2 on second, and so on until N, and you want to know the total.  That's easily calculate using (N * (N + 1) ) / 2.  What's that equation or technique called?


Is it possible to export Chrome custom Search Engines

I know that it auto syncs between devices but I have 2 account and I'd like to export the custom search engines under chrome://settings/searchEngines and maybe import it in another account.  I know that this doesn't seem possible by default but maybe someone created a script or an extension to do it :)


Please rate limit the password reset functionality

Just received ~70 unsolicited password reset mails from Super User, so abusive...


Creating directories with correct permissions for Laravel

I’m a developer. A few days ago I started using Laravel on Ubuntu. When I use the terminal to create a new directory it appears with a padlock on it. Even logged in as root I have to give it permission with chmod.  How can I create directories with all permissions for all kind of users?


What is the best way to implement soft deletion in a large relational Database?

Using SQL Server 2012, with over 200 tables.  I need to implement soft-delete so that I can give my users the ability to "restore or undelete" deleted records. The tables from which the users delete records are user-defined with variable number of relationship (foreign keys) to other tables.  I have seen so far two methods:   IsDeleted column on all tables Having mirror archived tables   however both methods seems to work well on a standalone table, when it comes to tables with relationships, I think neither of the methods are practical.  Method 1: complicates queries, and causes in incorrect query results.  SELECT Id,Name FROM User Left Join Group ON Group.Id = User.GroupId AND Group.IsDeleted=0 WHERE User.IsDeleted=0 AND ISNULL(Group.IsActive,0) <> 0   This above query returns invalid results because of the joined table IsDeleted filter. In other posts, it is suggested that IsDeleted=0 is enough, however as I demonstrated above that is not the case.  SELECT Id,Name FROM User Left Join Group ON Group.Id = User.GroupId WHERE User.IsDeleted=0 AND Group.IsDeleted=0   This above query too, won't work correctly in some cases depend on how the user filters the records (the problem appears when there are more joins). In below example:   User has GroupId field (lookup to Group)   User has RoleId field (lookup to Role)   Role has GroupId field (lookup to Group)  SELECT Id,Name FROM User LEFT JOIN Group ON Group.Id = User.GroupId LEFT JOIN Role ON Role.Id = User.RoleId WHERE User.IsDeleted=0 AND Group.IsDeleted=0 AND Role.IsDeleted=0 AND /* ...user defined filters...*/ Role.Name is not null   The query above too won't return the correct results if the group is deleted, but not the role related to the group, the role record will also get filtered out.  (I know there are ways to fix the queries in case by case basis, but that would not work for my use case, I need a solid pre-defined pattern to apply to all generated queries - the database queries are not predefined and they are generated on the fly.)  Method 2: very hard to implement, at the time that a record is being deleted and archived, need to figure out what other records in other tables reference it and track them somehow to be able to update them back when the record is undeleted.  Anyone has a suggestion what is the best method to implement soft delete in a relational database effectively?


If I have a player character that can move 8-directionally, I can set the rotation of the player to face the direction of movement. But if I want to smoothly rotate to a direction, sometimes the player will take the "long way around" (i.e., player is at -90 degrees, facing right; I press S and it will rotate 270 degrees to be at 180 degrees, facing down). How can I fix this? I tried adding 360 to the desired angle until it was within 90 degrees, but that didn't work (probably just because I'm too tired, though). Any help is appreciated!


Suppose there is an isosceles triangle ABC with $\angle$B$=20$ degrees, $AB=BC$  M,N are points on AB,BC such that $\angle$MCA=60 degrees, $\angle$ NAC=50 degrees. Find $\angle$NMC  How do you even start? Many angles can be found by using angle sum property of the triangle but I can't get anywhere beyond that. I tried constructing a parallel through both M and N but it doesn't help.  Also, one could repeatedly use sin rule to find it out, but this is extremely inefficient.  Please give me a hint...


35 lines, 55 lines, 100 lines, 300 lines? When you should start to break it apart? I'm asking because I have a function with 60 lines (including comments) and was thinking about breaking it apart.  long_function(){ ... }   into:  small_function_1(){...} small_function_2(){...} small_function_3(){...}   The functions are not going to be used outside of the long_function, making smaller functions means more function calls, etc.  When would you break apart a function into smaller ones? Why?   Methods should do only one logical thing (think about functionality) You should be able to explain the method in a single sentence It should fit into the height of your display Avoid unnecessary overhead (comments that point out the obvious...) Unit testing is easier for small logical functions Check if part of the function can be reused by other classes or methods Avoid excessive inter-class coupling Avoid deeply nested control structures   Thanks everyone for the answers, edit the list and vote for the correct answer I'll choose that one ;)  I am refactoring now with those ideas in mind :)


Let $(X,d)$ be a compact metric space and $f : X \to X$ be isometric, i.e. for every $x,y \in X$ : $ d(f(x),f(y)) = d(x,y) $. How I can show the following? $f(X) = X$  My first thought was to show the surjection $ x \in X \setminus f(x) $. Is this the right approach?   Thanks in advance


Multiple boot options for Windows 8.1 along with Ubuntu

I was a Windows 8.1 user. Recently I installed Ubuntu 14.04 and now I have both windows and Ubuntu. Both are running well without any issues. The problem is, while booting I can see two options for booting to Windows 8.1  1. Boot to Windows 8.1 on sda1  2. Boot to windows 8.1 on sda2  And both options are working as well. I don't know why there should be two options. How can I remove one? I tried Boot Repair, but no change. Need you guys to help me solve this.


Ubuntu Server 16.04.3 boots, but no login prompt

I have freshly installed Ubuntu Server 16.04.3. I had previously been using some edition of version 14, and it always booted to a text login screen. I was expecting the same from 16.04.3, and in on-line demos that's exactly what I see happening.  It essentially gets to a black screen with no login prompt and only the following text at top:  /dev/md0: clean, 60884/117891072 files, 759991/471562752 blocks   I do have (software) RAID10 configured. This is my first time configuring anything other than RAID0.  I noticed that I am able to ssh into the machine remotely and use it that way. I also discovered that by typing Ctrl-Alt-1 I can get to a (colourful) terminal and login that way. I've seen some other people ask about boot/log-in issues, but most seem to involve boot loops or completely blank screens. This doesn't seem to be what I'm experiencing.  So my problem doesn't seem to indicate the server isn't booted correctly. It just doesn't present the login screen to the local terminal automatically after booting. Is this expected?  Additional information:  Relevant contents of /var/log/auth.log  systemd-logind[825]: New seat seat0. systemd-logind[825]: Watching system buttons on /dev/input/event1 (Power Button) systemd-logind[825]: Watching system buttons on /dev/input/event0 (Power Button) sshd[968]: Server listening on 0.0.0.0 port 22. sshd[968]: Server listening on :: port 22. CRON[1290]: pam_unix(cron:session): session opened for user root by (uid=0) CRON[1290]: pam_unix(cron:session): session closed for user root


Debian 9, APT, and "GPG error: ... InRelease: The following signatures were invalid:"

I publish .  It was signed with a 4096-bit GPG key, and has been merrily in use from Debian 7 and Debian 8 systems for some time.  Recently, one of my users reported that Debian 9 was having problems with it.  Specifically, apt-get update was yielding: Reading package lists... Done    W: GPG error: . stable InRelease: The following signatures were invalid: A71733F3CEBD655CB25A0DDCE1E3A497555CE68F    W: The repository '. stable InRelease' is not signed.  Note that unlike the people at "" and "" I am not using aptly.  So clearly I am not suffering from an aptly bug of any kind.  (-:  So what is the problem?


same switch case is used but the definition is different

I have to use the same switch case repeatedly in different functions. In different functions, the switch case definition will be different. For example:      int groupID = somenumber;     private void FunctionA()     {         switch (groupID)         {             case 0:                 // Do Action A                 break;             case 1:                 // Do Action B                 break;             case 2:                 // Do Action C                 break;         }     }      private void FunctionB()     {         switch (groupID)         {             case 0:                 // Do Action Z                 break;             case 1:                 // Do Action X                 break;             case 2:                 // Do Action Y                 break;         }     }   Is that any method to use the same switch case once time but the definition can be different?


Astronomical telescope has a small eye piece and a large objective lens. Whereas a compound microscope has a large eye piece and small objective lens. Therefore can we use astronomical telescope as compound microscope by viewing it from objective lens?


Netplan not connecting to hidden SSID Server 18.04.1 LTS

I've a problem with Netplan not connecting to WiFi network with hidden SSID. It works great if I'll make this network visible. But no chance with hidden one. Any options to configure that?


I am writing a chess engine in C++ and have just finished implementing an opening book that is read from a file called performance.bin at runtime.  Because it is loaded into the program at runtime, the file location needs to be known at compile time, which is kind of impractical. My question is, is there a way to embed a .bin file into the C++ executable when compiling? Either using g++ or Visual Studio 2019?   Thanks in advance ;))


Why Wine is not Launced in ubuntu 18.04?

When I search wine in applications it is not shown but when I search in ubuntu software it shows but when I click it to launch but it is not working. I also try to reinstall but it is not installed says broken packages and aborting. This wine was installed during playonlinux.  Image description: here I try to install winetricks and this is the error. when I try to install wine again it also shows error like in the image(Last 3 line). Please give me useful instrction so that i can overcome this problem


I am trying to understand a code written by my professor. There's a line in the code that says   a = (b > c) ? c : b;  where a, b, and c are just float variables. This is my first time seeing that expression. I tried to google it but nothing came up. Any explanation or link to some explanation for this is welcomed. Thank you.


Is the plural of 'a friend's book' 'a friend's books' or 'friend's books'?

this question concerns only the INDEFINITE article, I don't care for the definite article or 'of' forms here.  In the following construction  a friend's book a boy's toy a guy's car   Question: do you still write the indefinite article if the noun following the possessive noun is plural?  a friend's book >> a friend's books / ø friend's books? a boy's toy >> a boy's toys / ø boy's toys? a guy's car >> a guy's cars / ø guy's cars?   If the 'a/an' article is removed, why?   Thanks.   P.S if anyone could cite a link to this particular topic, that would be be great.


The comparative for fussy is fussier. But is it acceptable to say, for example, "Less affection will make the baby more fussy"? (Is it so awkward to use "less X, more Y" in this way?)


What is the explicit difference between the ground and neutral wire in 110V systems?

So, I've put in or replaced several outlets following wiring instructions online and in the box. Nothing big. I know that if I fail to turn off the breaker then I shouldn't directly touch the black wire, but touching the white wire or the bare copper wire is fine.   From this, I know that the black wire is the supply, power is flowing from it, and will happily flow into me. Since neither the white wire nor the bare copper wire shock me, I don't know the difference between the two, other than "Power flows into these once a circuit is completed" So what is the difference, in detail, between the neutral and the ground connectors in 110V applications?


The  to the question "" talks about private reputation events. If I correctly interpret that answer, then these are some examples related to such events:   deleted posts. downvotes.   My questions:   What's the real purpose of private reputation events? Does it matter if the deleted post is self deleted, or if it is deleted via delete-votes and/or deleted by a moderation? For downvotes of (non-meta) answers the downvoter lose one rep point, which I'm aware is not shown in the reputation tab of the downvoter, so that's probably a good example of such a private reputation event. But is there anything else that also leads to such private reputation events?


The choice between the gerund and the infinitive in a certain construction

I am pretty much sure that for native speakers the issue I am going to bring up might look as an uncalled question as they can easily figure out which form of a verbal part of speech should be used, be it a gerund, an infinitive, or a bare infinitive. However, it can be pretty much misleading for a foreigner because the same construction works differently with different words and I don’t see a logical explanation. For example:  The purpose of this article is to analyze the issue…  My hobby is reading. One may assume, and many foreigners really come to this conclusion, that it’s OK to switch the “gerund” and “infinitive” as the meaning will stay the same, that is:  The purpose of this article is analyzing the issue… (same as 1 above)  My hobby is to read. (same as 2 above)   However, as I was told, this assumption is erroneous. Another example: His task was watching after them. (not good) His task was to watch after them. Is there any principle which governs the choice of the right form in such cases?


Which fonts are used in various bill receipts ? For example what is the font of the attached text image cropped from a receipt?

Which fonts are used in various bill receipts ? For example what is the font of the attached text image cropped from a receipt ?


A function is analytic if and only if it is holomorphic

I am studying some complex analysis and I have found this result. In fact it isn't a single theorem (I am reading Cartan's "Elementary theory of analytic functions" and I haven't found such a theorem, but maybe I just didn't find it), but there are many results that should give us this equivalence. However, I was wondering about two things.   The first is: is this equivalence "perfect"? I mean, could I exchange the terms "holomorphic" and "analytic" in theorems and various results without changing anything, or are there some hypothesis I should satisfy first? I am asking this because even though they should be equivalent, I always find theorems about (for instance) analytic prolongation that always talk about analytic functions, and there is no "holomorphic prolongation", if you understand what I mean. So I was not sure if this was simply a matter of tradition or if analytic functions are more general/poweerful than holomorphic ones.  The second one is: if I have a function from $\mathbb{R}^2$ to $\mathbb{R}^2$ that is differentiable in an open connected set $U$ and in that open set it satisfies Cauchy-Riemann conditions, then it should be holomorphic and analytic, if viewed as a complex function. So, for the prolongation theorem, there should be only one function like that (that is, differentiable and that satisfes Cauchy-Riemann)on $U$. So, are you telling me that if I have a differentiable function satisfying Cauchy-Riemann in an open connected set, not only it is the only function (unless you add/subtract constants obviously) that does that, but (being analytic in $\mathbb{C}$) it is also $C^{\infty}$. It would be so incredible I can't believe it!


How to parse nagios status.dat file in .NET?

I'd like to parse status.dat file for nagios and output as xml or json in c#. Does any know any plugin/library or method to parse it to xml or json??  Any help and pointing in the right direction will be highly appreciated.  The file looks like this:  ######################################## #          NAGIOS STATUS FILE # # THIS FILE IS AUTOMATICALLY GENERATED # BY NAGIOS.  DO NOT MODIFY THIS FILE! ########################################  info {     created=1233491098     version=2.11     }  program {     modified_host_attributes=0     modified_service_attributes=0     nagios_pid=15015     daemon_mode=1     program_start=1233490393     last_command_check=0     last_log_rotation=0     enable_notifications=1     active_service_checks_enabled=1     passive_service_checks_enabled=1     active_host_checks_enabled=1     passive_host_checks_enabled=1     enable_event_handlers=1     obsess_over_services=0     obsess_over_hosts=0     check_service_freshness=1     check_host_freshness=0     enable_flap_detection=0     enable_failure_prediction=1     process_performance_data=0     global_host_event_handler=     global_service_event_handler=     total_external_command_buffer_slots=4096     used_external_command_buffer_slots=0     high_external_command_buffer_slots=0     total_check_result_buffer_slots=4096     used_check_result_buffer_slots=0     high_check_result_buffer_slots=2     }  host {     host_name=localhost     modified_attributes=0     check_command=check-host-alive     event_handler=     has_been_checked=1     should_be_scheduled=0     check_execution_time=0.019     check_latency=0.000     check_type=0     current_state=0     last_hard_state=0     plugin_output=PING OK - Packet loss = 0%, RTA = 3.57 ms     performance_data=     last_check=1233490883     next_check=0     current_attempt=1     max_attempts=10     state_type=1     last_state_change=1233489475     last_hard_state_change=1233489475     last_time_up=1233490883     last_time_down=0     last_time_unreachable=0     last_notification=0     next_notification=0     no_more_notifications=0     current_notification_number=0     notifications_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_host=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }  service {     host_name=gateway     service_description=PING     modified_attributes=0     check_command=check_ping!100.0,20%!500.0,60%     event_handler=     has_been_checked=1     should_be_scheduled=1     check_execution_time=4.017     check_latency=0.210     check_type=0     current_state=0     last_hard_state=0     current_attempt=1     max_attempts=4     state_type=1     last_state_change=1233489432     last_hard_state_change=1233489432     last_time_ok=1233491078     last_time_warning=0     last_time_unknown=0     last_time_critical=0     plugin_output=PING OK - Packet loss = 0%, RTA = 2.98 ms     performance_data=     last_check=1233491078     next_check=1233491378     current_notification_number=0     last_notification=0     next_notification=0     no_more_notifications=0     notifications_enabled=1     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_service=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }


Existence of non-trivial linear functional on any vector space

For every vector space $V$ does there exist a linear functional $f$ ( a linear map from $V$ to $F$ the underlying field ) such that for some $ \vec v \in V$ , $f(\vec v) \ne 0$ ? If it does exist , can we prove the existence without the "axiom of choice " ? Is the existence equivalent to axiom of choice ?


Let $L$ be a Lie algebra and $A$ be its subalgebra. Let consider $h : A \to Der(L)$ defined by $h(a)(l)=[l,a]$ then how to show that $h$ is Lie algebra homomorphism?  According to the definition of Lie algebras homomorphisms $h$ must satisfies  $ h([a_1,a_2])=[h(a_1),h(a_2)]$. Using Jacobi identity, we need to prove that $[[l_1,l_2]a]$  equals to $[[l_1,a],[l_2,a]]$ ? I have problem with calculation of Jacobi identity!  Edit: There are useful answers to this question: Checking a Lie homomorphism has been described carefully in  and .


How to give permissions to specific command?

I would like to run fastboot command without sudo. it's working if I put sudo in front of it, otherwise it wont.  like this:  $ sudo fastboot devices 2738006a    fastboot  $ fastboot devices no permissions  fastboot   How do I solve this?


How to read shapefile of road segments into Python data structure to get begin and end point coordinates?

How can I take a shapefile that has road segments and read it into a data structure in Python that I can use to get begin and end points with?   For example x, y to x2, y2.  It's not a large shapefile, just a one with roads for my county. I've previously worked with argisscripting at ArcGIS 9.3 but that was a couple years ago and now I'm rusty and using ArcGIS 10.1.   Any and all help is appreciated.  import arcpy  infc = "C:\\Users\\Jeff\\Downloads\\tl_2013_30063_edges\\tl_2013_30063_edges.shp"  for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@"]):     # Print the current line ID      print("Feature {0}:".format(row[0]))      #Set start point     startpt = row[1].firstPoint      #Set Start coordinates     startx = startpt.X     starty = startpt.Y      #Set end point     endpt = row[1].lastPoint      #Set End coordinates     endx = endpt.X     endy = endpt.Y   This is what one of the features looks like.  FID 16992  Shape   Polyline  STATEFP 30  COUNTYFP    063  TLID    205238472  TFIDL   217915003  TFIDR   217914215  MTFCC   S1400  FULLNAME    S 9th St W


The sum of the first $n$ squares $(1 + 4 + 9 + \cdots + n^2)$ is $\frac{n(n+1)(2n+1)}{6}$

Prove that the sum of the first $n$ squares $(1 + 4 + 9 + \cdots + n^2)$ is  $\frac{n(n+1)(2n+1)}{6}$.  Can someone pls help and provide a solution for this and if possible explain the question


How to know the specific ARIMA model through its yt equation?

Can anyone help me out with this question I found on my practice paper?  The series $\{y_t\}$ is described by $$ y_t = 5+0.3y_{t-1}+\epsilon_t+0.9\epsilon_{t-1}. $$ Identify the specific ARIMA model. What is the mean of the series $\{y_t\}$?  I think it is a ARMA (1,1) process? is that correct? And how do I calculate the mean of the ARMA model? Is it the same as AR model? If it is then $$ E(y_t) = 5/ (1-0.30) = 7.14?$$    The sample ACF and PACF plot of a series are given above. Appraise the patterns and judge which ARIMA model fit the series. Justify your conclusion.  I identified as the AR(4). Is that correct? Since ACF has an exponential decay and PACF has a cut off? Differencing is not needed as the ACF decreases sufficiently to 0.


Improvements to a suggested edit cannot be submitted when the suggestion is approved during editing

I was reviewing a  and decided that while the edit was incorrect, there were things to improve about the post. So I clicked “Improve” and set about my business. When I tried to submit my edit, I got the following error message, telling me that the post had been edited in the meantime by the suggester:  User already edited the body of this post; your edit must be more substantive to override the current edit.  When I tried later on a tag wiki, I got the altogether unhelpful indication that “an error has occurred”, and again no way to do anything but cancel and lose my work. But refreshing the page brought me to the suggested edit page, showing the suggested edit as approved, with no trace of my editing. (Fortunately I'd saved my text on the side!) With a , I was marked as having reviewed the suggestion, with the indication “edit” — but there was otherwise no trace of my alleged edit. So, if you improve a suggested edit and it gets approved in the meantime, you get into a situation where  there is no link to the post; if you go back, you get to what you were doing before and lose your edit; if you reload the page as instructed, you lose your edit.  The bug here is that unless you take extra precautions such as copy-pasting your edit into an external editor, you will lose your work. Expected behavior Unlike normal edit conflicts, an edit made to a suggested edit is guaranteed to be a derivative of the suggested edit - so if that edit was approved and then an "improved" version is submitted, that "improvement" edit should be applied to the post (the helpful status indicated by the checkbox shouldn't affect anything though). When two different reviewers both opt to improve a suggested edit, a conflict is unavoidable - this should be resolved based on the size of the edit, as is the normal behavior.


In this MWE, I want to obtain bold letter for the letter "H" (compare the two "H") :  \documentclass[10 pt]{beamer} \usetheme{default} \usepackage{lmodern} % load a font with all the characters \usepackage{fontspec} \usepackage{cmbright} \SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n} \usepackage{amsmath}%loads amsmath that should go before unicode-math \usefonttheme{professionalfonts} \defaultfontfeatures{Mapping=tex-text}  % This seems to be important for mapping glyphs properly  \begin{document} \begin{frame} \[ \mbox{First bold H : }\|x\|_{\mathbf{H}},\; \mbox{Second bold H : }\mathbf{H}  \] \end{frame} \end{document}   but I don't know how doing it. THe "H" produced by this MWE is tiny but no bold effect. If I use      \SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}   I obtain bold tiny "H" but the font used still not the same.


Is an open-ended (but concrete) question OK?

Is it OK to ask a question on a Stack Exchange site that could have several different answers (like a brainstorm) or must all questions have a single, correct answer?  The help section said not to ask for people's opinion, which I don't plan to.  But I'm wondering if a more open-ended question (that has multiple practical answers for a real problem) is allowed.


What command can you use to quickly find which file on your home folder containing the umask command?  $ grep -rnw "umask" ~


How can one prove that the square root of a prime number (e.g. $ \sqrt 61$) is irrational.  First we need to prove that $61$ is prime. This can be done by simply showing that $$ 49 < 61 < 64$$ and so $$ 7 < \sqrt 61 < 8$$ then the only possible prime factors of $61$ are $2 , 3, 5, 7$. Then by contradictions and DIC we can show that $61$ is prime.   Now how can we show that $\sqrt 61$ is irrational?


Euler's theorem - $a^{x}≡a^{x \text{ mod} \varphi(n)} \text{ (mod n)}$

From Euler's theorem we know that $a^{\varphi(n)} \equiv 1 \text{ (mod n)} $ and it works when $n$ and $a$ are coprime positive integers. I found following formula which may be useful for me $a^{x} \equiv a^{x \text{ mod } \varphi(n)} \text{ (mod n)}$. Is this formula correct? If yes, can anyone explain why this is true?


Why was Yoda reluctant to train Anakin when he ended up training an older Luke later on?

Yoda was reluctant to train Anakin in Episode II because he said Anakin was too old to start training (even though Anakin was still a boy). However, in Episode V, Yoda didn't seem very reluctant to train Luke despite the fact that Luke was a full grown man by that time. Why did Yoda put up resistance to training Anakin yet he was willing to train Luke?    Note: the idea for this question came from


If $f$ is a concave function and $f(0) \geq 0$ then $f(a+b) \leq f(a) + f(b)$ for all $a,b >0$

Well If I've got a nice understanding, this proof involves the use of Rolle's and/or Mean Value Theorems. But I don't even an idea of how to start. We already know that  $$f\text{ concave}\Rightarrow f''<0$$ but, then...


What happens when we use ampersand `&` at the end of the pipeline?

Normally, when we use a pipe, the operations on the left and right of the pipe are run in separate subprocesses. The outputs of the first command are transmitted as input to the second command. In this case, I thought that when I used the ampersand sign at the end of the pipeline, only the second operation would be started in the background. However, when I tested it, the entire command is launched in the background. In the following use, I expect the second command is started in the background, but the entire command is started in the background. I tested in bash. cmd | cmd2 & What exactly did I know wrong or missed? What happens when we use ampersand & at the end of the pipeline?


Open terminal in 'always on top' mode on startup

I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work when I run the script by using Startup Applications. The window appears in the right spot, but always on top is not enabled. Below is my script.  #!/bin/bash gnome-terminal --title="abvtrm" --geometry 80x10-0--255 wmctrl -a abvtrm -b add,above exit   The idea is that I want to force the name of the window into being something I decide, so I have a name to refer to for wmctrl. I have noticed that if I run the command   wmctrl -a abvtrm -b add,above   manually in a terminal (after logging, having the window present but not in  always on top mode), it has no effect, which suggests to me that for some reason I am not allowed to pick a name for the window when working through Startup Applications.  I call the script by envoking the command  bash myscriptname.sh   Bonus question: Intuition tells me that in order to have the window appear in the bottom right, I should put  gnome-terminal --title="abvtrm" --geometry 80x10-0-0   but when I do this, the window ends up somewhere in the mid-right area of my screen. Why is this?


CI(p) = (a, b)  People sometimes interpret this interval by saying that      there is a 95% probability that the true p belongs to (a, b)   The statement is incorrect (there is no probability associated with p which is not a random quantity). The correct interpretation is that if take 100 new samples from the same population and construct the 100 confidence  intervals, then we expect (on average) 95 of them to cover the true p. In other terms,      there is a 95% probability that (a, b) covers the true p   How do you explain the difference between these two interpretations to a layman?


How to move window control buttons to the right in 14.04? The previous solutions seems not to work in 14.04.  Note: Please do not mark this question as a duplicate of , as 174292 is about 12.04. Now, with 14.04, the situation is completely different.


Connecting multiple computers and monitors to 1 mouse & keyboard?

What is the best way to connect multiple computers (say 4 or 5) to multiple monitors (same number) but only using 1 mouse and 1 keyboard?


I'm on Ubuntu 17.10. , says that Flash is available in the software center, but it is not for me at least. I tried downloading from their ; first I tried APT which failed with the message "unknown channel: artful-partner." I also tried downloading the tar.gz - first I followed the instructions on their website and the I tried just extracting everything to ~/.mozilla/extensions. Nothing worked.


"A good knowledge in English"/"a good knowledge of English"

Any comments on the usage of "a good knowledge in English"?


Sometimes I need to upload, embed, or display inline an image in a question or answer. How can I do that?


What is the double bracket notation used here?

Its kind of a bracket but I'm not sure what it means.    I have two ideas about it: It means the number of times the expression in satisfied or it changes for $1$ or $0$ depending on the result every time the $i$ value changes.


Let $a,b\in \{\operatorname{Re}(z) <0\}$ then $|e^a - e^b | < |a-b|$.

Let $a,b\in \{ \operatorname{Re}(z) <0\}$. Then I want to show  $|e^a - e^b | < |a-b|$.   Here is my trial :   Let $a = a_1 + i a_2$ and $b=b_1  + ib_2$, then  \begin{align} &e^{a} - e^b = e^{a_1} ( \cos(a_2) + i \sin(a_2) ) - e^{b_1} (\cos (b_2) + i \sin(b_2))   \end{align} and I tried to use $|x|-|y| \leq |x-y| \leq |x|+|y|$, but this does not give desired result.


Split/explode comma delimited string field into SQL query

I have field id_list='1234,23,56,576,1231,567,122,87876,57553,1216'  and I want to use it to search IN this field:  SELECT *  FROM table1 WHERE id IN (id_list)    id is integer id_list is varchar/text   But in this way this doesn't work, so I need in some way to split id_list into select query.  What solution should I use here? I'm using the T-SQL Sybase ASA 9 database (SQL Anywhere). But in this way this doesn't work, so I need in some way to split id_list into select query.  Way I see this, is to create own function with while loop through, and each element extract based on split by delimiter position search, then insert elements into temp table which function will return as result.       COMMENTS TO Sebastian Meine ANSWER AND HIS SOLUTIONS :      Sybase SQL Anywhere 9         sa_split_list system procedure not exist here, so it doesn't work   CAST works great         Sybase SQL Anywhere 12         sa_split_list system procedure exist and works great   CAST works great         For the Sybase SQL Anywhere 9 I have made sa_split_list system procedure replacement:  CREATE PROCEDURE str_split_list(in str long varchar, in delim char(10) default ',') RESULT(   line_num integer,   row_value long varchar) BEGIN   DECLARE str2 long varchar;   DECLARE position integer;     CREATE TABLE #str_split_list (    line_num integer DEFAULT AUTOINCREMENT,    row_value long varchar null,    primary key(line_num));     SET str = TRIM(str)+delim;    SET position = CHARINDEX(delim, str);     separaterows:    WHILE position > 0 loop        SET str2 = TRIM(LEFT(str, position - 1));        INSERT INTO #str_split_list (row_value)        VALUES (str2);        SET str = RIGHT(str, LENGTH(str) - position);        SET position = CHARINDEX(delim, str);     end loop separaterows;     select * from #str_split_list order by line_num asc;  END       Execute the same way as sa_split_list:  select * from str_split_list('1234,23,56,576,1231,567,122,87876,57553,1216')


How to implement delay in serving network request in windows environment?

I have read  but did not find an appropriate reply, hence I am posting this question.  I have a scenario where my Windows client is an anti-virus server.  To reproduce a bug, I need to hold the client side CIFS request by introducing some delay of 5-10 sec.  Can anyone tell me how I can do this?


problem installing make command, x11rdp and libxcb1-dev package

I installed x11rdp using the tip here , its a script that download, build, install and configure x11rdp, I ran once the sudo bash setup.sh, it didn't work because I didn't have the command make so I installed it, the make command ran without trouble except by the package libxcb1-dev, who seems broken, I tried ran apt-get -f install, it didn't work again, I tried update by the update manager, same problem again, I tried use synaptic and didn't work again, any idea to solve that problem or any idea if is something that I have done wrong or that script has done wrong or if its a problem in the package??  by the way, even with the broken package I could install x11rdp with the script and I am using without trouble.  here the LOG:  The following packages have unmet dependencies:  libxcb1-dev: Depends: libxcb1 (= 1.8.1-1) but 1.8.1-1ubuntu0.1 is installed Depends: libxau-dev (>= 1:1.0.0-1) but 1:1.0.6-4 is installed Depends: libxdmcp-dev (>= 1:1.0.0-1) but 1:1.1.0-4 is installed  ldconfig deferred processing now taking place and log into the `apt-get -f install`  Errors were encountered while processing:   libxcb1-dev   libx11-dev   libxfixes-dev  E: Sub-process /usr/bin/dpkg returned an error code (1)   A package failed to install.  Trying to recover:   dpkg: dependency problems prevent configuration of libxcb1-dev:   libxcb1-dev depends on libxcb1 (= 1.8.1-1); however:    Version of libxcb1 on system is 1.8.1-1ubuntu0.1.  dpkg: error processing libxcb1-dev (--configure):   dependency problems - leaving unconfigured  dpkg: dependency problems prevent configuration of libx11-dev:   libx11-dev depends on libxcb1-dev; however:    Package libxcb1-dev is not configured yet.  dpkg: error processing libx11-dev (--configure):   dependency problems - leaving unconfigured  dpkg: dependency problems prevent configuration of libxfixes-dev:   libxfixes-dev depends on libx11-dev; however:    Package libx11-dev is not configured yet.  dpkg: error processing libxfixes-dev (--configure):   dependency problems - leaving unconfigured  Errors were encountered while processing:   libxcb1-dev   libx11-dev   libxfixes-dev


Let $f$ be a polynomial of degree $n$ that satisfies $$\int_{0}^{1} x^{k} f(x) \,\mathrm{d} x = 0$$ for all $k \in \{1,2, \dots, n\}$. Prove that $$\int_{0}^{1} f^{2}(x) \,\mathrm{d} x = (n+1)^{2} \left( \int_{0}^{1} f(x) \,\mathrm{d} x \right)^{2}$$   I fail to  solve it \begin{aligned} &\text {Suppose } f(x)=a_{n} x^{n}+\ldots+a_{0}.\\\\ &\int_{0}^{1} f^{2}(x)\,\mathrm{d} x=\sum_{i=0}^{n} a_{i} \int_{0}^{1} x^{i} f(x)\,\mathrm{d} x=a_{0} \int_{0}^{1} f(x) \,\mathrm{d} x.\\\\ &\text {So we only need to prove}\\ &\frac{a_{0}}{(n+1)^{2}}=\int_{0}^{1} f(x) \,\mathrm{d} x.\\\\ &\text{But I can't prove it. So how to prove it?} \end{aligned}


I need to kill java process from a batch file I am using command  Wmic Path win32_process Where "CommandLine Like '%MyApp.jar%'" Call Terminate   I got the output at cmd "No Instance (s) Available"


Why would Louise telling the Chinese commander about his wife's last words change his mind?

In the future in Arrival, the commander says that he changed his mind about going to war with the aliens because Louise called his private number and told him his wife's dying words. My question is what did Louise say to him (like in English) and why did it change his mind?


How to change the location of the 'close' and 'minimize' window buttons?

I want to change the location of the  'close' and 'minimize' window.  The default location is on upper left - and I want it to be on upper right.   Screenshot attached


jQuery: Accessing Elements after adding them with Append

i append input in div:  $("#menuItems").append("<input type='button' id='"+$("#category").val()+"' class='menuItemDelete' value="+$("#category :selected").text()+" ><br>");   then i want to access element by class name but it does not give any responce. i try this:  $(".menuItemDelete").click(function(){      alert("abc");  });   and also try this:  $(".menuItemDelete").on("click", function(){      alert("abc");  });   how can i access it ?


Story with a science station on a forest planet

I am looking for a story that I read about 25-30 years ago. It was about a planet covered with a jungle forest with very tall trees (hundreds of meters height) and there was some sort of science station on a platform placed on cut off tree tops.  I don't think it was Alan Dean Fosters Midworld because I don't recall the Avatar-like story parts like the home tree and locals forming a lifetime bond with animals that Midworld has.  Does anyone know other stories that match?


Failed to download repository information. Error?

I am new here. I just installed Ubuntu and I am very happy. I tried to install a program from Ubuntu Software Center. It said "Available from "universe" source". So I clicked "Use this source". So, the download started. But I have a problem. Just after a bit, it gives an error. It says "Failed to download repository information. Check your Internet connection". I was very confused.  Here are the error details:      W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/main/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/restricted/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/universe/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/multiverse/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/universe/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/main/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/restricted/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/multiverse/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/main/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/restricted/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/universe/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-updates/multiverse/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/main/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/restricted/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/universe/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/source/Sources  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/main/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/restricted/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/universe/binary-i386/Packages  404  Not Found , W:Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-i386/Packages  404  Not Found , E:Some index files failed to download. They have been ignored, or old ones used instead.   Please help? :(  I am trying to install 2 programs.


16.04 VirtualBox VM (from vhd file) hangs at "non blocking pool is initialized"

I'm trying to boot Canonical's Azure 16.04 .vhd file in a VirtualBox VM and it hangs at "non blocking pool is initialized".  It works in Hyper-V, so it may only be a bug in virtual box (5.0.20).


How can astronauts rotate their body in empty space ? How do they undergo "angular displacement" without any external torque?

How does the astronaut in the following video do what he is doing ?  This question is kind of a follow up to  I was under the impression that linear motion and rotational motion were analogous with displacement, velocity, acceleration, mass, momentum, force being analogous with angular displacement, angular velocity, angular acceleration, moment of inertia, angular momentum and torque respectively. We all know that an astronaut in space cannot undergo any linear displacement without having some external force ( the most he can do is throw objects, or gases in one direction and move in opposite direction , but even then the Center of mass of the man + object system will stay right where it was ) . In short, the center of mass should wind up back where it started. So, how come in case of rotational motion, the astronaut is able to undergo angular displacement without any external torque ? He is facing one way and at the end he has rotated and is facing another way, without there being any external torque during the process. What is the physics i am getting wrong here ? Whatever he does, should he not wind up back where he started ?


Where can I download the Flash Player redistributable installer

The standard process of downloading and installing Adobe Flash involves downloading a small installer, that will itself download the full Flash version adequate to your system, and perform the complete install.  Is there a way to avoid this? I'm upgrading multiple computers in a network and I want to avoid wasting bandwidth by downloading the same installer multiple times, I need a OEM / redistributable installer.