I have the lenovo helix, with a built 3g chip that features a GPS. So far every map app in the windows store is giving me the wrong location. It is in the same country, but far off. My phone is much more accurate. Why isn't this working properly?   The chip is listed as a geolocation sensor.   Edit: The "my location" in the win8 map metro app gives me some generic geo ip location. Shouldn't the internal GPS take precedence over that?

I have been googleing a lot. As far as I can tell it will require a lot of work to get the internal GPS chip in my lenovo helix working with any kind of map software. The new stuff is that in windows 8 the internal GPS is a sensor, and not available via the COM port interface. Most software uses the old COM port stuff. The new software from the app store in windows 8 uses the windows location service, which seems to be ignoring the internal chip all together. None of the apps in metro can get accurate coordinates. Just Geo locate by city using IP. This is so bad. Is the GPS functionality useless? Who is at fault, Lenovo or Microsoft?   Edit: I think I fixed it, part of it at least. Under device manager, all you have to do is de-activate and re-activate. Then it will work. It stops working after a couple of minutes. But now at least antenna malfunction is out of the question! Yey!


'There isn’t a day that goes by in which I’m not trying to solve a problem.'   Question: How do you use 'in which' here? Are there any similar examples for the usage of 'in which'?

I am confused about when to use:  'which' vs 'in which' vs or 'that'?    Would you please explain it as a writing rule? Here I have an example:       Authors reported shortened growth period and slower radial growth rate for low soil water potential which is directly attributed to the decrease in water potential, rather than to the constraints on carbon availability.


"That's why you did this!?"  That's obvious a question, but no question form is used? Shouldn't it be something like  "is that why you did this?"

I have often noticed people who make statements, actually ending with a question mark when written, but where there is no actual question asked.    The question is implied sufficiently enough in the context of the statement, and/or the previous statement that the question portion can be omitted.  Some examples:     Sandra: I'm not walking to the theatre as I didn't bring a jacket.Julie: I have a spare jacket?   In the above, it is clear that Julie is asking "would you like to borrow my spare jacket so that we can walk to the theatre".     Paul: We aren't going to Pizza Hut at lunch as it's too far to walk in an hour.Dave: I have my car today?   Again, it is clear that Dave is offering to drive and asking if that is an option.  Is there a term to describe this?


