Why does CTR mode XOR the plaintext into the output of the block cipher rather than XORing the plaintext into the input of the block cipher?

As I understand it, CTR mode essentially turns a block cipher into a stream cipher like so:          _______________        |       |       |        | nonce |   i   |        |_______|_______|                |         _______V_______        |               |        |  block cipher | key -->|  (encryption) |        |_______________|                |                V plaintext --->(+)---> ciphertext   But by turning it to a stream cipher, one must be very careful not to reuse a nonce.  It seems like it would be safer to do it like this:          _______________        |       |       |        | nonce |   i   |        |_______|_______|                | plaintext --->(+)                |         _______V_______        |               |        |  block cipher | key -->|  (encryption) |        |_______________|                |                \---> ciphertext   While it still would be unwise to reuse a nonce, it seems like the effects would be less devastating if it were misused in this way.  I see one main disadvantage, and that's that with the first formulation, only the encryption part of the block cipher need to be implemented, whereas with this second formulation, both encryption and decryption need to be implemented.  My questions are:   Does this latter mode of operation have a name? Are there any obvious weaknesses in this latter mode? Are there any other reasons why CTR is defined the first way?


Do animals exhibit handedness (paw-ness?) preference?

I have been observing my cat and found that when confronted with an unknown item, she will always use her front left paw to touch it.  This has me wondering if animals exhibit handedness like humans do? (and do I have a left handed cat?)  One note of importance is that with an unknown item, her approach is always identical, so possibly using the left paw means allowing a fast possible exit based on how she positions her body.  This question is related to . However, I question the "paw-ness" as a consequence of how the cat is approaching new items (to be ready to flee), whereas the other question remarks about the high number of "right-pawed" dogs and questions the influence of people for this preference.


Query to fetch second highest salary from table

How to write a query to fetch third highest salary from table? cid  salary --- ------ 1    15000 2    20000 3    7000 4    35000 5    60000


My site has one IP. They set for me tww records into DNS servers: www.mydomain.com    -->  admin.mydomain.com  -->   My apache httpd.conf reads as follows:  ... ServerName www.mydomain.com:80 DocumentRoot "/home/somewhere/www"  NameVirtualHost <IP A>:80  <VirtualHost <IP A> >     ServerAdmin webmaster@mydomain     DocumentRoot /home/somewhere/www/admin     ServerName admin.mydomain.com  </VirtualHost>   Now, if I type www.mydomain.com or admin.mydomain.com I get the same page, i.e. the main server. The nslookup command shows that both www.mydomain.com and admin.mydomain.com point to IP A. Any help?


Show page number of chapter and as a “percent complete” in LaTeX

I want to show in the page foot the current progress of the current chapter in book mode in LaTeX document. For example, if the chapter contains 200 pages, then I want the foot to show 11.5% in the page 23 (of chapter).  Thanks for help. Regards,


NPCs not moving in in Terraria iOS, despite all room conditions being met

Now I have been on plenty of websites but none seem to answer my problem, my NPCs won't move in, I have my layout identical each side but the right side of my house the NPCs won't movie in... I've checked that it's not day, the NPC is requesting to settle down, I am not being invaded so what is it?


How to tell what method was used to log in (Password vs. Keyfile) from the bashrc

Is there a way how you can check what auth method the user which just logged in to an account were using?  I like to print out a warning after login if someone is using a password instead of a keyfile.  Sure one solution is to check the ssh-logs. But is there a nicer way to do this? Since looking up logs could impact performance depending on the log size and method you use to gather this information.  We are using SUSE and Ubuntu.


Is it possible to migrate one Stack Exchange account to another?

Is it possible to migrate a Stack Exchange to another? I have a private Google account and one for school business. Now, I'd like to migrate my personal one to my school account, so I can all use it for the same purpose. Is this possible? If so, how?


Ive been advised that i should install Debian 8 using the following raid configuration:  Raid 1 (2 discs) - for OS Raid 5 (4 discs) for data.  This way, i can have 2 disc failures and still have a running system.  The question i have is, on the Debian 8 installer, it asks where i want to mount certain directories.  What i need to know is what folders i need to mount on which raid array.  When using guided partitioning, it states that /tmp /var and /home directories should be separate partitions, however what do i need to mount where so that the Raid 1 array contains just the OS and the Raid 5 array contains everything else?  Please advise.


Code coverage issue RecordType.Name required

I am trying to fetch the RecordType.Name in a list, but my list doesn't has the value displayed. Please find below the block of code and the list 'clist' where I need the RecordType.Name This is in a test class. Id RecordTypeIdCase = Schema.SObjectType.case.getRecordTypeInfosByName().get('Core eG@r Case RecType').getRecordTypeId(); case cs = new case (Type='Warranty Support',EmailContactDealer__c='test@gmail.com', Origin='RENAULT SITE', AccountId=Acc.Id, ContactId=Acc.PersoncontactId, Status='New', Description='Trigger test clas', CountryCase__c='Argentina',RecordTypeid = RecordTypeIdCase); insert cs; List<RecordType> RTList = [SELECT Id, Name,DeveloperName FROM RecordType WHERE Id = :RecordTypeIdCase];             System.debug('$&$&$& RecordType RT:' + RTList);             System.debug('$&$&$& Case ID:' + cs.Id);             System.debug('$&$&$& Case RTID:' + cs.RecordTypeid);             System.debug('$&$&$& Case RT:' + cs.RecordType.DeveloperName);              List<Case> cList = [SELECT Id,Type,RecordTypeid,RecordType.Name FROM Case WHERE Type = 'Warranty Support' AND RecordType.Name = 'Core eG@r Case RecType']; System.assertEquals(cList.size(), 1);


exception while creating arrays of Arraylist

I have java program like this   public class Distribution {      private LinkedList<Integer > group[];          public Distribution() {         group[0] = new LinkedList<>();         group[0].add(1);         group[0].add(2);         group[0].add(3);          group[1] = new LinkedList<>();         group[1].add(4);         group[1].add(5);         group[1].add(6);     }      public static void main(String args[])     {         Distribution distribution = new Distribution();     } }   but the compiler says Exception in thread "main" java.lang.NullPointerException.


What does *say* mean in "Say, could you bring us the knife?"?

What is the meaning of say in the following sentence:     - Say, could you bring us the knife?   - Knife?   - Yeah. Thank you.        (12 Angry Men, 1957)   I can guess that it is some kind of filler word (I don't think filler is the right word). But, I couldn't find anything on the web. Can you give some reference about this kind of usage?


Generate random number with constraint in java

I need to generate a random integer with Java but random in a one sided bounded specific range. For example, a range from 15+ means that the only constraint is that the lowest value the integer can take is 15.


How to convert a datetime text into datetime object in Python?

I want to convert a datetime string to datetime object which will be further processed to display in a different format.  The string is in the for, 2018-04-24T16:42:17Z.  I have tried the following method but it gives error.  import datetime datetime.datetime.strptime('2018-04-24T16:42:17Z', '%b %d %Y %I:%M%p')   Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "D:\Python\lib\_strptime.py", line 510, in _strptime_datetime     tt, fraction = _strptime(data_string, format)   File "D:\Python\lib\_strptime.py", line 343, in _strptime     (data_string, format)) ValueError: time data '2018-04-24T16:42:17Z' does not match format '%b %d %Y %I:%M%p'   Please help.


How to pronounce fractions with denominators larger than 20 where the last digit of the denominator is 1 or 2? eg 4/31

Disclaimer: I speak British English.  I've noticed a lot of differences between the way Americans and Brits pronounce numbers.1  Since the question concerns this, I thought it might be appropriate to draw attention to it case we inadvertently confuse each other.  My question is not about these differences, I just wish to highlight them in case they cause confusion.  1. You seem to happily call a quarter "a fourth" sometimes, we always call 131 "one hundred and thirty one", we pronounce double digits in phone numbers like 12449 as "one two double four nine", and I think we are much more likely to use expressions like "thirteen hundred" to mean 1300.    Question  When talking about fractions, I have frequently heard  1/2    a half 1/3    a third 1/4    a quarter 1/8    an eighth 1/64   a sixty fourth 1/56   a fifty sixth   etc.  Essentially the rule seems to be that, except for "a whole", "a half", and "a quarter", the word matches the ordinal number; that is to say:      Numeral       Ordinal         Fractional     one           first           whole     two           second          half     three         third           third     four          fourth          quarter     five          fifth           fifth     six           sixth           sixth     fifty-seven   fifty-seventh   fifty-seventh  Even though 1/4 is a quarter, 1/64 is a sixty-fourth.  So what’s 1/62?  A  sixty-twoth?  A sixty-second? Surely not a sixty-half!  I know that simply saying one over sixty-two can usually work, but I'm asking specifically for the word itself, i.e.  if I divide a huge pizza into 21 pieces, what are the pieces?  Other than baker’s twentieths.  Summary: Can anyone point me to any sources (whether style guides or common usage studies or anything else) that discuss the pronunciation of fractions; specifically one that discusses this separately from ordinal numbers, rather than how to form ordinal numbers in the first place.


Premiss: I'm a java newbie and this is my first question on stack, I looked over the internet but I can't find any answer.  I started working on a dynamic web project on a windows pc, on eclipse, connected to a mysql database and it was working just fine.  I came home and I wanted to work on it on a mac but I have this problem with the server I guess..     Description: "The server encountered an unexpected condition that   prevented it from fulfilling the request."      Exception: java.lang.NullPointerException   I already changed the jdbc and everything but I'm having the same error. Do you have any idea or suggestion to help me solve this problem?  Thank you  Edit 1  Full Stack     mar 30, 2018 2:09:45 AM org.apache.catalina.core.StandardWrapperValve   invoke GRAVE: Servlet.service() for servlet [webUI.PersonaServlet] in   context with path [/WebSalari] threw exception   java.lang.NullPointerException    at   database.DbAccessore.eseguiSelect(DbAccessore.java:73)    at   database.FilmDbAccess.caricaTutteLePersone(FilmDbAccess.java:14)  at   contenitori.ContenitoreFilm.caricaDati(ContenitoreFilm.java:24)   at   webUI.PersonaServlet.processRequest(PersonaServlet.java:83)   at   webUI.PersonaServlet.doPost(PersonaServlet.java:49)   at   javax.servlet.http.HttpServlet.service(HttpServlet.java:661)  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:742)  at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)     at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)     at   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)     at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)     at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)     at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)     at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)     at   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)     at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)     at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)     at   org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)     at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)     at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)     at   org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)     at   org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)     at   org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)     at   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)     at   org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)     at   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     at   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)     at   org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)     at java.lang.Thread.run(Thread.java:748)   I'm also getting this ClassNotFoundException when trying to connect to the database  Edit 2  Here's my DBAccessore.eseguiSelect method  Connection conn;      public ResultSet eseguiSelect(String p_sql) {         ResultSet rs = null;          try {             Statement comando = conn.createStatement(); // Line 73             rs = comando.executeQuery(p_sql);         } catch (SQLException sqle) {             LogManager.scriviLog("Errore nella esecuzione della              query! Dettagli:");         LogManager.scriviLog(sqle.getMessage());         }          return rs;     } // end method


