The problem is question 3 of what I am about to download into this question. I drew a diagram of what the problem actually is, my professor has verified it's correct. I don't want an exact answer to this question, just a way to convert question 3 into an equation so that I can use programming to solve. I have software I have created that can solve for zeros of functions and minimums of functions numerically.  I am thinking that this is a problem of looking for some type of maximum because we want the biggest ladder that can fit through. Is this correct?  It's probably a nooby question, but my trignometry is pretty rusty. I have a feeling it will be blatantly obvious

For one of my homework problems, we had to try and find the maximum possible length $L$ of a pipe (indicated in red) such that it can be moved around a corner with corridor lengths $A$ and $B$ (assuming everything is 2d, not 3d):    My professor walked us through how to derive a formula for the maximum possible length of the pipe, ultimately arriving at the equation $L = (A^{2/3} + B^{2/3})^{3/2}$.  The issue I have is understanding intuitively why this formula works, and exactly what it's doing. I understand the steps taken to get to this point, but there's an odd symmetry to the end result -- for example, is the fact that $\frac{2}{3}$ and its inverse are the only constants used just a coincidence, or indicative of some deeper relationship?  I also don't quite understand how the formula relates, geometrically, to the diagram. If I hadn't traced the steps myself, I would have never guessed that the formula was in any way related to the original problem.  If possible, can somebody give an intuitive explanation as to why this formula works, and how to interpret it geometrically?    Here's how he found the formula, if it's useful:  The formula is found by finding the maximum possible length of the pipe by expressing the length in terms of the angle $\theta$ formed between the pipe and the wall, and by taking the derivative to find when $\frac{dL}{d\theta} = 0$, which is the minimum of $\frac{dL}{d\theta}$ and is therefore when $L$ is the smallest:  $$ L = \min_{0 \leq \theta \leq \frac{\pi}{2}} \frac{A}{\cos{\theta}} + \frac{B}{\sin{\theta}} \\ 0 = \frac{dL}{d\theta} = \frac{A\sin{\theta}}{\cos^2{\theta}} - \frac{B\cos{\theta}}{\sin^2{\theta}} \\ 0 = \frac{A\sin^3{\theta} - B\cos^3{\theta}}{\sin^2{\theta}\cos^2{\theta}} \\ 0 = A\sin^3{\theta} - B\cos^3{\theta} \\ \frac{B}{A} = \tan^3{\theta} \\ \theta = \arctan{\left( \frac{B}{A} \right)^{\frac{1}{3}}} \\ $$  At this point, we can substitute $\theta$ back into the original equation for $L$ by interpreting $A^{1/3}$ and $B^{1/3}$ as sides of a triangle with angle $\theta$ and hypotenuse $\sqrt{A^{2/3} + B^{2/3} }$:  $$ \cos{\theta} = \frac{A^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \sin{\theta} = \frac{B^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \therefore L = A^{2/3} \sqrt{A^{2/3} + B^{2/3} } + B^{2/3} \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3}) \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3})^{3/2} \\ $$  The equation for the formula for the maximum length of the pipe is therefore $L = (A^{2/3} + B^{2/3})^{3/2}$.


How to automate the process in Python of importing any one out of 10 assets from another .blend file? (ideally by clicking a button) I am trying to use append, but I am not so sure about the correct syntax.

I'm searching a way to append a group in Python.  It should behave exactly like the Append function (ShiftF1) works, all objects should be local and editable. The idea is to append a character (with rig etc.) via Python and not Link it (to be able to modify it without making everything local one by one).  Thanks


I have the following classes  Entity  class Entity {   public:     virtual std::ostream& write(std::ostream& os) const {         os << "Can't output Entity";         return os;     } };   And StringEntity  class StringEntity : public Entity {   public:     std::string data;      StringEntity(std::string str) {         data = str;     }      std::ostream& write(std::ostream& os) const {         os << data;         return os;     } };   Using these classes like so  int main(int argc, char** argv) {     StringEntity entity = StringEntity("MY STRING ENTITY");     Entity gen_ent      = (Entity) entity;      entity.write(std::cout)  << std::endl;     gen_ent.write(std::cout) << std::endl;     return 0; }   Because the base Entity class' write function is virtual and write is overriden in the derived StringEntity class, I would expect both write statements to print out MY STRING ENTITY. Instead, the first one correctly prints MY STRING ENTITY, but the second prints Can't output Entity.  How do I override a function such that it is completely overriden (ie. not dependent upon how a variable is declared)?

Someone mentioned it in the IRC as the slicing problem.


I got this error message when restarting my ubuntu laptop. I went into a login loop, and so I pressed ctrl + alt + F3 To access terminal, which I did, but I experienced this error: Command 'lesspipe' is available in the following places  * /bin/lesspipe  * /usr/bin/lesspipe The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable. lesspipe: command not found Command 'dircolors' is available in '/usr/bin/dircolors' The command could not be located because '/usr/bin' is not included in the PATH environment variable. dircolors: command not found Command 'ls' is available in '/bin/ls' The command could not be located because '/bin' is not included in the PATH environment variable. ls: command not found  I temporarily fix this error running below command, but when I open again, this error is again coming, I again running below command. export PATH="/usr/bin:/bin:$PATH"   But when I comeback to login, it still fails with same error. Any help to resolve this? I am on ubuntu 20.04.1 LTS echo $PATH returns -bash: /home/username/.local/bin:/usr/local/bin:...: no such file or directory

Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.


Why is the azimuth resolution in Sentinel (SAR sensor) worse than the range resolution?    The table in this  gives the resolution for SLC products aquired in the different aquisition modes. In all of them the range resolution is better than the azimuth resolution.    Note: This question is totally different from my , as the latter tackles the effects of the incidence angle on the ground resolution (range resolution + azimuth resolution), and this doesn't explain why sometimes the range resolution is better than the azimuth resolution.

On this link (Sentinel1  for a SLC product), the resolution is written as a range from the highest corresponding to low incidence angle, to the lowest resolution corresponding to high incidence angle.  My question is how is the resolution related in general to the incidence angle? And if they are really related, why is the resolution affected by the change in the incidence angle?


Find the units of $\mathbb{Z}[i\sqrt{5}] := \{a+bi\sqrt{5}:a,b  \in\mathbb{Z}\} \subseteq \mathbb{C}$.   By considering the modulus, we get that if $x + yi\sqrt{5} \in \mathbb{Z}[i\sqrt{5}]$ is invertible, we must have that $$\frac{1}{a^2 + 5b^2} \in \mathbb{Z}$$ But this would mean $a^2 + 5b^2 = 1$ which is only possible if $a = \pm 1$ and $b = 0$. Am I doing something wrong?

I need help describing all the units in the ring $\mathbb{Z}[\sqrt{-d}]=\{a+b\sqrt{-d}|a,b\in\mathbb{Z}\}$ where $d>0$ and is square-free.  Thanks.


This 12-year-old question was just resurrected by a brand-new user:  The Community system user has a habit of providing attention to un-answered questions by pushing them to the top of the feeds (this is a good thing!); however, the question in...question, can never have an answer selected as correct because the original poster is long gone: their account has been deactivated or deleted (no profile). Users, particularly new ones, don't tend to notice the age of a question before answering, or that other answers are adequate and just need to provide an upvote instead of a whole new, potentially not useful, answer. This behavior inevitably could cause an infinite loop of "No selected answer, Community pushes it to the top of the feed, uninformed user adds an answer, [time passes], No selected answer, Community pushes it to the top of the feed, ...continue ad infinitum" Should there be a system in place to review unanswerable questions like this and potentially delete them? Either add a queue for real users to review them or add logic to Community to purge them after say, 12 months?

As we , we are kicking off a project to begin tackling the issue of outdated answers. That post goes into detail on the initiative and our approach. We are focusing our initial research efforts on Stack Overflow, and not on other sites on the Stack Exchange network. We understand that the issue with outdated answers is not exclusive to Stack Overflow and other technical sites may have similar issues. However, none of the other sites operate at the scale of Stack Overflow:  more than 31 million answers, compared to 11 million for the rest of the network. And Stack Overflow is our oldest site, so it is the site where the pain is most acute. Rather than trying to shoot for a one-size-fits-all solution that may actually fit none, we are laser-focused on uncovering the Stack Overflow use cases and coming up with initial solutions that work really well for Stack Overflow.  We are optimistic that many of the learnings from Stack Overflow will also be relevant and helpful for similar issues faced by other sites on the network. As we get further down the road, we will evaluate whether the Stack Overflow solution can also work for other sites and solicit your feedback here on Meta Stack Exchange. With this in mind, feel free to share any initial thoughts on how you've experienced outdated answers on other Stack Exchange sites and any ideas you have about ways to attack this problem.


When I download a package in Ubuntu, what files does it install on my system and where?  I'm just curious about the package structure in general (I searched and it doesn't look like anyone's asked this on here before).  It will obviously differ to some extent from package to package, but I'm guessing there must be some 'standard' guidelines that are followed?  Also, are the packages in the Software Center the same as the packages that are available through apt-get?  If not, how can I see what packages are available in apt-get and what they do?

