How to Create a Grid Inside a Polygon that is Oriented with the Longest Side?

I have been using a process called "Create Polygon Graticule" to create a grid within a polygon with assigned row and column attributes. It is a SAGA tool which I have been running in QGIS. It generates a grid based on the extent of the input polygon with the cell running N to S and E to W. It would be better for my analysis if the direction of the grid was parallel to the longest edge of the polygon. For reference I have attached images of the current automated output and an output that I manually altered to align the grid with the polygon. The grids originally covered the entire extent of the polygon but have been clipped to show only the cell parts that are inside.    Above image is what the tool out puts by default.   This is an image of a grid that was edited manually to fit the necessary parameters.  My question is, is there a way to produce grids that are aligned such as the one in the second image in an automated fashion? I will need to generate grids for a few thousand polygons.


Fedora 25 and disabling whatever is listening on port 111

I've got a Fedora 25 x86_64 stand alone workstation. Something is listening on port 111 (identified with an nmap scan):  $ sudo lsof -i :111 COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME systemd   1 root   36u  IPv4  15170      0t0  TCP *:sunrpc (LISTEN) systemd   1 root   37u  IPv4  15171      0t0  UDP *:sunrpc systemd   1 root   38u  IPv6  15172      0t0  TCP *:sunrpc (LISTEN) systemd   1 root   39u  IPv6  15173      0t0  UDP *:sunrpc   I disabled the Sun gear on the port with the following commands:  $ sudo systemctl disable rpcbind $ sudo systemctl disable sunrpc Failed to disable unit: No such file or directory   After reboot the port is still open.  It appears something other than Sun gear wants to listen on port 111. Or maybe systemd is not respecting my wishes to disable the unused service. Or maybe something else...  How do I determine what is trying to listen on the port, and how do I disable it?    From below:  $ sudo systemctl -a | grep -E "rpc|port"   var-lib-nfs-rpc_pipefs.mount          loaded    active   mounted   RPC Pipe File System   abrtd.service                         loaded    active   running   ABRT Automated Bug Reporting Tool   auth-rpcgss-module.service            loaded    inactive dead      Kernel Module supporting RPCSEC_GSS   fedora-import-state.service           loaded    active   exited    Import network configuration from initramfs   fedora-readonly.service               loaded    active   exited    Configure read-only root support   rpc-gssd.service                      loaded    inactive dead      RPC security service for NFS client and server   rpc-statd-notify.service              loaded    inactive dead      Notify NFS peers of a restart   rpc-statd.service                     loaded    inactive dead      NFS status monitor for NFSv2/3 locking. ● rpc-svcgssd.service                   not-found inactive dead      rpc-svcgssd.service   rpcbind.service                       loaded    inactive dead      RPC Bind   rpcbind.socket                        loaded    active   listening RPCbind Server Activation Socket   rpc_pipefs.target                     loaded    active   active    rpc_pipefs.target   rpcbind.target                        loaded    active   active    RPC Port Mapper


I've got to type this symbol in my article. I've searched through Internet but haven't seen anything about how to write it in TeX command. It is perhaps rarely seen or used. But I really need to use it in my article:   And below are the packages I am using:  Can you help me? Best regards!


quotes generated by another Bash script not treated like quotes inside original script

Using bash, my pwd contains directories with spaces:  $ pwd /a/b c/d   This works:  $ ls "$PWD" bar foo # yay!   It also works if I put that code inside a script. Now if I split that command in two:  $ cat foo  echo \"$PWD\" $ cat bar  ls $(./foo)   foo generates the quoted path:  $ ./foo  "a/b c/d" # ok   but bar is not treating the quotes the way I'd expect:  $ ./bar  ls: "/a/b: No such file or directory ls: c/d": No such file or directory # boo!   This is not academic. The command I actually want to split up is horrendous. Rather than having it in a single script, I want to break it into two scripts: one that generates the properly quoted parameters and another that is drastically simplified (and calls that first one). It so happens that this horrendous list of parameters is useful for multiple commands so that's another reason to have it in a separate script.  update 1: this works BTW:  $ cat foo ARGS="$PWD" $ cat bar source ./foo ls "$ARGS" $ ./bar bar foo   But it seems hokey to put the args into a variable.  update 2: @user454038's solution works for a single space in a directory name but breaks at two spaces.  update 3: @mikeserv and @user454038 educated me sufficiently that I got this working (for one and two, and presumably more, spaces in directory names):  $ cat foo  echo "$PWD" $ cat bar ls "$(./foo)"   There we go! Thanks all!


Android: How to prevent opening physical keyboard restarting app

I have my android:screenOrientation="portait" on but when a physical keyboard is opened it doesn't rotate the screen as I wanted, but it restarts the app. It seems to run onCreate over again or something. Can someone point me in the right direction and/or tell me how to intercept this and handle it? Thanks.


On windows, I've uninstalled avast via control panel but this popup still appears at the bottom right of my screen after logging in to any user.     I have searched all of my drives for 'avast' and deleted anything with it in its name.  How can I remove this pop up permanently?    UPDATE:  I have used avastclear, ran it in safe mode, and the popup still exists.


Can I take a fully-charged portable phone charger on a plane?

It's a PowerAdd Power Bank Mobile Phone Backup Charger


I originally started playing Clash of Clans on a first-generation iPad and connected it to my GameCenter. I then got a third generation iPad, linked it to the first iPad's GameCenter account, and continued playing Clash of Clans on the new iPad 3. My friend is giving me his GameCenter account, which is linked to HIS Clash of Clans village- is there any way I can transfer his village to my Game Center ?


This question led to a new package:      I'm trying to make some good-looking numbers in a circle, using the simple command:  \textcircled{1}   However, the circle is misaligned vertically with the number, and look a bit sloppy:    Any suggestions how can I adjust the vertical alignment so that the numbers look more centered w.r.t to the circles? Or, if that's not an option, what other ways to achieve the same results are possible?  I will use those only for numbers, and in very few places, so manual adjustment per glyph is an option.  I'm using pdfLaTeX with Computer Modern, if that matters.


How to create normal map image from camera view?

Good day, I have scene in blender with many objects (picture below) and want create a normal map of this scene from camera view. Is it possible make it in blender (I found only way to create normal map for one object and need make uv map). Mybe it possible if I export scene in different program, like 3d max?     Example of normal map I need (made in Photoshop with nvidia plugin)


Asking questions is been blocked in stackoverflow

This account of mine is blocked form asking questions in Stack Overflow. I don't know why this happen when I am at reputation 10 and later because of my positive contributions i came till 165 yet it remains blocked. There is not much negative reputation on my account only 4 and that too I have edited my answers later, but no use.  Can some one tell me what exactly happening with my account. I know that it is the the SO intelligence that deals with such kind of issues but I can use help in ways to unblock my account.  Thanks in advance... :)


Prove that if $E(X^2+Y^2) \lt \infty$, $E(X|Y)=Y$, $E(Y|X)=X$, then $P(X=Y)=1$

Suppose that X and Y are random variables on a common probability space such that $E(X^2+Y^2) \lt \infty$, $E(X|Y)=Y$, $E(Y|X)=X$. Prove that $$P(X=Y)=1$$  My work: $E(X)=E(E(X|Y))=E(Y)$ and $E(Y)=E(E(Y|X))=E(X)$  But I don't know what to do next and I'm sure how to use the condition $E(X^2+Y^2) \lt \infty$.  Thanks in advance.


Does inverting the "if" improve performance?

I've been using  for a while now and sometimes it suggests that I invert the if. I guess an example would be a better explanation of my situation:  public void myfunction(int exampleParam){     if(exampleParam > 0){         //Do something with form controls for example.     } }   Now ReSharper suggests that I invert the if to this:  public void myfunction(int exampleParam){     if(exampleParam <= 0)         return;     //Do something with form controls for example }   Does this "improve" performance somehow? Or is it just aesthetic?


How do you deploy a website to your webservers?