i need to simulate a click event on a select element to show the options. i found this  but it don't work in chrome and firefox. In safari it works.   this is my code:  $(document).on('keypress', function (e) {     if(e["keyCode"] == 13){          //Bei Enter-Eingabe das Dropdown öffnen         var elem = $('#select');         if (document.createEvent) {             var e = document.createEvent("MouseEvents");             e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);             elem[0].dispatchEvent(e);         } else if (element.fireEvent) {             elem[0].fireEvent("onmousedown");         }      } });   how i can solve this problem for chrome and firefox ?


If "thy" is an informal pronoun, then why does The Lord's Prayer use it to refer to God?

The commonly used version of this Christian prayer comes from the King James Bible     9 After this manner therefore pray ye: Our Father which art in heaven, Hallowed be thy name.   10 Thy kingdom come, Thy will be done in earth, as it is in heaven.   11 Give us this day our daily bread.   12 And forgive us our debts, as we forgive our debtors.   13 And lead us not into temptation, but deliver us from evil: For thine is the kingdom, and the power, and the glory, for ever. Amen.   —Matthew 6:9–13   says that the second person informal is used when speaking to God, but does not give a reason as to why. To me it would make more sense to address the creator of the universe as formally as possible.


At what level does a Horizon Walker Ranger's Ethereal Step cast the Etherealness spell?

The Ethereal Step conclave ability of a Horizon Walker Ranger is described as such:     At 7th level, you learn to step through the Ethereal Plane. As a bonus action on your turn, you can cast the Etherealness spell with this feature, without expending a spell slot, but the spell ends at the end of the current turn.   And Etherealness is a 7th level spell, with the following included in the description (Emphasis mine):     At Higher Levels. When you cast this spell using a spell slot of 8th level or higher, you can target up to three willing creatures (including you) for each slot level above 7th. The creatures must be within 10 feet of you when you cast the spell.   My question is:  does this mean that the spell will always be cast at the 7th level anytime this ability is used, or is there something that can be done to cast it at a higher level?  I'm currently playing in a party with 2 other player characters, and an ability that could transport the 3 of us together this way would be very useful.  Thanks for the responses.


Testing if ArcPy script will work with lower license level?

I was looking at the question  which states at the end      The problem is that I cannot use feature class to feature class   because in basic licence I cannot copy feature from geodatabase to   sqlite database.   I couldn't find documentation to back this up, so I thought I'd test it.  My thinking was that I would be able to change my license level down to Basic and try it out, however the ArcGIS Administrator wouldn't let me do that because I don't have a Basic license (I have Advanced license only).    So I am unable to confirm that the tools won't work with a Basic license because I can't limit the license I have to Basic level.  This got me thinking.  How do you test that an arcpy script will work at a lower license level than the one you're currently using if you don't have a lower license available to test with?  I read that you can import the lower level before importing arcpy, but this fails for me.  >>> import arcview Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcview.py", line 18, in <module>     gp.setProduct("ArcView") RuntimeError: ERROR 999999: Error executing function. >>> import arceditor Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arceditor.py", line 18, in <module>     gp.setProduct("ArcEditor") RuntimeError: ERROR 999999: Error executing function. >>> import arcpy >>> arcpy.ProductInfo() u'ArcInfo' >>>


Could someone help me to do this hard problem?I'd appreciate it!  Prove that if f(x) is continuous and one-to-one on the closed interval [a, b], then f(x) is stictly monotone on [a, b]. (Recall that strictly monotone on [a, b] means that either for all x and y such that x ∈ [a, b], y ∈ [a, b] and x < y, we have f(x) < f(y), or for all x and y such that x ∈ [a, b], y ∈ [a, b] and x < y, we have f(x) > f(y).)


Meaning of the terms in Wave Equation for a Transverse Wave

I read in the book that partial derivative of the wave function, $y(x,t)$ with respect to $x$ (here $x$ is the position of the particle on the $x$-axis) corresponds to studying the shape of the string at one instant. The first partial derivative $\partial y/\partial x$ is the slope of the string and the second partial derivative $\partial ^2x/\partial y^2$ is the curvature of the string (in case of a transverse wave). But what does the slope and curvature of the string actually mean? What do they represent? A diagrammatic explanation would be better.


Clickable hyperlink with \overset and XeLaTeX

I would like my document to have clickable hyperlinks inside \overset environments. I'm using XeLaTeX because of the fonts…  This is a (rather) minimal example:  \documentclass[a4paper, 12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage[xetex, colorlinks=true, citecolor=blue, linkcolor=blue]{hyperref}  \begin{document}  \begin{equation}     a = b \label{eq} \tag{$\ast$} \end{equation}  \[ \eqref{eq} \] % working hyperlink here.  \[ c = a \overset{\eqref{eq}}{=} b \] % existing but non-clickable hyperlink here.  \end{document}   Any help is greatly appreciated!


placeins in subsection not working as intended

I desperately search for an answer now, nothing helps. I want a graphic and a tabular appear before another subsection.   I use the placeins package for that, and expanded it to also do it in subsections. but the figure and the table are placed at the end of the document, on different pages.   It's still not working. here is the whole file:   \usepackage{placeins}  \makeatletter \AtBeginDocument{%     \expandafter\renewcommand\expandafter\subsection\expandafter{%         \expandafter\@fb@secFB\subsection     }% } \makeatother  \begin{document}  \subsection{Tables and Figures}  \begin{figure} \centering \includegraphics[width=0.5\textwidth]{frog.jpg} \caption{\label{fig:frog}This is a figure caption.} \end{figure} \FloatBarrier  \begin{table} \centering \begin{tabular}{l|r} Item & Quantity \\\hline Widgets & 42 \\ Gadgets & 13 \end{tabular} \caption{\label{tab:widgets}An example table.} \end{table} \FloatBarrier  \subsection{Mathematics} ...  \end{document}   Output:


Are all or any hash functions evenly distributed?  For example: if you had every combination of 256 bits and ran that through SHA256, would that produce approximately 1 of each combination, or would there be peaks?  Are distributions of the hashes calculable without going through the permutations in lower bit sizes?  Is evenness of the distribution of a hash function impacted by the length of the input vs the resultant hash length?  Which hashing functions are most evenly distributed?  (e.g. as close to 1 of each equal-bit-length combination possible)  Edit: The linked "duplicate" doesn't come close to addressing all these questions.


555 timer - large inaccuracies with precision components

This is a problem I have been slowly chasing down. At first I was using 10% caps that caused the poor output accuracy. After changing the capacitor to a 1% I thought the problem would be fixed, but it was not fixed.  Here is the circuit ignore values because they are old. Important values:  R1: 649 1% R2: 3.24k 1% C1: 10nf 1% (12063A103FAT2A) (ceramic) f = 1.44(R1+2R2)C1 Pw = .693(R1+R2)C1  After plugging all of this in I should get (mathematically) f = 20kHz with  Pw = 27u (the values I want.) In reality I get f = 18kHz and Pw=28us. This value is completely unusable for the application. I considered the surrounding circuit to possibly cause issues so I breadboarded just the 555 circuit. This circuit obtained exactly the same f and Pw as the one on the PCB. After some more digging I found that a small R1 could be the problem. I added two pots to the breadboard and picked some random R values. Then checked f and Pw vs the calculation and it had worse accuracy than the hand picked resistors. (I understand the pots could be the reason they were more wrong.) Is there anything I am doing wrong? Is there a better solution for this? I have a uC controlling other things, but I want to keep it isolated from this circuit because the load is a flyback circuit (20kV.)


If $\sum_n \|x\|< \infty$, how to show that $\sum x_n$ is convergent in the Hilbert space $H$.

Let $\{x_n\}$ be a sequence in a Hilbert space $H$. If $\sum_n \|x\|< \infty$, how to show that $\sum x_n$ is convergent in $H$?  There is no doubt that $x_n \rightarrow 0$ as $n \rightarrow \infty$ (right?) since we have that \begin{align*} \sum_n \|x\|< \infty &\iff \|x_n\|\rightarrow 0 \text{ as } n \rightarrow \infty \\ &\iff \langle x_n,x_n\rangle \rightarrow 0 \text{ as } n \rightarrow \infty \\ &\iff x_n \rightarrow 0 \text{ as } n\rightarrow \infty \end{align*}  (it is a property of the inner product that $\langle x,x\rangle=0 \implies x=0$)  What to do next? Can I use the completeness of $H$ somehow?


Do I need Schengen visa for transit airports?

I am flying from USA to India and transit airport is in Amsterdam and Paris.   Forward journey is USA -> Amsterdam -> India and return is India -> Paris -> USA.    I am not planning to go outside airport.    Do I need visa even to stay in the airport?    BTW, I am Indian citizen with valid US visa.  I researched some past questions and found that a Schengen visa is needed if flight is between Schengen countries.


Photons of light are massless so how can they transfer momentum?

We know that photons are massless but if you heard about solar sails then these photons of light transfer momentum to the sails,how is it possible that anything which haven't it's own momentum can transfer momentum?


Prove that $u-i$ is a maximal ideal of $\frac {\Bbb C[X,Y]} {\left (X^2+Y^2-1 \right )}.$

