Why is non-abelian gauge theory unique in 4 dimensional spacetime?

Question: On my QFT lecture note there is a comment that says 'Non-abelian gauge theory is extremely unique in 4-dimensional spacetime'. However, I didn't really catch what that means. Why is it extremely unique? Could someone give me some examples for that?
Comment: There's nothing unique about the choice of the gauge group. But that choice is presumably not what the comment was about.
Answer: 4 spacetime dimensions are the only dimensions in which the (anti-)self duality equation
$$ F = \pm{\star} F$$
(for $\star$ the Hodge star) makes sense since both $F$ and ${\star}F$ are 2-forms in 4d, which is more or less directly related to the topological term $F\wedge F$ being a possible term in the Lagrangian in addition to the standard Yang-Mills "kinetic" term $F\wedge{\star}F$.
The classical minima of an action $\int\mathrm{tr}(F\wedge{\star}F) + \mathrm{tr}(F\wedge F)$ like are precisely the (anti-)self dual field configurations, i.e. instantons are the classical solutions to the equations of motion.
Instantons have a lot of special features that make them of interest both physically (for instance as vacua/mediators between vacua, see e.g. this answer or this answer of mine) and mathematically (for instance as Donaldson invariance, see this answer of mine). While there are topological features of Yang-Mills theories in all dimensions, the anti-self duality condition makes the 4d theory uniquely rich.
Answer: One of the features of the non-Abelian gauge theory is that it is renormalizable and asymptotically free—meaning the quantum corrections are systematically calculable in the same way as in quantum electrodynamics, but (unlike in QED), the quantum corrections lead to the interaction getting weaker (rather than stronger) at very large momentum (or short distance) scales.  This has all sorts of phenomenalistic consequences in QCD, and it also has formal consequences for the structure of the theory.  (There reasons to think that only asymptotically free theories may have well-defined nonperturbative continuum formulations.)  Theories with non-Abelian gauge bosons are the only such asymptotically free theories in 3 + 1 dimensions, and in my experience, when people talk about the uniqueness of non-Abelian gauge theories, this is the property that they are primarily referring to.


Is the dual space of a subspace of a vector space simply its orthogonal complement?

Question: Is the dual space of a subspace of a vector space simply its orthogonal complement?  My professor seems to use the terms interchangeably, but from Wikipedia they seem to be quite distinct concepts (like dual spaces are much more complicated and involve functionals).
Comment: The orthogonal complement is a _kind of_ dual, but should not be confused with _the_ dual. "Dual" is one of those heavily overloaded words in mathematics and only context can make it clear what it means.
Comment: you're probably thinking of something like http://en.wikipedia.org/wiki/Riesz_representation_theorem
Comment: Suppose $V\subseteq W$ with $W$ an euclidean space of finite dimension. Then we have a map $W\rightarrow V^*$ given by $w\mapsto \langle w,-\rangle$. An element belong to the kernel of this map iff it belongs to $V^\perp$ and so by dimension $V^*$ can be identified with any complement of $V^\perp$ (i.e, a subspace $V'$ of $W$ of dimension $\text{dim}(V)$ such that $V'\cap V^\perp=\{0\}$). In particular we can identified $V^*$ with $V$ itself (in the style of Riesz theorem).
Answer: If $W \subset V$ is a subspace and $W^\perp$ its orthogonal complement, we have a direct sum decomposition
$$V\cong W\oplus W^\perp.$$
This is true for any subspace $W'$ complementary to $W$, by definition. Since they are two pieces that together combine to make the whole, and the orthogonal complement in particular is an intuitive choice of complement, it is in some sense true that $W^\perp$ is "dual" to $W$.
However, there is already a vector space construction called the "dual vector space," denoted $V^\vee$.
This is the vector space of linear maps $V\to k$ (where $k$ is the field $V$ is defined over). The reason this is a vector space is, for any $\alpha,\beta\in k$ and $\mu,\lambda\in V^\vee$, we find $\alpha\mu+\beta\lambda\in V^\vee$ is a linear map also.
It is called the dual because there is a categorically natural isomorphism $V\cong V^{\vee\vee}$ (on the right is the dual of the dual space). The details of category theory might be out of place here, but suffice it to say there is no way to construct an isomorphism $V\cong V^{\vee}$ without a coordinate system for $V$, whereas it is easy to exhibit such an isomorphism for the double dual. For any $v\in V$, we can define the "evaluation map" that sends the linear functional $\lambda:V\to k$ to $\lambda(v)$ (that is, we interchange the role of function and argument: vectors act on functionals rather than vice versa.)
Given a basis $\{e_i\}$ for $V$ (finite-dimensional) however, we may construct an isomorphism $V\cong V^\vee$ using effectively the dot product. We can send a $v\in V$ to the linear functional $w\mapsto v\cdot w$. In the other direction, if $\lambda(w)$ is a linear functional it is determined by the values of $\lambda_i:=\lambda(e_i)$, because by linearity $\lambda\big(\sum_i w_i e_i\big)=\sum_i w_i\lambda(e_i)$, thus writing $\vec{\lambda}=(\lambda_1,\cdots,\lambda_n)$, we find that $\lambda(w)=\vec{\lambda}\cdot w$.
This is really an expansion of Qiaochu's comment, with a quick description of the dual space.
Comment: Is this a mistake that you are using $V^\perp$ for $V^\vee$ in the third and fifth paragraph?
Comment: Great answer, thanks :D
Comment: @Pew Fixed. ${}$


saving a QGraphicsScene image

Question: how to save a image ( like flow chart ) draw in QGraphicScene example of Qt4.7 (diagramscene) so it can be redraw next time, after rerunning the program, or can be used in other program.
Answer: Assuming you don't just want a raster save of the scene to a png.
Normally you would want the objects on the scene to have their own save and restore function that would save the properties of the object.  You could do this by serialising the objects to a QDataStream and then storing that QDataStream in a file for loading back in.
For example where Polygon is my own class:
foreach (QGraphicsItem* currentItem, sceneItems)
{
    data << (int)PolygonItem::Type;
    PolygonItem* item = qgraphicsitem_cast<PolygonItem*>(currentItem);
    item->save(data);
}

If you did just want a png or a jpeg then its simple:
QImage image = selectedScene->toImage(size);
image.save(fileName);

Comment: Thank you, I got the idea, I want as you shown in first example, so that another program can redraw this image, as well as some custom properties (like I would like to add some text, some conditions to flow chart) will also be intact with that image, so that I have to write my own function for operator <<, for serialization.

saving a QGraphicsScene image


SQL Server: what is the reason to favor customized database roles over fixed ones?

Question: This may be a bit vague, but I was pondering how much DBA's use fixed database roles controlling security of databases. So the question is, is there a reason to favor customized database roles over fixed database roles (db_datareader etc.)?
Answer: Fixed database roles provide permissions to the whole database. Custom roles come into play when you don't want to give users permissions to all of the database, just a portion of it.
For example, db_datareader provides SELECT permission to every table, view, etc in that database. For compliance reasons there may be some tables or views that HR staff should only be able to SELECT from and other staff shouldn't. That is usually where custom roles come into play.
Answer: Standard database roles are great for databases where there are only a few users or for when there is not a team of DBAs to manage the permissions.  However, if there are several users with a large database team and sensitive data, it would be wise to create custom roles so that you know who is looking at what.
When it comes to data (and database) security, you want to lock things down as much as you can and still let everyone be able to do their jobs with no major challenges.  Custom roles fits this bill quite nicely.
Answer: No, I don't think there is a reason to favour custom database roles EXCEPT that they are more specialised and tailored to your environment and requirements. Developers will look at the standard offering, and if it fits the job - perfect! But if it doesn't, it's time to customise!
Answer: Practical reasons, especially with db_datareader and db_datawriter

end users can tamper with history and audit tables
PCI/SOX/Adit compliance
you'll have spreadsheets connecting to your database
... which also gives you have unknown dependencies on table and views
users won't understand normalisation or database design
not all data is for all users
...

The other db roles aren't really used I've found
Comment: Yes, PCI/SOX/Adit are hot topics nowadays. That may be a good enough reason to move out of fixed roles.


Neutron Stars: How do I find and use them?

Question: I've heard that neutron stars are a method of boosting frame shift drive (FSD) jump distance, but documentation seems very limited on them right now. Does anyone have details about how to locate neutron stars, and utilize them? Are there any prerequisites that must be met, in order to use them? I've also heard that using neutron stars can damage your FSD, so how do you repair your FSD on-the-go?
Answer: You can find Neutron stars in the galaxy map. You can change the filter to star type, then untick all the letters (f, o, g, k, b, a, m, t etc). Neutron stars and black holes should be coloured grey.
There are no prerequisites to use them.
Once you find one and jump to it, make sure you zero your throttle during the countdown or jump. Hitting the star exclusion zone will get you killed.
You'll see the twin beams. Turn away from the star, and fly out, then into the very end of one beam. As I mentioned above, hitting the star exclusion zone will get you killed so keep your distance.
Sit in the stream for a bit in supercruise, and you'll get a message saying FSD supercharged. Exit the beam to somewhere safe, then go back to galaxy map to plot / replot your next jump. Don't drop out to normal space while in the stream.
Your FSD won't take much damage if you do this once or twice. You can repair at stations. If you are going to make a habit of it out in the middle of nowhere, equip an Auto Field Maintenance Unit, which can be used to manually (not auto) repair damaged modules via the right panel.
Also see
https://www.reddit.com/r/EliteDangerous/comments/5738sk/slingshotting_a_comprehensive_guide_to/
And check out YouTube
Comment: Also check out this tool: http://www.spansh.co.uk/
Comment: About the only thing you can safely hit the body exclusion zone of is a black hole, weirdly (the exception being Sagittarius A*). Neutron stars and white dwarfs are exceptionally hot and in all likelihood you'll overheat and die long before you reach their body exclusion zones. I'd also recommend throttling down before you reach the beam, as you're less likely to accidentally hit the automatic drop zone of the star, which would be game over if you dropped out inside the beam.
Comment: Ramming a normal star or planet does 2-3% hull damage. I see that as safe, but won't argue with anyone who sees it differently.
Comment: Boosting the FSD range this way seems to do ~1% damage to the drive. You'll start getting drive malfunctions below 85% integrity or so. I usually repair around the 80% mark. *Don't forget to drop out of supercruise before initiating repairs to the FSD!*
Answer: This is how you charge your FSD to get the big jump. With some engineering and a guardian FSD booster I'm now jumping 250+ ly with scooping these.
Comment: Welcome to the site! Instead of basically a video-only answer, please edit your question and add a basic overview of the solution seen in the video. That way if the video disappears or becomes a dead link, the answer still has value. Thanks for contributing!