At my company we have a group of 8 web developers for our business web site (entirely written in PHP, but that shouldn't matter). Everyone in the group is working on different projects at the same time and whenever they're done with their task, they immediately deploy it (cause business is moving fast these days).   Currently the development happens on one shared server with all developers working on the same code base (using RCS to "lock" files away from others). When deployment is due, the changed files are copied over to a "staging" server and then a sync script uploads the files to our main webserver from where it is distributed over to the other 9 servers.  Quite happily, the web dev team asked us for help in order to improve the process (after us complaining for a while) and now our idea for setting up their dev environment is as follows:   A dev server with virtual directories, so that everybody has their own codebase,  SVN (or any other VCS) to keep track of changes a central server for testing holding the latest checked in code   The question is now: How do we manage to deploy the changed files on to the server without accidentaly uploading bugs from other projects? My first idea was to simply export the latest revision from the repository, but that would not give full control over the files.  How do you manage such a situation? What kind of deployment scripts do you have in action?   (As a special challenge: the website has organically grown over the last 10 years, so the projects are not split up in small chunks, but files for one specific feature are spread all over the directory tree.)


Is the integral of the product of separable functions equal to the product of their integrals

For two continuous functions $f(x)$ and $g(y)$ let their integrals be given by:  $$I_1 = \int f(x)\,\mathrm{d}x$$  $$I_2 = \int g(y)\,\mathrm{d}y$$  Then under which conditions is it true that  $$\int \int f(x)\cdot g(y)\,\mathrm{d}y\,\mathrm{d}x = I_1 \cdot I_2$$  That is to say that the integral of their product is equal to the product of their integrals?


Jailbroken iPhone stuck on Apple Logo after installing tweak

Im having  trouble with the restarting  process  when a tweak doesn't work on my jailbroken iPhone 6s. So when I installed a tweak that made my phone stay stuck on the apple logo. So I did the whole start-home then hold the  volume up button to get back to my home screen ok. Now my phone is in safe mode for Cydia and the only way to get my tweaks back after I take out the bad tweak is by restarting my phone by just holding down the power bottom. Now when I do this my phone gets stuck again on the apple logo. Can soon one help me please


Is $\operatorname{height} \mathfrak{p} + \dim A / \mathfrak{p} = \dim A$ true?

Let $A$ be an integral domain of finite Krull dimension. Let $\mathfrak{p}$ be a prime ideal. Is it true that $$\operatorname{height} \mathfrak{p} + \dim A / \mathfrak{p} = \dim A$$   where $\dim$ refers to the Krull dimension of a ring?    Hartshorne states it as Theorem 1.8A in Chapter I (for the case $A$ a finitely-generated $k$-algebra which is an integral domain) and cites Matsumura and Atiyah–Macdonald, but I haven't been able to find anything which looks relevant in either. (Disclaimer: I know nothing about dimension theory, and very little commutative algebra.) If it is true (under additional assumptions, if need be), where can I find a complete proof?  It is obvious that $$\operatorname{height} \mathfrak{p} + \dim A/\mathfrak{p} \le \dim A$$ by a lifting argument, but the reverse inequality is eluding me.  Localisation doesn't seem to be the answer, since localisation can change the dimension...


When I insert an accented letter as "è à ù" the function does not work, it does not return anything, why?  $test = "è ò ù"; echo htmlspecialchars($test, ENT_QUOTES, 'UTF-8');


In one of Dota2's recent patches, Valve has added a new feature called "Performance Index" visible in your own in-game profile.  It is not clear how it works. Is there any information available, what "performance" it monitors?  Does it rely on K/D, K/D/A, Gold per minutes, Experience per minute, or all of them?


Will having multiple domains improve my seo?

Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    <title>Used cars - buy and sell your used cars here</title>   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally?


I'm a little confused with the meaning of a statistically significant result. Does statistically significant just mean it's a phenomenon worth exploring given that there is a high likelihood of seeing a value as extreme as the observed value? And we should do further tests to understand the phenomenon?


So I've been cleaning up my desktop for the last few minutes, and I tried to delete this empty folder, but it has some 3.46GB of data in it? And I'm like wtf is going on. Any ideas of why this is happening? I restarted my computer, thinking it was just some kind of fluke, but it is still happening.


Low Quality Post review doesn't show the content when completed with Edit

I recently reviewed  over on SFF in the Low Quality Posts queue. It didn't warrant closure and could do with a small edit so naturally I clicked Edit, did what I needed to do and moved on. Going back through my review history though and navigating to  I am met with this:    As you can see the body of the review is completely missing and the question is not shown. I did also  for it but the question body is shown there.  Is this a bug and if so can it be fixed?    Looking on a previous  I edited on and the review is shown though it was an answer. Further this  again doesn't show anything but .  Also looking at an  on Arqade doesn't show anything like the issue here.  It appears as this bug might be affecting questions only and only when Editing from the Low Quality Posts review as the others appear to be fine as far as I can tell.    For completeness sake I checked the other types of reviews ,  and  and I can see all of them.


My PATH variable seems to be set OK, but does not work

I installed some programm (xlsx2csv) using pip3. The executable of the software is in ~/.local/bin. My $PATH is defined in ~/.profile like this:  PATH="$HOME/bin:$HOME/.local/bin:$PATH"  echo $PATH /home/bruni/bin:/home/bruni/.local/bin:/home/bruni/bin:/home/bruni/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin   Permissions on the executable seem ok:  bruni@bruni-Inspiron-5547:~/.local/bin$ ls -l total 44 -rwxrwxr-x 1 bruni bruni 42501 Jul  2 12:39 xlsx2csv  bruni@bruni-Inspiron-5547:~/.local/bin$ type -a xlsx2csv  xlsx2csv is /home/bruni/.local/bin/xlsx2csv xlsx2csv is /home/bruni/.local/bin/xlsx2csv   Nonetheless, I cannot invoke the installed software without specifying the exact path.  :~$ xlsx2csv -bash: /usr/bin/xlsx2csv: No such file or directory


How can I check for an empty/undefined/null string in JavaScript?

I saw , but I didn't see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking for ""?


I've a concern regarding the usage of been in the following case.     It has proved that one of the main reasons for the rapid propagation   of false information is suspicious users.      It has been proved that one of the main reasons for the rapid   propagation of false information is suspicious users.   Which sentence is correct and why?


String (eg. "C"), I got from PreferenceManager, does not equals to "C"

I am facing weird situation here.   Following routine is called after I close my preference activity.   SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); String tmp = preferences.getString("unit", "C"); CommonTool.temperatureUnit = tmp;   What it does is, getting the settings that I made from the preference activity and I am storing it to a global variable called CommonTool.temperatureUnit. In this case, value "C" is assigned to it.    Fine by now.  In side the CommonTool class, I have a function which returns a temperature in Celsius or Fahrenheit depends on the user preference, I got from the preference activity.   public static String getCommonTemperature(int celsius) {     int ret;      if (temperatureUnit == "C") {         ret = celsius;     }     else {         ret = (9/5) * celsius + 32;     }      return Integer.toString(ret); }   The thing is.. it keeps fall into else part of it while temperatureUnit contains "C".     Does anyone have any idea? Thanks in advance.


I'm reading a book(concrete Mathematics) and it uses a lot the concept of 'Math induction'. Thought I've been reading tutorials and examples about it, I'm still unable to understand it, the last 'basic' example I was reading is(my questions are the ones highlighted):  Prove $1+2+...+n=\frac{n(n+1)}{2}$  Then it indicates:   Step 1: Show is valid for n=1: $1=\frac{1(1+1)}{2}=\frac{2}{2}=1$ Step 2: Inductive step, assume is valid for n=k:   $1+2+...+k=\frac{k(k+1)}{2}$ //why do I need to substitute n by k? to me is exactly the same as doing nothing, I could work with n+1 instead   Step 3: Prove is valid for $n=k+1$, and the demo is:   $1+2+...+\color{red}{(k+1)}=(1+2+...+k)+\color{red}{(k+1)}$  = $\frac{k(k+1)}{2}+k+1$  = $\frac{k(k+1)+2(k+1)}{2}$  = $\frac{(k+1)(k+2)}{2}$//How is getting this from the previous equation???????  = $\frac{(k+1)[(k+1) + 1]}{2}$  Any help is appreciated, this 'basic thing' is driving me nuts.


System freezes during booting everytime (Ubuntu 14.10)

Acer aspire E5-571G-36L5  Message: "Kernel panic - not syncing: Attempted to kill init!"  Already tried:   That libre office quick start is disabled Different options in gru config file item GRUB_CMDLINE_LINUX_DEFAULT (acpi=off, acpi=force, boot=bios, boot=pci) boot-repair (result: )   all of that change nothing. I can only boot in recovery mode.  Please help anybody and thanks in advance.


How to form this tag question – as a positive tag question, or a negative one?

We always use a positive tag question after a negative sentence:  You shouldn't take this medicine, should you?  We use a negative tag question after a positive sentence:  She must leave early, mustn't she?  But when there is a negating prefix on the adjective (impatient vs. patient) after the verb "to be", then the sentence is negative in meaning. Does this mean the tag should be positive? Which is correct, A or B?  A: I am impatient, am I? B: I am impatient, aren't I? A: The class was dismissed, was it? B: The class was dismissed, wasn't it?


Sunny day in the shade - how to deal with white balance and exposure settings?

I was out doing an assignment about symmetric and asymmetric pictures (rule of third, golden mean, golden ratio).  I could not figure out what is the best way to deal with the following setting:   I am sitting in the shade, the sun is clear behind me. I used F2.8, 1/250s, WB 7500k (sun), 80mm focal length on MFT, 200 ISO I would have liked to have proper exposure in the foreground and the background as good as the human eye could see   I could not even come close :-(  Either the foreground was ok, and the background was overexposed (as in picture below). Or the background was ok, and the foreground was too dark so that you can only see the shape.  The most important to me would be to see at least a bit of the grey colors of the fountain and the pigeons in that case; you can ignore the asymmetric attempt (although if you can comment on that, I'd be happy to learn your ideas).


How to check if a system of congruence is solvable?

I have to see for which value of $a$ this system is solvable: $$ \begin{cases}   3x \equiv a\pmod{28}\\   ax \equiv4\pmod{21}\\ \end{cases} $$ I check the two congruences separately: $$ \gcd(3,28)=1\mid a\;\checkmark $$ $$ \gcd(a,21)\mid4 \iff \gcd(a, 21) = 1 \iff a \not\equiv 0\;(7)\;\land a \not\equiv 0\;(3) $$  $$ \begin{cases}   3x \equiv a\pmod{4}\\   ax \equiv4\pmod{3}\\ \end{cases}\\ \gcd(4,3) = 1\;\checkmark $$ $$ \begin{cases}   3x \equiv a\pmod{7}\\   ax \equiv4\pmod{7}\\ \end{cases} $$ and from here I can't go on.  So, my problem is that I can't figure out how to check if a system of congruences is solvable.  EDIT:  maybe I found the solution: $ \gcd(7,7) = 7\mid a-4 \iff a = 11+7k \land a \not\equiv 0\;(7)$


Is there a way to use different local font files for different font size in fontspec?

I am a big lover of the  by Georg Duffner. As of now, he has made two sets of font files, EB-Garamond-8 and EB-Garamond-12, respectively for “design size 8pt” and “design size 12pt”. Is there a way to make fontspec (and possibly unicode-math, too) use EB-Garamond-8 fonts for small sizes e.g. sub/superscripts, footnotes… and EB-Garamond-12 fonts for regular sizes when using local font files¹?  If I use only EBGaramond12, the following code works if I put the EBGaramond12-* .otf files in a fonts/ directory sibling to the .tex²  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},]{EBGaramond12}   but if I try to adapt it to use the SizeFeatures options  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},     SizeFeatures={         {Size={-12}, UprightFont=EBGaramond8-Regular, ItalicFont=EBGaramond8-Italic},         {Size={12-}, UprightFont=EBGaramond12-Regular, ItalicFont=EBGaramond12-Italic, BoldFont=EBGaramond12-Bold}     }]{EBGaramond12}   Then the document won't compile and I get the following error. Using complete names instead of wildcarded ones changes nothing.  The key 'fontspec/UprightFont' is unknown and is being ignored.     ¹ It means that using features that automagically select the right system fonts is not an option.  ² the file structure is  . ├── fonts │   ├── EBGaramond08-Italic.otf │   ├── EBGaramond08-Regular.otf │   ├── EBGaramond12-Bold.otf │   ├── EBGaramond12-Italic.otf │   └── EBGaramond12-Regular.otf └── paper.tex


If the Death star make a jump through hyperspace why didn't if arrive with the super laser facing Yavin?

I am asking if, hypothetically, The death star jumps to Yavin through hyperspace, but it lands with the super laser facing the other way, why? I mean wouldn't it have been easier for the empire to jump facing the planet. I mean i know it would ruin the story because the Rebels wouldn't have a chance to save the day but the empire doesn't want that. So why not jump with the super laser facing the planet? please help me make sense of this plan. Thank you.


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?


Explanatory variables may bias predictions