Let $A = \frac {\Bbb C[X,Y]} {\left (X^2+Y^2-1 \right )}.$  Let $u=X+iY.$ Show that $(u-i)$ is a maximal ideal of $A.$  Any ideal of $A$ is an ideal of $\Bbb C[X,Y]$ containing the ideal $\left ( X^2+Y^2-1 \right ).$ Need only to show that $(u-i)$ is maximal with respect to all the ideals of $\Bbb C[X,Y]$ containing $\left ( X^2+Y^2-1 \right ).$ It is easy to show that $X^2+Y^2-1 \in (u-i)$ since $$\left ( X +i \left (Y-1 \right ) \right ) \cdot  \frac {\left (X^2+Y^2-1 \right ) \left (X-i \left (Y-1 \right ) \right )} {X^2+ \left (Y-1 \right )^2} = X^2+Y^2-1.$$ But how do I prove that $(u-i)$ is maximal with respect to all the ideals of $\Bbb C[X,Y]$ containing $\left (X^2+Y^2-1 \right )$?  Any help will be highly appreciated. Thank you very much.


Let $G$ be a group and $a,b \in G$. Prove that for each integer such as $n$, we have $(a b^{-1} a)^n = a b^n a^{-1}$

I tried expanding $n$ parentheses such as $a b^{-1} a$ and then tried to replace the second $a$ with $a^2 a^{-1}$ but didn't know how to proceed further. Also, is it possible to use commutativity here somehow?


Aggregate a List to a string using (i, j) => i + "delimiter" + j

I'm triyng to do a quick Haskell-like aggregation in Linq (C#), to turn a List into a string in the format "i^j^k..." etc.  is this possible in one query, or should I just do it the old-fasioned  foreach (int i in list) {      string+= i + "^" }   (p.s. yes, that's pseudocode and wouldn't compile.)


Does an American citizen need an ESTA to leave the United States?

I am an American citizen, looking to fly to the EU. I am feeling I do not need an ESTA because the wording implies the necessity of the document belongs to non-US citizens. May be an obvious question, but I would like to be sure. I wouldn't want to ruin plans due to a misstep.


How to assign array as a variable in PostgreSQL select statement?

I am facing problem in writing PostgreSQL select statement in Python when I have to pass more than one values in a statement. Below is the sample example.    from sqlalchemy import create_engine   values = [ 'a' , 'b' ]   con = create_engine(conn_string)   results = con.execute( "select * from table where var in (%s)", [ values ] )   I am able to run query with single value but getting format error for an array.


Jquery targeting members of the same class for on ( 'input) function

I am trying to add a phone number mask using jquery.  I am having an issue with the hidden phone number fields that get added after user asks for more phone number fields.   $(".phone").on('input', function (e) {     var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);     e.target.value = !x[2] ? x[1] : '(' + x[1] + ') ' + x[2] + (x[3] ? '-' + x[3] : ''); });  am  not really sure why its not applying the on 'input' function to the rest of fields in the same class. This is what my HTML looks like:

                         <input asp-for="PhoneNumber" type="text" name="addmore[]" id="phone" class="form-control k-textbox phone" placeholder="Enter Phone No.">
                             <button class="btn btn-success add-more" type="button"></button>

                     <input asp-for="PhoneNumber" type="text" name="addmore[]" id="phone" class="form-control k-textbox phone" placeholder="Enter Other Phone No.">
                         <button class="btn btn-danger remove" type="button"></button>

  Here is the full script incase it helps to narrow it down: $(".phone").on('input', function (e) {     var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);     e.target.value = !x[2] ? x[1] : '(' + x[1] + ') ' + x[2] + (x[3] ? '-' + x[3] : ''); });  $(document).ready(function () {     $(".add-more").click(function () {         var html = $(".copy").html();         $(".after-add-more").after(html);              }); }); $("body").on("click", ".remove", function () {     $(this).parents(".control-group").remove(); });


How to tie a 3 finger swipe to switch workspaces?

As anyone who has ever used a Mac knows, you can drag left or right on the track pad to switch workspaces. I would love to know if anyone has a way to do this on Ubuntu (14.04) whether this be with tying gestures to key combos or another way.   Thanks for all the answers!


For $n$ a positive integer, let us write $\zeta_n = e^\frac{2 \pi i}{n}$, a primitive $n$th root of unity. It is clear that, if $m$ divides $n$, then we have an inclusion of cyclotomic fields $$ \mathbb{Q}(\zeta_m) \subseteq \mathbb{Q}(\zeta_n).$$ On the other hand, these inclusions are not always strict. For example, since $\zeta_3  = \frac{1+i \sqrt{3}}{2}$ and $\zeta_6 = \frac{-1 + i \sqrt{3}}{2}$, we have $$\mathbb{Q}(\zeta_3) = \mathbb{Q}(\zeta_6) = \mathbb{Q}(i\sqrt{3}).$$ Does this sort of thing happen infinitely often, or are there just some coincidences among small numbers? If this continues, is there some way to know when a particular inclusion of cyclotomic fields is strict?


Projectile/orbital motion over very long distance

We know the optimum angle for greatest horizontal displacement when launching an object with projectile motion is 45 degrees.  How to solve the angle when it is real long distance around the earth where we cannot assume that gravity is constant but is given by $F=\frac {-GMm}{r^2}$. I use differetial equation to solve it and obtain 45 degrees.   First, for the vertical distance $y$, change $v=u-gt$ to $y'=u-y''t$. Then solve it to obtain a function $y(t)$. When $y'(t)=0$ we have the time for maximum vertical distance. Then insert the value to horizontal equation.   Can anyone guide me through this problem because I am not confident with my working


Can the Sickening Radiance spell pass through a Wall of Force?

The spell sickening radiance states:     Dim, greenish light spreads within a 30-foot-radius sphere centered   on a point you choose within range.   Wall of force states:     An invisible wall of force springs into existence at a point you choose within range.    and      Nothing can physically pass through the wall.   As the wall is "invisible", that means it is permeable to light. So the light of sickening radiance - and thus the effect of the spell - should be allowed to pass through. But the wall also stops anything from physically passing through it; would that apply to the photons of the sickening radiance (if, indeed, "light" in D&D terms is made of photons)? If not, why can the visible spectrum of light pass but the damaging, magic light of "sickening radiance" not?


Where to define the javascript functions html/js