Excel2013 - Grabbing data from specific cells based on the selection from a drop down list

Question: Depending on the selection from a drop down list, I need to match data from a specific cell into another cell.  I have a list of Team Members and depending on which area they work in during a shift they will get an additional rate that is specific to each day and each choice. The sheet is for a full week but each day needs to be calculated.   My Drop down list applies to a row of Team Members and the Top cell is D10(Which contains my list from Sheet3; A1=A, A2=B, A3=C).  If Choice A is selected from the drop down list I need the exact data from G5 to show in F10; If choice B is selected, I need the exact data from G6 to show in F10; and if choice C is selected, I need the exact data from G7 to show in F10.  I have had success with one( =CHOOSE($G$5,D10=Sheet3!A1,$G$5) ) but cannot figure out how to write the multiple scenarios into one formula.  I am also wondering if I am going about this the wrong way.
Thanks in advance for your suggestions and help.
Carrie M.
Answer: Please add a screen shot of your data, because your description is hard to follow. I'll update this answer to be more complete once you improve your question.
You can use the value from a drop-down list as the value for any of Excel's lookup functions.
In this example, cell C2 is a drop-down list, D2 is the (completely optional) column number to be used for the lookups. You can totally omit D2 and hard-code the column numbers into your lookups as we usually do, but I threw that in there to show the kind of flexibility that's possible.
I did get lazy, though, and hard-code it in for the index/match/match formula. Here are the formulas used:

=VLOOKUP(C2,A8:C12,D2,FALSE)
=INDEX(A8:C12,MATCH(C2,A8:A12,0),D2)
=INDEX(A8:C12,MATCH(C2,A8:A12,0),MATCH("Data 1",A8:C8,0))


Why do I have an orange line in my Github 'Open pull request' page?

Question: I have an orange line in my Github 'Open pull request' page. The file itself is a rake file and the line(5) is blank. What does the orange line mean? Why is it there? Is this something I need to address?
Answer: It's just line highlighting, click on the line number 5 and it will disappear.
Your url should also be ending with #L5. This is mainly for url sharing purposes.
In this case you probably misclicked it yourself.
Comment: I'll admit to being embarrassed to upvote the question and answer (I did) because that's a tacit admission that I wondered the same thing =P
Answer: The orange line means that it was highlighted. Check the URL of the Pull Request link you are clicking to see if there is something like #L5 at the end. It is nothing to worry about.
Answer: The accepted answer is correct, but I must correct riwu because clicking on the line number does not make the highlighting go away. To do that you must physically remove L/R{{lineNumber}} from the URL.
Comment: It's extremely annoying, and still 7 years later, still an eyesore that's difficult to get rid of if you clicked it by mistake.


Normalized Root Mean Square Error (NRMSE) with zero mean of observed value

Question: I would like to evaluate the predictive performance of a statistical model using Normalized Root Mean Square Error (NRMSE = RMSE/mean (observed)). However, the mean value of the observation data is all '0' (all observed data are '0'). How can I calculate the NRMSE, otherwise is there any other technique which can represent the relative/percentage value of error with such data aspect?
Answer: I think you can, but instead of dividing the RMSE by the mean, you may divide it by (max-min) value
Comment: Can you extend your answer? We can also transform it to a comment.
Answer: I think Euan has a right answer. There are ways to calculate the NRMSE, RMSE/(max()-min()) and RMSE/mean(). You should know which is better to be used in your case. For example, when you are calculating the NRMSE of a house appliance, it is better to use the RMSE/(max()-min()). Because in this way it can show the NRMSE when the appliance is running. The reason why your mean value is 0 could be the data has both positive part and negative part, therefore, I think RMSE/(max()-min()) can show how your data spreads.
Comment: In the question, he says that all observed data points is 0, so that doesn't actually work.
Answer: Euan Russano suggests dividing by the range of observations which is common (e.g. https://en.wikipedia.org/wiki/Root-mean-square_deviation NRMSD). But this would still be dividing by zero in your case because the range of observations is zero.
other measures of association (like correlation) will also be undefined because the variance is zero.
Comment: Was the OP actually interested in some form of correlation? it seems that if all observations are 0 there is no way to estimate any form of variation. This is the same for any constant c.
Comment: The way I get around the zeros issue is by forcing a 1 if the range is 0.
Answer: You would normally divide by a measure of "spread". Either max(obs)-min(obs), as already mentioned, or directly the standard deviation of your observations, which is preferred for normally (or quasi-) distributed data. This is objective and gives your NRMSE nice units of "standard deviations of the observed data". You could also divide by the variance. If your observations are not constant, these two quantities should not be zero. Hope it helps.
Answer: Normalizing should be performed depending on the reference value. So, for the forecasting studies, since we are trying to approach the real value, you may consider dividing by the real value.
$$\textrm{RMSE} = \sqrt{1/n\sum(y - y_i)^2/n},~  i = 1,\ldots,n $$
$$\textrm{NRMSE} = \textrm{RMSE}/y $$
Keep in mind that if you have only one sample then RMSE would be a wrong choice. Let's say the real value is 80, and the approximation is 60. If you apply RMSE, it will give you the difference between those values, not the percentage error. That is:
$$\textrm{RMSE} = \sqrt{(80-60)^2/1}= 20.$$
However, $\textrm{NRMSE }$ will give you the error as a percentage:
$\textrm{NRMSE }= 20/80 = 1/4 = 25\%. $


Find the solution of $\lfloor \sin^{-1}(x)\rfloor>\lfloor \cos^{-1}(x)\rfloor$

Question: My question: Find the solution set of $$\lfloor \sin^{-1}(x)\rfloor>\lfloor \cos^{-1}(x)\rfloor$$
Can anyone help me to solve this question? Graphically it seems to be more complicated.
Answer: Noting that $\lfloor\arcsin x\rfloor=-2,-1,0,1$ and that $\lfloor\arccos x\rfloor=0,1,2,3$, we have
$$\begin{align}\lfloor\arcsin x\rfloor\gt \lfloor\arccos x\rfloor &\iff \lfloor\arcsin x\rfloor=1\quad\text{and}\quad \lfloor \arccos x\rfloor=0\\&\iff 1\le\arcsin x\lt 2\quad\text{and}\quad 0\le \arccos x\lt 1\\&\iff \sin 1\le x\le 1\quad \text{and}\quad \cos 1\lt x\le 1\\&\iff \color{red}{\sin 1\le x\le 1}\end{align}$$
Answer: Sure, I'm going to assume you have those floors there on purpose. If so, we know that the inverse trigonometric functions are only defined between $ -1 < x < 1 $. We also know that ${-\pi\over 2}<\sin^{-1}x < {\pi\over 2}$ and ${0}<\cos^{-1}x < {\pi}$.
Solving the Continuous Problem
Now we can break this up into two regions of interest:

$\cos^{-1}x > \sin^{-1}x \qquad -1 \le x<{1\over \sqrt 2}$
$\cos^{-1}x < \sin^{-1}x \qquad {1\over \sqrt 2} < x < 1$

We determined that $1 \over \sqrt 2$ was the intersection point by considering the fact that sin and cos are the same when $\theta = {\pi \over 4}$, so we know that ${\pi \over 4}$ is our point of intersect.
Including Floors
To make this discrete, we realise that there is a small region where the two graphs will overlap, when $cos^{-1}$ is floored to 0, this should be evident in the graphic below:

So we therefore just need to solve for $\sin^{-1}x > 1 $ to find the region where it is greater than the inverse cos function. This is accomplished easily by taking the sin of both sides, so the solution to your original question is:

$ x > \sin x $

Hope that helps.
Comment: We cannot get $x\gt \sin x$ from $\sin^{-1}x\gt 1$. Also, the $x$ such that $\sin^{-1}x=1$ is a solution.


One Way ANOVA or One Way ANOVA with repeated measure

Question: I have LFS spanning 24 quarters, and I want to look at the effect of a policy on the sickness absence of a particular occupation. I want to use ANOVA to see if there is a statistically significant difference pre and post policy. However with LFS data, participants are in the survey for 5 waves (quarters) and so I am not sure if the pre policy and post policy groups can be said to be independent.
Answer: Yes, if subjects participate in the survey multiple times, then their responses are correlated, and you would need to employ RMANOVA.


Strike through a code part within a code block at Stack Overflow?

Question: How can I strike through a code part (within code block) at Stack Overflow? Is that possible?
Answer:

System.Out.Println("<s>hello</s> world");

Which turns into:
System.Out.Println("hello world");

You can put any valid markdown there, including bold, italics and even links.  You do need to remember to include the  tags inside
 for syntax highlighting to work.  The language: comment before the code block, however, is only needed here on Meta, or if you want to override the automatic choice of which highlighting rules to apply.
Comment: @Zizouz212: Actually, syntax highlighting *does* work, as long as you remember to use `<code>` instead of just ``; see edit above.
Comment: Good thing to note is that no syntax highlighting when using the `` tag.
Comment: `` and `` also work within the code tag. Care is needed in combination with the `` tag to avoid stray gray space around the code block.
Comment: I've used it on *rare* occasions ([example](http://codereview.stackexchange.com/a/88138/22048)) when I want to be able to highlight a specific block of code and need to get into the html side rendering rather than markdown rendering... and that causes all sorts of fun with `<` rather than `<` and future additional overhead in editing (if someone adds a `<` it breaks everything and they don't know why).
Comment: @MichaelT thanks, I never used it myself to be honest, just saw it mentioned here from time to time.
Comment: @Zizouz212 good point, added to the answer. Thanks! :)


Is there any "in universe" link between Matt Damon's character in Interstellar and The Martian?

