Issue changing image src with javascript

I am trying to change an Image SRC based on a variable in javascript.  I have the following modal:

         Image Name         <input type="text" name="image_name" id="image_name" class="form-control" />

         Image Description         <input type="text" name="image_description" id="image_description" class="form-control" />

         Path         <input type="text" name="path" id="path" class="form-control" />

     <input type="hidden" name="image_id" id="image_id" value="" />     <input type="submit" name="submit" class="btn btn-info" value="Edit" />     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
   I then try to change the initial dummy SRC in JS:  ... $.ajax({    url:"edit.php",    method:"post",    data:{image_id:image_id},    dataType:"json",    success:function(data)    {     $('#imageModal').modal('show');     $('#image_id').val(image_id);     $('#image_name').val(data.image_name);     $('#path').val(data.path);     $('#image_description').val(data.image_description);     document.getElementById("image_modal").src = val(data.path);    } });   I am checking if the src URL is correct by showing it in the modal (data.path) and it is correctly outputted.  But when trying to change src with document.getElementById("image_modal").src = val(data.path);no image is shown, like if the variable was not correctly interpreted.


How can I drag the first element of a list, to a location on my calendar using selenium ide?

My list is always different, I can't use an id because it will always change, I can't use the xpath of that element. I need to find a way to always take the first element and set it in the location I am telling him to.  I attached a print screen with what I want to do.


Recovering access to my unlinked Clash of Clans village

I seem to have lost access to my previous village since I recently switched to another phone. I didn't link it to an account I own but I do have all the local account / village information. Is there a way to recover my previous village?  My account details (if relevant) are below:  Username is sanjubaba, town hall 8th, clan name India, and xp level is 49.


Opening US Bank account for US citizen while abroad

I am an American citizen with a social security number, but I'm currently living abroad and am not planning on visiting any time soon, and I don't have any state-issued ID. Is there a bank that will allow me to open up an account online without proving a residential address in the US? I have relatives in the US that I can use their address to receive bank-related mail.  I know this is similar to , but not exactly the same.


I have to state a few long numbers in a document. These aren't meant to be regarded as regular numbers but instead as data. So I don't want to format them with \num{<...>} but with \texttt{<...>} so they appear in typewriter font like code. They can't be approximated. The last digit of each one of these numbers is as important as the first one.  Unfortunately, when these numbers appear at the end of a line, they sometimes exceed the lengths of the surrounding lines by quite a margin.  Example:  \documentclass{article}  \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sit amet ornare eros. Vivamus ac bibendum sapien. Morbi efficitur iaculis elit et pellentesque. Maecenas fermentum augue non tortor rutrum, vel malesuada nunc venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer fringilla. Suspendisse ac scelerisque tortor \texttt{1937294810383219482}. Pellentesque at iaculis risus. Curabitur porta ante non nunc eleifend, sit amet porta enim congue. Nullam semper fringilla suscipit. Nam ac elementum eros. Vivamus sed quam fringilla, tristique odio a, pretium lacus. \end{document}     Can I tell LaTeX to just end the line early and continue in the next one?  As it's not a URL, I probably shouldn't put the numbers in \url{<...>}. This as a solution that pops up quite often when googling the problem. I can't use  either because these numbers can't be hyphenated. About half of them are actually negative numbers and I don't want the readers to be confused about how many numbers I mentioned and which of the digit blocks belong to the same number.


How do I connect my MS Access database to the LAN?

I wrote a database program in MS Access a couple of years ago, and it is used to keep track of some personal stuffs. I now want to expand this personal project and allow several computers to have access to this database. Assuming that all I am interested in connecting to are my home computers, i.e. all connected to the same router (same LAN), what are the basic steps I need to do this?  Also, I am very new to database, but I happened to know how to write VBA on MS Access. Is there any tutorial that can help on what I do?  Thanks!


How to place three figures side by side, but two figures are seen as subfigures with one main caption, and third figure as standalone

I would like to place the figures as illustrated in the figure below.  The below code can place three figures side by side, but the third one on the right hand side becomes 1c (instead of 2). Any suggestions? Thank you in advance.  \begin{figure*}[tp!]   \centering   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 1a. \label{fig:1a} }     {\includegraphics[width=\textwidth]{figures/1a.pdf}}   \end{minipage}\quad   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 1b. \label{fig:1b}}     {\includegraphics[width=\textwidth]{figures/1b.pdf}}   \end{minipage}\quad   \begin{minipage}{.315\linewidth}     \centering     \subcaptionbox{\footnotesize 2. \label{fig:2}}     {\includegraphics[width=\textwidth]{figures/2.pdf}}   \end{minipage}   \caption{\footnotesize Main caption here. }   \label{fig:main} \end{figure*}


How do I open a new instance of an application by default in GNOME?

I have a terminal open and want to launch another one. I hit the Windows key, type 'terminal' and hit Enter...and I'm warped to my first terminal.  I can hit Control+Enter to launch a new terminal. This is unnatural to me. Can I change the key bindings so that Enter will launch a new instance and Control+Enter will warp to the existing one?  Edit: I'm interested in all applications, not just a terminal.


I need a backup software for Ubuntu 14.04 that has a GUI that can backup my entire system to an external hard drive or network drive. Any recommendations?


How to concatenate two arrays into 1 single array using java?

concatenate two arrays into single dimensional array?  For example:-  Take two arrays  Array1[10] = {3,3,3}  Array2[10] ={3,2,1}   output  Array3[] = {33,32,31}   How will I get this output ?


How to convert the Date object into "dd/MM/yyyy HH:mm:ss" format in Java

I have the code below  DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); Date curDate = new Date();     What is happening ::  For the curDate i get as: Tue Nov 11 11:36:05 IST 2014    What i want::  I want to convert into format: dd/MM/yyyy HH:mm:ss     Question: How can I achieve this


Is there a way to specify the center of rotation in Sketch? Normally it simply rotates the object around its center. If there is no native way maybe it's possible to write a plugin!?


How can an electromagnetic wave propagate on itself even if there is no source that has created it?


What is the most managable way to install a program from source in Debian?

Let's say that I've found a program that I want to install on my machine. It is only available as a source tarball that can be built with the usual ./configure; make; make install.  While I could do make install in these instances, I'm likely not going to know where xyz file/command come from in a few years, and whether it is important. And who knows what will happen if I try to build a newer version of the program.  What's the most common, manageable way of handling scenarios like this?


How to Change Os from Nokia Lumia 710 with WP 7.5 to Any Os Android

Need Help to Change My Os from Windows Phone in nokia 710 to Any Android Os


How to get a list of current open windows/process with Java?

Does any one know how do I get the current open windows or process of a local machine using Java?    What I'm trying to do is: list the current open task, windows or process open, like in  Windows Taskmanager, but using a multi-platform approach - using only Java if it's possible.


I'm a beginner with blender so this is probably a very basic question.  I have this basic model below. I've ended up with a lot of unwanted geometry that I want to simplify. I wanted to start by merging the two selected faces below but no matter what I try to delete or merge it just destroys the geometry.  How can I achieve what I want to do (which is combining all of the unwanted geometry, either starting with this merge or some other way?)


Let $(x_n)$ be a sequence s.t l. $|x_m - x_n|\le\frac1{1+|m-n|}$ for all $m$ and $n$. Find (with proof) $\lim x_n$.

Suppose $(x_n)$ is a sequence that satisfies $$ |x_m - x_n| \leq \dfrac{1}{1+|m-n|} $$ for all $m$ and $n$. Find (with proof) $\lim x_n$ ATTEMPT: If we put $m = n+1$, then $$ |x_{n+1} - x_n | \leq \dfrac{1}{1+n} $$ From this condition we see that $\lim x_n = L$ exists. On the other Hand, if we choose $n=m-1$, we obtain $$ |x_{m} - x_{m-1} | \leq \dfrac{1}{2} $$ And, as $m$ can by any number, then we may not conclude that the sequence converges as it may oscillate. Can I get some hints on how to solve this? Is my reasoning reasonable? or am I overthinking and it is a simple exercise.


I have $f(x) = x^3 - x + 1$ and $g(x) = x^3 - x - 1$, which are irreducible in $\mathbb Z_{3}[x]$, and the finite fields $\mathbb{Z}_{3}[x] /(f(x)) $ and $ \mathbb{Z}_{3}[x] /(g(x))$. I'm trying to prove that there is a root for $f(x)$ in $\mathbb{Z}_{3}[x] /(g(x))$, but I don't seem to find it.  My strategy has been trying to find a root of the form $a + b\beta + c\beta^{2}$, with $a,b,c \in \{0,1,2\}$ knowing that $\beta$ is the root of $g(x)$ in $\mathbb{Z}_{3}[x] /(g(x))$, but I have failed so far. Any suggestions?


Missing objects from old Blender in 2.8 (hidden in 2.79b and lost in 2.8)

I am missing a bunch of objects when opening some old blender files (it has nothing to do with the collection visibility like in this post: )   I just installed the 2.79b on another system to doublecheck the problem... and I can access all files in the old blender version - but I realized that the problematic objects were hidden in the old file.... So I made them visible and - guess what - they showed up in 2.8!   Funny thing is that 2.8 shows these objects as "visible" but greyed out...   I can share the .blend file but am not sure how this is normally done within stackexchange...    Appending the missing objects to the current file results in the same problem - the objects show up as "visible" but are greyed out - and cannot be found somewhere in the viewport...  This is rather frustrating because I have lots of old blender files where the visibility of objects is a thing of organizing my stuff ( I use blender only for modeling 3d printed stuff)... And blender 2.79b and 2.8 cannot co-exist as far as I know...    Any ideas?


