I've got a problem. As soon as I enter this little f****r  --> ' <-- in my textarea which are sent to a database via AJAX, it stops working. So if I for example enter:     I am a little gnome and I'm glad to meet you. Hug me!   The database will only receive:     I am a little gnome and I   So.. Can I limit all textareas on the page to like A-Z + ÅÄÖ + . , + other regularly used characters which don't ruin my stuff? I am using onchange for the AJAX request, and another eventlistener for keyup to make it work on Safari, if that's of any importance to anyone!  SQL-injection vulnerability, got it. I'm scared, and have stuff to do. Thanks for all answers thus far.

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


Demonstrate the following trivial equation:      $$\int_0^{\infty} \int_0^{\infty}\frac{\log x \log y}{\sqrt{xy}} \cos(x + y)dxdy = (\gamma + 2 \log 2) \pi^2$$      where $\gamma$ is the Euler-Mascheroni constant.   Proposed by Wan Lang Zonneveld  This seems to me to be a matter of symmetry.

Hi I am trying to solve this double integral $$ I:=\int_0^\infty \int_0^\infty \frac{\log x \log y}{\sqrt {xy}}\cos(x+y)\,dx\,dy=(\gamma+2\log 2)\pi^2. $$ Thank you.  The constant in the result is given by $\gamma\approx .577$, and is known as the Euler-Mascheroni constant.  I was thinking to write $$ I=\Re \bigg[\int_0^\infty \int_0^\infty \frac{\log x \log y}{\sqrt{xy}}\, e^{i(x+y)}\, dx\, dy\bigg] $$ and using Leibniz's rule for differentiation under the integral sign to write $$ I(\eta, \xi)=\Re\bigg[ \int_0^\infty \int_0^\infty \ \frac{\log (\eta x)\log(\xi y)}{\sqrt{xy}} e^{i(x+y)}dx\,dy.   \bigg]\\ $$ After taking the derivatives it became obvious that I need to try another method since the x,y constants cancel out.  How can we solve this integral I?  Thanks.


I have a  in play. My opponent casts  on it. In response, I cast  on the Unsummon. Do I sacrifice my Phantasmal Dragon because it was the target of the Unsummon, or does countering the Unsummon make it's targeting invalid?

has the heroic ability:     Whenever you cast a spell that targets Tethmos, return target creature card with converted mana cost 2 or less from graveyard to battlefield.   Suppose  is cast, targeting Tethmos. It is countered by .  The last sentence of 601.2c is:     Any abilities that trigger when those players, objects, and/or zones   become the target of a spell trigger at this point; they'll wait to be   put on the stack until the spell has finished being cast.   My interpretation of 601.2c is that Divine favor starts one stack, and when that stack gets resolved, another stack is processed that starts with the Tethmos heroic ability being triggered.  So in this specific case where only one instant is cast (negate), Divine Favor gets negated and has no effect. However, the heroic ability does get triggered.  Is this interpretation correct?  Is it the case in general that heroic abilities do trigger even when the enchantment is countered?


Why does Deutsche Kuche German bread have a 1 year shelf life? How it is achieved without mold developing?

How can a bread have an expiration date of one year into the future?? The bread in questions is Deutsche Küche rye bread (from Aldi).  Yes, it is a dense bread, but it is not dry like a cracker, so there seems to be enough moisture for mold to grow.  There are no preservatives.  Edit (pictures added):


I've worked in blender for a bit over 2 years now, and I've never encountered something like this before. I was modeling a stage (for performances, etc) and when I tried to render, some of the emissions wouldn't render at ALL. Some would, which is very weird. I'd be really grateful if anyone knew what I could do, because I'm completely lost... :/  .blend :

Why is the selected object displaying in the 3D view, but not rendering?  In object mode, it shows up:   However, it does not show up in render mode:   Why is this so and what causes it to hide in render mode?


$$\int_0^\infty \dfrac{\sin x}x\,\mathrm dx = \mathrm{Im}\left(\int \dfrac{e^{ix}}x\,\mathrm dx\right)$$ Considering $f(z) = \dfrac{e^{iz}}z$, it has a simple pole at $z = 0$. Residue of $f(z)$ at $z = 0$ is $1$. This imples that  $$\mathrm{Im}\left(\int_0^\infty \dfrac{e^{iz}}z\,\mathrm dz\right) = \dfrac12\int_{-\infty}^\infty\dfrac{e^{iz}}z\,\mathrm dz = \dfrac12(2\pi\cdot1) = \pi$$  I found out that the answer is $\dfrac12\pi$. Why??

This refers back to $\int_{-\infty}^\infty \frac{\sin x}{x} \mathrm{d}x = \frac\pi2$ already posted. How do I arrive at $\frac\pi2$ using the residue theorem? I'm at the following point: $$\int \frac{e^{iz}}{z} - \int \frac{e^{iz}}{z},$$ and I would appreciate any help.


If I remember correctly, we use $ Δx$ for changes in $x$ and when $Δx \rightarrow 0$ then  $ Δx$ takes the form of $dx$?

$dx$ appears in differential equations, such us derivatives and integrals.  For example, a function $f(x)$ its first derivative is $\dfrac{d}{dx}f(x)$ and its integral $\displaystyle\int f(x)dx$. But I don't really understand what $dx$ is.


I have been advised to mention faculty members in the area I want to apply for (ECE PhD). My Question is: how much of an effect would this have on my admission? Maybe that particular faculty will not want to work with me but some other person in a somewhat related area will. Also how flexible would my choice of specialization be, when I am admitted to a university?

For PhD applications, I have mentioned that I am interested in some research areas. Besides, I am thinking about mentioning some professors' names, so that it shows I have read their websites and I am not just sending out generic statements applicable to many schools.  But is it good to mention some professors' names in the statement of purpose, if I don't know them personally? In what cases is it good, and in what cases it isn't?  For example, is it good to only mention    those whose research directions are aligned with my research interests, or/and those whose books or notes I have heard of, or better, might have read some parts of, or/and those who are already established and famous (such as having certain titles), or/and those that are directing the PhD graduate programs, or/and those that are heads of the departments?    What will other professors who are not mentioned think? How will you do, if it were you?


For each $\xi>0$, $S+\xi B$ is a closed bounded set,   where $S$ is a closed bounded subset of $int ~dom f$, $B$ is the unit ball,  $domf$ denotes the effective domain of the proper convex function $f$.  My question is  that why the nest of sets  $$ ( S+\xi B ) \cap  (int~ dom f)^{C}$$   is empty.

Let $f$ be a real convex function and $S$ an arbitrary closed bounded subset of the relative interior of the effective domain of $f$. Let $B$ be a closed Euclidean unit ball. The nest of sets $$(S + \varepsilon B) \cap (\mathbb{R}^n \backslash \text{int}(\text{dom} f)), \quad \varepsilon > 0$$ has an empty intersection. Why? Is it because $\text{cl}S=\bigcap \{S + \varepsilon B \big | \varepsilon > 0\}$ and $S \subset \text{int}(\text{dom} f))$?