Question: I was just wondering because both movies star him as an astronaut trapped on an isolated planet. They also had fairly close release dates. I am wondering if there is a link between the two characters and if the movies were supposed to tie into each other.
Comment: The downvotes have most likely come from the belief that your question is "ridiculous". Users may think that given the two distinct names between the characters, the fact the stories are entirely different and the world and NASA in entirely different states, your question may be though of as silly.
Comment: @ProfetikOne - Here is the relevant help section on voting: "*Voting up a question or answer signals to the rest of the community that a post is interesting, well-researched, and useful, while voting down a post signals the opposite: that the post contains wrong information, is poorly researched, or fails to communicate information*". Note that while a downvote does not explicity say "uninteresting", many users vote that way, or as Edlo says, they think it's "silly."
Comment: Out of universe his characters tend to get in trouble: https://www.quora.com/How-much-money-has-been-spent-attempting-to-bring-Matt-Damon-back-from-distant-places
Comment: This may interest you: https://scifi.stackexchange.com/questions/153017/are-the-expanse-and-the-martian-set-in-the-same-universe
Comment: Care to explain down votes? If it's a grammar thing my question can be edited...
Comment: I don't see any downvotes.
Comment: My question had 2 ups, then 2 downs... but that's stackexchange i guess and badge hunters...
Comment: @Fabian as for now (21h22 here), there are 3 upvotes and two downvotes, hence the overall +1. You can see total votes when you get to 1,000 rep.
Comment: @Fabian. That's hilarious!!
Comment: @Harabeck, I had actually seen that link in the related links section but yeah, it was a cool little nod from one director to another. I was thinking perhaps that the two movies I'd asked about had the same kind of thing going.
Answer: No
Firstly, The Martian was originally a novel released chapter by chapter by author Andy Weir on his website and later edited and published as a novel. The novel inspired a film starring Matt Damon. The book was officially published in 2011, 3 years before Interstellar. Therefore the premise of your question is incorrect.
As for the possibility of them being the same person (besides the fact they have distinct names)
Mark Watney arrived on Mars in November 2035, however Cooper from interstellar, who Dr. Mann was of similar age to, was born in 2031/2032. The wormhole only having been detected in 2019, with the events taking place 48 years after it's discovery (Dr. Mann being shipped off 38 years after).

For the curious: Ares 3 launched on July 7, 2035. They landed on Mars (Sol 1) on November 7, 2035. The story begins on Sol 6, which is November 12, 2035.
Andy Weir post - Facebook

2031/2032: Cooper is born in Denver, Colorado.
Timeline of Interstellar - Interstellar wiki

Therefore, Mark Watney would've been landing on Mars at around the same time Dr. Mann was born. The timelines don't seem to add up, Mark Watney would've been at least in his 50s/60s at the time he shipped off on the Lazarus missions.

So Mr. Watney," the boy said, "If you could go to Mars again, like, if there was another mission, and they wanted you to go, would you go?"
Watney scowled at him. "You out of your fucking mind?"
The Martian - Original Ending as recorded on The Martian wiki
Comment: Just don't let Matt Damon on any other space missions, for his own safety.
Answer: Yes & No
No because it's 2 different movies based on 2 different books apparently and the characters could have randomly been played by 2 different actors
Yes because... we can use our imagination a bit here.
The Martian is like the heroes arch of Matt Damon's character, where he basically develops all the survival & agricultural skills he needs to survive a solo space mission. The space technology is advanced and one could argue that it's not too many years behind that of the timeline in interstellar.
Then in interstellar it's like his villains arch. It's well established before we even meet the character that his a well respected astronaut & scientist. And the fact that the Lazarus missions had the exact same parameters as the Martian could suggest that he was chosen to lead those missions because of the knowledge he gained staying on Mars alone...
So it's obviously a fan fiction theory... but it's pretty damn plausable
Comment: You seem to be arguing that there is a link between the characters in the sense that they have things in common from a thematic or subjective point of view. When answering questions on this site though, the focus should be on what is officially or canonically, what is intended to be true by the creators of the franchise/s in question. So unless there's evidence that one or more of the creators involved with these films intended these characters to be connected in some way, then the correct answer is that they're not connected.


Create dropdown list post

Question: I want to create a drop down list that will list all the posts in the category. I want the drop down list to appear on every post. So for example if I view a post that belongs to category Apples it should list all posts in category Apples
Answer: Hey @Ruriko ... its a 3 step action.

get the current category ID
get the posts for this specific category
get the posts into a select menu

Please note that this code would use the first
category id altough you might assign several
categories to the same post.
.
<?php
    // FIRST CATEGORY NAME
    $category = get_the_category();
    $catID = $category[0]->term_id;
    $args = array(
        'numberposts' => 5,
        'category' => $catID
    );
    $catPosts = get_posts( $args );

    echo '<form method="POST">';
    echo '<select name="goToPost" onchange="document.location=this.value">';
    echo '<option value="">'.__('Relevent Posts', 'your_text_domain').'</option>';
    foreach( $catPosts as $singlePost ) {
    echo '<option value="'.get_bloginfo('url').'/index.php?p='.$singlePost->ID.'">'.$singlePost->post_title.'</option>';
    };
    echo '</select>';
    echo '</form>';
?>

Hope this helps.
Cheers, Sagive.
Comment: It sort of works but when I select a post in the drop down list it doesn't go to that post. Is there a way to show all posts instead 5 only? since each category has different amounts of posts
Comment: aplogies... i left my testing code in there.. see my revised code - should work now (tested)
Answer: To show all posts, using WP Query with posts_per_page value equals to -1.
Not exactly the answer but here's an example of using wp query
More on WP Query here.

Create dropdown list post


Why Ping Reply Succcess from different subnet IPs

Question: In the university lab, i manually added IP in two ubuntu machines. PC1 IP 10.129.2.33 255.255.0.0 and PC2 IP 10.129.2.165  255.255.255.0. I connected first both computers with direct ethernet cable and later through default lab configuration, where all computers connect to a common switch in lab. I didn't do anything with switch. However, in both cases I was able to ping both machines although having on different subnets. Any idea what could be wrong?
Comment: Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
Answer: Each PC determines that the other is on the same subnet, so ping succeeds, even though you have different masks.
Answer: They are in the overlapping subnets:
<code>$ ipcalc -mnb 10.129.2.33/16
NETMASK=255.255.0.0
BROADCAST=10.129.255.255
NETWORK=10.129.0.0

$ ipcalc -mnb 10.129.2.165/24
NETMASK=255.255.255.0
BROADCAST=10.129.2.255
NETWORK=10.129.2.0
</code>
Why shouldn't they see each other? Each host sees the second one within it's own subnet, so the broadcast address doesn't matter (network address is not used on the wire at all) - it sends ARP request to determine it's MAC address and receives response, which is enough for L2 connectivity.


Are the invariant sets of all iterated function systems necessarily fractal?

Question: An iterated function system is defined as a finite set of contraction mappings, defined over a complete metric space $X$, and iteration is defined as sequential composition of these contraction mappings, where each mapping has some nonzero probability of being used at every iteration.  Hutchinson (1981) proved that such iterated function systems (IFS) have invariant sets that iteration converges to, call this set $S \subset X$, so that for $n$ different contraction mappings defining our IFS, we have
$$
S = \bigcup_{i=1}^n f_i(S)
$$
I am wondering if such invariant sets $S$ are necessarily fractal if they are generated by an IFS. It is well know that many fractals can be generated by an IFS, but it is not clear if IFS's necessarily generate fractal invariant sets.
Comment: What definition of "fractal" are you working with here?
Comment: @NoahSchweber For definition of fractal I suppose I am most interested in proving something is a Cantor set or "Cantor set like", so that it has self similarity. I have an iterated function system that appears to have an attractor that is a Cantor set, but I do not know how to prove that it is one.
Answer: It slightly depends on your definition of fractal, but typically no it is not true that IFS always generate fractals. Let $X = [0,1]$ and consider $f_1$ and $f_2$ defined on $X$ by $f_1(x) = \frac{x}{2}$ and $f_2(x) = \frac{1+x}{2}$. These are both contractions with a contractive factor of $\frac{1}{2}$.
It's easy to check that
$$ [0,1] = f_1([0,1]) \cup f_2([0,1]),$$
so the invariant set is $X$ itself.
There's also the dumb example where the IFS consists of a single contraction, then the attractor is just a point.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/119130/discussion-on-answer-by-zorngo-are-the-invariant-sets-of-all-iterated-function-s).


How high is the ISP of a fire extinguisher

Question: After seeing this question Flying around on a fire extinguisher I wondered how high the ISP of a fire extinguisher is. What is the ISP of a fire extinguisher?
Comment: Mat be of use: http://mstl.atl.calpoly.edu/~workshop/archive/2020/Spring/6%20-%20Subsystems/ChrisDay.pdf
Answer: A conventional CO2 fire extinguisher could be used as a cold gas thruster. The maximum Isp would  be determined by the temperature of the gas. CO2 is stored as supercritical CO2 inside the bottle. It cools as it expands and freezes into CO2 snow.
This question was addressed in Do cold gas thrusters fueled by supercritical CO2 have a higher Isp than those fueled by liquid CO2? along with entertaining video links.

This paper https://arc.aiaa.org/doi/abs/10.2514/6.2009-6553 attained an isp of 100sec using supercritical CO2 heated to 400K (260F). Isp is proportional to the sonic velocity so it would be expected to be about 87 sec at room temperature
However, CO2 is a poor choice for a fire extinguisher in an enclosed space such as a spacecraft and aircraft, except for localized fires. The space shuttle used Halon 1301 https://ntrs.nasa.gov/api/citations/19910011869/downloads/19910011869.pdf
Isp is inversely proportional to molecular weight, Halon 1301 (MW=149) is much heavier than CO2 (MW= 44) so it would have a much lower Isp. Say, 27sec at room temperature with an optimized nozzle.
Comment: CO2 might be a bad idea in any spacecraft or aircraft we have constructed to date, but the one depicted in *Wall-E* is the size of a city, it's probably fine there.
Comment: @Darrel Hoffman ... Actually, this paper on Freedom Space Station design https://ntrs.nasa.gov/api/citations/19910011869/downloads/19910011869.pdf said "preferred extinguishing agent is carbon dioxide", No extinguisher they tested was perfect, and CO2 was the least of evils.
Answer: Personal experience.  Circa 2008, I replaced my home fire extinguisher.  The old one was a type ABC, about 1 liter in volume and about 2 kg of propellant.  Although it was still at full pressure and perfectly usable, I decided to have a little fun.  I sat on a rolling chair and discharged the extinguisher.
The impulse was not even enough to disturb my hands, much less move the chair.  Very disappointing.
I don't know what the exit velocity of the discharge was, but it landed about 10 feet away.

The ISP would probably be similar to compressed-gas systems used in spacewalks.  On Gemini 4, Ed White used a can of compressed gaseous oxygen to briefly propel himself.  Compressed gaseous nitrogen were later tested on Skylab and the Shuttle.  The SAFER system is still in use, and has 1.4 kg of gaseous nitrogen, enough for a delta-V of about 10 ft/s.
Comment: Fire extinguisher nozzles are not optimized for exit velocity. Cold gas propellant system nozzles are.
Comment: My very limited experience with powder-type extinguishers is that they make big mess and small propulsion. CO2 extinguishers are the other way around.