When viewing a node, I'd like the Title to display below one of the other fields in the Content Type, but it's not available to arrange in the Manage Display tab.  With all of the flexibility and power that Drupal gives me, do I really need to create a custom template for each of my content types? :(  Any help is appreciated!


Configuring dpkg stops processing when calling an HTTP request to Adobe Flash Player

I recently moved to Linux, and I am in love with the experience. Opinions apart, I am having problems when running sudo dpkg --configure -a  My computer stops processing the command here:  You may know Adobe Flash Player is no longer supported, and I believe that could be why the command is unable to load pepperflashplugin-nonfree. I have tried fixing the problem by checking older posts here, but none of them was able to fix this problem.


How to access ajax response data as html with javascript or jquery?

Imagine, there are two files   test.php index.php   In test.php there are only a html button with id click.  In index.php there are also only a html button with id send.  If I send an ajax request to test.php file from index.php then the button with id click from test.php should be inserted within a div in index.php. Now I want this button to hide p element when it is clicked within index.php.  Note: onclick attribute should not come with #click button.  How to do that? I am currently using android phone to ask this question. So I am not able to write the question with examples.


\ganttvrule from pgfgantt not working in Overleaf?

I am trying to use the \ganttvrule macro from pgfgantt as suggested by Torbjørn T. in response to , but with no success. This is his MWE:   \documentclass[border=5mm]{standalone} \usepackage{pgfgantt} \begin{document} \begin{ganttchart}[   vgrid,   hgrid,   vrule/.style={very thick, blue},   vrule label font=\bfseries ]{1}{8} \gantttitle{2018}{8} \\ \ganttbar{}{1}{2} \\ \ganttbar{}{4}{8}  \ganttvrule{day x}{2}  \ganttvrule[   vrule/.append style={red, thin},   vrule offset=.2,   vrule label node/.append style={anchor=north west}   ]{day z}{6} \end{ganttchart}  \end{document}   This should produce the following:   But I get:    I have also tried to incorporate \ganttvrule in my own code, but with similar results.  I am using Overleaf which complains that this is an "undefined control sequence". (Overleaf also complains about the key \bfseries.)  If there are no coding errors the only thing that comes to mind is that Overleaf is not using the latest version of pgfgantt. I have not tried the code in any other editor.


Overlapping docks after installing dash-to-dock in Ubuntu 20.04

I have recently upgraded Ubuntu from 19.10 to 20.04. Since updating dash to dock behaves abnormally. It works normal initially, later when i lock the screen then the problem starts.    When I logout and log in again it works fine until I lock the screen.


Is there any method to know the real age of the universe?

Well, I was wondering about the real age of our universe, I found that it's estimated to be $13.8\times 10^9$ years.  Is it an approximation, or laws behind this age?


How do I Dual boot Mac OS(X) and Kubuntu?

I have a mac and I need to dual boot Kubuntu 16.10 and Mac OSX.  How can I do this? Do I have to delete all my data from OSX?


When once more alone, I reviewed the information I had got; looked   into my heart, examined its thoughts and feelings, and endeavoured to   bring back with a strict hand such as had been straying through   imagination’s boundless and trackless waste, into the safe fold of   common sense. (Jane Eyre)   Is ‘such’ a pronoun, indicating ‘its thoughts and feelings’? Is ‘as’ a relative modifying ‘such’?


Particular nontrivial group has a nonidentity automorphism

If $G$ is a nontrivial group that is not cyclic of order 2, then $G$ has a nonidentity automorphism.  This is the exercise of hungerford algebra in the chapter $IV$ MODULES. Can you help me please?


How do I mount a hibernated NTFS partition?

I have a Windows HDD attached to an external docking bay on my Ubuntu System, but the HDD brings up an error message:     Error mounting: mount exited with exit code 14: Windows is hibernated, refused to mount.   Failed to mount '/dev/sda5': Operation not permitted   The NTFS partition is hibernated. Please resume and shutdown Windows   properly, or mount the volume read-only with the 'ro' mount option, or   mount the volume read-write with the 'remove_hiberfile' mount option.   For example type on the command line:           mount -t ntfs-3g -o remove_hiberfile /dev/sda5 /media/92441EC8441EAF4B      I am at a loss for exactly how to remove the hiberfile, or even mount it as read-only or read-write. I tried directly copy and pasting that exact command into my terminal, but it said:  mount:only root can do that   I do not know what to do at this point. I do need to get the information off of this drive, but I do not have a computer to put it in. Does anyone know what I should do from here?


Create terrazzo material/pattern with the standard textures

is it possible to create this kind of material with the standard textures? The Voronoi texture (set to cells) is coming close but I don’t know if it is possible to a) set the single cells apart from each other and b) to give them seperate colors.


There is a usability problem when you visit a site on which ads are being served.  The top banner ad doesn't render immediately, and then when it does, it causes the rest of the page below it to jump down by just about the amount that e.g. attempting to click on the downvote arrow ends up clicking on the upvote arrow.  This is easy to fix if you notice, but if you were planning to click somewhere else, you will miss by rather a large distance.  This is annoying and hardly serves any useful purpose, and in the worst case could lead to you clicking on something you really didn't want to click.  I don't know enough about the underlying technology to propose a fix, but a thing which used to work already in the 1990s was to reserve space for an image if you could tell in advance how large it was going to be.  Banner ads typically have this property, and so I'm imagining this should be possible.  Examining the page source reveals an iframe element with width="0" and height="0" attributes which seems like precisely the wrong thing here, but like I said, I probably don't understand this well enough.  Frustratingly, the image block my browser offers doesn't help at all; the jump happens even if the image is not displayed (at least in Chrome on Mac).  Some sites which have this annoying behavior are  and  but it depends on your privileges on these sites and ads are not served 100% of the time even then.  The particular use case for me is to flag obvious spam quickly; I basically never do anything else on the Drupal site, for example, and so probably will never earn enough rep there to not see the ads.  When spam is dead obvious, you really want to be able to just flag it and move on.


Prove that you can choose  $ 2 ^ {k-1} $ numbers  from $2^k -1 $ integers so that the sum of them is divisible by $2^{k-1}$  . The work I have done : I wanted to use strong induction , I presumed the theorem is correct for all numbers less than  $2^k -1 $ in the form of  $2^n -1 $ from there I concluded  you can choose  $2^{k-1} $ numbers from our  $2^k -1 $ numbers and you can write them in the form of $ 2 ^ {k-1} . m $ , the remaining numbers will be $ 2 ^ {k} $- $ 2 ^ {k-1} : { 2 ^ {k-1}  }$ we can write that in the form of $ 2 ^ {k-1} $ too , but at this point I realized I was way off the solution and appreciate any other ideas (even not involving induction)


Expression for when something "hits you", but in a positive way?

I'm trying to express being shocked in a good way, but all I can find are negative phrases such as:   "It hit me like a ton of bricks." "It hit me like a bucket of ice cold water."   I would like to know if there are some ways to say it in a positive way, as in being shocked in a good way. Thank you so much!  Edit: Pardon me, I should've added context before! I'm translating a sentence in Spanish, in which someone is saying they were shocked (they describe it as being hit suddenly) and very touched (therefore, it's in a positive light).   The answers supplied by Dan and J O S H are exactly what I needed, both "It took my breath away" and "It blew me away" work perfectly.  I'd still like to thank you kindly, all of you! I appreciate your help immensely, having found this forum feels like a blessing. However, I'm not certain as to how to proceed now, do I delete the question? Once more, thank you for all your help!


I've searched and tried many other answers to problems like mine, but I still don't get it, I don't know what I'm missing here. This program should simulate an auction, it's a game which the smaller "bid" wins. I've come up with this code, but when I use the strcpy and the char variable type, this segmentation error comes up.  #include <stdio.h> #include <stdlib.h> #include <string.h>  int func02(int venc, int nj, int max, int mod, float med, char *nome); int lanc;  int main (void) {      lanc = func02(0, 36, 15, 0, 0, "nome");     printf("%d", lanc);     return EXIT_SUCCESS; }  int func02(int venc, int nj, int max, int mod, float med, char *nome) {      int lance;      if (venc == 0) {         strcpy(nome, "ceadf");         lance = 4;     }     else {         if ((med <= mod) && (venc >= mod)) {             lance = mod++;         }         else {             lance = venc++;         }     }     return(lance); }


How to prove that $\langle Av,w\rangle=\langle v,A^Tw\rangle$?

How to prove:  $$\langle Av,w\rangle=\langle v,A^Tw\rangle$$ $\langle,\rangle$ represents inner-product, $v,w$ denote vectors and $A$ is a matrix.


In a Skew Cylinder does pressure at the bottom face depend on depth or mass of Fluid

I recently learnt that pressure in a Fluid depends only on depth and not mass of a Fluid (in any orientation). In my textbook the pressure has been derived by considering an infinitesimally small cylinder with a small pressure pressure difference between the two faces. Equilibrium condition was then applied to the cylinder (Weight+Force due to liquid above=Force due to liquid below). This gives pressure as a function of depth.  Examples are also given in my book which show different orientations of the fluid in which  pressure is calculated at a point at the same depth from the free surface.  The example which confuses me is the Fluid in a skew cylinder. The free surface of the Fluid is at the same height as in the other examples and the pressure is calculated (At the bottom face) by using the vertical height from the bottom surface. But for the Fluid to be at the same vertical height some more Fluid should be added to the pipe (as volume changes) right ? (As compared to a right vertical cylinder having the same height).   If some more fluid is added the  the mass of the Fluid above the bottom face will change and so should the pressure.  So does pressure not depend on the mass and only depends on height ?


How are harmless but potentially painful or undesirable scenes shot in medical TV shows?

I am using House MD as an example, but this is not specific to that show.  There are scenes where patients get injected something, or they have blood taken, or they get a small cut when operated. Another example might be when they intubate a patient.  I don't know if any of this might be potentially harmful, but I think the cost of actually doing it might be lower than faking it with CGI.  Note that, as I'm saying in the title, I'm talking about harmless scenes, not scenes impossible to film live, like surgery.


How to set sudo password other than the user's own password?

For example, suppose I have a user sysadm with password abcdefg. But when it needs to execute sudo command, the password is hijklmn.  Is this doable?


Figure labels in text changing as figure caption changes

I have a question regarding referencing figures in the text. Say I have a figure in text with the caption Figure 1: Blah Blah. Then in my main text i refer to this figure saying something like "As you can see from Figure 1 etc...".   Then I realise I've forgotten to add a figure prior to this one and I insert a new figure earlier in the section which becomes figure 1, thus causing the old figure 1 to become figure 2. I'm assuming my in text reference earlier of "As you can see from figure 1 etc..." will not have changed to "As you can see from figure 2 etc...".  Am i right in assuming this?   Is there a way of working around this? I have a lot of figures in my document in a number of sections and at present my in text references just say "Figure XXXXXXXX" serving as a reminder to go fill them in at the end. However it would be good if I could do this sooner. Is there a way to ensure these change or do I just have to do it manually if I add figures in earlier sections of the text?   Hope the question is clear enough, please feel free to ask for more information if not. Thank you


Ubuntu 12.04 (Wubi) not starting - root.disk corrupted