Under Windows, most applications and application data are stored in a special directory known as C:\Program Files (and occasionally C:\Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?


I want to travel to UK. I have Thailand passport. Currently working in Malaysia as a domestic worker. My employer want to sponsor me to follow his wife to travel to UK and Paris. but my visa UK visa got rejected.   Based on the refusal, I need to provide a letter of leave from my employer. I can get that letter as he is the one who is sponsoring me  second reason is because I can't provide a bank statement that prove my salary. I did provide them with my bank statement. But I received my salary in cash every month. I am currently working with the same employer for more than 7 years.  Can I provide my payslip to support my income as I only received my monthly salary by CASH. I have no other bank account and all my money is saved somewhere but not under my name.  Can i reapply again and submit the necessary document(leave letter from employer and payslip) and deposit all my previous salary that i received in cash and provide the payslip to justify the large deposit amount ?  please help

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I installed SmartGit on my iMac, and it put itself in the Eric's iMac folder, adjacent to Macintosh HD.     When I open the SmartGit 18.1.2 folder, it has the following contents:    It would be nice if I could have SmartGit in the applications folder. What's a good way of doing this without screwing up the operation of the application? I could just dry moving/copying the .app file to the applications folder...  If it's easiest just to leave it there, I really don't mind.

I've downloaded Firefox and it's now sitting on my desktop as Firefox.dmg. When I double click on Firefox.dmg it opens up a window with Firefox in it so I can use it - does this mean the application has been installed?    Community Wiki'd the question because I think it's a worthwhile question to have on the site for pointing people to, it's not exactly intuitive to do and not a question I think I deserve any rep from.


I have to show that:  $$  \int_{0}^{\infty} \frac{x^{-p}}{x^2+2x\cos\theta +1}\,dx = \frac{\pi \sin (p\theta)}{\sin (p\pi) \sin(\theta)}$$  for $0<p<1$ and $0 < \theta < \pi$.  We can write the denominator as $(x+e^{i\theta})(x+e^{-i\theta})$ and I now want to evaluate this integral using contour integration. However, I have no idea how to do this...

Define a function $f(\alpha, \beta)$, $\alpha \in (-1,1)$, $\beta \in (-1,1)$ as  $$ f(\alpha, \beta) = \int_0^{\infty} dx \: \frac{x^{\alpha}}{1+2 x \cos{(\pi \beta)} + x^2}$$  One can use, for example, the Residue Theorem to show that  $$ f(\alpha, \beta) = \frac{\pi \sin{\left (\pi \alpha \beta\right )}}{ \sin{\left (\pi \alpha\right )} \,  \sin{\left (\pi \beta\right )}} $$  Clearly, from this latter expression, $f(\alpha, \beta) = f(\beta, \alpha)$.  My question is, can one see this symmetry directly from the integral expression?


When transferring a song from a CD to my iTunes library (or downloading an .mp3), I've noticed that Explicit and Clean labels are not present (as seen below).    I've already added all the information to every song, and now, all that I'm missing are the Explicit labels. Is there any, preferably programmatic, way to add these labels to songs I've imported to my library without downloading/using a third party program?    I've converted my imported files to AAC versions (.m4a format), which I imagine is more versatile for this purpose.

I have a few CD's that I ripped a while ago that are in my iTunes library, that have an explicit label. They play fine on my local computer.   The problem is, these ripped CDs are not marked as explicit in my iTunes library, so due to a bug in iTunes Match, when I play these songs on other devices, they play the clean versions 'Matched' from iTunes Match. Imagine my surprise when I'm listening to a song I expect to have explicit lyrics all of a sudden clean.   I know that there is a metadata 'flag' somewhere in the file that sets this, and its not available through the iTunes interface. I have seen online that there are tools to edit this flag, but then either hear that it doesn't actually do this, no real decent walk-throughs, or even discrepancies on which field to edit. What do I need, and how do I mark these songs as explicit to then get matched 'correctly' in iTunes Match?  Update:  does let me set the Explicit flag on the files as I was hoping to do. I thought this would solve the problem, but it does not. Also, I noticed that various other albums, with explicit lyrics, do actually sync correctly. The only problem albums I have are a Kanye West album, and a Jay-Z album. But with this question being related more towards how do I get them to work correctly in iTunes Match, im continuing to look for answers.  Final Update: This was an issue with  iTunes Match. After a while, I tried downloading them again, and it pulled the right ones. There were several albums that reported this way, and they are continuously working on it. So it was less of an issue with my actual files, and more of an issue of how the files were indexed on the iTunes Match server side.


I would like to make a Google account (email, youtube etc.) and it requests a mobile number. It makes sense, so it can stop robots making spam designated email accounts, but I don't own a mobile and I don't want to be forced into buying one simply to make a Google account.Is there any other form of verification that I can take?

When I want to register an account with Gmail now, it says "Google will send a text message containing a verification code to your mobile phone."  I don't want to give Google my mobile phone number!!  How do I get around this?


As far as I know, nowadays most of the mathematical literature is written and published in English and mathematicians communicate with each other in English. Although there are certain number of books written in other languages (like EGA), but at the same time their counterparts also appear in English (like Stacks Project). However, many graduate programs still require their students to pass a language translation test in French, German or Russian (which a paper dictionary, not a dictionary app in cellphones, which seems even more ridiculous to me...). I wonder what makes it still necessary to have foreign language requirement as of 2010s.  I believe my question has different focus than this one     Where the questioner specifically asked for advice for the most useful language among French, German and Russian:  I personally have no preference on which to learn, but I was wondering if there were other reasons that would make one language more advantageous over the others in terms of a general mathematical career.  while I am asking why we ever need a second language for mathematical study in 2010s:

I will soon be attending a Ph.D program in mathematics. I do not know how common this practice is, but the department has a requirement that graduate students must learn a foreign language and be able to read and write mathematics in that language. The three choices are French, German, or Russian. I personally have no preference on which to learn, but I was wondering if there were other reasons that would make one language more advantageous over the others in terms of a general mathematical career. Thanks in advance in any response.


I am trying to create a shader which uses camera space normals. To get those normals, I am using the Geometry node and the VectorTransform node as in the following graph.     The result of that graph use on a sphere looks like   If the camera looks towards along -Z axis, that means that all visible (front facing) points should be bluish, like in this other image created directly with OpenGL.    I guess I am misunderstanding something. Can someone guide me on what I am doing wrong/misunderstandnig?

After many hours of searching, trying and scratching my head I turn to you guys. Seems like many other have this same problem but haven't seen any solution to this yet.  I am rendering cars in blender and I do most of my post work in Photoshop. To do this I need a "correct" render of the normals and I just can't achieve this in Blender.  This is a ref image of what I am looking for and this Normal render is from 3Ds or Cinema 4D (I think).  I use this Normal to color range select parts of the car facing a certain way.


I found some .files in my home directory now. They are .local, .mozilla, .java, .Skype, .adobe and many more. They make my home directory messy. How to hide these files? They were not present before.

I wanted to add classpath to my JDK. While searching a way to do it I noticed everyone open .profile file using terminal. But when I want to open and edit it with a text editor I couldn't see that file in Home folder.  Can someone tell me why is this. And also if possible how can I access .profile in home folder the GUI way.


Hello Diplomacy enthusiasts.  I was recently playing an online game of Diplomacy with my friends and unfortunately drew Italy. All was going well until I was overrun by Turkey who made quick work out of Austria (and eventually went on to solo) and he agreed to let me survive in Tunis with an army so long I fight France and let him take my lands, as you do.  Anyways, in Spring 1911, he supported his fleet into my poor, 1 SC nation and I disbanded my unit. After a bit of negotiating, he vacated Tunis in the fall and I had 1 Supply Center that I couldn't build in, and 0 troops. When the game ended.  My question is whether I would have gained a share of the pot if I tied with the others.  Also, does it count as surviving?

Quick Diplomacy question.   If a country has had all armies and fleets destroyed but still have a home supply centre that hasn't been taken are they still in the game ?   I believe yes but not sure. Cheers


I have installed Eclipse Oxygen;when I type   export PATH=$PATH:/home/ivan/java-oxygen/eclipse   in the bash, I can launch eclipse from bash from any location, however, no matter whether I add  PATH=$PATH:/home/ivan/java-oxygen/eclipse   or  export PATH=$PATH:/home/ivan/java-oxygen/eclipse   to /.bashrc or /etc/bash.bashrc, I cannot launch Eclipse without typing   export PATH=$PATH:/home/ivan/java-oxygen/eclipse   every time I launch the new bash.

I found the .bashrc file and I want to know the purpose/function of it. Also how and when is it used?


So this is what it looks like for me, there's a gray square which is not supposed to be there. This is persistent across computers and reboots and cache refreshes:

My profile shows this:    but the toolbar shows this:    It looks like the 24-pixel generated mini-avatar on imgur is broken:    but other sizes are OK:    I realize that this is probably an imgur bug, but I thought it was worthwhile posting it in case other people have this problem. Uploading it again fixed it.


Consider the matrix  $$A=\left(\begin{array}{ccccc} 1 & c & \cdots & c\\ c & 1 & \ddots & \vdots \\ \vdots & \ddots & \ddots & c\\ c & \cdots & c & 1\\ \end{array}\right)$$ for some $c\geq1$. So $A$ is a matrix with every entry equal to $c$, excepts for the diagonal entries, who equal $1$.  If $c=1$, $A$ is singular. Furthermore if $c$ increases, the condition number of $A$ decreases. I want to prove this, but I do not know how. Manually writing out the condition number seems a burden.   So my question is: how do I compute the condition number of $A$?    Edit: The solution is $$\kappa(A)=\left|\frac{\lambda_{\mathrm{max}}(A)}{\lambda_{\mathrm{min}}(A)}\right|=\left|\frac{(N-1)c+1}{1-c}\right|=\frac{Nc}{c-1}-1,$$ since the eigenvalues of $A$ are $1-c$ and $(N-1)c+1$, where $N$ is the number of rows (or columns) of $A$.   However, I retrieved the eigenvalues by throwing a couple of matrices into WolframAlpha. So my question reduces to how to prove $1-c$ and $(N-1)c+1$ are the eigenvalues of $A$?

Let $A$ be a real $n\times n$ matrix, with ones in the diagonal, and all of the other elements equal to $r$ with $0<r<1$.    How can I prove that the eigenvalues of $A$ are $1+(n-1)r$ and $1-r$,  with multiplicity $n-1$?


Ign:1 https://download.01.org/gfx/ubuntu/17.04/main zesty InRelease  Err:2 https://download.01.org/gfx/ubuntu/17.04/main zesty Release 503 Service Unavailable  Hit:3 http://us.archive.ubuntu.com/ubuntu zesty InRelease  Get:4 http://us.archive.ubuntu.com/ubuntu zesty-updates InRelease [89.2 kB]  Get:5 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]  Get:6 http://us.archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]  Get:7 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 DEP-11 Metadata [52.7 kB]  Get:8 http://us.archive.ubuntu.com/ubuntu zesty-updates/main DEP-11 64x64 Icons [26.3 kB]  Get:9 http://us.archive.ubuntu.com/ubuntu zesty-updates/universe amd64 DEP-11 Metadata [171 kB]  Get:10 http://us.archive.ubuntu.com/ubuntu zesty-updates/universe DEP-11 64x64 Icons [223 kB]  Get:11 http://us.archive.ubuntu.com/ubuntu zesty-updates/multiverse amd64 DEP-11 Metadata [5,840 B]  Get:12 http://us.archive.ubuntu.com/ubuntu zesty-backports/universe amd64 DEP-11 Metadata [5,140 B]  Get:13 http://security.ubuntu.com/ubuntu zesty-security/main amd64 DEP-11 Metadata [12.5 kB]  Get:14 http://security.ubuntu.com/ubuntu zesty-security/main DEP-11 64x64 Icons [11.6 kB]  Get:15 http://security.ubuntu.com/ubuntu zesty-security/universe amd64 DEP-11 Metadata [20.7 kB]  Get:16 http://security.ubuntu.com/ubuntu zesty-security/universe DEP-11 64x64 Icons [36.5 kB]  Get:17 http://security.ubuntu.com/ubuntu zesty-security/multiverse amd64 DEP-11 Metadata [208 B]  Reading package lists... Done  E: The repository 'https://download.01.org/gfx/ubuntu/17.04/main zesty Release' does no longer have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.

I use Ubuntu Studio 16.04 LTS, 64 bit, into 3 desktop PC (Intel i5 and i7) and 4 laptops (Intel Pentium). All with 8 GB of RAM.  Since about a week ago, I've been getting the following message each time I try to update/upgrade the system:  https://download.01.org/gfx/ubuntu/16.04/main xenial InRelease" has no Public Key. It isn't safe to use this kind of repository.   I tried to remove that repository (which I don't remember adding) with the terminal command:  sudo add-apt-repository -r <repository to  remove>   But, even though the system seems to perform that action, the repository is used next time I type:  sudo apt-get update   This repository isn't visible in Synaptic Software Manager and/or Ubuntu Software Center.  How can I fix it?


I utterly forget the plot of this tale, but it includes a vivid description of a nuclear bomb going off deep inside a large, underground lunar city of many levels. The explosion, set off in secret, is deep enough that it does not emerge onto the surface immediately. The death toll is catastrophic.   The story may date to the 80s. In an English-language collection of short stories.

I would like to know the title of the short story that I believe takes place on the moon.  The setting is a mall or some other very public location and the main character is a police officer.  She needs to talk a sentient bomb out of exploding.  I know there was the John Carpenter film "Dark Star" with a similar plot line but I'm trying to identify the short story and the author.


So I've got a table of 'skills' for which an input looks up an array to check if it can be added to a current skills array to be displayed in the table.  Each row has a remove button, however adding new rows to the table - the remove button doesnt seem to work.  Here is the JSFiddle I'm using:   This is how I currently remove the table row:  $('.remove-skill').on('click', function() {     var $kill = $(this).parent('td').parent('tr');     $kill.addClass('danger');     $kill.fadeOut(1250, function() {         $(this).remove();     }); });

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


I have a server running ubuntu server. It is behind a proxy...I don't know if that makes a difference. But I have found that a couple of processes I've tried, get terminated when I log out of the SSH session. For instance, I have ipython notebook server and a Mongod server processes running on that server. Whenever I logout, both of these processes die even though they are run in the background with &  I have recently discovered the nohud command which works fantastically. However, why is it that I have not encountered this with most servers? Is there some sort of default in unbuntu server that kills all processes by a user when they hangup from SSH? Can I run nohud by default for all processes?  Thank you

So, say I get disconnected from an SSH-session after I've started rsync or cp or any other command that can be long running. Does that command keep running until it's finished after I get disconnected or does it just get killed?  Always wondered this.


I voted to close a question as unclear but then I realized that the question was too broad instead.   Is there a way to change my close reason because if I retract the close vote, I won't be able to vote to close again?

Voted to close a question based on "lack of minimal understanding".  Later realized the question was a duplicate.  How to I change vote to mark as duplicate instead?


I run Ubuntu in VirtualBox.  18.04 is considerably less responsive than 16.04, with exactly the same VM settings (3D acceleration, 3 cores, 4 GB RAM, guest additions installed, host: macOS, VirtualBox 5.2.18).  18.04 is often slow to respond to clicks and even typing. It is borderline unusable. 16.04, on the other hand, works perfectly fine.  The 18.04 is a fresh install.  Is this considerable performance drop an inevitable consequence of switching to Gnome 3?  Are there any simple settings I can try to make it usable?  I do not need animations or fancy visual effects—this in an OS in a VM so it gets only occasional use, and I mostly just need the terminal.    More details:   Right after boot, performance is satisfactory After opening a Terminal, and maximizing it, performance becomes awful. It does not recover even after unmaximizing the Terminal window, or closing it. Turning off 3D acceleration in VirtualBox makes is more sluggish after startup (e.g. moving window on the screen is choppy), but it never gets unusably slow after maximizing a window.

Ubuntu runs very slowly inside of VirtualBox.  How do I run Ubuntu with unity or enabled transparency smoothly with VirtualBox?


I think I may have a virus. How would I go about checking for a virus and how can I protect my computer from any other virus? Please give detailed answer as I'm still learning about Ubuntu.

I installed  via Terminal (Ctrl+Alt+T) with:  sudo apt-get install clamav   but how can I scan for viruses?


I hope this is a valid question to ask. I wondered about the different expressions one can use for heavy or unstable breathing. Rather than being heavy breathing from exercising, it's heavy, laboured breathing due to negative emotions.   Would these work ? :   "uneven breath/breathing" "quickening breath"   Is there also an expression or phrasing to implement a "breathing that's growing... [rasp/laboured/winded] ?  Are there other expressions to describe the following statement "her pulse quickened". I assume it depends on context, but does this expression implies a positive source or a negative one ?  In terms of regular breathing, can one qualify someone's breath of "steady", or "quite steady" ?  Essentially, how does one breathe in English ?


Suppose $L$ is a linear operator on a finite dimensional vector space $V$ over a field of characteristic $2$. If $L\circ T=T\circ L$ for all isomorphisms $T$ on $V$, does this imply $L=\lambda I$ for some $\lambda$?  I am interested because I was able to prove it is true when the ground field is not of characteristic $2$.   I chose $\{x_1,\dots,x_n\}$ to be a basis of $V$. I defined the isomorphism $S_{ij}$ as the isomorphism swapping $x_i$ and $x_j$, and fixing all other basis vectors. I express $L(x_i)=a_{i1}x_1+\cdots+a_{in}x_n$ for each $i$. Evaluating $$ L(S_{ij}(x_i))=S_{ij}(L(x_i)) $$ and equating coefficients shows $a_{ii}=a_{jj}$ for all $i,j$, and $a_{ij}=a_{ji}$ for all $i,j$. I then defined  for $i\neq j$, $N_{ij}$ as the isomorphism which sends $x_i\mapsto x_j$, and $x_j\mapsto -x_i$, and fixes all other basis elements, which is an isomorphism as it sends a basis to a basis. Evaluating $$ L(N_{ij}(x_i))=N_{ij}(L(x_i)) $$ and equating coefficients shows $$ -a_{ij}=a_{ji}=a_{ij} $$ so $a_{ij}=0$ when $i\neq j$. It then follows that $L=aI$ where $a=a_{11}=\cdots=a_{nn}$. The last part hinges on the fact that $2x=0\implies x=0$. Does the result still hold in the case where the characteristic is $2$?

The question is from Axler's "Linear Algebra Done Right", which I'm using for self-study.  We are given a linear operator $T$ over a finite dimensional vector space $V$. We have to show that $T$ is a scalar multiple of the identity iff $\forall S \in {\cal L}(V), TS = ST$. Here, ${\cal L}(V)$ denotes the set of all linear operators over $V$.  One direction is easy to prove. If $T$ is a scalar multiple of the identity, then there exists a scalar $a$ such that $Tv = av$, $\forall v \in V$. Hence, given an arbitrary vector $w$, $$TS(w) = T(Sw) = a(Sw) = S(aw) = S(Tw) = ST(w)$$ where the third equality is possible because $S$ is a linear operator. Then, it follows that $TS = ST$, as required.  I am, however, at a loss as to how to tackle the other direction. I thought that a proof by contradiction,  ultimately constructing a linear operator $S$ for which $TS \neq ST$, might be the way to go, but haven't made much progress.   Thanks in advance!


I've been encountering an issue regarding the spacing between paragraphs:    In this particular page, as there is a new section starting right on the next page, the paragraphs are stretched in order to fill more of the page. Is there a way to avoid this?

I'm writing my bachelor-thesis and have a couple of small sub-sub-sections explaining conversions, like in the following  \subsubsection*{Assignment}  This document only explains non-compound assignments. The other kind, i.e \texttt{a += b}, is supported by the language too, but is not yet implemented.   \begin{itemize} \item If the first is an \texttt{auto} variable, no conversion takes place when assigning       the right hand side to the variable designated by the left hand side.  \item Otherwise, an assignment conversion takes place converting the given value to the type       of the designated variable.  \item Assignment requires an lvalue as the left hand side, and yields an lvalue result.  \end{itemize}  \subsubsection*{Multiplication} % ...   But latex renders it quite ugly with much space in between the items. I think it does so to fit the whole page. How can I tell it not to do so? Is what I'm doing right at all?


I'm a beginner attempting to learn Python. I am familiarising myself with the list data type; I've defined the following list:  >>> numbers = [1, 2, 3, 4]   Typing:  >>> numbers[0] 1 >>> numbers[1] 2 >>> numbers[2] 3 >>> numbers[3] 4   Given this, why do I get the following when I attempt to retrieve the following list elements:  >>> numbers[0:3] [1, 2, 3]   Why isn't the list element '4' included in the response from the interpreter?  Thank you for your help.

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I looked at the most popular answer in  thread, but people said it broke their system. Is there no 'official', safe way to do this?

Suppose I want a more recent version of software than is available for my current version of an operating system, what can I do?  Cases to consider:   There are semiofficial/official sources of additional packages available for that version of the OS. E.g. backports.org for Debian or PPAs for Ubuntu. There are no more recent versions of the package available for that version of the OS, but there are more recent versions available for more recent versions of the OS. This is the standard case for backporting. There are no packaged versions of more recent versions of the software available. Options available are to package the more recent version.     Per  this is intended as a place to put canonical answers for the following. Answers should probably be made community wiki.


Please help me to solve this question  $$(\cos x-\sin x)\left(2 \tan x+\frac{1}{\cos x}\right)+2=0$$  I tried to open the whole LHS expression and the tried to bring it in square format. Something like this $$\left(\cos x +\frac32\right)^2 - \left(\sin x+\frac12\right)^2-(\sin x-\cos x)^2 =2$$ But after this I am not able to proceed forward.

Real solution of equation $$(\cos x -\sin x)\cdot \bigg(2\tan x+\frac{1}{\cos x}\bigg)+2=0.$$   Try: Using Half angle formula   $\displaystyle \cos x=\frac{1-\tan^2x/2}{1+\tan^2 x/2}$ and $\displaystyle \sin x=\frac{2\tan^2 x/2}{1+\tan^2 x/2}$  Substuting These values in equation  we have an polynomial equation in terms of $t=\tan x/2$  So our equation $$3t^{4}+6t^{3}+8t^{2}-2t-3=0$$ Could Some Help me how to Factorise it.  OR is there is any easiest way How to solve it, Thanks


In OneNote, I'd like to disable spell checking for a single page which is written in a fictional language and thus full of squiggly lines. I'd like to keep spell checking on for all other notebooks / pages.  Is that possible in OneNote 2013?

How can spell checking be turned off for a portion of a OneNote page?  The set language form does not have a checkbox (like the one for Word 2010 has). There are over 100 languages to choose from, but all of then will perform some sort of proofing.


The objective function of interest is: $$ \phi = \text{log}|PWP^T| + \text{tr}((PWP^T)^{-1}PVP^T) $$ where $P = J + XU^T$ and $V$, $J$ and $U^T$ are known matrices. I assume that the $V$ and $W$ are positive definite.  The first partial derivative of $\phi$ with respect to $X$ is \begin{align*} Y^{-1}(JWU + JVU) + Y^{-1}X(U^TWU + U^TVU) - Y^{-1}ZY^{-1}(JWU + XU^TWU)  \end{align*}  where $Y = PWP^{T}$ and $Z = PVP^T$.  The first partial derivative with respect to $W$ gives $$ PWP^T = PVP^T. $$  Hence combining the solutions of partial derivatives $X = -JVU(U^TVU)^{-1}$.  If I compute $\nabla_{xx}\phi$ and evaluate at the solution what I would get is $$ [(U^TWUX^T + U^TWJ^T)Y^{-1} \otimes Y^{-1}](I + K)[(U^TWUX^T + U^TWJ^T)^T \otimes I] + (U^TVU \otimes Y^{-1}) $$  where $K$ is the commutation matrix. However, I can't see that it is symmetric. If this is not symmetric, Hessian would not be symmetric. Is it always the case that the Hessian needs to be symmetric?

Are there any functions, $f:U\subset \mathbb{R}^n \to \mathbb{R}$, with Hessian matrix which is asymmetric on a large set (say with positive measure)?   I'm familiar with examples of functions with mixed partials not equal at a point, and I also know that if $f$ is lucky enough to have a weak second derivative $D^2f$, then $D^2 f$ is symmetric almost everywhere.


I've messed things up a bit.  I was running Windows 7 ultimate 64-bit in my HP laptop. I was using live USB of Ubuntu 11.10 and then I tried to install Ubuntu on hard disk using the same live USB.   To install Ubuntu, I chose 50 GB free partition and 325 GB swap space or something.   While installing Ubuntu, my pen-drive came out and everything stopped. Then I booted again using the pen-drive and finished installation of Ubuntu.   Now the problem is I can't access my Windows partition as they were in extended partition plus I am not able to boot Windows 7 from the booting screen and I can't even repair or recover it.   Whenever I try to boot Windows it shows the message HARDWARE INACCESSIBLE, TRY TO REPAIR YOUR WINDOWS USING DISC. When I tried using disc, there was no instance of OS available to repair.   I can't even install fresh Windows 7 as the setup asks me to load drivers of Hard disk.  I have important data in the Windows root drive as well as in other partitions. How can I recover that data?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


On asking for a number, after entering, it is saying : Exception in thread "main" java.lang.NullPointerException at line ch[i].  Scanner scanner = new Scanner (System.in); System.out.println("Enter a number"); int num = Integer.parseInt(scanner.nextLine()); //reverse number logic  int q = num / 10; int r = num % 10; num = q; char ch[] = null; int i = 1;  while(r > 0) {   i++;   ch[i] = (char) r ; }

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


I understand that the wavefunction in Quantum Mechanics is usually treated as a complex vector with one real and one imaginary component.  Does it make an actual difference in terms of the answers we get, if we treat the wavefunction as having two real components instead of one real and one imaginary component, or is it just a matter of convention to treat the wavefunction as having one real and one imaginary component instead of two real components?

I am trying to understand how complex numbers made their way into QM. Can we have a theory of the same physics without complex numbers? If so, is the theory using complex numbers easier?


I am reading the first chapter of Aliprantis and Border's Hitchhiker guide and there is a passage on Russel's paradox that has me confused. It reads:  Russell's Paradox is a clever argument devised by Bertrand Russell as an attack on the validity of the proof of the Diagonal Theorem. It goes like this. Let $S$ be the set of all sets, and let $\varphi:\mathscr{S}\rightarrow\mathscr{S}$ be defined by $\varphi(A)=\{B  \in \mathscr{S}: B \in A\}$ for every $A \in \mathscr{S} $. Since $\varphi(A)$ is just the set of members of $A$, we have $\varphi(A)=A$.  However, if we take $A=\{1,2\}$ then $\varphi(A)=\emptyset$ since $A$ does not contain any sets, which are the elements of $\mathscr S$. Am I missing something? Should $\varphi$ be defined from $2^{\mathscr S}$ to $2^{\mathscr S}$? Thanks!

I've been trying to understand in a more formal way what a set actually is, but I have some questions. According to the axiom of regularity for every non-empty set A there exists an element in the set that's disjoint from A. That would mean that such element is also a set, right?   I read here:  , that in axiomatic set theory everything is a set, I understand that natural numbers are constructed from the empty set, integers are constructed from the naturals, rationals from the integers, and reals from the rationals. I can see how every element in such sets is also a set. But, for example, in the set of all the letters of the alphabet, or the sample space of an experiment when the possible results are not numbers, or the set of my classmates; it's not clear to me how their elements are also sets. So, are they really sets? Is every element in a set also a set?  Thank you


I have Ubuntu 18.04 and python 3.7. uname -a Linux my-dell-laptop 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux  When I run sudo apt-get update I get this error : E: The repository 'http://dl.bintray.com/aluxian/deb stable Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'https://dl.bintray.com/aluxian/deb dev Release' does not have a Release file. N:  N: See apt-secure(8) manpage for repository creation and user configuration details.

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


I used to access files by typing  \\\fileserver2 in run command in windows. How do I access them in Xubuntu 16.04 LTS?   I tried using ftp://fileserver2 in terminal but it said there is no such directory.  I am new to Linux so I have no idea. I followed the answer to "" but it didn't work.

I have a samba share on my LAN that requires a username and password to obtain write access (otherwise it defaults to read-only).  I can't figure out where in the Unity desktop I can connect to the share and be prompted for my login credentials.  I can mount the drive, of course, but then I'm browsing as a guest (read-only).  What gives?


When I run   keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android | openssl sha1 -binary | openssl base64   I get an android debug key hash, but it comes with a warning like this:     Warning:      The JKS keystore uses a proprietary format. It is recommended to   migrate to PKCS12 which is an industry standard format using "keytool   -importkeystore -srckeystore /home/racu/.android/debug.keystore -destkeystore /home/racu/.android/debug.keystore -deststoretype pkcs12".      Dswo5LsHyIM+dEniA4dpvwvs7c5=   How can I remove the warning from the output, I'm only interested in printing the very last line:      Dswo5LsHyIM+dEniA4dpvwvs7c5=   As this is part of a script I use to get all my key hashes. keytool does not have an -qquiet option

I am currently looking ways to suppress error command in Linux, in particular, the command cp.   I do:   root@ubuntu:~$ cp /srv/ftp/201*/wha*/*.jj ~/. cp: cannot stat `/srv/ftp/201*/wha*/*.jj': No such file or directory   How do I suppress the error message that gets printed on the screen? I.e., I don't want to see this error message in my monitor.


I'm playing with module building in Drupal 8, but can't really figure out how to include a custom class which does not extend any other. The class' only purpose is to reduce the amount of code I have in a controller.   However, I get the error:      Fatal error: Class 'Drupal\first\FirstClass' not found in /var/www/drupal/modules/first/src/Controller/DefaultController.php on line 30   How do I let DefaultController.php know where to find FirstClass.php? Should I just do an include_once()?   Routing file:   first.default_controller_hello:   path: 'first/hello/{name}'   defaults:     _content: '\Drupal\first\Controller\DefaultController::hello'     _title: 'first Title'   requirements:     _permission: 'access content'   Controller function:  namespace Drupal\first\Controller;  use Drupal\Core\Controller\ControllerBase; use Drupal\first\FirstClass;  class DefaultController extends ControllerBase {    /**    * hello    * @return string    */   public function hello($name)   {     $a = new \Drupal\first\FirstClass();     dsm($a);         return "Hello ".$name." !" . $a->getV();   } }   Outside Class:  <?php  namespace Drupal\first;  class FirstClass {       public static function getV() {         return 'well it works?';     } }

In Drupal 7 module development, I could include a custom inc, api, or php class file using the  directive in the module.info file or the drupal_load_included() function.   With D8 using PSR, what is the proper way to package up a "plain ole PHP object" and reference it in DefaultController.php? Think something like: $a = new POPO();.  Is just giving the PHP file containing the class a namespace sufficient? How does the controller (or module in general) know to reference or scan for that class?


What happens if theoretically there were more or less charges?

Upon reading my book on physics, it mentions that there are only two discovered types of electric charges. I wonder if there could be a third type of elusive charge, and what type of effects could it have upon matter or similarly?


I want to write a batch file which gives me free space left in C drive.

Is there a way to get the amount of free diskspace of a disk or a folder in a CMD without having to install some thirdparty applications?  I have a CMD that copies a big file to a given directory and could of course use the errorlevel return from the copy command, but then I have to wait for the time it takes to copy the file (eg...to that then the disk is full and the copy operation fails).  I would like to know before I start the copy if it is any idea at all. Tried the DU.EXE utility from Sysinternals, but that show occupied space only.


My MacBook Air's Wi-Fi is maxed out right now for receiving.  Now I am trying once more to download the High Sierra update. But it's telling me 6 hours left and on my usual Wi-Fi connection I only achieve half the download speed and High Sierra usually tells me the whole download will take about 2 hours.  So I think something else must also be using my bandwidth.  I'm only familiar with top from experience using Linux in the past and this doesn't seem to tell me about network usage.  Is there something in the Mac system which can tell me which apps are using my Wi-Fi?

I see suddenly that my downstream bandwidth is 400 KBps which is the maximum my ISP gives me, so there's an application downloading at its top capacity. The thing is I didn't start any download, so it's doing it in the background without telling. How can I know which app or process is using it? Or, basically, how can I determine how much bandwidth each open process or application is using?


I'm trying to save a file called 'save_as' as an argument from the command line.  import os.path  script, file1, save_as = argv  ...snip...  full_path = os.path.join(r "C:\Users\User\Desktop\Folder_Name\", save_as)   Getting error - SyntaxError: EOL while scanning string literal  Any ideas?

Technically, any odd number of backslashes, as described in .  >>> r'\'   File "<stdin>", line 1     r'\'        ^ SyntaxError: EOL while scanning string literal >>> r'\\' '\\\\' >>> r'\\\'   File "<stdin>", line 1     r'\\\'          ^ SyntaxError: EOL while scanning string literal   It seems like the parser could just treat backslashes in raw strings as regular characters (isn't that what raw strings are all about?), but I'm probably missing something obvious.