If I have the plane $\pi:x+y-z-1=0$ and the two points $A:(1,1,1), B:(2,1,2)$ as two vertices of an equilateral triangle in the plane $\pi$. How can I find all (I'm assuming only 2?) sets of coordinates for the vertex $C$. Note that $A,B,\text{ and }C$ lies in $\pi$.  I've noted that $\vec{AB} = (1,0,1)\iff ||\vec{AB}||=\sqrt2$     Let $Q$ be midpoint for $\vec{AB}$, i.e. its coordinates are $\frac{1}{2}(A+B) = (\frac{3}{2},1,\frac{3}{2})$. The plane has the normal vector $\vec{n} = (1,1,-1)$   $\therefore$ The line which goes through $Q$ and $C$ is orthogonal to $\vec{n}$ and $\vec{AB}$. We call this line $L$.  $$\vec{n} \times \vec{AB} = (1,-2,-1)$$   Using this and that the point $Q$ lies on $L$ we get the equation for $L:$   $$L = (\frac{3}{2}+t,\,1-2t,\,\frac{3}{2}-t)$$  So combining this with the fact that $||\vec{QC}||=\frac{\sqrt{3}}{2}||\vec{AB}|| = \sqrt{\frac{3}{2}}$ as $||\vec{AB}|| = \sqrt{2}$. We can now put $||L(t)|| = ||\vec{QC}||$.  $$||L(t)|| = \sqrt{\left(\frac{3}{2}+t\right)^2 + \left(1-2t\right)^2 + \left(\frac{3}{2}-t\right)^2} = \sqrt{6t^2-4t+\frac{11}{2}} = ||\vec{QC}|| = \sqrt{\frac{3}{2}}$$  $\therefore 6t^2-4t+\frac{11}{2} = \frac{3}{2}$  This equation has no real solutions for $t$. What am I to do with this result? Did I do something wrong, or must the solutions contain imaginary units?

An equilateral triangle lies in the plane $x + y - z = 1$ and corners in points $(1, 1, 1)$ and $(2, 1, 2)$. Determine all possible positions of the third corner?


I have GeForce GT610. I saw the settings of Nvdia control panel and add Blender for CUDA support but Blender 2.8 is not recognized my graphics card.

I bought my computer two years ago. In 2.79 or earlier I can see my quadro 6000 listed in the CUDA settings but now, starting with 2.80 I cannot see it. Is there any way to fix this problem? I am using Windows 10 and I already updated my driver, but still, no change.  Thank you!


I want to remove Windows 7 from my existing system and do a fresh install of Ubuntu 15.10 LTS. I have given this a few attempts and and I have chosen the option that says "Erase everything and Install Ubuntu."   It then prompted me to reboot. After a reboot, nothing appears to be loaded and it's stuck on a black screen with a blinking typing bar and its not interactive!  I can't load up the boot menu because nothing appears to be loading.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Help with the following problem would be appreciated:  Let $p(z)$ be a polynomial over $\mathbb{C}$ with at least two distinct roots. Prove that no connected component of the set $\{z \in \mathbb{C} : |p(z)|=1\}$ is a circle.

What is the general form of a rational function which has absolute value $1$ on the circle $|z|=1$? In particular, how are the zeros and poles related to each other?   So, write $R(z)=\dfrac{P(z)}{Q(z)}$, where $P,Q$ are polynomials in $z$. The condition specifies that $|R(z)|=1$ for all $z$ such that $|z|=1$. In other words, $|P(z)|=|Q(z)|$ for all $z$ such that $|z|=1$. What can we say about $P$ and $Q$?


Using "ignore this user (everywhere)" option in chat hides all messages from selected user in the feed.        But it doesn't affect star board. I.e. if ignored user has starred message it's visible anyway.   Is it normal behaviour for such option?

When you ignore a user, you don't want to read their posts.  However, if messages by such users get starred, they do show up in the sidebar list of starred messages even though you ignore them.


I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Hi Greetings for the day. using the below code ,I have test the Rest callouts by using Stub API .Test class has been completed with out failure but received code coverage Zero.how to test the Rest Callouts by using Stub API. Code: public class AnimalsCallouts {               public  HttpResponse makePostCallout() {         Http http = new Http();         HttpRequest request = new HttpRequest();         request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');         request.setMethod('POST');         request.setHeader('Content-Type', 'application/json;charset=UTF-8');         request.setBody('{"name":"mighty moose"}');         HttpResponse response = http.send(request);         // Parse the JSON response         if (response.getStatusCode() != 201) {             System.debug('The status code returned was not expected: ' +                 response.getStatusCode() + ' ' + response.getStatus());         } else {             System.debug(response.getBody());         }         return response;     }         }   @isTest public class MockProvider implements System.StubProvider  {          public Object handleMethodCall(Object stubbedObject, String stubbedMethodName,          Type returnType, List<Type> listOfParamTypes, List<String> listOfParamNames,          List<Object> listOfArgs) {        system.debug('stubbedMethodName:'+stubbedMethodName);       if(stubbedMethodName == 'returnAcc'){           List<account> aa=new list<account>();           for( integer i=0;i<=10;i++){               Account a=new Account(Name='acc'+i);               aa.add(a);           }           return aa;       }             if(stubbedMethodName == 'makePostCallout'){                HttpResponse response = new HttpResponse();         response.setHeader('Content-Type', 'application/json');         response.setBody('{"animals": ["majestic badger", "fluffy bunny", "scary bear", "chicken", "mighty moose"]}');         response.setStatusCode(200);         return response;                      }       return null;    }          }   @isTest private class AnimalsCalloutsTest {  @isTest  private static void testPostCallout(){          AnimalsCallouts mockDS = (AnimalsCallouts) Test.createStub(AnimalsCallouts.class, new MockProvider());         HttpResponse res=  mockDS.makePostCallout();     system.debug('res:'+res);              } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  How do I unit test code that includes a SOAP or REST-based callout, or indirectly calls code that makes a callout? I'm getting an error saying that callouts are not supported.


I have a JTable, which was built in Netbeans, with a column that is set to Boolean value. To obtain the rows that were checked, the user has to click the 'Reorder' button which checks the table to see which rows were selected.  The code that is supposed to find the stock id based on if the JCheckBox is checked is as follows:     for(int i=0; i<jTable2.getModel().getRowCount(); i++){       boolean check = (Boolean) jTable2.getModel().getValueAt(i, 4);       if(check){             Object o = (Object)model2.getValueAt(i, 0);             int stockID = Integer.parseInt(o.toString());             System.out.println(stockID);         }     }       Note that model2 is jTable2.getModel(). The above code throws the NullPointerException. If I print out    jTable2.getModel().getRowCount()   I will get the accurate row count. If I print out   boolean check = (Boolean) jTable2.getModel().getValueAt(2, 4)   I will get the accurate boolean value. But it throws the exception when I use the code in a for loop.

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


On July 14, 2018 our Spirit Airline Flight #263 was delayed for over 4 hours. We were flying from BWI to Seattle, WA. The flight was supposed to leave at 7:20 AM. I would like to know what time the flight actually took off.

Where can I find historical data on flights, specifically Delta international flights?  I need to find out about cancellations, diversions and any other flight data pertaining on particular route at a given time.  This source has to be official and stand up to legal scrutiny.


If you change the post number in any question URL to a number of a deleted question, you will be redirected to a 404 page, but the URL in your address bar will change to contain the title of the deleted question.  Example URL, try it in private browsing mode:   Works with "q" and "a" links too, but not "posts" links.  This works while logged in, but the fact that it also works while logged out, in my opinion, is much worse.

Alternative and much more boring title: Should a 404 result reveal the post title?  I ran across some odd behaviour today. When manually entering a Stack Exchange URL into the address bar1, if you pick a post number that has been deleted then you still see the old post title along with the 404.  For example, I entered:   http://webapps.stackexchange.com/questions/34 and the resolved address came back as http://webapps.stackexchange.com/questions/34/what-is-the-best-empire-avenue-stock-to-buy And http://stackoverflow.com/questions/3 came back as http://stackoverflow.com/questions/1/where-oh-where-did-the-joel-data-go/3#32   Note, I'm obviously not a 10k+ user on either of those sites, which is why they 404'd  It's not that big of a deal, but it seems like this leaks information about the site(s) that we may not want exposed.  And since a picture is worth N words:   Stuff I probably shouldn't be able to see is highlighted.  1And why was I manually entering posts like that? Because I was trying to find a benign 404 example from  that I could share with others because I think their 404 image is hilarious.  2And where did this fabled Joel data go?  Inquiring minds want to know!


I'm trying to show that $\hat{y} = X(X^TX)^{-1}X^Ty = \tilde{X}(\tilde{X}^T\tilde{X})^{-1}\tilde{X}^Ty$, where each column in $\tilde{X}$ is normalized by subtracting the mean and dividing by standard deviation. Is this even true?

In some literature, I have read that a regression with multiple explanatory variables, if in different units, needed to be standardized.  (Standardizing consists in subtracting the mean and dividing by the standard deviation.)  In which other cases do I need to standardize my data?  Are there cases in which I should only center my data (i.e., without dividing by standard deviation)?


Is it possible to create a function that returns the name of variable like .ToString() return the string value of a variable.  static class myExten {     public static string ToName(this object o)     {         ///some code that returns the name     } }  static void Main() {      string country = "India";      string variableName = country.ToName(); }   Many thanks for your attention.  Edit As my question is being marked duplicate, I am trying to explain how my qestion is diffrent  I have a generic function that returns a bool value(given below)      static public bool stateNameExists(string name)     {         return SQL_Functions.AlreadyExists("**state_name**", table, name);     }       public static bool AlreadyExists(string column, string table, string value)     {         string qry = "select count(" + column + ") from " + table + " where " + column + " = '"+value+"'";         string result = execute_scaller(qry);          try         {             if (Convert.ToInt16(result) > 0)             {                 return true;             }         }         catch         {             return false;         }          return false;     }   Please pay attention at stateNameExists function. In this function I am hardcoding the column name "state_name"  I have a model class  class stateModel {    public int id [get; set;}    public string state_name {get; set;} }   I want to pass the name of column using model object like this SQL_Functions.AlreadyExists(obj.state_name.GetName(), table, name);  that's why I asked for an extension function.  P.S: I can not use c# 6.0 tricks here.  Note: If the question is still duplicate/already answered then please provide its link. Many and Many thanks.

Let me use the following example to explain my question: public string ExampleFunction(string Variable) {     return something; }  string WhatIsMyName = "Hello World"; string Hello = ExampleFunction(WhatIsMyName);  When I pass the variable WhatIsMyName to the ExampleFunction, I want to be able to get a string of the original variable's name. Perhaps something like: Variable.OriginalName.ToString()  Is there any way to do this?


There have been news items in 2013 about weather.com moving to Drupal. I have been reading  and I have been unable to find out if the site is still running on Drupal.  How can I find out if weather.com is still running Drupal?

I know how to check , but is there a way to tell if a site is built with Drupal 7?


Hi what language do I need to learn to start programming in unity? Can I learn it on code academy?

I am fairly familiar with Unity and I know how to work most of the features within it. But I don't know what programing languages to use for my Unity game. I have heard that it might be C#, but I am unfamiliar with C-sharp so I was wondering if Unity can use any other languages. I would not like opinions on which one to use, I just want to know what Unity supports.


I am looking for a literature advice about the following. I'ld like to review classical physics (basically all undergrad / grad stuff) under the aspects of a modern covariant formulation with exterior derivatives, covariant derivatives, Lie derivatives or Cartan's exterior covariant derivative.  What is the motivation? Instead of moving forward to general relativity theory as most textbooks do, I'ld like to see the machinery applied to physics I already know. I am well aware that all the different derivatives I have mentioned have different requirements on the manifold, however in classical physics the manifold in question is often $\mathrm R^3$ and fulfills all of them at once (except maybe in thermodynamics). I'ld like to see which formulation of the very same equation the author choose and why, basically what is his stand on which formulation gives the "best" physical interpretation of the equation at hand.  E.g. I have read parts of Theodor Frankel's Geometry of Physics in which he touches electromagnetism and elasticity. In his opinion in classical physics forces should be covecvors (1-forms) and not vectors because they fit much more natural to the concept of work.  Another example would be: for a scalar quantity $f$ we can write $$\Delta f=\star d\star d f=(d\delta +\delta d) f=\nabla^\alpha \nabla_\alpha f$$ while the lhs appears in standard textbooks, it might be favorable to use the second, third or fourth variant, because it will show a connection to similar types of equations easily or will stress properties of $f$ when written with $df$.  I hope the question is not unclear or too broad. I have not attached more than the basic tag to the question because in a sense it would apply too all classical fields.

I am a graduate student in mathematics who would like to learn some classical mechanics. However, there is one caveat: I am not interested in the standard coordinate approach. I can't help but think of the fields that arise in physics as sections of vector bundles (or maybe principal bundles) and would love an approach to classical mechanics or what have you that took advantage of this.  Now for the questions:   Is there a text book you would recommend that phrases the constructions in classical mechanics via bundles without an appeal to transition functions?   What are the drawbacks to this approach other than the fact that it makes computations less doable? (if it does that)   Are there benefits to thinking about things this way, ie would it be of benefit to someone attempting to learn this material to do it this way?


Which is correct? I like buying new gadgets. or I like to buy new gadgets.  If both are correct then what is the difference between them?

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


How do you disable escape to exit fullscreen?

Some apps (Safari, iTunes...) quits fullscreen mode on Esc keyboard shortcut. Is there a way to disable it? It interferes e. g. with web apps control resulting in unintentional quitting fullscreen when you just hit one more Escape than you should.


My 'AR' view in Pokemon Go doesn't work. Every time I switch it to on it gives me an orientation error. I found out that it could be because my phone lacks a Gyroscope.   My question is, will I be able to play Pokemon Go in AR mode?

When initiating a battle it starts off in AR mode, but then warns me saying my phone's orientation is not detected. I am then forced to turn off AR mode. Has anybody experienced this? If so, what are the solutions?    Per comments, I am unsure this is a permissions issue. I have everything turned on.


I downloaded the Ubuntu-13.04-Desktop-i386.iso (794.00Mo) file and burned it into a DVD of 4.7GB with a very low speed of burning.  Anyway the OS was bootable when I put the DVD the Ubuntu Installer appears it asks to choose language , try Ubuntu and Install Ubuntu.I chose Install Ubuntu. An OS detection and formatting disc step appears and it gives me options, install Ubuntu with Windows 7 , replace windows by Ubuntu ..etc.I choose Install Ubuntu with Windows 7 and a partition appears;   I don't really understand how to proceed?   I have a hard disc partitioned to 2 parts C:\ and D:\ .   C:\ size is 39.0 GB  the D:\ is 35.4 GB the free space on C:\ is 22GB/39GB   I have important files on D:\ drive. Please how do I install Ubuntu 13.04 with Windows 7 without loosing D:\ files and without loosing Windows 7 My Windows is : Windows 7 Ultimate 32 bit fr Thank you very much for your help

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


I'm doing a little 2D game in C++ with Direct3D 11.  In the game I want to render a sort of shadow that covers part of the screen:    To do this I am using this pixel shader:  float4 PS_Main( PS_Input frag) : SV_TARGET  {     float4 color = {0, 0, 0, 1};     for (int cont=0; cont<lights; cont++)     {         int dist = pow(frag.pos[0] - singleLight[cont][0], 2) + pow(frag.pos[1] - singleLight[cont][2], 2);          if (dist < singleLight[cont][3] * singleLight[cont][4])         {             color[3] -= 1 - (dist / (singleLight[cont][5] * singleLight[cont][6]));         }     }      return color; };   The constant buffer I pass to the shader is:  cbuffer PSbuffer : register( b0 ) {     int lights;     float4 singleLight[15]; };   I also pass an array to the shader, each element of which contains the position and radius of a light.  The code works with more than one light, but if I try to use more than ten lights the FPS drops down to 40 or 50. How can I optimize this effect?    Thank to all!! I try to optimize the pixel shader code but i earn 4-5 fps so i decide to to a "light map" in this way; I create a second Render Target View i will use to render the lights(sprite i draw). The light will be alpha-channel inverted in order to have to clear the render target view with color{0,0,0,0}; draw the light on the second target view like this: and then create a texture with this render target view and render it on the first with a shader that invert the alpha channel (color.a=1-color.a); but, since i am new in directx i dont now how to do it and i cant find a good tutorial.Can you help me??

I am thinking of writing myself a simple 2D game. It will not shine with perfect graphics or gameplay at first, but I'd consider it my first step in PC game development. So, imagine such simple sprite-based 2D game (like Heroes IV or Startcraft BroodWar).  I want the gameplay to support day/night with the according lighting changes and at the same time it will be madness to have to create sprites for every lighting nuance. So, I decided adding a semi-transparent layer on top of other objects will be enough.   The issue with this solution is if I have a light source object in the game (like the hero wearing a torch, or a burning building), there must be a lighter area around it, right? Since I am putting my semi-transparent layer over everything, how would you suggest to achive the torchligt visual effect I want? Maybe redraw that layer adding 'gaps' or differently colored areas based on the lighting effect?


How to prove that :  9 | $a_k+... +a_1+a_0$ implies that   9 | $a_k 10^k +... +a_1 10^1 + a_o 10^0$  where | denotes the divisibility sign (that is, I need to prove that if $a_k+... a_1+a_0$ is divisible by 9 then so is $a_k 10^k +... a_1 10^1 + a_o 10^0$).

I'm working through an elementary number theory course right now and I think I've come up with a proof here but wanted some feedback on my logic.    Question:  If the sum of the digits in base 10 is divisible by 9, then the number itself is divisible by 9.    Proof: Suppose that $9|d_1+d_2+...+d_n$ then $d_1+d_2+...+d_n=0\mod9$  Now consider $d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)$ Each power of $10$ is equivalent to $1\mod9$   therefor  $d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)=(1\mod9)(d_1+d_2+...d_n)$  $9|(d_1+d_2+...d_n)$ by our assumption, thus $9|(1\mod9)(d_1+d_2+...d_n)$  Thus we have shown that if 9 divides the sum of the digits in base 10, 9 divides the number itself.    The only question I really have is whether I'm jumping the gun on my assumption concerning the powers of 10 being $1\mod 9$.  I think this is fair game here but not 100% confident.  Thanks.


This question also includes the questions owned by the Community User (incase the user who first asked the question deletes the account).  Can the anonymous user accept an answer to his/her question?

I was recently browsing through my answers and found  question where the author indicated they were able to solve their issue with a solution similar to answer I provided.  Problem is that the original author account has been deleted and they can not mark my answer as the accepted answer.  How do you handle marking the answers for questions where the original author SO account has been deleted?


I've created my Instagram account by logging in through Facebook. Now whenever I have to log in from a laptop or a PC they say my password is incorrect (since they don't have a "login with Facebook option"). I tried using my Facebook password but it didn't work. What to do?

Do this:   On your phone, create an instagram account using Facebook log in. Now on your desktop web browser, log in using Facebook connect.  Now go to delete your account - edit profile -> I'd like to delete my account.    It will ask for your password.   But you never gave it a password in order to create the account.   I tried using my Facebook password, but that didn't work.   Any ideas? The Instagram account management seems quite broken.


I just ordered plain Ubuntu 14.04.2 LTS min on vServer VX11 from Hetzner.de and after apt-get update I get this error  Fetched 65.6 MB in 3s (20.1 MB/s)       perl: warning: Setting locale failed. perl: warning: Please check that your locale settings:     LANGUAGE = "en_US:en",     LC_ALL = (unset),     LC_TIME = "et_EE.UTF-8",     LC_MONETARY = "et_EE.UTF-8",     LC_ADDRESS = "et_EE.UTF-8",     LC_TELEPHONE = "et_EE.UTF-8",     LC_NAME = "et_EE.UTF-8",     LC_MEASUREMENT = "et_EE.UTF-8",     LC_IDENTIFICATION = "et_EE.UTF-8",     LC_NUMERIC = "et_EE.UTF-8",     LC_PAPER = "et_EE.UTF-8",     LANG = "en_US.UTF-8"     are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_ALL to default locale: No such file or directory Preconfiguring packages ...   This locale error happens with many commands. How to remove this error?

I am getting this message every time I do something like starting or stopping a service.  perl: warning: Setting locale failed.    perl: warning: Please check that your locale settings:            LANGUAGE = "en_US:en",            LC_ALL = (unset),            LC_MESSAGES = "en_US.UTF-8",            LANG = "en_US.UTF-8"        are supported and installed on your system.    perl: warning: Falling back to the standard locale ("C").    locale: Cannot set LC_CTYPE to default locale: No such file or directory    locale: Cannot set LC_MESSAGES to default locale: No such file or directory    locale: Cannot set LC_ALL to default locale: No such file or directory    (Reading database ... 21173 files and directories currently installed.)   Removing bind9 ...    * Stopping domain name service... bind9                                        [ OK ] Processing triggers for man-db ...    locale: Cannot set LC_CTYPE to default locale: No such file or directory    locale: Cannot set LC_MESSAGES to default locale: No such file or directory    locale: Cannot set LC_ALL to default locale: No such file or directory      How do I fix this error ?


There are N people in a room,  each wearing a different hat.  They all take their hats off,put them together and then each randomly picks one up.  What is the probability of no persongetting  their  own  hat  back  (denote  this  event  by  A)?  What  does  this  probability  become  as N→∞?

I understand the whole concept of Rencontres numbers but I can't understand how to prove this equation  $$D_{n,0}=\left[\frac{n!}{e}\right]$$  where $[\cdot]$ denotes the rounding function (i.e., $[x]$ is the integer nearest to $x$). This equation that I wrote comes from solving the following recursion, but I don't understand how exactly the author calculated this recursion.  $$\begin {align*}  D_{n+2,0} & =(n+1)(D_{n+1,0}+D_{n,0}) \\ D_{0,0} & = 1 \\ D_{1,0} & = 0  \end {align*} $$


Is there a way to write a dictionary using LaTeX: that is, how do you construct the shape of the paragraphs so that they look like so-called hanging paragraphs and that there is a certain spacing between them, i.e. two dictionary entries?

If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available.  This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors.  For instance, I like how Philipp Lehman's  looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished.  Your nominations, please ...


I       V(typ)      V(max) 525nm LED   0.03    3.5         4 562nm LED   0.05    2.3         2.7 660nm LED   0.05    1.8         2.2 940nm LED   0.1     1.5         1.8   I was wondering how I can drive all the LEDs with one voltage supply. I can only think of running them all in parallel which is bad.  note: Different than the possible duplicate. I understand that a resistor of value = (Vs - Vled)/(Max current) in series with the led will work for one led, but I want to run multiple different leds.

I understand that I can not connect an LED directly to a battery because it will draw too much current. Thus, there must be something else in the circuit to limit the current. What options are there? Are some methods more efficient than others?


I'm 18 years old, & I'm working on a new blog. I'm trying to get all of the help that I can get with English. This is the title that I'm planning on using for the first post:     Reasons for this blog's existence   I'm not sure if I'm supposed to use an apostrophe or not  to indicate something that belongs to an object.  Here's the questions that I need answers for:   Is it correct to use an apostrophe to show something that belongs to an object? Or are you only supposed to use apostrophes to show something that belongs to a person? Is "Reasons for this blog's existence" acceptable, or is only the form "Reasons for the existence of this blog" correct?

I know that to mark possession of an item you can use 's like in the following example:     The user's password shall not be blank.   However, is it correct to use the following:     The car's antenna is embedded in the windshield.   I seem to remember that possession must only be used for people but I'm not certain really.


I have read a lot of information about this topic, but I still don't know why my book says that the answer is "wasn't" in the following sentence:  If the driving test ___________ so difficult, there would be more accidents.  If this is a hypothetical case (the fact is the test is difficult, not easy), why does my book say the answer is "wasn't" and not "weren't"?

If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


I have the R output for the logistic regression model. It seems that only the intercept and psa are statistically significant. Does that mean I should remove sorbets_psa and cinko from my model and create a new model as new.model = glm(status ~ psa,family = binomial(link ="probit"))  Call: glm(formula = status ~ psa + serbest_psa + cinko, family = binomial(link ="probit"), data = data)  Deviance Residuals:  Min       1Q   Median       3Q      Max   -2.3285  -0.6773  -0.6261  -0.5604   1.9500    Coefficients:       Estimate Std. Error z value Pr(>|z|)     (Intercept) -0.9697009  0.2409856  -4.024 5.72e-05 *** psa          0.0444376  0.0094368   4.709 2.49e-06 *** serbest_psa -0.0440718  0.0250486  -1.759   0.0785 .   cinko       -0.0006923  0.0016984  -0.408   0.6835     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for binomial family taken to be 1)  Null deviance: 534.27  on 477  degrees of freedom Residual deviance: 477.07  on 474  degrees of freedom AIC: 485.07  Number of Fisher Scoring iterations: 6

I have several covariates in my calculation for a model, and not all of them are statistically significant.  Should I remove those that are not?  This question discusses the phenomenon, but does not answer my question:   There is nothing in the answer to that question that suggests that non-significant covariates be taken out, though, so right now I am inclined to believe that they should stay in.  Before even reading that answer, I was thinking the same since a covariate can still explain some of the variance (and thus help the model) without necessarily explaining an amount beyond some threshold (the significance threshold, which I see as not applicable to covariates).  There is another question somewhere on CV for which the answer seems to imply that covariates should be kept in regardless of significance, but it is not clear on that.  (I want to link to that question, but I was not able to track it down again just now.)  So...   Should covariates that do not show as statistically significant be kept in the calculation for the model?  (I have edited this question to clarify that covariates are never in the model output by the calculation anyway.)  To add complication, what if the covariates are statistically significant for some subsets of the data (subsets which have to be processed separately).  I would default to keeping such a covariate, otherwise either different models would have to be used or you would have a statistically significant covariate missing in one of the cases.  If you also have an answer for this split case, though, please mention it.


I current have a mortgage with less than 14 years on the term with an outstanding balance of approx 100k.  I will be moving house in the next few months, but the house I move to (purchase) will only be temporary (for maybe 2 - 3 years). The next house be more expensive so will probably increase the mortgage to 150 - 200k.  What would be the most appropriate mortgage term?  Initial thoughts suggest another short-term mortgage, i.e. 10 - 15 years, as this will build up more equity, but then if I take a longer term one (i.e. 30 years), it will give me more disposable income, which I can save and/or invest.

I've found similar questions, but they all seem to focus on a preexisting 30 year mortgage and whether or not it makes sense to refinance to a 15.  My question is a bit different.  I have not yet bought a house but I am trying to decide which mortgage to go with.  As a result, I don't have to consider refinance fees and a change in interest rate.   The situation is that I can afford the payment on a 15 year mortgage and would prefer not to pay off a house for the next 30 years.  So I was going to go with a 15.  However, in looking at some mortgage calculators (which it is possible I am looking at incorrectly) it seems that there is no difference in getting a 30 year mortgage and just paying it off in 15 years.  The calculators seem to say that--assuming the same interest rate--you will pay the exact same interest over 15 years.  As a result, my thinking is, I can get the 30 and pay it like a 15.  If there really is no drawback then this gives me the ability to pay the normal 30 year payment if needed due to financial hardship (loss of employment etc.)  So my question is, am I missing something?  If not, why would anyone ever get a 15 year instead of just paying off a 30 year in 15 years?  In summary: Does it really cost the same amount of money overall to pay off a 15 year mortgage vs paying off a 30 year mortgage in 15 years?  PS: Please don't suggest taking the 30 year and investing the extra money.  I know this is an option and the one many would suggest.  However, for the purposes of this question please only consider 15 year vs 30 year paid off in 15.


I'm running a discord bot, and I want my bot to run a task every hour on the dot. I tried using tasks.loop(hours=1.0), but the period of this loop is terribly inaccurate and gets even worse over time. How can I solve this problem?

I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?


Surely, if you have 2 surfaces interlocking then a horizontal force would also result affect the force of friction. It seems unintuitive that friction is only proportional to normal force.  Is there an intuitive proof of $F=\mu N$?

It is a general concept that horizontal forces can only influence physical quantities along horizontal direction; similarly vertical force can produce acceleration etc. only along vertical direction. This is the same concept that helps us study projectile motion as a combination of two independent motions. If this relation is universally true, how come, then friction depend on a force which normal to it?


I managed to reduce it to the form $$\cot(\frac{1}{7})<7$$ But I still don't know how to prove it

In proof of $\displaystyle\lim_{x\rightarrow0}\frac{\sin{x}}{x}=1$ is assumed that $\sin{x}\leq{x}\leq\tan{x}$ while $0<x<\frac{\pi}{2}$. First comparison is clear, arc length must be greater than sine value, but how about $x\leq\tan{x}$, why tangent is longer than arc?


In Javascript, I have an array of objects like so:  var array = [{ foo: 'bar' }, { foo: 'baz' }, { foo: 'qux' }];   which looks like this, really...  [0: {...}, 1: {...}, 2: {...}]   and I delete the second one:  delete array[1];   then I have this:  [0: {...}, 2: {...}]   How can I adjust this array so the keys are back in numerical order?

What is the difference between using  on the array element as opposed to using ?   For example:  myArray = ['a', 'b', 'c', 'd'];  delete myArray[1]; //  or myArray.splice (1, 1);   Why even have the splice method if I can delete array elements like I can with objects?


I was hoping to get information from the same question in another location but it never got answered and posting another question to it wasn't allowed.  So I'll just ask it again.  Windows 10 Minecraft Windows/Bedrock Edition - whatever it is called   I installed, setup, and ran the server on my main PC on my home network. My son fired up Minecraft on his computer also on the home network. He was able to easily connect to the server. I then connected to it on my Android phone with no problems. Since that worked I bought another copy of Minecraft to play on my PC, the same PC running the server. Minecraft on my PC doesn't even see it...there are no options for LAN under the friends tab. I read in the "bedrock_server_how_to.html" and in the other question here that I might need to run a command in the CMD as admin, but neither location mentions any special instructions other than that. I ran that command, in CMD, as admin.  CMD responded with "OK" I tried this with the server running and it didn't work. I then closed the server and tried it again, fired the server back up, fired Minecraft back up, still no luck.   How exactly should I get Minecraft on my machine to see the server?  Everyone else on the network can see it.  Internet works fine.  My old TF2 server works fine and I can play it from this machine. Etc, etc, etc.

I have a Dedicated Bedrock Server running on my PC, and I can't connect from the same PC where the server is. If I add it onto the list of servers, it appears as "Locating server" and never finds it.    If I try to connect, I get "Unable to connect to world".    On my friend's PS4, it appears on the Friends tab as a LAN Game on a Dedicated Server.    And also on my sister's laptop.


I am using Ubuntu 20.04.1. While installing Ubuntu for the Desktop, I read that 15-20 GB is more than enough for Filesystem root. But now I am facing this error: Low Disk Space on "Filesystem root" The volume "Filesystem root" has only 1.1 GB disk space remaining.  I tried all of the previous solutions. Unable to resolve this, without losing my data. Any suggestions?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I love tomatoes, and I like to put them in stuff like omelettes or to sautee them with sweet potatoes and other vegetables.  However, they "leak" so much fluid when they cook. When you sautee them in particular, they probably leak 50% of their weight in water. No matter what else you cook them with, they turn everything into a gooey mess.  What I've taken to doing is sauteeing them by themselves, then draining them, and setting them aside on a folded paper towel to absorb some water, before dumping them back into whatever else I'm cooking.  Is there a better way to do this?  Am I doing something wrong?

There are many questions asking on how to reduce the watering from (fresh) tomatoes in a dish or a sauce (most likely baked):    (mentioned in comments by SAJ14SAJ)      etc.   There are several ways to do that, but what are the pros and cons of each technique?


What is the (subtle) difference between the three ways to typeset unnumbered equations (if any)?  The first is the plain tex,  $$ E = mc^2 $$   The second is the LaTeX  \[ E = mc^2 \]   And the third is the AMS,  \begin{equation*}   E = mc^2 \end{equation*}   As far as I can tell, the end results are almost the same. If there's any difference, most likely in the spacing around the formulas. But I cannot find any concrete reference for the later two.

I once learnt, that it is uncool to use $$, but why is that? Why does \[ not act as a abbreviation to \begin{align}? I noticed, that there is a difference, since one cannot use & and \\ inside a block started with \[.


Any idea how to redirect from old domain  to new one using htaccess:  domain.example/A/B/some-file-bb-cc  to  new-domain.example/A/B/some-file-bb-cc

I need to (permanent) redirect all of the following:   www.example.com www.example.com/folder sub.example.com sub.example.com/folder   Basically, all URLs that are reachable without being intended to: www.new-example.com, I want to do this within Apache and using the mod_rewrite module via the .htaccess file.


I found myself difficulty in searching for "favorite questions"; can we place the list in the profile view?

What does bookmarking a question mean? How do you bookmark a question? Do users get updates on their bookmarked questions? Are my bookmarks publicly visible? How do you see your own bookmarks? How do you see other users' bookmarks? How do you see which users have bookmarked a particular question? What impact does the bookmark system have on the voting system? Can I "un-bookmark" a question? Can I search within my bookmarks?


If a photon travels at a speed of light and its massless then it must have no energy but this is not the case as we see in photo electric effect. Also help me to know what are photons made of, how are they created?.

As a student in a highschool physics class, my teacher has repeatedly told me that photons are massless. Yet, I have also heard from other sources that photons have momentum. If photons were to have momementum, that would mean that they have mass as according to p = mv.  Do photons really have mass?  Also, how would this mass be calculated?


I have Ubuntu 16.04 LTS (32 bits) installed in my Laptop (Lenovo Ideapad 300) and want to make a dual boot with Windows 10. The reason is that I need to use a software (Clip Studio Paint) which only works in Windows. I know about Wine but I don't want to take risks that prevent a full functionality of the program. The partition table that I have now is MBR.  I have done quite research on the Internet but did not find a specific tutorial for this. So, here is what I know, including the information  received here from the previous version of the question:   I could change to GPT partitioning and install Windows 10 in UEFI mode. In order to do that, without losing Ubuntu, this post may be useful (I have not tried it):  I could conserve the MBR partitioning and instead install Windows 10 in BIOS mode. For that I should create the bootable media for Windows with a tool that allows to boot it in BIOS mode. The best option coud be Rufus, following @RodSmith.    Advantages of choosing UEFI installation are cited in the answer given by @RodSmith and the corresponding comments. Since I am not a tech expert, I am by now considering the other way because it spares me of some risk associated to formatting the disk.

I recently have upgraded my PC, my new Motherboard (ASUS M5A99X EVO) uses UEFi instead of the regular MBR option.  I have a Ubuntu 11.10 installation that I did when I had my previous hardware (MSI MS 7267) , Ubuntu alone boots fine, and so does Windows 7, however Windows 7 is using UEFI (GPT) boot whereas Ubuntu is using MBR.  I have my OSs in separate drives, so that GRUB2 wont' get replaced by the Windows Bootloader and viceversa, as I said both OSs boot fine on their own, but to do that I have to disconnect one drive in this case the Ubuntu drive as it prevents Windows from loading.  Now my question is, How can I change/convert Ubuntu's drive so that instead of using MBR it uses GPT and allow Windows to boot?.   Preferably without reinstalling the whole system or lose any data.  And if I were to wipe the drive, How can I install Ubuntu in GPT, UEFI, whatever it is mode?.  I have used gdisk to convert from MBR to GPT, but now Ubuntu can't boot seems like grub just doesn't start.  I have re installed the OS, and the drive is GPT now by default however grup-pc is still being used instead of grub-efi.  How can i make Ubuntu boot from EFI?.


I want to ask why does a person feel weightless during free fall? Please give a specific  and clear answer, without making it complex.

Note: For the purposes of my question, when I refer to free fall assume it takes place in a vacuum.   From my (admittedly weak) understanding of the equivalence principle, falling in a gravitational field is physically indistinguishable from floating in interstellar space. This would make sense to me if gravity simply caused an object to move at a constant velocity. Moving at a constant speed, or floating in space, are just two different ways of describing an inertial frame, and are fundamentally no different. But free falling in a gravitational field means accelerating continuously, and doesn't an accelerating body experience a force? Then isn't free falling fundamentally different from floating in space?


I have a dataset which contains only categorical data i.e.A,B,C,D (like factors) for each predictor. There are 10 predictors and the dependent variable is binary, 0,1.   UPDATE: MY predictors are answers for multiple choice questions for a questionnaire. So each predictor only takes on categorical values, i.e. X_1 can be A,B,C or D, X_2 can be A,B,C,D,E,F,G or H.   Is it feasible to fit a logistic regression over this dataset?  Ideally, if I can fit a logistic regression the data, I will then use it for prediction over a set of test data, which again contains only categorical data.   What are the pitfalls that I should look out for?

I'm trying to play around with classification models and started off with logistic regression in R. When I have all the numeric variables in the data set the model works correctly and I was able to interprer the results.  The question is, with another data set I have more than 5 variables which are categorical but they are important though.   1) How do I deal with the variables with categorical values? the total unique categorical values are more than 100 for almost 5 predictors.  2) My dependent variable is having 3 classes, is it okay to using logistic regression for this purpose? (I would still need to explore other classification techniques but right now I'm exploring logistic regression.


I've been trying to test the changes to Guest User access in Spring 20. In doing so, I've created a scratch org on Spring 20 and tried to create a Site to test with. However, it comes with options that are both confusing and apparently undocumented. I made my scratch org with a basic scratch org def: {   "orgName": "Spring-20-Guest-Test",   "country": "GB",   "edition": "Developer",   "features": [     "Sites"   ] }  Then I went to Sites in the setup UI and clicked "New". At which point it asks me to choose the Site Type as either "Guest User License" or "Guest":  What do these mean? Which one is like a Site created prior to Spring 20 so that it represents a realistic test of what will happen to existing sites after the release?

When I first set up a site, I am always given the option to have the the type of new site be 'Guest' or 'Guest User License'.  I have not been able to find any documentation on what the difference is.  Does anyone know?


If Jedi can use the force to pick up very large objects while performing other actions, what prevents them from using their ability to pick themselves up and fly?

In The Empire Strikes Back Yoda uses the Force to lift Luke's X-Wing out of the water and put it on land.  In Attack of the Clones and in many instances in the second series of The Clone Wars, Anakin (and others) use the Force to jump higher than they could otherwise, or to jump from very high locations, but I don't think I've ever seen the Force used for outright self-levitation.  But if Yoda could lift the X-Wing, shouldn't a strong Jedi be able to lift himself and, essentially, fly with the help of the Force?


I cannot change the order of columns in a SharePoint list and cannot figure out how to.  In the list settings, it is not shown as an option.  Can anyone please advise? thanks.

I want to change the column order visible when viewing or editing a list item. I have accessed the "Column ordering" interface via the list settings page on other lists in the past, but it isn't visible in this list's settings.


In calculus we learn about the substitution method of integrals, but I haven't been able to prove that it works. I mainly don't see how manipulations of differentials is justified, i.e how $dy/dx = f(x)$ means that $dy = dx * f(x)$ so $dx * f(x)$ can be substituted for $dy$, since I thought that $dy/dx$ is merely notation and that $dy$ and $dx$ don't actually exist.

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I am trying to learn a very simple sequence using an RNN (implemented in Keras)  The input sequence is randomly generated integers between 0 to 100:  x=np.random.randint(0,100, size=2000)   while the expected output value for time t is the (t-2)th input term i.e:  yt=xt-2  such that an example dataset looks like this:   +------+------+ |  X   |  Y   | +------+------+ |    0 |   NA | |   24 |   NA | |   33 |    0 | |    6 |   24 | |   78 |   33 | |   11 |    6 | |    . |    . | |    . |    . | +------+------+   Note: I drop the NA rows before training.  I am trying to train a simple RNN to learn this sequence as below:  xtrain=np.reshape(df['X'], (df.shape[0], 1, 1)) #to match dimension of input shape for SimpleRNN layer.    model=Sequential() model.SimpleRNN(2, input_shape=(None,1))) model.add(Dense(1)) model.compile(optimizer='adam', loss='mse') model.fit(x=xtrain, y=df['Y'], epochs=200, batch_size=5)   however, I find that this implementation results in a local minima which predicts constant value(~50) for all test observations.  Could anyone help me with the right way of implementing a basic RNN in Keras to learn this sequence?

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


I am writing a paper for IEEE conference. I would like to know how to insert some unicode text into the paper. The primary language of the paper is English.

I am writing a paper for an IEEE conference using IEEEtran.cls. The primary language of the paper is English but my work deals with Bengali language. I want to know how do I insert some Bengali words such as পারে in the paper.


I have the following three tables in MySQL: Store, Groups, StoreGroup. A store can belong to several groups. StoreGroup is the link table that records the groups a store belongs to. The Groups table has the following fields:  +------------+----------------------------------+------+-----+---------+----------------+ | Field      | Type                             | Null | Key | Default | Extra          | +------------+----------------------------------+------+-----+---------+----------------+ | id         | int(11)                          | NO   | PRI | NULL    | auto_increment | | name       | varchar(255)                     | YES  | UNI | NULL    |                | | category   | enum('Area','Level','Temp')      | YES  |     | NULL    |                | | expireDate | datetime                         | YES  |     | NULL    |                | +------------+----------------------------------+------+-----+---------+----------------+   The link table StoreGroup that records each store's groups has the following fields:  +---------+-------------+------+-----+---------+-------+ | Field   | Type        | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | storeID | varchar(16) | NO   | PRI | NULL    |       | | groupID | int(11)     | NO   | PRI | 0       |       | +---------+-------------+------+-----+---------+-------+   However, even though a store can belong to several groups, it has a constraint that it can belong to only one group in one group category. For example, a store with storeID ABC can belong to both groups with groupID 1001 and 1002 since 1001 is from 'Area' category and 1002 is from 'Level' category. But it cannot be assigned to groupID 1003 because both group 1001 and 1003 are from the same group category 'Area' as shown below:  SELECT * FROM Groups;  +------+--------------+----------+---------------------+ | id   | name         | category | expireDate          | +------+--------------+----------+---------------------+ | 1001 | City A       | Area     | NULL                | | 1002 | Branch       | Level    | NULL                | | 1003 | City B       | Area     | NULL                | +------+--------------+----------+---------------------+   So when one wants to insert the record into StoreGroup table, the following is OK:  INSERT INTO StoreGroup VALUES('ABC', 1001); INSERT INTO StoreGroup VALUES('ABC', 1002);   But the following should fail because storeID 'ABC' cannot belong to both groups 1001 and 1003 since 1001 and 1003 both are from category 'Area':  INSERT INTO StoreGroup VALUES('ABC', 1003);    --This should fail.   So how to modify the table of StoreGroup or Groups to add this constraint so that assigning store to groups with same category will fail?

"Group" is a group of pupils. "Topic" is a topic of lessons.  To every group corresponds exactly one topic. (So there may be multiple groups per topic.)  To a pupil corresponds multiple groups, but maximum one group per topic.  How to implement this in terms of UNIQUE indexes and foreign keys in MySQL?


I have this code below:  #!/bin/bash  filename=$1 file_extension=$( echo $1 | cut -d. -f2 ) directory=${filename%.*}  if [[ -z $filename ]]; then     echo "You forgot to include the file name, like this:"     echo "./convert-pdf.sh my_document.pdf" else     if [[ $file_extension = 'pdf' ]]; then         [[ ! -d $directory ]] && mkdir $directory         convert $filename -density 300 $directory/page_%04d.jpg     else         echo "ERROR! You must use ONLY PDF files!"     fi fi   And it is working perfectly well!  I would like to create a script which I can do something like this: ./script.sh *.pdf  How can I do it? Using asterisk.  Thank you for your time!

I have a complex command that I'd like to make a shell/bash script of.  I can write it in terms of $1 easily:  foo $1 args -o $1.ext   I want to be able to pass multiple input names to the script. What's the right way to do it?    And, of course, I want to handle filenames with spaces in them.


I have a Schengen visa (type D) issued by Malta. If I have transit in Italy, of 6 to 8 hours, can I go out of the airport? Will the immigration police let me go out of the airport. cause malta is a ireland that why i want to visit italy first then by domestic flight i want to go malta? pls. help me....

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


int main() {     myClass obj;      ....    /* doing things */     ....      delete &obj; /* illegal */ }   Lets assume myClass is a proper C++ class with everything in place. Now, I know this is illegal and this program will crash in runtime. Fist thing is that code is trying to delete a stack object and then again after the scope finishes it will be destoryed once again. I want to know the internals of this illegal operation. i.e. what will happen with delete, will it call the destructor? It may look like crazy to you but please help me to understand.

Ignoring programming style and design, is it "safe" to call delete on a variable allocated on the stack?  For example:     int nAmount;    delete &nAmount;   or  class sample { public:     sample();     ~sample() { delete &nAmount;}     int nAmount; }


How one can define right vector space over Division ring $R$ ?  What properties it lack than the vector space over field? One thing which it lack is definitely commutative properties but what other properties it lacks?

When I was studying linear algebra in the first year, from what I remember, vector spaces were always defined over a field, which was in every single concrete example equal to either $\mathbb{R}$ or $\mathbb{C}$.  In Associative Algebra course, we sometimes mentioned (when talking about $R$-modules) that if $R$ is a division ring, everything becomes trivial and known from linear algebra.  During the summer, I'm planning to revisit my notes of linear algebra, write them in tex, and try to prove as much as possible in a general setting.   Are there any theorems in linear algebra, that hold for vector spaces over a field and not over a division ring? How much linear algebra can be done over a division ring?  Also, what are some examples of division rings, that aren't fields? $\mathbb{H}$ is the only one that comes to mind. I know there aren't any finite ones (Wedderburn). Of course, I'm looking for reasonably nice ones...


When I open a terminal, it appears at a seemingly random spot on my desktop. I then move it to where I want it.  How can I either make the terminal appear at the place I last left it, or make it always open at a specific place?   More generally, can this be applied to all applications?

I'm wondering is there any way to achieve the affect of the Ctrl-Alt-Keypad shortcuts in Unity using terminal commands instead? I want a command that sets a gui window to half the size of the screen, either left or right aligned.  By way of background, I'm writing a script that runs after log in. It uses Zenity to ask whether or not I want to open my development environment (GVim and IPython side-by-side). I have been trying to achieve two equal-sized windows for these programmes by using set lines= columns= in my .gvimrc and c.IPythonWidget.width = and c.IPythonWidget.height = in my ipython_qtconsole_config.py. However, there are problems associated with this approach.


On the Win8 machiene of a friend of mine he recently started experiencing short freezes. This includes his keyboard, mouse, teamspeak, and he appears to have a low framerate on games, even though the games state a reasonable framerate.  He tried rebooting, obviously, replugging his peripherals, and a full virus scan. His cpu usage and ram appear to be fine.  Any ideas?

A machine is described as being "really slow" or "freezing". How can I troubleshoot/resolve this issue? What should be the first steps to take?


I have downlaoded data from SAP and trying to do ETL. Data set looks like below.  11.780,00 13.824,00 0,00 33.024,00   I am trying to remove "dot" first and then replace "comma" with dot The following code makes the whole column as blank (everything just vanishes) It's just a simple regex replace statement sales = sales.withColumn('gross', regexp_replace('gross', '.', ''))  Again when I try as below sales = sales.withColumn('gross', regexp_replace('gross', '.', ':')) output looks like below  :::::::::::::  How do I handle this conversion. It's bit weird. Thanks.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


This is the second time this has happened.  Granted, it isn't the end of the world, but a little shocking when I find I had 1,266 rep, then a day later, 1,206.  I've checked my activity thoroughly, and not 1 action there which deducted my reputation.  anyone have an idea?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


Is there a way to set Chrome to open bookmarks into new tabs instead of loading into the window I am working in? I just lost an assignment because I was typing, and I opened another bookmark to research another article and when the bookmark opened it deleted my progress. I clocked "back" and my information was gone! I had to start my research paper over! I know. I should have written in Word and then pasted... Consider THAT a lesson learned. Is there an extension to get around this default?

Current situation:  I am currently browsing a page (say, www.google.com). I want to open a bookmarked page (say, www.bing.com), but I want to keep the current page (Google) opened. I need to click on new tab, then click on the bookmark for Bing. Alternatively, I can right click and open Bing in new tab.  But I want none of those because why click twice when one is enough?    What I want:  I am currently on Google. I want to open Bing, so I click on the bookmark and Bing opens in a new tab. Google remains open.    I am aware of a duplicate question linked . However it didn't really provide a satisfactory answer. Changing every link to javascript breaks the icon and is a pain to do; middle clicking doesn't really work because I'm on a laptop and the touchpad does not support middle clicking. I hope there is an extension for Chrome that can redefine this behavior to the way I want. A hidden setting in Chrome would be even better but I doubt Chrome offers that.


I need to convert a text string '2017-08-09T15: 00: 39.000Z' to hour format, to do operations with it

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I have Samsung GalaxyS2. Is there a way to set the default install location to SD card of all downloaded apps from play store.

I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually.  Thanks


I have a MacBook Pro (Retina, 15-inch, Mid 2014) running macOS Sierra, the Mac started to be slow due to storage.  When I've checked my storage I was shocked, from 250 GB I have, 180 GB was allocated to the System it self!  I've checked my friends storage and found that the System is only 30 GB!  How can I manage this and why do I have that much storage allocated to the System?

My Mid 2012 MacBook Pro 13" says I suddenly ran out of Storage space.   My Mac barely has any data and my upgrade to Sierra was a clean install. Nothing was ported from previous backups.   If you see the image below, the "System" section in the left column says that it is consuming 466.82 GB. What I don't understand is why does my Mac require so much space? As far as I know, it should never increase 50 GB of space. Any help is appreciated.


I am developing a game and i need to add a leader board to it. I have coded one which allows the user to add high scores, view high scores and erase all high score. Now I need to sort all the scores in order of highest to lowest. Here's my code currently [NOTE: I'm aware that this isn't the best menu but I will change that later on]:  choice = input(str("Would you like to add a high score to the leader board?: ")) if choice == "y":     user1 = input(str("Enter username 1: "))     hs1 = input(str("Enter high score: "))     user2 = input(str("Enter username 2: "))     hs2 = input(str("Enter high score: "))     data1 = user1 + ": " + hs1     data2 = user2 + ": " + hs2     with open("leaderboard.txt","a") as file:         file.write(data1)         file.write("\n")         file.write(data2)         file.write("\n")         print("Data added.") elif choice == "n":     final_list = []     with open("leaderboard.txt","r") as file:         first_list = file.readlines()          for i in first_list:              final_list.append(i.strip())         print("Leader board")         print("-------------")         for count in range(0,len(final_list)):             print(final_list[count])  else:     with open("leaderboard.txt","w") as file:         file.write(" ")         print("leader board cleared.")   I would like the leader board to be displayed once ordered something like this:  1. James F: 32 2. Harris W: 18 3. Courtney J: 12   Thank you for reading!

What is the best way of creating an alphabetically sorted list in Python?


Some local dialects add phrases or words that add no meaning to the sentence or question.    Minnesota speakers add 'now'. 'Who was that guy died in Duluth, now ?' Irish speakers add 'so I am/was/etc'. 'I'm going to be on telly, so I am.' Jewish speakers add 'already'. 'I'm single; so get over it, already.' Scots add 'd'ye ken (know)'. 'He died yesterday, d'ye ken.'   What do I call these little snippets of language that are added, locally ?  I don't accept that they can be called 'catch phrases', which are individual, not a part of a local dialect.

Examples:  Anyway, after that I went home and went to sleep. Anyhow, do you want to go for a drink? So then, I was chatting to this girl and... Now, Bob was a nice guy, but socially inept. Her cooking was, well, terrible.  These words are distinct from fillers like 'umm' and 'err' because they are often used intentionally in written, usually informal, English, such as writing expressing a conversational tone.


I have transaction table proposal_header and the detail table is proposal_item, what I need is to get concatenated tender_number grouped by detail_number in proposal_item, but I don't get it how to concatenate it, how the query should be?  the proposal_header table is :  id  tender_number 7   BS7 12  BS12 14  CS14   the proposal_item table is:  proposal_header_id  detail_number   7                161932   7                161929   12               161932   12               161929   14               334659   and then i have joined:  select b.id as mainId,a.detail_number ,b.tender_number from dbo.proposal_header b inner join dbo.proposal_item a on a.proposal_header_id =b.id   the result of join is:  main Id  detail_number  tender_number 7        161932         BS7 7        161929         BS7 12       161932         BS12 12       161929         BS12 14       334659         CS14    but what i need, is only detail number and concate tender number, is there a solution to make it like this ?  detail_number  tender_number 161932          BS7, BS12 161929          BS7, BS12 334659          CS14

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I have a win10 and ubuntu 16.04 dual boot setup.  However I mostly use win10 and only use ubuntu for certain tasks.  Is there anyway to suppress the ubuntu bootloader when starting up and only bring it up through activating windows boot options (like pressing F12)?  This would be very helpful as it would save time the 9 times out of 10 that I just continue into windows.

I have a Win 7/11.10 dual boot system with Grub 2 as the default bootloader. However, I want to make Windows bootloader the default bootloader (grub 'dos' like interface scrares the hell out of my sister) so when I start the PC I will have the following boot options: 1. Windows 7 2. Ubuntu  NB: A process to reverse this operation so Grub can be the default bootloader again will also be appreciated


I tried customizing by using different customization tools and by removing different packages at different trials, but none of it worked properly!   The tools that I tried are Cubic, PinguyBuilder, optimizer, UCK, OS Builder.  What I want to do is to remove all packages given by Ubuntu and make a clean ISO image and what I tried is removed some packages like libreoffice related packages, firefox and then I generated an ISO image.  After that I installed it in Virtual-Machine but, it's not installing properly (sometimes saying installer crashed when libreOffice packages removed, sometimes blank-screen is appearing when any other packages removed, sometimes not even generating ISO).  is there any need of modifying some predefined files after removing/deleting some packages?  How can I create/generate that clean ISO image by removing all unwanted packages provided by Ubuntu?

I would like to customize Ubuntu live CD by installing some additional packages. I have followed   but it doesn't seems to work. Can anyone provide clear instructions?   Note: I do not prefer Remastersys, manual way will be appreciated.  Customization  Packages that I want to install:   Thunderbird    Samba    SSH       Changes that I need:   Remove Games menu from the Application menu Firefox shortcut on Desktop Radiance as the default Theme Different default Ubuntu Wallpaper   Configuration file changes   I want the panel to be placed at the bottom I want to paste my Samba configuration file instead of default Samba configuration I have few Firefox shortcuts and folders I would like to show that in Desktop Also it will be nice if you say me how to change the icon sets   Recent Updates   I have customized Ubuntu 10.10 with Firefox shortcuts and few folders on desktops. Everything went smooth. But the installer gets crashes after choosing the timezone. How do i fix this issue? Also setting wallpaper affects the login screen. The wallpaper which i set is displayed on the login screen also. I just want the default one for the login screen.


When I try with a regular character instead of a newline such as X, the following works:  my $str = 'fooXbarXbaz'; $str =~ s/X.*//; print $str;   → foo  However, when the character to look for is \n, the code above fails:  my $str = "foo\nbar\nbaz"; $str =~ s/\n.*//; print $str;   → foo baz  Why is this happening? It looks like . only matches b, a, and r, but not the second \n and the rest of the string.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I read a book or series of books around 1992, and these are the things I can remember   if it's a single book it is very long, otherwise could be a series; I'm pretty sure the protagonist was a young boy; the protagonist had to collect a number of objects which were circles with a cross through the middle; the objects were all similar in appearance but were made of wood, iron, etc. ; one of the objects was somehow related to water and found on a viking ship; there was a cyclic event of "dark forces" that the protagonist needed to combat; and the year the book began there was a particularly harsh winter and this was associated with the activities of the "dark forces".

I read this book series as a kid back in the late 1970s, so it's an old series - and my memories are similarly old, and vague.   I know it's a fantasy series. I think there are 4 books in the series. Or perhaps 7.  There's a central boy character who has to get a collection of magical objects (every fantasy needs a quest!), each of which represents a different magical 'element': wood, stone, fire, etc. I definitely remember there was a wooden object. He lives in our normal world. The whole series takes place "here & now". I have a feeling he's a "chosen" person of some kind... But, the strongest memory I have is of a symbol: a circle which is divided into quarters (a vertical bar and a horizontal bar).  I know it's vague, but does anyone recognise this?


I had a trigger that fired from webhook, this trigger receive JSON that contain external Id for account object, inside the trigger I do an upsert on account object using the following code  Database.upsert(accountrecord, external_id__c)   but sometimes for unknown reason I got the following exception   System.DmlException: Upsert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: External_Id__c duplicates value on record with id: 0011x00000Gc4LI: []    I tried to add SOQL query to retrieve the account record with the external Id I have to testing purpose and I didn't get any records!  New Update:  I think it's related to this known issue, they said that it solved in Summer 18, but I'm still facing this issue.

I have a custom object, with a Text Name (ID) field. When I upsert two records with identical Name/ID, but otherwise different values, in two separate upsert statement, one record results, as expected.  When I create a list, add these records to the list, and then upsert the list, I get a DUPLICATE_VALUE error. What gives? By definition, upsert should not do this, should it? Even worse: it doesn't matter whether a record with the identical Name already exists or not, the upsert will fail in both scenarios.  By the way: by default upsert a does not use the Name/ID field as identifying/unique field, as you might expect. You need to do upsert a Name  Complete code:  List<Flight__c> flights = new List<Flight__c>(); Flight__c f1 = new Flight__c(); f1.Name = 'ABC123'; f1.Flight_Number__c = 'ABC'; flights.add(f1);  Flight__c f2 = new Flight__c(); f2.Name = 'ABC123'; f2.Flight_Number__c = '123'; flights.add(f2);  upsert flights Name;      Error message: Line: 12, Column: 1 System.DmlException: Upsert failed.   First exception on row 0; first error: DUPLICATE_VALUE, Duplicate   external id specified: ABC123: [Name]   Name being the standard identifying field of a custom object. You cannot edit the properties of this field, e.g. making it unique or not unique.


Is it possible for someone to send me the DVD to download Ubuntu or is there any other way?

I need to upgrade my existing Ubuntu system, and I also want to install Ubuntu on a new laptop.  I would like to have an installation CD or DVD to do both of these.  Where exactly I can order or request an Ubuntu installation CD/DVD/USB?


I am currently looking for a fantasy book (trilogy actually I think) that I read years ago. Here is what I remember:   The world has several nations (that seem to be elemental based if I remember correctly) There is a (fire based?) church in this world that tries to suppress everyone I think this world was mainly water and some islands, but what I am sure about is that the hero traveled with a submarine for at least some time in this book There is magic in the book (although no fireball throwing wizards if I remember correctly) the hero learns to fight and I think some magic too Sometime near the end the hero meets some kind of hidden nation/army that helps him (those also have submarines?!)   Although I now see so many parallels it has nothing to do with Avatar.

It's a world that includes fire, water, air, earth, shadow and light users. This world has at least one archipelago with a king, that's died in the previous squashing of rebellion, his descendant lives known only to few. At the beginning of the series a girl is on a fire-owned submarine vessel that gets attacked by Shadow rebels. The Shadow rebels have at least one base in the archipelago and train people there. I'm not totally sure, but I believe there's also an island that has a lot to do with trade. Also, the fire... clergy, I guess? Has absorbed the light part, so basically there are only 5 separate elements remaining.  Some info I'm not quite 100% sure about, but I think the king of the archipelago might also be called The or a Pharao  Unfortunately this is pretty much all I remember.


As I was going through a few examples of $3×3$ orthogonal matrices I observed a property in them that $$ \lvert\det A\rvert=\lvert\det B\rvert $$ where $A$ is upper left corner $2×2$ matrix and $B$ is lower right corner $1×1$ matrix. If this is true is there some way of proving it?

Let $A$ be a matrix in the special orthogonal group, $A \in \mathrm{SO}_n$.  This means that $A$ is real, $n \times n$, $A^t A = I$ and $\det(A)=1$, that is, the column vectors of $A$ make a positively-oriented orthonormal basis for $\mathbb R^n$. Decompose $A$ as a block matrix $$A = \begin{pmatrix} B & C \\ D & E\end{pmatrix}$$ where $B$ is $k \times k$ and $E$ is $(n-k)\times (n-k)$. I'm looking for a basic linear-algebra argument that $\det(B) = \det(E)$, ideally something that could be presented in a 2nd or 3rd year undergraduate course.  So I do not want people to invoke anything like tensor products or differential forms.


Say that I have a query of the form  SELECT * FROM MYTABLE WHERE MYCOL in (?)   And I want to parameterize the arguments to in.  Is there a straightforward way to do this in Java with JDBC, in a way that could work on multiple databases without modifying the SQL itself?   The closest , I'm wondering if there is something different for Java/JDBC.

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


When checking via top I see two processes for tomcat7:    PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                                                                15163 tomcat7   20   0 2082064 317976  20816 S 55.4  7.8   0:54.49 java                                                                                964 tomcat7   20   0  194332   5740   1404 S 18.9  0.1 284:09.36 exin   I wonder what exin is doing, why it consumes so much CPU power and why it is running for such a long time?  Searching for "tomcat7 exin" in Google revealed nothing. This is why I am asking here.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I have searched this subject in great detail and still not able to connect my raspberry pi to the web via Ethernet.   I have no problems making ssh contacts with the pi.   I used this video as a start    Its Not working.   I'm running ubuntu 15.10  So how do I get my pi connected to the web using Ethernet from my computer?

I want to share the wireless Internet connection on my desktop with my old laptop, through ethernet.  I have ticked the option "Make available to others" on both connections, on my desktop, but my laptop doesn't connect. Am I doing something wrong or is it a bug?


Hello community! The problem you see above is a combinatorial problem that I could not solve. :c  This problem seemed easy to me at first like there are people $1,2,3, \ldots, n$ sitting on a circular table and I thought that it was easy using casework and stuff. However, when I really started doing this problem, this problem seemed harder than I thought. I thought about complementary counting but that clearly won't help. From the example given above, I tried first adding singleton sets: $n$. But how do I find out the number of sets with two elements and so on? Recursion?? I really don't know.  Any help would be much appreciated. Thanks.

I have asked this question before  The first guy solved it in a way, but  i would like to know is there any efficient way to do so, because i did the same for N = 13 and N = 15  which took long time.  This problem is from a pen and paper test, ZIO-2018 Can i solve it with an efficient algorithm, well i am pretty beginner in algos, so if there is one kindly descibe it how can i do so?  Thank you


I'm looking to upgrade from a Nexus 7 to a 10" tablet. I know that Google stores my purchase information so that I won't have to pay for any already purchased games again.   But I was wondering if it's possible to transfer my locally stored game data to the new device so that I can continue without loss of progress. If so, how is it done?

I'm planning to buy a new Android phone and I'd like to be able to transfer the progress I have made at several games to the new device, so I won't have to play all the levels again from scratch.  I currently have an HTC Desire and will buy an HTC Evo 3D.  There's probably no simple/general solution to this.  But I was wondering if anyone did something similar and could provide some advice (e.g. where to look for files that might hold game progress information).


Given lines such as:  [{ ERR }]  { ABC }  [ NT1 ]   [ XYZ }  <- This is an illegal form and should also be ignored   How do I write a regex that will capture the first segment, but ignore the others if I read line by line. So if there is one nested pair of [] and one pair of {} it will match that, and then not match on the other lines.   I've attempted to do this using the expression ([ \[]*([ \{]*[a-zA-Z]+[ \} ]*)[ \] ]*)   I'm also trying to output the three alphanumerics in the center as a match subgroup (there will never be more than three char). Whitespace is irrelevant.

I need a regular expression to select all the text between two outer brackets.  Example: some text(text here(possible text)text(possible text(more text)))end text  Result: (text here(possible text)text(possible text(more text)))


I created a 2G partition like this with fdisk:  Command (m for help): n Partition type:    p   primary (1 primary, 0 extended, 3 free)    e   extended Select (default p): p Partition number (2-4, default 2):  First sector (4196352-16777215, default 4196352):  Using default value 4196352 Last sector, +sectors or +size{K,M,G} (4196352-16777215, default 16777215): +2G Partition 2 of type Linux and of size 2 GiB is set  Command (m for help): w The partition table has been altered!   But if I check the size (again with fdisk) it seems to be    fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2).  Changes will remain in memory only, until you decide to write them. Be careful before using the write command.   Command (m for help): p  Disk /dev/sdb: 8589 MB, 8589934592 bytes, 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0xe82746a5     Device Boot      Start         End      Blocks   Id  System /dev/sdb1            2048     4196351     2097152   83  Linux /dev/sdb2         4196352     8390655     2097152   83  Linux   blockdev --getbsz /dev/sdb2 4096   Then double-checking things:  echo "2097152*4096/1024/1024/1024" | bc 8   (blocks * bytes / 1024^3 should give GB right?) which implies an 8GB partition.  How am I calculating this wrong?

On my machine, fdisk -lu /dev/sda displays following output:     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048    73947135    36972544   83  Linux /dev/sda2        73949182    78139391     2095105    5  Extended /dev/sda5        73949184    78139391     2095104   82  Linux swap / Solaris   What is this "blocks" unit? Is one "fdisk block" a 1KiB? Where does this unit come from?


I am currently out of blank DVD's so my question is: Can I burn the iso to a CD instead or does it have to be a DVD?

I have an old computer that can't handle a boot stick install, so i have to create an actual, old fashioned boot CD.  However, the image size for Ubuntu 12.04 is 732MB, which is too large for a CD, which can hold only 700MB.  The maintainers of Ubuntu 12.04 say the image size will never go over 700MB, and indeed, the download size seemed to be 689MB.  Brasero says it won't burn the CD because the file is too big, what's going on?


I'm already using elif not re.match("^[a-z]*$", first_name), but every time I enter a capital letter for the name, it returns the message I use if they are using anything other than a letter in the alphabet. Thank You in advance for any help you can give.

In Python, I can compile a regular expression to be case-insensitive using re.compile:  >>> s = 'TeSt' >>> casesensitive = re.compile('test') >>> ignorecase = re.compile('test', re.IGNORECASE) >>>  >>> print casesensitive.match(s) None >>> print ignorecase.match(s) <_sre.SRE_Match object at 0x02F0B608>   Is there a way to do the same, but without using re.compile. I can't find anything like Perl's i suffix (e.g. m/test/i) in the documentation.


My Latex code is:  \documentclass{article} \begin{document} \author{Author} \title{Title} \maketitle Document's text. \end{document}   The output is:   How can I show the author's position underneath the author's name, e.g. Professor at ...?

I am using the \documentclass{article} to write an article. how can I add the affiliation to the author's name like the following picture?    And, this document class has a date under the names. Can I omit it?


I have trainied a mixed model that is overfitting.  We used lme4 and got this warning boundary (singular) fit: see ?isSingular and sure enough running isSingular as per the  retunrs TRUE.  My model is fitting 45 variabels as fixed effects plus two random effects and a nested effect.  So Obviously the model is to complex and there is colinearity.  My boss doesn't want me to use regularization for reasons of interpretability, so that leaves me with variabel removal I guess.  the lme4 manual recomended I run rePCA on the model so Isdid but I'm not sure how this may help me understand the problem.  Also how could I get the PCs for the fixed effects and use those to help? > rePCA(fml) $`mri_info_deviceserialnumber:rel_family_id` Standard deviations (1, .., p=1): [1] 0.2939328  Rotation (n x k) = (1 x 1):      [,1] [1,]    1  $mri_info_deviceserialnumber Standard deviations (1, .., p=1): [1] 0  Rotation (n x k) = (1 x 1):      [,1] [1,]    1  attr(,"class") [1] "prcomplist"

I have read in several answers to questions on this site that the best way to choose the random structure for a mixed effects model is by using theoretical knowledge. On the other hand I have also read the advice in Barr et al (2013) to “keep it maximal”, that is, to fit the maximal random structure by including all fixed effects, including interactions, as random slopes. However, this seems to often lead to models which either won’t converge, or do converge, but with a warning of a “singular fit”. In the accepted answer to [this] () question it is stated that singular models should be simplified.  But how is this done when the reported correlations are not near +/-1 and there is no theoretical knowledge to help choose.  An example would be much appreciated.


I think I miss something into the use of "for in" statement. I have a JSON document returned from a mongoDB query (nodejs + mongoose), his structure is like the following:    [{     "_id":"596f2f2ffbf8ab12bc8e5ee7",   "date":"1500458799794",   "questionId":4249,   "__v":0,   "myArray":[        "1234567",      "8901234",      "5678901"      ]   },   {     "_id":"596f2f2ffbf8ab12bc8e5ee5",   "date":"1500458799795",   "questionId":4245,   "__v":0,   "myArray":[        "1234565",      "5678905"      ]   }]   In a "for in" cicle I get each document and into another I want to iterate the array "myArray". The problem is when I try to iterate the array "myArray". If I iterate it with "for in" statement I receive a lot of other wrong stuff, like if I am iterating the document returned by the query:    [null,{},{"_id":"596f2f2ffbf8ab12bc8e5ee7","date":"1500458799794","questionId":4249,"__v":0,"myArray"["1234567","8901234","5678901"]},null,null,....,"myArray",true,[],{"caster":{"enumValues":[],"regExp":null,"path":"myArray","instance":"String","validators":[],"setters":[],"getters":[],"options":{},"_index":null},"path":"whoDislikes","instance":"Array"....etc etc... ]   If I iterate it with a classic for statement everything is good:       ["1234567","8901234","5678901"]  Why? The code is the following:     for(question in data){       var myArray=data[question].myArray;       console.log(JSON.stringify(myArray));   //this print ["1234567","8901234","5678901"]        for(var i=0;i<myArray.length;i++){          console.log(myArray[i]);   //this print ["1234567","8901234","5678901"]        }        for(element in myArray){           console.log(myArray[element]);   //this print a lot of wrong stuff!        }   }

I've been told not to use for...in with arrays in JavaScript. Why not?


In my react shouldComponentUpdate function，this.props and nextprops have all the same attributes, but they are not equal.My code:  shouldComponentUpdate(nextProps) {     console.log(this.props);     console.log(nextProps);     console.log('nextProps vs this.props:', nextProps === this.props);     console.log('this.props.style vs nextProps.style:', this.props.style === nextProps.style);     console.log('this.props.data vs nextProps.data',this.props.data === nextProps.data);     return true;   }   the output is :   My confusion is whether the props has some hidden attributes.

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


For $a,b \in \mathbb R^+$ such that $a+b=1$, then:  $$\left(a+ \frac{1}{a}\right)^2+\left(b+ \frac{1}{b}\right)^2\ge \frac{25}{2}$$

If $a, b$ are positive real numbers and $a+b = 1$, prove that :  $$\left(a+\frac{1}{a}\right)^2 + \left(b+\frac{1}{b}\right)^2 \geq \frac{25}{2}$$  I can see that the value $\frac{25}2$ is attained for $a=b=\frac12$. But I do not know how to show that this is the minimal possible value.  Thank you.