Hi I'm using images in longtable. To define captions in the longtable enviroment I defined this:  \makeatletter \def\figcaption{%      \refstepcounter{figure}%      \@dblarg{\@caption{figure}}} \makeatother   and then inside a cell I have  \parbox{5cm}{ \begin{tikzpicture} \node[anchor=south west,inner sep=0] (image) at (0,0) { \includegraphics[scale=1]{image}        }; \label{fig:lol} \end{tikzpicture} \figcaption{my caption.}}    However \cite{fig:lol} gives me the table number! Why? How can I solve it?  Edit: hyperref seems ok...

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I noticed that on all SE sites (meta sites included) there is a word issue in the meta information about the questions.  More specifically, the term "votes" appears everywhere:    How can the number of votes be a negative number ? Also, if a question receives 2 upvotes and 2 downvotes, in the list it will say "0 votes", which is clearly incorrect.  So the term "votes" seems a bit wrong in this case. I think that "score" fits a lot a lot better.  What do you guys (and girls) think ?  PS: I douby it actually bothers anyone, but I think it can be a little confusing for newcomers in some situations.

When viewing questions in the normal, "Interesting Questions" tab, (or any other view for that matter), the question's score is displayed to its left, and is labeled "votes".    But is it the correct word to use? Wouldn't "Score" be more appropriate (because a score of "1" doesn't necessarily mean "1 votes", it could mean "100 upvotes and 99 downvotes").  My suggestion, use "score"    Your thoughts?


There is no suspend option in desktop 18.04. The only way I found is to go to Settings > power options and to set it to suspend when pressing the start button.  It works but I need to log in every time and it's painfully slow to open up.

In 17.04 I could suspend\hibernate from the power off menu button.  I can't find how to do this in Ubuntu 17.10 GNOME Shell.


I changed my HDD of Ubuntu 16.04 from i7 Lenovo PC (GTX-960, 32 GB) to i5 Dell PC (very old GPU, 16 GB). I ran the following commands in the recovery shell of the i5 PC:  sudo apt-get purge nvidia*  sudo apt-get update sudo apt-get upgrade   I can login successfully but I see no GUI, only Ubuntu's background.     How can you transfer Ubuntu 16.04 HDD to New PC successfully?

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I have a requirement where users need to log in to salesforce using external authentication provider. The configuration in Open-id authentication. I have created the connection in Auth.Providers along with all the required key, id, url and tokens. Salesforce has automatically created a registration handler. Using Test-Only Initialization URL, I have tested the connection and I have recieved the XML which states that the connection is working fine  Now, I need the users to log in using that provider and should be redirected to Home Page of Salesforce. How to do that? Please help.  Thank you in advance. Sastri

Background:  I have created a custom Auth. Provider in Salesforce to reach out to an authorization server that isn't on the default list of Provider Types. I used  as a good starting point to extend the Auth.AuthProviderPluginClass. Once appropriately added to my org, it then became an option on the list of Provider Types. I was able to create an Auth. Provider using that new provider type and it works to initiate the OAuth2.0 flow. I am appropriately able to get the access token and refresh token from the authorization server.  The Problem:  As it currently stands, we will have users click on a button that will send them to the provided "OAuth-Only Initialization URL" link that was generated when I created the actual Auth. Provider record. The trick is that when the OAuth2.0 flow is completed, the user is redirected back to the Salesforce Setup Home page, and I don't see a good way in the documentation to override the final destination to be something else (like a success page or something).  Question:  Does anyone know of a way to override the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider?    UPDATE: I tried using the startUrl (and also tried retUrl for good measure) as query params, but doing so didn't change the behavior after the OAuth2.0 flow finished.  Meaning, both of the following URLs gave me the same final destination as not having any query params at all:  https://<scratch org random url>.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?retUrl=lightning%2Fpage%2Fhome   https://<scratch org random url>.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startUrl=lightning%2Fpage%2Fhome     Another Update: This WORKED:  https:/<scratch org random url>.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startURL=%2Flightning%2Fn%2FCustomPage   Apparently, it was important to add the leading /, (of course, url encoded to be %2F) and %2Flightning%2Fpage%2Fhome gets interpreted as the setup home and sends you there.    (Parallel posted to Salesforce Dev Forum: )


I have some functions and variables:    function b() {   myvar = 1;   console.log(myvar);   a(); }  myvar = 5; a(); b(); a();  function a() {   console.log(myvar); }     The console log output is: 5, 1, 1, 1. Why is the last a() call getting "1" as output and not "5" ? Because I thought a() is called from global context, and this global context has myvar=5 as its outer (one level up) variable?

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


I was adding some small components to a Digikey order, just because I couldn't stand to pay the shipping costs for the single item I really needed.  I just received my order to find that the SMD LEDs are moisture sensitive.  I hadn't bothered to think about this issue, mainly because I really wanted SMD LEDs on my board because they look cool.  :)  After googling, I've read that either "most" SMD LEDs are moisture-sensitive, or that all are.  I haven't found any that specifically state that they aren't, and Digikey's search tool doesn't have this as a selectable parameter.  So my questions are:    does any manufacturer make a SMD LED that isn't moisture-sensitive, i.e. does not need to be sealed and / or mounted soon after opening the package, and are there any other cool looking LED options, besides a T1 through-hole package?  :)

I had a selection of 0805 LEDs in my last Mouser order and was a bit surprised to discover they arrived in heat-sealed (rather than folded and taped with sticker) bags containing a desiccant bag and some sort of litmus-esque paper indicator saying something about baking them if the dots on it went pink (instead of blue).    A quantity of through-hole LEDs I had in the same order just came in the regular ESD-protective bag, folded over with a sticker.  What's up with SMD LEDs that they work so hard to keep them dry? Surely their dryness can't be assured once they're installed. Does it have to do with their solderability or something? Why would that be different than other SMD parts?


I'm looking for a good resource (preferably a book) on . I am thorough with the basics (the mirror formula, lensmaker's formula, thin lens formula, etc). What I want is something that focuses specifically on various applications and extensions of these formulas to different situations. I would like a resource that supplements an introductory course in geometric optics while not venturing too much beyond the basic formulas.

I need to learn basic optics for a high school academic competition. Does anyone know any good places, preferably free and online, to learn the basics of optics, like lenses, angles of incidence, etc.? I can't seem to find an MIT OpenCourseWare course addressing the issue.


I don't understand why this.name isn't the same as obj.name, basically why in this case this refers to the window object and not the obj object. In the code below, this.name is instantiated after obj.name..  function createNewPerson(name) {     var obj = {};     obj.name = name;     alert(this.name);     return obj; }


I have an account in the UK PlayStation store with a ps plus subscription that is active for more than 3 years. After the end of the subscription, I would like to buy a PS subscription in the US ps store and the question is what happens to all free games that I obtained with ps plus in the UK store? will they be working in a US store?

I have a PSN account that belongs to region X. It has a PS+ subscription. I have acquired many games throughout the years; some are PS+ free games, some are digital medias bought from PS Store. I'm moving to region Y.   Question: will I be able to play all of them normally on while I'm in region Y, specially those free PS+?  In other words, will I be able to keep using the same PSN and PS+ accounts and get access to my games in the library?  PS: I believe it is not possible to change country of a PSN account, isn't that so?


I am trying to write a quick bash script to automatically git push to multiple branches at once. My issue is, when I enter my commit message as a read variable, bash and git freak out at the use of whitespace.  Here is my current script:      #!/bin/bash echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "Pushing To all branches" echo "What is your Commit Message?" read message  git add * git commit -m \"$message\" git push origin .... (push to other branches) ...  echo "Done!" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"   And this works perfectly if my commit message is only one word. However, this is often not the case. For example, if I enter:  Testing test case   as my commit message, I would get the following errors:  error: pathspec 'test"' did not match any file(s) known to git. error: pathspec 'case"' did not match any file(s) known to git.   Does anyone have any ideas on how to fix this so that my bash script can handle whitespace?  Thanks so much!

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I have an old DLL that stopped working (log2vis.dll) and I want to look inside it to see what objects it uses. The DLL was written in C++ (not .NET). Is there a tool that will decompile/disassemble C++ files?

Is there a way to disassemble Pro*C/C++ executable files?


When I'm studying about work and torque, I found that their unit are the same. But, why don't we use Joule (unit of work) instead of Newton-meter (unit of torque)? Since $\mathrm{1\ Joule = 1\ Nm}$, why can't they be interchanged?

Recently, I was doing my homework and I found out that Torque can be calculated using $\tau = rF$. This means the units of torque are Newton meters. Work & Energy are also measured in Newton meters which are Joules.  However, torque isn't a measure of energy. I am really confused as why it isn't measured in Joules.