Wireless Sensor communication with 100Hz rate

Question: I'm doing my project on haptic feedback systems. I need a 56bits of data transmitted over wirelessly to a computer to process and send the output to another arduino. I tried ESP8266 using TCP/IP protocol. But it is very slow. Are there any faster modules to do the above task with 100hz speed?
Comment: [edit of my earlier comment, with bps correction] Have you also tried UDP/IP? Lower overhead might make a difference. Although if you aren't getting 5600 bps thruput (ie, 56*100 payload bits) with TCP/IP, probably something's wrong in your setup, which you haven't detailed enough for comment upon. You could provide a Minimal, Complete, and Verifiable example code and part numbers plus name of host computer; could be most of the delay is in the host.
Comment: Note, please edit your question in reply
Comment: Usually protocols that package up data and test for errors are too slow for real time purposes.  This is why gamers, for example, like using a corded mouse over a wireless mouse.  Unfortunately when you go this route you are usually left with out all the abstractions that make using a common protocol like TCP/IP almost easy.  It is up to you to research this more.  But it sounds like you are entering into the world of serial port radios using simple but very specific proprietary protocols.  And, for all I know, you only need to communicate in one direction.  Which would simplify your hardware.
Comment: With TCP/IP most of the delay is the act of opening the socket. If you open a socket, send a couple of bytes, then close the socket, yes it is going to take a long time. However, if you open the socket and *keep it open* then TCP/IP can be quite fast. Over a local network it's as good as a serial connection.
Answer: Make one static tcp connection with a regular check and on error event to restore it in case it drops. Tcp must be able to run data at your rate.
If not, maybe the main arduino loop has delays in it.


Affordable clothes for special needs son

Question: I'm hoping someone can point me in the right direction. We have a special needs son who is ten, but intellectually more like a nine month old, and physically like a three year old. We keep him in zipper PJ's a lot because he had a hard time getting out of them and we prefer that he keeps good clothes, and more importantly diaper, on. He's pretty much grown out of 5T's which is as big as we can find. At least cheaply. We have found 6T's and bigger online for $30+ each. It's like when you tag something as "special needs" the price triples! Does anyone have any ideas?
Comment: @Meg and Stacey - Feel free to answer te question. I haven't checked with the other mods, but I think this one is ok.
Comment: What country are you in?
Comment: Fortunately "footed onsies" as they're called in the USA are becoming popular even for adults now as a novelty item, so they come relatively cheap in all sizes. For example this one is $16.99 on Amazon: https://www.amazon.com/SleepytimePjs-Infant-Fleece-Onesie-Footed/dp/B012Y36ULS
Comment: Agree - questions about where *specifically* to shop would be off topic, questions about how to more generally find affordable clothes seem appropriate to me.
Comment: Carters carries them online in kids sizes (4-14).  I have seem them in the larger Carter's storefronts just in the late fall/early winter season as well.  They are still $30 full price, but carters has sales for 50% off pretty regularly, and you can sign up for email coupons.
Answer: I was hoping to find some hidden gem that I haven't seen. Carter's has a lot of size variety as well as various sellers on Amazon. We've decided to bite the bullet and get him clothes on sale wherever we can. Guess that's the (literal) price we pay for having children that can't take advantages of economies of scale.
Comment: As your son gets older, you may also want to look into Target's line of adaptive clothing-- Nice features and styles for various needs, and priced similarly to their regular kids clothes.
Comment: @Meg Where has this been hiding? Thanks for the info!


Central control for SSH access to AWS instances

Question: What are some approaches or best practices for managing SSH access by many devops to many AWS instances? I'd like to have the ability to e.g. add or remove access for a user to multiple instances through a single simple and secure operation, instead of going instance by instance and adding/removing their public key from the authorized_keys. And of course, I wouldn't want the same private key to be used by more than one user...
Comment: FreeIPA. Based on Kerberos and LDAP, is very flexible and has decent management interface.
Comment: Look into configuration management or LDAP.
Answer: The two big methods here are:

Use a central authentication system such as LDAP.
Use a configuration management system to manage SSH keys and associated files.

The first isn't very Linuxy since it requires people to use a password on their first entry to a system. That said, it does allow large installations to work rather well.
The second can be engineered so access is granted via Pull Request or Merge Request into a code-repository, after code-review. A workflow software engineers understand rather well.
Answer: Check out userify.com. It's written by a hardcore security nut and is pretty much exactly the situation that you're describing.
Disclaimer: the creator is a friend of mine, but I don't get anything for recommending it.


How to simulate PC's Esc key on android