I' m asking this question out of sheer curiosity, my teacher was not able to explain it.   If I'm using logistic regression with categorical variables they are coded like {1,2,3}. I guess it wouldn't change my results if I used {4,5,6}. But what if linearity of coding wasn't kept? (say {4,10,99})? What I deal with is just the way of coding factor variables but is it possible that the statistical inference could be "distorted" this way? Or, worst case scenario, would I be able to draw nonsense conclusions from categorical data just because they are coded in some way?


How to determine  $U( Z[i])$  I tried this  $$(a+bi)(c+di) = 1,$$  where $a,b,c,d$ are integers.  and compared real no. With real


Calculate an intersection point of multiple spheres on the surface of earth

The question i am going to ask is very much similar to this question-  But the problem here is, the radius of the spheres are too small (within 8 meter). I have used the Newton-Raphson method with Jackobian matrix to calculate a point which is exist in the intersection area of three spheres. I have the (lat,long) and a radius for three spheres and may be more. But every time I am getting a matrix which is not invertible. To apply NR method I've first convert the lat,long to x,y,z by this  lat = toRadians(latitude); lon = toRadians(longitude); x = earthRadius * cos(lat) * cos(lon); y= earthRadius * cos(lat) * sin(lon); z = earthRadius * sin(lat);   and used this as a center of a sphere and use r/1000 as radius (converted to KM) of that sphere. Algorithm starts with an initial point which i have considered the centroid. I guess it is for the Bad Starting Point. The radius is calculated form the signal strength of the different wi-fi access points(AP). The number of spheres are dependent on how many APs are available. Any advice would be helpful for me. EDIT The story repeated many times in stack exchange. I have 3 wi-fi APs with known (lat,lng) and using RSSI, I am calculating the distance (i.e. radius) in meter. Now I need to calculate the location of the mobile user. Main problem is the RSSI is fluctuating and in result estimated distance can not be estimated correctly. That's why the spheres are not always intersecting. But Newton-Raphson should try to find the intersection which is not happening. It throws an error that matrix is not invertible. Generated matrix may be or may not be square. If it is not square then used .


Bash - How can I make a script that starts when I wake my computer from suspension?

After running into some difficulties with WiFi drivers, I need the basic condition that triggers when my laptop wakes from suspension, which will then run any code beneath it. How can I achieve this?


Is sending encrypted message and signed message a secure way of transmitting data?

I know that the industrial standard is normally sending data in the following format:  Send Encr(msg, Sign(msg))   Is the following way a secure as well?  Send Enc(msg) and Sig(msg)   By secure, I mean no one will be able to read my message, and no one will be able to tamper my message.


*I've changed this question as below.  Let me have a function such as $ f(k) = \exp(j 2 \pi k ) $,  where $k$ is real value.  Using Euler's formula, we can write $f(k)$ as below,  $$ f(k) = \exp(j  2 \pi  k ) = \cos(2\pi k)+j \sin(2\pi k).$$  If $k$ is integer, this always goes to 1.  Up to here, nothing is weird and makes sense.  However, if the equation goes to  $$f(k) = \exp(j2\pi k)=e^{j2\pi k}=(e^{j2\pi})^k = (\cos(2\pi)+j\sin(2\pi))^k=1^k=1$$  What I want to know is this above equation makes sense or not.  Thank you in advance.


What is the algebraic closure of $\mathbb F_q$?

What is the algebraic closure of $\mathbb F_q$ with $q$ being some power of a prime $p$ ?   I wrote, ''the algebraic closure'' because, they're the same up to isomorphism right ?  It cannot be finite, otherwise it is not algebraically closed, so how does it look like ?


Rotating a gyroscope's output values into an earth-relative reference frame

For whatever reason, I seem to have gotten myself twisted into quite a confusion on how to process data from my 3 axis gyro and 3 axis accelerometer to get gyro rotation values related to the earth's reference frame. i.e. Given my accelerometer measures gravity (we assume it's stable) along the sensors (x,y,z) reference frame, how do I adjust the values of my gyro, measured along the sensors same (x,y,z) reference frame such that I am actually measuring the rotating about the Earth's frame x (North), y (West), and z (downwards) direction?  I just can't seem to wrap my head around the use of the rotation matrix. Do I simply employ a 3d rotation matrix, and multiply the vector, \$[gyro_x, gyro_y, gyro_z]^T\$, by a rotation matrix, R? I then assume the rotation angles, are somehow derived from the filtered accelerometer outputs, but I'm having trouble deciding on what those should be.  I have yet to find a concise reference on how to move the rotation and acceleration values from the sensor reference frame into the earth global reference frame. Perhaps someone can help? Thanks


I am trying to overwrite a template file (tpl-footer.php) in my child-theme. According to the wordpress docs this should be possible just by adding the file with the same name and the same path into the child-theme. When I do so, nothing happens. The theme I use is snsnitan Does anyone know what I am missing? Do I need to overwrite more files? The footer.php in parent theme has just: <?php wp_footer(); ?> </body></html>


Probability density of the product of sequence of uniform random variables

Question:  Given a sequence of i.i.d. Uniform(0,1) random variables $(X_1, ... , X_n)$, show that the probability density function of $Y = \prod_{i=1}^{n} X_i$ is given by $f_{Y} (y) = \frac{(-\log{(y)})^{n-1}}{(n-1)!}, y \in (0,1)$.  Attempt:  In the earlier parts of the question, I proved that -log($X_i$) ~ exp(1), and that $X_i + X_j$ ~ Gamma(2, $\lambda$), so I am guessing I need to use these facts, but I'm not sure how to proceed. Thanks for any help.


Calculate $\lim_{n \to \infty}\frac{a^n}{n!}$

Calculate $$\lim_{n \to \infty}\frac{a^n}{n!}$$ Attempt Consider $$\lim_{n \to \infty}\exp(\log(\frac{a^n}{n!}))=\exp\left(\lim_{n \to \infty}\left(n\log(a)-\sum_{n\geq 1}\log(n)\right)\right)$$ for $a>1$ $$ \lim_{n \to \infty}\left(n\log(a)\right)=\infty $$ $$ \sum_{n \geq 1}\log(n)\leq \int_{1}^{\infty}{\log(x)dx}=\infty$$ therefore $$\exp\left(\lim_{n \to \infty}\left(n\log(a)-\sum_{n\geq 1}\log(n)\right)\right)=\exp(-\infty)=0$$ therefore $$\lim_{n \to \infty}\frac{a^n}{n!}=0$$ Is my proof right? I think that is not general, since $a>1$ and in the problem $a$ is arbitrary


Ubuntu stuck after login when Nvidia driver installed

I have 2 graphics cards (Tesla k10, K40) in my supermicro SuperServer (7047GR-TPRF). I installed Ubuntu Server 14.04, but when I install cuda or Nvidia graphics driver (version 311 or 340), my Ubuntu desktop hangs on login.


Do not require password for a specific app

I have an app which requires me to enter my password every time I launch it. Can I somehow make this app access root account so that it runs automatically without having me enter the password? This dialog pops up every time:


I'm trying to create a list box on a 3d view panel but I can't seem to find the correct control in the list of properties that have an associated UI or in any other related documentation. What I'd like to do is instantiate on of these:  within a blender python script. Does the API expose these controls and if not, is there some way of creating a custom control with its own drawing and mouse handling routine within python or would I have to add that in C++ and expose it to python (which is probably a bit more involved than I have time for at the moment)


I'm working on a program that determines if a number is prime or not.  This involves dividing this number by all numbers smaller than it. But because we are dealing with very large numbers. Dividing it with too many numbers isn't a good idea . So I need a way to minimize the effort done by the program.  Lets assume the number is called $n$. My approach is to divide it by all numbers less than $\frac{n}{2}$.(rounded to the nearest integer) Is there anything wrong with it? And if there is a simpler way please point me to it.


How to make sure all the text stay on top of the page

This might seem a bit of a weird question, but when I have sections in a book along with images, the text always seems to spread out throughout the page. Putting \vfill at then end of the page does the trick, but I don't want to have to do that repeatedly.  I can't seem to make a working example and I don't want to copy the code directly from my book for privacy reasons. But if anyone else has had this problem, it would be a great help to figure out a way to have some command which automatically ends every page with \vfill, as that fixes my spacing problem in books.  EDIT. Actually, here's one I don't mind sharing:. This is one case where the spacing becomes too spread out. IF I put \vfill at the bottom, it improves the appearance. But I prefer to always have the code at the top of the page, with the spacing I provided it in my code.


I have to migrate an Apache web server from version 2.2 to version 2.4. In Apache 2.2, I find the following Options directive in the virtual host configuration files:  Options -Indexes FollowSymLinks   Now, that this syntax is invalid in 2.4  Either all Options must start with + or -, or no Option may   I wonder what the previous syntax is equivalent with. Do I have to prepend a + or a - to FollowSymLinks?


Are there any desktop environments designed to look exactly like a Windows machine? Not like Cinnamon or GNOME, but exactly the same?


Can someone tell me if this scenario is a bad idea and if so, why?  I am collecting an image from a video stream once every second to use as an icon on a webpage to let users select which live video stream they would like to view. This image is getting stored repetitively in the database.  Would it be better to write and overwrite these images to a system file and select them from that location?  I am using SQL Server 2014 and my thought is that this technique may cause problems with the Log File...  Any suggestions would be appreciated.  Thanks!


Configuring, compiling and installing a custom Linux kernel

I'd like to try using a kernel other than the one provided by my distro -- either from somewhere else, or as customized by me. Is this difficult or dangerous?    Where do I start?


HTML - Apply CSS - with parent Div with id to child div with CSS

I am trying to apply CSS for parent div with ID to child div with CSS.  Need to apply   ui-selectlistbox-listcontainer class div height as 100% with parent div id="tableForm:mainTable:selectFilterMenu-crop".  And this code child div is dynamically created. So need to apply height = 100% thow CSS only.  Please suggest me to apply css for child div height as 100%,  HTML:

   CSS: // Not working  #tableForm:mainTable:selectFilterMenu-crop div.ui-selectlistbox-listcontainer {     height: 100% !important; }


how to render semi-transparent objects with transparent background as a png with cycles

I am rendering out some bubbles for use in a composite Photoshop image, so I need to render as a transparent png with the bubbles semi-transparent.  I tried setting render output to RGBA and checking the transparent option under film, but while the resulting png is transparent the bubbles keep the environment background colour.  The bubbles are definitely semi-transparent, because if I include a coloured object in the scene behind them, it is visible through the bubbles in the render, but I can't find a way to allow the semi transparent material to have any alpha transparency in my png render.


Disable CTRL-D from closing my window with the terminator terminal emulator)

