In the film Smeagol found the ring, went in the mountains and turned into Gollum. At the time when Gollum followed the Fellowship of the Ring, Gandalf called him Gollum. Who gave him this name, or why do the others call him like that?

I don't recall any of the characters in Lord of the Rings or The Hobbit calling Sméagol Gollum in his face. It seems to be more of a private epithet. Is this correct? Does Gollum know that others call him Gollum?


When using (s), should "is" or "are" be used?  Regardless of what option(s) is decided.  or Regardless of what option(s) are decided.

Consider the following sentence:     We assume that the individual(s) possesses some general knowledge of the rules of football.   Is "possesses" correct there? Should it be "possess"? Is the rule more complex than always using one or the other?


Once in a book ( I think title was Mathematical Physics, no idea who the author was) saw the proof of instability of planetary orbits in 4 dimensions, cant remember the details of derivations only the final conclusion of the result. Been trying to do something similar myself, but still with no success, how ever pondered if there is any reading material that shows for dimensions higher than 3 the orbits become unstable. I remember there were problems that were easier to solve for general cases than the low specific ones. So maybe there is a simple trick that would take care of that problem. My question is are there any higher dimensions were the orbits remain stable? Is this a mathematical curiosity or was there any body knowledge in physics that considered such cases but ultimately came to conclusion that there is nothing worth pursuing in these lines of thinking?

