At the normal particle filter, there is an equation to deriving posterior $p(x_{0:k}|z_{1:k})$. In the  ,equation 45 , it says that:  $p(x_{0:k}|z_{1:k})=\frac{p(z_k|x_k)p(x_k|x_{k-1})}{p(z_k|z_{1:k-1})}p(x_{0:k-1}|z_{1:k-1})$  and in equation 46, it says this equation is proportional to  ${p(z_k|x_k)p(x_k|x_{k-1})}p(x_{0:k-1}|z_{1:k-1})$  therefore, the denominator $p(z_k|z_{1:k-1})$ is constant, why?

In a derivation of Kalman filter, It says that in Equation:  $p(x_n|y_{0:n})=\frac{p(y_n|x_n)p(x_b|y_{0:n-1})}{p(y_n|y_{0:n-1})}$  the denominator $p(y_n|y_{0:n-1})$ is a constant. (See the ,Page 11 equation (28), and it said the denominator is constant in Page 12).  Can anybody explain it to me ?


How can I determine if $x^2+y^2 = z$ has infinitely many rational solutions $(x,y)$ based on the value of $z\in \Bbb{Q}$.  I understand that $a^2+b^2=1$ has infinitely many rational solutions.  As does $a^2+b^2=2$.  However, $a^2+b^2=3$ has no rational solutions.  When $z$ is an integer I know how to determine if it has rational solutions.  However when $z$ is not an integer it is not clear when it has rational solutions.  For example, it is not immediately clear to me if the equation $$x^2+y^2 = \frac 43$$ has infinitely many rational solutions.

Does $a^2+b^2=1$ have infinitely many solutions for $a,b\in\mathbb{Q}$?  I'm fairly certain it does, but I'm hoping to see a rigorous proof of this statement. Thanks.    Here is my motivation. I'm working on a strange little problem. I'm working in a geometry over an ordered field. Suppose I have a circle $\Gamma$ with center $A$ passing through a point $B$. I want to prove that there are infinitely many points on $\Gamma$. Up to a change of variable, I'm considering the unit circle centered on the origin over $\mathbb{Q}$. To show there are an infinite number of points on $\Gamma$, it suffices to show there are an infinite number of solutions to $a^2+b^2=1$ for $a,b\in\mathbb{Q}$. I could then extend this to showing there are infinite number of solutions to $a^2+b^2=r^2$ for some $r$, which proves that any circle over $\mathbb{Q}$ has an infinite number of points. Then since any ordered field has a subfield isomorphic to $\mathbb{Q}$, I would be finished.


If updates are available when I boot up, software updater will prompt me saying "Updated software is available for this computer. Do you want to install it now?". Its a mild inconvenience sure, but an inconvenience nonetheless. I would like to just not think about updates, and have them automatically install themselves as soon as they're available. In the "Software & Updates" settings, I have security updates set to automatically install but I don't know how to get any other updates to automatically install.

Update Manager is constantly offering me updates (e.g. security fixes, updates from PPAs).  How can I tell my Ubuntu installation to automatically download and install updates whenever they become available?


I have recently interviewed by a professor in US after sending him my CV. A few days after the interview he mailed me and told me to do the formal application process and mention him as the professor I want to work with. Now, I want to thank him for considering me as a choice of his future PhD student. What should I write?

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


So I'm considering updating to Yosemite, but I have a 2011, low end MBP, and Im a bit afraid that its going to be slow. If I do upgrade, is there anyway that I can revert back to mavericks? I've seen a bunch of things online, but that was only for the developer previews, which rely on the Mavericks installer still being on the app store, which I don't think it is.  Thanks.

I have installed the developer preview for Yosemite.  Huge mistake. Everything in my workspace is broken.  I don't have any sort of backup image. I was wondering if I could re-download Mavericks and run the installer - would that effectively downgrade me back to Mavericks?


So im not sure if im doing something wrong or if this has to be done in linux itself, but ive been trying for hours with windows to make a bootable usb drive so i can install my other linux OS for my retro console idea, however even with usb selected as an option, neither of the 2 pcs i have can boot from the flash drive, it doesnt seem to reconize it, but it does see the drive on my windows pc. I dont know if im doing something wrong. Any suggestions? As the os im installing can only be installed by usb.   I have tried the lili program, wind32 disk imager, and a few others, im just not sure what to do at this point. Thank you

I've downloaded Ubuntu desktop (the .iso file that is) on a windows 7 machine and want to create a bootable USB stick in order to install it onto a laptop which currently has no OS. Is there a way to do this?


My Galaxy S6 edge recently updated to Android 6.0.1.  Before, when I would get a message from Whatsapp, it would show the message at the top of my screen (Lollipop called it Heads-up notification). Now, only the icon shows up at the top of the screen and I have to pull down the screen in order to see who its from.  It's really irritating! Please help me get that feature back or advise me how to return to Lollipop. Many thanks.

I really love the new heads-up notifications in Lollipop because they look much cleaner now, but it's really weird some apps use them or not.  I would really want them to work with WhatsApp, but I just don't find out how, or if it is possible.  Any suggestion?


I'm looking for a sci-fi series I watched in the 90s that at the beginning a teen fell through a hole in the sand into a spaceship. Later on a group is formed called the children of something that I don't remember. I know that at some point in the series there's an Egyptian theme where they discover that a pharaoh was also one of that group called the children.

There was a film from the 80s in which young people can teleport anywhere they can think of.   These guys are recruited to do studies with, maybe by the government or a secret company which wants the take advantage of their abilities.   I saw it on cable TV around 1990-1997.   Any clues?


I tried looking at my user page, but I cannot seem to find a "flags" tab. So I was wondering: how can I view a list of all the flags I have cast on a particular SE site? Can I, in the first place?

On Stack Overflow, is there any way for users to view the actions that have been taken for the questions that they have flagged? I recently tried to move one of my own questions for stackoverflow to , but I still don't know whether my request was accepted or declined, or whether a response is still pending or not.


I have been given a question which begins with me deducing $d(n)$ is multiplicative, I know $d(n)= \sum_{d|n} 1,$ and obtain a formula of $d(n)$ in terms of prime decomposition (once again I know is $p_1^{a_1}p_2^{a_2}\cdot\cdot p_k^{a_k}$). I am aware that in order for a function to be multiplicative $f(nm)=f(n)f(m)$ where $(m,n)=1$ and f is non zero. The final part is deduce all positive integers $n$ for when;   $\bullet$  $d(n)$ is odd   $\bullet$ $d(n)= p_0,$ where $p_0$ is a fixed prime.   I have deduced $d(n)$ is multiplicative by letting $n=p_1^{a_1}p_2^{a_2}\cdot\cdot p_k^{a_k}$, where   $$d(p_1^{a_1}p_2^{a_2}\cdot\cdot p_k^{a_k})= (a_1+1)\cdot \cdot(a_k+1)=d(p_1^{a_1})\cdot d(p_2^{a_2})\cdot \cdot \cdot d(p_k^{a_k})$$  as we know the divisors of $n$ are $d=p_1^{b_1}p_2^{b_2}\cdot\cdot p_k^{b_k} $ where eack $b_k$ gives a distinct divisor in the form of $(a_k+1)$. It is the next bit I do not understand.

So I have these parts to this problem:  If $n \in \mathbb N$, then let $\tau(n)$ be the number of positive divisors of $n$. For example, $\tau(6) = 4$.  (a) If $n= p_1^{a_1}p_2^{a_2}\ldots p_k^{a_k}$ where $p_i$ are distinct primes and $a_i\in \mathbb N$, then prove that the number of positive divisors of $\tau(n)=(a_1+1)(a_2+1)\ldots(a_k+1)$.  (b) Find the number of positive divisors of $1,\!633,\!500$.  (c) Prove or disprove that $\tau(nm) = \tau(n)\tau(m)$ for all $m$, $n\in \mathbb N$.  I'm not sure how to prove part a. For part b, I know I can just do a series of divisions to find that answer, so I got $2^2\times 5^3\times 3^3\times11^2$ for the divisors, so I think $\tau(1,\!633,\!500)$ would be 4 in this case. For part c, I think I can do a counterexample of 4 and 6, where $\tau(4)=3$, and $\tau(6)=4$, but $\tau(24)$ is not equal to 12, which is $\tau(4)\tau(6)$, if I did my math right.  So, can anyone help me on part a and tell me if I am doing b and c wrong?


My AC adapter reads...           Output: +12V DC symbol 12.5A           Input:  100-240V~                   50-60Hz 2.5A  I would like some clarification on if i'm reading/understanding this correctly. The input is the range in which the brick will work when I plug it into the wall and the output is what the brick pushes out for the computer (what the computer need to draw to power on when I turn it on). If say I were to have 20 of these same computers plugged in would I trip a standard 120V / 20A breaker in my home?   I know you add the Amps and make sure the total doesn't go over the 20A but am I using the 2.5A that the brick pulls or the 12.5A. Kind of a stupid question but its something that's always confused me when I look at it.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I have limited internet and for some reason, the download speed shown by the extension I installed was always more than 1.5 MB. I tried using the system manager to find out and systemd had 2.3 GB disk write total. It continued using bandwidth until I logged out and logged in again. Then it stopped. Can anyone tell why this happened?

I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue.