I have Ubuntu 12.04 installed through Wubi on my laptop. For some reason when i click on Ubuntu on start up (when you have to either select windows or Ubuntu) I get the following screen, the grub cursor keeps flashing.  Gnu grub version 1.99-21 Ubuntu 3.4   Minimal bash-like line editing is supported. For the first word, tab lists possible command completions. Anywhere else tab lists possible device or file completions.   grub>   Could you tell me what I can do to fix this problem and to start Ubuntu normally?


How to prove $\int_{-\infty}^{+\infty}|f(x+t) - f(x)|dx \to 0$ as $t\to 0$

Let $f\in L^1(-\infty, +\infty)$ and $g(t) = \int_{-\infty}^{+\infty}|f(x+t) - f(x)|dx$. How to show that $\lim_{t\to0}g(t) = 0$? Originally I thought that we need to use . However, it is not necessary that such $h(x)$ exists that $|f(x + t_n)| < h(x)$.  I have this question from reading the proof of approximating $f$ with a continuous function. So we cannot use this fact! Thank you.


Wifi disconnects after approximately five minutes

I use an HP Pavillion running Ubuntu 14.04 LTS and up until now I did not have any problems with my computer's wifi connection. After about five minutes after booting, the Internet will slow down and after a few moments stop working completely, even though the wifi signal in the top right corner still shows that the computer is connected. Why does that happen?  Also, if I try to disconnect and reconnect, it will fail to connect and indefinitely spam me with wifi password requests that seemingly do not change anything.  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723] Subsystem: Hewlett-Packard Company Device [103c:2231] Kernel driver in use: rtl8723be


If two finite groups G and H have same element structure i.e. they both have same number of elements of every particular order,then will they be isomorphic to each other??If not,give some counter example. And what is the intuition behind having same element structure..?


What could cause "CPU noise" when Intel SpeedStep is enabled in the BIOS power settings?

Whenever I enable the "Intel Speedstep technology" in the BIOS power configuration, I can hear noise when operating the laptop. The noise is sometimes a clicking noise in idle-mode or a buzzing noise (similar to the noise when reading from a spinning disk) when doing low work tasks (scrolling, moving the cursor, ...). I don't know if the noise is present when doing high work tasks, as that turns on the CPU fan, which is otherwise off.  When turning off the Speedstep technology, the noise is far less pronounced, but still barely noticeable in a silent room.  I could find another report that links high pitched noise with intel CPU power configuration:  Though, that report does not include any causes for the noise and presents only a workaround.


How should self-deletes be evaluated in the question ban algorithm?

A self-deleted post is often not a low-quality post and may simply be a mistake noticed by the user, unlike moderator- or community-deleted posts which may indicate serious problems that the user may not recognize or may have intentionally posted.  Should they carry less weight in the question ban algorithm?


Can there be such a thing as infinity if the universe isn't growing constantly? Or is it a finite universe? I tried to ask myself this but is it really possible to understand?


Find all real solutions to the following equation.

Find all real solutions of:  $1$ + $x$ + $\dfrac{x^2}{2!}$ + $\dfrac{x^3}{3!}$ +...+ $\dfrac{x^{2n}}{(2n)!}$ = $0$   This is math club question I haven't made much headway on.


I have read this question:       Entangled states can produce nonclassical correlations, but this is not necessarily the case.   So far so good.     For instance, for a two-particle system of spinful particles with the constraint that the total spin is zero, you always have the correlation that if you measure the spin of one particle to be up (in one direction), the spin of the other particle will be down (in that direction). This is true regardless of whether the system is in an entangled state."    This is exactly what I am asking. What more does in this case entanglement add? Will entanglement change the measurement other then what correlation of the total spin=0 gives?  These do not answer my question.   I have read this question:      where Luboš Motl says in a comment:     Entanglement is nothing else than correlation between two objects ("subsystems") and this correlation is always a consequence of their mutual contact or common origin in the past.    These answers state that QM entangelement is always based on a spatial mutual contact or common origin in the past.       If we both choose to open our envelopes from the bottom, we always (or nearly always) find papers of identical colors.   Now try telling a story like yours --- where the envelopes carry true information about what's "really" in the other envelope --- that fits these facts. Good luck.   Now this summarizes my question basically. What is the reasoning behind this difference between the two statements? One says QM entanglement is just correlation. The other one says it is not, because QM entanglement gives you examples in the envelopes that classical correlation cannot explain. Which one is right?  Question:   Will an entangled system give different measurement then just correlation?


Bash: count how many times a word is contained in all the files of a given folder

I'm just trying to count the occurrences of a word without writing an iteration file by file. I don't mind which kind of file it is. The closest I got is: COUNT=$(grep -r -n -i "theWordImSearchingFor" .) echo $COUNT  I thought about splitting that by spaces, but the problem is the output does not contain just the filename and the line but also the content (and that may have tons of spaces). w.g. I got: ./doc1.txt:29: This is the content containing theWordImSearchingFor but also other stuff   ./doc1.txt:43: This is another line containing theWordImSearchingFor  ./dir123/doc2.txt:339: .This is another...file...theWordImSearchingFor....  Any idea on how to keep it simple? TIA


I saw that this was asked before, but that was  a number of years ago on earlier versions of blender... I'm hoping there might be an easier way to do this by now? Is there a way to set your camera to 2-point-perspective view? As a new blender user who is looking to use blender for Arch Viz, I find it staggering that this feature doesn't exist? You can set a camera to 2 point perspective in Sketch-up, Rhino, 3ds max (using camera correction)... but in blender I can't see anything? The only way I can see to do it is to set a camera to be straight and then to play with the Y shift.. but this doesn't work in all scenarios? What would happen, for example, if I want a low angle view but don't want the camera distortion from perspective? Any advice or workarounds would be much appreciated. Thanks


Passing a button with id with jQuery .html() function

I'm trying to replace a divs content with jQuery's .html() function and within that new content i want to create a button, containing an ID that i can access from another function.   $('#content').html("
"        + " <input class='btn btn-primary' value='Button' id='button'> </input>"        +   "
");   After this i got another function that tries to access the button:  $('#button').click(function(e){     //... do something });   I inspected the generated button in Chrome and it tells me that it has the right ID but somehow nothing happens when i try to trigger it?   Any solutions on that?  Thanks in advance.


Can I switch the User-Agent header for only a single web site?

I have to use a particular web site for work, but this web site checks to see whether I'm using Internet Explorer and, if not, won't allow me to log in.  I can switch my User-Agent header using the  Firefox plugin and the web site works fine, but I really don't want to switch the header every time I go to the site and also don't want my User-Agent header to perpetually say I'm using IE.  I'm on Linux, so actually switching to IE unfortunately isn't an option.  Is there any way to define a particular User-Agent for a particular web site in either Firefox or Chrome?


I added a new SharePoint app project into an existing web project solution. When I tried to deploy it am getting an error:  Error occurred in deployment step 'Install app for SharePoint':  Failed to install app for SharePoint.  There was a problem with activating the app web definition.   But when I removed the feature1.feature file, it is geeting deployed successfully.   What is the reason?  Is there any better solution?  What is this feature1.feature file for?


Trouble importing my model materials to unity

I need some help with my models and why i can't see the materials in unity once i import them.  I believe i know the reason but i refuse to accept restarting my whole texture/material process.  Okay so i'm using cycles render, i make the materials for my model and assign their locations then it's all done.   I import and my materials are blank and not the RGB input materials that i made.  I just want my models simple colors and not image textures. I believe im missing something simple and need some help.


Not able to set Firebase Image Uri in Image View

I am trying to set Image from FIrebase to Imageview using Glide but it is showing Error  Task<Uri> riversRef = storageReference.child(user.getUid() + "/profile.jpg").getDownloadUrl()                     .addOnSuccessListener(new OnSuccessListener<Uri>() {                         @Override                         public void onSuccess(Uri uri) {                             if (uri == null) {                                 Toast.makeText(getApplicationContext(), "URI IS NULL", Toast.LENGTH_LONG).show();                             }                             Glide.with(getContext()).load(uri).centerCrop().into(imageView);                         }                     });   And the error is:     Process: com.root.firebase, PID: 3875                                                                    java.lang.NullPointerException: Attempt to invoke virtual method   'boolean android.app.Activity.isDestroyed()' on a null object   reference                                                                        at   com.bumptech.glide.manager.RequestManagerRetriever.assertNotDestroyed(RequestManagerRetriever.java:133)                                                                        at   com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:125)                                                                        at com.bumptech.glide.Glide.with(Glide.java:641)                                                                        at   com.root.firebase.UploadActivity$2.onSuccess(UploadActivity.java:72)                                                                        at   com.root.firebase.UploadActivity$2.onSuccess(UploadActivity.java:65)                                                                        at com.google.android.gms.tasks.zzj.run(Unknown Source)                                                                        at android.os.Handler.handleCallback(Handler.java:751)                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)                                                                        at android.os.Looper.loop(Looper.java:154)                                                                        at android.app.ActivityThread.main(ActivityThread.java:6077)                                                                        at java.lang.reflect.Method.invoke(Native Method)                                                                        at   com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)


Latest update of Oberdiek package: \declaretheoremstyle not working anymore