I have problems calling functions "onclick". Is it appropriate to use this methodology? It tells me (function name) that it is not defined. While on other pages it works for me. I am learning. I have read that it is "bad" to use "onclick" and that it is better to use: $(document).on('click', '#id', function (){ If I use "$(document).on('click..." never problem. However, it suits me to "call" the function since this way I can pass parameters. Is there a way for "onclick" to work fine? In almost all popular browsers? What does it depend on if it works well? What matters because it fails?


Define a text to later insert multiple timesr

is there any possibility to define a text which I can then input multiple times later?  My problem: I'm writing on a thesis and want to define the titel of it, so I can later reference this titel. So if the name or some words in the titel change (which might happen) I don't have to go through the whole thesis and change it all the times I used the titel.  I know this sounds pretty weird, my english is also not quite good. I hope I could explain what I ment to you to an extend where someone understands ^^


Is there any good GameBoy Advance Emulator for ubuntu which supports loading gameshark or action replay saves?


Question about multiplication by negative number in C programming (with different Data Types)

I'm currently learning the C language and I'm having trouble in the multiplication by negative number. I've tried following code and got 4294966 for value 'a'. Environment: Windows 10 Visual Studio Code gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) #include <stdio.h> #include <stdlib.h> #include <stdint.h>  #define FACTOR 1000  int main() {     int32_t a;     int32_t b = -1;     uint32_t c = 1000;      a = (b * c) / FACTOR;      printf("%d\n", a);     return 0; }  When I changed int32_t to int16_t and got -1 for value 'a'. Could anyone tell me what's going on with the value 'a'. Greatly appreciated. int main() {     int16_t a;     int16_t b = -1;     uint16_t c = 1000;      a = (b * c) / FACTOR;      printf("%d\n", a);     return 0; }


What could be the undetermined issue that aliens would be facing 3000 years in the future in the Arrival movie?

It's my understanding that the aliens came to our planet to teach us how to understand heptapod, their circular language and method of communicating. And they had an important reason. Being able to read or speak in heptapod means that you are able to see a person's entire timeline from start to finish.  The aliens, through the use of this foreign language, are able to change our perception of time (because the past and future essentially can be seen at the same time). Plus, in the future (like, 3,000 years in the future), the aliens are going to need mankind's help for an undetermined issue. Understanding heptapod is the tool, or "weapon," the aliens are trying to share with humanity, because they know they are going to need us later.  But what I don't understand is what kind of threat is it they can't face without our help? What could be that undetermined issue?


Disable accessing items from a particular list through REST

I have a List in Sharepoint 2016 Site Collection called Feedback. I want anonymous users be able to Add items to the list.  But I do not want anyone to read the query that list using a REST api like below  ('Feedback')  NOTE: My site collection is a public facing site (Publishing Portal)


How do I use SSMS to compare Database 1 Table 1 against Database 2 Table 1?

I have two databases - Database1 and Database2.  Both databases contain a table that has similar structure, exemplified as follows:   =========================================================================================== | ID | Name | PhoneNoFormat | DialingCountryCode | InternationalDialingCode | InternetTLD | =========================================================================================== |    |      |               |                    |                          |             | ===========================================================================================   However, due to some reason, (a) one of the tables in one of the databases has data that is not exactly the same as (b) that contained in the other table in the another database.  So, how can I compare Database1.Table1 against Database2.Table1?  I tried using the following query, but nothing happened so was wondering if I have to rewrite it:  SELECT MIN(TableName) as TableName,        ID,        Name,        PhoneNoFormat,        DialingCountryCode,        InternationalDialingCode,        InternetTLD  FROM  (    SELECT  'Table A' as TableName,           A.ID,           A.Name,           A.PhoneNoFormat,           A.DialingCountryCode,           A.InternationalDialingCode,           A.InternetTLD    FROM [D:\DATABASE1.MDF].[dbo].[Table1] AS A    UNION ALL    SELECT 'Table B' as TableName,          B.ID, B.Name,          B.PhoneNoFormat,          B.DialingCountryCode,          B.InternationalDialingCode,          B.InternetTLD    FROM [D:\DATABASE2.MDF].[dbo].[Table1] AS B  ) tmp  GROUP BY ID, Name, PhoneNoFormat, DialingCountryCode, InternationalDialingCode, InternetTLD  HAVING COUNT(*) = 1  ORDER BY ID


some ubuntu apps don't display properly the font

I have this strange problem in Ubuntu LTS 18.04 I opened Ubuntu System Monitor and it looks like in the picture. I didn't do anything special ... just installing updates. I don't know which updates was...or the day that happened? I wanted to see the using space in system monitor...and I realized that it's mess. The same issue seems to have the calculator. Any ideas what could cause this ? The system is working fine...and didn't see this problem in other apps.


Mount ext4 partition with >4KiB block size

I'm attempting to mount a partition from a NAS and the block size is 65536 bytes, this is above my distribution's precompiled kernel memory paging size of 4KiB, so I cannot mount it normally.  Which kernel compilation parameters would I need to change to get a memory paging size large enough?  Would it be possible under the x86-64 architecture?  EDIT: There doesn't seem to be an option for it in make xconfig unless I'm just missing it.  From page_types.h under arch\x86\include\asm  /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT  12 #define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT) #define PAGE_MASK   (~(PAGE_SIZE-1))`   It doesn't look to be configurable.  I could change this number directly to 16 and it would probably make pretty explosions and destroy Tokyo.  I shall probably try it later this evening.


Accented tags not displayed properly on edit page on mobile web site

When editing a question with tags which contain accent marks (and likely other non-ASCII characters), the display is garbled, showing HTML escape sequences to the user:    The above screen shot is taken while editing  on my Nexus 4 with Android 5.1.1 viewing the mobile web site (not the Android app).  Although I initially discovered the issue trying to edit  on the pre-private-beta ES.SO (so likely not yet visible to many people).


I'm trying to find email within text that is being followed by a key word 'domain' preg_match_all("/domain.+\b([a-z0-9\-]+\.[a-z]{2,3})/im", $input_lines, $output_array);  my input data is   here is some text capture this domain hi-there-welcome.co and this domain should be captured yes90well.com but not this link nolink.com but not this line of no domain on it   I should be able to capture hi-there-welcome.com and yes90well.com


Is it a good manner to have a nice question/answer without any edit history?

I know it's recommended to edit a post if there's improvement. But as a personal preference, I'm often proud of having an upvoted question or answer without a revision history, and I'll admire if someone has one. So at last is it a commended practice to be so?


Generate a random integer with a specified number of digits Java

I ran into this problem today and I'm sure there is an elegant solution I am not thinking of.   Let's say I want to generate a random integer(or long) in Java with a specified number of digits, where this number of digits can change.  I.e. pass in a number of digits into a method, and return a random number with the specified number of digits  Ex.) N = 3, generate a random number between 100-999; N = 4, generate a random number between 1000-9999  private long generateRandomNumber(int n){  /*Generate a random number with n number of digits*/  }   My attempt so far (this works, but it seems messy)  private long generateRandomNumber(int n){      String randomNumString = "";      Random r = new Random();      //Generate the first digit from 1-9     randomNumString += (r.nextInt(9) + 1);      //Generate the remaining digits between 0-9     for(int x = 1; x < n; x++){         randomNumString += r.nextInt(9);     }      //Parse and return     return Long.parseLong(randomNumString);  }   Is there a better/more efficient solution than this?  *There are lots of solutions for generating random numbers in a specified range, I was more curious on the best way to generate random numbers given a set number of digits, as well as making the solution robust enough to handle any number of digits.   I did not want to have to pass in a min and max, but rather just the number of digits needed


Ubuntu: Server is left with only 716 MB free RAM out of 62 GB RAM

My server has 62 GB RAM but now i can see only 716 MB RAM is free. Below is the output of free -lh command               total       used       free     shared    buffers     cached Mem:           62G        62G       716M       277M       415M        52G Low:           62G        62G       716M High:           0B         0B         0B -/+ buffers/cache:       9.8G        53G Swap:          15G        16M        15G   From the above output i can see that only 716 MB is free out of 62GB but when i see the process using top -o RES command as shown below(sorted in descending order of RES) only glassfish is consuming 5 GB ram and rest of the other processes are in MB's. if we add up the memory of all this processes then it will not reach to 62GB. My question is then now which processes  are consuming more memory and why the top command is not showing theses processes??  top - 04:20:33 up 5 days, 15:46,  2 users,  load average: 0.00, 0.00, 0.02 Tasks: 272 total,   1 running, 271 sleeping,   0 stopped,   0 zombie %Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st MiB Mem:  64431.17+total, 63715.67+used,  715.496 free,  415.574 buffers MiB Swap: 16380.99+total,   16.984 used, 16364.01+free. 53273.82+cached Mem    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND 18640 glassfish+20   0 20.284g 5.399g  59.9m S   0.0  8.6  48:56.94 java  2750 h+        20   0 20.294g 954.7m  19.8m S   0.0  1.5   3:06.16 java  7837 h+        20   0 20.294g 899.9m  20.0m S   0.0  1.4   0:20.89 java  2088 tomcat6   20   0 5641.2m 493.9m  20.7m S   0.0  0.8   3:59.54 java  2166 mirth     20   0 6572.8m 375.2m  21.7m S   0.0  0.6   7:26.73 java  1307 oj        20   0 20.670g 308.1m  19.5m S   0.3  0.5  10:28.15 java 31903 postgres  20   0  384.2m  77.4m  76.0m S   0.0  0.1   0:00.25 postgres  1799 rabbitmq  20   0 2167.9m  69.2m   4.0m S   0.7  0.1  47:14.13 beam.smp  6622 postgres  20   0  386.0m  36.8m  34.0m S   0.0  0.1   0:00.50 postgres  1668 postgres  20   0  384.2m  32.7m  31.4m S   0.0  0.1   0:19.87 postgres  2234 h+        20   0  318.3m  23.8m   3.8m S   0.0  0.0   0:17.42 beam.smp  7857 postgres  20   0  385.3m  15.5m  13.2m S   0.0  0.0   0:00.33 postgres 31904 postgres  20   0  384.2m  12.1m  10.7m S   0.0  0.0   0:00.49 postgres  8089 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8090 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8091 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8092 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  7919 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8088 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  7920 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8093 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8094 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres   573 syslog    20   0  250.0m  10.3m   2.3m S   0.0  0.0   0:01.98 rsyslogd 31902 postgres  20   0  384.7m   8.0m   6.3m S   0.0  0.0   0:01.63 postgres 31905 postgres  20   0  384.8m   7.3m   5.6m S   0.0  0.0   0:00.23 postgres 16662 root      20   0  103.2m   6.6m   5.5m S   0.0  0.0   0:00.06 sshd  5064 root      20   0  103.2m   6.5m   5.5m S   0.0  0.0   0:00.03 sshd  5301 root      20   0  103.2m   6.5m   5.5m S   0.0  0.0   0:00.01 sshd 20529 root      20   0  103.2m   6.4m   5.4m S   0.0  0.0   0:00.05 sshd 16813 b+        20   0   21.9m   6.4m   3.3m S   0.0  0.0   0:00.19 bash  5380 b+        20   0   21.0m   5.4m   3.2m S   0.0  0.0   0:00.05 bash  1190 root      20   0   59.9m   4.8m   4.7m S   0.0  0.0   0:00.02 sshd 16812 b+        20   0  103.2m   4.7m   3.7m S   0.0  0.0   0:00.29 sshd 20618 b+        20   0  103.2m   4.7m   3.6m S   0.0  0.0   0:00.12 sshd 31906 postgres  20   0  103.5m   4.6m   2.3m S   0.0  0.0   0:00.42 postgres  2340 ntp       20   0   30.7m   4.3m   3.7m S   0.0  0.0   0:23.77 ntpd


After Update from 14.04 to 16.04 all the menus disappeared

I updated today from Ubuntu 14.04 to 16.04 via the official client. I did everything as recommended and let it remove the outdated packages in the end. After the first restart it said that there has been an "internal error" and I had no Unity menu nor a taskbar or anything similar. The only way for me to open Firefox was by opening a picture with Firefox that I had on my desktop. I cant minimize or close the window with my mouse, only with Alt+F4.  So if someone would tell me what to do, I'd be very grateful  Greeting  Vitus


count the numer of partial function between two sets with bijection

A and B two sets. |A|=k,|B|=n. prove: the number of partial function from A to B is (n+1)^k. proof: x-object not in B. B*=BUx.  The total function (not partial) between A and B* is (n+1)^k. Now I need to find a bijection between the set of all partial function from A to B and the set of all function between A and B*.  someone can show me please explicit bijection that would do the work  thanks.


Find all functoins $f: \mathbb R \rightarrow \mathbb R$ such that $\forall x,y \in \mathbb R f(xy+f(x))=xf(y)+f(x)$

Find all functoins $f: \mathbb R \rightarrow \mathbb R$ such that $\forall x,y \in \mathbb R$ the equality:: $$f(xy+f(x))=xf(y)+f(x)$$  My work so far:  1) $f(0)=0$;  Let $f(a)=f(b)\not=0$  $x=a, y=b \Rightarrow f(ab+f(a))=af(b)+f(a)$;  $x=b, y=a \Rightarrow f(ba+f(b))=bf(a)+f(b)$;  Then $af(b)+f(a)=bf(a)+f(b) \Rightarrow a=b$  $x=0: f(f(0))=f(0) \Rightarrow f(0)=0$  2) $f(x)=x -$ solution. I have tried to prove that $g(x)=f(x)-x = 0 (\forall x \in \mathbb R)$ $$g(xy+x+g(x))=xg(y)$$


How can I access 'User Preferences' when clicking on it closes Blender immediately?

I need to emulate the 3-button mouse and number pad, which requires accessing 'User Preferences.' But clicking on 'User Preferences' closes Blender immediately! Any answers?


Add a timer to the rate-limiting messages for asking questions

I'm getting this message:     You can only ask 6 questions in a 24-hour period   Could you add a timer, so that I know how much time I have to wait?


Does a "melee spell attack" use my spellcasting ability, or my Strength?

The spell "Flame Blade" makes a fire sword that you can perform a melee spell attack with. As a druid with higher Wisdom, I would rather have it be based on that than my Strength, but I'm not sure if I would use my Wisdom or Strength, considering it is a 'melee spell attack.  Would I use my Wisdom for the melee spell attack from Flame Blade, or my Strength? Cause I feel like if it's based on Strength, there's no real need for the spell for a druid.


What does variable++ and variable-- mean?

I know that ++variable adds 1 to the variable, but what about variable++ and variable--?


getopt, getopts or manual parsing - what to use when I want to support both short and long options?

Currently I'm writing a Bash script which has the following requirements:   it should run on a wide variety of Unix/Linux platforms it should support both short and (GNU) long options   I know that getopts would be the preferred way in terms of portability but AFAIK it doesn't support long options.  getopt supports long options but the  recommends strongly against it:     Never use getopt(1). getopt cannot handle empty arguments strings, or   arguments with embedded whitespace. Please forget that it ever   existed.   So, there still is the option of manual parsing. This is error-prone, produces quite some boilerplate code, and I need to handle errors by myself (I guess getopt(s) do error-handling by themselves).  So, what would be the preferred choice in this case?