$\renewcommand{ket}[1]{|#1\rangle}$ If we have a particle and we know the initial state $|\psi\rangle$ of everything that is relevant, and we know the full Hamiltonian $H$, then we should be able to show that if we measure the position of the particle then we will find it in a position eigenstate, or if not a position eigenstate, at least a superposition of eigenstates in which the observer observes the particle to be in a position eigenstate. From this it would seem as though the Born rule might be able to be derived. Does this reasoning work? If it doesn't work, why not?  Edit: To be clear, it doesn't necessarily have to follow from unitary time evolution by itself as touched in . Suppose $\ket{\psi(0)} = \ket{E}\ket{M}$ where $\ket{E}$ is an energy eigenstate describing the particle and $\ket{M}$ is the state of the measuring device or the environment or whatever is relevant. If one were to now measure the energy of the particle, then knowing the Hamiltonian $H$ (or maybe it is time dependent $H(t)$) it seems that it should be implied, by Schrodinger's equation, that $\ket{\psi(t)}=\ket{E}\ket{M(t)}$, and so the particle is still in the same energy eigenstate. If this is the case then it seems like the Born rule may also be a consequence of the other postulates of quantum mechanics. Is there something not right about what I've said?

Is the  a fundamental , or can it be inferred from unitary evolution?


I'm currently thinking about my portfolio design and I would like some advices from experts. For a personal and professional portfolio, is it better to have a contact form or a mailto? This is my choice bellow:   Build Simple contact form with great design. Under my biography/about me a section, have a button showing "Contact me" and when you hover on, it show my contact email and if you click on it you have the mailto in action. The only thing is that I'm not sure you can copy/paste text appearing on hover, so it will not work with people without mail client. Just my contact email and when you click on it you have mailto bellow about me section, at the bottom of the page or in the footer.   I know that many people created the same topic before, but maybe it changed since then.  Thanks

I'm aware that mailto: links only work for people who use a mail client. Assuming most novice users don't, is it safe to assume that contact forms are only appropriate when the target audience isn't a tech-savvy one?


I have some text, a block with address and phone numbers, that looks like:  import re text = 'John Doe Inc - Real Estate Brokers\n1234 Shaky Bridge Road, '\        '\n Suite 123, \nDallas, TX 12345\n\nTel: 123-456-7890\n\t\t'\        '\n\t\tCell: 234-567-8901'   I just want to keep everything before "Tel:" (i.e. the address, not the phone numbers).  I tried removing "Tel:" and everything after it.  re.sub('Tel:.*','',text)  # Returns: # 'John Doe Inc - Real Estate Brokers\n1234 Shaky Bridge Road, \n Suite 123, \nDallas, TX 12345\n\n\n\t\t\n\t\tCell: 234-567-8901'   However, this only removes "Tel: 123-456-7890".  The substring that is removed does not extend through the end of the string.  Why is that, and how can I fix it?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I want to round the numbers like this:  Value   Expected 0,523%  1% 2,235%  2,5% -0,081% -0,5% -1,081% -1,5%   How can I do this with JavaScript?  Solution:    static round (num) {     const abs = Math.abs(num);     const sign = num < 0 ? -1 : 1;     return sign * (abs % 1 > 0.5 ? Math.ceil(abs) : Math.floor(abs) + 0.5) } }   I used Excel for it =round(Value/Granularity)*Granularity but I tried it in JavaScript not working.    static calc(num){     const granularitiy = 0.00005;     let calc = Math.round((num / granularitiy)) * granularitiy;     return calc;   }   My granularity value is 0.00005;

While working on a project, I came across a JS-script created by a former employee that basically creates a report in the form of  Name : Value Name2 : Value2   etc.  The peoblem is that the values can sometimes be floats (with different precision), integers, or even in the form 2.20011E+17. What I want to output are pure integers. I don't know a lot of JavaScript, though.  How would I go about writing a method that takes these sometimes-floats and makes them integers?


I know on linux when you use sudo, it wants a password.  Things I have already tried:  if i type sudo apt-get install g++ and hit enter, the cursor goes to the next line and no output happens. I thought the issue might have been apt-get, so i tried that without sudo, and got the error saying i might not be root. so that is working.  i tried typing sudo, hit enter, cursor goes down to the next line and nothing.  i can type in my password and it isn't ecnrypted. how do i fix this?

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


I am to do some photos of artistic desk lamps and other lights soon and am after some advice. I anticipate it being hard as the light will be coming from the subject itself. Possibly needing to take two images. One with the light off and lit with other lighting, and one with the bulb on within the lamp. Then combine?   And other advice would be great.

I am quite new to photography and was looking into how I can take better indoor photographs, particularly around night time.  I'm currently in a hotel room for the night and decided to try and take a picture of my room to test out my tripod which I haven't used before. However I noticed no matter what I set my camera settings to the artificial lights (particularly the lamp on the left, image attached) just appeared very washed out. You can't tell any detail about the lamp shade all you can see is just some sort of light but not much to it.  I tried a variety of fstop/shutter speed settings and tried a variety of ISO settings but they all appeared pretty much the same unless I massively underexposed the image.  Given that I wondered whether the solution would be to take a HDR image or take a normal exposure and an underexposed image and blend them later? I understand that artificial light like this can be very hard and harsh but I wondered if there's a way of improving the result with looking away from it?  I wasn't trying to take any particular special picture here but just test out my camera a bit more but this was the first thing I noticed and I didn't know how to fix it. Any tips would be greatly appreciated.


What would happen to the Sun if you would reflect, in whatever way, all the outgoing electromagnetic radiation (Solar winds can be neglected)?

I have looked for similar questions here on stack exchange. The closest example to this that I found is . That question assumed less than perfect absorption of material lining the inside of the sphere, and the effect of thermally re-radiating it inside the sphere.  A lot of the answers focused on that much of the thermal radiation would not be reflected back to the star, and is likely to be reabsorbed by the sphere at another location. On the other hand, this question asks what would happen if the Dyson sphere, using mirrors, deliberately refocus a significant portion of the rays directly back at the star.


If we consider $x,y\in\mathbb{R}$ with $|x|<1$ and $|y|<1$. How do we get to $$\frac{|x+y|}{|1+xy|}<1?$$

This is the question I'm stumbling with:   When $|\alpha| < 1$ and $|\beta| < 1$, show that:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < 1$$    The chapter that contains this question contains (among others) the triangle inequalities:   $$\left||z_1| - |z_2|\right| \le |z_1 + z_2| \le |z_1| + |z_2| $$  I've tried to use the triangle inequalities to increase the dividend and/or decrease the divisor:  $$\left|\cfrac{\alpha - \beta}{1-\bar{\alpha}\beta}\right| < \cfrac{|\alpha| +|\beta|}{\left|1-|\bar{\alpha}\beta|\right|}$$  But it's not clear if or why that would be smaller than one.  I've also tried to multiply the equation by the conjugated divisor $\cfrac{1-\alpha\bar{\beta}}{1-\alpha\bar{\beta}}$, which gives a real divisor, but the equation does not appear solvable.  Any hint would be much appreciated.


We have a user Ronnie who asked  yesterday without registering a proper account (or something - I'm not overly familiar with the account system here). He came back today and was unable to login, and therefore unable to comment on his question. So he went off and created   questions to contunie the discussions. Quite understandable of a new user, but those with the rep (me included) rushed to close the dupes.  Is there anything that can be done to improve this situation? IMHO, it's a case of the rep requirement for commenting doing harm.

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


So far I have:   downloaded Ubuntu 12.04.4 LTS from the site. Converted the ISO file to IMG. (I used Unetbootin, I'm not completely sure I did this right.) I selected disk image, ISO, and browsed to find my Ubuntu ISO file. I saved it to a 4 GB flash drive. I put the flash drive in my parents' old HP Pavilion. I rebooted, and hit escape to get to the boot menu. I could see my flash drive as an option. I selected it and hit enter.   --And then Windows XP just starts up like always.--  Even though I select my flash drive from the boot menu, Windows XP loads up. I'm not a computer wiz, and this is my first attempt to play around with Linux. I heard using a cd is easier, but the cd drive on this pc is toast.

I would like to see a full how-to guide on how to install Ubuntu.


This question has been asked several times in similar (yet often slightly different) ways.  The general consensus seems to be that it's best to ask multiple questions individually in multiple Question posts so that each can be addressed separately. This is as it should be...in general (and in theory!). See related posts for some context and discussion:        In practice, however, it can be more useful to ask a few similar questions if they work together to express a single fundamental concern.   I propose that there are some situations when it is best to ask several questions together, rather than in multiple posts.  For example, sometimes the question-asker finds it difficult to ask something in one question and instead asks it in two or three similar questions to "beat around the bush". This often helps the poster express their fundamental concern more clearly or thoroughly and helps the community understand what the poster is thinking, and why.   Here are a few examples of multiple questions used effectively in a single post:        In these examples, answering one of the questions almost requires answering one of the accompanying questions as well. For this reason, it's better for all if the questioner and answerer each ask and answer these related questions together. Importantly, it also makes the question a much better resource for somebody who stumbles on that that question later, or has a similar question. As pointed out in , asking a cluster of questions can help distinguish one question from a near-duplicate and avoid an incorrect flagging as a duplicate.  In other cases (such as ), it's probably best to split the questions into multiple posts, but the end result can be a highly-useful repository of knowledge that is a "one-stop-shop".   I'm not satisfied with some SX users demanding separate posts for similar questions if the questions are essentially expressing the same concern. I'm also not satisfied with the prevalence of posts with multiple, disparate questions.   My question is this:    When is it okay to post multiple questions?  How can we distinguish between multiple questions that ought to be split vs. multiple questions that work together to express a single fundamental concern?  What guidelines or standards can we give and enforce for the community?    This is different than the related posts I've seen because I'm looking for guidelines. Whereas  was asking about how the user should frame his questions in the future, I'm asking what the SX guidelines should be.

I want to ask several questions about the same problem domain but each question is independent from the others. Should I put all the questions in a single post or should I split them and send multiple posts?


I’m trying to install HTK tools. I have this message when I type make all:  error : "/usr/bin/ld : cannot find -lX11"

When I try to compile and install HTK, it produces the following error:  HTK is now ready to be built.  Type "make all" to build the HTK libraries and tools.  Then "make install" to install them.  The tools will be installed in /usr/local/bin  Build notes: Language Modelling tools will be built. HDecode will not be built. You can build it manually later by running 'make hdecode install-hdecode'  ************************************************** user@EESBLRP105:~/htk$  make all  (cd HTKLib && make HTKLib.a) \       || case "" in *k*) fail=yes;; *) exit 1;; esac; make[1]: Entering directory `/home/user/htk/HTKLib' gcc  -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I. -DPHNALG   -c -o HGraf.o HGraf.c In file included from /usr/include/stdio.h:27:0,                  from HShell.h:40,                  from HGraf.c:54: /usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory  #  include <sys/cdefs.h>                          ^ compilation terminated. make[1]: *** [HGraf.o] Error 1 make[1]: Leaving directory `/home/user/htk/HTKLib' make: *** [HTKLib/HTKLib.a] Error 1


I read an article saying an Israeli scientist had discovered the heaviest nucleus with 122 protons and 170 neutrons, and found it in a sample of purified thorium, and I would like to know if there are any laws of physics that put a constraint on the size limit of atom? (By size, I mean the maximum number of protons and neutrons held together by nuclear force, so that pretty much rules out neutron star and the likes.)

After reading  thread, it appears to me that creating a new element is a game of chance some sort of an art. It also appeared to me that the higher you go, the harder it is to make an element.   Anyways, What's the use of creating new elements? Has there been any research on the practical applications of these new elements? Is there a limit on how  massive an atom can get?   I haven't done any research about this because it just popped up in my mind.


I would like to know if there is any way on ubuntu to get a list of softwares/packages installed on the machine with their size and last use.   This is something which I have on windows and it is really useful because it helps me understanding which software I installed and which of them I am not using anymore. In this way I could delete them in order to make some space on my computer.  I am on Ubuntu 14.04 and the command  dpkg -l   Just gives me a list of software but NOT their size/use   Thanks in advance for your help.

I would like to have a list of the installed software on my machine, with the disk space consumed by them alongside. I would prefer to be able to order by largest/smallest, but that is not a necessity.  I am the sort of person who will install software to try it, and never clean up after myself.  As a result, my 7GB (Windows and my Data are on separate partitions, as well as a swap area) Ubuntu 11.04 partition is suffering, and has started regularly showing warning messages.


I am new to tikz package and want to draw following complex integration contours. I would like to insert these two pictures in my report. I read the previous posts on similar drawings but can't figure out the way to modify the existing code. Can some one help me out? Thank you very much. Here are the plots:

First, I must say I have no knowledge about PGF/TikZ nor PSTricks, but I would like to draw the following or similar closed contours using one of them or another adequate package. Where can I find the TikZ and the PSTricks manuals? I would appreciate if you could indicate the code to draw one of the diagrams.  ADDED: I've found  TikZ Manual for Version 2.10. It coincides with the package version installed on my computer, as I checked after the help of Benedikt Bauer's comments.  Diagram A     Diagram B


I'm trying to transpose a large data file that may have many rows and columns, for subsequent analysis in Excel.  Currently rows might contain either 2 or 125,000 points, but I'm trying to be generic.  (I need to transpose because Excel can't handle that many columns, but is fine if the large sets span many rows.)    Initially, I implemented this is Python, using the built-in zip function.  I process the source file to separate long rows from short, then transpose the long rows with zip:  tempdata = zip(*csv.reader(open(tempdatafile,'r'))) csv.writer(open(outfile, 'a', newline='')).writerows(tempdata) os.remove(tempdatafile)   This works great and takes a few seconds for a 15MB csv file, but since the program that generated the data in the first place is in C#, I thought it would be best to do it all in one program.  My initial approach in C# is a little different, since from what I've read, the zip function might not work quite the same.  Here's my approach:  public partial class Form1 : Form {     StreamReader source;     int Rows = 0;     int Columns = 0;     string filePath = "input.csv";     string outpath = "output.csv";      List<string[]> test_csv = new List<string[]>();      public Form1()     {         InitializeComponent();     }      private void button_Load_Click(object sender, EventArgs e)     {         source = new StreamReader(filePath);          while(!source.EndOfStream)         {             string[] Line = source.ReadLine().Split(',');             test_csv.Add(Line);             if (test_csv[Rows].Length > Columns) Columns = test_csv[Rows].Length;             Rows++;         }     }      private void button_Write_Click(object sender, EventArgs e)     {         StreamWriter outfile = new StreamWriter(outpath);          for (int i = 0; i < Columns; i++)         {             string line = "";             for (int j = 0; j < Rows; j++)             {                 try                 {                     if (j != 0) line += ",";                     line += test_csv[j][i];                 }                 catch { }             }             outfile.WriteLine(line);         }         outfile.Close();         MessageBox.Show("Outfile written");     } }   I used the List because the rows might be of variable length, and I have the load function set to give me total number of columns and rows so I can know how big the outfile has to be.    I used a try/catch when writing to deal with variable length rows.  If the indices are out of range for the row, this catches the exception and just skips it (the next loop writes a comma before an exception occurs).    Loading takes very little time, but actually saving the outfile is an insanely long process. After 2 hours, I was only 1/3 of the way through the file.  When I stopped the program and looked at the outfile, everything is done correctly, though.  What might be causing this program to take so long?  Is it all the exception handling?  I could implement a second List that stores row lengths for each row so I can avoid exceptions.  Would that fix this issue?

I understand the difference between String and StringBuilder (StringBuilder being mutable) but is there a large performance difference between the two?   The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice?


I am travelling to Costa Rica from Ecuador.  I have a Canadian and Ecuadorian passport.  I want to travel with both because I do not need a visa to enter Costa Rica if I use my Canadian passport. Which passport number do I give the airline to buy my ticket? To leave and enter Ecuador I need to show them my Ecuadorian passport is that correct?  To enter and leave Costa Rica I would show my Canadian passport is that correct? Do I ever show both passports?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


So I have an Ubuntu 11.10 Live USB disk. I've noticed that my settings never get saved. Every time I reboot while in my Live USB and then boot back into it, all my settings and [un]installed programs revert back to default after the reboot. How can I set some sort of persistence on settings on a Live USB?

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


While I can use something like Doxygen to document a C library (functions, constants and structures defined/written by me), I couldn't find something equivalent in LaTeX to document \newcommand(s) \let(s) and other stuff in my .cls and .sty files.  Since LaTeX is common used as output (even by Doxygen), I'm struggling to find "Google keywords" for this specific matter.  Am I supposed to document a class/package by creating a separate LaTeX file specific for this? Or maybe, is literal programming the recommended way for LaTeX?  Thanks in advance.

I have many style files (and one or two class files) that I've written in my local texmf tree.  Most were simple things that got me out of some trouble and which I put in to a style file in case I needed them again.  One or two are quite complicated (probably unnecessarily).  My thinking is that I should add some documentation to these files.  Mainly for myself: although my reasoning for defining stuff the way I did was perfectly clear when I did it, it may not be so clear next year when I try to use it again (or, worse, try to modify it again).  Also for others since I do sometimes share these files, either with collaborators or with anyone who says, "Hey, that's neat!  How did you do that?".  But definitely not for uploading to CTAN.  So I'd like to add some basic documentation to these files.  As it is just for myself, I don't feel that I want to do too much, so what I'd like is a system that is as close to the following parameters as possible:   It should be "in file": I want to be able to add the documentation for a command right where the command is defined. The format should be readable when not compiled: this is a corollary of the above, since if I want to be able to read it there and then, I don't want to have to compile it first. But it should be compilable so that I can send it to someone else if I want to and they don't have to wade through the style/class file to find the documentation. However, the compiled form doesn't have to be all that pretty.   Is there such a system?  Searching for 'documentation' on CTAN is like searching for snow in Norway - there's plenty of it but, to an outsider, it's hard to figure out what is the right type of snow.  If there isn't a system that does what I describe, I'd be happy to hear of others' experiences in trying to do this (I'd be happy to hear them anyway, in fact).


Prove by induction that $n$ straight lines that lie in a plane and are as such that none are parallel and there doesn't exist a point where some three lines cross, divide the plane on $$1+\frac{n(n+1)}{2}$$ parts.

Assume that there are $n$ infinitely long straight lines lying on a plane in such a way that no two lines are parallel, and no three lines intersect at a single point. Prove that these lines divide the plane into $\frac{n^2+n+2}{2}$ regions. (Hint: Any two non-parallel straight lines on a plane must intersect at exactly one point.)  Can someone tell me where to start here? I know to prove the base where $n=0$, but don't know how to proceed.  Any help is greatly appreciated!


I created a table and inserted values into it but they are not storing in orderly manner. The table looks like:   I can order them by using ORDER BY but it does not change them permanently. Is there a way to save them in orderly manner permanently.  Clarification: I don't want how they are stored internally, what I want is when ever I execute select * from cricket; the results to come sequentially. So that I don't want to use ORDER BY clause every time. Is there a way?

I have a table and I am always getting the data by ordering a column. In my case, I  order by datenum. However, the selection is so slow because of the ordering.  Is it possible to order the table after datenum. This column is defined as unique. If  defined as an index, would the selection will be faster?


I'm worried about the time between my connection flights. I'll be flying from Rochester ROC to Washington DCA and then I'll have to change airport and go to IAD Dulles to grab my connection flight to London Heathrow on the 27th of December 2016.  So I'll be landing at 1:15pm in DCA and my flight to London is at 6pm from IAD.   What would be the easiest way to go to IAD airport ?   I'm really nervous to miss my flight and I could definitely use some advice from you guys  Cheers !

I've got a transfer (on United) from Washington National (DCA) to Washington Dulles (IAD) airports, landing at DCA at 15:22.  What's a quick, low stress way of doing this change (price isn't especially important), at a time of day that I'm concerned may be kinda busy on the roads.  Also, will I need to collect and recheck my own baggage?


If we use E²=m²c⁴+p²c², and we know mass of photon is zero, and  they have momentum but why aren't they affected by gravity.

Using classical mechanics, the formula for gravitational attraction is   $$F = G\frac{m_1m_2}{r^2}.$$   This formula does not work for photons, and we need to use Einstein's theory of gravity to account for that, as the photon is massless. What if, instead of using the mass of the photon, we rather used the inertia of it?  The momentum of a photon is     $$p=\frac{h}{\lambda}.$$  Thus, using that, we can calculate its supposed 'mass' (inertia) as momentum is also equal to mass times velocity. So 'mass' of a photon is     $$m=\frac{p}{v}=\frac{h}{\lambda  c}.$$   If we use this mass as the mass of a photon, can we use Newton's equation for gravitational attraction?


So my case is a little different. I never liked my college studies much because the subjects never excited me, which eventually lead to a low CGPA (7.18/10). But I started to have a strong liking for NLP since the time I was first exposed to it. I've been drenched in NLP for a year now, and out of interest I have done several deep learning projects related to NLP, image classification etc...I also have carried out proper experimentations and submitted a paper to top NLP conferences in India and several other places(now I'm waiting for  reply from these). I have 3 good LOR's, one of which is from my mentor-ship program with a reputed NLP researcher from  . My GRE score is 330/340. The programs at the top universities such as Stanford, UC Berkeley etc excite the crap out of me!!! Given the minimum aspects of my application, should I apply to these universities?? And is it plausible to expect an admit from these universities??  I am desperate for answers, so any help would be highly highly apreciated.  EDIT: This is not a duplicate of any of the questions out there. Its a specific problem which I did not find anywhere on this platform. It could be of help to students facing the same issue.

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


So from what I understand, SUID makes so that when you execute a file, you're basically executing it under root, right? Now I made this file, and whenever I try to run it, I get a permission denied error:  [unu@aaw aaa8]$ ll fufa1 -rws--xrwx. 1 root root 34 Nov 30 10:41 fufa1 [unu@aaw aaa8]$ cat fufa1 #!/bin/bash cat /var/log/messages [unu@aaw aaa8]$ ./fufa1 cat: /var/log/messages: Permission denied   So what I'm trying to do is execute a bash script from a file with root SUID on another user, but I can't. So what's the problem?

The setuid permission bit tells Linux to run a program with the effective user id of the owner instead of the executor:  > cat setuid-test.c  #include <stdio.h> #include <unistd.h>  int main(int argc, char** argv) {     printf("%d", geteuid());     return 0; }  > gcc -o setuid-test setuid-test.c > ./setuid-test  1000  > sudo chown nobody ./setuid-test; sudo chmod +s ./setuid-test > ./setuid-test  65534   However, this only applies to executables; shell scripts ignore the setuid bit:  > cat setuid-test2  #!/bin/bash id -u  > ./setuid-test2  1000  > sudo chown nobody ./setuid-test2; sudo chmod +s ./setuid-test2 > ./setuid-test2  1000     Wikipedia :     Due to the increased likelihood of security flaws, many operating systems ignore the setuid attribute when applied to executable shell scripts.   Assuming I'm willing to accept those risks, is there any way to tell Linux to treat the setuid bit the same on shell scripts as it does on executables?  If not, is there a common workaround for this problem? My current solution is to add a sudoers entry to allow ALL to run a given script as the user I want it run as, with NOPASSWD to avoid the password prompt. The main downsides to that is the need for a sudoers entry every time I want to do this, and the need for the caller to sudo some-script instead of just some-script


I have a Schengen visa issued by France which is type C short stay scientific work visa (visa stamp has remark: scientific researcher), But i am looking to enter italy (Rome) and drive to France. Would that be a problem (1) from entry point of view at Rome airport on Schengen short stay (but not tourism) visa, (2) traveling in Italy on Schengen short stay (but not tourism visa) point of view.  Any suggestion/comment will be helpful.  EDIT: I am planning on traveling to Italy for tourism for 3 days before my work in France starts and I was warned by visa interviewer that traveling to Italy for tourism on work visa can result in denied entry to Italy. I am an Indian national traveling from US to Europe.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


For some reasons I need to open the mega menu when somebody clicks on a menu item - for the desktop version.  At the moment the mega menu opens with hover, I need a solution for click opening.  Is there any solution within the TB Mega Menu module for this? If not, how can I realize this with JQuery?  Note: This is not a duplicate of "", because I need the click behavior NOT for mobile version but for desktop version.

We are attempting to get submenus to only appear when the user "taps" the menu option on a mobile browser. This functionality works good on hover but some mobile devices don't work with hovering. We need the ability to click submenu titles in order to drop them down and then click them again to collapse them.


I am coming from the field of psychology and in most publications Model Selection (OLS, Regression) is done via Forward/Backward Selection using the F-Static/p-value of the regression coefficients to decide which coefficient to include/exclude in the next step.  Now i read in the statistical learning literature (for example in ESL) that this strategie is outdatet because "it doesn't account for multiple testing issues correctly".  Unluckily there is no further explanation on those problems.  Does anybody can explain me, what exactly is the problem of this approach and why using other criteria (Cp, AIC) is better?  Thanks a lot in advance!

I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression.


I have these scripts...   Name: <input type="text" id="inputName" onblur="verifyName(this.value)">   <script type="text/javascript">     function verifyName(nameInput)     {        if(nameInput=="")        {           // error           alert('please enter your name');        }        else        {           // accepted        }     }  </script>   This will display an error if the user don't want to enter his/her name on the textbox.  What if the user is lazy and he/she will enter " " (a space or more) as a name? This can be accepted by the JavaScript. It will return false on the if condition.  But I want the user not to enter only spaces. Is there any way to do that?  Note: Any number of spaces (without any letters) inputted are invalid.    If the user inputs one of the texts below, JavaScript should accepts/rejects the input as follows...  "John" --> valid "" --> invalid "John Doe" --> valid "    " --> invalid "John     Doe" --> valid (can be edited to remove too many spaces) "      Kim" --> valid (can be edited to remove too many spaces) " " --> invalid

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


I get three dates: From date, To date and current date.  I want to find whether current date is in between From and To dates. If current date is in between these two dates then I want to create two new From and To dates.  Example:   From Date = 15 march  To Date = 25 march  current date = 21 march   Expected result should be:   From Date= 15 march,  To Date=21 march From date= 21 march,  To Date=25 march   To implement this logic I want to check my current date status whether it's in middle of date range or it's before or after.

I have a series of ranges with start dates and end dates. I want to check to see if a date is within that range.  Date.before() and Date.after() seem to be a little awkward to use. What I really need is something like this pseudocode:  boolean isWithinRange(Date testDate) {     return testDate >= startDate && testDate <= endDate; }   Not sure if it's relevant, but the dates I'm pulling from the database have timestamps.


I have noticed in the game there are certain blueprints that show up in development without me researching them like the avenger assault rifle, initiative armour the pathfinder armour, now does anyone know why is it dependant on how far you get in the campaign as I'm not that far or am I getting the blueprints and I just don't know I am

As I progress, I realize that some blueprints open up throughout the story and don't have to be researched. Are these random or are they always the same and is there a list over those? Seems you can easily waste research point if you don't know that.


A regular tetrahedron has this property:  For any two of its vertices exists a third vertex, which forms a regular triangle with these 2 vertices. (But it doesn't mean any 3 vertices form a regular triangle)  Are there any other polyhedrons that have the same property?  I think there isn't such a polyhedron. But not sure how to prove it. I've tried proving that there isn't an irregular tetrahedron with this property, assuming that there is a pair of unequal sides.

A regular tetrahedron has this property:  For any two of its vertices exists a third vertex, which forms a regular triangle with these 2 vertices.(It doesn't necessarily have to be a face of it).  Are there any other polyhedrons that have the same property?  I think there isn't such a polyhedron. But not sure how to prove it. I've tried proving that there isn't an irregular tetrahedron with this property, assuming that there is a pair of unequal sides.   Current answers are a little confused with the conditions of the problem.


When we have the Lagrangian  $$\mathcal{L} = \frac{1}{2} \partial _\mu \phi\partial^\mu \phi \tag{1} $$ We have a symmetry given by $$x^\mu\mapsto e^\alpha x^\mu, \qquad\phi\mapsto e^{-\alpha} \phi.\tag{2}$$ I'm struggling to find the Noether charge for this symmetry. The formula is  $$j^\mu=\frac{\partial \mathcal{L}}{\partial\partial_\mu\phi}\delta\phi-k^\mu\tag{3}$$ where $$\delta \phi=-\phi \tag{4}$$ in this case, but I can't find $k^\mu$ such that $$\delta \mathcal {L}=\partial _\mu k^\mu .\tag{5}$$

Noether's theorem usually considers coordinate/field transformations which leave the Lagrangian invariant up to a divergence term, i.e.  $$\mathcal{L} \rightarrow \mathcal{L} + \partial_{\mu}f^{\mu}$$  However there is a more general class of transformations which leave the equations of motion invariant, and that is a divergence term along with an overall scaling:  $$\mathcal{L} \rightarrow \alpha\mathcal{L} + \partial_{\mu}f^{\mu}$$  but Noether's theorem does not seem to deal with these types of symmetries, which are exhibited by, for example, the Klein-Gordon Lagrangian:  $$\mathcal{L} = \frac{1}{2}\partial_{\mu}\phi\partial^{\mu}\phi - \frac{1}{2}m^2\phi^2$$  under the transformation $\phi \rightarrow \alpha\phi$ (giving $\mathcal{L} \rightarrow \alpha^2\mathcal{L}$).    The action similarly transforms as $S \rightarrow \alpha^2 S$.  I feel this is important to emphasize as there are cases in which the Lagrangian scales by a factor but the action remains strictly invariant.  This is not the case here, as the action scales by $\alpha^2$ but the equations of motion and extrema of the action are invariant, which is ultimately the only physical thing that matters.    Is there a generalization to Noether's theorem for these "scaling-type" symmetries?  I.e. is there a conserved quantity/current arising from scale invariance?


My getter wants the method it's getting to have a static method but if I do that it will break my code is there any way around this?. Language Java.  This is the line in my test class that wants to get the method in my vending class.  System.out.println("Total Sales for both machines today $"+ VendingMachine.getTotalsSales());   This is my getter method that takes the array I created from the string provided in the test class that put the items into an array. I want to be able to keep this array that I have created while also getting the total sales.  public double getTotalsSales() {     totalSales += availableItems[this.selectItem].price;     return totalSales; }   Is there any way I can keep my array and with also being able to grab the total sales from the tester class?

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


What I wanted to ask is would a piece of solid stock inside a pipe increase the ability to resist bending ? putting together the strength of tubular steel pipe with a solid core rod.

I would like to know if by placing a solid rod of steel inside a piece of hollow steel pipe increase the strength ?


In the early nineties, I was reading a science fiction series that was written by two authors. The series was not complete at the time, but there were probably like four to six books in the series.  I don't remember much about the book except for a few peculiarities. At the beginning of the series, it is clear that one author is attempting to introduce computer-based slang for the characters. I think one character actually says "shove that up your disk drive", or something to that effect. I suspect that the other author wrote the second book, because this was completely dropped, and then reintroduced in later books. Even as a young person, this produced quite a jarring effect.  The only other thing I can remember about the series is that there was some kind of female insectoid creature. At one point, she loses a limb, but isn't too worried because she can grow it back.   Perhaps that is too little to go on, but I figured I'd try.

I'm trying to remember the name of a novel/series I read back in the mid-eighties.  I can't remember the author other than that it was a known older author.  I initially thought maybe Saberhagen or Harrison, but can't find it in their bibliographies.  It involved a collection of 4-5 people from different times/places.  The distinctive bit I can remember was that one of them (not the main character) was a cyberpunkish woman from the "future" of 1999 who spoke in futuristic dialect of English that the other characters, including the protagonist, from the "present" (from the eighties) could not understand.  Unfortunately, I don't remember much else of the plot other than that they were making their way through ruins.


While teaching complex numbers for those who are encounter for the first time (usually 10th grader and 11th grader), I get the question like      "Can even squared number give negative results? How come there be square root of negative numbers? How much length does $i \; \mathrm{cm}$ represent in meter scale?"     in every year and in every section. I have been answering      "Well, this is just a construction such that it gives solution to equation $x^2 + 1 = 0$ which must have two solution by use of Fundamental theorem of algebra but since we do not have that in Real numbers, we are forced to construct $i$ that way." Then I go to history accepting the difficulty of some numbers like $\sqrt 2 $ by ancient  (just a red herring). Then I continue "Natural number is used to represent Money while Real number is used to measure length, complex number, while not representing length or weight, it my represent some other things than money or length that has applications in physics, math and engineering and so it is valid to take construct a symbol $i^2 = -1$."   I don't know if I am speaking too much out of my limited knowledge. What is the best way this knucklehead to explain those knucklehead who have been brainwashed in secondary and lower-secondary school that you cannot take square root of negative numbers, while still being correct and make them accept it easily?  EDIT: I have last question. Are some problems that is impossible to solve without use of Complex Numbers or all problems involving complex numbers have other workarounds?  EDIT-ADDED:: What would mathematics be like without the use of complex numbers? Perhaps, if I mention this clearly, maybe it would be helpful for students. One example is given by @Semiclassical on the comments in the first answer. What other things cannot be absolutely solved without the use of complex numbers?

Complex numbers involve the square root of negative one, and most non-mathematicians find it hard to accept that such a number is meaningful. In contrast, they feel that real numbers have an obvious and intuitive meaning. What's the best way to explain to a non-mathematician that complex numbers are necessary and meaningful, in the same way that real numbers are?  This is not a Platonic question about the reality of mathematics, or whether abstractions are as real as physical entities, but an attempt to bridge a comprehension gap that many people experience when encountering complex numbers for the first time. The wording, although provocative, is deliberately designed to match the way that many people actually ask this question.


Let $$ a_n = \frac{n}{\pi}sin(2\pi e n!)  $$ Find $$\lim_{n\to\infty}a_n $$ I tried expanding using the Taylor series representation of $e$ but I arrived nowhere.

I tried and got this   $$e=\sum_{k=0}^\infty\frac{1}{k!}=\lim_{n\to\infty}\sum_{k=0}^n\frac{1}{k!}$$ $$n!\sum_{k=0}^n\frac{1}{k!}=\frac{n!}{0!}+\frac{n!}{1!}+\cdots+\frac{n!}{n!}=m$$ where $m$ is an integer. $$\lim_{n\to\infty}n\sin(2\pi en!)=\lim_{n\to\infty}n\sin\left(2\pi n!\sum_{k=0}^n\frac{1}{k!}\right)=\lim_{n\to\infty}n\sin(2\pi m)=\lim_{n\to\infty}n\cdot0=0$$  Is it correct?


The goal of this question is to introduce basic group theory concepts with GAP: examples about alternating groups, cyclic groups and demonstrate the Lagrange theorem $[G:H]=\frac{\#G}{\# H}$. Example.  I was surprised to find out that the number of elements in  is 12, not 4,  which is equivalent to Elements(AlternatingGroup(4)) in GAP.  I would be extremely delighted to find GAP commands such as  command to print cosets ( CosetTable(AlternatingGroup(4)) firing error) and  command to find subgroups of A4.   which I want to use for more accessible demonstration for the Lagrange theorem in group theory. So How to demonstrate Lagrange theorem with different introductory groups in GAP?


I have pandas data frame which has some related columns, like let's say I have a column that showing housing sale prices and other column shows total area of that house. If I look for outliers alone it's showing really expensive houses but some of them makes sense because they have huge area, what I want to find is cheap houses with huge areas.  I can spot them by eye if I plot scatterplot and filter them out manually, but is there any way to do this without visual analysis?

Suppose I have a large set of multivariate data with at least three variables. How can I find the outliers? Pairwise scatterplots won't work as it is possible for an outlier to exist in 3 dimensions that is not an outlier in any of the 2 dimensional subspaces.  I am not thinking of a regression problem, but of true multivariate data. So answers involving robust regression or computing leverage are not helpful.  One possibility would be to compute the principal component scores and look for an outlier in the bivariate scatterplot of the first two scores. Would that be guaranteed to work? Are there better approaches?


The Prime Directive is a Federation concept that some others do not follow (I’m thinking Romulan, Klingon, Cardassian, possibly Ferengi).  Whenever a Federation ship discovers a new pre-warp society they are prevented from establishing contact under the Prime Directive:     The Prime Directive prohibits Starfleet personnel and spacecraft from interfering in the normal development of any society   Now, that’s all fine but leaving that society open to be discovered by any of the other warp capable species out there, especially the most aggressive ones, feels like a little dodgy from the ethical point of view, since you may argue that the main spirit of the Prime Directive is void if you allow others to interfere with that development even if you don’t do it yourself.  Are there any references (in canon preferably) about whether the Federation also protects those societies from intervention in addition to just not interfering. And would a violation of that be considered an act of war?

In the galaxy there are a fair number of pre-warp societies. A Federation ship is not to contact them. But what about other, non-Federation species?   If for example a Ferengi ship passes by a pre-warp planet, would they be allowed to contact it? What would a Federation ship observing this contact have to do? Are they obliged to intervene? Are they allowed to? Or were they merely allowed to "strongly discourage" the attempt of the Ferengi?  If it is legal to use force to stop the Ferengi, than in essence the Ferengi were bound to the Prime Directive too. And if so: does this go for all Federation territory? Is this confined to the Federation territory? If Janeway observes such an incident, what are her rights to intervene? Or does she have the duty to do so?


I am using the PostGIS Manager Load data to PostGIS tool on a Windows install and am getting the following error:  Something's wrong: ["'shp2pgsql' is not recognized as an internal or external command,\n", 'operable program     or batch file.\n']   Does anyone have any ideas as to what is wrong?  I am trying to append to an existing table.  Thanks...

I have QGIS 1.8.0 installed via OSGeo Installer and work on win 7. All I need is to upload the shapefile to the database via this plugin. Unfortunately I am receiving an error:  Something's wrong: ["'shp2pgsql' is not recognized as an internal or external command,\n", 'operable program or batch file.\n']   How to install and configure shp2pgsql to make this plugin work fine?


#! /bin/csh  # NEW PASS value will change in every run set NEW_PASS=`dyanamic generating password on everyrun`  echo $NEW_PASS  There is another conf file where we need to change the above generated password. In new.conf file corresponding line is pass=XYZ, Now above NEW_PASS value should be updated with new.conf file with replcing XYZ. I tried sed -i -e "s/^pass*/pass=${NEW_PASS}/g" new.conf  But it's not working. Not sure if there is any issues with command syntax.

I want to do:  cat update_via_sed.sh | sed 's/old_name/new_name/' > new_update_via_sed.sh   in my program.  But I want to use variables, e.g.  old_run='old_name_952' new_run='old_name_953'   I have tried using them but the substitution doesn't happen (no error). I have tried:  cat update_via_sed.sh | sed 's/old_run/new_run/' cat update_via_sed.sh | sed 's/$old_run/$new_run/' cat update_via_sed.sh | sed 's/${old_run}/${new_run}/'


According to the FMA:B series, the homunculi aren't supposed to grow old. Moreover, all of the homunculi other than Wrath (King Bradley) could regenerate themselves. This even includes Greed, who's also a human-based homunculus. We also see in the series that during Bradley's death, his body degenerated. If he was able to grow normally then there shouldn't be such things happening to his body.

As we know, the homunculi can heal themselves and don't age because of the philosopher's stone.   However, Wrath doesn't seem able to heal and he gets older, despite being a homunculus. I always thought that's because he is a human who was turned into a homunculus, but Greed can also regenerate, even though he still has Lings soul and isn't 100% homunculus.  Why isn't Wrath like a normal homunculus?


I need your help to solve a problem I have with the Google SERP for my site. My site is www.personalmedia.it, now if I search the keyword "personalmedia" the result is this one:        You can see that the link below the title is not personalmedia.it, but ypma.it. ypma.it is the company's old site, that now has a redirect to personalmedia.it.  Why Google is showing that URL instead of the real URL of the real site?  Another strange thing: if I search the keyword "personal media" the result is this one:        In this case you can see the above problem, plus another one: the highlighted text in the description is not the text that I wrote in the description metatag as shown here (which correctly appears in the above case):        The highlighted text belongs to the page, but shouldn't be the meta description what is shown in SERP?

What are the best ways to improve a site's position in the Google search results?


I have a ORG production where a link open a POPUP code works, but the same code in sandbox does not.  Error:   In console chrome:  Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.   The sandbox is the same code production. The jquery path works and is correct.  Code:  {!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')}  {!REQUIRESCRIPT('/js/functions.js')}  {!REQUIRESCRIPT('/resource/jQuery/jquery-1.8.2.min.js')}  {!REQUIRESCRIPT('/resource/jQuery/ui/jquery-ui-1.9.1.custom.min.js')}  {!REQUIRESCRIPT('/resource/jQuery/postmessage/jquery.ba-postmessage.js')}  {!REQUIRESCRIPT('/resource/jQuery/bbq/jquery.ba-bbq.min.js')}   var statusAcc = "{!Account.Status__c}";  var abrirTela = false;  if(statusAcc != "A cadastramentar"){  abrirTela = true;  }else{  abrirTela = confirm('Esta conta já foi enviada. Você tem certeza que deseja editá-la?');  }  if(abrirTela){   function requireCssFile(filename) {  var fileref = document.createElement('link');  fileref.setAttribute('rel', 'stylesheet');  fileref.setAttribute('type', 'text/css');  fileref.setAttribute('href', filename);  document.getElementsByTagName('head')[0].appendChild(fileref);  }   requireCssFile('/resource/jQuery/ui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css');   var j$ = jQuery.noConflict();   var canal = "{!Account.Canal__c}";  var iframe_url = '{!URLFOR("/apex/Informacao?id=" + Account.Id + "&Canal=")}' + canal;    var largura = 800;  var altura = 525;   var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9));  var parent_domain = window.location.protocol + '//' + window.location.host;   j$.receiveMessage(  function(e){  var cross_result = j$.deparam(e.data);  if(j$.browser.msie){  document.body.scroll = "yes";  document.documentElement.style.overflowX = 'visible';  document.documentElement.style.overflowY = 'visible';  }else{  document.onmousewheel = true;  document.onkeydown = true;  }   if (cross_result.action == 'close_modal_dialog') {  j$modalDialog.dialog('close');  } else {  j$modalDialog.dialog('close');  j$(location).attr('href', cross_result.redirect_url);  }  },  child_domain  );   var j$modalDialog = j$('

')  .html('')  .dialog({  autoOpen: false,  title: 'Informação',  resizable: false,  width: largura,  height: altura,  autoResize: true,  modal: true,  draggable: false,  closeOnEscape: false,  open: function(event, ui) { j$(".ui-dialog-titlebar-close").hide(); }  });   var ieVersao = parseInt(j$.browser.version, 10);  if(j$.browser.msie){  document.body.scroll = "no";  document.documentElement.style.overflowX = 'hidden';  document.documentElement.style.overflowY = 'hidden';  }else{  document.onmousewheel=function(){return false};  document.onkeydown=function(){return event.keyCode==38 || event.keyCode==40 ? false : true;}  }   j$modalDialog.dialog('open');   }   I looked permissions and are equal. Any idea?

We have a custom javascript button on the quotes object in our org that has been working for several months that someone has noticed today is not working.    I'm not sure if there was an update that broke it or what day exactly it stopped working.  I'm hoping someone has an idea of where I can even begin to look.   Here's the code:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='+ escape("{!Quote.Name}")+' - '+ escape("{!Quote.Contact_s_Account__c}") + '&BODY=Please convert ' + escape(location.href)+ ' into a proposal and send it to the email address on the quote.  Thanks!';   Using developer tools in chrome, I see this error after I click the javascript button:   presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true           umps1w4.salesforce.com/umps/UMPSWidget_184/js/dist/umps-min.js?cflag=184.36:14 presence: onFailure in event parser ={"status":-5,"statusText":""}page load happens value=true   I changed my code to something simple:   javascript:location.href= 'mailto:emailaddress@ourdomain.com?SUBJECT='hello'    and got this error in the developer tools in chrome:   Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.   This lead me to the conclusion that I'm having XSS issues.  I do remember a SF update not too long about about protecting against XSS issues.  I guess I'll have to figure out a different way to implement this functionality.


How can I delete a user from the command line?     I am just starting working at a college and I'm inheriting a unintelligible mismash of local and domain accounts across a span of computers ranging from XP to Windows 8.  with upwards of two thousand computers that need to be gone through and remove anywhere between no and 5 local users accounts (so that people will start actually using their domain counterparts)   I've seen people saying  which apparently misses possibly some stuff in the registry and doesn't remove the folder for C:\users\username either  I've seen people recommending  which seems like it would get the job done, and has some filters, but has no way for me to specify which accounts to leave or delete other than direct interaction or filtering based on time (which won't work because I am changing the account they should be using)  Also, I would prefer to stay away from downloading and running a file on all of the computers and stick to regular commnands/vbscript/powershell/stuff  Most of the computers have either one or two local accounts that I would want to remove. The rest I would want to spit out to a file for my manual review (some of them have been embedded in systems and would need undoing by hand) but I can worry about that part in the script I'll be writing.   I am looking for a command line way or a set of steps to delete a given user. If doing net user username /del and then deleting the relevant registry keys is that, then please give some sources.

Frequently I need to delete all of the user profiles on a computer except for two accounts. I would like to have a script that can perform this for me.  The script must work for Windows 7.  Company policy makes it difficult to download and use any third party utility, so downloading a tool that can accomplish the task is not an acceptable alternative.  Currently I have a vbscript that performs other related functions so if I could do it in VBscript that would be great. If there is a way to do it straight from the Windows command line, that works too I can just call that from my VB script.  I've looked online and I cannot find a way to do this with either VBscript or with a microsoft cmdline utility that comes installed by default on Windows 7.  Does anyone know how I could perform this?


I installed Ant and after this, Dataloader stopped working - when I run Dataloader then this window is popping out:  After this, about there is line "The system cannot find the path specified." which is shown by about 0.05 second. What can be the reason of that? Before installing ANT, Dataloader worked perfectly

I'm on a new computer and I haven't downloaded Data Loader in years but now, I'm having all kinds if issues.  So apparently, I have to download Zulu JDK 11 (msi) first, Then download and unzip Data Loaded and install. Which opens a command prompt... After I follow all of the command prompt steps, then I get an error.  Am I supposed to install Java too? And if so, do I download Java or Zulu first?  Apparently a lot of people are having this same problem with no resolve.  Any help would be much appreciated.


In C++ I might do something like:  sometype var = somevalue; mutate(var); // var is now someothervalue  void mutate(sometype &a) {     a = someothervalue; }   Is there an equivalent thing in Java?  I am trying to accomplish something like:  Customer a;  public static void main(String[] args) {     a = newCustomer("Charles");     Customer b = null;     mutate(b);     System.out.println(b.getName()); // NullPointerException, expected "Charles" }  void mutate(Customer c) {     c = a; }   If Customer is mutable, why does this yield NullPointerException?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I want to replace multiple string patterns with a different set of predefined strings.  For example:  Input:  This sentence will be converted to something different. This sentence can contain same words.   Output:  These words need to be replaced with something different. These words can contain same alphabets.    So here I want to convert in below pattern.    This     =>These sentence =>word will     =>need to converted=>replaced to       => with words => alphabets   Let me know if it can be done.

What is a good way to do string replacements in a file using a dictionary with a lot of substituend-substituent pairs? And by a lot, I actually mean about 20 – not much, but many enough so that I want to organize them neatly.  I kind of want to collect all substituend-substituent pairs in a file dictionary.txt in an easy-to-manage way, since I need to replace a lot of stuff, say like:  "yes"      : "no" "stop"     : "go, go, go!" "wee-ooo"  : "ooooh nooo!" "gooodbye" : "hello"  "high"     : "low" "why?"     : "i don't know"   Now I want to apply these substitutions in some file novel.txt.  Then I want to run magiccommand --magicflags dictionary.txt novel.txt so that all instances of yes in novel.txt are replaced by no (so even Bayesian would be replaced by Banoian) and all instances of goodbye in novel.txt would be replaced by hello and so forth.  So far, the strings I need to replace (and replace with) do not have any quotes (neither single nor double) in them. (It would be nice, though, to see a solution working well with strings containing quotes, of course.)  I know sed and awk / gawk can do such stuff principally, but can they also work with such dictionary files? Seems like gawk would be the right candidate for magiccommand, what are the right magicflags? How do I need to format my dictionary.txt?


I'm an Indian on a 180 days Spanish student visa. I would like to travel around EU. Is it possible for me to catch my return flight to India from an airport in a different Schengen state or do I strictly have to depart from Spain?

I came to Netherlands from Dubai on a business visa. Now I wish to travel to Paris by train and after two days wish to leave to Dubai direct from Paris. Am I allowed to exit Paris to Dubai when the entry stamp in my passport is Amsterdam?


I have an Android Version 4.04 ICS on my Samsung Galaxy S Duos phone, how do I upgrade to version 4.1 as I am aware it is possible, did try to Google, but in vain as I did not find satisfactory answers. Is it possible to use the Debugging Mode to upgrade the version. Thanks in advance

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


Has Canonical decided to use a rolling release style in Ubuntu 14.04?  Will the normal 6 months release and 2 year updates continue?

About a year ago I've read that Ubuntu is considering to become a rolling distro. Since then I couldn't found any fresher news about the topic.  Anyone has official information about the transition?


I heard a sportscaster say this. Since gerunds are preceded by possessive pronouns, this would have to be a present participle. (him, who is going back).  I do think, however, that the gerund (his going back) would have been more appropriate. Can someone tell whether this is wrong usage, gerunds are preceded by objective pronouns in informal speech, or why he chose him here. Can you use the objective to put emphasis on the person rather than the action itself? I am aware of the fact that some might be annoyed by my repeated questions regarding this topic but I have not been able to answer this despite having looked at various sources, covering this topic.

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


This question is mainly for the validity of the comparison of the classification product of different types of spatial resolution.  Is it scientifically valid to compare very high-resolution image analysis product with that of moderate resolution. Say I have RapidEye image classification(8 class) of 2011 and forest loss pixels(just 3 class:forest loss, no forest loss, not applicable) of 2010 from landsat image products. Now I want to see what forest loss pixel of 2010 is converted to what in 2011.  Is it scientifically valid or not to compare product of different spatial resolution?

It is on the need of accuracy assessment of classification product.  Land cover/use classification is a prominent analysis in remote sensing. Now the question is if I generate a landcover from LANDSAT, do not perform ground survey for cross-checking and want to do a scientific analysis with this classification, is it scientifically invalid?  If I do this cross-checking with some very high-resolution image (5m) and Google Earth, is it robust method to fit scientific standards, if yes then how much.  Now my question is can anyone list some articles link that used their research based on un-ground-truthed image classification data or at least guide me on how to find those type of article    By ground survey, I mean field survey in body with some instruments like dgps, densitometer etc.  I asked  that has some tone matches with this question but still feeling unhelped. I emailed Mr. Hansen about a month ago but no response yet.


When a pair of virtual particles is created outside the event horizon of black hole, there is a chance for one of the particles to escape. Zero chance on the surface of the event horizon and my question is why doesn't this Hawking radiation make a black hole gain mass but the opposite? Just what is the edge of black hole?

I was reading Brian Greene's "Hidden Reality" and came to the part about Hawking Radiation. Quantum jitters that occur near the event horizon of a black hole, which create both positive-energy particles and negative-energy particles, produce the so-called Hawking radiation. However, I do not understand why only the negative-energy particles are being absorbed into the black hole, while the positive-energy particles shoot outward. Shouldn't there be 50/50 chance that each type of particle is being absorbed by the black hole? Also, the book mentions that a negative-energy particle would appear to an observer inside the black hole as positive. Why?


I recently sent an email to a professor asking him about an administrative problem I was having, but after I'd hit the send button, I realized I'd forgot to say: "Sorry to bother you" or something of that sort in the beginning...  Now I'm wondering is that considered impolite? Shoud you apologize to professors for bothering them or does that just make you sound phony?  I greeted him with"Dear Professor X", told him who I was, asked the question, and thanked him in advance.  He answered my question and all, but I'm just asking for future reference.

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


While reading about slicing in Python I came across this interesting example which doesn't make sense.  let a be a list    a = [1,2,3,4,5,6,7]  a[1:4] = [0,0]  print(a)   output>> [1, 0, 0, 5, 6, 7]   a = [1,2,3,4,5,6,7]  a[1:6:2] = [0,0]  ValueError: attempt to assign sequence of size 2 to extended slice of size 3   Why do we get ValueError in the second case? The description says size 2 to extended slice of size 3 but in first case we are assigning the sequence of size 2 to a slice of size 3 and it works.

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.


So I am attempting to use a spinner to change the text colour of a message in a text view. However, when I attempt to use the function attached to my button click the activity crashes. I have attached the relevant part of the java code and the xml file  import android.content.Intent; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Spinner; import android.widget.TextView;  public class Colour extends AppCompatActivity {  private Spinner mySpinner; public static final String EXTRA_MESSAGE = "message"; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_colour);     Intent intent = getIntent();     String messageText = intent.getStringExtra(EXTRA_MESSAGE);     TextView messageView = (TextView)findViewById(R.id.message);     messageView.setText(messageText); }  public void change(View v){     String text = mySpinner.getSelectedItem().toString();     TextView newColour = (TextView) findViewById(R.id.message);     if(text == "Red"){         newColour.setTextColor(Color.RED);     }     if(text == "Blue"){         newColour.setTextColor(Color.BLUE);     }     if(text == "Green"){         newColour.setTextColor(Color.GREEN);     } }   XML file:  <TextView     android:textColor="#000000"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/message" />  <Spinner     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:entries="@array/colours"     android:layout_centerHorizontal="true"     android:layout_marginTop="16dp"     android:id="@+id/spinner" />  <Button     android:text="HOME"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/button"     android:onClick="home"     android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true"     android:layout_marginBottom="52dp" />  <Button     android:text="changeColour"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/button4"     android:layout_above="@+id/button"     android:layout_alignStart="@+id/button"     android:layout_marginBottom="101dp"     android:onClick="change" />

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


I am very new to photography and have been working my way through a few books and magazines trying to learn how to use my camera more effectively.  I keep getting stuck on the differences between the focal length, the aperture size and zoom. For example if I want to take a photo where the subject of the photo, say a flower, is In focus but everything else is blurred I have read that I need a large aperture to increase the depth of field but as I zoom in and out the largest possible apatutre changes.  Perhaps a poorly worded question but in essence what I am looking for is a simple explanation on the three subjects In the title, what effect they have on each other and what are the optimum setting for the effect I am after?   Thanks

I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens?


I've heard in a lot of movies they use this format :  "It is time we found out"  Now I would like to know if the sentence " It is time we find out " incorrect and why we are using a past tense in the first place although the action has not taken place yet.

Why do we use the simple past but not the present or future in the following expressions:  Don't you think it's time we went a little further Don't you think it's time we ate Don't you think it's time we went home


[Not duplicate] - I checked the  question, and its answer is actually the start point of my question. I start off with $parent.on('click', '.specificChild' ... etc.). I already know that (see it for wrapper1). The first part of my question has nothing to do with the referenced SO question.    Within a parent element, I want to create a child element and then grand-child elements, and have a click event on a grand-child element.  Is it possible to pre-define child element and also pre-define the click event, even before the child/grand-child elements are created ?    // wrapper1 related -- it works var $wrapper1 = $('.wrapper1'); var $number1 = $wrapper1.find('.number'); $wrapper1.on('click', '.incrementButton', function () {     var currentVal = parseInt($number1.html(), 10);     $number1.html(currentVal + 1); });   // wrapper2 related - doesn't work // define the elements upfront var $wrapper2 = $('.wrapper2'); var $foundation = $wrapper2.find('.foundation'); var $number2 = $wrapper2.find('.number'); $wrapper2.on('click', '.incrementButton', function () {     var currentVal = parseInt($number2.html(), 10);     $number2.html(currentVal + 1); });   $wrapper2.html('

'); var htmlContent = '' +         '
' +         '
1
' +         '
+ 1
' +         '
'; $foundation.html(htmlContent); .wrapper1, .wrapper2 {     background-color: #E8EAF6;     padding: 1em;     width: 12em;;     margin: 1em; } .foundation {     background-color: #9FA8DA;     padding: 1em; } .arithmetic {     background-color: #5C6BC0;     padding: 1em;     overflow: hidden; } .number {     width: 1.5em;     height: 1.5em;     text-align: center;     line-height: 1.5;     background-color: white;     float: left;     color: #3949AB;     margin-right: 1em; } .incrementButton {     overflow: hidden;     height: 1.5em;     line-height: 1.5;     text-align: center;     background-color: #3949AB;     border: 1px solid white;     color: #E8EAF6; } .incrementButton:hover {     cursor: pointer;     background-color: #283593; }

1

+ 1

     More specifically, the question is:   How can I define $foundation before its creation ? i.e. before this line $wrapper2.html('

') ? How can I bind the click function to incrementButton within wrapper2, even before the creation of the incrementButton element ?

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


I'm trying to get an array from a database, and set the result as a variable (in this case, named '$Rate'). The code which worked using mysqli is this:  //Getting Hire Rate $Rate = array(); $ratequery = "SELECT HireRate FROM movie WHERE MovieID LIKE '$MovieID'"; $rate = mysqli_query($con, $ratequery)     or die("Error: ".mysqli_error($con)); while ($row = mysqli_fetch_array($rate, MYSQLI_ASSOC)) { $Rate[] = $row['HireRate']; }; mysqli_free_result($rate);   I'd like to do the same using PDO. I've read various pages but cannot get it to work.

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


I have a disk that was spinning down too fast and   /dev/sda {     apm_battery = 254 }   per  helped. The problem is that I plan on switching the disk in future. How can I make sure that apm_battery will affect only that specific disk?

I have 2 HDDs in my PC. Ubuntu is turning off the secondary HDD very quickly after about 15 minutes, which is short for me. I need to control this time. How can I do it?  I tried GNOME power management but did not find it useful.


I have a cubemap I got from somewhere that I want to use as a skybox for a scene, but it seems that there are no options in the World context to set it as the texture surrounding everything. "Image Texture" for Background color only gives me a single color across the scene that (I'm guessing) is the average of the colors in the texture, and "Environment Texture" doesn't allow for cube-based projection. How would I go about utilizing the texture I've gotten?

I have generated 6 images that are of a sky projected onto the faces of a cube from the viewpoint of the centre of the cube (ie. a hopefully seamless skybox).  However I am having issues adding this texture to the world material. I have tried adding the images to the background via an Environment Texture but am unable to get anything even remotely close to looking correct.  Here are my problems:   The world material seems to be applied to a sphere but I want it to be a box (the program I am using to generate the sky generates a box) I don't know how to stitch my images together for use in the world material I'm not sure I'm even going about this the right way   I have searched and searched trying different things for most of the day so far but am coming up blank.


Among these book which book is self introductory. if any other book is good then suggest that also.

I'm looking for a book to learn Algebra. The programme is the following. The units marked with a $\star$ are the ones I'm most interested in (in the sense I know nothing about) and those with a $\circ$ are those which I'm mildly comfortable with. The ones that aren't marked shouldn't be of importance. Any important topic inside a unite will be boldfaced.  U1: Vector Algebra. Points in the $n$-dimensional space. Vectors. Scalar product. Norm. Lines and planes. Vectorial product.  $\circ$ U2: Vector Spaces. Definition. Subspaces. Linear independence. Linear combination. Generating systems. Basis. Dimesion. Sum and intersection of subspaces. Direct sum. Spaces with inner products.  $\circ$  U3: Matrices and determinants. Matrix Spaces. Sum and product of matrices. Linear ecuations. Gauss-Jordan elimination. Range. Roché Frobenius Theorem. Determinants. Properties. Determinant of a product. Determinants and inverses.  $\star$ U4: Linear transformations. Definition. Nucleus and image. Monomorphisms, epimorphisms and isomorphisms. Composition of linear transformations. Inverse linear tranforms.  U5: Complex numbers and polynomials. Complex numbers. Operations. Binomial and trigonometric form. De Möivre's Theorem.  Solving equations. Polynomials. Degree. Operations. Roots. Remainder theorem. Factorial decomposition. FTA. Lagrange interpolation.  $\star$ U6: Linear transformations and matrices. Matrix of a linear transformation. Matrix of the composition. Matrix of the inverse. Base changes.   $\star$ U7: Eigen values and eigen vectors Eigen values and eigen vectors. Characteristc polynomial. Aplications. Invariant subspaces. Diagonalization.   To let you know, I own a copy of Apostol's Calculus $\mathrm I $ which has some of those topics, precisely:   Linear Spaces Linear Transformations and Matrices.   I also have a copy of Apostol's second book of Calc $\mathrm II$which continues with   Determinants Eigenvalues and eigenvectors Eigenvalues of operators in Euclidean spaces.   I was reccommended Linear Algebra by Armando Rojo and have Linear Algebra by , which seems quite a good text.   What do you reccomend?


Be $\Bbb P\Bbb Q$ the set of all fractions $f_{m,n}=\frac{p_m}{p_n}$ whose numerador and denominator are both prime numbers.  i) Show that for any open set $A\subset \Bbb R^+$, there is at least one fraction $f \in \Bbb P\Bbb Q$ such that $f \in A$   ii) Show that there are infinitely many elements of  $\Bbb P\Bbb Q$ that belong to any open  set $A\subset \Bbb R^+$

So the question is in the title. And I mean dense in positive real numbers ofcourse. Somehow I cannot grasp if this is very trivial or not. The prime numbers aren't that dense, but are there enough of primes to make the fractions constructed from them dense?


I'm trying to replace every word between %% with a single word. Till now I tried this:  var string = "You chose %story% at %price%";  var rep = string.replace(/\%(.*)\%/g, "test");  console.log(rep);   but the result of rep is actually  "You chose test"   while I want  "You chose test at test"   How can I achieve this? I though about implementing a recursive function but it sound pretty slow especially with multiple words

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I opened an unknown application with  and now every file with that extension is opened by Notepad++ (it was set to always use the selected program to open this kind of file). How do I remove the Open with Notepad++ and set it to "Windows can't open this file", so I can use Web services?

I somehow have set the default file type association for a file type in Windows 7. It doesn't appear to be possible to delete it from the "Change the file type associated with a file extension" options screen. Is it possible to remove it?


I do not have enough space on my root partition to store the database.  $ df -h Filesystem                         Size  Used Avail Use% Mounted on /dev/mapper/ManjaroVG-ManjaroRoot   29G   21G  6.4G  77% / dev                                1.9G     0  1.9G   0% /dev run                                1.9G  852K  1.9G   1% /run tmpfs                              1.9G   76K  1.9G   1% /dev/shm tmpfs                              1.9G     0  1.9G   0% /sys/fs/cgroup tmpfs                              1.9G  596K  1.9G   1% /tmp /dev/mapper/ManjaroVG-ManjaroHome  197G   54G  133G  29% /home /dev/sda1                          247M   88M  147M  38% /boot tmpfs                              383M  8.0K  383M   1% /run/user/1000   Changing datadir in my.cnf to a new location caused a permission problem ([Warning] Can't create test file /home/u/tmp/mysql/acpfg.lower-test )  How is it possible change the directory where MariaDB/MySQL stores the database under Linux (for example to /home/u/tmp/mysql)?

I was restoring a 200 GB database into a newly installed RHEL machine. However, while restoring I ran into no space available issue.   Is it possible to change the directory where the databases are stored?


I need to find the limit for:   $ \lim_{n\to\infty} \frac {(n!)^\frac{1}{n}}{n} $  I know the answer is $\frac {1}{e}$ but I have no idea how to get that answer. I'd appreciate some help.

I need to check if $$\lim_{n \to \infty} \frac{n}{ \sqrt [n]{n!}}$$ converges or not. Additionally, I wanted to show that the sequence is monotonically increasing in n and so limit exists. Any help is appreciated. I had tried taking log and manipulating the sequence but I could not prove monotonicity this way.


It is my understanding that you should use the relative pronoun "who" when addressing people. So what would be correct for a group of people?   "Jessica is the head of several teams which work on ..." or  "Jessica is the head of several teams who work on ..."

What is appropriate to use here, who or which?       There are around 50 companies who/which deliver scanning services to private and business consumers.


I have a Linkedhasmap and have key and values Now i want to sort the map by values and the key and value should appear as follows Example,  Key    Value   1      0.0   2      0.2   3      0.5   4      0.0   5      0.3   6      0.0   7      0.1  Expected output   1      0.0   4      0.0   6      0.0   7      0.1   2      0.2   5      0.3   3      0.5  Please advise Thanks

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