Just updated to the 20 December build of the Oberdiek package, on my TeXLive installation. Files that compiled without problems are now throwing the following error:   ./Preamble.tex:78: Undefined control sequence. \kv@processor@default ...lt {#1}{\etex@unexpanded                                                    {#2}}}\KVS@temp    which appears when I use \declaretheoremstyle of the thmtools package. The packages kvdefinekeys and kvsetkeys are installed and working well.  Does anybody know an explanation and a workaround?  Here is a compilable example  \documentclass{amsart} \usepackage{thmtools}  \declaretheoremstyle{mythmstyle} \begin{document} \end{document}


Can Warding Wind block the effect of a Green Dragon's Poison Breath?

Potential combat with a Green Dragon. The most damaging item in a Green Dragon's arsenal is its Poison Breath. The text of poison breath is some variant of this for Green Dragons:     The dragon exhales poisonous gas in a xxx-foot cone. Each creature in that area must make a DC YY Constitution saving throw, taking ZZ (AAd6) poison damage on a failed save, or half as much damage on a successful one.   The text of Warding Wind states that one of its effects is:     It hedges out vapor, gas, and fog that can be dispersed by strong wind.   Can this effect stop the Poison Breath from getting into the creatures within the Warding Wind Spell?


Aptana and Titanium menu bar problem with Ubuntu 13.10

After upgrading to Ubuntu 13.10 I have problems with Aptana and Titanium IDE. The menu bar doesn't work normally. Only one menu works, in Aptana the "Window" menu, in Titanium the "Run" menu. Other menus look empty.  Aptana:    Titanium:    Also HUD doesn't search in those menus.   What is the problem and how can I fix it?


Music/podcast player with speed control?

I am looking for a MP3/Ogg player that has the ability to playback a file at a higher speed, preferably without affecting the pitch. What players allow that? The only one I know right now is alsaplayer, but it can't do it without affecting the pitch and also has currently a bug that causes it to use 100% of the CPU at all times, so that renders it kind of unusable. What alternatives are out there?


Could someone please demystify interfaces for me or point me to some good examples? I keep seeing interfaces popup here and there, but I haven't ever really been exposed to good explanations of interfaces or when to use them.  I am talking about interfaces in a context of interfaces vs. abstract classes.


c# Invalid token 'while' in class, struct, or interface member declaration (while loop not working)

I'm new to c# but quite familiar with c, this error however doesn't make much sense to me, as I have specifically followed the required syntax shown on   using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;  namespace WindowsFormsApplication1 { public partial class Form1 : Form {     int years = 1;     while (years <=10) {      public Form1()     {         InitializeComponent();     }      private void numericUpDown1_ValueChanged(object sender, EventArgs e)     {         int value = Convert.ToInt32(bushels1.Text);         numericUpDown1.Maximum = value;     }      private void bushels1_Click(object sender, EventArgs e)     {      }      private void nextYear_Click(object sender, EventArgs e)     {      }     }    } }


Null URI on API level >=23 camera intent

This might be a possible duplicate but i can't seem to pinpoint the exact solution. Camera works fine and returns the image uri on devices below api 23. However app crushes right after capturing image on devices apove api 23 with log error  java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { act=inline-data (has extras) }} to activity {ana.foodi/ana.foodi.MainActivity}: java.lang.NullPointerException: uri                                                          at android.app.ActivityThread.deliverResults(ActivityThread.java:3940)                                                          at android.app.ActivityThread.handleSendResult(ActivityThread.java:3983)                                                          at android.app.ActivityThread.-wrap16(ActivityThread.java)                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)                                                          at android.os.Handler.dispatchMessage(Handler.java:111)                                                          at android.os.Looper.loop(Looper.java:207)                                                          at android.app.ActivityThread.main(ActivityThread.java:5765)                                                          at java.lang.reflect.Method.invoke(Native Method)                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)                                                       Caused by: java.lang.NullPointerException: uri                                                          at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:60)                                                          at android.content.ContentResolver.query(ContentResolver.java:481)                                                          at android.content.ContentResolver.query(ContentResolver.java:441)                                                          at ana.foodi.MainActivity.onActivityResult(MainActivity.java:672)   After checking with breakpoints,realised Uri (selectedImage) is null below:   @Override public void onActivityResult(int requestCode, int resultCode, Intent data) {     super.onActivityResult(requestCode, resultCode, data);     final String filePath;     if(resultCode == Activity.RESULT_OK && REQUEST_POST_PHOTO==999){           if(requestCode == 2 ) {             requestRuntimePermission();             Uri selectedImage = data.getData();             String[] filePaths = {MediaStore.Images.Media.DATA};             Cursor c = this.getContentResolver().query(selectedImage, filePaths, null, null, null);             c.moveToFirst();             int columnIndex = c.getColumnIndex(filePaths[0]);             filePath = c.getString(columnIndex);             c.close();   I've tried requesting runtime permission with this   public void requestRuntimePermission() {     if (Build.VERSION.SDK_INT >= 23) {         if (ContextCompat.checkSelfPermission(context,android.Manifest.permission.WRITE_EXTERNAL_STORAGE)                 != PackageManager.PERMISSION_GRANTED) {             ActivityCompat.requestPermissions(this,                     new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);         }     } }   but error persist.  startActivityForResult call  REQUEST_POST_PHOTO=999;                 Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);                 startActivityForResult(cameraIntent, REQUEST_CODE_POST);


What happens when I can prepare more spells than I have slots to cast them with?

I am a level 4 cleric with a 20 (+5) wisdom in D&D 5e. This means I have a total of 9 spells I can cast in 1 day. I only have 4 level 1 spell slots and 3 level 2. So if I were to use all those spell slots in one day what would happen to the extra 2 spells I can cast? Can I not use all 9 spells I have available for me to cast?


How to calculate limit without L'Hopital

How can I calculate limit without using L'Hopital rule?  $\displaystyle\lim_{x\to 0 }\frac{e^{\arctan(x)}-e^{\arcsin(x)}}{1-\cos^3(x)}$.


Do I Always need to add Sugar when bottling?

I'm doing my second brew after great success with the well documented .   This time is the exact opposite, random recipe and random grains. I went to a brew shop and had the guy make me a 1 gallon Irish Stout kit for St. Paddy's day. I found a  and made it a little less than 2 weeks ago. It's time to bottle but it doesn't say anything about adding priming sugars. Is it standard that these always need to be added? Or do the chocolate roasted malts have the sugars already. Also how will I know when it's ready after bottling?


How can I use a pre-existing AppleID with Mac App Store without a billing address?

I dont have a credit card, and so I am unable to complete the Apple billing address, which means I can not download anything from the App Store. It there a solution for this?


Can't update Xcode even with 19gb free space

I have an available update for Xcode that is in the 7gb range, and when I try to update I get an alert saying there isn't enough disk space - I checked my space and I have 19gb available (of 120gb).  Is this correct, or some kind of error? It seems like I have more than enough space.  Update: I deleted some earlier device support files and I now have 24gb free space and I still don't have enough space for the update. I feel like something's amiss here, as the update is only 7gb - I'm not sure if I should keep deleting things to free up space - will it even make a difference?  Update 2: I restarted my computer with 24gb free space and when I clicked Update, the update seemed to go forth and download - however when the download completed, the button switched back to "Update". When I clicked on it again, I got the "not enough space" alert again - even though now I have 26.5gb free space. I restarted again and keep getting the same message. Truly don't know what's going on here! Here's a screenshot, as requested, of my storage window:    Update 3:  Screenshot after running df -h in terminal as per request:


Divisibility of polynomial; basic number theory

Show that $42|(n^7 - n)$ for all integers $n$  The only hint I've been given uses Fermat's Little Theorem but I don't know how to use that in this case since $42$ is not a prime.


Is the orbit in Schwarzshild metric a path with maximal proper time?

In curved spacetime particles follow timelike geodesics, which should have maximal proper time (at least locally). I thought this path usually corresponds to a global maximum, and there are only strange exceptions. Propably I was wrong, or I really don't understand something, because it doesn't seem to be true for the case of orbitals in Schwarzschild geometry.  The Schwarzschild metric is (with +--- signature)  $$ g_{\mu\nu} = \textrm{diag}\left(1-\frac{2GM}{r},-\left(1-\frac{2GM}{r}\right)^{-1},-r^2,-r^2\sin^2\theta\right) $$  An observer with fixed $r,\theta,\phi$ coordinates will age according to $d\tau_1 = \sqrt{g_{tt}}dt$. An observer, which orbits the center at the same constant radius with $\theta=\pi/2$ will age according to $d\tau_2 = \sqrt{g_{tt}-\omega^2r^2\sin^2\theta}dt$, so he ages slower during the same amount of coordinate time $dt$. If the two observers start from the same point, they will meet again after a full rotation of the orbiting observer, and the orbiting observer will age less. What I don't understand is that the orbit is the geodesic (if the angular velocity is set properly), so why didn't he age more? He should have been on the path with maximal proper time.


MySQL query not working through PHP with non English character

I have a problem with a MySQL query in PHP when I'm having non English language, it is always returning 0 rows. The query is pretty straight forward and here is the relevant snippet.  // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) {     die("Connection failed: " . $conn->connect_error); }  $sql = "SELECT ID, post_content FROM udhay.posts WHERE post_content = 'இ'"; $query = $conn->query($sql);  if ($query->num_rows > 0) {     // output data of each row     while ($row = $query->fetch_assoc()) {         print_R($row);die;     } } else {     echo "0 results \n\n"; }   The only odd thing you could find here is the WHERE condition is having a Tamil character.   I checked even the MySQL error log and found that the right query got executed and tried that query once again directly in the MySQL and it is working perfectly. Also I tried with some English letters and words and it is completely working fine without any issues.  Version Info:  MySQL:      mysql  Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using  EditLine wrapper PHP:      PHP 5.6.28 (cli) (built: Dec 22 2016 01:56:27)      Copyright (c) 1997-2016 The PHP Group     Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies   Any clue on this or solution would really be great.


Find the coefficient of ${x^9}$ in the expansion of $ (1 + x)( 1 + x^2)( 1 + x^3)..(1 + x^{100})$

Find the coefficient of ${x^9}$ in the expansion of $\left( {1 + x} \right)\left( {1 + {x^2}} \right)\left( {1 + {x^3}} \right)..\left( {1 + {x^{100}}} \right)$. The official answer is 8. How do I find the general term, Dividing the above equation by $(1-x)$ is not generating the required result.


When I'm writing a sentence like this:  Favorite movie: Batman  Do I put Batman in italics or not?


How do I change the color for directories with ls in the console?

On my console the color for directories is such a blue, that it is hard to read on a dark background.  How can I change the color definitions for ls?


I have a problem with nodes in scheme. I need type a node where will be text "Banka melovskych filtru". Each word on a special line with center align.


What is the name for items separated by commas without conjunctive?

What is the name for constructions like the following, where the final conjunctive is omitted?  He came, he saw, he conquered. The sirens were constant, loud, annoying.  I'm sure I heard this stylistic flourish given a proper name, but I can't remember where. I use this fairly often for effect and I'm sure it's grammatically correct.  is similar, but is to do with the appropriateness, rather than the name, of this contruction.  asks whether it is acceptable, but not its name.


How to get rid of notch at pgfplots axes intersection?

The 2nd page of the .pdf file generated by the following .tex file:  \documentclass{beamer} \usepackage{pgfplots} \begin{document} \begin{frame}   \framezoom<1><2>(0cm,5.5cm)(0.5cm,0.5cm)   \begin{tikzpicture}     \begin{axis}[%       axis x line=bottom,       axis y line=left,       ymin=0,       xtick=\empty,       ytick=\empty,       ]       \addplot {1} ;     \end{axis}   \end{tikzpicture} \end{frame} \end{document}   points out a notch at axes intersection:    How could I get rid of this notch?  Note that this question is similar to:    but is concerning more specifically pgfplots than tikz,  but is concerning axes instead of plot lines.


