Moody was the one who gave Harry the idea of using the wand and summoning charm for the Firebolt to come right after him.  Then, Hermione and Harry tried practicing the charm as much as possible for Harry to be prepared for the first task, The Hungarian Horntail and the Golden Egg.  There was a part in the book where Harry fell onto some kind of trap, dropping the golden egg, and the marauder's map losing within his reach. Harry was already capable of performing the summoning charm, he could swish his wand and point it right on the parchment and say, 'accio' or 'accio parchment' or 'accio marauder's map'.  With that, Harry could prevent Crouch Jr. (without knowing he was using the potion) from borrowing the map and getting himself into more trouble, especially when Snape and Filch came rushing to the scene.  The same with the goblet (which is charmed to be a portkey). Harry, at the time when he wanted to win the Triwizard Tournament, should have reached the cup before Cedric does. Didn't it ever cross his mind to use the Summoning Charm so that Cedric has no chance of winning at all (removing the knowledge about the portkey)?  In a summarized clarification, the Summoning Charm would be a significant benefit for Harry, if he used it properly and for circumstances like this.  Why didn't Harry use the Summoning Charm for exceptionally significant matters?

We know that the Triwizard cup itself was Summonable. After all, Harry did Summon it in the graveyard.  So why didn't any of the contestants Summon it while in the maze?  Canonical answers, please.


I'm wondering if there's a way to retrieve information on the BIOS from within Windows 7 without rebooting and going into the BIOS.  I've checked Control Panel\System and Security\System and Device Manager.  A registry key or a built-in GUI or commandline tool is fine, I would also settle for something I have to download if there is no included way.  The more info it can get the better. For instance  American Megatrends / Phoenix / Award plus version numbers, dates, whatever.  UPDATE  I have now been able to find some settings in the registry...   HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\SystemBiosDate HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\SystemBiosVersion HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\VideoBiosDate HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\VideoBiosVersion   Is there any more detailed information that can also be retrieved from within the OS?

How can I find out BIOS version in Windows without rebooting the system? I would gladly spare finding out the shortcut to enter BIOS and search in BIOS.


I would like to be able to assign grass and dirt to certain parts of the mesh and have them gradate into each other instead of having a hard edge, just like in this video:     The plugin shown in the video itself is not available to be downloaded. I was wondering if there was another way I could achieve the same effect.  (edit)  I'm including an image to describe exactly what I'm trying to achieve. In the video, the blender user has a plugin which allows him to assign the textures to the faces, and the textures gradate automatically. I heard that this was possible without the use of the plugin, but I wasn't sure how to achieve it.

I have created this with cycles:  But the edge between the glowing and non glowing materials is very sharp. The material was manually applied to faces in edit mode. Is there any way I can smooth the edge between them in cycles?


The Ubuntu 13.04 32-bit desktop system requirements. What are they?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


Taks: $$\lim_{x \to 0} \frac{2 \sin x-\sin 2x}{x-\sin x}$$ Is it possible to solve it without l'Hopital ?

I wonder how to do this in different way from L'Hôpital's rule:  $$\lim_{x\to 0}\frac{2\sin x-\sin 2x}{x-\sin x}.$$  Please help me solve this without using L'Hopital's rule.


I want to know how is value passed in php by default. Is it by reference or is it by value.  I did a search and found that some say it's value only and some say its reference by default. I understand its not a programming question but i need the answer for my recruitment interview.  Some say reference:        Some say Value:

Are PHP variables passed by value or by reference?


I'm working on the following problem.     Let $X,Y$ independent, standard normally distributed random variables and define $U=\max\{|X|,|Y|\}$ and $V=\min\{|X|,|Y|\}$. Find the mean of $V/U$.   What approach would work here? I don't really see where to start. Using integrals doesn't seem to work. Any hint or (partial) solution is much appreciated!

So I need to compute $$E\left[\frac{\min\{|X|,|Y|\}}{\max\{|X|,|Y|\}}\right]$$ given $X,Y \sim$ Normal$(0,1)$ and independent.   What I am having trouble seeing is    whether $\min\{|X|,|Y|\}$ and $\max\{|X|,|Y|\}$ are independent. If so I can factor the expectation into $$E\left[\min\{|X|,|Y|\}\right]\cdot E\left[\frac{1}{\max\{|X|,|Y|\}}\right]$$ how I should find the expected value of $1/\max\{|X|,|Y|\}$.


Why is this code  sum(x for x in range(10))   valid? Why encasing x for x in range(10) in square brackets is not necessary?

When should you use generator expressions and when should you use list comprehensions in Python?  # Generator expression (x*2 for x in range(256))  # List comprehension [x*2 for x in range(256)]


I'm currently running an early AOSP build of android 6 on nexus 10. What are the aosp options for android 7? I'm not talking about a custom ROM like cyanogenmod. I mean one as close to AOSP as possible.

There are several reasons to be looking for a ROM:   Upgrading or downgrading your stock ROM Looking for firmware from a different region/language Flashing a custom ROM for different features, removing bloat, etc.   But where can one find ROMs in the first place?  What sites are likely to have the ROM I need?  ; please add to the wiki answer instead of posting separate answers.  See also:


As a teacher and a teacher manager, I noticed that the students frequently ask teachers for their facebook names or send them friend requests.  I think that students having their teachers' personal lifes on the facebook feed leads to situations inside the classroom that compromises the way students see the teacher.   How should I respond to a situation where teachers actually accept the friend requests?   UPDATE  Thanks to @JoBedard statement about the "age factor":     It depends on the age class of people your teaching.   We considered useful to specify that the students are age 13 to 20 years old. I would like to add that they are 90% women and from the south-american society, which has different behaviors and educational principles.

If a professor is teaching a student currently, is it okay if he/she friends the student on social media sites such as Facebook or Google Plus?


When I create an anaconda virtualenv and install things with pip inside of it, it seems to run into errors which might indicate that its using python 2?   conda create -n tensorflow-3.5 python=3.5 ipykernel source activate tensorflow-3.5 pip install matplotlib (tensorflow-3.5) devs-MacBook-Pro:Documents conduce-laptop$ python Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar  6 2017, 12:15:08)  [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/Users/conduce-laptop/anaconda2/envs/tensorflow-3.5/lib/python3.5/site-packages/matplotlib/__init__.py", line 115, in <module>     import tempfile   File "/Users/conduce-laptop/anaconda2/envs/tensorflow-3.5/lib/python3.5/tempfile.py", line 45, in <module>     from random import Random as _Random ImportError: bad magic number in 'random': b'\x03\xf3\r\n'   Why is this happening? How should I install modules instead? Do I need to use pip3 instead?

What's the "Bad magic number" ImportError in python, and how do I fix it?  The only thing I can find online suggests this is caused by compiling a .py -> .pyc file and then trying to use it with the wrong version of python. In my case, however, the file seems to import fine some times but not others, and I'm not sure why.  The information python's providing in the traceback isn't particularly helpful (which is why I was asking here...), but here it is in case it helps:  Traceback (most recent call last):   File "run.py", line 7, in <module>     from Normalization import Normalizer


I recently flagged  as "not an answer".  It's a link-only answer without an actual link.  Full text:     For anyone still stuck, codeacademy.com has an excellent practical tutorial on prototypes in its js lessons called 'Introduction to Objects II' (sadly I can't provide a link as you have to register and login to see it, but it is easy to find).   And yet, I noticed that my flag was marked as "disputed" by a moderator.  Did the moderator make a mistake in this case, or is there a gray area here that I'm missing?

In my flagging summary under the statistics, there is 1 flag listed as "disputed".  This is the first time I've ever seen a disputed flag in my summary, so I'm just curious, what is a disputed flag? How would you even dispute a flag? Is this the same as voting a flag as invalid?


If No-Maj-Borns are sent to live in the Wizarding World, who raises them? Are there magical orphanages or adoption agencies?

In the Harry Potter series, lots of Muggle parents are introduced to the wizarding world because of their magical children. This is seen with Hermione's parents visiting Diagon Alley and various other moments.   In the 1920s USA world that has been created, rules about fraternising with No-Majs are very strict. Is there any evidence in any of the Pottermore articles or recently published film tie-ins which explain what happens with magical children born to No-Majs around this time? (Clearly certain events in the film suggest that they may have no procedure and that there can be side-effects of this - but I feel that those events must be rare!)


I would like to be able to read markdown (.md) files with . Unfortunately, it just appears like this:    Is there any way that I can be able to see the contents of this file? I don't care whether it's in rendered or unrendered format, just that I can see it somehow.

Is there an application to preview markdown files (.md files) on OSX (for instance on Maverick)?