I have heard from  that stable orbits (ones that require a large amount of force to push it significantly out of it's elliptical path) can only exist in a three spatial dimensions because gravity would operate differently in a two or four dimensional space. Why is this?


I am trying to generate (something like) the following dictionary:  funcs1 = {     '0':lambda x:x==0,     '1':lambda x:x==1,     '2':lambda x:x==2,     '3':lambda x:x==3,     '4':lambda x:x==4,     '5':lambda x:x==5, }   I tried to create the dictionary with a list comprehension like this:  funcs2 = {str(i):lambda x:x==i for i in range(0,6)}   Or simply using a for loop:  funcs3 = {} for i in range(0,6):     funcs3.update({str(i): lambda x:x==i})   However, funcs2 and funcs3 are not the same as funcs1, for example, when calling the element '0' of each one of them and applying it to 0, the results are different:  funcs1['0'](0) Out[2]: True  funcs2['0'](0) Out[3]: False  funcs3['0'](0) Out[4]: False   Can somebody please help me out and point out where I am making a mistake?

I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question:


I have a problem my Hard Disk. So I am using a live USB of ubuntu.  For using Opera browser, I am installing it each time I boot. Is there a way to keep this installation after a system reboot with the live CD?  I want not to persiste all the installation of ubuntu on my USB. I want to know if it is just possible to persiste just one software (Opera) ?

I want to make a persistent live Ubuntu USB drive with more than 4GB of storage.   I know there is an option of installing directly on the drive but I don't want to do this as it will restrict the drive from working on different computers.   One option is to make an additional partition with extra space but if I do this how can I get newly installed software to be stored on this partition?


Opinions sought. I vaguely remember that the expression "This is right" (meaning "I agree with what you just said") appeared in the 1970s. And I remember it because, if I remember correctly, it replaced in no time the till-then familiar phrase "That's right". Forty years later, it's normal to see sentences like... this:  "...inflation reached 200 percent. This led to a major upheaval..."   ...whereas, it seems better/more logical to use "...200 percent. That led to..." - because "this" suggests something that's coming (e.g. that example above), while "that" has more a sense of what just passed ("I'll catch this bus, I missed that bus").    But then, dictionary.com says "this" means "used to indicate a * just mentioned", while "that" is "used to indicate a * mentioned before". So "this" should be the first choice. But it sounds wrong to my ear.

Learning and using English I'm always confused about what word to use for referring to things that have been described by me a few sentences earlier: "that" or "this".   Confusion comes from the fact that only the equivalent of "this" is always used in my native language for such referring. But I've noticed that in English for such referring "that" is used as often as "this" (or maybe even more often).  Some examples for illustrating (just tried to google something appropriate to convey my idea better):     We assess local... the demographics of the local population. What are the natural traffic drivers in the area. Things like cinemas and pubs and retail and office and all that type of things and we now put together a bit of a matrix and actually give a weighted score to each of the things we know help our business. That helps us decide in a more scientific fashion.   or:     The problem of Cervantes' origin became after that into a tough matter. Some experts believed that the Cervantes from Alcázar, in the times of the Lepanto Battle, was in the age of a child, more concerned about gathering nests and that type of things than about fighting as a soldier.   and for "this":     I believe lot of people who involved fishery industries in Mexico Gulf are suffering now but as for economic issues, U.S government and other countries will support them and give an utmost response to it. Important thing is that we learn from this mistake and make sure this type of things will never happen in the future and protect nature environment thus we have to take this technology to get energy from water very seriously. I really hope this technology will be available and used for everybody as soon as possible.   Is there a rule describing proper usage of these words in cases like this? (or should I have written "..in cases like that"?)


Note: The following definitions from my book, Discrete Mathematics and Its Applications [7th ed, 598].  This is my book's definition for a reflexive relation   This is my book's definition for a anti symmetric relation   Is a reflexive relation just the same as a anti symmetric relation?  From what I've, the only way to meet that antisymmetric requirement is to have the same ordered pair, say an element a from Set A, (a,a). If you have anything other than the same ordered pair, (1,2) and (2,1), it will not meet the antisymmetric requirement. But the overall definition of reflexive relation is that it's the same ordered pair. Are they just two ways of saying the same thing? Is it possible to have one and not the other?

Antisymmetric: $\forall x\forall y[ ((x,y)\in R\land (y, x) \in R) \to x= y]$ reflexive: $\forall x[x∈A\to (x, x)\in R]$  What really is the difference between the two? Wouldn't all antisymmetric relations also be reflexive?


edit My google-fu is apparently sub-par, this has a simple solution found here:   I want to force each section to start on a new page if the whole section doesn't fit on the remainder of the page.  I have tried to use minipages, but they fail when the text exceeds the space available on the page. (I want to allow the sections to overflow into another page only if they are the only thing on that page).  this doens't work either:  \begin{samepage} \section{Some title} \lipsum[1-5] \end{samepage} \begin{samepage} \section{Some title} \lipsum[1-4] \end{samepage} \begin{samepage} \section{Some title} \lipsum[1-30] \end{samepage}

I would like my sections to start on a new page if they do not fit on the current page. In other words:  if a section fits on the current page print it, if it does not fit start printing it on the next page.  I would like this to be done automatically.  \usepackage{titlesec} seems to be the solution, but I can not get it to do the job.   Should it be done with titlesec? how ? Is there a better approach?


Are there any shortcuts to launch a terminal in the currently active directory in the GUI? For example say I am browsing the directory cd ~/Projects/A/B/C/D/ED on GUI. I wish to open a terminal with the current directory active at that location without opening a terminal and cd ing into it? Are there any shortcuts or methods to do so?

I am working on Ubuntu 12.04 64bit.  I want to add "Open terminal here" to Nautilus context or right-click menu but it tries to download 32bit version from Internet.


Basically, Title. Is there any word for that feeling when you finally find what you've been looking for? Be it a definition for a word, or your long lost brother, or some rare bird.  Edit: To clarify, not necessarily a new discovery, but perhaps something lost, or that you know is out there, you just didn't know where until you found it. I guess it would be some variant of 'satisfaction'

The context I am referring to is when someone, for instance,  comes into contact with something, a subject ( mathematics,  archeology or computer science, just to name a few),  a religion or a sport, and  discovers that he/she has found a new passion, something he/she  didn't know before or didn't think it could  be so fascinating. Is there an expression or an idiom to describe this ?


Question: Why can you declare a variable of an abstract class and then set that variable to null and then not be able to access any of the methods. What would be the reason behind this concept of abstract classes?  class:  package ReadWriteFile; public abstract class GraphicObject {        int home = 100;        final int score = 0;         abstract void draw();        abstract String meMethod1();        abstract void meMethod2();         void meMethod3() {            System.out.println("test");;        }         public static void main(String[] i){            GraphicObject o = null;            o.meMethod3();        }   }

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


If $e_1,...,e_n, \eta$ are vectors in $V$, the first $n$ of which are a ONB, is it true that $$\| \eta \|^2 = \sum_{i=1}^n \langle e_i, \eta \rangle^2?$$

Suppose that $V$ is an inner product space.  (a) Show that if $\{e_1, . . . , e_n\}$ is an orthonormal basis for $V$ , then $$||v||^2=\sum_{i=1}^{n}|\langle v|e_i\rangle|^2\quad \quad \text{for every $v\in V.$}$$ (b) Suppose that $\{e_1, . . . , e_k\}$ is an orthonormal set in $V$ (not necessarily a basis), and let $v ∈ V$. Show that if $$||v||^2=\sum_{i=1}^{k}|\langle v|e_i\rangle|^2\quad \quad \text{for every $v\in V$}$$ then $v = \sum_{i=1}^{k}⟨v | e_i⟩e_i.$  I tried to use the reconstruction formula but am not getting anywhere. Please help.


At the moment I am working on website selling products online. Site has pages displaying product lists in form of tables. The markup of product list is actually HTML table.  I have noticed that some sites have tabular data displayed in Google search results. For example, W3Schools website.  I have figured out that it's called Table Snippets. But what should I do to get the Table Snippet for my site to be displayed in Google search results? I have tried to look for answer in Google but couldn't find anything useful.  I was thinking of implementing Schema.org Itemlist or multiple Schema.org Product items (for each product on the page), adding metadata to page so Google could find correct product data but I am not sure if I achieve what I want with Schema.org . Am I thinking in right direction? Or I must try anything different to get the table in search results? I just want some hint.  P.S. Not sure if this is important, but just in case. Website is ASP.NET (WebForms).

My website used to have sitelinks and now it doesn't. It's very possible that it's due to changing the website to a sidebar design instead of having an "interstitial" type landing page which limited the number of choices, but I'm not sure.  Here is how sitelinks might look for a site:    What are some things that I can do to improve my chances of getting sitelinks?


Is there a way I can access the system tray items using the keyboard in Windows XP?

How to access (or switch between) tray icons with defined shortcuts in windows? I have many running programs which I cannot reach with alt-tab because they are not in taskbar - they are in tray. How do you reach those applications without a mouse? I heard of some tricky keys combination (like ctrl+esc esc tab tab tab and then find application with arrow keys), but it's ridiculous to use such long keys combination for such simple task. Is there any utility to manage switching like TaskSwitchXP for alt+tab? Or maybe TaskSwitchXP has possibility to access applications in tray?


I mean, they say md5 hashes are one-way. Once something is encrypted, it can't be decrypted. I read other questions and people say it is now easy to just match and decrypt using something they call 'rainbow tables'... okay, they can be decrypted, but, if yes, then is there any other way to make the website secure? If all md5s are decryptable, how does FAcebook and Twitter keep their data secure?

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


Don't native speakers in some regions pronounce [ŋ] simultaneously with the [n] sound in order to connect it without releasing the "g"?   For instance, can the word "singer" instead of sɪŋ·ər, be pronounced more like sɪŋn·ər?  I'm asking because every time I try to pronounce that word, the "g" sound is released automatically, even though it's very slight, and the only way to avoid it is adding the "n" sound.  My native language is Russian.

I teach English to elementary students in Korea.  One day, I noticed an African American female teacher pronounce the word,"singer" differently- "sinGer" , a strong G-sound. Is it common in America? Recently while watching CNN, I saw an basketball star pronounce this word the same way.  I just want to know whether it has to do with region, ethnicity, or etc.  I would appreciate if you could let me know. Thanks.


I commented on my friend post and the friend replied "Your Point Being?". But I didn't understand the meaning of "Your Point Being?". What is the meaning of "Your Point Being?".

I have heard someone say in a conversation, "Well, my point being,,,". As an English learner, I was puzzled but assumed that it was roughly the same as saying "My point is that..." or "Here's my point:"   Even if my guess was right, the phrase strikes me as a bit odd. Can anyone elaborate on the meaning/usage/gramatical explanation of this phrase?


I'm a green card holder and I have a Syrian passport, my main destination is Lebanon and I'm going through Geneva airport. Do I need a transit visa?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


When I go to do App store system updates it prompts for the Apple ID, but not mine...  It's asking for a former employee.  For now I can reset their password (as their old e-mail can be redirected) and continue to use that account.  However, long term I'd like to switch that over to a different Apple ID so that the ex-employee Apple ID can be entirely shut down.  How do I go about changing the Apple ID used for system updates?

I bought a used MacBook Pro, and I need to update some software.  When I click the 'update all' button to proceed, it asks for the App Store password of the old user's account:    How do I remove the old user's account so that I can update my software?


today I have a problem which does not make sense and I cannot figure out how to do it, it consists in that when making a query in phpmyadmin which in its where clause has a word with tilde it generates its respective results but when doing it in php with mysqli does not generate anything, and I do not understand why since the where clause works with special characters like the 'ñ' since I have tested it and it works but with tilde no, the column count is in utf8_general_ci so that it can handle all kinds of special character, I have changed its collation to utf8_spanish_ci to see if it was the collation that did not accept accents but no, even so with this last collation it still does not generate results the same as with the previous collation in php but if in phpmyadmin without any inconvenience I do not understand why the php does not generate the results and the phpmyadmin if  Note: there is no problem with the results of the query since I have validated that in none of them it returns a special character  Php code:  <?php $conexion = mysqli_connect("localhost", "admin", "123", "school"); $consulta="select * from users where localidad='Cúcuta'"; $resultado=mysqli_query($conexion,$consulta); while($registro=mysqli_fetch_array($resultado)){     echo 'Successfull'; } mysqli_close($conexion); ?>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I apologize before hand if this seems too naive. I'm having a really tough time understanding the relation between voltage and current. I read that 1 Volt is the amount of work done to move a $1As$ charge (which is a finite number of electrons). So how can we have cases of voltage and current being different.  My next doubt is when we connect electrical components in series. The current remains same but voltage drops at every electrical component. But from the above doubt; how can we achieve same number of electron flow when the work done (Voltage) is being reduced. With respect to the waterfall analogy. But here as the voltage drops isn't the height of the waterfall itself being manipulated with.

I know that this question has been asked many times before, and I have read over several of the threads asking this question, but they do not include the gripe I have with my problem of understanding the difference.  As I understand it, voltage, V, (also called electromotive force, EMF) is essentially the "wanting" of electrons to push away from the negative terminal and to want to go to the positive terminal to eventually balance out the charges and create a net neutral charge. This is done through a conductor, like a wire, between the two terminals. The movement of electrons caused by the attraction of the charge from the negative terminal to positive is the current, I.  Now, as my textbook defines it, voltage is the amount of energy, E, per unit charge, Q. Current is defined as the amount of charge, Q, passing through a point in the circuit in a unit time, t. Current is determined by voltage, as is also stated in Ohm's Law (i.e. if voltage rises/falls, current rises/falls, if resistance remains constant). So then, if energy is lost in a resistor, why does current through the resistor not change? Shouldn't the current go down if energy is lost? Or is it that energy is determined by something within the voltage source (e.g. battery) that is not related to charge?


Can a flock be steered towards a target ?  I've seen that flocking behavior has the alignement behavior, but can it be directed and steered toward a goal ?

I am implementing steering algorithms with group management for spaceships (fighters). I select a leader and assign the target positions for the other spaceships based on the target position of the leader and an offset. This works well. But when my spaceships arrive they all have a different direction. I want them to keep to look in the same direction (target - start).   I also want to combine this behavior with a minimum turning radius that is based on the speed. The only idea I have is to calculate a path for each spaceship with an point before the target position, so the ships have some time left to turn into the right position. But I dont know if this is a good idea. I guess there will be a lot of rare cases where this can cause a problem.  So the question is, if anybody knows how to solve this problem and has some (simple code) or pseudocode for me or at least some good explanation.


I asked  but it was marked as a duplicate. But I believe it isn't a duplicate because the questions linked to are asking how to use a feature that already exists in Stack Exchange, while mine is asking if we could implement a new feature.

I asked a question regarding a very specific feature of a program and whether or not it works with a larger program.  Within hours someone had marked it with "This question may already have an answer here of a similar question, but not related to my question.  The question I asked IS NOT ADDRESSED in the referred-to question. It's frustrating to spend half an hour putting together an intelligent and specific question, and then have someone mark it as a duplicate (or possible duplicate), which apparently causes people to skip over my question. I haven't received any more responses since the question was flagged.   Two questions:  (1) How do I get this flagging removed and (2) what's the best way to prevent these "helpful" flaggings in the future?


import java.util.Scanner;  public class ChooseYourOwnAdventure {     static Scanner in = new Scanner(System.in);  public static void main (String[] args){      System.out.println("[This is a choose your own adventure.] It's 1941; you are joining the military. What branch do you choose? Army [1], Marine Corps [2], Navy [3] or Air Force [4]?");      String branch = "undecided";      String input = "";     System.out.println("Please input a command:");     input = in.nextLine();      if (input.equals("1"))     {        System.out.println("You have joined the Army. Defend America well. Press 0 to continue.");     branch = "Army";     }     else if (input.equalsIgnoreCase("2"))     {     System.out.println("You have Joined the Marine Corps. Semper Fi. Press 0 to continue");     branch = "Marine Corps";     }     else if (input.equals("3"))     {     System.out.println("You have joined the Navy. Patrol the sea with pride. Press 0 to continue.");     branch = "Navy";     }     else if (input.equals("4"))     {     System.out.println("You have joined the Air Force. Take to the skies. Press 0 to continue.");     branch = "Air Force";     }      String input2 = "";     input = in.nextLine();      if (input2.equals(0))     {     System.out.println("You complete basic training for the " + branch + " with flying colors. Now, you can choose your specialty.");     }      if (branch == "Army")     {     System.out.println("You can choose to be an Infantryman [q] or a Marksman [w].");     }      else if (branch == "Marine Corps")     {     System.out.println("You can choose to be a Paratrooper [e] or a Sniper [r].");     }      else if (branch == "Air Force")     {     System.out.println("You can choose to fly a Fighter [t] or a Bomber [y].");     }      else if (branch == "Navy")     {     System.out.println("You can choose to be a Sailor [u] or a Pilot [i].");     }       in.nextLine();       String input77 = "l";     input = in.nextLine();      if (branch == "Army")     {     if (input77.equals("q"))     {     System.out.println("infantryman");     }     else if (input77.equals("w"))     {     System.out.println("DM");     }     }     if (branch == "Marine Corps")     {     if (input77.equals("e"))     {     System.out.println("paratrooper");     }     else if (input77.equals("r"))     {     System.out.println("sniper");     }     }     if (branch == "Air Force")     {     if (input77.equals("t"))     {     System.out.println("fighter");     }     else if (input77.equals("y"))     {     System.out.println("bomber");     }     }     if (branch == "Navy")     {     if (input77.equals("u"))     {     System.out.println("sailor");     }     else if (input77.equals("i"))     {     System.out.println("pilot");     }     }  }   }  OK, this is my program. It malfunctions when you choose your "specialty", (called input 77) and when i type in my input, nothing happens. What am i missing?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Around blogs and forums I noticed that people uses different ways to declare pointers in c++:  int* a = nullptr;   and  int *a = nullptr;   There's a difference between the two methods? If yes, what is?

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.  How about these examples:   int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2;   Now, to my understanding, the first three cases are all doing the same: Test is not an int, but a pointer to one.  The second set of examples is a bit more tricky. In case 4, both test and test2 will be pointers to an int, whereas in case 5, only test is a pointer, whereas test2 is a "real" int. What about case 6? Same as case 5?


Firstly i just want to apologise if any of my information is incorrect. I took a long (Hopefully long enough) look at the Garrus Vakarian information on the Mass Effect Wikia page.  I notice in ME2 and 3, there's a risk of Garrus dying (Higher in ME3 apparently). I'd like to save him as i think he's quite an awesome squad member and character overall. I am partway through ME2, have just recruited Mordin after getting Garrus and done a few side-missions (Last one completed was the mechs destroying some crates..cant recall exact mission name). From what i can tell Garrus in ME2 will only die if i dont save him in time when on the bridge at Omega, if thats so then thats that sorted already. As for ME3 there seems to be a specific set of things that need to happen or Garrus, and alot of other normandy crew and squad will die at the end, of course i want to avoid this in my first playthrough so want to be prepared for it when i play ME3!  Any information is appreciated! :D

I know that the Mass Effect 2 ending varies depending on the choices you make. I have a few questions about a specific aspect of the ending:      The survival of your crew depends on whom you choose for certain parts of the suicide mission.         1. Only the doctor was saved from the Collector base. Was it possible to save the rest of the crew if I had reached there earlier? Like, not trying to complete the squad and heading there the moment the Omega 4 relay was open?         2. At the last bit of the suicide mission, where you go in to blow up the place, you can choose only two members to accompany you (as usual). The rest stay back to keep the bad guys out. For me, at the end of the game, Miranda and Thane kicks the bucket. But who dies is different for different people. But what affects that? We dont get to choose who stays behind to provide cover. So why is it different for different people?


I don't know why: When declarations and definitions are not separated from the block's class(class SLinkedList{ ....}). The building will be successful.  But when I separate declarations and definitions of the class below. The building will report an error like this      "Severity  Code    Description Project File    Line    Suppression State   Error   LNK2019 unresolved external symbol "public: __thiscall SLinkList<char>::SLinkList<char>(void)" (??0?$SLinkList@D@@QAE@XZ) referenced in function _main  LinkedLists C:\Users\LQA\Documents\Visual Studio 2015\Projects\DataStructures\DataStructures\Source.obj 1"    This is the detail source code: [LinkedLists.h]  #include <iostream> #include <string> using namespace std;   //Singly Linked List  template<typename E> class SLinkList;  template<typename E> class SNode { private:     E elem;     SNode<E>* next;     friend class SLinkList<E>; };  template<typename E> class SLinkList { public:     SLinkList();     ~SLinkList();     bool empty() const;     const E& front() const;     void addFront(const E& e);     void removeFront(); private:     SNode<E>* head; };   [LinkedLists.cpp]  #include "LinkedLists.h"   /*  * SINGLY LINKED LIST  */ template<typename E> SLinkList<E>::SLinkList() :     head(NULL) {}  template<typename E> SLinkList<E>::~SLinkList() {     while (!this->empty())     {         removeFront();     } }  template<typename E> bool SLinkList<E>::empty() const {     return head == NULL; }  template<typename E> const E& SLinkList<E>::front() const {     return this->head->elem; }  template<typename E> void SLinkList<E>::removeFront() {     SNode<E>* old = this->head;     this->head = old->next;     delete old; }  template<typename E> void SLinkList<E>::addFront(const E& e) {     SNode<E>* v = new SNode<E>;     v->elem = e;     v->next = this->head;     this->head = v; }   [Source.cpp]  #include "LinkedLists.h" using namespace std;  int main(void) {     SLinkList<char>* llst = new SLinkList<char>();     //llst->addFront('a');     //llst->addFront('b');     return 0; }   Does anyone know what was caused to this problem?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I read the answer on the link on how to add transparent images on top of materials ( ). This works beautifully in v2.79b.    This technique does not seem to work in Blender 2.80 anymore (I am using the very latest Mac version from Dec 20). The transparent image is also shown on the part of the mesh, which is not UV unwrapped. Is this a bug in v2.80? Or does v2.80 require a different approach?    What is really odd is the fact, that if I open in v2.80 a file created in v2.79 created, it shows up correctly.    Thanks for any advice! Chris  Edits: screenshots and link to blender files added

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


Is it possible to enter cheat codes on Grand Theft Auto San Andreas for iOS?  I want to buy the game for my iPhone 4, but I'd still like to have the ability to enter cheat codes.

Is there a way to use  like HESOYAM on GTA San Andreas for iOS directly in the UI, without copying saved files?  Update: Using a bluetooth keyboard doesn't work either.


Here's the description of an :     Oil usually comes in a clay flask that holds 1 pint. As an action, you can splash the oil in this flask onto a creature within 5 feet of you or throw it up to 20 feet, shattering it on impact. Make a ranged attack against a target creature or object, treating the oil as an improvised weapon. On a hit, the target is covered in oil. If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil. You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level. If lit, the oil burns for 2 rounds and deals 5 fire damage to any creature that enters the area or ends its turn in the area. A creature can take this damage only once per turn.   The description provides a duration that oil burns while poured onto a surface, but not for oil that's lit while splashed onto a creature. Does a creature covered in oil take the additional 5 fire damage every time it takes fire damage for the one-minute duration until the oil dries, or only the first time?  5e is usually pretty literal about this, and it doesn't say 'the first time the target takes fire damage,' so I'm inclined to think it's the latter. But that seems pretty powerful for adventuring gear that costs a single silver piece, even if it does take an action to set up.

I had the idea of throwing oil flasks on enemies at level 1, then hitting them with a torch to deal a bunch of bonus fire damage.  PHB 152:     If the target takes any fire damage before the oil dries (after 1 minute), the target takes an additional 5 fire damage from the burning oil.   PHB 152:     If you make a melee attack with a burning torch and hit, it deals 1 fire damage.   A flat 6 fire damage is pretty potent at level 1, but does the oil remain or does it burn out in a flash when hit (since it has no damage over time) when hit?  If not there is potential for a dual torch wielding PC to throw down 12 fire damage per round, or for multiple PCs to deal 6 damage per torch per PC per round.


Calculate $S =\sum_{k=1}^n\frac {1}{k(k+1)(k+2)}$. I know I posted this question already but I want a more detailed answer. For example, how you got from one step to another using the partial fraction formula. Thanks!

Calculate $S =\displaystyle\sum_{k=1}^n\frac {1}{k(k+1)(k+2)}$. This sequence is neither arithmetic nor geometric. How can you solve this. Thanks!


Let's say i have this class: class Person {    public string Name { get; set; }    public HairColour hairColour { get; set; }    public EyeColour eyeColour { get; set; } }  where HairColour and EyeColour are enums. And I want the user to enter a value for each of the person's properties like this: string userInput = "";  Person p = new Person();  Type personType = typeof(Person);  foreach (var property in personType.GetProperties()) {    Console.Write("Enter the person's " + property.Name + ": ")    userInput = Console.ReadLine();    personType.GetProperty(property.Name).SetValue(p, // PARSE PROPERTY HERE ); }  Is there a way to cast the userInput to the corresponding type, without using multiple "if" statements?

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


I'm trying to pass an array of pointers to a function, without the need to define the size. Also the output is a warning  "initialization makes pointer from integer without cast. Mostly interested in passing array of pointers rather than an array because I'm trying to understand how to deal with the instance when Data is a dynamically allocated memory using malloc  Why is this happening, and how can I pass an array of pointers as an argument, without the need to define its size?  Code:  #include <stdio.h>  void printData(int *data[]);   void main (int argc,char *argv[]){      int *Data[] = {4, 8, 15, 16, 23, 42};     printData(Data);  }  void printData(int *data[]){      int **cur_data = data;     int counter = sizeof(data)/sizeof(int);     for(int i = 0; i<counter; i++){         printf("%d. %d\n", i, *cur_data);         cur_data++;     } }     Warning:  main.c: In function ‘main’: main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast main.c:9: warning: initialization makes pointer from integer without a cast gcc   main.o -o run     Run:  0. 4

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I am a Windows 8.1 user. I want to use dual boot with Ubuntu. I installed Ubuntu 15.04 with the Something Else option. Installed correctly in swap and ext4. When I start the PC Ubuntu boots. But I want to select win 8 or Ubuntu OS. During the installation of Ubuntu it showed a warning, something about BIOS UEFI mode.   Now how can I solve this problem? What setting can I use to be able to choose an OS to boot?  My motherboard is Gigabyte H81M-S2PV

I installed Ubuntu yesterday alongside Windows 7 and whenever I start my computer I don't have the option to boot Windows. When the computer starts it goes straight to Ubuntu without giving me an OS selection menu. When it goes to Ubuntu it gives me Ubuntu repair options and Ubuntu normal start option. I still have all of the Windows 7 files on my hard drive, but Windows 7 has no way to boot.


I asked a question (with no answers!) about WIA yesterday so have gone for a more generic question today. I'm under the distinct impression that WIA is no longer intended for camera capture. My question is: so how do you take a camera snap in C#, Winforms, .net?

I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don't know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way?


$f^{'}(z)$ exists if and only if $$\dfrac{df}{d\overline{z}} =  \dfrac{df}{dx}\dfrac{dx}{d\overline{z}} +  \dfrac{df}{dy}\dfrac{dy}{d\overline{z}} =  \dfrac{1}{2}\dfrac{df}{dx}-\dfrac{1}{2i}\dfrac{df}{dy}=0$$   My professor briefly mentioned this in his notes, however, i tried to read up more on this but cannot find a convincing proof or the intuition behind this. Is it related to the Cauchy Riemann equations?   And if let's say there is a question as such: Is the function $f(z) = z + \overline{z}$ differentiable? Instead of using the Cauchy Riemann, i can use the above formula and say that since $\dfrac{df}{d\overline{z}} = 0 + 1 = 1 \neq 0$, it follows that $f$ is not differentiable anywhere? Here i treated $z$ as a constant?  Please help! Thanks

The full question is "Define the operator $\frac{d}{d \overline{z}} = \frac{1}{2}(\frac{d}{dx}+i\frac{d}{dy})$. Show that a  function $f(z)=u(x,y)+iv(x,y)$ satisfies the Cauchy-Riemann equation if and only if $\frac{df}{d\overline{z}}=0$." I have already figured out the $\rightarrow$ direction and only need help with the $\leftarrow$ direction.   So far I have: Let $\frac{df}{d\overline{z}}=0$ and $f(z)=u(x,y)+iv(x,y)$. Then $$0=\frac{df}{d\overline{z}}$$ $$=\frac{1}{2}\frac{d}{dx}(u+iv)+\frac{i}{2}\frac{d}{dy}(u+iv)$$ $$=\frac{1}{2}(u_x-v_y)+\frac{i}{2}(u_y+v_x)$$ And this is where I get stuck. I am not sure where to go from there so any help would be much appreciated. (Also feel free to fix my formatting I know it is atrocious."


The new media manager loads the FULL size images which is REALLY inefficient for a thumbnail. I'd like to replace it with a different size thumbnail that is also stored for each source image. Can't seem to find a way to do that either. Anyone have any tips?

On my WP site (which sells retail products), I have large images (up to 4000x4000 px) so people can zoom in. Unfortunately, when adding images to a page and using the Media Library, the images all load up at full quality (though resized down). This makes the Media Library page load up really slowly, and make my browser slow to a crawl. Why is it doing this? Why isn't the ML page using thumbnails? If I click on "Media" on the left admin menu, that list of images are proper thumbnails, but when adding media to a page, the list that comes up is using full quality images.  Is this a bug in WP?


Show that if $\gcd(a,b)=1$ and $p$ is an odd prime, then ${\gcd(a+b,}\frac{a^p +b^p}{a+b}$$) = 1$ or $p$     Sorry about the duplicate  In another answer, however, the sum $\sum\limits_{k=0}^{n-1} (-1)^{k}a^{n-1-k}b^{k}$ was expressed as $\left(\sum\limits_{k=0}^{n-2} (-1)^{k}(k+1)a^{n-2-k}b^{k}\right)(a+b) + (-1)^{n-1}nb^{n-1}$ How was it done?

Let $p$ be prime number ($p\gt2$) and $a,b\in\mathbb Z$ ,$a+b\neq0$ ,$\gcd(a,b)=1$ how to  prove that $$\gcd\left(a+b,\frac{a^p+b^p}{a+b}\right)=1~~\text{or}~~ p$$  Thanks in advance .


It is easy to prove any sequence generated by $$ x_{n+1}:=\frac{x_n+x_{n-1}}{2} $$ is convergent. But how about if the sequence only satisfies $$ 0\leq x_{n+1}\leq\frac{x_n+x_{n-1}}{2} $$ with positive $x_0$ and $x_1$?    @Martin R gives a proof. Could this result be extended to $n$ preceding terms?

Let $m \ge 2 -$ fixed positive integer. The sequence of non-negative real numbers $\{x_n\}_{n=1}^{\infty}$ is that for all $n\in \mathbb N$   $$x_{n+m}\le \frac{x_n+x_{n+1}+\cdots+x_{n+m-1}}{m}$$   Prove that this sequence has a limit.   I know I need to prove 1) the sequence is monotone; 2) the sequence is limited. But I can not do any of these items.


so when you enter a command into a command block or type one in chat it shows the command in chat like if you do /kill @e it would say in chat what was killed I wanted to know how to clear that?

I am making a server, and I put a comparitor clock down to constantly have clear weather. How do I silence the commands?


When I run sudo apt update, I get this:  E: The repository 'http://archive.getdeb.net/ubuntu bionic-getdeb Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I do not have these repositories. Here's my /etc/apt/sources.list file:  # deb cdrom:[Ubuntu 17.04 _Zesty Zapus_ - Release amd64 (20170412)]/ zesty main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates main restricted  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic universe # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty universe deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty multiverse deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-updates multiverse  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu zesty partner # deb-src http://archive.canonical.com/ubuntu zesty partner  deb http://security.ubuntu.com/ubuntu bionic-security main restricted # deb-src http://security.ubuntu.com/ubuntu zesty-security main restricted deb http://security.ubuntu.com/ubuntu bionic-security universe # deb-src http://security.ubuntu.com/ubuntu zesty-security universe deb http://security.ubuntu.com/ubuntu bionic-security multiverse # deb-src http://security.ubuntu.com/ubuntu zesty-security multiverse   I tried sudo apt-add-repository --remove http://archive.getdeb.net/ubuntu, but it returned no output, and when I tried sudo apt update again, I got the same error.  I'm hoping to get this error to go away, but I don't know how. Is that possible? What can I do?

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I was browsing Reddit and I stumbled upon . It is a video on making duct tape glow a blue light by pulling two pieces of duct tape apart. Appearntly the glowing is caused by something called .      Triboluminescence is an optical phenomenon in which light is generated through the breaking of chemical bonds in a material when it is pulled apart, ripped, scratched, crushed, or rubbed. The phenomenon is not fully understood, but appears to be caused by the separation and reunification of electrical charges. (Wikipedia)   This doesn't tell me very much, mostly because I don't fully understand what "separation and reunification of electrical charges." really means. So can anyone explain how seperation and reunification of electric charges can give rise to this blue glow?

I was tearing open individually-wrapped cough drops in the dark, and noticed that when I pulled apart two adhesive-joined pieces of silvery plastic film, small flashes of light were produced. It was not a reflection--it was pitch dark.  What causes this?  The product is Bee M.D. Organic Honey Throat Drops--kind of gooey, old ones (laugh). They contain menthol and eucalyptus oil. I did some more experimenting and think the the flash could actually be separating the plastic from the cough drop itself rather than pulling apart the adhesive. The item is small, the room is dark, my finger has a wound, and all in all it's hard to tell for sure.  I don't know if this is a physics or chemistry question--it depends on the answer.


What will happen if we somehow create an "anti-sodium "element and react it with "hydrogen"(not anti)?  I am specific about ANTI-SODIUM and HYDROGEN. Not just plain matter and antimatter.

I used to read the term "pure energy" in the context of matter-antimatter annihilation.  Is the "pure energy" spoken of photons? Is it some form of heat?  Some kind of particles with mass?   Basically, what does "pure energy" in the context of matter-antimatter annihilation refer to?


What  you usually call a president who is not going to be in power after new election ?  Or   What  do you usually call a president who is not going to be in power after new election ?  My perception: here because the answer is not direct object, first one is correct.

What did you say?   What you said.         How did you and mum guess I wanted Agnes?   how you and Mum guessed I wanted Agnes   What is the meaning of above two sentences? When should I use "did + present tense" and the past tense of a verb?


Please carefully read the text below:  On 24 November, 1993, a meeting of Leftist intellectuals occurred in London under the auspices of the Institute for Public Policy Research (IPPR), which is a Labour-leaning think-thank. A short document was circulated in advance of the said meeting to clarify its purpose.  Among other things, the document declared that the task of the IPPR was: "To do what the Right did in the seventies, namely to break through the prevailing parameters of debate and offer a new perspective on contemporary British politics." The explanatory document also said, "Our concern is not to engage in a philosophical debate about foundations of socialism."  If this meant that those foundations were not the appropriate thing to talk about at the 24 November meeting, then that might have been right; not every thing has to be discussed at every meeting. But if what was meant was that discussion of philosophical foundations is not what the Left now needs, then I disagree, and if that indeed is what was meant, then it is curious that the breakthrough by the Right should have been invoked as an achievement for the left to emulate, for if there is a lesson for the Left in the Right's breakthrough, it is that the Left must repossess itself of its traditional foundations on pain of continuing along its present, politically feeble, reactive course. If the Left turns its back on its foundations, it will be unable to make statements that are truly its own. ,,.................. Since I've heard only one definition of the part identified in bold, I am at a dead end. As you know, and according to Oxford's dictionary, the verb "repossess" means: To take back property or goods from SB who has arranged to buy them and can not pay.  Here, the object of verb is a thing not a person, but in the text, first,itself comes before of and its traditional foundations. As a result, I thought that this phrase might be an idiom and so has a different meaning with the original verb.  Please explain the meaning of behind this phrase.

Please carefully read the text below:     On 24 November, 1993, a meeting of Leftist intellectuals occurred in   London under the auspices of the Institute for Public Policy   Research (IPPR), which is a Labour-leaning think-tank.  A short document   was circulated in advance of the said meeting to clarify its   purpose.        Among other things, the document declared that the task of the   IPPR was: "To do what the Right did in the seventies, namely to break   through the prevailing parameters of debate and offer a new   perspective on contemporary British politics."    The explanatory document also said, "Our concern is not to engage in a   philosophical debate about foundations of socialism."      If this meant that those foundations were not the appropriate thing to   talk about at the 24 November meeting, then that might have been   right; not every thing has to be discussed at every meeting.  But if   what was meant was that discussion of philosophical foundations is not   what the Left now needs, then I disagree, and if that indeed is what   was meant, then it is curious that the breakthrough by the Right should   have been invoked as an achievement for the left to emulate, for if   there is a lesson for the Left in the Right's breakthrough, it is that   the Left must repossess itself of its traditional foundations on   pain of continuing along its present, politically feeble, reactive   course.  If the Left turns its back on its foundations, it will be   unable to make statements that are truly its own.   Since I've heard only one definition of the part identified in bold, I am at a dead end.  As you know, and according to Oxford's dictionary, the verb "repossess" means: To take back property or goods from SB who has arranged to buy them and can not pay.  Here, the object of verb is a thing not a person, but in the text, first,itself comes before of and its traditional foundations. As a result, I thought that this phrase might be an idiom and so has a different meaning with the original verb.  Please explain the meaning of this phrase.


I found this image on Dribbble, but I see it's very different from normal images I see everyday. I don't think this is created from Photoshop; it's hard me to explain it. What is the name of this kind of graphics, and which software is used to create it?

I want to buy some stock photos like the ones below. What is this design called?  I don't even know how to start searching...


Let $n\ge3$. Prove that $\sqrt[n]2\notin\Bbb Q$.  Let us suppose that $\sqrt[n]2=p/q$, that is $2q^n=p^n$, so $q^n+q^n=p^n$, against FLT.  Do you know similar examples, in which simple problems are solved using huge weapons (maybe in a elegant way)?

Here is a toned down example of what I'm looking for:  Integration by solving for the unknown integral of $f(x)=x$:  $$\int x \, dx=x^2-\int x \, dx$$  $$2\int x \, dx=x^2$$  $$\int x \, dx=\frac{x^2}{2}$$  Can anyone think of any more examples?  P.S. This question was inspired by a  that I found out about  This question is meant to be more general, accepting things like solving integrals and using complex numbers to evaluate simple problems.


Sometimes data extracted from reports do not have individual values, like 4, 23, 43, but grouped together like this:     income level people in this group     10k to 20k 44   20k to 40k 240   40k to 80k 400   80k to 100k 130     What is the best way to describe this situation in statistics, and how to calculate the mean value? At first, I thought about multiplying the mid value of the first row by the number of people, i.e.: mean = ((15k x 44) + (30k x 240) + (60k x 400) + (90k * 130))/(44 + 240 + 400 + 130) However, I feel since the distribution is skewed, the mid point doesn't represent the mean value in each group, and thus the calculation above is wrong. I also thought about using weighted arithmetic mean, but I am not sure. What is the statistic tool to deal with this sort of problem?

I have a dataset of sample observations, stored as counts within range bins. e.g.:  min/max  count 40/44    1 45/49    2 50/54    3 55/59    4 70/74    1   Now, finding an estimate of the average from this is pretty straight forward.  Simply use the mean (or median) of each range bin as the observation and the count as a weight and find the weighted average:  $$\bar{x}^* = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_ix_i$$  For my test case, this gives me 53.82.  My question now is, what's the correct method of finding the standard deviation (or variance)?  Through my searching, I've found several answers, but I'm unsure which, if any, is actually appropriate for my dataset.  I was able to find the following formula both  and .  $$s^{2*} = \frac{ \sum_{i=1}^N w_i (x_i - \bar{x}^*)^2 }{ \frac{(M-1)}{M} \sum_{i=1}^N w_i }$$  Which gives a standard deviation of 8.35 for my test case.  However, the Wikipedia article on  gives both the formula:  $$s^{2*} = \frac{ \sum_{i=1}^N w_i}{(\sum_{i=1}^N w_i)^2 - \sum_{i=1}^N w_i^2} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  and  $$s^{2*} = \frac{1}{(\sum_{i=1}^N w_i) - 1} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  Which give standard deviations of 8.66 and 7.83, respectively, for my test case.  Update  Thanks to @whuber who suggested looking into Sheppard's Corrections, and your helpful comments related to them.  Unfortunately, I'm having a difficult time understanding the resources I can find about it (and I can't find any good examples).  To recap though, I understand that the following is a biased estimate of variance:  $$s^{2*} = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$  I also understand that most standard corrections for the bias are for direct random samples of a normal distribution.  Therefore, I see two potential issues for me:   These are binned random samples (which, I'm pretty sure, is where Sheppard's Corrections come in.)  It's unknown whether or not the data is for a normal distribution (thus I'm assuming not, which, I'm pretty sure, invalidates Sheppard's Corrections.)   So, my updated question is; What's the appropriate method for handling the bias imposed by the "simple" weighted standard deviation/variance formula on a non-normal distribution? Most specifically with regards to binned data.  Note: I'm using the following terms:     $s^{2*}$ is the weighted variance   $N$ is the number of observations.  (i.e. the number of bins) $M$ is the number of nonzero weights.  (i.e. the number of bins with counts) $w_i$ are the weights  (i.e. the counts) $x_i$ are the observations.  (i.e. the bin means) $\bar{x}^*$ is the weighted mean.


Earlier this year I applied for B2-TOURISM visa to travel to USA with my husband who was on a business trip. I got the visa stamped as B1/B2. However in DS 160 I specifically requested for tourism and medical purposes visa.  I travelled to USA on Feb 2015 and spent 16 days there. At the port of entry the officer marked B2 on top of the ink stamping.  Now that there is a business opportunity to travel to USA from my office in India. Since it's stamped as B1/B2 my visa cell executive suggests that I use my old visa. Also the visa is valid for 10 years and allows multiple entries. The entry is purely for gaining knowledge in a tool and attending knowledge sharing sessions.  My concerns are:   Visa officer marked B2 on the passport page on my first entry. I requested B2-Tourism and medical treatment visa in my DS 160 The US consulate interviewer has not seen my itinerary and the POE personnel marked B2 with pen on the passport.

I got a B1/B2 visa earlier this year when I traveled to the US for a business trip from my company. It expires in 2013 and I'd love to visit the United States again, but for no other purpose than traveling.  I wonder:        If I can legally travel to US with B1/B2 visa without a real business need (assuming I'm honest);   If I have to work at my current company to be able to use it.      I live in Russia.


I'm trying to use a table to show students data as the following :      public class Main5Activity extends AppCompatActivity {     DataBaseConnection db;     @Override     protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main5);     setContentView(R.layout.activity_main);      final TableLayout stk = findViewById(R.id.datatable);     TableRow tbrow0 = new TableRow(this);     TextView SNo = new TextView(this);     SNo.setText(" Student NO ");     SNo.setTextColor(Color.WHITE);     tbrow0.addView(SNo);     TextView StudentName = new TextView(this);     StudentName.setText(" Student Name ");     StudentName.setTextColor(Color.WHITE);     tbrow0.addView(StudentName);     TextView hmewrk = new TextView(this);     hmewrk.setText(" Homework mark ");     hmewrk.setTextColor(Color.WHITE);     TextView orlmrk = new TextView(this);     orlmrk.setText(" Oral Mark ");     orlmrk.setTextColor(Color.WHITE);     TextView ttlwrkmrk = new TextView(this);     ttlwrkmrk.setText(" Total Works Mark");     ttlwrkmrk.setTextColor(Color.WHITE);     TextView orlexm = new TextView(this);     orlexm.setText(" Oral Exam");     orlexm.setTextColor(Color.WHITE);     TextView exm = new TextView(this);     exm.setText(" Exam ");     exm.setTextColor(Color.WHITE);     TextView exmttl = new TextView(this);     exmttl.setText(" Exam total");     exmttl.setTextColor(Color.WHITE);     TextView textView9 = new TextView(this);     textView9.setText(" Average");     textView9.setTextColor(Color.WHITE);     tbrow0.addView(hmewrk);     tbrow0.addView(orlexm);     stk.addView(tbrow0);     for (String i = db.stdntnmbr();; ) {   When calling the students number value from the database to create rows as the same value, it gives me the following error: The code is :  public class DataBaseConnection {  private final DataBase dataBase;  DataBaseConnection(Context context) {     dataBase = new DataBase(context); } public String stdntnmbr(){     SQLiteDatabase sqLiteDatabase = dataBase.getWritableDatabase();     String uid = DataBase.UID;     Cursor cursor = sqLiteDatabase.query(DataBase.tablename1 , null, uid, null     , null , null , null , null);     StringBuilder stringBuilder = new StringBuilder();     while (cursor.moveToNext()) {         int studentnmbr = cursor.getInt(1);         stringBuilder.append(studentnmbr + " " +"+/n");     }     return String.valueOf(stringBuilder);      the database type is SQLite and I'm using SQLiteOpenHelper. Any help would be greatly appreciated.

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?


You play a game using a standard six-sided die. You start with 0 points. Before every roll, you decide whether you want to continue the game or end it and keep your points. After each roll, if you rolled 6, then you lose everything and the game ends. Otherwise, add the score from the die to your total points and continue/stop the game.   When should one stop playing this game?   Let $X$ represents the number that comes up on the die.  Therefore the game continues until $X<6$,  So, $P(X=6)=nCr  p^r q^{n-r}$ where $r=1$  $$ \dfrac{1}{6}=nC_1 \times \dfrac{1}{6} \times \biggr (\dfrac{5}{6}\biggr )^{n-1}$$  $$1=n \times \biggr(\dfrac{5}{6}\biggr)^{n-1}$$  $$\boxed {n = 1}$$  Am I wrong?

You play a game using a standard six-sided die. You start with 0 points. Before every roll, you decide whether you want to continue the game or end it and keep your points. After each roll, if you rolled 6, then you lose everything and the game ends. Otherwise, add the score from the die to your total points and continue/stop the game.  When should one stop playing this game? Obviously, one wants to maximize total score.  As I was asked to show my preliminary results on this one, here they are:  If we simplify the game to getting 0 on 6 and 3 otherwise, we get the following:   $$\begin{align} EV &= \frac{5}{6}3+\frac{25}{36}6+\frac{125}{216}9+\ldots\\[5pt] &= \sum_{n=1}^{\infty}\left(\frac{5}{6}\right)^n3n \end{align}$$   which is divergent, so it would make sense to play forever, which makes this similar to the St. Petersburg paradox. Yet I can sense that I'm wrong somewhere!