I am often logged in several SSH sessions at once. To logout from several sessions, I press CTRL+d, until I am back on my local machine. However, I occasionally press it once too many, and my terminal exits. Is there a way to make CTRL+d unable to close my terminal ? I am using terminator as my terminal emulator.


I am looking for an appropriate formal expression when we want to say that a person should not express their opinions, yet bow their head and be part of what the society considers normal and acceptable ? I am writing a motivational letter for a scholarship and I cannot come up with an appropriate expression.  Thank you in advance.


Distinct() is not working. It displays all the repeating values. I searched for a solution but just got more confused. I tried this :  var categories = db.Orders.OrderBy(c => c.Item1).ToList().Distinct(); var categories = db.Orders.Distinct().OrderBy(c => c.Item1).ToList();   Is there a quick uncomplicated way to make this work?


Should a dupehammer grant the ability to dupe to multiple questions?

Currently when a moderator or gold tag badge holder closes a question as a dupe, they are limited to duping it to just one question. However, when several users vote to close the question, you can end up having a question closed as a dupe of two or more separate questions.   In some cases it would be beneficial if moderators and gold tag badge holders could include more then one question when closing as a dupe, if more then one question would better answer the question. On the  we run into this issue occasionally; other stacks may not face this issue.


How to hide options in drop down in sharepoint search 2013?

I want to hide EveryThing and Conversations in the drop down,can any one please help on this. Thanks in advance


Deferred Initiative Breaching A Shut Door

If the party rolls but our first man through is not first in order, may the other characters defer their spot to follow the tank in and proceed with their turns? Or would they just have to skip their turn? IF the PC skips theirs, do the mobs on the inside take turns to wait or lose theirs as there is no combat yet because the players have not entered the room yet? The squishy ones won’t enter first ahead of tanks ones...and funneling through a doorway to be cut off or overwhelmed would have the tanks and crowd control players enter in a prescribed prepared action/sequence. (Hopefully this makes some sense...)


How to Set Custom Keyboard Shortcut to Adjust Volumes and Brightness

Is there a way to setup custom keyboard shortcut to adjust volumes and brightness? I'm using a MacBook Pro with Touchbar and it's really hard to use.


Remove all vertices connected to one or less edges?

Using the boolean operator a lot creates a lot of junk vertices and edges that make it really difficult to clean up a model so my question is: is there a way to delete all vertices connected to one or less edges?


How do we find the 26 topologies on the set X = {a,b,c}

I want to know an easy to justify logical method of finding the topologies or at least to show that there are 26 topologies on the set. Will greatly appreciate your help.


How to prove that there exists exactly two self- complementary graph with five vertices. I am having difficutly to prove this. I only know the definition of self- complementary graph.But I am unable to use it. Any help would be appreciated. Thanks in advance.


Autofill feature isn't iterating numbers properly when using the AVERAGE() formula in Microsoft Excel

I have a column of monthly data which I want to use to create a new quarterly data column. In order to do this, I take increments of 3 months of data from the monthly data column and use the AVERAGE() formula on them.  I have something like;  AVERAGE(D13:D15) Y1(January - March)  AVERAGE(D16:D18) Y1(April - June)  AVERAGE(D19:D21) Y1(July - September)  AVERAGE(D22:D24) Y1(October - December)  Since the data spans almost an entire century, I want to use the autofill feature to make my life a lot easier. To my dismay, Excel isn't recognizing my iteration of 3 cells at a time and instead giving me results something like this;  AVERAGE(D13:D15) Y1(January - March)  AVERAGE(D16:D18) Y1(April - June)  AVERAGE(D19:D21) Y1(July - September)  AVERAGE(D22:D24) Y1(October - December)  AVERAGE(D17:D19) Y1(May - July)  AVERAGE(D20:D22) Y1(August - October)  AVERAGE(D23:D25) Y1(November, December) - Y2(January)  AVERAGE(D26:D28) Y2(February - April)  Rather than:  AVERAGE(D13:D15) Y1(January - March)  AVERAGE(D16:D18) Y1(April - June)  AVERAGE(D19:D21) Y1(July - September)  AVERAGE(D22:D24) Y1(October - December)  AVERAGE(D25:D27) Y2(January - March)  AVERAGE(D28:D30) Y2(April - June)  AVERAGE(D31:D33) Y2(July - September)  AVERAGE(D34:D36) Y2(October - December)  Is there any workaround to this or am I going to have to manually convert all my monthly data to quarterly data?


How to get folders and subfolders with specific name from in FTP

I wish to get all folders and subfolders starting with string mycobacterium in FTP. I couldn't find any information online how to do it. I have tried get mycobacterium*, mget mycobacterium* but they don't work.  What is the right way in retrieving the data in FTP? Thanks in advance.


I'm monitoring my  server with  monitoring software. I was wondering whether I could export the raw data used to generate Munin charts?  I want to do some in-depth statistical analysis for example on outgoing traffic. CSV or some similar table format preferred.  I was  in some forums that the data is stored in some  database format. It can be exported using  or  but both are rather used for RRD-internal ex- and import and only dump XML files.  Did anyone try to extract the data to CSV and if so, how?


I have always payed a company to host on dedicated servers which is really expensive, 1 of my sites has 2 servers right now, a web/http server and a seperate mysql server.    What would it take for me to do this from home?  I would need a LAMP setup.  1 benefit I can see is I could add as much ram and stuff as I wanted  I only have a cable internet connection, would that be bad on a high traffic site?


How can I change the default location for bluetooth file transfers?

I have an Android 2.3 device (Samsung Galaxy Y Duos, S6102) and want all files that I receive via bluetooth to save to my SD card.  How can I do that?


If I re-write the following code with auto-implemented properties, I understand I have to use a constructor to assign initial values to the variables.  But what happens to the override method? When I remove it, the program does not output anything...  In other words, if I use a constructor and then add auto-implemented properties, I can no longer just use rectangle to simply print out both width and height. Can I?  using System;  namespace Rectangle_Solution {     public class Rectangle     {         private int width  = 5;         private int height = 3;          public int Width         {             get             {                 return width;             }             set             {                 width = value;             }         }          public int Height         {             get             {                  return height;             }             set             {                  height = value;             }         }          public override string ToString()         {             return "width = " + Width + ", height = " + Height;         }          public static void Main( string[] args )         {             Rectangle rectangle = new Rectangle();             Console.WriteLine( "rectangle details - {0}", rectangle );              rectangle.width   = 10;             rectangle.height += 1;             Console.WriteLine( "rectangle details - {0}", rectangle );         }     } }


Mapping Russia - Int'l dateline splitting polygon

I am having the issue where the International Dateline is splitting a polygon I am working with.  I have a layer of the "Federal Districts" of Russia, and the eastern most federal district is being "cut" by the international dateline.   I currently have the data frame's coordinate system set to Asia Lambert Conformal Conic and this places the two "cut" polygons next to each other (how they should be).  I really need the polygon to not be cut and show as a continuous polygon.   I've researched up and down, tried changing the projection/coordinate system, but with no luck.  I've attached a screenshot of the one multi-part polygon that is being split by the international dateline.  I would like it so that there is no cutting of the polygon, and therefore no boundary line going through the polygon.  I've even tried transforming this multi-part polygon into separate, single-part polygons, then merge them back together, but anytime any part of any polygon crosses this line, it gets cut.  Layout View:    Data View:


I can issue the clear command or press Ctrl + L to clear the current Ubuntu terminal, but this just shifts previous output upwards and if you use mouse scroll or PgUP and PgDown keys it's hard to distinguish where the output of previous command ends and output of current command begins.  Is there a way to really clear the terminal so I won't see previous command results?


Import .bak file in Microsoft SQL Server 2008 Service Pack 3

I have a backup of my database as a TestDatabase.bak file but I am unable to restore it.  When I try to restore I receive the following error message in SSMS:      RESTORE could not start database 'FieldopsDevDynamic07042013'     The error log shows:     Database 'FieldopsDevDynamic07042013' cannot be started because some   of the database functionality is not available in the current edition   of SQL Server.     How can I restore this database?


90s sci-fi novel with two worlds, one grim another pastoral with the war-cry "Ire, Iron and 'voorstrod'"

I read this paperback sci-fi in the early nineties. I have a jumble of memories but not sure of the running order in the book.  Two worlds, one slave-owning, grim and brutal; the other pastoral but high-tech nucleus.  On the "grim world" they use the near-human natives as slaves and are very strict with them, the young human protagonist's mother, as a girl, witnesses her father whip her native playmate to death in the kitchen for not playing how she likes. The native's own mother (who works in the house) watches and somehow ensures the floor is forever stained in that area to remind them of her child.  Still on the grim world, they are descended from the IRA and Iranian terrorists and Afrikaaners and their slogans have got intermixed over centuries. The war cry (and mythical Gods) is "Ire, Iron and Voorstrod" (spelling?) but nobody remembers why. They are nowadays religious fanatics with their own strange creed. They boast about how they used to be able to make aircraft fall from the sky. They have a plot to conquer the pastoral planet.  On "pastoral world" they have a massive space station full of giant warbots held in stasis (Enforcement?) to keep the peace in their star colony area. These are regularly maintained by their tech people.  The young protagoninst has now found himself on the pastoral world (a refugee?) and is in love with a girl there. Suddenly an invasion begins - the grim people have managed to usurp control of the warbots and are sending them through wormholes along with troops.  The warbots question anyone they run into with religious questions but because of his upbringing, the protagonist easily answers and is released to later help overthrow the invaders.


There is a very small bug when it comes to toggling favorites.  Steps to reproduce:   Open the same question in two tabs In one tab, mark the question as a favorite In the second tab, mark the question as a favorite   Result: Question is now "un-favorited", even though both tabs show that I have marked the question as a favorite. The reason is that the front-end display is not syncing with the back-end, despite the fact that each click will toggle your selection in the back-end.  Now you may think: That's stupid. Why would I open the same question in two tabs?  Here's how I noticed it. This happens in Chrome, other browsers are untested.   Open a question and mark it as favorite Go to the location bar and enter a new URL (e.g. Google) Hit the back button The cached version of the page now shows that the question is not favorited, even though it is in the back-end Select the question as favorite (again). This will make it appear as if the question is now favorited, when in fact you have now "un-favorited" the question in the back-end. Refresh to confirm.   I realize this is a small bug, but it is a bug nonetheless.


How can I prove that the set of all vector spaces doesn't exist? (In other words, if I gather all vector spaces, then it cannot be a set)


How to get GitHub account to show up on Google search

My question is the same as in the link provided below but when I go to Google Search Console it asks me to verify my Github profile https://github.com/[xyz] by inserting an HTML file. I am unsure about how to do that or are there any other ways that I can verify my GitHub profile.  Similar question:   Google serch console:


Text Distortion Effect (like it is written on a page)

I want to display a text like it is written on some surface like notebook page or wall via Photoshop CS6. I added two example.   This image seems like image distortion:    And this image looks like text distortion:    I tried this with distort and skew transformation but I'm unable to get this much clear & real effect.


Ubuntu software center not working in Ubuntu 14.04

When I try to open software center, it gets closed within 5 seconds after being opened. I am not able to install or un-install any software using terminal too. When I tried to uninstall Software center, the following was shown:  Reading package lists... Error!  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_i18n_Translation-en%5fIN  E: The package lists or status file could not be parsed or opened.   Please help me to solve the problem.


Can I run the python interpreter without generating the compiled .pyc files?


How to typecast a variable with the type stored in another variable?

a = 4 b = float(a) c = 'float'   Now, the doubt comes when the target type is stored in another variable.  b = c(a)   This would raise error.


Only include certain fields in BibLaTeX bibliography

I am using \usepackage[style=numeric,sorting=none]{biblatex} to make my bibliography but it automatically includes fields such as ISSN, DOI, URL etc that I don't want to display as which fields are included varies so much between journal articles when I produce my .bib file by exporting from Mendeley. I could go through and delete all the fields I do not want from the .bib file but this would be extremely time consuming for the number of citations in a thesis! Is there a way (the simpler the better - I am new to LaTeX!) to customise which fields are included in the bibliography (either in LaTeX or in Mendeley)?  Thanks so much!


Let $f_n$ be a sequence of differentaible functions on $[0,1]$ to $\mathbb{R}$ converging uniformly to a function $f$ on $[0,1]$, Then    $f$ is differentiable and Riemann integrable there $f$ is uniformly continuous and R-integrable $f$ is continuous, need not be differentiable on $(0,1)$ and need not be R-integrable on $ [0,1]$, $f$ need not be continuous.   Well I think 2 is only correct statement  as every $f_n$ are differentiable on $[0,1]$ hence uniformly contnous, and as they converge uniformly to $f$ on $[0,1]$ so $f$ is uniformly continuous and every continuous function is rieman integrable..Am I correct?


MIPS store byte (sb) into a string gives segmentation fault

Essentially, I am trying to store a char (1 byte) into memory using sb.   I am writing MIPS assembly to reproduce the functionality of some C code. I put the function str_make_lower in a separate file and compiled the C code with it.   #include <stdio.h> /* uses tolower() to convert upper case to lower case*/ void str_make_lower(char *s); //  while(*s != '\0'){ //      *s = tolower(*s); //      s++; //  } // }   int main(int argc, char const *argv[]) {     char *s = "AB\000";     str_make_lower(s);     printf("%s\n", s);     return 0; }   My assembly is as follows, which should mimic the C code that is commented out:  .text .global str_make_lower str_make_lower:     # arg passed in:     # a0: char *s     addi    $sp, $sp, -40     sw      $ra, 32($sp)     sw      $s0, 36($sp)      # save char *s      move    $s0, $a0  while_str_make_lower:     # initialize registers     add     $t0, $zero, $zero     add     $a0, $zero, $zero      lb      $t0, 0($s0)     # get a char from pointer     beq     $t0, $zero, str_make_lower_return     nop      move    $a0, $t0        # load arg for tolower      jal     tolower         # yeah     nop      add     $t0, $zero, $zero     move    $t0, $v0        # collect lower letter     sb      $t0, 0($s0)     # store it back      addiu   $s0, $s0, 1     # increment pointer     j       while_str_make_lower     nop  str_make_lower_return:     # restore and return     lw      $s0, 36($sp)     lw      $ra, 32($sp)     addi    $sp, $sp, 40     jr      $ra     nop   Ultimately, by using gdb, I found that it was the store byte (sb) that was giving seg fault. I inspected the content of $t0 and $s0 but the values of the two seem to be what they should be. I wonder whether it is me using the sb wrong, or something else.  (gdb) p $t0 $5 = 97 Program received signal SIGSEGV, Segmentation fault. while_str_make_lower () at tl.s:35 35      sb      $t0, 0($s0)     # store it back (gdb) bt #0  while_str_make_lower () at tl.s:35 #1  0x00400700 in while_str_make_lower () at tl.s:30 Backtrace stopped: previous frame identical to this frame (corrupt stack?)  (gdb) p (char*)$s0 $9 = 0x4008c0 "AB"   Thanks!


Why do different color of the same materal differ temperature in the same sunlight?

I have a blue, red, and green cup and put a thermometer in each. Of the 3 the blue cup had the coldest temperature inside, then green, then red. I understand there may be differences in the composition of the cups but does color reflect the sun differently? I thought blue being closer to black would be hotter, but it is not?


Best practices to alias the rm command and make it safer

Some time ago I erroneously deleted my home folder because I ran a rm -rf * on the wrong terminal, whose working directory was the home folder!  I wish I had an alias for the rm command, but it was not the case.  Now, I am planning to make a script as an alias for rm.  Do you have any best practice to suggest?  Thanks.


SQL Syntax Error on a Line which doesn't Exist

I am using Xampp v3.2.  I am trying to edit, delete and update fields in the database according to the user input. But I'm getting an error:  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Shezad, body = Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecen' at line 128   My code has 47 lines only. Here is the main PHP part of the document:
     <?php         $id = $_GET['id'];         $sql = "SELECT * FROM `posts` WHERE id = ".$id;         $post = $mysqli->query($sql) or die($mysqli->error.__LINE__);          $msg = "Post edited";          if(isset($_POST['submit'])) {             $title = $_POST['title'];             $author = $_POST['author'];                          $body = $_POST['body'];              $sql = "UPDATE `posts` SET title =".$title.", author =".$author.", body =" . $body . "WHERE id = " .$id;             $update_rows = $mysqli->query($sql);              echo "
" .$msg. "
";         }     ?>     <?php if($post) : ?>         <?php while($row = $post->fetch_assoc()) : ?>             <form action="edit-post.php?id=<?php echo urlencode($id); ?>" method="POST">                 <input type="text" name="title" value="<?php echo $row['title']; ?>" placeholder="Edit title of post...">                 <input type="text" name="author" value="<?php echo $row['author']; ?>" placeholder="Edit author of post...">

                 <textarea type="text" name="body" placeholder="Edit body of post..."><?php echo $row['body']; ?></textarea>                 <input type="submit" name="submit" value="Edit Post...">             </form>         <?php endwhile; ?>     <?php endif; ?>
   Help me, please. Thank You!   Also recommend other code problems


I am trying to solve this exercise from Jech's book on set theory:  Ex. 3.6: There is a well ordering of the class of all finite sequences of ordinals such that for each $\alpha$, the set of all finite sequences in $\omega_{\alpha}$ is an initial segment and its order-type is $\omega_{\alpha}$. Definition: If $W$ is a well ordered set and $u \in W$, then the set $\{ x \in W \mid  x < u \}$ is an initial segment in W  Any help?


Are there public bath etiquette to be aware of in Japan for foreign women?

I'm in Japan now and it is simply awesome. I'm thinking of visiting a public bath. Is it separate for the two genders? Can I go in with a swim suit (after my mandatory shower, of course) or do I have to be completely nude? Not that I'm uncomfortable but in a completely alien part of the world, I'm acutely aware of offending cultural sensibilities. Also being a south-Asian woman, upper body size is fairly different.


If $\alpha$ is a regular cardinal, the union of an elementary chain of $\alpha$-saturated models is also a $\alpha$-saturated model

I'm studying Model Theory with the book of Chang-Keisler, and I'm trying to solve the following problem stated in Chapter 5:     The union of an elementary chain $(M_i)_{i < \alpha}$ of $\alpha$-saturated models is also $\alpha$-saturated, if $\alpha$ is regular.   I'm considering the following definition:     $M$ is a $\alpha$-saturated model if for all $A \subset M$, $|A| < \alpha$, every $1$-type $p$ in $A$ over $T(M) = \left \{ \varphi: M \models \varphi \right \}$ is realized in $M$, i.e. there exists $a \in M$ such that $M \models \varphi(a), \, \forall \varphi \in p.$   My attempt:  Let $(M_i)_{i < \alpha}$ be an elementary chain of $\alpha$-saturated models and let $M = \bigcup_{i < \alpha} M_i$. Given $A \subset M$ with $|A| < \alpha$ and $p$ a $1$-type in $A$ over $T(M)$, if I prove that there exists $i < \alpha$ such that $p$ is a type over $T(M_i)$, we could conclude that there exists $a$ in $M_i$, with $M_i \models \varphi(a)$ for all $\varphi \in p$. Hence $a \in M$ and $M \models \varphi(a)$, since $M_i$ is an elementary substructure of $M$.  So, how can I proof the existence of such $i < \alpha$?


Export path with space in directory name

I have a path "/third/party/city of las vegas"   when cd the path I use "/third/party/city of las vegas".  In .profile file I have exported the path to a variable as follows  export clv="/third/party/city of las vegas"   when I try to cd $clv it is throwing an error.  How can I export a path which have spaces in the directory name


Make a folder with today's date with a batch file

I am fairly new with creating batch files.  I have made a batch file with the following content:  "C:\Program Files (x86)\Runtime Software\DriveImage XML\dixml.exe" /bC /c /l /t"B:\DRIVE IMAGES\Windows10_maintenance_backup   This allows me to run DriveImage XML and take a backup simply by running the bat file.  I would like the bat file to automatically make a folder with today's date so that:  B:\DRIVE IMAGES\Windows10_maintenance_backup   Becomes:  B:\DRIVE IMAGES\2016.01.20\Windows10_maintenance_backup   How can I achieve this by editing the .bat file? I have had a look at foxidrives solution  but I do not know how to implement the solution.


Why don't malloc and ::operator new mix?

It's well known that new (/delete) and malloc(/free) don't mix. What was the reason to not make them compatible?  I understand that new and delete have two responsibilities: constructing and destructing in addition to allocating and deallocating so to make the question more accurate: Why aren't the ::operator new and ::operator delete functions required to call ::malloc and ::free respectively?  Forcing compatibility would at least allow reallocing of newed arrays of primitive (or rellocatable nonprimitive) types, which can carry noninsignificant performance benefits, and it would make things a little simpler for people who absolutely want to free newed memory (when destruction isn't required).  So what is the reason to break compatibility with malloc here?


Best self-study books for static mechanics problems

Which book is the best for me to self-study/improve at static mechanics problems?  I am looking for a book with a lot of ( only ) problems, not a theoretical book.  Not only basic problems, the ideal is a book with a lot of problems going from easy to hard.