So I've discovered there are a number of things to be kept up to date in OS X:   built-in Software Update, obviously Individual programs, which typically check for updates automatically and the 'update' option can usually be found under the program's menu (to the right of the Apple menu in the menu bar). Gem, which comes preinstalled in OS X (correct me if I'm wrong), should be periodically updated with sudo gem update --system and then the gems updated with sudo gem update - see Greg's answer for why you should not update Ruby. MacPorts, if installed, should be periodically updated with sudo port selfupdate and then sudo port upgrade outdated   Are there any other update processes I'm missing? I've only been using OS X for a few weeks so I want to make sure to keep everything up to date in my system and already I feel like most Mac users don't even know about all of the above (especially the Gem update command).  Am I somehow wrong in thinking I need to do all of the above?

What software updating programs are builtin to macOS Big Sur? I already know about the following GUI applications:  App Store Software Update (GUI for Software Update)  I already know about the following Terminal executables:  /usr/bin/cpan* (e.g., cpan, cpan5.18, etc.) /usr/bin/gem /usr/bin/pip3 /usr/sbin/softwareupdate (Terminal executable for Software Update)  What additional software that is builtin to macOS can be run to update software? To get pedantic, let's consider as a builtin software updating program any file in a fresh Big Sur install whose path can eventually be made to point to a file that that is a software updating program through a process that the original file at that path somehow mentions or actuates. e.g., the initial file at /usr/bin/pip3 isn't a pip3 executable; it only outputs instructions about how to change that path (/usr/bin/pip3) to point to an actual pip3 executable.


I must find out if T value equals default(T) value. Is there any simple to do that ?

I have a generic method defined like this:  public void MyMethod<T>(T myArgument)   The first thing I want to do is check if the value of myArgument is the default value for that type, something like this:  if (myArgument == default(T))   But this doesn't compile because I haven't guaranteed that T will implement the == operator.  So I switched the code to this:  if (myArgument.Equals(default(T)))   Now this compiles, but will fail if myArgument is null, which is part of what I'm testing for.  I can add an explicit null check like this:  if (myArgument == null || myArgument.Equals(default(T)))   Now this feels redundant to me.  ReSharper is even suggesting that I change the myArgument == null part into myArgument == default(T) which is where I started.  Is there a better way to solve this problem?  I need to support both references types and value types.


After upgrading from 14.xx.xx to 16.04 I miss the wifi.  Herewith is the nice report... so... anybody has a clue about what I should do now?  Thank you in advance.  dmesg | grep -i firmware [   14.893895] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17b5.hcd failed with error -2 [   15.436254] b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error -2 [   15.436293] b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error -2 [   15.436326] b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with error -2 [   15.436350] b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with error -2 [   15.436358] b43-phy0 ERROR: Firmware file "b43/ucode30_mimo.fw" not found [   15.436364] b43-phy0 ERROR: Firmware file "b43-open/ucode30_mimo.fw" not found [   15.436368] b43-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version.      Please carefully read all instructions on this website.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I am currently trying to overlay an old image with an new image, the image is currently occupied using flex box, and if I try to put an image on the same overlay position , I end up having some of the old image and the new image occupying the space..   How the image styling is thus:    &__image {     flex: 8;     height: rem(280);     background-repeat: no-repeat;     background-size: cover;     background-position: center;     order: 1;     overflow: hidden;       @include mq($from: s-screen) {       height: 100%;       order: 2;       width: 67%;     }   }   and the overlay styling:     &__overlay {     opacity: 0;     flex: 8;     height: rem(280);     background-repeat: no-repeat;     background-size: cover;     background-position: center;     order: 1;     transition: opacity 2000ms ease-in;      @include mq($from: s-screen) {       height: 100%;       order: 2;       width: 67%;     }   }   this is not quite the same...The overlay works, i am not able to overlay on top of a flexbox

I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image.   On top of this linked image I would like an image of a magnifying glass, to show people that the image can be clicked to enlarge it (apparently this isn't obvious without the magnifying glass).


This is my first post here so I hope the format of my question is correct.   I am wondering whether it is necessary to use the definite article before physical quantities named after people, e.g.:     The Heisenberg interaction comes from a complex interplay between the Pauli exclusion principle and the Coulomb interaction.   I think that it is incorrect to use the definite article if the name is in its possessive form:     Can you explain Maxwell's equations to me?   but that we should put the article if the name is in its subjective form:     Can you explain the Maxwell equations to me?   Is this correct?

When writing math papers, one sometimes has to refer to some famous theorems, for instance, the Pythagorean theorem.   Shall I write "by Pythagorean theorem", or "by the Pythagorean theorem". When shall I use the article "the"?


As electrons flow, they constitute current.  So if we manage to supply an extra electron to each of the gaseous molecules present in an enclosure and make the gaseous molecules travel in that enclosure, will that constitute current?  Is this kind of a thing feasible?

If $H_2O$ ions have a net electric charge and electric current is the flow of electric charge, can a stream of water ions be considered an electric current?  If so, is it conceivably possible (not necessarily feasible) to use a flow of water ions in place of a copper wire carrying an electrical current in an electrical circuit?  For example, in a bizarre Rube Goldberg contraption sort of situation.  Edit: I guess this question applies to any sort of ion in either gas or liquid state.  I don't know enough chemistry to know if $H_2O$ ions are even a thing that exist in the real world


I'll create an WCF for uploading file such as images or pdf files to te server. How can I create a service that can handle this function ?  I tried to googling about it, but most of article told me to use Stream as service parameter. But what I want is using byte[] (array) for the file content. because, this service is not only accessing using .nte framework, but also using other technologies, such as php, java, objective-c, etc.  any helps ?

I've build a WCF Service to accept a file and write it to disk. The front-end consists of a page with SWFUpload which is handling the upload on the client side. Apparently, SWFUpload posts the data with a Content Type of: multipart/form-data.  I would think this ok but on the Service side I get an error. The error is "ProtocolException" expecting text/xml. I've tried different message encodings in the bindings but nothing seems to work.  How can I get this file uploaded using multipart/form-data?


This is not a duplicate of  or , because there the post is not readable at all.   What I experience now is that the post is complete but with a huge blank gap in between.      Both screenshots show the same post, I have to scroll at least one whole screen between them, refreshing the view will sometimes help, sometimes a third refresh will bring the gap back.  The post in this example is   I am using 1.0.73 on a S3-mini (GT-I8190), Cyanogenmod 11.

Noticed that sometimes when there are 10+ answers to a question - some answers look like they have \n\n...\n line breaks in the end, so the body of the answer has incorrect height.  It probably has something to do with ViewHolder or adapter not setting correct row height. Although as far as I know, it should do this according to text amount/length.


I only play Minecraft on Xbox, but I am trying to upload maps from my PC to the Xbox. I keep getting stuck as the PC does not recognise the download files as Minecraft is not installed on the PC. Horizon does not recognise the file formats in the downloaded files stored on the PC.

I would like to know if the same Minecraft account used on a computer can be used on a different platform like the Xbox 360? I am not asking about playing on each simultaneously as each platform has been purchased - I am asking if you can cross play on multiple platforms with the same account. Basically I would like to know if all the saved stuff and settings from one platform will carry over to another.


When I write some long equation for notes, I write e.g.       \begin{align}     a & =  a \cdot 1 \nonumber % this not numbered  \\       & = a \cdot (1+0)  \nonumber % this not numbered \\         & = a \cdot 1+a\cdot 0  % say, I do want this numbered \\          & = a +a\cdot 0 \nonumber  % this not numbered      \end{align}   Is there kind of a dual align command (say alignsinglenumbered) that is closer to align* than to align, in the sense that       \begin{alignsinglenumbered}      a & =  a \cdot 1  % this not numbered  \\       & = a \cdot (1+0)   % this not numbered \\         & = a \cdot 1+a\cdot 0 \numbered  % say, I do want this numbered \\          & = a +a\cdot 0     % this not numbered           \end{alignsinglenumbered}   produces the same output as the one given above with align?  Since these equations turn out to be long, one wishes allowdisplaybreaks  to work, which doesn't if one writes  \begin{align} \begin{split}         a & =  a \cdot 1   \\           & = a \cdot (1+0)   \\           & = a \cdot 1+a\cdot 0  \\              & = a +a\cdot 0    \end{split} \end{align}

I want the equation number to be shown only at the last line, or better, somewhere in the middle of all. So instead of (1), (2), ... only (1). I use \begin{align} ... \end{align}


I need to prove that $\mathbb Q[i]$ is the field of fractions of $\mathbb Z[i]$. Can someone help me?

I'm looking to prove that $\Bbb Q[i] = \{ p + qi : p, q \in \Bbb Q \}$ is the field of fractions of $\Bbb Z[i] = \{p + qi : p, q \in Z\}$.  I am familiar with definition of a field of fractions. For example, I understand that if one has an integral domain $D$, it can be embedded in a field of fractions $F_D$, and every element of $F_D$ can be written as the quotient of two elements in $D$. However I have been confused by two questions:  (1) If one has a field $F$, and one can show that any element in $F$ can be expressed as the quotient of two elements in an integral domain $D$, does that imply that $F$ is the field of fractions of $D$?  (i.e. Would it suffice in my case to show that every element in $\Bbb Q[i]$ can be written as a the quotient of 2 elements of $\Bbb Z[i]$?)  (2) How can I show that element in $\Bbb Q[i]$ can be written as a the quotient of 2 elements of $\Bbb Z[i]$? When I write an element of $\Bbb Q[i]$ like  $$q = \frac ab + \frac cdi$$  I get mixed up trying to come up with 2 elements of $\Bbb Z[i]$ that could equal that. I set $z = u+vi$ and $w = x+yi$, equate $q = z/w$ and I end up with these equations like this:  $$a = ux + vy; b = x^2 + y^2; c = vx - uv; d = x^2 + y^2$$  This doesn't strike me as the way to go. Possibly there is a way to take advantage of fact that the elements are equivalence classes, but I'm not seeing it. Thank you very much!


Before the latest update of Skype on Windows, there was an option under Tools - Settings to "Start Skype when I start Windows". In Skype version 12.1815.210.0 running on my new laptop on Windows 10 Home Single Language, this option is nowhere to be found.   How do I prevent the new Skype from auto-starting when Windows 10 boots up?

How to stop Skype from starting automatically when booting Windows 10?  I can't find such an option, either in the Skype app settings or in the Task Manager > Startup tab.


What's the command that, given a document name, will open it with the right application (i.e. an equivalent to windows start / mac os x open)

In Nautilus, when you double click a file, it will open it with the default application associated with the file's extension. For instance, .html files will open in a web browser and .pdf will be opened with Document Viewer. Is there a way to reproduce the same behavior from within the command line (i.e. open path/filename)? I'm asking because I like to browse my file-system from the command line but sometimes don't remember which app. opens what.


What is lim n→∞ (2)^(1/n)? Why is it equal to 1? All proofs shown are about n^(1/n) or something like this form. What about 2?

$$\lim_{n\to \infty}2^{\frac{1}{n}}$$   Basically looking at $$\lim_{n\to \infty}2^{\frac{1}{n}}=2^{\lim_{n\to \infty}{\frac{1}{n}}}=2^0=1$$  But if I use $$\lim_{n\to \infty}2^{\frac{1}{n}}=\lim_{n\to \infty}e^{\ln\left(2^{\frac{1}{n}}\right)}=\lim_{n\to \infty}e^{{\frac{1}{n}}\cdot{\ln(2)}}=\lim_{n\to \infty}e^{\frac{1}{n}}\cdot\lim_{n\to \infty}e^{\ln(2)}=1\cdot2=2$$  Where did I got it wrong?


Background for the story: I had created a local Windows user on my laptop, lets say dummyuser. Later on I connected that local user with the Microsoft account dummyuser@outlook.com.  I want to login to Windows directly without specifying any password. But because it is a microsoft account, I need to have the password set. I overcame this issue by removing "users must enter password to use this computer".    Which kind of works, but the issues is that Windows tries to login with the local user dummyuser, not dummyuser@outlook.com and thus complains about that the password is wrong.  How can I make Windows to start using the microsoft account to login? Also checking the User Profiles shows only one User profile (Control Panel\User Accounts\User Accounts)

I have two User Accounts for my Windows 7 with no password requirement. I frequently use one of those accounts; so I would like Windows to log-on automatically with that account without the need for user input.  P.S. I don't prefer installing/using a third-party software for that purpose; especially those that place at low levels before Windows log-on.


I am facing problem to split this equation in three lines. Where is the problem because whenever I run latex. It stopped and write missing }. The equation is  \begin{equation}\begin{split} & A_{t}(r,\theta)=[\frac{\alpha^{0}(\frac{r}{2M}) + \beta^{0}}{r}]p_{0} + \frac{\alpha^{1}(\frac{r}{2M} (-\frac{r}{2M} + 1)) \\ &\qquad + \beta^{1}(\frac{r}{2M}(1-\frac{r}{2M}) (2\ln(\frac{r}{r-2M} - \frac{2M}{r} - \frac{1}{\frac{r}{2M} - 1})))}{r} p_{1}(cos\theta)\\ + ...\Bigr, \end{split} \label{eq1} \end{equation}

I have a long line in equation. I want to split it properly in two or three lines. I've been using \begin{split} and \end{split}, but still it is not in good position. The equation's code is below.  \begin{equation} \begin{split} \frac{r(r-1)c_{0}}{z} + \\ &  \sum_{0}^{\infty}[[(j+r)(j+r+1)c_{j+1} - [(j+r)(j+r-1) - l(l+1)]c_{j}] \\ &= 0, \end{split} \end{equation}


getting a frustrating null exception error when the class junction is being used in functions. The class should be initialised so this shouldn't be an issue. Help ;_;  class RobotData { class Junction {     public int juncX;     public int juncY;     public int arrivalHeading; }  private static int maxJunctions = 10000; //Max junctions likely to occur private static int junctionCounter; private static Junction[] junction;  RobotData() {     junctionCounter = 0;     junction = new Junction[maxJunctions]; }  public void resetJunctionCounter() { junctionCounter = 0; }  public void recordJunction(IRobot robot) {     junction[junctionCounter].juncX = robot.getLocation().x;     junction[junctionCounter].juncY = robot.getLocation().y;     junction[junctionCounter].arrivalHeading = robot.getHeading();     junctionCounter++; }  public void  printJunction() {     System.out.println(junction[junctionCounter].juncX);     System.out.println(junction[junctionCounter].juncY);     System.out.println(junction[junctionCounter].arrivalHeading); } }   The class RobotData is being initialised properly, but when the functions are being called I get the null error indicating that junction[junctionCounter] hasn't been initialised yet. Unsure why (obviously) as it should be initialised when RobotData is.

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?


Prove that  $\cos\left({\pi \over 11}\right)\cdot\cos\left({2\pi \over 11}\right)\cdot\cos\left({3\pi \over 11}\right)\cdot\cos\left({4\pi \over 11}\right)\cdot\cos\left({5\pi \over 11}\right)={1 \over 32}$  My solution starts here LHS $= \cos\left({\pi \over 11}\right)\cdot\cos\left({2\pi \over 11}\right)\cdot\cos\left({3\pi \over 11}\right)\cdot\cos\left(2\pi-{3\pi \over 11}\right)$  Then I changed the last expression to $\sin {3\pi \over 11}$ but Now what to do next?

If $11 \gamma = \pi$ then prove that   $  \sec(\gamma) \sec(2\gamma) \sec(3\gamma) \sec(4\gamma) \sec(5\gamma) = 32. $   I could not use the relation $11 \gamma = \pi$.


I try to include a figure from a webpage. But I don't have any idea how to do this. Can anyone tell me how to include a figure using [Gummi]

I have tried  \includegraphics{http://www.site.com/path/to/figure.png}   But this returns the error   ERROR: Package pdftex.def Error: File `http://www.website.com/path/to/figure.png' not found.    Are there other options?


I recently posted a new question on Android Enthusiasts using the official StackExchange app for Android. Right after posting the question, the app said that my question is not available.     The question is not available, it may have been deleted.   Deleted? Already?...  Then I navigated to my user name to see my recent activity. There it was! I could see the question I just posted. But if I tapped on the link to try to open it, the app kept complaining about my question not being available.     The question is not available, it may have been deleted.   But 7 minutes after posting the question, I could see my question. Here are some screenshots that showcase this issue.      This is not the first time this happens. This appears to be more or less normal behavior of the app. I don't use the StackExchange app very often to post questions. But I had exactly the same message come up when I posted a question a few months ago (and some app version numbers earlier).  This is not a major issue, but you should try to address this nevertheless. It's a small bug, but addressing it might imply much bigger changes... which might explain why it's still present... I don't really know, I'm guessing. I just thought I would let you know about it, in case you are not aware of it.  For the record, the phone is Galaxy S4 Plus (GT-I9506) running Android 4.4.2. Version number of the app is 1.0.50.


By default, when a new page is added it will be given the next highest number not already assigned to a page.

In the Admin Panel, is there a way to hook into the page creation and increment Page Order number of each page or to be equal to the number of pages. Right now the default is 0 and when I make a new page i would much rather have it at the bottom of my list than the top.


I know that generally native speakers say it usually like this (without the to):     These exercises will help you get better at math.   Can you help me move these boxes outside?   But sometimes, though very rarely, I see it used with the to. Like in this example:     This is just so that you won’t forget that you shouldn’t change these values after you first create them. It’s purely optional, but in the pages ahead you’ll see how useful all-capped constants can be to help you to better read and understand your programs.   I still don't really understand the deference between the two usages and don't know when we should use one over the other. Could you please help me get this straight once and for all?

I wrote:      I will help you to acquire Russian.    A native English speaker corrected me saying that 'to' is unnecessary here. Is it correct to say      "I will help you acquire Russian"


Can anyone explain to me with simple words the meaning of "PROTOTYPE" in JavaScript? I have seen one link but I am not clear about Prototype till now , Please let me know about this.

I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot.


The listing package allow to easily define styles and environment that derives from each other, which is very practical to avoid to copy and paste a lot of code. I am trying to see how to do the same with tcolorbox.  Consider the following code as an example:  % Document class \documentclass[letterpaper, 10pt, onecolumn]{article}  % Packages \usepackage{calc} \usepackage{xcolor} \usepackage{listings} \usepackage{lipsum} \usepackage[most]{tcolorbox}  % Style \newtcblisting{codebox}[4][\small]{     before upper = {\topskip0pt \maxdepth=0pt},     enhanced,     listing only,     breakable = unlimited,     top = 0em,     bottom = 0em,     left = 0pt,     right = 0pt,     arc = 0em,     outer arc = 0em,     boxsep = 0em,     boxrule = 0.5mm,     titlerule = 0em,     colback = white,     colframe = blue,     title = \centering#2,     listing options = {         language = C++,         basicstyle = \fontfamily{cmtt}\selectfont#1,         #3,     },     #4, } \newtcblisting{codebox*}[4][\normalsize]{     before upper = {\topskip0pt \maxdepth=0pt},     enhanced,     listing only,     breakable = unlimited,     top = 0em,     bottom = 0em,     left = 0pt,     right = 0pt,     arc = 0em,     outer arc = 0em,     boxsep = 0em,     boxrule = 0.5mm,     titlerule = 0em,     colback = white,     colframe = black,     title = \centering#2,     listing options = {         language = Python,         basicstyle = \fontfamily{cmtt}\selectfont#1,         #3,     },     #4, }  % Document \begin{document} \lipsum[1] \begin{codebox}{C++ listing example}{}{} int main(int argc, char* argv[]) {     return 0; } \end{codebox} \begin{codebox*}{Python listing example}{}{} def f(x):     return x * x \end{codebox*} \lipsum[1] \end{document}   Two environments are defined, codebox and codebox* with very few differences between the two (including the default parameter which is not the same). Would it be possible to have one sort of deriving of the other, to avoid to copy and paste all the options for environments that are close to each other. One constraint is that I would like the interface from the user side, to stay the same (\begin{codebox}{}{}{} or \begin{codebox}[]{}{}{}).

TiKZ allows to define a .style which can be later be used in another one:  \tikzset{       first/.style={rectangle, draw},       second/.style={first, inner sep=2mm} }   any change in first is inherited by second. Is it possible to do something similar with tcolorbox?  As an example, take a look at next code, where a newtcolorbox and a newtcbox are defined with exactly same options. How can be same options applied to both definitions without having to type them again?  \documentclass{beamer} \usetheme{Madrid} \usepackage{tcolorbox} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage{lmodern} \tcbuselibrary{skins}  \makeatletter \newtcolorbox{myblock}[2][]{     enhanced,     frame hidden, interior hidden, segmentation hidden,     coltitle=black,     fonttitle=\bfseries\rmfamily,     fontupper=\tiny,     title={#2},     overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);     \draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);     \shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;     \shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},     #1     }  \newtcbox{mybox}[2][]{       enhanced,       frame hidden, interior hidden, segmentation hidden,     coltitle=black,     fonttitle=\bfseries\rmfamily,     fontupper=\tiny,     title={#2},     overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);     \draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);     \shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;     \shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},     #1     } \makeatother  \begin{document} \begin{frame}{A nice box for beamer}  \begin{myblock}{Oups, nous avons rencontré une erreur.} Note partagée non trouvée  L'URL fornie ne correspond pas à une note partagée valide. Cela a pu être causé par une erreur typographique dans le lien, ou le propiétaire l'a privaisée. \end{myblock}  \mybox{Oups, this is a long title}{Note partagée non trouvée} \mybox[left=0mm,right=1cm]{Oups}{Note partagée non trouvée} \end{frame} \end{document}   Another example. I would like to define some tcolorboxes like beamer's block, example block and alert block. I can do something similar with \mybox definition in previous code where an optional parameter can help to change some aspect like title color, margins, whatever.   \mybox{Oups, this is a long title}{Note partagée non trouvée} \mybox[left=0mm,right=1cm]{Oups}{Note partagée non trouvée}   But if I would like to use \myexample, \myalert, \myblock, the only way I know is retyping all parameters in all definitions. Do you know an easier way?


Why doesn't this code work?  class Triangle(object):     def __init__(self, angle1, angle2, angle3):         self.angle1 = angle1         self.angle2 = angle2         self.angle3 = angle3      number_of_sides = 3     def check_angles(self):         sum_of_angles = angle1 + angle2 + angle3 # PLS LOOK AT THIS LINE         if sum_of_angles == 180:             return True         else:             return False   but this does?  class Triangle(object):     def __init__(self, angle1, angle2, angle3):         self.angle1 = angle1         self.angle2 = angle2         self.angle3 = angle3      number_of_sides = 3     def check_angles(self):         sum_of_angles = self.angle1 + self.angle2 + self.angle3 # LOOK HERE AGAIN         if sum_of_angles == 180:             return True         else:             return False   if self.angle1 = angle1, why can't I just use the shorter version?

I have been using classes for only a short while and when I write a method, I make all variables reference self, e.g. self.foo.  However, I'm looking through the wxPython in Action book and notice that "self" isn't used all the time. For example:   import wx  class TextFrame(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None, -1, 'Text Entry Example',             size=(300, 100))         panel = wx.Panel(self, -1)         basicLabel = wx.StaticText(panel, -1, "Basic Control:")         basicText = wx.TextCtrl(panel, -1, "I've entered some text!",             size=(175, -1))         basicText.SetInsertionPoint(0)         pwdLabel = wx.StaticText(panel, -1, "Password:")         pwdText = wx.TextCtrl(panel, -1, "password", size=(175, -1),             style=wx.TE_PASSWORD)         sizer = wx.FlexGridSizer(cols=2, hgap=6, vgap=6)         sizer.AddMany([basicLabel, basicText, pwdLabel, pwdText])         panel.SetSizer(sizer)   The one below does use "self".  import wx class ButtonFrame(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None, -1, 'Button Example',             size=(300, 100))         panel = wx.Panel(self, -1)         self.button = wx.Button(panel, -1, "Hello", pos=(50, 20))         self.Bind(wx.EVT_BUTTON, self.OnClick, self.button)         self.button.SetDefault()     def OnClick(self, event):         self.button.SetLabel("Clicked")   If I remember correctly, "self" is reference to a particular instance of the class, so when is it not necessary? Is there a general rule of thumb?


Google/Bing Maps etc. or web mapping applications use WGS84 coordinates. When you moves the mouse on map, you see WGS84 latitude and longitude. Although coordinate system is WGS84, map is projected in Web Mercator on the screen. Spatial data with projected coordinates is in 2D and it's easy to show on screen, because it's in 2D and already a plane coordinates.  I wonder what is projection system QGIS uses for spatial data that has just geographic coordinates.

WGS84 is a reference ellipsoid that determines coordinates of every point on Earth using latitude, longitude and height about the its surface.  This ellipsoid is often used as a base to make maps. Though, to make a map on a flat paper or a flat digital screen you need a projection too. An example of a popular projection would be UTM.   Mainstream GIS software give plethora of projection alternatives to display your data layers. Among them, they also let you display your data using WGS84 only.  I think they are using a certain projection but what projection is that?


I need to move (shift) an ext4 partition on my disk in a headless Linux machine, like this:  Before: [######### Partition #########][- Free space -]  After: [- Free space -][######### Partition #########]   This task is straightforward when using GParted, however any advices I've found for headless hosts consist of installing a VNC server and Gparted with all of its dependencies. I can not believe that there is no unix-way console tool for moving partitions around or a manual for doing the same with dd or something similar. Any thoughts please?

I need some help to get a  command line that is moving my partition blockwise to the right.  I stumbled upon an error when using tools to image some pcs and now I need to repartiition those machines without losing any data. This works pretty well with gparted 0.18.0. There I move my second partition to the right with an offset of 79MB. Then I grow my first partition 79MB. Everything is working flawlessly. But since there are about 35 machines I wanted to build a script that does that.  The resizing and everything is pretty easy. What I don't get in my head is the moving of the partition to the right. Basically I need a  command line that does that. My thinking is that I need to start at the back and work my way the front. So I thought:   if and of are the same partition (remember is already grown to fit the offset data) /dev/sda2 the bs may be 16MiB since that is what gparted benchmarked what would be the parameters that achive the copying from right to left so that the data doesn't get overwritten   I talked to the maintainer of gparted and he said dd is used to achieve this. But I can't figure out how.


I have the following code that iterates over a dictionary, and if the key doesn't have a value, it checks another dictionary for a value and assigns it. I keep getting the following exception though.  -      $exception  {"Collection was modified; enumeration operation may not execute."} System.Exception {System.InvalidOperationException}   foreach (KeyValuePair<string, string> param in request.Field.StoredProcedure.Parameters) {     if ((param.Value == null || param.Value.Length == 0) &&          request.SearchParams.ContainsKey(param.Key))     {         request.Field.StoredProcedure.Parameters[param.Key] =              request.SearchParams[param.Key];     }     else if (param.Value == null || param.Value.Length == 0)     {         throw new ArgumentException(             "No value could be found for sproc parameter " + param.Key);     } }   Are you not able to assign a value to a collection while you are iterating over it?

The example below throws an InvalidOperationException, "Collection was modified; enumeration operation may not execute." when executing the code.   var urls = new List<string>(); urls.Add("http://www.google.com");  foreach (string url in urls) {     // Get all links from the url     List<string> newUrls = GetLinks(url);      urls.AddRange(newUrls); // <-- This is really the problematic row, adding values to the collection I'm looping }   How can I rewrite this in a better way? I'm guessing a recursive solution?


My website has 3 languages. The Tag taxonomy is multilingual and for each term I added its translation. I created a block of a view using the  module that selects one random term and displays it.  I need this block to show its content in the language currently set.  How can I do this?

I have used the  module to create a view of taxonomy terms.  The taxonomy terms are translated in the Greek language also (apart from English), using the typical  modules.  But when I switch the language to Greek (while visiting the site), still the English taxonomy terms are appearing (and not the terms in Greek).  How can I solve this?


Suppose we have a discrete r.v. $X$, take $Y = g(X) $ where $g$ is one-to-one and onto-  If we want to obtain the new pdf for the discrete r.v. we simply notice that $$f_Y(y) = P(Y=y) = f_X(g^{-1}(y)) $$   Now if random variable $X$ is continous and $g$ is always one-to-one and onto why can't we apply this to the continous case also?  that is, why can't we say $$f_Y(y)  = f_X(g^{-1}(y)) $$ for a continous random variable?

Suppose $X$ is a random variable with pdf $f_X(x)$. Then the random variable $Y=X^2$ has the pdf   $$f_Y(y)=\begin{cases}\frac{1}{2\sqrt{y}}\left(f_X(\sqrt{y})+f_X(-\sqrt{y})\right) & y \ge 0 \\ 0 & y \lt 0\end{cases}$$   I understand the calculus behind this. But I'm trying to think of a way to explain it to someone who doesn't know calculus. In particular, I'm trying to explain why the factor $\frac{1}{\sqrt{y}}$ appears out front. I'll take a stab at it:  Suppose $X$ has a Gaussian distribution. Almost all the weight of its pdf is between the values, say, $-3$ and $3.$ But that maps to 0 to 9 for $Y$. So, the heavy weight in the pdf for $X$ has been extended across a wider range of values in the transformation to $Y$. Thus, for $f_Y(y)$ to be a true pdf the extra heavy weight must be downweighted by the multiplicative factor $\frac{1}{\sqrt{y}}$  How does that sound?  If anyone can provide a better explanation of their own or link to one in a document or textbook I'd greatly appreciate it. I find this variable transformation example in several intro mathematical probability/stats books. But I never find an intuitive explanation with it :(


Here is the minimum example: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{algpseudocode,algorithm,algorithmicx}  \begin{document}  \begin{frame}[fragile]{Sequential algorithm}  \begin{algorithm}   \begin{algorithmic}[1]     \If{Timeo daneos}         \Let{et dona ferentes}     \endif   \end{algorithmic} \end{algorithm}  \end{frame}  \end{document}  It gives 8 errors, starting with an outer par error, which I do not understand as there is no box. Also some missing numbers and undefined control sequences that don't make sense to me.

I am preparing a presentation with beamer from a previous paper written in latex. I want to insert in a slide the pseudocode       \begin{algorithm} \begin{algorithmic}[1] \FOR{$i=1$ to $N$} \FOR{$j=1$ to $JJJJ} \STATE $energy[i*JJJ+j] =$ \\ $ interpolate(AAA[i*JJJ+j], ZZZ)$ \ENDFOR \ENDFOR \end{algorithmic} \caption{pseudocode for the calculation of } \label{alg:seq} \end{algorithm}   but I get problems since the beamer document does not compile. I tried to use the same packages that in the latex document. I also tried to find examples through google but nothing. Could you tell me what is wron here or how could I add pseudocode in beamer )examples on the net, etc)?


It is well known that every fundamental particle has a corresponding antiparticle, and that  – except for particles which are their own antiparticle – for practically every pair of particles and antiparticles, one type of particle predominates. We call this particle matter, and its antiparticle is considered to be antimatter.  However, is there any intrinsic difference between matter and antimatter, or are these terms defined based on nothing more than the balance that we so happened to end up with? For example, is there any reason that we should place an up quark and a charm quark in the same category, and not an up quark and a charm antiquark? Is there any reason we should group together up quarks and electrons rather than up quarks and positrons?

The identification of an electron as a particle and the positron as an antiparticle is a matter of convention. We see lots of electrons around us so they become the normal particle and the rare and unusual positrons become the .  My question is, when you have made the choice of the electron and positron as particle and anti-particle does this automatically identify every other particle (every other fermion?) as normal or anti?  For example the proton is a particle, or rather the quarks inside are. By considering the interactions of an electron with a quark inside a proton can we find something, e.g. a conserved quantity, that naturally identifies that quark as a particle rather than an antiparticle? Or do we also just have to extend our convention so say that a proton is a particle rather than an antiparticle? To complete the family I guess the same question would apply to the neutrinos.


i am trying to create handler which will terminate the http request in case that the server is not responding over 20 seconds. and i would like to know what is the best approach to do that from the Async task class.  this is my code:  public class DBcontroller extends AsyncTask <List<NameValuePair>, Void, String>{      private static String url = "";     private  Context context = null ;     public AsyncResponse delegate= null;      private PropertyReader propertyReader;     private Properties properties;      public DBcontroller(Context mycontext,AsyncResponse myresponse) {         context = mycontext;         delegate = myresponse;         propertyReader = new PropertyReader(context);         properties = propertyReader.getMyProperties("config.properties");         url = properties.getProperty("url");     }        @Override     protected void onPreExecute() {         super.onPreExecute();         delegate.preProcess();        }      @Override     protected String doInBackground(List<NameValuePair>... params) {         return postDataToServer(params[0]);     }      @Override     protected void onPostExecute(String resStr) {         super.onPostExecute(resStr);         delegate.handleResponse(resStr);      }      private String postDataToServer(List<NameValuePair> list) {         //check         for (int i=0;i<list.size();i++)             Log.d("responseString", list.get(i).toString());         //check         HttpClient client = new DefaultHttpClient();         HttpPost post = new HttpPost(url);         String responseString = null;         try {             post.setEntity(new UrlEncodedFormEntity(list));             HttpResponse response = client.execute(post);             HttpEntity entity = response.getEntity();             responseString = EntityUtils.toString(entity);             Log.d("responseString1", responseString);          } catch (UnsupportedEncodingException e) {             e.printStackTrace();         } catch (ClientProtocolException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         }         if(responseString!= null)              Log.d("responseString2", responseString);         return responseString;     }   }

I have created the following function for checking the connection status:  private void checkConnectionStatus() {     HttpClient httpClient = new DefaultHttpClient();      try {       String url = "http://xxx.xxx.xxx.xxx:8000/GaitLink/"                    + strSessionString + "/ConnectionStatus";       Log.d("phobos", "performing get " + url);       HttpGet method = new HttpGet(new URI(url));       HttpResponse response = httpClient.execute(method);        if (response != null) {         String result = getResponse(response.getEntity());         ...   When I shut down the server for testing the execution waits a long time at line  HttpResponse response = httpClient.execute(method);   Does anyone know how to set the timeout in order to avoid waiting too long?  Thanks!


I was trying to make some kitPvP plugins but then I was faced with a "bug". When I choose the kit(pvp), it gives me the soups but it doesn't clear the previous inventory (that is the spawn inventory default). Here is the code:  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {     if(!(sender instanceof Player)) {         sender.sendMessage(ChatColor.RED + "Apenas players podem usar o comando /kit");         return true;     }     Player p = (Player)sender;     if (args.length == 0) {         p.sendMessage(ChatColor.RED + "Precisa defenir qual kit voce quer escolher!");         p.sendMessage(ChatColor.DARK_GRAY + "Comando: " + ChatColor.RED + "/Kit <kit> " + ChatColor.DARK_GRAY + "ou " + ChatColor.RED + "/Kits");         return true;     } else {         if(args[0].equalsIgnoreCase("pvp")) {             if(p.hasPermission("kit.pvp")) {                 if (KitAPI.getKit(p) == "Nenhum") {                     KitAPI.PvP(p);                     p.sendMessage(ChatColor.GREEN + "Voce escolheu o kit PvP");                     BarAPI.setMessage(p, ChatColor.GREEN + "Voce escolheu o kit PvP", 5);                                    p.getInventory().clear();                     return true;                 } else {                     p.sendMessage(ChatColor.RED + "Voce ja possui um kit!");                     return true;                 }             } else {                 p.sendMessage(ChatColor.RED + "Voce nao possui permissao para executar o comando!");                 return true;             }         }         p.sendMessage(ChatColor.DARK_GRAY + "Esse kit " + ChatColor.RED + args[0] + ChatColor.DARK_GRAY + " e invalido!");     }     return false; }   }  Here is the code where is supposted to clear the inventory:  if (KitAPI.getKit(p) == "Nenhum") {                     KitAPI.PvP(p);                     p.sendMessage(ChatColor.GREEN + "Voce escolheu o kit PvP");                     BarAPI.setMessage(p, ChatColor.GREEN + "Voce escolheu o kit PvP", 5);                                    p.getInventory().clear();                     return true;

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


I have an Android app that will create a file in /data/ and immediately delete it. I want to know how can I catch this file or create a copy or even disable user permissions to delete a file? I have root access to the device.

I have an Android app that will create a file and immediately delete it. I want to know how can I catch this file or create a copy or even disable user permissions to delete a file. I have root access to the device.


I have just asked in an interview that if someone mistakenly deletes apache logfile from /var/log/apache/access.log while it's being written, can you recover it? After my answer interviewer said that we can recover the inode details of the apache process from the /proc file system and then can recover those files. I couldn't understand that properly as it was over the phone. So can anyone please explain how?

Suppose an apache log file gets deleted but it's held open by apache; then this is what I am doing:  pid=$(lsof | grep text.txt | awk '/deleted/ {print $2}') fd=$(lsof | grep text.txt | awk '/deleted/ {print $4}' | grep -oE "[[:digit:]]{1,}")  cp /proc/$pid/fd/$fd directorytobecopied/testfile.txt   This is what I am doing to recover the file and put it back where it was. Is there any simpler way of doing this because above code doesn't look good. Furthermore how do I know from where the file was deleted(directorytobecopied) so that I don't have to manually ask somebody where the file was located originialy and put it back there.


I am currently exploring the mathematical structure of Quantum Mechanics on an introductory level. A couple of books and online sources (including this website) stated how the Uncertainty Principle is a consequence of two non-commuting operators like position-momentum or the spin operators. But in some books including Stephen Hawking's - "A Brief History of Time", the Uncertainty Principle is interpreted as a limitation imposed due to an inevitable tradeoff between wavelength and energy. For e.g. in the book "A Brief History of Time" on Page 60 the author writes -  In order to predict the future position and velocity of a particle, one has to be able to measure its present position and velocity accurately. The obvious way to do this is to shine light on the particle. Some of the waves of light will be scattered by the particle and this will indicate its position. However, one will not be able to determine the position of the particle more accurately than the distance between the wave crests of light, one needs to use light of a short wavelength in order to measure the position of the particle precisely. Now, by Planck's quantum hypothesis, one cannot use an arbitrarily small amount of light; one has to use at least one quantum. This quantum will disturb the particle and change its velocity in a way that cannot be predicted. Moreover, the more accurately one measures the position, the shorter the wavelength of the light that one needs and hence the higher the energy of a single quantum. So the velocity of the particle will be disturbed by a larger amount. In other words, the more accurately you try to measure the position of the particle, the less accurately you can measure its speed, and vice versa.  Hawking clearly stated it as a physical consequence, which is more intuitive than the mathematical one. Finally, my question is which one of the interpretation is correct? Or is it possible that both interpretations are equally plausible and that the mathematical derivation just happens to explain the physical cause through a different approach.

In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected.


Suppose we have a random generator, how do we test the randomness of its output?   If I made two calls, there is a slight chance that the two results collide.

First off, this question is ripped out from  question. I did it because I think this part is bigger than a sub-part of a longer question. If it offends, please pardon me.  Assume that you have a algorithm that generates randomness. Now how do you test it? Or to be more direct - Assume you have an algorithm that shuffles a deck of cards, how do you test that it's a perfectly random algorithm?  To add some theory to the problem - A deck of cards can be shuffled in 52! (52 factorial) different ways. Take a deck of cards, shuffle it by hand and write down the order of all cards. What is the probability that you would have gotten exactly that shuffle? Answer: 1 / 52!.  What is the chance that you, after shuffling, will get A, K, Q, J ... of each suit in a sequence? Answer 1 / 52!  So, just shuffling once and looking at the result will give you absolutely no information about your shuffling algorithms randomness. Twice and you have more information, Three even more...  How would you black box test a shuffling algorithm for randomness?


Let $S_n$ represent its partial sum, and let $s$ represent its value.   Prove that $s$ is finite and find and an $n$ so large that $S_n$   approximates s to 3 decimal places.   $$\sum_{k=1}^{\infty}\left(\frac{k}{k+1}\right)^{k^2}$$   Solution we use root test i think. But how to calculate this? Thanks.

$$S=\sum_{k=1}^\infty\left(\frac{k}{k+1}\right)^{k^2};\hspace{10pt}S_n=\sum_{k=1}^n\left(\frac{k}{k+1}\right)^{k^2}$$ Let $S_n$ represent its partial sums and let $S$ represent its value. Prove that $S$ is finite and find an n so large that $S_n$ approximate $S$ to three decimal places.   Solution: first of all, I think that we Will use L'hopital rule and then use root test while starting to solve this. But how?


I have a toolbox with python script which creates a shapefile from JSON txt file, but it does not show the generated shapefile in arcmap, i have to add it from the output location.   What code shall I use to display this shapefile once it is created?

I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's another story).  The best I can do so far is to add a layer file to the current map, using the following ("addLayer" is a layer file object):  def AddLayerFromLayerFile(addLayer):  import arcpy  mxd = arcpy.mapping.MapDocument("CURRENT")  df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]  arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")  arcpy.RefreshActiveView()  arcpy.RefreshTOC()  del mxd, df, addLayer   However, my raw data is always going be shapefiles, so I need to be able to open them. (Equivalently: convert a shapefile to a layer file without opening it, but I'd prefer not to do that).


Why is it that $$  \left(1+\frac{1}{n}\right)^n < \left(1+\frac{1}{m}\right)^{m+1}, $$ for any natural numbers $m, n$?   I have tried expanding using the binomial series and splitting into cases. I understand why it is trivially true when $m=n$ but I am not sure if there is a rigorous proof for other cases?

A proof done in class called upon this inequality: $$\left(1+\frac{1}{n}\right)^n\lt e\lt\left(1+\frac{1}{n}\right)^{n+1}$$ How can this inequality be proven?


I am trying to understand the source code of the web application: . I tried to run it on my own machine (Mac OS 10.10) and it is run on the Apache. However, I keep getting the error 403 (Forbidden), yet I can't find out the reason.   The application requires a proxy file. I added two lines to let the application know where is the proxy:   function init(){  initMap();  /* Here are the two lines code I added */  esriConfig.defaults.io.proxyUrl = "proxy/"  esriConfig.defaults.io.alwaysUseProxy = false; } //show map on load  dojo.addOnLoad(init);   The error message is:   (init.js:157)  GET http://localhost/WMSMultiDimensionalEsriViewer/proxy/?http://sampleserver6.…Dimensional_Sample/MapServer/WMSServer?request=GetCapabilities&service=WMS 403  (Forbidden)   The screenshot is here:    Can anyone please point out the issue?

I am trying to set up the proxy for my web application because the request exceeds 2000 characters. I set up the proxy as described in ESRI site. When I run my application I get the error as shown below  **"Unable to load http://localhost/proxy.ashx?http://T...nction/execute Status:403"**   I put my web application (one HTML page with javascript api code) and the two proxy files to my development machine's root folder. This machine is XP.  I have Geoprocessing service running on another machine (TestServer). When the length of GP request exceeds the limit, the application tries to use proxy and that is when I see the error above. This machine is Win 2008.  Status 403 is Forbidden page error.


so i was working on an aircraft [ tejas mk2 ] i faced a problem while making the canopy , iwant it to be exactly like this  but i ended up like this well i know it looks funny but yah i am an intermediate blender user ,what i wanted is a glass material that has such type of coulourish reflection as well as clear at the same time. soo.... please help me out , picture of the node settings would be much appreciated . cheers! edit : here is my current progress

Is it possible to create an  shader in Cycles? Specifically for something like , , , etc..


When you are configuring iptables or SSH over SSH and the data center is thousands of kilometers away (and getting someone there to plug in a KVM is hard), what are some standard practices to prevent locking yourself out?

As I'm learning about iptables I've made a couple of mistakes and locked myself out.  What method(s) do you use to test rules without locking yourself out?  I'm using ubuntu server 12.04 LTS    All the answers below were helpful.  In the end I used a combination of options.  It also helps to have IPMI access to your remote server just in case!  But ideally test the rules locally on a replicated environment and test that first.  Vagrant helps in this regard to get test setups working quickly.


My steam game don't starve has the action that "right mouse" would usually do is bound to a and move left is also bound to a. I tried deleting all my don't starve files and i cant find the right bind command to bind right mouse to its original action. I haven't played the game in over a year. PLEASE HELP!!!

How do I change the controls/key bindings on Don't Starve? I can't play using the WASD keys.


I don't really have much insight on how \displaystyle actually works, i just see the difference between in-line equation like $\frac{1}{2}$ which displays a small fraction and $\displaystyle \frac{1}{2}$ which produce a bigger fraction.  My question: is it possibile to build a single macros such that (on input a,b), in line equations produces $a/b$ and in display-style equation produces $\frac{a}{b}$?

I was wondering if there is a way to have LaTeX interpret $\frac{a}{b}$ as $a/b$, but \[\frac{a}{b}\] as \[\frac{a}{b}\].   It is a little tedious to change a inline equation $a/b$ to a display equation \[\frac{a}{b}\] when doing changes to my text.


A young person travels in time to post-apocalyptic Britain where the wheel is outlawed. I seem to remember there were people, perhaps monks, ruling from underground. They revered a book of mathematics written by the traveler's teacher. I read it in the 60's or early 70's

This is a novel I read when I was young; it would have been sometime in the 1970s. I thought I remembered the author being Peter Dickinson, but I just checked a catalogue of his novels and found nothing that seemed similar (I suspect I was getting this book confused with his Changes trilogy, which I read at about the same time; there are some similarities in the setting but it's definitely not any of the Changes books).  Two present-day schoolboys travel (I don't remember how) into what they first assume is the past but then realise is the future. After some apocalypse, probably nuclear war, a medieval society has been rebuilt around a religion that forbids the wheel. I distinctly remember a scene where a heretic, accused of making a wheel, is executed by being tied to a giant (golden?) wheel and rolled down a ramp to their death. The two boys help overturn the oppressive regime (don't they always?), and then one of them returns to his own time, the other choosing to stay and help rebuild the world.  I remember a scene right at the end where the returned narrator doesn't know how to explain what happened to the other boy's parents, but it turns out one of the parents had dreams (presumably psychic) about what happened to their son and were willing to believe the truth.


I received call one of a company. They are implementing and installing Ubuntu Desktop OS in there client systems and they need:      Create one user as a temporary user and that user should have 3 options enabled in client system:          google chrome with one fixed URL(http:192.168.1.1)    printer access for printing    scanner access for upload docs.          All remaining functionality should be disabled.    For the above process, what resources do we have to use and how can we disable everything? The Company is asking to make a professional document for the above installation. Please help me with this issue.

I would like to customize ubuntu for a library, they only want to display a web browser with their site in full screen.  No address bar, no button user can only click the link on the page.  If library's staff enter admin user name and password they can change any settings in ubuntu.  Any suggestion or usefully link is much appreciated.


I recently upgraded my OS to Ubuntu 14.04 LTS. Everything was fine until now, whenever I try to update or install software via terminal I get this message:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I have no idea what other process could be running on background . Please help I am not enjoying my new O.S. Thanks.

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


What are the operators <<and < used for in Linux?  For example  cat << abc.txt

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


i have a question. I am using bibaltex to create a bibliography, or rather I try to use it. This is what i have:  \usepackage{biblatex} \addbibresource{main.bib} \begin{document} Text\cite{"Bibtexkey"} \printbibliography \end{document}   I dont get any errors. The bibtexkey appears, where i wrote \cite... (actually a number should appear), but no bibliography.   Can anyone help?  Best Roy

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


I was trying to enable php, mysql, apache on my macbook pro running yosemite. I followed this   but it doesn't run. What's wrong in setting up a local web server on OS X  Please help.....I get an error saying  is not available  Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. ## 127.0.0.1       localhost 255.255.255.255 broadcasthost #::1            localhost     Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ ls -lad /Library/WebServer/Documents /Library/WebServer/Documents/index* drwxr-xr-x  8 root  wheel  272 Feb 18 13:29 /Library/WebServer/Documents -rw-r--r--  1 root  wheel   49 Feb 18 13:29 /Library/WebServer/Documents/index.html -rw-r--r--  1 root  wheel   67 Jan  6 14:08 /Library/WebServer/Documents/index.html.en  Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ ps aux| grep http abhimanyuaryan  26010   0.0  0.0  2432772    664 s000  S+   10:21PM   0:00.00 grep http

I updated MacOS Sierra's Apache and PHP, and now whenever I $ sudo apachectl restart I get this:  AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message   Things I've tried so far that didn't work:   Setting ServerName localhost in /etc/httpd.conf Setting ServerName localhost:80 in /etc/httpd.conf Setting ServerName 127.0.0.1 in /etc/httpd.conf Setting ServerName 127.0.0.1:80 in /etc/httpd.conf Ensuring 127.0.0.1       localhost is set in /etc/hosts Repeatedly restarting Apache


In classical physics, the action $S$ is defined as the time integral of the Lagrangian $L$, i.e. $$ S = \int_{t_0}^{t_1} L\, dt. $$ What is the relation between the action, for a point particle, and the Lagrangian in general relativity? If we integrate $L$, do we integrate it over the time $t$ as measured by some observer, the proper time $\tau$, or can we even use any parameter $\lambda$ that is used to parameterize the worldline(s) of the object(s) in the system?

I was reading about the formulation of mechanics in special relativity and found that the action for a massive free point-particle  as $$ S = -mc\int_a^b ds  $$ So, I did a few observations, ie. $$ S = -mc^2 \int_a^b dt $$ and being  $$u_{\mu}u^{\mu} = c^2$$ I wrote the action as $$ S = -\int_a^b m u_{\mu}u^{\mu} dt  $$ which in my opinion resembles more to the classical kinetic energy.  Now, I never saw something like this in a book or text on internet. Everyone seems to work with the classical speed and the old good Euler-Lagrange equations with time as parameter.  So my question is: it's possible to derive the correct equations of relativistic dynamics from this action?  Attempt of solution  The action is $$ S = \int_a^b L(x,v,t) dt $$ and it should be Lorentz invariant (the action or the lagrangian?). Now, changing the parametrization of the path with $d\tau$ instead of $dt$ shouldn't change the integral (with the condition that everything changes accordingly). So I rewrite the action as $$ S = \int_{\alpha}^{\beta} L(x_{\mu}, \frac{dx_{\mu}}{d\tau}, \tau)d\tau $$ and do the variation of this and minimize it: $$ \delta S = \int_{\alpha}^{\beta} \left[ \frac{\partial L}{\partial x_{\mu}}\delta x_{\mu} + \frac{\partial L}{\partial u_{\mu}}\delta u_{\mu}\right] d\tau = 0 $$ Then, using the old manipulations it yields $$ \frac{d}{d\tau}\left( \frac{\partial L}{\partial u_{\mu}} \right) -  \frac{\partial L}{\partial x_{\mu}} = 0 $$  This applied to the lagrangian I wrote $$ L =  m \eta_{\mu\nu}u^{\mu} u^{\nu} $$ seems to yield the correct 4-impulse $$ p_{\nu} = \frac{\partial L}{\partial u_{\mu}} = m \eta_{\mu\nu}u^{\nu} $$  but the hamiltonian (total energy in the text I'm reading) is zero:  $$ H = p_{\mu}u_{\mu} - L = mu_{\mu}u^{\mu} - mu_{\mu}u^{\mu} = 0 $$  I think I did wrong the derivation of the Euler-Lagrange equations, but not sure.


I have a US passport valid for several years, and a Pakistani passport expiring mid-August. I'd like to travel from the US to Pakistan and back in March.  Can the Pakistani immigration authorities create issues as my Pakistan passport is expiring in less than 6 months of when I want to exit Pakistan.  Thanks.

My Pakistani passport expires less than a month from now. I understand that some countries only let people in if their passport is valid for six months or more. Will I be able to enter Pakistan on a passport that is about to expire?  Also, travelling back to Pakistan is likely to involve transiting through some other country.  Does the six-month rule still apply to people returning to their country of citizenship?


This, as the title says should be very simple, I am terribly stuck.  If $\sum a_n^2$ and $\sum b_n^2$ are convergent, how do I prove that $\sum a_n b_n$ is also convergent??

If $\sum (a_n)^2$ converges and $\sum (b_n)^2$ converges, does $\sum (a_n)(b_n)$ converge?  Could someone help me to solve this or at least give me a hint?, I have tried using Cauchy's criterion, the Dirichlet test for convergence, etc, but I can´t prove it.Honestly I don´t know where to start. Any help will be appreciated.


I am thinking of buying a Time Capsule with a small hard drive and upgrading the drive to something larger. There is  on the web as to how to do it, but I am having a hard time finding any details as to what the upper limits of drive size are. It's especially confusing since there are  of Time Capsule, and each one may have a different upper limit. So, what is the upper limit of each? And, if you only know the answer to one specific one, that would be great, too.

I have an Apple Time Capsule model A1254. It has a 1Tb drive. Is it possible to replace the drive with a larger capacity unit? It seems a shame to replace the whole unit. Thanks


I want to check a specific part of an input but I don't know "where" it is I tried with this: a = input('Enter command') if a[0:5] == '(Command name)':      if a[7:?] == '(Subject)':          if a[?:len(a)] == '(Choice)':              To be continued  So, the input is divided into three parts; The command, the subject, and which type of the command it will run. But which index should the ? be? I don't know the length of the word. Is it impossible? No, I know that I can make it, just not how.

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 am doing my Ph.D. in maths and working on something. However, I was wondering what would happen if someone publishes similar results to the ones I am obtaining while I am working on that.  I have no control over that because it may happen that the result is totally new and therefore I couldn't check before starting to work. Will all the time spent being lost? Are my results valid for defending my dissertation?

This is not in any way relevant to me, I'm just interested. What would happen if you chose a PhD thesis to work on, and halfway through someone somewhere in the world who was also doing a PhD in the same field published their thesis, which just happened to be the same research that you were doing. Would your research still be considered since it was done independently? Does this happen often? Are there safeguards to prevent this from happening, like would you normally search the academic field to see if anyone else is working on the same topic? Surely that would be almost impossible to do?


I am creating a document with an inserted PNG file, and I'm trying to create it where the name of the file is not located in the bottom left hand corner of it.  Here is part of the source code:  \documentclass[12pt]{article}  \usepackage{graphicx}  \begin{document}  \begin{center}  \scalebox{0.5}[0.5]{\includegraphics*{C:/Users/PcOwmer/Pictures/OneFourthRSquaredSinFourTheta.png}}  \end{center}  \end{document}

I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).


For some reason, I'm quite good at guessing whether or not a game (both 2D and 3D) is made with Unity3D. But I can't really figure out why that is.  What makes Unity3D games look similar? Is it because people use the same textures? Or is it the texture filtering? The lighting? Something else? I'd really like to know for educational purposes.

With many games, you can say "oh, that's the Unreal Engine, for sure", or "this was made with an upgraded Rockstar Advanced Engine". We can often recognize the engine used for a game just by looking at its graphics, disregarding user interface.  Why is this? All game engines use the same 3D rendering technology that we all use, and the different games usually have a distinct art style. What's left to recognize?


When I maximise the window in Chrome in Ubuntu, the browser stays active although the UI does not update. I have installed GIMP recently and nothing else major since this has happened, and restarting does not solve the issue. Here is a video of the problem.

Ubuntu 16.04 LTS running on i5 6200U and standard integrated intel graphics (driver=i915).  I use evince to view a document, I go full-screen, and sometimes (not always) the screen freezes, which means that I can move the mouse but nothing happens by clicking. I press Ctrl + Alt + F1 and reboot the computer from there.  I thought evince was the problem, but the same issue appears with qpdfview, and I guess with other applications as well.  $ ls /var/crash _usr_bin_evince.1000.crash   _usr_bin_evince.1000.uploaded _usr_bin_evince.1000.upload  _usr_lib_xorg_Xorg.0.crash   I saw many reports of this issue when googling, but most of them suggested that the problem has been sorted out in Ubuntu 16.04, and I could not find any relevant fix.  Any suggestions?  edit://  Solution:  Created a file named "20-modesetting.conf" under directory /usr/share/X11/xorg.conf.d with the following content:  Section "Device"    Identifier  "Intel Graphics"    Driver      "modesetting" EndSection


For example, I do not know the definition of the LaTeX command \ensuremath. Where can I get its accurate meaning? Is there one professional website to offer some information about this?

I can't find official documentation for the \@startsection command. I already looked in:   LaTeX Wikibook LaTeX: Structured document for TEX, 2008 beginLatex — a book that comes with ProTeX in the files that comes with MikTeX in the folder doc   and Google. I found a lot of sites that show examples and discussions about it but I'd like to find the official help or document.


I read this short story in a scifi collection a number of years ago. I think it was the title story.  A small group of between five and ten people (researchers, scientists, colonists) are (I think) cryogenically frozen and arrive on a planet with very strange life. Trees the size of skyscrapers weird animals, etc. The people live in their space ship and over many years they have genetic mutations and I think some of them die. I think there's also at least one more generation and they become more and more like the strange life on the planet.  I thought the title was "The Eternal Golden Braid", but that's the subtitle of Godel Escher Bach, so Googling is useless. I'm pretty sure it's something like that though.  There's another story in the same collection about a little golden flying saucer that comes to a man in a park and no one believes him and he goes crazy or something.

I recall everything about this story except the author and title. Humans have evolved in that women now give birth to six or eight babies in one gestation.   Three couples selected to be colonists by stasis sleep to a known world wake up and find that one girl is dead, (although her six babies survive) and they are on a different planet than the one their ship was aimed.  When the surviving five adults emerge from their spaceship,  they see a multitude of distant floating golden aliens genuflucting to them,  then the aliens form a giant golden double helix in the sky,  then depart in their own spaceship.    The colonists now decide to make the best of this new world,  and populate it.  They call it Viridian,  as it is green and fecund.  There are plenty of dangerous animals on the world. The radiation from the planet seems to indicate the planet is young,  but the presence of vertebrate animal life argues otherwise. There is nothing red on the planet except for the albino girl's eyes,  and  a rare fleeting glimpse of a red mushroom,  that vanishes if anyone tries to get closer. In the end,  everything is explained.    The names of the colonists are Teague,  the Captain,  and Alma (deceased) ; Carl and Moira; Todd (the protagonist) and April (albino girl with red eyes).   They name the three moons as Wynkin, Blynkin, and Nod.   I recall plenty more detail,  but this question seems long enough!  I'll add more detail if anyone thinks it helpful.


I'd like to know if there is a direct, or at least more efficient way (see 2. below) to go from "mesh with multiple modifiers" to "one shape key".  I was offered the solution to merge shape keys (from multiple modifiers) which I tried and it works. It's just too many steps in my opinion. My current solution works slightly better, but not much.   Detailed description: I have two meshes: human base mesh and clothing. My clothing mesh has two shrinkwrap modifiers. One regular which fits the clothing tightly to the selected shape key on my base mesh and one with "VertexWeightProximity" applied to bring back all the wrinkles the clothing has. Works perfectly, but saving "what I see" (all modifier results) into one shape key seems impossible to do in a fast and easy way.   When you apply a second/third... modifier as shape key it ignores what the first modifier(s) did, so you'd have to apply all of them. But I need a non destructive solution. "Display in edit mode" and "Adjust edit cage" do not help.   My most efficient solution so far: Make copies of my clothing mesh for every shape key I want to have, Activate the desired shape key on my base mesh, apply all modifiers on the clothing mesh copy and apply the last one as shape key, transfer this shape key back to the original clothing mesh, delete the copy, repeat.

I am making a shapekey of a model shrinkwrapped to another model. The shrinkmap modifier is too inaccurate to wrap to the model alone. So, my first step was to roughly hand position the geometry around of the first model around the second, then use shrinkwrap. The rough positioning was done as a shape key. I can then apply shrinkwrap, but its as a separate shapekey. The two do not work well together. I need them to be the same shapekey. How do I apply a modifier to an existing shapekey, or merge/combine/join the two shapekeys?


Using the definition of Fibonacci numbers, $F_n=F_{n-1}+F_{n-2}$, I can prove that the limit of $\frac{F_{n+1}}{F_n}$ as $n\to\infty$ is $\phi$ if we assume that the limit exists.  How can we prove that the limit does in fact exist?  Is there more than one method?    I do not think this is a duplicate. Please can someone explicitly show how to split the odd and even terms of this ratio sequence into two sequences- one monotonic increasing and one monotonic decreasing- and given that all ratios are between 1 and 2, show that the limit exists and we do not oscillate forever.    Most of the question has been answered.  I have shown that there are two subsequences- one increasing and bounded above by 2 and one decreasing, bounded below by 1. Using the fact that the limit exists, I can show it has value $\phi$. But how can I show the limit is the same for both subsequences?!

How would one prove that $$\lim_{n\rightarrow \infty} \frac{F_{n+1}}{F_n}=\frac{\sqrt{5}+1}{2}=\varphi$$  where $F_n$ is the nth Fibonacci number and $\varphi$ is the Golden Ratio?


I am using a script to connect to multiple servers. At the moment, I am using something like:  for SERVER in server1 server2 server3 ; do ssh $SERVER "my-command" ; done   I have to specify the (many) servers every time. I was wondering if there is a better way, for example if ssh has any possibility to define "groups of servers", so that I could refer to it as   for SERVER in $SERVERLIST ; do ssh $SERVER "my-command" ; done   or is this a bad idea, and should be done in bash instead?

I would like to install some software on a linux-machine that I have run in VirtualBox. Then I would like to do the same thing on a linux-VPS.  I think that I can save all commands that I run using the history command. Is there any way I could run these commands on another machine? Or what is the way to do such things?


This question is very much related .  I want to log into a user and password protected wifi which uses PEAP and maybe MS-CHAPv2. My wpa_supplicant.conf has to contain an entry like this:  network={     ssid="<somessid>"     key_mgmt=WPA-EAP     eap=PEAP     identity="<someidentity>"     password="<somepassword>" }   Now, I do not want to get displayed the password (but rather have it typed in once by a buddy who knows it – I do and shall not know it), so I also do not want to have it stored in plaintext.  Is it possible to replace the password="<somepassword>" entry by a hashsum of the password, preferably generated without the password  being shown? If so, how can I do it?  Do I have to create an additional hash if MS-CHAPv2 is used? (In the other answer I read something about NtPasswordHash, which didn’t yield much duckduckgo-results and couldn’t be found in the wpa_supplicant.conf man pages as suggested in the other question.)  Alternatively: Is it possible to let a buddy type in his log-in data (i.e. identity and password) only once to let me use his account only once for internettt access?

Is there a way to store my password in /etc/wpa_supplicant/wpa_supplicant.conf as some hash instead of plaintext?  By "password" I refer here to the password used for phase2 authentification. I do not refer to the Preshared Key (PSK) which could be hashed using wpa_passphrase.  For phase2 MSCHAPv2 or MSCHAP authentification I could store the password as MD4 hash using nt_password_hash (see example wpa_supplicant.conf line 659).  Is there any way to store my PAP password as hash?  Or: Is there a way to store the password in some sort of external storage? The example wpa_supplicant.conf suggests the use of such an external storage (using ext:????) but I could not find any documentation about it.  I am aware that storing the password as hash does not increase wifi security. But as the password MUST be the same as the password for other services (account management, subscriptions, payments ...) I don't want it to be stored as plaintext.


What type of questions do we need to ask on Meta and why on Meta only?  Only stack-related website question do we need to ask or can we ask any other website-related questions?

Meta Stack Exchange seems to have different rules and user behavior than the "regular" Stack Exchange sites.  How is it different?    Individual questions answered below:                Related


To learn Python, I'm working on a game. I've hit a puzzle that may have multiple solutions (recursion? reduce? comprehension?), so I want to know what is the best way (e.g. most "Pythonic", best-performing, readable, etc.). Can you help a newbie learn cool stuff? The puzzle is to get a list of cartesian coordinates with which to refer to the spaces in the game board--but I want my solution to work for arbitrary number of dimensions (not just 2D chess, but also 3D chess, etc.) Here's what I've got, and I'm wondering if there are better ways: def cartc(dimensions):     """Returns an object that generates a unique tuple of integers (cartesian coordinates) for each spot          in the dimensions.        Args:         dimensions: An arbitrarily long sequence range objects. Each range object represents one             dimension of the space      Returns:         an iterable object that generates tuples of integers: e.g. (1, 1)                      cartc( [range(3), range(2)] ) generates (0, 0), (0, 1), (1, 0), (1, 1), (2, 0), and (2, 1)                  """          # Generate sets of coordinates by joining lists     tally = [[]]     for dim in reversed( dimensions ):         tally = [ [coord] + partial for coord in dim for partial in tally ]          # Convert to tuples     for coords in tally:         yield tuple( coords )

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I need the value of the hour and the minute value separately. I need them for some calculations. I don't need this: echo %date% Output: Days/Months/Years; echo %time% Output Hours/Minutes/Seconds; I need: x Output: Hours; y Output: Minutes;

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting).


I am searching for an easy example of a subgroup which is quasinormal but not normal. Please help.

Can you give me an example about a $\pi$-quasinormal subgroup but it is not normal subgroup? P.s: $H$ is $\pi$-quasinormal subgroup of $G$ iff $HP=PH$, $\forall P$ is Sylow $p$-subgroup of $G$. $K$ is normal subgoup of $G$ iff $Kg = gK$, $\forall g \in G$. Thanks.


I have the following bash function :  tg() {   git add -A && git commit -m $1 && git push }   But it seems not to work :  $ tg "create index for users" error: pathspec 'index' did not match any file(s) known to git. error: pathspec 'for' did not match any file(s) known to git. error: pathspec 'users' did not match any file(s) known to git.   Obviously, the problem is that the quote was expanded and my middle command was read as git commit -m create index for users rather than git commit -m "create index for users"  What did I do wrong ? How can I fix this ?

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


On the topic of whether we could conceivably understand death and extend human lifespans significantly - I'm wondering if any smart folks can point me to where my thinking regarding death may be wonky.   Hypothesis: Death only exists as an evolutionary advantage, and decoding the genome would point to designed cell death  Offspring provide a chance for mutations and evolution. Bacteria, with their short doubling time, can evolve very quickly (e.g. antibiotic resistance). Humans, with a longer lifespan, cannot evolve as quickly.  While the exact metric above is not linked to lifespan directly (its actually reproductive rate), I'd argue that at stable/equilibrium population size (due to resource constraints) they are indirectly correlated.   Understandably, there are many factors that introduce mutation into a species, other than death rate. Some species may have more powerful DNA editing enzyme variants that lower mutation rates.   Some counter arguments may include 'wear and tear', the notion that no organism can live forever as any ordered matter tends to break down over time. Some cold-water fish have low metabolism rates and long lifespans.   What can I learn about this topic?

I know death and cancer doesn't hurt humans' reproductive success. It's not helping either.  Why do we die? Why dying humans (all of us) are common? What's the point of dying?