Over the past week we have been a victim of two seperate ddos attacks varying in scale.  The last one was very large and very hard to mitigate.  We are looking at solutions from veriSign and Akamai but the prices are so steep.  I found a company called BlockDOS.net and their prices are much more reasonable but I've never heard of them and can't find much information about them.  Before I trust our e-commerce website to a comapny like this I typically like to have more info.  Does anyone have experience with BlockDOS.net or can anyone recommend another provider?  Thanks

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I am trying to pick the display name, mobile number from the contacts in phone and showing these in a list by using a list view. But I'm getting null pointer exception while running the following code:  public class SeeActivity extends ListActivity {     public String [] allname;        public String [] allnumber;        public int listcount=0;        public String [] details;        String[] PROJECTION = new String[] {                ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,                ContactsContract.CommonDataKinds.Phone.NUMBER            };       @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);   ;          Cursor phone= getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,PROJECTION ,null ,null ,null);         try{         while(phone.moveToNext())         {               String name= phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));            String number=phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));            allname[listcount]=name;            allnumber[listcount]=number;            details [listcount]=name+"    "+number;            listcount=listcount+1;          }         ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,                 android.R.layout.simple_list_item_1,details);         setListAdapter(adapter);         ListView l=getListView();            l.setOnItemClickListener(new OnItemClickListener() {              public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,                     long arg3) {                 Toast.makeText(getApplicationContext(),((TextView)arg1).getText() , Toast.LENGTH_SHORT).show();               }         });}        catch( Exception e)        {            Toast.makeText(getApplicationContext(),e.toString(),Toast.LENGTH_LONG).show();           }        }   }

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