Trying to find the name of a sci fi anthology book, or just the titles of one or more stories

Okay, so here it goes. Over a decade ago I read a sci fi anthology book from my grade school's library. I would guess it was written in the 50's or early 60's but I could be wrong. There are 3 stories I vaguely remember.    I remember this one the most. Most kids are born really smart through some type of enhancements. But the protagonist, while not dumb, is born like a normal person. Normal people tend to be looked down on or stigmatized in this society and he grows up and despite having average intelligence, leads a revolution against the government that has been promoting these kinds of genetic mutations. The only thing I know is that this story is set in the year 2000 on New Years Day. The title includes "the Year 2000" in it I'm fairly sure. But that's all I can remember about it. The final story is the most vague in my mind. But it's a story about cars and possibly racing? The title might be a two word title, the something. That something being the title of the name of the people that drive/race? Like the Langoliers, although obviously not that. I've read that one.   I know the last 2 are really vague, but any info on the first one at least might lead me to find different collections it's been in if I can track it down.   Thanks for everything!


Getting the maximum difference of a set of numbers

I have problem with my code below, here is the error:     Exception in thread "main" java.lang.NullPointerException     at   javaPractice.Difference.computeDifference(Difference.java:24)     at   javaPractice.diffSolution.main(diffSolution.java:18)   class Difference {      private int[] elements;     public int maximumDifference;      public Difference(int[] a) {         this.elements = a;     }      List<Integer> maximumDifferenceList;      public void computeDifference() {         for(int i = 0; i < elements.length; i++) {             for(int j = 0; j < elements.length; j++) {                 if(i != j) {                     maximumDifferenceList.add(Math.abs(elements[i] - elements[j]));                 }             }         }         Collections.sort(maximumDifferenceList);         maximumDifference = (int) Collections.max(maximumDifferenceList);     }  }  public class diffSolution {      public static void main(String[] args) {         Scanner sc = new Scanner(System.in);         int n = sc.nextInt();         int[] a = new int[n];         for (int i = 0; i < n; i++) {             a[i] = sc.nextInt();         }         sc.close();          Difference difference = new Difference(a);          difference.computeDifference();          System.out.print(difference.maximumDifference);     }  }   I tried to print out elements array, it seems to have values but it does not evaluate the line below:     maximumDifferenceList.add(Math.abs(elements[i] - elements[j]));   Thank you in advanced!


For $a,b$ coprime, there exists positive integers $x,y$ such that $ax-by=1$

The problem statement is: for $a,b$ coprime, prove that there exists positive integers $x,y$ such that $ax-by=1$.  The question is form Arthur Egnels' problem solving text, and from the chapter on the pigeonhole principle.    My question: His proof begins by generating a list $a,\ldots,a(b-1)$, where he then points out that each element in this list(which proceeds sequentially) doesn't have remainder $0\pmod{b}$.  He then shows that we arrive at a contradiction if we assume that we also don't get remainder $1$ in this list $\bmod b$.  To show the contradiction in this last statement, he first states that we would have positive integers $p,q $ where $ 0<p<q<b$ so that $pa\equiv qa \pmod{b}$.  He then goes on to point out that since we $a$ and $b$ are coprime, we then have that $b| q-p$.  I understand the last part here, but don't see why we get $pa\equiv qa \pmod{b}$.  Thanks in advance


I was trying to reset the password and I held down the shift key when booting didn't where I wanted to go instead it said error attempting to read or write outside disc 'hd0' entering rescue mode.... grub rescue>


I want to get a domain for my site. The site's topic would be about Vienna, but the content will be in English.   I was thinking, if I should get .com domain or .at domain. .at is both much cheaper and easier to get (there is less chance that my desired phrase is already registered).   Is there any disadvantage in terms of SEO and page rank, if my domain does not end with .com? The site will be in English and targeted not just for Austria, but globally, mostly foreign tourists.  I don't care if it's easy to remember the address, I expect most traffic to be from search engines anyway.


XML best practices: attributes vs additional elements

What's the difference between the two and when should I use each:  <person>      <firstname>Joe</firstname>      <lastname>Plumber</lastname> </person>   versus  <person firstname="Joe" lastname="Plumber" />   Thanks


How good is flash at "freezing" a scene?

I've heard that flash could "freeze" a scene. Let's say that we shoot a scene where people moving a lot, is flash able to even "freeze" it at slow shutter speed, i.e. 1/30th ? Assuming that people are in the flash range, i.e. flash could reach them easily. Is flash very effective at eliminating the motion blur ?  On a side note, is flash also good at reducing camera shake ?  Thank you.


I'm getting an error when using this entity field query, the error says that that the field title cannot be found but I'm only querying the basic node table.  $product_query->entityCondition('entity_type', 'node')->entityCondition('bundle', 'product')->fieldCondition('field_line', 'tid', $selected)->fieldOrderBy('title', 'DESC');


Different batteries connected in parallel

If we have 2 batteries one of emf x and the other is of emf y and we connect them in series we get an effective emf of x+y.  But what if we connect them in parallel, how to calculate the emf now?


Accessing SSH_AUTH_SOCK from another non-root user

The Scenario:   I am running ssh-agent on my local PC, and all my servers/clients are setup to forward SSH agent auth. I can hop between all my machines using the ssh-agent on my local PC. That works.  I need to be able to SSH to a machine as myself (user1), change to another user named user2 (sudo -i -u user2), and then ssh to another box using the ssh-agent I have running on my local PC. Lets say I want to do something like ssh user3@machine2 (assuming that user3 has my public SSH key in their authorized_keys file).   I have sudo configured to keep the SSH_AUTH_SOCK environment variable.   All users involved (user[1-3]), are non privileged users (not root).   The Problem:  When I change to another user, even though the SSH_AUTH_SOCK variable is set correctly, (lets say its set to: /tmp/ssh-HbKVFL7799/agent.13799) user2 does not have access to the socket that was created by user1 - Which of course makes sense, otherwise user2 could hijack user1's private key and hop around as that user.   This scenario works just fine if instead of getting a shell via sudo for user2, I get a shell via sudo for root. Because naturally root has access to all the files on the machine.   The question:   Preferably using sudo, how can I change from user1 to user2, but still have access to user1's SSH_AUTH_SOCK?


Suppose I have a table containing job roles:  CREATE TABLE roles (   "role" character varying(80) NOT NULL,   CONSTRAINT "role" PRIMARY KEY (role) );   Suppose I further have a table, users, and each row (a specific user) can have an arbitrary number of job roles:  CREATE TABLE users (   username character varying(12) NOT NULL,   roles character varying(80)[] NOT NULL,   CONSTRAINT username PRIMARY KEY (username) );   I should probably make sure that each member of users.roles[] exists in roles.role.  It seems to me that what I want is a foreign key constraint on each member of users.roles[] such that if references roles.role.  This doesn't seem possible with postgres.  Am I looking at this the wrong way?  What is the suggested "right" way to handle this?


Find the primes $p$ such that $\frac{2^{p-1}-1}{p}$ is a square number.    Attempt:  $p=2$ does not satisfy, $p=3$ satisfy. Now check for $p > 3$ (odd), and assume that  $$ 2^{p-1}-1 = k^{2} p $$  Notice that $2 \equiv (-1) \bmod (3) \implies 2^{p-1} - 1\equiv (-1)^{p-1} - 1 \bmod (3) $. So $k^{2}$ must be divisible by $3$, and this implies $9 | k^{2}$. $$ 2^{p-1}-1 = k^{2} p \implies 9 | 2^{p-1} - 1$$ $2^{p-1} \equiv 1 \bmod(9)$.  By Euler's: $2^{6} \equiv 1 \bmod(9)$. Then let us check the primes $$ p \equiv 1 \bmod(6) $$  Also notice that $4 | 2^{p-1} \implies 2^{p-1} - 1 \equiv 3 \bmod (4)$, and $k^{2}$ is not divisible by $2$ which means $k^{2} \equiv 1 \bmod(4)$, $pk^{2} \equiv p \bmod(4)$. So  $$ p \equiv 3 \bmod (4)$$  $p=7$ satisfy.


Conditional Regex does not behave as expected in Python

I'm trying to figure out the exact behavior of the conditional logic in Regex with Python. For this, I have made up a test that works as I would have expected in Regex101 using the Python flavor, but not in Python. The pattern is: (hello)?(?(1) world| bye) And test cases: hello world hello bye something bye  In Regex101 this matches hello world in full and the  bye in something bye. In Python, this only matches hello world - I would have expected it to match the  bye in something bye too? Would be amazing if someone could help me understand where I'm misunderstanding this implementation? In Python, my code is: tests = ['hello world', 'something bye', 'something world']  for t in tests:     print(re.match("(hello)?(?(1) world| bye)", t))


Can I tap a land creature for mana *and* attack with it?

If my friend has a land-creature and he tapped it for mana, can he attack with that land-creature after?


Is the normal force equal to weight if we take the rotation of Earth into account?

In my physics class we were doing problems such that we set $N$ (normal force) $= mg$. I understand that by Newton's Third Law, if I exert a force on the ground, then the ground will exert an equal and opposite force on me. However, the part that I am slightly confused about is that when the Earth rotates, and thus I rotate too, I am accelerating with the centripetal force towards the center of the earth (assuming I am at the equator). How am I doing this if the normal force equals $mg$? If the normal force doesn't equal mg then why isn't the ground exerting an equal and opposite force?


Runge-Kutta methods: step size greater than 1

The local truncation error of Runge-Kutta 4 is $O(h^5)$, while those of RK1 is $O(h^2)$.  I wonder then what happened when the step-size of RK methods is greater than 1: will the accuracy be improved if we choose RK1 instead of RK4?


How can I donate to Ubuntu without PayPal?

When I wanted to download Ubuntu 12.10 from ubuntu.com, I was asked to make a donation. However, there is only a PayPal option to make the payment. But I don't use PayPal. Is there any other option to make the payment?


