After seeing both Einstein's theory of relativity ($E=mc^2$) and the formula of kinetic energy (K.E=$\frac{mv^2}{2}$), I noticed that that they are mostly the same, with the only difference that Einstein's theory uses a specific speed, namely of light, while the kinetic formula uses the object's speed. Is the similarity a coincidence, like with density [mass/volume] and concentration [mass of solute/volume of solution]? Was one derived from the other?

The simplest equation expressing mass–energy equivalence is the famous $E=mc^2$ where $c$ represents the speed of light. Compare this with $E_K = \frac{1}{2}mv^2$.   Since $E=mc^2$ can be applied to rest mass ($m_0$) and rest energy ($E_0$) to show their proportionality as  $E_0=m_0c^2$, I ask whether this resemblance is just a coincidence created by the need of any equation to be homogeneous for units, or are the two equations fundamentally related?  I know about  but I could not find the answer I'm looking for there.


I know this question has been asked multiple times. I've looked around a lot, but I can't seem to find an answer.  I did find this code . But it will not compile, and all the other answers I've seen have been about how to get a single processes cpu/ram usage.

I once had the task of determining the following performance parameters from inside a running application:   Total virtual memory available Virtual memory currently used Virtual memory currently used by my process Total RAM available RAM currently used RAM currently used by my process % CPU currently used % CPU currently used by my process   The code had to run on Windows and Linux. Even though this seems to be a standard task, finding the necessary information in the manuals (WIN32 API, GNU docs) as well as on the Internet took me several days, because there's so much incomplete/incorrect/outdated information on this topic to be found out there.  In order to save others from going through the same trouble, I thought it would be a good idea to collect all the scattered information plus what I found by trial and error here in one place.


I am graduated from mathematics but my degree did not contain any statistics courses. What kind of road map would one suggest to learn statistics if my next goal would be to learn statistics so well that I could help bachelor thesis writers to do the data analysis? For example, is it enough to study the books Methods and Applications of Linear Models: Regression and the Analysis of Variance, Statistical Inference and Introduction to Practice of Statistics?

I know people love to close duplicates so I am not asking for a reference to start learning statistics (as ).   I have a doctorate in mathematics but never learned statistics. What is the shortest route to the equivalent knowledge to a top notch BS statistics degree and how do I measure when I have achieved that.   If a list of books would suffice (assuming I do the exercises lets say), that's terrific. Yes, I expect working out problems to be an implicit part of learning it but I want to fast track as much as realistically possible. I am not looking for an insanely rigorous treatment unless that is part of what statistical majors generally learn.


I have a piece of code resembling the following (other details omitted for brevity):  template <uint First, uint Second, typename T> struct Thing {   std::shared_ptr<T> asdf;   uint get() const { this->asdf->get_value<First,Second>(); } };   ... producing the following error in GCC 7:  error: expected primary-expression before ')' token   uint get() const { this->asdf->get_value<First,Second>(); }                                                          ^   Clang 4.0.1 reports no warnings with -Weverything (excepting very pedantic things like c++98 compatibility warnings); same thing with GCC 7 and -W{all,extra,effc++,pedantic}.    I was previously unaware of ; while the answer to my problem is certainly outlined there, the error message didn't make it plain that was the problem.  Supposing I deleted this question and its associated answer, other people searching for this error message will only run across the questions I found -- that is, the ones indicating the problem was caused by passing a type as a function argument instead of passing a value.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


Android 4.4 comes with an app button in the bottom panel. If it gets deleted, how do I get it back?

I have a Samsung Galaxy S2, running the latest CM10.1.  I lost the app drawer icon on my Dock; I must have deleted it. The app drawer icon lets you go to the app list, and the widget list.  How do I get the app drawer icon back? The icon looks like a circle with 6 dots inside it.


I am running lubuntu (actually kodibuntu) as my server. whilst attempting to add a package there was an error in the sourceslist. config rendering synaptic package manager useless.  I cant change the file as a have no text editor installed (and no way to install one it seems); (I really only have chrome browser that is gui).  What is the simplest way to either edit the file in the command line or remove it. I have enabled the root account but am not 100% confident that i will not do something stupid such as make root the owner of my home directory without having gksu nautilus installed.   is there a command to undo a change in sources list? I could boot a live cd and edit the file but again this would have me tapping commands in as root and probably break the whole system.  if somebody could point me in the right direction it would be appreciated, even just some way to install a text editor. would nano be installed? thanks

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I have an audio file on my Linux system. Let's say a 2 second .wav  file. I want to copy the same audio file 50 times into a new b.wav such that the duration of b.wav will be 100 seconds. I tried like this: for i in {1..50}; do cat a.wav >> b.wav; done   But it's not working. Please suggest a solution.

The only command line solution for gapless playback I found so far (working with ALSA and JACK) is moc (»music on console«). While I'm still searching for a simpler way I was wondering if it is possible to loop an audio file into a new file for a given number of times?  Something like:  loop-audio infile.flac --loop 32 outfile.flac   for repeating infile.flac 32 times into outfile.flac


How to remove character '\' in NSString IOS  For example,  NSString *abc = @"bmcvn\nmsf;   I have tried:  NSString *stri = @"\rdffsdf"; NSString *str = [stri stringByReplacingOccurrencesOfString:@"\\" withString:@"123"]; NSLog(str);   but it didn't replace

How to replace a character is a string in Objective-C?


I have two ppa added to my Ubuntu 16.04 installation and would like to freeze the current release that I have thoroughly tested.  add-apt-repository ppa:certbot/certbot  add-apt-repository ppa:freeradius/stable-3.0   Is there any way to freeze the current version, so that future unattended upgrades don't get the latest which may break the production system?  This is how I have setup my unattended upgrades.  sed -r \ -e 's|^//Unattended-Upgrade::MinimalSteps "true";$|Unattended-Upgrade::MinimalSteps "true";|' \ -e 's|^//Unattended-Upgrade::Mail "root";$|Unattended-Upgrade::Mail "root";|' \ -e 's|^//Unattended-Upgrade::Automatic-Reboot "false";$|Unattended-Upgrade::Automatic-Reboot "true";|' \ -e 's|^//Unattended-Upgrade::Remove-Unused-Dependencies "false";|Unattended-Upgrade::Remove-Unused-Dependencies "true";|' \ -e 's|^//Unattended-Upgrade::Automatic-Reboot-Time "02:00";$|Unattended-Upgrade::Automatic-Reboot-Time "03:00";|' \ -i /etc/apt/apt.conf.d/50unattended-upgrades  echo 'APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1"; ' > /etc/apt/apt.conf.d/10periodic  service unattended-upgrades restart   Ideally, I could test this first on a test system, and when I'm sure that it all works, I could unfreeze the ppa on production to upgrade to the latest and then freeze it again.  Is this possible?

How do I limit the updates that are installed to those from a specific set of repositories? Is this at all possible?


Is there any rule for powers so that i can compare which one is greater without actually calculating? For example    54^53 and 53^54  23^26 and 26^23 3^4 and 4^3 (very simple but how without actually calculating)


So I'm trying to find a solution for the equation $$(65!)^2\equiv x\:(\text{mod}\: 131)$$ I'm given the hint to use Wilson's Theorem which states, that for a prime $p$ we have $(p-1)!\equiv -1\:(\text{mod}\:p)$.   The only thing I've managed to so far is insert my number in Wilson's Theorem: So I get $(130!)\equiv -1\:(\text{mod}\: 131)$. From here on I have no idea what to do.   Any help would be appreciated. Apologies for any english errors.

Suppose that $p$ is a prime. Suppose further that $h$ and $k$ are non-negative integers such that $h + k = p − 1$.   I want to prove that $h!k! + (−1)^h \equiv 0 \pmod{p}$  My first thought is that by Wilson's theorem, $(p-1)! \equiv -1 \pmod{p}$, and $h!k!$ divides $(p-1)!$ (definition of a binomial). Where would I go from here?


Is there a global timer for Stack Overflow?

