How to answer "Your experience in supervision of research students"?

Question: I finished my PhD in 2013. I don't have any experience in supervision of research students. When I apply for teaching job uni. always ask me "Your experience in supervision of research students". How to answer those kind questions properly?
Comment: Are you sure you're applying for the right jobs?  That question sounds like it's for a position for tenure or at least tenure track positions, and 2 years removed from your Ph.D. you're usually still doing post-docs.  I guess that depends on your field and how good your results so far have been, though...
Comment: @zibadawatimmy That is country-dependent. Where I work having experience supervising students is a common expectation on every hire from postdoc up.
Comment: Thanks! Yes, I am sure. The job is a full time 3 years contract Postdoct work with a 5 selection criteria. My qualification is well matched with first 4 criteria except the 5. Currently I am working for a professional firm in architecture not for postdoct. I wish I can return to academia, but my problem is that English is not my first language.
Answer: If the jobs you are applying to expect you to have experience teaching research students and you have none, there is really no explaining away of this problem. I see basically two fixes:

Get this experience. I am not sure how feasible this is wherever you work, but in my university in Europe, everybody who wants experience teaching students can get it. There are plenty of research master students or even undergrads that need supervision, and getting involved with teaching them is usually not more complicated than telling the lab head or responsible coordinator that you would be available. Of course, then you also need to be prepared to put in the hours - teaching research students is definitely not something that you can do with an hour on the side here and there, as these inexperienced researchers typically need some serious time commitment to get them started. Incidentally, the fact that it is so easy to get experience supervising students is also the reason why universities in my area consider it as a red flag if you have none - they interpret this as "I actively tried to get out of supervising students".
Find jobs to apply to that don't require teaching research students. If you for some reason don't want to be involved with teaching research students, you shouldn't apply to positions that require this. What you could maybe still do is apply to positions that are very (undergrad) teaching-centered, such as liberal arts colleges in the US or Universities of Applied Sciences in the German-speaking areas. That being said, if you don't want to be involved with research at all, you may be drawing slim as nowadays most universities seem to expect their junior faculty to do some research on the side.

To anser your literal question:

How to answer those kind questions properly?

Truthfully.
"I currently do not have any experience in teaching research students, as [insert accurate reason]. Of course I will be more than willing to get this experience as soon as possible should my application be accepted."
Answer: Just say you don't have any yet.  They may score the candidates, and one zero may affect your total score, but your strong scores in the other four aspects will bring up your total.
Also, please remember, there's a subjective factor which always comes in in hiring decisions.
If you are concerned about the total absence of experience in this one area, call them up and ask them if that puts you completely out of the running.  (If they say yes, you can save yourself some work.)  I doubt they will say yes, though.
Good luck!
Answer: For question "Your experience in supervision of research students" ... if you have no such experience, answer "none".
There is no other way to answer it "properly".


What compiler tools are used by "official" language developers?

Question: There are many lexical analyzer and parser generators out there - lex/flex and yacc/bison, jflex and javacup, gplex and gppg, etc.  I'm wondering what tools are used by the official developers of languages - do Sun and Microsoft use any of these in developing Java and .NET, or do shops of that size use only custom internal tools?
Answer: I once heard a legend that most c compiler is compiled by itself.
What they do is that they write the new version (example version 5), compile it using the old version (version 4), then using the newly compiled version (version 5 that was compiled using version 4), they compile itself again. (so that version 5 is now compiled by version 5).
Comment: That is exactly how life on Earth started.
Comment: Not legend, this is exactly as it goes for years; see this classic 1984 article about compiling compilers: http://www.c-program.com/kt/reflections-on-trusting.html
Comment: I can't remember where i read it from. Ha ha. Thanks for the link.
Comment: @iWantSimpleLife   The chicken and egg problem http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29
Comment: I thought GCC was compiled by Pastel originally ? :-) Note such bootstrapping principles aren't limited to C compilers. Free Pascal works likewise, with the first version compiled by Turbo Pascal
Answer: I've been inside a few commercial compilers, and I don't know of any that are built on lex or yacc generators.  Lex and yacc are handy to get a syntax up and parsing fairly quickly, but this is usually not the highest priority of a commercial product.  I'm not saying commercial products can't be built on yacc - I'm sure some have been - but the commercial compilers I've been part of have all been hand crafted code favoring raw speed over just about everything else.
And yes, compiling the compiler in itself is the norm, and a "fun" Escher-esque adventure in makefile logic. ;>
Comment: And crosscompiling mixed in with that makes it even funnier.
Answer: JavaCC has an up-to-date Java grammar. Whether the Java compiler is actually written via JavaCC is another question.
Comment: Grammars are often used as a form of documentation, and usually kept clean. Another such example is Delphi, which had a documentation in the inside cover of older versions, that is far, far from complete.
Answer: For the more general purpose compilers, see D Thorpe's answer. They usually don't.
Such tools are however used by companies that routinely retarget usually C compilers to newly made targets(*), with target specific extensions, to quickly insert new features in a safe, consistent way, and then run some validation suite to ensure the result is compliant.
(*) Think of new DSPs, microcontrollers etc.


What is acceptable to ask moderators to do?

Question: For example, I posted an answer that was downvoted without comment, I think because of an error in my example code. I fixed the error, but the downvote remains. Is it acceptable to ask a moderator to remove an undeserved downvote, or anything else? If not, how should such issues be handled?
Answer: Moderators cannot remove votes on posts, and don't know who voted for a post. Moderators can:

Delete posts
Convert an answer in a comment
Convert a post in Community Wiki
Convert a Community Wiki in a normal post (which will never become a Community Wiki anymore)

If there were more than one vote, they could be caught from the script against voting irregularities, and removed, but a single down-vote is not considered vote fraud.
If the down-vote would have been given because the wrong code, it should be removed once the code has been fixed. Down-votes are not a punishment for the user who posted, but they are given for bad posts, or the wrong information given in the post.
As the privilege page for voting down says:

Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect.
Comment: @beth There isn't (have a look at the questions on this [search for "downvote"](http://meta.stackoverflow.com/search?tab=votes&q=downvotes) on meta SO), there's plenty of general and historical debate on the subject but as kiamlaluno says, unless there is suspected vote fraud nothing will be done (and in many people's opinion nothing _should_ be done). Either way don't take it personally, it may just be that the downvoter hasn't re-visited the question. They won't be notified of the edit so unless/until they come back of their own accord it's likely to remain as it is
Comment: Is there any way to enforce rules such as the downvote guideline?


Why is it ok to use polarized caps to remove DC offset from an audio input?

Question: I've seen circuit diagrams that use a polarize electrolytic to remove DC offsets from an input audio signal.
The cap is polarized. Why is this ok?
Comment: Can you show an example circuit?
Answer: As long as the DC level is positive, the AC amplitude of the audio signal is of no consequence because it is a "coupling" capacitor, in the sense that the RC time constant is much higher than the highest 1/f of the audio signal (excluding dc of course), so the capacitor never gets "charged up" to the audio ac signal voltage (only to its dc value).  Instead, the voltage across its terminals remains approximately constant. In other words, the capacitor rides with the input, and if the RC constant was not high enough, audio would be distorted.  For example, you could have 1V of dc offset and 10V of ac amplitude.  If RC is high enough, the voltage accross the capacitor will ALWAYS be very near 1V,NOT 11V to -9V as the comment to the first answer seemed to imply.  Hope this helps.
Comment: Mea Culpa. I was thinking about the problem incorrectly. I have deleted the original comment where I incorrectly stated a problem about capacitive coupling. Thank you for pointing this out.
Answer: Why wouldn't it be ok?  In the usual configuration, the DC voltage on the positive side of the cap is always higher than the DC voltage on the negative side.
Even if you connect it with no bias, electrolytics can still withstand a small reverse voltage.  It's only after they are reversed continuously at 1 V or more that the dielectric starts to degrade.  See http://en.wikipedia.org/wiki/Electrolytic_capacitor#Polarity http://en.wikipedia.org/wiki/Capacitive_coupling


Invariance of Action vs. Lagrangian in Noether's theorem?

Question: I have recently started studying classical field theory. Noether's theorem states that every differentiable symmetry of the action of a physical system has a corresponding conservation law. But I find that often when solving for conserved currents, it is assumed that they are due to invariance of Lagrangian i.e; $\delta L = 0$. Are both the statements same always?
Comment: They are not, but $\delta L=0$ is very common special case.
Answer: No, they are not the same. To see why, even in classical mechanics, suppose we have symmetry transformation $q \rightarrow q + \epsilon K$ that leaves the Lagrangian invariant. This means that we must have
\begin{equation}
\lim_{\epsilon \rightarrow 0} \frac{1}{\epsilon}\left(L(q+\epsilon K, \dot{q}+\epsilon\dot{K},t) - L(q,\dot{q},t)\right) = \frac{\partial L}{\partial q}K +\frac{\partial L}{\partial \dot{q}}\dot{K} = 0
\end{equation}
$Then$ you use the fact that the equations of motion are satisfied to write $\frac{\partial L}{\partial q}=\frac{d}{dt}\frac{\partial L }{\partial \dot{q}}$ and this implies
\begin{equation}
\frac{d}{dt}\frac{\partial L}{\partial \dot{q}}K+\frac{\partial L}{\partial \dot{q}}\dot{K}=\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}K\right)=0
\end{equation}
i.e. the quantity $\frac{\partial L}{\partial \dot{q}}K$ is conserved.
A symmetry of the action is a transformation that leaves the action invariant whether or not the equations of motion are satisfied. In this case the same procedure yields the condition
\begin{equation}
\frac{\partial L}{\partial q}K + \frac{\partial L}{\partial \dot{q}}\dot{K} = \frac{dM}{dt}
\end{equation}
where $M$ is a function of $q, \dot{q}, t$. If such an M exists, we say that the action is invariant under the symmetry transformation.
It's very easy to see that when we impose the equations of motion LHS becomes $\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}K\right)$ and we can derive a conserved quantity:
\begin{equation}
\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}K - M\right)=0.
\end{equation}
The simplest possible example of a symmetry transformation which is a symmetry of the action but not of the Lagrangian is time translation in systems where the Lagrangian has no explicit time dependence. When we shift the time by an arbitrary small $\epsilon$, the generalized coordinates $q$ change according to $q(t) \rightarrow q(t) + \epsilon \dot{q}(t)$, therefore $K=\dot{q}$. But
\begin{equation}
\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\dot{q}\right)=\frac{\partial L }{\partial q}\dot{q} + \frac{\partial L}{\partial \dot{q}}\ddot{q}=\frac{dL}{dt}\neq 0
\end{equation}
In this case $M =L$ and the conserved quantity is
\begin{equation}
H = \frac{\partial L}{\partial \dot{q}}\dot{q} - L.
\end{equation}
Comment: I may be a little bit late to the party, but what is the function K that you describe here? Is it a function of q(t) and t?
Comment: Also, I guess M should be a function of $q$ and $t$, and not $q$, $\dot{q}$ and $t$ because once you include velocities too, then you would have to add an additional constraint that velocity along the path vanishes at the endpoints.
Comment: As shown in the case of time translation invariance, $K$ can be a function of $\dot{q}$ also.
Comment: In the same example, $M$ is the Lagrangian which is a function of $\dot{q}$.The Lagrangian is a function of $q$ and $\dot{q}$ treated as independent variables. The fact that in the Lagrangian formalism you derive the eqs of motions varying the action keeping the coordinates fixed at the endpoints (without requiring velocities to vanish) is another story. It means that for the trajectories that satisfy the eqns of motions as a function of time, $q(t)$ and $\dot{q}(t)$ are not independent. See https://tinyurl.com/yxfpqfg7 . Indeed, I never assumed the velocities to vanish at the endpoints.
Comment: Why do you say it is a symmetry of the action if the change in L is dM/dt?  The action changes by M evaluated at the boundaries.
Answer: First of all, a notion of strict symmetry should be relaxed to a notion of quasisymmetry to be as general as possible. Both versions of Noether's theorem remain true, but the action version is more general.
Comment: I don't understand why would we want a new name for it?
Comment: Different authors use different terminologies. It is often useful to use the word _quasisymmetry_ to emphasize the more general notion.