How to solve double limit $\lim_{m\to\infty}[\lim_{n\to\infty}(\cos(m!\cdot \pi\cdot x))^{2n}]$

Please provide some hints as to how to solve questions with double limits such as this:  $$\lim_{m\to\infty}\left[\lim_{n\to\infty}(\cos(m!\cdot \pi\cdot x))^{2n}\right]$$  One of the things I did was convert the original function to: $$e^{n\ln(\cos(m!\cdot\pi\cdot x)^2)}$$ and then change cosine into sine and take $t=1/m$, and try to use  $$\lim \frac{\sin(m!\cdot\pi\cdot x)}{m!\cdot\pi\cdot x}$$ but that only messed it up even further. I obviously can't use L'Hopital as not both the numerator and denominator go to zero.   Another thing was to try to use the power series expansion, but that seemed even more complicated as there is still the power of 2n to deal with.   Please help! Thanks.


A fantasy-magic world split into different elemental worlds

I'm looking for the name of a book (series?) I read in the 80's. It was a fantasy-magic world split into different elemental worlds.  The main character spoke about being raised in some sort of labyrinth and had tattoos, which may have been to cast power spells.  I know it's not much, but I remembered parts of the book while I was deployed in 1990.


I am a freelancer programmer and so far I have only worked on projects on Windows platform. I don't have much idea about OS X hardware. I am not looking for a very high end configuration but integrated development environment and one database server should just run fine. I have a Dell laptop i7 processor, 8 GB RAM, 1 TB HDD; I am fairly satisfied with the performance. I am mainly going to use it for app development and not for any rich graphics app development.  What are the minimum and recommended hardware requirements for Xcode development on OS X?


Can multiple attacks per action be used for casting cantrips after multiclassing?

I am currently playing lvl 6 character: 5 Fighter/1 Sorcerer. Can I use my double attack per action to cast cantrips, like ray of frost, twice in one action?


I have a Samsung SSD 840 EVO of 250GB as my main drive with Windows 10 Pro N and it shows up as being almost full, although I don't have too much stuff in it, but when I took a look to the storage use I found this:    And the detail for System and reserved:    How can I fix that?


Is there an easy method for installing binary builds of glibc?

Time and time again I see questions such as these:       And these are the types of solutions we're typically pushing:        Is this really the best we can do? Aren't there binary builds of GLIBC that we can simply unzip into a directory such as /opt/myglibc, and set the $LD_LIBRARY_PATH or whatever and run whatever application we want, without issues?   An application, such as the newer builds of Chrome (28+) that appear to require GLIBC 2.14?  NOTE: This thread titled:  on tecmint.com is what ultimately got me thinking about this.  References


Shrink the size of a dynamically sized VMWare vmdk from maximum to current

My VMWare disc image has a flag allowing a maximum of 100GB. It currently holds 50GB of data and 50GB of empty space. The image currently takes 75GB of the parent, and those extra gigs difference are not coming back even when info is deleted inside the virtual machine.  How can I trim my vmdk drive back to the minimum space required?


Prediction vs. Explanation and its Effect on Statistical Methods

In layman's terms, what is the difference between predicting and explaining in statistics?  I was looking for the differences between AIC and BIC and found  with an answer stating:  My quick explanation is AIC is best for prediction as it is asymptotically equivalent to cross-validation. BIC is best for explanation as it is allows consistent estimation of the underlying data generating process.  This makes me think that in the same vein as precision and accuracy there is some core distinction here that significantly effects when and how to use a lot of statistical procedures.  I googled it and only found a variety of papers including , but this is far too rigorous for my question given my current knowledge.  Could anyone provide an intuitive exposition of the difference and perhaps some examples of how it affects the use of statistical methods and tools?


Is there a convention to the order of modifiers in C#?

If I were to use more than one, what order should I use modifier keywords such as:  public, private, protected, virtual, abstract, override, new, static, internal, sealed, and any others I'm forgetting.


Protagonist (named Alan?) is a novice in a monastic order of interstellar translators/lawyers/negotiators.  The story covers his first position, hired out on a trading mission to a civilization without native metals. During the mission, he learns that the official non-interference and non-violence positions of his order are not shared by (some of?) its leaders.  References to and translated quotes from Machiavelli are used often.


What I currently understand about the P-value is that, if the null hypothesis were true, the P-value is the probability of getting a value of the sample test statistic that is at least as extreme as the one found from my sample data.   What I don't understand is, if I have a two-tailed test and I am assuming my null hypothesis were true (for example hypothesizing that my mean is equal to 2) and my P-value (probability of obtaining extreme values further from 2) is very low, wouldn't that favour my null hypothesis because the probability of obtaining extreme values that are further from the hypothesized mean of 2 is lower?  Why is it that the lower the P-value, the stronger evidence I have to reject my null hypothesis?  Please let me know where I have gone wrong in my understanding.


How to populate 2D array with for loop in Java?

I am getting a Exception in thread "main" java.lang.NullPointerException package ques1.rf;  import java.util.Arrays; import java.util.Scanner;  public class Ques1RF {     static Scanner products, itemNum, itemName, itemPrice, itemsQuantity;                  public static void main(String[] args)      {        int itemsCapure=0;                products = new Scanner(System.in);                System.out.println("Enter the amount of products sold");        itemsCapure=products.nextInt();                 String itemsSold[][] = new String [itemsCapure+1][4];                itemsSold[0][0]="Item Number";        itemsSold[0][1]="Name";        itemsSold[0][2]="Price";        itemsSold[0][3]=" Quantity Sold";                 for (int i = 1; i <= itemsCapure; i++)         {             int numItem=0;             String candyName="";              System.out.println("Enter the Item Number of product "+(i));             itemNum = new Scanner(System.in);             numItem=itemNum.nextInt();             itemsSold[i][0]=""+numItem;              System.out.println("Enter the name of Candy "+(i));             candyName=itemName.nextLine();             itemsSold[i][1]=candyName;              System.out.println("Enter the price of the Candy"+(i));             itemPrice = new Scanner(System.in);                        itemsSold[i][2]=""+itemPrice.nextDouble();              System.out.println("Enter the quantity sold?"+(i));             itemsQuantity = new Scanner(System.in);             itemsSold[i][3]=""+itemsQuantity.nextInt();        }                 for (String[] row : itemsSold)          {            System.out.println(Arrays.toString(row));         }     }      }


Shouldn't mysql_real_escape_string() leave slashes in Database?

Im using smarty and mysql_real_escape_string() for user input, and when I insert some code with ' or " , and lookup in phpmyadmin it shows without backslashes.  When I get record from DB i doesn't have backslashes also. But when I just pass escaped string without inserting into the db it is backslashed.  Shouldn't it add slashes, insert with them and then I would  strip them when i would output? Or am I missing something?


The graph has 300 vertices, 300 edges. Show that there are 100 vertices that are pairwise non-adjacent.

If the graph was regular, that would be easy to show it. Choose one vertix from $300$, then there are $300-1-2=300-1\cdot3=297$ vertices that are not chosen and non-adjacent to chosen ones. Choose one from $297$, then there are at least $300-2-2\cdot2=300-2\cdot3$ vertices that are not chosen and non-adjacent to chosen ones, etc. When we have chosen the $99$-th vertices, there are at least $300-99-99\cdot2=300-99\cdot3=3$ vertices that are not chosen and non-adjacent to chosen ones, choose the last one from them. If the graph it's not regular, I think, we should choose the vertix that has the smallest degree in the induced subgraph  whose vertex set is the set of vertices that are not chosen and not adjacent to chosen ones. But it doesn't help me to show that we can always do it (that this set is not empty on any of our 100 steps of choosing.


Should I repeat the by enumeration different theatres?  He has worked with many Moscow theatres, among them there are the Russian Academic Youth, the Maly, the Yermolova, the Oleg Tabakov, the Russian Army, the Pushkin and the Mossoviet theatres and the Moscow Operetta.   By the way, should I also repeat the word theatres in the end as I do in the example?


What is the closest equivalent of "load average" in Windows available via WMI?

Linux has a notion of Load Average which is defined as:     System load averages is the average number of processes that are either in a runnable or uninterruptable state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in uninterruptable state is waiting for some I/O access, eg waiting for disk. The averages are taken over the three time intervals. Load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.   What is the closest equivalent available via WMI? Fundamentally are there differences between the two OSes which determinate how such a performance metric should be measured? What are the differences?


Why centripetal force does not pull the object towards the center?

I know that the force is used to change the direction of the velocity but my question is while it has 3 options either to pull the object towards the center or change the direction of velocity or both. It would have been more appropriate if it did both.


Plural form of abbreviation ending with "s"

I am wondering how can We pluralize the abbreviation "TS" (Training Sequence)? Is it " TSes" or "TS's", I think It can't be "TSs"


I am trying to create a meta-package, which install all application that i will. Unfortunately i couldnot find any appropriate dockumentation about that. Does know someone how to do or where can i find documentation? Any help will be appreciated.


How to find the sum of series $\sum_{i=1}^{\infty}\frac{i}{2^i}$?

I am learning about series of numbers at the moment. In the book there is an exercise in which I need to find the sum of : $$\sum_{i=1}^{\infty}\frac{i}{2^i}$$ I know it is equal to $2$. But how do I get to that result? Are there any general ways of finding the sums of series? In the books I am using, there is a lot about series, their convergence etc. but almost no examples.


I dont get how rounding numbers up to certain decimal places I looked everywhere tried every thing  currently I have my program to round up to a whole number with  double rACT = Math.ceil(ACT); double rSAT = Math.ceil(SAT); double rGPA = Math.ceil(GPA);  but i need it to round up to 2 decimal places   FYI - I am an High school student I really dont need something super complicated to do this cuz I need my methods to be less then 15 I can waste any lines


I have    iPhone 5 (with iOS 8.3) MacBook Pro Early 2013 (with OS X Yosemite 10.10.3) iPad Air (with iOS 8.3)   My iPhone is paired with the MacBook, so e.g when my phone rings, I can see it in my computer. But when I want to AirDrop photos from my iPhone the MacBook, then I can't see the MacBook in my iPhone AirDrop targets.  I can see the iPad, I can see my wife's iPhone, but not the MacBook.  On MacBook, I can see the iPad, my wife's phone and even my iPhone and I can drop to there, but not the other way around.  Before I started troubleshooting, the iPhone and MacBook were mutually invisible (I only saw iPad from both). After a while of trying things and sending files back and forth, my MacBook started to see the iPhone, but I did not manage to make it work from the other way. Still, the iPhone seems to be much "less" visible than the iPad - which I see almost instantly and always, the iPhone only seems to appear after a while.  Just to make it clear:   both iPhone and MBP have BT turned on both have AirDrop visibility set to Everyone   I would be glad for any suggestions to fix this - what settings to check, logs, whatever.


Ubuntu has LTS and normal version now. Does Lubuntu have the same?

Anyway....there is Ubuntu 12.04 LTS and the normal 12.10 version. Is that the same with Lubuntu? On their site, for some reason, they seem to be promoting the 12.10 version while for me an LTS is always more appealing. I am wondering if they have the same ideology as the Ubuntu team.  UPDATE: Is it okay to talk about Lubuntu here at all? I understand that it is a flavour of Ubuntu...but still. Are they 2 very different teams?


Installing ubuntu-no option to install with windows 10

This is the first time trying to install ubuntu for me.  Basically I followed along this tutorial in YouTube:   I am not given the option to install Ubuntu alongside windows 10. However it does show up when I click on "something else". I don't know how to go from there though.  Here are some steps I've taken so far   created a system image on external usb to backup windows Shrink the Windows 10 partition to make space for Ubuntu (shrunk 50000mb as in video) installed ubuntu 16.04.1 onto usb installed Universal USB Installer booted into Ubuntu Linux Installation environment and began installing Ubuntu (did not finish installation)   How do I install along side Windows 10, I imagine it's with using "something else". I had windows 7 previously installed on this computer, and both 7 and windows 10 show up in "something else".


I can't download El Capitan from App Store

I think the title is pretty selfdescribing, but ok :)   I go to App Store, I click on download button on OS X El Capitan (it is listed under Utilities), and nothing happens and the El Capitan is not downloaded, nor does it change the status to "Downloading". I don't think it is downloading. I also tried to log in as root to the mac and now the App Store won't work - it keeps spinning the spinner sign and nothing happens, I can't even type the letters "El Capitan" in the search box. Anyone has any other link, URL for downloading of El Capitan, other than the one on App Store? Losing my faith in Apple slowly...... I am on Macbook 7.1 (Mid-2010).