My computer is presenting some weird behaviour, and I don't know what to try next to work out what's going wrong.  First the behaviour. The computer occasionally freezes. I can move the mouse, and the cursor changes (e.g., to a movement arrow, hand, text cursor etc). But nothing else on the screen moves. Counters don't count, windows don't move, clicks do nothing. Waiting doesn't help - it doesn't wake back up.  I can CTRL-ALT-F5 to an alternative terminal session and see what's running. Nothing seems to be maxing out any resources.  As far as I can tell, it's not tied to any one single application. I've tried to use the computer with different apps and it seems to still happen whatever I stop running, short of killing of Xorg and nautilus, obviously.  I've tried the xorg-edgers repo. No improvement. I've disabled compiz (I think) - no improvement. I've looked in a few log files but couldn't see anything that would indicate where the problem is (though I might well have been looking in the wrong place).  My next options are to reinstall and/or start swapping out hardware. But before I do that, can anyone tell me what can cause crashes like this, where the mouse can move but nothing else does? Or can anyone tell me which logs files I should be checking? Is there anything else I can try, to diagnose the problem? Is it likely to be a hardware issue?  The computer is a vanilla Dell XPS 8300 - details at  - except for the graphics card, which is an ATI Radeon X1300 Pro.


Why "themselves" instead of "himself" when referring to third-person singular?

I've read today a comment from a UK user that sounded weird to me:     so the OP is shooting themselves in the foot here with the tone then.   I would have said instead:     so the OP is shooting himself in the foot here with the tone then.   I've taken a look  but it's way out of my league, and appearently doesn't even answer this question.  Why did he use the third person plural while referring to a third person singular ?


Run a script with bash and supply a termination time

Is it possible to run a script from bash (e.g. python) with a termination time, meaning that if this script runs for longer than X seconds, terminate it?


Prove that a consistent linear system $Ax = b$ has infinitely many solutions if and only if $Ax = 0$ has a nontrivial solution.  In order to prove this, we have to prove two separate statements, namely:  1) If $Ax = b$ has infinitely many solutions, $Ax = 0$ has a nontrivial solution. 2) If $Ax = 0$ has a nontrivial solution, $Ax = b$ has infinitely many solutions.  Proof of statement 1: Since $Ax = b$ has infinitely many solutions, there are at least two distinct solutions, say $y_1$ and $y_2$, where $y_1 ≠ y_2$.  So $Ay_1 = b$ and $Ay_2 = b.$  Then, $A(y_1 – y_2) = Ay_1 – Ay_2 = b – b = 0.$ So $y_1 – y_2 ≠ 0$ is a nontrivial solution to $Ax = 0.$  Proof of statement 2: If $Ax = 0$ has a nontrivial solution $y$, then $Ay = 0$, where $y≠0$. If $Ax = b$, then $A(y+x) = Ay + Ax = 0 + b = b$ According to the uniqueness theorem, $A(αy) = 0$ for any scalar $α$ if $A(y) = 0.$ Therefore, $A(αy + x) = A(αy) + Ax = 0 + Ax = b$ for any scalar $α$ So if $Ax = 0$ has a nontrivial solution, $Ax = b$ has infinitely many solutions.  Proof by contradiction: If $Ax = 0$ has a trivial solution $y$, then $Ay = 0.$ Also, if $Ax = b$, then $A(y + x) = Ay + Ax = 0 + b = b.$ According to the uniqueness theorem, $A(αy) = 0$ for any scalar $α$ if $A(y) = 0.$ However, if $y = 0$, then $αy = 0$ for any scalar $α$, which implies that there is only one solution, not infinitely many.     Could someone verify my proof and see if I have worded anything incorrectly or missed anything?


I want to download files from a linux system using a windows client. While there are many SFTP clients I am having the problem, that I need to access files where I need to be root. On the linux system I have the root account disabled, I am using sudo to get root privileges. How to execute "sudo" using an SFTP client? I don't want to change my linux system! Thanks for any hint!


Determine if this series is equal to $\frac{1}{\sqrt{1+x}}$

A double factorial is such that $(2n)!!=(2n)(2n-2)...(2),$ and $(2n-1)!!=(2n-1)(2n-3)...3$. So $8!!=(8)(6)(4)(2)$. More information here:  Determine if the following is true:$\frac{1}{\sqrt{1+x}}=1+\sum_{n=1}^{\infty}(-1)^n\frac{(2n-1)!!}{(2n)!!}x^n$, $-1 < x < 1$. The fraction on the left hand side looks familiar, as $\frac{1}{\sqrt{1+x}}=\frac{1}{(1-(-x))^{\frac{1}{2}}}$. If this can be converted to its series representation then it would be nice, but I only know that $\frac{1}{1-x}=\sum x^n$, and I can't just apply a power of $\frac{1}{2}$ to the series. Since $-1 < x < 1$, the series will never diverge to infinity and would always approach 0. So it does not diverge either. There is also the option of using the binomial theorem with $\frac{1}{\sqrt{1+x}}=(1+x)^{-\frac{1}{2}}$ to check. Can someone help me complete this?


Missing $ inserted when using \itemize and \approx

The line in question causing the issue is:  \item Blah blah blah \approx blah("blah") blah   I also tried \left( and \right), but that didn't change anything.  No error is thrown when \approx is removed.


