How i can use \IfFileExist{FileName}{}{} with spaces in FileName

Have anyone an idea how i can use \IfFileExist{}{}{} for file names with spaces?  f.e. didn't work  \newcommand{\runI}{D:/Test/run1 - T2} \newcommand\IG[2][]{\IfFileExists{#2}{\includegraphics[#1]{#2}}{\fbox{File #2 doesn't exist}}}  \begin{figure}[htbp] \centering \IG[trim = 40mm 10mm 40mm 2mm,clip = true, width=0.4\textwidth]{\runI/LatexTestFig2.png} \caption{run 1} \label{overflow} \end{figure}   f.e. work  \newcommand{\runII}{D:/Test/run1-T2-Kopie} \newcommand\IG[2][]{\IfFileExists{#2}{\includegraphics[#1]{#2}}{\fbox{File #2 doesn't exist}}}  \begin{figure}[htbp] \centering \IG[trim = 40mm 10mm 40mm 2mm,clip = true, width=0.4\textwidth]{\runII/LatexTestFig2.png} \caption{run 1} \label{overflow} \end{figure}   what can I do? THX


Does a Fijian need a transit visa for layover in Dubai?

I am traveling from Madrid, Spain to Brisbane, Australia with Emirates Airline with a 3 hour transit in Dubai. I am on a Fiji passport and wanted to know if a transit visa will be required for Dubai for this short layover. I do not plan on leaving the airport.


How to bypass iMac 2015 Firmware Password?

first of all, I apologize for my bad english I have a question and I will be really happy if someone can help me. A while ago I bought an imac from 2015 as used ( so I don`t have any invoice) but lately I miss some speed and because of this I decided to upgrade HDD to SSD. When I did it and wanted to do a clean install, I got a padlock on the screen, "So frimware password", and I don't have this one. I tried to go to recovery mode via Command + R, but when I pressed that, it asks again for the password. boot via USB failed. NVRM reset failed memory replacement, not helped Does anyone have any idea about this ??


Export from Blender to Maya preserving Materials and Crease

I have a character in Blender. It needs to be exported to Maya for rendering in VRAY. I need to figure out how to preserve the following:  1) Textures and UVs.  2) Material assignments to different parts of the mesh.  3) Crease. Currently the model is using a subsurf modifier in Blender, and some edges need to be creased. Maya also has options to smooth and subdivide the mesh, and it's own form of Creasing to preserve edges.  4) Group assignments of multiple objects.  5) Challenge Mode: The rig. The character will actually be rigged in Maya, so I'm not worried about this for this specific project. But it'd be nice to know how to do it in general.  What format and settings do I need? Is there one that can handle all of these issues?


Can a character expend Hit Die while at 0 HP?

(Related to  Because answering this "yes" would provide the end-run to that dilemma.)    Let my character be at 0HP and stable. Per PHB p.198 we roll a d4 and learn that my character will regain 1HP naturally in, say, 2 hours.  At the end of an hour can I claim the benefits of a short rest and choose to spend a Hit Die?  Arguments for:   My character has done nothing more strenuous than eating, drinking, reading, and tending to wounds. (I've been napping, after all.) That's the only requirement stated for a short rest. The clause "a character must have at least 1 hit point at the start of the rest to gain its benefits," which appears in "Long Rest," is conspicuously absent from "Short Rest."   Argument against:   In "Short Rest" spending a Hit Die is stated as an action taken by a character, not a player; perhaps the character needs to be conscious to take that action? (Weak)   It strikes me as bizzare to think of spending a bunch of hit dice and leaping up with lots of hit points an hour into my d4-death-bed. But perhaps that's what the rules actually say?


Trying to use "Difference" tool gives out "'QgsWKBTypes' is not defined" error

I am trying to separate two overlapping vector layers and find out the difference in QGIS 2.18. I have tried finding difference with layers with points and also with buffers. Both of them give following error:  global name 'QgsWKBTypes' is not defined See log for more details   I have searched the web for this but can't seem to find a solution.


Given a smooth map $f:S^1\to S^1$, there is a smooth map $g:\Bbb R\to\Bbb R$ such that $f(\cos t,\sin t)=(\cos g(t),\sin g(t))$ and $g(2\pi)=g(0)+2\pi q$ for some $q\in\Bbb Z$.   I'm fairly sure one can prove this without using algebraic topology/path lifting. The idea is that $g$ measures the "signed distance along $S^1$" that the image of $f$ travels (at least on $[0,2\pi]$). One then extends $g$ to $\Bbb R$ by setting $g(t+2\pi)=g(t)+2\pi q$. I don't know how to measure that in a smooth manner (I can't even get it to be continuous).   Is there an elementary proof of this?


Events $\{A_n\}$ satisfy $\lim\limits_{n\rightarrow\infty}P(A_n)=0$ and $\sum\limits_n P(A_nA_{n+1}^c)<\infty$, show that $P(A_n ~\text{i.o.})=0$.

Suppose $\{A_n\}$ is a sequence of events such that $\lim\limits_{n\rightarrow\infty}P(A_n)=0$ and $\sum\limits_n P(A_nA_{n+1}^c)<\infty$, show that $P(A_n ~\text{i.o.})=0$.   I do not know how to prove this problem. Can anybody give some suggestions?    I find an answer which is easy to understand


Where is my minecraft mod folder on windows?

I have recently downloaded several mods and to install them it says simply put them in your mod folder under your .minecraft folder but, I simply cannot find it! Please help.


Which one is correct? "Vaccinating children has become..." or "Vaccinating children have become..."

I have a doubt about the following sentence.   "Vaccinating children has become increasingly popular these days."  According to my understanding children is plural so, this sentence suppose to be like this   Vaccinating children have become increasingly popular these days.  is this correct?  Thanks


I am planning to stock on SSDs but I will not use them right away. How long can they be kept in storage and what factors play in the degradation of SSDs? ( M.2 NVMe, SATA SSD, U.2 SSD). Clarification: I am not asking about how long does data last on SSD if left unused, but rather the longevity of the SSD (M.2 NVMe/SATA SSD/U.2 SSD) if bought and stored right away to a shelf.


Where should I ask questions about programming without a _real_ problem?

I have a question that I am quite sure does not belong to SO: it is a general, broad question about programming language implementation.  Also, I do not feel it belongs to CS, because it is not strictly computer science (it is more of an engineering question). To be honest, after reading  I was leaning towards CS, but then in the CS FAQ I read "(avoid questions where) there is no actual problem to be solved"  In general, I wonder where to go for questions that:   are not about theory (for those, I would go to cs.stackexchange) are not really practical programming problems (for those, I would go to SO) are not design questions (programmers)   The question I am referring to are something like "Are function calls always implemented using a stack?" "Under which conditions can I transform a function call into CPS, and how would I do that?" (general, not related to a particular piece of code).  Where do questions about programming "curiosities", where there is no actual problem to be solved belong? Or maybe they do not belong to stackexchange at all?


I started a stable and had to get specific horse types. I spawned way too many horses and now they're all just standing in the middle of the village I live in.  I don't know how to make them go away and I don't want to spend 8 hours killing them all.   Can I spawn a mob that will kill them for me?


apt - reinstall with all default config files

I installed samba for a while. Now I want to get the default installation and their default config files. Removing and installation by 'apt install --reinstall samba' doesn't work because of the missing config files. What is the right syntax to get the complete installation once again? Frank


Fix unchecked cast from Object to ComboBox javafx

I have built a GUI with JavaFX/Scenebuilder which has multiple dropdowns with similar functions. I want to use the same function for all dropdowns so I have to check where the action event came from. My current code is:  public void dropdownPressed(ActionEvent event) {     ComboBox<String> comboBox = (ComboBox<String>) event.getSource();     Label.setText(comboBox.getSelectionModel().getSelectedItem()); }   And it works, however it gives the following warning:  Type safety: Unchecked cast from Object to ComboBox<String>   So from what I understand the getSource() returns a general Object, which is not guaranteed to be cast-able to ComboBox ? What would be the solution to this problem?


Cron [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean  PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0  Hi, root get above messages on email  any idea how to fix it?  PHP Version 5.6.14-0+deb8u1


Posterior distribution of normal with gamma prior on the precision

Find the posterior distribution when      $$x|\sigma\sim \mathcal N(0,\sigma^2),\:\:\: 1/\sigma^2\sim \mathsf{Gamma}(1,2)$$   I'm stuck in this exercise, I know that $$\pi(x|\sigma)\approx f(x|\sigma)\pi(\sigma)\cdot\frac{1}{m(x)}$$  Maybe I am thinking wrong, but I would not have to find a prior of $\sigma$?


Is it feasible to measure the energy of cosmic ray muons with a consumer Digital Single Lens Reflex camera?

I have read this article    and it talks about estimating the muon cosmic ray flux by means of a DSLR camera.  Is it possible to measure the muon's energy with the same apparatus?  If yes, how can I "calibrate" (?) the camera in order to measure the energy?


I have an inline code example with a nested Java generic declaration, using the typewriter typeface. However, the closing >> is rendering as a black box. A cursory Google search suggested $>>$, but this removes the typewriter font. Using \textgreater in place of the actual > also encounters the same problem. Here is the offending snippet:  ...declaration {\tt List<Map<Integer, String>>} is...   Any ideas?


Whether 127.0.0.1 traffic hits the physical network or not

As per this , which says that:  No all 127.0.0.1 traffic never hits the physical network, it gets processed by a loop back adapter in the kernel.  The poster has a high reputation. I think all 127.0.0.1 traffic never hits the NICs! Which is the correct answer? The answers with references to some official documents are preferred.


How to respond to "Good Morning" from a colleague who's in place with 10 hr time difference?

So, a colleague of mine, who's in a place with 10 hr time difference than mine, called me up during my morning (9am), his late night (11pm), and said "Good Morning". As this happened for the first time with me, I just replied with "Oh hello. Good ... err Night ... to you" & had a few seconds of awkward moment & continued with our work talk.    So I was wondering, what would be my proper response in this situation?


Is there a positive integer $N$ that fits?

Is there a positive integer $N$ such that the equation $x^2 + y^2 = N$ has at least $2005$ solutions in non-negative integers $x$ and $y$? If so, prove it. If not, prove it!


Question: If $X_n$ is any sequence of random variables, there are constants $c_n\to\infty$ so that $X_n/c_n\to 0$ a.s.   I know "$X_n\to 0$ iff for all $\epsilon >0,\space P(|X_n|>\epsilon\space \text{i.o.})=0$", and for that I have to use Borel-Cantelli Lemma.  By Chebychev's inequality, for any $\epsilon>0$, $P(|X_n|> |c_n|\epsilon)\leq \dfrac{EX^2_n}{c^2_n\epsilon^2}$. Let, $EX^2_n=O(n^k)$, then I choose $|c_n|=O(n^{\frac{k}{2}+1})$. In that case, $P(|X_n|> |c_n|\epsilon)\leq\dfrac{\delta}{n^2}$, for some positive constant $\delta$.  Since, $$\sum_{n=1}^{\infty}P\Big(\Big|\dfrac{X_n}{c_n}\Big|>\epsilon\Big)<\infty$$  then, by Borel-Cantelli Lemma, $P\Big(\Big|\dfrac{X_n}{c_n}\Big|>\epsilon\space\text{i.o.}\Big)=0$  Hence, $X_n/c_n\to 0$ a.s.  Is my argument ok? Thanks for your help.  Note: i.o. means infinitely often.


Why is floating point addition imprecise?

I found the following strange behavior. Adding some floats result in "random" accuracy.  so first I run  go version go1.12 darwin/amd64 on macOS Mojave (10.14.3) with Intel i7 2,6 Ghz  the behavior occur in the following Example:  func TestFloatingAddition(t *testing.T) {     f1 := float64(5)     f2 := float64(12.1)     f5 := float64(-12.1)     f3 := f1 + f2 // 17.1     f4 := f3 + f5 // 5.000000000000002     if f4 != f1 {         t.Fatal("addition is not reversable")     } }   Can someone explain to me why f4 takes on this strange value, and what can I do to fix it?


Solving the integral $\int_0^{\frac\pi2}\frac{dx}{1+\sin^2(\tan x)}$

$$\int_0^{\frac\pi2}\frac{dx}{1+\sin^2(\tan x)}$$  First, I tried to set   $$t=\tan x$$  Then I got $$\int_0^\infty\frac{dt}{(1+t^2)(1+\sin^2t)}$$  applied a trig identity, $1+ \sin^2t=\frac{1}{2}(3-\cos2 t)$  I got   $$\int_0^\infty\frac{dt}{(1+t^2)\left(\frac12(3-\cos 2t)\right)}$$  I don't know how to keep going to solve it.  can some one give me a hint?  Thanks


New Login Page, Global Network Login not Working

I used to be able to login to one Stack Exchange website, then later, in the same browser session, visit another and click log in, and I would be logged in without having to enter my username and password. I noticed with thew new log in page I have to renter my credentials. Is this a bug?


I've seen a number of people claim that you should specifically name each column you want in your select query.  Assuming I'm going to use all of the columns anyway, why would I not use SELECT *?  Even considering the question **, I don't think this is an exact duplicate as I'm approaching the issue from a slightly different perspective.    One of our principles is to not optimize before it's time.  With that in mind, it seems like using SELECT * should be the preferred method until it is proven to be a resource issue or the schema is pretty much set in stone.  Which, as we know, won't occur until development is completely done.  That said, is there an overriding issue to not use SELECT *?


Is Objective C the preferred way to write OSX applications?

I've been assigned a new task at my company to rewrite one of applications to Mac OSX. I just started learning about OSX programming and it looks like the native language of Mac OSX is Objective C.  Therefor I've a question - is Objective C the preferred way to write OSX applications? And also does anyone know if there are alternatives to Objective C? (I'm already familiar with C and C++.)


i purchased sizzler plate last month. I am using it once or twice in a week. However it is getting lots of rust on it. within 5 minutes of washing plate, it turns back to rust one. I am using lemon juice for a while and it does the trick.   But i am looking for some permanent solution for this.   Thanks for stopping by....!!!


How do I add a link to a URL containing parentheses () (or "round brackets" by heathens)? For example:  The parentheses around "VS.85" causes it to look like this: Markdown: [IHtmlDocument2 reference](http://msdn.microsoft.com/en-us/library/aa752574(VS.85).aspx) Output renders as


I bought a choke made of litz wire. The wire is enameled all the way to the ends. How does one go about stripping this wire?


Can 2 non-cantrip-spells be cast in one round with action surge?

Fighters have an ability that allows them to take 2 actions in one turn (regular, full, unrestricted actions, unlike those gained from the Haste spell):     Starting at 2nd level, you can push yourself beyond your   normal limits for a moment. On your turn, you can take   one additional action on top of your regular action and a   possible bonus action.   Spells with a casting time of one bonus action have the following restriction:     A spell cast with a bonus action is especially swift. You   must use a bonus action on your turn to cast the spell,   provided that you haven’t already taken a bonus action   this turn. You can’t cast another spell during the same   turn, except for a cantrip with a casting time of 1 action.   Now, this creates some logical conflict. As far as I can tell, RAW would allow you to cast 2 any-level spells and one cantrip as a bonus action (if you have one - only Magic Stone and Shillelagh fall into that category). However, if you were to cast a spell of level 1 or higher as a bonus action, you could not cast any non-cantrip spells with any of your two actions.  This does not make sense at all from a logical point of view (considering "a spell cast with a bonus action is especially swift"). Now while I wouldn't allow casting bonus-action spells with your actions (which is explicitly ruled out - see quote #2), I don't think that the scenario above makes sense.  Are there any passages in the PHB that clarify this issue which I missed? And if there aren't, have there been any developer rulings on this topics?  Addition: If I were to cast a level 1+ spell with a bonus action, could I then use the action granted from Action Surge to cast a non-cantrip spell? RAW, no, but I feel like this ability wasn't taken into account when the rule was created.


How to dual boot ubuntu with windows 10 after installing ubuntu 20.04 LTS

I am using Ubuntu as my only operating system , now I want to dual boot with windows 10


A continuous function cannot take every value an exact even number of times?

I have proved that a continuous function $f(x): \mathbb{R} \rightarrow\mathbb{R}$ cannot take every value in its range exactly twice. How is the general case with an even number of times proved?  Here's my proof for the basic case.  Suppose continuous $f(x): \mathbb{R} \rightarrow \mathbb{R}$ takes every value in its range exactly twice. Let $f(a) = f(b) = w$ with $a < b$. Claim that $\forall x \in (a,b), \; f(x)>w$ or $f(x) < w$.   If $f(x) = f(a) = f(b) \; \forall x \in (a,b)$, that clearly contradicts the hypothesis. If $\exists x_1,x_2 \in (a,b): \; f(x_1) < w < f(x_2)$, then by Intermediate Value Theorem, $\exists x_3 \in (x_1,x_2)$ or $(x_2,x_1)$ such that $f(x_3) = w$ contradicting the hypothesis.   Assume for the moment that $\forall x \in (a,b), \; f(x)>w$. By Extreme Value Theorem, $f(x)$ attains maximum $f(c_1) > f(a)=f(b)$ at some $c_1 \in (a,b)$. By the hypothesis, $\exists c_2 \in \mathbb{R}\setminus \{c_1\}$ such that $f(c_2) = f(c_1)$. Claim that $c_2 \in (a,b)$.   If $c_2 > b$, for some value $u \in \Big(f(a),f(c_1)\Big) = \Big(f(b),f(c_1)\Big) = \Big(f(b),f(c_2)\Big)$, $f(x) = u$ at least three times, namely $x_1 \in (a,c_1), \;x_2 \in(c_1,b), \;\text{and } x_3 \in(b,c_2)$, contradicting the hypothesis. By similar reasoning, $c_2 \nless a$.   Without loss of generality, assume $a < c_1 < c_2 < b$. By Extreme Value Theorem, $f(x)$ attains minimum $f(d)$ at some $d \in (c_1, c_2)$. Because $f(a) = f(b) < f(d) < f(c_1) = f(c_2)$, by Intermediate Value Theorem, $f(x) = f(d)$ at least three times, namely $x_1 \in (a,c_1), \; d, \text{ and } x_2 \in (c_2,b)$. This is a contradiction to the hypothesis.  Now for the other case when $\forall x \in (a,b), \; f(x) < w$. Let $g(x) = -f(x)$ and apply the above proof to conclude that $g(x)$ cannot take every value in its range exactly twice, so neither $f(x)$.  Thanks.


Is there a way to force one optimization level in SQL Server?

Based on Paul White's , there are three optimization phases in SQL Server, search 0 (Transaction Processing), search 1 (quick plan) and search 2 (full optimization). Each phase has entry and termination conditions. My question is, can we force the optimizer to run at one optimization phase?


Email regex with min length and not max length

I have this regex in JavaScript:   new RegExp('^[0-9a-z._-]+@{1}[0-9a-z.-]{2,}[.]{1}[a-z]{2,}$','i');   and I want to modify it.  The last part of the mail must have a minimum value: 2 chars and no maximum length so I can put mails such as .localhost .paris .thisismyexample ...  How may I do that?


I have set Seamonkey as default browser within Seamonkey and under preferred applications.  Yet apps that have a help section always use Firefox to go to their help website.  Any way to stop that?  $ sudo update-alternatives --config x-www-browser There is only one alternative in link group `x-www-browser` (providing `/usr/bin/x-www-browser`): `/usr/bin/firefox`. Nothing to configure.     Ubuntu-Mate 16.04 LTS Xenial Mate Desktop    Update in response to request:  update-alternatives --get-selections | grep -i browser gnome-www-browser auto /usr/bin/firefox  infobrowser auto /usr/bin/info  x-www-browser auto /usr/bin/firefox


Why is the Area 51 site no longer showing up on the More Stack Exchange Communities list? Prior to today, the More Stack Exchange Communities list in the top bar contained a link to Area 51. However, when I hit the link to the Stack Exchange Communities on the top right corner of my screen, I have noticed that the Area 51 community link is missing now. Why is this so? Is it due to a bug in the system, or is it intentional that it was removed? Perhaps a new series of protocols are in place that I am unaware of? This has just recently happened. After all Area 51 is a Stack Exchange Community! Is there any official explanation for this?


How do I get the returnvalue from my controller in my lightning controller

How do I get the value of my controller in my lighning controller  I have the following ligntningcomponent:  <aura:component access="global" implements="forceCommunity:availableForAllPageTypes" controller="NavigateToProfielController">     <aura:handler name="init" value="{!this}" action="{!c.openPage}"/> </aura:component>   With The following Controller:  ({     openPage: function (component, event, helper) {         var recordId = component.get("v.LoggedInUserContact");         var url = '/flow/LerarenCommunity_Licentie_Verlenging?varProfielId="' + recordId +'"';         window.open(url, '_self');     } })   In my NavigateToProfielController I need to call LoggedInUserContact from which I want to pass the value to the RecordId  My URL output gives me undefined:  https:.../flow/LerarenCommunity_Licentie_Verlenging?varProfielId="undefined"


A question regarding convergence of a series

Let $(a_n)$ be an unbounded strictly increasing sequence of positive real numbers and let $x_k=\frac{a_{k+1}-a_{k}}{a_{k+1}}$. Then I want to find the correct option (s).   For all $n\geq m, \sum\limits^{n}_{k=m}x_k>1-\frac{m}{n}$ For all $n\geq m, \sum\limits^{n}_{k=m}x_k>\frac{1}{2}$ $\sum\limits^{\infty}_{k=1}x_k$ converges to a finite limit $\sum\limits^{\infty}_{k=1}x_k$ diverges to $\infty$   My observation says that option 2 is false and so is 3. But I couldn't conclude anything for 1 and 4. Please help!


How to use- "color to alpha" in GIMP when it is grayed out?

While you try to change the background to transparent- the filter "color to alpha" is not selectable. How to get that changed.


Installing Windows 10 and deleting Ubuntu 15.10

I have Ubuntu 15.10 (64 bit) installed on my laptop and I can't get rid of it. Tried making a bootable usb of windows 10, permission error. Tried looking for a solid answer to making a partition of windows ... no clear answer exists.  I'm very new to Linux and looking to get back into windows. If a solution deletes Ubuntu 15.10, that's fine.


How to produce the table flip emoticon (╯°□°）╯︵ ┻━┻?

Oh man, I don't even know where to put this... or how to begin. As a joke, I'm trying to get the ascii art of the guy flipping a table in a question on an exam. I've tried verbatim but it won't display the characters.  I know it might be a long shot, but does anyone have an idea how to get this little guy  (╯°□°）╯︵ ┻━┻   to display? I know I should provide a MWE, but... yeah, I don't even have that.  Thanks!


Minimum set of features that can distinguish all objects

My input is a set of objects having different values with respect to a set of features (F1, F2, F3, F4, F5). The output should be a set of minimal features allowing to distinguish all these objects or if not possible, the features that distinguishes most of these objects.   For example F1 distinguishes objects 4 (value of 2) and 5 (value of 11) from the rest of objects. We need to distinguish obj1, obj2 and obj3. F2 distinguishes Obj2 (value of 4) from the obj1 (value of 6) and Obj3 (value of 6). After combining both features F1 and F2, we can distinguish obj4, obj 5, obj4. I need an additional feature that allows to distinguish obj1 from obj3. F4 would do the job, since obj1 (value of 9) and obj 3 (value of 10). Our set allowing to distinguish all objects is then F1, F2, F4. Note that F6 is useless since it does not help distinguish our objects.  Is there a way to obtain this set of features that allows to distinguish all objects, knowing that I have more than 500 features and more than 500 objects.   Thanks.


I have Website with product comparasion. Also I am thinking what to do with my titles.  4 product comparasion: Apple iPhone 6S Plus vs Samsung galaxy S7 Edge vs Microsoft Lumia 820 XL DTE SIM DUAL vs Xiaomi Redmi 1S – Compare – Example.com 2 product comparasion: Apple iPhone 6S Plus vs Samsung galaxy S7 Edge – Compare – Example.com (Facebook displays 110 characters while sharing on Fan page) 3 product comparasion: Apple iPhone 6S Plus vs Samsung galaxy S7 Edge vs Microsoft Lumia 820 XL DTE SIM DUAL – Compare – Example.com   These are long titles, Facebook wraps it araound 110. Search engines display up to 70~75 and add "..." dots.  Any ideas for these long titles? Informations what to do? (titles goes up to 150~170)  If I cut the title characters, should I add on my page  and put full in the description (~160 characters)?  Thanks!


This morning, I was awarded "Nice Answer" in Super User. However, I was viewing a different stack (Puzzling) at the time I noticed the award, and the notification had the PUZZLING badge icon instead of Super User's. When I looked in a different stack (Science Fiction and Fantasy), the badge icon again matched the current stack's badge icon.  Shouldn't this always match the badge icon for the stack in which the badge was awarded? ...as seen in Super User    ...as seen in Puzzling  ...as seen in Science Fiction and Fantasy


I am trying to calculate the number of trees (non isomorphic)  with $n$ nodes (total including leaves).  I think that there are n! such trees, but I don't know how to prove that.  I know that the number of trees with n internal nodes is a the $(n-1)$th catalan number, so I thought maybe there is a way to deduce from that the number of trees with $n$ total nodes.   another approach will be to look at each level and count the number of possible nodes in each level.


New light bulbs light up even when switched off

Edit:  I have confirmed that my main question is answered in another post. But there are still things that bother me.   Why is there a buzzing sound when the bulbs work? The new bulbs do not light up in another bathroom with the same kind of dimmer switch. Why is that?   I understand these questions are tough nuts to crack without certain details that might be hard to obtain. For example, it might be hard for me to dismantle the existing switches and look under the cover or to know the brand/model of the switch.    I just replaced my bathroom light fixture bulbs with newly bought bulbs (LED, A19, 40W equivalents). What I get is a head-scratcher: the bulbs light up dimly as soon as I screw them on and the switch is off. If I push the switch on, the bulbs function normally, but with a noticeable buzzing sound. Looks like this:    I am trying to figure out if there is something wrong with the new bulbs or the circuit. This is the box that the new bulbs came in.    My previous bulbs are of the same brand and the same kind (LED) but a higher wattage. My money is on that this has something to do with the switch. Most of my switches have a dimmer and a little LED that helps locate the switch in the dark. Does this mean I will have to go back to my old bulbs? Do I need to worry about the circuit?


What is the first usage of the word "doobie" in OED?

It is almost impossible to get a clear answer to this question in the US online.  For example:  Ted and Fay were smoking a doobie to clear their heads before going out.


Can the system leave a deletion reason when it deletes a question?

they were question banned; it turned out it (in part) it was because of deleted questions.   was deleted by the Community user.  I'm aware it will delete old posts that have a negative score, but for a minute or two, I was really puzzled as to why it was unilaterally deleted without some notation left.  Can we have the Community user leave a notation in a post's history as to why the post was deleted?    Something like the following would suffice:     Post deleted automatically due to having negative votes and no activity for three months


AJAX callback on form item generated by AJAX

I'm trying to add AJAX callback to form element that was previously rendered by AJAX but with no luck. Code below.   A bit of description. There are three main methods here:   buildForm - base form extraField - AJAX callback attached to ['month'] choosePerson - AJAX callback attached to: ['week_day']['hour']   In the buildForm method I create base form with AJAX callback on 'month' select element. In the AJAX callback you can find an extraField method. This method contains form element called 'hour' ($form['week_day']['hour']) and this element renders well. But this element also contains AJAX callback, which doesn't work, it does not generate 'person_container' element and the 'person' select.   Any idea how to ajaxify elements that previously were rendered by ajax?  class ReservationForm extends FormBase {    public function getFormId() {     return 'reservation_form';   }    public function buildForm(array $form, FormStateInterface $form_state) {      $form['month'] = array(       '#type' => 'select',       '#title' => $this->t('Select month'),       '#options' => array($this->t('January'), $this->t('February'), $this->t('March')),       '#ajax' => array(         'callback' => array($this, 'extraField'),         'event' => 'change',         'wrapper' => 'week-day',       ),     );      // Disable caching on this form.     $form_state->setCached(FALSE);      $form['week_day'] = [       '#type' => 'container',       '#attributes' => ['id' => 'week-day'],     ];   }    public function extraField(array &$form, FormStateInterface $form_state) {     $month = $form_state->getValue('month');      $hour_options = array();      if ($month == '0') {       $hour_options[0] = $this->t('08:00');       $hour_options[1] = $this->t('09:00');       $hour_options[2] = $this->t('10:00');     }      if ($month == '1') {       $hour_options[0] = $this->t('12:00');       $hour_options[1] = $this->t('13:00');       $hour_options[2] = $this->t('14:00');     }      if ($month == '2') {       $hour_options[0] = $this->t('18:00');       $hour_options[1] = $this->t('19:00');       $hour_options[2] = $this->t('20:00');     }      $form['week_day']['hour'] = array(       '#type' => 'select',       '#title' => $this->t('Choose hours @month', array('@month' => $month)),       '#options' => $hour_options,       '#ajax' => array(         // tried with that callback too: [ $this, 'choosePerson']         'callback' => array($this, 'choosePerson'),         'event' => 'change',         'wrapper' => 'person',       ),     );      $form['week_day']['person_container'] = array(       '#type' => 'container',       '#attributes' => ['id' => 'person-container'],     );      $form['week_day']['person_container']['person'] = array(       '#type' => 'select',       '#title' => $this->t('Choose person'),       '#options' => ['John', 'Sarah', 'Peter'],     );      return $form['week_day'];   }    public function choosePerson(array &$form, FormStateInterface $form_state) {     $form['week_day']['person_container']['person'] = array(       '#type' => 'select',       '#title' => $this->t('Choose person'),       '#options' => ['John', 'Sarah', 'Peter'],     );     return $form['week_day']['person_container'];   } }


Let $f: \mathbb{R}^{m\times n} \mapsto \mathbb{R}$ be a mapping from an $m$-by-$n$ matrix to the real numbers. Defining the derivative of $f$ to be: $$\nabla_A f(A) = \begin{pmatrix} \frac{\partial f}{\partial A_{11}} & \ldots & \frac{\partial f}{\partial A_{1n}} \\ \vdots & \ddots & \vdots \\ \frac{\partial f}{\partial A_{m1}} & \ldots & \frac{\partial f}{\partial A_{mn}}\end{pmatrix}, $$ I am given that  $$\nabla_A \mathrm{tr}(ABA^T C) = CAB + C^T A B^T. $$ This was stated in CS229 - Machine Learning without proof. How would I prove this? Is there an easy way (the notes say that it should be simple)?    Edit: I seem to have found a counter-example. If I let $A = B = C = I$, the identity matrix, the left hand side gives me $I$ and the right-hand-side gievs me $2I$. However, throughout the course I've used this rule many times without fail. Have I missed something or is the formula typo-ed? Also, $ABA^TC$ requires $A$ to be $m\times n$, $B$ to be $n\times n$, $C$ to be $m\times n$ for $ABA^TC$ to be $m\times n$. The right-hand-side has the product $CAB$ which doesn't make sense under these dimensions.


Player maps - draw beforehand or during exploration?

I'm currently creating some maps (dungeon, city) for a new 5e adventure I'm going to DM in a few weeks, and I stumbled upon a slight problem with player maps; Am I supposed to give them a map of the area with everything already drawn or am I supposed to draw the map dynamically when they explore the area? I'd guess that I'm supposed to draw it while they explore but seeing as one of my dungeons is currently drawn on an A3 sheet it would be a hassle to draw everything again, even with tiles as guidelines.


What I need to do:   rename a field name of a table/feature class copy all values to the new field   So far I have done following code as @artwork21 suggests:  import sys import traceback import arcpy from arcpy import env  ## ARGUMENTS # argv[1] = input table/feature class path # argv[2] = input old field name # argv[3] = input new field name    path = sys.argv[1] oldFieldName = sys.argv[2]  newFieldName = sys.argv[3]   env.overwriteOutput = True  fields = arcpy.ListFields(path) for field in fields:     if field.aliasName == oldFieldName:         if not oldFieldName == newFieldName:             fieldType = field.type             # Add new field             arcpy.AddField_management(path, newFieldName, fieldType)             #Calculates the new field based on old field values             arcpy.CalculateField_management(path, newFieldName, "!"+oldFieldName+"!", "PYTHON", "")             # Delete the old field (if necessary)             arcpy.DeleteField_management(path, oldFieldName)   How can I map field.type to AddField_management method's field type? And while the field is in a middle place, then field deleted from middle and added to the last. That does not looks like as if field name is renamed.   Is there any better solution that help me to do these things?


How to configure Orfeo toolbox in QGIS 2.18 on Windows 7 32-Bit?

I had installed QGIS 2.18.3 using OSGeo4W and then the OTB standalone binary. In QGIS, I had manually entered the directory of the    OTB applications folder (C:\Program Files\QGIS 2.18\apps\OTB-5.10.0-win32\lib\otb\applications) and  Command line folder (C:\Program Files\QGIS 2.18\apps\OTB-5.10.0-win32\bin)   and I had checked the "Activate" button.  But nothing happens when I close the Processing window and there is no OTB menu appearing in the Processing Toolbox.  How can I resolve this issue?


Transition to the integral in inequalities

Prove or disprove by counterexample the statement: $(\forall x \in [a; b]$ $f(x) < g(x))\Rightarrow $ $$\Rightarrow (\int_{a}^bf(x)dx < \int_{a}^bg(x)dx)$$ Of course, f and g are integrable on [a; b].


How to rewrite this optimization problem in standard form?


Really just looking for honest answers from fellow users for this one.   How often do you get CAPTCHAs, and what were you doing when it appeared?  Some future scripts I'm working on may attempt actions that could at times require a CAPTCHA, which would throw a big wrench into the gears. I'm just trying to figure out when I can expect to see them, and when I can expect to avoid them.   I myself have only had to answer a CAPTCHA once, and it was on my first post ever.


PHP regex match something not starting with words like "admin", "login"... and so on?

I've searched a lot but I've found many complicated examples, too hard to understand for me. Anyways I'm trying to write down a regular expression that should honor:    /foo     // should match /foo/bar // should match  /login     // shouldn't match /admin     // shouldn't match /admin/foo // shouldn't match /files     // shouldn't match   I've tried with a simple one, just with one word: #^(\/)([^admin])# that is starting with / and followed by something not starting with the word admin. It's working with /foo/bar but fails with /a/foo because it's starting with a, I suppose.  How can negate an entire set of words (admin or files or login)?


why is the slope of a line denoted by the symbol " m"

I think the distance travelled by a body is denoted by " s" because of " space" , or even " spatium" in latin. Is there any reason why the solpe of a line is denoted by " m " in the equation : $y=mx+b$? Where does this usage come from?


We are doing research on monitor human activities to avoid adverse events. In part of it, we did an experiment in our MoCap lap to detect the human motion to monitor his activities. We have f-curves from that motion. But we need all the xyz coordinates values for that motion for that given time (just say about 2-3 minutes) to do a scientific analysis of the data.  Do anyone have an idea how to get xyz values from f-curves?


How to send files from Android to Ubuntu over Bluetooth?


Are there natural spices that taste umami? I don't want to use MSG in my food, but I'd like to add some umami flavour.


Replacing multiple consecutive spaces by a single space in a string

I currently have this class to replace consecutive spaces by one:  public static string RemoveSpacesLoop(string value) {    if(value.Contains("  "))    {        return RemoveSpacesLoop(value.Replace("  ", " "));    }    else    {        return value;    } }   It works, but in the long run it may cause performance issues. is there a way to simplify this ?


How to add colored overlay effect for images with HTML and CSS

I am trying to add an overlay effect for each image on a webpage. Basically when the cursor is moved over the image, it will slightly change color. However the desired effect is not occurring. What is the best way to fix this? Here is a picture of the webpage for context.  HTML

  CSS .service-box{     width: 80%;     display: flex;     flex-wrap: wrap;     justify-content: space-around;     margin: auto; } .single-service{     flex-basis: 50%; /*get two services in 1 row*/     text-align: center;     border-radius: 7px;     margin-bottom: 20px;     color: #fff;     position: relative; } .single-service img{     width: 85%; /*resize image*/     border-radius: 7px; } .overlay{     width: 100%     height 100%;     position: absolute;     top: 0;     border-radius: 7px;     cursor: pointer;     background: linear-gradient(rgba(0,0,0,0.5),#93dced);     opacity: 0;     transition: 1s; }  .single-service:hover .overlay{     opacity: 1; }


Moving files that meet extension and size criteria to a different folder via terminal

Due to a series of unfortunate incidents, I lost all my data during a botched system update (noob here). I managed to use photorec to recover files to a specific folder "temp" on my desktop. I want to recover all my baby pics, so most likely JPEG that are more than 1MB in size. Since the number of files in the "temp" folder are in the thousands and have files of extension "txt", "png", "jpg", and others, my computer freezes if I try to use the GUI to find and move files.  Is there a way for me to move all JPGs that are more than 1MB in size to a different folder "temp2" via terminal? Current OS is a fresh, minimal installation of 18.04.


PHP - Regex for a person's name (Last Name, First Name)

I've been creating a regex to catch a person's name from a larger chunk of tex twith this following format:      Last Name, First Name and Additional Names (2 Additional Names Maximum)    No Additional special characters except for comma (,)    Only Names that can be derived from English alphabet [A-Z]|[a-z]   Example of Format Name:  Johnson, Carl  Scott, Michael Mark  Smith, Robert Angelo John    The first Example contains only Last Name and First Name The second Example contains Last Name, First Name and Additional Name The third Example contains Last Name, First Name and two Additional Names   So far, I've been on trial and error in Regex and this is my current regex:   ^([A-z]|[a-z])*[,][\s]*([A-z]|[a-z]|[\s])*


Is only having a single unmasked password field (no confirm) on a registration page a bad idea?

Some sites allow you to register and only provide a single password box, which is protected with stars.  Traditionally a "confirm password" box is used when registering which allows you to confirm that the password entered is indeed the password the user wishes to use.  I know that an interface is only complete when there is nothing left to remove from it, however I got caught out this week by registering at a webservice that only asks for 1 password entry. I accidentally hit the wrong key when signing up, and ended up having to go through a password reset process in order to access the service later.  Would it not be advisable to allow password entry without the stars when going with the "single password box upon registration" model?


I came across the following problem:     Show that if $x$ and $y$ are real numbers with $x <y$, then there exists an irrational number $t$ such that $x < t < y$.   We know that $y-x>0$.  By the Archimedean property, there exists a positive integer $n$ such that $n(y-x)>1$ or $1/n < y-x$. There exists an integer $m$ such that $m \leq nx < m+1$ or $\displaystyle \frac{m}{n} \leq x \leq \frac{m+1}{n} < y$.   This is essentially the proof for the denseness of the rationals. Instead of $\large \frac{m+1}{n}$ I need something of the form $\large\frac{\text{irrational}}{n}$. How would I get the numerator?


Easiest way to add a text to the beginning of another text file in Command Line (Windows)

What is the easiest way to add a text to the beginning of another text file in Command Line (Windows)?


Can you cast bonus action and reaction spells while already casting a spell with a casting time longer than a turn?

Can a bonus action or reaction spell be cast while already casting a spell with a casting time of more than a turn?  (If the bonus action or reaction spell is not a concentration spell.)  I found this on D&D Beyond about spells with :     Certain spells (including spells cast as rituals) require more time to cast: minutes or even hours. When you cast a spell with a casting time longer than a single action or reaction, you must spend your action each turn casting the spell, and you must maintain your concentration while you do so. If your concentration is broken, the spell fails, but you don't expend a spell slot. If you want to try casting the spell again, you must start over.   Since this only mentions requiring your action each turn, not bonus actions and reactions, it seems you can still take such actions.


When I plug in a removable 1TB USB disk in my laptop, the operations led keeps blinking for a while and then you can hear the servo mechanism resetting with a short "tack".  I'd like to recover the data.    I believe there might be some way to get the data through low level IOs.    What I believe is that the mounting process assumes the disk is OK and I should prevent this before using ddrescue or something similar.  Does anybody have a solution to this problem?


What I'm looking for is a way to do the cartesian product n amount of times, similar to: [(i_1,...,i_n) for i_1 in range(x) ... for i_n in range(x)]  I am supposed to build my own function for this. I know I can do something along the lines of: [...[7, 5, 6], [7, 5, 7], ...] [...[7, 5, 6, 1], [7, 5, 7, 2], ...]  But, I'm looking for a more elegant solution. In fact, I would like to know if there is a way to do it like the first line of code above.


Why are grey lines on the left, right, bottom and the top of my PNG file exported from Illustrator?

So I made an event card in Illustrator and then exported it, but the PNG file Illustrator has created has some grey lines at the top, the bottom, the right and the left of the card. I uploaded the event card on Facebook to see if they are still there, but they are, and I don't know what are those lines. Could you guys help me? (Sorry for my english, just learning the language.)


I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this  This script:  jQuery(document).ready(function(){     $("ul.vimeo_desc_feed li a").click(function(){         alert($(this).attr('href'));         return false;     }) });   Produces the error $ is not a function  This script:  jQuery(document).ready(function(){     jQuery("ul.vimeo_desc_feed li a").click(function(){         alert(jQuery(this).attr('href'));         return false;     }) });   works fine.


Why we need two forms of preferred personal pronouns?

Regarding the fact that this is still somehow a hot topiс in English language-speaking communities I need to stress out that is a serious and respectful question without even a trace of intention to mock someone's preferences or to doubt one's right to self-identification. Quite often in twitter profile people point out personal pronoun they prefer. As a non-native speaker what I don't understand why one need to provide the pronoun in two cases. For instance, consider following profiles: "he / him" or "she / her". If one prefer to be referred "he" in Nominative case, doesn't it imply that in Dative/Accusative (or whatever is the right term in English) they will expect to be referred as "him" and for Genitive they will prefer "his". So, the question is: why there it's usually common to list two forms and why exactly this two forms: not "he" / "his", for instance.


I have the following Android program code. It does not work even I input "admin", the correct answer. Then I Toast my input which exactly the same as the == "admin". But it still does not work !!! Is there any trick ? Please help !! Many thanks !!  EditText etPassword =(EditText) findViewById(R.id.etPassword); String t_etPassword =etPassword.getText().toString();  // display the t_etPassword for checking since the "if" does not work Toast.makeText(getApplicationContext(), "<<" +t_etPassword +">>", Toast.LENGTH_SHORT).show();  if (t_etPassword == "admin") {     Intent intent = new Intent(getBaseContext(), ContactListActivity.class);     startActivity(intent);    } else {     Toast.makeText(getApplicationContext(), "Un-Authorised Access !!", Toast.LENGTH_SHORT).sho();     }   } });


Assuming the spacetime principle, if the space is modified the time does too. So if the velocity in the space is increase, does the time slow down? What happens if the speed is the speed of light, does the time stops?


stuck in violet screen or black screen with dash

Since I've installed ubuntu 12.04 I have this problem (on mint 13 I also had this problem) now I have ubuntu 12.10 updated and windows 7 with it.   When I go to windows everything works fine but some times suddenly if I choose ubuntu, it will stuck in violet screen. Even the login screen wont come and I should press and hold the power button to reset my laptop I have to do this for 3 or 4 times.   After reseting and choosing ubuntu again a black screen come and there is a dash in it and nothing else. I'm woried about my lap top . if I reset it again I'm afraid it could get serious problems.  My laptop is hp probook 4520s 1GB swap space.


Why is using '*' to build a view bad ?  Suppose that you have a complex join and all fields may be used somewhere.  Then you just have to chose fields needed.  SELECT field1, field2 FROM aview WHERE ...   The view "aview" could be SELECT table1.*, table2.* ... FROM table1 INNER JOIN table2 ...  We have a problem if 2 fields have the same name in table1 and table2.  Is this only the reason why using '*' in a view is bad?  With '*', you may use the view in a different context because the information is there.  What am I missing ?  Regards


How to replace variable strings in a file?

I have a file with variables in it like below, however I want to use this file as a template and replace the variables with its actual value.  Is there a way to read the file contents and evaluate the variables?  #my script template=$(cat script.template) MY_VAR="my_data" echo $template   The above script should read the below file, and replace MY_VAR with the string my_data  # script.template export MY_VAR=${MY_VAR}   Is there a way to accomplish this with bash?  # expected output export MY_VAR=my data


How can I install Gnome Desktop on Ubuntu 15.04 with unity? Don't want to make a new clean install-- Any idea? Can't find any information about it!


Apache server doesn't start automatically

I installed Apache a long time a go as part of setting up the development environment on my laptop.  However, since I stopped it some months back, it no longer starts automatically on boot. I have this problem on my laptop at home AND on my laptop at work.  I both cases, I installed Apache in Ubuntu 10.10 some months ago, used it for several weeks without a glitch, but then one day I stopped it and now it no longer starts automatically. I tried running the update rc for it manually, but was told the init script is already in use.  However, starting/restarting it manually with   sudo service apache2 start/restart   works fine. In both cases, I let it be until after the upgrade to 11.04, because I hoped it would be solved by the new version. But it's not! I'd be grateful if someone can tell me how to have Apache start automatically once more.


I followed instructions in  to  to add directional arrows to the one-way streets on a map I'm creating.   I've currently created a marker line with the standard arrow marker but there are a lot of one-way streets (and one-way street segments). So even with just a marker on the centerpoint of each line, I get something like the below image    I'm worried that if I dissolve streets together by name, that the direction of their drawing might get muddled (and the labels point in the wrong direction).   Do tutorials exist for labelling one-way streets in QGIS?


What is the difference between attribute and parameter and argument? And how does this works? ex:-  int a = 10;//attribute method(int a);//argument or parameter   And if i pass a argument dynamically then whether it will be called parameter or argument. thanks.


Does $-2 \int (\cos^2\,x-\sin^2\,x)\,\sin\,2x\,dx$ have multiple answers?

After working $-2 \displaystyle\int (\cos^2\,x-\sin^2\,x)\,\sin\,2x\,dx$, I got $\frac{-\sin^2(2x)}{2}+c$. The answer I was given was $\frac{\cos^2(2x)}{2}+c$. Are these both legitimate solutions, depending on if sine or cosine is chosen for substitution?


Show that $E = \sum_{i=0}^{N} X_i$ is Poisson distributed when $N$ is Poisson distributed

A coin is tossed a random number of times $N$, and head comes up with probability $p$. Define the number of times head comes up by $E$. Given that $N$ is Poisson distributed with parameter $\lambda$, show that $E$ is Poisson distributed with parameter $\lambda p$.   My idea was to show this by using the pgf of $E$, since $G_E(s) = G_N(ps + 1 - p)$, where $G$ denotes the pgf. By showing that the pgf of $E$ is equal to that of a $Pois(\lambda p)$ distributed random variable, I would be done. However, when writing out $G_N(ps + 1 - p)$ I don't see how I can get to the expression I want to get to, so any tips or hints regarding this problem would be very welcome!


Is the modular multiplicative inverse $2^{-1}$ a special case in $\mathbb{Z}_p$ for prime $p > 2$?

I'm a non-mathematician but I've been reading up on number theory as part of furthering my understanding of cryptography, and I've been focusing particularly on modular arithmetic in $\mathbb{Z}_p$ for $p > 2$, where $p$ is prime.  I'm mostly understanding it, but I came across the following example:  $$2^{-1}\textrm{ in }\mathbb{Z}_p\textrm{ is }\frac{p+1}{2}$$  This appears to work, and I can't find any counterexamples, but I'm struggling to understand whether it's a special case for $x=2$ or part of a more general rule, or where this identity was even derived from.  Further confusing me is that $x^{-1}=x^{p-2}$ in $\mathbb{Z}_p$ for $x \neq 0$, which would imply that $2^{p-2}\equiv\frac{p+1}{2}$ in $\mathbb{Z}_p$ for all prime $p > 2$, and I can't see how this arises.  How does this work?


I have an old netbook and I wanna use it again.  It's a Positivo Mobile, MOBO M900.  Netbook setup:   1.2ghz processor  512 mb ram  4gb hd winXP   Is there any linux distro that I can use?  I have an USB stick with ubuntu 12.04, but since it needs more than 4gb HD, it doesnt even starts the installation.  I booted my netbook from USB and pressed "try before installing" and "install ubuntu"; on both options, the only thing that happened was the netbook showing a black screen for more than 1h.


Is there currently a method to install Android as the main OS for Lumia 640 LTE?

Sorry if this has already been answered. I've scrounged for recent answers about whether it is possible to replace a Lumia 640 Microsoft phone OS with Android, but as far as I can tell it's not yet possible. I figured you guys would have a better idea than myself.  Long and short of my asking is that I bought one, and I just don't like the OS at all. I'm very much a novice with rooting and any sort of software manipulation, so I came here hoping for some good news.


"I understand you" vs "I do understand you"

Possible Duplicate:          What is the difference between "I understand you" and "I do understand you", and what kind of grammatical structure is the last one?


I make egg muffins in a muffin tin, using cubed ham, green pepper, onion etc. plus of course beaten eggs.   How long can I keep these in the fridge after they have been baked in the oven.  I've tried after 3 days and they still taste fine, I just want to know the safety factor


Is a left and right simple ring with unity a division ring?

By a left simple ring I mean a ring with no proper, nontrivial left ideal.  $R$ be such a ring. Let $u(≠0)\in R$. Then $Ru=R$ (since $1u=u≠0$). Now $Ru=${$ru:r\in R$}. So there is an $r\in R$ such that $ru=1$.  Right simplicity of $R$ implies that there is an $s\in R$ such that $us=1$. $(ru)s=r(us) \implies 1s=r1 \implies s=r=u^{-1}.$  So each nonzero element has a multiplicative inverse. Thus $R$ is a division ring.  Is the claim and/or proof correct?


Let $M$ be a smooth manifold and let $N$ be a manifold with boundary. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}M $.

Let $M$ be a smooth manifold and let $N$ be a manifold with boundary, both with the same dimension $n$. If $dF_{p}$ is an isomorphism, then $F\left(p\right)\in\mbox{int}N  $.  I am trying to prove this theorem to prove a result about smooth embeddings.  Here is how I am thinking the problem could be solved. Assume thet $F(p)$ is a boundary point of $N$. Then there exists a chart $(V,\psi)$ at $F(p)$ such that $\psi(V) $ is an open subset of the upper half space $\mathbb{H}^{n}$. I guess we have to use some fact about $M$ having no boundary and the the fact that $dF_p$ is an isomorphism to show that there is a contradiction, but I cannot figure that out.


I have a strange 'binoculars' icon in my menu bar that disappears when I log in

On the lock screen in the top right corner of my Mac, there is a strange icon that disappears when I enter my password and log in. It would be great if somebody could tell me what that icon is, because it is making me start to worry. It is the icon in the left of this screenshot - like a pair of binoculars.


Can I register and redirect a domain that is similar to my competitors to my site to rank when people search for my competitor?

Can I register a domain similar to my competitors and rank higher in google?  For example, my competitor uses competitorwebsite.com, can i use competitorwebsite.news and redirect it to my actual domain, so that i can come up in results for "competitorwebsite", "competitor website"?  I would like to mention that I DON'T want to mislead people to coming to my website.


An isolated box is partitioned into two compartments, each containing an ideal gas of different molecular species. Assume that each compartment has the same temperature, but different no. of moles, different pressure, and different volume. The partition is suddenly removed and the system is allowed to reach equilibrium. a) What are the final temperature and pressure? b)What is the change in entropy?  Attempt:  a) The temperature still remains the same. I assumed that energy of the system equals the energy of individual compartment. On equating, I got the same temperature. For pressure, I used  $PV=nRT$ where temperature is still the same. b) Since, initial and final temperature are same, I assumed that there is no change in entropy.  I would like to know if it correct or not? Thank you for any help :)


basically says that range must behave exactly as this implementation (for positive step):  def range(start, stop, step):   x = start   while True:     if x >= stop: return     yield x     x += step   It also says that its arguments must be integers. Why is that? Isn't that definition also perfectly valid if step is a float?  In my case, I am esp. needing a range function which accepts a float type as its step argument. Is there any in Python or do I need to implement my own?    More specific: How would I translate this C code directly to Python in a nice way (i.e. not just doing it via a while-loop manually):  for(float x = 0; x < 10; x += 0.5f) { /* ... */ }


How to pay german traffic ticket while being in the USA?

Yesterday, 2 pieces of paper have appeared in my mailbox in the USA. From what I understand, it is a traffic ticket, from Germany from Summer trip, which found its way to my address in the USA.  I do not recollect any violations, however the license plate number looks legit; Date and time look legit as well. The image of the driver is, however, too blurry to recognize.  Does the traffic ticket look legitimate? I was not able to find an image of German traffic tickets online.  I would like to be a good guest, and pay it. What are my options? Wire transfer is $50, for a EUR10 fee this is ridiculous.   I was able to locate this site:  Is it legit?


How to prevent text in a table cell from wrapping

Does anyone know how I can prevent the text in a table cell from wrapping?  This is for the header of a table, and the heading is a lot longer than the data under it, but I need it to display on only one line.  It is okay if the column is very wide.  The HTML of my (simplified) table looks like this:

Really long column heading

Really long column heading

Really long column heading

Really long column heading

Really long column heading

Really long column heading

Really long column heading

data

data

data

data

data

data

data

   The heading itself is wrapped in a div inside the th tag for reasons pertaining to the javascript on the page.    The table is coming out with the headings wrapping onto multiple lines.  This seems to only happen when the table is sufficiently wide, as the browser is trying to avoid horizontal scrolling.  In my case, though, I want horizontal scrolling.  Any ideas?


Let $G$ be a group in which, for some integer $n>1$, $(ab)^n=a^nb^n$ for all $a,b\in G$.  Show that   $G^{(n)}=\{x^n|x\in G\}$ is a normal subgroup of $G$. $G^{(n-1)}=\{x^{n-1}|x\in G\}$ is a normal subgroup of $G$. $a^{n-1}b^n=b^na^{n-1}$ for all $a,b\in G$. $\left( aba^{-1}b^{-1}\right)^{n(n-1)}=e$ for all $a,b\in G$.


Problems moving /var to another partition Ubuntu 16.04 LTS EC2 AWS

I usually create EC2 instances on AWS using Ubuntu 14.04 LTS. Now they change the standard edition to 16.04 LTS, that I never used before.  I need to put /var in a greater disk, to support logs, etc.  As usually, I've created the instance, mount a disk on /mnt and copy the /var to it.  After that, I remove original /var and mount the device on a new /var. It's a simple procedure.  On Ubuntu 14.04 I never had any kind of problem to do it, but on 16.04 I've had a lot of error messages like this:  cp: cannot open '/var/lib/lxcfs/cgroup/devices/user.slice/devices.allow' for reading: Permission denied  I'm doing this by root.  Any idea?  Thanks a lot.


Error notifications for mobile comments are not working

It appears that the error notifications about comments in Mobile Stack Exchange do not work (in-browser mobile site), on many stacks. Something should be done, do we report bugs here?  My original problem was that I've tried to post comments on answers for various boards, and the button wouldn't do anything, no error message or anything. I recently found out that it's because I don't have enough reputation points, but there was no note explaining the rule like in the desktop version. A couple boards I tried it on are the User Experience one and StackOverflow.  Also, user Mooseman is eating pizza claims the same about "your message is not long enough" error.


I'm currently running ubuntu 11.04 on my macbook and I would like to dual boot both ubuntu and windows 8. There are many tutorials on how to install ubuntu while runnung windows 8 but not the other way around. Could someone be kind enough to provide me a tutorial so I can install windows 8? Your help is very much appreciated. Please explain to me like I'm five.


Asymptotic behaviour of sums of consecutive powers

Let $S_k(n)$, for $k = 0, 1, 2, \ldots$, be defined as follows  $$S_k(n) = \sum_{i=1}^n \ i^k$$  For fixed (small) $k$, you can determine a nice formula in terms of $n$ for this, which you can then prove using e.g. induction. For small $k$ we for example get  $$\begin{align} S_0(n) &= n\\ S_1(n) &= \frac{1}{2}n^2 + \frac{1}{2}n \\ S_2(n) &= \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n \\ S_3(n) &= \frac{1}{4}n^4 + \frac{1}{2}n^3 + \frac{1}{4}n^2 \\ S_4(n) &= \frac{1}{5}n^5 + \frac{1}{2}n^4 + \frac{1}{3}n^3 - \frac{1}{30}n \end{align}$$  The coefficients of these polynomials are related to the Bernoulli-numbers, and getting arbitrary coefficients in these polynomials (i.e. the coefficient of $n^m$ in $S_k(n)$ for large $k,m$) is not so easy. However, th first two coefficients follow a simple pattern: the coefficient of $n^{k+1}$ is $\frac{1}{k+1}$ and the coefficient of $n^k$ (for $k > 0$) is always $\frac{1}{2}$. My main question now is:      How can we prove that $S_k(n) = \frac{1}{k+1}n^{k+1} + \frac{1}{2}n^k + O(n^{k-1})$ for $k > 0$?   The first coefficient can be explained intuitively, as  $$S_k(n) = \sum_{i=1}^n \ i^k \approx \int_{i=1}^n i^k di \approx \frac{n^{k+1}}{k+1}$$  Maybe you could make this more rigorous, but I don't see how you will get the term $\frac{1}{2}n^k$ with this.  Also, while the coefficient of $n^{k+1}$ can be explained intuitively, it's not clear to me why the coefficient of $n^k$ is $\frac{1}{2}$, and why this one is fixed while e.g. the coefficient of $n^{k-1}$ is different for different $k$. If someone could explain that, that would be appreciated as well.  Thanks.


Kids’ show with toys to shoot at the on-screen images

What is the name of this kids’ show from the late 80s? It was based in space, and I think it was some sort of live-action TV show. Some of the images looked like TV static, and you could buy some toy spaceships shaped like a gun to shoot at the images (and somehow get hit) to gain or lose points.  I thought it was called "Captain Skyhawk", but apparently that's an old NES game.  Does anyone know what this show was called?


New Wooden decking. To stain or not to stain

I had new wooden decking installed on my balcony. The guy that did the job says it doesn't need stain because the wood is already treated:   He said to sand and stain it in two years time, but I was wondering if I stain it now maybe it will last more than two years? I live in London so, as you probably know, it rains A LOT. Wood is a very poor choice, but I can't change it because of the rules in my apartment lease.


To understand the problems with object slicing, I thought I have created a horrible example and I was trying to test it. However, the example is not as bad as I thought it would be.  Below is a minimal working example, and I would appreciate if you helped me understand why it is still "working properly". It would be even better if you helped me make the example worse.  #include <functional> #include <iostream>  template <class T> class Base { protected:   std::function<T()> f; // inherited  public:   Base() : f{[]() { return T{0}; }} {} // initialized   virtual T func1() const { return f(); }   virtual ~Base() = default; // avoid memory leak for children };  template <class T> class Child : public Base<T> { private:   T val;  public:   Child() : Child(T{0}) {}   Child(const T &val) : Base<T>{}, val{val} { // initialize Base<T>::f     Base<T>::f = [&]() { return this->val; }; // copy assign Base<T>::f   }   T func1() const override { return T{2} * Base<T>::f(); }   void setval(const T &val) { this->val = val; } };  template <class T> T indirect(const Base<T> b) { return b.func1(); }  int main(int argc, char *argv[]) {   Base<double> b;   Child<double> c{5};    std::cout << "c.func1() (before): " << c.func1() << '\n'; // as expected   c.setval(10);   std::cout << "c.func1() (after): " << c.func1() << '\n'; // as expected    std::cout << "indirect(b): " << indirect(b) << '\n'; // as expected   std::cout << "indirect(c): " << indirect(c) << '\n'; // not as expected    return 0; }   The output I get when I compile the code is as follows:  c.func1() (before): 10 c.func1() (after): 20 indirect(b): 0 indirect(c): 10   I would expect the last line to throw some exception or simply fail. When the base part of c gets sliced in indirect, there is no this->val to  be used inside the lambda expression (I know, C++ is a statically compiled language, not a dynamic one). I have also tried capturing this->val by value when copy assigning Base<T>::f, but it did not change the result.  Basically, my question is two folds. First, is this undefined behaviour, or simply a legal code? Second, if this is a legal code, why is the behaviour not affected by slicing? I mean, I can see that T func1() const is called from the Base<T> part, but why is the captured value not causing any trouble?  Finally, how can I build an example to have worse side-effects such as memory access type of problems?  Thank you in advance for your time.  EDIT. I am aware of the other topic that has been marked as duplicate. I have read all the posts there, and in fact, I have been trying to duplicate  there. As I have asked above, I am trying to get the behaviour     Then the information in b about member bar is lost in a.   which I cannot get fully. To me, only partial information seems to be lost. Basically, in the last post, the person claims     The extra information from the instance has been lost, and f is now prone to undefined behaviour.   In my example, f seems to be working just as well. Instead, I just have the call to T Base<T>::func1() const, which is no surprise.


I'm currently in the first year of a six year bachelor's degree aiming for astrophysics. The course is a home/distance learning setup run by the Open University. While I am enjoying it thoroughly, I am aware of the academic politics that can dog professional science. So my question is thus: Upon soldiering on with the degree, then masters, and then PhD, will I be taken seriously within a professional setting given my inability to reference a leading university for my education? Will the format for my studying be "pitied"?   Edit: I suppose a bit more info may help. I'm 27,wife, 2 children, and I currently work as a full time chef, and self employed part time IT technician. I flunked my GCSEs, with no further education. The past 3 years have been a revelation for me, and I have discovered a before unexperienced love for academia; specifically, physics and astronomy. Last year I completed a 1 year OU maths brush up course, which at the time I really struggled with. This year I had a bout of madness and took the plunge for a BSc degree in astronomy. I am now loving the math within the physics so far (yet to hit calculus though!)  PhD, and even masters, is a long way off.  Also, since this original post I've improved my understanding of what a PhD actually entails. So I realise that if I get there, it may well not have anything to do with the OU!     It occurs to me that a lot of my initial queries could have been avoided with a better understanding of the educational and qualification system itself. I now have a greater appreciation as to what a PhD actually is, realising that its a long way off and not necessarily needed for a fulfilling career in research.  I think trying to repair my broken education and fight my way into a worthwhile (and productive!) career is enough of challenge at the moment. There will be plenty of time later for worries concerning doctorates.  It is good to hear that there is at least an open mind towards distance educated professionals.   As has been said, if you've got it, you've got it - you just have to be ready to prove it.


Derivation of Fermat's Principle from the Least Action Principle

Can I prove that Fermat's Principle (i.e. that light beam travels between two points in the path that require minimum time) using the Least Action Principle for electromagnetic wave? (from analytical mechanics).


I'm getting an annoying NullReferenceException error. Can anyone help? This is the function, and below you can see how it is called: Error message:  NullReferenceException: Object reference not set to an instance of an object BotController.Start () (at Assets/Scripts/BotController.cs:64)  void Start() {        InvokeRepeating("RandomMove", 0f, waitTime); }  function:     void RandomMove()     {         float behaviour = Random.Range(0,3);         switch(behaviour)         {             //0: move left, 1: stop, 2: move right //             case 0: rb.velocity = new Vector2(-moveSpeed, rb.velocity.y);             movingRight = false;             break;             case 1: rb.velocity = new Vector2(0f, 0f);             break;             case 2: rb.velocity = new Vector2(moveSpeed, rb.velocity.y);             movingRight = true;             break;         }         return;     }  the console shows the error on this line:  case 0: rb.velocity = new Vector2(-moveSpeed, rb.velocity.y);  Edit: I've just changed the function to this: void RandomMove()     {         float behaviour = Random.Range(0,3);         switch(behaviour)         {             //0: move left, 1: stop, 2: move right //             case 0: movingRight = false;             break;             case 1: rb.velocity = new Vector2(0f, 0f);             break;             case 2: movingRight = true;             break;         }         return;     }  and I've put an initial speed inside the Start() function like this:         rb.velocity = new Vector2(moveSpeed, rb.velocity.y);  Now it shows the error exactly on this line. I think something's up with either Rigidbody or the vectors. I'm using the same rigidbody inside the same script with no issues.


Suppress Hot Questions containing MathJax markup on non-MathJax sites homepage

The Hot Questions list sometimes includes topics from TeX and mathematics sites. These sites have MathJax enabled to permit users to better ask questions. When a question with such markup in the title appeared in the MultiCollider SuperDropdown on a non-MathJax site, the MathJax markup appeared instead.  It probably wasn't a big deal because you'd have to go looking for the Hot Questions in the first place, and users who would do that most likely wouldn't mind.  Now that the new top bar has moved the Hot Questions list from the MultiCollider SuperDropdown to the sidebar, however, it's more of a broken window:    Obviously MathJax support on all sites isn't something that will happen anytime soon, and with reason. But. . . this really does look bad, and it's more visible now that the Hot Questions list is Right There on the Home Page.  Is it possible to suppress Hot Questions containing MathJax markup on non-MathJax sites, or otherwise prevent raw markup from invading the front page? (. Also see .)  No, I'm perfectly aware that it matters about as much as reputation does. Given that it's been nearly three years since this was first discussed, it's possible there's a better way to make it work than enabling markup support on all sites.


Should questions or answers on questions that are closed be edited, even if the question is closed and the edit does not change anything about the reason it's closed? Example:  was just edited, which I saw in the review queue. It certainly improves the answer, but since the answer doesn't really have to exist on SE at all (because the question is off-topic), should this edit be made? In my understanding, the only reason that the edit option for a closed question is not greyed out is so that it can be edited to make it comply with the SE rules.


Why does my Ubuntu 13.04 VPS say it has a 2.6.x-series kernel?

I have ordered a VPS with Ubuntu 13.04 on it.  The VPS reports that the kernel is a 2.6.x-series kernel.  From what I have read, Ubuntu 13.04 has at least the 3.8.x series of kernels.  Is there a reason that my VPS is seeing a 2.6.x series kernel, and not a 3.8.x series kernel?


Why are there two Address lines in Address forms?

Experience and a quick Google Images search suggests that it's standard to provide two fields for Address/Street. A colleague argues that it's perceived as two alternative addresses, and that the fact that there's only one country, state, zip, phone just makes it more confusing. I tried to think of a good explanation for having two fields but couldn't. To the reason of "there are some very long addresses" he replies "then why don't they use a multiline input field which would make it clearer that it's the same address".  So, what's the reason? And is it only standard for the US or for Europe as well?


Why is the declared type different from the instantiated type?

final Map map =     new ConcurrentHashMap<>();  Why declare a Map and instantiate a ConcurrentHashMap?


How can I print multiline output on the same line?

Is there a method to print multi-line output (single output) on the same line?  For example, if the output is:  abc def qwerty   Is it possible to print:  abcdefqwerty


Context-sensitive grammar for the copy language

I need to find a context-sensitive grammar for the copy language $$L = \{ww \; | w \in \{0,1\}^* \}$$  This is what I got so far:  $\begin{eqnarray} S & \Rightarrow & \lambda \; | \; X \\ X & \Rightarrow & 0XA \; | \; 1XB \\ XB & \Rightarrow & CX \\ XA & \Rightarrow & DX \\ CX & \Rightarrow & X0 \\ DX & \Rightarrow & X1 \\ 0X & \Rightarrow & 0 \\ 1X & \Rightarrow & 1  \end{eqnarray}$  This works fine for 0101 but fails even for 00 or 11.  Could you please help me to find a solution?  Thanks in advance!


simple n x n matrix in python not working

I use this to create 4x4 matrix of 'x':  listof=[] #table nic=[] #row max = 4 #tabele size nic = ['x']*max #row of x-es listof = [nic]*max #table of rows print(listof) #it looks ok listof[1][1] ="o" #changing one x to o print(listof) # wrong since all rows have o on index 1   ?how come?  BTW: I know it Works if I use:  listof = [["x" for x in range(max)] for y in range(max)]   But what is wrong with the code above? Thanks


Failled to partition error during installation

I have Thinkpad T61 with 2 G RAM & 500 GM HD, partitioned to 3 volume. one volume created while setting up windows 7 home version reserved for recovery and then C drive where the windows 7 installed. I used Wubi (CD ROM) to install Ubuntu 14.04 LTS (Os type 32bit), after first reboot Ubuntu start to install and suddenly an error pops up as below and attached picture:     Failed to partition the selected disk (as superuser)    this probably happened because there are too many (primary)  partitions in the partition table    I have only 1 primary partition in my HD, any idea?


Are the Google Chrome command-line switches are documented somewhere?  I would like to have the list of all Chrome command-line switches.


Getting people who liked another Facebook business page to like mine?

I have created a business page for my restaurant. My boss's wife has nearly 5,000 people who like her business page. Is there a way to "invite" all of the people who like her page to like my page?


What difference will the more skillful (1 star or 2 star) crew members make compared to a non-skilled one in FTL?

I checked out all tooltips in the game and their official website. Since FTL did not come with a manual I have no clue here. I know that they have something to do with recharge rates and percentages but I can't find anything specific about it.


Java Vs. Python : Why same code returning different outputs?

I cannot figure out, why the exact same Python code is giving different results in Java. I mean is there any difference in the array handling of the two languages or something that I am missing in the following codes.   In the following codes (i.e., trying to solve ), java  gets accepted while Python gets rejected. I checked out for possible failure cases: for uniquePaths(7,3) Python is returning result 7 but Java is returning 28 (which is the correct answer).   I tried to debug and find for any possible differences in the code that's causing the difference, but no luck.   Can anyone please provide some insight for such behavior or any mistake on my implementation? Thank you   ** Java Code** ::  class Solution {     public int uniquePaths(int m, int n) {         int[][] dp = new int[m+1][n+1];           return pathHelper(1,1,m, n, dp);     }      private int pathHelper(int loc_x, int loc_y, int m, int n, int[][] dp){         if(loc_x==m && loc_y==n)return 1;          if(loc_x >m || loc_y>n)return 0;          if(dp[loc_x][loc_y] != 0)return dp[loc_x][loc_y];          int count = pathHelper(loc_x + 1, loc_y, m, n, dp) + pathHelper(loc_x, loc_y+1, m, n, dp) ;          dp[loc_x][loc_y] = count;          return count;       } }   Python Code ::  class Solution(object):     def uniquePaths(self, m, n):         dp = [[0]*(n+1)]*(m+1)          return self.pathHelper(1,1,m, n, dp)      def pathHelper(self, loc_x, loc_y,  m, n, dp):         if(loc_x==m and loc_y==n):             return 1          if(loc_x >m or loc_y>n):             return 0           if(dp[loc_x][loc_y] != 0):             return dp[loc_x][loc_y]          count = self.pathHelper(loc_x + 1, loc_y, m, n, dp) + self.pathHelper(loc_x, loc_y+1, m, n, dp)          dp[loc_x][loc_y] = count          return count


How does one parse an integer to string(char* || char[]) in C? Is there an equivalent to the Integer.parseInt(String) method from Java in C?


Nvidia 840M driver installation Acer E5-571

After a lot of trying and installing I don't know anything more to I can do to get this running.   I am having trouble installing the current Nvidia proprietary driver 346.35 on a Nvidia 840M graphics card, in combinations with an Intel i5-4210U cpu, kernel 3.13.0-45 on Ubuntu 14.04.1 64 bit  After installing the driver (manually from Nvidia driver page) and restarting lightdm / rebooting I get to the login screen and everything is looking normal. Once I login the screen resolution gets distorted and nothing more than "System program problem detected" is displayed, Unity / Compiz do not load.  I also tried installing the NVIDIA drivers from edgers ppa:xorg-edgers/ppa. After a reboot you hear the Ubuntu starting sound but the screens stays black.   The only thing you can do in both cases is ctrl+alt+ F1 and uninstall all nvidia drivers to get the Ubuntu desktop loading.  Solutions that did not work:        I've never had any trouble installing the proprietary Nvidia driver on linux before, maybe someone can help me here. The image below shows the bad screen resolution after login.


When logged out, on Questions tab, after changing page size to 30 or 50 and clicking on a page number, page size resets to default 15

The URL seems to only include either the page size or the page number, but never both. This is true for both logged in and logged out states.  https://meta.stackexchange.com/questions?tab=newest&page=2 https://meta.stackexchange.com/questions?tab=newest&pagesize=50   While logged in, the desired page size is saved and reapplied correctly, but logged out it's not.  This appears to be happening on every site with the new design.


How do i preserve transparency in .fbx file?

I have created a model, in it there is a transparent object. I made it transparent by changing both the alpha values as well as the Blend Mode. My problem now is that I can't retain transparency when exported to an .fbx file. I have to re-change the Blend Mode each time after importing the .fbx. Can anyone please help me to retain transparency settings, so that as soon as I import the file, I get a transparent object the same way it was before export?  I am using eevee. if someone could help, i'll be really grateful.


What is the difference between using a swap partition vs. a swap file?

I just did a full disk encryption installation and it created a swap partition. In most manual install guides I see people making a swap file instead. So am curious to know if there is any pros / cons to have one over the other? I understand you can have both, just want to get educated on the difference between the two approaches.


I would like to add bold (or italic) text to inline code (not a block of code). So in one **two** three, I would like "two" to be bold rather than surrounded by asterisks.  Note: This is a similar question to . However, that question uses a code block example (not inline), and the accepted (and highest voted) answer on that page only works for code blocks.


No option to create a new Managed Path inside Office 365 SharePoint online 2013

I am working on an Office 365 SharePoint online 2013. Now when I wanted to create a new private site collection, inside the online SharePoint admin center, I did not find the option to create new managed path, as I use to get when creating a site collection inside SharePoint on-premise. So how do I create a new managed paths inside SharePoint online?


How to make hostile mobs hostile to other mobs?

On our minecraft realm I am a necromancer. Using the /team command I control hostile mobs to attack other players. I was hoping to make a way to make my wither skeletons and vex attack other mobs. If anyone has any ideas to make this possible using command blocks please let me know


Showing the inequality $|\alpha + \beta|^p \leq 2^{p-1}(|\alpha|^p + |\beta|^p)$

I have a small question that I think is very basic but I am unsure how to tackle since my background in computing inequalities is embarrassingly weak -   I would like to show that, for a real number $p \geq 1$ and complex numbers $\alpha, \beta$, I have \begin{equation} |\alpha + \beta|^p \leq 2^{p-1}(|\alpha|^p + |\beta|^p) \end{equation}  I thought it would be best to rewrite this as  \begin{equation} \left|\frac{\alpha + \beta}{2}\right|^p \leq \frac{|\alpha|^p + |\beta|^p}{2} \end{equation}  but then I am unsure what to do next - is this a sensible start anyways ? Any help would be great !  (P.S. this is not a homework question - I am currently trying to brush up my knowledge of $L^p$ spaces, and this inequality came up as a statement. I thought it might be worthwhile to  make sure I can fill in the gaps to improve my skills in computing inequalities.)


How to make my own ubuntu 18.04 lte with my package

I have a couple of software to be installed on ubuntu I want to run a shell script while installing Ubuntu. Please help how I can proceed.


for i in $(xrandr); do echo  "$i" ; done for i in "$(xrandr)"; do echo "$i"; done for i in "$(xrandr)"; do echo $i; done   I understand why 1 differs from 2. But why does 3 give a different output from 2? Please explain the output too. How do quotes work on newlines?


How do I reuse the Ubuntu partition after its uninstallation?

After deleting Ubuntu from partition, I'm unable to make that deleted partition into a new volume.


I'm logged in to my VPS through an SSH tunnel and have Apache installed on the server. Apache appears healthy and running.  sudo systemctl status apache2  ● apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d        └─apache2-systemd.conf Active: active (running) since Thu 2018-02-08 20:20:51 UTC; 1 day 16h ago  Docs: man:systemd-sysv-generator(8) Process: 34352 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)  CGroup: /system.slice/apache2.service        ├─20407 /usr/sbin/apache2 -k start        ├─34370 /usr/sbin/apache2 -k start        └─34371 /usr/sbin/apache2 -k start   I'd like to do a simple test in the shell in order to visibly see the It Works! default message.  I run      /var/www/html$ http://6.5.4.2  only receive:  -bash: http://6.5.4.2: No such file or directory   Any ideas?  Thanks in advance.


Identity involving Euler's totient function: $\sum \limits_{k=1}^n \left\lfloor \frac{n}{k} \right\rfloor \varphi(k) = \frac{n(n+1)}{2}$

Let $\varphi(n)$ be Euler's totient function, the number of positive integers less than or equal to $n$ and relatively prime to $n$.    Challenge: Prove  $$\sum_{k=1}^n \left\lfloor \frac{n}{k} \right\rfloor \varphi(k) = \frac{n(n+1)}{2}.$$   I have two proofs, one of which is partially combinatorial.    I'm posing this problem partly because I think some folks on this site would be interested in working on it and partly because I would like to see a purely combinatorial proof.  (But please post any proofs; I would be interested in noncombinatorial ones, too.  I've learned a lot on this site by reading alternative proofs of results I already know.)  I'll wait a few days to give others a chance to respond before posting my proofs.  EDIT: The two proofs in full are now given among the answers.


latex table border dont appear / to big / to small

still working on that table. Here's my new question reguarding the table borders:  It appears, that i do something wrong setting boarders. Here is my code, and a screenshot:  \documentclass{article} \usepackage{multirow} % Used for the vertical cells \usepackage{rotating} % Used for the vertical cells  \usepackage{xcolor} % Used for cell-colors \usepackage{colortbl} % Used for cell-colors  \usepackage[a4paper]{geometry}% Used to set the pdf margins manually \newgeometry{left=2cm,bottom=0.1cm}  \definecolor{grey}{HTML}{F2F2F2} % Define grey for the cells \definecolor{red}{HTML}{FF0000} % Define red for testing  \begin{document} \scriptsize % Use a small font size  \begin{tabular}{|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0,6cm}|}  \cline{10-17}  \multicolumn{9}{|c|}{} & \multicolumn{2}{p{\dimexpr (0.6cm)*2+2\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Work to retired ratio} & \multicolumn{4}{p{\dimexpr (0.6cm)*4+1\arrayrulewidth+2\tabcolsep\relax}|}{Health care sizing (per thousand)} & \multicolumn{2}{p{\dimexpr (0.6cm)*2+1\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Inverse dependency ratio}\\\cline{3-9}  \multicolumn{2}{|c|}{} & \multicolumn{4}{c|}{\cellcolor{grey}Population (mio.)} & \multicolumn{3}{c}{Workforce (1000)}  & \multicolumn{2}{|c|}{\cellcolor{grey}} & \multicolumn{2}{l|}{Physicians by} & \multicolumn{2}{l}{Nurses by} & \multicolumn{2}{|l|}{\cellcolor{grey}Old agers by}\\\hline  \multicolumn{2}{|c|}{} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Overall}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Young age}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\cellcolor{grey}\parbox{4cm}{Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{Overall}\end{sideways} & \begin{sideways}\parbox{4cm}{Physicians (Proj: 2025)}\end{sideways} & \begin{sideways}\parbox{4cm}{Nurses (Proj: 2030)}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}Working age by Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}Work force by Old age}\end{sideways} & \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} & \begin{sideways}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} & \begin{sideways}\parbox{4cm}{Working age}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 physicians}\end{sideways} & \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 nurse}\end{sideways}\\\hline  \multicolumn{2}{|l}{USA} & \multicolumn{4}{l}{\cellcolor{grey}} & \multicolumn{3}{l}{} & \multicolumn{2}{l}{\cellcolor{grey}} & \multicolumn{4}{l}{} & \multicolumn{2}{l|}{\cellcolor{grey}}\\\hline  1990/1 & & 248,6 & 71,3 & 146,1 & 31,2 & 127.500 & 615,4 & 1491,6 & 4,68 & 4,09 & 4,83 & 4,21 & 11,70 & 10,21 & 50,7 & 20,9\\\hline  1 & 2 & 3 \\\hline  \end{tabular}  \end{document}     On 1 the Top border of Population is not visible although i did used \\\cline{3-9}\cline{12-17} on that line.  In 2 both borders are pushed a bit to the right for no reason i can see.  And in 3 again the top borders are not visible despite using \cline{10-17} on that line. What did i do wrong?  Thanks!


When a C function does not accept any arguments, does it have to be declared/defined with a "void" parameter by the language rules?  PC-Lint seems to have problems when there's nothing at all in the argument-list, and I was wondering if it's something in the language syntax that I don't know about.  Edit: I just found a duplicate (back-dupe? it came first) question, , which has more answers and explanations.


Segmentation fault (core dumped) in nam ubuntu 14.04

when i use NS2  through terminal i keep getting a segment fault (core dumped) message.  g_0zek@g-0zeK-pc:~$ ns lab1.tcl g_0zek@g-0zeK-pc:~$ nam lab1.nam Segmentation fault (core dumped)   despite that xgraph works ok   the code in the tcl seems ok as it was given from university and one friend of mine runs it fine.  Any ideas?


How can I assign hotkey for a keyboard layout?

How can I assign hotkey for a keyboard layout, as showed on screenshot from windows ?  I want to turn on Turkish on Ctrl + 1 and Tatar on Ctrl + 2


When I try to compile this code, why does g++ report an error?  class A {   private:     static A* Aptr[5];   public:     static int A_count;     A() {         Aptr[A_count] = this;     } };  int A::A_count = 0;  int main() {     A a_;     A b_;     return 0; }     /tmp/ccrp4BGg.o: In function `A::A()': try.cpp:(.text._ZN1AC2Ev[_ZN1AC5Ev]+0x18): undefined reference to `A::Aptr' collect2: error: ld returned 1 exit status


I am travelling from India to London on a standard Visa for UK. My return is from London to Rome and then from Rome to India. Do i need to have a transit Visa for my layover at Rome? I have a layover of 17 hours. Please confirm ASAP as my flight is next week


Javascript can't find element by id on html attached from javascript

I am experiencing an issue when trying to simply detect a link button click through javascript. My nav html is spawned through javascript in this way: INDEX.HTML:

  NAV.HTML:

             Home

  INDEX.JS: $.get('/shared/nav.html', function(data) {     $("#nav").replaceWith(data); }); window.onload = function() {        const button = document.getElementById('home-button');      button.addEventListener('click', function() {         console.log("clicked");     }) }  THe javascript should execute after the html has been replaced and find the a element with "home-button" id, but button is always null for some reason... Any idea? Thanks. EDIT: Tried event delegation with no luck. INDEX.JS: $.get('/shared/nav.html', function(data) {     $("#nav").replaceWith(data); }); $("#nav").on('click', 'a', function(event) {     console.log('click.'); });  The rest of the code is identical. EDIT 2: Solution: replaceWith(data) in the javascript was removing the "nav" div, making it impossible to use event delegation. I changed from replaceWith to use innerHTML=... and the event delegation worked.


GTA V requires internet to save progress

I usually play GTA V at home with my Ethernet cable connected and my 16 GB USB stick to save progress. So far, I've gained 20% completion.   But I'm at a friends house with the same Xbox, and we can't connect it to internet. When we tried to play, we had to start the game over with Mission 1 "Prologue" and for some reason we cant save progress on the USB stick. I think this is because the game requires internet in order to save.  Unfortunately this means each time we start up the Xbox we have to start over.   Is there any workaround or solution to this?


The inner workings of the Olbers paradox

A long time ago I was told that the universe is finite. The provided "proof" (or reasoning), known as , was that on infinite universe there would be an infinite number of stars, and that an infinite number of stars in night sky would make the sky bright.  I guess this sounds reasonable, but I have some doubts. If we assume that universe really is infinite and that it has infinite number of stars spread somewhat uniformly on the space, how would one prove (or disprove!) that the night sky really would be bright? What assumptions one would need to make on the way constructing the proof?  I am not looking for a "correct" answer but how to approach the claim mathematically.


Why can't I unhide objects in 2.8 that were hidden in 2.79 blend files?

Whenever I open a blend file that's from 2.79 in 2.8, all of the hidden objects from the blend file are grayed out but I can't unhide them. But other times layers from 2.79 that become collections are having the same problem of being grayed out even though they're not hidden in 2.79. Is this just a bug? I cant find an answer for it anywhere online. They do appear in the render, just not in the viewport window


Visual C++ 2012: compiler complains about "missing ';'"

Could you please point out to me what is wrong with the following template class?  #include <vector>  template <typename T, typename C> struct pQueue{     pQueue():currEnd(c.end()){};     ~pQueue(){c.~vector();}     void insert(T& t);     void remove(T& t);     bool find(T& t);     T head(void); private:     std::vector<T> c;     std::vector<T>::iterator currEnd; };   The compiler isn't very happy about the std::vector<T>::iterator currEnd; line, and produces the following error messages:  error C2146: syntax error : missing ';' before identifier 'currEnd'   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  Thank you very much!


How can I insulate conductors independently one off the other, where they pass through a magnetic field? Are there a techniques or alloys? There is a issue how to insulate copper wire where current flows and that copper wire - wire's are in strong magnetic field. Additionally, insulators must isolate every wire independently. That's coil with 100 or more turns.


Raster Analysis in Geoprocessing Service published from ArcMap

I have prepared a tool for Masking the specific portion of the raster dataset using the feature dataset. It works fine in ArcMap but shows the following error while running it on the server.  I have used shapefile for the feature dataset and Tiff file for the raster dataset.


Short comments delimited with spaces appear to be above the character minimum

Notice that the gray text says that the comment is long enough, but the dialog prevents you from submitting.


Intuition behind independence and conditional probability

I have a good intuition that $A$ is independent of $B$ if $P(A \vert B) = P(A)$, and I see how you can easily derive from this that it must hold that $P(A,B) = P(A)P(B)$.    But the first statement is not normally taken as a definition; instead the second is.    What is the intuition, or even derivation behind defining $A$ and $B$ as independent iff $P(A, B) = P(A)(B)$?    The kind of explanation I am looking for would be one similar to that given by Jaynes for the definition of conditional probability in the first chapter of Probability: The Logic of Science, or even a Kolmogorov axiomatic explanation would help.


Building a voltage transformer circuit for sensing mains voltage

I would like to create a safe electrical circuit that measures the voltage from the wall (220vac). And the safest way that i know of so that when something fails there would be a high chance that my electronics could still survive is by using a step down transformer. The circuit i have came up with looks like this  I have several problems though:  Im having trouble looking for a transformer, since its for voltage sensing only i dont really need highoutput current, but most important of all it must be as small as possible so that i can place it on my pcb. I even opted for smd only to ensure that there will be no arc going onto another pcb on the bottom. But even with that there seems to be a lot type of transformers and dont know which one will work. Here are the three types that i think will likely to work. , , . The SMPS seems to be the most likely i will be using having high isolation and its actually stated that it can handle 220VAC. I am having second thoughts on the other tweo because some of them does not say on the datasheet the max voltage the input can handle.  For the value of the voltage divider, to get the desired output voltage that my differential ADC can handle. getting the ratio of the resistor is simple. But i am not sure what the values should be should i go higher or lower? In the circuit above i used 1k and 0.5k but i can also be 10k and 5k. which would be better?  A gut feeling is telling me that my circuit seems to be only good on paper, and in real world there would be more components,? what should i add to this circuit to make more like a proper circuit that can survive in the real world. Heck how do industrial grade equipment do their single phase voltage sensing.


make airpods microphones disabled by default when pairing with a mac

when pairing airpods with a mac, the sound quality is poor due to the fact it also uses them for microphone by default...  when I switch the audio input (microphone to internal), then quality of the airpods sound is excellent.  I don't want to do this step each time I pair airpods, is there a way to make the default microphone for mac is the internal one.