I have problem with this code:  import paho.mqtt.client as mqtt import datetime import time global global_x global_x = 0  mqtt_topics = [("esp8266-1",0), ("esp8266-2",0)]  def on_connect(client, userdata, flags, rc):   print("Connected with result code "+str(rc))   print(datetime.datetime.now())   client.subscribe(mqtt_topics)  def on_message(client, userdata, msg):   global_x = int(msg.payload)   #print(str(msg.topic)+" "+str(msg.payload) + " " + str(datetime.datetime.now()))  client = mqtt.Client() client.on_connect = on_connect client.on_message = on_message client.connect('localhost', 1883, 60)  try:   while True:     client.loop_start()     time.sleep(2)     print(global_x)     client.loop_stop()  except KeyboardInterrupt:   print("CTRL-C: Terminating program.")   How to use value global_x? I would like to use it as variable to run my camera to right active esp8266.  I've checked everywhere and didn't find solution. Printing values only works fine, but I can't use this data. This code only produces "0", instead of "1" or "0" (depending of PIR sensor value). Printing msg.payload works perfectly.

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


You can't go faster than light, and light can't be additive (if you shine a light from a spaceship, the light is not going $c$+"speed of spaceship", it's just going  like it always does).  But what happens when two spaceships, each going 75% the speed of light, are traveling directly towards each other?  Aren't the two spaceships now traveling, in reference to each other, at 150% the speed of light?

Let's say we have $2$ particles facing each other and each traveling (almost) at speed of light.    Let's say I'm sitting on #$1$ particle so in my point of view #$2$ particle's speed is (almost) $c+c=2c$, double light speed? Please say why I am incorrect :)    EDIT: About sitting me is just example, so in point of view of #1 particle, the second one moves at (almost) $c+c=2c$ speed?


On my Macbook, I could have different "audio profiles" depending on whether or not headphones were plugged in.  I'd have my speakers on mute, and when I plugged in my headphones it would unmute.  This was great at the office in case any web pages I wasn't supposed to be on suddenly popped up with some video of cats playing piano or what not.  I switched to a new Windows laptop that runs Windows 8.1, however there doesn't seem to be a way to do this.  My mute status and volume stays the same regardless of whether or not I have head phones plugged in.  Is there a way to configure Windows to mute the sound unless headphones are plugged in?  Seems like a basic feature.  Update:  I have a Realtek HD Audio driver (Stock Windows 8.1 driver).  I've already checked, and the driver does not remember volume levels so I can't just turn the volume all the way down.  However, it does pop up a notification when I plug in headphones telling me that I just plugged in headphones, thus the hardware is capable of telling the difference.  Update 2:  I installed the latest drivers from Realtek.  I now have a Realtek HD Audio Manager that pops up when I plug in headphones.  However, it still does not remember audio levels or mute status when I plug in or unplug headphones, nor can I find any features in the Audio Manager for that sort of thing.  From what I can tell, this is a driver feature and not an OS feature, and my drivers simply don't support that.  Bummer.

I want my Windows 7 machine to autmatically un-mute when I plug in headphones, and then return to mute when i unplug them.


Is there any recommended module for responsive menu?  Example the picture above, click on it and a list of menu appear.  Easy to configure.  This content is for: many content    Mine is simple. Basically the menu wont have a link. (It is just a scroll down function to specific height when I click the menu.) Just that when come to mobile, I wan it act like responsive menu according to the picture above. It wont have any sub-menu as well.

I am currently creating a website which has a lot of content - text. For this I need a serious menu structure with 5-10 menu items per menu and at least 15 menu-blocks per main menu item.   Further it has to be accessible via mobile.   Till now I have used panels and added menus inside the panels. But mobile isn't to happy about that and the list-names in the menus overlap the content.   How would you go about solving this issue? I trust you experts here! :-)


two wheels of different diameter attached to each other at the center, roll along a straight line. since they have different diameters, the smaller wheel must slip. (see other stackexchange answers) Why do I not see the slippage in these videos:   ?

The paradox:    We have a circle and there is another circle with smaller radius. They are co-centeric.  If circle make full turn without sliding, both smaller and bigger circle make full turn too. If we assume that the passed road is equal to the circumference of circles. We have got smaller circle's radius is equal to bigger one's.  Unsatisfying Solutions I found:    "Do not assume that smaller circle's circumference is equal to passed road since the surface that contacts to the ground is bigger one. " // Okey but it does not explain the paradox, it explains just what is the wrong assumption (even does not explain why it is a wrong assumption.) It is undeniable that every point on both smaller and bigger circle will contact exactly one and only one point on their path. Therefore we can think that this is a bijective maps and smaller circle is isomorphic to bigger one. (Okey but ....)   Question: What is the true answer? What is wrong with the definition of circumference of a circle and relationship with its taken path.


i am making a level 5 ranger with 16 dex, a normal longbow shot would be:  1d8 + 3 (dex) * 2(extra attack)  I was wondering if my level 4 trait should be crossbow expert or a ASI.  with crossbow expert i can use the heavy crossbow with extra attack:  1d10 + 3 * 2  with ASI and a longbow:  1d8 + 4 * 2  what choice would be better for DPR?

is relevant to me; my Rogue is about to reach 4th level.  If you only hit on a 20, the  feat (PHB, p. 165) nearly doubles your chance to hit. If you hit on a 2, Crossbow Expert is simply +4.5 damage (2d6+6 vs. 1d8+4) over a light crossbow.  Is there a place between these extremes, where using an ASI to increase Dex by 2 is better for DPR than taking the Crossbow Expert feat? One hand crossbow or one light crossbow.


I was trying to run a sudo command it is aksing for a password which password should i enter

What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?


I have written a simple Trigger as part of my learning. As per my trigger based on all new Account created a Case is created using Trigger. I have written the Test Class as well and everything looks working fine.   I was going through the code coverage I got some doubts about the way I have written my Test class - I have written in 2 ways    TestClass_01 ---> Directly created Account in my Static TestMethod TestClass_02 --> Used generic Call to create the Account from my static TestMethod.    In the second way I can see My test class also listed in Code Average and its 0 always  TestClass_01   TestClass_02   Account Trigger   Can you tell me why the TestClass is coming in CodeCoverage section, I believe its wrong. Can you tell me whats wrong in my TestClass_02 and how can I call a general method to do some generic action like User-Creation, Account-Creation etc.?  Thanks in Advance

We are making heavy use of stub and mock objects in our Apex tests. Most of the time we are defining the mocks as inner classes of our test classes. We have noticed, that test classes, which do contain such mock classes do show up at the Overall Code Coverage in the developer console. Such a test class does always have a code coverage of 0% and 0/zz lines covered.  I give a short example. Consider the following class of the business logic:  public virtual class Foo {      public virtual String doSomething() {         return anotherFunction('foo');     }      public virtual String anotherFunction(String value) {         return value;     } }   A typical unit test would look like the following:  @isTest private class FooTest {      private class FooMock extends Foo {         private Boolean anotherFunctionCalled;         private String value;          public override String anotherFunction(String value) {             this.anotherFunctionCalled = true;             this.value = value;              return 'test';         }     }      @isTest     static void testDoSomething() {         FooMock f = new FooMock();          String result = f.doSomething();          System.assertEquals('test', result);         System.assertEquals(true, f.anotherFunctionCalled);         System.assertEquals('foo', f.value);     }      @isTest     static void testAnotherFunction() {         Foo f = new Foo();          String result = f.anotherFunction('blah');          System.assertEquals('blah', result);        } }   The Overall Code Coverage shows the following:    Foo: 100% 4/4 Lines covered FooTest: 0% 0/2 Lines covered   If you click on Apex Classes/Estimate your organization's code coverage you will get the surprising result of 66.67% (4/(2+4)) code coverage, which will not allow you to upload this code as a package.  How can we make sure, that the test classes will not be considered at the coverage estimation?


I have observed several times, whenever I ask something that relates or compares two things, moderator puts it on hold saying that it will invite chatty discussion.  But why are there such policies? Sometimes, questions are so genuine and unique that very rare or no attention is previously concentrated. But just because they compare two things they are put on hold.   A very recent incident is this: . This question is very genuine and almost rarely concentrated before. But just because it compares Java and OpenMP, it is put on hold. And I observed this mostly happens when Java is compared with some other technology. I suspect sometimes Stack Exchange is biased towards Java and it really doesn't allow to find pitfalls in it.   Doing this I think Stack Exchange discourages people from asking questions. Instead why don't you dedicate one site to such questions?   Being a leading technology forum, I never expected this from Stack Exchange. And I must admit that Stack Exchange is limiting its scope of exploring various technologies and their interdependency, superiority comparisons etc.   If Stack Exchange isn't built for such questions, then where should we post such questions? Because I don't find any other discussion forum as robust and complete as Stack Exchange.

I frequently come across a really useful answer on StackOverflow which has been closed because it doesn't match the Q&A format.  Examples include  ,  ,   ,  and there are others.  Where should this information be exchanged if it's not on stackoverflow?  It seems the moderators are often somewhat overzealous...  ---edit  When I say best, I mean they are informative and useful for someone who's looking for an answer to them.  Even if they do become a bit of a discussion, I value other people's opinions on the relative merits of the different JPA frameworks.  I come here looking to choose one and the answer helps me.  So what if it's not a definitive answer?  ---edit  I don't care how popular a question is, nor how interesting it is.  Users are interested in stuff that's useful to them.  Plenty of those were useful (as judged by the upvotes on the answers: 'This answer is useful'), but closed because they didn't have a definitive answer, as far as I can tell.  ---edit  Seems I'm not the first person to think this: there are various similar questions to mine like this one:   In it the user lists lots of other useful questions which have been closed:                    So isn't there a place on stackoverflow for these questions?  A discussion section, maybe?