Question: I'm writing an app that can play flash on android, but I can't simulate ESC key, since a lot of flash games need ESC key to return to the main menu, without this key the app I made will be useless. So who could tell me how to simulate this? Can I just send a keycode? but I don't know the keycode too...
Answer: Most games use the BACK key for this.... See http://developer.android.com/sdk/android-2.0.html
Note that, while there is a key event ESCAPE (as Ezeh points out), that is only available at API level 11 (which is Android 3.0 and above - http://developer.android.com/guide/appendix/api-levels.html), which is not very widely available in devices yet.
Answer: You want to have a look at the KeyEvent property. There is a constant value for KEYCODE_ESCAPE.
You can learn more about how to implement it here

How to simulate PC's Esc key on android


Just did system update and forgot I had TWRP and root and now the updates changes havent taken affect!

Question: Help! I have just installed the Android 4.3 update on my Nexus 7 which is rooted with a vanilla kernel with TWRP installed. It rebooted after the update and it booted straight into TWRP so I rebooted again and then it booted into Android as normal but the OS is still on 4.2.2 and not 4.3. I have tried going into About This Tablet then pressing Update and its saying its not on the latest version...
Help!
Answer: The best way to 4.3 may be unrooting and flashing the stock recovery image.
I used the Nexus Root Toolkit 1.6.4 to install 4.3 on a Galaxy Nexus having some minor problems. I would suggest waiting for NRT 1.6.6 which will have full support for 4.3


cp -al not creating hard links

Question: I want to create snapshots/hard links for my backups, using the cp -al command. While cp -al does create hardlinks when using it on my main system (Mint 18.1), where the parent directory size stays mostly the same after several snapshots, on my backup server (Mint 17.3) it seems to ignore the -l flag, making what seems like regular copies, since the parent directory increases by the size of each new snapshot. The file systems on both machines is ext4. The difference on the backup server is that it's a logical volume. I get the same problem on another machine that has a regular physical volume though, so I don't think that's the problem. Any idea what the problem could be? Thanks.
Comment: @maks, did you check the inode numbers of the original and copied files? What are you using to check the directory size?
Comment: So, I made a test with two virtual machines, one with Mint 18.1 and one with Mint 17.3, and I get the same behaviour. So it seems that hard links just don't work in 17.3... Can anyone confirm that, and why? Thanks.
Comment: Is Hard Links the opposite of Symbolic Links? If it is they are called files. Files points to sector, so they are links to sectors, when you create a hard link, you just copy the file reference, so the both files are real.
Comment: I'm basically following this guide to create snapshot, or "time machine-like" backups: http://www.mikerubel.org/computers/rsync_snapshots/ The "Review of hard links" sections explains the concept.
Comment: @ilkkachu, on mint 18.1 the inode number for a specific file in both folders is 1302, on Mint 17.3 the inode number is 266098 for the same file in both folders. What does than mean? I'm not familiar with inode numbers. To check the directory size I used the Properties dialog of Caja and Thunar.
Answer:
on mint 18.1 the inode number for a specific file in both folders is 1302, on Mint 17.3 the inode number is 266098 for the same file in both folders. What does than mean? I'm not familiar with inode numbers. To check the directory size I used the Properties dialog of Caja and Thunar.

The idea of hard links is to have multiple links to the same inode, so if you find files with the same inode, it means that they are hard links. The second column of ls -l is also a link count. (Note that directories will also always be shown with a link count greater than one, since dir/. and dir/subdir/.. are hard links).
To show that hard links do not take extra space, either look at the free space on the filesystem as a whole before and after (e.g. with df: cd /my/backup/filesystem && df -h .).  Or, use a tool which is aware of hardlinks to measure the space taken up by the directory which ultimately contains both hardlinks.  According to man du, du (note the one-letter difference!) is such a tool: cd /my/backup/directory && du -s -h ..
I don't know whether versions of Thunar or Caja implement hard-link aware measuring - you can tell us whether they show the "right" value when compared to du :-).
Comment: my bad, the problem was indeed Thunar not taking into account hard-links. du -sh shows the correct size, as does Caja, so I'm happy to see that my snapshot copies are in the end working as expected! Thanks a lot for your help! :)

cp -al not creating hard links


During patent application submission, which case is correct for approval?

Question: I would like to submit an application for a new mechanism to be patented. Do I have to attach the complete mechanism including screws, nuts, housing and general electric components like DC motors in the illustration drawings? Or it's just sufficient to attach drawings for the main mechanism components that i would like to grant?
Answer: I'm not an attorney, but generally you submit drawings that illustrate just the specific mechanism involved in the invention with enough context to explain how it works. Ordinary elements like motors and gears can be illustrated generically. You can get a pretty good idea of what patent drawings look for by looking at other patents. You can use Google Patents to search for some comparable device and look at some of the patents that show up.
It's important to note that the drawings and the text of the application work together to explain how the invention works. You really want to think about alternative variations in addition to the preferred implementation to make sure that you can cover enough breadth in the claims. I always suggest working with a patent attorney or agent even though it costs money. My experience is you are much more likely to end up with an effective patent that way.
Answer: To supplement another answer - You mention a "main mechanism". A critical point before drafting a patent application is to determine what you think that the invention is. If you have invented a new carburetor you do not need to show a whole car and you might discuss variations of the carburetor that make it suitable for a lawnmower.
An invention needs to be enabled in a patent application meaning you need to teach someone skilled in the art how to make and use the invention. Usually that does not include specifying where all the screws go.


"fatal: tag 'someTag' already exists", when trying to add a tag to old commits

Question: Question
Why can I not add a tag to two older commits?
git tag -a matlabTest cfa84dbb6dd3c2c9956421e723d2f99786f7b417
git tag -a matlabTest 45b3a4d83eece8a5adcb947392f15a14bd4b0e63

Instead I am getting:
fatal: tag 'matlabTest' already exists

It seems Git wants to just create a new tag rather than linking the tag to the commits? (see below for more detail).

Background
I have followed the guidelines in the git book: https://git-scm.com/book/en/v2/Git-Basics-Tagging, and here's what I tried (and failed):
I enter git log --pretty=oneline, showing three commits:
cfa84dbb6dd3c2c9956421e723d2f99786f7b417 Preparing to make changes to changes.py to fix
45b3a4d83eece8a5adcb947392f15a14bd4b0e63 Tests: wholeseq analysis differs to Matlab
a894da22e2eb1c03930829622656ffd6da5ce161 Initial python scripts for analysis

I create a tag git tag -a matlabTest and now I want to add "matlabTest" to two of the commits**. Specifically, the top and middle commit of the three shown above.
git tag -a matlabTest cfa84d
git tag -a matlabTest 45b3a4

Now in both cases I get the following error:
fatal: tag 'matlabTest' already exists

But when I show the 'matlabTest' flag by entering git show matlabTest I see that only the first commit was successfully tagged, I have truncated output since it is long, but at the end of the output I cannot see that both commits were tagged:
tag matlabTest
Tagger: *foo (I did not want to show personal information)*
Date:   Fri Nov 25 02:37:41 2016 +0200

After testing dnds.py by comparing whole-seq dN/dS output to MATLABs dnds() output, both using NG, dnds.py seems to have a calculation error. So I have started to make changes to changes.py

commit 45b3a4d83eece8a5adcb947392f15a14bd4b0e63
Author: *foo (I did not want to show personal information)*
Date:   Fri Nov 25 02:20:27 2016 +0200

*...<remainder of script>*

Extra background
**Why do I want to tag the two older commits? Because there is some silent error (inconsistency with previous software I wrote in MATLAB) that I am trying to debug, and it is being caused by either one of two scripts (changes.py and dnds.py) and each has a different commit (cfa84db and 45b3a4d8) pointing to it. I want to tag both commits to help me treat this bug in a systematic way.
Answer: A tag always reference one commit (in Git or other VCS, where its role is to unambiguously identify a particular revision).
Here (Git), the commit represent the full repo state at a certain point in its history.
In your case, you have alternative to tagging:

it is being caused by either one of two scripts (changes.py and dnds.py) and each has a different commit (cfa84db and 45b3a4d8)

You can pinpoint the exact faulty commit with git bisect, assuming you can write a test which exhibit the bad behavior. That will detect the first commit which introduced the bug.
If you really have to mark multiple commits, check out git notes.
Answer: Tag name should be different when you used for two different commit.
You can use tag name matlabTest.1 and matlabTest.2 to distinguish them. Also you can git tag -a matlabTest.1 cfa84d -m 'describe the difference'.


How to access SQL Server from my WCF web service?

Question: VS Express 2012, SQL Server Express 2012, Win 8.1
Hello,
I have a (very) simple WCF hosted as a web service on IIS. I also have a SQL Server instance (with 1 table) installed on the same machine.
I need a step-by-step guide on how to connect to SQL from the WCF (VB) and retrieve a single record from the table (ie: "SELECT LAST NAME FROM MYTABLE WHERE PK = 1;"). That's it. I don't need a 1,200 page manual -- which is all Google keeps throwing at me.
Anyone know of a quick, clean resource?
Thanks,
Jason
Answer: There is no difference on using ADO.NET in a WCF service or in a normal application from the point of view of the classes required.
The first thing needed is a connection string that allows your SqlConnection object to find the host and the database that you want to use. Here examples on connection strings
Then you usually need a SqlCommand that encapsulates the SQL text and parameters needed to retrieve  the data (Here you setup your SELECT statement and conditions)
Finally you need a SqlDataReader that get the result of the command execution and allows you to loop over the results.
Here a sample that could get you started.
Keep in mind that this is just a minimal todo-list and there are numerous other ways to work with data. Basic objects like SqlDataAdapter, Dataset, DataTable present different ways to load data from a database and use that data. Then on top of these there are technologies like Linq To Sql and Object Relational Mapper tools that abstract the data access and offer high level functionality on top of data.
That's probably the reason you get so much informations on data access technologies
Answer: The main classes that are involved are SqlConnection and SqlCommand. The documentation of the classes contains some samples on how to use them. To get you started, here is a small sample:
<code>Dim connStr = "Data Source=SQLServerName\InstanceName;Initial Catalog=DatabaseName;Integrated Security=SSPI"
Using conn As New SqlConnection(connStr)
    conn.Open()
    Using cmd = conn.CreateCommand()
        cmd.CommandText = "SELECT LAST_NAME FROM MYTABLE WHERE PK = @pk"
        cmd.Parameters.AddWithValue("@pk", 1)
        Dim result = cmd.ExecuteScalar()
        If Typeof result Is DbNull Then
            ' Handle null value
        Else
            ' Otherwise
        End If
    End Using
End Using
</code>
This sample assumes that you want to retrieve a single cell as in your statement. If you want to retrieve tabular data, have a look a the SqlDataReader or SqlDataAdapter class.
Please note that - especially in server applications - it is important to dispose of the created instances properly.


Are questions about building installers/binaries for GIS programs on topic?

Question: I just feel that those questions would be better served by directing people to the mailing lists of their respective software packages. What does the community think?
Answer: I don't see why they should be offtopic for gis.se. Here are a few more reasons why they should be allowed:

The development or coding questions of GIS programms are on-topic. The development of its installer or binary should be on-top, as that is also development.
Some FOSS software do not have proper build instruction for a particular Operating system, since they do not have anyone with that skillset. Asking the question on the mailing lists might not be useful.
Where do you draw the line? Almost every question on this site might be asked of some other fourm or mailing list. Once could ask ArcMap usage questions on ArcGIS forums, or you could ask Qgis questions on the QGIS mailing list. Why specifically exclude this subset of questions, when they have to do with GIS software?
A lot of experienced professionals are present exclusively on this site. A lot of ESRI developers have given up on the ESRI forums and answer exclusively here. Similarly I know a few QGIS developers here. I'm sure that If I ask how to create an installer for an ArcObjects custom tool, I will get an answer here in a few hours, and will take more time on ESRI Forums.
Finally, and most importantly, according to the FAQ, "The Geographic Information Systems Stack Exchange is for ... programmers, and anyone interested in or using GIS". These kind of questions will be asked by programmers working with GIS software, and hence should be allowed here.
Comment: I think a clarification is in order. `anyone interested in or using GIS` is rather vague. Interested in doing what?
Answer: It really depends on the nature of the question or problem. "Building installers/binaries" is overly vague -- specific examples are required and best handled on a case-by-case basis.
Indeed there can be quirks specific to certain GIS software packages, frameworks or SDKs that are certainly on-topic, but there have historically been a significant number of posts that in retrospect would have been better served by StackOverflow or another site or mailing list.
Examples:

Deployment options of ArcMap AddIn? - On-Topic because ArcGIS add-ins have a well defined deployment/installation process that is specific to the ArcGIS software
rpy2 installation on Mac OSX. A still unresolved problem on StackExchange and rpy-list - Off-Topic because while rpy2 may be used as part of a GIS-related analysis, its installation is fairly standard and issues relating thereto should probably be handled on the rpy mailing list or perhaps SuperUser/Unix/StackOverflow.
Comment: On point number one, so what if it's specific to ArcGIS software? Should it matter? As for point number 2, I think it's rather discriminatory. One could argue that the GDAL installation is fairly standard as well and yet we don't close it. What makes an installation standard anyway?
Comment: I would think that the second one is off-topic, because rpy2 is not a GIS software in particular, though it could be used in GIS analysis.
Comment: @R.K., 1. It matters because ArcGIS is GIS software, this is a GIS site, and the question was about using a feature of ArcGIS (the add-in framework). 2. GDAL is GIS software, rpy2 is not.
Comment: @DevdattaTengshe Agreed, but it might have been on-topic if the question was specifically about an issue relating to its use in GIS software (QGIS was mentioned but the problem wasn't specific to it). So it's case-by-case IMO.
Comment: @blah238 GDAL is not GIS. It may be an important component of most GIS programs but it is not in itself GIS. Though I get your point. Maybe we should change the site's name to geospatial or something. GIS is too limiting.
Comment: I guess both points are debatable but I understand where you're coming from. The "GIS" umbrella is much larger than just ArcGIS and QGIS and includes all sorts of web mapping frameworks, ETL tools including FME and GDAL, etc.
Comment: I think we are using the GIS word too loosely. If we want to be more inclusive, it might be better to use the word geospatial instead. That way we can include web mapping frameworks APIs, ETL tools, and location based services. Among other things. GIS is just one tool among many.


The potential difference between primary and secondary wiring of an isolating transformer

Question: Lets say we have an isolation transformer powering our circuit. What voltage is a multimeter going to show when we put one probe into mains ground, and the other one at the output of the isolated (secondary) transformer wiring.
Comment: I would say: nothing useful.
Answer:
What voltage is a multimeter going to show when we put one probe into
  mains ground, and the other one at the output of the isolated
  (secondary) transformer wiring.

Theoretically 50% of your mains AC voltage, providing the multimeter has infinite input impedance and the secondary is disconnected from any load.
This value also assumes that there is no grounded shield between windings and that the net electric field is evenly distributed in one layer of windings.
All manner of other subtle issues can raise or lower this figure because it is based on inter-winding capacitance. For instance, because it is likely that the primary and secondary are wound using multiple layers, the main electric field imposing on the secondary will tend to be more towards ground potential or more towards live potential. This is dependent completely on which of the mains wires connects to the layer closest to the secondary. Swapping live and neutral on the primary could easily give different results.
Should this measured voltage be a worry? No because it is sourced through the inter-winding leakage capacitance and this will be in the order of 100 pF to 1 nF (hand waving alert!).
Answer: Assuming a real world multimeter (~1MOhm), and a professional grade isolation transformer you will measure zero between either output wire and ground if the output is not bonded to earth/neutral.
If it's a typical low cost isolation transformer then there is at minimum an electrostatic shield between input and output windings so the output winding has a capacitance to earth/frame. If it's a high quality isolation transformer the output winding will have top/bottom and side shields (called triple shielded).
The capacitance to frame/ground/earth in a professional grade isolation transformer is likely in the 10-20pf range from output winding to ground and perhaps 1pf or less to the input winding.
Here's a diagram of a double shielded transformer, the two shields capacitance is in series:

(source: electrical-engineering-portal.com)
Here's  a commercial grade transformer as an example of the input to output isolation that can be achieved: http://www.consulneowatt.com/products/transformers/ultra-isolation
Comment: That example transformer has a "Shield against strong lightening" - wow, it even resists anti-gravity!
Answer: Isolation depends on the ratio of coupling capacitive impedance from primary to secondary and , mutual impedance to ground such as line filters and the quality of the shield to reduce the coupling capacitance inside.
If you were to analyze the transfer impedance, you would find it quite high relative to the load but leakage current may be as much as your load's common mode filter to ground (0.5mA) if that is connected.
If you are looking for RF isolation, then a CM choke of suitable size may be added.

One test you can do is put a large plastic cap across the meter and measure the voltage and if zero, then remove and measure AC current in mA scale to compute the effective impedance coupling of V/I for the frequency being used.
Answer: I agree with Andy aka, and also agree with the "nothing useful" comment.  BUT, there could be static charges that would add or subtract from the capacitance divider.  I sometimes have seen an intentional resistance of several megohms across an isolation barrier, to limit the voltage due to these extraneous charges.  The input resistance of the multimeter would accomplish the same thing.


Is there a way to get insert face to be larger than the selected face?

Question: When you have a face selected and you hit I, it does this extrude/scale thing where you can give it an exact unit and it will scale it exactly that many units in, but it only does it smaller than the original face. If you were to do ES, then it does the same thing but it scales it as a percentage, though it can be larger than the original face. I need to do the insert face but have it larger than the original face by a specific unit; not a percentage. Is there a way to do that?
Comment: I have a triangle that has sides of 1000mm each. When I hit `I100`, the inset triangle has sides of about about 900mm. That would be using the units instead of percentages. I want to be able to type `I-100` or something to get one with sides of 1100mm. The math is easy to do with numbers like 1000, but if I didn't know what the size was, but I know it needs to grow by 19mm, then trying to figure out what percentage gets much harder.
Comment: I cannot get the Inset action to use anything other than a percentage, which is the behaviour I expect from any of Blenders built in actions/tools. Are you sure you are seeing it use Blender Units rather than a percentage where 0 = 0% and 1.0 = 100% and higher values are allowed. Also, if I make the Inset face larger than the original it turns inside out is this really what you want?
Answer: You can also outset faces using the inset tool properties panel, just tick "outset".
You can specify the thickness of the outset in units.
Comment: I'm not seeing that panel. I know those are normally on the bottom left of the screen, but when I hit `I`, it doesn't pop up.


What is the probability that two heads occur before two tails?

Question: A biased coin has probability p of showing heads. We toss the coin repeatedly until two heads or two tails occur in row. What is the probability that two heads occur before two tails?
Answer: Consider the four states "HH", "HT", "TH", "TT", representing always the results of the last two tosses. You want the probability of the event $A$ that "HH" occurs before "TT".
After the first two tosses you are in each of these with probabilities $p^2$, $pq$, $pq$ and $q^2$ respectively, where $q=1-p$.  Of course if it's "HH" your event does occur, and if it's "TT" it doesn't.  So
$$\mathbb P(A) = p^2 + pq \; \mathbb P(A \mid HT) + pq \; \mathbb P(A \mid TH) $$
Given you're in the state "HT", with probability $p$ the next toss is heads, leaving you in the state "TH", while with probability $q$ it's tails, leaving you in "TT", where the event A does not occur.  Thus
$$ \mathbb P(A \mid HT) = p \; \mathbb P(A \mid TH) $$
Similarly, $$\mathbb P(A \mid TH) = p + q\; \mathbb P(A \mid HT) $$
Solve this pair of equations for $\mathbb P(A \mid HT)$ and $\mathbb P(A \mid TH)$ ...
Answer: Suppose you do it right off the bat. (in 2 filps)
$P(hh) = p^2$
in 3 flips? $P(thh) = p^2(1-p)$  (this is the only way to win in exactly 3 flips)
4 flips? $P(hthh) = p^3(1-p)$  (this is the only way to win in exactly 4 flips)
In order to win in $n+2$ flips, the first $n$ flips must alternate $hththththth$
$2k$ flips $= p^{k+1}(1-p)^{k-1}$
$2k+1$ flips $p^{k+1}(1-p)^{k}$
$\sum_\limits{k=1}^{\infty} p^{k+1}[(1-p)^{k-1}+(1-p)^k]$
$\frac {p^2(2-p)}{1-p(1-p)}$


What are the best ways to defend against champions that deal true damage?

Question: What runes, masteries, items, or any other aspect of the game can help defend against targets that deal true damage?
Answer: If the true damage is your only concern, you should build health items and health regen, as well as Spell vamp or Lifesteal. Also, you could use crowd control effects like Stun or knock-ups to keep the enemy from being able to hit you. Short of all that, there's not much you can do against True Damage. Also, Exhaust does NOT reduce True Damage.
Comment: If you're worried about Vayne or Irelia you can also get attack speed reduction items such as Frozen Heart and Randuins as those champions true damage requires them to auto attack.
Comment: If you're worried about vayne, health actually hurts you... The attack slow is almost never enough and thornmail doesn't really do much either unfortunately... The best way to mitigate Vayne's true damage is to cc and focus her down before she can kill you. Otherwise, stacking health is by far the best counter to true damage.
Comment: @Lord_Mordoth building health against Vayne does not actually hurt you.  It makes her do slightly more damage per AA on average, but you live longer.  Wither her bolts maxed (8% true damage), an extra 1000 HP means she deals an extra 80 damage every third attack, or 80/3=26.66 extra damage per attack (average), which is pretty insignificant to your extra 1K HP.  You will die significantly slower than you would have before.
Answer: It depends on the kind of true damage that's being dealt and the champion dealing it.
For example, against olaf and irelia, you generally want more hp as well as AS reduction items like randuins or frozen heart, which incidentally reduces the physical portion of their attacks as well. These two champions are difficult to control in fights so either focus them down or kite them.
Against vayne, who deals % health true damage, get AS reduction items. Since vayne is relatively fragile, you can also aim to shut her out of fights by focusing her, either getting in her face and forcing her to leave, or use cc effects on her and kite if you don't have the chance to kill.
Answer: You can't reduce true damage, but getting more hp, hp regen, and lifesteal/spell vamp helps against it, since buying resistances will not help reduce damage, but those stats will make the damage have less of an impact.
Answer: Pure health like warmogs negate true damage.  However if the true damage is like Vayne, based off total health, then getting attack speed debuff like Frozen Heart, Randuins, and Exhaust will negate a lot of the damage you take from them.  The only item that builds against true damage in a way is Zhonya's Hourglass, but that is only for the 2 second active ability.


Need guidance on image classification problem with large feature matrix

Question: So I've got an interesting problem that I'm struggling with and I wanted to hear some ideas on possible solutions. The data is not public and I can't go into much detail.
The problem involves a binary image classification problem (Pass/Fail) for finding defects. Currently the image is split into 80 zones and each of these 80 zones have 7 features so each image produces a matrix of features (Haralick's Textures). I have class labels for each of the images and it is possible to provide a label for each of the zones on each image (whether a failable defect exists). The problem with doing this (besides being tedious and thereby lowering the possible training set size) is that it's hard to be consistent when grading small pieces of images.
What I'm currently playing with is doing and LDA/PCA transform on each of the zones (7-D feature to 1-D) and then a simple transform (i.e norm of the vector) to now go from the 80 zones to an overall image class. Hasn't been working to well. Images with gross defects get classified correctly but borderline images are muddled with pass images.
So as a kind of brainstorming session, I'd like to hear of some ideas I can play with. Thank you
Answer: Here is a very simple-minded idea that goes one step backwards from where you are (where you split each image into zones etc). It assumes that computation is cheap. Just use each pixel as a feature. Each image then either contains a defect or not. So you have one binary class label for each image and npixel features. There are many ML algorithms to choose from; random forest usually does well.


Will I receive Titre de Resident when renewing Titre de Sejour (7 years since first Titre de Sejour) after < 12 month absence?

Question: I am a US citizen. I entered France in 2016 on a Blue Card visa and received a Titre de Sejour. In 2021 I resigned from my French contract and took a contract with the same company in the US. I currently have two possible job opportunities (still same company), one located in France and another in Germany. If I return to work in France or Germany before 12 month anniversary of resigning my French contract, is there a path to getting long term residency? I was given some advice that when/if I renew my Titre de Sejour (expires in 2023) I might be automatically handed a Carte de Resident (10 year residency). If I take a job in Germany while my Titre de Sejour is still valid would Germany possibly consider my time in France and grant me long term residency?
Answer: France: The carte de résident you would be looking at is the French version of the EU long-term resident status. service-public.fr is not very explicit on the gap that would be allowed but the directive has this to say (article 4):

Periods of absence from the territory of the Member State concerned shall not interrupt the period referred to in paragraph 1 and shall be taken into account for its calculation where they are shorter than six consecutive months and do not exceed in total 10 months within the period referred to in paragraph 1.

The one year anniversary does not appear to have any special significance and it looks like you may have already exceeded the maximum duration of absence that is definitely allowed.
Germany: Time spent in France doesn't start the clock or count for anything in Germany.


How was Geordi able to fire his weapon on board the Enterprise-D?

Question: In ST:TNG "Aquiel", Geordi reaches into the drawer in his quarters pulls out a phaser, and fires it at the organism. Aren't hand weapons on the Enterprise disabled? Are all officers allowed to have hand weapons loaded and armed in their quarters?
Comment: @N.Soong Wait, you use  between ST and TNG?
Comment: I've had the name of the series changed so many times in so many posts. @N.Soong this is the first time I think that I've seen it done the way you edited it. Is there a set way that we are supposed to name Series, show, episode? If not why do people keep changing it?
Comment: sorry I made a small mistake with that edit.  I'll amend that edit to the way I've seen in most questions and personally use
Comment: @MrLister lol
Answer: If you'll allow me to quote from the (considered fully canon) "Star Trek: The Next Generation: Technical Manual", the simplest answer is yes, you can operate a hand-phaser on board the ship, but you need to be a a command officer or a senior security officer in order to legally override the phaser controls which automatically set themselves to stun.

Downstream from the power cell are three interconnected control
  modules: the beam control assembly, safety interlock, and subspace
  transceiver assembly (STA). The beam control assembly includes tactile
  interface buttons for configuring the phaser beam width and intensity,
  and a firing trigger. The safety interlock is a code processor for
  safing the power functions of the phaser and for personalizing a
  phaser for limited personnel use. Key-press combinations of beam width
  and intensity controls are used to configure the phaser's safety
  condition. The STA is used as part of the safety system while aboard
  Starfleet vessels. It maintains contact between the phaser and the
  ship computers to assure that power levels are automatically
  restrained during shipboard firings, usually limited to heavy stun.
  Emergency override commands may be keyed in by the beam controls.

As to why Geordi has a phaser in his quarters isn't really explained. Other officers do occasionally demonstrate that they keep weapons lying around (Picard evidently has one in his ready room and both Worf and Tasha (albeit both were Security officers) evidently kept them in their bedrooms) but I'd guess that the out-of-universe reason was simply that having him go to a weapons-locker and come back was an unnecessary 30 seconds of filming.
Comment: @n.soong - You really should. It's an amazing resource for the serious trek-enthusiast. The sheer amount of thought that's gone into creating a **coherent** fictional universe is frankly startling.
Comment: Really should get a copy of that manual ;)
Comment: Also, Data keeps a phaser in his quarters. We see it at one point where it is confiscated while Data is malfunctioning for a plot-related reason.
Answer: You seem to be asking two questions here:

Are hand weapons on the Enterprise disabled?

The answer to that is a resounding 'no'.  Think about the number of times phaser battles have occurred on the Enterprise throughout.  One prominent example that comes to mind is when Worf uses the phaser to disable the Borg in The Best of Both Worlds Pt I and in Brothers when Worf and the security team are using phasers against Data (although there are force-fields in place there).

Are all officers allowed to have hand weapons loaded and armed in
  their quarters?

I  haven't found anything on this on Memory Alpha, but from observation of the series, you don't normally see people walking around with phasers, unless they're security officers (not that they seem to help them most of the time anyway :P).  Furthermore, most of the time on away teams in TOS, equipment like phasers would be provided upon departure.  I seem to recall something like this occurring in TNG, but I can't say exactly where unfortunately.  Picard in The Battle  had a phaser on him when he destroyed the sphere and I seem to recall that he also had a phaser when he was in his quarters when he was paranoid about being revisited.  Consequently, I would speculate (my apologies) that only senior officers and security personnel would be able to hold armed weapons with them in their quarters.
Comment: I should have phrased it differently. If I edit the question, it'll be undone as it has in the past. Obviously, security officers can have weapons, which Worf is one of. Officers outside of security officers is what I meant to say. Geordi is an engineer, doesn't it seem peculiar that he keeps a phaser in his quarters?
Comment: @JMFB go ahead and edit the question if you like; it shouldn't be edited if you're clarifying your question.  If that does occur you should contact the editor and tell them why you used that particular wording.
Comment: @JMFB regarding the point about other officers I do say that it stands to reason that high ranking officers can be armed based on other evidence in the series


share a file to a community user through APEX

Question: I want to share/post a document to a Community user through APEX .
Suggest some work around for this through APEX code.
Answer: Attachment myAttachment =[SELECT Id, Name,Body,Description,ContentType FROM  Attachment where Id =:myFile.Attachment_ID__c];

String communityId = 'myCommunityId';

// CREATE A FEED_ITEM_TEXT
ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput();
messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>();

ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput();
textSegment.text = shareComment;

messageInput.messageSegments.add(textSegment);

ConnectApi.FeedItemInput input = new ConnectApi.FeedItemInput();
input.body = messageInput;

// POST FILE_FEED_ITEM
ConnectApi.NewFileAttachmentInput fileIn = new ConnectApi.NewFileAttachmentInput();
fileIn.title = fetchDigitalChatterFile.Attachment_Name__c;
input.attachment = fileIn;

Blob userFile = myAttachment.Body;

ConnectApi.BinaryInput feedBinary = new ConnectApi.BinaryInput(userFile,myAttachment.ContentType,myAttachment.name);

// PARAMETERS(communityId, feedType, subjectId, input,filebody);
ConnectApi.FeedItem feadItem = ConnectApi.ChatterFeeds.postFeedItem(communityId, ConnectApi.FeedType.Record,'share To Id',input,feedBinary);

Answer: OP's issue which is Community users can only access files that were uploaded INTO that community. (ie when an internal user with a full SFDC license uploads a file, Community users can't see it, even though the community users have access to view the record, AND prior to enabling Files, Community users could see Attachments that internal users uploaded.)
This single line of code for an APEX Trigger worked to flag all uploaded files so that all users in the Community could see them:
UpdateContentDocumentLinkVisibilityOnInsert on ContentDocumentLink (before insert) { for(ContentDocumentLink l:Trigger.new)l.Visibility='AllUsers'; }

Comment: ?? because you included your email address and phone# ??
Comment: According to this document having contact info isn't specified as casue for deletion: https://salesforce.stackexchange.com/help/deleted-answers neither is it referenced here: http://meta.stackexchange.com/questions/5221/how-does-deleting-work-what-can-cause-a-post-to-be-deleted-and-what-does-that
Comment: I am curious as to if I've violated a TOU or code of contact. Please provide information supporting the valid reason for the deletion of my answer.
Comment: I have no idea, @MattLacey (a moderator) deleted it - I was just guessing as to the reason - the 'contact us' is not typically seen on this site
Comment: It was flagged as spam, and generally when I'm working through flags if I see a first ever post that includes details for a company and a line like "call us for help" I tend to just hit the delete button.
Self promotion is against the values of the site http://salesforce.stackexchange.com/help/behavior

I'll edit some context out of this because it won't make sense to people as it is. Sometimes the flags list gets pretty big, and if I study everything in crazy detail it'd quickly become a full time job! I have to rely on the community for context. Apologies BMFC, and welcome to the site.
Comment: Hey Matt, any idea on how I can lift my answer ban? the help center says to start by fixing my answers, but there's only one.
Answer: Per the Apex Docs, Apex sharing is not available for Communities. Sharing sets are available as an alternative except in the case of Partner Communities. You don't say what kind of Community you have or the kind of Document you need to share, so further guidance is difficult to provide.
Comment: I am using Customer Community and scenario is a logged in user can share a document (word/pdf files) to any user present in the same community.
Comment: Currently in Chatter "chatter:feed component" to share/post a document to another user , the logged in user has to go the Chatter of that user and can share any document by posting it in chatter.Instead of this I want to create a VF page where a logged in user directly post/share any document to any user in the community.
Comment: Since file and record sharing in a Customer Community is managed primarily through sharing groups and permission sets, unless they happen to be the only members of the same sharing group, using Chatter or providing a link via email to an external file is the only way I can find that one Customer Community User can share a document with another User. In addition to the SF Help files, one reference you may want to look at is [Getting Started with Communities](http://help.salesforce.com/help/pdfs/en/salesforce_communities_implementation.pdf).
Answer: A client of mine already had a ton of files uploaded by internal users that they wanted to make available to partner community users. I was able to use the code below in the developer console with execute anonymous.
// Gather existing opportunity file links
List<ContentDocumentLink> existingOpportunityFileLinks = [
    SELECT
        Id,
        ContentDocument.title,
        Visibility,
        LinkedEntityId,
        ContentDocumentId,
        ShareType
    FROM ContentDocumentLink
    WHERE
        LinkedEntityId IN (SELECT Id FROM Opportunity) // All opportunitities
        AND
        Visibility != 'AllUsers' // Don't need to reshare these; they're already shared
    LIMIT 100 // Do a few at a time and test
];

// Create new opportunity file links
List<ContentDocumentLink> newOpportunityFileLinks = new List<ContentDocumentLink>();
for(ContentDocumentLink existingFileLink : existingOpportunityFileLinks) {
    ContentDocumentLink newOpportunityFileLink = existingFileLink.clone();
    newOpportunityFileLink.Visibility = 'AllUsers'; // Make the file visibile to all users, both internal and external, who already have access to the linked opportunity records
    newOpportunityFileLinks.add(newOpportunityFileLink);
}

// Delete existing file links since we can't change the visibility field on already saved records
delete existingOpportunityFileLinks;

// Save new opportunity file links
insert newOpportunityFileLinks;


How can I drill through a Linoleum floor?

Question: I would like a drill a hole through my dining room floor to run a wire. The floor is carpeted, so I pulled back the carpet in the corner to find an old linoleum floor.  I attempted to drill a hole through it, but the linoleum seemed to melt and then form an impenetrable barrier. What type of drill bit could I use to get through the linoleum and the wood below?
Comment: You're sure it's wood underneath?  That sounds more like you're hitting metal or concrete.
Comment: have you tried sharpening your drill?  It seems odd that you are creating enough heat to melt the linoleum.
Answer: Extended Spade Bit.
Comment: Be careful when using large-diameter spade-bits -- you can get kick back on the drill if the bit binds in the hole, in which case instead of the bit turning, the drill motor will turn the other way ... very quickly.  And while you're at it, spade bits can cause a fair amount of vibration, which is bad for your wrists.
Comment: Actually, I don't know that I'd go with a longer shaft on the spade bit -- I'd want longer teeth on the outside edge, with the hope that I could get through the linoleum, remove the cut out little circle, then do the rest of my drilling (possibly with a different bit).  I'd almost want to use something like a cutter for cement board, but those don't close in small enough that I've seen
Answer: Maybe a hole saw? I'd say it's worth a shot if you have one - or cheap ones are around $5-10. Otherwise, you could always try cutting with a utility knife until you're past the linoleum. Then drill after you've peeled it back. I doesn't have to be pretty if it's going to be beneath carpet.
Comment: Agreed -- it's under the carpet, so just take a utility knife to it.  In other cases, I'd handle it like drilling through metal, and use something as a cutting fluid to keep the temperature down.  (with a sharp drill bit, at a slow speed, to minimize friction and heat)  I'd probably go with a spade bit over a hole saw though, as hole saws don't tend to come in smaller sizes, and for running cables, you likely don't need a big hole.
Comment: Spade bit is definitely better suited for this than a hole saw.  Also with a spade bit you would most likely avoid this problem altogether.
Comment: @Joe: Good point on the spade bit - I've never used one before though, so it wasn't the first thing that popped into my head.
Answer: Are you sure it's linoleum and not asbestos tile?  Or maybe there is some old porcelain tile are running into?  A hole saw should be able to cut though all of it, a high quality hole saw can cut most anything.  If it is metal, a step bit should work too.
If it is asbestos do a little research first on the correct way to handle drilling holes.  I won't assume to give any suggestions on the correct way to handle asbestos.


(iphone) anyone had a success using boost with xcode4?

Question: I have been using cross compiled boost static library(system,thread) with ios sdk 4.1 just fine.
(cross compiling part was hell of a job and i don't recall how i 've done that Meh!)
I updated to xcode4 and it fails to link with error msg:
Bad codegen, pointer diff in boost::detail....
I saw that some people try to manipulate "Symbols Hidden by Default" and similar option to disable the warning.
I strongly suspect that the error has to be dealt with proper way.(I saw other postings that people had success compiling it with the options changed but they reported frequent crashing)
I wonder anyone has moved to xcode4 with boost successfully.
Please share how you have done if you did.
Thank you
Answer: See my answer here: XCode 3.2.6 and 4 linker errors ld:bad codegen, pointer diff in ... to global weak symbol


What is the longest tablebase win that includes draw rules?

Question: It has been asked the longest mate that includes draw rules is, and it is known what the longest tablebase mate is. However, what is the longest tablebase mate, i.e. 7 pieces or less, that accounts for the 50-move rule?
Answer: Unfortunately looking for the longest mates on Kyrill Kryukov and checking with Syzygy won't give you the answer. The mate lengths ignoring the 50 move rule don't correspond with the mate lengths when the rule is in force.
For example this position with a ply count of 0 under the 50 move rule is mate in 112, but ignoring the 50 move rule it's mate in 91.
<code>[Title "White to move, ply count 0"]
[FEN "6k1/p7/8/8/7N/7K/2N5/8 w - - 0 1"]
</code>
Indeed the longest mate in this endgame with the 50 move rule in effect is 128 moves from the following position, which is mate in only 85 if the rule is ignored. But that is with a ply count of 4 or 5. (The longest mate in this endgame without the "draw" rules is only 115).
<code>[Title "Black to move, ply count 4 or 5 "]
[FEN "8/8/5N2/p7/8/k1K5/8/1N6 b - - 0 1"]
[startflipped ""]
</code>
In fact none of the currently available tablebases will give you an answer. What you need are DTM50 tablebases which I believe are currently in progress.
See here for a full explanation: http://galen.metapath.org/egtb50/
In general if the ply count exceeds 3 the mates could get even longer owing to the necessity of avoiding triple repetitions (though that wouldn't apply in the above case). So you may not have an answer even with the DTM50 tablebases because the DTM50 tablebases wouldn't take this into account. (They would play perfectly accurately from ply count 0 positions, i.e. if used by an engine from the time the endgame appeared.)
Comment: Bother. So the answer is "no answer yet". At least I upvoted. (Community, does Martin "deserve" the bounty under the usual SE rules? I want to play fair here, which might also be NOT handing it over!)
Comment: Wow, until you mentioned it, I hadn't ever considered the role of avoiding triple repetitions in this context. That almost seems like cheating, to lengthen the mate by forcing the winner to avoid a long list of specific positions that have already arisen twice before in the game!


is it possible to create DLL for both win32 console and MFC GUI

Question: is it possible to develop DLL for both win32 console and MFC GUI. If yes please explain.
What i want to do is to create dll that contains certain API's for both win32 console and MFC GUI.
Answer: Yes - native dlls are structured in exactly the same way when used with console and MFC applications.
The easiest way to do what you want is to create a new plain Win32 project in visual studio, and in application settings set the Application Type to DLL. Select the export symbols checkbox, and the project will include:
<code>#ifdef TEST_EXPORTS
#define TEST_API __declspec(dllexport)
#else
#define TEST_API __declspec(dllimport)
#endif
</code>
You can can then define any functions you want to export from the DLL with TEST_API (or whatever it is called in your application), e.g.
<code>TEST_API int fnTest(void);
</code>
and they will be callable from both an MFC and console application.
Answer: Your question has no sense at all.
Read MSDN detailed doc on DLLs as you don't know what it is
Answer: There is no reason we cannot do this. You can do it either the traditional dllexport, dllimport way or you can just create a COM dll.


How do we decide whether an electron orbital has a non-zero or zero probability of lying inside the nucleus of an hydrogen atom?

Question: How do we decide whether an electron orbital has a non-zero or zero probability of lying inside the nucleus of an hydrogen atom? It is mostly from the radial function, as to what I think but how exactly is this determined?
Answer: In this link you will see the radial hydrogen wavefunctions. It is only the l=0 states, S states, that have a value different than zero at r=0.

The other angular momentum states get a  very small contribution to the probabilities from r>0 to r=1 fermi ( the charged radius of the proton) as 1 fermi is of order 10^-15meters, and the probability is the square of the wave function.
Nothing happens when they do overlap, because of energy considerations:there is no energy level within the proton to allow for a transition to a different state and the neutron is much heavier than the proton. Anyway, to get there the weak interaction will be needed which is the reason that electron capture in nuclei where energy allows it, is very small.
Comment: I think this is the link, you wanted? http://hyperphysics.phy-astr.gsu.edu/hbase/hydwf.html#c1 Scroll down for 2p.
Comment: I'm sure if we take the interaction of `e` and `p` into account at subatomic length scales, the I=0 state will also not take kindly to having an electron in the nucleus.
Comment: @LLlAMnYP It is  energy conservation and the quantum numbers that just let the electron be. With an appropriate nucleus for energy one gets electron capture https://en.wikipedia.org/wiki/Electron_capture
Comment: @Gert I wanted the math. One can see that for l=0 the function is a constant, not zero. The others have a r mutliplying the function.
Answer: One calculates the probability that the electron is inside the nucleus by integrating $\psi^*\psi$ over the volume of the nucleus.
For example, the radial part of the hydrogen ground state wavefunction is $\psi=\frac{e^{-\frac{r}{a_0}}}{\sqrt{\pi a_0^3}}$,
so the integral is $\frac{1}{\pi a_0^3}\int_0^b e^{-2r/a_0} 4\pi r^2 dr$.
In the above, $a_0$ is the Bohr radius and $b$ is the proton radius.  The integral is easy enough, but there is a trick that you may like.  Since the proton radius is so small (~1 fm) compared to the Bohr radius (~53000 fm), the exponential term is practically a constant ($\approx 1$) over the entire nucleus, so just ignore it!  In this approximation, the integral evaluates to $\frac{4b^3}{3a_0^3}$, which is a pretty small probability, but is it really non-zero?
One way to look at a probability is how often the event occurs.  If we could perform an experiment to locate the electron once every second, we would find it inside the nucleus once every 5 million years or so.  So, it is safe to say you or I will never see it happen, so the probability is zero for all practical purposes.


How to make a specific template according number of nodes in a content type?

Question: I have a content type article and I need a specific template for showing articles according the number of nodes.  If I have 2 nodes (content type article) I need to make a template, if I have 3 nodes (content type article) I need to make another template.  How do you suggest to make that?
Answer: I don't know how to swap template files with panels I only know how to modify the layout based on condition, sorry. here's a small little snippet i quickly wrote to display a different template based on the number of nodes inside of the content type. This should really be done with a custom module but I don't have time.

Make sure templates are in template folder under your theme and named correctly.
Copy paste snippet below into your template.php file.
function YOURTHEME_preprocess_node(&$vars) {

if($vars['type'] == 'article'){
     // set content type
     $content_type = 'article';

     // Count number of articles in article
     $query = "SELECT COUNT(*) amount
               FROM {node} n ".
              "WHERE n.type = :type";
     $result = db_query($query, array(':type' => $content_type))->fetch();

     // get number of articles
     $articleCount = $result->amount;

     //specify template based on number of articles
     // one - is equal to _ and two -- is equal to __ for template file
     // No need to add `.tpl.php`
     if($articleCount == 1){
         $vars['theme_hook_suggestion'] = 'page__template1';
     }
     if($articleCount == 2){
         $vars['theme_hook_suggestion'] = 'page__template2';
     }
     if($articleCount == 3){
         $vars['theme_hook_suggestion'] = 'page__template3';
     }
     // ect.... you should make a dynamic loop here this is just basic logic.
   }
}

Modify code to your liking
Clear Cache
Answer: count(node_load_multiple(array(), array('type' => 'The_Content_Type'))) will give you the number of nodes of type The_Content_Type.
The @DMAC solution is right but since you need to do this in Panels module so I give you this solution. In Panels select Selection rules and PHP Code

Now use this code
$nodes = node_load_multiple(array(), array('type' => 'The_Content_Type'));
 if(count($nodes) == 2)
     return TRUE;
 else
     return False;

You can clone this variant   and replace 2 with 3 and modify the theme.


Time Machine backup

Question: I have a Time Machine backup on a USB ssd I would like to move the backup to a NAS. However, every article I have seen about moving Time Machine backups refer to Backups.backupdb file/folder.  When I examine the contents of the backup there is no Backups.backupdb but just a number of Time Machine Backup files with the date and time e.g. 2021-10-14-143009.  The backups all work and I am able to select a date and reinstall from them.  So, am I able to just copy these files to a NAS or is the way Time Machine stores on a NAS different and why is there no Backups.backupdb file/folder?
Answer: Your last question first! Why no Backups.backupdb?
Until the last 15 months, Time machine formatted the destination drive as HFS+ and placed each backup inside the Backups.backupdb folder. Each backup appears as a folder with all source folders and files inside it.  It uses hard links to avoid really duplicating the files in each backup.  The hard links (particularly those for folders) are the main cause of backup corruption.
Since Big Sur, new Time Machine backups format the destination as an APFS volume.  Each backup appears as an APFS snapshot. Again all snapshots have all source folders and files. The magic of APFS avoids the duplication of files.  This is a much more robust storage and in nearly every way is better.
Can you copy files to your NAS?
Yes, but not easily if you want to preserve all the backup history. My advice would be to copy one snapshot to a somewhere on your NAS. This will lose all your history, but will be simple to do.  Of course, you don't need to that if you keep the SSD.
Advice
Assuming it does support Time Machine, start a new backup to the NAS.
Keep the SSD as it is until you are confident you will never want its content.
Comment: @Alper I have made an answer to the other question. Thanks for pointing it out.
Comment: Thank you for your comments and advice, that certainly makes sense.  My NAS says it supports Time Machine but does not support APFS, does that mean the Time Machine backup may not be as robust?
Comment: @Martin On the NAS, macOS will create a sparse bundle using whatever disk format is on the NAS.  But the virtual disk inside the sparse bundle will be formatted as APFS and that is where TM will put the backup.  From the APFS point of view just as robust as directly attached storage.
Comment: that's great, thank you so much for your help.
Comment: What if the original external disk no longer exists (failed) and we wish to restore the data from the backup to a new external disk? How do we make Time Machine associate the backup for the failed disk with the new external disk and then use Time Machine to restore the data to the new external disk? I am trying to help [a Big Sur user facing this situation](https://apple.stackexchange.com/questions/453387/time-machine-restore-to-new-external-drive). Though I have an idea, I am not 100% sure and I don't wish to make things worse. Can you pls take a look if you have not already done so?
Comment: I am on a very similar situation, but I am not able to copy the snapshots to another device. Is there any guide to this type of manipulation ? I'd like to move all snapshots to my NAS.

Time Machine backup