Im trying to figure out what this verse means

I'm trying to understand what "Got to own your own, you have to got to own your own" means, it could interpreted as something you can use like a motivational phrase or is translated literally like "you have to be on command of yourself"?


I am looking for a command-line utility (nix based - mac os) that will allow the following: "associate" files together under a "label", files might come from different directories, then list label would show a list of files under the label. Also be able to associate files together - might be a pdf files with associated note files, again one pdf might want multiple note files associated with it, or a single note file might be associated with multiple pdf files (in different directories). Again a way to list a file and see all associated files, then open them. Would tags and some kind of terminal based file manager work for this?


I have my pom.xml:  <properties>     <jdk.version>1.6</jdk.version>     <spring.version>3.2.8.RELEASE</spring.version>     <spring.security.version>3.2.3.RELEASE</spring.security.version>     <jstl.version>1.2</jstl.version>     <mysql.connector.version>5.1.30</mysql.connector.version> </properties>  <dependencies>      <!-- Spring 3 dependencies -->      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-core</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-web</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-webmvc</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-jdbc</artifactId>         <version>${spring.version}</version>     </dependency>     <!-- Spring Security -->     <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-web</artifactId>         <version>${spring.security.version}</version>     </dependency>      <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-config</artifactId>         <version>${spring.security.version}</version>     </dependency>      <!-- Spring Security JSP Taglib -->     <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-taglibs</artifactId>         <version>${spring.security.version}</version>     </dependency>      <!-- jstl for jsp page -->     <dependency>         <groupId>jstl</groupId>         <artifactId>jstl</artifactId>         <version>${jstl.version}</version>     </dependency>      <dependency>         <groupId>mysql</groupId>         <artifactId>mysql-connector-java</artifactId>         <version>${mysql.connector.version}</version>     </dependency>      <!-- MySQL database driver -->     <dependency>         <groupId>mysql</groupId>         <artifactId>mysql-connector-java</artifactId>         <version>5.1.9</version>     </dependency>      <dependency>         <groupId>javax.servlet</groupId>         <artifactId>servlet-api</artifactId>         <version>2.5</version>         <scope>provided</scope>     </dependency> </dependencies>   I want include new dependency spring:  <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring</artifactId>         <version>2.5.6</version>     </dependency>   But I get errors in my program:      org.springframework.web.context.ContextLoader.initWebApplicationContext                 Context initialization failed     org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-security.xml];     nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;  What does it mean?  How can I include my dependency? Maybe there are versions error?


How to keep only this specific part of url?

Using PHP how can I only keep the hu? Please note that the link is only one variable, it may be anything


How to generate DTM from point cloud data?

I have point cloud data obtained from drone. I need to generate DTM out of it. How can I generate and I checked options in ArcGIS and QGIS. I was not able to find any.Could anyone suggest a method to generate the same?


What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close  \begin{tikzpicture} \draw[|->, color=red] (-4cm, 0.5cm) -- (2.5cm, 0.5cm) node[midway, color=black] {$\tau_{r}$}; \end{tikzpicture}   But the line crosses right through the node and its text, which is bad.  I don't know if there is an option to choose the background color of a node, which I think would solve the problem (e.g. background=white). fill doesn't seem to work.


The new ask page is now live on the network!

After rolling it out to the International Stack Overflow sites last week, we're rolling out the new ask page to the whole network today. The new page was designed with the goal of helping new askers by more readily presenting them with tips on how to improve their question. This is a combination of the "Ask a question wizard" (that was tested on Stack Overflow) and the current standard "ask a question" page. You can read more about it . The /questions/ask/advice page has been replaced by a new modal for first-time askers, and the flow is now broken down into two steps: drafting the question, and reviewing the question — so no more random warnings triggering when you switch from the tag to the title field, while others only show up if you actually try to post. And as the blog post notes, there's also an informational modal at the end, so new askers know what to expect once they've asked their question. Enough words, here's what it looks like... (click on the images to see the larger versions) Welcome modal for new askers:  Drafting a question:   Reviewing a question, with errors (shown inline) and warnings (shown on the right side):   Reviewing a question, without errors:  What's per-site customizable, and what's the procedure to get it live? As you can see, any existing custom guidance on "How to ask," "How to tag," or any custom error or warning messages your site may already have in place will still be there, and will still be customizable with the same restraints (basic HTML, using paragraphs, lists, links) as before:  The "welcome modal" for new askers (seen with the default text in screenshot 1), everything between the title and "Before you post..." (this is only custom on 4 sites at the moment, ). The full contents of the "Draft your question" sidebar (seen with the default text in screenshot 2, and with custom text in screenshot 3). The text in the tag popover, between "Tags help the right people..." and the bullet points (seen with custom text in screenshot 2, and with the default text on screenshot 3). The above three have no character limits, aside from "within reason." The placeholder text in the title field (text only; seen with the default text in screenshot 2, and with custom text on screenshot 3). The warning text shown in the "Review your question" sidebar, regex-based (seen with the default text in screenshot 4, and with custom text on screenshot 5). Tag-related error messages and warnings, regex-based (seen with custom error text in screenshot 4, with the default text on screenshot 5,  and with a tag warning ). The warning and error messages described in the two bullet points above have a limit of 1000 characters.  These can only be edited by staff, so the process to get them live is as described :  Create a Meta post on the appropriate Meta site, and discuss it with your community. Once a consensus is reached, a mod should escalate it to the CM team. Generally speaking, the "contact us" form is the best way to go, though a ping in chat can sometimes work too (the most that could happen is we ask you to use the form). Unless there are any outstanding issues, the CMs should be able to get to it Soon™.   This has been live on Stack Overflow for a while now, and like I mentioned at the beginning of the post, we're rolling this out to the rest of the network now. If you have any questions or see anything that has broken on your site, please let us know — we'll be actively monitoring and responding to this post until March 10th. After that, if you have a bug or specific request, start a new post and tag it with  and  or  :)


The rules of 5e say that I can use my gp to buy gear instead of the class starter kit. In that case, does that mean that I can use both weapons from the starter kit and weapons that I buy? Or do I have to give up the entire kit to start buying new gear?  For example, if I want to use the Rogue starter kit AND buy a blowgun and darts for 11 gp, would that be cheating?


Buying a domain SEO friendly or the brand name?

I have the company name SOME COMPANY and my main keyword some keyword. What is more clever to do, to buy  somecompany.com   or  some-keyword.com   What is the best approach?  In the old days i would use some-keyword.com but now days i heard that the CONTENT is more important and the domain doesn't count that much, what do you guys think?  Thank you for every answer.


Principled way of collapsing categorical variables with many levels?

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


Does charging a phone with another phone's charger affect it in any way?

I have a Samsung S4 and because its charger is short I charge it with a Samsung Wonder charger. I am afraid that it can damage the battery or something. Will it?


highlight a word without affecting the structure of text

$cat contents.txt  cat-1.15  cat-1.15  cat-1.15 cat-1.18   The above output has blank lines  $cat contents.txt | grep cat results in the word cat being highlighted, but the resultant text is also merged, eliminating blank lines  cat-1.15 cat-1.15 cat-1.15 cat-1.18   How can I grep to highlight without grep affecting the text structure, so that the only difference is the grep term being highlighted ?


Is it possible for the Lagrange multiplier to be equal to zero?

I would like to find the extrema of the function $f(x,y)=x^2+4xy+4y^2$ subject to $x^2+2y^2=4$ using Lagrange Multipliers.  Is it possible to get for the Lagrange multipliers the value zero?  I don't think so because the gradient vectors for $f$ and $g(x,y)=x^2+2y^2$ have to be proportional.  So this problem has two solutions. But their image by the function $f$ is the same. So, how can I know if they correspond to a maximum or to a minimum?


Random Numbers without ascending and descending orders