I wanted to print a random number that starts with 30 and ends with 95. But it still prints 29 and lower. Here's my the code of formula that I used. ran_num = (95 - 30 + 1) + 30;

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


I'm brand new to learning to code and can't figure out why my below function is not working as intended.  I've searched through many other questions/answers but can't seem to find a solution that works. The goal of the below code is to have the computer choose from the array (rock, paper, scissors) and then to prompt the user to input their choice.  To see if what I had so far worked, without creating the full if, else function, I simplified it for now so that the user can only win in one scenario. Even if the computer chooses scissors and I input rock as the user which is supposed to be the winning combination - it always gives the "Hmm?" message....why?! I thought perhaps it's because compsChoice is a number, but I can't seem to figure out how to make it a string.  I tried the String() and .toString methods but they did not work - maybe I wrote the syntax wrong... <script>  function computerPlay() {  const gameInputs = ['rock', 'paper', 'scissors']; let compsChoice = [Math.floor(Math.random() * gameInputs.length)];  console.log(gameInputs[compsChoice]);  }  computerPlay();   function playRound (compsChoice, userSelection) { userSelection = prompt ("Rock, Paper or Scissors?");   // only alerts HMM no matter what... if (userSelection === 'rock' && compsChoice === 'scissors') { alert ('You WIN!'); } else { alert ('HMM?'); } } playRound(); </script>

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


I got HttpStatus 500 with nested exception and java.lang.NullPointerException im making a multicurrency converter i used to debug when it get here the error starts currencypojo.setAmount(BigDecimal.valueOf(Integer.parseInt((request.getParameter("txtAmount")))));  MultiCurrencyController.java  package com.multicurrency;  import java.math.BigDecimal;  import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;  import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController;  public class MultiCurrencyController extends AbstractController{      private MultiCurrencyPOJO currencypojo;     @Override     protected ModelAndView handleRequestInternal(HttpServletRequest request,             HttpServletResponse response) throws Exception {         currencypojo.setAmount(BigDecimal.valueOf(Integer.parseInt((request.getParameter("txtAmount")))));         currencypojo.setCurrency(request.getParameter("currency"));         return new ModelAndView ("home","CurrencyInfo",currencypojo);     }      public void multiCurrencyPOJO(MultiCurrencyPOJO currencypojo){         this.currencypojo=currencypojo;     } }   MultiCurrencyPOJO.java  package com.multicurrency;  import java.math.BigDecimal;    public class MultiCurrencyPOJO {     private String currency;     private BigDecimal amount;      public String getCurrency() {         return currency;     }     public void setCurrency(String currency) {         this.currency = currency;     }     public BigDecimal getAmount() {         return amount;     }     public void setAmount(BigDecimal amount) {         this.amount = amount;     }      public static BigDecimal getExchangeRate(String currency) {         return null;      } }


How to show that $\Phi_{p^n}(X)=\Phi_p(X^{p^{n-1}})$ with $p$ prime where $\Phi_n(X)$ is the cyclotomic polynomial define by $$\Phi_n(X)=\prod_{\underset{\gcd(k,n)=1}{k=1}}^n(X-e^{\frac{2ik\pi}{n}}).$$  I have shown already that $$X^n-1=\prod_{d\mid n}\Phi_d(X)$$ and that  $$\Phi_p(X)=\prod_{k=1}^p(X-e^{\frac{2ik\pi}{p}})$$  but I'm not able to conclude that  $\Phi_{p^n}(X)=\Phi_p(X^{p^{n-1}})$ with $p$ prime.

Well I attempted to try this but I failed to solve it: So $$\Phi_{p^{n}}(x)= \frac{x^{p^{n}} - 1}{\Phi_{1}(x) \Phi_{p^{2}}(x) \dots \Phi_{p^{n-1}}(x)}$$  Now I'm just stuck here. I saw a result somewhere on the net that said $\Phi_{p^n}(x) = \Phi_p(x^{p^{n-1}})$. I would just use that, but I don't see why that result is true or know how to show that's true.  How do I approach this?


Could you tell me if there is any difference in meaning between since when did it become and since when has it become? For example:  Person A: I'm going to the dentist tomorrow. It's such a pleasure. Person B: Since when did it become a pleasure for you?/Since when has it become a pleasure for you?  Are both perfectly natural in the context?

Here I know I have one present perfect and present perfect continuous sentence.   I have lived in Europe for 2 years. I have been living in Europe for 2 years.   Can you use both of them interchangeably? What is the exact difference between them? To me both suggest that the person is still living in Europe.


I'm doing a fresh install of drupal7 on Ubuntu following .  When I get to the point of  (by pointing the browser at localhost/drupal7/install.php) it just gives a blank screen.  Most questions/help about the Drupal blank screen relate to site setup but as this is a new install, I haven't created any sites yet so am unable to figure out what to do.  Does anyone know how to debug or move past this issue?

How can I see the error messages when the site I am working on gets a white screen?


I have 2 tables, events and event_users:  Events  id      int   type    int date    date      time    time        Event_users  event_id    int user_id     int user_role   int ...   Events can have many event_users (one-to-many relationship).  When I insert more than one event in the Events table, the query is:  INSERT INTO events     (type,date,time) VALUES     (1,12-02-14,08:15:00),     (1,13-02-14,08:15:00),     (1,14-02-14,08:15:00),     (1,15-02-14,08:15:00)   But at the time I know the events table info, I also know some of the event_users table info.  So, because I need the events.id to write the event_users record, how can I insert the events and the event_users records in one query? The database is MySQL.

Suppose I have a table with an auto_increment column, and then insert multiple values in a single statement:  insert into foo (bar) values ('a'), ('b'), ('c');  From the documentation, last_insert_id() returns the first generated ID for the query, the ID for a in this case.  Does mysql give any guarantees that a b and c will then be assigned sequential values?  In other words, if last_insert_id() returns 1 for a, is there any guarantee that b = 2 and c = 3? Or could there be a scenario where due to multiple concurrent inserts, I could end up with something like "a = 1, b = 5, c = 9"?


With Robert and Renly all dead, are there any male Baratheons left other than Stannis? I'm not looking for bastards, but actual Baratheons.

So at the end of Season 5 of Game of Thrones,      Stannis Baratheon dies (probably).   Suppose that Tommen is discovered to be the son of Cersei and Jaime, due to      The Spanish Inquisition! Umm, I mean, the meddlesome High Sparrow and the faith militant looking for muck to stick to the current royals.   Also, suppose Gendry is unknown to the general public.  Now, by the laws and customs of the 7 kingdoms, and assuming you're not a Targaryen loyalist - who's next in line for succession?  Also, more specifically,       Are there some distant Baratheons (third-degree cousins or something) who might fit the bill? All of Robert's brothers are dead, and he has no cousines, and IIRC also no second-degree cousins.


The question appeared in one of the assignments I am using to self study Probability and Statistics:     I begin turning a deck of cards one at a time. At some point (before I have turned over all $52$ cards) you can bet the next card is red to   receive one dollar; otherwise you receive nothing. Design   a strategy to maximize the probability that you will receive the dollar.   When should you bet?   $E_k$ is the event that bet is placed on card number $k$ and that it is red. Obviously, $E_1=E_2=\frac{1}{2}$ which led me to believe it is immaterial when one bets on the cards. I tried to derive the same using a case for  $E_{k} \text{ when }k-1$ cards have already been drawn.    $P(E_k)=\frac{26}{52-(k-1)}\frac{26\choose{k-1}}{52\choose{k-1}}+\frac{26-1}{52-(k-1)}\frac{{26\choose{k-2}}{26\choose{1}}}{52\choose{k-1}}...\frac{26-(k-1)}{52-(k-1)}\frac{{26\choose{0}}{26\choose{k-1}}}{52\choose{k-1}}$ $P(E_k)=\frac{1}{(53-k){52\choose{k-1}}}\sum_{i=0}^{i=k-1}(26-i){26\choose{k-1-i}}{26\choose{i}}$  How do I evaluate this value? Also I realize for my particular solution, $k\le 26$. What would be a more general solution?

You have a deck of 32 playing cards. Somebody draws one card after another and shows them to you. At any point of time you may bet that the next card is black. If it is indeed black you earn $10, otherwise nothing. If you don't do anything you earn nothing as well. Find the optimal strategy.   In other words you should find the point of time where the quota of remaining red cards in the deck is maximal.   Any hints how to to this?


I have a windows XP (SP2) desktop with 4 partitions C:14 GB ; D: 14 GB ;E: 55 GB; F: 55 GB; (approximate size)  I had installed Ubuntu 10.04 by creating space for it using existing disk partition (as guided by the installer)  Two new partitions were created by the installer (one with 10GB and the other 500MB) which dint have any name like windows partitions (ex: c,d,e,f) So, in the disk management I could see two unnamed partitions and 4 windows partitions (C,D,E,F) . Using Dual Boot I was able to use both windows and Ubuntu  Recently I wanted to uninstall Ubuntu , so followed steps given in the internet.  As guided, I went to Disk Management, right clicked on the first unnamed partition(which belonged to Ubuntu) and clicked Delete Volume.  According to the tutorial only that particular partition should have been deleted. But both my E and F drives disappeared including the other unnamed partition of Ubuntu. Now I can see only C drive (14gb) and D drive (14gb) and another partition which is seen as "120 GB free space" .  Also, I don't have a windows installation CD and I'm getting screen which shows GRUB rescue in the command prompt when I start my computer.  Just when I found out I lost 2 of the drives I shut down my computer. When I started it again I got the GRUB rescue screen and have not been able to login since then.  And I see "120GB free space" instead of E and F drives in the Disk Management.  In MyComputer I can see only C and D drives.  I lost both E and F drives where I had stored most of my data. I badly want the data back.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Background:  I recently flagged  as very low quality, where a user misread or misunderstood a question about JavaScript as being about PHP, and answered with a PHP function. The flag was rejected, with the rationale being:     flags should not be used to indicate technical inaccuracies, or an   altogether wrong answer   I'd like to discuss this and see if I can get a better understanding of what the VLQ flag is intended for.   When I decided to flag the answer, the first two candidates that popped into my head were "Not an Answer" and "Very Low Quality".   To my understanding, the "Not an Answer" flag should be used when there is no discernible attempt to answer the question. That was not the case, since the user did try to answer the question. The VLQ flag is for when no amount of editing can salvage a post. This was applicable, since I obviously can't salvage the answer without changing it entirely. It also seemed to pass , since it was a mildly embarrassing slip up.  Question:  Since this was not a correct use of VLQ, am I correct in assuming that VLQ flags should only be used when a post is barely understandable? That is, as long as it contains coherent sentences, it should not be flagged as VLQ?  As an additional question, if this is the case (readable content cannot be VLQ), are there any other avenues to getting content like this deleted? Should it be deleted? My answer to that last question would be a strong yes, but I'd like to get the community's take on it.

When flagging an answer as "low quality" you see some explanatory text that reads:     This answer has serious formatting or content issues and might not be salvageable.   An effort should be made to improve answers before they're flagged for removal.  I don't mean to discourage any "low quality" flagging at all, so if an answer is old and the user hasn't been back for a while, go ahead and flag it.  But if an answer is only a few hours old and has no downvotes or comments (meaning no one made an effort to communicate that improvement was needed) then I'm hesitant to just delete it.  Moderators just don't have time to look at every low-quality answer on the site.  We need everyone in the community to use the tools at their disposal (downvotes, comments, edits) to deal with these.  Please use flagging for deletion as a last resort.  Naturally this is open for discussion, so feel free to voice your opinion if you disagree with me.


I have the following table:  number  word ======  ==== 1       AAA 2       BBB 2       CCCC 4       CCCC 4       BBB 4       AAA   Now I want to create a new table, where a "number" only occurs in one row. The corresponding values in "word" should be converted to comma sepeareted string.  The result table:  number  word ======  ==== 1       AAA 2       BBB,CCCC 4       CCCCC,BBB,AAA   How can this solved with T-SQL? Thanks in advance.

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


May be Voldemort wouldn't stoop to such a low level as to use tools devised by Muggles to do his bidding, but still, after Voldemort became capable of touching Harry after regenerating in the fourth book, if he had just stabbed him with the knife that Wormtail used to cut off his own arm, would Voldemort have been able to destroy Harry once and for all?     It seems that every time Voldemort directly attacks Harry (in Godric's Hollow, in the graveyard, in Hogwarts), the reason his plan doesn't work is due to some kind of magical rebound. Would he have been able to destroy Harry using conventional means, either before or after his resurrection in the fourth book?