I want to calculate the average time taken to call a method, but the results are very much dependent on the "numberOfTries" variable in the code below:       int averageExecutionTime = 0; int numberOfTries = someNumber;  for(int i=0 ; i<numberOfTries ; ++i){     long t = System.nanoTime();     CallSomeMethod();     averageExecutionTime += (System.nanoTime()-t); } averageExecutionTime /= numberOfTries; System.out.println(averageExecutionTime);   When I run my method for the first time, it takes about 6000 nanoseconds to call the method. However, when I call it again, the time taken reduces to about 50 nanoseconds. What is the cause of this reduction?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I have an Huawei mate 10 lite, and today it started randomly opening my browser and showing me scam sites. I have tried some anti-virus apps, but after a full scan they didn't find anything. I also looked at my apps, to see if anything suspicious app was there, but I didn't find any blank app/unknown app. The only thing I don't want to do is to factory reset my phone. Can you help me with my problem?

I've recently bought a new Android smartphone. After setting it up and loading my contacts onto it I thought that would be it.  Now after some days, every time I unlock the phone it takes a few seconds before it opens the default browser and opens some spam website. I tried to see what was causing it. I removed any apps I didn't know I could trust, but the problem persisted. After trying to solve it for some time I gave up and reset the phone to factory default. Now after having it reset to the default it ran without issues for roughly a week before the problem reappeared.    I tried to uninstall some apps in order to see if they were to cause of it, but nothing changed after doing so. However I did notice that if I turn off the wifi it won't even try to open the browser (I haven't tried mobile data since I don't have a bundle). This makes me feel like it might be related to something on the network but that wouldn't explain why only that phone would have the issue when there are at least 6 android phones on that very same network.  I hope that there is someone who can help me find the cause of this issue and help me solve it.  TL;DR When unlocking my phone, it opens the browser and tries to open a spam website. But only does so while connected to the wifi.  Things I've tried so far:   Factory reset (only helped for a limited time) Clearing the browser cache and all related data  Removing any app I don't know to be reliable Attempting to find what triggers it (seems like some type of internet connection is required??)   The device is the Doogee Shoot 1. As for the browser, the default is set to be the Android browser, but if I change the default it would use Chrome just as well. It seems to really just use the browser that is set to default.


Suppose that we fix points $a,b,c,d \in \mathbb{R}^3$ which do not belong to the same plane.  How can we check algebraically whether $x \in \mathbb{R}^3$ to their convex hull?

I have $n$ points $x_1,\dots,x_n\in\Bbb R^d$, and I would like to check that some other point $y$ lies in their convex hull. How can I do this in some efficient way? I think that there was an algorithm based on checking the signs of pairwise inner products $x_i\cdot y$, however I was not able to find it.


What is the most pythonic way of getting the following:  (False, False, False) (False, False, True) (False, True, False) (False, True, True) ...   I have n variables, each taking a value True or False, how can I combine these? I was thinking of using range(n) and then checking the bits of generated integers, but this seems too hacky.

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


It seems only people with gmail accounts receives these emails:  function sendEmail($email, $hashid) {     $content = "
x
";     $fromName = "N";     $fromEmail = "n@n.se";      $to = $email;     $subject = 'y';     $message = $content;     $headers = "MIME-Version: 1.0" . "\r\n";     $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";     $headers .= 'From:  ' . $fromName . ' <' . $fromEmail .'>' . " \r\n" .             'Reply-To: '.  $fromEmail . "\r\n" .             'X-Mailer: PHP/' . phpversion();     return mail ( $to, $subject, $message, $headers ); }   Is something wrong with the headers?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


How to show that $S^2$ is a symplectic manifold? What is the symplectic structure on $S^2$?

I am trying to put the symplectic form of the 2-sphere defined by $\omega_u(v,w) := \langle u,v\times w\rangle,$ where $u \in \mathbb{S}^2$ and $v, w \in T_u\mathbb{S}^2$. I just can't do this in stereographic coordinates. Would you help me?