How to find commands associated to a package?

Sometimes I find myself installing a package and then trying to run a command using the same name,  package:  $ sudo apt install geoip-bin   [...]  $ geoip-bin geoip-bin: command not found   How may I find all the commands associated with a given package?


Proof of equality of independent variables

With $X_1,X_2,..$ as a sequence of i.i.d variables with F as a distribution function and $M_n=max\{X_m:m<=n\}$ for $n=1,2,..$  To prove $P(M_n<=x)=F^n(x)$, I did the following:   a) $P(M_n<=x)=P(max(X_1,X_2,...X_n)<=x)=\prod_{i=1}^{n}P(X_i<=x)=P(X_1<=x)\cdot P(X_2<=x)\cdot\cdot\cdot P(X_n<=x)=F\cdot F \cdot F.. = [F(x)]^n= F^n(x)$  b) Given $ F(x)=1-x^{-α}$ for $x>=1, α > 0$. Need to prove that as n approaches infinity  $P(\frac{M_n}{n^{1/α}} <= y) -> exp(-y^{-α})$  I proved $P(\frac{M_n}{n^{1/α}} <= y)=P(M_n<=y \cdot n^{1/α})=(F(y \cdot n^{1/α}))^n=(1-\frac{1}{n \cdot y^α})^n -> e^{-y^{-α}}$ as n approaches $\infty$  Are proofs in a) and b) are done correctly?  Please let me know if something needs to be added to make it solid.  Thank you very much!


Fadeout a button after a click using jquery

I am new to jquery and I am trying to make this code works but no way:     <button class="add">Add</button>       When I try adding the following line
<button class="remove">Remove</button>
 after the add button in the initial code, everything works properly. Anytime I add new remove buttons using the JS code, it works but i can not remove those buttons.  Kindly help me fix it.


What's the direction of the current in this circle if a magnet is approaching (or distancing from) the circle?

I'm not a native speaker so I don't know how to properly describe the problem I'm having right now We got a circuit, it's a circle, and it's placed at the left. We also have a bar magnet which is either approaching the circle (or distancing from the circle)  And we have to find out which situation is true. I know that it's b), that if you approach this circle with S, you get a current whose direction is clockwise. But why is it so? Is it because of some equations? Or can we draw/visualize the solution?


I'm currently running large processes, and I'm afraid the limit of my API calls is not enough to handle that. I want to retrieve my current number of API calls (and my maximum API calls), to verify that I never exceed my maximum - 5000 (margin of safety).  How to recover these 2 numbers?


Comma usage: "In July of 2012 ..." or "In July of 2012, ..."

Consider the following sentence:     In July of 2012 Jesse informed us that she was engaged to be married   and asked if she could add her fiancée to the lease,   beginning the 15th of August 2012.   Is it any more or less correct to place a comma after the first date?     In July of 2012, Jesse informed us that she was engaged to be married   and asked if she could add her fiancée to the lease,   beginning the 15th of August 2012.   Assuming one is no more correct than the other, does this change the meaning of the sentence, or is it pure style?   Bonus question: Word tells me that it's improper to place a comma after the "August" at the end of the sentence. I've always been taught that a comma should be used to separate the year from the rest of the date. Was I taught wrong, or is Word lying to me?


Provide somebody something vs provide somebody with something

When “to provide” means “to make available”, is it grammatically correct to use “to provide somebody something” instead of “to provide somebody with something”? Example:  To provide employees (with) benefits  There seems to be scarce info on google about this particular question. I get that skipping “with” sounds a bit more colloquial but is it still grammatically sound?


A group is said to be finitely generated if it can be generated by a finite set of generators.   Question : Is there difference between finitely presented groups and finitely generated groups?


If gravity pulls everything downward why do electrons in a vertically held wire with a voltage across it not experience a downward pull?


Setting up a download page requiring a user to fill a form before downloading anything

In the Drupal site I'm setting up, there's a Download page containing several links to download softwares.   What is the best way to "bind" the softwares to the page, put them anywhere online and place a direct link in the page?   Does anyone know a module that would show a contact form when a user clicks one of the "Download" buttons, preventing him from downloading unless he properly completes the form?  Our goal is to receive the contact information of any person downloading our software.


How to prove this element is strictly positive?

Let $A$ be a $C^*\text{-algebra}$ and $A_+$ denote the positive elements. An element $a\in A_+$ is called strictly positive if $\overline{aAa}=A$. Want to prove: if $(e_n)$ is an approximate identity of $A$ , then $a:=\sum_{n=1}^{\infty}\frac{1}{2^n}e_n$is strictly positive. i.e, I want to prove that if $b\in A$, then I can find a sequence $x_n\in A$ such that $b=\lim(ax_na)$. By an approximate identity of $A$ we mean that : $(e_n)$ is increasing, positive,$\|e_n\|<1$ and for all $a\in A$ : $\|(ae_n)-a\|$ converges to $0$ .  Any help or suggestion is really appreciated. Thank you!


Suppose we are given a number $a \in \mathbb{Z}$ prove that $42|a^7-a$.  I'm not too sure how to start any ideas?


I am not expert in JavaScript and need to get this regex to work:  function validateEmail(email) {      var re = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,22}/;     return re.test(email); }   Currently this doesn't work fine, even for myemail@hotmail.com.  I don't need a new regex, just few changes to this one to get it to work.


I can´t install Cinammon on Ubuntu 12.04 LTS

I'm new on linux and I've installed Ubuntu 12.04 lts. I want to install cinnamon but after typing   sudo add-apt-repository ppa:gwendal-lebihan-dev/cinammon-stable    it shows me this:      Cannot access PPA (https://launchpad.net/api/1.0/~gwendal-lebihan-dev/+archive/cinammon-stable) to get PPA information, please check your internet connection.   I dont know what to do, and I really want to install cinnamon.  I hope anybody can help me with this.  Thanks!!


Will the Olympic skins (+ other future event skins) be buyable after the event is over?

There's brand new skins in overwatch, and they are event themed.  Will they be just gone after the event (those who have it keep it, those who don't are screwed...)  It should be one of 3 scenarios   Skin can still be got in boxes Skin cannot be got in boxes but can be bought with gold Skin is unavailable to any who dont have it, like with the founders skins


Karn, the Great Creator - what defines a 'card from outside the game' in sealed?

In the upcoming set 'War of the Spark' there is the Planeswalker . His -2 ability reads as:      -2: You may choose an artifact card you own from outside the game or in exile, reveal that card and add it to your hand    Now my question is, in a sealed tournament, like the Prerelease, is a player allowed to also choose cards from outside his sealed cardpool, or only out of the cards therein. Does anyone know any rulings on stuff like that?


I have multiple threads running from different terminal windows in ubuntu trying to write to the same file.   I would like to lock the file via terminal while writing so that the other thread(s) has to wait to write till the lock is released. How do I do this?


can't see value of DESKTOP related XDG environment variables from remote machine

When I run echo $XDG_CURRENT_DESKTOP or $XDG_SESSION_DESKTOP I can see values on my Linux machine.  When I run same commands on my machine from remote machine showing empty results.    IMO, those variables are set only for its session.  How to get which desktop environment is running on the remote machine?   I was developing an application that has a feature to check which desktop environment is running on Linux machine.   Tried (getting empty results):   bash -c "echo $XDG_CURRENT_DESKTOP"  source ~/.profile && echo $XDG_CURRENT_DESKTOP


Disabled mac os SIP but still can't delete default apps

I'm using mac os 11.2.1 Big Sur. My question concerns using the Terminal utility to delete Apple default apps protected by SIP. I have disabled System Integrity Protection and confirmed that it is off by typing: csrutil  Terminal duly returns "disabled" to confirm that SIP is definitely off. I then attempted to delete various Apple default apps, as follows: sudo rm -rf FaceTime.app/  sudo rm -rf TV.app/  sudo rm -rf Mail.app/  But nothing seems to happen. The apps are still in my Applications folder and launch normally. If I try to delete them manually, I get a beep and the deletion is rejected just as if SIP were still enabled. Can someone suggest a better way to remove Mail?


Say I want to open the PdfTeX manual in PDF-format for reading on my screen. Or maybe get information about nicefrac. I don't want to locate xxx in the terminal ... What is the quickest way to open the pdf-manual for a given tex function or program?


How is a vacuum able to propagate light?

We say that sound waves need a medium to propagate and we know that light doesn't need such a thing. But is that really how that works? There's no such thing as "nothing" according to Quantum Mechanics, so I'm wondering if light can travel through "perfect vacuum"? A vacuum that there's no field, no lowest energy thing, nothing. Or does it really need something like "aether" to propagate? I'm not talking about "Luminiferous aether" by the way. A kind of aether Einstein thought existed.


Showing that $\sum_{n=2}^\infty \frac{2}{n^2-1}$ is convergent

I am trying to show that $$\sum_{n=2}^\infty \frac{2}{n^2-1}$$ is convergent by using telescoping sum.  So far I have reduced $\frac{2}{n^2-1}$ via partial fractions to $\frac{1}{n-1} - \frac{1}{n+1}$.  Then in an attempt to reduce I wrote $\sum_{n=2}^\infty \frac{1}{n-1} - \frac{1}{n+1} = (1-\frac{1}{3})+(\frac{1}{2}-\frac{1}{4}).....$  I then noticed that they all cancel apart from $1+\frac{1}{2}$ however I am not sure what happens generally at the end? So whether $\frac{1}{n-1}$ will cancel or stay?  Thank you!


Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


Is there a way to trace objects to get this old fashion 3D effect?

Just like the question says.   Here's the . It's from a recent Progressive commercial.   Is there a way to do this, preferably in Illustrator, without drawing the outline by hand?


Let O be a computable ordering of all computable reals in ⟨0,1) (eg. first by length of programs computing them and then lexicographically). (it does not matter that they appear there more than one time). It seems to be possible to produce a computable real not in this ordering by diagonal argument, using a deterministic algorithm to produce the non-matching digit.  What is the error in this reasoning?


Different results when using different ways to calculate a function y = f(x)

I wrote a function to calculate the value of the function y  = f(x)  = x^3 + 2*x^2 - 4x + 1. But then I realise that the result when using the function vs the result when not using the function is different at some value of x. Here's my code: #include<iostream> #include<cmath>  using namespace std;  int function(int x) {     int y= pow(x, 3) + 2*x*x - 4*x + 1;     return y; };  int main(void) {     for(int i = -5; i < 10; i++) cout << function(i) << std::endl;      for(int i = -5; i < 10; i++) cout << pow(i, 3) + 2*i*i - 4*i+1 << ' ';      return 0; }  And the result is: -53 -15 3 9 6 1 0 9 34 81 155 265 414 609 856 -54 -15 4 9 6 1 0 9 34 81 156 265 414 609 856  I'm so confused right now. Please help.