Can I flash my phone with another region firmware?

Question: I want to root my huawei phone but i've only found firmwares from another countries, would I have any problem if I flash my phone with any of these firmwares
Answer: If the firmware are made for your device you can flash it independently that it was made for a different country.
Take in mind that some countries have specific regulations regarding mobile devices, so some firmwares limit for example the wifi potence, the volume and/or the frequencies that the phone uses to work.
Comment: thanks, but now i got project menu in chinesse, hahahaha
Comment: So you have two options: find another rom or learn Chinese. Good luck...
Answer: I think you need to break down the question: can you flash a custom rom that is used in another country? Yes you can.
The thing I'd be cautious about is flashing the part that is responsible for the communication itself. I think it's called "modem". Imagine there are are two countries and each operates on different transmission frequencies (900/1800/etc). If you flash incompatible version you may get into trouble making phone calls or connecting to the net at all.


How can I disable the "Get a better username on YouTube" prompt?

Question: YouTube constantly prompts me to update to use a real name (and thus attach a Google+ account to my email address).  I've selected the option to continue using my old username only, but it doesn't matter — it just prompts me again later over and over.  Is there any way to permanently disable this, or a userscript to prevent it from popping up?  I use Chrome if it matters.
Comment: Do you use multiple computers?  Do you block or wipe out your cookies?   Perhaps the nag disable is stored in a cookie or something like that?
Comment: @Zoredache That occurred to me too.  I'm prety sure it's popped up on the same computer twice without wiping cookies but I will pay more attention.
Answer: I got the same prompt to get a better username from YouTube. I followed the prompt, and told YouTube that I wanted to keep my existing YouTube username. This was a one-shot deal for me. I haven't received the same prompt from YouTube again.
So why doesn't this work for you? I was already logged in to YouTube at the time I received the prompt. Maybe YouTube doesn't save your settings unless you are logged in when you input them.
The language used in the steps that follow the YouTube prompt is tricky, and may even be confusing to some people. I strongly advise you to read everything very carefully before you click on anything.
Comment: Thanks for the thoughts, but I've definitely taken the right steps while logged in ... I did select the option to use different names for YouTube and Google-in-general since I want to keep my YT username separate from my Gmail name.  I've gone through the steps one more time, I'll see if it sticks.
Answer: Check out this userscript:
http://userscripts.org/scripts/show/153375

Removes the pop-up from Youtube that tells you to "Get a better name on YouTube" by using your Google+ username instead.


Why does my heavily divided surface look like it has flat shading?

Question: Even though my surface has smooth shading on and is heavily subdivided, the geometry seems to be faceted. Anyone know why?!
Project File Linked Here
Comment: subdivide your other object too, the one you use as a source of data for displacement... try to compress file when saving or set in preferences
Answer: if you refer to those segments visible in your first picture then you need to subdivide the other mesh, the ring, the one you use to deform the grid... if you ask about the faces in the third image it is more a smoothing problem, may need an extra subdivision and use a 'set shade smooth' node... but I see you got it covered in the third picture
guess you are using a 2.93 version of blender, that smoothing node may not be there..? I'm new to GN so never used those attribute nodes either
Comment: Fuck yeah! That worked. Appreciate you!! @alambre
Comment: no problem, looks like a cool project


Making two dependent random variables independent.

Question: This might be a naive question, but suppose I have two random variables f and g that are dependent, and I have a third random variables k that is independent of both. When can I say that f and g + k are independent random variables? If that's not true, then what is one way to turn two dependent variables into independent ones (by some non-trivial operation on one of them, say)?
Comment: Intuitively, I think it's unlikely for $f$ and $g+k$ to be independent (if we're talking real-valued random variables), since the value of $f$ influences the value of $g$ and hence the maximum (say) value of $g+k$. For example, take $f\in\{-1,1\}$ with equal probability, take $g=f$, and take $k$ uniformly distributed on $(-1,1)$. One might be able to cook up exceptions, though.
Answer:
f and g + k will never be independent.
I'm not aware of any general method to make T(f) independent of g where T is some but function (possibly stochastic as well).
But if you replaced "independent" by "non-correlated" then there may be ways. Not sure but check/google "method of instrumental variables"


Create a Report of All Clients with no Contacts

Question: I need to create a Standard SF Report to display all Clients with no Contacts ? How can I check the criteria in the Report ? I tried few things but it didn't work. Any help on this is appreciated
Comment: What is Client?
Comment: Are you meant to say Accounts with no contacts? Then Accounts reports should work on this. You could also try custom report type.
Comment: You can follow this link: https://help.salesforce.com/articleView?id=000003804&language=en_US&type=1
Comment: yes apologies, I used the renamed term. So I meant Accounts with no Contacts. I added the criteria for All Accounts and Filtered by  :
Contact ID equals ""  (Thinking that this will filter the Accounts which doesnt have a Contact ID) but it doesn't display any records although there are Accounts without Contacts
Comment: @user28452 yes that worked!
Comment: I have posted that in the Answers please accept it so that other users aware of it.
Answer: Create a report on Account and add the cross filter 'Account without Contacts'. It will display all those accounts which are having no contacts.
On your Accounts report, click on "Add" Multi-Button and select "Cross Filters." and select the above criteria. Please find the attached screenshot for same.
Answer:
With the introduction of the Cross Filtering functionality in  Enterprise, Unlimited and Developer Editions. These organizations now have access to run a report to identify Accounts Without Contact records. The Cross Filters will permit you to include a sub-scope within an Accounts report to narrow the results to only those Accounts without Contacts.

On your Accounts report, click Customize to enter the Report Builder.
Click on the "Add" Multi-Button and select "Cross Filters."
In the Cross Filter section now displayed, select Accounts without Contacts.

Once in place, it will narrow the scope of the report to only those Accounts lacking Contacts.
Please follow the below link for your requirement.
https://help.salesforce.com/articleView?id=000003804&language=en_US&type=1


Writing iterated integral of a function

Question: Write an iterated integral of a function f for the region given by a triangle with vertices at point (1,1), (1,2), (3,0).

I figured that I'm supposed to first find the equations of the three lines representing the sides of the triangle.
(1,2) and (1,1) make $x=1$
(1,1) and (3,0) make $y= -(1/2)x+(3/2)$
(1,2) and (3,0) make $y= -x+3$
Is that all I need to do? In other words, is my iterated integral the following?
$$ \int_{1}^3 \int_{\frac{1}{2}x+\frac{3}2}^{-x+3} f(x,y) dydx $$
It seems too simple and I'm afraid I'm missing something.
Answer: Yep, it's as easy as that! Note that you got the slope of your second line wrong: it should be:
$$
y = \frac{-1}{2}x + \frac{3}{2}
$$
Comment: Oh, error in typing on my part! Thank you for the correction and affirmation!

Writing iterated integral of a function


Existence of a model over S-integers