I have a problem with a method that generates numbers that do not repeat. Everything goes fine, but I would never want to get a result like: 1,2,3,4 or 4,3,2,1 . The idea is not to receive the numbers in ascending order or in descending order.  Below is the method implemented if someone can help me. Thank you!  public static List<int> GenerateNumbers(int mn, int mx) {     List<int> source = new List<int>();     for (int i = mn; i <= mx; i++)         source.Add(i);     List<int> randomNumbers = new List<int>();     while (source.Count != 0)     {         int randomIndex = UnityEngine.Random.Range(0, source.Count - 1);         randomNumbers.Add(source[randomIndex]);         source.RemoveAt(randomIndex);     }     return randomNumbers; }  public static bool IsSorted(List<int> arr) {     for(int i=0;i<arr.Count - 1; i++)     {         if (arr[i] < arr[i + 1])             return true;         else             return false;     }     return true; }


I am trying to run grep against a list of a few hundred files:  $ head -n 3 <(cat files.txt) admin.php ajax/accept.php ajax/add_note.php   However, even though I am grepping for a string that I know is found in the files, the following does not search the files:  $ grep -i 'foo' <(cat files.txt)  $ grep -i 'foo' admin.php The foo was found   I am familiar with the -f flag which will read the patterns from a file. But how to read the input files?  I had considered the horrible workaround of copying the files to a temporary directory as cp seems to support the <(cat files.txt) format, and from there grepping the files. Shirley there is a better way.


How to get the index of the current iterator item in a loop?

How to obtain the index of the current item of a Python  in a loop?   For example when using regular expression finditer function which returns an iterator, how you can access the index of the iterator in a loop.  for item in re.finditer(pattern, text):     # How to obtain the index of the "item"


Run a process only when the previous one is finished | Bash

I am using aria2 to download some data with the option --on-download-complete to run a bash script automatically to process the data.   aria2c --http-user='***' --http-passwd='***' --check-certificate=false --max-concurrent-downloads=2 -M products.meta4 --on-download-complete=/my/path/script_gpt.sh   Focusing on my bash script,   #!/bin/bash  oldEnd=.zip newEnd=_processed.dim  for i in $(ls -d -1 /my/path/S1*.zip) do if [ -f ${i%$oldEnd}$newEnd ]; then     echo "Already processed" else    gpt /my/path/graph.xml -Pinput1=$i -Poutput1=${i%$oldEnd}$newEnd fi done    Basically, everytime a download is finished, a for loop starts. First it checks if the downloaded product has been already processed and if not it runs a specific task.   My issue is that everytime a download is completed, the bash script is run. This means that if the analysis is not finished from the previous time the bash script was run, both tasks will overlap and eat all my memory resources.  Ideally, I would like to:   Each time the bash script is run, check if there is still and ongoing process.  If so, wait until it is finished and then run   Its like creating a queu of task (like in a for loop where each iteration waits until the previous one is finished).  I have tried to implement the solutin with wait or identifying the PID but nothing succesfull.  Maybe changing the approach and instead of using aria2 to process the data that is just donwloaded, implemente another solution?


Difference in SQL server INNER JOIN syntax?

I've come from a Postgres/MySQL world, so am wondering if there's a difference between these 2 queries in SQL server:  SELECT e.employee_id, s.salary FROM employees e INNER JOIN salaries s ON e.employee_id = s.employee_id   SELECT e.employee_id, s.salary FROM employees e, salaries s WHERE e.employee_id = s.employee_id


Why is there a 15 minute time limit on accepting an answer in StackOverflow?


Non-algebraically closed field in which every polynomial of degree $<n$ has a root

My problem is to build, for every prime $p$, a field of characteristic $p$ in which every polynomial of degree $\leq n$ ($n$ a fixed natural number) has a root, but such that the field is not algebraically closed.  If I'm not wrong (please correct me if I am) such a field cannot be finite, by counting arguments. But on the other hand, the union of all finite fields (or of any ascending chain of finite fields) of characteristic $p$, which is what I get if I start with $F_p$ and add a root to each polynomial of degree $\leq n$ in each step, is the algebraic closure of $F_p$, hence algebraically closed. I don't see how I can control this process so that in the end I get a field that is not algebraically closed.  Any hint will be welcome. Thanks in advance.


If $N \lhd G$ is abelian and $G/N$ is abelian then $G$ is abelian

I try to prove the following:     Let $G$ be a group and $N$ be a normal subgroup. Suppose $N$ is abelian and $G/N$ is abelian. Then $G = N \cdot (G/N)$ is abelian.   Proof:   For the first assertion that $G = N \cdot (G/N)$ let $g \in G$, then $g = g n n^{-1} \in gN \cdot N$ and then $gN \in G/N$ and $n^{-1} \in N$.  For the second assertion, let $g_1,g_2 \in G$. Then $$ g_1 g_2 = g_1 n_1^{-1} n_1 g_2 n_2^{-1} n_2 = g'_1 n_1 g'_2 n_2 $$  where $g'_i = g_i N$. Then $$g'_1 n_1 g'_2 n_2 = g'_1 g'_2 n'_2 n_2$$ since $N$ is normal, and $$  g'_1 g'_2 n'_2 n_2 = g'_2 g'_1 n'_2 n_2$$ since $G/N$ is abelian, and $$ g'_2 g'_1 n'_2 n_2 = g_2 n_2^{-1} g_1 n^{-1}_1 n'_2 n_2$$ and here I am stuck.


Why when deleting from a USB or an external HDD on mac the occupied space wont be free untill deleted from trash?  Is there a direct way to delete from the drive and freeing the occupied space instantly?


"...and all would have to be accounted for." Improper sentence ending at 'for'. Please suggest alternative

I have this statement that I do not want to end at 'for' (I read somewhere that it is improper to end at 'for').     The problem is hard as there are many sources of failures, and all   would have to be accounted for.   Please suggest alternative.


Show $\int _ 0 ^\infty \frac {\sin ( x^2 + ax )}{ x } dx$ converges for $a\ge 0$

I want to show that $f(a) = \int _ 0 ^\infty \frac {\sin ( x^2 + ax )}{ x } dx$ converges for all $a \ge 0$ and $f$ is continuous on $[0, \infty ) $.


I have created 3 quick actions using 1 lightning controller.If one action button is clicked then i have perform operations if other then perform some other operation.  But I have to implement all these in a single Lightning controller. In order to do this i need the quick action name to know which action to perform. Please help me on how to get the quick action name in lightning controller?


How do I create a bootable multiple OS DVD in Ubuntu?

I have downloaded a set of linux operating systems that include Ubuntu 15.04, Linux Mint 17, Fedora 21, ArchLinux and Bodhi linux. In totla, all sum up to a size of 4.4 gigabytes. Now what I want to do is to create a bootable dvd that would contain all these OS on it. And when I boot to the DVD, it should show me a menu for choosing the OS to install.


Command not found when trying to run a script with sudo while configuring Arduino

I'm working on 16.04 and trying to setup the Arduino IDE for use with a Genuino 101. I have the IDE installed, v 1.8.2, in my home folder. It compiles sketches and picks up the board serial number as well as other details correctly. According to the Arduino site, one needs to execute  sudo ~/.arduino15/packages/Intel/tools/arduino101load/1.6.4+1.18/scripts/create_dfu_udev_rule   inside a shell to gain upload permissions.  When I execute this through the terminal I get the error message   sudo: /home/16737547/.arduino15/packages/Intel/tools/arduino101load/1.6.4+1.18/scripts/create_dfu_udev_rule: command not found   Is this command looking for v 1.6.4 of the IDE? I have tried to modify the command to   sudo ~/.arduino15/packages/Intel/tools/arduino101load/1.8.2+1.18/scripts/create_dfu_udev_rule   but it did not resolve the error message.


Why k-means algorithm tends to fail on elongated dataset?

I am studying k-means algorithm and don't understand why  k-means algorithm tends to fail on elongated dataset? Such as a bivariate normal dataset with covariance really large on one of the directions.


Why not an s on "speed" in "Ukraine speed to test new-look Germany defence"