Is there a reason why Voldemort specifically tried to kill Harry using magic?  What was there that prevented Voldemort from just killing Harry using a knife or some other means?  Death eaters and Voldemort are not the same.


Is there any plugin that would allow the cover images from eBooks to be seen in  Nautilus file directory windows (in Ubuntu 14.04 / Unity)? I'm looking for something that would give me cover images like I see for PDF eBooks in Nautilus.

Question:  Ubuntu's file manager, Nautilus, comes with a wide support for file previews. These thumbnails are handled by helper programs called thumbnailers.  The number of thumbnailers that come preinstalled with Ubuntu are limited and thus some more exotic file types aren't rendered by default.   What additional thumbnailers can I install to activate previews in these cases?     Related Q&As:      Note:   Feel free to contribute to this list by editing the community wiki answer. If you do so please follow the guidelines in  and use the preexisting pattern to keep the answer consistent.


Having read many links about setting up templates on classes I have got to this perplexing compiler error:  Linking... main.obj : error LNK2019: unresolved external symbol "public: __thiscall test<int,int>::test<int,int>(int)" (??0?$test@HH@@QAE@H@Z) referenced in function _main fatal error LNK1120: 1 unresolved externals   The offending code, as simply as possible is:  test.h  template<typename U, typename V> class test { public:     test(int number); };   test.cpp  #include "test.h"  template<typename T, typename U> test<T, U>::test(int number){}   main.cpp  #include "test.h"  void main() {     test<int, int> a = test<int, int>(4); }   Clearly the previous code does nothing useful, I am simply building a model of templates to start a project. Can anyone explain what I'm not understanding about structuring this solution to meet the ends of having a templated class that can construct itself correctly?

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