I've got a good deal and bought a new bike with full Shimano XT groupset and 2x Drivetrain which I am not fully satisfied with, it has 34/24 and 11-42 setup.  I would prefer 1x more but not going to invest in transformation at the moment.  My question is - as it's not a good general practice to combine lowest-lowest and highest-highest rings (I'm coming from Roadies world), will it be bad to use 34T in front in combination with 42T on rear?  I'd rather not to use the front derailleur at all (would be happier with dropper instead).

When you run 1x, aren't you basically force to cross chain?


I have been reading the contributions following   when I noticed  has posted  below one of the existing answers.  I am wondering how come the user has been able to comment when his reputation is only 1. Normally, we can comment only if we have at least 50 reputation (if the post is not ours, as in this case). So how did this happen?

On this question on Super User …    … there is a comment:  Yes, it is possible. Check out this question: apple.stackexchange.com/questions/447/… –   The interesting thing is that:  The user has 1 reputation There was no migrated / deleted answer The question itself was not migrated The user is registered The user does not have any associated network account, therefore no network profile The mods .   Why were they able to post a comment?


"1 in 5 students uses tobacco."  What is the subject? What is the prepositional object of "in"? What part of speech is "5"? What part of speech is "students"?  I don't need a re-wording of the meaning.

I'm in an argument. To me "are" makes more sense. I understand the rationale for is because it's only one chicken, but chickens itself is plural. Help?


I work in project to apply ubuntu client in all computer in my university . can you help my to know the steps to do it?

folks.  I was recently given the task to remove Windows XP from some 15 computers in a primary school, install Lubuntu 12.10 on them (all too old for Gnome/Unity) and set up Scratch so the students can start learning coding in a month or two.  The problem is: although I've been using Linux for a decade now, I've no idea of how to set up a "master" computer to deal with the updates and maybe even broadcast whatever is happening on its screen to all the "slave" computers in the lab.  The only useful answer I found here was  regarding the use of "squid-deb-proxy" to deal with the updates in an efficient way.  Any how tos, tutorials or tips from someone who's done something similar?  Much appreciated. Thank you.  theguilster


I am studying the theorem that states that the row rank of a matrix is the same as the column rank. I understood the proof and managed to use it in specific examples using a matrix.   I am now, trying to find an informal proof/explanation about the fact that row rank=columns rank but I am not sure what is suppose to do by given an informal proof or explanation.  Can anyone help me on this or show me where can I find more about this topic?   Thanks

I am looking for an intuitive explanation as to why/how row rank of a matrix = column rank. I've read the proof at  and I understand the proof, but I don't "get it". Can someone help me out with this ?   I find it hard to wrap my head around the idea of how the column space and the row space is related at a fundamental level.


I'm running Ubuntu, with Gnome3 as my desktop manager. While debugging some initialization issues (the usual confusion over bash_profile, bashrc, etc.), I found that given the following files,  # ~/.bash_profile export X=x  # ~/.profile export Y=y   if I reboot, log in, and start a shell, it seems like ~/.bash_profile was never sourced:  $ echo ${X-var_not_set} var_not_set $ echo ${Y-var_not_set} y   I'm using Gnome terminal, running non-login shells (the default), so it makes sense that ~/.bash_profile would not be sourced when I start a shell in the terminal emulator, but I thought ~/.bash_profile would have been sourced when I originally logged in at the graphical login screen.  I'm unclear whether that login screen is the domain of the OS (Ubuntu), the graphical shell (Gnome), or something else (display manager?), and thus, what initialization files are run.  The Bash manual says that ~/.bash_profile will be used instead of ~/.profile if it's present, but the above behavior seems to contradict that.     When bash is invoked as an interactive login shell, or as  a  non-interactive  shell with  the  --login  option,  it  ...  looks  for ~/.bash_profile,  ~/.bash_login,  and  ~/.profile, in that order, and reads and executes commands from the first one that exists  and  is  readable.   My best guess is that the graphical login has nothing to do with Bash (is this related to dash shell?), and as such, it executes ~/.profile. Is that the case, or is there more to this that I'm misunderstanding?

I'm using Linux Mint. My login shell (cat /etc/passwd | grep myUserName) is bash.  After I start my graphical desktop environment and run a terminal emulator from it, I can see that .bash_profile is not sourced (environment vars that are exported in it are unset). But if I log in from a text console (ctrl+alt+F1) or manually run bash -l from the terminal emulator, .bash_profile works fine.  Am I wrong when I think that .bash_profile should be sourced when X starts and all export'ed vars should be available in the terminal, running from X?  P.S. Placing everything in .bashrc and sourcing it from .bash_profile is not good idea (): environment stuff should be sourced only once.


It seems to be related to the mesh texture~

I have imported a mesh (AutoCad DXF) and I'm experiencing strange shading behavior. I've done the following to try and address the problem with no luck:  Recalculate Normals Remove Doubles Delete Loose Geometry Cleared Seam, Sharp, and Bevel Weights  There are no modifiers on the mesh.  The original imported mesh looks fine in smooth shading but I need the mesh to be in quads which causes the shading to mess up as shown in photo. I can add my .blend file but I'm not sure how to do that.


What is the application Wi-Fi, and why is it gobbling 2GB of memory? Running latest version of macOS Mojave 10.14.1 on a 2018 MacBook 15" with 16GB of memory total.

Why is the Wi-Fi process taking so much memory?  EDIT: Apologies, I should have clarified my question. I'm a web developer that spends most of his time developing apps locally. Not interacting with third party apis or database interactions. Possibly it might be my app bundler Webpack serving updated changes constantly to my local server?  Specs   MacBook Pro (Retina, 13-inch, Mid 2014) 2.8 GHz Intel Core i5 8 GB 1600 MHz DDR3 Mojave 10.14.2   cwd / txt /System/Library/CoreServices/WiFiAgent.app/Contents/MacOS/WiFiAgent txt /Library/Preferences/Logging/.plist-cache.ptlzg4rP txt /private/var/db/timezone/tz/2018g.1.0/icutz/icutz44l.dat txt /System/Library/Caches/com.apple.IntlDataCache.le.kbdx txt /usr/share/icu/icudt62l.dat txt /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/SystemAppearance.car txt /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/VibrantLightAppearance.car txt /System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat txt /Library/MessageTracer/SubmitDiagInfo.default.domains.searchtree txt /private/var/db/mds/messages/502/se_SecurityMessages txt /System/Library/Frameworks/SecurityInterface.framework/Versions/A/Resources/CertLargeStd@2x.png txt /System/Library/Frameworks/SecurityInterface.framework/Versions/A/Resources/CertLargeStd.png txt /System/Library/Fonts/SFNSText.ttf txt /System/Library/Frameworks/AppKit.framework/Versions/C/Resources/Assets.car txt /System/Library/PrivateFrameworks/CoreWLANKit.framework/Versions/A/Resources/Assets.car txt /usr/lib/libobjc-trampolines.dylib txt /System/Library/Frameworks/SecurityInterface.framework/Versions/A/Resources/Assets.car txt /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/DarkAquaAppearance.car txt /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/DarkAppearance.car txt /System/Library/CoreServices/SystemAppearance.bundle/Contents/Resources/Assets.car txt /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/Intel Iris Graphics/functions.data txt /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/3902/libraries.data txt /usr/lib/dyld 0 /dev/null 1 /dev/null 2 /dev/null 3 /dev/io8log 4 /dev/io8logtemp 5 *:* 6 /Library/MessageTracer/SubmitDiagInfo.default.domains.searchtree 7 ->0x65d3d29751cfa425 8 /System/Library/Frameworks/CoreImage.framework/Versions/A/Resources/ci_stdlib.metallib 9 /System/Library/Frameworks/CoreImage.framework/Versions/A/Resources/ci_filters.metallib 10 /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/3902/libraries.maps 11 /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/3902/libraries.data 12 /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/Intel Iris Graphics/functions.maps 13 /private/var/folders/d5/y540nrk96fnckhlwyy_9yxsw0000gp/C/com.apple.wifi.WiFiAgent/com.apple.metal/Intel Iris Graphics/functions.data    Since I develop, I would prefer to have more memory for simulators, compilers and running dev infrastructure and tools. How can I diagnose why memory is being allocated for wireless networking?


I am an Indian citizen and planning to visit Russia on a tourist visa for about 15 days. I would be flying on Air Astana both on the onward and return journey.  My route is New Delhi - Astana - Omsk and my return journey will be Omsk - Astana - Almaty - New Delhi.  My question is: Do I need a transit visa for Kazakhstan? I do not want to leave the airports in Astana and Almaty and I will be inside them. The doubt I have is because the sector between Astana and Almaty will be considered a domestic sector and I am not sure if these two airports have a transfer / transit facility or zone between the international and domestic areas in the airports.  I did call Air Astana's New Delhi office and they said that a transit visa is required. Again I emailed them, and this time they said for any visa related query to contact the Kazakh Embassy in New Delhi. I called the Kazakh Embassy and all the gentleman kept saying was "Yes Yes Yes". Not sure if he understood what I was asking. I am even not sure if anyone in Air Astana understood me as well. I guess everyone thinks that I want to step outside the airport and see around. The fact is I am not interested. I just feel that paying US$ 90 for a transit visa is too expensive (being the fact that I am not even stepping outside the airport and just transiting the country for a mere 12 hours).  Can anyone help me? Has anyone traveled this route recently or have any answers to my doubts? I would be very appreciative.

I am an Indian citizen. I will be travelling to Russia but I need to wait in Almaty airport 13 hours for my next flight to Russia. I will not be leaving Almaty airport. So in this case do I need a transit visa ?


this might look like a simple question but I could not figure out the solution.  Assuming I have this list  my_list = [1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99]   I am attempting to slice item in this list and increment it by index. In short, I want to get the result like this  [1, 2, 3] [2, 3, 4] [3, 4, 5] [4, 5, 6] [5, 6, 7] [6, 7, 8] [7, 8, 9] [8, 9, 11] [9, 11, 22] [11, 22, 33] [22, 33, 44] [33, 44, 55] [44, 55, 66] [55, 66, 77] [66, 77, 88] [77, 88, 99]   But what I got is like this  [1, 2, 3] [2, 3, 4] [3, 4, 5] [4, 5, 6] [5, 6, 7] [6, 7, 8] [7, 8, 9] [8, 9, 11] [9, 11, 22] [11, 22, 33] [22, 33, 44] [33, 44, 55] [44, 55, 66] [55, 66, 77] [66, 77, 88] [77, 88, 99] [88, 99] [99]   I want to slice my_list to several smaller set each with length of 3. But the result I got also included the list that have length below than 3.  This is the python script I use  my_list = [1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99]  m = 0  def incr():     global m     for n in range(len(my_list)):         if n < len(my_list):             n = m + 3             new_list = my_list[m:n]             print new_list             m+=1         else:             pass  incr()   I figured that I could add if len(new_list) < 3 but I do not quite sure how should I modify the script for that.  Thank you for your help.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


One of the properties is that $e^{{\bf A}+{\bf B}}\neq e^{\bf A}e^{\bf B}$ unless ${\bf AB}$$={\bf BA}$. Can someone please explain how exactly commutativity matters in this case? I'm guessing it has something to do with series multiplication?

definition  Let $A$ be an $n\times n$ matrix. Then for $t\in \mathbb R$, $$e^{At}=\sum_{k=0}^\infty \frac{A^kt^k}{k!}\tag{1}$$  Proposition  If $S$ and $T$ are linear transformations on $\mathbb R^n$ which commute, then $e^{S+T}=e^Se^T$.  Proof  By binomial therem, $$(S+T)^n=\sum_{j+k=0}^n n! \frac{S^jT^k}{j!k!}$$  therefore,  $$e^{S+T}=\sum_{n=0}^\infty\sum_{j+k=0}^n \frac{S^jT^k}{j!k!}=\sum_{j=0}^\infty \frac {S^j}{j!}\sum_{k=0}^\infty \frac{T^k}{k!}=e^Se^T$$  In the above steps I have used cauchy product and binomial theorem and the absolute convergence of the two series.   But My doubt is..  Where we have used the condition that $ST=TS$, i.e, commutativity?


I have a directory called assets and it contains a file structure similar to this:  ├── a │   ├── b │   │   ├── c.png │   │   └── d.png │   └── b2 │       ├── e.png │       ├── f.png │       └── g.png └── a2     └── b3         └── h.png   How can I change the name of all the images in this structure to the pattern NAME_old.png where NAME is the original name of the file? (For example, c.png would be changed to c_old.png)  I have a feeling that it has something to do with sed/awk/grep and using pipes, but I haven't the faintest idea how to use these tools and reading documentation doesn't really help.

I've got around 360 000 files like:  ./001/1/1.jpg ./001/1/2.jpg ./001/2/1.jpg ./002/1/1.jpg ./003/1/1.jpg ... pattern: [60 dirs]/[1000 subdirs]/[4-10 files].jpg   I want to rename files using rename for example from *.jpg to *.jpeg. I can't do it with single rename, because I get the error argument list is too long.  Searching for solution, I figured out this, but it renames nothing:  find -maxdepth 2 -mindepth 2 -type d -exec rename -n 's/jpg/jpeg/' {}/* \;  When I check if the {} is expanded replacing rename with echo:  find -maxdepth 2 -mindepth 2 -type d -exec echo "rename -n 's/jpg/jpeg/' {}/*" \;  I get expected result:  rename -n 's/jpg/jpeg/' ./061/61430/* rename -n 's/jpg/jpeg/' ./061/61431/* ...   If I run any of these rename commands, I rename works. So the should be problem with the {}.  Thank you for help!


I am an Indonesian citizen. On May 29th I've returned from a 30-day trip to Singapore. I plan to visit Singapore again on the 13th of June for another 30 days.  Would this cause any problems at the border?

Last month my Singapore tourist visa expired, so I returned to India.    After 1 month I am planning to apply for a new Singapore visa. Is it possible to be granted a new visa that quickly? How long am I supposed to  wait to re-apply for one?


Assume $a_i, b_i$ are positive reals for $i = 1,2,...,n.$ Show that $$(\prod_{i=1}^{n} (a_i+b_i))^{\frac{1}{n}} \geq (\prod_{i=1}^{n} {a_i})^{\frac{1}{n}}+(\prod_{i=1}^{n} {b_i})^{\frac{1}{n}}.$$   I tried applying AM-GM to this product in some way, seeing that there is a product of $n$ terms and an exponent of $\frac{1}{n}.$ However, applying it directly only gives $$\frac{1}{n}\sum_{i=1}^{n} (a_i+b_i) \geq (\prod_{i=1}^{n} (a_i+b_i))^{\frac{1}{n}}$$ and $$\frac{1}{n}\sum_{i=1}^{n} a_i + \frac{1}{n}\sum_{i=1}^{n} b_i\geq (\prod_{i=1}^{n} {a_i})^{\frac{1}{n}}+(\prod_{i=1}^{n} {b_i})^{\frac{1}{n}},$$ which isn't helpful whatsoever. I can't think of other helpful inequalities that deal with sequence products like this, so I'm currently stuck trying to manipulate the expression and apply AM-GM somehow, but can't find a good way.

consider positive numbers $a_1,a_2,a_3,\ldots,a_n$ and $b_1,b_2,\ldots,b_n$. does the following in-equality holds and if it does then how to prove it  $\left[(a_1+b_1)(a_2+b_2)\cdots(a_n+b_n)\right]^{1/n}\ge \left(a_1a_2\cdots a_n\right)^{1/n}+\left(b_1b_2\cdots b_n\right)^{1/n}$


You toss a fair coin until you toss two consecutive heads. Find the probability that you have to toss the coins exactly 4 times.

I have a pretty basic probability question, but I'm just having difficulties remembering what distribution this is.  A coin is tossed until a head appears two times in a row. Given that we are using a fair coin, what is the probability that we toss the coin exactly 4 times such that the two consecutive heads are the 3rd and 4th trials?  I know that this would be fairly easy to solve by brute force and listing out the different probabilities, but I'm a little confused as to how to use a "shortcut" such as identifying this as a binomial distribution. I also don't know how to account for the probability that we are using 4 tosses.  Any help is appreciated. Thanks!


$\lim_{n \to \infty} n[(1+\frac{1}{n})^n - e]$  I let, $x = \frac{1}{n}$, then as   $\lim_{x \to 0} \frac{1}{x}[(1+x)^\frac{1}{x} - e] = \infty$  L'hopital's: $\lim_{x \to 0} \frac{\frac{1}{x}(1+x)^{\frac{1}{x}-1}}{1} = \frac{1}{0}(1+0)^{\frac{1}{0}-1} = \infty$  Again, if we apply L'hopital's: $\lim_{x \to 0} \frac{\frac{1}{x}(1+x)^{\frac{1}{x}-1}}{x+(1+x)}$. This is also going to $\infty$ as $x \to 0$. But, I know the answer is $\frac{-e}{2}$, and I am not even close. Can anyone please find me the mistakes here. Oh, I am supposed to use L'Hopital's rule.

I am stuck on how to calculate the following limit: $$\lim_{x\to\infty}x\left(\left(1 + \frac{1}{x}\right)^x - e\right).$$  Definitely, it has to be through l'Hôpital's rule. We know that $\lim_{x\to\infty} (1+(1/x))^x = e$. So, I wrote the above expression as $$\lim_{x\to\infty}\frac{\left(1 + \frac{1}{x}\right)^x - e}{1/x}.$$Both numerator and denominator tend to zero as x tends to infinity. I applied l'Hôpital's rule twice, but I got the limit equal to infinity which is clearly wrong. In the book, it says that the limit should be $-e/2$.  Any help please? Also, in case someone managed to solve it, please tell me which numerator and denominator did you apply your l'Hôpital's rule to in both cases? Thanks a lot  Also, guys can you tell me how to write equations in this forum? Thanks.


I work in an office as "kind of" an IT person. I have lots of hardware/software experience, but not in any enterprise capacity.  There are 140 computers total, and they want me to update all of them to Windows 7 (currently on Windows XP). They are all networked. I have created a custom ISO with all the pre-installed software they use. I want to push all of these out to install Windows 7 all at once rather than going from computer to computer.  What is the easiest/fastest/best method of achieving this? I am new to this type of work, so I could use lots of resources tips.

In my company we have 8 laptops that we use to deploy on the field. These machines get assigned to a user for a certain time and run Windows Vista. All the machines are the same model.  After the machine is returned, it is company policy to completely format the machine and go back to a predetermined configuration. Right now, what we do is we use the recovery utility in the laptop (we are a small shop so we use the OEM Windows license that the laptops come with) and manually uninstall and change the configuration in order to bring it to our baseline config.  I know that there are ways to create an image that gets copied to the hard drive with a specific configuration and with specific software installed (that's what OEMs do right?).  I'm looking for a tool or a tutorial or something that explains as simply as possible how to create such an image.


I am new to using Ubuntu, and know very little about using it to its full potential. I am using the 16.04 LTS version, and I recently learned about the mere existence of apt package management. I was looking into running a few windows applications on linux, and ended up trying to use PlayOnLiux. When I installed with "sudo apt install", I noticed that running "sudo apt update" worked as normal but with an added line:  W: http://deb.playonlinux.com/dists/trusty/InRelease: Signature by key 74F7358425EEB6176094C884E0F72778C4676186 uses weak digest algorithm (SHA1)   I did find a few ways to avoid getting this message in the depths of these forums, but I was hoping to understand what exactly happens to give this message, and how I can fix it (rather than just silencing it).   Any help is appreciated, and I do apologize in advance if this question was already answered somewhere that I missed. Thanks!  Edit: Thanks, I see. I don't really have the ability to fix it, because it is not on my end.

I started setting up by adding repositories and then went to run a sudo apt-get update again before I started installing other software, and I get the Signature key lines and it stops. So it essentially won't let me update any packages now.  d@EliteBook:~/Downloads$ sudo apt-get update Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://dl.google.com/linux/chrome/deb stable Release                      Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease               Get:5 http://ca.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:6 http://ca.archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:7 http://ca.archive.ubuntu.com/ubuntu xenial-backports InRelease Fetched 247 kB in 0s (256 kB/s)                    Reading package lists... Done W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by  key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1) d@EliteBook:~/Downloads$   I've never seen this before whenever I setup and start installing things in Ubuntu. Is there something else I can do?


How can I make the minipage/framebox page justified, so it stop the badness underfull warnings?    The warnings are:  Bad Boxes:  D:\test2.tex:23: Underfull \hbox (badness 10000) in paragraph at lines 23--23[]\OT1/cmtt/m/n/10 Lembre-se: a ficha de identificao da obra elaborada D:\test2.tex:23: Underfull \hbox (badness 10000) in paragraph at lines 23--23\OT1/cmtt/m/n/10 pelo autor deve constar no verso da folha de rosto D:\test2.tex:23: Underfull \hbox (badness 10000) in paragraph at lines 23--23\OT1/cmtt/m/n/10 de teses e dissertaes de modo a possibilitar sua D:\test2.tex:23: Underfull \hbox (badness 10000) in paragraph at lines 23--23\OT1/cmtt/m/n/10 representao precisa pelas informaes de autor, ttulo,   For the sample code:  \documentclass[10pt,openright,twoside,a5paper]{memoir} \usepackage[showframe]{geometry} \usepackage[brazil]{babel}  \begin{document}  \begin{center}  \hspace*{1cm} {Catalogação na fonte pela Biblioteca Universitária da Universidade Universitária da Universidade.}  \framebox[\textwidth] {     \begin{minipage}{\textwidth}          \ttfamily          Lembre-se: a ficha de identificação da obra elaborada pelo autor deve constar no         verso da folha de rosto de teses e dissertações de modo a possibilitar sua         representação precisa pelas informações de autor, título, local, data, número de         folhas, assunto, etc.      \end{minipage} }  \end{center}  \end{document}

Edit I think this differes slightly from the linked "duplicate" as here are paragraphs formatted as typewriter, using \ttfamily while in the duplicate there are  a lot of "common words" in typewriter font sprinkled around his text.  The solution is of course similar, but "Heiko Oberdiek", marked answer here, gave a nice working example and explanation regarding this problem. Personally I had problems understanding what parts of the suggested codes in the "duplicate" question were necessary to solve my issue. Original Question I recently have some bigger texts I want to put into \ttfamily. However, I noticed wordbreaking isn't really working and did some research to add these lines: \setlength{\emergencystretch}{2em} \newcommand{\origttfamily}{}% \let\origttfamily=\ttfamily% \renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}  Also using english option in a memoir-class and babel-package. This is somewhat helping as there is some wordbreaking and space-stretching happening now, but in the end, most paragraphs are looking more like left-aligned than justified. and there are still some lines going over the defined borders. Here is a minimal example with 2 longer text-passages, one in plain and one in ttfamily. \documentclass[english,11pt,oneside,article,a5]{memoir} \usepackage[english]{babel} \usepackage{geometry}   \setlength{\emergencystretch}{2em} \newcommand{\origttfamily}{}% \let\origttfamily=\ttfamily % \renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}  \geometry{left=20mm,right=20mm, top=20mm, bottom=50mm} \OnehalfSpacing \leftskip3em\rightskip2em  \begin{document} $>$She didn’t want to spend the time trying to locate them, or try to thin out the operator’s patience for Alison doing whatever. She expects they are already rather sour at her burrowing a tunnel through most of the building’s ﬂoors to make that railgun using an enormous amount of jetalium. If she gets a chance later, though, to come back to this place, she’ll put rescuing Loviro on the table.  \\{}\ttfamily According to the engineer, they are most likely tethers to launch things cheaply into space, given how high they go. Although, Alison does come by close enough to see one to see a revolving restaurant at the top of it, so tossing stuff into space may not be its only function. \end{document}  Did I to something wrong in using ttfamily like this?


I am reading Introduction to Statistical Learning by James et al (freely available on their ). In the section the quote below is taken from, they illustrate how $t$-statistic is used to test the null hypothesis.  Now, I understand the definition of the $t$-statistic. But, I am having trouble wrapping my head around the definition of the $p$-value; particularly, in the quoted text below, which value are they exactly talking about?     Consequently, it is a simple matter to compute the probability of observing any value equal to $|t|$ or larger, assuming $\beta_1 = 0.$   In other words, I would like to know how, in Table 3.1, p.68, the $p$-value obtained?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


My friend says she wants me to describe her in one word and I think she does not care about anything most of the time. So I'm looking for a word that describes that.

A pessimist is someone who always considers negative outcomes of a situation, whereas an optimist always considers the positive outcomes. Is there a word for someone who, in any given situation, doesn't care about the outcome at all?


I received value from Apex  as,  {"data":{"Id":"a002E00000ZKKbGQAX","Name":"FCS Group","Frequency__c":"Monthly",}}  and I want to fetch the value of frequency, Below is the code I tried,  this.strtest=JSON.stringify(data);//outpu is as shown json format console.log('data=='+this.strtest.data);undefined

Below is the code tried,  @wire(getObjectDetails)     wiredResult(data,error) {          if(data){             console.log('DateOfRun-->',data);             this.lstRecs=data;             console.log('values len-->',this.lstRecs);             console.log('values -->',this.lstRecs.values);         } else if(error){             console.log('error -->'+error);            }     }    I am getting data as [object Object],But would like to fetch the values of a record.  i tried below:   @wire(getObjectDetails)     wiredResult(data,error) {          if(data){             console.log('DateOfRun-->',data);//[object object]             this.lstRecs=data;             console.log('values len-->',JSON.stringify(data));//Getting json value             this.strtest=JSON.stringify(data);             console.log('data=='+this.strtest.data);//undefined          } else if(error){             console.log('error -->'+error);            }     }


does the series $\sum \frac{8n}{(\log n)^n}$ converge or diverge? I've 'tried' using the root test but I just can't seem to get my head around the log in the denominator and what rules to apply because of it. Can anyone help me out here please? Thanks.

Study the convergence of the following series: $$\sum_{n=2}^\infty \frac{1}{n^\alpha \cdot\ln^\beta(n)} \text{ where }\alpha,\beta \geq 0 $$   Applying d'Alembert criterion I have that $$ \lim_{n\to\infty} \frac{n^\alpha  \ln^\beta(n)}{(n+1)^\alpha  \ln^\beta (n+1)} = \lim_{n\to\infty} \left(\frac{n}{n+1}\right)^\alpha\left(\frac{\ln(n)}{\ln (n+1)}\right)^\beta = 1$$ so the nature of the series is inconclusive.  If $\alpha = \beta = 0$, then the series diverges, since $\sum_{n=2}^\infty 1 = \infty$.  Should I study the rest of the cases (i.e. if $\alpha = 0, \beta > 0$ the root test and the ratio test are also inconclusive). What is the best form to study the series?.  Thanks in advance


Suppose there are two lists:  ['a', 'b', 'c'], ['d', 'e', 'f']   what I want is:  'ad','ae','af','bd','be','bf','cd','ce','cf'    first_list = ['a', 'b', 'c'] second_list = ['d', 'e', 'f'] combined_list = [] for i in first_list:     for j in second_list:         combined_list.append(i + j) print(combined_list)   my question is if there are not only two lists, how to improve the code? for example,  first_list = ['a', 'b', 'c'] second_list = ['d', 'e', 'f'] third_list = ['g','h','q'] print ['adg','adh','adq','aeg','aeh',.......]   guys,are there any generalizable ways to show n lists..I mean what if there are more than three lists?

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


I read a childrens' scifi book in the 60s about a young boy whose parents (I think) were scientists. I think they were working on interdimensional travel before he is born, and when he is born he is gifted. He finds that he is able to 'turn sideways' into another dimension of geometrical shapes and he becomes made up of geometrical shapes too, and travels through it.  I'm pretty sure he slips or turns into that dimension when other scientists are after him to study him.  The cover had a line drawing of a boy made up of geometrical shapes. Help? It's driving me nuts.

In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly.  I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one:  Scientists had invented a device which they didn't fully understand, and which had puzzling effects.  For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside.  When people went into the machine, they came back dead, having died from fright.  Finally they sent a very open-minded person into the machine.  She was an artist, I think.  She was able to return alive, and described an alternate universe in which geometry was very different.  I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares?  (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.)  Thanks!


I have two MySQL tables where the primary relationship between the two is one-to-many. I also need a one-to-one relationship in the parent_table with the ID for the primary record from the child_table. You can kind of think of it as like a dad having lots of kids but having one kid that's his favorite ;P. Is it possible to setup a DB constraint such that a parent can have the ID of a child only if that child is a child of the parent?  parent_table (One)   id: Primary Key   primary_child_id: {ID from child table}  child_table (Many)   id: Primary Key   parent_table: {ID from parent table}

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as questions on this site, children as answers, and favorite as the accepted answer.) For example,  TableA     Id            INT PRIMARY KEY  TableB     Id            INT PRIMARY KEY     Parent        INT NOT NULL FOREIGN KEY REFERENCES TableA.Id   The way I see it, I can either add the following column to TableA:      FavoriteChild INT NULL FOREIGN KEY REFERENCES TableB.Id   or the following column to TableB:      IsFavorite    BIT NOT NULL   The problem with the first approach is that it introduces a nullable foreign key, which, I understand, is not in normalized form. The problem with the second approach is that more work needs to be done to ensure that at most one child is the favorite.  What sort of criteria should I use to determine which approach to use? Or, are there other approaches I am not considering?  I am using SQL Server 2012.


I know that $p \choose k$ is divisible by $p$ for all $k \in \{1, 2, \ldots,p-1\}$. But I am trying to work on a generalization as in the title but do not know how to prove it.

Prove that for every $n\geq m \geq1$ natural numbers, the following number is an integer:  $${\gcd(n,m)\over n}\cdot{n\choose m}$$  Where $\gcd$ is the greatest common divisor.  I tried to make it simpler by cancelling the $n$ from the left side, and making it $(n-1)!$ on the right: $\gcd(n, m) \cdot \frac{(n-1)!}{m!(n-m)!}$, but can't really go further.   This was problem B-2 on the .


I'm using GitHub as project repository for ios project. But whenever I'm trying to pull project from xcode 8 I'm getting the following error:     The files .DS_Store and .DS_Store had a tree conflict   Any solution?

How can I remove those annoying Mac OS X .DS_Store files from a Git repository?


03-13 15:27:57.592: I/Process(1985): Sending signal. PID: 1985 SIG: 9 03-13 15:27:58.558: D/AndroidRuntime(2062): Shutting down VM 03-13 15:27:58.558: E/AndroidRuntime(2062): FATAL EXCEPTION: main 03-13 15:27:58.558: E/AndroidRuntime(2062): Process: com.example.cabbookinghome, PID: 2062 03-13 15:27:58.558: E/AndroidRuntime(2062): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable; 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:106) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:99) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at com.example.cabbookinghome.SplashActivity.onCreate(SplashActivity.java:38) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.Activity.performCreate(Activity.java:5933) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.ActivityThread.access$800(ActivityThread.java:144) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.os.Handler.dispatchMessage(Handler.java:102) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.os.Looper.loop(Looper.java:135) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at android.app.ActivityThread.main(ActivityThread.java:5221) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at java.lang.reflect.Method.invoke(Native Method) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at java.lang.reflect.Method.invoke(Method.java:372) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 03-13 15:27:58.558: E/AndroidRuntime(2062): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/com.example.cabbookinghome-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 03-13 15:27:58.558: E/AndroidRuntime(2062):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 03-13 15:27:58.558: E/AndroidRuntime(2062):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 03-13 15:27:58.558: E/AndroidRuntime(2062):     ... 17 more 03-13 15:27:58.558: E/AndroidRuntime(2062):     Suppressed: java.lang.ClassNotFoundException: android.support.v7.appcompat.R$styleable 03-13 15:27:58.558: E/AndroidRuntime(2062):         at java.lang.Class.classForName(Native Method) 03-13 15:27:58.558: E/AndroidRuntime(2062):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 03-13 15:27:58.558: E/AndroidRuntime(2062):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 03-13 15:27:58.558: E/AndroidRuntime(2062):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 03-13 15:27:58.558: E/AndroidRuntime(2062):         ... 18 more 03-13 15:27:58.558: E/AndroidRuntime(2062):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available   can someone here tell me whats wrong or why i'm getting no class error?

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I have a thread that will check if a file exists before doing any computation.   FileSystem fs = ... Path filenamePath = new Path(file.getID() + "file.txt"); try {      while(!fs.exists(filenamePath)){          Thread.sleep(1000);      }  } catch (InterruptedException e){    }   The problem is that my thread throws the error NulPointerException and never gets interrupted. The null exception becasue filenamePath is null. What should I do in this case? Am I doing something wrong?  The stack trace doesn't show anything useful except showing the line  ERROR [CheckFilesThread] compute.files.app.FirstApp: Exception in CheckFilesThread java.lang.NullPointerException     at compute.files.app.FirstApp$CheckFilesThread.run(FirstApp.java:211)

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


I want to prove or disprove that $x\sin(\frac{1}{x}),\;0<x<\infty$ is uniformly continuous. Can anyone please, help me?

For the $f(x) = x \sin{\frac{1}{x}}$ for $x \neq 0$ and $f(0) = 0,$ my text book asks the following questions.  (b) Why is $f$ uniformly continuous on any bounded subset of $\mathbb{R}$?   (c) Is $f$ uniformly continuous on $\mathbb{R}$??  The graph for the function is this.    For the question (b), if I take subset between $[0.2,0.6]$ or the subset where the slope is steep, I don't think the function is uniformly continuous because I think for a given $\epsilon>0$, there is no unique $\delta >0$ for the bounded subset. Therefore, it also cannot be uniformly continuous on $\mathbb{R}.$ However, the questions sounds like the function is uniformly continuous and the book says that it is uniformly continuous. The answer on the book says something but I need more explanation. Thanks.


Well, this might seem like a meta . :)  I have a question regarding an application that I have been using. I can't ask that question on  because it is not on programming. I am not sure if I can ask that on . Is it okay to share that question here on  to understand which is the best SE site to ask it on?

If I have a specific question I want to ask about, but I don't know which Stack Exchange site would be on topic for asking that question, where can I ask where to ask that question?  Is there any generic place where we can ask for advice? Is it here?  This is not about a specific question but in general.  For example: "Where should I ask for advice about fishing?", or if I need to know where I should ask "What would be the best fishing rod to fish for salmon?" (regardless of how good/bad these examples are)


What is an example of a sequence $X_1,X_2,...$ such that $X_n\rightarrow X$ in probability, but $\mathbb{E}(X_n)$ does not converge to $\mathbb{E}(X)$?

Let $\{X_n\}_{n=1}^\infty$ be a sequence of random variables converging to a random variable $X$. Does this fact implies that $\lim\limits_{n\to \infty} EX_n = EX$?  If not, is there any other sufficient condition?


How can we prove that  $\displaystyle \lim_{n\to\infty}  \sum_{k=0}^{n} \frac{{n \choose k}}{n^{k}(k+3)} = e-2$  ?  The only thing that came to my mind was writing out a few terms to see where that could get me, but I'm not able to make much progres. Any help in the form of hints or a solution would be appreciated.

Evaluate $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)}$.   $\bf{My\; Try::}$ Although we can solve it by converting into definite Integration.  But I want to solve it without Using Integration.  So $\displaystyle \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{\binom{n}{k}}{n^k(k+3)} = \lim_{n\rightarrow \infty}\sum^{n}_{k=0}\frac{(n-1)(n-2).......(n-k+1)}{k!\cdot n^{k}\cdot (k+3)}$  Now How can i solve after that, Help required, Thanks


In    <!DOCTYPE html>   <title> 51 Pegasi Studios </title> <link rel="icon" href="file:///D:/Files/51PEGASI/icon.png">
      HOME   ABOUT   GAME DESIGN   GAME DEV   PROGRAMMING   MUSIC
         I want the image to be centered vertically, similar to the text buttons, on the same line as them. I've tried messing around with different alignments and such, but to no success. I'm assuming there's a way to go about doing it without having to use a different method than I did with the text.   is what it looks like in practice.

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I have seen in a lot of places that spices and dried herbs need to be kept in an airtight container.  I have several container that are virtually airtight, but they have couple small holes that if filled with liquid and put upside down it would drip slowly.  Is there any harm in storing spices in this condition?  Is it safe to store spices like that?  Can this very small amount of air be detrimental?

Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight.


A lot of the time when people ask questions, their example code has unrelated issues in it which I feel a moral obligation to tell them about.   A good example of this is when someone asks why an SQL query is not working, yet unrelated to why it's not working is a huge injection vulnerability.  It happens so frequently I sometimes wonder why the site isn't named SQL Injection Overflow.  So I guess the long and short of it is, should you suggest things that are unrelated to their core issue which might possibly confuse them?

Is answering beyond the scope of the question a valid thing? Or should we just stick to the question asked and ignore any potential bugs which might be present (of course OP is unaware of that, as of now).  To make myself more clear, please have a look at this .  There are 3 answers which talk about the issue asked and that's it. If you look at my answer, I've added an additional point about a potential bug which the OP has missed now (may find out later). So is it a good thing to point out such potential bugs or not? Should this practice be encouraged?


I want zsh to recommend packages to install if I insert a command whose package is not installed like in Bash.   Like

I'm trying to get the command-not-found feature under Ubuntu to work under zsh, without luck:  ➜  ~  pdfunite zsh: command not found: pdfunite ➜  ~  bash u@ub:~$ pdfunite The program 'pdfunite' is currently not installed.  You can install it by typing: sudo apt-get install poppler-utils   Does anyone know if there is a package available that also supports zsh?  Thank you.


I am currently reading  by James, Witten, Hastie, and Tibshirani, and I am stuck on one of the leaps they take when defining reducible and irreducible error. They state that for a given set of input and output variable $X$ and $Y$, respectively, there is a function $f$ which we estimate, defined as $\hat f$. Using $\hat f$ we then obtain the our predictions of $Y$ which is called $\hat{Y}$ such that $\hat Y = \hat f(X)$. On page 19, equation 2.3, they give the following equation:  $$E(Y - \hat Y)^2 = E[f(X) + \epsilon - \hat f(X)]^2$$ $$ = [f(X) - \hat f(X)]^2 + Var(\epsilon)$$  They then go on to say that $[f(X) - \hat f(X)]^2$ is the reducible error while $Var(\epsilon)$ is the irreducible error.  I am by no means a mathematician and have tried some derivations but cannot reach that conclusion on my own, particularly in deriving $Var(\epsilon)$. Thank you.

This section of Introduction to Statistical Learning in R (page 19 in v6, statement 2.3) is motivating the difference between reducible and irreducible error (that is noted by $\epsilon$ and has mean zero).  Consider a given estimate $\hat{f}$ and a set of predictors $X$, which yields the prediction $\hat{Y} = \hat{f}(X)$. Assume for a moment that both $\hat{f}$ and $\hat{X}$ are fixed. Then, it is easy to show that $E(Y - \hat{Y})^2 = E[f(X) + \epsilon - \hat{f}(X)]^2$ $= [f(X) - \hat{f}(X)]^2 + Var(\epsilon)$  I'm having trouble getting the intermediate steps here. I understand that the expectation of the error in prediction should involve the variance of $\epsilon$ but I'd like to understand the proof. I expanded to $E(Y - \hat{Y})^2 = E[f(X) - \hat{f}(X)]^2 + 2E(\epsilon)E[f(X) - \hat{f}(X)] + E(\epsilon)^2$ and I see that I have $E(\epsilon)$ and $E(\epsilon)^2$ terms that could lead to $Var(\epsilon)$, but I'm stuck trying to fit some of the basic expected value and variance manipulations to it.


here is the list that I want to merge l = [3.23, 5.32, 8.23, 2.23, 9.98, 7.43, 6.43, 8.23, 4.23]  the list has to be sorted from high to low l.sort() l.reverse  I need this as a result p = [(9.98, 8.23, 8.23, 7.43), (6.43, 5.32, 4.23, 3.23), (2.23,)]  Can someone help me do this in python?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Consider the following code:   #include<stdio.h> #define k 0.7 #define p 0.5 int main() {     float a=k,b=p;     double aa=k;     if(a<k)     {          if(b<p) printf("2 is right");              else      printf("1 is right");     }     else printf("0 is right");     printf("\n");     if(a>k)     {          if(b<p) printf("2 is right");              else      printf("1 is right");     }     else printf("0 is right");     return 0; }   Consider this as part II of  question, here the understanding was that the double precision values of floating point constants (doubles when represented as numeric constants) was lost when it was converted to their corresponding floating point values. The exceptional values were X.5 and X.0. But I observed the following results:  Input           Output K=0.1 to 0.4        0 is right                     1 is right  K=0.5               0 is right                     1 is right  K=0.6               0 is right                     1 is right  K=0.7               1 is right                     0 is right  K=0.8               0 is right                     1 is right  K=0.9               1 is right                     0 is right  K=8.4               1 is right                     0 is right   Why is this queer behavior? How come only few floating point values are displaying this property? Can't we assume that float precision values are always less than double precision values?? How do we explain this behavior?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


How can I find this font to download and use it? Please I really need it. It reads "LaTeX default" and is a serif font but I cannot find it.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Note that this is NOT only about points. The "duplicate" question is asking for a SO reputation-based limitation. This is asking rather for a more sophisticated conditions.  I have had a very bad experience with some newbies in different areas which clutter my question with invalid answers and comments on an expert topic, then start a useless discussion, and vote down in the end.  I don't mind them voting down, but I am getting tired of asking people not to answer with "Wrong and obvious answer 1" or "Wrong and obvious answer 2", and then explaining to them why their answer is not what I need, because they don't even know enough about the topic to get the question. This is simply not how Stack Overflow should work.  I'd like to be able to set some (per-question) limits on ratio of accepted answers to certain tags, or ratio of upvotes vs. downvotes on some tags, or other criteria, to allow the user to answer (NOT vote). I'm okay with getting fewer but higher-quality answers rather than (just as a made up example) something like "You can't do sqrt(-1)", which ignores irrational numbers.  Is that possible now? If not, may I suggest that?

Suppose I wish to allow only users who have scored at least 15 in the particular tag to answer my question, Is it possible to set a condition like this while asking a question? So that I can avoid strangers/answers from dummy users.


How does $\Bbb Z[X]/(2, X^2+1)$ look like? I've got a problem that asks a proof for the fact that this ring has $4$ elements, yet it's not isomorphic with $\Bbb Z_2 \times  \Bbb Z_2$, but I can't even understand how this set looks like.

I'm interested in the following problem from Artin's Algebra text:     Determine the structure of the ring $\mathbb Z[x]/(x^2 + 3,p)$, where (a) p = 3, (b) p = 5.   I know that by the isomorphism theorems for rings we can take the quotients successively, and so  $$\mathbb{Z}[x]/(p) \cong (\mathbb{Z}/p \mathbb{Z})[x] $$  as the map $\mathbb{Z}[x] \to (\mathbb{Z}/p \mathbb{Z})[x]$ defined by $\sum_{n} a_n x^n \mapsto \sum_{n} \overline{a_n} x^n$ is a surjective ring homomorphism with kernel $(p)$. Thus it remains to study the quotients  $$(\mathbb{Z}/p \mathbb{Z})[x]/(x^2+3) $$ for $p \in \{3,5\}$.    If $p=3$, $(x^2+3)=(x^2)$ in $(\mathbb{Z}/3 \mathbb{Z})[x]$, and by using polynomial division all distinct coset representatives can be reduced to the following list of 9 elements  $$\{0,1,2,x,1+x,2+x,2x,1+2x,2+2x\}. $$  Moreover, it can shown that the list above gives 9 distinct cosets, as no difference of two distinct elements of the list is a multiple of $x^2$. Since $1$ and $x$ generate two distinct additive groups of order $3$, the additive group of our quotient ring is not cyclic. Elementary group theory then shows   $$(\mathbb{Z}/3 \mathbb{Z})[x]/(x^2)^+ \cong (\mathbb{Z}/ 3 \mathbb{Z})^2 $$  as additive groups.   I was then about to conclude that the multiplication on the quotient is then compatible with the usual one in $(\mathbb{Z}/3\mathbb{Z})^2$, but this is wrong!  It can be seen that the quotient is not isomorphic to $(\mathbb{Z}/3\mathbb{Z})^2$ as a ring, because the former contains a nonzero element (represented by $x$) whose square is zero, while the latter contains no such elements.    If $p=5$, a full list of coset representatives is of length 25  $$\{0,1,2,3,4,x,1+x,2+x,3+x,4+x,2x,1+2x,2+2x,3+2x,4+2x,3x,1+3x,2+3x,3+3x,4+3x,4x,1+4x,2+4x,3+4x,4+4x \} .$$  And once again, one can see that these represent 25 distinct cosets. Similarly to the $p=5$ case, I've managed to prove that the additive group of this ring is isomorphic to $(\mathbb{Z}/5 \mathbb{Z})^2$.    My questions:   Have I made any mistakes in my argument? What exactly am I supposed to do in this question? determine the number of elements? Write down the tables for addition and multiplication?   Any further information about these quotients will be appreciated, thanks!


It's well known that AES cryptography algorithm uses Galois Field $GF(2^8)$ multiplication to process the step MixColumn, and each column of the 4x4 matrix on encrypting should multiply the polynomial $3X^3 + X^2 + X + 2$ which is usually notated as an array $\{\tt 0x03, 0x01, 0x01, 0x02\}$, while on decrypting, the matrix should multiply the inverse of the polynominal mentioned above, namely $\texttt{0x0B}X^3 + \texttt{0x0D}X^2 + \texttt{0x09}X + \texttt{0x0E}$ which can also notated as an array $\{\tt 0x0B, 0x0D, 0x09, 0x0E\}$.  Now I wonder If only one polynomial is known, e.g. $\{\tt 0x03, 0x01, 0x01, 0x02\}$, how can I compute its inverse mod $(X^4 + 1)$, namely $\{\tt 0x0B, 0x0D, 0x09, 0x0E\}$, and vice versa.


I am banned from asking questions due to having no rating on three questions, this doesn't really seem necessary.  My questions were valid, except no one up voted them, so this leads me to question ban?  If anyone can help me not do this in the future and help me out right now, please do!  Thanks!

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I was checking a "dead" outlet for friend. Bottom reads 120volts on hot to ground but top receptacle reads 50 volts hot to ground until the wall switch is flipped then it reads 120volts. Whiskey tango??

I am trying to put in a switch and a light it controls in a storage building and  is how I wired it.   Click for larger view  When I checked the wiring it registered 120V when the switch was on, and right around 50V when the switch was off.  Why would power still be getting to the light (I'm guessing there is a problem with the switch) and why would it only be 50V?  Oh, and where everything branches off at the beginning I have a junction box there where all of the wires are joined there.


I just got a new laptop and was installing all the Windows updates (including driver updates) to it.  One of the driver updates failed.  Windows update tells me that one did, but not which one (other than it was a driver update and maybe I have a better one already installed, but it will keep trying).  I looked through update history, but cannot find one listed as failed. I just want to turn off that update and not have it keep trying.  But I don't know how to find which one it was, nor how to turn it off. Exact message: A current driver on your PC may be better than the driver we're trying to install. We'll keep trying to install. (And, I just want to say, stop trying....)

This has happened multiple times now - when I shut off my Aspire 7741G-6426 laptop (running Windows 7 and 8.1) at night, it does Updates and then shuts down.  When I fire it up the next morning, I get this msg:     We couldn't complete the updates. Undoing changes. Don't turn off your computer   Why do the updates keep failing, and why doesn't Windows stop trying to apply the updates in the first place after several failed attempts?  Or are these all different instances of updates? Last night/this morning was the most recent.  So, how can I find out what went wrong with a failed Windows update?  UPDATE  The comment reminded me that I wrote an event log viewer a long time ago. Looking at events within the last day, it gives me:  Type: Warning Source: Microsoft-Windows-ApplicationExperienceInfrastructure Time Generated: 03/20/2015 04:35:50 Message: The application (Microsoft SQL Server (2008 and 2008 R2), from vendor Microsoft) has the following problem: Microsoft SQL Server (2008 and 2008 R2) is not supported on this version of Windows. For more information, contact Microsoft. Machine Name: AcerAndroid User Name: NT AUTHORITY\NETWORK SERVICE  Type: Warning Source: Wlclntfy Time Generated: 03/20/2015 04:36:46 Message: The winlogon notification subscriber <TrustedInstaller> is taking long time to handle the notification event (CreateSession). Machine Name: AcerAndroid  Type: Warning Source: Wlclntfy Time Generated: 03/20/2015 04:38:46 Message: The winlogon notification subscriber <TrustedInstaller> took 180 second(s) to handle the notification event (CreateSession). Machine Name: AcerAndroid  Type: Warning Source: Wlclntfy Time Generated: 03/20/2015 04:38:57 Message: The winlogon notification subscriber <TrustedInstaller> failed a critical notification event. Machine Name: AcerAndroid  Type: Warning Source: Microsoft-Windows-ApplicationExperienceInfrastructure Time Generated: 03/20/2015 04:40:22 Message: The application (Microsoft SQL Server (2008 and 2008 R2), from vendor Microsoft) has the following problem: Microsoft SQL Server (2008 and 2008 R2) is not supported on this version of Windows. For more information, contact Microsoft. Machine Name: AcerAndroid User Name: NT AUTHORITY\NETWORK SERVICE  Type: Warning Source: Wlclntfy Time Generated: 03/20/2015 04:41:21 Message: The winlogon notification subscriber <TrustedInstaller> is taking long time to handle the notification event (CreateSession). Machine Name: AcerAndroid  Type: Warning Source: Wlclntfy Time Generated: 03/20/2015 04:43:06 Message: The winlogon notification subscriber <TrustedInstaller> took 165 second(s) to handle the notification event (CreateSession). Machine Name: AcerAndroid  Type: Warning Source: Microsoft-Windows-ApplicationExperienceInfrastructure Time Generated: 03/20/2015 04:44:37 Message: The application (ATI Catalyst Control Center *, from vendor ATI Technologies Inc) has the following problem: To function properly, ATI Catalyst Control Center * must be reinstalled after you upgrade Windows. Machine Name: AcerAndroid User Name: ACERANDROID\Clay   UPDATE 2  I tried John Ball's suggestion, and got to the "Windows Update History" screen in Windows 8.1, but it was blank. When I went back to Windows 7 mode via Windows key+D, I saw this:    UPDATE 3  The Wolverine's link seemed to have worked. This is what I saw after I ran it:    UPDATE 4  Well, that didn't work, after all: I had the same old problem this morning and starting up my laptop. The link to the zipped contents of C:\Windows\Logs\CBS is


It seems similar but can you guys please answer it that what is a specific difference between degree celsius and celsius degree?

While reading my copy of "Resnick and Halliday", I noticed that the book has made a distinction b/w the terms " degree celsius" and "celsius degree". When I googled this, I was able to find only one matching hit(on the first page), which stated that while degree celsius is the unit for the measured temperature, celsius degree is the unit of the difference in temperature. Is this correct?  Please share your knowledge and help me.


The question is:  A monoatomic gas undergoes a process $PV^3=k$ where k is a constant. Find the heat capacity of the gas.  Problem:  I know how to calculate the heat capacity at constant pressure ($C_p$) and ($C_v$) of a gas but this problem does not ask any of them.  I came to know about this formula:  For a process $PV^n=k$,  $C = (\frac{1}{\gamma - 1}-\frac{1}{n-1})R$   as the solution but found no proof or anything. How can I start to prove it myself?

I found this formula for a , defined by $PV^n = {\rm constant}$, in a book: $$C = \frac R{\gamma-1} + \frac R{1-n} $$ where $C$ is  and $\gamma$ is . I do not know how it was derived, can someone guide me?


I am using Android Studio 4 on Ubuntu 20.04 LTS with Intel Corei3 Processor(Intel® Core™ i3-2120 CPU @ 3.30GHz × 4). After starting Android Studio, more than 90% of physical memory gets used. I am not even using any virtual Device with it but connecting my android phone  by USB to my PC. I have run a Hard Disk Health Check and  Memtest86 to ensure that the RAM and hard disk is not faulty. None of the two reports any errors. Hard Disk Health Check: SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE   1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0   2 Throughput_Performance  0x0005   136   136   054    Pre-fail  Offline      -       93   3 Spin_Up_Time            0x0007   121   121   024    Pre-fail  Always       -       190 (Average 190)   4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       3937   5 Reallocated_Sector_Ct   0x0033   096   096   005    Pre-fail  Always       -       249   7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0   8 Seek_Time_Performance   0x0005   115   115   020    Pre-fail  Offline      -       34   9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       4904  10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0  12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       3937 192 Power-Off_Retract_Count 0x0032   097   097   000    Old_age   Always       -       4568 193 Load_Cycle_Count        0x0012   097   097   000    Old_age   Always       -       4568 194 Temperature_Celsius     0x0002   181   181   000    Old_age   Always       -       33 (Min/Max 18/49) 196 Reallocated_Event_Count 0x0032   093   093   000    Old_age   Always       -       310 197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0 198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0 199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0  SMART Error Log Version: 1 No Errors Logged  Complete report is  Memtest86:  studio64.vmoptions: # Runs JVM in Server mode with more optimizations and resources usage # It may slow down the startup, but if you usually keep IDE running for few hours/days # JVM may profile and optimize IDE better. Feel free to remove this flag. # -server  #Sets the initial memory allocation pool -Xms512m  #Sets the maximum  memory allocation pool -Xmx1G  # Sets the size of the allocated class metadata space that will trigger a GC the first time it # is exceeded, default max value is 350m -XX:MetaspaceSize=512m  Question: How do I optimize the physical memory or do I really need to consider increasing the system memory(RAM)? I have gone through  post but really looking if we have any other workaround. Edit: free.h output               total        used        free      shared  buff/cache   available Mem:          3.5Gi       3.0Gi       122Mi       136Mi       405Mi       161Mi Swap:         2.0Gi       675Mi       1.3Gi

I'm an android developer and have laptop with 4GB RAM. When I compile my project the RAM is used at 100%.    If I add more RAM will it solve the problem?


In "Professor Stewart's Incredible Numbers," by Prof. Ian Stewart, it is claimed that $\mathfrak{c}$, the number of real numbers, is bigger than $\aleph_0$, the number of natural numbers, but     "[h]ow much bigger is moot: it depends on which axiom system you use to formalise mathematics".   Would someone explain this to me, please? I couldn't find anything on it.

Suppose we don't believe the continuum hypothesis. Using Von Neumann cardinal  assignment (so I guess we believe well-ordering?), is there any "familiar" ordinal number $\alpha$ such that, for non-tautological reasons, $\aleph_\alpha$ is provably larger than the cardinality of the continuum? I would hope not since it would seem pretty silly if something like $\alpha = \omega_0$ worked and we could say "well gee we can't prove that $c = \aleph_1$, but it's definitely one of $\aleph_1, \aleph_2, \ldots , \aleph_{73}, \ldots$". I (obviously) don't know jack squat about set theory, so this is really just idle curiosity. If a more precise question is desired I guess I would have to make it     For any countable ordinal $\alpha$ is the statement: $c < \aleph_\alpha$ independent of ZFC in the same sense as the continuum hypothesis?   assuming that even makes sense. Thanks!


I read it as a young teen (so early 80s). It was (I think) a four book series. It starts with an attack on the home-world of the 'Interplanetary Police' - there was a name for them, but if I could remember it I'd probably have the title :) - with a radiation/poison that ate into the bones.  All were killed.  The protagonist was rescued by a kindly old wizard (sorry, scientist), had his bones replaced with an unbreakable material (to remove the poison) and given an ally / side-kick of a flying batlike (BIG bat) alien who may also have been telepathic (bit fuzzy on that) and sent after the baddies.  I think there were 4 in the series.

I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders.


So I encountered a physics faculty who asked (during a quantum mechanics class) what the difference between special and general relativity is. When I answered that  spacetime in SR is flat while in GR it can be curved, he avoided confirming whether or not my answer was right. Instead he emphasized that SR is inertial while GR is non-inertial. This bugs me as what I've commonly known is that curvature is the difference between SR and GR.  One thing that confuses me about the statement that "SR is inertial while GR is non-inertial" is what exactly it means. Isn't the principle of equivalence (physics laws are the same in inertial frames) consistent in both SR and GR?    Also another thing that I find trouble with is when people say that relativity is the physics of fast moving objects. I've always been under the impression that in relativity, we study physics in a way where time and space are in equal footing.

What is the connection between  and ? As I understand general relativity does not need the assumption on speed of light constant. It is about the relation between mass and spacetime and gravity. Can general relativity be valid without special relativity?


I've got some jquery that creates the following when a button is clicked:

Icon<form class="dropzone" action="upload2.php?id=1_1" id="1_1"></form>

<input type="image" src="images/button-minus.png" class="removethis" id="1__1">

Image<form class="dropzone" action="upload2.php?id=1_2" id="1_2"></form>

   I've also got an 'Add another' button
   <input type="image" src="images/button-plus.png" class="addanother">
   It increments the ids when the 'Add Another' button is pressed but that's not too important here.

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


Is there a way that a function can remember its previous output and use that value during the next call to the function? For instance, assume there is a function, runningTotal with a single argument x that returns x on the first call to runningTotal but x + prevOutput for every call after that.  Is there a way to write such a function in python?  I am aware that this could be easily achieved by using a global variable in the function or by saving the previous value to a new variable, but I would like to avoid these solutions if possible.  The reason I'm looking for an alternate solution is because this is one function in a program I'm working on with other people and I would like to avoid having to create more global variables than already established.

What is the idiomatic Python equivalent of this C/C++ code?  void foo() {     static int counter = 0;     counter++;     printf("counter is %d\n", counter); }   specifically, how does one implement the static member at the function level, as opposed to the class level? And does placing the function into a class change anything?


I need to turn ON (and OFF if possible) a vacuum when another DIY tool, like a drill, is activated/deactivated.   The idea is: "I start working and the vacuum start sucking dust automatically. Then it stop when I stop working".  The tech spec. are (both for tools and vacuum):   Voltage: 230V  Current (max): 16A   NOTE: I don't want another manual switch to turn on both. I want an automatic system which detect when the load (the tool in this case) is turned ON and turn on a "slave" switch (like via relay) to power on the vacuum.

I'm starting to get into woodworking and I've run across some high-end dust collectors and shop vacuums that turn on automatically a second after the tool plugged into them (such as a table saw) is turned on. When the tool is turned off, the vacuum stays on for a few seconds longer, then shuts off automatically. There are also aftermarket switches like the  that do the same thing.  It seems like I would need a normally-open 120V relay to turn on the the shop vac, but how do I delay turning on the vacuum, then make it stay on for a few seconds longer after I turn off the tool?


So I want to ask the user how old he is in Python. I want to give an assertion error when the input is 0 or lower and when the input is not an integer, so for example the user types something like a comma or something else. This is what I have now test = input("How old are you?: ") assert test > 0 and type(test) == int, "Must be more than 0 and only numbers"  And this doesn't work, because when the user types in an integer like 15, it is considered a string and > is not allowed between a string and an integer. So I tried to make the input an integer, like this: test = int(input("How old are you?: ")) assert test > 0 and type(test) == int, "Must be more than 0 and only numbers"  This above works for the first assert. When the user puts as input -1 or 0, it gets an assertion error. However, it does not work for the second assert, because the type is already an integer. How can I solve this?

What is the best possible way to check if a string can be represented as a number in Python?   The function I currently have right now is:  def is_number(s):     try:         float(s)         return True     except ValueError:         return False   Which, not only is ugly and slow, seems clunky. However I haven't found a better method because calling float in the main function is even worse.


Chrome has its annoyances, but for the most part it's okay.  Except when it autocompletes the text that I type into the address/search bar.  Instead of typing something like "atom", hitting Enter, and realizing that Chrome has decided to search for "atomic mass of Einsteinium" instead of "atom" simply because I've searched for it before, I want to type "atom", still have the autocomplete, and have the option for tab completion.  Does this exist? Can this be changed? Can Chrome be slightly less annoying?  Thanks!

For example: If I type reddit.com, it autofills it to reddit.com/r/fffffffuuuuuuuuuuu based on my history.  I wanted to go to reddit.com, not F7U12. Any way to turn this off?


I want to handle  java.util.regex.PatternSyntaxException: Dangling meta character caused by any special character. For example Assume the following string  String var = "Hi * How / are \\ you + "; String replacement = var.replaceAll(var,"Replaced");   I want to handle above code as such I need not add \\ for each replacing each special characters.  PS: There can be many more special characters other than the one mentioned. I want to create a condition to handle all the characters which would return this exception.  PPS: I have to use replaceAll. I cannot use replace as I'm working in java version 1.4. Also cannot upgrade java version.  I am stuck with version 1.4. And Pattern.quote will work on java 1.5 onwards.

Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input.


I am trying to download a file in multiple parts simultaneously  for that I am using threads              for (int i = 0; i < 5; i++)             {                 try                 {                     Thread chunkThread = new Thread(() =>                     {                         Console.WriteLine("try_index" + i);                     });                     chunkThread.Start();                 }                 catch (Exception e)                 {                     Console.WriteLine("catch_index" + i);                 }                 if (i == 0)                 {                     Console.WriteLine("here");                 }             }   since downloading works fine I cleared that code  when I watch the Console.Writelines it always writes wrong  I thought its gonna write   try_index0 here try_index1 try_index2 try_index3 try_index4   but the result is   here try_index1 try_index2 try_index4 try_index5 try_index5   or something like that but always not I wanted and always a 5 involves for parts of the download I keep a list with a start and end bytes of the parts and since it gets 5 my code crashes it is something about new thread but I am too noob to understand  how can I fix ?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I am working with the jQuery fadeIn/fadeOut method and confused by exactly what it is doing. The docs state that the method affects the opacity property of the element but display:none also work to hide an element and then fade it in. Are opacity:0 and display:none the same thing? I am seeing some really choppy animations using the methods and want to understand better whats going.

The CSS rules visibility:hidden and display:none both result in the element not being visible. Are these synonyms?


Also convolutional-pooling layers need an activation function to introduce non-linearities in order to learn complex features. Applying an activation function (typically one the ReLu families is used) after the pooling layer or between the convolutional layer and the pooling layer does not change the result since these functions are increasing. However I was thinking since the pooling layer compress the information and the output will be of lower dimensions, applying the activation functions after the pooling layer should save some computations. Is that so? Is activation functions in practice applied after or before pooling layer?

I am new to CNNs and I have this questions in mind. usually, in CNNs, we do convolution followed by activation (Relu) followed by maxpooling. What if I want to use Activations first followed by convolution followed by maxpooling. How would that effect the network performance or is this method useful or not.


Steps to reproduce   Search using views:..2 criterion, e.g.    Observed   Most of the results have more views - e.g. twenty-ish . Although some filtering does seem to happen.   Context  The filtering intention seems to be properly understood by the user interface, as you get "search options views<= 2" on the right-hand dide.

Trying to , I'm getting questions with more views than asked for.  For example, I tried to search for views:1..5 on CrossValidated, but I'm getting results with more views:    But the  actually has 117 views at the time of writing.


I'm using owlapi to return the individuals of a given class. while testing the code using pizza ontology it works perfectly but when i test it on my ontology the following exception apear :  Exception in thread "main" java.lang.NoClassDefFoundError: dk/brics/automaton/BasicAutomata     at org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralPatternValueSpaceSubset.<clinit>(RDFPlainLiteralPatternValueSpaceSubset.java:49)     at org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralDatatypeHandler.registerPatternDatatype(RDFPlainLiteralDatatypeHandler.java:53)     at org.semanticweb.HermiT.datatypes.rdfplainliteral.RDFPlainLiteralDatatypeHandler.<clinit>(RDFPlainLiteralDatatypeHandler.java:45)     at org.semanticweb.HermiT.datatypes.DatatypeRegistry.<clinit>(DatatypeRegistry.java:44)     at org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.visit(OWLClausification.java:744)     at org.semanticweb.owlapi.model.OWLDatatype.accept(OWLDatatype.java:141)     at org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.convertDataRange(OWLClausification.java:730)     at org.semanticweb.HermiT.structural.OWLClausification$NormalizedAxiomClausifier.visit(OWLClausification.java:574)     at org.semanticweb.owlapi.model.OWLDataAllValuesFrom.accept(OWLDataAllValuesFrom.java:52)     at org.semanticweb.HermiT.structural.OWLClausification.clausify(OWLClausification.java:162)     at org.semanticweb.HermiT.structural.OWLClausification.preprocessAndClausify(OWLClausification.java:92)     at org.semanticweb.HermiT.Reasoner.loadOntology(Reasoner.java:210)     at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:201)     at org.semanticweb.HermiT.Reasoner.<init>(Reasoner.java:175)     at org.semanticweb.HermiT.ReasonerFactory.createHermiTOWLReasoner(ReasonerFactory.java:51)     at org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:19)     at org.semanticweb.HermiT.ReasonerFactory.createReasoner(ReasonerFactory.java:15)     at Main.main(Main.java:40) Caused by: java.lang.ClassNotFoundException: dk.brics.automaton.BasicAutomata     at java.net.URLClassLoader.findClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 18 more   I noticed that the problem is due to dataproperties that i'm using in my ontology. (when i delete all the dataproperties it works but when i add them the error appear again)

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I want to replicate the environment comment from the comment package:  \begin{comment} Hidden stuff. \end{comment}   which prints just nothing, instead of using % to comment things out.  I can do it with a command, such as \def\comment#1{}, and now I want to turn it into an environment.  The motivation is to make an environment that would conditionally hide the text completely or do something with it, such as change color:  \@ifundefined{flag}% {\newenvironment{flagged}{\it\color{red}(}{)}}% {\newenvironment{flagged}{\comment\bgroup}{\egroup}}   In the second case the intention is to make the text argument of the macro: \comment\bgroup Hidden stuff\egroup. This does not work because \bgroup\egroup cannot delimit an argument of a macro.   \includepackage{comment} ... {\newenvironment{flagged}{\begin{comment}}{\end{comment}}}   does not work either, I guess because the comment package expects a literal string \end{comment}:  ! File ended while scanning use of \next.   How to do this?

I have a big LaTeX file which I would like to compile so that certain environments like figure are not shown. To that end I wanted to make use of the renewenvironment command. But the facilities of this command are rather limited: essentially, one can only replace an environment by something which is logically also an environment. What would suffice for me, hence, is to introduce a 'dummy enviroment' - one which discards the argument. Is there any way to define it?  EDIT: I also need to eliminate the displaymath environment. This might be essential, because the argument of it is not going to be valid text on its own.


I tried to find the performance difference between slice assignment and regular assignment for lists. Here is the code:  import time  N =  1000   a = list(range(N)) b = list(range(N))  time1 = time.time() for i in range(N):     a = [x for x in a if x is not i] time2 = time.time() for i in range(N):     b[:] = [x for x in b if x is not i] time3 = time.time()  print a print b     print time2 - time1 print time3 - time2   My expectation is that, for each list a and b, this will remove one element at a time, so that print a and print b both print empty lists. Instead, they seem to always print the starting lists, but with the first 256 elements missing.  They both print:  [257, 258, 259 ... N-1]   What is happening?  I'm using Python 2.7.6.

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


Just getting started with JS so I got a question.  What I would like to accomplish is for me to append a h1 tag inside a div then click on it and trigger an alert.
h1

            this is the code I have now. Now the issue as far as I understand is that the javascript code is ran on load - so when the h1 is added it won't work.  How do you fix this?

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