Sometimes we have power outages that last about 100 ms that are long enough to discharge capacitors inside router, when that happens we need to wait about 10-15 minutes for DNS, which is pretty annoying. What I'd like to do is have (cheap) UPS only for the router that will withstand 0.5 s power outages. Router specs (I will test them with a multimeter to be sure about amperage) are 12V 1.5A. I think my options are:   SLA battery with a charger and DC boost converter, 4V 4.5Ah (smallest one I can get). I searched for 4V SLA chargers but I can't find any, I would need to make one from standard 12V switching power supply via timing circuit and step down converter. I would need to make further research about charging SLAs. Capacitors / supercaps. Adding electrolytic caps in parallel between DC barrel jack. Don't know the viability of this solution. Would need to research how to calculate appropriate capacitance.   The solution with capacitors would be much simpler.    Edit: after doing some more research I came up with this setup:  2 × 18650 batteries connected to 2S PCM circuit  that go through boost buck converter to give 12V (also with 2S battery indicator). Not sure how to make it only work when there is no power so that the wall wart is still connected. Only minus is that after few discharges/long use time I would need to recharge the batteries, but that won't be a problem.

In the building where I live, because of older wiring, the mains voltage frequently drops for a fraction of a second and this restarts my wifi router. I am planning to solder a capacitor in parallel to either input or output of the 9V power supply.  Would this work, and would it cause any problems?