Question: Let $G$ is a connected reductive group over a number field $F$. Let $S$ be a set of places containing the archimedean places for which $G$ has a model over the ring of $S$-integers in $F$. Is it true that for $v \notin S$, $G \times_F F_v$ is quasisplit and is split over an unramified extension?
Comment: "Suppose there is a set $S$ of places for which $G$ has a model over the ring of $S$-integers in $F$" is an empty condition. I reformulated accordingly.
Comment: @CoffeeBliss: Your changes have not solved the problem; the answer to your question is still no, as the example of user94041 still stands.
Comment: What if I take $\mathrm G$ to be the norm 1 units of a quadratic extension $E / F$? It seems that I can write down the coordinate ring of $\mathrm G$ over the ring of integers of $F$, so I can take $S$ to be empty. But at places $v$ where $E/F$ is ramified, you will need a ramified extension to split the torus.
Comment: If you allow yourself the possibility of adding a finite number of places to S, then the answer becomes yes.
Comment: @user94041 I edited my question to include conditions on $S$.
Comment: @PeterMcNamara For almost all places $G \times_F F_v$ is quasisplit and is split over an unramified extension. But I am wondering what happens if $S$ is smaller than that set.
Comment: I think this question is quite sensitive to the exact meaning of the word "model". You want to find some scheme $\mathcal{G}  / \mathcal{O}_{F, S}$ such that $\mathcal{G} \times F = G$. But do you require $\mathcal{G}$ to be a reductive group scheme, an arbitrary group scheme, or a totally arbitrary scheme?
Answer: (I assume $S$ is finite, the essential case.) The answer is affirmative if and only if $G$ extends to a reductive $O_{F,S}$-group scheme (i.e., a smooth affine $O_{F,S}$-group with connected reductive fibers).  This is a genuine restriction, since for any Dedekind domain $A$ and any smooth affine group $H$ over the fraction field $K$ of $A$ (e.g., $A=O_F$ and $G$ as above) there exists a smooth affine $A$-group with generic fiber $H$ (indeed, take the schematic closure of $H$ in ${\rm{GL}}_{n,A}$ relative to a choice of $K$-subgroup inclusion of $H$ into some ${\rm{GL}}_n$ to get a flat affine $A$-group of finite type with generic fiber $H$, and then apply the "group smoothening" process of Neron-Raynaud). So merely having an "$A$-model" in the sense of a smooth affine $A$-group is not a genuine constraint on a given smooth affine $K$-group; it is "spreading out" the reductivity condition that is the non-trivial feature.
In the given situation over a number field, there is some finite $S' \supset S$ so that $G$ is the $F$-fiber of a reductive $O_{F,S'}$-group $\mathscr{G}$. Indeed, this follows from  general "denominator-chasing" principles adapted to the context of reductive group schemes (see either [SGA3, XIX, 2.1.6] combined with constructibility for the locus of geometrically connected fibers [EGA IV$_3$, 9.7.7], or Prop. 3.1.9(1) or Corollary 3.1.11 in the article "Reductive Group Schemes" from the Proceedings of the 2011 Luminy summer school on SGA3). It is then automatic from smoothness of the schemes of Borel subgroups and of maximal tori for a reductive group scheme, as well as finiteness of the residue fields for $F$ at its finite places, that for every $v \not\in S'$ the $F_v$-group $G_{F_v}$ is quasi-split and becomes split over a finite unramified extension of $F_v$ (see Corollary 5.2.14 in "Reductive Group Schemes").
What to do about the finitely many places $v \in S'-S$? Note that any reductive $O_{F,S}$-group with generic fiber $G$ agrees with $\mathscr{G}$ over $O_{F,S"}$ for some $S" \supset S'$. Thus, at the cost of possibly increasing $S'$, general principles for making schemes of finite type over a Dedekind base by "gluing" in integral models over the completion at finitely many maximal ideals (see 1.4/1 and 6/2/D.4(b) in the book Neron Models, a vast generalization of Weil's adelic approach to describing vector bundles over a smooth curve) reduce our task to one over the completion $O_{F_v}$ for each non-archimedean place $v$ of $F$: a connected reductive $F_v$-group $H$ (such as $G_{F_v}$) is the generic fiber of a reductive $O_{F_v}$-group if and only if $H$ is quasi-split and splits over an unramified extension of $F_v$.  The implication "$\Rightarrow$" has been addressed already, so it remains to show "$\Leftarrow$".
So now consider a non-archimedean local field $K$ (such as $F_v$ above) and a connected reductive $K$-group $H$ that is quasi-split and becomes split over an unramified finite extension $K'/K$.  We seek a reductive $O_K$-group with generic fiber $H$. Let $\mathscr{H}_0$ be the Chevalley group over $O_K$ with the same root datum $R$ as $H_{K_s}$, $H_0$ its $K$-fiber, and $\Delta$ a basis of the underlying root system of $R$.  Then $H$ is a quasi-split $K$-form of $H_0$, and these are classified up to isomorphism by the pointed set ${\rm{H}}^1(K, {\rm{Aut}}(R, \Delta))$ (trivial Galois action on ${\rm{Aut}}(R,\Delta)$). By functoriality in $K$, the condition that $H$ splits over an unramified finite extension $K'/K$ is the condition that the class $[H] \in {\rm{H}}^1(K, {\rm{Aut}}(R,\Delta))$ has trivial restriction in ${\rm{H}}^1(K', {\rm{Aut}}(R,\Delta))$. By describing these ${\rm{H}}^1$'s in terms of cocycles we see via unramifiedness of $K'/K$ that the kernel ${\rm{H}}^1(K'/K, {\rm{Aut}}(R,\Delta))$ of restriction over $K'$ is exactly the same as the kernel of the restriction map
$${\rm{H}}^1(O_K, {\rm{Aut}}(R,\Delta)) \to {\rm{H}}^1(O_{K'}, {\rm{Aut}}(R,\Delta)).$$ But ${\rm{H}}^1(O_K, {\rm{Aut}}(R,\Delta))$ classifies the (necessarily quasi-split!) $O_K$-forms of $\mathscr{H}_0$, so the one whose $K$-fiber is $[H]$ is the desired reductive $O_K$-group with $K$-fiber $H$.
Comment: Just to clarify, you are saying that even if $G$ has a model $\mathcal G$ over $O_{F,S}$, you may still need to modify this model at some finite set of  finite places to get $\mathcal G'$ such that $\mathcal G' \times_{O_{F,S}} F_v$ is quasi-split and unramified for each $v \not\in S$. Correct?
Comment: What do you mean by "model"?  If $\mathcal{G}$ over $O_{F,S}$ is a smooth affine group scheme with connected reductive fibers (and $F$-fiber $G$) then no modification is needed.  Any smooth connected affine group over $F$ admits a smooth affine $O_{F,S}$-group model with connected fibers, and those are reductive at all places away from some $S' \supset S$. The ability to make a modification at a given $v \in S'-S$ to get a reductive $O_{F,S}$-model is *equivalent* to $G_{F_v}$ being quasi-split and splitting over an unramified extension of $F_v$.  I'm not sure what precisely you're asking.

Existence of a model over S-integers


Network Inventory Software

Question: I would like opinions on network inventory software for a medium sized financial business.
Comment: Could you add a little more detail to the question? What platforms do you need to inventory? Do you just want inventory, or do you want configuration management and provisioning as well?
Comment: needs more detail but is probably OK as-is until a better version of this is asked
Answer: If you are looking for network, server, pc, and software inventory check out spiceworks.
Great product. I have used it on both small and medium sized networks.  And did I mention it is free
Answer: This seems like it's been covered here:
Recommendations for automatic computer inventory
Lots of great answers there. Hope it satisfies your needs!
Answer: I recently started using  OCS Inventory and find it quite useful.  The agent on the client regularly updates the central server, so its install and forget about it.
Answer: If you are looking at purely network inventory (routers, switches, firewalls etc), then Opsware NAS and Voyence are two possible candidates. Both perform automated discovery, configuration management/backup and allow centralised configuration deployment.
I've not used it personally, but my understanding is that Voyence also has some nice features in terms of new device provisioning: i.e. you can define a set of best practise configuration, with some parameterised details like hostname, addressing etc and it will automatically provision a new device via a console connection.
If you are looking at more general inventory systems for everything (servers, desktops, network), then Spiceworks does appear to meet the needs of most users in small/medium sized businesses.
Answer: If you're looking for network devices you could get what you wanted with OpenView.
If you're looking for server and desktop inventory there a ton of choices including Tivoli Provisioning Manager (IBM), UniCenter (CA), or System Center (Microsoft). Of course those are on the expensive end.
We use Admin Arsenal (our product). It has a strong focus on inventory collection, as well as other system management tasks.
www.AdminArsenal.com
Answer: Hardware Inventory - is a free program for getting hardware and software information from all computers in your network. Home page: Hardware Inventory

Network Inventory Software


'Isn't this a standard?' vs. 'Is this not a standard?'

Question: I know that the first sentence 'Isn't this a standard?' is grammatically correct, but sometimes I have encountered the usage like 'is this not a standard?', putting not behind the subject this. Is the second sentence form acceptable? If it is acceptable, is there any difference in their tone?
Comment: Both are OK. Obviously the emphasis is on "not" in the second example.
Comment: What @user3169 said. The second form is bound to be less common overall, but it emphasises ***not*** more, so it works better in contexts where the speaker actually thinks it *should* be a standard (and is surprised that it's not).
Answer: (To make an answer out of this since one hasn't been made in two days...)
As @user3169 said, they're both okay. And as @FumbleFingers said, the extra emphasis is on not, which has the function of suggesting surprise at discovering that it's not a standard.

Is this not a standard? (Because I thought it was, but you're telling me it's not.)

By contrast, the more common "isn't" could be used with different intonations for a couple of purposes:

Isn't this a standard? (I want to confirm my understanding.)
Isn't this a standard? (I'm politely reminding you of the fact.)
Isn't this a standard? (Because I thought it was, but you're telling me it's not.)


Amazon EC2 Instance Continually Loses Connectivity

Question: I am currently running wordpress on an Amazon ec2 instance, which runs fine with no problems most of the time, but occasionally outside connection to the instance shuts down.  I can't access it over either http or ssh, and the server seems completely unresponsive (but the status checks pass).  However, everything is fine if I simply stop and start the instance (not restart though).  Although this problem is manageable, it is obviously extremely inconvenient and a problem for production.  Does anyone know why this might happen?  Thanks so much in advance!
Comment: How do CPU utilization and memory look, in the instance metrics in the console?  Is this a micro instance?
Comment: The metrics all look like I'd expect -- nothing extraordinary when I can connect to the instance, and obviously everything's dead when the connections fail.  It's a t2.micro instance.
Comment: Well, not quite "obviously" if the status checks are still passing.  You're saying all of the Cloudwatch metrics (in the AWS web console) stop updating?
Comment: No they update, but given that nothing can connect to the server and I had very little running, network in/out, memory write/read, and cpu utilization were all either near 0 or 0.
Comment: I experience the same thing and yes it's a t2.micro instance. CPU utilization percent scale is 0 to 1...I assume that's 0% to 100% and if so, I am seeing a sustained +85% CPU before the instance tanks. Then I can no longer SSH to the instance. Have to launch a new one from AMI.
Answer: Usually this is something you would want to contact AWS support about. Your instance's virtual network adapter could be messed up causing the disconnections, and that's something that only AWS support can handle.
Answer: It seems that you're running out of CPU credits and your instance freezes:

When an instance starts to run low on CPU Credits, its performance
  will gradually return to the baseline level (10% to 40% of a single
  core, as listed in the table above). This deceleration process takes
  place over the course of a 15 minute interval in order to provide a
  smooth and pleasant experience for your users.

https://aws.amazon.com/blogs/aws/low-cost-burstable-ec2-instances/
Comment: Can you please quote the relevant information from the link?
Comment: Is there any way to see my CPU credits on the AWS portal?


Morphological process for derivation of the word "ish" from suffix "-ish"?

Question: "Ish" is a recently derived word (free root) conveying a sense of "so-so" or approximation.  It is most commonly used as an adjective but occasionally as an adverb.  I would not be at all surprised to see it appear in standard dictionaries within the next decade.  Is there a term for the morphological process that derived the term "ish" from the derivational suffix "-ish"?  Or is this an example of slang/colloquial usage?
Comment: It's more of taking liberties with language, I'd say. Colloquialism is not quite the same as such "creativity".
Answer: Ish is listed in the OED as colloquial, first used 1986, and defined:

Qualifying a previous statement or description, esp. as a conversational rejoinder: almost, in a way, partially, vaguely.

It's also listed in at least some of these dictionaries, including Collins:

(slang) used to express reservation or qualified assent ⇒ Things are looking up. Ish
Answer: The process may be called degrammaticalization.
There is a post on the Omniglot blog that uses this exact example of -ish > ish:

Degrammaticalization, a word I stumbled across on this blog today, is the process through which grammatical affixes become independent words.
A good example is ish, which started off as a suffix on words like longish, shortish, etc. Then became an enclitic – an affix that can be detached from the words it would normally be attached to, and stuck on to other words – and finally started to be used on its own. More examples of degrammaticalization include esque, ism, pro, con, anti, ette.
In Esperanto, quite a few affixes can be used as independent words. The suffix -ig, for example, indicates the cause or bringing about of action or state, e.g. blankigi, to whiten, from blanka, white. When used on its own as the verb igi, it means 'to cause'. This appears to be a kind of deliberate, planned degrammaticalization.

The linked blog is "Mr. Verb", and the relevant post is "Degrammaticalization as liberation".
As the Omniglot post hints, this sort of thing occurs in many other languages as well.
The analysis of "degrammaticalization" is apparently somewhat debatable in linguistics: everyone agrees that specific examples like this exist, but not everyone agrees about how to explain them (or whether it is productive to try to explain them). I found a paper "Degrammaticalization: three common controversies," by Muriel Norde, (2010) that provides some discussion of this.
The term "degrammaticalization" apparently originated as a name for something that was hypothesized not to exist! Usually, we see morphemes become more grammaticalized over time, not less, and this observation caused some linguists (Norde cites Lehmann, who mentions Givón, Langacker and Vincent) to advance the hypothesis that grammaticalization is unidirectional (2).
Of course, people challenged this hypothesis with apparent counterexamples like the one in question; these counterexamples were sometimes dismissed as unimportant outliers or unexplainable freak occurences, but some linguists such as Norde have tried to treat degrammaticalization as a phenomenon worthy of study (3). Norde's paper provides some definitions and discussion of controversial points.
She discusses ish in section 6.3, "Debonding".


Use php libarary in wordpress plugins

Question: I need to work with excel files in my wordpress plugin and I should use the PhpSpreadsheet library. The problem is I don't know how to import this library in my plugin? Should I use autoload or composer? Since this plugin is for a customer, it's better to be a way the requires least modification to the site itself.
Comment: You can include these in your plugin however you see fit, but the final outcome will need to be the full plugin files. WordPress does not support composer installs and you cannot rely on that library being available.
Answer: You can always use the Composer when making a plugin and require all its dependencies. But as MikenGarrett said, finally you have to bundle all the required vendors into the plugin as a whole package.
There are WordPress repository, containing /vendor/ directory1 and their development environment containing composer.json file declaring production-dependencies ('require')2.
But using Composer you will get a /vendor/ directory and vendor directory is excluded while scraping strings for translation in WordPress plugin repository. Some people suggest changing the name of the /vendor/ directory into something else like /packages/ to scrape their strings too.
Thanks to Pascal Birchler, Tor-Björn Fjellner, Aristeides Stathopoulos for assisting in this matter.

Use php libarary in wordpress plugins


How can I chat with friends while in a LoL match?

Question: Is it possible to chat with people on my friendlist while I am playing a match? If so: how? I did not find any window or button for this yet.
Answer: You can type /w username message to message an online friend. If your friend replies to the initial message, you can just type /r message/. If you want to send another message without a response, you have to use the /w method again.
The /r method will automatically fill in the username of the friend you are having the conversation with when you start typing the message. (It fills it in with the last user that messaged you)

/w = whisper
/r = reply

They have to be on your friend list as well as in the same region as you for this to work.
If you have a friend that thinks it is fun to spam you during a match, you can use /mute username, which will stop chat for your game's duration. I would not recommend using /ignore username as it will remove your friend from your friend list.
Comment: You can continue to use /r to reply to the same person in succession, even if they do not send you another message.
Comment: Note: if you play LoL in windowed mode, you can chat during loading screen by clicking on the red Riot icon in your system tray to reopen the AIR client. (This does have the unfortunate effect of having the taskbar icon flash whenever you receive a message, which can be distracting in the middle of a game, but that can be mitigated with a 3rd-party tool that enables minimising to tray.)


How to show relative post difference category?

Question: Currently, I can show relative post by category. Some category I am not so post, so when we click on the article it will show relative post, but post in that category I am not so update, so I want to user see other post from other category.
Please see image for clear.Click here image for detail.
I want to change the article on the YOU ALSO MAY LIKE to be the update one, at            least those are within 3 months from other category if that category no post.
Comment: Did you tried anything so far? How those section displayed there? using custom code? or wordpress plugin? Please update your questions with more details. Like the existing code and all
Answer: Below code will only work if your create custom taxonomy and custom post type.
i Hope this will help you.

    <?php
    $postterms = wp_get_post_terms($post->ID, 'Your_Custom_Taxonomy_Name');   // get post terms
    $parentId = $postterms[0]->parent;
    $term_id = $parentId;
    $taxonomy_name = 'Your_Custom_Taxonomy_name';
    $termchildren = get_term_children( $term_id, $taxonomy_name );
    foreach ( $termchildren as $child ) {
    $term = get_term_by( 'id', $child, $taxonomy_name );
    $args = array(
    'post_type' => 'Your_Custom_Post_Type_Name',
    'order' => 'desc',
    'tax_query' => array(
    array(
    'taxonomy' => 'Your_Custom_Taxonomy_Name',
    'field' => 'slug',
    'terms' => $term->slug,
    )
    )
    );
    $loop = new WP_Query( $args );
    $count=1;
    while ( $loop->have_posts() ) : $loop->the_post();
    $url = wp_get_attachment_url( get_post_thumbnail_id($loop->ID) );
    ?>

<img alt="<?php the_title(); ?>" src="<?php echo $url?>" style="height: 150px; width: 150px;">

<?php the_title(); ?>

<?php echo get_the_content(); ?>

        <a class="view_more pull-right" href="<?php the_permalink(); ?>">View Details

    <?php endwhile;
    }
    ?>

Comment: Okay Thank for wonderful answer, but if I don't use custom taxonomy and custom post type so how to solve this problem?
Comment: Because normally, we already have post so if we create custom taxonomy and custom post type we need to move all post to that too.but I will try it first. Thank you for you try the best to solving me. :)


Always getting HIGH reading from PIR on ESP8266-12e pin D7

Question: I have a PIR EKMC1606112 that I am trying to read using an ESP8266-12e. I have the PIR powered using a 5v regulator so I'm sure it is getting enough voltage. My problem is that when I have the sensor out from the PIR to pin D7 it always reads HIGH. I think it is because the PIR is out putting 4.5-5v @100uA but the ESP likes an input of 3.3v. So I think I need to use some resistors to create a voltage divider. My problem is I'm not sure what size I should use. 1/4watt should work but what resistance. One at X from output to D7 and two at X from output to GND. Am I correct in this assumption and is this the right configuration? What size should I use? 33, 100k, 220k???
Comment: That sensor is rated to run off anything from 3V to 6V, so why not use the same 3.3V as the ESP and avoid those issues? Are you waiting the 30sec the sensor requires before it gives a stable output?
Answer: I only get HIGH from life. ;) but the PIR goes high with IR activity and needs a pull-down resistor for say 50uA  or 3.3V/50u = 67k nearest value to indicate absence.
If you were powering from 5V your ESP might latchup and might get very hot.  You better check that 5V is not being used.
Comment: Using an 8k pull down resistor and powering the PIR with 3.3V I got this to work.  Thanks everyone for their help.
Comment: I put a 2.2k pull down resistor on the pin and get a low reading without the sensor.  I am powering the ESP with 3.3V.  I will try powering the PIR with 3.3V and a 67k pull down resister and see what happens.  Thanks.  I will let everyone know after a while.
Comment: Fortunately the sensor open drain  FET is high in resistance and didn't latch up the ESP
Comment: I think they want you to use a bigger R so there is no self heating.


Validity of continuity equation $\frac{\partial \rho }{\partial t}+\nabla \cdot \left(\rho \vec{V}\right)=0$

Question: $\frac{\partial \rho }{\partial t}+\nabla \cdot \left(\rho \vec{V}\right)=0$
When is the continuity equation valid? And how can i find it mathematically?
Is it valid only for newtonial fluids?, compressible fluids? and viscous fluids?
Comment: Do you understand what the continuity equation is *saying*?
Comment: This does not look like a homework problem to me.
Comment: I also find the question interesting and well posed.
Comment: Isn't it valid for any fluid without sources or sinks?  I thought that was the general formalism of any continuity equation (i.e., partial time derivative of some type of density plus the divergence of some type of flux), namely, that without sources or sinks the left-hand side equates to zero.
Comment: It even works for solids.
Answer: Imagine integrating the equation over a volume. The first term gives the rate of change of the mass inside the volume. By the divergence theorem (see the nice wikipedia article), the second term gives the rate at which mass is flowing out of the volume. Any time mass is conserved in a region, the sum of these two terms has to be equal to zero. The equation will be valid for all kinds of ordinary fluids.
Answer: One can show that the energy-momentum tensor for a perfect fluid (no shear stresses, viscosity, and heat conduction), as measured by  an observer at rest, is
\begin{equation}
T^{\mu\nu}=(p+\rho)U^{\mu}U^{\nu}+p\eta^{\mu\nu}
\end{equation}
where $\rho$ is the density, $p$ is the pressure and $U^{\mu}=(1,v^i)$ is the four velocity of the fluid. Now, the energy- momentum tensor is conserved, namely
\begin{equation}
\partial_{\mu}T^{\mu\nu}=0
\end{equation}
If we write this equation in the non relativistic limit, namely $\lvert v^i\rvert <<1$, $p<<\rho$, we eventually find
\begin{equation}
\partial_{t}\rho +\vec\nabla\cdot(\rho\vec v)=0
\end{equation}
\begin{equation}
\rho\left[\partial_{t}\vec v + \vec v \cdot (\vec\nabla)\cdot v\right]=-\vec\nabla p
\end{equation}
which are the Euler equations.
Hence, the equation you wrote is valid for a non-relativistic, perfect fluid.


The ternary (conditional) operator in C

Question: What is the need for the conditional operator? Functionally it is redundant, since it implements an if-else construct. If the conditional operator is more efficient than the equivalent if-else assignment, why can't if-else be interpreted more efficiently by the compiler?
Comment: And it is actually called the conditional operator. It happens to be the only ternary operator, but as Jon Skeet reminded me once, there could always be another later.
Comment: It is not redundant. You can use it in many places where you cannot put an if block, such as in declarations.
Comment: @vittore: Just spreading some trivia I had acquired via Jon Skeet. Trying to be cool by association and all that. ;)
Comment: @toast: actually 'ternary' is quite common name for it, if not more usual then conditional
Comment: There's quite a few other questions on the ternary operator for more info on their use.
Comment: C++ http://stackoverflow.com/questions/3565368/ternary-operator-vs-if-else
Answer: In C, the real utility of it is that it's an expression instead of a statement; that is, you can have it on the right-hand side (RHS) of a statement.  So you can write certain things more concisely.
Comment: This is THE point. It converts an if/else into an expression, NOT a statement. Somehow I suspect quite a few people here don't understand the difference(please refrain from commenting that YOU do, I'm not talking to you ;) ).
Comment: @Charlie: +1. I mentioned this in mine, but it's good to make this an explicit point.
Comment: And, because of this feature, it is a great tool to make code more "functional"  and less "procedural".
Answer: Some of the other answers given are great. But I am surprised that no one mentioned that it can be used to help enforce const correctness in a compact way.
Something like this:
const int n = (x != 0) ? 10 : 20;

