I am trying to limit user access to data through a view. I have a database full of replicated data that I do not want the users to be able to access, I also have a reporting database in which I will create views on the replicated data that the users can access.  e.g. In database ReplData, I have a table refData(value int, source char(1)) with data values : 1, A 2, A 3, B 4, B  I want to use a view in a different database to limit users to just those rows with source = 'A'  So, in database Reporting, I have a view  use Reporting  go  create schema SourceA go  create view SourceA.refData  as    select * from ReplData.dbo.refData     where source = 'A' go  create user Steve for login Steve go  grant select on SourceA.refData to [Steve] go   However, when user 'Steve' connects to Reporting and tries to select from the view, he gets an error  Msg 916, Level 14, State 1 The server principal 'Steve' is not able to access the database 'ReplData' under the current security context   What have I missed?  [edit] The problem is not a select permission, it is a security context. If you can identify what I have missed, please do. I have turned cross database chaining on (see comments) but it has not resolved my issue.  [edit 2] So the issue was the method I was using to test the view, which was to 'execute as user'. When I set up a new user and connected to SSMS using those credentials, then the view worked fine.

SQL Server 2008 R2 SP1  My company uses the Great Plains (GP) financial system with several customizations.  Our Value-Added-Reseller (VAR) for GP has setup most of these customizations in a separate database from the GP data called DYNCUSTOM.  In the DYNCUSTOM database is a View that is merely a SELECT * FROM a table in the GP company database (called PARTS).  I was approached by a user having problems trying to select on this view.  The error he was getting:  Msg 229, Level 14, State 5, Line 2 SELECT permission denied on object 'BM010415', database 'PARTS', schema 'dbo'   I looked at how his login was mapped and he had a database user in the DYNCUSTOM database belonging to a database role that was granted select on the view.  However, he did not have a database user in the PARTS database.    Usually the intent of a view is so that one can grant select permissions on the view without exposing access to the underlying table.  With SQL Server however, if the view crosses databases does it then change the security context being used?  Therefore, the user would also need a database user in the PARTS database as well as granted select access to the underlying table?


I found an interesting thing of using "is" to judge whether two variable are same. Here are my code and results:  a = 256 b = 256 c = 257 d = 257 print(a is b) print(c is d)   and the results show:  True False   Actually, when the number is bigger than 256, it turns 'False'.  Another example:  a = 'a' * 20 b = 'a' * 20 c = 'a' * 21 d = 'a' * 21 print(a is b) print(c is d)   Results:  True False   Similarly, when n in "'a' * n" is bigger than 20, it turns 'False'.  But when I put this into a function, it doesn't matter how big is the number:  def is_test(a):     x = a     y = a     print(x is y)  is_test(257) is_test('a' * 21)   the results are always 'True'  I ran the code on Jupyter Notebook. Anyone can explain this to me? Thanks

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


The 1% is doing it.  The 1% are doing it.  Which of the sentences is/are correct?

Does a percentage require a singular or plural verb, for example, do we say ten percent "go" or "goes"?


I understand why we add or subtract from $f(x)$ to move the graph vertically. To move it up, we move all the values up by adding whatever constant value we want.  However, when it comes to horizontal shifting, we do the opposite, why is it so? Obviously I can understand how to do so (by plotting the values or using a graphing calculator, simple!). But what is the logic behind it. What if I forget how to use the other two methods and have to literally shift instead of plotting individual values of $(x, f(x))$?

I always find myself wanting for a clear explanation (to a college algebra student) for the fact that horizontal transformations of graphs work in the opposite way that one might expect.  For example, $f(x+1)$ is a horizontal shift to the left (a shift toward the negative side of the $x$-axis), whereas a cursory glance would cause one to suspect that adding a positive amount should shift in the positive direction. Similarly, $f(2x)$ causes the graph to shrink horizontally, not expand.  I generally explain this by saying $x$ is getting a "head start". For example, suppose $f(x)$ has a root at $x = 5$. The graph of $f(x+1)$ is getting a unit for free, and so we only need $x = 4$ to get the same output before as before (i.e. a root). Thus, the root that used to be at $x=5$ is now at $x=4$, which is a shift to the left.  My explanation seems to help some students and mystify others. I was hoping someone else in the community had an enlightening way to explain these phenomena. Again, I emphasize that the purpose is to strengthen the student's intuition; a rigorous algebraic approach is not what I'm looking for.


By accident I came across this simple math equation which PowerShell gets wrong.   PS 99.804-99.258 0.546000000000006  PS 10.804-10.258 0.546000000000001   This made me curious and I tried some different calculators and most Calculator gets it right and return  0.546   And:  PS 1.804-1.258 0.546   is correct too. But I found other calculators that also returned wrong results:  0.54600000000001 0.545999999999999999 0.5460000000000065   Why does this happen and how can I get the correct result in PowerShell?

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


This is not my real code I have just simulated in order to understand what to do next.  I have class Person with properties age, height weight. Now In my class Group  I create two four objects   Person programmer, student, clerk, tech;   I have HashMap rollCall  Map<Person, Integer> rollCall = new HashMap<Person, Integer>();   to add all these using Person and number of Persons as type Integer  rollCall.put(programmer, 1); rollCall.put(clerk, 2); rollCall.put(student, 1); rollCall.put(tech, 3);   I have seen alot of people sorting HashMap using TreeMap on value I want to sort on a property of Person rather on value. I want to sort all these people on their age (i.e. programmer.getAge();). I am not sure if I will use comprator which works only on collection not map.  . Please help ... .

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


I have a python 2.6 program used in windows (py2exe), I need to make sure it will there will be only one running checking the docs for python2.6 it says Mutex Is gone? What should I do to make sure it runs only one instance of the program? Thanks a lot!