So I downloaded the iso : ubuntu- 14.04.3 -desktop- amd64 in order to burn it to a USB key to this I used the pendrive which allows me to burn the iso on my key . After that I opened the app Wubi to install ubuntu on my laptop . After install and reboot , I can not seem to open ubuntu on my PC , he wrote me that there is an error on the file whose path is:  /ubuntu/winboot/wubildr.mbr  I do the same steps on my computer and everything is working normally .... :( :( :(  I do not understand why my laptop it does not work ... I tried to reinstall it with other means but the problem persists. And I do not want to erase Windows 10 to put ubuntu .  There is anyone who could help me please ???? :'(   ...

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


This time I'm having trouble proving the following question: Assuming that the elements of an $n\times n$-matrix $Y(t) = (y_{ij}(t))_{i,j=1,...,n}$ are differentiable, I need to show the following equality: $$\frac{d}{dt}(\det(Y(t))) = \sum\limits_{1=1}^n \det\left(\begin{array}{ccc}         y_{11} & \cdots & y_{1n}\\         \vdots &  & \vdots \\         y_{i-1,1} & \cdots & y_{i-1,n}\\         y'_{i,1} & \cdots & y'_{i,n}\\         y_{i+1,1} & \cdots & y_{i+1,n}\\         \vdots &  & \vdots \\         y_{n1} & \cdots & y_{nn}\\     \end{array}\right)$$ And as a hint I'm told that one way of proving this equality is to use the formula of determinant with n!, however I'm not sure I know this formula, and the only one I could think of was the one with  Levi-Civita symbol: $$\det(Y(t)) = \frac{1}{n!}\sum\limits_{i_1,...,i_n = 1; j_1,...,j_n = 1}\epsilon_{i_1,...,i_n}\epsilon_{j_1,...,j_n}\alpha_{i_1j_1,...,i_nj_n}$$ which I don't know how to derivate. Could anyone help me derivate this determinant ? any lue to start would be welcome, I didn't find anything related to my problem on mathstack.

I do not understand a remark in Adams' Calculus (page 628 $7^{th}$ edition). This remark is about the derivative of a determinant whose entries are functions as quoted below.      $``$Since every term in the expansion of a determinant of any order is a product involving one element from each row, the general product rule implies that the derivative of an $n\times n$ determinant whose elements are functions will be the sum of $n$ such $n\times n$ determinants, each with the elements of one of the rows differentiated. For the $3\times 3$ case we have      $$\frac{d}{dt}\begin{vmatrix}   a_{11}(t) & a_{12}(t) & a_{13}(t) \\   a_{21}(t) & a_{22}(t) & a_{23}(t) \\   a_{31}(t) & a_{32}(t) & a_{33}(t) \end{vmatrix}=\begin{vmatrix}   a'_{11}(t) & a'_{12}(t) & a'_{13}(t) \\   a_{21}(t) & a_{22}(t) & a_{23}(t) \\   a_{31}(t) & a_{32}(t) & a_{33}(t) \end{vmatrix}+\begin{vmatrix}   a_{11}(t) & a_{12}(t) & a_{13}(t) \\   a'_{21}(t) & a'_{22}(t) & a'_{23}(t) \\   a_{31}(t) & a_{32}(t) & a_{33}(t) \end{vmatrix}+\begin{vmatrix}   a_{11}(t) & a_{12}(t) & a_{13}(t) \\   a_{21}(t) & a_{22}(t) & a_{23}(t) \\   a'_{31}(t) & a'_{32}(t) & a'_{33}(t) \end{vmatrix}."$$   It is not difficult to check this equality by simply expanding both sides. However, the remark sounds like using some clever trick to get this result. Can anyone explain it to me, please? Thank you!


While learning aggregation in Java, I have come across NULLPointerException , Please help me identifying the root cause. There are 3 classes.    Student Department. Institution.  package com.java.inheritance;     import java.util.List;     import java.io.*;  public class Department {      private String name;     private List<Student> listofstudents;      Department(String name,List<Student> listofstudents){          this.name =name;         this.listofstudents = listofstudents;     }      public List<Student> getStudents(){          return this.listofstudents;     }   }    package com.java.inheritance;  public class Student {      private String name;     private int id;     private String Department;      Student(String name,int id,String Department){          this.name =name;         this.id= id;         this.Department = Department;      }  }        package com.java.inheritance;     import java.util.List;      public class Institute {         private String institureName;        private List<Department> listofDept;        public Institute(String institureName,List<Department> listofDept){            this.institureName = institureName;            this.listofDept = listofDept;        }        public List<Department> getDepartments(){           return this.listofDept;       }        // Get total number of Student in a Institute.        public int gettotalnoofStudents(){           int numberofStudent = 0;           List<Student> listofStudent=null;           for (Department dept:listofDept){               listofStudent = dept.getStudents();               for (Student student:listofStudent){                    numberofStudent++;                 }            }            return numberofStudent;       }       } // End of Institute   Now I am calling them in another class, MainClass.  package com.java.inheritance; import java.util.List;  public class MainClass {      public static void main(String[] args) {          try{           List<Student> sciencestudents=null;         List<Student> artstudnets=null;         Student s1= new Student("Asfakul",1,"Science");         Student s2=new Student("Arizul",2,"Science");         Student s3=new Student("Noor",3,"Arts");          sciencestudents.add(s1);         sciencestudents.add(s2);         artstudnets.add(s3);           Department d1=new Department("Science",sciencestudents);         Department d2=new Department("Arts",artstudnets);          List<Department> departmentlist=null;         departmentlist.add(d1);         departmentlist.add(d2);          Institute i1= new Institute("BEC",departmentlist);         System.out.println(i1.gettotalnoofStudents());         }catch(Exception e){             e.printStackTrace();             }     } }   But I am getting NULLpointerException at this point. Where have I done wrong.

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


Is there any theoretical framework or model that would lead to a prediction, either precise or approximate, about how much or what proportion of the universe's total mass is in the form of photons, or electromagnetic waves? In lieu, is there any way to guesstimate or place a boundary on that proportion?  Could that proportion vary over time, universally?  An answer to this question  gives a calculated estimate of the photon density $$ \rho_\nu = 3.21334\times 10^{-31}\;\text{kg}\,\text{m}^{-3}, $$  but neither the question nor the answers explicitly show the total energy density, or express the photon density as a proportion of the total energy density.  In addition, I am interested as much in the theoretical framework that would predict the photon to total energy density as I am in the current measurements that lead to the estimate.

I've been looking at the  paper, trying to update my toy cosmology simulator with the most recent data.  Most of the interesting values such as $H_0$, $\Omega_m$, and $\Omega_\Lambda$ can be found in Table 2 on page 12, but the one thing I didn't find was an estimate of the energy density of radiation.  Can this be derived from some other parameters in these data?


This error is happening on 16.04 when I try to run a sh script for the qb64 instaler.  james@ubuntu:~/qb64$ ./setup_lnx.sh  bash: ./setup_lnx.sh: /bin/bash^M: bad interpreter: No such file or directory james@ubuntu:~/qb64$

I wanted to execute a shell script:  -rwxr-x--x 1 root root   17234 Jun  6 18:31 create_mgw_3shelf_6xIPNI1P.sh   I tried to do a standard procedure, but I got this error:  ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0  DEBUG   cd/etc/opt/ldapfiles/ldif_in ; ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0 **ERROR  sh: ./create_mgw_3shelf_6xIPNI1P.sh: /bin/bash^M: bad interpreter: No such file or directory**   What does it mean? I was doing this as the root user under the root group.  Does it mean that the file does not have the correct permission for the root user?


Something on my laptop is maxing out the CPU now and then. It's an i7 so I assume it must have to be a relatively big issue for that to be the case. When it happens, my laptop locks up for a few seconds, audio sounds very strange (I imagine it's looping really fast).  When it happens, I fire up task manager and can see the spike, but the option to sort by processor consumption descending and take a look at what it is has gone (it suddenly drops).  Is there anything out there that can be configured to log process details of any process that pushes the CPU over X where X, in this case, is probably 95% or so.

My Windows 10 laptop with an i7 and 16 GB of RAM often gets the fans going full speed when I am not using it. It is a bit slow to respond sometimes when I try to wake it up to check what is going on. Every time I try to open the Task Manager to check out the Details tab and see what is using the CPU, nothing shows up. I'm running as admin, and all tasks are showing. I am guessing the system is hiding what it is working on because it is seen as a "system" task.  What is a good tool to use that will monitor and report what is utilizing CPU? I've used ProcMon before, but I didn't find the output particularly accurate or helpful.  More importantly, how can I stop this from happening? I am quite annoyed that so much software feels the need to do things when my computer is idle. Is there something like ZoneAlarm, but for CPU?


I'm working through the following,     Exercise 2.1.iv. A functor $F$ defines a subfunctor of $G$ if there is a natural transformation $\alpha: F \Rightarrow G$ whose components are monomorphisms. In the case of $G: C^{op} → \operatorname{Set}$, a subfunctor is given by a collection of subsets $Fc \subset Gc$ so that each $Gf : Gc \longrightarrow Gc'$ restricts to a function $Ff: Fc → Fc'$. Characterize those subsets that assemble into a subfunctor of the representable functor $C(−, c)$.   I am wanting to know how do I fully characterize these subsets they speak of. I saw that this was already asked but it feels incomplete.    The person says that it is a collection of morphisms with codomain $c$ that are closed under precompositions with morphisms in $\textbf{C}$. My question is how do we prove that instead of show it like they did.

I'm working through the following,     Exercise 2.1.iv. A functor $F$ defines a subfunctor of $G$ if there is a natural transformation $\alpha: F \Rightarrow G$ whose components are monomorphisms. In the case of $G: C^{op} → \operatorname{Set}$, a subfunctor is given by a collection of subsets $Fc \subset Gc$ so that each $Gf : Gc \longrightarrow Gc'$ restricts to a function $Ff: Fc → Fc'$. Characterize those subsets that assemble into a subfunctor of the representable functor $C(−, c)$.   I have two questions. The first one is, when we say that a subfunctor for $G$ is given by subsets of each $Gc$, we are identifying each $Fc$ with its image via $\alpha_c$, right? So we would have uniqueness up to isomorphic objects.   Secondly, for the concrete exercise regarding $C(-,c)$, could you provide any hints on how to characterize such sets?   So far I've only noted that given $\mu: d' \rightarrow d$, we need the precomposition,  $$ \mu^{*}: f \in C(d,c) \mapsto f\mu \in C(d',c) $$   to restrict to $Fd$ and corestrict to $Fd'$. Thus, $\mu^*(Fd) \subseteq Fd'$, and so  $$ \bigcup_{\forall \mu: \ d' \to d \\ \forall f\in Fd} f\mu \subset Fd' $$  but I haven't got from there to any fruitful conclusions.


A family has two children. Given that one of the children is a boy, what is the probability that both children are boys?   I was doing this question using conditional probability formula.   Suppose, (1) is the event, that the first child is a boy, and (2) is the event that the second child is a boy.  Then the probability of the second child to be boy given that first child is a boys by formula, $P((2)|(1))=\frac{P((2) \cap (1))}{P((1))}=\frac{P((2))P((1))}{P((1))} = P((2))$ ...since second child to be boy doesn't depend on first child and vice versa. Please provide the detailed solution and correct me if I am wrong.

In a family with two children, what are the chances, if one of the children is a girl, that both children are girls?  I just dipped into a book, The Drunkard's Walk - How Randomness Rules Our Lives, by Leonard Mlodinow, Vintage Books, 2008. On p.107 Mlodinow says the chances are 1 in 3.   It seems obvious to me that the chances are 1 in 2. Am I correct? Is this not exactly analogous to having a bowl with an infinite number of marbles, half black and half red? Without looking I draw out a black marble. The probability of the second marble I draw being black is 1/2.


I have encountered the following problem:     Let $L/K$ be a field extension and let $\alpha, \beta \in L$. Show that $\alpha$ and $\beta$ are algebraic over $K$ if and only if $\alpha + \beta$ and $\alpha\beta$ are algebraic over $K$.   For the forward implication I have already seen several ways to show it, but I cannot think of a way for the other direction.

Suppose $E/F$ is a field extension and $\alpha, \beta \in E$ are algebraic over $F$. Then it is not too hard to see that when $\alpha$ is nonzero, $1/\alpha$ is also algebraic. If $a_0 + a_1\alpha + \cdots + a_n \alpha^n = 0$, then dividing by $\alpha^{n}$ gives $$a_0\frac{1}{\alpha^n} + a_1\frac{1}{\alpha^{n-1}} + \cdots + a_n = 0.$$     Is there a similar elementary way to show that $\alpha + \beta$ and $\alpha \beta$ are also algebraic (i.e. finding an explicit formula for a polynomial that has $\alpha + \beta$ or $\alpha\beta$ as its root)?    The only proof I know for this fact is the one where you show that $F(\alpha, \beta) / F$ is a finite field extension and thus an algebraic extension.


I have a 16 GB iPhone 6s. Just 7 days ago I restored as new because my phone keeps taking up all my storage. When I restored, I had 4 GB available, 5 days went passed and I was forced to restore again because I had no space. I didn't even download a single thing.  3 days ago I restored as new, again. I had 3.9 GB available. Yesterday and this morning I had 1.32 GB available, now I have 600 MB available. This has been a problem since my iPhone 5c on iOS 7.  I've done numerous restoring from backups and as new. I haven't downloaded any apps and in storage usage settings, it doesn't add up to what is being used. I've called Apple and all they say is do a restore even though I've done it many times.  If I delete an app, my phone will take up the space within a day. It got so bad I couldn't send texts because my phone would "forget" them. iTunes says I have more storage than I actually do. I've used 3rd party cleaning software such as PhoneClean. It freed up some but not all.  Here is a picture of the Storage section on Preferences after a recent restore:    It looks ok now but available space will slowly go down after a couple of days.

When I look at the storage section of my phone, the various categories add up to about 2.5 GB of storage, but it says that 11.4 GB is being used. Is there any way to figure out what else is taking up space on my phone?


Is there a reason why British use me instead of my in their sentences? For example, I'm going to call me mom. Is it just a slang in Britain? Is the usage grammatically correct?

I noticed that British people sometimes use me instead of my. For example, Liam Gallagher does it quite often. Example:  The wind was strong I have nearly lost me pants  What is a story behind this alteration? Is it appropriate in formal language? Do people really speak like that? Or is this a dialect rather than a widely spread manner?


I get a 404 error message when I try localhost or 127.0.0.1. This is also true if I try localhost/~username  I assume apache is running or I would not get 404. I have stopped and started and restarted apache.  hosts file looks like this:  name: localhost ipv6_address: ::1  name: localhost ip_address: 127.0.0.1   httpd.conf show this as DocumentRoot  DocumentRoot "/Library/WebServer/Documents" <Directory "/Library/WebServer/Documents">   $ ps -ax | grep '[h]ttpd' gives:  12912 ??         0:00.79 /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/apache2/httpd.conf xxx-MacBook-Air:/ myusername$ ps -ax | grep '[h]ttpd'   The error log at var/log/apache2 is empty. Well iow that directory is empty.  Finally, this is the 404 message:  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">       <title>Site Not Found</title>      <meta name="viewport" content="width=device-width, initial-scale = 1.0; maximum-scale=1.0, user-scalable=no" />     <meta http-equiv="content-type" content="text/html; charset=UTF-8" />     <link href="//fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet" type="text/css">     <link href="/local-error-page-assets/errors.css" rel="stylesheet" type="text/css">

404

Site Not&nbsp;Found

The site you requested does not have an associated route in Local.
If you continue to get this message after refreshing, try restarting the Local site.

If the error persists, check the Local Router Logs in Local by going to
Help &raquo; Reveal Local Router's Logs.

     if I click on a link in the source like:  <link href="/local-error-page-assets/errors.css" rel="stylesheet"    it serves up the css no problem from this address:  http://localhost/local-error-page-assets/errors.css   I can't find "error.css" anywhere on my computer. Does it exist? I thought if I could find that file I would know where the server really was looking.  Any ideas? Thanks

I have followed this guide to set-up Apache on High Sierra:   I used it to set it up on Sierra.  But when I go to  I get "Hmm. We’re having trouble finding the site "  A suggestion on this similar question: localhost on macOS High Sierra. Which I've tried, but still cannot connect to localhost:(  I tried install mamp and reinstall it then install ampps but still that problem , I write in terminal sudo apachectl start then sudo apachectl stop and again start but nothing changes.  Please help me i tried to solve problems for 2 weeks ago :(


Please give intuition without Gauss Law.

I know from Gauss law, it is $\vec{E}=\dfrac{\sigma}{2 \epsilon_0}(\hat{n})$ at all points. But it doesn't make sense because of the inverse square nature of electric field which suggests if you move further away from the plane, electric field must reduce.   Then why is electric field of an infinite plate constant at all points?


Some apps ask for a ridiculous amount of permissions. Android tends to be you accept all the permissions and use the app or you don't accept all and don't use the app. This is different from how IOS handles permissions. For IOS, you can selectively allow permissions like location, notifications, photos, bluetooth, camera, etc. How can I do this on android. I don't care if it breaks certain apps. Sometimes their is a descent app that just ask for an overwhelming amount of permissions.   Any ideas? Android 5.1.1! No custom ROM. Don't have xposed? But I can install it if I need too.

Occasionally I want to install an application which requires certain permissions that I feel it really shouldn't need. Can I install the app without giving it these permissions? For example, GPS location, , internet connection, etc.  Is it possible to change the permissions of an application once it is installed?


Is there a way to get \ref generate also the "word", not only the number?  As in: Using \ref{eq:gauss}, we can now prove  I'd like this to turn into Using Equation 1, we can now prove.  Right now it just generates the number and I need to write the word Equation myself.  Not sure if this is related, but in my "header" file I have this:  \usepackage{url} \usepackage[     unicode=true,     bookmarks=true,     bookmarksnumbered=true,     bookmarksopen=false,     breaklinks=false,     pdfborder={0 0 0},     pdfpagemode=UseNone,     backref=false,     colorlinks=true]{hyperref}   I believe it colours the numbers, not really sure.

Is there a package that automatically inserts the ToC level of the reference I inserted?  Section 1.1 \label{a} Subsection 1.1.1 \label{b} Subsection 1.1.2  \label{c}   So that the text:  Blah \superref{a} and \superref{b} and \superref{c}   becomes:  Blah Section 1.1 and Subsection 1.1.1 and Subsection 1.1.2   So that it automatically adapts if I change the level of a label?


I am fairly new to hands-on electrical engineering (I have taken Physics II and have played with computers and electronics all my life, but am only now truly seeking to learn how to safely handle many different electrical appliances) and am involved in a greenhouse automation project.  The greenhouse has 220V AC power.  I have a number of submersible liquid pumps that draw 12V, 1.8A DC and have 4A fuses.  I've hacked up some old router and cellphone AC/DC adapters that do the trick, but I would like to add a dedicated DC line to the work space for additional motors, pumps, sensors, and other electronics that need DC power.  My question is: if I have an AC/DC adapter that outputs 12V, 16.5A, 203W DC power, would that fry my 4A fuses (as I suspect?)  What if I have 8 or 9 1.8A pumps wired in parallel?  Could I hook and Arduino Mega into any old DC line, or must I downstep it to the current amperage?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I installed Ubuntu (14.04) on my Windows 8.1 (4 Go RAM, 64 bits) by means of a bootable USB. After having partitioned the HDD, the installation was successful.   However, I had an issue to boot into Ubuntu, so I decided to uninstall it by means of a software (that I discovered on youtube) I tried to doing so, but it  got worse, as after trying to reboot my Lap, a black screen shows 'grub>'.  So, now, each time I try to get into my Windows 8.1, I have to enter a specific script and then my laptop boots normally.   How shall I proceed to uninstall the Ubuntu boot loader?

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


Meta: I found a very similar post asking the difference between "I saw him cross" and "I saw him crossing". I have three additional questions on sentences of this form.    In , the accepted answer was "I saw him cross the road" implies I saw the entire event of him crossing the road and "I saw him crossing the road" implies I saw him in the middle of the crossing but I didn't wait to see whether he finished crossing the road.   Q1. But what if we watch instead of see? Consider the sentences below.     I watched her dance alone in the room.   I watched her dancing alone in the room.   Watch implies something that goes on for a while. But does the original explanation still hold, i.e. does the first sentence imply I watched the entire dance and the second imply I did not?    Q2. What if you see actions that are almost instantaneous? Does the explanation still hold good? Here is an example:      I saw a flash of lightning strike the pole.   I saw a flash of lightning striking the pole.   Here, we cannot stop seeing in the middle of a lightning since it happens so fast. Does that make the second sentence wrong or can we still use either sentence to mean the same thing?     Q3. Which of the sentences below is/are correct?     I caught her steal the diamond ring   I caught her stealing the diamond ring   When you catch someone in the act, that person could not finish the act. So does that make the first sentence incorrect?

"Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why?


I'm facing an issue, stating that the cpio files contain junk, which results in kernel panic. Hence I'm looking for alternate ways to pack a file, precisely, pxe extension, which is easier to mount by the grub system.

The kernel on booting initrd, shows the error 'Initramfs unpacking failed: junk in compressed archive', with a message of kernel panic. Is this an issue with cpio, as I'm using Ubuntu 16.04 or some internal error caused by the /init daemon script?


Where a noun ends with the letter x, is it proper for the possessive form of the word to end with 's or simply ' ? Example 1:  "It is Xerox' position that it owns the patent." vs. "It is Xerox's position that it owns the patent."  Example 2:  "The ox's tail was short." vs. "The ox' tail was short."

Many questions already ask about this topic ( , , etc.) and their answers vary, but they always give exceptions to the apostrophe-s rule, for example:      6.24 The general rule for the possessive of nouns covers most proper nouns, including most names ending in sibilants."   Examples they give include Kansas’s, Ross’s land, and Jones’s reputation. Exceptions include Jesus’  and Moses’.  Which names does this apply to?  Is the Aeneas’  form correct, or is it Aeneas’s instead?


We use apostrophes to denote ownership:     I wrapped the cat's claws so he wouldn't scratch me while I handled him.    However, we don't use an apostrophe when 'it' is the owner.     The cat licked its claws.   This seems inconsistant - the claws belong to it, it being the cat.   Is there some formal reason, or a decision in the formation of language where this came to be?

I know that its is the possessive and it's is the contraction, and know when to use them.  But why doesn't the possessive have an apostrophe?   "The bear's eating a fish." [contraction] "The bear's coat is brown." [possessive] "It's eating a fish." [contraction] "Its coat is brown." [possessive] "One's eating a fish." [contraction] "One's coat is brown." [possessive]    lists the etymology as "From  + ", and  says that this is actually the original form:     Originally written it's, and still deliberately spelled thus by some writers until early 1800s.   So what happened to the apostrophe?  When did people stop using it, and why did they?  It seems that it's as the possessive is more natural, as most people do this until they're taught that it is wrong (or even after).  Update: Online Etymology Dictionary has been updated to include two potential explanations:     The apostrophe came to be omitted, perhaps because it's already was established as a contraction of it is, or by general habit of omitting apostrophes in personal pronouns (hers, yours, theirs, etc.).   Can anyone back up either of these arguments?  The possessive one's still has the apostrophe, despite these.


sometimes I see  for(vector<int>::iterator it=a.begin();it!=a.end();it++){ }   and sometimes   for(vector<int>::iterator it=a.begin();it!=a.end();++it){ }   It seems no difference when I try to print some vector to test, but not sure if it has some difference in side effect, is there any difference between them?

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


How can we customize the code with rand() function in order to generate a n-digit number, where n<8, without digit duplicates in it? Suppose I want to generate a 4 digit number from 1000 to 9999, this number should not contain digit duplicates: for instance 1023 4798, etc. Btw, we may not generalize n. Edits I skimmed through the answers in the question I was adressed to. I honestly think that the problem of generating a sequence of digits without a single duplicate in it is in my opinion easier that generating a number with no duplicate digits. Still looking for an answer. My code is a real mess and truthfully does not contain a single try to tackle the stated problem. I have a paper draft but still it's based on assigning an integer variable to each digit in a number and a small loop which checks if some of them are equal and increment/decrements one of them. This sounds like a bad idea even to me, but this is all I can come to.

Duplicate:    I want an pseudo random number generator that can generate numbers with no repeats in a random order. For example: random(10) might return 5, 9, 1, 4, 2, 8, 3, 7, 6, 10 Is there a better way to do it other than making the range of numbers and shuffling them about, or checking the generated list for repeats?  Edit: Also I want it to be efficient in generating big numbers without the entire range.  Edit: I see everyone suggesting shuffle algorithms. But if I want to generate large random number (1024 byte+) then that method would take alot more memory than if I just used a regular RNG and inserted into a Set until it was a specified length, right? Is there no better mathematical algorithm for this.


I am working on a Android project that includes Arrays.I know that Java is a passByValue kind of language but there are some exceptions for objects, and arrays are objects.Here is what I want to do : Firstly I am going to check if EditText is null or not, if is null I will put also null for my float array if not I want to put value from EditText.  EditText acDifSp; EditText deScMoSp; EditText toReStVa; EditText fePuStToVa; EditText deShDoToVa; EditText deBoSeSp; EditText beTem1; EditText beTem2; EditText vibVale; EditText poPuPa; EditText SlWeinSlPu;  Float   acDifSpFl; Float   deScMoSpFl; Float   toReStVaFl; Float   fePuStToVaFl; Float   deShDoToVaFl; Float   deBoSeSpFl; Float   beTem1Fl; Float   beTem2Fl; Float   vibValeFl; Float   poPuPaFl; Float   SlWeinSlPuFl;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.setting_page);      acDifSp=(EditText)findViewById(R.id.editText1);     deScMoSp=(EditText)findViewById(R.id.editText2);     toReStVa=(EditText)findViewById(R.id.editText3);     fePuStToVa=(EditText)findViewById(R.id.editText4);     deShDoToVa=(EditText)findViewById(R.id.editText5);     deBoSeSp=(EditText)findViewById(R.id.editText6);     beTem1=(EditText)findViewById(R.id.editText7);     beTem2=(EditText)findViewById(R.id.editText8);     vibVale=(EditText)findViewById(R.id.editText9);     poPuPa=(EditText)findViewById(R.id.editText10);     SlWeinSlPu=(EditText)findViewById(R.id.editText11);  EditText[] fields={acDifSp,deScMoSp,toReStVa,fePuStToVa,deShDoToVa,deBoSeSp,beTem1,beTem2,vibVale,poPuPa,SlWeinSlPu};         Float[] values={acDifSpFl,deScMoSpFl,toReStVaFl,fePuStToVaFl,deShDoToVaFl,deBoSeSpFl,beTem1Fl,beTem2Fl,vibValeFl,poPuPaFl,SlWeinSlPuFl};         for (int i = 0; i < fields.length; i++) {             EditText currentField=fields[i];             if(currentField.getText().toString().length()>0){                 values[i]=Float.parseFloat(currentField.getText().toString());             }         }  }   I tried this because, I don't want to check every EditText with if. Is this way correct ? or can anyone suggest another way ?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


My laptop is dell inspiron 15r, processor Intel core i3 HDD-500GB Ram - 4Gb can install Ubuntu any version and proper use this OS please help me.

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I'm creating a python 3 tool that requires the access of many other preexisting networking tools, and some don't have python libraries. I've tried subprocess.check_output, which works, however, this data is not easy to work with, and I don't believe it supports piping commands like grep or awk if both commands require arguments. I want to be able to, on separate threads, run each command and store the output, as well as stop the output of the command, as I'll be using tools like SSLStrip, ArpSpoof, nmap, and others. that run until terminated.  What's the best way to do this?

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


What is the 2 layered circles symbol in this circuit? What does it do?

The attached screenshot is from a schematic in a datasheet.  I know that the flat-topped arrow is a diode, but I don't know what the pair of looped circles are.  Can anyone help me out?  If there's a good online symbol reference, please share the link!    Thanks!


robbery (noun): the crime of stealing from somewhere or someone.    mugging (noun): an act of attacking someone and stealing their money.       robbery is stealing only, but mugging is attacking and stealing.  But I noticed most of news websites use robbery instead of mugging, even when it is include attacking.        A woman has been assaulted with a hammer during an attempted robbery outside a south Belfast restaurant.    On-loan Marseille winger Florian Thauvin was reportedly "violently assaulted" on Monday evening as he fended off an attempted robbery.       Why shouldn't they use mugging instead of robbery? it will be more accurate.

I can't seem to find the difference on the internet between "getting robbed" and "getting mugged". I would appreciate it if you could explain it to me.


Where can I find a list of Access Arguments to be used with user_access() ? I went to the permissions page and I'm not sure what I can copy and paste from there to be used as an argument for user_access(). So far I only know two: 'access dashboard' and 'access content'  I want to find out how can we get a list of these arguments.

user_access($string, $account = NULL)      $string: The permission, such as "administer nodes", being checked for.   How can I find out a list of available $string values for user_access() function?


Is there any relevance of it? E.g. some problems are easier to solve without quantization and correspondence makes it a valid solution. This isn't about the quantization of gravity. It is much more general.

What I am interested to see are specific examples/reasons why gravity should be quantized. Something more than "well, everything else is, so why not gravity too". For example, isn't it possible that a quantum field theory on curved space-time would be the way treat QFT and gravity in questions where the effects of neither can be ignored?


How to hitchhike on a cargo ship from India to say somewhere like Africa or Mediterranean? What will be the requirements and cost to travel alone? Is this possible at all?

I want to go from New York City to any destination in Europe on a freighter.  The only place I've found information for doing this requires a round trip.  I don't want to go round trip.  I want to spend some months in Europe and I don't care where in Europe I start.


I'm writing a python file that imports a method which I wrote. This method is still buggy, so I need to be able to edit it. The issue is if I edit the imported method, the file that is calling that method won't register any of the changes I've made. The only way I've been able to get the changes registered is to exit out completely (I'm using Enthought Canopy). I've tried clearing out all the variables with %reset, exiting all my open .py files, and then opening them again and running them. It doesn't work.  I can combine the two files so that the method is being called inside the .py file in which it is written, but as I will need the method for a lot of applications, this is only a short-term fix since I don't want any extraneous code in the file long-term.

I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  <-- How do I do this?     import foo     myfoo = foo.Foo()


Hypothesis: Let $G$, $H$, $G'$, and $H'$ be cyclic groups of orders $m$, $n$, $m'$, and $n'$ respectively.    Goal: Show that if $G * H$ is isomorphic to $G' * H'$ then $m = m'$ and $n=n'$ or else $m = n'$ and $n = m'$.  Here $G * H$ is meant to denote the free product of groups.  Attempt:   Suppose it's not the case that $m = n'$ and $n = m'$.  I will show that $n = n'$ and $m' = m'$ so that the desired result follows. Let $x \in G * H$. Then $x = g_1 h_1 \cdot \ldots \cdot g_k h_k$ uniquely s.t. $1\ne g_i  \in G$, $1 \ne h_i \in H$ and $g_1$ and $h_k$ might be the empty element.  Furthermore -- since all our groups are cyclic -- we can let $\left\langle g \right\rangle = G$ and $h = \left\langle H \right\rangle$ and observe that  $$ x = g^{\alpha_1} h^{\beta_1} \cdot \ldots g^{\alpha_k} h^{\beta_k} $$  uniquely since each $g_i = g^{\alpha_i}$ for some $\alpha_i \in \{1, \ldots , m-1\}$ and each $h_i = h^{\beta_i}$ for some $\beta_i \in \{1, \ldots , n-1\}$. Under the isomorphism $f$ between $G * H$ and $G' * H'$ there exists an analogous element $f(x) = x' \in G' * H'$.  We can use the isomorphism properties of $f$ to conclude that $x'$ has the following expression in $G' * H'$  $$ f(x) = f \left(g^{\alpha_1} h^{\beta_1} \cdot \ldots g^{\alpha_k} h^{\beta_k}\right) = f(g)^{\alpha_1} f(h)^{\beta_1} \cdot \ldots f(g)^{\alpha_k} f(h)^{\beta_k} = x' $$ From (3), we know that by the orders of the groups given in the hypothesis that each $\alpha_i$ and $\beta_i$ must satisfy   $$ 0 < \alpha_i < m \text{ and } 0 < \beta_i < n $$  respectively. Now it must be that $f(g)$ and $f(h)$ map to generators of $G'$ and $H'$ (not necessarily in this order).  This is because $f$ being an isomorphism also means $f$ is -- in particular -- a surjection.  Yet it is clear from the expression of $f(x)$ in (4) that if $f(g)$ and $f(h)$ didn't map to generators of $G'$ and $H'$, it would be impossible for $\{f(x) : x  \in  G * H\}$ to equal $G' * H'$. Then   $$ m = |G| = \underbrace{|\{ g^k : k \in \mathbb{N}  \}|}_{\text{since $g$ generates $G$}} = \underbrace{|\{f(g)^k : k \in \mathbb{N}\}|}_{\text{since $f$ is bijective}} \underbrace{= |X| \text{ s.t. } X = G' \text{ or } X = H'}_{\text{since $f(g)$ is a generator of either $G'$ or $H'$}} $$  and  $$ n = |H| = \underbrace{|\{ h^k : k \in \mathbb{N}  \}|}_{\text{since $h$ generates $H$}} = \underbrace{|\{f(h)^k : k \in \mathbb{N}\}|}_{\text{since $f$ is bijective}} \underbrace{= |Y| \text{ s.t. } Y = G' \text{ or } X = H'}_{\text{since $f(h)$ is a generator of either $G'$ or $H'$}} $$ If $X = H'$ and $Y = G'$, then $m = n'$ and $n = m'$ -- contradicting (1). Then it must be that $X = G'$ and $Y = H'$ so that $m = m'$ and $n = n'$.  This completes the proof.   Question: Is my proof valid?

Given $G$, $H$, $G'$, and $H'$ are cyclic groups of orders $m$, $n$, $m'$, and $n'$ respectively.   If $G*H$ is isomorphic to $G'* H'$, I would like to show that either $m = m'$ and $n = n'$ or else $m = n'$ and $n = m'$ holds. Where * denotes the free product.  My approach:  $G*H$ has an element of order $n$, thus $G' * H'$ has one too.  But already the next step is not clear to me, should I show that there is an element of length $> 1$ which has infinite order or what would be the right approach here?  Thank you.


I don't recall anything directly related to religion having been mentioned in the books from Philosopher's Stone to Half-Blood Prince (1-6).  The only exception is that Christmas is widely celebrated. In Deathly Hallows Harry and Hermione pass St Jerome's Church in Godric's Hollow and there's one biblical reference ():     in Harry Potter and the Deathy Hallows, Harry finds two tombstones   with Bible (New Testament) quotes on them. His parents' reads "The   last enemy that shall be destroyed is death" (1 Corinthians 15:26)   while Kendra and Ariana Dumbledore's reads "Where your treasure is,   there will your heart be also" (Matthew 6:21).   Two direct references in all seven books (and potentially Harry Potter and the Cursed Child), is this correct?

The question of  made me wonder as to whether wizards, any of them, do practice religion. Whether there be magic-person only religions or shared muggle faiths, I do not recall any wizards (born in the wizard world anyway) saying that they did practice a religion.  Many of them do celebrate Christmas, but as was commented on the above linked question, there are many non-christian muggles that also observe Christmas. So I am not sure that can be an accurate identifier. Answering this question may link into identifying .


I use the initialism "CE" a lot in my thesis, both in an out of equations. I find that the letters are too far spaced for my liking when used in an equation, so I use the \! command to reduce the spacing. When I do this manually it seems to work perfectly, but when I incorporate the this into a \newcommand the result is that I always lose a space after the command if one exists.   Is there a way to stop this? It would be even better if I could have one command in and out of equation environments.  \documentclass{article} \begin{document}  % Commands \newcommand\CE{{C\!E}}  % CE for equation environment \newcommand\ce{$C\!E$}  % CE for inline writing  \ce. \ce this is a line.        % space lost after second \ce  $\CE$. $\CE$ this is a line.    % Works fine but cumbersome  $C\!E$. $C\!E$ this is a line.  % Works fine but would like this in a command  \end{document}

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


We have several MySQL backup files of a database in *.SQL format and we want to restore the database by using these files. However, as the sql files contains "DROP TABLE" definitions, running one script cause to remove the data created by the previous script. In addition to these sql files, we have also some other backup folders containing *.FRM and *.MYD files. In all of two cases I think these backups are Differential or Incremental and we have to merge/combine all of them. If so,  how can we combine them without losing data? As I have no experience on MySQL, could you explain a way by using MySQL Workbench if it is possible? Thanks in advance.  Some lines from one of the sql file:  DROP TABLE IF EXISTS `BLACKLIST`;     CREATE TABLE `BLACKLIST` (       `ID` int(11) NOT NULL auto_increment,       `NAME` varchar(30) NOT NULL,       `SURNAME` varchar(30) NOT NULL,       PRIMARY KEY  (`ID`),       UNIQUE KEY `BLACKLISTINDEX` (`NAME`,`SURNAME`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;


I'm having a discussion with a friend about the last sentence on their business profile (see attachment).     To me, it sounds totally wrong, but I'd like to know whether it actually is. I think it would have to be "that have been and will be",  because otherwise (as it is now),  it says "that have be and will be".   Is either way correct? Why (not)?

I just wrote  in an ELL chat room. But looking at it (or more accurately, listening to my "inner voice" trying to "read it aloud"), I find it bothers me a lot.  A quick check on Google Books finds a claimed 432 written instances of , and 910 instances of , which suggests a significant minority of writers don't have a problem with the fact that the two different read's don't sound the same.  When I check the same construction with other verbs that don't have the same written form for past participle and present tense, it seems people nearly always include both (e.g. :1230, :8; :357, :7).  I'm not usually a big fan of "grammatical rules", but it seems to me there "ought" to be a rule that you shouldn't delete one instance of the verb unless it's "the same" as the one you're keeping. And it also seems to me that since language is primarily spoken, "the same" ought to mean "sounds the same when spoken", not "looks the same when written".  Can anyone who knows more than me about formal rules of grammar settle this one?    As an aside, offhand I can't think of any verb where the past participle and present tense sound the same but are written differently (maybe there aren't any), but would deletion be okay in that case?


I would like a output like bellow image. def print_list(lists):     for i in lists:         print(f"List{index()} = " + i)   fruits = ["apple", "banana", "cherry"] print_list(fruits)

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


My code is:  import array as arr  print("\t\t\tEnter Marks of the following subjects out of 100 :\n")  marks = arr.array('f')    for x in range(5):     marks.append(float(input("Enter marks of {0} subject : ".format(x+1))))  else:     print("Calculating...")  sum = float(0.0) for x in marks:     sum += x  print("Total Marks (Out Of 500) = ",sum)

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm new to c++ and I am creating a program to calculate the power of a number using recursion. After writing all the code, I'm getting an error:  Called object 'int' is not a function or a function pointer.   Here is my full code:  #include <iostream> using namespace std;   int power(int, int); int main(){  cout << "enter a number " << endl;   int no, power;  cin >> no;  cout << "enter a power" << endl;   cin >> power;  cout << "answer is " << power(no, power) << endl;     return 0;  }  int power(int number,int pow){ if (pow == 1){  return number; }else {   return number* power(number, pow - 1);  }   }   Since I'm new I don't know what this means.  Thanks in advance

class Test {        bool isVal() const {           return isVal;       }    private:        bool isVal; };   On Compiling this file it says      testClass.cpp:9: declaration of `bool   Test::isVal'      testClass.cpp:3: conflicts with   previous declaration `bool   Test::isVal()'   Although the same would work for java   class Test {    private boolean isVal;    public boolean isVal() {       return isVal;   }  }   Why does the compile error occur in C++ not in Java?


In Interstellar, the crew of the Endurance experience extreme time dilation (7 years to an hour) on Miller's planet, due to its proximity to a black hole. However, they only feel 130% of Earth's gravity when on the planet. How does a gravitational field powerful enough to create that kind of time dilation not also manifest as a huge physical force?

In the movie Interstellar, is the time dilation the team suffers on the water planet Miller caused by the proximity of the planet to Gargantua or by the planet's gravitational pull?  In the beginning I thought it was caused by the black hole, but later I was reading  and the guys said it was caused by the planet. Do we have some information about this?


Namely that the Flux of the electric field through any surface equals the charge enclosed/vacuum permittivity.  Without any coordinates or reference to axis.

On a similar note: when using Gauss' Law, do you even begin with Coulomb's law, or does one take it as given that flux is the surface integral of the Electric field in the direction of the normal to the surface at a point?


My house is next to a village from the Steve seed number. While I was digging in the well for diamonds I fell in lava and it took me in the middle of nowhere, now I can't get back to my house  When it's supposed to spawn me back to my house?

I wandered too far to go look for sheep and now I'm on a completely different island.  How do I find my way back to my house?


just started off with c++, and stackoverflow for that matter. any and help infinitely appreciated, apologies in advance if i ask something super dumb  I'm making a program to solve a problem. How many 8 digit numbers are divisible by 18 and are only comprised of the digits 1, 2 and 3. I can generate numbers, but when calling a function i made to use modulus to determine whether they're divisible by 18 or not, the function gives me the error in the title. my code is as follows:  main.cpp  #include <iostream> #include "functions.h" using namespace std;  int main() {     functions f();     for(int a = 1; a<4; a++){     for(int b = 1; b<4; b++){     for(int c = 1; c<4; c++){     for(int d = 1; d<4; d++){     for(int e = 1; e<4; e++){     for(int f = 1; f<4; f++){     for(int g = 1; g<4; g++){     for(int h = 1; h<4; h++){         int number = 10000000*a + 1000000*b + 100000*c + 10000*d + 1000*e + 100*f + 10*g + h; //generates 8 digit numbers, only using the digits 1 2 and 3         cout << number << endl; //prints numbers         int y = 10; //to test this bloody function         cout << f.modu18()(y); //returns 0 or 1 from func }}}}}}}}}   functions.h  #ifndef FUNCTIONS_H #define FUNCTIONS_H #include <iostream>  using namespace std;  class functions {     public:         functions();         string modu18(int x);     protected:     private: };  #endif   functions.cpp  #include "functions.h" #include <iostream>  using namespace std;  functions::functions(){      cout << "Functions initialised!" << endl; //to see if this thing is actually loading  }  string functions::modu18(int x){ //this is checking whether the number is divisible by 18     if(x % 18 == 0){         return 0;     }else{         return 1;     }; } //btw, using multiple files becuase i want to learn how to make this work for the future   The exact error returned when compiling is   request for member 'modu18' in 'f', which is of non-class type 'int'   I have no clue why this is saying this, all my data types are correct, for the data and the function types. send help pls Many thanks.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


hello guys. I'm having problem using render mode on blender on any file I've. The models are not displayed correctly on render mode, not on this file,the problem persist on any file. Cycles or Evee the problem persist Hardware specification GPU AMD Radeon (TM) R9 380 Series CPU Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz 4 Cores what could be causing this troubles?

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


There are disagreements between/among them(more than two people).  Should I use between or among in the sentence?

Today I was cut off in the middle of the following sentence:     Between Cook, Strauss, and Pietersen—   My friend said I was wrong. He said that for more than two entities, among/amongst are used, and that between is only for two entities.   I vaguely remember some rule like this, but I asked him to hear the whole sentence, which was:     Between Cook, Strauss, and Pietersen, they’ve notched up 56 centuries in Test cricket.   Should I have used among here? Seems correct to me to use between, but my friend was certain.   Another friend pointed out the following sentence:     I’m still choosing between Harvard, Yale, and MIT.    Certainly among doesn’t seem to fit here, and she, to me, was correct in using between.


I'm learning the Java language and am trying to do this:  public class IntegerPlusOne {     public static int addOne(int n) {         n = n + 1;         return n;     }     public static void main(String[] args) {         int n = 0;         addOne(n);         System.out.println(n);     } }   It should be printing "1", but instead it print zero. No matter what I set n equal to, the addOne function never changes it and I think the function is broke, but if I test it on its own it returns one more than whatever int I send to it which really confuses me.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I'm currently trying to automate some Video editing with ffmpeg. I have some videos with the AR of 9:16 and some with 16:9, and also different resolutions, problem is that ffmpeg stretches the 9:16, so it fits into 16:9 (1920/1080). What I want to achieve is that the Video still has its original "form". Examples are attached below. My current commandline: ffmpeg -f concat -i fl.txt -vcodec libx264 -s 1920x1080 -r 60 -strict experimental output.mp4  Thanks for helping! Strub3l e.g.

I have a html 5 video player which is 700px wide, 400px high. I'm trying to use avconv to use ffmpeg to resize (while retaining the aspect ratio) and making sure it fits into my player.  Input can be a file of any size, so I need to resize the larger ones but center the smaller ones with black bars. So far I've tried: -s and -aspect, I've seen pad being used with the -vf switch but don't understand how it works enough to get what I need.    This is a rough idea of what I need. I'm not sure if it's even possible. It's almost like CSS's max-width/max-height. I realise this may just be a jumble of words but if anyone happens to understand what I'm talking about, I'd appreciate help, Thanks.  avconv command:  avconv -y -i control.avi -vcodec libx264 -b 2000k -bufsize 20M -acodec aac -strict experimental -ar 44100 -ab 256k bigbuck_out.mp4


Assume $n$ is a Natural Number which satisfies the following 2 properties simultaneously:    $01$ . $(3n+1)$=$a$12 for some Natural Number $a$1. $02$ .  $(4n+1)$=$a$22 for some Natural Number $a$2.  Prove that $n$ is divisible by $56$.  For example, if we take $n$=$56$, we have $(3n+1)$=$169$=$13$2 and $(4n+1)$=$225$=$15$2.  I could prove that $n$ is a multiple of $4$ but coud not proceed any further.However my strategy was to prove that $n$ is divisible by 8 & then that $n$ is divisible by 7 because $G.C.D (7,8)=1$ and $L.C.M.(7,8)=56$.

Prove that if $n$ is a natural number and $(3n+1)$ & $(4n+1)$ are both perfect squares, then $56$ will divide $n$.   Clearly we have to show that $7$ and $8$ both will divide $n$.  I considered first $3n+1=a^2$ and $4n+1=b^2$. $4n+1$ is a odd perfect square.  - so we have $4n+1\equiv 1\pmod{8}$; from this $2|n$ so $3n+1$ is a odd perfect square.  - so $3n+1\equiv 1\pmod{8}$ so $8|n$ but I can't show $7|n$. How do I show this?  Thanks for the help.


Let $q: X \to Y$ and $r: Y \to Z$ be covering maps. Let $p=r \circ q$. Show that if $r^{-1}(z)$ is finite $\forall z$, then $p$ is a covering map.  $\textbf{My Attempt:}$  Let $U$ be an arbitrary open set in $Z$. Then $p^{-1}(U)=q^{-1}(r^{-1}(U))$. Since $r$ is a covering map, we know that $r^{-1}(U)=\bigcup_{i=1}^{N} V_i$ where $V_i$ is open $\bigcap_{i=1}^{N} V_i = \emptyset$.   Is the following true,  $q^{-1}(\bigcup_{i=1}^{N} V_i)=\bigcup_{i=1}^{N} q^{-1}(V_i)$ ?  Now since $q$ is covering for each $V_i$ we have that $q^{-1}(V_i)=\bigcup_{\alpha} K_{\alpha}^i$ where the $K_{\alpha}^{i}$ are all disjoint and open.   Then, $q^{-1}(\bigcup_{i=1}^{N} V_i)=\bigcup_{i=1}^{N}(\bigcup_{\alpha} K_{\alpha}^i)$.  So we just need to show that $\bigcap_{i=1}^{N}(\bigcup_{\alpha} K_{\alpha}^i)=\emptyset$ which is fairly straightforward.   I am not sure if this is the right way to go about this proof as I have not utilized the fact that the number of $V_i$ will be finite.   How do I use the fact that $r^{-1}(z)$ is finite?

This problem was posted before, but not the proof (because the asker knowed the answer), only a counterexample without the hypothesis of finite fibres.  I want to know how to prove this proposition:  Let $q:X\to Y$ and $r:Y\to Z$ be covering maps. Let's suppose that for each $z\in Z$ , the set $ r^{-1}(z)$ is finite, then the composition $p = r\circ q$ is also a covering map. Well I have to consider $z\in Z$ and show that there exist a neighborhood that is evenly covered by $p$, I know that there exist a neighborhood $U$ that is evenly covered by $r$, I think that this will be the desired neighborhood. First of all $ r^{-1}(U) = \cup_{i=1}^{n}  V_i $ (it's easy to see that the unions is finite using the fact that the fibres are finite and this is a local homeomorphism between the $V_i$) Then $ p^{-1}(U)=q^{-1} (r^{-1}(U) ) = q^{-1}(\cup_{i=1}^{n}  V_i)=\cup_{i=1}^{n}  q^{-1}(V_i) $ With $ q^{-1}(V_i) \cong V_i$ under $q$ and so $\cong$ U under $p$ I never used the fact that the preimage is finite, so my proof is obviously not correct, please help me with this


I have some problem here. Please look at my code and I don't know what's wrong in the code. It is simple but the results are confusing me. I attached the code below.  import numpy as np import matplotlib.pyplot as plt  def S(xc):     N=len(xc)     r=0.0     s=0.0      # calculation quartile     for m in range(0,N-1):         for n in range(m+1,N):             if (xc[m] > xc[n]):                 q=xc[m]                 xc[m]=xc[n]                 xc[n]=q      if (N % 4 < 2):         q=(xc[N-N/4-1] + xc[N-N/4])*0.5-(xc[N/4-1]+xc[N/4])*0.5     else:         q=xc[N-N/4-1]-xc[N/4]      #calculation standard deviation      for m in range(0,N):         r+=xc[m]         s+=xc[m]*xc[m]     r=np.sqrt(s/N-(r/N)*(r/N))      #calculation     if (q<r):         s=q     else:         s=r     hasil=0.9*(s/1.34)*pow(N,-0.2)     return hasil  fc=0.3 fm=0.02 mu=1 Nsim=10   bb=[] for nn in range(0,Nsim):     bb.append((1+(mu*np.cos(2*np.pi*fm*nn)))*np.cos(2*np.pi*fc*nn))  print bb print S(bb) print bb   The code works while I just delete the function of "S" in the main function, however, after the "S" function, the data on variable "bb" was different even though I just print the same variable. I don't understand what happened.  I appreciate your help. Thanks a lot  Alvin

I'm trying to understand Python's approach to variable scope. In this example, why is f() able to alter the value of x, as perceived within main(), but not the value of n?  def f(n, x):     n = 2     x.append(4)     print('In f():', n, x)  def main():     n = 1     x = [0,1,2,3]     print('Before:', n, x)     f(n, x)     print('After: ', n, x)  main()   Output:  Before: 1 [0, 1, 2, 3] In f(): 2 [0, 1, 2, 3, 4] After:  1 [0, 1, 2, 3, 4]


I have loaded Ubuntu 15.10 in place of Windows XP, but it is slow and hangs.  The laptop i have has Celeron M380 1.4Ghz 1GB ram and 160GB HDD. I would like to change to the lighter Lubuntu for a smoother operation, but I don't know how to do this.    I installed Ubuntu from a bootable disk but don't have a disk of Lubuntu so will have to download. What is the simplest method?

I dual booted ubuntu 11.04/11.10 a while ago with a USB stick and i want to uninstall it.   I would like to completely uninstall the old version and get 12.04.  I have a 64 bit laptop. Please help!


If $p$ is an odd prime then prove that there cannot exist a finite group $G$ such that ${\rm Aut}(G)\cong \mathbb{Z}_p$.  Can anyone tell me how to proceed in this question? Here is my attempt: If ${\rm Aut}(G)$ is cyclic then ${\rm Inn}(G)$ is also cyclic which implies $G/Z(G)$ is cyclic which implies $G$ is abelian. If $G$ is abelian then for $\phi \in{\rm Aut}(G)$ such that $\phi(g)=g^{-1}$. then $\phi(\phi(g)) = \phi(g^{-1}) = g$. Hence $\phi$ is of order $2.$ Hence the order of ${\rm Aut}(G)$ must be a multiple of 2 and hence cannot have prime order. Edit:- I cannot seem to proceed when $\phi$ becomes just the identity mapping. In that case every element of the group has order $2$ (except for the identity element of order $1$) .

Show that no group can have its automorphism group cyclic of odd order.   I have shown it only if $G$ is cyclic, but I could not do that if $G$ is not cyclic. Can you help?


I want to make a live USB of Windiws 8.1 to install on another system. Currently I am running Ubuntu 16 server. Are there any tools for making bootable USB like we have power ISO for windows?  I tried using "Startup disk creator". But when I select .iso image, it returns to main window. Are there any other tools?

Possible Duplicate:             I know there are a lot of tools to create a bootable usb for ubuntu with windows.  But I'm sure, that there was a possibility in the ubuntu installation directory. I used it some time ago, but I can't find it anymore :(  I think it was a .exe, or a .bat, any case a cmd window has opened, some things were executing and the usb was bootable. And it was in the ubuntu directory!  Is there still the possibility to do that? Does that file exist? I unfortunately can't remember.


Dueling network . Is there any way to play yu-gi-oh casually online now?   I used to like the ability to just make any deck and play casually, I am trying to see if anything took its place.

Anything fairly priced will also work. Any suggestions?


I'm a new DM and new to this forum! I'm running a game and one of my players is playing a ranger, we're all still pretty new to the game and ran into a question about how one of her spells, Hunter's Mark works. Here's what happened. We had a short combat in which the player cast Hunter's Mark on one of the guards. He and the other guards were all eventually killed and combat ended. The players then proceeded to finish sneaking into the house they were trying to break into. A few minutes later, the group ran into another set of guards. So here's where my question comes into play. Is her former Hunter's Mark still active? I thought no, since she did not mark a new Hunter's Mark target "on a subsequent turn of yours," since the original combat had ended and we had therefore left turns. She thought it was still working, since the duration of the spell is one hour, and that hadn't passed yet. Thanks for your insight!

I'm looking to play a ranger. The Hunter's Mark spell says:     If the target drops to 0 hit points before this spell ends. you can use a bonus action on a subsequent turn of yours to mark a new creature.   Does that mean I can keep marking a new enemy each time the last one dies until the hour's up?


I chose objects colour, then fixed its value using i key.    But the colour property was bind globally for the object. It effects all the object's actions. How can I make colour change for a single action, just like rotation property?

I tried to add keyframes for the emission value of a material to an action, but couldn't find out how.   Adding keyframes for a object's location works as expected but properties like emission only show up in the Timeline and Curve Editor.  A MaterialAction is created (only visible in the NLA Editor) toggling to edit mode Tab the keyframes are displayed in the time line. This MaterialAction is not accesible from the Action Editor.    EDIT:  Fweebs suggestion to use a driver works unfortunatly only in the 3D-Viewport but not in the BGE. I didn't ask specifically for the BGE because I was hoping for a common solution that works everywhere.      .blendfile


I have the following code in C++:  struct vec3d {     float x, y, z; };  struct triangle {     vec3d p[3]; };  struct mesh {     vector<triangle> tris;      bool LoadFromObjectFile(string sFilename) {         return true;     } };   How could I translate this into Java?  Would I use classes for that? So in order to group multiple vec3d in a triangle :  public class vec3d   {     float x, y, z; }  public class triangle   {        vec3d[] p = new vec3d[3]; }

Is it completely against the Java way to create struct like objects?  class SomeData1 {     public int x;     public int y; }   I can see a class with accessors and mutators being more Java like.  class SomeData2 {     int getX();     void setX(int x);      int getY();     void setY(int y);      private int x;     private int y; }   The class from the first example is notationally convenient.  // a function in a class public int f(SomeData1 d) {     return (3 * d.x) / d.y; }   This is not as convenient.  // a function in a class public int f(SomeData2 d) {     return (3 * d.getX()) / d.getY(); }


I have tried installing Grails using the answer found at  : sudo add-apt-repository ppa:groovy-dev/grails   sudo apt-get update sudo apt-get install grails-ppa  The first command returns without errors: $ sudo add-apt-repository ppa:groovy-dev/grails  Grails is an advanced and innovative open source web application platform that  ...  More info: https://launchpad.net/~groovy-dev/+archive/ubuntu/grails Press [ENTER] to continue or ctrl-c to cancel adding it  gpg: keyring `/tmp/tmpt59mo9/secring.gpg' created gpg: keyring `/tmp/tmpt59mo9/pubring.gpg' created gpg: requesting key 02A9EC29 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpt59mo9/trustdb.gpg: trustdb created gpg: key 02A9EC29: public key "Launchpad PPA for Groovy Developers" imported gpg: Total number processed: 1 gpg:               imported: 1  (RSA: 1) OK  But the update command fails: $ sudo apt-get update ... Err http://ppa.launchpad.net saucy/main amd64 Packages   404  Not Found Ign http://ppa.launchpad.net saucy/main Translation-en_US Ign http://ppa.launchpad.net saucy/main Translation-en W: Failed to fetch http://ppa.launchpad.net/groovy-dev/grails/ubuntu/dists/saucy/main/binary-amd64/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.  Any idea why the ppa update fails with a 404 error?

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


Most Electric cars these days      use  Brushless        DC Motors. However recently someone told  me that Tesla cars use Induction motor (AC) instead? Why is it so?  Are        DC Brushless      Motors feasible compared to Induction motor?

I was just watching a mega factory video and wondered why they use an AC motor which requires a power inverter instead of DC which may be powered directly from their DC battery? Introducing an inverter means more cost (weight, controller, etc).  Are there any reasons for that? What are the differences between an AC and DC motor that may have lead to this decision? Also does anyone know what kind of motor is used in other electric cars?


This picture is on my windows 10. I would like to know where it is.  thank you

Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.


Where is Grub boot loader installed on the computer?  As after removing the ubuntu partition from a dual boot system, Grub is still launched by default. So it couldn't be installed in the partition where Ubuntu is stored.

Where is the boot loader, such as Grub, installed generally?   When I install 12.04 along side Windows on different partitions of my disk, I encountered a choice for "Device for boot loader installation". If I understand it correctly, it is to specify where to install the boot loader Grub,  I found on the internet that it is to specify the disk that contains the partitions for the OS, not any partition on the disk. E.g. disk sda, not partition sda1, sda2.  Questions:  I wonder where the boot loader installed actually on the disk?  Is it installed on any of the existing partitions for the OSes and for personal data, or does it have its own partition, which is also visible e.g. from system monitor of Ubuntu?  Thanks and regards!


According to , most words ending in -o take the regular -s plural, but some take the -es plural. For example, these take -s:   photo / photos zero / zeros avocado / avocados   But these take -es:   potato / potatoes tomato / tomatoes torpedo / torpedoes   Most sites suggest that there is no rhyme or reason and that English Language Learners simply need to memorize which take which (although some words like 'halo' admit both pluralizations).  Other sites suggest that -o words that take -es have something to do with life. For example, 'potato' has something to do with life. Is the explanation acceptable? If not, can anyone provide an alternate explanation?

The following words and their plurals seem to be somewhat inconsistent:   combo / combos concerto / concertos grotto / grottos / grottoes (?) hero / heros (?) / heroes potato / potatos (?) / potatoes tornado / tornados / tornadoes tomato / tomatos / tomatoes volcano / volcanos / volcanoes   Is there a common source for -s versus -es? With regards to words such as "heros", is it likely to see more words start dropping -es in favor of -s?  (If you have any other good examples of strange plurals from words ending in "o" feel free to edit them into the question.)


I have a multi distro laptop (Ubuntu MATE / Mint Cinnamon / Debian) (32-bit Inspiron 6400 2Gb ram 320GB WD HDD) that ignores the alleged limit of 4 primary partitions. I have 15 and counting.   I'm new to modern Linux and am having a play. I last had a play back in the 90s with GNU Slackware I also have an old Acer 64-bit desktop which will only allow 4 primary partitions. I might try loading another 2 distros on to see if the 5th one boosts. Any ideas why this one machine allows over 4 primary partitions and the other does not?

I want to triple boot Windows 7, Backtrack, and Ubuntu. Windows and Backtrack are already installed. The problem is that both of them take 4 partitions: 3 for Windows, and 1 for Backtrack. When I try to make another partition, it says I can't have over 4. How can I install Ubuntu with this problem? Note: The 3 Windows partitions are PQSERVICE, SYSTEM RESERVED, and eMachines. I don't really know if I can delete one.


I'm looking for a fairly old (probably 70s or earlier) story where the main character, who is possibly homeless or doesn't have much money, is approached on the street by an unidentified man who offers him money to sign a document signing over mineral exploitation / fishing rights for the Earth & Moon.    He's not sure if it's a serious offer, and space law really works that way or not, or if it's just a gag.  In the end he's still unclear about whether or not he's permanently changed the interstellar legal status of Earth.

Sci fi story from the 1950s:  In New York, a man in a trenchcoat approaches and offers to buy planets.  The man selling eventually "sells the earth".  The buyer says write me a bill of sale and put "in my official capacity" on it.  After signing, the seller remembers that he sometimes sells surplus property for the UN.  He tries to buy the earth back.  The buyer admits he is an alien and needs to buy parts for his crashed spacecraft.  The seller takes all the money and buys the parts for the alien, who tears up the bill of sale.


This is a homework question so I'll show what I've tried.  The integral test gives convergence, but I have to use $tanh$, which is not part of our high-school syllabus.  I've tried doing the limit comparison test with $\frac{1}{n}$ and $\frac{1}{n^2}$ both of which give zero as the limit.  D'Almbert's criterion is also inconclusive.

So I need to know the convergence of this sum. The integral test does not seem to work (WolframAlpha gives a confusing answer which implies it's not the correct method). I also tried the limit comparison test for various harmonic series, but they are all inconclusive. I'm also not getting very far with the ratio test. $$ \sum_{n=2}^\infty \dfrac{\sqrt{n+1}}{n(n-1)} $$


I set up two asterisk servers (on Fedora) in different networks. My goal is to make a call from softphone (on windows lite with ip: 192.168.20.3) to the asterisk server 2 which is in the other network (ip:192.168.10.2). Actually the softphone on windows can register with asterisk 2 which is in the same network (ip:192.168.20.2). But the problem is in registration between the two asterisk servers.     Architecture:        IAX.conf in Asterisk server 1:   [general] autokill=yes register => zone1:welcome@192.168.20.2  [zone2] type=friend host=dynamic trunk=yes secret=welcome context=incoming_zone2 deny=0.0.0.0/0.0.0.0 permit=192.168.20.2/255.255.255.0      IAX.conf in Asterisk server 2:   [general] autokill=yes register => zone1:welcome@192.168.10.2  [zone1] type=friend host=dynamic trunk=yes secret=welcome context=incoming_zone1 deny=0.0.0.0/0.0.0.0 permit=192.168.10.2/255.255.255.0      extensions.conf in Asterisk server 1   [general] autofallthrough=yes  [phones] include => internal include => remote  [internal] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(SIP/${EXTEN}) exten => _5XXX,n,Hangup()  [remote] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(IAX2/zone2/${EXTEN}) exten => _6XXX,n,Hangup()  [incoming_zone2] include => internal      extensions.conf in Asterisk server 2   [general] autofallthrough=yes  [phones] include => internal include => remote  [internal] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(SIP/${EXTEN}) exten => _6XXX,n,Hangup()  [remote] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(IAX2/zone1/${EXTEN}) exten => _5XXX,n,Hangup()  [incoming_zone1] include => internal      Registration problem : Timeout     NOTES:   PING between the two networks is ok  There is no NAT Firewall on servers was turned off On routers, I create an ACL with 'PERMIT ANY' for each interface

I set up two asterisk servers (on Fedora) in different networks. My goal is to make a call from softphone (on windows lite with ip: 192.168.20.3) to the asterisk server 2 which is in the other network (ip:192.168.10.2).   But the problem is in registration between the two asterisk servers which are behind NAT.  NAT IP for Asterisk Server 1: 100.100.100.100 NAT IP for Asterisk Server 2: 200.200.200.200     Architecture:        IAX.conf in Asterisk server 1:   [general] autokill=yes externip=100.100.100.100 localnet=192.168.10.0/255.255.255.0 nat=yes register => zone1:welcome@200.200.200.200  [zone2] type=friend host=200.200.200.200 trunk=yes nat=yes qualify=yes secret=welcome context=incoming_zone2 permit=0.0.0.0/0.0.0.0      IAX.conf in Asterisk server 2:   [general] externip=200.200.200.200 localnet=192.168.20.0/255.255.255.0 nat=yes autokill=yes register => zone1:welcome@100.100.100.100  [zone1] type=friend host=100.100.100.100 trunk=yes nat=yes qualify=yes secret=welcome context=incoming_zone1 permit=0.0.0.0/0.0.0.0      extensions.conf in Asterisk server 1   [general] autofallthrough=yes  [phones] include => internal include => remote  [internal] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(SIP/${EXTEN}) exten => _5XXX,n,Hangup()  [remote] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(IAX2/zone2/${EXTEN}) exten => _6XXX,n,Hangup()  [incoming_zone2] include => internal      extensions.conf in Asterisk server 2   [general] autofallthrough=yes  [phones] include => internal include => remote  [internal] exten => _6XXX,1,NoOp() exten => _6XXX,n,Playback(hello-world) exten => _6XXX,n,Dial(SIP/${EXTEN}) exten => _6XXX,n,Hangup()  [remote] exten => _5XXX,1,NoOp() exten => _5XXX,n,Playback(hello-world) exten => _5XXX,n,Dial(IAX2/zone1/${EXTEN}) exten => _5XXX,n,Hangup()  [incoming_zone1] include => internal      Registration state: Rejected     NOTES:   PING between the two networks is ok  Firewall on servers was turned off


I have a large file containing 400K rows.  I have to select rows between 45,000 to 50,000.  I know I can write a have program and keep counting the rows and then select the lines between the interval.  However, would love to know is there a way from doing in command line in the shell?

Say I have a huge text file (>2GB) and I just want to cat the lines X to Y (e.g. 57890000 to 57890010).  From what I understand I can do this by piping head into tail or viceversa, i.e.   head -A /path/to/file | tail -B   or alternatively  tail -C /path/to/file | head -D   where A,B,C and D can be computed from the number of lines in the file, X and Y.  But there are two problems with this approach:   You have to compute A,B,C and D. The commands could pipe to each other many more lines than I am interested in reading (e.g. if I am reading just a few lines in the middle of a huge file)   Is there a way to have the shell just work with and output the lines I want? (while providing only X and Y)?


In finite dimensional vector spaces, orthonormality is defined as $\langle x_i|x_j \rangle=\delta_{ij}$ and the completeness relation is given simply by $$I = \sum_i |x_i\rangle\langle x_i|.$$  To me, the most obvious extension of this finite dimensional case to infinite dimensions is to keep orthonormality as $\langle x|y \rangle=\delta_{xy}$ (where $x$, $y$ are real), while the completeness relation becomes $$I = \sum_{i=1}^{\infty} |x_i\rangle\langle x_i| = \int |x\rangle\langle x|.\qquad(\ast)$$  Now in quantum mechanics, orthonormality of basis vectors $|x\rangle$ and $|y\rangle$ in an infinite dimensional vector space is usually defined as $\langle x|y \rangle=\delta(x-y)$, while the completeness relation is given by $$I = \int |x\rangle\langle x| dx.$$  It seems to me, however, that my extension of orthonormality and completeness to infinite dimensions is equivalent to the usual extension.  As a demonstration that my version of completeness is consistent with my definition of orthonormality, let $| f\rangle$ be some arbitrary linear combination (integral) of basis vectors $|x\rangle$: $$|f\rangle = \int f(x) |x\rangle dx.$$ Applying my version of the completeness relation to it: \begin{align} \int |x\rangle\langle x|f\rangle &= \int |x\rangle\langle x|\left(\int f(y) |y\rangle dy\right)\\ &= \int\int f(y)|x\rangle\langle x|y\rangle dy\\ &= \int\int f(y)|x\rangle\delta_{xy} dy\\ &= \int f(y)|y\rangle dy\\ &= |f\rangle \end{align} so equation $(\ast)$ does work as the completeness relation.  Is there anything wrong with defining things this way? If not, then why is the usual definition of orthonormality and completeness preferred?

I have an infinite basis which associates with each point, $x$, on the $x$-axis, a basis vector $|x\rangle$ such that the matrix of $|x\rangle$ is full of zeroes and a one by the $x^{\mathrm{th}}$ element. The book on Quantum Mechanics by Shankar says that the inner product between a basis vector and itself is not one, why not? Why can't these basis vectors be normalized to one, only to the ?


I have been using the default style for section and subsection titles. I want to make some adjustment when needed.  For example, right now, my titles for both a section and a subsection are appearing in bold letters. How shall I change titles for only subsections from bold to unbold? Thank you.

How do I specify the fonts, and general font size, for the titles, chapters and sections in my document  Update:  I can see how my question is confusing.  I use \section and \chapter etc. to organise my document, and I would like to change the way the section and chapter titles are displayed.


function create(){     var ret=new Array();     for(var i=0;i<10;++i){         ret[i]=function(){return i;};     }     return ret; }; var a1=create(); console.log(a1[2]());   The code above will print "10".  I know the inside "create()", the variable "i" in for loop, has execution context of "create()", so the 10 elements of "ret" are all functions that will return "10". So inside "create()", ret2 will return 10. No problem.  But outside "create()", there's no more "i". If I try "console.log(i)" it will give exception like below:  console.log(i);             ^  ReferenceError: i is not defined   Why, closure can still visit "i" as a reference, while outside blocks cannot? The life cycle of "i" is ended!

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


$E(X) = np$ if $X$ is a binomial random variable is the statement I have to prove.   The definition of a binomial random variable tells us that $$P(X=h) = {n \choose k}p^h(1-p)^{n-h}$$  And the definition of expectation for a random variable defined on a sample space $(S,P) $ is $$E(X) = \sum_{a\in \mathbb{R}}aP(X=a)$$  So using that definition I calculate $$0{n\choose 0}p^0(1-p)^{n} + 1{n\choose 1}p^1(1-p)^{n-1}+2{n\choose 2}p^2(1-p)^{n-2}+...+n{n\choose n}p^n(1-p)^{0} = \sum_{k=0}^nk{n\choose k}p^k(1-p)^{n-k}$$  So applying the binomial theorem (with $x=p-1$ and $y=p$) seems obvious, since the binomial theorem says that $$\sum_{k=0}^n{n\choose k}y^kx^{n-k} = (x+y)^n$$  But I can't seem to reconcile this with the result I was trying to prove, which at this point would be proved if I could show that $$\sum_{k=0}^nk{n\choose k}p^k(1-p)^{n-k} = np$$   Does anyone have any hints or ideas as to where to go from here?

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


Is it true that the only proper subfield of $\mathbb C$ , which is path connected as a subset of $\mathbb C$ , must be $\mathbb R$ ?   NOTE : The answer to this   indicates the claim stated is true . But the answer there only gives a reference and no proof ( or outline of proof) of the result , and the paper cited is highly technical . I would like to see if there is any elementary ( at least more elementary than the cited paper if possible ) proof .

The ring of continuous functions on $[0,1]$ to $\mathbb{R}$ has an interesting property:      every maximal ideal of this ring is the subset of all functions vanishing at a common point.    If we follow the argument in the proof of this property, it can be seen that $\mathbb{R}$ can be replaced by $\mathbb{C}$ and still similar property holds for new ring (we have to slightly modify argument).   What if we place $\mathbb{Q}$? Here $\mathbb{Q}$ is disconnected with induced topology from $\mathbb{C}$ and so the only continuous function from $[0,1]$ to $\mathbb{Q}$ are constant (am I correct?). So, the property no longer holds true with replacement of $\mathbb{R}$ by $\mathbb{Q}$.  Question: Are there subfields of $\mathbb{C}$ other than $\mathbb{R}$ which are connected as topological spaces with induced topology from $\mathbb{C}$?


I'm trying to import a bunch of models from OBJ files (with their MTL files) to a blender scene that I have. When using Blender Render the materials and textures are imported successfully. But when using Cycles Render the material names are imported, but not their actual data.  This behavior is also noted by   Is there a workaround for this? I prefer to use Cycles for my rendering (for using GPU devices, and node control).

I've downloaded & imported several .OBJ models into Blender but they don't always import with the textures automatically in place, even though the model came with them. Here's an example:   I assume this is due to the presence of an .MTL file, but I don't know for sure.


I make computers for a not-for-profit organisation.  I don't want anyone to plug a keyboard / mouse / screen into it and be able to do anything on it.  So there is a locked screen at launch, but you can still access TTY with Ctrl+Alt+F1  How can I disable all TTY command lines, or the Ctrl+Alt+F1 shortcuts? (so F1, F2, F3 ... F6)

How do I disable switching to virtual terminals (TTYs) using(Ctrl+Alt+F1...F6) in  Ubuntu?


some user inputs to assign values to the query.   $builder_name    = $_POST['name'];     $builder_city    = $_POST['city'];     $builder_address = $_POST['address'];     $builder_contact = $_POST['contact'];     $builder_fax     = $_POST['fax'];   i have this insert query in my script .  $query = "INSERT INTO builders SET builder_name='".$builder_name."', builder_city='".$builder_city."',builder_address='".$builder_address."',builder_phone='".$builder_contact."',builder_fax='".$builder_fax."',builder_logo='".$targetfile."'";      i want to secure it with prepare statement.so how can i ?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Build Race: Variant Human (feat: Metamagic Adept) Class: Sorcerer (Shadow) Metamagic adept feat:  (...)You gain 2 sorcery points to spend on Metamagic (these points are added to any sorcery points you have from another source but can be used only on Metamagic). You regain all spent sorcery points when you finish a long rest.  So I gain 2 sorcery points that I can use only on metamagic. Examples: Subtle spell 2 times or Quickened spell one time. Then after doing that: my sorcery points are now at 0 Can I then use spell points (or spell slots if you don't use this variant) to simply regain 1-2 sorcery points? Sidenote Just by curiosity, if the above is allowed and there are other uses because of a racial ability or variant somewhere, can the newly acquired sorcery points be used for anything else than metamagic? (I'm assuming there might be such an ability somewhere)

I have a warlock tiefling for which I am considering to choose the feat Metamagic Adept from Tasha's Cauldron of Everything. This will get me 2 sorcery points to spend.  Looking at the sorcery point system, I believe I could spend these 2 sorcery points to regain one 1st-level spell slot, since a warlock only has a few of these. I imagine this would be helpful. However this is not stated in the feat specifically, only to use two Metamagic options. Is there a source that mentions something about the feat that one could exchange the 2 sorcery points into spell slots as well? Or would someone rule it as possible?  If I understand correctly, as a warlock I could only cast spells at a certain level. The reason I am asking is related to the question above. If I am returning 2 sorcery points and get a 1st-level spell slot back. That would be great at lower levels I think. Since a warlock as of 3rd level could only cast spells from level 2, a warlock starting from level 5 casting level 3 spells, etc. Meaning I (most likely) wouldn't prepare a 1st level spell at higher levels. Could I exchange 2 sorcery points for a 1st level spell, but then cast it at a higher level spell since I am a warlock, or is that the reason why the answer to question 1 would be no?   Below the information on sorcery points (Flexible Casting) and the Metamagic Adept feat. Metamagic Adept feat:  You’ve learned how to exert your will on your spells to alter how they function. You gain the following benefits:  You learn two Metamagic options of your choice from the sorcerer class. You can use only one Metamagic option on a spell when you cast it, unless the option says otherwise. Whenever you gain a level, you can replace one of your Metamagic options with another one from the sorcerer class. You gain 2 sorcery points to spend on Metamagic (these points are added to any sorcery points you have from another source but can be used only on Metamagic). You regain all spent sorcery points when you finish a long rest.   Flexible Casting:  You can use your sorcery points to gain additional Spell Slots, or sacrifice Spell Slots to gain additional sorcery points. Creating Spell Slots. You can transform unexpended sorcery points into one spell slot as a Bonus Action on Your Turn. The created Spell Slots Vanish at the end of a Long Rest. The Creating Spell Slots table shows the cost of Creating a Spell slot of a given level. You can create Spell Slots no higher in level than 5th. Any spell slot you create with this feature vanishes when you finish a Long Rest.


I've read similar posts, but I didn't understand if that is indeed true. For some continuous random variable $X$: $$E\left[\left(X-E\left[X\right]\right)^{2}\right]=0\implies P\left(\left(X-E\left[X\right]\right)^{2}\neq0\right)=0\implies\left(X-E\left[X\right]\right)^{2}=0\text{ a.s.}$$ so $$E[X] = X\text{ a.s.}$$ But does that imply $X=const$?

We know that the variance of a constant is $0$. Is the converse also true? Can we say that if the variance of some random variable is $0$ it is a constant?


I would like to teach a class on the "magic" behind the calculator, so I would like to generate a list of "algorithms" for how a calculator computes the things we want it to. I will get the ball rolling:   Addition and subtraction is done via binary addition and subtraction. Logarithms and exponentiation is done via Taylor series. I'm not too sure about multiplication and division, do calculators do binary multiplication or do they use logarithms?   I hope that teaching students the mathematics behind the calculator would trigger a reaction everytime they use one in the future.

Does there exist a good reference on the algorithms used by calculators, especially on the trigonometric and transcendental functions?  I would still like to know how Casio generates its random numbers. I still wonder if they are any good.


Can someone tell me a command that will find my external ip for a freebsd 10 system.

I need to find my external IP address from a shell script. At the moment I use this function:   myip () {      lwp-request -o text checkip.dyndns.org | awk '{ print $NF }' }   But it depends on perl-libwww, perl-html-format, perl-html-tree installed. What other ways can I get my external IP?


The answer might be clear, but to me it's not.   Recently I exaggerated a bit with the code formatting using the ` sign. While other see rivers, when used to often, I like it for it suppresses scrollbars on over length oneliners which I consider to be unpleasant. But my main point is: Words which tend to step out of the text semantically I tend to format as code.  For instance in     I have .ui, .py and .pyc files generated. Now, when I edit the .py file, how will it [...]   I'd highlight those .** endings, cause this way while reading it indicates something like: now-comes-an-identifier. Do you know what I mean? Note that concerning this example I'd treat PDF or HDF differently, because the capitals already fulfill that function.  I'd like to have a quick feedback on whether I strictly should stick to use "`" for code only or whether there is a "gray area".

I have done some reviews of new user's questions recently,  and I noticed that most of these posts do not use inline code spans (e.g., "the main() method", "the HelloWorld class") - the things formatted with backticks (`).  Does SO have a page/question where you can redirect someone to explain what the inline code spans are, and how they should be used (preferably with examples)?  I found this question:  There is a good answer there which says that  inline code spans should be used for "code and code-like artifacts". However, that question is about a different thing, and many people may still wonder what a code-like artifact is. For instance, file names or fragments of a log file are often formatted as inline code spans, but they, probably, cannot be called "code-like artifacts". There are other examples that may look confusing.  In other words, many programming books have a typographical conventions section which explains how the book uses special text styles. Does SO have something similar which explains the use of the inline code spans?


I apologize if this is trivial but I have not been able to figure it out.  For a curve $\sigma(t)$, I have a definition for arc length:  $$s(t)=\int_{t_0}^t |\sigma'(t)|dt$$  We reparameterize a curve $\sigma$ by observing that $s$ has an inverse, $t(s)$, and the resulting reparameterized curve has underlying assignment $s \mapsto t \mapsto \sigma(t)$.  A curve is a unit speed curve if  $$\forall t\qquad |\sigma'(t)|=1$$  Thanks

Prove that for any piecewise smooth curve it is possible to find the parametrisation $\phi$ that is consistent with its length, ie.  length of a curve segment between $\phi(a)$ and $\phi(b)$ is equal to $|b-a|$.  It seems intuitive, but I don't have any idea how can I show this in the formal way.


I need regex   1) [A-Z][a-z][0-9] Must include uppercase & lowercase letters, numbers & special characters (except + and -).  2) Not more than 2 identical characters in a sequence (e.g., AAxx1224!@ or Password@123 or Google#12 is not acceptable).  I have tried this but dont know how to check 2 identical characters.  ^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^%*()!&=]).*$

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


Can I use junk for any specific need? Can I assign junk items to a dweller?

I'm pretty new to this game and probably missing something really obvious, but I can't figure out how to use junk. That microscope would probably be useful in the medical bay, for example. What do I press to make it go?