so basically n is a const whose initial value is dependent on a condition statement. The easiest alternative is to make n not a const, this would allow an ordinary if to initialize it. But if you want it to be const, it cannot be done with an ordinary if. The best substitute you could make would be to use a helper function like this:
int f(int x) {
    if(x != 0) { return 10; } else { return 20; }
}

const int n = f(x);

but the ternary if version is far more compact and arguably more readable.
Comment: Well, const *did* come along about, oh, 25 years after the conditional operator.  That is a cute trick though.
Answer: The ternary operator is a syntactic and readability convenience, not a performance shortcut. People are split on the merits of it for conditionals of varying complexity, but for short conditions, it can be useful to have a one-line expression.
Moreover, since it's an expression, as Charlie Martin wrote, that means it can appear on the right-hand side of a statement in C. This is valuable for being concise.
Comment: Performance was one of its benefits during the rise of complex processors. You didn't have to dump the entire processor pipe to take a branch and then possibly perform an extra copy, instead it could often just push a single ready value into the pipe.
Also, it is often more human-readable for multiline expressions than something like 'if (A) return ret1; else if (B) return ret2; ...'. There's nothing difficult to read in...
return
A? ret0 :
B? ret1 :
C? ret2 :
D? ret3;
Comment: The ternary operator also reduces Cyclomatic Complexity of the code.
Comment: @AkshayImmanuelD ⇒ Ternary operators don't reduce cyclomatic complexity. The number of paths through the code is the same whether you use a ternary operator or an if statement.
Answer: It's crucial for code obfuscation, like this:
Look->       See?!