links to an Australian article (sourced from Reuters) about a football team. The article has the following title:     Ukraine speed to test new-look Germany defence   I understand that the word "speed" is a verb here. However, why not "speeds"? Since "Ukraine" is a singular noun, I expect it to be "Ukraine speeds".  UPD. Thanks to the detailed comments and answers below, it turns out the question is not about collective nouns, but rather about "speed" being a noun and not a verb.  UPD2. As noted in comments replying to my UPD above: Not necessarily! If the rest of the article were in American English, yes, it would clearly be a noun. But the rest of the article is clearly written in British English or similar and "Ukraine" as an identifier for the team is a plural noun in BrEng. (We know it's BrEng because it says "Ukraine... are certain to test...") So it really could be either, the only way to be sure would be to ask the author their intent.  Now I'd really like to find out from the author!


Why does uniform continuity of a function imply that the function is bounded?

As the title states, I'm wondering why:  If $A$ is a bounded subset of $\mathbb{R}$ and $f:A\to \mathbb{R}$ is uniformly continuous on $A$, then $f$ must be bounded on $A$.  Proof:  Since it is uniformly continuous, the function is a Lipschitz function.  $|f(x)-f(y)| \leq L|x-y|$.  Since $A$ is bounded, $|x-y|$ does not get arbitrarily big and that too is bounded by a constant. Let $|x-y| \leq M$.  Then we have a Lipschitz condition where   $|f(x)-f(y)| \leq LM$.  The function is then bounded by the product of two constants, $LM$, which means that it is bounded. Can someone check this?


I have an HP Deskjet with integrated scanner. It has a "Scan" button on its top, but this button does not interact with the xsane program on my Debian machine: To get a page scanned, I have to initiate the scanning process from xsane.  Is there a setting (or a scan program) that allows me to press the scan button and cause the program to scan a page?


You know when you see something touching and moving and you feel like tears are about to come out of your eyes, yet you're able to barely control it; how do you describe this feeling or state?  i.e. I was all [...] at the sight of his master curled up asleep in fetal position on the floor at the vet's beside his dog.  Take a look at this and you'll know what I'm talking about:


Why doesn't the work done by atmosphere contribute to increase in internal energy of gas?

Say that I have a vertical thermally insulated cylinder which contains an ideal monoatomic gas under a weightless piston and the system is initially in equilibrium.   Now if a load of weight $W$ is kept on the piston,the piston would fall by some distance and the system would attain a new equilibrium. It is intuitive that the sum of the work done by gravity and the work done by atmospheric pressure would change into internal energy of the gas.   However, my book mentions that only the work done by gravity goes into the increase in internal energy of gas. It does not say anything about where the atmospheric work would go. Why is it so?


radio button condition based on selection

I have a radio button with an id="pay" and a function that i need to be executed if the radio buttton is selected.Any help?  function getMn() {     var int = document.getElementById("pay").value;     return int; }


How can I store /var on a separate partition?

I'd like to store /var on a separate partition from /. What is the correct way to set this up?


Solution Explorer doesnt show the folder although the folder is present in my local drive (local copy) Visual studio

I have copied the source code from source control explorer to my local drive. the mapping is done and i am able to work on the code and build it. However, there are some files which doesnot show up in the Solution Explorer although it shows in the local copy of drive.  I tried to refresh it and i cannot get the correct folder structure in solution explorer. Any advice how to get it ??


Is layover time 1.5 hours in Dubai is long enough for connection to Hyderabad

I'm plannning to travel with the family of 3 persons from JFK to Hyderabad with 1.5 Hours of the layover in Dubai, all are Emirates. I'm wondering can I make my connection to Hyderabad. Any possible delays please suggest.


How do I wipe and set up donated laptops with Ubuntu?

I run an organisation that cleans data from donated laptops and reinstalls minimal operating systems and office for poor schools in rural India.  I plan to boot and wipe the laptops I receive, but I don't know what to do after that to install Ubuntu. Which release/variant/version should I burn onto CD/DVD?  In terms of software, would like to install at least OpenOffice on the laptops.


How to clone block (rows, button) with events for every button?

I have a table. I want dynamically clone block (several rows with buttons (+, -) in tbody, and these buttons have to add/delete a row,  but it adds incorrectly. It is necessary for me that each button added a line in the block but not in another. Help me, please.    $('.wrapper').on('click', '.deleteBlock', function() {   $('.deleteBlock').closest('.wrapper').find('.rowToClone2').not(':first').last().remove();   $('.deleteBlock').closest('.wrapper').find('.rowToClone3').not(':first').last().remove();   $('.deleteBlock').closest('.wrapper').find('.rowToClone4').not(':first').last().remove(); }); $('.wrapper').on('click', '.addBlock', function() {   $('.addBlock').closest('.wrapper').find('.rowToClone2').first().clone().find("textarea").val("").end().appendTo('.bodyToModify');   $('.addBlock').closest('.wrapper').find('.rowToClone3').first().clone().find().end().appendTo('.bodyToModify');   $('.addBlock').closest('.wrapper').find('.rowToClone4').first().clone().find("textarea").val("").end().appendTo('.bodyToModify'); }); $('.bodyToModify').on('click', '.deleteRow', function() {   $('.deleteRow').closest('.bodyToModify').find('.rowToClone2').not(':first').last().remove(); }); $('.bodyToModify').on('click', '.addRow', function() {   $('.addRow').closest('.bodyToModify').find('.rowToClone2').first().clone().find("textarea").val("").end().insertBefore('.rowToClone3'); });

         <textarea id="text" rows="2" name="str1"></textarea>	         <textarea id="text" rows="2" name="str2"></textarea>	         <textarea id="text" rows="2" name="str3"></textarea>	         <textarea id="text" rows="2" name="str4"></textarea>

         <input type="button" class="addRow" value="+" ; style="width: 50px">	         <input type="button" class="deleteRow" value="-" ; style="width: 50px">

         Result	         <textarea id="text" rows="2" name="str2"></textarea>	         <textarea id="text" rows="2" name="str3"></textarea>	         <textarea id="text" rows="2" name="str4"></textarea>

   <input type="button" value="add" class="addBlock">   <input type="button" value="delete" class="deleteBlock">


Why do I get so many visitors from Germany?

This has bothered me for a long time as it puts my sites bounce rate up.  I am based in the UK and my business covers this country and no others, so I have never advertised outside of the UK but for some reason I get 21% of my traffic from Germany.  The German visits all have something in common, they are always direct, they always land on the home page, they never open any other page and the visit never lasts even a second so it gives me reason to think it is some kind of bot?  I really want to stop this so I have try to improve my sites bounce rate but I can't figure out why this is happening.  Below is a picture of my top two countries and you can see how different the visits are from Germany.


Please Stop the 'questions need votes too' pop-up, it's becoming VERY annoying

I see that we're trying to 'remind' folks to vote on questions by doing a small pop-up whenever we vote up answers (presumably this is only for folks like me who haven't voted up a question in a while).  Can we please find some less-annoying way to do this? Perhaps one of those page head banners when I open the site? The pop-up when voting on answers is EXTREMELY annoying and I'd really like it to stop.  I understand the desire to motivate people to vote on questions, but I've always felt that SO & friends have done well with 'making the right thing easy' rather than 'beating the users until they do what we want'. Don't change that focus now, please.  Updated: since some folks find the banners more annoying than the pop-ups, perhaps a message in the inbox for folks who haven't voted up a question in a while? I don't necessarily care how the reminder is issued, I just want it to NOT be the pop-up!


Should I sign, watermark or otherwise label a framed print? And if so how?

I have an opportunity to show some of my work in a small local coffee shop.  Are there any guidelines/practices to signing, labeling or watermarking a photo which is to be on display?  Or should a photo be signed, labelled or marked at all? Is signing the back of the photo and showing my name on a separate card below the frame itself the "better" way to do this?   I noticed many people on the web put a very noticeable watermark with their logo, copyright and name right on the photo.  Personally, I find this distracting as it often ruins the photograph itself often turning what could be art to kitsch. Painters most often sign the painting itself but this to me is not distracting because it is done with the painter's own hand and it often "works" with the painting.


I have a cube positioned at Z-axis = 0 like this    Now I scale the cube 3 times and then I get this    How to scale that the cube is enlarged 3 times along the Z axis and stays at Z = 0 ? Like this


My Windows 7 Lenovo laptop won't detect my iPhone 4S but it will charge it?

For the last 5 months my iPhone 4S won't connect to my Windows 7 Lenovo laptop or iTunes. It will charge in 2 of my USB ports, and I've tried 3 different cables.   I've tried following tips off Apple support and also from Google but still no joy.


Finite group for which $|\{x:x^m=e\}|\leq m$ for all $m$ is cyclic.

Let $G$ be a finite group. For each positive integer $m$, if $x^{m}=e$ has at most $m$ solutions in $G$, $G$ is cyclic.   What I have thought is that $n=\sum_{d\mid n}\phi(d)$ can be used to solve this and showing that $|G|$ order element in $G$ exists is enough.


I checked by ls -al in my home directory but I don't see .bashrc file in my home directory. Ubuntu 18.04 release notes does not mention anything about this. I installed it without formatting previous /home partition after deleting files like .bash_, .local, .gnome, etc. I am able to use the pc like normal but where is the bashrc file now? Isn't it supposed to be recreated automatically?


Why $x^{p^n}-x+1$ is irreducible in ${\mathbb{F}_p}$ only when $n=1$ or $n=p=2$

I have a question, I think it concerns with field theory.     Why the polynomial $$x^{p^n}-x+1$$ is irreducible in ${\mathbb{F}_p}$ only when $n=1$ or $n=p=2$?   Thanks in advance. It bothers me for several days.


On the , there's a subsection called "All GNU packages" which lists the various software in the GNU project.  Are there any GNU distributions which use only these packages -- i.e. a "pure" GNU operating system that runs on only GNU packages?  I'm not particularly interested on whether this would be a practical operating system, just if it's theoretically possible to run GNU Hurd with purely the GNU packages. If not, what kind of software must still be implemented to achieve this goal (i.e. what's missing)?  If GNU Hurd is the limiting factor, than if an exception is made for the kernel, would a pure GNU OS be possible using the Linux kernel?


Is there a strong cryptographic reason for GCM's 2^39 - 256 bit limit?

In reading through the original GCM specification (), the composition of the 128 bit Initialization Vector as a concatenation of a 96b nonce and a 32b unsigned wrapping counter seems arbitrary and forces the scrambling pattern to repeat every 232 16-byte block.  Is the algorithm expected to be secure for significantly longer stream lengths if for example the IV were a 128b nonce XORed with a 64b or 128b counter, or are there known cryptanalysis issues that begin to arise?


How to prove that the matrix $A^k$ approaches $0$ as $k$ approaches infinity

First of all, what does it mean to say an eigenvalue is "less than unity"? I'm not exactly sure what this means.  Secondly, how do I show that  $\lim_{k\to\infty} A^k=0$ given that all eigenvalues of $A$ is less than unity?


What is the difference between summarizes and summarises?

Possible Duplicate:             Each post has an indicator which summarises who the post is shared.    What is the difference between these two terms? Should I write summarises or summarizes?


I am trying to interrupt a form submission to test field for alphanumeric characters. After googling i found a lot of this implementation for regex that everyone claims works great...  if( !jQuery('input[name=myUsername]').val().test(/^[a-zA-Z0-9]+/) ) {         alert('ERROR: Your username contains invalid characters. Please use numbers and letters only. No spaces, no punctuation.');         jQuery('input[name=myUsername]').focus();         return false; }   However, this ONLY returns false and creates an alert if the value STARTS with a non-alphanumeric character.  If i enter "bo$$"  it allows it as alphanumeric even tho $ is not an alphanumeric character... If i enter "$$ob"  it fails and alerts.  How do i fix this so that it will fail for ANY invalid character in the entire value? I've tried .match()  instead of .test() but same issue im assuming it's something in the regex that is wrong


Solve   $$ \int\frac{dx}{(1+x^4)^{1/4}} $$   Set $t=\log x\implies x=e^t\implies dt=\dfrac{dx}{x}$ $$ \int\frac{dx}{(1+x^4)^{1/4}}=\int\frac{\dfrac{1}{x}dx}{\big(\dfrac{1}{x^4}+1\big)^{1/4}}=\int\frac{dt}{(e^{-4t}+1)^{1/4}} $$ Set $e^{-4t}+1=y\implies-4e^{-4t}dt=dy$ $$ I=\int\frac{e^{-4t}\,dt}{e^{-4t}(e^{-4t}+1)^{1/4}} = \frac{-1}{4}\int\frac{dy}{(y-1) y^{1/4}} $$  The solution given in my reference is $$\frac{1}{2} \left(\dfrac{1}{2}\log\dfrac{1+z}{1-z}-\tan^{-1}z\right),\quad z=\frac{(1+x^4)^{1/4}}{x}$$  How do I see what substitution to choose in order to find such a solution ?