Can someone take a look at my Radix sort code and help me figure out how i can properly enque the new entry? Because as of right now the way i did it seems to never be able to set a second entry... It always points it as a null for some reason. I tried to set the tempNode to = new Node(newEntry) then just set the next constalty to null if its not defined but that still did not work.  class LinkedQueue<T> implements QueueInterface<T> {      private Node start;     private Node end;      public LinkedQueue() {         start = null;         end = null;     }      @Override     public void enqueue(T newEntry) {         Node tempNode = new Node(newEntry, null);         if (isEmpty()) {             start = tempNode;         } else {             end.setNext(tempNode);             end = tempNode;         }     }      @Override     public T dequeue() {         T front = null;         if (!isEmpty()) {             front = start.getData();             start = start.getNext();             if (start == null) // verification purposes                 end = null;         }         return front;     }      @Override     public T getFront() {         T front = null;         if (!isEmpty())             front = start.getData();         return front;     }      @Override     public boolean isEmpty() {         return (start == null && end == null);     }      // reset the list     @Override     public void clear() {         start = null;         end = null;      }      private class Node {         private T data;         private Node next;          public Node(T data) {             this.data = data;             next = null;         }          public Node(T data, Node next) {             this.data = data;             this.next = next;         }          public T getData() {             return data;         }          public void setData(T data) {             this.data = data;         }          public Node getNext() {             return next;         }          public void setNext(Node next) {             this.next = next;         }     } }  public class RadixSorting {     public static final int MAX = 10;      public static void radixSort(int[] myArray, int start, int last, int maxDigit) {         @SuppressWarnings("unchecked")         QueueInterface<Integer>[] buckets = new LinkedQueue[MAX];         System.out.println("\n");         System.out.println("Buckets size:" + buckets.length);         int bucket;         int index;         int i;          for (bucket = 0; bucket < MAX; bucket++)             buckets[bucket] = new LinkedQueue<Integer>();          int multiplier = 1;         for (i = 1; i <= maxDigit; i++, multiplier *= MAX) {             for (bucket = 0; bucket < MAX; bucket++)                 buckets[bucket].clear();             for (index = start; index <= last; index++) {                 int tempNum = (myArray[index] % (multiplier * MAX)) / multiplier;                 buckets[tempNum].enqueue(myArray[index]);             }             bucket = 0;             for (index = start; index <= last; index++) {                 while (buckets[bucket].isEmpty())                     bucket++;                 myArray[index] = buckets[bucket].dequeue();              }         }     }      public static void main(String args[]) {         int array[] = { 5, 50, 15, 45, 40, 10, 25, 30, 20, 35 };         RadixSorting.radixSort(array, 0, array.length -1, 4);     } }   Heres my error:  Exception in thread "main" java.lang.NullPointerException     at week5.LinkedQueue.enqueue(RadixSorting.java:51)     at week5.RadixSorting.radixSort(RadixSorting.java:143)     at week5.RadixSorting.main(RadixSorting.java:157)


No Solution Is Working. Bone Heat Weighting Failure. I've Tried Everything

I have a crab that I'm trying to connect to an armature and nothing is working. I have no non-manifold, no corner doubles, I tried separating and rejoining and I also tried re-scaling my mesh.


$$\int\frac1x\sqrt\frac{1-x}{1+x}\ dx$$ How to integrate? I tried the substitution $x=\sin\theta$ but didn't work.


I once saw a movie(sci-fi/fantasy) that I can't remember, but I know I liked it. I was really small and can't get any of the plot back together, but it was fairly old-ish movie (my guess would be 70's ~ 90's).   The only clues I remember are:   Hairy legged horses (like furry legs) Star-like metal weapon that appeared multiple times Group of people going from A to B, looking for something One of the heros was a cyclops that died during the film by being squeezed between rocks It wasn't animated.   If it rings any bell to anybody it would mean the world to me. Thanks a lot!  EDIT:  Somebody marked my question as duplicate of . While it points towards the same answer, the question was different. I didn't remember any teleporting castle and therefore my question wasn't answerable simply by using search.


How to execute javascript from an applescript (Yosemite)?

Since Yosemite, the Script Editor allows using javascript.  What is the best way to execute javascript from an applescript?  My use case is an existing applescript which needs to send some parameters over to a piece of javascript code, which makes a complex calculation and returns a result to be used as part of some appplescript-powered automations.  For clarity, I'm looking for an alternative to a tell application [browser] to execute the javascript using the new native javascript support of Yosemite, NOT for an alternative to a do shell script.


Simple calculation on coordinate transformation of Lagrangian (Qualls' CFT lecture note)

I have a question while reading "Lectures on conformal field theory" by Qualls (). $^1$      Question. I cannot find that the transformation (1.12) makes the action invariant. My attempt is as follows. Since $Q=(ct+d)Q'$, it follows that $$\frac{dQ}{dt}=cQ'+(ct+d)\frac{dt'}{dt}\frac{dQ'}{dt'}=\cdots=cQ'+\frac{1}{ct+d}\frac{dQ'}{dt'}.$$ Also, we have $t=\frac{dt'-b}{-ct'+a}$ by inverting the transformation, and finally we obtain  $$L'=\frac12 \left( cQ'+\frac{1}{\left(c\cdot \frac{dt'-b}{-ct'+a}+d\right)^2} \left(\frac{dQ'}{dt'}\right)\right)^2 -\frac{g}{2\left(c\cdot \frac{dt'-b}{-ct'+a}+d\right)^2Q'^2}.$$ How this transformed Lagrangian related to the original one?    $^1$ Please ignore the red "Why?" in the picture, which is answered in  related Phys.SE post.


Ive got a command to spawn a mob, when i give the spawn egg to myself it shows that it has NBT tags but them tags dont take effect and it spawns a normal skeleton. What have i done wrong? /give 1r2x skeleton_spawn_egg 1 0 {Health:10000,Glowing:1,PersistenceRequired:1,Silent:1,HandItems:[{id:bow,tag:{Enchantments:[{id:power,lvl:40}],Unbreakable:1},Count:1}],HandDropChances:[0.00F],ArmorItems:[{id:netherite_boots,Count:1},{id:netherite_leggings,Count:1},{id:netherite_chestplate,Count:1},{id:skeleton_skull,Count:1}],ArmorDropChances:[0.00F,0.00F,0.00F,0.00F],Attributes:[{Name:"generic.armor",Base:300.0F},{Name:"generic.armor_toughness",Base:10.0F},{Name:"generic.max_health",Base:1024.0F},{Name:"generic.max_health",Base:10000F}]}


biblatex - footcite not working inside \begin{center}

I'm struggling with biblatex to have footnote when the \footcite command is issued inside a \begin{center} \end{center} block.  The bibliography works fine, I have the reference number in the text but I'm unable to get the footnote at the same time.  I tried the command:  \footcite{ref1} \footfullcite{ref1} \footfullcitetext{ref1}   But it's not wokring.  This is what I have:  \usepackage[     backend=bibtex,     style=numeric,     citestyle=verbose,     maxcitenames=50,     maxbibnames=50,     firstinits=false,     sorting=none]{biblatex} \bibliography{biblio}    \begin{center} \includegraphics[scale=0.30]{01_Content_Certif_X509} \captionof{figure}{\emph{Génération et contenu d’un certificat X.509.}\footcite{dumas2013theorie}} \end{center}   If I used the \footcite command outside the \begin{center} \end{center} block, it works fine.  Can someone help me please?


(80's-90's) Spaceship heading for earth with pods containg a small robot that can build a cyborg/robot from the surrounding enviroment

A film (rented VHS I think) from the late 80' or early 90's, some kind of pods found their way (don't remember how) into an spaceship heading for earth. These pods were egg/walnut shaped and orange/brown and approximately the size of a basketball. In these pods there was a small machine with tools that could use material from surrounding environment to build some kind of robot/cyborg. I remember that it used a human body as a base to build this robot/cyborg. Some people were trying to stop this ship from reaching earth but in the end it crashed and then you saw at least one surviving pod.  I think Martin Landau was in the film but I may be mixing things up.


Since starting working where I am working now, I've been in an endless struggle with my boss and coworkers in regard to updating systems.  I of course totally agree that any update (be it firmware, O.S. or application) should not be applied carelessly as soon as it comes out, but I also firmly believe that there should be at least some reason if the vendor released it; and the most common reason is usually fixing some bug... which maybe you're not experiencing now, but you could be experiencing soon if you don't keep up with .  This is especially true for security fixes; as an examle, had anyone simply applied a patch that had already been available for months, the infamous SQL Slammer worm would have been harmless.  I'm all for testing and evaluating updates before deployng them; but I strongly disagree with the "if it's not broken then don't touch it" approach to systems management, and it genuinely hurts me when I find production Windows 2003 SP1 or ESX 3.5 Update 2 systems, and the only answer I can get is "it's working, we don't want to break it".  What do you think about this? What is your policy? And what is your company policy, if it doesn't match your own?  What about firmware updates (BIOS, storage, etc.)? What about main O.S. updates (service packs)? What about minor O.S. updates? What about application updates?  My main interest is of course in updating servers, as client patch management is usually more straightforward and there are well known tools and best practices to handle it.


What words does English have more? Romance or Germanic?

What words does English have more? Romance or Germanic ?


How to show seconds in Windows 10 taskbar?

When I need to know the seconds in Windows 10, I need to click on the clock to open it, but that is annoying if I need to do it multiple times or I need to wait for the next minute to be reached.  I would like the taskbar clock to have the seconds (HH:MM:SS) instead of only hours and minutes (HH:MM).


How Get Client IP. MAC. PC name use wcf4 (tcp/ip mode)

I have a wcf service running on LAN server, use tcp/ip mode. Now I need to get every client info when the client send request connect the wcf service. Because it's all on LAN. I just need get the client MAC, IP , PC name. Is there any way to get these info ? thanks.


Scale Multiple Verts At Once To Line Them Up (like Maya)

Coming from Maya, if I have some verts that are supposed to be lined up on an axis but become unaligned slightly, I can just select them all, then scale them all at once and they all line up. This does not work in Blender. I searched for answers on this, but they seemed really convoluted (like 5-10 steps). Is there really not a simple equivalent in Blender to accomplish this?  Thanks!


I can't install libpq-dev on Ubuntu 20.04.2

Problem I can't install libpq-dev in ubuntu 20.04.2 I ran this command: $ sudo apt-get update  $ sudo apt-get install libpq-dev  then I got errors bellow. Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libpq-dev: Depends: libpq5 (= 12.7-0ubuntu0.20.04.1) but 13.3-1.pgdg20.04 + 1 is to be installed E: Unable to correct problems, you have held broken packages.  Then I try to install the library directly with this command: $  sudo apt-get install libpq5=12.7-0ubuntu0.20.04.2  I got this error: Reading package list ... Done Creating dependency tree Reading status information ... Done E: The version «12.7-0ubuntu0.20.04.2» was not found for «libpq5»  Status Ubuntu version $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 20.04.2 LTS Release:    20.04 Codename:   focal  Kernel version $ uname -a Linux IdeaPad-S340-15API 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux  Updated $ apt-cache policy libpq-dev libpq5 libpq-dev:   Installed: (none)   Candidate: 12.7-0ubuntu0.20.04.1   Version table:      12.7-0ubuntu0.20.04.1 500         500 http://security.ubuntu.com/ubuntu focal-security / main amd64 Packages         500 http://archive.ubuntu.com/ubuntu focal-updates / main amd64 Packages      12.2-4 500         500 http://archive.ubuntu.com/ubuntu focal / main amd64 Packages libpq5:   Installed: 13.3-1.pgdg20.04 + 1   Candidate: 13.3-1.pgdg20.04 + 1   Version table:  *** 13.3-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages         100 / var / lib / dpkg / status      13.2-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages      13.1-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages      13.0-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages      12.7-0ubuntu0.20.04.1 500         500 http://security.ubuntu.com/ubuntu focal-security / main amd64 Packages         500 http://archive.ubuntu.com/ubuntu focal-updates / main amd64 Packages      12.4-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages      12.3-1.pgdg20.04 + 1 500         500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 / main amd64 Packages      12.2-4 500         500 http://archive.ubuntu.com/ubuntu focal / main amd64 Packages


I need to draw simple graph (for example ) in LaTeX. I am using Kile in Ubuntu. I exactly don't know that which package should I use. Any suggestion with example is highly expected.


How do I fix my installation of ATI Catalyst Video Driver in 12.04 LTS?

My graphic card is a Mobility Radeon HD 4200 Series. I tried the 2 answers from   But unfortunately, it does not work for my Mobility Radeon HD 4200   Note when I raised this question in May 2012, there was only 2 answers to Stephen Myall's question, since then many answers have been added to his post, it is the master post about this subject


The issue about call by reference in Java

i know that java is call by reference, i have a question about these code  public class test {  public static void main(String[]  argv){       ArrayList<Integer>  a = new ArrayList<Integer>();     int aa = 5;     int[] aaa ={0,1,2};     a.add(1);     aaa[0]=999;     System.out.println("ArrayList "+ a.toString());     System.out.println("int "+ aa);     System.out.println("Array "+ Arrays.toString(aaa));      add2(a,aa,aaa);       System.out.println("ArrayList"+ a.toString());     System.out.println("int "+ aa);     System.out.println("Array "+ Arrays.toString(aaa)); }  private static  void add2(ArrayList<Integer> a1,int aa1,int[] aaa1) {     a1.add(2);     aa1=aa1+10;     aaa1[2]=999; }   the result is  ArrayList: [1]  int:       5  Array:     [999, 1, 2]  ArrayList: [1, 2]  int:       5  Array:     [999, 1, 999]   why ArrayList  and Array will change when i call function and "int" won't change  Can someone explain to me these situation  , thanks a lot


I am designing 4-layered PCB for the first time.  Searching web, I learned that normally we place layers in following way  TOP | GND | VCC | BOTTOM  Will there be problem if i place GND at the bottom? So that it works as below  TOP | VCC | BOT | GND  ?


Change the symbol scale in ArcMap legends

As you can see from the image below, my enormous scale for traffic pattern shadows the other objects in the legend. Are there ways to reduce the size of object portrayed in the scale?


How do I get rid of Macbook Air 2017 Trackpad Rattling Noise?

I have enabled tap to click in trackpad setting. Whenever I tap on the trackpad it's making a noise similar to somewhat of actual click. Please help me find a solution.


What do the supercharges in extended supersymmetry do?

What do the supercharges in  do?  In ${\cal N}=1$ supersymmetry there are a certain number of fermions and and equal number of bosons. You can transform all fermions to the bosons (and vice versa) in a 1 to 1 fashion using a single supercharge, $Q$.  So what happens when you have, for example, ${\cal N}=2$ supersymmetry with 8 supercharges? Since $Q$ is a generator of supersymmetry transformations, is it a linear combination of these supercharges that act on the particles? In which case could one particle be acted on by two separate linear combinations of $Q$? Or is it strictly one linear combination of $Q$ per fermion/boson?  Also, what does ${\cal N}$ mean physically? What difference does ${\cal N}=2$ have to ${\cal N}=1$ other than more supercharges? Or is that the only difference between the two theories?


Okay, someone tasked me to make a leaderboard for their game. However, the one I have right now is really insecure. All it does is check if someone is in the top 100, and if they are, post the score to the server, where the server will completely trust the client to give a real score.  My question is: How would I make it harder, or better, impossible, to send a fake high score, because right now they can just post a value to an easy-to-find endpoint.  Clarifications: The game is running in an interpreted environment, therefore obfuscation is not practical, and the game has a lot of input (an hour's worth at least), so sending that to the server is also impractical.


Does a giver of a Sacrificial Protection need to be given a chance to save themselves?

So, often, when it's asked why Lily seems to be the only known case of Love/sacrifice protection, the answer is that in addition of giving their lives willingly, the one sacrificing themselves must be given a chance to escape.  But if this is the case, why in Deathly Hallows Harry was given none at the Forest, and still the protection seems to work on all people on his side?


Python : How do I edit the property of the recently added modifier without using its name

I have this Boolean operator which adds a Boolean to the active object and adds the second in order to the object property but this wont more than once because the second modifier added wont be dif it would be dif.001 How do i automate this name issue class BoolOp(Operator):     """Quick Booelan Operation"""     bl_idname = "extorctools.boolop"      bl_label = "Bool Op"         bl_options = {'REGISTER', 'UNDO'}          def execute(self, context):         target = bpy.context.active_object         lis = bpy.context.selected_objects         cutter = []         for x in range(len(lis)):             if len(lis) == 1:                 raise Exception("2 Objects must be selected")             elif not lis[x] == target:                 cutter.append(lis[x])                 break         try:             target.modifiers.new(name = f"dif" , type = 'BOOLEAN')             target.modifiers['dif'].object = cutter[0]         except:             pass         return {'FINISHED'}  What i want to be able to do is to do something like this target.modifiers[the.most.recent.modifier.of.type.BOOLEAN].object = cutter[0]


Geometry of Riemann Stieltjes integration

What is the geometrical interpretation of Riemann Stieltjes Integration ?   We know that for Riemaan integration $\int_{a}^b f(x)dx$ represents the area bounded by the curve $y=f(x)$& the straight lines $x=a$ & $x=b$.  But when we integrate $f(x)$ with respect to another function $g(x)$ then which area represents that integration geometrically ?


How do I compute the discrete valuation of the sum of two elements

Let $O$ be a discrete valuation ring with valuation $v$. We normalize by $v(\pi) =1$, with $\pi$ a prime element in $O$.  By definition, for all $x,y$ in $O$, we have $v(x+y) \geq \min (v(x),v(y))$. For some reason, the texts (Neukirch and Serre) suggest that one has equality when $v(x) \neq v(y)$. Where does this come from?  Does one also have an upper bound for $v(x+y)$?  I actually have elements $x_1,\ldots,x_n$ and I want to show that $v(x_1+\ldots+x_n) = \min(v(x_i))$. Does it suffice to show that $v(x_i) \neq v(x_j)$ for all $i\neq j$?


For a physics major, what are the best books/references on Greens functions for self-studying?  My mathematical background is on the level of Mathematical Methods in the physical sciences by Mary Boas.


What are the consequences of settlements getting attacked?

My settlement was attacked by some Raiders and my defenses took care of them along with some of my NPC's. It seems like the Raiders didn't make it through to any of the buildings. What happens when they do?  Can you lose your items if you stored them in a house?  Can the NPC's die?  Do the enemies destroy your buildings?


A question about Einstein's elevator thought experiment

In Einstein's thought experiment (if I understand it correctly) a person in a sealed elevator in space accelerating at 9.807 m/s2 would not be able to tell the difference between that and the effect of gravity on Earth. Is there any sort of experiment the person in the elevator could do that would tell him he is feeling acceleration rather than gravity from Earth? For instance, I think that if you hung two weights from long strings some distance apart on Earth they would not be parallel. But in the elevator they would be.  Sorry if this has been asked before, but I couldn't find the answer on this forum.


How to remove Windows after install WUBI?

I installed Ubuntu using the Windows installer and I was wondering how to get rid of the old windows install, deleting it and everything with it.   I tried to just install it from my external hard drive but that didn't work.


Is returning early from a function more elegant than an if statement?

Myself and a colleague have a dispute about which of the following is more elegant. I won't say who's who, so it is impartial. Which is more elegant?  public function set hitZone(target:DisplayObject):void         {             if(_hitZone != target)             {                 _hitZone.removeEventListener(MouseEvent.ROLL_OVER, onBtOver);                 _hitZone.removeEventListener(MouseEvent.ROLL_OUT, onBtOut);                 _hitZone.removeEventListener(MouseEvent.MOUSE_DOWN, onBtDown);                  _hitZone = target;                  _hitZone.addEventListener(MouseEvent.ROLL_OVER, onBtOver, false, 0, true);                 _hitZone.addEventListener(MouseEvent.ROLL_OUT, onBtOut, false, 0, true);                 _hitZone.addEventListener(MouseEvent.MOUSE_DOWN, onBtDown, false, 0, true);             }         }   ...or...  public function set hitZone(target:DisplayObject):void         {             if(_hitZone == target)return;              _hitZone.removeEventListener(MouseEvent.ROLL_OVER, onBtOver);             _hitZone.removeEventListener(MouseEvent.ROLL_OUT, onBtOut);             _hitZone.removeEventListener(MouseEvent.MOUSE_DOWN, onBtDown);              _hitZone = target;              _hitZone.addEventListener(MouseEvent.ROLL_OVER, onBtOver, false, 0, true);             _hitZone.addEventListener(MouseEvent.ROLL_OUT, onBtOut, false, 0, true);             _hitZone.addEventListener(MouseEvent.MOUSE_DOWN, onBtDown, false, 0, true);          }


The following problem is from the book "Finite Group Theory" by Martin Isaacs.          (3.B.12) Let $G$ be solvable and assume that $\Phi(G) = 1$. Let $M$ be a maximal subgroup of $G$ and suppose that $H \leq M$. Show that $G$ has a subgroup with index equal to $[M:H]$        I've been trying to solve this problem for quite some time, but all the time I'm coming up empty. As the lecture is about complements, especially the Schur-Zassenhaus Theorem I tried to prove that $M$ has a normal complemented $L$ in $G$, as then $[G:HL] = [M:H]$ and $HL$ is the wanted subgroup. Unfortunatelly I can't seem to prove this one.  I took a look at two cases. In the first assume that there is a minimal normal subgroup $L$ of $G$, s.t. $L \not \leq M$. Then by the maximality of $M$ we get $G = ML$. Also we have $L \cap M \unlhd M$ and $L \cap M \unlhd L$ (as $L$ is elementary abelian, as $G$ is solvable), which gives us that $L \cap M \unlhd G$. As $L \cap M \not = L$ from the minimality of $L$ we get $L \cap M = 1$, so $L$ is a complement of $M$. But I can't solve the case when all minimal normal subgroups of $G$ are in $M$. I tried using induction to solve this question, but the problem arrises when $H$ doesn't contain any normal non-trivial subgroup of $G$, as then I can't reduce the problem to a factor group from smaller order.   Anyway I beleive the problem has to do something with a minimal normal group, as if for some $T \leq G, [G:T] = [M:H]$, then $|T| = p^k \cdot |H|$. But I can't prove the existence of a minimal normal group of order $p^k$, nor I can prove that it intersects trivially with $H$.  I notice that I'm not using the condition $\Phi(G) = 1$, but I can't see it how. The only way I managed to achieve something by using it is to prove that every minimal normal subgroup of $G$ has a complement in $G$, but unfortunatelly this doesn't prove that every maximal subgroup is complemented.


How to attach a file using mail command on Linux?

I'm on a server running a Linux shell.  I need to mail a simple file to a recipient.  How to do this, prefereably using only the mail command?   UPDATE: got a good solution, using mutt instead:  $ echo | mutt -a syslogs.tar.gz admin@domain.org


How many continuous functions are differentiable?

Consider the set of continuous functions $\mathbb{R} \to \mathbb{R}$. I assume that the subset that are not everywhere differentiable accounts for almost all of them. Is this true? What is the precise formulation of this idea, and how do you prove it?


Python code not incrementing by specified amount

Long story is I'm trying to draw some of the trigonometric graphs, but I'm incrementing a value by 0.1 to get a precise turning point, however when incrementing it's incrementing by 0.100000000006 or some value similar to that, so I'm unable to check if it's equal to another value  I ran a test on a different file to check if the problem was due to some of the sine conversions, incase of a memory leak or something (I'm not sure) and I had the same problem in another file which was just a for loop.  import math xNum = 0 for x in range(180):     print(xNum)     xNum = 0.1 + xNum   And when printing xNum I'm getting values like 0.40000000006 that I'm not sure why it isn't incrementing xnum by 0.1. i used xNum += 0.1 but there seems to be no difference in output


How long does an opened and unrefrigerated tub of yogurt last?

I have found online that unopened and unrefrigerated yogurt will last for a few days without refrigeration. However, is this also true for opened and unrefrigerated yogurt? By "opened" I mean that I have already removed the seal and taken a few spoonfuls out of the tub before leaving it unrefrigerated.   EDIT: I see this question has been marked as duplicate. I think that the link provided does not answer my question. The case for yogurt is a very special one since it is a fermented food and cannot just be casually thrown into the general category of "dairy product" (as does the top answer in linked question). Moreover, my rough understanding is that yogurt has a low pH (from the high amounts of lactic acid) which prevents the growth of external pathogens. Hence, unopened yogurt will be safe at room temperature for at least a couple of days.  However, if you wish me to be pedantic, my question would be: is it likely that by opening the yogurt tub I introduced pathogens that can replicate rapidly at the low pH of yogurt given that it was left unrefrigerated?


Cannot remove a directory due to read-only file system

I was trying to remove a directory from my hard drive. But after typing a   sudo rm -r -f ./   command, it says      cannot remove [...] read-only file system.   I also tried the   sudo mount -o remount,rw /mnt   command, but this time it says      only root can use --options option   Do you have any fix for that? I really need to remove that folder!


How to place an image in the left margin of a title page

I have to make a book cover for my document which must have a png image covering all the height of the left page margin. The rest of the page must have pictures, and text lines centered.  Something like the following coverpage:    How could I do it?  All I can get is to fill with a color the left side of the page   \documentclass[a4paper]{report} \usepackage{tikz}  \title{\tikz[remember picture,overlay] \draw [fill,red!20] (current page.north west) rectangle +(0.33\paperwidth,-\paperheight);% Rather Long Document Title to Show that the Colour is Behind the Title} \author{John Doe}  \begin{document} \maketitle  \end{document}   but not to insert an image.  Thank you very much for your help.


How to display only shell variables (not functions)

How can I display a list of shell variables in Bash, not including functions, which often clutter the output, because of the many related to completion? I have examined declare, and it has an option for limiting the output to functions (declare -f), but not for limiting the output to "plain" shell variables?


Getting the list of points that describe a Curve without converting to mesh

I've used mathutils.geometry.interpolate_bezier() in the past to create points for a curve using the bezier handle and knot coordinates.  from the docs:     interpolate_bezier(knot1, handle1, handle2, knot2, resolution)   My question is; given an existing curve in the scene, is there a neat way to get at the points that describe the curve without converting it to a mesh, or figuring out which handle (left or right) to use for each spline point.  curve = bpy.data.curves[0].splines[0] curve.bezier_points[0].co curve.bezier_points[0].handle_left curve.bezier_points[0].handle_right