I tried to use Boot Camp Assistant to install Windows on my MacBook Air. Long story short, due to installation issues, I wiped my MacBook Air drive.  I couldn't get my Mac to recognise a bootable disc of Yosemite made using . After some more fidling I managed to install Windows 7 on my Mac but now I need to find a way to install OS X.

I have a MacBook Pro  How can I install OS X Mavericks if my HDD only has Windows on it?


I have dropdown on page with this menu item:
Mark as New
   And I have jquery event handler for click on this   $(function () {      $('.change-state').click(function () {          var attr = this.dataset;          $.ajax({              method: 'POST',              url: '@Url.Action("ChangeReportStatus", "Default")',              data: { id: attr.id, status: attr.state },              success: function (data) {                  var name = '#report-number-' + attr.id;                  $(name).html(data);              }          });      }); });   And when I open my page, click this  I have changes by ajax, but if I try to click it again, nothing works. I think it's because I using javascript:void(0), but without this my ajax refresh all page, not only element. Please help me to solve this issue.

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


Sometimes one finds a word he doesn't know .. but is there a list of words which could be memorized over several months maybe a list of words .. I don't need a short one or one with easy vocabs or repeated vocabs .. but also I don't want a huge list which has words which are not known by speakers ..  I think it's not 3000 words of oxford or else because lots of them are already known and there are words outside this list which are used also in language .. what do you suggest?

Is there a free list of 1000 most frequent words used in everyday English? If there is a list with usage examples (as each of those words has multiple meanings for sure, not to cound phrasal verbs), it would be even greater.  Is there something alike, but with phrases? (E.g. 1000 most frequent phrases)


I am interested in watching Star Trek and have a few questions about doing so. Firstly, I have never watched anything with an 'old' feel to it. For some reason I just can't get into them but I hope that's not the case with Star Trek.  I have seen the first 10 minutes of 'Star Trek: The Original Series' and it was too much to for me. Is it possible to skip this series?  This order has been recommended but not sure if it's good:   Star Trek Films 1 through 6 Star Trek: The Next Generation Star Trek Film 7 Star Trek: Voyager Star Trek Films 8 through 10 Star Trek: Deep Space Nine Star Trek: Enterprise   Also do the new movies have any significant relationship with any of these previous TV series/movies? So is it possible to watch them without watching any of the rest? It seems like a completely new canon so not sure.

I don't know anything about Star Trek except for the fact that it's about spaceships.  In  the person only wanted to watch the TV series. I want to watch every movie and TV series there is about Star Trek but I don't know where to start. I found this page on  which is about a time line. Do I need to watch it in this order? Are the movies and TV series related?


Originally posted at  - can we get a "Flag Profile" option to purge the inevitable 's and 's of the StackExchange community?

