Earnings speculation stocks

Question: Is it a good idea to buy a stock before its earnings come out if I believe that there will be a surprise and then sell after the report comes out? Will the gains be substantial enough for me to take this risk?
Answer: It's an absolutely  wonderful  idea to "buy a stock before its earnings come out" if you are adept at selecting the stocks that will have positive earnings surprises.  If you don't have that ability  then not so much.
Many traders utilize option strategies to take advantage of this volatility but let's not go there.
Answer: That is the exact thought of many other market participants   and what drives the price up before the results come out.
The problem is, that even if the results do supprise on the up side, much of the price rise is already priced in, so when the results do come out, the price actually falls, as those in early take profits.

Earnings speculation stocks


Do phase inverter tubes affect the sound of my amp?

Question: I was told once that a phase inverter tube should "just work" and that it has no effect whatsoever on the tone of the amplifier. Is this true?
Comment: Everything "should just work", but in the real world how many things do? We get to repair/replace things that have worn out all the time.
Answer: It's much too long to quote, so I'll link to Myles Rose's paper about the Phase Inverter and quote this:

Before you go to a pricy output set of tubes and a possible need to rebias the amp think about a simple phase inverter change. There are no amp adjustments necessary when you change the phase inverter.

It makes sense that the phase inverter is very important. It's feeding the signal from the pre-amp into the power-tubes and has to make that signal change very cleanly, without adding any distortion. At least that's the idea for an amp running very cleanly.
With a lot of amps we rely on the pre-amp stage to provide the distortion, so the power-amp tubes really should only amplify. But, there's a really nice distortion you get when the power-tubes are getting pushed, and, according to that article it's the phase-inverter that is responsible for that sound. So, making sure that tube is in good shape is important otherwise the output-stage distortion will be weak or flabby sounding instead of fat, like it should sound.
All the tubes degenerate as they are used so it's a good idea to swap them out periodically. A good amp tech. will be your best asset when trying to figure out when that should be.
Answer: The phase inverter is the final amplifier of the chain. If you overdive it, it will distort. The distortion depends on the tube(some tubes will distort sooner than others or differently).
A phase inverter is simply an amplifier configured in such a way to give the original amplified signal and another signal 180 degree's out of phase to drive the push pull amp.
There are two things that can make the amp sound different due to the PI. If it is overdriven and/or if it is asymmetric.
It depends a lot on the tube itself and on the type of phase inverter circuit used.
In any case the tube will have about the same effect as any other tube in the chain. Any tube will have more of an effect the harder it is driven. All tubes will behave approximately the same if they are kept in in their linear range. Even bad tubes can sound good if not driven hard enough(All physical devices behave linearly within some range).
There are more important things in a tube amp that effect the sound than the tubes(if the tubes are working). EQ, pre-amp bias type/level, Full load current, tone stack type, feedback amount, etc...
What makes tube amps sound different is generally not the tubes since all tubes pretty much behave very similarly even when distorting.
Whatever minute differences you'll get from changing good tubes don't compare to changing the EQ(EQ has the most drastic effect on an amp's distortion).
Of course we are assuming working tubes.
The reason why some tubes do work better typically have to do with the type of circuit the amp is built around rather than the tube itself. I know this sounds contradictory but the point is that some circuits happen to be out of spec and some tubes can handle it better(or worse depending on your perspective). What this means is that it's more of a problem with the circuit itself than something special about the tube and instead of changing the tubes you can fix the circuit. Of course it's easier for people to change tubes rather which is why you get so many people doing it and claiming some tubes are better than others.
Given that there are only like 4 vacuum tube manufacturers left in the world and 99% of the tubes you see are just rebranded versions goes to show that tubes don't make all that much of a difference.
The more distortion you are after though the more the tubes come into effect up to a point then all tubes will sound almost identical.
The idea is that the pre-amp is where you get your distortion by overdriving the tubes there. Unfortunately this can happen in the PI too trying to get more gain which causes them to distort. Because of the circuit difference it will distort differently which will have a different effect.
If you are comparing PI tubes make sure you are driving them as hard as the amp allows to get the real difference else they will all sound almost identical(i.e., the whole point of saying they are operating in the linear region).
Comment: The same goes with each aspect of a tube amp. Maybe some people like underbiased tube sound while some don't. I personally prefer to use unbypassed cathode biased tubes because it cleans up the sound much better(more of a hi-fi approach) but you lose gain that way. Some people might not prefer that for their guitar sound and that is fine. To each his own. Best thing to do is learn what you like and how to get it then you'll not have any issues with tone. Learn to mod your amps and you'll be able to dial in what you want. Who cares what other people say. They don't have your ears.
Comment: To follow up a little on what AD has said...  This used to be considered good advice: "A known microphonic tube, with no other flaws, can often be used as for the phase inverter stage."  After reading the answers to this question, I now question that rule of thumb as I do most things Aspen Pittman says...
Comment: The problem with a PI tube is that it is suppose to do 2 things: Generate an EQUAL and inverted signal to the original and drive the power stage. If the signal is not equal you'll have unbalanced transformer currents that could burn up your OT since they are designed to assume no DC current(an equivalent class A transformer would be much much larger for the same power). You also get a more distorted signal when this happens. If the PI cannot drive the power amps enough you will have lower power as the output will sag under the load.
Comment: I've played around a lot with all kinds of combinations and IMO it doesn't really matter. Some people will like it one way and some will like it the other. In most cases you can play around enough with the component values of the circuit to make any tube sound like any other tube if they do not have any major issues.
Comment: The reason he says a microphonic tube will work is because any noise should be inverted and cancel out in the power amp. This isn't always true because a paraphase inverter that uses two tubes and they won't be perfectly balanced and microphonics in one tube will not necessarily be exactly reproduced on the output of the other.
Comment: Best I can say is that there is a lot of "voodoo" in guitar amp design and it is due almost exclusively too people believing their ears are better than everyone elses. For example, you can build a 100k$ hi-fi tube amp with the lowest THD and a 40$ solidstate amp and do a double blind test and people are going get mixed results. Why? Because some people like the sound of tubes and some people don't. A solidstate amp will sound more clear but less warm since it has less THD. Does this mean tubes are better or worse? No, just means some people like the tube sound.
Comment: and BTW, 99% of guitar tube amps are almost identical in design. The major differences tend to be in the EQ and support circuits(such as muting functions, channel switching, etc...). The actual circuits themselves generally look like copies. I was surprised when compared my mesa to a fender to see almost an identical circuit.
Comment: " Learn to mod your amps and you'll be able to dial in what you want. Who cares what other people say. They don't have your ears." +1 for that comment
Answer: Apologies for answering my own question, but after performing some empirical experiments the answer in short is: yes. A phase inverter has an effect on the tone of your amplifier. I performed some experiments with the following tubes:

NOS 1981 Tesla 12AX7
NOS 1968 RCA 12AX7
NOS 1980 Mullard 12AT7
Standard new Chinese JJ 12AX7

I matched all the following combinations for the PA and the PI in my Orange AD-30R and recorded a clip of me playing (almost) the same riff with my Les Paul R8. The settings and volume were identical on each clip, and they were recorded through a SM-57 into an Apogee Duet with Logic Pro on my Macbook.

JJ PA + JJ PI
JJ PA + Mullard PI
RCA PA + JJ PI
RCA PA + Mullard PI
Tesla PA + JJ PI
Tesla PA + Mullard PI

After I have A/B'd these clips, I can tell that there are obvious differences between all of them. Take the two clips with the JJ's for the Preamp tube for example. There is a very noticable harshness to the clip using another JJ in the PI, while the Mullard is less so--fatter and more evenly spaced. There is, of course, also the fact that the Mullard is a 12AT7 and the JJ is a 12AX7. That could attribute to the fatter sound due to higher headroom and a much lower gain rating.
As you can tell in each of these clips, there is a noticeable difference between the JJ phase inverter and the Mullard phase inverter. I have ran additional tests with the RCA and Tesla tubes as phase inverters, and in each case the amplifier sounds different—so the difference in tube types isn't completely the reason for the tone difference.
Comment: This is my kind of thinking, set-up your own experiments and come up with your own answers. I like the way you think.
Answer: Wish I could listen to those audio files, but the links seem to be broken.
I've recently gotten a Bugera V55HD that has the same setup - 3 12AX7's, 2 being for the gain stage, and the 3rd being a phase inverter.
I've always replaced all 3 12AX7's in my amps in the past, but now it seems the 2 12AX7's has to do with tone, while the Phase Inverter 12AX7 affects how easily the amp is overdriven and how much distortion it has.  While I might not want a lower powered tube in the gain stage tubes, it's possible something like a 12AT7 or 12AU7 might produce more desirable breakup and distortion characteristics...
So, it would be nice to hear those examples, as a starting point to go on, if the links can be fixed...
Answer: Only a few people realize this, but every single tube in an amplifier affects the sound of that amp, and even fewer realize that even though a brand new set of tubes may have the same identifying part numbers and may even be from the same manufacturer and the same batch of tubes, they are not all created equal when it comes to gain capability and frequency response. The best results usually come about by matching the tubes up with each other as far as gain characteristics are concerned and then giving the matched tubes a listen while installed in the chosen amplifier. When compared with any number of other tubes of the same type and manufacture in a given amplifier, There will be tubes that stand out as desirable in the way they sound, and others that just don't seem to offer anything special in the way they sound. It can involve extra time and money to purchase a number of tubes from which you can select the ones that perform best for you, but if you want the absolute best performance from your amplifier, this is one way to get it. Then again, I suppose not everyone requires top performance.


Hidden Features of Solaris/OpenSolaris

Question: What are useful commands, tools, or tricks that one would find on Solaris or OpenSolaris that aren't available on a typical Linux distribution?
Answer: ZFS, DTrace and SMF are hardly hidden features since anyone who has ever heard of Solaris also has heard of them.
If you'd really like to get to know some hidden/less known features of Solaris, I recommend you read the Less known Solaris Features ebook by Jörg Möllenkamp.
Comment: The Less known Solaris Features ebook is one of the best books written on solaris, ever.
Answer: Live Upgrade, which uses ZFS, creates writable snapshots of the operating system boot environment. With Live Upgrade, you can apply patches to a snapshot boot environment, then make that snapshot bootable. Upon the next reboot you get a patched OS environment. If you discover an issue with a patch, you can make the old snapshot bootable, reboot and you've backed out your changes. Its a pretty impressive solution to patching.
ZFS for the boot environment requires Solaris 10u6 or newer.
Also, Solaris Zones are pretty useful for application isolation. Obviously DTrace is very nice but RedHat is playing catchup with System Tap.
Comment: Live Upgrade can be done with UFS as well.
Comment: I've always thought that live upgrade compensated for the pain involved in solaris upgrades, compared to your average linux upgrade.
Answer: Don't forget SMF (Service Management). I have yet to see something comparable for linux (any pointers gratefully accepted). It did save me (and colleagues) a lot of ticket handling :)
Comment: Init scripts wrapped in xml controlled by a shite program that gives useless error messages? I hope that I never find anything like that in linux.
Comment: As someone who recently switched to OpenSolaris, I'm loving SMF.

I also happen to administer a bunch of OS X servers, and yes launchd supports retrying a service start if it fails, if that's what you mean.
Comment: I believe apples framework is available os open source. http://developer.apple.com/MacOsX/launchd.html
Comment: nice read! I'll look into it, but at first sight, it does not offer all the functionality of SMF (eg. retries)
Comment: upstart does about the same thing, at least the dependency based bit..
Answer: There are a number of features that Solaris has that Linux people wish they had.  These include:

ZFS: a filesystem that provides extreme flexibility, more than anything now available.  Dynamic growth and reduction, snapshots, clones, and more - all available for free.
DTrace: a debugger that can present you with details on how the kernel is working.  Because of the way the kernels are written, DTrace is inherently much more flexible than SystemTap.
SMF: yet another system to replace System V init scripts - but this one seems to have more people interested in it than any of the others.
Zones and Containers: these are very flexible and have a lot of people excited: they provide for very flexible virtualization.
Comment: I have yet to find a linux person who wises they have SMF. And OpenVX is a good zone/container replacement.
Answer: A few personal experiences...
I find Zones so easy and useful that I've simply created one for each service I am running at home - this way I can play and test things out without trashing it all.
One of the zones is reverse proxy (Sun Web Java Proxy) so that I can play with different web servers easily.
Also I find the opencsw (previously known as Blastwave) packages hierarchy much better that anything yet seen - it always takes care of all the dependencies.
And - not to forget - binary compatibility. If an app is specified to need Linux with kernel 1.2.3_4 you better have it. On Solaris everything just works on future releases.
For me this means upgrade when I want and no stress doing it.
Here are several interesting documents if you want to dig deeper:
Less known Solaris features
Just for taste - Adminstration specials:
Live Upgrade
Service Management Facility
Resource Management
pfiles
fuser
/export/home? /home? autofs?
lockfs
About cores and crashes
CacheFS
Jumpstart Enterprise Toolkit
(do I sound like an ad? sorry...)
Comment: Blastwave is still around - opencsw is a fork.
Answer: The two biggest, compelling reasons for Solaris seem to be DTrace and ZFS, neither of which is directly available for Linux.
Answer: kstat to get all kinds of awesome kernel statistics.
Answer: Not necessarily hidden, but not obvious to Linux people are the process observation utilities: pstack, pmap, pflags, pfiles, pcred, psig, and pldd. Also prstat, which is more or less equivalent to top, but can also aggregate resource usage by user, zone, project, and display microstate accounting.
Look at projects and tasks for managing lots of applications in one OS instance.
I don't know of an equivalent to coreadm in Linux, though it's probably scattered around /proc somewhere.
Logadm is a bit obtuse but a good replacement for logrotate, and generally more powerful/flexible.
The arrangement of multi-level security (roles, authorizations, profiles) is different from Linux (SELinux contexts, AppArmor).
THe Image Packaging System (IPS) in OpenSolaris is pretty neat, but still under heavy development.
Also, +1 for LiveUpgrade. It's great, especially with ZFS snapshots.
Most of the GNU userland stuff you're used to is available, and probably installed by default on a sufficiently new Solaris.
Answer: Fast Reboot for OpenSolaris
skips the normal HW Probing/BIOS POST/GRUB process on x86 hardware, allowing for reboots to occur in <10sec instead of ~2mins.  Even supports booting alternate Boot Environments (e.g. reverting a botched upgrade).
Comment: However, Linux can do that, too. Look out for "kexec".
Comment: It even supports panic reboot! More info about how it works from a presentation Sherry Moore (project lead) gave to the NYC OpenSolaris users group:
http://www.scribd.com/doc/16925842/DeveloperDayFastreboot
Answer: ZFS and SMF are great, but a real pain with solaris is that package manager is ages behind its linux counterparts.
Also all utilities are different in subtle ways(killall anyone?), if you admin linux machines most of the time, switching to solaris means reading man pages again and again. A sucky "more" pager and always slightly misconfigured terminals make your life difficult.
Comment: Solaris package manager is getting a major overhaul in OpenSolaris/Solaris 11.
Comment: I dunno, "export PAGER=less" works well enough for me. And you're better off with pkill than killall on Solaris. You're right about the sucky termcap/terminfo stuff tho (no terminfo for screen? GTFO!).
Comment: regarding killall I moved to procps which provides: pkill, pgrep. Those should be avaible with the GNU tools under Solaris I find those to be much better than killall
Comment: pkill (and pgrep and the other p-utilities) are part of the core system package on (Open)Solaris. They're (at least pkill/pgrep/pmap) in procps on Linux.
Answer: Solaris Crash Analysis Tool - best tool to assist the analysis of Solaris kernel crash dumps.
Answer: kssl, kernel SSL module. Quote from ksslcfg(1M)

ksslcfg manages smf(5) instances for
  the  Kernel  SSL  proxy module.  An
  SSL-enabled  web server can use the
  services of its Kernel SSL proxy to
  improve the performance of the HTTPS
  packets  processing.
Answer: Unlike Linux, "lsof -o" (show file offsets) works. This can be useful for showing how far along a process is when it's reading or writing large amounts of data.
Answer: The consolidated "Less known Solaris Features" tutorials is helpful.
Answer: Probably the biggest trap for new players, a typical Linux user might be tempted to run killall on a Solaris host;
<code>System Administration Commands                        killall(1M)

NAME
     killall - kill all active processes

SYNOPSIS
     /usr/sbin/killall [signal]

DESCRIPTION
     killall is used by shutdown(1M) to kill all active processes
     not directly related to the shutdown procedure.

     killall terminates all processes with open files so that the
     mounted file systems will be unbusied and can be unmounted.

     killall sends signal (see kill(1)) to the active  processes.
     If no signal is specified, a default of 15 is used.

     The killall command can be run only by the super-user.

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWcsu                     |
    |_____________________________|_____________________________|

SEE ALSO

     kill(1), ps(1), fuser(1M), shutdown(1M), signal(3C),  attri-
     butes(5)

SunOS 5.10          Last change: 14 Sep 1992                    1
</code>

Hidden Features of Solaris/OpenSolaris


House flies AGAIN!

Question: Last year our ground floor apartment had a fly infestation that the rest of the tenants in the building supposedly didn't experience. We have since moved (about 5 blocks) and have had no problems until now. Its been about a year between instances. Can flies move from one place to another? In plants maybe?
Comment: Fruit fly maybe ? If so clean your basket and your indoor plant if you got some.
Comment: Do you compost, store trash inside or have lots of potted plants? What kinds of flies are they? Bottle Flies, fruit flies, etc?
Comment: ... maybe the flies like you?
Comment: What kind of fly?  Fruit flies - put all your fruit/veggies that are on the counter into the fridge (peel bananas and freeze is another option).
Comment: "house flies again"  ok ill say it. how often does your house fly. words.
Answer: What kind of fly?  Fruit flies - put all your fruit/veggies that are on the counter into the fridge (peel bananas and freeze is another option).  There's good fruit fly trap designs on youtube.
Flour moths? Throw away all baked goods/cereal.  Start again.
Shower flies? Spray antifungus stuff/bleack directly on all bathroom grouted seams and/or dig out the grout and re-grout or re-caulk. Also in bathroom wall/floor corners where moisture can exist.
Those giant black flies? Those are common in older houses. Just kill em - get fly strips - don't let em breed - but they'll come in through window edges from inside the walls of the house.
Answer: Wow, common house flies do like dirt and any organic matter they can lay there eggs in. If you use organic composit for your flowers the flies love this almost as much as horse poop. The only help we have found is purchasing fly predator larva online. We do this to our manure piles every 6-8 weeks. This is on a small horse farm you may Only need 1 small treatment with just a  few in each pot. The predator larva eat the flys and don't bother plants. They have a short life span so we need to buy more, you may be good with 1 treatment of all your plants. Other than this there are the fly traps that the flys get in and the water at the bottom drowns them. When the bag or bottle is full they do make good compost. The last defense is the sticky nasty fly paper strips you hang from the ceiling. I don't like these but they are our last line of defense and work well but are ugly ang just yuk.

House flies AGAIN!


Why is the hypoiodite anion unstable in solution, whereas hypochlorite is relatively stable?

Question: $\ce{Cl2}$ and $\ce{Br2}$ can disproportionate in a cold, aqueous, basic environment to form $\ce{ClO-}$ and $\ce{BrO-}$ respectively, yet $\ce{I2}$ directly forms $\ce{IO3^-}$. Why isn't $\ce{IO-}$ isolatable in solution?
Comment: At any temperature, IO- itself are rapidly redox reaction I- and IO3-.
Comment: I think this is because the cl-o bond is stronger than i-o, but I could not find the data
Comment: @user6006786 Sure, but why? $\ce{ClO-}$ doesn't showcase this kind of behaviour at lower temperatures, yet $\ce {IO-}$ does.
Answer: When iodine is added to water, the following reaction results:
$$\ce{I2(l) + H2O(l) -> OI^{-}(aq) + 2H+(aq) + I^{-}(aq)}$$
$\ce{I2}$ molecules and water molecules react to form hypoiodite ($\ce{OI-}$). The reaction can move both ways of the equilibrium, depending on the pH of the solution. Iodine may also occur as $\ce{I3-}$(aq), $\ce{HIO}$(aq), $\ce{HIO3}$(aq) . The compounds that are form behave differently when they come in contact with water. When iodine ends up in surface waters, it may escape as iodine gas.
$\ce{IO-}$ rapidly disproportionates to form $\ce{IO3-}$ and $\ce{I2}$
$$\ce{IO- -> IO3- + I2}$$.
See here for more details.
For the disproportionation reaction, consider the Latimer diagram for iodine:-

A species has a tendency to disproportionate into its two neighbor species if the potential on the right of species in a Latimer diagram is more positive than that on the left. In this case, right hand potential($\ce{+0.42}$) is greater than the left hand potential ($\ce{+0.15}$). So , it disproportionates.
Comment: Your answer does prove that $\ce{IO-}$ is unstable according to the standard reduction potentials of $\ce{IO^{3-}}$ and $\ce{IO-}$ - but that's not what I'm looking for. I'm trying to find the reason behind *the numbers*, not *the numbers* themselves.
Comment: Yet, my question still remains: why $\ce{IO-}$ rapidly disproportionates, whereas $\ce{ClO-}$ can be isolated?
Comment: Well, in your edit, I see that $\ce{IO-}$ is a radical oxide. That doesn't sound right since all electrons are found in pairs. $\ce{IO}$ does have an unpaired electron, but not $\ce{IO-}$.
Comment: @L3ul the reason behind the standard reduction potentials is the lower electronegativity of iodine compared to chlorine. See my answer below.
Answer: Chlorine has a higher electronegativity than iodine. Therefore, the Cl-O bonds are less stable than the I-O bonds (generally, oxygen reacts better with elements of lower electronegativity). Thus $\ce{ClO3-}$ is comparatively less stable than $\ce{IO3}$ which means that in case of chlorine the equilibrium is closer to $\ce{ClO-}$ while - in comparison - for iodine the equilibrium is closer to $\ce{IO3-}$.
The reason for the lower electronegativity of iodine compared to chlorine is that iodine has two more electron shells than chlorine, meaning that the outer electrons of iodine are further away from the nucleus.
Answer: From the comments, one apparent reason is that the $I-O$ bonds, being weaker than $Cl-O$ bonds, are more labile.
There may also be a steric effect.  The +5 oxidation state ions are pyramidal, and we have to "squeeze" multiple oxygen atoms around "one side" of a (positively charged, thus somewhat shrunken) halogen atom.


Can I make a buttercream using cacao butter?

Question: My nephew have lactose allergy and I want to bake his birthday cake , were we live we don't have a lactose intolerance products but I found a cacao butter can I used to make buttercream frosting??
Answer: Cocoa butter isn't like regular butter as it is very hard at room temperature. It's what makes chocolate so hard when cooled, so it's not ideal for a creamy frosting. There are many other alternatives that would work better, for instance vegan butters which are designed to mimic butter's properties. Some vegetable shortenings can work as well, although they don't have much flavor.
Comment: As long as the margarine isn't dairy you shouldn't have any trouble. I only mention vegan butters as they are non-dairy by definition.
Comment: Thank u , the problem I'm facing is not having this option vegan butter aren't available , we only have margarine which isn't 100% vegan, But thanks for the help.
Comment: I have no idea if this would work well, but it you have regular vegetable oil of some sort (that's mildly flavored), you *might* be able to melt a little cocoa butter and vegetable oil together, and then let it firm up again as a shortening substitute. I'm saying this based on my adventures melting olive oil and beeswax together for lotion... I can't recommend any proportions though.
Answer: Here are some different options for non-dairy frosting without vegan butter. Then I got on a roll, and came up with some non-frosting suggestions.

Make your own vegan butter, then use it in a buttercream frosting recipe.

Tofu cream cheese frosting. Drain and press some tofu. Substitute the tofu plus some vegan coconut yogurt into a cream cheese frosting recipe. If you can't get vegan coconut yogurt, experiment and try the recipe without the yogurt. If you tried this with a mild flavor like vanilla, it will taste mostly like tofu. This probably would work best with a recipe for chocolate cream cheese frosting.

Make chocolate ganache using full-fat coconut milk instead of heavy cream.

Make German chocolate frosting, using non-dairy milk instead of whatever milk product your recipe uses. You can try omitting the butter, or substituting some coconut oil. This type of frosting is surprisingly flexible, because it's basically just a sticky syrup holding together coconut and pecans. Here's a vegan recipe that uses coconut milk, soymilk, and cornstarch instead of butter, milk and eggs.

Make frosting with vegetable shortening. Substitute nondairy milk for the milk in the recipe. Yes, it does tastes a bit like vegetable shortening. If you have a container of shortening that's been sitting in your pantry for an unknown length of time, I recommend splurging on a new carton. Old shortening has a stronger taste to it. As with the tofu frosting, this one is probably better with a stronger flavor, like chocolate.

Make a simple glaze, using powdered sugar and citrus juice or nondairy milk. There are lots of recipes available for glazes of all different flavors, if you find one with butter in it, just omit the butter. It's not essential in a glaze.

Garnish with fresh fruit, and dust with powdered sugar. (You can do this alone, or on top of your frosting or glaze. But not with German chocolate cake frosting.)

For a layer cake, use jam or fruit preserves for the middle layer. This would pair nicely with a glaze drizzle on top.

Note: the first three suggestions are summarized from this blog. Visit the original site for details and recipes.


What is the proper vector form for the Gravity Formula?

Question: We are familiar with the equation for calculating the velocity of an object in orbit given the central mass (or the mass given the orbital velocity):
$$\frac{v^2}{r} = \frac{MG}{r^2}$$
I'm trying to understand this as a net of forces in vector form (assuming a unit mass in these formulas):
$$\vec{\frac{v^2}{r}} = \vec{\frac{MG}{r^2}}$$
The centripetal force is directed towards the center (opposite the normal vector of the surface), but so is the gravity.  The scalar form (assuming positive force is directed radially outward) would be:
$$-\frac{v^2}{r} = -\frac{MG}{r^2}$$
So how does this balance?  The net force is supposed to be zero, but if you rearrange, you get:
$$-\frac{v^2}{r} +\frac{MG}{r^2} \ne 0$$
How do you arrange these components to get a net force of zero (assuming there's no such thing as centrifugal force)?
Comment: Donald, this is a really important idea if you want to work problems involving orbits, and it is so simple it is easy to miss. There isn't a separate centripetal force: it always comes from some combination of physical forces present in the problem.
Comment: How do you know on your last line that the sum is not 0?
Comment: Because moving $\frac{MG}{r^2}$ on the same side of the equation as the centripetal force would be turning it into anit-gravity.  When setting this up as a balance of forces equation, I'm starting with the fact that I know that the centripetal and gravitational forces are both pointing in the same (negative) direction.  How do you get two negative forces to balance to zero?
Comment: Yeah, but as it turns out $\frac{v^2}{r}=\frac{MG}{r^2}$, so the sum is indeed $0$. No antigravity here. The centripetal force is not an added force, the centripetal force is provided by gravity.
Answer: After a comment it becomes clear that there is deep misunderstanding here and the question title has nothing to do with the actual problem.

Let's get something basic clear: there is no "the centripetal force". That is no force out there that magically decides to come into being when an object moves in a circle. Rather "centripetal" is a label for those real force that point toward the center.
A centripetal force is one that points toward the center and causes acceleration transverse to the direction of motion. Given that the motion has velocity $v$ and radius $r$ you can know that the size of the acceleration is $v^2/r$ and the strength of the force is $mv^2/r$.
In this case that centripetal force is the force of gravity. That is the only force at work here. And because it points to the center we can also label it "centripetal" and know that it's magnitude must be $mv^2/r$ in order for the orbit to be circular.
As a general rule one identifies the centripetal force in any particular situation as the sum of force components pointing toward the center of rotation minus the sum of force components pointing away from the center:
$$ F_c = m\frac{v^2}{r} = \sum_i F_{i,in} - \sum_i F_{i,out} . $$
When you ask how to arrange things to get zero force you are asking the wrong questions: there is and should be a net force acting on the orbiting body because it is undergoing continuous acceleration.

A couple of the usual incantations are
$$ F_g = -G\frac{M}{r^3}\vec{r} \,,$$
and
$$ F_g = -G\frac{M}{r^2}\hat{r} \,.$$
In both cases the direction is taken as the negative of the radius vector to the point of consideration, giving it the correct (inward) direction. The choice to use the unit vector or not seems to be taken on a personal basis rather than on the basis of a well articulated reason.
Comment: @DonaldRoyAirey The forces are *not* balanced because the object is accelerating around the central mass $M$. dmckee has given an excellent explanation  while answering your question. If you need vector notation consider $$-G\frac{m_1m_2}{r_{12}^2}\hat{r}_{12}$$ where the unit vector points from $m_1$ toward $m_2$.
Comment: Thanks, but I don't see how that helps with balancing the forces.  I agree that gravity is directed inward (in the negative direction), but so is the centripetal force.
Answer: This is a very common "gotcha" for novices,  and something that is not covered well at all in textbooks, in my opinion.  The problem is one of semantics, not of physics.  The term centripetal force does not name a physical force the way gravitational force and electrostatic force do.  The words centripetal force stand for the net result of real forces in the case where the net force points to some center.
For example, on a ferris wheel, there are two forces on a person:  gravity (due to the earth) and the normal force (due to the chair).  The vector sum of these points toward the axis, so we call the sum the centripetal force.   There is no additional force that we would call the centripetal force.
In your case there is one force on the object, gravity.  There is not an additional centripetal force.
Comment: This. The language we use "the centripetal force" is a huge tripping point. Especially as it is usually introduced shortly after a chapter in which gravity, friction and "the normal force" all make their appearance. It's a wonder that every last student isn't confused on the matter.
Answer: A pedagogical note: Because students regularly try to look for the centripetal force and get confused (as noted by other answers here), I try to emphasize that it is the acceleration which is centripetal rather than the force (even though the sum is center directed). Because the acceleration is always the result of a sum, I have found that fewer students in my classes are confused by this statement for circular motion:
$$\frac{1}{m}\sum_i (F_r)_i=-a_r=-\frac{v^2}{r}.$$
The minus sign arises if you define the positive radial direction is outward from the center of the orbit.
Do the sum of forces, find the acceleration, and lastly decide whether the acceleration (or one of its components) is centripetal. Then you won't be looking for a centripetal force.
Comment: Hmmm ... nice. Just this semester I've started toying with the notion of treating known circular motion in a manner parallel to our treatment of equilibrium. "If you know an object is in equilibrium then you its acceleration is zero and therefore so is the net force; if you know an object is in circular motion, then you know it's acceleration is $v^2/r$ toward the center and therefore that the net force is $mv^2/r$ in the same direction.
Answer: Centripetal Force isn't a real force. It is a construct for representing the sum of different forces that cause circular motion. In the case of an orbit, the gravitational force is the centripetal force, which is what you stated in the first equation. They are NOT opposites, as you asked in the question. They do not become arranged to have a net force of zero. A net force of zero would mean that the object would not be in circular motion. An object in circular motion always has a net force (Centripetal Force) directed towards the center of rotation. In the case of an orbit, the gravitational force is the only force acting on the object, and is the centripetal force. If you spun an object attached to a string around in a circle, the tension in the string would be the centripetal force.
Comment: @Gert you have misunderstood the argument here. "Centripetal" is and always has been a label applied to a set of real forces. The real force here is gravity (ignoring the complications of GR for the moment), and there is no separate centripetal force. Thery are the same.
Comment: This is not a semantic distinction, it is fundamental. Gravity is a force. "Centripetal" isn't a force, it is a label for a sum of force components. What goes in the sum varies from problem to problem. Here is is gravity, for a car navigating a traffic-circle it is friction, for a stuntman riding around a vertical loop-dee-loop it is the normal force on his tires plus $mg\cos\theta$ (with theta measured from vertical up).
Comment: By your own reasoning the gravitational force is not a real force. That is incorrect.
Comment: @dmckee: I'll bear the semantics in mind but it sounds much like a *distinction without a difference* to me.
Answer: You are a bit confused by the meaning of the centripetal and centrifugal force. First, in a reference frame at rest relative to the center of mass, the gravity IS the centripetal force (just because it points towards the center). My impression is that you assumed that there where two forces, gravity and the centrifugal force. Second, in a reference frame in which the rotating mass it at rest, there must be two forces that balance each other. What is this second force? it is called a pseudoforce, that appears when you are not in an inertial frame (the rotating frame is not inertial). In the case of a rotating frame of reference reference  the pseudo force is a centrifugal force, opposite in direction to gravity. That is why in this reference frame the mass is at rest.


Can I get a restricted ATP based on part 61 training?

Question: I graduated from a college with 60 credits that are related to aviation but I got my IR and CPL from out of school which is part 61. Am I still qualified as a candidate who can apply for a 1000hr R-ATP?
Comment: It's not really a dupe but [this question](https://aviation.stackexchange.com/q/52486/62) probably covers the same information. See [this answer](https://aviation.stackexchange.com/a/52508/62) in particular.
Answer: Part 61.160 says no:

(b) A person may apply for an airline transport pilot certificate with
  an airplane category multiengine class rating or an airline transport
  pilot certificate concurrently with an airplane type rating with a
  minimum of 1,000 hours of total time as a pilot if the person:
(1) Holds a Bachelor's degree with an aviation major from an
  institution of higher education, as defined in §61.1, that has been
  issued a letter of authorization by the Administrator under §61.169;
(2) Completes 60 semester credit hours of aviation and
  aviation-related coursework that has been recognized by the
  Administrator as coursework designed to improve and enhance the
  knowledge and skills of a person seeking a career as a professional
  pilot;
(3) Holds a commercial pilot certificate with an airplane category and
  instrument rating if:
(i) The required ground training was completed as part of an approved
  part 141 curriculum at the institution of higher education; and
(ii) The required flight training was completed as part of an approved
  part 141 curriculum at the institution of higher education or at a
  part 141 pilot school that has a training agreement under §141.26 of
  this chapter with the institution of higher education; and
(4) Presents official transcripts or other documentation acceptable to
  the Administrator from the institution of higher education certifying
  that the graduate has satisfied the requirements in paragraphs (b)(1)
  through (3) of this section.
Answer: Unfortunately, I don't believe you are.  The rule for 1000-hour restricted ATP is that you have to graduate from an approved four-year part 141 university with a commercial license earned at that school.  BoldMethod describes it pretty well:
https://www.boldmethod.com/blog/2013/08/1500-hour-rule-restricted-atp/
There's also a link towards the bottom of that page that leads to the FAA, which explains the exceptions.


Was Dulé Hill appearing so briefly in The West Wing because he was co-starring in Psych?

Question: Sometime around the later years of The West Wing (season 4? 5?), Dulé Hill (Charlie Young) tends to only appear for one brief scene in most episodes. (Fans complained about it, e.g. in Television Without Pity.) Was this because Dulé Hill was co-starring as Burton Guster in Psych? Was Hill, maybe, flying down from Vancouver (where Psych was filmed) to L.A. (where The West Wing was filmed) once a month or so to record a month-or-so's worth of scenes?
Comment: "West Wing" season 4/5 aired between _[2002 and 2004](https://en.wikipedia.org/wiki/List_of_The_West_Wing_episodes)_, "Psych" premiered in _[July 2006](https://en.wikipedia.org/wiki/List_of_Psych_episodes)_.
Comment: His character was actually pretty peripheral. When the episodes concentrated on the *politics* they largely ignored the office characters like Charlie and Donna.
Answer: No, this is not why.
Psych premiered in July 2006, the same year The West Wing's seventh and final season aired.
Answer: I think it had a lot to do with the departure of Aaron Sorkin. Sorkin wrote the first four seasons, then left the show after which it was written by other people. The end of season 4 is when the President's daughter Zoey gets kidnapped, and Charlie was a big character up to that point since he had the unrequited love for her.
So I'd say a few episodes into season 5 is when Charlie started to appear less and less. It's also, in my opinion, when the quality of the show took a nosedive. Season 7 is excellent but it's basically a different show, it's a show about a presidential election campaign with eerie parallels to 2008's real life election.
Comment: "Unrequited" isn't the word; they had a long-term relationship.


Sizing for a flush countersunk screw

Question: I'm fitting some old keyhole covers. I need two screws for each. The hole in the cover is about 3 mm and 4 mm at the top of the opening. I tried buying some 3×12 mm screws but the head is too wide. I can't find out how to know the size of the head of any screws as it's never shown. Is there a ratio or something? Any idea where I can get suitable screws in the UK?
Answer: Wood screws like most other types of fasteners are made in standard sizes. You can find tables of data online that will show the size information that you are looking for. The image below shows one such table that should be able to guide you as to the screw head diameter for various common wood screws.

(Table Source: https://www.metalsheets.co.uk/wood-screw-guages-in-metric/)

Sizing for a flush countersunk screw


Difference between constant curvature kinematics and rigid link kinematics

Question: What is the difference between constant curvature kinematics and rigid link kinematics and what is their respective definition?
Comment: The question was edited, a definition of the kinematics problem (not a kinematic structure) has been removed, since it offered no context to the question formulated after the verbatim copy of the definition
Answer: Rigid link kinematics assumes that the robot is made of rigid structural elements connected by pivot or sliding joints, and describes the locations of points on the robot (or more generally, the locations and orientations of frames attached to the robot) as a function of the joint angles.
Constant-curvature kinematics assumes that the robot is made up of a series of segments that can bend into constant-curvature (i.e., circular) arcs, and describes the locations of points (or locations and orientations of frames) as a function of the segment curvatures.


Stability of carbanion

Question: I am confused about how one can determine the stability of carbanions using pKa-values. I know that the stability of carbanions can be determined by the inductive effect, hybridization of the charged-bearing atom and resonance, but when searching about how pKa can do so I don't find anything. The lower the pKa-value, the stronger the acid and hence, the weaker the conjugate base, does this have anything to do with the stability since weak bases are unreactive and thus more stable?
Comment: Except for the mistake SteffX has pointed out, I think your argument is valid but you need to pay attention to the context of "stability".
Answer: As commented by SteffX, less the $\mathrm{p}K_\mathrm{a}$, more stronger the acid. More stronger acid means that the conjugate base or the anion formed after donating the proton is more stable compared to the carbanion of an acid of a  higher $\mathrm{p}K_\mathrm{a}$ value. So, if the anion formed is a carbanion, then lower the $\mathrm{p}K_\mathrm{a}$, the stable the carbanion is.
Comment: Why the downvote? Have I written anything wrong?
Answer: The stability of every molecule is related to the spreading of charges: the more you can share a charge among atoms, the more stable the molecule is.
For a carbanion, every group WITHDRAWING electrons to the carbanion center will stabilize it (i.e. the negative charge will be shared by several atoms)
For a carbocation, every group GIVING electrons to the carbocation will stabilize it (i.e. the localized positive charge will be compensated for... at least partially)

Stability of carbanion


What is the name of the second tool

Question:
Can somebody please help me out by naming the second tool in the row of tools in this image ? Thank you
Comment: This may not be a woodworking tool, as the syringe isn't and the tool along the bottom isn't either. It could merely be the detached handle from something larger, even possibly a big piece of equipment.
Comment: Ok I understand, I was only wondering because today I found the same exact tool with the angled neck and curved tip outside my development and for the life of me I just can't find out what it is.
Comment: Based on the offset of the hook and the spinning capability of the handle, I'd take a wild guess that it's a twisting tool of some form. Would one use such a tool to make DIY barbed wire? A DIY rope making rig?
Answer: Aha! I found it deep in the recesses of my alleged mind, and on The Google too. It's a rebar wire twisting tool. A length of wire with loops at each end is wrapped around an intersection of rebar. The tool passes through the loops and is spun to rapidly secure the rebar together, preventing it from shifting during the pour.
An auction posted to eBay also suggests that it is a rope twisting tool for the farm.

Uh oh, not a wood working tool!
Comment: I never used one of these as an Ironworker, pliers being what everyone out of my hall used, (pliers have the advantage of being able to cut wire also) but I have seen these being used commonly in other countries with rebar and they are also common on other wire binding applications like farm usage. While technically not a woodworking tool, I can assure you that plenty off wood has been wired together.
Comment: These are used with a roll of tie wires that have pre-formed loops at both ends - I have two of them and use them for concrete rebar tying. You can live without the tool, but it's far faster with the tool.
Answer: That is a spring puller. It appears home made. It is to reach into a tight place & pull up a coil spring. Or to unhook a coil spring.

What is the name of the second tool


"Had changed destiny"

Question: I want to write something that means the same thing as "had changed destiny." I was going to use those words, but something didn't seem right. I googled that phrase, and came up with only one thing. So I don't think it's grammatically correct. Is it? What could I say that means the same thing?
Comment: You are going to have to give us more context if you want constructive answers.  Many people would not regard "destiny" as something that can be changed, for instance.
Comment: Like say someone is telling lots of lies, and they are enough to change someone else's destiny and make them go down the wrong road.
Comment: you mean like a fake astrologer?
Comment: @JoseK Simple untruthful word said in the right ear can destroy a kingdom you know. Without need for fake astrology :)
Answer: There is nothing wrong with your had changed destiny grammatically. IF you don't like the sound of it, rephrase. You can use fate instead of destiny, altered instead of changed, you can change the grammatical structure of your sentence (use passive voice for example)

Someone's destiny was changed

Or there's another nice construction (don't remember it's proper grammatical name):

Someone had his/her destiny changed

There are tons of other ways to say the same thing

John's lies influenced Anne's fate.
John loved lying, artfully altering the very fate of those listening to him with only words.
Comment: I think altered is a better verb for this for sure.

"Had changed destiny"


Cellphone service in Southeast Asia?

Question: I am travelling to various destinations in Southeast Asia. What is the best way to go about getting cell + data service? Is there a telecom that offers cheap roaming throughout a broad region, or will I need to get a SIM card in each country I travel to (most of my destinations will be a few days at a time, the most being a week, so this would be a bit inefficient)?
Answer: The best way to get cell phone service throughout Southeast Asia is to buy a SIM card in each country; probably at the airport when you land.
You can buy a SIM at most international airports with minimal wait. Less than $20.00 US will usually last you for a week (voice, data, SMS, and tethering). The greatest overhead will be for them to potentially copy your passport.
I've found this to be reasonably efficient; the cost of obtaining a SIM is easily outweighed by the benefit of having a fully functional smartphone. Furthermore, you have the experts there who usually have a decent command of English. I don't leave the stand until I am able to browse a website.
Like any system, the more familiar you are with it the easier it is to work with.
Comment: In Vietnam 20USD will last you a few months of "unlimited" data (high speed for a few GB then speed is reduced to 2G)
Comment: I got my SIM in Laos from a bodega in Luang Prabang (no airport since I arrived via the Mekong). Make sure you ask for data! And a lot of Laos is still on 2G so if you find your SIM isn't working try downgrading in your cellular options.
Answer: The bad news is that there's no sensible pan-Southeast Asian solution nor one in sight.  There are no operators that cover the whole region, or even more than a country or two, and thanks to nationalistic telecoms policies and the lack of something like the EU cracking heads, this is unlikely to change anytime soon.
The good news is that prepaid SIMs are dirt cheap, ubiquitous and easy to get, you generally can pick them up in any corner store with minimal hassle for as little as US$1.  So if you're willing to change cards and numbers every time you change countries, getting mobile service is not a problem.
(And as an aside, if you're traveling for pleasure and changing countries every few days you should probably reconsider your itinerary a bit, that's not enough to do any of the larger countries justice.)
Answer: If you have a contact in Hong Kong to get you a contracted simcard, you can use Hutchison ("3") data roaming. I am using this now since 3-4 years and I am very happy with it. They cover almost the whole world and you can go online for 168HKD per 24 hours, 88 for China, and Macau, HKG is included in the plan. They also allow tethering.
Smartone/Vodafone has a similar offer, by from my experience they do not allow tethering abroad.
This is a good idea if you are seldom in an office and depend on a reliable internet connection on the road.
Comment: While that's way cheaper than traditional pay-per-byte roaming, 168 HKD is still ~US$21/day, and there's a limit of 100 MB/day (50 on Smartone/VF).  Buying local SIMs is still cheaper for multiday trips or if you need more data, and you get a local number as well.
Comment: @jpatokal Yes. I think this system is great for business use since it's reliable, one-stop shopping since you do not have to run and search for local SIM cards in each destination, specially if you travel around a lot. For the casual holiday traveler who spends 2 weeks in one country and 2 more in another, the local SIM might be the better alternative.

Cellphone service in Southeast Asia?


Where and why does deep learning shine?

Question: With all the media talk and hype about deep learning these days, I read some elementary stuff about it. I just found that it is just another machine learning method to learn patterns from data. But my question is: where does and why this method shine? Why all the talk about it right now? I.e. what is the fuss all about?
Comment: Look at Geoff Hinton's and Andrew Ng's qualitative youtube lectures for an easy overview of why it's so good.
Answer: The main purported benefits:
(1) Don't need to hand engineer features for non-linear learning problems (save time and scalable to the future, since hand engineering is seen by some as a short-term band-aid)
(2) The learnt features are sometimes better than the best hand-engineered features, and can be so complex (computer vision - e.g. face-like features) that it would take way too much human time to engineer.
(3) Can use unlabeled data to pre-train the network. Suppose we have 1000000 unlabeled images and 1000 labeled images. We can now drastically improve a supervised learning algorithm by pre-training on the 1000000 unlabeled images with deep learning. In addition, in some domains we have so much unlabeled data but labeled data is hard to find. An algorithm that can use this unlabeled data to improve classification is valuable.
(4) Empirically, smashed many benchmarks that were only seeing incremental improvements until the introduction of deep learning methods.
(5) Same algorithm works in multiple areas with raw (perhaps with minor pre-processing) inputs.
(6) Keeps improving as more data is fed to the network (assuming stationary distributions etc).
Answer: Another important point in addition to the above (I don't have sufficient rep to merely add it as a comment) is that it is a generative model (Deep Belief Nets at least) and thus you can sample from the learned distributions - this can have some major benefits in certain applications where you want to generate synthetic data corresponding to the learned classes/clusters.
Comment: This is not a general property of deep learning, but of the concrete model in question. E.g. you can sample from a Gaussian but not from a logistic regression. You can also sample from a variety of deep learning models, e.g. Deep belief nets as you said, deep Boltzmann machines, Deep latent Gaussian models, etc. But you cannot sample from drednets, which are the models that have been used in all the impressive applications.
Comment: But the same holds for a gaussian regression model, if by that you mean basic linear regression.
Comment: ... Why can't you sample from a logistic regression?
Comment: Given an LR model $p(c|x)$, you can sample the class conditioned on the input. But you cannot sample an input. Thus, it is more of a discriminativ/generative distinction.

Where and why does deep learning shine?


Did Tolkien liken Aragorn to a wolf?

Question: I seem to recall from somewhere that Tolkien likened Aragorn to a type of animal, I think a wolf, but I can't for the life of me remember where he may have said this. Did Tolkien actually make a comparison like this? If so, where did he make this comparison?
Comment: I wonder if you actually mean Aragon I, Elessar's great-great-great-great-great-great-great-great-great grandfather who was slain by a pack of wild wolves in Eriador. Just like Dragons, Tolkien made a clear distinction that Wolves were inherently evil twisted beings, so I doubt that this was the basis of Aragorn's character.
Comment: Could it have been earlier in the books, maybe in the vicinity of Bree? I remember he's described as unkempt, grey-eyed and fresh out of the wilderness, so potentially fairly wolfish. If the comparison is ever actually made, it would probably be around this time, when he is still just Strider to the Hobbits.
Comment: Seems unlikely. The Company fight wolves on at least one occasion.
Comment: from a quick ctrl+f search of LOTR, none of the references to the word 'wolf' compare Aragorn to one
Answer: This is perhaps stretching, but might you be thinking of "Thorongil"? It's the name Aragorn used during his time in Gondor and Rohan, and means "Eagle of the Star":

Thorongil men called him in Gondor, the Eagle of the Star, for he was swift and keen-eyed, and wore a silver star upon his cloak; but no one knew his true name nor in what land he was born.
Return of the King Appendix A "Annals of the Kings and Rulers" Chapter 1: "The Númenórean Kings" (iv) Gondor and the Heirs of Anárion The Stewards

That Thorongil is Aragorn is revealed in Appendix B:

2957-80 Aragorn undertakes his great journeys and errantries. As Thorongil he serves in disguise both Thengel of Rohan and Ecthelion II of Gondor.
Return of the King Appendix B "The Tale of Years" (ii) The Third Age

It would also be a much more complimentary comparison, since eagles are traditionally associated with Manwë (good) and wolves with Morgoth/Sauron (bad).

Did Tolkien liken Aragorn to a wolf?


Can't open my bitcoin wallet

Question: Help please.  In 2013 I could not remember my password.  I just recovered my password.  I try to open the same wallet I used before but only get a message from Adobe Reader "unable to open because file is not supported or is damaged".  This happens on all my back-ups also.  What can I do to get in my wallet? Thank you in advance.
Answer: This sounds like your operating system thinks that your wallet file is supposed to be opened by Adobe Reader.  Adobe Reader will not know what to do with this file, so you'll get that error.  Try opening the file directly from a Bitcoin wallet, or change your operating system to recognize wallet files (.dat) as Bitcoin wallet files, and not documents.  If you are using Windows, try this: http://windows.microsoft.com/en-us/windows/set-program-access-computer-defaults#1TC=windows-7

Can't open my bitcoin wallet


Reduction of butadiene with Na/NH3 - stereoselectivity

Question: Why is the major product of the reduction of butadiene with sodium in liquid ammonia cis-2-butene (60:40) when it is thermodynamically less stable than trans-2-butene?
Comment: [This page discusses the same reaction](http://research.cm.utexas.edu/nbauld/unit6_anrad.htm) (scheme 8) but it doesn't speak of the stereoselectivity. [This paper](http://pubs.acs.org/doi/abs/10.1021/jo01300a008?journalCode=joceah) seems to explain it in detail (i.e. the ratio is temperature-dependent) but is behind a paywall.:\
Comment: This question is from Ian Fleming - Molecular Orbitals, so I believe an MO explanation is desirable.
Comment: Page 96. question no. 6.
Answer: At first ... I don't like books that don't give proper solutions to their questions$^{*0}$. This doesn't help anyone ... or at least not me.
Old sources
I started my search on Reaxys and there are two old papers that I found when searching for $$\text{buta-1,3-diene} \xrightarrow{\ce{Na}} \text{but-2-ene}$$
They are:

K. Ziegler, F. Häffner, H. Grimm, Liebigs Ann. Chem. 1937, 528, 105
W. Hückel, H. Bretscheinder, Liebigs Ann. Chem. 1939, 540, 157

In both (german$^{*1}$) papers they work at very low temperatures around $\mathrm{-70\ldots-60~^\circ C}$. Both say that they get mainly the Z-isomer and discuss somehow why this happens. They think about their reaction as follows: $$\ce{dien + 2 M + 2R2NH -> dien.H2 + 2R2N.M}$$
They think that the butadiene is somehow pre-oriented towards the sodium surface from which the preference for the cis-isomer follows.
Old but not soooo old sources
Through the paper that M.A.Ramezani mentioned (W. Reeve, D. R. Kuroda, J. Org. Chem. 1980, 45 (12), 2305–2307), I found another paper (N. L. Bauld, J. Am. Chem. Soc. 1962, 84 (22), 4347–4348) that clarifies some of the mysteries. It is about the stereochemistry of metal addition to conjugated systems, esp. dienes. One of the first things that is shown is the following table.

$$\small\begin{array}{ccc}
\hline
\text{Diene} & \text{Temp., }\mathrm{^\circ C} & \text{% cis-Olefin}\\
\hline
\text{Butadiene} & -33 & 13\\
\text{Butadiene} & -78 & 50\\
\text{1,3-Pentadiene} & -33,\,-78 & 68\\
\hline
\end{array}$$

It contains the cis-yields from v.p.c. analyses for two different temperatures for the reduction of butadiene with sodium in liquid ammonia. As one can see, there is less Z-but-2-ene produced when the temperature is higher$^{*2}$ (13 %) and more when the temperature is very low (50 %).
What the author also mentions is, that there is in every case more Z-product produced than one would expect, because there exists only about 3-7 % of Z-butadiene at room temperature (which must be even lower at lower temperatures). So somehow the metal is included, wich is described by Bauld with a cyclic complex of sodium and the radical anion that is supported by the experiments of Reeve and Kuroda.

As there are many possibilities how the sodium ion "binds" to E- and Z-form$^{*3}$ and there is also the possibility that there are two (or maybe none?) sodium ions involved, this is far off from the scope of this answer.
Besides that, I roughly calculated the structures from the mechanism that is schown in Scheme 8 from the other link by M.A.Ramezani --which, as I found out in this moment, is also from Prof. N. L. Bauld--. Below are the corresponding $\pi$-MO's$^{*4}$ -- you can imagine the mechanism with involved sodium ion(s) to be similar but somehow with the above cyclic intermediate.

TL,DR
The question in Flemings book lacks some informations. The reaction in liquid ammonia does not only depend on temperature (which was not stated!) but also on the rests that are applied to the diene. For Buta-1,3-diene in $\ce{Na/NH3}$, the Z-isomer is favored when cool temperatures are applied and therefore yield the kinetic product of the reaction. This follows from a cyclic radical anion intermediate with the sodium ion. But when the reaction temperature is rised, the thermodynamically preferred E-product is favored, as is shown by Bauld (see the table).
To get to know more about what happens when different methyl and ethyl groups are added, read the paper by Reeve & Kuroda.

$^{*0}$ Dare you, Szabo and Ostlund ಠ_ಠ
$^{*1}$ Old german papers are a joy to read ... usually the older the better.
$^{*2}$ $\mathrm{-33~^\circ C}$ is the boiling point of ammonia
$^{*3}$ In my case it seems to be purely vdW-interactions but it is gas-phase, this is a small basis set and even if the functional fits there was no dispersion correction.
$^{*4}$ be aware ... those are Kohn-Sham orbitals
Comment: Thank you for the comprehend answer and I totally agree with your first statement.


What does "do" mean in "What do I do"?

Question: What does "do" mean in "What do I do?" I think it means "What do I usually do?", but I don't know why anyone would ask what they usually do. Does it mean something else?
Comment: A third possibility (two others have been mentioned in the answers already) is this: A: Oh, no. You're doing it again! B: What? A: You do it every time. B: **What do I do?** A: You roll your eyes and snort! I hate that!
Answer: Do can occur both as an auxiliary verb and as a lexical verb. In your example, it is an auxiliary verb in the first instance and a lexical verb in the second instance. The lexical verb, I assume, presents no difficulty. It means things like perform, execute, achieve, carry out, effect, bring to pass.
As an auxiliary verb, do is used to form questions and negatives. When a question begins with a word like what, and that word is not the subject, auxiliary do (or does in the third person singular) is placed before the subject of the clause. This applies when the lexical verb is do, just as much as it does with any other lexical verb.
In a clause such as this, do, as ctype.h has suggested, can mean should, but it does not necessarily do so. The question could, for example, be a response, seeking clarification, to the question 'What is your job?'
Answer: In this case, the first do means should. Therefore, What do I do? means What should I do?. If someone asks What do I do? they are not asking what they usually do, they are asking what they should do.
While this usage is common in colloquial English, it should usually be avoided in formal English; it would be better to say What should I do? unless you are quoting someone.
Additionally, there is a similar question, What do you do?, which usually means What job do you do? or Where do you work?. This, like the other question, is also informal.
Comment: Not just that, as I have suggested in my own answer.

What does "do" mean in "What do I do"?


What can I substitute for Gruyère in quiche lorràine?

Question: Gruyère cheese is too expensive here and I want make quiche lorràine. Is there some other cheese that I could substitute for the gruyère that would preserve the original flavor?
Comment: As your profile mentions Brazil ... I'm not familiar with their cheeses, but a little research seems to be pointing me to either *queijo minas curado* (or maybe *meia-cura*) or  *queijo de colônia*.
Answer: There are a couple variations that if you're lucky might be cheaper: Beaufort and Comté. (I've only actually tried Comté, but I've seen Beaufort listed along with it and Gruyère.)
A bit farther away are Emmentaler and Jarlsberg. They both have the Swiss cheese flavor but aren't quite as firm nicely aged. Beyond that there's simply all the varieties of (American) Swiss cheese, which are generally roughly like Emmanteler but likely even softer.
If you use one of the farther away substitutes, I'd suggest adding in some hard aged cheese as well to make up for the difference. For example, I've used (American) Swiss cheese plus dry jack and parmesan and been pretty happy with it. The specific hard aged cheese probably doesn't matter a whole lot, as long as it has some nice aged flavor and not a lot of overpowering other flavors.
Comment: Gruyere is pretty expensive here as well. It's about 4x the cost of jarlsberg which is a household favorite in my house. Most recipes that have called for a large amount of cheese, I have used jarlsberg as the substitute. The cheese closest to the rind is nice and firm. Not as hard as Gruyere, but harder than the nice soft interior of the wheel.
Answer: If you want to be faithful to the French terminology, a quiche (lorraine) does not contain cheese. Ever. It's not even a matter of being "classic" or  "authentic", putting cheese on a tarte is very common, but it's just called differently if you do (namely tarte). Have you ever tried an actual French quiche (i.e. without cheese)? Maybe you will like it.
Alternatively, you can put just about any cheese on it. Results will differ, hard somewhat aged cow-milk cheese like those suggested by @Jefromi will be closest to gruyère but anything goes really: Dutch cheese, soft cheese like maroilles or munster, blue cheese, goat cheese, feta cheese, feel free to experiment with what's available where you are.
Incidentally, if anything, I think it's actually more common to add a relatively bland, creamy cheese like emmentaler rather than a stronger older cheese to a tarte so there is no reason to consider the latter as the ingredient to be substituted or a tarte with gruyère as the "original flavor" to aim for.
Now if you like that and want to do it on the cheap, then maybe comté or beaufort are not very good options, as they might be just as expensive and possibly harder to find. I would try to look for an aged Dutch-like cheese (locally produced Gouda imitation or something like that).
Answer: You could just find a recipe that doesn't use it. Classic quiche Lorraine does not contain cheese.
Comment: That may be true but if the op wants to make a specific recipe that does call for cheese, it's irrelevant that you have a version that doesn't.
Comment: According to Julia Child's Mastering the Art of French cooking, "the classic quiche Lorraine contains heavy cream, eggs and bacon, no cheese."
Comment: Just because some chefs have decided to add the cheese, it doesn't mean that all recipes have to have it. I can't say which version is more "classic", but cheeseless Lorraine is quite normal for me.
Comment: https://www.google.com/search?q=classic+quiche+Lorraine+does+NOT+contain+cheese&oq=classic+quiche+Lorraine+does+NOT+contain+cheese&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8 The "classic" is unknown. Several world-renowned chefs use cheese today.


where can I use aren't?

Question: where I have to use aren't ? can I use "aren't" when I'm talking about clothes? example; " aren't this blouses a little expensive?" is it right?
Answer: Your use of aren't is correct, although you need "these blouses", not "this blouses". If you want to refer to a single item, you need to use isn't. Aren't is a contraction is are not, and isn't is a contraction of is not.

Aren't these blouses a little expensive?
Isn't this blouse a little expensive?
Comment: Or if you wanna be too informal you could use **ain't** for either *plural* or *singular*.
Answer: Mick probably gave you the answer you need, but a broader answer to when you can use "aren't" is that you can use it in present tense negative with the second-person singular and first-, second-, and third-persons plural:
Second-person singular: You aren't.
First-person plural: We aren't.
Second-person plural: You aren't.
Third-person plural: They aren't. (Also, "These blouses aren't.")
All of these become negative interrogative simply by reversing their order. And in a fluke of English, you can also use aren't in present tense negative interrogative with the first-person singular: "Aren't I?" Although, if you didn't use a contraction, you'd conjugate it as "Am I not?"

where can I use aren't?


Who pays the bills?

Question: I am curious as to who pays the bills to keep the lights on around here? Is the site supported purely by advertisements? Does stackexchange itself own the site?
Answer: This was discussed on Meta StackOverflow: What is Stack Overflow's business model?
In short, they get money from Careers 2.0 and ads on SO, SF and a little SU.
Comment: you mean the $1000 I've been paying Kortuk wasn't necessary?
Comment: @rawbrawb Now everyone wants a cut, double that.
Comment: Thanks camil, that thread was very informative - exactly what I was looking for.
Comment: Yes of course, I am just leaving it open to give an opportunity for others to add their own information. I will accept in a day or so.
Answer: Stack Exchange works primarily from VC funding. It raised 12 million USD in March' 11. This is what keeps the sites up.
The earnings from  sources mentioned in Jeff's answer make up a portion of the earnings but alone, are not enough to keep the servers running and employees paid*.
Also, note that the company has expanded significantly since 2011 whereas ads have not increased in number. Stack Exchange is focusing mainly on expanding Careers and increasing earnings from it.
*I will add a source for this when I find it. I think it was mentioned in one of the podcasts.

Who pays the bills?


SQL Server Management Studio 17.9 installation fails on Windows Server2016

Question: I am trying to install SSMS 17.9 on a Windows 2016 server remotely. But after installation, while trying to open the Management Studio, its showing an error:

The application was unable to start correctly (0xc000007b).
  SSMS-Setup-ENU.exe /install /quiet /passive /norestart /Logs log.txt  -- This is the installation command i used.

Do I need to install Visual Studio as a pre-requisite? Please suggest a solution. Thanks in advance
Answer: No. Visual Studio is not pre-requisite. but .Net framework definitely is. so from role and features please add .Net Framework and re-launch the setup. it should work then


Can you play FIFA 15 Co-op on one team with 3 players?

Question: I was wondering if you can play with 3 players Co-op on one team, or 2 v 1 ?
Answer: Yes, you can. Simply go into a game, have three controllers on, and decide which players are going to be on which team when it displays the screen to decide which controller plays which side. Have a 2-on-1 game or have all three on the same team. The same can be done with four players, as well.


What are the best techniques to play overtones in the saxophone?

Question: I play Alto Saxophone, and I've been wondering this for quite a while now.
I've not played one single overtone yet, so what are your suggestions?
Answer: Edit: my use of the word "embouchure" is apparently not in accordance to the common meaning. See comments below. You should perhaps mentally replace all instances of the word embouchure with something like "shape of oral cavity". Apologies and thanks to NReilingh for pointing it out.

For practicing overtones, first you need to get your embouchure used to the overtones. A simple way of doing it is to finger the higher register, start blowing, and letting go of the octave key. Repeat it several times until you can play the higher note from the attack, without using the octave key. Once you get the first one down, the rest will follow easier.
As far as I know, overtone practice is a way to train you embouchure. When practicing (again, in the first few times you may have to repeat step 1 to regain muscle memory) try to attack the lower register note and shift to the overtone without tonguing or in anyway stopping the airflow. You likely won't be able to do it at first, but it will come with practice.
To practice the second overtone, one trick that my teacher taught was to play the actual note (say, the high D). Then hold your embouchure, finger the base note (in this case low G), and blow. In the beginning you will only be able to hit it once every few times, but with practice you will get better control.
After you can get the second overtone on attack, you should repeat the exercise of jumping between overtones without interrupting airflow, but now jumping between the fundamental, the first, and the second overtones.
(Part of the production of overtones depends on your horn and its tuning. On my alto it is easier actually to hit the third overtone for low D [high D] then the second [middle A]; while for everything else lower than low E the second overtone is easier.)
Comment: I'm no expert, but I was under the impression that saxophone embouchure was essentially static, and that overtones were produced by voicing with the throat. (Source: [Dr. C. Creviston](http://christophercreviston.weebly.com/bio.html))
Comment: @NReilingh, Different musicians play differently and make different suggestions in that regard, but the usual advice is to keep the lips and the oral cavity static within the regular range. When it comes to higher harmonics and altissimo, it actually becomes almost impossible to play the notes without adjusting how far in the mouthpiece is, how tight the lips are around it and so on. But it should be avoided as much as possible. For the same reason why flautists shouldn't roll the headjoint to produce a more clear sound.
Answer: Something to keep in mind when you practice overtones is that the embouchure shouldn't really change, but the position of the tongue in your mouth will change significantly (pay attention, for example, to how your tongue moves in your mouth when you whistle an octave).
A common mistake is to tighten you mouth on the mouthpiece harder when playing overtones, but you need to resist that temptation, and find what works for you (I tend to think of an "ah" kind of sound to keep a round mouth). The warmup exercise I use often is to play a low Bb, then, without moving the fingers, play a middle-of-the-staff Bb, then a top-line F (all can be played with the low Bb fingering). Then I do the same thing with B-B-F#, then C-C-G, C#-C#-G#, and D-D-A. The second time through (or once you master those overtones), add the 3rd octave to the series (e.g. Bb-bb-F-Bb). You can stretch it out at least another few overtones, but those exercises are a good start and they are useful for other aspects of your technique as well.
If you find it difficult to get the higher overtones, try playing you low Bb fingering with the octave key, then lift the octave key and try to keep the same sound. After you have the hang of playing overtones, try playing with different dynamics or going up the scale (e.i. low Bb, mid Bb, low C, mid C, low D, mid D, etc.)
Answer: Overtones do very much depend on your setup, especially your neck and your mouthpiece, but also your sax body itself.
Alan's tips (the last paragraph) are very good. You can also practice your overtones with just the neck and mouthpiece, this allows you to get more control over your overtones. Again, how easy they are to create very much depends on your neck. This is the reason aftermarket necks and mouthpieces do exist. They do make a difference.
My secret trick is looking up. Your mouth will automatically readjust your tongue (wheter you'd want it or not) and you will have an easier time to produce overtones.
Literally just look to the roof while trying to play overtones.


Can I write the same text in method section in two different project?

Question: I am working on two projects now and both of them have similar methods. What if I write the same text in the method part? Will it be count as plagiarism? I am almost finished working on them and both of them will be submitted in a different journal(one already accepted; under review, another one will be submitted soon)
Answer: Reusing the text from a previous paper in a new paper is a form of "self-plagiarism" that publishers are increasingly unwilling to accept.  It's true that this was a relatively common practice in the past, but the advent of plagiarism detection software has made this practice visible and publishers are starting to crack down on it.
One reason for this is that publishers want to publish "original" content and not repeat previously published material.  Another reason for this is that publishers want to avoid violating copyrights owned by other publishers- the publisher of the first paper could easily sue the publisher of the second paper for copyright violation.
The way things now, chances are that when you submit the later paper you'll have it sent back to you with instructions to remove the self-plagiarism before the journal will review the paper.
Answer: Whenever "Self-Plagiarism" is a concern, you need to ask yourself

What is the main contribution to the community of this paper?

Recycling background and methodology text are probably ok.  Hopefully, your methodology isn't changing that much from experiment to experiment.  Academics spend years repeating the same experiments, usually only changing a few things.
From your question, it sounds like you will have a different data set per paper, which is almost certain to mean each paper can stand on its own contributions.
Answer: I have repeated the experimental method text a lot.
Sometimes you can just cite another paper (samples prepared as described in X) but that can be inconvenient for various reasons.  The method may not be very long so it is inconvenient to send reader to another paper.  Or sometimes both papers are simultaneous submissions.  I don't mind a citation to an "in press" or "in review" paper when you really need to--but in this case, you could and maybe should just share the details.  Another case is when only small details are different.  And, yes, sometimes you can say "as described in X with variations Y" but this can also become a real dog's breakfast and mystery hunt, requiring a lot of back and forth to the X paper while reading current paper.
If you want to really CYA, you could do something like, "the chemical synthesis is similar to that used in other study(ies) [citation].  And then go ahead and give the whole method.
But really, I don't think anyone will question same author recycling method text or even some intro background text.  For the people who follow the area well, they are going to concentrate more on the results, regardless, and be able to skim past stuff they have seen before.  For others who haven't read the whole set of papers, it can be convenient to have the methods there instead of some dog's breakfast of back forth citations.
Really...I would emphasize what you think serves the reader best.  If a cite to another paper works better use that.  If having the info there works better use that.  I think you generally can have a hunch on this.


When I open Gallery phone starts going through a Gmail installation Wizard

Question: My friend has an Android (he's an older gentleman and not very mobile phone savy) and when he opens the Gallery, a Gmail installation screen pops up. This just started today. He doesn't have a Gmail address and doesn't want one. He simply wanted to look at a picture from his Gallery and it went to this Gmail installation screen. I've looked at it and once it lands on that screen, I can't get past it, other than creating a Gmail account, which I'm not going to do. . I was able to get to the Gallery via the attachment function in his email, and all the images are there, so I know the Gallery "content" still exists. I just have no idea why "Gallery" would point to a Gmail setup screen instead of the Gallery I personally have an iphone so I have no idea how to help him. Any help anyone can provide is appreciated.
Comment: This would be like having an iPhone but refusing to create an iTunes account...
Answer: I have a feeling the "gallery" app somehow links up to google photos or any of google's services and hence it's requiesting your gmail authentication.
It is generally a rule of thumb to association an android smartphone with at least one functioning gmail account. This is what enables you to access the play store and certain other core features of the smart phone.
You may try to do one of the following:
1. Use android's basic file explorer that is built in.
Depending on what version of android you are in, you should be able to get to the file explorer via Settings > USB & Storage > Explore ( or simply tap on images)
2. Install a third party gallery app
You may try to install a third party gallery app on your phone in order to access the photos in your local storage. If you are installing it via the play store, it is again going to prompt you to sign into your google account. Consequently, you can download the apk separately and have it installed as well. You will need to  first disable unauthorized app check (settings > Security > Unknown sources (uncheck this).
Post this, you can download any gallery apk. I would recommend you download this app called Focus. It should be available in apkmirror.com. Since I'm answering this from my office, I am unable to provide you with the direct link.
You many then click on the downloaded notification in order to install the app. Should you be unable to do that for whatsoever reason, you will still be able to locate the app via android's default file manager (settings > USB & Storage > Explore --> Then nagivage to downloads directory.


Do the words menorah and Torah have the same root in Hebrew?

Question: I'm studying the parashat Behaaloscha, the part where Aharon kindle de Menorah. I read that the meaning of Menorah has to do with 'Tora Study. I'm from Brazil where we speak Portuguese and the words Men(or)ah and T(or)ah seems to have the same root. Do they have the same hebrew root?
Comment: Klein has menorah from [Formed from נור (= to shine), with pref. מְ◌ and first suff. ◌ָה. cp. Aram. מְנַרְתָּא (= candlestick), Arab. manāra (= candlestick; lighthouse; tower of a mosque).] Torah is [Verbal n. of הוֹרָה (= he pointed out, instructed, taught), Hiph. of ירה.]
Answer: It is mentioned (I forget where, but it is a well known vort), that Torah has it's root both in hora'a (teaching) and Or (light). So it seems that your connection is correct.
Comment: This answer would be much improved if it would cite support for _or_ (light) being the root of _m'nora_.


Broken stick riddle

Question: There is a famous mathematical riddle called The Broken Stick Problem. Here's the extension:
If a straight stick is accidentally broken into three pieces, the probability of being able to form a triangle with the three pieces is 1/4.
If a straight stick is accidentally broken into four pieces, the probability of being able to form a quadrilateral with the four pieces is 1/2.
If a straight stick is accidentally broken into seven pieces,
What is the probability of being able to form a heptagon (7-sided polygon) with the seven pieces?
Answer:
 0.8906

For a triangle, the length of the largest side must be smaller than the sum of the other two. If it were larger or equal, it would be impossible to have any closed shape with an interior.
Similarly, for a heptagon, the length of the largest side must smaller than the sum of the other six. Thus, this is what we need to calculate: the probability that the largest of the seven pieces is less than the sum of the other six.

 The flip-side of this: the probability that at least one segment is at least half the length of the stick. If it is, a heptagon is impossible, but if it isn't, a heptagon is possible.

 One way to calculate this probability is the probability that n points will be on the same half of a circle when placed about its perimeter randomly. This probability is given by n/(2^[n−1]). See this post for explanation.

Thus, we just need the complement of this probability, which gives us:

 1 - n/(2^[n−1]) =
 1 - 7/(2^[7−1]) =
 0.8906

This paper discusses the question well.
Comment: I knew I was overthinking it...
Answer: The problem reduces to finding the probability that

 none of the seven segments has length greater than $\frac{1}{2}$.
 This is due to a generalization of the triangular inequality, which essentially states that no polygon can have a side greater than half its perimeter - in this case, 1.
 Say we have $n$ pieces, one of which is has length $L > \frac{1}{2}$. (Clearly, we cannot have two such pieces.) We denote the probability that we still have such a piece after the next cut by $P_n(L)$.
 On our large piece, there are two zones of length $L-\frac{1}{2}$ on either side: if the next cut falls within either of those zones, then we will be in the same situation, but with a large length $x<L$. "Sliding" the cut from one end of either zone to the other gives us a term $2\int\limits_\frac{1}{2}^L P_{n+1}(x) dx$ in $P_n$.
 There are two other possibilities: either the cut misses the large piece entirely, or the cut hits the large piece outside of the above "zones", breaking it into two pieces which are not large. Both happen with probability $1-L$, so the former adds another term $(1-L)P_{n+1}(L)$ to $P_n$. Therefore,
$P_n(L) = (1-L)P_{n+1}(L) + 2\int\limits_\frac{1}{2}^L P_{n+1}(x) dx$
 Since we can't make any more cuts - and therefore can't break any large pieces - once we have seven pieces, we have that $P_7(L)=1$. The remainder of the problem consists of calculating $P_1(1)$ with this boundary condition, and then subtracting the result from 1 to get the probability that no large piece remains.

Broken stick riddle


New field permission during Push update

Question: The question is about permission for newly added custom field in a managed package.
Consider the situation when we have a managed package (say version 1.0), and we're going to Push upgrade on customer's Org (to version 2.0 which contain new custom field).
What will be field level security setting for this new custom field?
When we install package first time Salesforce prompts us about security settings for all the profiles. But how are they set during Push upgrade?
Answer: An old question, but may be this Documentation here helps answer it. I stumbled upon your question and found it unanswered.
Push Upgrades and New Components
Sample Script for Post Install for Push Upgrades

New field permission during Push update


Other than US FDA definition, are there other standards for vanilla extracts?

Question: Is there a European standard for example for what could be sold as vanilla extracts? The only definition of concentration and ingredients appears to be in US Code 21 CFR 169.175.
Comment: On the other hand it is exceptionally easy to make excellent vanilla extract. I put about 20 vanilla beans in a liter of vodka ( after several months) , the result smells as strong or stronger than any commercial product . And lasts a long time.
Answer: There's not really a European equivalent for the FDA's definition of extract (by ethanol percentage). Instead, the EU specifies what constitutes natural vs 'vanilla flavouring' (euphemism for 'artificial').
See the EU's white paper on it here (notably page 15):
AUTHENTICITY OF VANILLA AND VANILLA EXTRACTS
Also, in plainer speak, info on vanilla industry standards between the US and EU here.
Additional reading: the EU directive ISO 9235 specifies what can be listed as artificial/natural and covers vanilla/vanillin.
Comment: AFAIK there's no standard on strength/percentage, though technically it's required in EU labelling (so you're not likely to see 'Vanilla 2%). Keep in mind this is only EU we're talking about - that's not to say there aren't regulation within a given country. For example, here in Ireland there are laws dictating various types of beer labelling (lager, ale, stout, etc) which differ from UK and German law but all fall safely under EU food and drug regulation. A bit more detailed research into specific national food regulations could be useful here - if you care that is :D
Comment: So only the US prescribes a minimum amount of effectively dry-basis beans in a given quantity of solvents. Then does it necessarily mean that "strength" can vary massively between brands/manufacturers? Interesting to see a paper from Sigma Aldrich - is there a voluntary industry code or standard?
Comment: I have been digging around for a while but so far only the FDA has anything close to stipulating "strength", even that has so much wriggle room. Thanks for the input!


Is it possible to push a custom array through package variable from .Net TBB to DWT and iterate the loop in DWT?

Question: I know it is possible to send ComponentArray but here i need to pass a dummy array to create a collection loop in DWT. Am unable to pass dummy componentArray as it throws item not found error. Any hints is highly appreciated.
Answer: No, unfortunately what you're trying to do is not possible in DWT/TEL. As you've found, custom & dummy arrays don't work in the package.
I'd suggest that you create the desired output markup in a C# TBB (either in the one where you're creating your array of data, or by serialising the data and then de-serialising it in a subsequent TBB) and pushing that HTML snippet as a string into the package. Then just use a simple @@MyCustomStringName@@ to pull that into the resulting output in your DWT.
As Alvin mentions in the comments, there is some possibility to create and loop over simple string arrays. I'm not sure if this is fully supported (i.e. "upgrade-proof").
Comment: Per [Andrey's last post](http://amarchuk.blogspot.nl/2013/11/iterating-over-string-array-in-template.html), you can iterate over string arrays as of SDL Tridion 2013 SP1. You do need to serialize the array of strings.
Comment: It worked fine using Andrey's post,
Comment: Nice. Thanks for the reminder. Useful for things like tag or category strings perhaps, and maybe you could use it to render other ComponentPresentations if you passed strings of Component IDs? Would be good to know if it's actually supported or not, as Andrey states it is more of a side effect of some other functionality that was added.
Answer: You can create a "Dummy Component Array" that will be used only as counter for the values that are previously added to the package with number suffix. This way you use Dummy Component Array just for DWT Repeater and it's TemplateRepeatIndex to create an exact name of package you want to retrieve.

  @@Var_${TemplateRepeatIndex}@@

For the "Dummy Component Array" you can use any dummy TCMURI, they can all be tcm:0-0-0.
This way was already explained\ in post what-can-we-loop-over-in-dwt-layout-template-building-blocks
Comment: Personally I'm not keen on that method. It relies on pushing multiple items to the package, the array and the other items count must be aligned and it relies on a double-lookup of the TEL syntax. It does work, but it's just too untidy for my taste.
Comment: I agree with you David, your and Andrey's solution is much more cleaner and better, but for completeness of the post I added this solution also.


What does the time evolution operator look like in Matrix representation?

Question: In Matrix representation of quantum mechanics, using an energy eigenbasis, we have the state vector:
$$|\psi(t)\rangle=\left(\begin{matrix}
\psi_0(t)\\
\psi_1(t)\\
\psi_2(t)\\
\vdots
\end{matrix}\right)$$
and
$$|\psi(t)\rangle=\left(\begin{matrix}
\psi_0(0)e^{iE_0t/\hbar}\\
\psi_1(0)e^{iE_1t/\hbar}\\
\psi_2(0)e^{iE_2t/\hbar}\\
\vdots
\end{matrix}\right)$$
This is often represented as the state vector at time $0$ operated on by the time evolution operator $\hat U$:
$$|\psi(t)\rangle=\hat U (t)|\psi(0)\rangle$$
And $\hat U (t)$ is usually represented as:
$$\hat U(t)=e^{i\hat Ht/\hbar}$$
Now I know that, in the energy eigenbasis, the Hamiltonian Operator is represented as:
$$\hat H=\left(\begin{matrix}
E_0&0&0&\cdots\\
0&E_1&0&\cdots\\
0&0&E_2&\cdots\\
\vdots&\vdots&\vdots&\ddots
\end{matrix}\right)$$
How do you represent an exponential to the power of a matrix? Or is the exponential just shorthand to show $U_{ij}(t)=e^{i H_{ij}t/\hbar}$, such that
$$\hat U=\left(\begin{matrix}
e^{iE_0t/\hbar}&0&0&\cdots\\
0&e^{iE_1t/\hbar}&0&\cdots\\
0&0&e^{iE_2t/\hbar}&\cdots\\
\vdots&\vdots&\vdots&\ddots
\end{matrix}\right)$$
And how does this generalize to other eigenbasis?
Comment: Recommended (related) reading: Moler C, Van Loan C. Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later. SIAM review. 2003;45(1):3-49
Comment: I don't understand what the actual question is here. You already have $\hat U(t)$. What do you mean by "generalize to other eigenbasis"?
Comment: @jjgoings That paper is [science at its best](https://i.stack.imgur.com/adtHh.png).
Comment: @EmilioPisanty I'm pretty sure the question is "what does the notation $e^A$ mean, when $A$ is a matrix?"
Answer: The exponential of an operator is generally defined via Taylor series as:
$$e^{\hat A} \equiv \sum_{n=0}^\infty \frac{\hat A^n}{n!}$$
Which is completely independent of the matrix representation of $\hat A$ in any basis. Now if $\hat A$ is diagonalizable, as in the case of the hamiltonian, one can show that the above Taylor series definition boils down to exponentiating the diagonal elements of the operator in its eigenbasis (in which it is diagonal), which is what you have written. For the general matrix elements of $e^{\hat A}$ in an arbitrary basis, one can first write the matrix elements in its own eigenbasis, and then use a basis transformation.Explicitly, the spectral decomposition of $e^{\hat A}$ is:
$$e^{\hat A} = \sum_k e^{A_k} |A_k \rangle\langle A_k|$$
 Now imagine you want the matrix elements in the basis $\{|e_i \rangle \}_i$, this can easily be calculated with the above relation:
$$\langle e_i|e^{\hat A}|e_j \rangle = \sum_k e^{A_k} \langle e_i|A_k \rangle\langle A_k|e_j \rangle$$
What the above sum actually is depends on the specific operator in question. However, note the important fact that in general, $\langle e_i|e^{\hat A}|e_j \rangle \neq  e^{\langle e_i|\hat A|e_j \rangle}= e^{A_{ij}}$. Matrix elements generally can not be exponentiated for non-diagonal matrices.


Import a single row from Excel spreadsheet

Question: I'm currently trying to copy a single column from an excel sheet and import it in an existing list on sharepoint. I tried this via microsoft access, but i'm only allowed 255 characters per row!
Is there any other way to do this? I need more space!
Answer: Problem isn't the way you are importing excel sheet into SharePoint list, I think problem is with SharePoint list as I assume you are using default columns for importing data that is larger then 255 characters which is not supported by default.
Just use column type note and you will have more space.
Looks like this is issue that SPFieldText won't allow more than 255 chars, althought it has MaxLength property, it anyway won't allow more chars.
You may read this article on how to create your custom column that can be used to type in more than 255 chars.
Helpful Source
Answer: So is the question how to import a cell with more than 255 characters in it,
into a SharePoint List column?
Or is the question how to restore the Excel Sync feature in Excel 2007/2010? Anyhow give this a try.
Methods:

Microsoft Excel Add-in

Download the Excel Addin (SynchronizeWSSandExcel)
Enable the Addin
Open your Sharepoint List in Excel
Then simply right-click on the list and select Synchronize with Sharepoint.

Update in Access linked to SharePoint List
SP Lists and text fields with more than 255 characters see link

Unfortunately this doesn't sounds like an easy fix.

SharePoint lists use datatypes in each column of the data.
Instructions on exporting Excel table to SharePoint list.
See also: Restoring Two-Way Synchronization on SharePoint Lists Using Excel