No
:(
Oh, well
);

Comment: Note: to make the above code compile, just add struct{int See;}*Look;int No,Oh,well;int main(){ /* above code goes in here*/ }
Answer: Compactness and the ability to inline an if-then-else construct into an expression.
Comment: The inlining aspect is one distinct difference the others I think have overlooked.
Answer: There are a lot of things in C that aren't technically needed because they can be more or less easily implemented in terms of other things. Here is an incomplete list:

while
for
functions
structs

Imagine what your code would look like without these and you may find your answer. The ternary operator is a form of "syntactic sugar" that if used with care and skill makes writing and understanding code easier.
Comment: To continue the argument, we don't really need C at all because we can do everything necessary with assembler.
Comment: "Portability is for people who cannot write new programs." - Linus Torvalds
Answer: Sometimes the ternary operator is the best way to get the job done.  In particular when you want the result of the ternary to be an l-value.
This is not a good example, but I'm drawing a blank on somethign better.  One thing is certian, it is not often when you really need to use the ternary, although I still use it quite a bit.
const char* appTitle  = amDebugging ? "DEBUG App 1.0" : "App v 1.0";

One thing I would warn against though is stringing ternaries together.  They become a real
problem at maintennance time:
int myVal = aIsTrue ? aVal : bIsTrue ? bVal : cIsTrue ? cVal : dVal;

EDIT: Here's a potentially better example.  You can use the ternary operator to assign references & const values where you would otherwise need to write a function to handle it:
int getMyValue()
{
  if( myCondition )
    return 42;
  else
    return 314;
}

const int myValue = getMyValue();

...could become:
const int myValue = myCondition ? 42 : 314;

Which is better is a debatable question that I will choose not to debate.
Comment: I agree about the flogging, but I found that oddly readable. :)
Surely on in  test example with alphabetically aligned variables.
Comment: Yeah, it gets real nasty when you start putting things in parenthesis.
Comment: Even one use can lead to bugs. Case in point: your release version will have the title "DEBUG App 1.0".
Comment: If you want to demonstrate use of the result as an l-value, shouldn't the ternary be on the left hand side of an assignment, for example?
Answer: Since no one has mentioned this yet, about the only way to get smart printf statements is to use the ternary operator:
printf("%d item%s", count, count > 1 ? "s\n" : "\n");

Caveat: There are some differences in operator precedence when you move from C to C++ and may be surprised by the subtle bug(s) that arise thereof.
Answer: The fact that the ternary operator is an expression, not a statement, allows it to be used in macro expansions for function-like macros that are used as part of an expression.  Const may not have been part of original C, but the macro pre-processor goes way back.
One place where I've seen it used is in an array package that used macros for bound-checked array accesses.  The syntax for a checked reference was something like aref(arrayname, type, index), where arrayname was actually a pointer to a struct that included the array bounds and an unsigned char array for the data, type was the actual type of the data, and index was the index.  The expansion of this was quite hairy (and I'm not going to do it from memory), but it used some ternary operators to do the bound checking.
You can't do this as a function call in C because of the need for polymorphism of the returned object.  So a macro was needed to do the type casting in the expression.
In C++ you could do this as a templated overloaded function call (probably for operator[]), but C doesn't have such features.
Edit: Here's the example I was talking about, from the Berkeley CAD array package (glu 1.4 edition).  The documentation of the array_fetch usage is:
type
array_fetch(type, array, position)
typeof type;
array_t *array;
int position;

Fetch an element from an array.  A
  runtime error occurs on an    attempt to
  reference outside the bounds of the
  array.  There is  no type-checking
  that the value at the given position
  is    actually of the type used when
  dereferencing the array.

and here is the macro defintion of array_fetch (note the use of the ternary operator and the comma sequencing operator to execute all the subexpressions with the right values in the right order as part of a single expression):
#define array_fetch(type, a, i)         \
(array_global_index = (i),              \
  (array_global_index >= (a)->num) ? array_abort((a),1) : 0,\
  *((type *) ((a)->space + array_global_index * (a)->obj_size)))

The expansion for array_insert ( which grows the array if necessary, like a C++ vector) is even hairier, involving multiple nested ternary operators.
Answer: It's syntatic sugar and a handy shorthand for brief if/else blocks that only contain one statement. Functionally, both constructs should perform identically.
Answer: like dwn said, Performance was one of its benefits during the rise of complex processors, MSDN blog Non-classical processor behavior: How doing something can be faster than not doing it gives an example which clearly says the difference between ternary (conditional) operator and if/else statement.
give the following code:
#include <windows.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>

int array[10000];

int countthem(int boundary)
{
 int count = 0;
 for (int i = 0; i < 10000; i++) {
  if (array[i] < boundary) count++;
 }
 return count;
}

int __cdecl wmain(int, wchar_t **)
{
 for (int i = 0; i < 10000; i++) array[i] = rand() % 10;

 for (int boundary = 0; boundary <= 10; boundary++) {
  LARGE_INTEGER liStart, liEnd;
  QueryPerformanceCounter(&liStart);

  int count = 0;
  for (int iterations = 0; iterations < 100; iterations++) {
   count += countthem(boundary);
  }

  QueryPerformanceCounter(&liEnd);
  printf("count=%7d, time = %I64d\n",
         count, liEnd.QuadPart - liStart.QuadPart);
 }
 return 0;
}

the cost for different boundary are much different and wierd (see the original material). while if change:
 if (array[i] < boundary) count++;

to
 count += (array[i] < boundary) ? 1 : 0;

The execution time is now independent of the boundary value, since:

the optimizer was able to remove the branch from the ternary expression.

but on my desktop intel i5 cpu/windows 10/vs2015, my test result is quite different with msdn blog.
when using debug mode, if/else cost:
count=      0, time = 6434
count= 100000, time = 7652
count= 200800, time = 10124
count= 300200, time = 12820
count= 403100, time = 15566
count= 497400, time = 16911
count= 602900, time = 15999
count= 700700, time = 12997
count= 797500, time = 11465
count= 902500, time = 7619
count=1000000, time = 6429

and ternary operator cost:
count=      0, time = 7045
count= 100000, time = 10194
count= 200800, time = 12080
count= 300200, time = 15007
count= 403100, time = 18519
count= 497400, time = 20957
count= 602900, time = 17851
count= 700700, time = 14593
count= 797500, time = 12390
count= 902500, time = 9283
count=1000000, time = 7020

when using release mode, if/else cost:
count=      0, time = 7
count= 100000, time = 9
count= 200800, time = 9
count= 300200, time = 9
count= 403100, time = 9
count= 497400, time = 8
count= 602900, time = 7
count= 700700, time = 7
count= 797500, time = 10
count= 902500, time = 7
count=1000000, time = 7