I think the community does a great job policing questions/answers, etc. and the community has some good tools available to do this.  Between flagging questions with some reasons behind it and editing posts, closing them, and deleting them, the only thing that seems to be missing to me is the ability to flag a user.  Reasons to flag a user as abusive:   Duplicate User Abusive Behavior Offensive user name or profile User profile consists of spam Others?


An old laptop I found (an an Acer Aspire 5100 series BL51) gives this error:      Phoenix TrustedCore(tm) NB Copyright 1985-2005 Phoenix Technologies All Rights Reserved  System BIOS Version: V2.00     Bus:06, Device:02, Function:00 ERROR Resource Conflict - PCI in slot 03     Bus:06, Device:04, Function:00 ERROR Resource Conflict - PCI in slot 03     Bus:06, Device:04, Function:01 ERROR Resource Conflict - PCI in slot 03     Bus:06, Device:04, Function:02 ERROR Resource Conflict - PCI in slot 03     Bus:06, Device:04, Function:03   Based off of that error, I'm assuming there is a problem with PCI in slot 03, which I'm also assuming the item inserted into the PCI slot 03, but I cannot find which slot is which because they're not labelled or anything. I've tried looking on the Acer website but most things 404 and a PDF of the manual I found has nothing useful at all.  Without the manual, how can I find the problematic PCI slot and fix the issue?

I am trying to figure out what devices are in my desktop computer's PCI slots. I need an open slot for installing a wireless adapter, and I cannot figure out which ones I can take out, and which ones I can't.   If there is a sound device in one of the slots, I have no problem with removing it, as I do not need my speakers for this computer.  Any help with determining which slots have what is appreciated.  Thanks.


Consider $J_0$ the zeroth order Bessel function. I'm trying to compute the Laplace transform  $$\mathcal{L}[J_0](s) = \int_0^\infty J_0(t) e^{-st}dt,$$  but until now I couldn't find a good way to do it. Substituting the series for $J_0$ doesn't seem to be a good idea. The other thing I thought of, was using the differential equation for $J_0$. That is, we know that  $$t^2J_0''(t)+tJ_0'(t)+t^2J_0(t)=0,$$  so that multiplying by $e^{-st}$ and integrating we have  $$\int_0^\infty t^2 J_0''(t)e^{-st}dt+\int_0^\infty tJ_0'(t)e^{-st}dt+\int_0^\infty t^2J_0(t)e^{-st}dt=0,$$  but I couldn't get very far with this. What I could indeed notice is that the last integral may be rewritten as  $$\int_0^\infty t^2 e^{-st}J_0(t)dt=\int_0^\infty \left(tJ_0(t)\right)\left(-\dfrac{d}{ds}\left(e^{-st}\right)\right)dt=-\dfrac{d}{ds}\left[s\int_0^\infty tJ_1(t)e^{-st}dt\right],$$  but this doesn't seem to help. On the other hand the other two integrals I had no idea to deal with them.  So, how can we compute this Laplace transform in a good way?

I want to show that $$ \int_{0}^{\infty} J_{n}(bx) e^{-ax} \, dx = \frac{(\sqrt{a^{2}+b^{2}}-a)^{n}}{b^{n}\sqrt{a^{2}+b^{2}}}\ , \quad \ (n \in \mathbb{Z}_{\ge 0} \, , \text{Re}(a) >0 , \,  b >0 ),$$ where $J_{n}(x)$ is the Bessel function of the first kind of order $n$.  But the result I get using an integral representation of $J_{n}(bx)$ is off by a factor of $ \displaystyle \frac{1}{b}$, and I don't understand why.  $$ \begin{align} \int_{0}^{\infty} J_{n}(bx) e^{-ax} \, dx &=  \frac{1}{2 \pi} \int_{0}^{\infty} \int_{-\pi}^{\pi}  e^{i(n \theta -bx \sin \theta)} e^{-ax} \, d \theta \, dx \\ &=  \frac{1}{2 \pi} \int_{-\pi}^{\pi} \int_{0}^{\infty} e^{i n \theta} e^{-(a+ib \sin \theta)x} \, dx \, d \theta \\ &=  \frac{1}{2 \pi} \int_{-\pi}^{\pi} \frac{e^{i n \theta}}{a + ib \sin \theta} \, d \theta  \\  &= \frac{1}{2 \pi} \int_{|z|=1} \frac{z^{n}}{a+\frac{b}{2} \left(z-\frac{1}{z} \right)} \frac{dz} {iz} \\ &= \frac{1}{i\pi} \int_{|z|=1} \frac{z^{n}}{bz^{2}+2az-b} \, dz  \end{align}$$  The integrand has simple poles at $\displaystyle z= -\frac{a}{b} \pm \frac{\sqrt{a^{2}+b^{2}}}{b}$.   But only the pole at $\displaystyle z= -\frac{a}{b} + \frac{\sqrt{a^{2}+b^{2}}}{b}$ is inside the unit circle.  Therefore,  $$ \begin{align} \int_{0}^{\infty} J_{n}(bx) e^{-ax} \, dx &= \frac{1}{i \pi} \, 2 \pi i \ \text{Res} \left[ \frac{z^{n}}{bz^{2}+2az-b}, -\frac{a}{b} + \frac{\sqrt{a^{2}+b^{2}}}{b} \right] \\ &= {\color{red}{b}} \  \frac{(\sqrt{a^{2}+b^{2}}-a)^{n}}{b^{n}\sqrt{a^{2}+b^{2}}} . \end{align}$$


There is  (also known as Lucia) which is celebrated during December 13th.  However, the  is awarded for voting on December 15th.  Since there's no exact match, why is the hat called with this name?

During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa.  What could be the reason for this?


Is there a way, in Google Sheets, to have conditional formatting of some sort, to change the background color of a cell based on whether the cell contains a formula or a plain value?

I'm trying to have cells which value has been entered manually and cells that are the result of a formula differently, is there a way to do that?


My Dell Studio xps laptop has just started experiencing extremely low signal strength. I did set up a wireless printer the other day, so maybe I screwed something up in the process.   Here's what I have tried so far:    connecting to several different networks that all work fine for other computers, so it is most certainly my laptop. getting the latest driver, or at least I think I did. Some of the scanner software out there, like Software Informer, suggest there is a later one, but trying to apply the suggested update was not successful. Running a Dell diagnostic on the wireless lan card, which confirmed poor signal strength but not a suggested fix. It is quite lengthy so I have just put some of the seemingly more relevant info below.   Can someone help me troubleshoot this?  Dell diagnostic output:  **Signal Strength Test** Test Started        1/1/2012 4:22:55 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:41 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:42 PM Warning Message:    The network might not have been configured properly.    1/1/2012 4:23:49 PM Error Message:  Unable to locate any available networks because the radio for the interface is turned off.  1/1/2012 4:23:49 PM Test Finished:  Completed   1/1/2012 4:25:34 PM  **Wireless Connectivity Test** Test Started        1/1/2012 4:25:35 PM Test Finished:  Passed  1/1/2012 4:25:36 PM Wireless Signal Strength Test Test Started        1/1/2012 4:25:36 PM Warning Message:    Received Wireless Signal Strength: Low [16%].   1/1/2012 4:25:37 PM  **Network Card - Dell Wireless 1510 Wireless-N WLAN Mini-Card** MAC Address 00:24:2b:c9:e0:27 Adapter Connected   Yes Current Speed   19.50 Mbps IP Address  10.0.1.3 IP Mask 255.255.255.0 Gateway IP Address  10.0.1.1 DHCP Server 10.0.1.1 Adapter DHCP Enabled    Yes Driver Provider Broadcom Driver Version  5.10.38.26, 10-22-2008

Context  I have purchased a new  laptop which has Windows 7 Home 64-bit which has this Wi-Fi Option: Intel ® Centrino ® Advanced-N 6230 (2x2 agn + Bluetooth)  And I have 4 Mbps Internet connection with a  Wireless router.  Problem  When I use internet on my laptop by wired LAN it works very good very fast. But when I use internet on Wi-fi it works very slow, and most of the time it doesn't work properly.  Any solution for this?  Screenshot 1  This is screenshot of Wireless Router setting:    Screenshot 2  Of Device Manager:    Screenshot 3  Network setting folder:    Please tell me if you need any information to solve this issue.


I am running Ubuntu 12.04 TLS. Is there a way to produce an ISO installable image of my current system  so as I could burn the image on a CD and be able to install it on an other laptop  ?  I tried Remastersys and several other tools: all of them produce and ISO image which I can not install but only boot with.

This is the third time I have installed Ubuntu on my pc along with Windows 7, but every time I install, I have to upgrade all packages. (Almost 300 - 400 Mb). Is it possible to make a bootable DVD of my current installation so that I don't have to upgrade all the packages next time?


I usually don't envy a simple table, but I'm a little bit concerned with why it isn't apprently wasting any energy while doing some "useful things". I'm not a physicist and I can't find an example that explain why the table nature is so lucky respect to us. I know the table is not doing any work since It's not moving anything, but I also know that if I try to push a big truck the chances that I will win the lottery are far higher than me making it fo 1 cm. As a result, I would have wasted all my energy for that day and I would probably end up eating an ice-cream. The table instead seems a tireless and much more productive worker, capable of holding dozens of book for an endless interval. This is a harsh true. I'll guess the answer is related with the chemistry of the materialm but I wuold love to really understand it. Is the table slowly dissipating enrgy at a such slow rate that it's difficult to be aware of? Probably not, but it would be much easier.  !!!!!Update!!!!: I tried to look down at what my misconception was, and I think it's not clear to me if whenever you ( or some object) apply a force on another thing, energy is always consumed/stored. Like in the case of the book on the table. I really like the comments below and how the topic seems to be a little controversial. On the table example I got this from the  suggested in the comment: For the table, the situation is different, because the molecules of the table aren't constantly "relaxing" and "contracting". Once you place the book onto the table, the atoms are pushed in a little bit (depending on how sturdy the table is) and settle into a new equilibrium due to electromagnetic and nuclear forces. And also  @Maury Markowitz has given an interesting insight. I don't think the question is duplciate in any way of the one which is supposed to be so if someone find it interesting help me to free it, and make it independent :)