The following code:  \documentclass{article} \usepackage[framed,numbered,autolinebreaks]{mcode} \usepackage{filecontents}  \begin{filecontents*}{example_function.m} % create a function for mass of spherical particle fxn_mass_from_density_radius = @(rho, x) 4/3 .* pi .* (x(:)^3) .* rho;  % density rho = 1000; % kg m^{-1}  % define radius r = 1e-6;       % m  % compute particle mass m = feval(fxn_mass_from_density_radius, rho_particle, r);   % kg \end{filecontents*}  \setlength{\parindent}{0pt}  \begin{document}  In the code below we define a function and two variables  \lstinputlisting[firstline=1,lastline=8]{example_function.m} \addvspace{5mm}  In the code below we evaluate the function  \lstinputlisting[firstline=10,lastline=11]{example_function.m} \addvspace{5mm}  \end{document}   results in the following output    Note that there are two framed boxes, one source code file.  Note also that the rendered line numbers both start at 1.  I think that the minimal bit of information that the author should have to provide is the start and end line numbers.  I'd like to avoid having to manually handle the offset.  I'm wondering if the listings package can accommodate this?

This is a follow-up question to . Consider the MWE:  \documentclass{article} %\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox \usepackage{filecontents,listings}% http://ctan.org/pkg/{filecontents,listings} \lstset{   numbers=left,   basicstyle=\ttfamily\footnotesize } \begin{filecontents*}{mycode.txt} Line 1 Line 2 Line 3 Line 4 Line 5 \end{filecontents*}  \makeatletter % https://tex.stackexchange.com/q/26828/5764 %\patchcmd{\lst@GLI@}% <command> %  {\def\lst@firstline{#1\relax}}% <search> %  {\def\lst@firstline{#1\relax}\def\lst@firstnumber{#1\relax}}% <replace> %  {\typeout{listings firstnumber=firstline}}% <success> %  {\typeout{listings firstnumber not set}}% <failure> \makeatother  \begin{document} \lstinputlisting[linerange={1-3}]{mycode.txt} \lstinputlisting[linerange={2-4}]{mycode.txt} \lstinputlisting[linerange={2-2,4-5}]{mycode.txt} \end{document}   Without the aid of the  patch (or the default), the output looks like that of the leftmost column. With the aid of the patch (a "firstnumber correction), the output looks like that of the middle side. However, I'd like the output to look like that of the rightmost column.    That is, the eventual output of line numbers should match that of the linerange specification.  The trivial solution I'm hoping to avoid is the inclusion of separate \lstinputlistings for each range with the appropriate vertical adjustment of -2\medskipamount (default space above/below an included listing). That was how the rightmost column was obtained in the first place.