and ternary operator cost:
count=      0, time = 16
count= 100000, time = 17
count= 200800, time = 18
count= 300200, time = 16
count= 403100, time = 22
count= 497400, time = 16
count= 602900, time = 16
count= 700700, time = 15
count= 797500, time = 15
count= 902500, time = 16
count=1000000, time = 16

the ternary operator is slower than if/else statement on my machine!
so according to different compiler optimization techniques, ternal operator and if/else may behaves much different.
Answer:
Some of the more obscure operators in C exist solely because they allow implementation of various function-like macros as a single expression that returns a result. I would say that this is the main purpose why the ?: and , operators are allowed to exist, even though their functionality is otherwise redundant.
Lets say we wish to implement a function-like macro that returns the largest of two parameters. It would then be called as for example:
int x = LARGEST(1,2);

The only way to implement this as a function-like macro would be
#define LARGEST(x,y) ((x) > (y) ? (x) : (y))

It wouldn't be possible with an if ... else statement, since it does not return a result value.  Note)
The other purpose of ?: is that it in some cases actually increases readability. Most often if...else is more readable, but not always. Take for example long, repetitive switch statements:
switch(something)
{
  case A:
    if(x == A)
    {
      array[i] = x;
    }
    else
    {
      array[i] = y;
    }
    break;

  case B:
    if(x == B)
    {
      array[i] = x;
    }
    else
    {
      array[i] = y;
    }
    break;
  ...
}

This can be replaced with the far more readable
switch(something)
{
  case A: array[i] = (x == A) ? x : y; break;
  case B: array[i] = (x == B) ? x : y; break;
  ...
}

Please note that ?: does never result in faster code than if-else. That's some strange myth created by confused beginners. In case of optimized code, ?: gives identical performance as if-else in the vast majority of the cases.
If anything, ?: can be slower than if-else, because it comes with mandatory implicit type promotions, even of the operand which is not going to be used. But ?: can never be faster than if-else.

Note) Now of course someone will argue and wonder why not use a function. Indeed if you can use a function, it is always preferable over a function-like macro. But sometimes you can't use functions. Suppose for example that x in the example above is declared at file scope. The initializer must then be a constant expression, so it cannot contain a function call. Other practical examples of where you have to use function-like macros involve type safe programming with _Generic or "X macros".
Answer: ternary = simple form of if-else. It is available mostly for readability.
Answer: The same as
if(0)
do();

if(0)
{
do();
}

The ternary (conditional) operator in C


Starting point in learning Core Data on iPhone?

Question: What is the starting point for Core Data in order to get involved quickly?
Any useful link, blog or book or other resourse?
Answer: You might be interested in video of the Core Data class from my Advanced iPhone Development course, which is available for free on iTunes U.  I walk through Core Data and how to use it in an iPhone application.
If you log in to the iPhone Developer Program site, you have access to a series of videos for free, among which is the session "Working with Core Data" (in the Advanced Videos section).
For more advanced information, the WWDC 2010 session videos have the sessions 137  "Optimizing Core Data Performance on iPhone OS" and 118 "Mastering Core Data".
Answer: Besides the Apple documentation, you will find extremely useful the following book:
Core Data, by Marcus Zarra.
Answer: I did start with Apple's doc which is clear and complete.
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/cdProgrammingGuide.html
I'm quite sure there is a tutorial over there.
Core Data is not iPhone only, but i-phone specific elements are clearly indicated.
Answer: Marcus Zarra's book is awesome and I love it, but I got started with More iPhone 3 Development from APress.  A few chapters in the book walk through creating a Core-Data based app on the iPhone, and the code is actually pretty usable in further projects.
Answer: I've been reading through Pro Core Data for iOS which seems to go over the concepts pretty well. It was able to get me up and running with a basic Core Data application pretty quickly. That and looking at the demo projects helped a lot.


Comparing distribution A to B and C

Question: I have three discrete probability distributions, A, B and C. They are all measuring P(X) under different circumstances. I suspect that A is more similar to B than it is to C. I know that I can compare the difference between distributions with KL divergence, but how can I test whether the difference between A-B is less than the difference between A-C?
Comment: You have a tough problem, because statistical and mathematical theory will not decide the answer: you are assuming there is a relevant way to compare distributions so that "less than" has meaning.  *What* meaning it might have is up to you to decide: that's not something we can tell you--although we can provide some guidance, if you would explain how you intend to interpret the result.
Comment: Rather than comparing the distributions as a whole, can you not compare specific aspects of the disrubutions, captured by relevant quantiles or functions of quantiles? This might give you more insights into where the distributions differ (e.g., tails).
Comment: You seem to answer your own question: by comparing the two KL-divergences. Of course that means you're committing to defining "difference between" as "KL-divergence from".
Answer: You already got some hints in comments, and a request for more information, which you didn't give us. Here are some thoughts:
Observations on three discrete variables, presumably defined on the same categories, can be represented as a contingency table. Then you do a correspondence analysis, see Interpreting 2D correspondence analysis plots.  The results can be presented graphically, and the three variables can be compared with the so-called chisquare distance.  A similar graphical analysis can probably be based on the KL divergence. To say more we need more context.

Comparing distribution A to B and C


Is it possible to set up my phone to automatically be in DND mode during particular calendar events?

Question: I already have a recurring scheduled DND set for my phone for every evening through morning. However, I have calendar events that I would like to automatically trigger DND. For example, let's say I have a meeting with a co-worker, I'd like to be able to enter that into my calendar and select a "DND" option for that time. So, once the event is over, my phone is back to normal, and I don't have to worry about silencing it myself. Is this possible?
Answer: Short answer… No.
There is no public API that manages the "Do Not Disturb" feature. There are also no frameworks that can achieve this.
Googling would also say it's not the kind of sandbox breakout Apple would be likely to allow in the future, either.
Answer: This is a feature I find lacking in the current (and previous) versions of iOS. The only step one can take, unless one works on the iOS dev team @ Apple, is to give feedback about the iPhone, and make an enhancement request with this succinct need.
I did this months ago, and more folks who would like this functionality in later versions of iOS should make this request as well.


Does Bitcoin-core support creating a new Bitcoin blockchain?

Question: My goal is to add a new feature to Bitcoin, which requires changing the structure of the Bitcoin blockchain. So I was wondering if Bitcoin Core supports having a new/own Blockchain? If so, how to do it? Right now, I manage to run bitcoind but it seems to sync from the existing Bitcoin blockchain.
Comment: What do you mean by *"changing the structure of the bitcoin blockchain"*? It isn't really clear what you're asking here.
Comment: Sorry for the unclear question as we are not exactly sure what kind of change we are going to make yet. However, we will do it for a research purpose. Roughly speaking, we are interested in exploring security of Bitcoin in a different direction, which may require adding a new field in the block header or modify/add the hash/signature algorithms.
Answer: Bitcoin Core supports creating a custom signet and mining utility for setting up a public test network with alternative functionality. This is not meant to be used to create an altcoin with actual or perceived monetary value as I (and many others) would recommend using a sidechain rather than attempting to start a new currency.

Right now, I manage to run bitcoind but it seems to sync from the existing Bitcoin blockchain.

Yes running bitcoind is for mainnet and bitcoind -testnet and bitcoind -signet are for testnet and the default signet (not custom signets).
Comment: Thanks for the answer. We will not be creating an altcoin but will mainly do it for PoC/research purposes. For instance, if we would like to modify how transaction verification works in Bitcoin, would you recommend doing it on a custom signet or a sidechain?
Comment: A sidechain would be for locking up actual Bitcoin (with real monetary value) on mainnet. So if you want to experiment with coins with no monetary value I'd use a custom signet. You should really test what you want to do on signet/testnet before moving to mainnet regardless.


Do ingested poisons have a taste?