Obviously, the net work done is zero, because there's no motion, but is the proper way to look at it that both the object's gravity and the table's normal force do zero work, or that one does positive work and one an equal amount of negative work?


I need to escape the first pair of curly brackets but the second pair or the inner pair should not be escaped.  string.Format("@Neptune.ShowAlert(\{content:{0}\})", ex.Message);   I have tried the above but I get the "Unrecognized escape sequence" error.

How can brackets be escaped in using string.Format? For example: String val = "1,2,3" String.Format(" foo {{0}}", val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets?


I have a binary response variable and a categorical predictor variable. If I test for associations between the 2 variables using chi-square test , it turns out to be significant. However, if I do a logistic regression with the same set of variables, the predictor is not significant. Why does this happen?    table(Data1$pred,Data1$target)                              0    1   Level1                    1    0   Level2                    4    0   Level3                   98    1   Level4                 2056   22   Level5                    1    0   Level6                    2    0   Level7                  311    0   Level8                    6    1   Level9                  131    7   Level10                  49    2    chisq.test(table(Data1$pred,Data1$target))    Pearson's Chi-squared test    data:  tabletable(Data1$pred,Data1$target)   X-squared = 34.2614, df = 9, p-value = 8.037e-05   Logistic Regression on the same    logit.glm <- glm(as.factor(target) ~ pred,                                  data=Data1, family=binomial(link="logit")   summary(logit.glm)   Deviance Residuals:      Min       1Q   Median       3Q      Max   -0.5553  -0.1459  -0.1459  -0.1459   3.0315      Coefficients:                   Estimate Std. Error z value Pr(>|z|)   (Intercept)   -2.057e+01  1.773e+04  -0.001    0.999   Data1Level2   -6.313e-06  1.982e+04   0.000    1.000   Data1Level3    1.598e+01  1.773e+04   0.001    0.999   Data1Level4    1.603e+01  1.773e+04   0.001    0.999   Data1Level5   -6.312e-06  2.507e+04   0.000    1.000   Data1Level6   -6.312e-06  2.172e+04   0.000    1.000   Data1Level7   -6.312e-06  1.776e+04   0.000    1.000   Data1Level8    1.877e+01  1.773e+04   0.001    0.999   Data1Level9    1.764e+01  1.773e+04   0.001    0.999   Data1Level10   1.737e+01  1.773e+04   0.001    0.999    (Dispersion parameter for binomial family taken to be 1)     Null deviance: 356.09  on 2691  degrees of freedom    Residual deviance: 333.06  on 2682  degrees of freedom    AIC: 353.06     Number of Fisher Scoring iterations: 19

I'm using R to run some logistic regression. My variables were continuous, but I used cut to bucket the data. Some particular buckets for these variables always result in dependent variable being equal to 1. As expcted, the coefficient estimate for this bucket is very high, but the p-value is also high. There are about ~90 observations in either these buckets, and around 800 total observations, so I don't think it's a problem of sample size. Also, this variable should not be related to other variables, which would naturally reduce their p-values.  Are there any other plausible explanations for the high p-value?  Example:  myData <- read.csv("application.csv", header = TRUE) myData$FICO <- cut(myData$FICO, c(0, 660, 680, 700, 720, 740, 780, Inf), right = FALSE) myData$CLTV <- cut(myData$CLTV, c(0, 70, 80, 90, 95, 100, 125, Inf), right = FALSE) fit <- glm(Denied ~ CLTV + FICO, data = myData, family=binomial())   Results are something like this:  Deviance Residuals:       Min        1Q    Median        3Q       Max   -1.53831  -0.77944  -0.62487   0.00027   2.09771    Coefficients:                 Estimate Std. Error z value Pr(>|z|)     (Intercept)     -1.33630    0.23250  -5.747 9.06e-09 *** CLTV(70,80]     -0.54961    0.34864  -1.576 0.114930     CLTV(80,90]     -0.51413    0.31230  -1.646 0.099715 .   CLTV(90,95]     -0.74648    0.37221  -2.006 0.044904 *   CLTV(95,100]     0.38370    0.37709   1.018 0.308906     CLTV(100,125]   -0.01554    0.25187  -0.062 0.950792     CLTV(125,Inf]   18.49557  443.55550   0.042 0.966739     FICO[0,660)     19.64884 3956.18034   0.005 0.996037     FICO[660,680)    1.77008    0.47653   3.715 0.000204 *** FICO[680,700)    0.98575    0.30859   3.194 0.001402 **  FICO[700,720)    1.31767    0.27166   4.850 1.23e-06 *** FICO[720,740)    0.62720    0.29819   2.103 0.035434 *   FICO[740,780)    0.31605    0.23369   1.352 0.176236     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for binomial family taken to be 1)      Null deviance: 1037.43  on 810  degrees of freedom Residual deviance:  803.88  on 798  degrees of freedom AIC: 829.88  Number of Fisher Scoring iterations: 16   FICO in the range [0, 660) and CLTV in the range (125, Inf] indeed always results in Denial = 1, so their coefficients are very large, but why are they also "insignificant"?


I have some remote machines, where I need to compile some source code. What I normally do is write an alias, that says something like:  alias g++='g++ `pkg-config --cflags opencv --libs opencv`'   Then when I go to compile remotely, I would do g++ -o test test.cpp.  For whatever reason, Ubuntu wont let me do that. Instead, Ubuntu works, when I do:  g++ file.cpp -o file `pkg-config --cflags opencv --libs opencv`   But this means I cannot write an alias for g++. Is there a way I can write an alias that will take an argument? what should I do?

I want to know if I can pass an argument with an alias command.  for example:  alias d="dmesg|grep -iw usb|tail -5"    Now d will print the last 5 lines. If I want to use d to print a different number of lines, I have to make change in the alias command declaration of d again.  Is there any way I can modify the declaration of an alias so that I don't have to retype the declaration to change the number of lines. Like incorporating passing the number of lines as an argument while declaring alias for d? Or is there some other method to solve this?


I was editing a question during the review and I'm having troubles formatting this code: can anyone tell me how to do it? The code is not shown in the question body!  [...]   Added this to my masterpage:               [...]  You can see that the code is not shown!  This is the hard-copied code:  First line: <%: Scripts.Render("~/js/mainJS.js") %>   Second line:<%: Styles.Render("~/css/mainStyle.min.css") %>    EDIT  The question I was editing is this one:

How do I post text so that it is formatted as code?  What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting?     For more information, see "" in the .


I edited a comment I wrote within the 5 minute window. However, main question view does not change to reflect the new changes (even after a refresh).  Oddly, selecting to edit the comment again displays the successfully edited comment in the edit text box.  This could lead to a lot of confusion as to whether the user successfully edited his or her comment.

Someone commented on my answer and I just replied to that in a comment. The I immediately edited the comment by selecting it and then pressing edit on action bar.  The edit didn't show up, even after doing a pull to refresh on the question, it was showing the comment in its original form.  It only showed up once I reopened the question from the right drawer (notifications).  The apps says 1.0.60 in about.


After the news about the release of the new entry-level SL3, I got to wondering in which cases would someone go for the twice the price 7DmkII?  As far as I can tell, the 7D can burst faster (10 x 5 fps) and has GPS, but loses or ties with the SL3 in pretty much everything else, and the DIGIC 6 versus 8 might lead to a gigantic difference too.   Am I missing anything in this comparison?  Source:   Edit: Please note that I'm aware that the 7D is theoretically "better", as in better constructed, better materials, more direct control of the configurations, etc, in line with pro bodies. It is not a generic "old pro vs new consumer" (which is not covered by the suggested QA either), but rather a concrete instantiation of that generic problem, considering those two models.

The role of a lens is pretty clear for a nice sharp image, but how much does the camera body matter?   What are the extra features offered by a higher end model?  How much difference do they make?


I know that to convert from int to bytes you have to do this, for example:  >>>a = bytes(4) >>>print(a) b'\x00\x00\x00\x00'   But what do I do if I want to revert it and convert bytes to int or float?  I tried using:  int.from_bytes( a, byteorder='little')      and  int.from_bytes( a, byteorder='big', signed=True)    but it did not work.

How can I convert a string of bytes into an int in python?   Say like this: 'y\xcc\xa6\xbb'  I came up with a clever/stupid way of doing it:  sum(ord(c) << (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))   I know there has to be something builtin or in the standard library that does this more simply...  This is different from  for which you can use int(xxx, 16), but instead I want to convert a string of actual byte values.  UPDATE:  I kind of like James' answer a little better because it doesn't require importing another module, but Greg's method is faster:  >>> from timeit import Timer >>> Timer('struct.unpack("<L", "y\xcc\xa6\xbb")[0]', 'import struct').timeit() 0.36242198944091797 >>> Timer("int('y\xcc\xa6\xbb'.encode('hex'), 16)").timeit() 1.1432669162750244   My hacky method:  >>> Timer("sum(ord(c) << (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1]))").timeit() 2.8819329738616943   FURTHER UPDATE:  Someone asked in comments what's the problem with importing another module. Well, importing a module isn't necessarily cheap, take a look:  >>> Timer("""import struct\nstruct.unpack(">L", "y\xcc\xa6\xbb")[0]""").timeit() 0.98822188377380371   Including the cost of importing the module negates almost all of the advantage that this method has. I believe that this will only include the expense of importing it once for the entire benchmark run; look what happens when I force it to reload every time:  >>> Timer("""reload(struct)\nstruct.unpack(">L", "y\xcc\xa6\xbb")[0]""", 'import struct').timeit() 68.474128007888794   Needless to say, if you're doing a lot of executions of this method per one import than this becomes proportionally less of an issue. It's also probably i/o cost rather than cpu so it may depend on the capacity and load characteristics of the particular machine.


I have one layer with multiples Classes (Casa[550], Stock[10], Estrada[20], etc) and I´d like to have those classes as layers.     E.g: Layer Casa[550], Layer Stock[10], Layer Estrada[20].  Any ideas for a specific plug-in or another solution?  Qgis 2.18

I have a polyline shapefile with about 20 kinds of roads. I would like to know how can I create automatically a vector file for each one. I am aware of how to do it using ArcGIS Desktop - see  How do I do it using QGIS or SAGA?