Scientifically Understandable Souls?

Question: Going by our understanding of science and physics as of the time of this posting, how could souls (or something close enough to the idea of the soul to have possibly inspired it) exist and continue consciousness after the death of the physical body, without violating the above-mentioned understanding? As with several phenomena in the real world, like epigenetics or quantum mechanics, the full mechanisms don't have to be completely understood as long as the general concept is.
Comment: Which concept of soul? The mystical power that keeps us living and breathing, that goes back to "world soul" or "god" when we die and is given from there when we are born or resurrected? The remnant after life that gets punished if we did not do what the priest said and rewarded if we did? The thing that passes between bodies to allow reincarnation to better or worse circumstance based on whether we did or did not do what the priest said?
Comment: What is soul? If souls is an atom then to quote Carl Sagan "You are made of star stuff". Your souls was someone else souls and earlier it was star soul.
Comment: Check out [this answer](https://worldbuilding.stackexchange.com/a/46259/21839) to a somewhat related question by another user. Or my own attempt to [explain ghosts](https://worldbuilding.stackexchange.com/q/70153/21839) question.
Comment: This isn't enough to qualify as an answer, but I highly recommend you check out the sequels to Ender's Game (and Ender's Game itself, if you haven't) Orson Scott Card has the best sci-fi "soul" concept I'm aware of. He calls them aiúa.
Answer: Expanded conservation of energy.
The atoms making a living body and a dead body are the same.
The only difference between a living body and a dead body (immediately after death) can be accounted on an entity called Soul, which emerges from the superposition of the states of all said atoms.
When a body dies the Soul is not lost, but simply transferred somewhere else.
Comment: What happens to the consciousness?
Comment: @TheLiteraryLord I'm not sure your soul itself could be considered conscious. If you could observe the world, that requires you to be able to see the world which was done using your eyes before. Your soul doesn't have eyes and if it did absorb light, there would likely be a small variation in light above dead bodies which could be measured to determine if the soul exists. So to the soul itself, everything would appear completely black. I also doubt a soul would be able to have or keep memories since those are stored in the brain which is now in your corpse...
Answer: Philosophically a soul isn't so much a thing as it is a property of a thing, you can't take the "chairness" of a chair from a chair without the chair no longer being a chair, in other words to make a chair not be a chair you need to change it in some way that prevents it being used as a chair.
See: Ship of Theseus
Of course a person isn't just an object like a chair, our identities are not solely defined by our usefulness but also our associations (our interpersonal identity) and our actions/behaviors (our modus operandi and state of mind).
A complete copy of your memories could be considered analogous to a soul however there's no way to determine whether an AI/robot with your memories is authentically you (no doubt psychologically affected by the new state of being) or a new person who just happens to have your memories. Indeed as with the Ship of Theseus the distinction may simply be a matter of perspective, if someone decides that robot is you then to them you are, while someone else may disagree and thus to them you're not, furthermore as the robot you'll have to decide for yourself whether or not we are in fact talking about you.
To answer your question as long as the memories persist you could say someone still exists even if that's only in the memory of other people or stored as some kind of recording. It's a well established trope for people to be haunted by the memory of a lost loved one or someone they've killed, this kind of ghost has no physical presence but is still subjectively real to the person whose mind they inhabit.
Also see: Daemon (novel series)
Answer: There are two big theories regarding the universe/universes. The ever-popular infinite paralell universes theory, and the less known but equally intriguing infinite universe theory. The infinite universe theory states that our universe itself is actually infinite. Infinity is a really, really, really big concept. It basically means that over an infinite distance there are an infinite number of probabilities. This means there is an infinite number of every possible event allowed by physics to be ocurring within that universe an infinite number of times at once. The same concept applies to infinite paralell universe theory, but I think its not as neat as being able to say you have infinite copies of yourself within the same universe.
Point being, if this universe truly does extend to infinity beyond the area which we can observe then an individual is simply a cosmic fact. There is never a time within that universe where they do not exist. Every iteration of a person are in a perpetual state of acting out every physically possible scenario infiniteley across an infinite existence.
Now, as far as the soul is concerned its really up for cultural debate what that even is, but if you die somewhere some version of you identical right down to the sub-atomic level is re-living the exact same life, creating the exact same memories, and expieriencing and exhibiting the exact same conscioussness you did. So, if that is the case then one might say that nobody truly ever dies, they simply are a small cosmic fact that transitions its locations and states of being but never really ever leaves the fabric of existence. As far as if that counts as posessing a soul which lives on after the particular iteration of existence that you call yourself ends, well that really is a matter of personal philosophical opinion. I'd like to think that your conscioussness isnt ending once you die, its simply moving its existence somewhere else along the timeline and space within our universe to begin anew.
Even if our universe itself isnt infinite, the same concept applies across an infinite multiverse as well.
Answer: At the very least versions of us do continue through DNA to or children. I had dreams not by own and who says its not memories passed through DNA from my ancestors whom continues to exist through me.
Comment: can you express better your concept?

Scientifically Understandable Souls?


Hom functor of quasi-coherent sheaf maybe not quasi-coherent

Question: I notice that some books say that for arbitrary quasi-coherent sheaves $F$, $G$ over a scheme $X$, the $\mathcal O_X$-module $\mathrm{Hom}_{\mathcal O_X}(F,G)$ maybe not quasi-coherent, who can give me a counterexample?
Answer: Consider an affine scheme the spectrum of a DVR $M$, then $N=\oplus_{\mathbb{N}}M$ and $M$ are q.c. and via 4.21, Algebraic_Geometry:_Sheaves_and_cohomology $Hom_{O_{spec M}} (N,M)$ is q.c. iff isomorphic to its associated sheaf. Localizing at a non-unit should preserve this ismorphism via Hartshorne II.5.1.c, but it doesn't.
Comment: I'll use the notation of Hartshorne II.5.1. Think of $Hom_{O_X}(N,M)$ as $\tilde{A}$ for some associated sheafand $M$-module $A$. Then by (d), $\Gamma(\tilde{A}) = A$ and by (d) $\Gamma(\tilde{A})_f = A_f$ on the other hand,  by (c) this should be equal to $Hom_{O_X}(N,M)(D(f)) = Hom_{O_X}(N(D(f)), M(D(f)))=Hom_{O_X}(N_f, M_f)$ Thus in total, we should have $Hom_{O_X}(N,M)_f=Hom_{O_X}(N_f, M_f)$, but there might be maps in the latter which don't exist in the former.
Comment: I do not understand why "Localizing at a non-unit should preserve this ismorphism", is it possible that Hom(N,M) is q.c. but not induced by the Hom functor?
Comment: Thanks, I see. Maybe the Hartshorne II.5.5 is also helpful.
Comment: Yep II.5.5 also applies.


My Launcher won't continue downloading after a period of time

Question: I recently downloaded LoL and I've had some issues on the "step 2/2 updating league of legends" causing me to (still) not being able to get in. The KBPS keeps dropping to 0 and won't go back up, even after hours. I've looked around the Internet, but nothing seems to work.
Comment: Okay, normally, when this problem happens it continues after a short while sometimes after 30min. Try running it as Administrator and make sure your firewall isn't blocking the launcher.
Comment: Are you Mac or PC?
Comment: It's a lenovo
Comment: Actually I tried to turn off the firewall while finishing but it still doesn't work. Also I let it run all day while I was in school. Still won't pick up -_-
Comment: I've experienced the same issue. I've waited 10 hours during the working day but no change. After a clean reinstall everything worked fine for me.
Comment: I reinstalled yesterday. I got further, but then it stopped at around 200MB
Comment: Do you have steam or origin in parallel open? They leech on the line which could provoke a timeout.
Comment: Doesn't look like it... weird. I guess it could be the computer, even though I haven't had other problems with it.
Answer: A lot of these are going to be super simple, but may as well try 'em. They're in the order I reccomend doing them in. Note that you can do many at the same time.:

Are you installing from the same file each time? If so, download a new installer.
Restart your PC
Run installer as Admin
Enable / Disable P2P: In your client, click the gear icon in the top-right, and then check or uncheck "Enable Peer to Peer Transfer":

Close out all other unneeded programs -- like, all of them
I don't know how you're uninstalling League, but try doing it with a free trial of Revo Uninstaller. Then reinstall.
Contact League support

Again, you have probably tried many of these already; sorry if this answer is redudant.
Comment: To be honest I got it downloaded on my new computer. But then I bumped into a new problem - when I click "launch" the game closes down and nothing happens
Comment: Huh. Try redownloading without P2P and with Admin rights. If that doesn't work, ask League support.
Comment: The P2P hasn't affected it at all...  neither did admin. Guess I'll see if I can get in contact with league support
Comment: OK, good luck :]
Comment: I'm trying to figure out what this problem is, but I can't see anything like this on their support side. Thanks for your help tho
Comment: You can email them, too.
Comment: Oh really? Didn't notice.. Aha  well thanks again
Answer: Try putting it in Low Spec Mode. Only way I could get it to download.


What is the purpose of the flair on per-site metas?

Question: Why do per-site metas offer flair?  By this, I mean, are users really keen on knowledge about the Q&A site about something?
Comment: +1, will make more sense to have the Meta profile offer the flair of the main site.
Answer: I was under the impression it exists here for meta.so because it is just as easy to do it as for any other site. It's there, so why not have it enabled?
For other metas, you just have the rep of the main site
[edited because I had things the wrong way round - so wrong :-)]
Answer: It's a good measure of activity on Meta. Someone with a couple silvers and a handfun of bronze badges has actually been using Meta. It's impossible to tell that from rep.


Delete My sites without affecting user profiles

Question: I want to delete my sites without affecting existing user profiles and also want to disable my sites creation. I know to delete site collections using powershell script but want to know, is there a way to delete all my sites without affecting the my sites auto deletion setting.
Answer: You can delete just mysite, it will not impacting the user profiles. One thing you have to keep in mind that root url aka Mysite host should not be deleted.
You can also disable the mysite creation, it will not impact as well to the profiles. You can disbale either remove permission for all users from UPA and also disable the Auto provisioning of Mysite.
Lastly, disable the mysite auto deletion timer job
here is script which will delete all mysites in farm ( but please test it in test farm)
<code>#Add SharePoint PowerShell SnapIn if not already added
 if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
[Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

$mysiteHostUrl = "http://my"
$mysite = Get-SPSite $mysiteHostUrl
$context = [Microsoft.Office.Server.ServerContext]::GetContext($mysite)

$upm =  New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

$AllProfiles = $upm.GetEnumerator()

foreach($profile in $AllProfiles)
{
   $DisplayName = $profile.DisplayName
   $AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value

   if($profile.PersonalSite -ne $Null)
   {

       $profile.PersonalSite.Delete()
       write-host $AccountName , " personel site deleted successfully"
   }
}
$mysite.Dispose();
</code>
Sharepoint 2010 – Delete all users' personel sites via powershell
Comment: thanks for the quick reply, let me test and confirm


Office 2010 professional plus Business contact manager?

Question: Does Office 2010 Professional plus come with Business contact manager? If so how do I enable?
Answer: BCM Microsoft has a download available here.  Have you tried that install?
From the MS site-
If you purchased a previous version of a Microsoft Office suite or a standalone edition of Microsoft Office Outlook that included Business Contact Manager, you can download Business Contact Manager for Outlook 2010 at no additional cost. You can also download Business Contact Manager for Outlook 2010 if you purchased one of the following the following products.
Microsoft Office Home and Business 2010
Microsoft Office Professional
Microsoft Outlook 2010 (stand-alone edition)


Lexicosemantic and lexicosyntactic?

Question: I am reading a paper that distinguishes between lexicosemantic patterns and lexicosyntactic patterns (page 4, paragraph 2). I am unfamiliar with these terms and am having trouble understanding what they mean from context/Google. Can someone explain the difference between the two with clear examples?
Answer: Lexicosyntactic patterns are strings of words paired with syntactic structures; they depend only on the syntactic categories of the component words, with no reference to their meaning.
Lexicosemantic patterns are strings of words paired with semantic categories.
So, a lexicosyntactic pattern might be something like "[John: Noun + Subject] [kicked: Verb] [the: Determiner] [ball: Noun + Direct Object]", while a lexicosemantic pattern might be something like "[John: Name] [kicked: Active Verb] [the: Definite] [ball: Toy]".

Lexicosemantic and lexicosyntactic?


RC car problem using bluetooth module

Question: I m making a small RC car and to control it, I m using a HC05 Bluetooth module. My car is rear wheel drive using two dc motors and the front wheels will just turn left or right for navigation. Can the Bluetooth module take more than one command at a time so that I can turn the car while moving as it happens to be in RC car toys found in market? If not, please suggest me on how do I achieve this objective of turning while moving at the same time.
P.S. I am using arduino nano in this project. For navigation, I m using MG995 servo motor.
Comment: You don't want blueooth for this, but something more like the nRF24 (a huge number of actual RC systems use things compatible with that, the rest use similar but incompatible competitors).  The reason is that you don't want to retry sending old data, but rather to have *some* of the command packets get through, *but only while they are current*.  Use different bytes in the packet for different functions.
Answer: The HC-05 blurb states this: -

This class 2 Bluetooth module comes programmed with firmware that
  allows it to pass the output of a serial communications port (default
  is 9600 baud) over a Bluetooth wireless connection with no software
  configuration

So, if you can create a data frame that uses say 5 bytes (or less) that incorporates speed and direction then keep sending that frame, you get a payload data update rate of 9600/(5 x 8) = 240 times per second.
So the problem isn't really about turning and moving at the same time but all about how quickly you can update speed and direction information.
Updating this information at 240 times per second should be OK for practically any RC car I would imagine.
Comment: You make a frame of several bytes with the first byte being a recognizable header. Probably the last two bytes in the frame are for a checksum to give you transmission confidence. The 2 or 3 other bytes would be your payload data that correspond with speed and direction. An arduino nano can package the data into a frame and at the receiver end a similar nano can unpackage the data if the checksum is right. The header has to be uniquely identifiable from data so your receiver can sync to transmissions. If you don't understand this then you are probably in too deep and need to learn!
Comment: Consider however that these pre-made bluetooth modules have non-existent real-time performance and built-in latency. Then there's the issue with lost radio connection because of 2.4GHz disturbances, range, obstacles etc. I would use much higher baudrates and preferably a MCU with DMA on the UART input.
Comment: @Lundin I wouldn't use bluetooth for those reasons you give - a much too contaminated region! The receiver sensitivity implies a data rate of Mbpsec yet it only achieves 9600 bps for payload - it is vulnerable for sure.
Comment: @Andyaka so u say speed and direction data frame should be of 5 bytes? How do I set it? Or should I get a much advanced gear? Plz suggest
Comment: @Andyaka yes u r right. This is my first time with arduino and I cant understand properly. I will get an arduino expert to understand this. BTW thnx for the suggestion.

RC car problem using bluetooth module


How do I make multilangual content synchronization between two sites?

Question: I'm trying to figure out how to synchronize content between 2 sites. Before migration to D8 I was using views data export on site1, and feeds import on site2. My problem is, that in D8 I'm not able to create view where on one row will be English and French content - they can be only two separated rows. But this way I don't know how to set up feeds, to consider these 2 lines as translations of 1 node.
Answer: On the source site:

Make sure that your view has a column that contains an unique identifier for the item. This value must be the same for every language of the item.
Add a column to the view that contains the language code. For English this would be 'en' and for French this would be 'fr'.

On the target site:

On the feed type, map the unique identifier either to:

A non-translatable field;
Feeds item: GUID.

And mark that as unique on the feed type.

Map to all the fields that you want to map to.

Map the langcode value to the "Language" target.

Known issues
Note that there are some known issues with importing multilingual content using Feeds. I'm doing my best to resolve them.
You can currently run into the following errors:

this field cannot hold more than 1 values.
Patch available at https://www.drupal.org/project/feeds/issues/3155046

A translation already exists for the specified language
https://www.drupal.org/project/feeds/issues/3126351
No patch yet, but you could help by confirming or correcting the steps to reproduce the issue.

Column cannot be null (SQL error)
https://www.drupal.org/project/feeds/issues/3169398
You can help by describing the exact steps to reproduce this issue.
Comment: I have simple csv file `ID,langcode,Title
1738,en,"EN title"
1738,fr,"FR title"`, in feed settings I have mapping id -> field_original_nid (non-translateable, unique), langcode -> Language (langocde), Title -> Title. But on import I've got for both Title and field_original_nid: this field cannot hold more than 1 values. Patch #17 from 3155046 has been applied


Kinematic formula for Euler characteristic

Question: Is there a formula for $\int \chi(K \cap gL) \: dg$ (where $\chi$ is Euler characteristic) analogous to the kinematic formula for $\int \mu(K \cap gL) \: dg$ (where $\mu$ is Lebesgue measure)? In both expressions $K$ and $L$ are compact convex bodies, $g$ varies over a group of isometries acting on the ambient space, and $dg$ signifies integration with respect to the Haar measure of that group.
Comment: $\chi(K \cap gL) = 1$ if $K \cap gL \ne \emptyset$ and $0$ otherwise.
Comment: I can't picture the Euler characteristic being nonconstant, over a family of convex sets. If it is constant, then this seems like a constant multiple of volume of the isometry group.
Answer: Yes, this is called the principal kinematic formula:
$$\int \chi(K \cap gL)\, dg = \sum_{k=0}^n c_{nk} V_k(K) V_{n-k}(L),$$
where $V_i$ are the intrinsic volumes, and $c_{nk}$ certain constants. See e.g. Section 4.4 in
Schneider, Rolf, Convex bodies: the Brunn-Minkowski theory, Encyclopedia of Mathematics and Its Applications. 44. Cambridge: Cambridge University Press. xiii, 490 p. (1993). ZBL0798.52001.
At the end of that section there are historical references.
Note that if $L$ is a ball of radius $r$, then there is no dependence on the "rotational part" of $g$, so one integrates over translations only, and the formula reduces to the Steiner formula for the volume of an $r$-neighborhood of $K$.
Comment: This wasn't the question, but this is true for sufficiently regular non convex sets as well, although finding the maximal class of subsets for which this holds is open and an active area of research


How does the curve ball drag air around it?

Question: In cricket or baseball there is a type of ball called the curve ball.

This is the top spin of the ball.I read that due to spin the ball drags the air around it due to friction in the way shown above.Can you please explain why??
Comment: More Phys.SE posts on Magnus effect: http://physics.stackexchange.com/search?q=magnus+effect
Comment: @soumyadeep: it certainly looks as if the results Qmechanic suggests address your question. Can you edit your question to indicate precisely what you think has not been answered by the existing questions.
Comment: @John Rennie can you pls just explain the word "aerodynamic drag"and how it works?i found it in one of the answers.
Comment: We don't have a curve ball in cricket. There's something called "flight", but it isn't quite the same thing. And "swing" certainly is something completely different.
Comment: @aufkag OK.but can you pls tell me what is 'aerodynamic drag'?
Comment: @soumyadeep Hmm, have a look [here](http://en.wikipedia.org/wiki/Drag_(physics)).
Comment: @aufkag pls explain how drag can change the flow of air around the ball or whether this occurs due to drag or not?
Answer: In this case, fluid molecules near the surface of the ball, to good approximation, are essentially dragged along with the local surface motion.  The reason the fluid is dragged along is that the ball surface on a molecular level is not perfectly smooth.  You can read about Brownian motion if you want to understand this more in detail.  Near the surface, in the boundary layer, the physics driving fluid motion is dominated by viscous forces.  The arrows that are drawn in your diagram are more appropriate for describing the fluid motion outside of the boundary layer, which is governed by pressure and momentum.
Comment: How is the fluid motion governed by pressure and momentum?
Comment: @soumyadeep: he just means that outside the BL, to a good enough approximation, frictional forces can be neglected.
Answer: Extending on the answer of SimpleLikeAnEgg;
Magnus effect(http:/en.m.wikipedia.org/wiki/Magnus_effect) would work for rotating body and like friction the viscous force (also a type of fricton) would cause the effect of curve ball dragging force.
What happens is that the part of the ball having velocity(tange bntial velocity due to rotation) in direction of motion of ball would then have a resulting velocity greater than that on the other side where there is velocity in opposite directions, due to this effect the air friction (viscous drag/air drag) would be different on the two parts of the ball, similarly due to action-reaction force the friction on nearby air would also be different. Since air is not fixed like ground, it moves under the influence of this friction and as a result we get magnus effect resulting in curve balls dragging air, and producing little alterations in vertical acceleration (due to lift related phenomenon)
Comment: Outstanding!I think i have got it .I am extending you answer a bit.Suppose my ball moves in the right.So friction on upward part is less as relative velocity of wind w.r.t to ball is towards left and it decreases the velocity of air on upward portion and similarly increases velocity in the downpart.Now by Bernoulli equation the pressure increases on upward portion and ball is forced to follow a curved path.Correct me if iam wrong.
Comment: The ball already has forward velocity, and the path of ball would be a little bit more complex then simply saying curved, it definitely would be curved but type of curve would depend on various factors such as speed, material of both ball and reynolds number of air at that particular instant etc.
Comment: OK,but the reason is correct isn't it?
Comment: Maybe at a particular instant, but when it would curve what would you say about its motion. I know that it would be hard to predict, we do computer simulations for such motions as they are too hard to mathematically interpret
Comment: Hmm,that's a point.and another thing is i cannot simply apply bernoulli equation as it is not laminar flow!The whole thing is becoming amazingly complex(and more interesting) now.
Comment: Welcome to the mystical realm of physics ! Also another reason you cannot apply bernoulli would be that it is valid for streamline flow, and good luck finding streamlines while playing football or cricket.
Comment: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/11237/discussion-between-soumyadeep-and-rijul-gupta)


Auto Bed-Leveling with Inductive Proximity Sensors and Magnets

Question: I recently decided to upgrade to auto bed-leveling using an inductive proximity sensor and an aluminum build plate on my Prusa i3. I also wanted to try to secure the build plate using neodymium magnets at 4 points, with the magnets being secured with bolts to the Y-carriage, and steel washers glued to the bottom of the aluminum build plate (since aluminum is not magnetic).
I would like to know if anybody has attempted this, and what the results were, as well as any issues incurred. My primary concern is a possible interference between the small magnetic field that is created by the magnet, and the sensor when probing the plate. I fear this question may sound a little open-ended, but I would just like to know if this could work. Please feel free to ask any follow up questions to details I may have missed. Thank you.
P.S. I would also like to note, in case there is any relevance, I do not plan on using a heated build plate, since I have a heated build chamber.
Comment: My main concern would be the strength of the glue when the heated bed is on.  When I use Elmer's glue on my abs models to hold them to the bed, it softens when the bed is heated.
Answer: Good question. The magnets from the build plate will almost certainly interfere with your inductive sensor, the movement from the carriage will induce a current in the inductor as it approaches the magnet and may cause it to trigger. If you're looking for a mag build, I'd suggest looking at: http://www.3dprintermods.com/prestashop/index.php?id_product=9&controller=product
I'm just about to get into auto-leveling myself, with this particular build there are a few ways to get around the issue. If you plot your auto level to occur as far from the magnets as possible (x,y location wise), then you might be ok. Otherwise you might consider investigating optical and touch probes.
Answer: You might use the magnets themselves or additional ones on top for the leveling process, as partly discussed in this thread:
http://forums.reprap.org/read.php?1,479795
A mechanical or piezo switch might also solve the issue for you with a lot less guesswork and trouble.


Expected value of two successive heads or tails (stuck on computation)

Question: Problem:
This is problem 33 of section 2.6 (conditioning) in Bertsekas, Tsitsiklis intro to probability text.
We are given that a coin has probability of heads equal to p and tails equal to q and it is tossed successively and independently until a head comes twice in a row or a tail comes twice in a row. What isthe expected value of the number of tosses?
Solution:
Let $X$ be a random value that tracks the number of tosses. In addition, let $H_k, T_k$ be the event that a head or tail comes up on the kth flip respectively. The solution I am looking at involves using total expectation theorem.
I outline the following steps in the solution.
We can partition the sample space into $H_1$ and $T_1$, allowing us to invoke the total expectation theorem. Hence,
$E[X] = pE[X|H_1] + qE[X|T_1]$
Again by total expectation theorem, we can utilize another partition to obtain
$E[X|H_1] = pE[X|H_1,H_2] + qE[X|H_1,T_2] = 2p + q(1 + E[X|T_1])$
$E[X|T_1] = qE[X|T_1,T_2] + pE[X|T_1,H_2] = 2q + p(1+E[X|H_1])$
Stuck:
The solution follows up by saying that we can combine the above two relations and use the fact that p+q = 1 to obtain
$E[X|T_1] = \frac{2+p^2}{1-pq} , E[X|H_1] = \frac{2+q^2}{1-pq}$
I have been staring at this for a while now, but I cannot seem to see the steps of the computation. I'd be very grateful if someone could fill in the details regarding the computation. Thank you.
Answer: We can also solve it using absorbing markov chain:
\begin{align*}
  A = \left(\begin{array}{cccccc}
 & \mathrm{I} & \mathrm{H} & \mathrm{T} & \mathrm{HH} & \mathrm{HT}\\
\mathrm{I} & 0 & p & q & 0 & 0 \\
\mathrm{H} & 0 & 0 & q & p & 0 \\
\mathrm{T} & 0 & p & 0 & 0 & q \\
\mathrm{HH} & 0 & 0 & 0 & 1 & 0 \\
\mathrm{HT} & 0 & 0 & 0 & 0 & 1
\end{array}\right)
\end{align*}
'I' is the initial state.
To get the expected number of steps to go to the absorbing state:
\begin{align*}
  Q &= \left(\begin{array}{rrr}
0 & p & q \\
0 & 0 & q \\
0 & p & 0
\end{array}\right)
\end{align*}
and compute $(I-Q)^{-1}$ where $I$ is the identity matrix,  and sum the first row, and hence:
\begin{align*}
  \mathbb{E}(X) &= \frac{(1+p)(1+q)}{1-p\, q}
\end{align*}
Answer: Let $x=E(X|H_1)$ and $y=E(X|T_1)$. Then we have the two equations
$$x=2p+q+qy\quad\text{ and}\quad y=2q+p+px.$$
Two linear equations in two unknowns.
Solve in any of the familiar ways, for example by substituting $2p+q+px$ for $y$ in the first equation.
Answer: An alternative solution to this problem that avoids using recursion and simultaneous equations is to split all possible terminating sequences into four blocks.
Block 1: Start Heads, ends 2 Heads
Block 2: Start Heads, ends 2 Tails
Block 3: Start Tails, ends 2 Tails
Block 4: Start Tails, end 2 Heads

pp
pqpp
pqpqpp

pqq
pqpqq
pqpqpqq

The other two blocks  are the same except it starts with q/tails so qq, qpqq ...
The expectation is the sum of the expectation of each block and so E[X] can the be given by the following sums
$$ E[X] = \sum_{x=1}^{\infty}2x\ p^{x+1}q^{x-1} + \sum_{x=1}^{\infty} (2x+1)p^{x}q^{x+1} +\sum_{x=1}^{\infty}2x\ q^{x+1}p^{x-1} + \sum_{x=1}^{\infty} (2x+1)q^{x}p^{x+1}
$$
The last two sums are basically the first two sums with p and q reversed. You can compute the infinity sums using the following two formulas.
$$\sum_{x=1}^\infty x^k=\frac{x}{x-1}$$
$$\sum_{x=1}^\infty k x^k=\frac{x}{(x-1)^2}$$
Honestly though I cheated and used mathematica to get the following formula. Given $p + q = 1$
$$E[X]=-1 + \frac{3}{1 + (-1 + p) p}$$


How to interpret the spectogram from spek

Question: I compressed the wave file to MP3 in two bitrates. How to interpret spectrogram results?
WAV:

MP3 320 kb/s:

MP3 128 kb/s:
Comment: What information are you looking to get? Maybe you can be more specific in the question.
Answer: The only information I could possibly garner from those three spectrograms is that it's a reasonable possibility that the WAV wasn't the original source file.
There's evidence it has already had a hard low-pass filter or cut-off applied at 15.5KHz.
I suppose the other thing you could guess from it is it's likely a modern hi-gain track, possibly a dance or pop track, potentially a victim of the loudness war. It shows remarkable lack of variation through most of its duration. You can almost see the ear fatigue;)
This is not really conclusive of anything, though. Spectrographs really don't tell you what things sound like & only show up glaring errors or anomolies, they have no real 'fine detail'.
People seem to rely on them too much, as if you could tell from one what process it had been through, or 'how good it should sound'. They really don't work like that.
You can sometimes see evidence of 'bit-filling' as shadowy echoes of lower freaquencies if someone made a poor attempt to claim they're high quality 96KHz, but there's nothing I can see along those lines.


Does user_is_logged_in() check if there is at least one user logged in?

Question: Does the user_is_logged_in() method return TRUE if there is at least one user logged in? Or does it refer to the current session, and returns TRUE if the current user is logged in?
Answer: By looking at the Drupal API, you can see the function itself:
<?php
function user_is_logged_in() {
  return (bool) $GLOBALS['user']->uid;
}
?>

Which shows that it returns TRUE if the current session is a logged-in user, or FALSE if the current session is an anonymous user.
Answer: It refers to the current session.
Answer: The function checks that the user who is viewing the page is not the anonymous user, not that between all the users currently viewing the site there is a logged-in user. So, four users seeing the site will get a different result, basing on the fact each of them is logged-in or not.
Comment: I am no sure that I understand exactly what you said: `It doesn't check if, apart the user currently viewing the page, there are other logged-in users.` So if I have 2 users logged in the same time on different machines, it doesn't check for each?
Comment: @Ek Kosmos No, it doesn't. If I am viewing a page, and I am logged in, then the function will return `TRUE`; if I am not logged in, then the function will return `FALSE`, even if there is another user that is logged in.
Answer: If you want to check which users or how many users are logged one option is to query the sessions table.


Which SQL Server/Windows logins require the sysadmin role?

Question: I'm setting up a new SQL Server instance. Which of these SQL Server/Windows logins should have the sysadmin role?

NT AUTHORITY\SYSTEM
NT SERVICE\SQLWriter
NT SERVICE\Winmgmt
NT SERVICE\MSSQLSERVER
NT SERVICE\SQLSERVERAGENT
Answer: I'm not sure about NT AUTHORITY\SYSTEM. But according to the SQL Server documentation the others are added to the sysadmin role by SQL Server Setup, so I'm guessing it is required.
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions?view=sql-server-2016#DE_Prov
Answer: The NT Service Accounts

NT SERVICE\SQLWriter
NT SERVICE\Winmgmt
NT SERVICE\MSSQLSERVER NT
NT SERVICE\SQLSERVERAGENT

What
In a Q and A similar to yours, an answer by by Rick Byham, Microsoft explains what these NT SERVICE accounts are

No, they can't be selected in the list of available built-in accounts,
  local accounts or domain accounts. This is because they are services,
  not accounts. They have a security identifier (SID) in Windows, but
  Windows knows they aren't real users. Windows can authenticate them,
  but they don't have passwords that any human can use. If you run
  lusrmgr.msc and look at the groups, you will see groups like
  SQLServerMSSQLUser$computername$MSSQLSERVER and NT SERVICE\MSSQLSERVER
  is a member of the group.

They are a method for authentication, but cannot be used by users as they are not real logins.

NT SERVICE\MSSQLSERVER and  NT SERVICE\SQLSERVERAGENT
Details on the authentication for  NT SERVICE\MSSQLSERVER & NT SERVICE\SQLSERVERAGENT

By removing the service SID logins or by removing them from the
  sysadmin server role, problems can result for various components of
  SQL Server that connect to SQL Server Database Engine. Some problems
  include the following:

SQL Server Agent cannot start or connect to a SQL Server service

SQL Server Setup programs encounters problems (link removed)

Do not remove these logins or take away the sysadmin privileges.

NT SERVICE\SQLWriter
This account authenticates the SQL Writer Service and

...must be running when the Volume Shadow Copy Service (VSS) application
  requests a backup or restore....

In the same post, on removing / disabling this login:

...Using the NT Service\SQLWriter login allows the SQL Writer process to
  run at a lower privilege level in an account designated as no login,
  which limits vulnerability. If the SQL Writer service is disabled,
  then any utility which in relies on VSS snapshots, such as System
  Center Data Protection Manager, as well as some other 3rd-party
  products, would be broken, or worse, at risk of taking backups of
  databases which were not consistent....

Source
In theory if you will never use VSS you could remove the login. In my opinion you should not remove it.

NT SERVICE\winmgmt
WMI must be able to connect  to the database engine, but could theoretically be restricted more.

Windows Management Instrumentation (WMI) must be able to connect to
  the Database Engine. To support this, the per-service SID of the
  Windows WMI provider (NT SERVICE\winmgmt) is provisioned in the
  Database Engine
  The SQL WMI provider requires the following permissions:

Membership in the db_ddladmin or db_owner fixed database roles in the
  msdb database.

CREATE DDL EVENT NOTIFICATION permission in the server.

CREATE TRACE EVENT NOTIFICATION permission in the Database Engine.

VIEW ANY DATABASE server-level permission.

SQL Server setup creates a SQL WMI namespace and grants read
  permission to the SQL Server Agent service-SID.

Source
You could restrict these permissions further by revoking sysadmin and granting above permissions.

The NT Authority account

NT AUTHORITY\SYSTEM

This AUTHORITY\SYSTEM is also an SID that relates to the LocalSystem.

...It (LocalSystem) has extensive privileges on the local computer, and acts as the
  computer on the network. Its token includes the NT AUTHORITY\SYSTEM
  and BUILTIN\Administrators SIDs; these accounts have access to most
  system objects...

Source
On an older post by microsoft on this SID.

The NT AUTHORITY\SYSTEM account is also granted a SQL Server login.
  The NT AUTHORITY\SYSTEM account is provisioned in the SYSADMIN fixed
  server role. Do not delete this account or remove it from the SYSADMIN
  fixed server role. The NTAUTHORITY\SYSTEM account is used by Microsoft
  Update and by Microsoft SMS to apply service packs and hotfixes to a
  SQL Server 2005 installation. The NTAUTHORITY\SYSTEM account is also
  used by the SQL Writer Service.

Telling you not to remove this NT AUTHORITY\SYSTEM 'account'


How to create subtitle files and add them to a video?

Question: How can I generate a .srt or .sub file and add it to a video?
Comment: Are you planning to type the subtitles yourselve or rip them from a DVD?
Answer: To make subtitles I recommend Subtitle Workshop. You can try the version 4 beta although I don't miss anything in version 2.51.
I have also heard good things about Aegisub.
Answer: Search for a program called Subrip.  It's a bit old, but still works.


I'm looking for a real small but decent Arduino, that can fit in a watch but power a servo and a gyroscope

Question: I've been scouring the internet looking for a small Arduino that can power two sensors and a servo. Is there a way of getting a custom one? Does anyone know if theres software out there for creating custom Arduinos and having them made?
Answer: Look at the ATtiny85 MCU. It's a small 8pin device, and pretty easy to get up and running using Arduino code. You could also use the ATtiny84 which has more pins and still very small.
Start here: https://code.google.com/p/arduino-tiny/
Also, there are plenty of tutorials on setting up and programming them.
Regarding a custom board, your least expensive route would be to design your own. Otherwise you would need to outsource the design.
Answer: No, there is no software specifically for designing custom Arduinos.  However, the Arduino is open source, so you can design your own if you have the skills.
You can download the schematics for your chosen base design from the Arduino website, then use any PCB design software you like to design your own PCB.
You can then send that PCB design off to China (for example) to have it fabricated, and when you get them back you can solder the components on and hope it works.
Of course, designing and building very small circuits well is a talent that few possess. Hand building circuits with the very tiny components you will need to make it fit into a watch is very difficult and normally requires specialist equipment.  That is unless you want your watch to be the size of a dinner plate, like most of the watch kits you can buy.
Comment: If you do not want to send the design to china and live in the US https://oshpark.com/  has some great rates and are hobbyist friendly.
Answer: You might look into building a circuit, on a breadboard, from basic components. Think Atmel, AtMega instead of Arduino. Depending on your experience and willingness to read datasheets, this might be easier than you imagine. After you have a large-scale working prototype, find miniature surface-mount versions of all of the components. Designing an actual circuit board to connect these things might be the real trick, but if you can get it done then you can have the board made. I believe, am uncertain about this, that there are software tools available that help turn schematics into circuit board designs. This part might be expensive. Getting to the point of having a large-scale working prototype, on the other hand, would be inexpensive and fun. Once you have a board designed you'll have to get it made. Testing this prototype might be difficult and perhaps expensive as well. (Engineers are paid well because they tend to know before construction if a design will work.) If you come up with something that works then selling the extras might pay for having it made.


Why do people think they need anything other than the KJV Bible?

Question: I cannot understand why people think they need another version of the Bible besides the King James Version.
Comment: Most human beings do not espouse minimalism; otherwise, we'd still be living in caves, wondering why we'd need anything more than that to protect us from rain.
Answer: All languages change over time, all aspects of it are subject to change from basic orthography to fundamental meanings of words.
It is highly unlikely that even you are actually using the KJV as published in 1611. Given the spelling and choice of words used in your question, you don't speak King James era English, you speak something quite a bit more modern. In all likelihood you are using a 19th century update known as the Cambridge Edition that revised much of the spelling and punctuation.
However that edition is still fundamentally based on many of the translations choices of the 16th century. While many of the words used were good choices based on the usage of their era, the English language has changed and properly representing it to speakers of modern English requires a translation in their language. Many/most of the other translations in common usage were made to address this.
There are of course other reasons that come in to play. Some translations are made because the ones people would otherwise use are under a copyright that restricts their use. Others are made with differing theological or cultural agendas that they think would better represent the Bible.
At the end of the day the answer is usually the same for any language and translation. Why use the KJV, why not use Geneva Bible? With the Geneva Bible and the Tyndale NT around why did anybody even feel the need to start the KJV project in the first place? For that matter why not use the Vulgate? Why not just teach everybody Hebrew and Greek and read it in the original?
The reason we have translations at all is to make the Bible understandable.
Answer: There are many reasons, but here are two:
Most Christians don't speak English.  This is obvious, but there are millions of Christians around the world who can't understand even basic English.  Asking them to use the King James Version is folly, which is why there are Bible translations in every major language and why Bible translators work tirelessly to translate the Bible into minority languages.
Most English-speaking Christians don't understand KJV English.  It is well documented that very few English speakers correctly interpret the KJV, even those who think they know what they are doing.  This goes far beyond "thou" and "thee" – there are numerous words whose meaning has changed significantly, but which look familiar to us.
Mark Ward, author of Authorized: The Use and Misuse of the King James Bible, gives dozens of examples of these "false friends" in his book.  One example is 1 Thessalonians 5:22:

Abstain from all appearance of evil. (KJV)

We think we know what "appearance" means, but actually, to the KJV translators, the primary meaning of the word was "instance," not "outward aspect."  This is why modern translations generally translate the verse along the lines of "Abstain from every form of evil" (ESV).
There's a lot more that could be said, but this gets to the heart of the issue. As William Tyndale said, one of the purposes of Bible translation is so that even the most uneducated – even the "boy who drives the plow" – can understand what he reads.
Comment: Oh, that appearance example is great. My go to example of change is conversation meaning behaviour, but I like this one a lot too.
Answer: Many people use the KJV in order to read a translation of the Textus Receptus, the Received Text, rather than the Westcott & Hort/Nestle-Aland Greek Text which gives great preponderance to the Codex Sinaiticus and the Codex Vaticanus.
Most, today, will be using the 1769 translation of the KJV rather than the 1611, whose English is very archaic.
Good as the KJV is there are some translation issues which need to be addressed, such as the use of the word 'atonement' in Romans 5:11 for καταλλαγην , katallasen, which ought to be rendered as 'reconciliation' or 'restoration'.
Similarly in Romans 5:18 δι ενος δικαιωματος has been translated 'by the righteousness of one' which is a false translation and it should read 'by one righteousness'.
Other necessary corrections could be listed, particularly the habit of the KJV translators adding the word 'man' when there is no anthropos or aner in the text.
There is a 2016 update but I cannot comment as I do not use it. Personally, I await the publication of what is currently being called a 'More Accurate Translation'.
But if one wants absolute accuracy, one has to go to the original language.
It is the Greek that is inspired, not the English.
Textus Receptus Bibles
Answer: The KJV that we have today is not the original KJV Bible as it would be hard to understand., example John Ch 17:-
Viewing the original 1611 KJV with archaic English spelling.  Go to https://www.kingjamesbibleonline.org/1611_John-Chapter-17/

John Ch. 17:1 These words spake Iesus, and lift vp his eyes to heauen, and said, Father, the houre is come, glorifie thy Sonne, that thy Sonne also may glorifie thee.
  2 As thou hast giuen him power ouer all flesh, that he should giue eternall life to as many as thou hast giuen him.
  3 And this is life eternall, that they might know thee the onely true God, and Iesus Christ whom thou hast sent.
  4 I haue glorified thee on the earth: I haue finished the worke which thou gauest me to doe.
  5 And now O Father, glorifie thou me, with thine owne selfe, with the glory which I had with thee before the world was.
  6 I haue manifested thy Name vnto the men which thou gauest me out of the world: thine they were; and thou gauest them me; and they haue kept thy word.

So as language changes so does The Bible text so people can read it.
The KJV is only a translation and not as good as newer ones because our understanding of Hebrew, Aramaic, and Greek has improved over 400 year plus when the KJv was produced, thus most (not all) reflect a better understood text which is also more accurate then the KJV was produced in 1611!
Answer: The answer to this question is in the wording of the question itself - it should have worded something like:
I canst not apprehend the thoughts of man beseeching why needest thou more translation of holy writ.  What thinkest thou?
That is, even the questioner does not use Tudor English with its obsolete word declensions and verb forms.  Many of the words now mean something different from what they were originally intended as well.
The other major reason concerns the change of text which the KJV used - it contains numerous additions not in the Greek that were added from the Clementine Vulgate.
Finally, the KJV of 1611 that some so prize is NOT the original KJV but its 5th revision from 1769. We should continue to revise as the need presents itself.
Answer: Being the "Authorised" bible it can lend itself to being thought of as The Bible. However it was only Authorised for the Anglican Church by the King of England: James I
So from a Catholic (and Orthodox) perspective, it hasn't been approved for us or by us.
Again from a Catholic perspective, it's not a complete bible; Catholic bibles are traditionally based on the Septuagint rather than the Masoretic (although we do use it as a textual source).
The Septuagint contains more books that are considered to be part of canon, called Deuterocanon or Apocrypha by other Christians so our OT would have 46 books and the KJV would 39 if my maths is correct.
Comment: It is not just other Christians, ie non Roman Catholics, who do not consider the Deuterocanon (the Apocrypha) to be part ot the canon: the Jews also reject these books.
Comment: There were different groups of Jews: Pharisees, Essenes, Samaritans and the Greek speaking Jews who used the Septuagint. They considered it scripture and it's from them that the early church chose to use the Septuagint.


Is there any problem performing Sajda Sahw without committing any mistakes?

Question: Let's say I am confused with something in my prayer. So if I perform Sajda Sahw, is it okay?
or even if I am sure that no mistakes I've made, can I still perform Sajda Sahw?
Comment: Sujud Sahw is related to uncertainty if you are certain about having done things right it doesn't make sense to perform it.
Answer: If you have doubt about whether you made a mistake, follow the feeling that is stronger. If you feel it is more likely that you made a mistake, perform sajdah sawh. Otherwise, skip it. This is for the csee where doubt arises during salah.
If you follow a doubt you are unsure about repeatedly, I have heard tat this is potentially following the waswas of Shaitan. So one should avoid it unless you are more sure. My personal thought is that this is to make you actually focus during salah, rather than just assuming you can make mistakes every time and that sadjah sawh will make up for them. That's a poor way of performing salah.
There's more here: https://islamqa.info/amp/en/answers/211
Allah knows best. May He guide us all.


My given name is used as First Name and Last Name on my flight ticket: Any issues?

Question: Since my passport only includes a given name 'John Smith' without a surname, and my flight ticket is booked with 'John' as the first name and 'Smith' as the last name, could this cause any issues for my round trip from Vancouver to Delhi with stops?
I am traveling with other family members.
Comment: Can you please clarify? Your passport says "John Smith" as *given name*, and *surname* is left blank, or does not exist? Does that mean your surname *is* "Smith" and it's a mistake in the passport? ("Smith" is a typical surname, if you meant to say that you do not have a surname, then another example would be less confusing, like "John James".) And the flight ticket says "first name John, surname Smith"?
Answer: In my personal experience, the worst thing that happens when names get mangled between ticket and travel ID is that using automated systems such as check-in kiosks or baggage drop-off does not work and you have to talk to a human being or use a non-automated queue. Everywhere where there's automated kiosks or gates with scanners, there will still always be at least one human being.
If it is obvious to a human being that the two names match, I have never encountered any problem.
I had one flight where my name was mangled to JRGMITTAG as a first name with an empty surname, all in one word with the umlaut stripped. As a result, the automated check-in kiosk rejected me and sent me to the check-in counter. It took the agent at the check-in counter all but 3 seconds to recognize that the mangled name and my real name match and check me in.
Similarly, during boarding, it may take a couple of seconds longer for the boarding agent to verify that your face, ID, and boarding pass match. The worst that happens here is that you hold up the queue for a bit. If you want to be really polite towards your fellow passengers, you can go to the service desk at the gate before boarding starts and explain your situation.
Since it is likely that you will always take the longest time, it makes sense to keep your family together and for you to always go first, to avoid you getting separated.
Comment: "The worst that happens here is that you hold up the queue for a bit. If you want to be really polite towards your fellow passengers" I mean they'll likely just wait for another minute to go stand in line on the jetbridge instead haha.
Answer: My wife uses her middle name and given name and I've had my surname missing before and neither of us have any issues. It is likely that what you are seeing is just the system mangling it because these companies have 40 year old system components that have length restrictions OR the documents themselves have length restrictions. As long as you booked it with the right names, you'll be fine.


I can Euler-sum $\sqrt{\ln(1)}-\sqrt{\ln(2)}+\sqrt{\ln(3)}-\cdots$. But how can I do $\sqrt{\ln(1)}+\sqrt{\ln(2)}+\sqrt{\ln(3)}+\cdots$?

Question: This is also related to an older thread in MSE ("what is the half derivative of zeta at zero?") .
One of the possible steps in the problem of that thread was to evaluate the series
$$s_a=\eta^{(0.5)}(0) = î \small{\left(\sqrt{\ln(1)}-\sqrt{\ln(2)}+\sqrt{\ln(3)}-\sqrt{\ln(4)} \cdots \right) \underset{\mathfrak E}{\approx}} - 0.347006596200 \, î $$ as the (regularized by Euler-summation $\mathfrak E$) value for the half-derivative of the alternating zeta (or "Dirichlet's eta"). Note, that the additional imaginary factor $î$ is due to the fact, that we had originally negative values under the square-root terms. In the following I'll leave this factor out for convenience.
Q: But how can I do the nonalternating series $$ s_p=\zeta^{(0.5)}(0)= î \small{ \left( \sqrt{\ln(1)}+\sqrt{\ln(2)}+\sqrt{\ln(3)}+\sqrt{\ln(4)}+ \cdots \right)} \underset{\mathfrak ???}{\approx} ??? $$
$\qquad \qquad$ I don't see so far any possibility for instance in the sense of L. Euler's famous $\eta() \to \zeta() $ - conversion.

[update]: what I've additionally just done was to apply a procedure to find the/a formal power series for the problem of finite sums of consecutive terms.
The procedure is that of the approximation of the Neumann-series of the Carleman-matrix for the function $f(x) = \sqrt{\ln(\exp(x^2)+1)}$ which is the iterative transfer function which produces the term of the series for index $n+1$ from the term at index $n$.
I'll explain this now in more detail:
For the procedure which is also known with the name "indefinite summation" we need first a function, which generates the terms of the series to be summed as iterates of itself. What function can transfer $\sqrt{\ln(x)}$ to $\sqrt{\ln(x+1)}$? This is $f(x)$ as given above, because for instance it gives for $z= \sqrt{\ln(5)}$ the result $f( z) = \sqrt{\ln(6)}$ and $f°^2( z) = \sqrt{\ln(7)}$ and so on.
So we can formally write the series $$ s_p  =î \cdot ( z + f(z) + f°^2(z) + f°^3(z) + ... ) \qquad \qquad \text{ with } z=\sqrt{\ln(1)}=0 $$
An approach which I've exercised a couple of times is to implement $f()$ by a Carlemanmatrix based on $f()$'s formal powerseries. That powerseries is
$$ \mathcal {\text{Taylor}} (f(x)) \approx \small  0.83255461 + 0.30028060 x^2 + 0.020918484 x^4 - 0.0075447481 x^6  + ... $$
Let now $ C = \text{carleman}(f) $ be the Carlemanmatrix for $f(x)$ then the dotproduct of a vector $V(x)=[1,x,x^2,x^3,x^4,...]$ with $C$ gives $V(x) \cdot C= V(f(x))$ by definition, and if we look at the second column of $C$ only we have $V(x) \cdot C_{0..\infty,1} = f(x)$ at least as formal powerseries, and if it is convergent for small $x$ we can also evaluate numerically.
Now the idea of the Neumann-series comes into play. As $V(x) \cdot C_{0..\infty,1} = f(x)$ we should formally also have $V(x) \cdot C^2_{0..\infty,1} = f°^2(x)$,  $V(x) \cdot C^3_{0..\infty,1} = f°^3(x)$ and so on, such that we make the ansatz:
$$ V(z) \cdot ( C^0 + C^1 + C^2 + C^3 + ... )_{0..\infty,1} \overset?= z + f°(z) + f°^2(z) + f°^3(z) + ... $$
and the key-observation is here, that we have in the parenthese of the lhs the geometric series of the matrix $C$ (such a construct is also called "Neumann-series"). We can surely expect, that this is no proper sum, but with some examples of alternating geometric series instead I could get meaningful approximations when using empirical approximations to $B = (I+C)^{-1}$ and then approximate for instance $V(z) \underset{\mathfrak E}\cdot B_{0..\infty,1} \approx z - f(z) + f°^2(z) - ... + ...$ where $\mathfrak E$ means Eulersummation in the dotproduct if needed.
This is not so simple and straightforward for the non-alternating geometric series. As the Carlemanmatrix of any function has the eigenvalue $1$ (at least once) by construction we would run into $\frac 10$ and cannot immediately try the approximation with finitely truncated matrices $A = ( I - C)^{-1}$. One of the workarounds, which gives sometimes meaningful results is, to omit the first column of $(I - C)$ which gives then some result, but where the first row is then systematically missing/unknown.
Remark: a case where this workaround is successful is the problem of the sum-of-like-powers where the Carlemanmatrix is the upper-triangular Pascalmatrix $P$ . The removal of the empty first column in $ Q = (I - P)_{0..(n-1),1..n} $ allows inversion and provides the matrix $Q^{-1}$ of coefficients, with which Faulhaber had solved the summing-of-like-powers-problem. The same ansatz was also tried as far as I know by two authors for solving the extension of tetration to real iteration heights. I've similarly attempted some other series-problems with such "iteration-series" of iterated functions $f°^h(x)$ and their according Neumann-series with meaningful approximations
So I've now tested $_n Q = (I - C)_{0..n-1,1..n}$ with increasing $n$ and computed $\,_nA^* = \,_n Q^{-1} $ and made $\,_nA$ by inserting the unknown first row in $\,_nA^*$
The top-left of the heuristically approximated matrix $\,_nA$ is $$\small \,_nA_{0..16,0..1}=\begin{bmatrix}
 ?? & ?? \\
 0 & 1 \\
 -1 & -0.662055270527 \\
 0 & 0 \\
 -\frac1{2!} & -0.561866397242 \\
 0 & 0 \\
 -\frac1{3!} & -0.249581408503 \\
 0 & 0 \\
 -\frac1{4!} & -0.0755503260124 \\
 0 & 0 \\
 -\frac1{5!} & -0.0172091887343 \\
 0 & 0 \\
 -\frac1{6!} & -0.00315760368955 \\
 0 & 0 \\
 -\frac1{7!} & -0.000499047959470 \\
 0 & 0 \\
 -\frac1{8!} & -0.0000687607442729 \\
  ... & ...
 \end{bmatrix} $$
Using the coefficients of the first column for a power series in $x$ building the function $a_0(x)$ we get
$$ a_0( \sqrt{\ln(n_1)})-a_0( \sqrt{\ln(n_2)}) = n_2 - n_1 $$
which indicates the sum of the $(f°^k(n_1))^0$ - and which is just counting the terms.
Using the coefficients $a_{k,1}$ of the second column for a power series in $x$ building the function $a_1(x)$ we get the finite sum of the function at consecutive arguments:
$$ a_1( \sqrt{\ln(n_1)})-a_1( \sqrt{\ln(n_2)}) = \sum_{k=1}^\infty  (\sqrt{\ln(n_1)}^k - \sqrt{\ln(n_2)}^k )a_{k,1}  = \sum_{k=n_1}^{n_2-1} \sqrt{\ln (k)}  $$
which indicates the sum of the $f°^k(n_1)$ which is the desired finite sums $s_p$ for  the required terms to a very good (and seemingly arbitrary) numerical approximation.
------ End of lengthy explanation

Q: However - I'm missing the first coefficient for the second power series $a_1(x)$ . That should just contain the representative value for the infinite sum of $\sqrt{\ln(k)} $ with $k=1 ... \infty$
Comment: Very interesting sum, but I can only half understand what is going on.
Comment: What do you need? What a "half-derivative" is?
Comment: No, I understand what fractional derivatives are, but familiar with anything starting from the **UPDATE** section, which is half the post.
Comment: I see... Well, this is a method which needs some more background I'm afraid. The idea is, to derive a solution by converting the problem of a powerseries into one containing iterates of a function, which I've applied several times to similar problems. A related link is http://go.helms-net.de/math/divers/BernoulliForLogSums.pdf where I try to explain what I'm also doing here. Perhaps a more basic introduction is this which deals with the sums-of-like-powers-problem with this method: http://go.helms-net.de/math/binomial_new/04_3_SummingOfLikePowers.pdf , the $\eta()$-function.
Comment: @simpleArt : This is not a complete "private" method, one can find application of this under the term "indefinite summation" and there are question&answers here in MSE as well as in MO which cover this subject. Unfortunately I've no good idea at the moment for a good historical text, maybe the Euler-Maclaurin-formula is a usable example, but I've nothing at the top of my head in the moment...
Comment: Have you tried to apply a [Ramanujan summation](https://en.wikipedia.org/wiki/Ramanujan_summation)?
Comment: @SimpleArt: actually no time due to courses. Let's see next week.
Comment: :-P ok. :D can't wait to take the classes your probably taking.  At least the math ones.
Comment: @SimpleArt: :-)  (It's introductory empirical statistics for social workers which I have to give; I could math only make a hobby... )
Answer: One form of the Ramanujan summation is done as follows:
$$\sum_{n\ge1}^\Re f(n)=\lim_{N\to\infty}\sum_{n=1}^Nf(n)-\int_1^Nf(t)\ dt$$
For our case,
$$\sum_{n\ge1}^\Re\sqrt{\ln(n)}=\lim_{N\to\infty}\sum_{n=1}^N\sqrt{\ln(n)}-\int_1^N\sqrt{\ln(t)}\ dt\approx1.6$$
Comment: Thank you for the input. I'll look at it next week. *( Hmm, doing this in Pari/GP gives a likely result $\gt 1.6$ by `N=1000000;sum(k=1,N,sqrt(log(k)))-intnum(x=1,N,sqrt(log(x)))` (with 200 digits internal precision) giving `= 1.65764...`  and from $N=10^2$ to $N=10^6$ giving around 0.2 more for each step in the exponent with slowly decreasing tendency)*
Comment: @GottfriedHelms with my low tech, I could only manage like $n=60$k or so...
Comment: I think it grows around the rate of about $\sqrt{\ln(n)}$, so I might fix this to the constant term in the Euler-Maclaurin expansion.
Comment: Sorry, forgot completely this question/your answer after the courses... I'll look at your answer again from tomorrow (It's night already here, my pillow is waiting...)
Comment: XD Same, forgetting *and* looking at my bed.  :D
Comment: Also totally random, but you might like [this PDF](https://files.acrobat.com/a/preview/5bf619d1-8c79-4010-9d87-1c9d34fa50b6) I just finished making.
Comment: Hmm, after many experiments with this I still don't see any path to more conclusive results than in my first comment ...
Comment: :-( That sucks.  Well, I hope we get results eventually.
Comment: Late comment: I tried your sum/integral-formula again, and only with changing the upper limit of the integral to $N+1/2$ instead of $N$ I seem to get convergence; tried it in steps of $2^j$ : `N=100*2^10;` `su=sum(k=1,N,sqrt(log(k)))-intnum(t=1,N+1/2,sqrt(log(t)))` $\to$  `su = -0.200824720791` with seemingly convergence when the exponent at `100*2^j` is increased... But I don't have any idea what to make with this...
Comment: Another late comment: yesterday I looked again at your linked pdf. I got the impression you might like this article on mine about summation of ***really*** diverging series, the short form in http://go.helms-net.de/math/tetdocs/10_4_Powertower_article.pdf and a more explanative form in http://go.helms-net.de/math/tetdocs/10_4_Powertower.pdf (A bit more of this on my tetration-pages http://go.helms-net.de/math/tetdocs) The articles are very early discussions of mine where I often lacked even correct naming of things, but you might like the explorative style. Perhaps I'll improve some day...
Comment: Thanks for the interesting reads, will check them out.
Comment: Looking back on it, it's probably because the summation and integral line up best if we use $f(n)\approx\int_{n-1/2}^{n+1/2}f(x)~\mathrm dx$, which explains the convergence.
Answer: there is no problem with this series it has a pole at z=1


Subtly inconsistent axioms

Question: It is not known whether widely used axiomatic systems such as ZFC are consistent and Godel has shown that it is not possible to prove that they are, at least within the system. In an inconsistent system it is possible to prove anything, so essentially it is useless. If ZFC is inconsistent, then it is very well hidden. Are there any known examples of inconsistent systems that behave consistently "at first," in the sense that the shortest path to proving both a statement and its negation is very complicated?
Comment: ZFC might not have been proved consistent with regards to some simpler theory; but Peano Arithmetic [has](http://en.wikipedia.org/wiki/Gentzen%27s_consistency_proof), by reduction of it to Primitive Recursive Arithmetic (PRA) by Gentzen
Comment: And there is such a thing as[ inconsistent mathematics](http://www.iep.utm.edu/math-inc/); this is where the principle of explosion is controlled in the underlying logic; for example the article shows that the both the Russell & Universal Set are possible here.
Answer: Consider the system (ZFC + ~PC) (that is, ZFC with one additional axiom, namely the negation of the Poincare Conjecture).   Any proof of the inconsistency of this system is also a proof that ZFC implies the Poincare conjecture (and vice versa).  Because we only recently learned that ZFC implies the Poincare Conjecture, we only recently learned that (ZFC + ~PC) is inconsistent.  And the shortest known proof of that inconsistency (i.e. the shortest known proof of the Poincare Conjecture) is very long and complicated.
Comment: This of course can be generalized quite a bit.
Answer: There are a lot of systems which have the property that you can prove they must be inconsistent, but actually finding the inconsistency is arbitrarily expensive.
I think you may find some such systems in cryptography.  An arbitrary example would be any system containing

A given number A (say, 246,590,906,444,061,810,100,793,941)
A predicate "IsSimpleComposite(X)" which returns true if a number is only divisible by 1, itself, and two other numbers  (minor technicality: allow both of these numbers to be the same to handle cases is IsSimpleComposite(4), which should be true because 4 = 2 * 2 ).
IsSimpleComposite(A) is true

It would take a remarkably long time to discover that A is 613651369 * 633910099 * 633910111.
As a nastier case:

Given a number B (say  2425967623052370772757633156976982469681)
The same IsSimpleComposite(X)
IsSimpleComposite(X) is true

You would have to prove that B is prime before the inconsistency appears (It happens to be prime!)
I give that example as a finite case, because finite cases are easier to follow.  There are systems where the inconsistency appears as you start dealing with infinity.  They are even nastier, but much harder to follow.

Subtly inconsistent axioms


Sin without knowing

Question:
So it is said if you say "I swear on this on that", "I swear on moms life and that", we have committed shirk but I didn't knew about this before I only just found it out. I want to know will this count because I have done it before without knowing that it's shirk and that will it be counted.
Answer: Allah is the most merciful and the most knowing, it is okay to commit shirk before knowing it was a shirk. My advice is that you shouldn't repeat the mistake and insyaAllah you will be forgiven.
Answer: Specially if you broke a promise you should obey this ayat.

Allah will not impose blame upon you for what is meaningless in your
  oaths, but He will impose blame upon you for [breaking] what you
  intended of oaths. So its expiation is the feeding of ten needy people
  from the average of that which you feed your [own] families or
  clothing them or the freeing of a slave. But whoever cannot find [or
  afford it] - then a fast of three days [is required]. That is the
  expiation for oaths when you have sworn. But guard your oaths. Thus
  does Allah make clear to you His verses that you may be grateful.
  5:89

The intention that you have in your hearth when you do that surely matters according to the follow ayat. (Specially Allah, and you, know better than us the severity of the potentially commited shirk)

Allah will not call you to account for thoughtlessness in your oaths,
  but for the intention in your hearts; and He is Oft-forgiving, Most
  Forbearing.
  2:225

Fear Allah, follow His teachings, and I hope He will forgive you.

Sin without knowing


Hindered carbon atom

Question: In the hydration reaction that is addition of H2O , in the presence of (H.B.O/T.H.F/H2O2), where no rearrangement takes place,
Why does H is placed on more hindered C atom and OH on less hindered C atom ?
Comment: And what chemical exactly is "HBO"?
Comment: H is smaller and less cumbersome than OH.
Answer: The reaction Hydroboration-Oxidation follows anti-Markovnikov rule because of 2 factors:
1)Electronic consideration: When the borane ($\ce{BH_3}$) approaches the $\pi$ bond of the alkene, the attack of the $\pi$ bond to the empty p orbital of the boron triggers a hyride shift (the mechanism of this is similar to that of pericyclic reactions). There is a partial positive charge developed on the vinylic position of the alkene that triggers the hydride shift.

Steric considerations: In the first step of the mechanism of hydroboration, we add $\ce{BH_2}$ and $\ce{H}$ simultaneously. As the $\ce{BH_2}$ is bigger in size than $\ce{H}$, the transition state of this step would be less in energy and also less crowded if the $\ce{BH_2}$ is positioned at the less steric position.

Both factors suggest that the mechanism must follow anti-markovnikov addition.
After the attach of $\ce{BH_2}$, the further mechanism will replace the $\ce{BH_2}$ with $\ce{OH}$. Here I showed why the $\ce{H}$ attaches to the more crowded site and follows anti-Markovnikov addition.
For the further part of the mechanism, you can view the page 414 of the David Klein 2012 edition.
All the reference pictures are taken from the David Klein Organic Chemistry 2012 edition book.

Hindered carbon atom


RESTful iPhone client and Model hierarchy

Question: I'm curious what strategy most of you are employing in order to build solid RESTful iPhone clients in respect to model hierarchies. What I mean by model hierarchies is that I have a REST server in which several resources have a correlation to each other. For instance, let's say for hypothetical purposes I have a REST server which spits out information about a school. If I want to grab all the students in a particular class, I first need to query the REST server for information on the school, then I need to query the server for information on all of the classes the school has to offer, followed by a subsequent request for all students in a particular class. At the end of the day, the client is bringing in 3 unique XML trees. At that point, do most of you folks write your own algorithms in order to build the final tree which will end up being your data source? Do you not aggregate XML trees in this respect and instead use a different approach?
How do you prefer taking a myriad of related resources on the server and getting them into one tree that just makes sense onto the client?
Thanks for the insight.
Answer: How you choose to store manage your model data on the iPhone probably depends on how much the XML data you are dealing with is likely to vary, and how bloated it might get.
If this is a simple XML model that is unlikely to change, and doesn't carry terribly much redundant information with it, you might do well to just use the XML trees you describe as-is.
But for anything even slightly more complex, I prefer to translate XML representations into a format that is most easily manipulated by my Objective-C code. Consider for example the possibility that your application expands one day to support other web-based services that provide similar data, but as JSON or SOAP formatted data.  Now you start to run into the headaches of maintaining 3 different types of models in your application, when it would be preferable to maintain just one.
I would treat the XML-based REST resources as "foreign data" that need to be massaged into a locally manipulatable format.  If you adopt a local format that maximizes the ease of performing your app-specific operations, then you can adapt inputs from any other foreign format, and convert back to foreign formats as needed for uploads/edits/whatever.
Daniel
Answer: There is a project called IPhone on Rails, where they created an Objective-C implementation of ActiveResource. I have not yet had a chance to play with it, but it may be worth checking out.
Answer: I'm currently working on a project to solve this problem, we will be releasing the code when we get it to a stable point.
It's a very tricky problem if you don't have a standardized system for serializing all your objects coming back from the server. Luckily, on this project we do have a common serialization mechanism, so we built an abstract SAX parser which we inherit from and then use type introspection and NSCoding to bridge the gap between Objective-C and XML.  You can do a similar concept on your own.
Before this project, I just built/reused a couple of classes to handle the NSURLConnection and NSXMLParser work but instead of type introspection, I used the Delegation Pattern.
Answer: In my own case, I have been using wrappers around ASIHTTPRequest to build RESTful queries. I have been handling the results with libxml2, parsed directly into model objects rendered into the user interface.
I'm not sure I have a catchall solution for you, but I think you will gain a lot from separating as functionality into different, reusable methods. This way, you won't have to worry as much about the number of XML trees coming back. You just issue queries to whatever you have, so as to populate your interface.


magento random 404 errors

Question: From time to time magento randomly returns 404 error on existing pages, If I refresh the page - it works.
Is there any way to debug the issue? I suspect that the problem is caused by some extension, but does not know how to determine which one, because the error is not consistent and can occur only several times a day.
Answer: Start by disabling the extensions you consider can be causing the issue, you can do this by going to app/etc/modules, in this folder you will find xml files for each module, there just change
<active>true</active>

to
<active>false</active>

Then flush magento cache and check.
Once you identify the extension you can use xdebug to track the problem.
What is exactly giving you 404, cms pages, category pages, product detail page, etc?

magento random 404 errors


Are there any rules for choosing batch size?

Question: I am training a CNN with a batch size of 128, but I have some fluctuations in the validation loss, which are greater than one. I want to increase my batch size to 150 or 200, but, in the code examples I have come across, the batch size is always something like 32, 64, 128, or 256. Is it a rule? Can I use other values for it?
Comment: related: https://stats.stackexchange.com/questions/153531/what-is-batch-size-in-neural-network
Answer: Data that has a size of a factor of $2$ (aka $2^n$ for some integer $n$) allows for easier memory management because data can be organized contiguously (without gaps). This allows for faster memory reading and thus faster iteration time in general. From a computational point of view, this is important as it can be taken advantage of by the compiler and speed up iteration loops. This is why batch sizes are chosen as such in practice. However, this does not necessarily imply better training results.
In regards to your question of "Can I use other values for batch size?":
Yes, you can use different values, and, for the most part, you probably won't see the difference in computational performance because of the speed of modern training APIs. So, until training a large model with a lot of compute where this optimization has a larger impact, feel free to experiment :)


determine the convergence of this infinity serie

Question: determine the convergence of
$$ \sum^{\infty}_{n=1}n^{\frac{p^2 -2}{p^2 +2p -3}}$$
how do I prove this?
Comment: Do you know when $\sum_{n=1}^\infty n^c$ converges?
Answer: To avoid confusion, I will call your $p$ in my answer $r$.

The series $\sum_{n=1}^{\infty}n^{-p}$ is called $p$-series and known to be convergent iff $p>1$. Thus, your series is convergent if and only if $-\frac{r^2-2}{r^2+2r-3}>1$, which holds for all $r \in (-3,\frac{-1-\sqrt{11}}{2}) \cup (1,\frac{-1+\sqrt{11}}{2})$.

Further research
If you are interested in $p$-series, you should also take a look at the Riemann zeta function, which is the extension to complex $s$ instead of $p$.

EDIT: Does that answer your question?


After a backslash did its work

Question: A rather puny question:
What is "good practice" to end a backslashed command?
At the moment, I simply insert a {} if the following char
(can you tell me which ones qualify?) does not automatically end the
backslashed command, e.g. $\rho+\Delta{}A$. In this case, the
closing bracket could go after the A but I quickly found
that when expressions get complicated (e.g. A has an index 1
too) things go unmatched very fast :-)
Comment: In math mode never use `{}` this way (it will ruin the spacing in general) just use a space.
Answer: Never use braces just to terminate a command in math mode, they form an empty node, rather like \mbox{} and so affect the space. In your example just use
$\rho+\Delta A$

An example with a clear spacing difference would be

\documentclass{article}

\begin{document}

$\rho \leq{} + 2 A$

$\rho \leq + 2 A$
\end{document}

Comment: This same example also shows we can't use `{}` around the macro either, as in `{\leq}` (stating just in case anyone was considering that option for delimiting macros).
Answer: In general all letters qualify to follow a backslash and make up a command name. These letters are a-z and A-Z by default. Some commands like \makeatletter or \ExplSyntaxOn add other characters as letters (e.g. @ or _ and :). If one of those characters follows the command name you have to put some boundary there. The easiest way to do this is to follow your command by a space (as mentioned by @DavidCarlisle).
Examples (if you want more details consider reading this post):
\DeltaA % this would be one command, use
\Delta A % instead as this has the "boundary", but
\Delta1 % would not be a problem as 1 is no "letter" by default
\Delta@ % see above, but
\makeatletter\Delta@\makeatother % would call for a macro \Delta@

If math mode is concerned you are done using the space. In text mode you may want to consider that the space after a command is absorbed. So in text mode you may want to use \textDelta{} (or if you want to ensure the space \textDelta\).

After a backslash did its work


Can I extract application data from an iOS device?

Question: I have a third party application on my iPad (Stanza) which has some data that I'm interested in doing some analysis of on my Mac (read statuses). Is there any way to get the data that the application has stored?
Answer: There is a tool called iPhone Backup Extractor.
It lets you extract app data from an iOS backup, which you create with iTunes.
I posted a detailed tutorial on how to use it on my blog: http://adriansieber.com/how-to-extract-data-from-ios-apps-on-mac-os/
Answer: There is no need to jailbreak.
An application like JuicePhone will do the trick, if you have a MacOS X computer. Just make sure you turn off encryption for the backup.
Comment: The software mentioned here hasn't been updated in a long time (2013) and isn't compatible with the newer iOS backup formats, specifically iOS 10+.
Answer: I use PhoneView to access (read and write) that data directly on the iPhone. It does not require you to jailbreak, but if you do, you can have more access. It doesn't care if your backups are encrypted as it just asks you for the password before reading the files on the iPhone. I am a very happy customer and have gotten support from eCamm even when I am running beta Mac OS versions with beta versions of Xcode and beta versions of iOS. It is rock solid on the shipping versions of the software and won't hold you back if you like to live on the edge or develop for iOS.
Answer: In my opinion the best answer is the FREE answer.. which is use ifuse. The details in my answer to an iPhone question. The process/experience of downloading and using iExplorer made me mad enough to find the right answer.
Comment: Thanks, `ifuse` seems to work great! As I'm on a Mac, I found the simplest way to install `ifuse` was with Homebrew as explained here: https://stackoverflow.com/a/71687320/61818
Answer: Depending what data you want to access, on macOS Catalina (10.15.5) I was able to just connect my iPhone 11 running iOS 14 to my computer with the lightning cable, and then access my phone through Finder.
Scrolling to the far right of the options, there is one called 'Files', which shows me a list of the apps on my phone, and by expanding them, the files accessible within each app (see below):

I'm not sure if this is the same level of access to files the other apps mentioned above can give you, but this was sufficient for my needs, and much cheaper/easier than using a 3rd party app.
Comment: "Files" will only show files for apps with file sharing enabled. To access all files on the iPad, you will either need root access (jailbreaking the device) or dig through a backup of the device, somehow.
Answer: Jailbreak you iPad if you haven't, and install OpenSSH.  Then just scp the stuff you want from the iPad to your computer.  Most application-related data are in /var/mobile.
Answer: I use PhoneDisk. It sits on your menubar, and auto-detects when you connect your iPhone via USB cable.
It can read files directly from your iPhone without having to jailbreak, so it doesn't make any difference if your backup is encrypted or not. To read files from a specific app, select "Change Connection Root" and then the app you want. It will mount the app dir as a disk that you can navigate through Finder.
Answer: I'm amazed at how many options there are here. I don't use any of 'em, including the one I'm suggesting: Macroplant's iPhoneExplorer. But I doubt they can get much better. This will work both on jailbroken phone or not accordingly, over USB. And it's free. Obviously it's not as feature-full as PhoneDisk, which is simply awesome: they're from the same Macroplant. JuicePhone do look cool for its different purpose (exploring the backups).


How do I prepare tofu so comes out like at Noodles & co

Question: I really enjoy the texture of the tofu in the pad thai with tofu dish at Noodles and Company. In particular, it comes out much firmer than it does when I make tofu at home by cubing it and cooking it in a pan with vegetable oil. How do I prepare the tofu so it comes out in a similar way?
Comment: Could you perhaps describe their tofu? Noodles and Company isn't in every state (let alone every country).
Comment: First thing's first, are you buying extra-firm tofu?
Comment: There are some other products you can buy that are even more pressed, into an almost leathery dense texture and usually pre-marinated. Look in the refrigerator section of a natural foods store, usually near the veggie meat substitutes. Those are about as dense as you could want. This sort of thing: http://www.pulmuonewildwood.com/baked.asp
Comment: I think @Aaronut hit the nail on the head. Buy extra firm (or even super-firm, if you can find it) tofu. You can try to weight and squeeze some water out of tofu at home, but it is much more effective to just buy it the density that you want. The cooking doesn't have anything to do with it.
Comment: @Aaronut: Yes, I am buying extra-firm tofu. It still doesn't come out as firm as I'd like after cooking.
Comment: You can also firm up tofu by cooking it in a way that removes a lot of water - like baking. Is it possible that's what they do?
Answer: To make your tofu more firm, you can press it.  Before cubing it, place the block of tofu on a plate, put another plate on top of it and weight it down with something (like a can of tomatoes) and leave it for 15 minutes.  This will compress it further and squish out extra water.
Answer: My girlfriend and I cook a lot of tofu - we have also found that "firm" and "extra-firm" tofu is highly variable and that the quality makes a big difference in the actual firmness, density and cooking results.
Here in SF though we did have good luck with the random brand of tofu available at our local produce market (in the Outer Sunset) we have now switched to almost exclusively cooking with tofu from http://www.tofuyu.com/ who are a local tofu maker and whose plain tofu cooks up amazingly well - gets great color, stays firm and in short is far better than anything else we've tried.
While not every part of the country is as lucky as the Bay Area to have multiple artisanal tofu makers competing to make fantastic tofu you should experiment with the various brands of tofu you can find - look for the one that gets the best results for your in your preparations.
Answer: Try baking your tofu before adding it to the dish. It'll lose a lot of moisture and turn out a lot more firm.
Answer: you may want to marinate your tofu.
and/or coat it in cornstarch before you fry it.
see this recipe:  salt and pepper tofu
Answer: The brand and type of tofu are essential and easy to get right. We have one called Cleveland Tofu in Ohio that has an extra-firm that works well, but even the one I see most frequently, Nasoya, works great if you follow up with these steps.
You can cube first but it creates more work. I get good results by:

slicing into 1/8-1/4" strips the short-length of the block
pressing/patting dry with a paper towel and laying out to air for 15ish minutes
putting on a baking sheet on 325-350F for about 15-30 minutes (depends on your taste in firmness, I like it to have some give, my wife prefers it to be firm to the point of crunchy), flipping once for even cooking

This gives a nice crispness by ensuring you have dried out the tofu sufficiently. If you choose to only bake just extend baking time. If you want to follow up with a deep-fry or saute they are a nice texture and won't crumble.
Answer: To make it more firm, try pan searing it. High heat, low oil, and flip it often with the pan itself. Don't use a utensil, you will want to keep it moving but using even a soft spatula may tear and crumble the tofu before it gains a seared texture).


Why is it so hard to implement Haken's Algorithm for knot theory?

Question: Why is it so hard to implement Haken's Algorithm for recognizing whether a knot is unknotted? (Is there a computer implementation of this algorithm?)
Comment: I'd like to add the following question: what is the best known efficiency of such an algorithm (in terms of the number of crossings of the knot diagram, say)?
Comment: Re complexity: This doesn't answer your question definitively (maybe others will), but: (a) Unknotting is in NP, and (b) there is an upper bound exponential in the number of crossings.  Haas, Lagarias, and Pippenger are responsible for these results.
Comment: @Joseph O'Rourke: do you know of a reference for the fact that unknotting is an NP problem?
Comment: @Jim: It looks like Joe already edited his comment to answer your question, but here's a link to the Hass, Lagarias and Pippenger article: http://portal.acm.org/citation.cfm?id=301970.301971
Comment: Thanks, Peter (but no one can edit comments--Alas!).  Here is the arXiv pre-publication version, which might be more accessible: http://arxiv.org/abs/math/9807016 .
Answer: Regarding Haken's algorithm:  It's not so hard to implement (it's essentially implemented in Regina, though at present you need to type a few lines of python to glue the bits together; a single "big red button" is on its way).  However, it's hard to run, since the algorithm has exponential running time (and, depending on how you implement it, exponential memory use).
There are two facts that make Haken's algorithm easier to implement than many other normal surface decision algorithms:

You only need to search through vertex normal surfaces, not fundamental normal surfaces (Jaco & Tollefson, 1995).  Vertex normal surfaces are much easier (and much faster) to enumerate.
The test that you apply to each vertex normal surface is relatively simple (see if it describes a disk with non-trivial boundary).  For other problems (notably Hakenness testing), the test that you apply to each vertex normal surface can be far more difficult than the original vertex enumeration.

The reason Haken's algorithm is slow is that vertex enumeration is NP-hard in general.  There are some tempting short-cuts: one is to run $3^n$ polynomial-time linear programs that maximise Euler characteristic over the $3^n$ possible combinations of quad types.  However, experimental experience suggests that this short-cut makes things worse: solving $3^n$ linear programs guarantees $\Omega(3^n)$ running time even in the best case for a non-trivial knot.  On the other hand, if you perform a full vertex enumeration (and you structure your vertex enumeration code well [1]) then you often see much faster running times in practice, even though the theoretical worst case is slower.
An aside (which has already been noted above): there are much faster heuristic tests for unknot recognition, though these are not always guaranteed to give a definitive answer.  SnapPea has some, as does Regina.  There are many fast ways of proving you have a non-trivial knot (e.g., invariants or geometric structures). One fast way of proving you have a trivial knot is to triangulate the complement and "greedily simplify" this triangulation.  If you're lucky, you get an easily-recognised 1-tetrahedron solid torus.  If you're unlucky, you go back and run Haken's algorithm.  The interesting observation here is that, if your greedy simplification is sophisticated enough, you almost always get lucky.  (This is still being written up, but see arXiv:1011.4169 for related experiments with 3-sphere recognition.)
Btw, thanks Ryan for dragging me online. :)
[1] arXiv:0808.4050, arXiv:1010.6200
Comment: And thanks for *finally* logging into MO, Ben. :)
Comment: Very nice.  I'd be interested in seeing the code, especially if
the "big red button" is installed, but even without.
Comment: The source code is all online at http://regina.sourceforge.net/ (though warning: there's a lot of it).  For a human-readable overview, arXiv:0808.4050 and arXiv:0901.2629 describe the normal surface / vertex enumeration code, which is the computational bottleneck for Haken's algorithm.

To run the full procedure: start with a triangulated knot complement (imports from SnapPea are ok), simplify the triangulation to give only two boundary faces, enumerate all vertex normal surfaces, filter out discs using Euler char., then check boundary edge weights to see if any have non-trivial boundary.
Comment: BTW, as of Regina release 4.93 the "big red button" is there.  Load a 3-manifold triangulation then button under Recognition -> Solid torus.
Answer: First, I'd like to remark that there is a computer programs that will tell if a knot is unknotted, namely Jeff Weeks Snappea. It's not rigorously proven to work as is, but in practice it
always works.
The main difficulty with Haken's algorithm is the immense size of the objects that must
be surveyed.  For a 3-manifold described by gluing $n$ simplices together, there are
$3^n$ integer programming problems that among them
 represent every possible incompressible surface in
the manifold, each one of dimension linear in $n$ (details depend on exactly how this is
implemented).  Each of these integer programming problems in itself is challenging:
each has a finite semigroup basis for the solution set, but the size of the basis grows
exponentially with $n$.  The exponent of growth is sufficiently high that it becomes rapidly
hopeless.  For simple knot diagrams, everything is already known, and there's not much
point.  If you get up to knot diagrams with perhaps 20 crossing, then there would be perhaps
$3^{20} > $3 billion integer programming problems, each involving very many fundamental solutions with perhaps 100-digit integers that are not easy to identify.  There may be
various shortcuts and simplifications, but improvements only will increase the complexity
of manifolds that can be analyzed by a little bit.
In contrast, Snappea can easily handle knot projections with a hundred or two hundred
crossings very quickly, orders of magnitude more quickly than the time it takes to draw a picture of the knot.
Answer: Ben Burton has implemented Haken's algorithm in Regina.  He (and Rubinstein and Tillman) have a functional algorithm to determine if a normal surface in a triangulated 3-manifold is (in)compressible.  It's not terribly fast but it's fast enough to give a proof that the Seifert-Weber space does not contain an incompressible surface.  This is a recent paper of theirs on the arXiv: https://arxiv.org/abs/0909.4625
The main issue is that Haken's algorithm is extremely memory-intensive.  If you run Haken's algorithm on the Rolfsen/Conway table of knots, the first thing you have to do is triangulate the knot complement.  Efficient ideal triangulations are readily generated by the algorithm used in SnapPea (originally due to Thurston, as far as I know).  But normal surface theory isn't totally happy with ideal triangulations so what Regina does is replace that triangulation with a semi-simplicial triangulation of a compact manifold (the complement of an open tubular neighbourhood of the knot).  This makes the triangulation decidedly less efficient.  I believe people like Burton, Jaco and Rubinstein are working on avoiding this step but it's not complete.
Anyhow, so you have to subdivide to get to a point where the normal surface theory is happy.  Regina can run through the knot tables, applying the Haken algorithm to each knot.  On my laptop it completes the knot table in about a day.  So it's not terribly slow.  But sometimes Regina is using 2 to 4Gb of RAM.  And I believe this is largely normal surface enumeration that takes the bulk of the effort.  I'll see if I can get Ben to comment.


How can I compare degree of stability (or persistency) in two dynamic systems/models?

Question: Let's say I have two dynamic VAR models for two countries. What is the best way to compare persistency or degree of stability in the two models. Use eigenvalues of the two systems?
Comment: Can you provide more information? The structural form of the VAR would help provide context for the question
Comment: Let say I have a bivariate VAR model for examining the effect of oil price shocks on GDP for two countries (Nigeria and Gabon). I want to compare the persistency of the oil shock for the two countries...or say the persistency of the response of GDP to oil shock for the two countries.
Comment: ahh ok, im assuming you have done the necessary detrending, lag selection, and tests for stationarity. Would it not just be one VAR with e.g. the world price of oil with $GDP_N$ and $GDP_G$ as variables in the model? I would look at the impulse response functions from like a one SE positive shock on those two variables. R has a really nice package for plotting them.
Comment: But how would you judge persistency from visually looking at IRFs? Does persistency have a clear definition after plotting IRFs? Maybe which impulse response returns to the zero line the fastest has the lowest persistency? Sometimes the impulse response returns to zero quickly and after that, it takes a long time to return to zero. Would you say the response has low or high persistency?
Comment: Exactly. If the impact is short-lived, then it is less persistent relative to others. I would say that approach would only serve as a complement to @1muflon1's answer---the coefficient defines persistence.
Answer: The most straightforward way is to examine the coefficients of your VAR model, since the persistence is broadly understood in econometrics as a system dependence on its own past (see Verbeek (2008): a guide to modern econometrics).  A simple VAR model is given:
$${\displaystyle y_{1,t}=c_{1}+a_{1,1}y_{1,t-1}+a_{1,2}y_{2,t-1}+e_{1,t}\,} \\
{\displaystyle y_{2,t}=c_{2}+a_{2,1}y_{1,t-1}+a_{2,2}y_{2,t-1}+e_{2,t}.\,}$$
Now, in very similar fashion as with AR models how persistent the variable is will be given by how much it depends on its own past (lags). For example, persistence of $y_1$ can be gauged by coefficient $a_{1,1}$. The larger the coefficient the more persistent the series is.
Comment: Thanks. So if there is a shock in $e_{1,t}$, the persistency of the responses ($y_{1,t}$, $y_{2,t}$) depends on $a_{1,1}$ and $a_{2,2}$? How about $a_{1,2}$ and $a_{2,1}$?
Comment: A shock in $e_{1,t}$ would show up in $y_{1,t}$, as shown above, and then in $y_{2,t+1}$ as this is a function of $y_{1,t}$. So yes, the coefficients define that relationship. Think about it in terms of the simple AR(1) model and how the shock persists and, if stationary, dies out over time.
Comment: Oh ok. All the coefficients matter then. Thanks!!
Comment: @EmmanuelAmeyaw persistence by definition is the relation of present realization of values to their past realization so they are governed by those coefficients.