Question: Do ingested poisons have a taste? Can they be identified as poison at the time of consumption?
I know a Potion of Poison tastes just like a Potion of Healing, but I don't know how to deal with the other poisons listed in the DMG.
Comment: Very related, possibly a duplicate: [How to handle when PCs taste a potion that is actually poison?](https://rpg.stackexchange.com/questions/149623/how-to-handle-when-pcs-taste-a-potion-that-is-actually-poison)
Comment: Also related: [Would the flavoring from the Prestidigitation cantrip mask a food/drink that is otherwise inedible?](https://rpg.stackexchange.com/q/161933/38834)
Comment: @NautArch I don't think the other question is about the Potion Of Poison at all. It's about generic/any poisons. Though some of the problem/confusion may be because a poison could be considered a type of potion
Answer: Not casually.
The rules on poisons are mostly in the DMG in Chapter 8. None of those rules deal with poisons having telltale signs in general. Relatively few poisons operate via ingestion (indicated by the Ingested property).
I'm not aware of any rules which state that a character may become aware of a poison's presence incidentally. At your DM's discretion you should probably be able to make a roll to actively check for poison (like an Investigation check versus Passive Perception), provided that your character would have some basis to know what a poison tastes/smells/feels/looks like. Possibly a very high Passive Perception score might be enough, again at DM discretion.
The saving throws for all of them are CON saves to resist the poison. Those which deal damage immediately might be noticed by inference-- "I drank the mead, but now I'm having violent cramps and burning pains. I feel like I've taken 3d6 damage!".
Others would be useless if they could be detected at the time of consumption, particularly Midnight Tears. That poison has no discernable effect until midnight after ingestion, and being able to casually notice it beforehand would make it useless, more or less.
Broadly speaking, deciding that poisons can be noticed easily leads to a game in which poisons are going to be mostly irrelevant. It will become a reflex to check every drink for poison, much like the cliché "I check for traps" approach to moving into a new room in a dungeon. But if poisons were plot relevant, and a character could specialize in knowledge of them, you might be able to build some intriguing scenarios.
It's also the case that there exist spells which reveal the presence of poisons, and a common guideline in 5e is that characters shouldn't be able to duplicate spell effects "for free", by which I mean without taking spellcasting/such a spell (and therefore giving up other class features and spells in exchange). That also argues against poisons being easily identifiable via mundane, incidental means.
Comment: Although *identify* is mirrored by spending a short rest...
Answer: There's no (RAW) reason to believe it does
5e is better than previous editions at doing only what it states and the writers have gone out of their ways to confirm that there are no "unwritten" rules.
Although it is probably unlikely that all poisons would have no distinct taste due to their assumed composition, no official content states that poisons are identifiable as such once mixed into food or drink.

Do ingested poisons have a taste?


Using virtual inheritance on "final" classes in unfinished class hierarchies

Question: Is there any harm or is it considered bad design to preemptively derive virtually classes in an unfinished class hierarchy that are currently "at the bottom" (i.e., the most derived)?  Is there a good reason one would want to wait until there was actually a need for virtual inheritance (i.e., when someone decides to extend the hierarchy and it results in a diamond)?
Answer: I would avoid virtual inheritance until actually needed. When you use virtual inheritance you are leaking part of the abstractions that you build on your class, and in particular how you initialize your base class, by forcing the call to the virtual base to the most derived type.
Comment: The usual advice is to use virtual inheritance only from "pure" interfaces, usually with no user defined constructors.
Answer: It adds complexity to a system that doesn't need it.
When you add functionality or features to a codebase in anticipation of future needs, you will often miss the target.  Sometimes that functionality will, indeed, be needed some day -- even if not today -- but in many cases it will not.  What results is large, complicated classes that are more difficult to understand, more difficult to debug, maintain and extend, and may cost more in terms of efficiency.
The KISS principle exists for a reason.  It keeps your code from becoming a Rube Goldberg machine.
Comment: virtual inheritance is complex?


Broken screen Galaxy s5, cannot unlock pattern

Question: My s5 has a screen damaged such that it displays properly, but does not respond to touch. How do I release the pattern lock to transfer my data to something else?
Comment: Welcome to Android Enthusiasts! Have you already looked into our [broken-screen tag-wiki](/tags/broken-screen/info)? There have been ump-teen people with the very same issue before you, so we've collected some first aid (from their questions and answers) there. If you cannot find a solution there that works for you, we need some more details – e.g. what Android version, whether USB-debugging is enabled, what you've already tried. PS: there's also our [locked-out tag-wiki](/tags/locked-out/info) ;)
Answer: You should be still able to enter recovery mode, if you have a modded recovery like TWRP or CWM you can recover your data as in that mode the phone is not locked by the system, therefore you can access photos, docs and so on, If however that is not the case, you can still install TWRP, if you had Debug mode on before the accident


Going from Windows XP to Windows 8.1

Question: I have been watching videos on how it is done by Microsoft but they all talk about and use MDT/WDS/SCCM.
Is there a way to transfer everything over without using those enterprise options? Or am I better off just transferring files off 1 by 1 and re-installing software?
I have 2 new machines and I want to move everything off from the Windows XP machines.
Answer: The Windows 8.1 disk won't allow you to migrate directly from Windows XP. In this case, you have to back up your files (as stated in this Microsoft article) and then upgrade.

Going from Windows XP to Windows 8.1


What version of entity framework does .NET 4.5 have in it?

Question: I'm upgrading to .NET 4.5 at work for some projects and I was using EF 5. Do I still need to reference EF 5 from all the projects?
Answer: Entity Framework 5 is a separate API, not included with .NET 4.5 framework specifically (but VS2012 does include it). Preferably, you'd use NuGet to include and reference it in all your projects that require it.
Answer: Yes, you will still have to reference EF -- it's not baked into System or one of the core .NET assemblies.
However, if your project was pre-.NET 4.5, you were referencing EF 4.4, not really EF 5.  The version of the assembly is different than the version of EF for the 4.5 .NET Framework.  So you would want to make sure you upgrade your version of EF to the true EF5 which is supported on the .NET 4.5 Framework.
This article explains it pretty well.
Comment: @JoshKodroff Here seems to be an actual link to the article: http://thedatafarm.com/blog/data-access/when-entity-framework-5-ef5-is-not-entity-framework-5-ef5/
Comment: The link in this answer is returning a 404.


Where am I wrong ??

Question: Let $(X,|.|)$ be a Banach space. $A\in B(X)$ a bounded injective operator. Then we can define another norm on $X$ by
$$|x|_A=|Ax|.$$
Since we have
$$|x|_A\leq |A||x|$$
Then by the result of continuity of the inverse, there's a constant $c>0$ such that
$$|x|\leq c|x|_A=c|Ax|$$
But the last inequality means that $A$ cannot be compact. This means every injective bounded operator is not compact which is not true because there's lot of counter examples. So i don't know where I am wrong in my reasoning.
Comment: Your "result of continuity of the inverse" requires that the range of $A$ be closed.
Comment: @David I just saw that $(X,|.|_A)$ is actually not a Banach space, so I can't apply this result. Which as you said needs $R(A)$ to be closed. This maybe provides a counter example of applying the open map theorem with one of domain/codomain not Banach.
Answer: As David Mitra mentioned, $(X,|.|_A)$ is not Banach, so we can't apply the result of the boundedness of the inverse operator. This needs $A$ to have a closed range.

Where am I wrong ??


Even though we close our eyes, can we perceive a place?

Question: Even though we close our eyes, can we perceive place?
For example, if we close our eyes, we see darkness and black color, then do we see dark place and black place?
Comment: We perceive the place right behind our eye lids.
Answer: Most people can picture things and places when their eyes are closed.  Some people apparently can't.  These people are said to have aphantasia.  If you're asking this question, maybe that's you?  People with aphantasia say they use words and concepts to represent things they're thinking about, rather than drawing mental pictures.  It is not a disability, just a different way of processing.  Many successful people have had aphantasia.
When a person who does not have aphantasia pictures something, it's different from looking at the back of their eyelids.  People without aphantasia form mental pictures that don't involve their eyes at all.  The image forms in a separate mental "place" that is not any place their eyes are seeing.
Answer: We have a minimum of 4 other senses to perceive our surroundings. By some counts we have at least 42 senses, though many of them are of internal states. We constantly seek consilience, convergence of evidence from different senses, to help us decide what is real.
We build up a mental collation of information about our surroundings. Our focal area for vision is actually very small, and it's only by our eyes darting about that we feel we see the world in focus. What we are not currently focused is held in a mental model that is updated with each visual sweep. Other senses, like proprioception and balance help us locate ourselves in the mental picture. It's been found the human brain seems to be in two halves in order for one to focus on a picture of the world, the other half on ourselves https://www.nature.com/articles/483260a People who become blind reallocate their visual cortex to collate inputs from other senses, typically within about 3 months.
Proprioception, our sense of where our body & bone joints are, can be used to map distances between things encountered when unable to see, for instance. Blind people get attuned to information about surfaces & size and shape of rooms from sound, in ways sighted people are likely to miss.
Just like our visual perceptions, the information from other senses can be held in our mental model of the world. It will just be updated more slowly than visual inputs, of course, and may require actively seeking data like moving around and getting tactile feedback (eg a white cane). Training helps a lot, our brains allocate resources based on how we use them.


Do not update a specific package

Question: Is there a way to tell composer that each time I do a composer update I want him to ignore a specific package?
Comment: IIRC a flag to do things like this is coming
Answer: Have you considered specifying the required version for the package you are trying to ignore?  For instance:
"require": {
    "some/package": "~1.2"
}

This may get updated, because you are saying any version >=1.2,<2.0,  But if you strictly say you want only version 1.0, you should not see any updates to that package:
"require": {
    "some/package": "1.2"
}

Comment: Thank you! This is exactly what I was looking for. Definitely it should be accepted answer - no playing with composer.lock file
Comment: I have a version called `dev-master 1910041`
Answer: Actually I don't know if there is any way to tell composer to exclude one specific package from updating but you can tell which packages to update as
composer update <package> <package2>; // or
php composer.phar update <package> <package2>;

For example,
composer update foo/package1 bar/package2; // or
php composer.phar update foo/package1 bar/package2;

Also, I think, if  you don't list them in composer.json (remove after installation) by yourself, then they will not be updated unless also specified in the list.
From Composer:
If you only want to install or update one dependency, you can whitelist them:
$ php composer.phar update monolog/monolog [...]

Check this link and also check Composer.
Update : (found on internet but not tested)
To do that, just remove the package from composer.lock
Comment: if you remove a package from composer.json, it will be removed when you make a `composer update`
Comment: I tried removing the package from composer.lock but doesn't work. When running the update, composer puts it back. Updating all the other packages manually it's not what I need (but if I don't get a better answer / solution, I'll mark your answer as the solution. Thank you @sheikh-heera
Comment: hey! welcome man, did you check the composer's site, it has been said to mention packages, something like `php composer.phar update monolog/monolog [...]` and also, did you try to remove the package from `composer.json` too ?
Answer: To ignore a specific package, you can use provide (if it's part of your own package) or replace. This tells Composer that you wish to provide/replace a specific package, so it won't download it.
Here is the composer.json file example which should work:
{
    "require": {
        "radic/tmp-underscore-php": "~1.2.0"
    },
    "replace": {
        "patchwork/utf8": "*"
    }
}

In this example, the patchwork/utf8 package would be ignored on composer install or update.
To exclude specific version, see: Composer exclude specific versions.
Answer: Update: Only availble for composer versions 1.0.0-alpha6 and lower. Using it in version 1.0.0-alpha7 and higher will remove all packages in "require-dev".
I believe currently you can trick composer with some mess if you can afford it in your project. Something like: Put all packages you don't want to update in "require-dev" and run updates with composer update --no-dev
Just be careful of that if you run composer install as i recall they will be removed from your project.
All this trickery is really nasty, so we should wait for official way of doing things like that, personally i update packages explicitly specifying them
Comment: This finally did the trick for me. Definitely the only solution to leave specific packages untouched. tried every other possibility before.
Comment: The `composer update --no-dev` removes all "require-dev" packages, do not use it. I learned it in the hard way...
Comment: @Clyff thats correct just checked, it works for versions < 1.0.0-alpha7. It was rewritten after/including in 1.0.0-alpha7.
Comment: @arma Thank you for updating the answer :)

Do not update a specific package


Is there a use for the Neapolitan chord other than resolving to the tonic or dominant?

Question: Any links to score examples of classical, metal, or other music would be great.
Answer: It depends on how local your viewpoint is, but here are some fun ideas that composers have used:

It's common for a Neapolitan to move through an applied chord to the dominant before moving to the dominant proper. Thus a Neapolitan sixth, with scale-degree 4 in the bass, can move through (for instance) a viio7/V (#4 in the bass) up to V (5 in the bass), creating a nice chromatic line in the lowest voice. (You can match this with the descending chromatic line in the soprano of b2--1--7 if you want!)
ttw references Chopin Op. 48, No. 1. This is actually my favorite use of the Neapolitan, but it's actually an applied chord to the Neapolitan. In this video, you can watch the score as it happens. (The measure in question is the second measure of this screen, but I recommend listening to the whole thing to get the real effect!) Chopin sets up what you expect to be the final cadence of the piece with a big dominant chord, built on G (scale-degree 5) in C minor. But instead of resolving this to tonic, Chopin resolves this to an A-flat dominant seventh chord in third inversion (?!), with G-flat (scale-degree b5?!) in the bass. As it turns out, this is actually just a V42 of the Neapolitan, and since the Neapolitan is so often in first inversion, this G-flat just slides down a half step to the F of that Neapolitan chord. At this point he then moves to the dominant and tries the cadence again.
Similarly, composers will just hang out on the Neapolitan sometimes, embellishing it with its own dominant. Let's say we're in E minor; the Neapolitan sixth is an F-major chord with A in the bass. A composer could just alternate between this chord and the V42 of F major (C7 with B-flat in the bass) to hang out in Neapolitan land for a bit before returning back to F major and doing whatever s/he ultimately wanted to do. A number of pieces do this, but my memory is failing me right now...
Neapolitan chords can also be used as pivot chords (also called "common" chords) in modulations. For instance, in the above Chopin example, the Neapolitan was a D-flat major chord. Since D-flat major chords exist in multiple keys, Chopin could have gone to that D-flat major chord in C minor but then left it in another key. As one possibility, we know that D-flat major appears in A-flat major as the IV chord. So, Chopin could have gone from his D-flat major chord in C minor and treated it as IV in A-flat, moving straight to an E-flat dominant (V7) and resolving to A-flat (I).
Or, you can go the other way. Hang out in A-flat, and when you get to a IV chord, resolve it as if it was the Neapolitan in C minor!
And you can also use Neapolitan chords in sequences. Start on a tonic chord. Then let's just have a string of V7--I progressions, where each I is a half step higher than the I two chords earlier. So one progression could be: C, Ab7, Db (the Neapolitan), A7, D, Bb7, Eb, etc. Though here it's a little silly to call that Db the Neapolitan, since it doesn't really function that way at all.

I'm sure there are other fun things to do with Neapolitans, but these are all that came to mind at the moment!
Comment: Sorry, I should have known not to write some of those things! I'll go in a different order though, for ease's sake: in the V42, the 42 is what is called [figured bass](https://en.wikipedia.org/wiki/Figured_bass#Numbers). For now, just know that 42 means a seventh chord in third inversion, so "V42 in F major" is equal to "C7 in third inversion."
Comment: "b2--1--7" were scale degrees. So in that example (we were in C), you have F--F#--G in the bass, which you could match with Db--C--B in another voice. If we think through the scale of C, D is the second scale degree, C the first, and B the seventh, so the lowered second scale degree would be D-flat, so scale-degrees b2--1--7 would be Db--C--B.
Comment: And I probably can't fully clarify viio7/V in a comment, but I'll try. The numbers are what we call "Roman numeral notation," and this specific chord is called an "applied" (or "secondary") chord. We were in C, and we want a viio7/V, spoken as "seven-diminished-seven of five." The V here is the V of C, which is G. So ultimately we're looking for a viio7/G. The "viio7" here indicates a fully-diminished seventh chord (that's the "o7") built on the leading tone (that's the "vii") of G (that's the "/G"). In this case, that chord is F#--A--C--Eb.
Comment: Great, just some clarification of some terms please (let's say the key is C major): what are the notes in the chord viio7/V, not really sure what a 'b2--1--7' is, V42 (what does the number 42 mean)?
Comment: I've seen the (dominant-)embellished Neapolitan in Schubert's Moments Musicaux No. 5 in F Minor. Heck, he promptly goes Neapolitan - German Augmented 6th - i6/4 - V straight after that.
Answer: Most of the ones I've seen lead to the dominant, sometimes by way of a  64 chord. There's one in Bach's St Matthew Passion, it's a piano reduction so I only know it's in a quick 3/8 section. Mozart has one in his Concerto K.453 as does Chopin's Nocturne Op.48, No.1.
Comment: Unfortunately, no. They're excerpts in a music book. However, I got a couple of others.   Beethoven, Op27,No.2, 1st movement mm49-51.  Mozart, Fantasia K475, mm170-173.
Comment: Have you any inclination to where the chord proggressions appear in those pieces of music?


Can the French create 2 forts?

Question: In the original Age of Empire 3, can the French create 2 forts or 2 factories ? If yes, How ?
Comment: I'd imagine via home city cards. Have you had a look through what's available?
Comment: I do get 1 factory and 1 fort card. But some online resources say 2 are possible which left me confused.
Answer: With French you can have three Forts. The first card is available to you early, but the other two cards require a Level 25 Home City and can only be used in Age 4, while the first one can be used in Age 3.
You can also have two factories, but of course in order to have all 5 you need to give up other cards.

Can the French create 2 forts?


What uncommon computer accessories do you find useful?

Question: I added a usb extension cable for easy access and microphone/headphone extension cables so I could have a lot more freedom to move around the office.  What computer accessories do you find useful that you think aren't commonly used?
Comment: Should be a community wiki.
Answer: This feels like it may not be uncommon, but I have an audio splitter so I can keep my speakers and a set of headphones/mic plugged in at the same time. I can just switch between the two without having to get at the back of my machine.
Comment: I used to do that as well! But nowadays, the speakers are on the back, the headphones on the front...
Comment: Yeah, I have a case/mobo that's a wee bit older. Hardly anything on the front.
Answer: A trackball instead of a mouse.
I think it's a good idea to switch pointing device once in a while to avoid getting strains from doing the same motion over and over again.
Answer: External Enclosure
These let you take an internal hard drive and use it as an external one, with a power switch and USB connector. I found one that accepts SATA and PATA drives, and it helped me a lot with migrating files from one computer to another (with different internal drive connector types). Now my old drive serves as an external backup.
I'm not sure how unusual this is, but it was news to me.
Comment: I have one that supports eSATA for full drive speed, plus USB for portability.
Comment: I have something similar that's not an *enclosure* but more of a caddy that you can just "plug and play" with a 3.5" hard drive.
Answer: Not exactly Accessories, but...
Every time I buy a disk I go back the next day to buy data and power cables/connectors, and a bracket to mount it in a larger drive bay.
I keep a straightened paperclip for stuck CD/DVD drives.  And a Leatherman - no idea how many computers that has helped me work on.
Answer: I use an audio input switch so I can choose to listen to my computer audio, or my Zune. It also lets me switch my output from the computer speakers to my headset with a button push.
Comment: Sounds cool. Got any links?
Comment: Mine is from Radio Shack, but has been discontinued. Here is something similar: http://www.amazon.com/Plantronics-PC-Headset-Speaker-Switch/dp/B000069E1V
Answer: Space Mouse. It looks like a hockey puck, but it is a 6 DOF force sensor that lets me move around and rotate 3D drawings. Most 3D CAD programs support them.
Answer:
I have an ATEN KVMP switch (similar to this) so that I can switch the keyboard, screen and mouse to one of the physical computers whilst being able to move the headphone connection to the same or a different one.
I, too, have USB extension leads from computers that are not on my desktop to provide Type A, Type B and micro USB connectors on the desktop.
The headphone lead from the ATEN KVM is an extension lead so that I can easily plug in either the headphones or a lead going to an appropriate input socket on an amplifier to allow easy switching to good speakers rather than headphones when appropriate.
A final odd accessory. As I use a USB keyboard and mouse but the BIOS on my main desktop machine does not recognise USB (yes, it is that old), I have a Fujitsu Siemens numeric keypad plugged directly into its keyboard PS2 socket to select boot up options, when needed. Even though my keyboard doesn't have a numeric pad I don't use the numeric keypad for its intended use.
Answer: Bluetack to stop the keyboard moving around.
Duct tape to hold mouse cable where it goes over the back of the desk so the cable weight doesn't drag when you move the mouse.
Screen cleaner (actaully window cleaner) spray.
Paper towels for spilled coffee.
Comment: I have one of the Microsoft *gaming* mice and it comes with a little weight-clip thing that goes around the cord instead of duct tape. Works nicely!
Answer: Does a tablet count? it's much nicer to use sometimes then a mouse, and as a plus it helps with art related tasks!
Comment: Definitely. And a **wireless** tablet is even better. I like the Wacom 6x8 Bluetooth.
Answer: Wireless headsets! I've been looking for a good wireless headset for a long time and there are only a few out there.  I think logitec just released a pretty good one though.  I have a bluetooth headset that is pretty nice but the sound quality suffers for music and the range isn't the best.
I think a UPS is the best investment that I bought for my home desktop and not a lot of normal users have those but they're gaining in popularity.
Answer: Although it is not a hardware thing (what's the difference?) PulseAudio has been a godsend!
I can stream music around my computers in all kinds of crazy configurations!
Comment: Is there a nice UI for PulseAudio yet? Last I looked I couldn't find a nice way of configuring what sound goes where (and at what volumes etc.)
Answer: The most used accessory I have is a IDE/SATA to USB cable to easily hook up and restore harddrives that fail. Many of our bookkeeping department have computers manufactured in 1992. We recently replaced about 70-100 of the older models, but the bookkeeping department wanted to keep their oldie goldies. So now I'm stuck with tons of spare parts. I guess as long as they can put up with it, I can keep replacing harddrives. I haven't had many processors/power supplies fail, just harddrives.


How to call a user control in a client web part

Question: I'm trying to call a user control (.ascx) in a client web part that I've created, knowing that I need to do that in a provider hosted app.
Can someone give me a helpful tutorial please? What should I make in the client web part to call the page.ascx ?
Answer: Yes. First you should register the ascx file in the Markup of your webpart
<%@ Register Src="~/_controltemplates/15/Folder/Page.ascx" TagPrefix="uc1" TagName="PageAscx" %>

Then add the control using
<uc1:PageAscx runat="server" id="PageUC1" />

Comment: thanks Hashim ,but should I put both of this  lines in the my webpart.aspx ??
Comment: Yes. Both line goes into your web part markup