So after googling around and finding out wine doesn't work with the AMD drivers, I uninstalled it and the libopen dependencies for both AMD64 and i386 as they were conflicting with the installation of fglrx-core.  Now, however, when I try and install this, I get this error information:  (Reading database ... 208182 files and directories currently installed.) Preparing to unpack .../fglrx-core_14.501-0ubuntu1_amd64_UB_14.01.deb ... Unpacking fglrx-core (2:14.501-0ubuntu1) ... dpkg: error processing archive /tmp/fglrx-core_14.501-0ubuntu1_amd64_UB_14.01.deb (--install):  trying to overwrite '/etc/acpi/fglrx-powermode.sh', which is also in package fglrx 2:13.350.1-0ubuntu2 dpkg-deb (subprocess): decompressing archive member: internal gzip write error: Broken pipe dpkg-deb (subprocess): cannot copy archive member from '/tmp/fglrx-core_14.501-0ubuntu1_amd64_UB_14.01.deb' to decompressor pipe: failed to write (Broken pipe) dpkg-deb: error: subprocess <decompress> returned error exit status 2 Errors were encountered while processing:  /tmp/fglrx-core_14.501-0ubuntu1_amd64_UB_14.01.deb   the tmp/fglrx-core_14.501-0buntu1_amd64_UB_14.01.deb is the package of fglrx-core I'm trying to install, but I have also tried it from my home directory and renaming it but nothing seems to work.  Has anyone got a quick fix? I'm new to Ubuntu and not great at it.


$X$ has Indiscrete topology $\implies$ any subset of $X$ is connected

My attempt: Take any $C \subseteq X$. We show $C$ is connected. Suppose $C = A \cup B$ where $A$ and $B$ are disjoint, nonempty subsets (Open $\in \mathcal{T}_{indiscrete}$). Since only $X$ and $\varnothing$ live in the indiscrete topology, WLOG we can put $A = X$ and $B = \varnothing$. But this implies $C = X$ which is a contradiction. Hence, $C$ is connected.  Is this solution correct? any feedback? thanks


Find the value of $\dfrac{\sin(A)^8}{a^3}+\dfrac{\cos(A)^8}{a^3}$

The question is:      We have been given   $$\frac{\sin(A)^4}a+\frac{\cos(A)^4}b=\frac1{a+b};$$   find $$\frac{\sin(A)^8}{a^3}+\frac{\cos(A)^8}{a^3}.$$   My reaction: "Hmmm, hi there, tough-looking question..."  My approach: I first multiplied each term by $(a+b)$. After that, I squared.  AND, I finally got this after some manipulation: $$\frac{b\sin(A)^4}a+\frac{a\cos(A)^4}b=2\sin(A)^2\cos(A)^2.$$ (And something squared after that).  I really can't go further, I could really use some help.