Is there a Pythonic way to have only one instance of a program running?   The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?    (Take into consideration that program is expected to fail sometimes, i.e. segfault - so things like "lock file" won't work)


In the following sentence:     Lewis and Clark's expectations were very much the same.   Would you agree that it should be:     Lewis's and Clark's expectations were very much the same.   Because even though they were similar, they were not the same, therefore they are different and the apostrophe should be use in both pronouns to show difference.  Any opinion is welcomed.

Which option is grammatical?        There will be readings from Nikki Giovanni’s and Alice Walker’s writings.   There will be readings from Nikki Giovanni and Alice Walker's writings.      Saying it out loud the latter sounds right, but looking at it the former looks better.


What is the equivalent of the Redhat command rpm -e in Ubuntu? I know it's probably dpkg something because the equivalent of rpm -qa is dpkg -l, but I can't tell what the equivalent command of rpm -e is in Ubuntu. However, I think it's dpkg -r aka --remove <package-name> or --remove-architecture, but I'm not sure.  This is different from the question about how to remove an application in Ubuntu because I want know the most exact equivalent in terms of actions performed of the rpm -e command and not just generally how to remove an application, even if apt or apt-get remove packagename is the recommended or preferred way and not dpkg -r packagename or dpkg --remove packagename.

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


I have a problem with the Action Actuator and animations in BGE. I would like to play an animation.  It works only when I use the "Always" and "Delay" sensors but I need the "Radar" and the "Near" sensors.  But if I use the Near sensor no animation is playing. Here is a picture of my Logic Bricks:

None of the physics sensors in my game work, I'm trying to create an AI man that chases after a player, but for whatever reason, he just won't sense the player, I've tried copying and pasting the property name just to be sure, but that's not it.


I want to show SPModal Dialog which contains a new item creation form to the user on the page intranet home page if user is not create or submit any items in that list.  I tried but I am getting error when I am passing current user item in query.  Please suggest me ways to do that  <script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(init,'sp.js'); var context; var web; var user; var siteUrl = _spPageContextInfo.siteServerRelativeUrl ; //var userId= _spPageContextInfo.userId; var userId= 123; var flag=true; //var options = { title: "Announcements - New Item",url:"../Lists/Announcements/NewForm.aspx"}; var options = { title: "Announcements - New Item",url:"http://webtest:3333/Lists/test/NewForm.aspx"};  function init() { context = SP.ClientContext.get_current(); web = context.get_web(); //alert(flag); getCurrentUser(); retrieveListItems();  }  function getCurrentUser() { user = web.get_currentUser(); context.load(user); context.executeQueryAsync(onGetUserNameSucces, onGetUserNameFail); } function onGetUserNameSucces() { // TODO: implement your own succes handler     //alert(user.get_title()); } function onGetUserNameFail(sender, args) { // TODO: implement your own fail handler and do some logging }  function retrieveListItems() {       var oList = context.get_web().get_lists().getByTitle("test");      var camlQuery = new SP.CamlQuery();       //context.load(user);      //alert(userId);  camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'Author\' /><Value Type=\'User\'>'+ user.get_title() +'</Value></Eq></Where></Query></View>');     this.collListItem = oList.getItems(camlQuery);      context.load(collListItem);     context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),Function.createDelegate(this, this.onQueryFailed));   }  function onQuerySucceeded(sender, args) {            //alert( _spPageContextInfo.userId);      var listItemInfo = '';     var listItemEnumerator = collListItem.getEnumerator();       while (listItemEnumerator.moveNext()) {         var oListItem = listItemEnumerator.get_current();         listItemInfo += '\nID: ' + oListItem.get_id() +              '\nTitle: ' + oListItem.get_item('Title');     }     alert(listItemInfo.toString());     if(listItemInfo==null){ //      flag='false';       SP.UI.ModalDialog.showModalDialog(options);            }      //alert(flag);        }  function onQueryFailed(sender, args) {     alert('Error: ' + args.get_message() + '\n' + args.get_stackTrace()); } </script>   I cant get List Items over here

I want to create one SP dialogue box at home page which load the new item form of list or survey if current login user is not created any item previously.  Is there any way to do that ?  I tried using query but it takes time to load data.  My Code is as below :  <script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(init,'sp.js'); var context; var web; var user; var siteUrl = _spPageContextInfo.siteServerRelativeUrl ; //var userId= _spPageContextInfo.userId; var userId= 123; var flag=true; //var options = { title: "Announcements - New Item",url:"../Lists/Announcements/NewForm.aspx"}; var options = { title: "Announcements - New Item",url:"http://webtest:3333/Lists/test/NewForm.aspx"};  function init() { context = SP.ClientContext.get_current(); web = context.get_web(); //alert(flag); getCurrentUser(); retrieveListItems();  }  function getCurrentUser() { user = web.get_currentUser(); context.load(user); context.executeQueryAsync(onGetUserNameSucces, onGetUserNameFail); } function onGetUserNameSucces() { // TODO: implement your own succes handler     //alert(user.get_title()); } function onGetUserNameFail(sender, args) { // TODO: implement your own fail handler and do some logging }  function retrieveListItems() {       var oList = context.get_web().get_lists().getByTitle("test");      var camlQuery = new SP.CamlQuery();       //context.load(user);      //alert(userId);  camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'Author\' /><Value Type=\'User\'>'+ user.get_title() +'</Value></Eq></Where></Query></View>');     this.collListItem = oList.getItems(camlQuery);      context.load(collListItem);     context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),Function.createDelegate(this, this.onQueryFailed));   }  function onQuerySucceeded(sender, args) {            //alert( _spPageContextInfo.userId);      var listItemInfo = '';     var listItemEnumerator = collListItem.getEnumerator();       while (listItemEnumerator.moveNext()) {         var oListItem = listItemEnumerator.get_current();         listItemInfo += '\nID: ' + oListItem.get_id() +              '\nTitle: ' + oListItem.get_item('Title');     }     alert(listItemInfo.toString());     if(listItemInfo==null){ //      flag='false';       SP.UI.ModalDialog.showModalDialog(options);            }      //alert(flag);        }  function onQueryFailed(sender, args) {     alert('Error: ' + args.get_message() + '\n' + args.get_stackTrace()); } </script>   I cant get result in the data


Is that just me, or is the achievements counter going totally bonkers?  It shows me a single -2 from SO, and totally ignores votes coming in for MSE?  (somehow doesn't come as surprise, and I kinda feel that this complete recount will result in plenty other glitches here or there)

So just a little while ago i was flipping out because i was 2 rep away from my 10k rep goal    but then all of a sudden it was then 10,008 rep because someone upvoted me. however i didn't get any notification about this +10  [    now as you can see in the screenshots above, over the past 2 days i got 2 upvotes to a question i posted, however the notifications only shows 1 +10 notification. and they system knows i got the upvote because i knew that i now have access to mod tools.  I am on a Windows 10 Laptop using Chrome 78.0.3904.97 (Official Build) (64-bit)


I'm using Ubuntu 19.04 and since last Friday I am trying to install GNU Image Manipulation Program. After several attempts, it now shows the error message below (also see the screenshot):     Unable to install "GNU Image Manipulation Program":   snap "gimp" has "install-snap" change in progress     What can I do to overcome this issue?

I just finished the installation of the Ubuntu 18.04, but whenever I try to install any application from Ubuntu Software the same error occurs (for example "vlc"):     unable to install "vlc": snap "vlc" has "install-snap" change in progress   I hope somebody can tell me what I've done wrong.


Let $I, J$ be ideals of a ring $R$. Show that $I + J = \{a + b\vert a \in I, b \in J\}$ is an ideal of R.    Because $I,J$ are ideals of $R$, so $I,J$ both have $0$, thus $0+0=0\in I+J$. This shows that $I+J$ is not empty and the additive idendity.   Suppose $a_1+b_1$ and $a_2+b_2$ are in $I+J$ where $a_1,a_2\in I$, $b_1,b_2\in J$. Then $(a_1+b_1)+(a_2+b_2)=(a_1+a_2)+(b_1+b_2)$ where $a_1+a_2\in I$ and $b_1+b_2\in J$ since $I,J$ are ideals of $R$. Thus $(a_1+b_1)+(a_2+b_2)\in I+J$, so $I+J$ is closed under addition that tells $I+J$ is additive subgroup of $R$.   Since $I,J $are additive subgroups of $R$, let $a\in I$ and $b\in J$, then $\exists -a\in I$ an $\exists -b\in J$ such that $(a+b)+(-a-b)=(a-a)+(b-b)=0\in I+J$ ; therefore, $I+J$ is a additive subgroup of $R$.  Let $a+b\in I+J$ where $a\in I, b\in J$ and $r\in R$. Since $I,J$ are ideals, so $ar,ra$ are in $I$ and $br,rb$ are in $J$, thus $r(a+b)=ra+rb\in I+J$ and $(a+b)r=ar+br\in I+J$. Therefore, $I+J$ is an ideal of $R$.    Does my proof valid? If valid, is there any way to write a better proof? If not, can you tell me what I miss? Thanks

If A and B are ideals of a ring, show that A + B = $\{a+b|a \in A, b \in B\}$ is an ideal  I have the ideal test but no clue as to what to do with it:   $a-b \in A$ whenever $a,b \in A$ $ra$ and $ar$ are in A whenever $a \in A$ and $r \in R$


What is the difference between:     command > file-name 2>&1   and     command 2>&1 > file-name   Why does for e.g (asumming there is no xxx file).     ls xxx > 1.txt 2>&1   works while     ls xxx 2>&1 > 1.txt   doesn't?

What is the difference between redirection ./prog 2>&1 1>file.txt and ./prog >a.txt 2>&1? It looks that ./prog 2>&1 1>file.txt doesn't save stderr to file but this ./prog >a.txt 2>&1 does.


I'm having trouble deriving the kinetic energy from the Lagrange equations.  For reference, I'm following Landau and Lifshitz book, "Mechanics," which can be found for free at .  In any case, I'm comfortable with the principle of minimal action, which leads to the Lagrange equations:  $$ L^\prime_{q}(q,\dot{q},t)-\frac{d}{dt} L^\prime_{\dot{q}}(q,\dot{q},t)=0 $$  Simply, they are the first-order optimality conditions to the optimization problem $\min\limits_q \int\limits_a^b L(q,\dot{q},t) dt$.  Next, by assuming time and space are homogenous, I can see how $L$ must be independent of both $t$ and $q$ and only be a function of $\dot{q}$.  This leads to  $$ \frac{d}{dt} L^\prime_{\dot{q}}(q,\dot{q},t)=0. $$  Finally, by assuming space is isotropic, I can see how $L$ can not be a function of the direction of $\dot{q}$.  This is all covered on page 5 of Landau and Lifshitz book that I referred to above.  However, after this, they argue that $L$ must therefore be a function of $\dot{q}^2$.  This is where I'm confused and have the following questions:   Why does isotropy imply that L must be a function of $\dot{q}^2$? Why doesn't isotropy instead imply that $L$ must be a function of a scalar quantity of $\dot{q}$?  A quantity like $\cos(\dot{q}^2)$ doesn't depend on direction either. If isotropy does indeed imply that $L$ is a function of the magnitude of $\dot{q}$, then why do we use, essentially, $\|\dot{q}\|^2$?  Isn't the actual magnitude of $\dot{q}$ the quantity $\|\dot{q}\|=\sqrt{\dot{q}^2}$?   Anyway, the rest of the derivation of kinetic energy sits on page 7 of the above book.  Their discussion really lies on the idea that $L$ must be a function of $\dot{q}^2$, which is what I'm trying to clarify above.    Edit 1  Alright, so it looks like this question has been asked in  , so before it closed out it'd help me if I could clarify some points in those answers that apply to here.  Yes, the short answer is that the Lagrangian needs to be invariant to the Galilean transform.  From what I can see, the Lagrangian is invariant to scalar multiplication and functions of the form $\frac{d}{dt} f(q,t)$.  This last one is due to  $$ \arg\min\limits_q \int\limits_a^b L(q,\dot{q},t) + \frac{d}{dt} f(q,t)dt $$ $$ =\arg\min\limits_q \int\limits_a^b L(q,\dot{q},t)dt+f(q^{(b)},t_b)-f(q^{(a)},t_a) $$ $$ =\arg\min\limits_q \int\limits_a^b L(q,\dot{q},t) dt $$  since constants don't change the location of the minima.  This is discussed around equation (2.8) in Landau.  Anyway, if the Lagrangian is a scalar function in terms of $\dot{q}$, then we have that $L(q,\dot{q},t)=\phi(\dot{q})$ for some $\phi:\mathbb{R}^3\rightarrow\mathbb{R}$.  Further, Galilean invariance states that the Lagrangian should be invariant to transformation $\hat{q} = q + Vt$ or $\dot{\hat{q}} = \dot{q} + V$.  Combining all of this, we have that  $$ \phi(\dot{\hat{q}}) = \phi(\dot{q}+V) = \phi(\dot{q}) + \phi^\prime(\dot{q})V + o(\|V\|) $$ Hence, we need that $\phi^\prime(\dot{q})V = \frac{d}{dt} f(q,t)$ for some $\phi$ and some $f$ in order for the Lagrangian to be invariant to the Galilean transformation.  Certainly, $\phi(\dot{q})=\dot{q}^2$ and $f(q,t) = 2\langle q,V\rangle$ does this. How do we guarantee that this is the only solution?

In chapter 1, of Landau-Lifshitz Mechanics' book, Landau through isotropy and homogeneity of space and homogeneity of time proves that the Lagrangian must depend of magnitude of velocity of the particle.  This seemed fine. But he didn't give a reason as to why it must depend of $|v|^2$ and not on some $|v|^n$ where $n\neq2$.


This is an external WD 1TB drive. It is attached to a Dell Optiplex 745 running windows xp, sp 3 with only 4 GB of RAM. is there anyway to stop chkdsk on this drive without hurting the file structure or the drive itself? I really did not even mean to run chkdsk within windows on this drive!  It is in phase 4 of chkdsk and after 2 hrs. only shows one green bar of completion. This drive is for storage only.....it runs no operating system.

I know that it is not a good idea to forcibly stop a chkdsk process that has been executed with parameters like /f and /r.   But is it safe to stop the process when it has been started simply by the chkdskcommand? Chkdsk prints out a lot of errors and is continuing very slowly.  I suppose it to should be safe to cancel the process since there should be only in read mode, correct?


I have installed Ubuntu 16.04 in my Lenovo Thinkpad laptop. I was trying to have dual boot by installing Windows 10 along with the existing Ubuntu. Since I had to reinstall GRUB2, I downloaded boot-repair which finished the reinstallation with an error.     Now system is not booting at all. It is getting stuck at boot menu. GRUB is not showing up.  I tried reinstalling Ubuntu and Windows. Now there is only Ubuntu in the system. Same issue. The system is not booting to Ubuntu.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


function tailrecsum(x, running_total=0) {     if (x===0) {         return running_total;     } else {         return tailrecsum(x-1, running_total+x);     } }   In this example, we see that the result will yield:  tailrecsum(5, 0) tailrecsum(4, 5) tailrecsum(3, 9) tailrecsum(2, 12) tailrecsum(1, 14) tailrecsum(0, 15) 15   In such a case, isn't there a new stack every time tailrecsum is called? And isn't tailrecsum(5, 0) waiting for the next tailrecsum to finish, hence not closing that stack yet?

Whilst starting to learn lisp, I've come across the term tail-recursive. What does it mean exactly?


I have a string with a number at the end, separated from the rest of the string by a space, e.g. two examples:  blah 45 blah 89  1. blah blah  blah blah  42   How can I use regex in Python to separate the string into the last number and the rest of the string? Thanks!

If I have this string:     2+24*48/32   what is the most efficient approach for creating this list:     ['2', '+', '24', '*', '48', '/', '32']


Today I have downloaded Metasploit-latest-linux-installer.run. I have clicked the icon to install only to be greeted with the error message:  Could not display "/home/daniel/Downloads/metasploit-latest-linux-installer.run". There is no application installed for executable files. Do you want to search for an application to open this file?  Upon clicking yes the results of the search only show one application. This application is called "Pypar2". (a graphical interface for the Par2 utility)  I hesitantly click install only to be told further python support is required and i click install for that also. Window pops up ......Installing packages....done  Pypar2 also installs and I open.  This doesn't seem right this seems to be a program to verify the contents? I don't know what i am doing wrong this is on my second day using ubuntu

My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too?  I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu?


The .bash_profile for user john is not taking effect when I (as root) use the su john command to login as john. I have to use source ~/.bash_profile command every time I login as john using the su john command. How can I automate this? Thanks

I have a user, say user1, which has modifications to its .bash_profile, one of them changing the PATH, e.g.: export PATH=/some/place:$PATH. This change works fine if I log on as user1 or do a su - user1.  But if I try to run a command via su as root, e.g.:  su -c test.sh oracle   (test contains echo $PATH)  It doesn't seem to have the modified PATH (or root's PATH, for that matter). I've also tried copying .bash_profile to .profile, to no avail.   Why is this happening?


How can I display a string like ]]> in XML ? I tried using normal XML and CDATA, but in XML it doesn't show anything while in CDATA it gives an error.