I’ve been friends with the Murkets for twenty years.   This is a sentence from .  How can we explain this? I thought when the pronoun was "I" we must say a friend not friends. I understand the meaning, but what about structure?    I think there should be subject and complement agreement. Sorry I cannot say what I mean in a better way! I hope you understand what I mean.

The usage in the question title seems , though it may be more common in Britain.  But I can't exactly see what "part of speech" the word friends is here, and I can't come up with any related forms. You'd never hear, for example, John is enemies with Jack. What is going on?


Please let me know when it is right to use 'toward' and 'towards'. Are they interchangeable in their usage? Is either of them meant to be exclusively used in some scenarios? Is there some common rule governing other similar pairs:  afterward/afterwards onward/onwards inward/inwards outward/outwards

Are the words "toward" and "towards" synonymous?  If not, when should I use one over the other?  "Towards" usually sounds silly to my ear, but is that just me?


hey i was trying to to change the elements in the dictionary using the if statement in a for loop , when i include the properties dictionary in the first for loop , it seems to be working fine. otherwise i cant change the elements as i desired . what i was trying to do is , creating an empty list . then adding 30 dictionary items with same attributes. after the dictionary is created , i was trying to change the attributes of first 3 elements in the list using a if statement . then printing the first 6 elements in the list to check whether the change is applied or not properties1={'color':'silver','weight':45,'Height':5.5,'planet':'mars'} for alien in range(30):     aliens.append(properties1) for alien in aliens[0:3]:     if alien['color'] == 'silver':         alien['weight']=10         alien['Height']=2         print(alien) for alien in aliens[:6]:     print(alien)  output is {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'} {'color': 'silver', 'weight': 10, 'Height': 2, 'planet': 'mars'}

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?


From manpage pm-action(8):   /etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d       Programs in these directories (called hooks) are combined        and executed in C sort order before suspend and hibernate        with as argument ´suspend´ or ´hibernate´.       Afterwards they        are called in reverse order with argument ´resume´ and        ´thaw´ respectively.       If both directories contain a similar        named file, the one in /etc/pm/sleep.d will get preference.         It is possible to disable a hook in the distribution        directory by putting a non-executable file in        /etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST        configuration variable.   What is "C sort order"?  Does "a similar   named file" mean two files with the same filename?  I have two files /usr/lib/pm-utils/sleep.d/94cpufreq and /etc/pm/sleep.d/20_cpu_freq.  When resume and thaw, which one is run first and which second?  Thanks.

What does the C value for LC_ALL do in Unix-like systems?   I know that it forces the same locale for all aspects but what does C do?


Use appropriate quadrature formulae out of the trapezoidal and Simpson's rules to numerically integrate $\int_0^1\frac{dx}{1+x^2}$ with $h=0.2$. Hence obtain an approximate value of $\pi$. Justify the use of a particular quadrature formula.   Answer:  In this problem trapezoidal rule gave better solution than Simpson's 1/3 rule. How can I justify?

In case of numerical integration, is it true that higher degree of precision always gives better accuracy? Justify your answer.   I know the definition of degree of precision. For Trapezoidal and Simpson's 1/3 rule they are 1 and 3 respectively. Simpson's 1/3 gives better accuracy than Trapezoidal rule. Then whether the above statement is true always. If not, why? If yes, then why we learn Trapezoidal/ Simpson rule? Why we shall not establish/go for higher and higher DOP from generalized Newton-Cote's rule or other general quadrature formula .


I am curently developping a java/jee app in which i need to store files.I tried storing files as blob in the DB but i got a problem in size of files which must be configured in the application server so i am thinking about storing those files directly in the server disk.So i want to know what is better storing files as blob or directly in the disk.

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


Suppose $f(x)$ is a polynomial with integer coefficient. If there exist $a$, $b$, $c$, $d$ such that $f(a)=f(b)=f(c)=f(d)=5$ then there does not exist $k$ such that $f(k)=8$. Prove.  We consider $Q(x)= f(x)-5$. Then $Q(x)$ has 4 distinct roots. According to the problem given, $Q(k)=3$. Hence $(k-a)(k-b)(k-c)(k-d)r(k)=3$. Hence we can not find any contradiction!

There is a polynomial $f$ of integer coefficients such that $\deg(f) \geq 4$. Let's assume that there are four integers $a,b,c,d$ for which $f(a)=f(b)=f(c)=f(d)=5$. Prove that there is no integer $k$ for which $f(k)=8$ - I'd like to have a full explanation to solution.


Any hints on how I should go about this? Thanks.

That's a problem I proved (quite a while back) in tiny Rudin. However, I don't really get it. The other questions were actually useful results - I don't think I've ever come near using this result. Surely it's going to be close to apparent that you're working in an uncountable set?  For instance, examples where this result could be applied but it is hard otherwise to tell that the space is uncountable?


I have been admitted to a PhD program at a  US university in the department of physics. The  department ranking is 100 (according to the US News ranking). In the PhD program, most of the students in physics study the fundamental principle in order to be prepared for doctoral studies. It takes around three semesters.  The  department I have been admitted to, also has an MS course.   My intention is to  transfer my PhD credits to the MS in order to gather more research experiences (2 years study) and later apply to a better university. Is it possible to manage this with my graduate supervisor? How  positive is my case? And how do you think my supervisor would respond to this?

I've heard of people transferring between graduate schools because of their advisor moving to another school and taking their students with them.   Do students ever transfer for other reasons? If a student isn't happy at the school they choose, could transferring be an option? Presumably they would frame it as something positive such as "turns out I really want to work with Professor X" rather than "I hate my school", but does this ever happen? Is there a certain timeframe in which this is possible? (Assume it's a 5 year PhD program.)  If the answer varies by subject please mention the subject in your answer.  (Context: many friends have told me that if it turns out I'm not happy with my choice, I can always transfer. My impression is that this is actually difficult since many schools don't accept transfer students and in any case not being able to stick with a program looks bad -- but I don't have evidence either way so wanted to ask people who are in academia. Of course the ideal would be to pick a school one is happy with in the first place!)


I just installed Ubuntu 17.10, so when i try to install a package for example i want to install Brackets  sudo apt-get install brackets   it says  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package xdman

For some reason the gnome installer that handles .deb packages on my system is not working. I'm not concerned.  How would one install the Brackets.io program from the terminal?


If I have the following string:  < asd="testJava"><a href="/title/text/">BLA BLA <asddead>   How can I get only the string BLA BLA.  I tried split but it removes me all the chars, I need to remove only those from ">" to "<". Once I get the string, I'm gonna add it to an ArrayList with array.add(); Can someone help me with the code that removes the strings? Thank you!

Is there a good way to remove HTML from a Java string? A simple regex like replaceAll("\\<.*?>", "")   will work, but things like &amp; wont be converted correctly and non-HTML between the two angle brackets will be removed (i.e. the .*? in the regex will disappear).


User input might look like:   * symbol with 1 character limit (no other symbols than *)   or   A-E, a-e letters with 1 character limit   Following data is valid examples: *; a; A; e; D  I don't understand why ^[A-Ea-e]{1}\*?$ doesn't work?

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


If $f,g$ are continuous at $a$, show that $h(x)=\max(f(x),g(x))$ and $k(x)=\min(f(x),g(x)) \text{ are also continuous } \forall x\in X$.  Hello. I am aware this question has been asked before and I also know the solution. But since I did it another way, I wanted to make sure my reasoning is correct. I'll make my argument just for one part since it is analogous:  We know $f,g$ are continuous at $a$. Suppose $h(x)$ is not continuous at $a$. This would imply that either $f$ or $g$ are not continuous there, which is a contradiction.  Is this ok?

If $f,g$ are continuous at $a$, show that $h(x)=\max\{f(x),g(x)\}$ and $k(x)=\min\{f(x),g(x)\}$ are also continuous at $a$. Here is my attempt at a proof. It feels very elaborate and I am not sure if it is correct. Can someone please point out any mistakes or places where I may improve. Thanks!  By the definition of continuity at $a$ of $f,g$ we have that $\lim\limits_{x\to a}f(x)=f(a)$ and $\lim\limits_{x\to a}g(x)=g(a)$. Suppose that $f(a)>g(a)$. Then there exists a $\delta>0$ such that $f>g$ for all $x$ satisfying $|x-a|<\delta$. Then for $x$ satisfying $|x-a|<\delta$ we have $h(x)=f(x)$ and $k(x)=g(x)$ and thus $h$ and $k$ are continuous at $a$ because $f$ and $g$ are continuous at $a$. Now if $f(a)<g(a)$ we simply relabel $f=\tilde{g}$ and $g=\tilde{f}$, so that $\tilde{f}(a)>\tilde{g}(a)$ and we apply the previous result to show that again $h$ and $k$ are continuous at $a$.\  Now if $f(a)=g(a)$ then we can distinguish three cases. $f\geq g$ in a small neighborhood about $a$, $f\leq g$  in a small neighborhood about $a$ or $f\geq g$ on one side of $a$ and $f\leq g$ on the other side. In the first case we assume that $f\geq g$ in some small neighborhood about $a$. Then, since $f(a)=g(a)$ we have $h(x) = f(x)$ in this neighborhood and $k(x) = g(x)$ and again we see that $h$ and $k$ are continuous at $a$ due to the continuity of $f$ and $g$ at $a$. Similarly if $f\leq g$ in a neighborhood around $a$ then $h(x)=g(x)$ and $k(x)=f(x)$ in this neighborhood and $h$ and $k$ are continuous at $a$.   Suppose that just to the left of $a$ we have $f\geq g$ and just to the right of $a$ we have $f\leq g$. Then $\lim\limits_{x\to a^-}h(x)=\lim\limits_{x\to a^-}f(x)=f(a)=h(a)=g(a)=\lim\limits_{x\to a^+}g(x)=\lim\limits_{x\to a^+}h(x)$. Similarly $\lim\limits_{x\to a^-}k(x)=\lim\limits_{x\to a^-}g(x)=g(a)=k(a)=f(a)=\lim\limits_{x\to a^+}f(x)=\lim\limits_{x\to a^+}k(x)$. So $\lim\limits_{x\to a}h(x)=h(a)$ and $\lim\limits_{x\to a}k(x)=k(a)$ which means that $h$ and $k$ are continuous at $a$. Lastly if $f\leq g$ just to the left of $a$ and $f\geq g$ just to the right of $a$ we can relabel $f=\tilde{g}$ and $g=\tilde{f}$ and apply the last result to show $h$ and $k$ are continuous at $a$.   Again, please point out any mistakes I may have made. Thanks!!


I saw a question with this earlier but nobody seems to have it answered in a way that helps me.  I need to paste text into a Google Docs spreadsheet cell but it needs to have two new lines in it. Whenever I paste it in, it puts the two new lines in three different cells. If I paste it into the one cell by going into the mode to edit that cell, the cell just shows up blank, as it does when I press Command/Alt+Enter to create a new line. Having any more than one line of text in a Google docs spreadsheet seems to be making a cell show up blank.  How do I fix this and get multiple lines?

I pressed return to make a new line in a cell of my Google Spreadsheet. That just moved the cursor to the next cell.   How does one add a new line in a cell?


Recently I've seen questions that are quite old (1-5 years) suddenly appear on DIY recent questions. I don't seem to be able to close them as "late answers" , maybe I don't yet have enough reputation points to do that, but that's not the issue. The issue why did this suddenly start happening

What can cause a question to be "bumped" to the first page in the Active tab of a Stack Exchange site? (Changing the "Last Active" date.)  .


Hello im getting this error message and its relating to this code in my node.tpl. Could anyone advise me on how i can clean it up a bit to suit. thanks?   <?php print render(field_view_field('node', $node, 'body', array (  'label'=>'hidden',   'type' => 'text_summary_or_trimmed',   'settings'=>array('trim_length' => 150),   )));     ?>

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?


In drupal 7 statistics configuration page, there is all option are available for module, like as shown in following image.  D7,        While in case of drupal 8 statistics configuration page there is only one option,  D8,        Where can I find that configuration setting? I did check,  page on drupal.org, but it is to be updated and not mentioning about drupal 8. Thanks

I dont know what to do to show "Enable access log" option.  I activated logging all messages and checked all statistics permissions.  Thanks.


As the title says, I want to be able to change environment variables in a parent process (specifically, a shell) from a child process (typically a script).  From pseudo terminal /dev/pts/id trying to export key=value from child script, so exported variables has to be passed somehow to parent, if possible? echoing cmd > /proc/$$/fd/0 doesn't execute cmd, only view command in shell terminal emulator, and of course using $(cmd) instead of cmd executes in subshell, and export doesn't add variables to parent process.  I prefer that all the work be done in the child side.  I was asked in comments, what am I trying to achieve? that is a general question, and I'm trying to use the positive answer to pass variables from a script executed (spawned) by a (parent) shell, so that the user can benefit from added variables without any further work.  For example, I would like to have a script install an application, and the application directory should be added in the parent shell path.

How might it be possible to alter some variable in the env of an already running process, for example through /proc/PID/environ? That "file" is read-only.  Need to change or unset the DISPLAY variable of a long-running batch job without killing it.


I've read on articles and books that the use of String s = new String("..."); should be avoided pretty much all the time.  I understand why that is, but is there any use for using the String(String) constructor whatsoever?  I don't think there is, and don't see any evidence otherwise, but I'm wondering if anyone in the SO commmunity knows of a use.

While looking at online code samples, I have sometimes come across an assignment of a String constant to a String object via the use of the new operator.  For example:  String s; ... s = new String("Hello World");   This, of course, compared to  s = "Hello World";   I'm not familiar with this syntax and have no idea what the purpose or effect would be.  Since String constants typically get stored in the constant pool and then in whatever representation the JVM has for dealing with String constants, would anything even be allocated on the heap?


I'm new to the world of Linux, so I apologise in advance if I say something that appears silly to you.  Over the years I have been frustrated by Microsoft operating systems, and the latest upgrade to Win 10 has disgusted me so much that, despite my age (75), I decided to try Linux.  I managed to get Ubuntu running on a trial basis from a USB stick, and I was delighted.  I then tried to install a dual-boot arrangement, but this failed, despite following the advice provided on various forums.  Eventually, I came across a post which suggested that it is too difficult/risky to do it.  I then decided to go the whole hog and install Ubuntu 16.04 in place of Win 10. luckily, I checked with Dell Support site (my PC is Dell XPS15 9530) to see what it had to say.  Among the comments it advised to check with Canonical that my PC is on their approved list.  Much to my dismay the Canonical list of suitable Dell PCs ends with XPS13 systems.  This leaves me in a tantalising quandary.  I know that Ubuntu works superbly (the trial version) but am worried that a full install attempt might leave me with an expensive 'brick'.  Any (comprehensible) advice would be much appreciated,

What hardware components work, and what doesn't work?


I understand the basics of Allomancy and Feruchemy, but I'm unsure of how exactly the powers support each other so well. Namely: where does the EXTRA investiture come from when Compounding? How is it provided? And why do you get so much extra investiture?  Note: the question  is focused on the mechanics - what do you have to do to "compound" your ability. While it notes that the end result is that the compounder winds up with more power than what they put into the system, it doesn't really address where that power comes from.

In The Alloy of Law, Miles Hundred-Lives is a double gold twinborn.  This means he can burn gold to see visions of his possible alternative past, (Allomancy) and tap/fill gold to retrieve/store health (Feruchemy).  Since he can burn the same metal he can tap/fill, he can use "Compounding" to gain massive amounts of health (thus making him heal almost instantly from anything)  How do the mechnics for doing this work?  My understanding is:   He wears gold (his gold-mind piecings etc),  and fills them with X minutes of healing  (ie the amound of healing as a he would normally do in X minutes - he could Tap it as fast as he wanted, and take as much time as he wanted to fill it (for a normal Feruchemist this would be >X minutes)) He removes his gold minds and aranges them into consumable form (cutting them down to size). He consumes them, and by Allomantically Burning them, gains additional healing equal to roughly 10*X. He does not see visions of his possible alternitive past. (Which means a filled gold mind can no longer be burnt normally by the person who did the filling, right?) He can use (some of) this extra health to repeat from step 1, and can easily fill the new minds with much more than X minutes of health, easily.   Have I got this right?


Let $X$ be a normed space and $Y$ be a finite dimensional subspace of $X$. Show that there is a projective $P\in B(X)$ such that $Im P=Y$. Hint: First Solve for $dimY=1$ then generalize the solution for any finite dimensioanl spaces. Here since $Y$is  finite dimensional subspace of a normed space so it is closed. However we are not given that $X$ is banach, so we cannot use any theorem about projective in banach spaces!. **The question stated in  is not quite the same, I think. Can someone, suggest a way to solve the question using the hint.

I am reading  that finite-dimensional subspaces of normed vector spaces have closed direct sum complements. This is the proof:      Let $\{e_1, ..., e_n\}$ be a basis for $\mathcal M$. Every $x \in   \mathcal M$ has then a unique representation $$x = \alpha_1(x)e_1 +...+  \alpha_n(x)e_n.$$ Each $\alpha_i$ is a continuous linear functional on    $\mathcal M$ (a linear map from  finite dimensional space is always    continuous) which extends to a member of $\mathcal X^*$,  by the    Hahn-Banach theorem ($\mathcal X^*$ is the dual of $\mathcal X$). Let    $\mathcal N$ be the intersection of the null spaces of these extensions. Then $\mathcal X = \mathcal M\oplus \mathcal N$.   I follow it until the last sentence. Clearly $\mathcal N$ is closed, as it is the intersection of closed sets (the inverse of $0$ under any continuous function, and in particular any linear functional on a vector space, is closed). Also it is easy to see that $\mathcal M \cap \mathcal N= \{0\}$, since if some $m\in\mathcal M$ is in every null space, it must have the zero coefficient for every basis vector, and so it must be zero.  My question: Why do we have $\mathcal X =\mathcal M + \mathcal N$? This seems to only hold if the extension given by Hahn-Banach is zero off of $\mathcal M$, but I see no reason why this should be the case.


Here is my code showing that "var B" is targeting a global variable:    function koo(){   console.log( this.B );  }   var sampleObj = {    B: 2,    koo: koo  };   var xyz = sampleObj.koo;    var B = "It's global";  xyz();

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


I have a C# method that is expected to return an object. I would prefer if this method does not throw any exceptions.   My question is, is it acceptable to let the method return null and therefore give the null check responsibility to the caller without further warning?  Should the called assume that the object may be null, simply because it is a reference type? (And the default value of reference types are null:   )  Please see my example below  // this method is expected to return an object public MyClass getObject() {   MyClass myObject = null;   // Another option would be to initialize to a new instance, calling the default constructor and not setting any properties    // MyClass myObject = new MyClass(); // no null check needed by the caller, but it is a pretty useless object     try   {     // just as an example       myObject = new MyClass();   }   catch (Exception e)   {     Console.WriteLine(e.Message);   }   return myObject; // will return null when and exception occured }  public class MyClass {   public int id { get; set; }   public string name { get; set; } }

I am using java language,I have a method that is supposed to return an object if it is found. If it is not found, should I:  return null throw an exception other  Which is the best practise or idiom?


Let's suppose that I have 3 files: ~/html/display.html, ~/data/text.txt, and ~/js/script.js. display.html has the following body:
text
      and text.txt contains the single line: text line I want to know how I can make a function loadTxt, with the signature loadTxt(path, id) in script.js that takes the contents of path's text file and replaces the innerHTML of the paragraph with the given id with said contents. I've tried using fetch and xhtml, but I'm having trouble navigating them. Please also let me know if my syntax is wrong in my HTML. I'm not super used to working with scripts and HTML yet.

I have a text file in the root of my web app  and I'd like to load it into a variable in javascript.. in groovy I would do this:  def fileContents = 'http://localhost/foo.txt'.toURL().text; println fileContents;   How can I get a similar result in javascript?


Just what the title says, I deleted a group message in Messages, but it's still showing the unread number from that thread (see screenshot) and I can't bring up the group message because I deleted it.  Short of having someone text in that group again to make it reappear, anyone know how I can fully delete the thread, or clear the unread number?

On my iMac running Mountain Lion, Messages is chronically showing that I have 2 unread messages in its Dock icon.  However there are no unread messages at all.  I've even gone through and clicked on every single conversation in my history, just to make sure there wasn't some long-forgotten message floating around that hadn't been read.  It's not causing any major problems, but it is annoying to constantly think I've got a new message when i don't.  Anyone know why this happens?


In S05E10, Arya is about to be punished for killing the wrong person - Meryn Trant. As punishment, Jaqen H'ghar poisons himself and dies. When Arya is wailing over his dead body, the Waif beside her removes her mask and reveals herself to be Jaqen.  I understand the symbolism of identity in the show, and how many of Arya's trainers were simply using the identity of Jaqen, when in truth they are all no one. But physically, how does there exist two masks of Jaqen? Is it possible for a copy of a face to be made?  Later, when Arya keeps peeling off the masks off the dead Jaqen, there is also a mask of Arya shown (right before she goes blind). How did this happen as well? There is no indication during Season 5 that Arya's face was being duplicated. Did it happen offscreen?   Is there a better explanation to this in the books?

In season five of Game of Thrones, when Arya becomes blind there is a very interesting detail most of us might have missed.   Let's not stretch the question:    Arya returns after assassinating Ser Meryn Trant Jaqen H'ghar "No one" comes in the scene, Waif is present as well Arya and Jaqen talks, he appears to be giving the poison to Arya but drinks it and dies. Arya cries, says he was her friend when Waif asked her something (I don't recall what) Waif removes her face, reveals she is actually Jaqen Arya removes face of Jaqen from the dead body, keeps removing it until her own face appears.   What sorcery is going on in here? How could they use a face of a person who is still alive. They remove the faces of a dead person for a reason? So that the face can be used by the Faceless-men.   Is there something I am missing or can the Faceless-men do these kinds of magic as well?


I've come from 3x Zoom magnification land and am having a hard time adapting to all these complex "mm" systems. I'm thinking about buying some lenses to enhance the range of zoom of my Sony A5000 camera.  I am already aware of the fact that you get Max magnification (times zoom) from dividing the big number by the little number. (55-210mm = 3.8181818xzoom). I'm aware that in essence, this isn't magnification from an unzoomed (1x) perspective, but is instead, just how many x's from the "unzoomed" lens position that lens can increase it.  From this I can see:   a 55-210mm lens has 3.8x zoom a 650-1300 lens has 2x zoom.   The trouble is, from looking at those lenses on Amazon, I can't help but convince myself that the 650-1300 lens, from its shape, is made for zooming in on objects a lot farther away. Therefore, on top of the "adjustable zoom" difference above, there must be a "base zoom x" which is how much the x zoom already is, when the lens is unzoomed.   How do you work that out, so that you know how far in a lens will go with your camera? I'm assuming of course, that there is a way, and people don't just buy lenses without any idea of how far in it will zoom.  Please try to avoid jargon; I don't really understand big terms, but there must be a simple way of working all this out.  I don't think this is a duplicate of that other question, because that one only showed what i explained above - the "adjustable zoom range". I need a way to work it all out, not just the zoom range of a camera.

What is the rule to convert the 'mm' notation to the 'optical zoom' notation? I searched a bit and found this one:  optical zoom = maximum focal length / minimum focal length   For example a 18-55mm lens would have a 3x optical zoom, and a 18-200mm lens would have a 11x optical zoom. Is that right?


When making long documents under book class if one needs 10 or more chapters, something weird happens with the table of contents: the space between the number of the chapter and its title disappears, just like it was trying to preserve a beautiful alignment on the left but leading to an incorrect output.    Here's a MWE:   \documentclass[spanish, 12pt]{book}  \usepackage[spanish]{babel} \usepackage[utf8]{inputenc}  \begin{document}  \tableofcontents  \chapter{A} \newpage \chapter{B} \newpage \chapter{C} \newpage \chapter{D} \newpage \chapter{E} \newpage \chapter{F} \newpage \chapter{G} \newpage \chapter{H} \newpage \chapter{I} \newpage \chapter{J} \newpage \chapter{K} \end{document}   To be honest, I have no idea how to fix this. I hope you guys do.

How can I learn the horizontal distance between the chapter number and the chapter title both in ToC  and the body text where I use \documentclass[12pt,reqno]{book}. Which keys hold these values?