I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using syncdb to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework). I was already thinking this was too good to be true when I saw this in the :  Syncdb will not alter existing tables syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after installation. Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make. There is a risk that critical data would be lost in the process. If you have made changes to a model and wish to alter the database tables to match, use the sql command to display the new SQL structure and compare that to your existing table schema to work out the changes.  It seems that altering existing tables will have to be done "by hand". What I would like to know is the best way to do this. Two solutions come to mind:  As the documentation suggests, make the changes manually in the DB; Do a backup of the database, wipe it, create the tables again (with syncdb, since now it's creating the tables from scratch) and import the backed-up data (this might take too long if the database is big)  Any ideas?


Line breaking with hyperref href with an underline in itemize

I have a simple itemized list like the following MWE:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{hyperref} \usepackage{lmodern} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{lipsum} \begin{document} \begin{itemize} \item \href{http://google.com}{[ID1]: \underline{\lipsum[1]}} \end{itemize} \end{document}   This unfortunately doesn't break the block of text as expected, as shown below:    How can I fix this item so it will line break properly?


Possible Duplicate:          Given the sentence     John brings his lunch to school,   is it correct to say     It is important that John brings his lunch to school   (using the third person singular present form of bring), or     It is important that John bring his lunch to school   (using the infinitive form of bring)?  [Edit: The answers indicate that this is actually the subjunctive form, not infinitive.]  I have been told that the infinitive form is correct, but if this is correct I would like an explanation. It doesn't seem like adding it is important should modify the tense of the rest of the sentence.


what version works with Opteron 180 Asus A8N motherboad?

I have PC with AMD Opteron 180 cpu 3gb memory, asus a8n motherboard, GT 6600 graphic card.  I was not able to install Ubuntu 14  nor Xbuntu AMD64.  It does not boot. The same pen drive boots fine  on a Pentium Dual Core notebook.  Hope I can find a version that works on my Opteron 180 PC.  Martin


Can the limit $\lim_{h \to 0}\frac{f(x + h) - 2f(x) + f(x - h)}{h^2}$ exist if $f'(x)$ does not exist at $x$?

The second derivative of $f$ can be written as   $$f''(x) = \lim_{h \to 0}\frac{f(x + h) - 2f(x) + f(x - h)}{h^2}$$  while it can also be written as (in fact, I believe this is the definition of $f''(x)$):  $$f''(x) = \lim_{h \to 0}\frac{f'(x + h) - f'(x)}{h}$$  From the second expression, it seems clear that if $f'(x)$ does not exist, then $f''(x)$ cannot exist as well.  However, the first expression does not involve $f'(x)$, so this got me wondering: If $f'(x)$ does not exist at $x$ , can the limit $\lim_{h \to 0}\frac{f(x + h) - 2f(x) + f(x - h)}{h^2}$ at $x$  exist?  How would one prove/disprove this? If this were to be true, what would be some examples?


I am relatively new to programming and have started using VS 2013 instead of C# Express 2010.  I was curious what is the difference between debug and build folders in the bin directory?


Windows 10. How to find what app or process has openeded the message window?

I am debugging a PHP app that generates quite a complicated javascript webpage. During the debugging a pop-up message window appears:  It is not very informative - as I do not know what has overflowed. I use xampp, xdebug, explise and external browser. Is there any way to find out what process has opened this window?


I am talking about converting floats that already store integer values (like 10.0) I need to do this because I want to create a simple function that reverses a given integer, and it uses a line of code that looks something like this: ans += x % (int)pow(10, i); (the % operator needs both arguments to be integer, and pow returns a double)  C++ is not very happy doing this conversion properly. For pow(10, 4), I get a value of 9999, which is very irritating. Why this error occurs is obvious, 10^4 must have been stored as 9999.999999... or something like that. I could possibly fix this error by using the lround() function, but that would be a less than optimal solution because what if I overlook a similar error like this?  Is there a way to do mathematics in C++ without worrying about such trivialties? If not, what language should I choose to do computation like this? I have briefly used the bigInt library in python. Any suggestions regarding which language and library to use to tackle this issue would be very helpful.


Why does the conserved quantity generate the transformation in quantum mechanics?

If we have a lagrangian with a symmetry then we get a conserved quantity: $$Q=Q(p,q)$$ which is a function of the conjugate momentum and the coordinates.  If we move over to quantum mechanics then we promote $Q$ to an operator by promoting $p,q$ to operators but otherwise keeping $Q$ as the same functional form of $p,q$ (assuming no ordering ambiguities).Then if we want to apply the symmetry to a state $|\psi\rangle$ then we use the conserved quantity, $$|\psi\rangle\to|\psi'\rangle=e^{iQ}|\psi\rangle$$.  Why is the conserved quantity the  generator of the transformation ?


Visiting the US after overstaying as a minor 13 years ago?

I can't seem to find a story related to mine so here it is.  I am 25 and a German citizen. In 1998 when I was 7 years old my family moved to the states and we stayed until early 2002 and left voluntarily. Basically we overstayed. I am aware that my parents had the ten year ban and since I was a minor at the time of our overstay I did not receive such ban.  Ever since 2002 I have not attempted to go back to the USA for any reason. However now that I am older I would like to go back for vacation and stay for a short period of time (one month) during my christmas break.  I've lived in Germany since leaving, have a great job, enough money in the bank account. My whole life is here and I have no intention on moving anywhere else.  After reading a bunch of stories online I have decided to apply for a B2 visa to be on the safe side but I was curious about the ESTA approval. For the last question. 8) Have you ever stayed in the United States longer than the admission period granted to you by the U.S. government?   I should put yes but is it a no if I stayed when I was a minor? And what are my chances on getting the B2 Visa?


How do you correctly soften butter for spreading?

How do you correctly soften butter for spreading on bread? Is it simply a matter of leaving it at room temperature for a few hours, or do tools like butter conditioners do a better job?


Better list spacing (nested lists and/or lists with multiple paragraphs)

The styling of nested lists with mixed or multiple child elements isn’t great. If you have only a single paragraph of text or a single nested list item within a parent list item then there’s no issue, but as soon as you have more than one child element the styling starts to get a bit unpredictable. This is most noticeable when you have nested lists along with paragraph text in the same parent list item, but also affects things like code blocks and quotes.  This has come up as a support issue (for example  and ).  The issue is the explicit lack of a bottom margin on child lists and paragraphs regardless of whether there are succeeding elements. So for example, this:  - List item      - Child list item      More list item text  - List item   Is rendered as:        List item         Child list item         More list item text   List item      And as an image for posterity:        This is because the first "List item" text is wrapped in a <p> tag that has a bottom margin, whereas the child list item and "Child item text" has no bottom margin.  The offending CSS rules (found in "all.css") are:  ul ul, ol ul, ul ol, ol ol {     margin-bottom: 0; }  .post-text ul p:last-of-type, .wmd-preview ul p:last-of-type, .post-text ol p:last-of-type, .wmd-preview ol p:last-of-type {     margin-bottom: 0; }   Now, we don’t want all nested lists to have no bottom margin and we don’t the last paragraph to have no bottom margin unless it is the last element in that list item, not just the last paragraph.  The simple solution is to remove both of those declarations and replace with:  ul :last-child, ol :last-child {     margin-bottom: 0; }   That gives us no bottom margin on the last child element of anything inside lists, which would also cover the last list item itself, meaning we could get rid of this (also in "all.css") too:  .post-text ul li:last-child, .wmd-preview ul li:last-child, .post-text ol li:last-child, .wmd-preview ol li:last-child {     margin-bottom: 0; }   Just for reference, this is how the previous example looks with the improved CSS:        Maybe I’m overlooking some other case where those rules are important or maybe they're used elsewhere and simply removing them isn't the best option but at least change the rule affecting paragraphs from :last-of-type to :last-child and stop removing the bottom margin on all nested lists...  This is also a problem with non-nested lists when multiple paragraphs are used. This:  - List item   Second paragraph for item  - List item  - List item   is rendered like this:        List item      Second paragraph for item   List item   List item      as an image for posterity:        The second paragraph of the first item shouldn't be visually closer to the second item than it is to the preceding paragraph in the first item.  TL;DR Better nested list spacing please.


Show that $\cos(x) \le e^{-x^2/2}$ for $0 \le x \lt \pi/2$.  This inequality came up in my solution to .  This is in the category of "There should be a number of ways to prove this."  Here is one way I came up with. I am interested in seeing how many others there are.  $(\ln(\cos(x))' =-\tan(x) \le -x$ for $0 \le x \lt \pi/2$. Integrating from $0$ to $x$, since the two sides are $0$ at $x=0$, $\ln(\cos(x)) \le -x^2/2$ so $\cos(x) \le e^{-x^2/2} $.


Reapplying for a UK tourist visa after being refused once

I am an Indian citizen (also holder of Schengen residence permit) got married recently and want to visit London for 5 days with my wife (Indian citizen) for our honeymoon.   I have been previously refused a visit visa by UK mission in Warsaw in March 2015. I am a self-employed freelancer (have no means of stable income) approx 500 euro per month. I have about 10,000 euros to show in my bank statement (business income).  I have genuine intention of returning back to India after the visit. What documents should I arrange to have a strong case on my side?   We wouldn't really worry much, even if they deny us a visa, but curious about the legal procedure involved.


What is "water" in the context of the spell control water?

What counts as water when casting the spell control water? I'm sure that the answer could be "that's up to the DM", but how does the DM justify this judgement? There's many ways to approach this question; here are a few examples:   Chemically: in that anything that mostly composed of H20 counts as water. Muddy river, glacial ice, frozen lake, mist, fog, etc. Intuitively: in that anything that seems like water counts as water. It's liquid, mostly clear, you can swim in it and drink it, etc.    Simplistic: where only liquid, mostly pure water counts as water.   Related question:   Spell information:


How to prevent multiple app loading, but allow loading its different instances?

I have a test application which could not be loaded a several times. It works fine.   private void App_OnStartup(object sender, StartupEventArgs e)         {     if (Process.GetProcessesByName(currentProcess.ProcessName).Length > 1)                     {                             MessageBox.Show("Instance already running", "Warning");                             Application.Current.Shutdown();                         }     } }   But what if a single user wants to create a shortcut of this application with another instance? For example "Test.exe" 2    This application should be loaded only once, when it was started like "Test.exe 2". I receive this number of instance in e.Args[0] and then I need to keep it for compare with another shortcuts of this application at this time.   So here's the question: how do I do it? How can I compare the already existing processes with a different instance's number. Any ideas appreciated!


Finding a closed form of following summation

Question: Can anyone help to find closed form of following summation: $\sum_{i=0}^{20}(-1)^i\times\binom{n}{i}\times \binom{n}{n-i}$ ? I think this problem have a raltion with $\sum_{i=0}^{20}(-1)^i\times\binom{n}{i}$ ,but i can't prove this claim.


Why I think tension should be twice the force in a tug of war

I'm going to provide my argument for why I think the tension in a rope should be twice the force exerted on either side of it.  First, let's consider a different example. Say, there is a person named A and a block in space. A pushes on the block with a force of 100 N. Then, the block will also push A with a force of 100 N by Newton's third law. Now, consider the case where instead of the block, there is a person B who is also pushing on A with a force of 100 N while A is pushing on him. A will experience a force of 100 N because he pushed on B, AND another 100 N because he is being pushed by B. Hence he will experience a force of 200 N. Similarly, B also experiences 200 N of force.  Now, back to the original problem. There are two people A and B in space with a taut rope (no tension currently) in between them. If only A is pulling and B is not, then I agree that the tension is equal to the force A exerts. This situation (in my opinion) becomes analogous to the above if B is also pulling. So, say both of them pull from either side with a force of 100 N. Then the rope at the end of B will pull B with a force of 100 N (this pull is caused by A). By Newton's third law, the rope will experience a pull of 100 N. But B is also pulling his end of the rope with 100 N. Therefore, the tension should be 200 N. Similarly, the end of the rope at A must pull A with 100 N of force (because B is pulling from the other side) and hence experience a force of 100 N itself by Newton's third law plus another 100 N because A is pulling on the rope.  Apparently, the answer is not this (according to my searching on the web). So, could anyone tell me why this reasoning is wrong? Thanks.  EDIT : So apparently people don't agree with my first example, leave alone the second. This is to the downvoters and the upvoters of the highest-rated answer: You all agree that if only A pushes B with a force of 100 N, then A and B both will get pushed by a force of 100 N in opposite directions, right? Then, in the case where B is also pushing with a force of 100 N, it doesn't make sense that the answer would be exactly the same. It doesn't seem right that no matter what B does, B and A will always experience the same force as they would have if B hadn't applied any force.  EDIT 2 : I'm going to provide here a link to a question that I posted:  According to the answer and the comments there, the reason as to why my first example is incorrect is different to the one provided here. So maybe you should all read the answer and the comments provided by the person and reconsider what you think.


How to query entities/nodes that does not have the field "field_parent" with EntityFieldQuery?

I'm using the Entity reference module and want to select all nodes that has no parent defined. I'm trying with:  $query = new EntityFieldQuery(); $children = $query     ->entityCondition('entity_type', 'node')     ->entityCondition('bundle', 'page')     ->propertyCondition('status', 1)     ->fieldCondition('field_parent', 'target_id', null, 'IS NULL')     ->execute();   .. but that does not give anything as the field "field_parent" is missing and not set to NULL. If I use IS NOT NULL I get all nodes that has a parent.  How can I select all nodes that has no parent (or is missing the field "field_parent")?    Thanks to Clive I managed to solve this in the following way:  $query = new EntityFieldQuery(); $children = $query     ->entityCondition('entity_type', 'node')     ->entityCondition('bundle', 'page')     ->propertyCondition('status', 1)     ->addTag('filter_no_parent')     ->execute();  /** * Implements hook_query_TAG_alter() */ function mymodule_query_filter_no_parent_alter(QueryAlterableInterface $query) {     $query->leftJoin('field_data_field_parent', 'p', 'node.nid = p.entity_id');     $query->isNull('p.field_parent_target_id'); }


Matrix given by $a_{ij} = 1/(i+j)$ is non-singular.

What is a smart way to see that $$A\stackrel{\cdot}{=} \begin{bmatrix} 1/2 & 1/3 & \cdots & 1/(n+1) \\ 1/3 & 1/4 & \cdots & 1/(n+2) \\ \vdots & \vdots & \ddots & \vdots \\ 1/(n+1) & 1/(n+2) & \cdots & 1/(2n) \end{bmatrix} $$is non-singular?  I computed $\det A$ for $n=1,2$ and $3$ but I failed to see the pattern.  The context is as follows: in $\Bbb R[x] $ with inner product given by $\langle p(x),q(x)\rangle \stackrel{\cdot}{=}\int_0^1p(x)q(x)\,{\rm d}x$, I want to see that if $U\stackrel{\cdot}{=} \{p(x) \in \Bbb R[x]\mid p(0)=0\}$, then $U^{\perp} =\{0\}$ (and hence $U^{\perp\perp}=\Bbb R[x]\neq U$). I took $f(x) \in U^\perp$ and computed  $\langle f(x),x^k\rangle$ for $k\geq 1$. I obtained a homogeneous system for the coefficients of $f(x)$ which has $A $ as the matrix associated. So if $A$ is non-singular I'm done.


Mass Updating to Move Points to New Location using ArcPy?

I have updated x,y for about 50,000 points.   How can I move the points to their new location at once (not one by one)?  I know there is a way of creating a new .shp from updated x,y but that won't work since the points are services and part of energized electrical system. I just need to move them to their new location.


Repost: Is it possible to wipe an entire iCloud Photo Library?

I was not happy with the answer to this question so I am posting it again with my own answer to


Move focus between buttons in confirm dialogs OS X Yosemite 10.10.3

When I try to export a file with the same name (in InDesign CS6) I get a popup asking if I want to replace the file.    How can I move focus between the Cancel and Replace buttons using only the keyboard?  I have found that if I press this sequence Tab > Tab > Space the replace button is pressed instead of cancel, but I get no visual indication this will happen. Is this a bug?


Explicit solutions to simple one-dimensional fluid flow problems?

In order to test and verify numerical simulation results, I'm looking for explicit (or approximate) solutions to simple fluid flow problems to recalculate (like e.g. the pressure development during 1-dimensional flow through a planar crack etc.).  However, I've found it quite hard to find solutions like that online, because the sources mostly either refer to really old (pre-pdf) publications or expensive textbooks.  Does anybody know a good online source, that might be able to help me? Any links or other suggestions?  Edit: I'm looking for solutions in a Eulerian frame of reference, since that would be the easiest to compare with simulation results where I would typically get the pressure as a function of time at distinct coordinates.


What did Dumbledore say his scar on his left knee was?

In Philosopher's Stone, we hear Dumbledore replying to McGonagall's query as to whether he could do something about the scar baby Harry has on his forehead:     “Even if I could, I wouldn’t. Scars can come in handy. I have one   myself above my left knee that is a perfect map of the London Underground." - Chapter 1, The Boy Who Lived.   Now, I have no idea what that last sentence means.  It could be because English is not my native tongue. Is it some kind of a joke, or does it really mean something?


Can I re enter the US on the VWP immediately after 90 days?

I have read conflicting information and can't seem to find the right number online to call.  I am a UK citizen visiting the US on an ESTA due to expire on 2nd April. I would like to stay until the 12th as I have a friend coming out to visit.  If I fly to the Bahamas, Abaco Islands for 4 nights say on the 31st March to return to Florida around the 2nd April will that reset my ESTA and allow me to stay essentially for another 90 days although I actually only want another 9?


I am using Ubuntu for a couple of years in single boot. But for reason now I need to go back to windows.  I have created a bootable usb with windows 10 ISO and reboot my device. After selecting USB from BIOS as booting device it doesn't boot into windows 10 and continues booting as Ubuntu. Now what should I do for installing Windows 10? I use HP Notebook - 15-ay102tu with Intel HD graphics 660 and 4GB DDR4 RAM. My partition format is MBR (msdos) and I've tried to boot from BIOS.