What time zone do Stack Overflow's servers operate in?  I noticed that it couldn't be my time zone, or the ones before me (I'm in North American Eastern Time), because I logged into SO earlier today (around 12 pm), then I logged in just a few minutes ago (around 8 pm), then about a minute later I got the Fanatic badge (yay me!).


I'm trying to find the title of a sci-fi short story I either read or saw on TV - the plot is generally about possibly invisible (I might be wrong about that) people who build the future by re-creating our surroundings in boxcars on a train.

Does anyone know a SF TV short story in which there were blue men who helped "stage" our world- at least the parts we saw, on a minute by minute basis.  So, at each minute, everyone would be in the "world" that was built for that minute, then they would go on to the next "minute world".  The blue men were in the future minutes building most of reality, but only the parts that would be looked at at that minute (to save work, I think - why build something that will not every be "used")  And they were in the past tearing down all the previously lived minutes.  It was kind of a behind the scenes look at why when you set your keys down and come back to them, they aren't there. Then you look again a few minutes later and they are there. The reason in the show was that the blue men building that minute forgot to include your keys, but the next group got it right.  Years later, my wife and I still refer back to that show, so I would like to find out what it was and see if I can find a copy somewhere.  .


I'm having trouble showing procedural textures (Checker Texture in particular) in 3d View. I can see it in render, but neither Material/Texture/Solid viewport shading helps to see in 3D :(  is a screenshot with my issue. Please help.

So I'm trying to learn, but I have a really hard time understanding the relation between materials, textures, UV maps and so on. So right now I have the following problem: I'm trying to make a simple red texture be a bit grainy using a noise texture. The node setup can be seen in the screenshots below. It works fine if I view it in rendered mode (I'm using the cycles engine) or export a screenshot, but the object appears completely black in material mode:   So this is probably a very stupid question, but do you mind telling me how I can fix this? Thanks!


I am a psychology student. My GPA is quite low: 3.6 for first 3 years but 2.8 for last 3 years ( I spent 6 years in undergrad because I transferred and lost 2 years of credits). However, I will have a publication in psychology and strong letters of recommendation from professors. The low GPA is my major weakness... I am wondering if a good score in GRE sub (like 95 percentile and above) would compensate for my GPA?  Thanks in advance!

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


Let $a,b$ and $c$ be the lengths of the sides of a triangle. Prove that  $a^2b(a-b)+b^2c(b-c)+c^2a(c-a)\ge 0$. Determine when equality occurs.   We know that if $a,b,c $ are the sides of a triangle then we can let $a=x+y$,$b=y+z$,$c=z+x$. After that I put the values of $a,b,c$ in the given expression and I found  $2(xy^3+yz^3+zx^3)-2(x^2yz+xy^2z+xyz^2)$. So my target is to prove this expression is greater equal to $0$

For any triangle with sides $a$, $b$, $c$, prove the inequality $$a^2b(a-b)+b^2c(b-c)+c^2a(c-a)\ge 0 .$$   This is IMO 1983 problem 6.  I tried substituting $a=x+y$, $b=y+z$, $c=z+x$ but well it doesn't help in any sense except wasting 3 pages that lead to nothing (please don't mind the joke). Using $a=2R\sin A$, $b=2R\sin B$, $c=2R\sin C$ also didn't lead to anything for me. Could you give me a hint for finding the proper substitution?


I don't understand why I can't print the address of the pointer. I know it's pretty fundamental to understand pointers, so any help is appreciated.  void printp(int& test) {         cout << test << endl; }  int main() {         int *p = new int;         *p = 1;         int np = 0;  //      printp(p);  // why doesn't this print the address of p? //      printp(&p); // why doesn't this print the address of p?         printp(*p); // prints 1         printp(np); // prints 0  return 0; }   I get the below error when I try using 'printp(p)'.  test.cpp: In function ‘int main()’: test.cpp:17:10: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]   printp(p);  // why doesn't this print the address of p?           ^ test.cpp:5:6: note:   initializing argument 1 of ‘void printp(int&)’  void printp(int& test)       ^~~~~~ test.cpp:17:10: error: cannot bind rvalue ‘(int)p’ to ‘int&’   printp(p);  // why doesn't this print the address of p?

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I have build a Drupal site on my local development server and I am preparing to move it to my test server and eventually my live server.  I know where to find the database settings in my settings.php file, but there only appears to be one set of database configurations.  I would like to know if there is a good way to include three different database settings in my settings.php file, one for my development environment, one for my test server and one for my live server.  I could simply add a settings section to the file for each and simply comment out the ones that I am not using, but I would like to use an automatic solution, one that can either allow me to specify a setting for all three locations, or tries each setting until it finds a setting that works.

Basically, one of the greatest questions of all time: What are some ways you're using settings.php in your development/staging workflow?  Right now, I have my settings.php file set up like the following, and I base my development on the server's $HOST directive—meaning I can work on dev.example.com for the development (shared) server, local.example.com for my local computer (and other dev's local code checkouts), and www.example.com (or just example.com) for the live site.  (This code is in the 'Database settings' section of settings.php):       $host = $_SERVER['HTTP_HOST']; $base_url = 'http://'.$host; $cookie_domain = $host;  switch($host) {   case 'example.com': # Production server     $db_url = 'mysqli://prod_sql_user:password@127.0.0.1/prod_db';     $update_free_access = FALSE;     $conf = array (       // Set production config options here...       'example_setting' => 0,     );     break;    case 'dev.example.com': # Development server     $db_url = 'mysqli://dev_sql_user:password@127.0.0.1/dev_db';     $update_free_access = FALSE;     $conf = array (       // Set production config options here...       'example_setting' => 0,     );     break;    case 'local.example.com': # Local server     $db_url = 'mysqli://local_sql_user:password@127.0.0.1/local_db';     $update_free_access = FALSE;     $conf = array (       // Set production config options here...       'example_setting' => 0,       // Turn off most core caching.       'cache_inc' => 'includes/cache.inc',       'cache' => CACHE_DISABLED,     );     break;  } ?>   This works pretty well for most purposes, but it means we have a lot of extraneous code sitting around in our shared settings.php file... is there a better way?


Seonaid! I often use your  It is very helpful. Now I need your personal help. Please can you help me? I am an English teacher and I have a question about something, which I don't know/ understand. This is a sentence from a test: Complete the sentence with the correct form of the verb. Don't you wish you ....................... a year off before going to university? (take) The correct answer is had taken, according to the test key. My question: How do we know, that here we speak about past situation? Otherwise we could use also  took. This is form English in Mind, book 4, entry test, Cambridge, by Sarah Ackroyd. I live and work in Bulgaria, in a small town. If my students ask me this question I do not know what to say. Please, write me soon. Krasimira Kuzeva facebook: Krasimira Kuzeva Kripadhara

Another read I come across in which a guy has written, "I wish you could see that young restless orphan who has no house to live in, none to get food from, whose pshychological centre has been damaged to the hilt. I wish you could see the pain of that abandoned girl on road who has set huge ambitions, but not priviliged enough to reach them, whose each tear drop brings earthquakes in the place on which it has fallen. I wish some magic happens and brings back all your lost senses and you start loving each and every human being going through hardships. Is this at all correct to say happens after wish as the author has written above? The writer is Indian. Not native.


Is there any problem in mathematics that is proved not independent of ZFC but the problem itself is not proved yet?

We know there are statements that are undecidable/independent of ZFC. Can there be a statement S, such that (ZFC $\not\vdash$ S and ZFC $\not\vdash$ ~S) is undecidable?


If I have a RAID 1 and some bits on one hard disk flip due to error, how does the raid controller know which of the two disks contains the correct bits?

I've built a RAID 1 array of 2 disks, A and B.  That means that every bit on A is equal to a bit on B. If one disk fails, I can safely retrieve my data from the other disk. But then I started wondering: How true is this?  Let's say a bit 1 on A reads 0, but 1 on B. How would the RAID controller be able to tell, which one is corrupted and which one is not? Is this based on what the so called "S.M.A.R.T." technology reports, and is that really worth anything, or would I be just as well of with a non-RAID solution?  I can see why this is not a problem on RAID 5, so I'm planning to upgrade.


Blender's default behavior makes it easy to select a mesh element without the need to hover the mouse cursor exactly over it. Sometimes it's really helpful, sometimes not. I wish I could either adjust that "hotspot" distance between my mouse cursor and the mesh element I want to select or disable it altogether. Thank you.

When selecting components, is there a way to control the "selection distance/area"? I don't want to select a component, even if I click ~20 pixels away from it.    Thanks in advance!


I have been using this  to set up a mailserver and webmail for my company.   I have followed all official instructions in order to avoid emails ending in spam-folders:   SpamAssassin validates my emails SPF (my server xx.xx.xx is authorized to use the mail-address) DKIM signature is valid Message parsed DMARC test Reverse proxy is working   Mails from my server scores a solid 10/10 on   Problem: Emails send by my server ends up in spam-folders, tested on Yahoo and Hotmail (works on gmail).  My  test looks like this:    Question: What can I do to avoid ending up in spam-folders?  Please note: Even though similar questions has been asked on serverfault, I have not found a solution to this problem.

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I came up with this when trying to prove embeddings of $L^p(0,1)$ spaces. Suppose $U =(0,1)$ (or more generally  a bounded subset in  $\Re^n$). Is the mapping  $\phi = p \mapsto \|f\|_{L^p(U)}, \phi: [1,q] \rightarrow \Re$ continuous? Any ideas or counter examples?   Edit: This is not a duplicate with  because of different assumption on $f$!

Suppose that $\|f\|_p &lt \infty$ for all $1\leq p &lt p'$, I want to know if the the following is true and in that case how to show it     $p \mapsto \|f\|_p$ is continuous on $[1,p')$   Or maybe we need to impose some more constraints such as finite measure space. In case of finite measure space, I tried to use .


I'm stuck on Ubuntu 15.04, i followed some outdated guide on Reddit to update from 15.04 to 15.10 and screwed up my  /etc/apt/sources.list, i get a bunch of the following when trying to update:  W: Failed to fetch http://mirror.cogentco.com/pub/linux/ubuntu/dists/wily-updates/multiverse/binary-i386/Packages  404  Not Found   So how do i update from 15.04 to 15.10 and eventually to 16.04?  My dedicated server provider only offers 14.04, 14.10 and 15.04 on prebuilt servers so i cant freshly install it.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I can't get a div #buttonwrap to center on my site. I have tried every option that is suggested in . But it still doesn't work. And what is strange is that #backgroundwrap works fine with the same code. I have linted my CSS and HTML markup, but no help.   Hope someone can help me solve this issue, it has been driving me crazy and delete nearly all my code! The full code is online here:   .buttonwrap {     margin: 0 auto;     position: relative;     width: 100%;     display: block;     float: none; }  /* parent */  #container {     width: 100%;     height: 100%;  }

How can I horizontally center a
 within another
 using CSS?

Foo foo


I have two functions of very similar construction. The first creates a 3D list of dicts and adds data (the data consisting of the values of the three iterators used to construct the list). The second simply displays the dict data. The issue is that data displayed by the second function is wrong. Instead of showing values of the iterators increasing as expected: (0, 9, 19) (0, 9, 20) (0, 10, 0) (0, 10, 1) (0, 10, 2)  I end up with the maximum value of the iterators being displayed: (0, 12, 20) (0, 12, 20) (0, 12, 20) (0, 12, 20) (0, 12, 20)  Code as follows: xCount = 13 yCount = 21 numPages = 1 skip = [[4, 7], [4, 13], [8, 7], [8, 13]]  def createFrames():   frameData = {'textFrameName': ''}   framesData = [[[frameData for y in range(yCount)] for x in range(xCount)] for p in range(numPages)]    for p in range(numPages):     for x in range(xCount):       for y in range(yCount):          skipFrame = False          for entry in skip:           if entry[0] == x and entry[1] == y:             skipFrame = True          if skipFrame == False:           framesData[p][x][y]['textFrameName'] = str(p) + ', ' + str(x) + ', ' + str(y)           print(framesData[p][x][y]['textFrameName']) # shows p, x, y incrementing    return framesData  def displayData(framesData):   for p in range(numPages):     for x in range(xCount):       for y in range(yCount):          skipFrame = False          for entry in skip:           if entry[0] == x and entry[1] == y:             skipFrame = True          if skipFrame == False:           print(framesData[p][x][y]['textFrameName']) # shows 0, 12, 20 only   # Create text frames. framesData = createFrames()  # Add data to dictionaries. displayData(framesData)  Using python 2.7.16.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I need to have a form with the normal questions, in addition to having respondents attach or download a file. Is this possible?

I need to make a Google Doc Form, in which the users need to upload a Word file. Is it possible to do so using Google Docs form? If yes, then how?


I am reading  the book: Inequalities by Hardy, Littlewood and Polya. There are two inequalities at the page number 32:  (1) $(a_1+a_2+\cdots+a_n)^r\le a_1^r+ a_2^r+\cdots+a_n^r$  where each $a_i>0$ and $0<r<1$.  (2) $(a_1+a_2+\cdots+a_n)^r\ge a_1^r+ a_2^r+\cdots+a_n^r$  where each $a_i>0$ and $r>1$.  How can we prove these inequalities. ? Many thanks for your help.

I am looking for a proof that this inequality: $$(W_1+W_2+\cdots+W_n)^a \leq  W_1^a +\cdots +  W_n^a$$  is valid.  I have a power function $f(W)=W^a$ where $a$ is a real number, constant but usually $0\lt a\lt 1$. The $W_i$ are real positive numbers.  Then I want to check if $\left(\sum W_i\right)^a \leq \sum(W_i^a)$   For example for $n=2$ : $(x+y)^a \leq x^a + y^a$.  Thanks.


Why can I not see the complete date of posting?  The year part is not shown.  I prefer date/time to look like the ISO standard:  2013-07-04 21:15:33.1234   Is it a setup function that I have missed?

Throughout the site abbreviated dates are used (Apr 21 at 9:12). This works great for dates within the current year but it seems that as the years roll by it'll become important to include the year in the date. I am not sure that having the time is of value for a post that is a year old. Maybe at a certain threshold replacing the time with the year is appropriate.


Is on needed a second time in this sentence?        There is a bad effect either on human health or environment.    There is a bad effect either on human health or on environment.

A colleague of mine has written her thesis and requested me to read and correct its grammar. I have seen some sentences like     The maximum deviation of the concentration values were obtained in the growing season, especially in May, in July, in August and in September.   As you see there is one 'in' for each month. I think that one preposition would be enough for all:     The maximum deviation of the concentration values were obtained in the growing season, especially in May, July, August and September.   Which one is more suitable?


English is my second language and I largely depend on Grammarly for checking grammatical mistakes.     To create a new app, first, make sure your current working directory   is  same as where manage.py file is located. After that execute the    following command.   I don't see any problem with this sentence, but Grammarly alerts me about "Passive Voice Misuse".   Please tell me is there any problem with this sentence.

Whenever I create a document in Microsoft Word, it complains about a lot of my sentences being in passive voice. But, when I read that sentence aloud, it sounds fine to me. I am not sure if it is just me and will a statement in passive voice sound strange to a native speaker?  So, my question is, is it considered bad form to use passive voice generally? Or in some specific cases like written communications only?  Edit: If it is ok to use passive voice, then why does MS-Word complain?


Quite often, I have lists with short items, e.g.:  \documentclass[a4paper,9pt]{scrartcl} \usepackage{braket}         % for \Set{}  \begin{document} adsfasdf \begin{itemize}     \item $\Set{A}$     \item $\Set{A, B}$     \item $\Set{A, B, C}$     \item $\Set{A, B, C, D}$     \item $\Set{B}$     \item $\Set{C}$ \end{itemize} test text tex \end{document}   which looks like this:    I know that I can get this with tables and three lists. But can I also achieve the same result simpler?

Let us consider The following example   \documentclass{article} \usepackage{enumerate} \begin{document} \begin{enumerate}  \item Which of the following numbers is the largest ?\\ $2^{3^4},2^{4^3},3^{2^4},3^{4^2},4^{2^3},4^{3^2}.$  \begin{enumerate}[(a)] \item  $2^{3^4}$ \item  $3^{4^2}$ \item  $4^{3^2}$  \item $4^{2^3}$ \end{enumerate}  \end{enumerate} \end{document}   This produces :    But I'd like to produce the following using the same package  :   OR     OR   How can I do that?


I cannot set VLC as default.   I know about right-click → 'Get Info' but there is no drop-down to change the default so it's not possible to change it. I'm not sure why this is but I know from searching around that I'm not alone.

I have seen people say to click get info then do something with the 'open with' but when I go to get info there is NO open with option, no options to change at all. I cannot drag the files into VLC like I could before the upgrade either. Please help me out! I am not real tech savvy, but I can do basics and follow instructions. Thanks.


I installed  based on Drupal 7.x.  As soon as I insert any menu item into create categories, I get this warning:     Strict warning: Only variables should be passed by reference in sizzle_preprocess_views_view__content__menus__all_menus() (line 69 of /web/htdocs/xxxxxxxxxxx/home/profiles/restaurant/themes/sizzle/includes/menu.inc).   I checked the line and I got this code:  // Render the category and add it to template. $variables['term'] = drupal_render(taxonomy_term_view($term, $view_mode));   I don't know how to improve this, in order to solve the issue. Writing to the group that made Open Restaurant I didn't got any answer. Hence my post here.

I get the following error:     Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php).   This is the block code which is causing that error.  if ($user_gallery) {   print render(node_show($user_gallery));  // Line 18   print drupal_render ($user_gallery_edit);  } else {   print drupal_render($user_gallery_new); }   Why do I get that error, even if I get all printed as expected?


EDIT: This is not a discussion about how great or broken the floating-point implementation in JS is. This is a very specific case, so please do not mark this as a duplicate of a discussion about floating-point. This is the script I use to calculate the decimal portion of an amount expressed in cents (Ex. 3.34 is 334 cents):   const amount = 334; const decimal = Math.trunc(100 * ((amount / 100) % 1).toFixed(2));  console.log(decimal); //34    So far so good. If you change the amount to 329 you get 28, which is wrong:   const amount = 329; const decimal = Math.trunc(100 * ((amount / 100) % 1).toFixed(2));  console.log(decimal); //28    This is due to the fact that (329/100) % 1 = 0.29000000000000004 instead of 0.30, because JS floating-point sucks? But what is really crazy to me is that while developing a loop to see the cases in which that script breaks using a FOR, it does not break on 329!:   for(let x = 325; x < 335; x++) {      const r = Math.trunc((100 * (( x / 100) % 1)).toFixed(2));   console.log(x, r);  }    What am I missing here? Why is working when inside the loop and not working when calling the function directly? And how can you calculate this in a robust and reliable way?

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


I've tried nearly everything to get my image quality to improve upon upload. I have an imagestyle on my image upload field that is set to resize uploaded images to 300x300. I've installed ImageMagick (hearing a myth that doing so improves the image quality drastically), but I see no change.   I'm desperate - any idea as to how I can get my images to maintain their quality when uploaded? This seems like it should be a simple thing?  See example below. The image on the left is what it looks like when I resize outside of Drupal (e.g. with Photoshop; see how sharp it is?!) - the image on the right is when it's resized via Drupal image field/image style.

This is the original image (610x405)    This is the image after applying image style (scale and crop) to 290x190.    Both image have the same aspect ration, yet there is visible quality loss on downsizing. Am I applying the right image style? What should I be doing?


I am looking for a way to solve the following equation:  $$(I + \alpha M)X=F$$  $\forall \alpha \in R$ (the real domain), with $M$ a square complex matrix without any particular properties, $I$ the identity matrix, $F$ a complex vector and $X$ the unknown.  Thank you,

I have two square matrices: $A$ and $B$. $A^{-1}$ is known and I want to calculate $(A+B)^{-1}$. Are there theorems that help with calculating the inverse of the sum of matrices? In general case $B^{-1}$ is not known, but if it is necessary then it can be assumed that $B^{-1}$ is also known.


Consider a database with 3 tables holding names, with three rows:  names  ID,Name 1 , Eugene 2 , Igor 3 , George   rooms  ID, Roomnumber, Bednumber 1 , 10 , 1 1 , 15 , 1 1 , 10 , 2 2 , 5  , 1 2 , 3  , 1   Is there any way to get roomnumbers into single string with unique items only (can be separated by space or comma etc? So result will look something like this  ID, Name   , Roomnumbers 1 , Eugene , 10 15 2 , Igor   , 5  3 3 , George ,    I had no problem doing select from single table into same row, but I am having problem joining this tables together with distinc. Using samples that I found here the best I ever get is   ID, Name   , Roomnumbers 1 , Eugene , 10 10 15 2 , Igor   , 5  3 3 , George ,    The solution was   SELECT      distinct t1.ID, t1.Name,      SUBSTRING((SELECT ',' + CAST(t2.Roomnumber AS VARCHAR(10))              FROM (SELECT DISTINCT ID, Roomnumber FROM Table2) t2            WHERE t2.ID = t1.ID             ORDER BY t2.ID, t2.Roomnumber            FOR XML PATH ('')        ), 2, 100) [Roomnumbers] FROM Table1 t1   Thank you very much. I was trying to join and that was wrong and too complicated way to go around it. Thank you

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


Do we always use were with the 3rd person in imaginary situations?   If only she were here ...  If only she was here ...    Are we supposed to use were every time there is an if in the beginning of a sentence?

It is to me a curious fact that the  of verbs in English has so nearly disappeared in modern times. In fact, even the correct form and usage of the subjunctive in Modern English barely distinguishes itself from the indicative! In many regions and dialects, the subjunctive would appear to be entirely obsolete, replaced by the indicative in all cases. (Educated speakers, certainly in Britain at least, do however still make good use of it.)  The present subjunctive form in  is (in almost all cases) virtually identical to the third-person plural present indicative (e.g. 'He were', 'She own'). This is markedly different from , where the subjunctive form a form was . Even by the advent of Early Modern English in the 16th century, the subjunctive was already converging with the indicative.  Other Modern European languages, not only Romance ones such as French and Spanish, but Germanic languages related to English (e.g. Dutch/German) have a much more pronounced subjunctive form. From what I remember of my Classical Latin, word suffixes for a variety of tenses are hugely obvious in the subjunctive.  My question is: why is this convergence of the subjunctive and indicative so strongly the case in Modern English? Is it a general trend in other Germanic/Romance (or more generally Indo-European) languages? Why is its disappearance so much more apparent in English than other related languages?


This is my problem:  $ destroy apt-fast [sudo] password for colbyryptos:  Reading package lists... Done Building dependency tree        Reading state information... Done Package apt-fast is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up man-db (2.6.1-2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing man-db (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  man-db E: Sub-process /usr/bin/dpkg returned an error code (1)   I have also tried sudo rm /var/lib/dpkg/lock, followed by sudo dpkg --configure -a.  It then gives me this  $ sudo dpkg --configure -a [sudo] password for colbyryptos:  Setting up man-db (2.6.1-2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing man-db (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  man-db

I'm trying to install the flashybrid but when I enter the apt-get install flashybrid command, I get this error:  root@user-desktop:/home/user# apt-get install flashybrid Reading package lists... Done Building dependency tree Reading state information... Done flashybrid is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up flashybrid (0.15+nmu2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing flashybrid (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: flashybrid E: Sub-process /usr/bin/dpkg returned an error code (1)   I also tried this one to find what is already using that file:  root@user-desktop:/home/user# lsof | grep /var/cache/debconf/config.dat lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs Output information may be incomplete. dpkg-prec 4672 root 4rW REG 8,6 39658 1697827 /var/cache/debconf/config.dat   But I don't know how to fix this.


How do I set LibreOffice to spellcheck in British English? When I set it to BE now, it doesn't spellcheck anything. I'm using the latest LibreOffice in Ubuntu 17.04.

I want to be given correction suggestions while setting a text in LibreOffice to English-UK.    Now it works for English-US, French and Romanian, as these are the languages that I have installed in Language Support. I cannot seem to have a setting to differentiate US/UK English as I was able in Xubuntu.    In LibreOffice English-UK is absent. How to add it?    In Tools/Options/Language Settings/Languages I get to the image above, but how to make English UK present there? it lacks that 'ABC-V' sign that is present for English USA, although in Tools/Options/Language Settings/Writing Aids an 'English-uk' IS PRESENT. But that is not enough for the corrector to function for English-UK.


Take , and note the description:     Proposed Q&A site for professional and expert amateur chefs interested in the more subjective aspects of cooking; this would be to Cooking SE as Programmers SE is to Stack Overflow    It seems like  is MASSIVELY popular (has more views per-day than any other proposal by a factor of almost 2). There's also a .  Should we allow this trend to continue, possible resulting in things like a subjective web applications proposal? It seems like almost ANY proposal's users could benefit from having a place to ask subjective questions, seeing how much the subjective programmers proposal took off, how many good questions are asked and closed as subjective, and how many successful blogs and discussion sites there are.  But it seems like having totally different sites for this is wrong, as they would share no more official connection between them than with a gaming and skateboarding proposal. If they could be linked somehow, at the least like Stack Overflow and Server Fault are linked as part of a trilogy, they could both be more prosperous.   Another idea would be having a subjective version of every site (subjective.blah.com, like every site has a meta.blah.com). This would be a great way to link the two, and the separation would still be there as it. Heck we could even do it with the existing trilogy sites, with a 'belongs on subjective' auto-move feature like 'belongs on meta'. It's obvious that people want to ask subjective questions. The issue at hand is how (or if) we choose to enable them to do that with the Stack Exchange model. This is a much more long term issue that will need heavy discussion before any consensus can be reached.  EDIT: I see this question proposed something like this for polls. What I am proposing is a separate dominion for all questions that are valid except for being subjective. Hence every site could have a normal section, a subjective section, and a chat section. This may seem complicated, but IMHO it's a great way to divide up a topic. There would be a place to answer questions, discuss topics, and just talk. As far as I can see this covers every area users would be concerned with, leading to a one-stop site that would provide good organization for all areas of a topic.  Thoughts? (sorry for the big wall of text ;)

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


Article Source: An Efficiency Comparison of Document Preparation Systems Used in Academic Research and Development  Knauff M, Nejasmic J (2014) An Efficiency Comparison of Document Preparation Systems Used in Academic Research and Development. PLOS ONE 9(12): e115069.  I am surprised to read this research paper. But if it’s the truth, the change is needed in a way the frontends are being designed. The research findings defeats the very purpose of latex : focus on content more than the formatting. This question is likely to be downvoted, blocked saying too wide or out of context.  But still I would like to have comments from experts!

A new study in 1 concludes that even novice MS Word users perform better than expert LaTeX users in document creation.   I have read the article and I feel like I have identified some flaws in their approach and design but I figured this community would be the best positioned to rigorously evaluate these results.  Based on this study can we conclude that Word works better than LaTeX?   Markus Knauff & Jelica Nejasmic. 2014. An Efficiency Comparison of Document Preparation Systems Used in Academic Research and Development. PLOS ONE DOI:    UPDATE Since the question has been closed, but it's clear that there is interest to discuss the topic, I've set up a .  UPDATE 2 I have created a  to clarify the reason why this question was closed when other similar questions remain open.  UPDATE 3 People in glass houses... The article had to be republished a few months later due to publishing errors whilst using Arbortext :-) see


Is there any series for natural log(x) where x is any number,unlike Taylor series for log(1+x) where |x|<1?

Does anyone know a closed form expression for the Taylor series of the function $f(x) = \log(x)$ where $\log(x)$ denotes the natural logarithm function?


I'm creating some code for a google challenge and I need to write the following function: Say you have a board game x places long, and you have a three sided dye with 'stay', 'right', 'and left'. I need to right a function that when given the amount of dice rolls and number of places and the board will return how many different ways you can get there in the correct amount of dice rolls. (Without going off the edge of the bored of course) Then Moodulas 123454321. (Don't ask me why I mod the answer to 123454321, I don't know). I have whipped up the following code, but it throws a null-pointer exception. I originally did it with plain integer lists. But they were to small and could not pass all tests. Can anyone help? Here is the code:  public static void main(String args[]) {         System.out.print(answer(100, 10));     }    public static int answer(int diceRolls, int numOfSquares) {          //Two many squares to be possible. Return 0 for 0 solutions.         if ((numOfSquares - diceRolls) > 1) {             return 0;         }         //If there are only two squares there is only One option. Roll a Right.         if (numOfSquares == 2) {             return diceRolls;         }         //If there are exactly as may dice rolls as there is squares.          //There are as much possibilities as there are squares         //Therefore return number of squares.         if (diceRolls == numOfSquares) {             return numOfSquares;         }          //Tests how many options there are to roll and get as many dice rolls as needed.          //While still getting the amount of squares needed to finish the board game.         BigInteger listOne[] = new BigInteger[numOfSquares]; //listOnes[current] holds the number valid paths to position 'current' using 'subCurrent-1' steps         BigInteger listTwo[] = new BigInteger[numOfSquares]; //put number of valid paths to position 'current' using 'subCurrent' steps into listTwo[current]         BigInteger total = new BigInteger("0");         listOne[0] = BigInteger.valueOf(1);         listOne[1] = BigInteger.valueOf(1);         int max = 1;          for (int index = 1; index < diceRolls; index++) {             listTwo = new BigInteger[numOfSquares]; //Resets listTwo             //Adds one to max until max is correctly fitted with number of squares             if (max < (numOfSquares - 1)) {                 max++;             }              for (int subIndex = 0; subIndex < numOfSquares && subIndex < (max + 1); subIndex++) {                 //If at first square                 if (subIndex == 0) {                     //Set listTwo's current value to lstOnes current value + the next value.                 listTwo[subIndex] = listOne[subIndex].add(listOne[subIndex + 1]);                 } else if (subIndex == max) {                     //If at final square                     if (subIndex == (numOfSquares - 1)) {                         total.add(listOne[subIndex - 1]); //Adds listOnes last value to total.                     } else {                          listTwo[subIndex] = listOne[subIndex - 1];                     } else {                         //If subIndex is not yet at final or first Square                         //Set current value of listTwo to listOne's last square + current square + nextSquare                         listTwo[subIndex] = listOne[subInde add(listOne[subIndex].add(listOne[subIndex + 1]));                     }                 }                 listOne = listTwo; //Sets listOne to the new value of listTwo             }              int answer = total.mod(BigInteger.valueOf(123454321)).intValue(); //For some reason question asks to return modulo 123454321 of the number             return answer;         }   Now here is the stack trace:  Exception in thread "main" java.lang.NullPointerException     at java.math.BigInteger.add(Unknown Source)     at arrays.MinionsBoredGames.answer(MinionsBoredGames.java:59)     at arrays.MinionsBoredGames.main(MinionsBoredGames.java:8)

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


Is there any way to disable permanently the software Escape button on the Touch Bar. After two months I can't get used it, and can't help touching it inadvertently in the middle of some important operations.   Any solution other than drilling through the touchbar is welcome.

The question "How to disable Escape key in Safari" was asked here a few times. Now since on the new MacBook Pros the Escape key is a touchscreen button, it is much easier to press it accidentally, but there is a good chance we can actually remove it in Safari once and for all.  How to remove  Escape button from TouchBar in Safari? (or any specific app)  There is no such option in Customize Touch Bar... menu:


I would like to run a command with an argument placed in the same directory as the shell script, from a shell script.  example:   my_installer.sh:   #!/bin/sh  sudo dpkg -i --someflags=abcd blah.deb    How do I tell my_installer.sh where blah.deb is ?  I have tried ./blah.deb  and looked at some env vars... I get an error about file not found.  I am assuming that the user would double-click the script, or run it from home - not cd to the script location.

I have a script which sets some environment variable to paths:  export VAR1=/home/xyz/DIR_IN_WHICH_THIS_FILE_EXISTS  export VAR2=$VAR1/abc/qwe  ...   Can I use something to get the DIR_IN_WHICH_THIS_FILE_EXISTS so that if I run this script from anywhere(any path) in the machine, it would set the same values to VAR1 depend on in which directory the script exists?  Please help


How to show that $\mathbb Q(\sqrt 2)$ and $\mathbb Q(\sqrt 5)$ are non-isomorphic as a ring?  All I could manage to  show is that,  for any isomorphism $\phi:\mathbb(\sqrt 2)\to\mathbb(\sqrt 5),$ $\phi(1)=1.$   Since $\phi$ is a homomorphism, $\phi(a+b\sqrt 2)=\phi(a)+\phi(b)\phi(\sqrt 2)=a+b.\phi(\sqrt 2)$ (Since $\phi(\dfrac{p}{q})=\dfrac{p}{q}\phi(1)$ for $p,q(\neq 0)\in\mathbb Z$) $\forall~a,b\in\mathbb Q.$

Page 105 of D. Burton's A First Course in Rings and Ideals reads     It is not difficult to show that if (I'll call them $n$ and $m$ instead of $n_1$ and $n_2$) $n$, $m$ are square free integers, then $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ if and only if $n=m$.   Well, it is getting difficult for me, any help or would be appreciated.    My progress so far: Suppose $\phi :\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ is an isomorphism. Then $\phi(u)=u$ for every $u \in \mathbb{Q}$, so that $\phi(\sqrt{n})^2=\phi(n)=n$. If $\phi(\sqrt{n})=a+b\sqrt{m}$ for some $a,b\in\mathbb{Q}$, then $(a+b\sqrt{m})^2=a^2+b^2m + 2ab\sqrt{m}=n$ implies $$a^2+b^2m = n$$ and $$2ab=0.$$  Then $b=0$ cannot happen since that would imply that $\sqrt{n}\in\mathbb{Q}$, where $n$ is a square-free integer. Also $a=b=0$ cannot happen. Hence $a=0$ and we have $$b^2m=n.$$ If $\psi:\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ were an isomorphism then there would exist some $s\in\mathbb{Q}$ such that $$s^2m=n,$$ then $s=b$ or $s=-b$. Therefore the only isomorphisms from $\mathbb{Q}(\sqrt{n})$ to $\mathbb{Q}(\sqrt{n})$ are $\phi(u+v\sqrt{n})=u+vs\sqrt{m}$ and $\psi(u+v\sqrt{n})=u-vs\sqrt{m}$.    I don't know if there's an easier way and I don't know if I'm in the correct way here. Thanks beforehand :)


I'm Trying to convert this xml to array saving the attributes names. Because I need to send this parameters to a Client using Wcf, and the client needs to display that information  <?xml version="1.0" encoding="utf-8" ?> <Configuration>   <Cameras>    <Camera Name="Camera1" Url="Camera1" Width="600" Height="800" />    <Camera Name="Camera2" Url="Camera2" Width="600" Height="800" /> </Cameras> </Configuration>   I'm using C#

How do I read and parse an XML file in C#?


Let's assume that I stumble upon a paper by author X where he cites ideas of A, B and C. Now I know about the rules of secondary sources and how I should cite them in case I haven't taken a look at the primary sources. But if I do track down the primary sources by myself and cite them instead, should I, somehow, credit author X for referring me to those ideas?  Usually when doing a review of literature, I open like 10 studies, 'harvest' a few ideas and primary sources from each and track them down. Is this a good practice? I'd still cite, if required, the 10 studies for their own information (e.g. empirical results).  EDIT: the part which may be unique is: Assume there are 20 citations in a paper. Should one feel unethical for 'harvesting' like 5-8 citations and tracking their original source without citing the intermediary source? It just feels like 'copying' since the intermediary paper 'led' one to these 5-8 citations.

Suppose that I am doing a literature review on a topic, and I read paper A, which makes an interesting claim and references paper B as its source. Naturally, as paper B is then the primary source, I will look up B and possibly cite it in my own paper if it seems relevant. And suppose that it turns out that paper A says nothing else that's relevant for my topic, so I say nothing about paper A.  And this seems fine if I only discovered one citation from paper A. But if I find several useful citations in the same paper, it starts to feel like plagiarism if I just ruthlessly harvest it for citations without never citing itself.   Sometimes it's easy to work in a citation in such a case. For example, if it's a review paper I'm reading, I might be able to just write in my own paper something like:     Qwerty (2009) reviews a number of a results in this field, such as the finding that over 99% of the people who contract cancer wear shoes (Keyes 1999), that pink aliens from the sixteenth dimension dislike chocolate (Pinker 2001), ...   But often there isn't really any reasonable way to work in a citation, especially not if you wish the citation to make it clear that this is where you found useful sources from. I could include a footnote or a thanks in the acknowledgements, but I've never seen anyone do that for such a reason. Are there any rules of thumb regarding the correct etiquette in such situations?


I have planned to build a circuit to display voltage and time value using PIC16F877A micro controller.To do this i tested the circuit using Proteus software as i attached here. It can display up to 5V.  my question is can i read up to 300V using this micro controller?(I planned to use LR8N3G voltage regulator to give input voltage to PIC).will it damage the PIC? If so how can I read high voltage from this?

I want to read high voltages, like ~50V, using a microcontroller. I plan to put this as an input into the microcontroller's A/D line. But of course, you shouldn't have voltage that high on the input of a microcontroller or it'll fry.   How might I read high voltages? The main thing is that I need to step down the voltage before reading it. What do I need to consider when stepping down this voltage?  Thanks in advance!  Edit: I noticed in the PIC18 datasheet that it says "The maximum recommended impedance for analog sources is 2.5 kOhms." How does this affect how I step down the voltage, be it with resistive dividers, etc.?


When I flag posts from several years ago, the flag seems to be never reviewed, unlike recent posts which can reviewed within minutes. I have >10 case like things with flagging things written more than 2 years ago. Why don't such flags get reviewed as fast as recent posts? They always last for months. Note: I've read , but it doesn't address the difference for old posts vs recent posts.  Moreover, if  about flag expiry get implemented, flagging old posts would mean such flags can not get reviewed. Update Ok, there is no common share about the correlation of a several years old post with less than 1000 view tend to not get it's flags reviewed. I will create a query on data.SE for this.

Here is the close queue:        Here is an active flag I have:        I currently have 5 flags pending in the close queue. Some, like this one, are months old. This doesn't feel right and may discourage newer users from flagging things that need attention with the assumption that a flag may be ignored for 4 months, so why bother?  Here are some possibilities:   Bump flags that have been languishing for more than 30 days to the front of the close queue (or weight questions with said flags a bit higher). Won't solve the issue, but will make it less egregious Punishing a misbehaving mod by forcing them to go through every sub-3000 user's flagged close votes in the queue and free them from flag limbo , "a new 10K flag list for "stuck" flags, which would be any close flag that is unhandled within 30 days."   This question has been heavily edited under the assumption that flags didn't get refreshed every day. Apparently they do, thanks to Bill and Asheesh, so sorry about the misdirection. Languishing flags still an issue though!


I have just upgraded to Windows 10. Since the upgrade, my touchpad won't work at all (an external mouse does work, but the touchpad doesn't respond). I'm using an ASUS X200L laptop. I tried searching but couldn't find any proper drivers on ASUS's website. Any suggestions?

I have just updated Windows 7 to Windows 10.  My touchpad scolling (right-side) is not working anymore.    I have no idea how to fix this in Windows 10.  I have hit the start button and typed "synaptic", but have found nothing useful.  I used to have an icon on the taskbar that showed where I was touching the touchpad.  I used to be able to right-click that icon to change settings, but Windows 10 has not brought that icon over.  Also, the asus website has no synaptic touchpad drivers available for Windows 10.  I have tried the enaltech drivers, but upon the installation atempt I am told that my hardware is not correct.


Are there any available computer engines that play the game Mancala? I know that there are many versions of the game but it would be interesting to know if there are computer engines that play the game, whether through AI or some form of alpha-beta pruning.   Note that this is different from the other question based on Mangala. I am asking specifically on the game of Mancala, not Mangala. As a result I am not sure why this question was flagged as a duplicate.

is the Turkish version of mancala, with its own set of rules.  I am planning on doing a project in it. Are there any game engines that either specifically play it, or universal Mancala players that plays it after supplying the options?  EDIT:  I am not looking for an app, but for a game engine. For example in chess,  is a playing app, while  is an open-source engine.


I just finish reading a pdf about group cohomology that explain a lot about it. It goes from the definition to Galois's cohomology. But there is one think I would like to know and I think I haven't enough read about cohomology to know : What is the intuition behind all of this theory ? If someone could explain me or just give me some references I would appreciate. Thank you very much !

Group cohomology is one thing I don't seem to get my head around.  I understand $H^0$ as being the "fixed points" but when it comes to anything higher I have no idea what the notions are meant to be capturing...if anything.  For example I can see that 1-cocycles are homomorphisms with a specific property but that property doesn't seem to mean anything to me...and I think it should!  Is there an intuition or example that explains the meaning or is it just something that "stuck" and seems to work in lots of places?


I do not understand the presence of the red arrow in the table  \documentclass{standalone} \usepackage{tikz} \begin{document}  \begin{tikzpicture} \foreach \x/\xtext/\ytext in{0/x/y,1/1/4,2/1.5/6,3/2/8,4/5/20} {\draw (\x,0.5) +(-0.5,-0.25) rectangle ++(0.5,0.25) ; \draw (\x,0) +(-0.5,-0.25) rectangle ++(0.5,0.25); \node[]  at (\x,0.5) {$\xtext$}; \node[]  at (\x,0)   {$\ytext$}; } \draw[color=red,->,thick,>=stealth,shorten >=2pt,shorten <=2pt] (4.5,.65) edge [distance=1.2cm,bend left=80 ] node [right]{$\times 4$} (4.5,-.15); \end{tikzpicture} \end{document}

When I draw an edge between two nodes with anchors and globally set option [->], I get an additional arrow tip symbol at the beginning of the last edge in the path. For example in  \documentclass{article} \usepackage{tikz}  \begin{document} \begin{tikzpicture}     \node (A) at (0,0) {$A$};     \node (B) at (1,0) {$B$};      \draw[->] (A.north east) edge (B.north west);      \draw (A.south east) edge[->] (B.south west); \end{tikzpicture} \end{document}   the first \draw command produces incorrect output, while the second produces correct output:    Am I doing something wrong, or is this a bug in TikZ?


When making citations, I've seen both styles: with the tie/non-breaking space (~\cite{refnm}) and without it (\cite{refnm}). There are a few questions & answers on this topic in the more general sense, recommending reasonable things like a tie before a \ref. However, \cite never seems to be mentioned in these lists...  I happen to be mostly concerned about numeric styles like IEEE, which I think is unlikely to produce bad line breaks if a tie is used, but what about other styles, and is it really recommended?  Interestingly, the  only says the following about references, which I think a few other guides have turned into "should be one the same line" (I'm pretty sure they mean as opposed to super/sub-script).     When they are, they appear on the line, in square   brackets, inside the punctuation. Grammatically, they may be treated as if they were footnote numbers [...]   I did look at , and I thought that \cite deserves a separate question - I think it's pretty different case from \ref. I guess I'm looking for a more stylistic opinion.

My question is in the title of this post, but extends to other referencing commands like \eqref, \citep, \citet (and the like) as well.


I have a quite specific question and I haven't found it in the documentation  of xparse or in the forum. In the documentation of xparse, page 3, there  are three examples:  \NewDocumentCommand{\foo}{o}{#1} \NewDocumentCommand{\foobar}{o}{#1} \NewDocumentCommand{\foobaz}{o}{#1}   in which {\foo}, {\foobar} and {\foobaz} are written in braces {...}.  Later, on page 4, there are other examples, but, now they are not in the braces {...}:  \NewDocumentCommand \foo { m o m } { ... } \NewDocumentCommand \foobar { m o } { ... } \NewDocumentCommand \foobar { m !o } { ... }   And this is where my question comes in. When is it necessary to put the  name of the command between the {braces}?

Sometimes writing braces and omitting them produces the same result:  \tilde{\psi}  \mathrm{e}^{\mathrm{i} \pi}   vs  \tilde \psi   \mathrm e^{\mathrm i \pi}   Or (taken from Werner's comment below)   \frac{1}{2} vs \frac12   If that's the case, how bad for the quality of my code is omitting them? Of course, if one compiles a pair of formulas, there is no difference. But, since I ignore how TeX works, my point is: if one writes long codes with these habits,   doesn't TeX go somehow crazy because I'm not writing as it expects?   For instance, does it have any effect on how fast are long documents compiled? Any reason to keep them?


I tried with defining another function   $h(x):= f(x)-y$ where $ f(\frac{a+b}{2})<y<f(a)=f(b)$  So that $h(\frac{a+b}{2})\cdot h(a)<0$ and $h(\frac{a+b}{2})\cdot h(b)<0$ and  therfore I have two points $x_{1}\in[a,\frac{a+b}{2}] , x_{2}\in [\frac{a+b}{2},b]$ with $h(x_{1})=0=h(x_{2})$.  But I can't tell anything about how much they are apart.

Let $f$ be a real valued and continuous function over $[a,b]$ with $a <b$ such that $f(a)=f(b)$ , My question here is :     Question (claim): How to show that : there  exists  $c \in [a, \frac{a+b}{2} ]$ such that : $f(c)=f(c+\frac{b-a}{2})$.   Note: I have tried intermediate values but I didn't succeed.


What is wrong with the statement if (!adjacentNodes.get(nodeId).isEmpty()) in the below code?  Such statement leads to the following message:     java.lang.NullPointerException   package IN.company;  import java.util.HashMap; import java.util.HashSet;  public class DiffusionModels {     public int ICModel(int[] seedSet, HashMap<Integer, HashSet<Integer>> adjacentNodes, double p) {         HashSet<Integer> infected = new HashSet();         HashSet<Integer> recentlyInfected = new HashSet(); ...          while (recentlyInfected.size() > 0) {             HashSet<Integer> nextActivator = new HashSet<>();             if (!recentlyInfected.isEmpty()) {                 for (Integer nodeId : recentlyInfected) {                         if (!adjacentNodes.get(nodeId).isEmpty()) {                             HashSet<Integer> neighborsOfNode =adjacentNodes.get(nodeId) ;                             for (Integer nodeNeighbor : neighborsOfNode) {                                 if ((Math.random() <= p)&& !(infected.contains(nodeNeighbor))) {                                     nextActivator.add(nodeNeighbor);                                 }                             }                         }                 }             }             infected.addAll(recentlyInfected);             recentlyInfected.clear();             recentlyInfected.addAll(nextActivator);         }         return infected.size();     } }

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 was thinking about the epsilon-delta definition of a limit and began to wonder if it would work with closed intervals instead of open intervals. That is, for some function $f$, would the folowing definition work? $$\forall \epsilon>0\,\exists\delta>0\,(0<\lvert x-c\rvert≤\delta \, \implies \lvert f(x)-L\rvert≤\epsilon) $$ I've been trying to think of a counterexample, but can't seem to find one.  edit: If it does work, why choose open intervals rather than closed?

Definition (As written in Michael Spivak's Calculus)     The function $f$ approaches a limit $l$ near $a$ means: for every $\epsilon >0$ there is some $\delta > 0$ such that, for all $x$, if $0<|x-a|<\delta$, then $|f(x)-l|<\epsilon$.   my question is: why can't it be: $$0<|x-a|\leq \delta,|f(x)-l|\leq \epsilon$$ After looking at limits of functions for a long time just to grasp it's meaning and using the definition quite a lot solving homework I realized I keep writing the same inequality without really understanding why.  The only explanation given in Spivak's book for this part of the definition goes over it without explaining the inequality. I tried looking for an explanation myself but wasn't really able to find anything wrong with it. Is it also possible to write the definition like that or is there a problem with that?   (first non-homework related question :p)


Long ago in a childhood far far away (around 2004), I read half of a book.  Before I could finish it, my mom returned it to the library.  Here are some things I remember about the book:   There was a race of robotic lifeforms that had their own planet.   When they showed up on Earth, the Japanese called them Gaijin (visitors).   They caused religious upheaval when they arrived.   They took some humans off planet to show them important things about the rest of the universe.     The universe they showed the humans was full of diverse and abundant lifeforms.   There was a binary star system that hosted microbial lifeforms that were regularly wiped out by radiation from the host stars.   It was not very long, probably no more than 350 pages or so.   Does this sound familiar to anyone?  I'd LOVE to finish this book!!

I remember a book that described various lifeforms evolving in the galaxy (and i think may be the overriding theme was extinction).  One of them was 2-D species evolved on rapidly changing environment (probably rings of some planet?)  For some reason I'm thinking it may have been "Manifold" series but I honestly don't remember anything about that series, so it's just a vague feeling.


I am working on an application (zend framework) in which user can create their event and invite other users. Its current time zone is set to IST. But when any user from other country like USA, UK create an event its shows event expired because of its current time zone.  Is there any way to set time zone dynamically on bases of country ? Can we get timezone of any location using php ? Please guide me in right direction.  Many Thanks,  M.

Is there a standard way for a web server to be able to determine a user's timezone within a web page?   Perhaps from an HTTP header or part of the user-agent string?


All the fundamental laws of physics can be written in terms of an action principle. This includes electromagnetism, general relativity, the standard model of particle physics, and attempts to go beyond the known laws of physics such as string theory. For example, (nearly) everything we know about the universe is captured in a Lagrangian where the terms carry the contributions of Einstein, Maxwell (or Yang and Mills) and Dirac respectively, and describe gravity, the forces of nature (electromagnetism and the nuclear forces) and the dynamics of particles like electrons and quarks. Source: David Tong Me: I am a second year undergrad and have a nice familiarity with the -1/4 F_ij F_ij term (electromagnetism) and how it results to the Maxwell's Equations, but am still curious to know how it seems like there is always a Lagrangian. Apart from one obvious advantage that the Euler Lagrange equations hold in any coordinate system and the Lagrangian holds the key to the symmetries of the system.

It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach?


I have Raspberry Pi 3 running Ubuntu Mate 16.04.  I'd like to uninstall all the crap I don't need, and among the first candidates is LibreOffice. However, when I try to uninstall LibreOffice, I'm warned that this would also uninstall ubuntu-mate-desktop:  sudo apt-get remove libreoffice-calc  The following packages will be REMOVED:     libreoffice-calc ubuntu-mate-desktop   I believe I do want to in fact keep ubuntu-mate-desktop.  I'm getting the same message when trying to remove other packages I don't need/want (e.g. caja-wallpaper).  Why is this? How do I correctly uninstall LibreOffice (and other software/packages)?

I once advised someone to remove a package that depends on ubuntu-desktop meta-package, if she didn't need it (EG: if one uses a different editor than gedit). Someone else said that doing so (removing gedit which will in turn remove ubuntu-desktop) could break things. Is this true? Are there any other potential problems?


I am trying to prove that the metric space $(\mathbb{R}, d(x,y))$, $d(x, y) = \frac{|x-y|}{1+|x-y|}$ is complete. To do this, I need to show that any Cauchy sequence converges. The definition of Cauchy sequence: A sequence $\{x_i\}$ is called a Cauchy sequence if $\forall \epsilon > 0 \exists N(\epsilon) : \forall m, n > N(\epsilon) => d(x_m, x_n) < \epsilon$. But I don't understand how this can be applied to a given metric space. Can anyone help?

What can we say about the compactness and completeness of the  set $X = \mathbb{R}$ with the metric $$d(x, y) = \frac{|x-y|}{1+|x-y|}\;?$$  I tried by showing that  $d(x, y)<1$ and thus it is bounded. But how to show rest of the things? Can anybody help me? Thanks


For example, "demonym" is the term for the people from a place. Is there a term for describing the collective noun of a species of animals, like a business of ferrets, swarm of bees, or congress of baboons? Say I was making a table with the animal in one column and the collective noun as the header of another column. What would the header of the collective column be?

murder : crows :: _ : collective nouns  Sorry, no multiple choice this time.


I want to display the node count along with the filter in views exposed filter same feature like facets can any one help me out in this.

I have a couple of exposed filters to filter the content in my view. Most of them are taxonomy terms, now i would like to show how many nodes are tagged with that term behind the taxonomy term.  example:  London (5) Paris (3) Madrid (2) ...   Any idea how i can do this?


Why does the density on the y axis sometimes have values greater than 1 if the curve is representing density?  See the example below where I use R's density() function to plot a density curve.   plot(density(rnorm(1000, 1, 0.01)))

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I just want to know how many images I can use as a CSS background or  any other way to use multiple background images in a class so that I could use multiple of images  I am trying to use this but it is accepting only two images  #example1 {     background: url(img_flwr.gif) right bottom no-repeat, url(paper.gif) left top repeat;     padding: 15px; }

Is it possible to have two background images?  For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the entire page is behind the one which repeats across the top.  I've found that I can achieve the desired effect for two background images by setting the background of html and body:  html {     background: url(images/bg.png); }  body {     background: url(images/bgtop.png) repeat-x; }   Is this "good" CSS?  Is there a better method?  And what if I wanted three or more background images?


From what I understand, a one layer network (no hidden layers) is exactly the same as logistic regression.   Now suppose I have a function $f(x)$ that is exactly a logistic regression function with say d features. If I insist on running a neural network with say 3 layers with d/3 neurons each, is this a bad idea? That is, will it:    Take much longer to train such a network? The final optimum weights produce a function that is not a great approximation to the original function? (Note the regression model reproduces f(x) exactly).   This would be a hypothetical example of a situation where naively using deep learning is worse than shallow learning so to say.

How do we explain the difference between logistic regression and neural network to an audience that have no background in statistics?


Below are my xpaths and keep on chining,  Element path
5.00%
   Here need to capture values (5.00%)....  Element Xpath  //*[@id="dijit_layout_ContentPane_23"]/div[2]/div[1] //*[@id="dijit_layout_ContentPane_24"]/div[2]/div[1] //*[@id="dijit_layout_ContentPane_90"]/div[2]/div[1] //*[@id="dijit_layout_ContentPane_91"]/div[2]/div[1] //*[@id="dijit_layout_ContentPane_151"]/div[2]/div[1] //*[@id="dijit_layout_ContentPane_152"]/div[2]/div[1]

How to Handle Dynamic Changing IDs In XPath? for example :   //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]   In this xpath id "3647323225296998740" is changing every time when reloading the page.   Is there any way to handle this type of situation in Selenium?


I was asked following question in an interview  : Array a = {1,2,3,4,5},  Array b = {a,b,c,d,e}, write a program to add individual elements of both array and enter the sum in third array with output like {e1, d2, c3, b4, a5}  I was not able to come up with solution at that time and now I am trying at home and wrote following code but got null pointer exception :  public class ArrayMergeIndividualElements {  String[] a = {"1","2","3","4","5"}; String b[] = {"a","b","c","d","e"}; String s[]=null;  void mergeArrays() {     int k=0;     int j=b.length-1;                 for(int i=0;i<a.length;i++)     {         for(;j>=0;)         {             System.out.println("Number array is "+a[i]);             System.out.println("String array is "+b[j]);                             s[k]=a[i]+b[j]; //getting null pointer exception at this line                            k++;             j--;             break;         }     }      System.out.println("output is :");     for(int l=0;l<s.length;l++)     {         System.out.print(s[l]);     } }  public static void main(String[] args) {      ArrayMergeIndividualElements amie = new ArrayMergeIndividualElements();     amie.mergeArrays(); }  }   I have tried following code by searching on stackoverflow , but no luck     String[] both = Stream.concat(Arrays.stream(a[i]), Arrays.stream(b[j]))                       .toArray(String[]::new);  Individually arrays are printing the value but when I try to add/concatenate them I am getting null pointer.  Also can we add both arrays if one is Integer array and other is String array?  Please help

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've a WordPress blog where I'm using the Infinite Scroll plugin to load posts infinitely. I developed the theme for the blog using Twitter Bootstrap 2.3.2 and I'm using the Bootstrap Tooltip plugin to show post meta (date, etc.) in a Twitter Bootstrap tooltip that fires on hover. My problem is that with the default set of posts that load when the site first loads, the tooltips work just fine using the following code:  $(document).ready(function() {     $('.post-info a').tooltip(); })   But when the ".content" DIV is dynamically updated with the new sets of posts pulled by an AJAX request, the same code stops working on newly inserted posts and the code provided above no longer shows the Bootstrap tooltip on mouse hover. Here is the HTML markup of the link that's supposed to show up the tooltip on hover:  Dynamically inserted text with the help of PHP   Could you please help me solve this issue?  Thanks a lot!

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


A couple of years ago I read an interesting Wikipedia article about something called a "field-programmable gate array". The article made it sound like it's a box of logic gets which you can arbitrarily wire together to implement any kind of logic you want (but without needing thousands of discrete components).  Now, I had assumed this works something like a PROM. As in, you buy a die which has all the gates on it, with everything connected to everything, and then there's a glass window to the die, and you use one of those extremely expensive UV-laser writers to "burn" through the connections you don't want, resulting in the logic circuit you designed. (And maybe there's a version that's erasable too, like how CD-RW is somehow erasable.) Once you've "burned" your program into the chip, it behaves as if it were that actual combination of logic gates. (Because now it is that combination of logic gates!)  However, more recently I've been reading about this, and it appears this isn't how the technology works at all. A lot of recent articles talk about needing to send a "bitstream" to the FPGA at system power-up (and even the possibility of encrypting this bitstream to stop your competitors reading it). This makes it sound alarmingly like a FPGA isn't a hardware construct at all; it makes it sound like really it's just an ordinary microprocessor that's simulating your design in software.  In particular, that means a design programmed into an FPGA can never run any faster than the underlying microprocessor that's simulating it. Which kind of makes the entire endeavour sound... kinda pointless. I thought the whole point of an FPGA was to make custom logic that does stuff faster than you can do it in software. But all this "bitstream" stuff makes it sound like it is still software...  I'm a little confused here. How does an FPGA actually work?

I've seen a lot of people talking about FPGA's before and I know that it stands for field-programmable gate array but how does it work and what is the purpose of using an FPGA?


I believe there are 3 parts to this.  1) $(A\setminus B) \cup (A\setminus C) = B  \Rightarrow  A=B $  2) $(A\setminus B) \cup (A\setminus C) = B  \Rightarrow (B \cap C) = \emptyset$  3) $A=B \wedge (B \cap C) = \emptyset  \Rightarrow (A\setminus B) \cup (A\setminus C) = B$   I can do the the parts labelled 1 and 3 but cannot show part 2.  Anyone who can explain how you do the 2nd part ie show $(A\setminus B) \cup (A\setminus C) = B  \Rightarrow (B \cap C) = \emptyset$ ?

I`m trying to prove this claim and I need some advice how to continue, $$(A \setminus B) \cup (A \setminus C) = B \Leftrightarrow A=B , C\cap B=\varnothing$$ what I did is: $$(A \setminus B) \cup (A \setminus C) = (A \cap B') \cup (A \cap C') = A \cup (B' \cap C')$$ thanks!


Left an unfrozen uncooked store made pizza in the car for 4 hours in 54 degree weather. Is this safe to cook?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I recently came to learn that Brewster's Millions (1985) with Richard Pryor, is only one of 13 versions adapted from the 1902 book.  What film has the most versions?

The current movie industry seems to be engaged in an orgy of remakes to reduce the risk of funding completely new scripts. We have had a recent remake of Total Recall and are about to get a remake of Robocop. Sometimes the remakes happen very quickly (the Swedish movies Let the Right One In and The Girl With the Dragon Tattoo were both remade in English very quickly).   Some of the scripts start as books (The Big Sleep, for example), some start as plays (The Front Page was originally a stage play but was remade as a movie several times, in 1931 and 1974 as The Front Page and in 1940 as His Girl Friday) and others as screenplays (Robocop seems to have started as a screenplay).  What is the most remade story?  NB For clarity let us exclude series where a character such as James Bond repeats and stick with those where the story credit references a single play, book or original script.


Sometimes I get a good answer and accept it, but the someone else posts a brilliant answer. I of course upvote it, but I avoid changing my accepted answer in most situations, since I feel it might be a bit frowned upon, so to speak.  Is it "bad practice" (for lack of a better term) to accept a different answer after you've already accepted an answer?

I had a question of the form "does something like X exist?" Someone wrote a response to say that, No, X does not exist, but I could write it if I liked. I had suspected as much, so I marked his answer as the accepted answer. Today someone actually posted the code to do X for me, and I feel that the new poster deserves the "Accepted Answer" checkmark.  Is it poor form for me to pick a new Accepted answer? Does the original answerer get penalized in terms of reputation?  While the original responder's answer was accepted at the time, I feel this new answer is really more helpful.  Edit: Which of these responses should I accept? What does the notion of a single accepted answer mean with a question that is subjective that could have multiple "right" answers?


I have read the Death Star (the first one) had a diameter of about 186 km, which made me think about whether it could somehow host a satellite or moon due to its size, .

The Death Star is the size of a small moon. Endor being a moon (not sure if it's small or not) has a rich atmosphere.  Could the Death Star hold a nitrogen/oxygen based atmosphere with its gravity?  (Now re-reading my question, I suppose this sounds a lot like the plot of SpaceBalls... that was not my intention)


prove that:  $$\sin \alpha+\sin2\alpha+\sin3\alpha+...+\sin N\alpha = \frac{\sin\frac{N\alpha}{2}\sin\frac{(N+1)\alpha}{2}}{\sin\frac{\alpha}{2}}$$ without $\sum$

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I have multiple folders named as follow:    Name1   Name2   ...   Name9   Name10   Name11   ...     I need to rename them using mv command into:    Name01   Name02   ...   Name09   Name10   Name11   ...     Any ideas?

I've got bunch of files with ill-formed numbering:  prefix-#.ext       | for files with number 1-9 prefix-##.ext      | for files with number 10-99 prefix-###.ext     | for files with number 100-999   Due to further processing I need all of their names to be in format: prefix-###.ext. Is there any easy way to do that?


I have overstayed in the US for three years. Now I am returning to my home country and, while booking the ticket from the US, note that the flight has a stopover at London Heathrow of 1 hour 40 minutes. Do I need a transit visa?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I'm having issue adding a new user to ubuntu core.  I use   sudo adduser --extrausers USERNAME   and successfully created a user but I cannot run any sudo command using that account.  $ sudo mkdir [sudo] password for switchadmin: switchadmin is not in the sudoers file. This incident will be reported.

In /etc/sudoers I see this:  # Allow members of group sudo to execute any command after they have # provided their password # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=(ALL) ALL   So how do I add a user to that sudo group?


I'm getting started with proofs but I have no idea how to do this. I have gotten to $b c = a k$ where $k$ is some integer by divisibility. I'm not sure I can use division yet as they will no longer be integers. I have no idea how to prove it and am seeking helpful ideas.

I know it might be too easy for you guys here. I'm practicing some problems in the textbook, but this one really drove me crazy. From $\gcd( a, b ) = 1$, I have $ax + by = 1$, where should I go from here? The extra $ac$ is so annoying. Any hint?    Thanks, Chan


I have this code to connect a server with a client, i need send json objects to a android studio client but the method escribir in the line of the printwriter have a error, and i dont konw what is the problem, please see the code and help me  public class Servidor { ServerSocket servidor=null; Socket socket=null; BufferedReader lector=null; PrintWriter escritor=null; Gson gson = new Gson(); public Servidor(){  } public static void main(String[] args) {     Servidor Server=new Servidor();     Server.iniciarHilo(); } public void iniciarHilo(){  Thread principal=new Thread(new Runnable(){     public void run(){         try{         servidor=new ServerSocket(8080);         while(true){             socket=servidor.accept();             leer();         }         }catch(Exception ex){             ex.printStackTrace();         }     } }); principal.start(); System.out.println("Servidor iniciado......"); } public void leer(){     Thread leer_hilo=new Thread(new Runnable(){     public void run(){         RegUser registrar=new RegUser();         try{             lector=new BufferedReader(new InputStreamReader(socket.getInputStream()));             while(true){                 JsonParser parser = new JsonParser();                 String mensaje= lector.readLine();                 JsonElement elemento = parser.parse(mensaje);                 String mensaje_in=elemento.getAsJsonObject().get("tipo").getAsString();                 if (lector==null){                     System.out.println("Conexion Interrumpida....");                 }                 if (mensaje_in.equals("registrar")){                     System.out.println("Solicitud de Registro");                     registrar.newUser(elemento);                 }                 else if (mensaje_in.equals("ingresar")){                     System.out.println("Solicitud de Ingreso");                 }               }         }catch(Exception ex){             ex.printStackTrace();         }     }  });     leer_hilo.start(); } public void escribir(final String dato){     Thread escribir_hilo=new Thread(new Runnable(){         public void run(){             try{                 escritor= new PrintWriter(socket.getOutputStream());                 escritor.println(dato);             }catch(Exception ex){                 ex.printStackTrace();             }         }     }); escribir_hilo.start(); }   And this  public class RegUser { Gson gson = new Gson(); ListaEnlazada listaUsuarios; Comparar comparar=new Comparar(); public RegUser(){  } public void newUser(JsonElement elemento) throws IOException{     Servidor respuesta=new Servidor();     //respuesta=new Servidor();     String user=elemento.getAsJsonObject().get("nombre").getAsString();     //boolean result=comparar.UserComp(user);     if(true){         listaUsuarios=new ListaEnlazada();         listaUsuarios.add(elemento);         System.out.println(listaUsuarios.get(0));          JsonObject o = new JsonObject();         o.addProperty("tipo", String.valueOf("registro"));         o.addProperty("estado", String.valueOf("completo"));         String enviar_mensaje = gson.toJson(o);         respuesta.escribir(enviar_mensaje);          }   And the error is    java.lang.NullPointerException    at Servidor$3.run(Servidor.java:81)   at java.lang.Thread.run(Thread.java:745)   I has an error when writing a data through the socket to the client, the error is in the getOutputStream

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?


How feasible it is to be supervisored by a professor who doesn’t know the area? She told me it’s my research and she will only provide general research guidance.

In my PhD, I am assigned mathematical modeling topics and my supervisor's work is related to mathematical biology. But I don't want to work in mathematical biology. Because actually there is not so much real application of that and I don't like biology. Instead, I want to work in fluid dynamics. But my supervisor's research area is totally different. Is it possible  to do independent research work without supervision of supervisor?


I search for "nurple" in a file. I found it, great. But now, every occurrence of "nurple" is rendered in sick black on yellow. Forever.  Forever, that is, until I search for something I know won't be found, such as "asdhfalsdflajdflakjdf" simply so it clears the previous search highlighting.  Can't I just hit a magic key to kill the highlights when I'm done searching?

After doing a search in Vim, I get all the occurrences highlighted. How can I disable that?  I now do another search for something gibberish that can't be found.  Is there a way to just temporarily disable the highlight and then re-enable it when needed again?


I have a list of articles and I put a submit button to all of them.  The fact is I can't get the good input hidden when I'm in my controller because it will take the last input.  <form method="POST" action="{{url('/deleteArticle')}}"> @foreach($articles as $a)         {{ csrf_field() }}

<?= $a['name_a'] ?>
         <input type="hidden" name="id" id="ida" value='<?= $a['id_a'] ?>'/>         <input type="submit" class="del" id="delA" class="cross" name="id">X</input>
 @endforeach </form>   Instead of doing the trick with javascript, I thought about looping my articles and foreach of them having a form.  Is it a bad practice or should I have a single form with one submit button by article? The value of this submit button can't be "X" but only the ID of my article I want to delete, and this is bad for the display.

I have two submit buttons in a form. How do I determine which one was hit serverside?


When trying to install pagespeed on my debian 7.1  Unpacking mod-pagespeed-stable (from mod-pagespeed-stable_current_amd64.deb) ... dpkg: dependency problems prevent configuration of mod-pagespeed-stable:  mod-pagespeed-stable depends on libc6 (>= 2.14); however:   Version of libc6:amd64 on system is 2.13-38+deb7u11.  dpkg: error processing mod-pagespeed-stable (--install):  dependency problems - leaving unconfigured   How to fix that ? (I guess I need to upgrade libc6, but no idea how)

Might be a stupid question, but how can I get an _amd64.deb package version of a mod_pagespeed release prior to the current stable/beta versions - i.e. release 1.11.33.0-beta -   I need to install mod_pagespeed on my Debian Wheezy server and the current version doesn't support it (libc6 version dependency is now 2.14 and Wheezy has 2.13). Building mod_pagespeed from source or somehow updating libc6 wouldn't be a great option on this important production web server.   I'd love to simply grab and dpkg the latest version that didn't yet require glibc >= 2.14 and would dpkg on Debian Wheezy 7.0 without throwing a dependency error like:  sudo dpkg -i mod-pagespeed-stable_current_amd64.deb Selecting previously unselected package mod-pagespeed-stable. (Reading database ... 40509 files and directories currently installed.) Unpacking mod-pagespeed-stable (from mod-pagespeed-stable_current_amd64.deb) ... dpkg: dependency problems prevent configuration of mod-pagespeed-stable: mod-pagespeed-stable depends on libc6 (>= 2.14); however: Version of libc6:amd64 on system is 2.13-38+deb7u7.   The release notes say the last version that supported this setup is just a couple of releases back - the glibc 2.14 requirement is in place as of v 1.11.33.1-stable in May 2016, so 1.11.33.0-beta should do the trick.  Is there an archive of the older .deb packages out there somewhere? Or a way to reference the version in the URL structure when using wget - i.e. ????_amd64.deb