I know about the PIVOT feature in SQL Server and I've read a few other questions and answers on here but I just can't seem to grasp it in order to do what I need. I'm trying to run some calculations and I have the following:  TABLE office_settings column office_id (bigint not null) column setting_value (NVARCHAR(500) NOT NULL)  office_id    setting_value -------------------------------------------- 4             0.2 4             0.2 4             2 4             3 5             0.2 5             0.2 5             2 5             3   I'd like to convert this using PIVOT (assuming that's the right tool for the job) to this, basically "grouping by" the office_id column, so:  office_id    value_1    value_2    value_3   value_4 ------------------------------------------------------     4         0.2         0.2         2         3     5         0.2         0.2         2         3   I should also mention that I need to CAST the setting_value column values to DECIMAL(4,2) in the process of this - in case that has any bearing on the T-SQL required to accomplish it.  Any ideas?


I only use one password on my home computer for all operating systems.  Unless I made a typo I missed it should work.  Any way to fix this without reinstalling?

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


This is my profile-description of the StackExchange-Site:     "Dösbaddel" is a (North-)German word for "Dummkopf" which probably means "fool" in English.   Is it written properly or do I need to insert a comma right after "Dummkopf"?     "Dösbaddel" is a (North-)German word for "Dummkopf", which probably means "fool" in English.   If you find more things one could/should change, I would be glad if you would inform me about that.

On Server Fault, we were discussing  in chat. There are non-native speakers in the chat and somehow we got on the topic of grammar and proper use of commas.   The sentence of interest:     I have just got a new Ubuntu LAMP VPS server, which I am trying to configure.   Some people thought that the comma was superfluous. Others did not.   When is it appropriate for a comma to preceed the word which, and is the example sentence above correct?    Also, before you vote to close this question as a dupe of , please consider the differences between the two questions and ignore the similarity of the titles. The OP's example sentence was restructured in that question instead of addressing the proper use of commas.


I'm using an api that provides time as a string, for example "14:45". Ultimately, I would like to convert that UTC time string to the user's local time zone, but I'm not exactly sure how to do this.   The only solution I could think of is to convert the string to a DateTime and then convert that DateTime to local before pushing that out as a string back in the original format (ex. "14:45" becomes "11:45"). I'm stuck trying to convert the string to a DateTime given that it's not in the typical format. Any suggestions? Thanks!

We are developing a C# application for a web-service client. This will run on Windows XP PC's.  One of the fields returned by the web service is a DateTime field. The server returns a field in GMT format i.e. with a "Z" at the end.  However, we found that .NET seems to do some kind of implicit conversion and the time was always 12 hours out.  The following code sample resolves this to some extent in that the 12 hour difference has gone but it makes no allowance for NZ daylight saving.  CultureInfo ci = new CultureInfo("en-NZ"); string date = "Web service date".ToString("R", ci); DateTime convertedDate = DateTime.Parse(date);               As per :     UTC/GMT Offset       Standard time zone: UTC/GMT +12 hours   Daylight saving time: +1 hour   Current time zone offset: UTC/GMT +13 hours     How do we adjust for the extra hour? Can this be done programmatically or is this some kind of setting on the PC's?


I often show off by asking people how fast electrons flow through wires. Then I tell them it's actually only a few millimeters per second. To clear the disbelief off their faces and boost my ego, I make the analogy as follows:  If I have a 10 meter long stick, and I poke them with it, the effect is nearly instantaneous, I can poke them well under one second, yet the stick is moving far less than 10 meters per second.   Now what I want to know, is if I had an extremely long stick, made of something lighter and stiffer than say carbon nanotubes, whacked one end with a hammer, would it be possible for the effect to be detected at the other end faster than light could get from the hammer side to the other?  I'm guessing it wouldn't, and I'm guessing I won't be able to understand the answer, but I'll ask anyway! Perhaps someone can give a simple and also a suitably comprehensive explanation?

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


Our statistical inference course material states the following:     The principle of mean square error can be derived from the principle   of maximum likelihood (after we set a linear model where errors are   normally distributed)   After that the material apparently shows this derivation over several pages of math equations with little explanation.  As I understand it, by 'principle' they mean the reason why MSE is a particularly good loss function. On another page they even explicitly state that in practice it's the most important loss function (within some context, I suppose).  Is it possible to explain without heavy math why MSE is a particularly good loss function? For example, which property makes it more important than mean absolute error (MAE)? Intuitively I would guess that MAE would be superior to MSE in most practical applications.

Very often when I investigate new statistical methods and concepts, I run into the squared difference (or the mean squared error, or a plethora of other epithets). Just as an  example, Pearson's r is decided based on the mean squared difference from the regression line that the points lie. For ANOVA's, you're looking at the sum of squares, and so on.  Now, I understand that by squaring everything, you make sure that data with outliers really gets penalized. However, why is the exponent being used exactly 2? Why not 2.1, or e, or pi, or whatever? Is there some special reason why 2 is used or is it just a convention? I suspect that the explanation might have something to do with the bell curve, but I'm quite sure.


I've always wondered what are the benefits of this type of instantiation of a list in java that I see in a lot of code  List<Object> objList = new ArrayList<Object>();   as opposed to   ArrayList<Object> objList = new ArrayList<Object>();   Both are valid ways to instantiate a Java ArrayList object but why use the first one?  Why should objList be casted as the interface rather than the actual class that implements it? What are the cases where this is helpful?  Also, on compiler level, when we invoke a method on objList that is specific to ArrayList but not the interface List, roughly speaking, how does compiler "know" that method belongs to ArrayList when objList is casted only as a generic obj that is an instance of some class that implements List?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


When I use $$$$ for mathematical text, there is too much vertical blank space between the mathematical text and the main text. How can I solve this problem?

How could I go about setting the 'above' and 'below' vspaces around the equation environment?  If the same could be done for the subequations or gather environments, this would be a bonus.


I am working on a program that needs a high level of accuracy. Unfortunately when I run a simple code such as this:  65.2805151+66.5374849  the result is 131.81799999999998  Instead of a 131.818  How can I go about addressing this issue?

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


Ok, so yes stupid me, apparently I logged in to my Synology back in January and ran an rm -rf * in my @iSCSI node that housed my VMWare DataStore. Then I rebooted both the ESX and Synology about 3 months later. So because the ESX had a file lock open I was writing to the 'deleted' DataStore for those 3 months and when everything rebooted it all finally deleted when the lock released. I lost ~3TB of data. I have managed to run some recovery tools and have found a deleted ~2TB inode that I can recover. My question is, can/should I recover that inode to another disk and somehow crack it open/map it so I can pull just one or two .vmhd files out of it? Just trying to salvage somethings like my daughter's baby pictures. I have access to Windows and various Linux flavors.

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


netsh wlan connect demands a profile, but netsh wlan show profiles shows 0 profiles. So I need to find a command that will create a profile, but netsh wlan add profile only allows adding an existing one from a file, not creating from scratch.  This question is not about whether a profile is optional, it is about creating a profile from scratch on the command line.

I'm currently coding a network app based on NetSH. Is there a way to connect to a wlan network without having to create a wlan xml profile?  Sorry if the question is unclear or doesn't belong here... Thanks.


I recently started looking into parts to build a new PC from scratch and was wondering about the operating system. I bought a full version of Windows 8.1 and installed it onto my current computer using a 64-bit disk. I was wondering if I would be able to deactivate Windows 8.1 on my current computer and install it onto a new motherboard altogether or if that is not possible and I would need to buy a whole new operating system.

We get a lot of questions on Super User about Windows activation and licensing. This question is an attempt to answer the most common questions in one place with a .   When reinstalling Windows, the following questions often come up:   Can I transfer the copy of Windows from my old computer to a new one? Does the license key on the sticker on my computer work on any computer? If I have a 32-bit version, can I install a 64-bit version? I have an OEM version of Windows, but only a retail disk. Can I still use it? I want to install Windows with a different language. Do I need a new license in that language? I changed some hardware. Will I be able to reactivate my computer? Can I back up my activation before doing a reinstall? How many computers can I install my license on? Do I have to deactivate my old installation before transferring a license? If so, how? How does licensing work in Windows ? What are the restrictions on transferring, reinstalling, and changing versions of Windows?


I'm new to html and I got this piece of code:  @{      ViewBag.Title = "Index"; }  <!DOCTYPE html>                <meta name="viewport" content="width=device-width" />         <title>View1</title>                           <link href="~/Content/bootstrap-theme.min.css" rel="stylesheet" />         <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
                 @foreach (var item in Model.Data)             {
                     @item.Key	                     @item.Value
                                     }
         I want to add a tab or spaces between: @item.Key	 and @item.Value	 how do I do that?  I guess adding css is the best way but I don't understand how to use it.

In an HTML table, the cellpadding and cellspacing can be set like this:  <table cellspacing="1" cellpadding="1">   How can the same be accomplished using CSS?


im trying to replicate something similar to below where near the exhaust the flames are extremely bright and towards the end of the flame it fades out. i got the glow to be amped up but i have no idea how i can go about controlling where the glow is coming from.

I am wanting to animate a row of LED lights. I have separated the LED lights from the rest of my object with the pass index/ID mask functions; currently all of my LED lights are on pass index #1.  What I want is to have a minor halo effect around the lights, but only when they are active. Currently, when I add a halo effect to my pass index #1, all of the LED lights have a halo effect regardless if the LEDs are emitting light. All LEDs are diffuse and emission shaders, so I can animate by controlling the mix amount between diffuse and emission.   Is there any simple way to have the halo effect created through recognizing light emission values, or will I have to just animate each LED as its own layer of compositing?


I have been reading a lot online that MD5 is not very secure, i have decided to switch my site over to use SHA512, i have never done this before so really i am just asking you to check to see if i have done it correctly, or is there an alternative more secure hash method which i can use to store the password ?   $upass is the users password which i need to hash.   Here was my origional PHP with MD5 :   $uname = mysql_real_escape_string($_POST['uname']);  $sname = mysql_real_escape_string($_POST['sname']);  $email = mysql_real_escape_string($_POST['email']);  $upass = md5(mysql_real_escape_string($_POST['pass']));   Here is my new PHP using SHA :   $uname = mysql_real_escape_string($_POST['uname']);  $sname = mysql_real_escape_string($_POST['sname']);  $email = mysql_real_escape_string($_POST['email']);  $upass = mysql_real_escape_string($_POST['pass']);   $upass = hash('SHA512', $upass);   Here is also the hashed string for the word "password" just to make sure the hashing is working.  SHA512 :  b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e  MD5 :  5f4dcc3b5aa765d61d8327deb882cf99  Thanks for any help / advice in advance.

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


Installing  and  do not enable the fingerprint scanner on a  to work with Ubuntu.   If there is another linux-based OS that supports this, I would gladly switch to that, but I haven't found any.   The output from lsusb is:  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 138a:0090 Validity Sensors, Inc.  Bus 001 Device 002: ID 04f2:b596 Chicony Electronics Co., Ltd  Bus 001 Device 004: ID 8087:0a2b Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Valadity Sensors, Inc. is my fingerprint sensor. How do I get it to work in Ubuntu?

I'm about to config my new fantastic T460s with Ubuntu 16.04 (because of Skylake Kernel issue I've to chose such new version) I tried to use my fingerprint sensor which is 138a:0090 (lusb) Fingerprint Gui doesn't recognize the device which is no wonder, because it is not on the compatibility list of it. Do I've to wait for a driver or is there something I can do about this?  Thanks a lot :)


I am wondering what is, if any, the best practice regarding class and static methods.  Consider the follwoing class  class A:     number = 0      @classmethod     def add_int_m(cls, m: int) -> int:         return cls.number + m      @staticmethod     def add_int_k(k: int) -> int:         return A.number + k   The two give the same result, but is one approach preferred over the other?

What is the difference between a function decorated with  and one decorated with ?


After dual boot of ubuntu with windows 10, the internal drives within PC are read only.How to change it to normal mode because I cannot change any thing to my files?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I'm doing some simple wiring in a shed I built and will have an actual electrician connect it to the panel.   I ran 12-2 for all my outlets so they can be on a 20 amp circuit and 14-2 for all my lights on a single switch and they will be on a 15 amp circuit.  The thing I was noticing yesterday though is I ran 12-2 from the future panel to the switch, and then 14-2 from the switch to all the light fixtures.  I texted my electrician buddy and asked if that was ok and he said yes as long as it's on a 15 amp circuit only.  Then I got to thinking about a time when I was tearing apart an old house and there was some wire running that was either 12-2 to an outlet and then 14-2 from there, or possibly vice versa and the guy I was working with said "whoa that's definitely a fire hazard".  Can someone explain to me what is safe, what is not safe, etc when mixing wire size on a single circuit (I know it's not a great idea to mix, but if you were to). Is it solely related to breaker size?

My father-in-law is a builder. He has put in 20 amp and 15 amp breakers, and ran 12-2 as the home runs to the switch's and the first plug to make them hot. He then ran 14-2 to feed the rest of the plugs, lights, and ceiling fans.   Is it okay that he used different gauge wires on the same circuit?


I have found this link have a simple and useable funciton to convert number to currency.    but how to turn it back form currency to number...  I already try this :   [http://jsfiddle.net/vb2cb1tm/3/]...   But its failed...  I try to read a formatted string using javascript and make a counting on this valua...

I have a text box that will have a currency string in it that I then need to convert that string to a double to perform some operations on it.   "$1,100.00" → 1100.00  This needs to occur all client side. I have no choice but to leave the currency string as a currency string as input but need to cast/convert it to a double to allow some mathematical operations.


Here is my regex for validating a e-mailadress. But it keeps removing letters with a apostrophe. For example (Hélen, becomes Hlen)   var firstname = $("#FirstName").val().replace(/å/gi, "a").replace(/ä/gi,"a").replace(/ö/gi, "o").replace(/[^a-z0-9\s]/gi, '');  var lastname = $("#LastName").val().replace(/å/gi, "a").replace(/ä/gi, "a").replace(/ö/gi, "o").replace(/[^a-z0-9\s]/gi, '');  $("#Mail").val(firstname + "." + lastname + '@customer.Email');

For a poor man's implementation of near-collation-correct sorting on the client side I need a JavaScript function that does efficient single character replacement in a string. Here is what I mean (note that this applies to German text, other languages sort differently):  native sorting gets it wrong: a b c o u z ä ö ü collation-correct would be:   a ä b c o ö u ü z  Basically, I need all occurrences of "ä" of a given string replaced with "a" (and so on). This way the result of native sorting would be very close to what a user would expect (or what a database would return). Other languages have facilities to do just that: , in , , . But what about JavaScript? Here is what I have right now. // s would be a rather short string (something like  // 200 characters at max, most of the time much less) function makeSortString(s) {   var translate = {     "ä": "a", "ö": "o", "ü": "u",     "Ä": "A", "Ö": "O", "Ü": "U"   // probably more to come   };   var translate_re = /[öäüÖÄÜ]/g;   return ( s.replace(translate_re, function(match) {      return translate[match];    }) ); }  For starters, I don't like the fact that the regex is rebuilt every time I call the function. I guess a closure can help in this regard, but I don't seem to get the hang of it for some reason. Can someone think of something more efficient?  Answers below fall in two categories:  String replacement functions of varying degrees of completeness and efficiency (what I was originally asking about) A  of  , which is now  among JS engines (not so much at the time of the question) and could solve this category of problem much more elegantly.


I have a website that speaks about videogames, and I have news, guides, reviews and articles. Which is the best format for the title?  Let me explain better with an example. Said that I have a guide, the actual title for the page have this format:     Name of the game - Guide - Title of the guide.   I would like to know if is it better to use another format like:     Title of the guide - Name of the game - Guide   Or something else.

Stack Overflow has made a change to their page titles such that the most popular tag for a question appears at the start of the title.  The change is being deployed across the network, so check out the page title for this question.    Compare the question title and the page title for :  Question title:     Is it safe to use ASP.NET MVC3 RC?   Page title:     asp.net mvc - Is it safe to use ASP.NET MVC3 RC? - Stack Overflow   I understand the change to try and stop  on Google.  Adding the most popular tag to the page title seems like a good idea.  However, a side effect that I'm noticing is that with a lot of tabs open, now the only part of the title that I can see is the tag.  Would moving this keyword to later in the page title harm these efforts to improve SEO?  Possible title:     Is it safe to use ASP.NET MVC3 RC? - asp.net mvc - Stack Overflow


There are other similar questions however none has provided an answer that works for me.  My VirtualBox Ubuntu VM has grown out of available storage and I would like to add more space to the main partition.  I have added storage to the Ubuntu drive then booted using Gparted Live to attempt to resize the partition, however the partition is shown as locked (has a key icon next to it) and so gparted is unable to resize it.  I tried deactivating and reactivating it, but that didn't help.  Any suggestions on how to make the partition resizeable from Gparted live?  Update: added screen shot.  You can see the grayed out controls which indicate that I can't make any changes.  Yes, I have tried to unmount and re-mount the partition but it gets back to the same locked state.  And yes, I booted using GParted Live CD.    Update:  lsblk  NAME                  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT loop0                   7:0    0 220.7M  1 loop /snap/atom/241 loop1                   7:1    0  14.8M  1 loop /snap/gnome-characters/367 loop2                   7:2    0 140.7M  1 loop /snap/gnome-3-26-1604/97 loop3                   7:3    0   236M  1 loop /snap/kde-frameworks-5/27 loop4                   7:4    0     1M  1 loop /snap/ark/6 loop5                   7:5    0  89.1M  1 loop /snap/core/8039 loop6                   7:6    0 260.7M  1 loop /snap/kde-frameworks-5-core18/32 loop7                   7:7    0   132K  1 loop /snap/gtk2-common-themes/5 loop8                   7:8    0   217M  1 loop /snap/atom/242 loop9                   7:9    0   156M  1 loop /snap/gnome-3-28-1804/91 loop10                  7:10   0 140.7M  1 loop /snap/gnome-3-26-1604/98 loop11                  7:11   0  89.1M  1 loop /snap/core/8213 loop12                  7:12   0 101.5M  1 loop /snap/p7zip-desktop/220 loop13                  7:13   0  54.6M  1 loop /snap/core18/1279 loop14                  7:14   0   132K  1 loop /snap/gtk2-common-themes/4 loop15                  7:15   0   4.2M  1 loop /snap/gnome-calculator/544 loop16                  7:16   0     1M  1 loop /snap/ark/7 loop17                  7:17   0   956K  1 loop /snap/gnome-logs/81 loop18                  7:18   0   4.2M  1 loop /snap/gnome-calculator/501 loop19                  7:19   0   3.7M  1 loop /snap/gnome-system-monitor/111 loop20                  7:20   0  14.8M  1 loop /snap/gnome-characters/359 loop21                  7:21   0  42.8M  1 loop /snap/gtk-common-themes/1313 loop22                  7:22   0  54.5M  1 loop /snap/core18/1265 loop23                  7:23   0 156.7M  1 loop /snap/gnome-3-28-1804/110 loop24                  7:24   0   956K  1 loop /snap/gnome-logs/73 loop25                  7:25   0  44.2M  1 loop /snap/gtk-common-themes/1353 loop26                  7:26   0   3.7M  1 loop /snap/gnome-system-monitor/107 loop27                  7:27   0  50.7M  1 loop /snap/p7zip-desktop/163 loop28                  7:28   0 255.6M  1 loop /snap/kde-frameworks-5-core18/30 sda                     8:0    0  25.6G  0 disk  └─sda1                  8:1    0  25.6G  0 part    ├─ubuntu--vg-root   253:0    0  21.6G  0 lvm  /   └─ubuntu--vg-swap_1 253:1    0     4G  0 lvm  [SWAP] sr0                    11:0    1  56.8M  0 rom  /media/ady/VBox_GAs_6.1.0 sr1                    11:1    1  56.8M  0 rom  /media/ady/VBox_GAs_6.1.01   sudo pvs    PV         VG        Fmt  Attr PSize  PFree   /dev/sda1  ubuntu-vg lvm2 a--  25.57g    0    sudo vgs    VG        #PV #LV #SN Attr   VSize  VFree   ubuntu-vg   1   2   0 wz--n- 25.57g    0    sudo lvs    LV     VG        Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert   root   ubuntu-vg -wi-ao---- 21.57g                                                       swap_1 ubuntu-vg -wi-ao----  4.00g

I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted:


I have deleted some files by mistake on my Android mobile, and I'd like to get them back. I tried using Dr. Fone, but it brought me A LOT of documents and images back which are not even deleted, for example it showed me icons used in Viber, icons used in Skype. It showed ALL documents even non deleted. And on top of that, when I tried to recover a document, it asked me to pay and so on. I'd like to have a free solution for this.  I tried an App called: Undeleter, but it asked me to if my device is rooted or not, and it told me that my device does not appear to be rooted. (I don't know what rooted means). What should I do? I am an absolute beginner and any hint is appreciated.   Thanks.

I just deleted a file on my Nexus S that I really need back. (It was actually part of an app using a sqlite database that did a drop table when upgrading to a new version.)  Presumably I need to root the phone first (which I hear is easy on Nexus phones) but am I in a catch-22 here? Namely, does rooting the phone mean wiping/overwriting the partition where the data lives?  If not, what do you recommend for data recovery tools? Presumably the file was just unlinked and not actively overwritten (per usual when "deleting" a file) so technically the data must be there...


I have some .m2 files which I need to copy from Finder in Mac but I don't see them there. How can I see the hidden files in Finder.  One workaround is to open the folder in terminal and use ls -a command to list all files but I am  looking for a way to view in Finder.

I have a folder that starts with a dot . but am unable to display it in Finder. How can I say that for folder x, Finder should also display hidden files/folders?


I have vague memories of reading this book in the mid 1990's. It centers about a boy selected to work with a super computer overlord kinda thing. I think there are aircraft that monitor thought. And I think the boy escapes at night on a futuristic motorbike? Any ideas? Thanks

It was either a short story or a novel. I read it about 20 years ago, and some vague memory of it stuck.  It's set in a future where everyone's allotted role is decided by a series of tests once they reach a certain age. They are then classified into a group which decides what jobs they will do.  Our hero rather controversially gets a perfect score in the tests. Nobody had done that in a long time. and at first he worries about what this might mean. He is sent to work for the mysterious scientists who maintain the computer that runs society. Most people don't know they exist. He is disappointed to learn he has to be their tea boy, and learn a tea making ceremony perfectly.  In the process he learns how to fool the machine, and eventually to circumvent the controls society has placed on him. He makes several visits to an area outside the control of the machine - where people are living in poverty and lawlessness.  Can't remember the author, or the name, just that basic idea, and the fact that early in the book is a very grand "tea ceremony" where he must make the tea perfectly.


I'm using NOKIA X2-01 and want to install Ubuntu. Can I? I guess it is the same for a Nokia 201 or even a blackberry - will it work?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


While building a flask website, I'm using an external JSON feed to feed the local mongoDB with content. This feed is parsed and fed while repurposing keys from the JSON to keys in Mongo.  One of the available keys from the feed is called "img_url" and contains, guess what, an url to an image.  Is there a way, in Python, to mimic a php style cURL? I'd like to grab that key, download the image, and store it somewhere locally while keeping other associated keys, and have that as an entry to my db.  Here is my script up to now:      import json     import sys     import urllib2     from datetime import datetime      import pymongo     import pytz      from utils import slugify     # from utils import logger      client = pymongo.MongoClient()     db = client.artlogic      def fetch_artworks():     # logger.debug("downloading artwork data from Artlogic")  AL_artworks = [] AL_artists = [] url = "http://feeds.artlogic.net/artworks/artlogiconline/json/"  while True:     f = urllib2.urlopen(url)     data = json.load(f)      AL_artworks += data['rows']      # logger.debug("retrieved page %s of %s of artwork data" % (data['feed_data']['page'], data['feed_data']['no_of_pages']))      # Stop we are at the last page     if data['feed_data']['page'] == data['feed_data']['no_of_pages']:         break      url = data['feed_data']['next_page_link']  # Now we have a list called ‘artworks’ in which all the descriptions are stored # We are going to put them into the mongoDB database, # Making sure that if the artwork is already encoded (an object with the same id # already is in the database) we update the existing description instead of # inserting a new one (‘upsert’).  # logger.debug("updating local mongodb database with %s entries" % len(artworks))  for artwork in AL_artworks:     # Mongo does not like keys that have a dot in their name,     # this property does not seem to be used anyway so let us     # delete it:     if 'artworks.description2' in artwork:         del artwork['artworks.description2']     # upsert int the database:     db.AL_artworks.update({"id": artwork['id']}, artwork, upsert=True)       # artwork['artist_id'] is not functioning properly     db.AL_artists.update({"artist": artwork['artist']},                       {"artist_sort": artwork['artist_sort'],                        "artist":  artwork['artist'],                        "slug": slugify(artwork['artist'])},                       upsert=True)  # db.meta.update({"subject": "artworks"}, {"updated": datetime.now(pytz.utc), "subject": "artworks"}, upsert=True) return AL_artworks      if __name__ == "__main__":         fetch_artworks()

I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes.  The text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows .bat file to download the actual MP3 file. I would prefer to have the entire utility written in Python.  I struggled to find a way to actually download the file in Python, thus why I resorted to using wget.  So, how do I download the file using Python?


I fed multiple ocelots raw salmon until they had the hearts coming off of them but they wouldn’t tame. They didn’t run away but they didn’t become tame cats and they wouldn’t follow me. Essentially the previously wild ocelot became like any passive mob such as a pig: you can lure it but it’ll never become domesticated. I guess basically it was only in “breeding mode” but it clearly “loved” me, however, for some reason, it didn’t want to follow me.

I'm trying to make a cat house for my zoo on Minecraft. I have some untamed ocelots and I also want a few tamed ocelots. Fish only puts them in breeding mode.


I'm working on a program for a game that reads in formatted data from a text file and then analyzes the probability of a certain stat being rolled on a given item. The particular method at the source of the problem, takes in two pieces of user input and filters through the text file accordingly.  public ArrayList<String> analyze(String type, int ilvl){     strImplicits = new ArrayList<>();     // make a new item based on the user input     userItem = new Item(type, ilvl);      try {         // File reading shit         BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("/src/ImplicitList.txt")));          //File implicitList = new File("ImplicitList.txt");         //Scanner fileReader = new Scanner(implicitList);          String line = "";         String name = "";         String effect = "";         int implicitilvl = 0;          while ((line = reader.readLine()) != null){              if (line.equals("$")) {                 line = reader.readLine();                  // splitting the line and grabbing data                 String[] info = line.split("\t");                 name = info[0];                 implicitilvl = Integer.parseInt(info[1]);                 effect = info[2];              } else if (!line.equals(null) && !line.equals("$")){                  String[] tag = line.split(" ");                 int weight = Integer.parseInt(tag[1]);                  if (userItem.getTags().contains(tag[0]) && weight != 0 && ilvl >= implicitilvl) {                     userItem.addRoll(name, effect, weight);                 }             } // end else-if             if (line == null)                 break;         } // end of while         /**          * Iterate through each line of the text file, looking for the $ delimiter.          * After we find the & character we need to check the mod's tags to see if it applies          *          * if yes, add the weighting to the int variable that represents the pool of mods          *      probably would need an arrayList to store and print out the possible variables          */     } catch (FileNotFoundException e) {         e.getMessage();     } catch (IOException e) {         e.printStackTrace();     }     // string representation of all the possible implicits to be used in combo box     for (Implicit imp: userItem.getPotRolls())         strImplicits.add(imp.toString());     return strImplicits; }   The error message I receive is:  Exception in thread "JavaFX Application Thread" java.lang.NullPointerException     at java.io.Reader.<init>(Reader.java:78)     at java.io.InputStreamReader.<init>(InputStreamReader.java:72)     at Driver.alternative(Driver.java:34)     at VaalUI.handle(VaalUI.java:158)     at VaalUI.handle(VaalUI.java:17)   where Driver.java:34 is the line where I initialize the BufferedReader object. When debugging the program won't execute past this line so I can't see it being a problem caused by the rest of the code in the while loop (though that code may cause other issues, I just haven't gotten far enough to tell). I've tried looking at other solutions to similar error messages but none of them have worked for my case. Any help welcome, thanks.

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?


I'd like to move the discussion from  into a chatroom. I created a chatroom (in "Gallery" mode), and under the "Access" tab is a section labelled "Explicit write access", which says:  Even when this room is read-only or their reputation is too low, these users will be able to talk in this room.  Which sounds like exactly what I want, because the user asking the question has a reputation of 5. Unfortunately, if I try to grant the user write access to the room, I get the "Users must have at least 20 reputation to talk" error. ...which I knew, and is why I'm trying to grant explicit write access because "their reputation is too low". Is there no way to have a conversation with a low-reputation user outside of comments?

It was nice to discover the option for a room owner to add any user to a room, even if their rep is too low.     ...so I notified the user in question, and as instructed on the next screen, I had them got to chat.stackoverflow.com so that I'd be able to add them.    ...but when they did their part, and I did my part, I got the message:    Obviously both frustrated, the user's next logical question was:  "So I just have ask a couple questions and get someone to upvote them, right?"    Needless to say, we don't want to encourage new users to post questions for the sole purpose of bypassing a frustrating, misdocumented rule.  I realize this will likely quickly get closed since it has at least one  - which hasn't been touched in 5½ years.  However it would be nice if the issue was revisited:  Ideally, it would be cool if RO's did have the option of deciding who had access to the room they "own", but short of that, is it possible to remove the 6 "misleading" words from that page?


I try to install osspd, but I get the message that I need the library lib6c >= 2.17  I tried to install it by: apt-get install osspd    apt-cache policy osspd N: Unable to locate package osspd  version: cat /proc/version Linux version 3.5.0-34-generic (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #55~precise1-Ubuntu SMP Fri Jun 7 16:25:50 UTC 2013  All with the same result. not easy to backport to 12.10 LTS??!!  !!!!!Nevermind Since what I wanted was to have the sound back working, I follow the thread:   I installed ia32-libs-multiarc, so that did the trick

I have installed Civilization 5 retail version with an update pack called update 7 via WINE and while the game runs well I am unable to get any sound working.  I am running 12.04 and version 1.4 of WINE via APT.  Any suggestions on how I could get sound working?


How do i show that the below sequence is convergent ? $$\gamma_n=1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+...+\frac{1}{n}-\log n$$ I was solving some rearrngement problems where the premise was the above mentioned . Can't apply $\epsilon $ $\delta$ , can't apply squeeze also .Any leads are appreciated!!

Question :    For each $n \in \mathbb N$, Define : $\gamma_n=1+\frac{1}{2}+\dots+\frac{1}{n}-\int_1^n \frac{1}{x}dx$    Prove that $\{\gamma_n\}$ is convergent.      Note 1 :  I know that $\sum_1^\infty \frac{1}{k}$ diverges. I can guess that this sequence is convergent to $0$ because of the similar terms inside the integration and outside of it.  The problem is that the integration is continuous. I mean that $x$ is not just integers.  What can we do with the values left?! ( For example, $\frac{1}{2.5}$ ) Also, Notice that this problem should be solved with some elementary tools.  ( It's from a part of my book which is even before any discussion about the Fundamental theorem of calculus. )   Note 2 : I'm not good at integration and i'm learning it. Any good details can help me.    Thanks in advance.


A few years ago I travelled to the Republic of Ireland from the UK, taking a ferry to Belfast and driving across the border from NI. As a UK national this wasn't a problem, but I'm trying to work out how it would work if I weren't.  For this scenario, let's assume:   I have a valid UK long-term visa I'm not eligible for the Irish visa waiver scheme for holders of UK visas   As stated in  I would need to get an Irish visa, but once I had it would it be legal to just cross the border, or would I need to report somewhere to have it checked / get my passport stamped?

I'm going with an American friend from Belfast to Dublin by bus. Despite the lack of border control at the land border due to the Common Travel Area agreement, non-EU/EFTA nationals are supposed to get processed and stamped into Ireland even when entering from the UK - the Immigration section of the Gardai (Irish Police) has consistently told me this by E-Mail and on the phone  I e-mailed the Gardai asking about entering by bus from Belfast, and they said we should go to the Garda Station in Dundalk for entry processing.  However, Belfast-Dublin buses do not stop in Dundalk, but run non-stop between Newry (UK) and Dublin.  What is the proper procedure in this case?  UPDATE: just found the following on the :     If you arrive via the border with Northern Ireland, you must report to an immigration officer at Burgh Quay Registration Office Dublin or your local Garda Síochána (police) station as soon as possible.   I've noticed a common belief here on Travelstack that, due to the Common Travel Area, you need to do nothing as long as you were admitted to the UK. That is then clearly not the case.


Why does this work  public E a; public MySortedArray(E asdf){     a = asdf; }   and this doesn't?  public E[] a; public MySortedArray(E[] asdf){     a = asdf; }   How can I achieve the second when let's say I do      MySortedArray<Integer> test = new MySortedArray<>(integersArray);

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I came across a different way of accessing an array element today. I am just curious if its correct way to access an array element.  Here is my code,  #include <stdio.h>  int main(int argc, char* argv[]) {     int arr[4] = {4, 5, 6, 7};     printf ("---> %d \n", 2[arr]);     return 0; }   Following is the output,  ---> 6   I thought the program will not compile but it did! I tried to compile it on Linux and Windows and it works fine on both. Expert views on this?

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


To me:      'Bad case of (an ailment)'    sounds anything and everything that is either the direct result of an ailment; for example:      I have a bad case of the flu.    would cover other symptoms that might accompany it in a given case (i.e, headache, sore throat, body aches, etc.) Is that right?  Whereas if I said:      I am trying to get over the flu.   means I am doing my best to recover from it. Correct?

When I googled stomach flu, there were many questions and statements like      How do you get the stomach flu?    Or     Difference between a stomach flu and food poisoning    Or      Six facts about stomach flu   When do you use the, a or nothing? And which should I use for a sentence like "I got a stomach flu from someone" ?


I am not able to install anything on Ubuntu 18.04. I always get this error message Errors were encountered while processing:kexi. I have tried,  sudo apt install kexi sudo apt-get dist-upgrade    sudo dpkg -a --configure   Here is the complete error output  dpkg: error processing package kexi (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration Errors were encountered while processing:  kexi E: Sub-process /usr/bin/dpkg returned an error code (1)

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager:  Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it.  I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal. Errors were encountered while processing:  zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1)  Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update?


I was named even before I was born.      Is this correct? or       I had been named even before I was born   In the first sentence, the even before word clarifies the time frame. Do we still need to use I had been named?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I am making a java project which records football games and displays the league table. When a game is added to the league between two teams, I need a way of storing the teams position in the league based on the number of points that the Team have.  To do this is am thinking of using a HashMap< Integer, Team > where the Integer is storing the Teams position in the league based on the number of points that a team has. Whenever a new game is added I need a way of ordering this list so that it is sorted where the Teams with the greatest number of points are closer to the number one position.  For example, if there are three teams   Team A with 8 points, Team B with 5 points, Team C with 4 point  I would like the Map to be ordered as such  1 : A, 2 : B, 3 : C  My question are:  1) Do you think I should be using a HashMap or TreeMap for this instance?  2) How would I implement the code to sort the league by points aquired?

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


Find all numbers that are their own multiplicative inverse in $mod$ $p$ where $p$ is prime.   I recall that when $p$ is prime, all integers from 1 to the modulus minus 1, so all numbers from $1$ to $p-1$, have multiplicative inverses in mod $p$. So, the numbers that are their own multiplicative inverse would be $1$ and $1-p$. Can someone please explain why?

I like to be thorough, but if you feel confident you can skip the first paragraph.  Review: A ring is a set $R$ endowed with two operations of + and $\cdot$ such that $(G,+)$ is an additive abelian group, multiplication is associative, $R$ contains the multiplicative identity (denoted with 1), and the distributive law holds.  If multiplication is also commutative, we say $R$ is a commutative ring. A ring that has no zero divisors (non-zero elements whose product is zero) is called an integral domain, or just a domain.  We want to show that for a domain, the equation $x^2 = 1$ has at most 2 solutions in $R$ (one of which is the trivial solution 1).    Here's what I did:   For simplicity let $1,a,b$ and $c$ be distinct non-zero elements in $R$.  Assume $a^2 = 1$.  We want to show that letting $b^2 = 1$ as well will lead to a contradiction.  So suppose $b^2 = 1$, then it follows that $a^2b^2 = (ab)^2 = 1$, so $ab$ is a solution as well, but is it a new solution?  If $ab = 1$, then $abb = 1b \Rightarrow a = b$ which is a contradiction.  If $ab = a$, then $aab = aa \Rightarrow b = 1$ which is also a contradiction.  Similarly, $ab = b$ won't work either.  So it must be that $ab = c$.  So by "admitting" $b$ as a solution, we're forced to admit $c$ as well.  So far we have $a^2 = b^2 = c^2 = 1$ and $ab = c$.  We can procede as before as say that $(abc)^2 = 1$, so $abc$ is a solution, but once again we should check if it is a new solution.  From $ab = c$, we get $a = cb$ and $b = ac$, so $abc = (cb)(ac)(ab) = (abc)^2 = 1$.  So $abc$ is not a new solution; it's just one.  At this point I'm stuck.  I've shown that it is in fact possible to have a ring with 4 distinct elements, namely $1,a,b$ and $c$ such that each satisfies the equation $x^2 = 1$ and $abc = 1$.  What am I missing?


(The problem is found on: KUbuntu 13.10)     Initially /tmp is not binded. System has a volume with a label "Vol_2" (e.g., /dev/sda2). A user logs in. The user mounts the volume "Vol_2" to /media/Vol_2 (if this drive is not mounted yet; this one might be mounted in the previous session). The user starts the file manager (Dolphin). Device list contains an item "Vol_2". The file manager (Dolphin) for this device displays content of "(/dev/sda2)/". The user runs: sudo mount --bind /media/Vol_2/tmp /tmp The user starts the file manager (Dolphin). Device list contains an item "Vol_2". The file manager (Dolphin) for this device displays content of "(/dev/sda2)/tmp" (not "(/dev/sda2)/").   10. Why? Is this behavior defined by Ubuntu or by KDE?   The file manager (Dolphin) displays proper content of the folder "/media/Vol_2".

I have these lines in the fstab   # binds /media/DataNtfs/Music           /home/can/Music                  none    rw,bind  /media/DataNtfs/Pictures        /home/can/Pictures               none    rw,bind  /media/DataNtfs/Downloads       /home/can/Downloads              none    rw,bind  /media/DataNtfs/Documents       /home/can/Documents              none    rw,bind  /media/DataNtfs/Backups         /home/can/Backups                none    rw,bind  /media/DataNtfs/Notes           /home/can/Notes                  none    rw,bind  /media/DataNtfs/Other           /home/can/Other                  none    rw,bind  /media/DataNtfs/Packages        /home/can/Packages               none    rw,bind  /media/DataNtfs/Photos          /home/can/Photos                 none    rw,bind  /media/DataNtfs/Videos          /home/can/Videos                 none    rw,bind  /media/DataNtfs/WorkSpace       /home/can/WorkSpace              none    rw,bind


Let $a \in \mathbb R$ and let $f$ be a real-valued function defined on an open interval $J$ containing $a$. Then $\lim_{x \to a} f(x)$ exists if and only if the left-sided limit and the right-sided limit of $f$ exists and $\lim_{x \to a^+} f(x) = \lim_{x \to a^-} f(x)$  I want to ask how to prove this proposition converse direction? That is, assume $\lim_{x \to a^+} f(x) \neq \lim_{x \to a^-} f(x)$ but $f$ is continuous at $a$?

My teacher proposed this question as a challenge proof to do on our own and I can't seem to get it. Was Wondering if anyone could give me a hint or help me on the process to completing it.  Let $a \in \mathbb{R}$. Let $f$ be a function defined, at least, on an interval  centred at $a$, except possibly at $a$. Let $L \in \mathbb{R}$.     If $\lim\limits_{ x→a-} f(x) = \lim\limits_{ x→a+} f(x) = L$   then $\lim\limits_{ x→a} f(x) $ = $L$.    We are supposed to prove this using the "delta-epsilon" proof style. Thanks in advance!!


I'm mostly active in Matlab related questions, and recently I checked the highest votes for that tag (disclaimer, I have a high ranking question there too). I have found that the #1 question:  was deleted. Now, I know and fully respect some of the users that gave the vote to delete, they are prominent people etc, but I still try to understand the following. When a question receives +139 votes, a record number for the matlab tag (I confess that I actually down-voted it), and also got 13 answers (with +129 votes the highest) with ~60K views, should a handful of individuals like myself and  more privileged user (like a moderators) be enough to delete it? Where's the weight of the many many peoples that up-voted it?  In this example, the question was first closed by a moderator for being not constructive (which I also agree with it, albeit many people thought otherwise). So far so good, there will be no more activity in that question. However, now that it is deleted, I started thinking whether this might miss the less formal side of SO, where users discuss broader issues. What should be the balance in your view?

I've recently reached enough reputation on one of the sites to be able to cast delete votes. I am not sure when a question is supposed to be deleted as opposed to just remain closed.   What criteria should I use when deciding whether or not to cast my delete vote?


So recently I decided to change my career path from PHP developer to MERN stack developer and switched to back-end developing with node.js. Started all over again javascript basics and came across scopes which really started to melt my mind : WHY - In php : <?php  $var = "string";  if(true) {     $var = "string2"; }  echo $var;  returns string2 In c++ : // Example program #include <iostream> #include <string>  int main() {   std::string var = "string";   if(true) {       std::string var = "string2";   }   std::cout << var ; }  returns string2 But in javascript : let string = "string"; if(true) {     let string = "string2"; } console.log(string);  Returns string What is the explanation behind javascript that it uses variables scope programming and other big programming languages like c++, php have normal machine kind variable scoping? My first guess would be that javascript is primarily front-end language and/or javascript works asynchronously.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Is there anybody could explain the reason why the following is happening in JavaScript?  let x212 = 154688977320418212; // returns 154688977320418200  let x230 = 154688977320418230; // returns 154688977320418240  let x256 = 154688977320418256; // returns 154688977320418240  let x257 = 154688977320418257; // returns 154688977320418270   Does it mean that there is no way to store long integer value, without converting it to string?

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


If someone keeps entering and exiting my bedroom, and I want him to stop. Should I say:   don’t come in and out of my bedroom.   Or   don’t go in and out of my bedroom.   Is this just a case of directional difference between the verbs ‘come’ and ‘go’, or is it that only one of them fits as part of an idiomatic construction?  Also, apart from ‘in and out’, are there any other expressions/phrases that can express the same idea succinctly?


I am using  template by overleaf. It doesn't display the numbers in a "correct format" () even by using $1$. It has an undesirable format (). I have tried to look into the theme and other files but unable to fix it. I appreciate any help you can provide. Thanks.

In a LaTeX article, the math characters are more "curvy" than the text characters:  \documentclass[12pt]{article} \begin{document}  $x^2 + y^2 = z^2$ \end{document}     In a beamer presentation, the math characters do not have the same curves:  \documentclass{beamer} \begin{document} \begin{frame}  $x^2 + y^2 = z^2$ \end{frame} \end{document}     Question  How can I get the beamer math to look just like the article math?  I would prefer if the solution was a single line (that I could place at the top of my LaTeX file) as opposed to something that needs to appear next to every piece of math.


Given a Frechet differentiable function $f:U\to \mathbb{C}$, where $U$ is a open disk centered at 0 with some radius. Prove that $$\lim_{r \to 0} \frac{1}{r^2} \int_{|z| =r} f(z)dz = 2\pi i\frac{\partial f}{\partial \overline z}(0) $$ I know that the integral inside can be expressed in a parameterized form $z = re^{i\theta}$, which makes the integral $\int_{0}^{2\pi} f(re^{i\theta})rie^{i\theta}d\theta$. After that I have no idea  how to use the Frechet differentiability. Any help will be appreciated.

This is the problem from the book Notes on Complex Function Theory, Sarason.      Let the complex valued function $f$ defined and $\mathcal{C}^1$ in the disk $|z-z_0|<R.$ For $0<r<R$ let $C_r$ denote the circle $|z-z_0|=r$, with the counterclockwise orientation. Prove that $$ \lim_{r\to 0}\frac{1}{r^2}\int_{C_r}{f(z)}\ dz=2\pi i\ \frac{\partial f}{\partial \bar{z}}(z_0) .$$   I found the answer to my question  But I wanted to do this by basic theory of complex integration. Any help will be appreciated.   Thanks.


I installed KDE on Ubuntu 16.04, but after some time I removed it because it was slow, but although I've removed it, my startup logo is still Kubuntu not Ubuntu!  How can I make it turn back to the Ubuntu logo?

I am on 11.04.My Ubuntu splash screen was replaced by Kubuntu after I installed Kubuntu-desktop.I followed the answer of daniel kullmann by mistake in  askubuntu link and I lost splash screen.Now it shows only a blank screen after boot menu until login screen.I entered the other commands from the same post but changed nothing.How can I get back the splash screen back?


Please provide Ubuntu documentation that refutes this:   Why, on my fully updated 13.04 system, does pkexec not function?  $ pkexec gedit somefile.txt No protocol specified  ** (gedit:13135): WARNING **: Could not open X display Cannot open display:  Run '/usr/bin/gedit --help' to see a full list of available command line options


What's the best way to enumerate all available Linux syscalls?   To clarify, I'm asking how to discover which syscalls are being filtered by seccomp while running in a containerized environment.

Is there a way to get the number of or list of system calls supported by currently running Linux Kernel? So I want to find a way to 'read' the syscall table of a running kernel.


I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions:  (1) I see that each of the running processes occupies a very small percentage of memory (%MEM no more than 0.2%, and most just 0.0%), but how the total memory is almost used as in the fourth line of output ("Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers")? The sum of used percentage of memory over all processes seems unlikely to achieve almost 100%, doesn't it?  (2) how to understand the load average on the first line ("load average: 14.04, 14.02, 14.00")?   Thanks and regards!  Edit:  Thanks!  I also really like to hear some rough numbers based on used percentage of memory to determine if a server is heavily loaded, since I once became the one who cramed the server without understanding the current load.  Is swap regarded as almost the same as memory? For example, when memory and swap are almost of same size, if the memory is almost running out but the swap is still largely free, may I just view it as if the used percentage of memory + swap is still not high and run other new processes?  How would you consider together CPU or memory (or memory + swap) usage? Do you become worried if either of them reaches too high or both?  Output of top：  $ top    top - 12:45:33 up 19 days, 23:11, 18 users,  load average: 14.04, 14.02, 14.00 Tasks: 484 total,  12 running, 472 sleeping,   0 stopped,   0 zombie Cpu(s): 36.7%us, 19.7%sy,  0.0%ni, 43.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers Swap: 63111312k total,   500556k used, 62610756k free, 124437752k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  6529 sanchez   18  -2 1075m 219m  13m S  100  0.2  13760:23 MATLAB 13210 timothy   18  -2 48336  37m 1216 R  100  0.0   3:56.75 absurdity 13888 timothy   18  -2 48336  37m 1204 R  100  0.0   2:04.89 absurdity 14542 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.34 absurdity 14544 timothy   18  -2  2888 2076  400 R  100  0.0   1:06.14 gatherData  6183 sanchez   18  -2 1133m 195m  13m S  100  0.2  13676:04 MATLAB  6795 sanchez   18  -2 1079m 210m  13m S  100  0.2  13734:26 MATLAB 10178 timothy   18  -2 48336  37m 1204 R  100  0.0  11:33.93 absurdity  12438 timothy   18  -2 48336  37m 1216 R  100  0.0   5:38.17 absurdity 13661 timothy   18  -2 48336  37m 1216 R  100  0.0   2:44.13 absurdity 14098 timothy   18  -2 48336  37m 1204 R  100  0.0   1:58.31 absurdity 14335 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.93 absurdity 14765 timothy   18  -2 48336  37m 1196 R   99  0.0   0:32.57 absurdity 13445 timothy   18  -2 48336  37m 1216 R   99  0.0   3:01.37 absurdity 28990 root      20   0     0    0    0 S    2  0.0  65:50.21 pdflush 12141 tim       18  -2 19380 1660 1024 R    1  0.0   0:04.04 top  1240 root      15  -5     0    0    0 S    0  0.0  16:07.11 kjournald  9019 root      20   0  296m 4460 2616 S    0  0.0  82:19.51 kdm_greet     1 root      20   0  4028  728  592 S    0  0.0   0:03.11 init     2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd     3 root      RT  -5     0    0    0 S    0  0.0   0:01.01 migration/0     4 root      15  -5     0    0    0 S    0  0.0   0:08.13 ksoftirqd/0     5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0     6 root      RT  -5     0    0    0 S    0  0.0  17:27.31 migration/1     7 root      15  -5     0    0    0 S    0  0.0   0:01.21 ksoftirqd/1     8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1     9 root      RT  -5     0    0    0 S    0  0.0  10:02.56 migration/2    10 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/2    11 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/2    12 root      RT  -5     0    0    0 S    0  0.0   4:29.53 migration/3    13 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/3


I am a Srilankan national living in India for past 20 years married to a indian girl. i had regular India visa till 2014 and awaiting for 2015 Indian visa yet. My mom and brothers are living in UK, my mom now is in a very serious condition at hospital. i need to visit her immediately as I haven't visited her for past 12 years. please advise in what way I can take a UK visa to visit her.

I'm a British national. My grandmother just passed. My wife is Chinese. In general it's a major pain to get my wife a visa to visit the UK, we have never been before.  Is there any way to get an emergency visa to attend the funeral?  What sort of documents would we need?