I was wondering if there is any way to escape a CDATA end token (]]>) within a CDATA section in an xml document. Or, more generally, if there is some escape sequence for using within a CDATA (but if it exists, I guess it'd probably only make sense to escape begin or end tokens, anyway).   Basically, can you have a begin or end token embedded in a CDATA and tell the parser not to interpret it but to treat it as just another character sequence.  Probably, you should just refactor your xml structure or your code if you find yourself trying to do that, but even though I've been working with xml on a daily basis for the last 3 years or so and I have never had this problem, I was wondering if it was possible. Just out of curiosity.  Edit:  Other than using html encoding...


I am looking to make a kosher bechamel made from almond milk. What kind of fat should I use in the roux? Margarine? Regular veggie oil?

Jewish Law prohibits the  However, butter, a milk product, is a kitchen staple for most cooked emulsions (eg. pan-sauces, sauces béchamels, or roux-based sauces). While I use appropriate cooking fats for making non-dairy versions for meat dishes, this frequently doesn't work.  What is a non-dairy fat which may be used to as an emulsifier or roux ingredient?


i am unable to resolve an error  from pandas import DataFrame ImportError: cannot import name 'DataFrame' from 'pandas' (E:\Python37-32\lib\site-packages\pandas__init__.py)  i even tried uninstalling and then reinstalling pandas

I am trying to install pandas on Ubuntu 14.04. I seem to have a problem with dependencies, but I haven't been able to install them. I am trying to install pandas via pip as follows:  vroni@zargedu4:~$ pip install pandas   And this is the error message:  SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.   If I try to install python-dev this happens:  vroni@zargedu4:~$ sudo apt-get install python-dev python-dev :Depends: libpython-dev (= 2.7.5-5ubuntu3) but it is not installable             Depends: python2.7-dev (>= 2.7.5-1~) but it is not installable   It basically misses these dependencies. Trying to install them only leads me to new messages like this.   vroni@zargedu4:~$ sudo apt-get install libpython-dev libpython-dev : Depends: libpython2.7-dev (>= 2.7.5-1~) but it is not installable   and so on.  vroni@zargedu4:~$ sudo apt-get install libpython2.7-dev libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.6-8) but 2.7.6-8ubuntu0.2 should be installed                 Depends: libpython2.7 (= 2.7.6-8) but 2.7.6-8ubuntu0.2 should be installed                 Depends: libexpat1-dev but it is not installable   until I try..  vroni@zargedu4:~$ sudo apt-get install libpython2.7-stdlib=2.7.6-8ubuntu0.2   Then the answer is: it is already the newest version.  libpython2.7-stdlib is already the newest version.   I don't quite understand what's the problem here. I also tried:   sudo apt-get update sudo apt-get upgrade sudo apt-get install -f   and   sudo apt-get -f install   and afterwards tried to install pandas again. but nothing seems to work.


Only for front page I want separate css body class. If a apply in html.tpl.php then it is applicable on each page. How can I apply condition for front page?

I'm cleaning up my big crazy style sheets (possibly pertinent to a future question) and I'm wondering the best way to add custom CSS to a specific node or page. In particular, my work site's home page is a Panel Page and it has a bunch of different styling. Right now the CSS is just included with the main theme style sheet. Is there a way to say, "if this is node Foo, then add foo.css"? Is  what I'm looking for? I might be interested in generalizing this to other nodes/sections/etc, but at the moment I just want to handle this one item.


How can I define a global variable.  For example I have Foo1 class and Foo2 class and I want to use FooVariable in this classes as a global variable.

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


I'm a beginning QGIS user and have a shapefile with polygons of all the county borders in Holland.  When I style this shapefile with a non-fill and a dashed line, all the adjacent (overlapping) lines are almost solid instead of dashed. This is because adjacent county borders are duplicates.  How do you get rid of those lines? tried to set the polygon shapes to lines and tried several geometry tools. Is this even possible? Or do you have to remove, clip all the double lines by hand?

I have adjacent polygons that I want to be marked out with dashed or dotted lines. This sometimes works but there appears to be a problem where the pattern isn't always synchronised on the shared boundaries which leads to odd patterns or solid lines. Is there a simple way round this?  Using GQIS 2.10.1 Pisa


I heard of this "hard" science fiction short story via word of mouth. Spoiler alert: my final sentences here will likely expose an evocative twist ending. My guess is that this story was written in the 1950's, possibly mid- to late-1950's. It takes place entirely on Earth. An astronaut who has not flown in space is inside a simulator or part of an experiment. The simulated mission is a multi-day trip from Earth to the vicinity of the Moon. The man in the fake-yet-realistic spacecraft can see the Moon slowly approaching. The image of the Moon may be a closed-circuit television image (large TV screen or projector) or the man is seeing, through a window, a large, fake-yet-realistic Moon globe. (Either way, the subject is actually looking at a fake Moon globe.) The near side of the Moon keeps getting bigger. Eventually the simulator gives the subject a glimpse of the far side of the Moon. Presumably, he is about to enter lunar orbit or swing around the far side of the Moon. The man then sees, for the first time, that the Moon is fake, and the large fake simulated Moon is not a complete sphere. The subject sees a makeshift structure (scaffolding) behind the realistic near side. He goes mad. Ending: the man keeps repeating the same few words: his description of the inelegant structure he sees "behind" the near side of the Moon. (It could be that during the simulation or experiment he actually believed he was in cislunar space, and his end-of-the-story ravings were a report to Earth of what the far side looked like, so perhaps he was only partially mad or not mad.) This story was almost certainly written before Gagarin flew, at a time when there were legitimate questions about human response to spaceflight. (By the way, Philip Zimbardo's multi-day mock prison experiment was around 1969-1972. After a few days, some subjects apparently thought they were in a real prison.) Perhaps someone could provide an author, short story title, or book title (collection of short stories).

In his latest book 'The crash of 2016' author Thom Hartmann describes a story he once read in 'Amazing Stories'.   He doesn't mention a title or the author. Here is how he writes about it:     I was around ten years old, and a total science fiction junkie.   Amazing Stories—a pulp magazine of science fiction short stories,   commentary, and science news—arrived every month, and that meant that   on that day all homework and play were forgotten. These were some of   the most brilliant stories, written for a penny or so a word by people   such as Robert Silverberg, Jack Vance, Poul Anderson, and Frank   Herbert, who would go on to become the biggest names in the field of   Fantasy and Sci-Fi.      And one particular story haunted me for years. Eight years later, when   the first men landed on the Moon, that story was brought back to me as   if I’d read it the day before.      In the story, a group of astronauts are finally, for the first time,   going to blast off from Earth and circle the Moon. It had never been   done before, and because our moon doesn’t itself rotate on its axis   like we do relative to the Sun, but instead circles us with a single   side always facing us, nobody had ever before seen the “dark back side   of the Moon.” These men would be the first in human history to do so.      The rocket roared to life from the launchpad, the astronauts chatting   with Mission Control as they hurtled toward the Moon. When they got   close enough, they let the Moon’s light gravity grab their space   capsule and, with a few deft rocket thrusts, they put themselves into   orbit around it. They were unbelievably excited, as were the NASA   folks on the ground, chattering back and forth about what they hoped   and expected to see.      Was the dark side of the Moon identical to the front, or was it more   mountainous? (We now know it is the latter.) Might there be frozen   water there, since it has a different exposure to the Sun? Might there   even be wreckage there from ancient astronauts, or something else   exotic like that? Anything was possible!      As the astronauts began their turn around to the back side of the   Moon, Mission Control told them they’d lose communication because the   giant mass of the Moon would block their signals, so they prepared for   radio silence. But as they made the turn, they could still hear   Mission Control.      What they saw as they glimpsed behind the face of the Moon we see on   full-moon nights brought an audible gasp from all of them.      One picked up the microphone to radio the ground and tell the horrible   story. Another knocked the microphone from his hand with a warning   gesture. They continued to circle around the back side of the Moon,   and the view became even clearer, ever more undeniable.      “Should we report it?” A debate—virtually a fistfight—broke out in the   capsule. What would it mean for earthlings? What if nobody believed   them? What if they were quarantined upon returning and imprisoned or   sent to a mental hospital? I remember what they saw that so horrified   the astronauts.      The back side of the Moon was missing. They were looking into the   concave half ball of the front side of the Moon, which was made of   canvas stretched over an elaborate superstructure of two-by-fours,   nailed together like the scaffolds that held up roller coasters from   that era.   I would like to know the name of this story


Which of these is correct?     Could you tell me when the results will be posted exactly?      Could you tell me when the results exactly will be posted?

I am always confused about where to put adverbs in sentences. For example, consider the questions below:        Why did they target us specifically?   Why did they target specifically us?   Why did they specifically target us?      I believe all these sentences mean the same. Am I correct? I am always confused about where to put adverbs such as always and specifically, etc. Is there a particular grammar rule for this?  Funny, you see, I can even form the above sentence in different ways.         I always confuse where to put this kind of adverb   Always I confuse where to put this kind of adverb


Given a black hole of, say, $10^8 \odot$ (solar masses), how can I calculate the gravity gradient ($\frac{\Delta g}{m}$?) at a given distance from it?

The gravitational force on your body, called your weight, pushes you down onto the floor. $$W=mg$$ So, what is the weight equation through general relativity?


Is it possible to get a formula that has a fixed number of terms for this ecuation:   $$\cos 3+\cos 7+...+\cos(2n+3)=?$$   For example: a product of trigonometric functions

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


Yet another list-comparing question.  List<MyType> list1; List<MyType> list2;   I need to check that they both have the same elements, regardless of their position within the list. Each MyType object may appear multiple times on a list. Is there a built-in function that checks this? What if I guarantee that each element appears only once in a list?  EDIT: Guys thanks for the answers but I forgot to add something, the number of occurrences of each element should be the same on both lists.

I would like to compare two collections (in C#), but I'm not sure of the best way to implement this efficiently.  I've read the other thread about , but it's not exactly what I'm looking for.  In my case, two collections would be equal if they both contain the same items (no matter the order).  Example:  collection1 = {1, 2, 3, 4}; collection2 = {2, 4, 1, 3};  collection1 == collection2; // true   What I usually do is to loop through each item of one collection and see if it exists in the other collection, then loop through each item of the other collection and see if it exists in the first collection. (I start by comparing the lengths).  if (collection1.Count != collection2.Count)     return false; // the collections are not equal  foreach (Item item in collection1) {     if (!collection2.Contains(item))         return false; // the collections are not equal }  foreach (Item item in collection2) {     if (!collection1.Contains(item))         return false; // the collections are not equal }  return true; // the collections are equal   However, this is not entirely correct, and it's probably not the most efficient way to do compare two collections for equality.  An example I can think of that would be wrong is:  collection1 = {1, 2, 3, 3, 4} collection2 = {1, 2, 2, 3, 4}   Which would be equal with my implementation. Should I just count the number of times each item is found and make sure the counts are equal in both collections?    The examples are in some sort of C# (let's call it pseudo-C#), but give your answer in whatever language you wish, it does not matter.  Note: I used integers in the examples for simplicity, but I want to be able to use reference-type objects too (they do not behave correctly as keys because only the reference of the object is compared, not the content).


I have data that is related to its latitude and longitude (Northing/Easting). I am trying to create two rasters where the cell values are the UTM northings and UTM Eastings.   I am unsure how to populate those values to the cells in a raster.   Any ideas on how this could be accomplished?

Could anyone provide with a way to calculate latitude and longitude from DEM, for each raster cell?   In previous posts about this, I have seen that some suggest calculating lat and long in certain sample point locations. This doesn't work for me, as I need complete rasters.   Also, I use ArcGIS 10.2 version so $$XMAP, $$YMAP does not work for me.   Is there any other way inside ArcGIS to get lat and long?


just wondering, how long should I cook chicken breast pieces in a wok over medium heat for? They're around 1cm thick chicken breast pieces.  I tried cooking them today and although they looked white, one piece had a tiny streak of blood (blood vessels?). I was kinda scared so I didn't eat it although most of the chicken looked fine apart from that one piece with blood. And I mean it was surrounded by white  So does that mean I undercooked them? How long should I cook them for? Medium heat is around mark 4/6 on the hob. All the pieces looked white and not pink but I was just concerned  Thanks

Sometimes chicken breast can be thick and I never know how to tell when it's cooked! How can I be certain it is cooked all the way through?


If $3/3=1, 2/2=1, 1/1=1$, then why is $0/0$ undefined? Why is it not $1$?

(This was asked due to the comments and downvotes on this  answer. I am not that good at maths, so was wondering if I had made any basic mistakes)  Ignoring limits, I would like to know if this is a valid explanation for why $\frac00$ is undefined:     $x = \frac00$    $x \cdot 0 = 0$        Hence There are an infinite number of values for $x$ as anything multiplied by $0$ is $0$.   However, it seems to have got comments, with two general themes.  Once is that you lose the values of $x$ by multiplying by $0$.  The other is that the last line is:      $x \cdot 0 = \frac00 \cdot 0$   as it involves a division by $0$.  Is there any merit to either argument? More to the point, are there any major flaws in my explanation and is there a better way of showing why $\frac00$ is undefined?


I have an list like the following  line_37_data = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]   When I print line_37_data[0][0] , the value 0 is printed.  When I update the list as line_37_data[0][0] = 5, the list gets modified like below  [[5, 0, 0], [5, 0, 0], [5, 0, 0]]   How can I can update the value in the list based on the index ?  Note :- I don't use NumPy. This is pure plain Python without any libraries. I am using 2.7 and not Python 3

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?


So I have started by finding that $\sum_{n=1}^{\infty}\frac{x^n}{n}$ has a radius of convergence of 1. I would think that I need to use this to solve it by differentiating it and substituting in some value of x to make it my formula. I can't seem to find a solution.

What would be the sum of the following series?  $$\sum_{n=1}^{\infty} \frac{1}{n \cdot 2^n}$$  Thanks


I am writing a document with several figures with subsections numbers in the 2.1, 2.2, etc. format. I would like to number the figures in each subsection with a 3 digit format, for example: Figure 2.1.1, Figure 2.1.2, Figure 2.2.1, etc. How do I go about doing this? I am very new to latex.

I am having trouble formatting my list of figures and list of tables.  Currently, my tex document is printing the list in the following manner:     1 Foreign Key Constraint Problem Due   to Improper Table Design. . . . 3      2 Application Flow of Territory   Maintenance Tool. . . . . . . . . . .   . . 4   But I want to number figures by their sections:     3.1.2 Foreign Key Constraint Problem Due to Improper Table Design


I have a standard ubuntu 16.04 installation on a Lenovo ideapad 100. On irregular intervals the laptop looses connection to the wifi router.  $ ip a show wlp3s0   shows only   wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN group default qlen 1000   but i cannot restart it with either of these commands, the interface remains down.  # ifconfig wlp3s0 up # ip link set wlp3s0 up # service network-manager restart   This happens in different wifi networks.   The wifi icon in the top right corner sometimes shows, that it is searching for a connection, but it is unable to connect.  Is this a problem of the driver, or is there also another chance to get it manually up again?  Update  $ lspci -knn | grep Net -A2 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd.     RTL8723BE PCIe Wireless Network Adapter [10ec:b723] Subsystem: Lenovo RTL8723BE PCIe Wireless Network Adapter [17aa:b728] Kernel driver in use: rtl8723be Kernel modules: rtl8723be

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


I using Redhat/Centos 6.5.  I am starting up the system and it already has environment variables set and is already running processes when it starts up.  My questions:    Where do these environment variables get set? Where do these processes get set and how do I know what is running?

I have a Linux instance that I set up some time ago.  When I fire it up and log in as root there are some environment variables that I set up but I can't remember or find where they came from.     I've checked ~/.bash_profile, /etc/.bash_rc, and all the startup scripts.  I've run find and grep to no avail.   I feel like I must be forgetting to look in some place obvious. Is there a trick for figuring this out?


I understand that gravity is not a force, but the function of curved space time.  But what gets an object in motion if no force acts on it?  For example, if I roll a ball, its path will curve towards a massive object due to the curvature of space time.  But, if a ball is suspended by a string, and I cut the string, why does it drop if there is no force pushing or pulling it?

I understand that people explain (in layman's terms at least) that the presence of mass "warps" space-time geometry, and this causes gravity. I have also of course heard the analogy of a blanket or trampoline bending under an object, which causes other objects to come together, but I always thought this was a hopelessly circular explanation because the blanket only bends because of "real" gravity pulling the object down and then pulling the other objects down the sloped blanket. In other words, to me, it seems that curved space wouldn't have any actual effect on objects unless there's already another force present.   So how is curved space-time itself actually capable of exerting a force (without some source of a fourth-dimensional force)?  I apologize for my ignorance in advance, and a purely mathematical explanation will probably go over my head, but if it's required I'll do my best to understand.


For example, I want to rename tif/fat/tul/codes/MyCode.pl to TheCode.pl in the same directory. Currently I know I can use this:   mv tif/fat/tul/codes/MyCode.pl tif/fat/tul/codes/TheCode.pl   but that requires me to repeat typing the full path (can be annoying if the path is quite long)  or I can use   cd mv tif/fat/tul/codes/ mv MyCode.pl TheCode.pl   The drawback being I have to type 2 commands, and have to change the current directory is undesirable in many cases.  Is there a more efficient way to do this?

Is there any way of executing a mv command without typing the full path in the second argument?  Example:  mv my/file/that/has/a/really/long/path/foo.bar some_magic_operator_that_means_the_same_directory/foo.baz


Our teacher went over the following proof but didn't post the notes on it.  I'm trying to understand how it checks out, could someone explain it without using contraposition.   For any integers a,b,p, if p is prime and p ∣ ab, then p ∣ a or p ∣ b.

The proof is already given in the textbook but I tried other way around.   Proof by contradiction: Let's assume that $p$ doesn't divide $a$ and $p$ doesn't divide $b$, but $p$ divides $ab$. So $\gcd(p,a)=1$ and $\gcd(p,b)=1$. Given that we can construct linear combinations   $sp+ta=1$ together with $up+wb=1$. Multiplying the left and the right sides of the equations we get  $spup+spwb+taup+tawb=1$ or $p(sup+swb+tau)+ab(tw)=1 \implies \gcd(p,ab)=1$. This is a contradiction.   Is it rigorous and sound proof?


ostringstream s;      s << "123";     cout << s.str().c_str() << endl;      // how to clear ostringstream here?     s << "456";     cout << s.str().c_str() << endl;   Output is:   123 123456   I need:   123 456   How can I reset ostringstream to get desired output?

I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work.


With huge advancements in CUPs able to process mass amounts of information in fractions of seconds, why is it important that I close a file stream?

Why do we need to close a FileInputStream (and streams in general) in any case before we leave the program? What would happen otherwise? If the program stops before the input stream is closed explicitly in the program, doesn't the stream also close automatically?


How is Wolverine able to survive?  The main source of blood is bone marrow. But his bones are adamantium - Even if we assume that his bones are covered with adamantium, how does he get blood?

I've seen the  here before, as well as on many sites on the web.  I've also seen different info on what was covered.  I'm not a huge X-Men fan, but I do enjoy the characters and stories, so I know I'm probably missing out on a lot, and may have missed the obvious along the way because I didn't read a particular series or something like that.  I had a relative die from leukemia a few years ago and that reminded me of basic junior high science: that red and white blood cells are produced in the bone marrow and must be able to reach from the marrow into the blood vessels.  The leukemia my relative had was the kind where the "bad" cells would surround the marrow and prevent the new "good" blood cells from getting out to the rest of the body.  So just how much of Wolverine's skeleton is covered with Adamantium?  If it's the whole thing, there'd have to be openings for new red blood cells to get out if he is to remain alive.  I've never seen a reference to this issue, is it ever addressed?  That also raises another issue along the same line: Are hard to reach areas, such as ball and socket joints covered?  If not, then stress on other covered areas could be transferred to the weaker uncovered areas, which would lead to breakage there.  And if joints like that are covered, is there anything to say how it was done?  Are there openings or gaps in the Adamantium covering on his body?  Are there any references to any of these issues that deal with them?


I have input elements in my html page. When user presses the submit button, it being binded to the click even in jquery and the data is being validated and then send to server using AJAX. The problem is, I have a file field. So how to initiate the uploading of the file via the code using AJAX ?  Sample code:  $(function(){   $('#btnSubmit').on('click', function(){     // validate fields, make some processing on the data, etc.     // then send to server using AJAX...      $.ajax({       //....      });      // after submitting the above data or along with it, I want the picture uploaded(without user having to press upload button or anything)   }); });   How it can be done?

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I was playing around with my shell (zsh v4.3.11) when I noticed something weird:  $ >/dev/null 2>/dev/null echo "Hello"   outputs nothing on the terminal, whereas  $ >/dev/null 2>/dev/null echo "Hello" | wc   outputs:  1 1 6   How does the redirection/pipe combination work here? How does wc see the Hello\n even though all output is redirected to /dev/null? And why do I see the output of wc when I've redirected everything to /dev/null?

Can somebody explain what is going on in this command:  echo foo >&2 | grep foo   Zsh (5.0.2) prints foo twice. One seemingly to stdout and one to stderr, since running these commands:  { echo foo >&2 | grep foo } >/dev/null   and:  { echo foo >&2 | grep foo } 2>/dev/null   both just print foo once.


Well i was flying kites today I saw a tree and its branches were spread around in random directions... I would like to know that how do these trees know to nourish their branches in some direction so as it doesn't fall off due to gravity. I know it can get its strength from the roots inside the soil so that it does not fall. But if this strength were not enough the tree may fall due to weight of its own branches. Can this happen??  I am new to this site I don't know much about the rules here. Feel free to edit if I have done any mistakes(especially about tags)

I was walking down a road with these beautifully huge trees when this question occurred to me.   Large trees with many thick branches have to grow equally in all directions, or they would tip over. Is there some sort of mechanism to ensure this uniform growth? Or is it just a happy coincidence arising from uniform availability of sunlight on all sides? If one branch of a tree becomes too heavy due to many sub-branches, does this somehow trigger growth on the opposite side of the tree?   I have seen that potted plants in houses tend to grow towards sunlight. My mum often turns pots around by 180 degrees to ensure that plants don't bend in any one direction. I assume that this is because sunlight increases the rate of photosynthesis, leading to rapid growth of the meristem.  For trees growing in open spaces, this wouldn't be a problem. But there are many large trees that grow in the shadow of buildings without bending away from the buildings, even though this is the only direction from which they would receive any sunlight. Is there any explanation for this?


I've been stuck on GRUB Rescue for 1 day now, I deleted the Ubuntu partition from windows7, I had Ubuntu 20.04.1 which is probably the latest version right now, I downloaded it from my USB with balena etcher. after deleting the entire Ubuntu partition I restarted my PC to see if anything would go wrong, I automatically got presented with grub rescue. The ls command does not work, I cannot boot into Windows from my USB to fix it in the installer because GRUB rescue wont let me, I cant boot into my USB, it shows it as a hard disk, making it bootable or ISO it just doesn't work, and GRUB Rescue will not let me do any other way, what can I do?

I am just about to install Ubuntu alongside Windows, just need to make sure I know how to remove it later.  I know from past the major problem was when I removed Ubuntu, I either still got into the GRUB booting menu, or I couldn't boot at all, and had to format HDD and start over. Now I found an article practically saying the Windows loader should be back upon deleting Linux partition, so I want to make sure:  If I have Windows and Ubuntu dualboot, and I want to get back to Windows booting quickly itself without choosing from any booting menu, is it enough to just delete the Ubuntu partition? Will the Windows loader override GRUB?  Thanks!


Can you Explain this java-Calendar code  Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.MONTH, month-1);  Why we are passing the value of month decreasing it by one  calendar.set(Calendar.DAY_OF_MONTH, day); calendar.set(Calendar.YEAR, year); return calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.US).toUpperCase();

In java.util.Calendar, January is defined as month 0, not month 1. Is there any specific reason to that ?  I have seen many people getting confused about that...


This question:  proposed the following way to calculate the difference between two dates:  var _MS_PER_DAY = 1000 * 60 * 60 * 24;  // a and b are javascript Date objects function dateDiffInDays(a, b) {   // Discard the time and time-zone information.   var utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());   var utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());    return Math.floor((utc2 - utc1) / _MS_PER_DAY); }   That's correct for some purposes, but not all purposes. Specifically, with day light savings time you could have a 24-hour span that does not pass midnight, which does not count as a full day for medical billing purposes, for example. How do I calculate specifically the number of midnights that occur between two dates in javascript?

How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/>  <script>   alert(datediff("day", first, second)); // what goes here? </script>


I just learned about it to some depth (not very much, just the basics), and I fail to see why is this phenomenon considered strange or unexpected and the like at all.  I mean let's consider a bag with a red and a white ball in it. Now, lets suppose someone, without looking (maybe just putting their hand into the bag and doing it there), puts one ball into a box, and the other into another box, and then brings those boxes way apart. Then, if one box is opened, we instantly know the colour of the other as well. I fail to see how this differs from all the classically taught entanglement and "spooky action at a distance" cases (like the Aspect experiment), for me this is identical to those. And consequently, I fail to see why is this a big deal, I mean I find nothing suprising or particularly interesting in this.  Obviously I am missing something, but I just can't figure out what. Any suggestions?

Bearing in mind I am a layman - with no background in physics - please could someone explain what the "big deal" is with quantum entanglement?  I used to think I understood it - that 2 particles, say a light-year apart spatially, could affect each other physically, instantly.  Here I would understand the "big deal".  On further reading I've come to understand (maybe incorrectly) that the spatially separated particles may not affect each other, but in knowing one's properties you can infer the other's.  If that it the case, I don't see what the big deal is... 2 things have some properties set in correlation to each other at the point of entanglement, they are separated, measured, and found to have these properties...?  What am I missing? Is it that the particles properties are in an "un-set" state, and only when measured do they get set?  (i.e. the wave-function collapses).  If this is true - why do we think this instead of the more intuitive thought that the properties were set at an earlier time?


Im having problems with special characters in sql query. I tried escaping using {} , mysqli_escape , but it doesnt work.  My query looks like this....  ("SELECT  * FROM cars WHERE  car_id= '$carid' AND car_des='$car_des' AND engine= 'B' ");   $carid = 123; $car_des = Toyota <'kk'>;   so my query reads as follows  ("SELECT  * FROM cars WHERE  car_id= '123' AND car_des='Toyota <'kk'>' AND engine= 'B' ");

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am having trouble figuring out how to solve this limit.      $$\lim _{x\to \infty }\left(\left(1-\frac{1}{2^2}\right)\left(1-\frac{1}{3^2}\right)...\left(1-\frac{1}{x^2}\right)\right)$$   I understand that as '$x$' increases, the overall product becomes an even smaller number between $0$ and $1$  only because I tried plugging in numbers in hope to learn about the nature of the expression. But I can't seem to come to a pattern that will allow me to efficiently simplify it and solve the limit.   Help, anyone?

While trying some problems along with my friends we had difficulty in this question.   True or False: The value of the infinite product $$\prod\limits_{n=2}^{\infty} \biggl(1-\frac{1}{n^{2}}\biggr)$$ is $1$.   I couldn't do it and my friend justified it by saying that since the terms in the product have values less than $1$, so the value of the product can never be $1$. I don't know whether this justification is correct or not. But i referred to Tom Apostol's Mathematical Analysis book and found a theorem which states, that    The infinite product $\prod(1-a_{n})$ converges if the series $\sum a_{n}$ converges.   This assures that the above product converges. Could anyone help me in finding out where it converges to? And,   Does there exist a function $f$ in $\mathbb{N}$ ( like $n^{2}$, $n^{3}$) such that $\displaystyle \prod\limits_{n=1}^{\infty} \Bigl(1-\frac{1}{f(n)}\Bigr)$ has the value $1$?


My current understanding is that commands added to these two files are run every time a new terminal is open. Is that correct? Because in a lot of places I see suggestions to put there commands I want to be executed at login, but if they get executed every time I open a new terminal, then I do not want that. Can you help me understand how they work? Also what is the difference between them?  If I understand them correctly, then where can I put commands that I want to be executed only on login, but not every time a new terminal is opened? I know that I can do that from the GUI for "startup applications", but I am interested in doing this in a file, if possible.

I would like to concentrate all my login config in my ~/.bash_profile.  There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile.  However, when I log in, something before my ~/.bash_profile gets sourced and displays the following:  Linux ubnt10-dev1 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux Ubuntu 10.04.4 LTS  Welcome to the Ubuntu Server!  * Documentation:  http://www.ubuntu.com/server/doc    System information as of Fri May  9 12:17:39 EDT 2014    System load:  0.01              Processes:           74   Usage of /:   5.5% of 18.58GB   Users logged in:     0   Memory usage: 4%                IP address for eth0: 123.x.x.x   Swap usage:   0%    Graph this data and manage this system at https://landscape.canonical.com/  New release 'precise' available. Run 'do-release-upgrade' to upgrade to it.  Last login: Fri May  9 12:11:52 2014 from 123.x.x.x   I would like to remove that so that only my own splash greeting defined in my ~/.bash_profile gets displays but I am not sure about the logic/sequence of scripts sourced/executed when a user logs in.  Can you enlighten me?  As a bonus, I would also like to know the sequence of automated sourcings/execs when the system starts, not just when a user starts a session by logging in, albeit this is a concern of lesser importance to me right now.


I have a cube that have the original Blender material (diffuse BSDF, color is white), and I want to add a icon on it  The problem is I added a .png image onto the box, but then the face become black, and that really confuses me  I am a noob to 3d modeling, so please advise, sorry for my bad English..

I'm trying to setup a image decal in cycles, and I can't figure how to setup the nodes to work fine. Does anyone know the solution?


I know this is an extremely basic question, but I have never had a course on statistics or applied probability. The only probability I had was in a measure theory course. Now I am doing machine learning and I am seeing the phrase "sample data from distribution" everywhere, and I have only a very vague idea as to what it means.   Part of the problem is that sampling sorts of defies everyday intuition. Suppose we want to "sample from a uniform distribution" which means to me "choose things at random". Can this really be done?  Suppose you place several balls in a line and tell a person to pick one "at random", I think intuitively, most people will either pick the first, or the last one or in the middle but not somewhere in between. In other words, our idea of random as experienced in everyday life is not "mathematically random", because there are behavioral patterns we can observe. This is also why if you tell conduct experiment telling a group of people to pick a number between 1 to 10, the most common answer is not 3, or 8, but something like 5.  So I don't understand sampling because it is not my everyday experience. I have never truly seen someone sample anything with a uniform distribution, let alone a Gumbel, Gaussian or Geometric or some other distribution. Reality aside, how would this be done numerically. Suppose I present you the statement:  "We sample data $x$ from a Gaussian distribution"  What does this mean exactly?  A distribution is the probability density of a random variable, a mathematical function it tells me the probability of finding a data point $x$ over an area. All it provides me is a very vague idea as to how the data may look like, i.e., where I am most likely to find a data point. A probability density function doesn't tell me at all how many data points are there, where they are placed exactly, etc.  Now what does it mean to sample a data, mathematically speaking? What is actually done when "picking a data point from or according to a distribution"?  Finally, data points generated from experiments are always finite, and always discrete. There is probably nothing in nature that is continuous or with uncountable cardinality. Sure, we can model the distribution of these data points via a continuous probability density function. But isn't the the probability of finding any point is zero according to a Gaussian i.e., $\Pr[X = x] = 0, X \sim \mathcal{N}(\mu,\sigma^2)$?. So wouldn't it be impossible to "get" any point according to a probability distribution, since you never know exactly where they are?   Can someone show me how you would actually "sample from a distribution"?   As a hypothetical scenario, I have $20$ data points, $x_i \in \mathbb{R}^2$, I put them somewhere on the Euclidean plane. Suppose you have no idea about their location, all you know is a probability density model of these data points generated from some algorithm. Actually, let's make it harder: you also have no idea about the dimensionality or the number of data points. Now I say, sample a data point $x_i$ from these $N$ number of data points via the "insert name here" distribution and return that point $x_i$ to me, and prove it to me that you have sampled this data point from the distribution you claim it was sampled from. How would you actually do it?

I'm not a statistician. So, please bear with my blunders if any.  Would you please explain in a simple manner how simulation is done? I know that it picks some random sample from a normal distribution and use for simulating. But, don't understand clearly.


I would like to know that which tool is best for illustration for my art designing. Actually I am confused between Photoshop and Illustrator.

I'm a software developer and am working on a personal project (website + iphone/ipad app). I need simple illustrations for these to fill in the blanks until the project gets "some" paying customers or I find investors. With more money I can hire some graphic design folks to do a great job. As for now, I'm aware of the big brand tools out there (Photoshop, Illustrator) but am looking for an illustration tool for beginners. I've used "Paper" app by FiftyThree Inc. and was able to create something fairly decent in just a few minutes. I'm looking for an application that will do this on my computer, that has more features than Paper, but without the learning curve of Photoshop or Illustrator.  Summary question: What are some great beginner illustration tools (OS agnostic)?  Thank you


I have two UV Maps on the mesh but I can not get UV map 2 to show at the bottom for the back of the leaf its a plane-shaped leaf...

How could a one-sided material be achieved with the Cycles renderer?  I would like to create a plane that is completely transparent from one side, and a mirror from the other side.  It would be cool if Cycles/Blender simple supported backface culling like the game engine. But I guess it doesn't?  How could something like that done with nodes?


When I execute  sudo apt-get update   I get the following error:  E: Type 'ain' is not known on line 3 in source list /etc/apt/sources.list.d/diesch-testing-precise.list   E: The list of sources could not be read.   How can I fix this?

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


I'm trying to make an animated fire that plays at a 12fps but still have the camera move at 24fps. For the fire itself, i used the stepped interpolation modifier and that worked fine, but now I'm trying to do the same with the particles emitting from the fire. I've been searching for hours but haven't found anything.

I am using a Particle system to simulate falling dust / debris. The particle start and end fairly quickly. They should look like a short burst of falling dust.  I cant figure out how to get the particles to fall at slightly different speeds.  The particles should be falling downwards with very little Brownian motion.  The fact that the particles are falling at the same speed makes them look odd / too uniform (almost like a static image of some particles which is moving down rather than individual particles.  Also the particles end at a set frame so I get a uniform trailing edge (as below).   A bit of air drag helps a bit but not much.  Question 1. how to vary the downward speed of the particles?  Question2. Can the density of particles be animated so I can brake up the distribution?  Thanks Oliver


I just called home & hubby said the chili was still raw when he got home . He turned it up to high and is making something else for tonights dinner. He did not  put in thermometer before turning it up.  Is this safe to eat once cooked through? So mad at myself to toss it but don't want to risk getting us sick. Thanks for advice!

I put some uncooked stew meat and veggies on this morning and left for 5 hours. When I came home I realized it was only set on warm. Is my meat safe to eat? I have now put it on the stove to cook.


When I run   ~$ unzip android-sdk_r24.0.2-linux.tgz   I get the error message   unzip:  cannot find or open android-sdk_r24.0.2-linux.tgz,    android-sdk_r24.0.2-linux.tgz.zip or android-sdk_r24.0.2-linux.tgz.ZIP.   Why is this and what can I do to solve this problem?

I've downloaded mongodb-linux-x86_64-2.6.3.tgz file using windows 7 and kept it on D:\Amra\Software\Developing Soft location.  When I right click this .tgz file using Ubuntu  and see property it shows Location:  /media/towhid/Amra/Software/Developing Soft. Now how will I unzip this .tgz file using tar command from terminal?


Let $V^T$ denote the transpose of a vector $V$. Consider two non-zero $p$-dimensional column vectors $a$ and $b$, for $p\ge 2$.  How many non-zero distinct eigen-values does the $p\times p$ matrix $ab^T + b a^T$ have?

Let $p, q \in \mathbb{R}^n$ such that $\|p\| = \|q\| = 1$ and define $$A = pq^T + qp^T$$ Find the null space of $A$.    I am not having very much luck. I have managed to show that $p + q$ and $p - q$ are eigenvectors, but I can't seem to connect those two. I know that since $A$ is generated by an outer product, it is of rank one. That implies that the rank of the null space is $n - 1$, but I can't seem to get any further. Can anyone help?


Does anybody know how to configure this filter in Gmail?  I've tried various things like just having quotes, (no subject), subject:(no subject), etc.  I realized that doesn't work because when you look at the headers of an email with "no subject" in the subject line, the actual subject header line is completely missing.  I even exported a filter, edited the xml, then re-imported it taking out any characters from within the value='' line. doesn't work either.

Is there any workaround or way to filter or search for messages that have no subject line?  I can see there is no way to filter messages when some field is "missing".


We know the following:  Two masses are attracted to one another, as represented by Newtonian gravity $F = \frac{GMm}{R^{2}}$  Light is massless and bends in the curvature of space-time which can be created by a mass, where the deflection is calculated with Einstein's general relativity and is twice that calculated by Newtonian gravity, .  $E = mc^{2}$, where m is the relativistic mass.   Is there something special about mass energy that produces a curvature of spacetime? If that rest mass energy were converted to light energy (say, by annihilation of an equally large amount of matter and anti-matter, a planet sized "anti-matter bomb"), would the spacetime curvature resulting from the originating mass essentially instantaneously disappear? The inverse process, say through a "pair-production bomb," could instantaneously create space-time curvature. Of course, "instantaneous" here is nearly achieved anyway since the light source is traveling at the speed of light toward the about-to-be-born mass. Of course, this also answers the question of whether light attracts itself (through "gravity").

I understand that mass-energy equivalence is often misinterpreted as saying that mass can be converted into energy and vice versa.  The reality is that energy is always manifested as mass in some form, but I struggle with some cases:  Understood Nuclear Decay Example  In the case of a simple nuclear reaction, for instance, the total system mass remains the same since the mass deficit (in rest masses) is accounted for in the greater relativistic masses of the products per $E=\Delta m c^2$.  When a neutron decays and you are left with a fast proton and a relativistic electron.  If you could weigh those two without slowing them down, you would find it weighed as much as the original neutron.  Light in a Box  This becomes more difficult for me when moving to massless particles like photons.  Photons can transmit energy from one heavy particle to another.  When a photon is absorbed the relativistic mass (not the rest mass) of the (previously stationary) particle that absorbs it increases.  But if my understanding is correct, the energy must still be manifested as mass somehow while the photon is in-flight, in spite of the fact that the photon does not have mass.  So let's consider a box with the interior entirely lined with perfect mirrors.  I have the tare weight of the box with no photons in it.  When photons are present the box has an additional quantifiable amount of energy (quantified below) due to the in-flight photons.  Say there are $N$ photons... obviously assume $N$ is large.  $$\Delta m = \frac{ E }{ c^2 } = \frac{ N h }{ \lambda c}$$  Interactions are limited to reflections with the wall, which manifest as a constant pressure on the walls.  If I hold this box in a constant gravitational field (like the surface of Earth) then there will be a gradient in the pressure that pushes down slightly.  Is this correct?  Wouldn't there still technically be mass as the photons are in-flight, which would cause its own gravitational field just as all matter does?  How is this all consistent with the assertion that photons are massless?  Is it really correct to say that photons don't have mass?  It seems to be a big stretch.  Please offer a more complete and physically accurate account of this mirror-box.


I'm given the task of calculating the sum $\sum_{i=0}^{n}\sin(i\theta)$.  So far, I've tried converting each $\sin(i\theta)$ in the sum into its taylor series form to get: $\sin(\theta)=\theta-\frac{\theta^3}{3!}+\frac{\theta^5}{5!}-\frac{\theta^7}{7!}...$ $\sin(2\theta)=2\theta-\frac{(2\theta)^3}{3!}+\frac{(2\theta)^5}{5!}-\frac{(2\theta)^7}{7!}...$ $\sin(3\theta)=3\theta-\frac{(3\theta)^3}{3!}+\frac{(3\theta)^5}{5!}-\frac{(3\theta)^7}{7!}...$ ... $\sin(n\theta)=n\theta-\frac{(n\theta)^3}{3!}+\frac{(n\theta)^5}{5!}-\frac{(n\theta)^7}{7!}...$  Therefore the sum becomes, $\theta(1+...+n)-\frac{\theta^3}{3!}(1^3+...+n^3)+\frac{\theta^5}{5!}(1^5+...+n^5)-\frac{\theta^7}{7!}(1^7+...+n^7)...$  But it's not immediately obvious what the next step should be.  I also considered expanding each $\sin(i\theta)$ using the trigonemetry identity $\sin(A+B)$, however I don't see a general form for $\sin(i\theta)$ to work with.

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


I am trying to make a simple TCP chat program, and when the user sends the message "/list", I want to reply from the server with a list of all online users.      else if (cmd.text.equals("/list")){     //Sends the client a list of all registered users         UserList userList = new UserList();          System.out.println(online_users);          if (online_users.values()!=null){              userList.users.addAll(online_users.values());          }          c.sendTCP(userList);      }   However, even though I have tested and know that online_users does contain a value to add to userList.users, the command userList.users.addAll() keeps throwing an error. This is the error:  Exception in thread "Server" java.lang.NullPointerException at com.andrewlalisofficial.ChatServer.checkCommand(ChatServer.java:128) at com.andrewlalisofficial.ChatServer$1.received(ChatServer.java:68) at com.esotericsoftware.kryonet.Server$1.received(Server.java:61) at com.esotericsoftware.kryonet.Connection.notifyReceived(Connection.java:246) at com.esotericsoftware.kryonet.Server.update(Server.java:208) at com.esotericsoftware.kryonet.Server.run(Server.java:356) at java.lang.Thread.run(Thread.java:745)   where line 128 is userList.users.addAll(online_users.values()); I want to be able to simply add the collection of values from the Map online_users to a new String list and send it off. I don't understand why there is an error.

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?


Test the convergence of $$\sum_{n=1}^\infty \frac{n^{1/n} - 1}{n}$$  My Attempt: Using the root or ratio test would be too inconvenient here. Looking at the denominator, I used the Cauchy Condensation Test, i.e. if the condensed sequence $\sum_{k=1}^{\infty} 2^k a_{2^k}$ converges, then $\sum a_n$ converges. By this test, we have $$\sum_{k=1}^{\infty} 2^{k} \frac{(2^k)^{\frac{1}{2^k}} - 1}{2^k} = \sum_{k=1}^{\infty} 2^{\frac{k}{2^k}} - 1$$ Consider the term $2^{\frac{k}{2^k}} - 1$. If we rewrite 2 as a binomial $1+1$, we get $$(1+1)^{\frac{k}{2^k}} - 1 \lt \frac{k}{2^k}$$ Summing both sides, $$\sum_{k=1}^{\infty} 2^{\frac{k}{2^k}} - 1 < \sum_{k=1}^{\infty} \frac{k}{2^k}$$ For the latter sum, it is trivial to show that $\lim_{n \to \infty} \frac{a_{n+1}}{a_n} = \frac{1}{2} < 1$, and the series converges by ratio test. Hence $\sum_{k=1}^{\infty} 2^{\frac{k}{2^k}} - 1$ converges and therefore, $\sum_{n=1}^\infty \frac{n^{1/n} - 1}{n}$ is convergent. $\; \blacksquare$ Is this proof valid? Please point out the errors and suggest improvements as well. I think there may be a less complicated way to solve this, but I'm not able to put my finger on it.

I am trying to conclude about the convergence of $$\sum_{n=1}^{\infty}{\sqrt[n]{n}-1 \over n}$$ If I take ${\sqrt[n]{{\sqrt[n]{n}-1 \over n}}}= {\sqrt[n]{\sqrt[n]{n}-1} \over \sqrt[n]{n}}$ this looks like it converges to $0$ but I am suspicious about the numerator. At the same time, other techniques I know like the ratio test, $n(\sqrt[n]{n}-1)$ and comparisons don't yield meaningful results. Any hints?


Theorem: When a quadrilateral is inscribed in a cycle i.e. the vertices of the quadrilateral lie on the           circumference of a circle; the quadrilateral is called a cyclic quadrilateral.  lala: xxxx lala lala       yyyy   Question: How to have yyyy below xxxx?

I would like to define a theorem environment with custom layout. In particular, I want the body of the theorem to be indented, like this  Text body. Text body. Text body.  Theorem 1 (Pythagoras).     Let a,b,c the sides of a rectangular triangle.     Without loss of generality, we assume that  a<b<c .     Then, the following equality holds:            a^2 + b^2 = c^2  More text. And even more text.   This is similar to the quote environment, I believe.  How can I do this?  Preferably, I would like to use the existing \newtheorem command, but that's not mandatory.


I want my document to use class files, style files or bibliography style files located in some subdirectory of my TeX document's directory. Sometimes I can sorta-kinda- use, say, \documentclass{include/myclass}  and just get a warning. But often even this . What I would really like to do is specify additional include directories - preferably from within the TeX file itself. Is this possible?

I would like to use a class that belongs not found in my MiKTeX database. I know I might as well pick up this class and put it in some directory inside the base and update MiKTeX, but I do not want to do that. What I want is to organize it into a subdirectory within the same directory as my main tex file. However, when compiling the tex file, the class is not found. Of course, if I put the direct class in the same directory as the main file I will solve the problem, but that's not what I want. So, I ask: Is there any way to tell the compiler, inside the main file body, how to find the class?  Note: I'm using MiKTeX as an example, but I'm really having the problem in overleaf. There was a revtex upgrade from version 4.1 to 4.2. However, overleaf does not find revtex4-2.cls, which is, in fact, the class I'd like to use.  Below, I show an example of how I would like to organize the files. Note that the class is in a subdirectory.


I am using OnePlus One and have recently downloaded the Stack Exchange app, but after logging in using my Gmail ID, the feed page is not showing any data at all.  I have tried uninstalling and reinstalling the app but no difference in that. Whenever I am using this app without an account, all feed data are shown, but as soon as I log in using my Gmail ID, I am again having the same problem of no data in feed page.  What do I need to do to correct this?

I have subscribed to many sites, but have no feed. I checked online, and I gathered this is not how it should normally look.    Buggy layout with empty feed    Fixed after having activity (e.g. reputation change, badge, etc)   Phone: HTC Desire 526G+ Android: 4.4.2 SE app: 1.0.77


I'm using the listings package with this \begin command:  \begin{lstlisting}[caption=blabla, label=amb]   This yields a nice code listing with a caption like "Listing 1.1 blabla". Is there a way to change the caption and have something like "Code 1.1 blabla"?  I saw the title command but it doesn't use a numbering system. Any hint will be greatly appreciated!

I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that?  \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document}


I'm learning python so I may get my foot in the door for a programming career.  I'm using the gedit text editor to write the code, however I don't know how to execute the code on ubuntu.  If anyone is able to help, I would greatly appreciate as much help as I'm able to get.

Trying to learn how to run my scripts through Ubuntu's terminal regularly.  That being said I am familiar with bash, wget, and awk being called but how do I call python files to run in the terminal?  I would like to learn this but I am unsure on where to research it.  I have a .pyw file that references several .py files in a folder.


Motorola Moto E LTE XT1528 (Verizon) running Android 5.1  I bought this phone in Aug, 2015.  I have the box, the receipts and a copy of the transaction from Best Buy via ebay. (EDIT: the boatloader for this model can't be unlocked)  I pulled my phone out of my pocket this morning and was greeted with a "Select Language" screen.  Somehow it had preformed a factory reset.  To my chagrin, it required my google account to use the phone.  I set this up long ago and I never use the google account. I couldn't remember anything but a few letters of the account.  I tried all the recovery options on  but nothing worked.  It seems that now my only choice is to buy a new phone. Does anyone know if anything can be done?  Edit: In regards to the moderators suggested solution: With 5.1 you can no longer wipe the data and return to factory settings with the bootloader.  Edit 2: Verizon, Best Buy, Google were unable to assist.  Motorola at first told me the "phone is now bricked" (their words).  After talking with Google again they conferenced in Motorola who agreed since it was still under warranty they would service it.  So I am sending it back to them.  As a curiosity I tried all of the suggested solutions in the answers that were suggested in the duplicate question.  Specifically for the XT1528 there is no menu options in the pull down that allows you to try to bypass the boot loader block.  In other words at 0:41 in this video  that button does not exist in the upper right. I added a screen shot showing the option that is not available so you don't have to watch a video:    This is unfortunate because when I bought this product I had no idea how significant that spontaneously made up google account would become over time.  The phone just said to create one, there was never any implication to how important it would be because there was no "Kill Switch" feature at the time that depended on it.  I'm well versed in the android tools, so if someone has an idea, I would be willing to see if it works before I send it back.  So far nothing has.

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


I think it must have been in Analog or Asimov in the early 1980s (81, 82, 83). It's a short story with only TWO characters: The prisoner and the psychiatrist.  A man is seeing the prison psychiatrist. During the session, he identifies the cruel treatment by his father as the root of all his problems. When back in his cell he time travels (this seems to be an innate ability he has - no explanation is given, as I remember) and kills his father.  The following day he is back with the psychiatrist and identifies his being brought up by a neglectful single-parent mother as the root of all his problems. Once again, back in his cell he travels back in time and kills her.  The following day he identifies a cruel carer at the orphanage he grew up in...   The story goes through a number of, Groundhog Day style loops and finishes with a clever dark twist.  After a number of loops - all the possible people who may have influenced him in a bad way killed it ends with him in the psychiatrist office thinking,      'maybe seeing this psychiatrist has caused me to be the way I am?!' - Leading the reader to believe he will travel back in time and kill the psychiatrist before their first meeting).

I read a story some years ago (probably about 35) in an monthly sci-fi anthology...  It's set in a prison.  The main character is a psychopath who has sessions with a psychiatrist - in these sessions he always blames a person in his earlier life for his condition: uncle, father, mother, sibling... each time returning to his cell - time travelling to his earlier life and killing that person...   Example: He blames his father for leading him into bad ways - goes back in time and kills his father. Next session he blames his mother (and the fact that he grew up with no father in his life) - goes back in time and kills his mother.  Next session he blames a carer (and the fact that he grew up an orphan) etc...  The story had a very clever dénouement, which is hidden in a spoiler section below.  I would love to read this again - any ideas?    Edited to add: I hope I have explained the format sufficiently - the point is, the psychiatrist helps him to identify where he began to go off the rails and who in his life was responsible. Later when he is alone in his cell he goes back in time (the mechanism for this is not explained - it's as if he can will himself to go to that time) and kills the person identified as responsible.  When he attends his next session: his reality, his history, is different so another person has to be identified as the cause of his problems... the story has a Groundhog Day feel to it...  The final paragraph, the end of the story, has him       sitting once again in front of the Psychiatrist and as if it is suddenly dawning on him he looks up slowly, 'realising' that all his problems started when he first came to see this psychiatrist!  Thus leaving the reader in no doubt who will die when he later travels back in time to just before his first session with the psychiatrist...


Is there a way to tag favourite users? If not it will be a good idea. I work with a bunch of guys developing stuff, and it would be nice to track their questions or profile because most of their problems are my problems. And having some sort of team SO would be nice. P.S. at the moment we send each other emails with links.

I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like.


I have a strange hard drive error that is happening about once per second. Googling I see that people are suggesting: 1. a bad SATA cable, or 2. a bad PSU. Does anyone have any experience with this? Seems very unlikely that a bad SATA cable can actually happen.  [   44.024915] ata4: irq_stat 0x00000040, connection status changed [   44.024918] ata4: SError: { CommWake DevExch } [   44.024922] ata4: hard resetting link [   46.243456] ata4: SATA link down (SStatus 1 SControl 300) [   46.243468] ata4: EH complete [   46.260369] ata4: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen

My new 1,5 TB ext4 Hard Disk makes mysterious noises and fails to read and write. But not always. Sometimes it just works. But then I get those following errors. Does anyone know a solution for that or is my new WD Caviar Black 1.5 TB hard disk broken?  [  551.162286] ata7: SATA link down (SStatus 0 SControl 310) [  551.162294] ata7.00: link offline, clearing class 1 to NONE [  551.178223] ata7: EH complete [  551.190802] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen [  551.190807] ata7: irq_stat 0x00000040, connection status changed [  551.190811] ata7: SError: { CommWake DevExch } [  551.190818] ata7: limiting SATA link speed to 1.5 Gbps [  551.190822] ata7: hard resetting link   Update Mainboard P7P55D LE: