Access user's OneDrive data using REST API

Question: how to access the user's OneDrive data by using Office 365 API and Administrator OAuth token of the particular domain?
Answer: You can use the Microsoft Graph to get data from various Office 365 services with a single REST end point.
Here's the reference for OneDrive
An example REST URL, to get the files at the root of the signed in user's OneDrive, would be:
https://graph.microsoft.com/v1.0/me/drive/root/children
And the resulting JSON might look like:
{
  "value": [
    {"name": "myfile.jpg", "size": 2048, "file": {} },
    {"name": "Documents", "folder": { "childCount": 4} },
    {"name": "Photos", "folder": { "childCount": 203} },
    {"name": "my sheet(1).xlsx", "size": 197 }
  ],
  "@odata.nextLink": "https://..."
}


Stocked certificate issued to a company

Question: I have a stock certificate stamped and signed from 1962. The company is still open today but it is issued to another big company. It was passed down to me years ago but doing research on it I can't seem to find out if it was issued to my family. Being that it's not issued to a person to prove inheritance can i do anything with it. I may like to think it was a gift from the issued company.
Comment: Have you asked the "other big company" if they have a record of it?
Answer: Look at it. A stock certificate which has no endorsement on it is a bearer stock:

A bearer stock certificate is a negotiable instrument without endorsement which is transferred upon delivery. Someone who has physical possession of the stock certificate in bearer form is entitled to exercise all legal rights associated with the stock. Dividends are payable upon presentation of dividend coupons, which are dated or numbered. Most jurisdictions now require corporations to maintain records of ownership or transfers of shareholdings, and do not permit share certificates to be issued to bearer.

Transfer agent information is necessary to perform the transaction if the company is publicly traded:

Publicly traded companies use transfer agents to manage individuals and organizations who own shares of their stock. Usually, the transfer agent is a bank or trust company. Sometimes a very large company, like Walt Disney, acts as its own transfer agent. Transfer agents perform three main functions: issuing and canceling stock certificates; acting as an intermediary for the company to pay out interest and stock dividends; and handling lost or destroyed stock certificates.

References

3 Ways to Sell Stock Certificates - wikiHow
Transparency of Share Ownership (pdf)

Stocked certificate issued to a company


how to convert MOD video file without loosing quality to modern popular format for TV

Question: I have MOD video file. My LG TV doesn't support MOD.
How can I convert MOD video file without loosing quality to modern video format to watch it on different modern TVs?
Comment: Simply changing the file extension to `.mpg` can work with some players, although the aspect ratio may be incorrect. Have you tried the ffmpeg / avconv command line suggested in the Wikipedia page on [MOD and TOD](http://en.wikipedia.org/wiki/MOD_and_TOD)?
Comment: I see this wiki page, but I am not sure what parameters I should set to don't loosing quality. For example I must set bitrate. What else?
Answer: A typical video file is a container for video data. The video data itself is compressed by some codec. You therefore have to distinguish between the container format and the video codec.
For a correct answer you should tell the codec type of the video data in your file. You find lots of information about your video file by
ffprobe yourfile.MOD

If the codec is one that is understood by your TV, you can repack your video data into another container format with
ffmpeg -i yourfile.MOD -c:copy out.mp4

Or whatever container format you desire. On the other hand if the codec of the MOD file is not understood, you must recode your video data which necessarily incurs losses on the video quality. For that case refer to any tutorial about transcoding.
Comment: Thank you for your help. I have not ffmpeg on my ubuntu 14.04, but I had found avprobe and avconf and used it.

    avprobe MOV14C.MOD;
    avconv -i MOV14C.MOD -codec copy MOV14C.MP4


How many promotions did Riker turn down?

Question: A second season episode of The Next Generation I watched the other day had Cdr. Riker turning down an offer to command his own ship.  I seem to remember other offers being rebuffed by Riker, though he ultimately accepts one in his last on-screen appearance in Star Trek: Nemesis.
Answer: First, the ACTUAL commands:

2366 : Temporary field promotion to captain by Adm. Hanson during Borg crisis
By 2379, Riker decided to accept promotion to captain of the USS Titan. The Titan was dispatched to the Romulan Neutral Zone to serve as the command ship for a diplomatic task force. ("Star Trek Nemesis")
[NOTE: This bullet is from fanfic-level Memory Gamma, so not part of any canon or official info ] In 2385, Riker accepted a promotion to the rank of Rear Admiral (lower grade) and reluctantly turned over command of the USS Titan to his Executive Officer, Commander Christine Vale, assuming command of the new Yamato-class Heavy Battleship USS Paladin and Task Force Paladin despite not wanting to leave the Titan yet.

Next, command offers (from http://memory-alpha.org/wiki/William_T._Riker#Command_offers)

Riker was offered several commands during his tenure aboard the Enterprise. Including:

the aforementioned USS Drake,
he was offered the USS Aries in 2365
The Aries command was offered to Riker because of his exceptional abilities as a scientist. He turned down the Aries posting because he felt he was not yet ready to leave the Enterprise and the distinction that the first officer post held. (TNG: "The Icarus Factor")
the USS Melbourne in 2366. (TNG: "The Best of Both Worlds")
Starfleet put a great amount of pressure on Riker to accept command of the Melbourne. Many admirals and even Captain Picard felt that he had remained too long on board the Enterprise and should have accepted a command by that point in his career, lest it seem like he was standing still in a sea of upstart officers like Shelby. Even Riker questioned why he remained as Enterprise first officer, and was unable to understand what kept him from leaving. (TNG: "The Best of Both Worlds")
"She's a fine ship, Will."
    "Yes, but she's not the Enterprise."
    Picard and Riker (about the Melbourne)
Q said in Voyager:"Death Wish" that he "was betting Riker" would have taken command of the USS Voyager, which may mean he was also offered command of that ship before Captain Janeway.

SUMMARY: At least 3 and possibly four turned down promotions
Comment: The link for the USS Paladin doesn't seem to site any direct references (that I can see) regarding Riker taking that command. Do you happen to know where that is from?
Comment: Since you included Riker's temporary command of the Enterprise during the Borg crisis, you may want to also include his temporary posting as captain of the Excalibur during TNG Redemption pt 2.
Comment: @Xantec that's probably pushing it.  The command of the Enterprise during the Borg crisis was permanent as Picard was thought to be lost forever.  Riker (apparently) willing accepted demotion to Commander to stay as Picard's first officer when he was rescued from the Borg.  I'd actually say that the fact that he stayed with the Enterprise means he turned down a command to remain.
Comment: It was part of an officially sanctioned exchange tho.
Comment: @Xantec - i clarified that it's from Memory Gamma (fanon, basically fanfic level "canon"). Basically, fan-generated noise, but elegant enough to merit mention IMHO; especially as it is tangential to main question/
Comment: It's been a while since I saw Nemesis, but I'm wondering about Riker deciding to take the promotion of the Titan.  Is it a coincidence that he married Troi then took command of a ship?  Or was part of his reason to stay on the Enterprise was that he wanted to be with Troi (even though he refused to rekindle the relationship)?
Comment: Also when he became Captain of a Klingon Warbird.
Comment: @Broklynite - I suspect that is not what most reasonable military organizations would label as "promotion", being in a different country's military?
Comment: He was also in command of the USS Hathaway during wargames. One would argue that it doesn't really count but no matter how short it was he made a fine captain, even pulled a rabbit out of his hat thanks to the crew he hand picked for the mission. ✌
Answer: Rejected Commissions:
1) USS Drake: NCC 70956 (Andromeda Class).
2) USS Aries: NCC 45167 (Renaissance Class).
3) USS Melbourne NCC 62043 (Excelsior Class).
Accepted Commissions:
1) USS Enterprise: NCC1701/D (Galaxy Class).
(Returned Command of the Ship to Captain Jean-Luc Picard).
2) USS Titan: NCC 80102 (Lunar Class).
  (Current Assignment).
Note:
Possible Rejected Commissions:
1) USS Voyager NCC 74656 (Intrepid Class)
In the episode "Death Wish" in "Star Trek, "Voyager"", Q commented To Captain Kathryn Janeway, that he was, "Betting Riker would get this Command". Ergo, it is possible that William Thomas Riker was offered that Ship! However, this is pure speculation!
Comment: @psubsee2003:   Oh, I see, I misread.   Retracted.
Comment: I would add, I think the intent of @AdmiralJaeDax is to say that "Riker" referring to *our* Riker is the speculation.   I don't think that's right.   I think we can assume that if the script mentions Riker, the intent is our Riker.   The speculation would be only on whether that line means that he was definitely offered the position.
Answer: I'm not going to repeat what have been already well covered in the previous answers, but there is another likely command rejection that does not appear to be covered in canon (at least on screen, I can't confirm whether this is covered in any of the books).
But to expand on Riker's promotion during the original Borg crisis.  He was promoted to Captain and given command of the Enterprise.  This occurs after he passed on command of the Melbourne (and the Melbourne is destroyed shortly thereafter during the Battle of Wolf 359).
After Captain Picard's rescue and after Picard was restored his position as captain of the Enterprise, you have the following exchange between Shelby and Captain Riker.

SHELBY: We'll have the fleet back up in less than a year. I imagine you'll get your choice of any Starfleet command, sir.
RIKER: Everyone is so concerned about my next job. With all due respect, Commander, sir, my career plans are my own business, and no one else's. But it's nice to know I'll have a few options.

The next time we see Riker, he is a Commander and is again the First Officer of the Enterprise.
Based on Shelby's statements, we can guess that he was offered a command during this period between Best of Both Worlds Pt 2 and Family, and since he was back at his old posting, we can also surmise that he turned down that command and elected to remain on the Enterprise.
Comment: Actually, we know that Riker was offered a command during the episodes you are referring to (*Best of Both Worlds - Parts 1 and 2*): the USS Melbourne. It was the topic of several conversations early on in Part 1, which became moot when it seemed that Picard was lost to the Borg and Riker was promoted to Captain of the Enterprise. This is already part of the existing answers.
Comment: @Ellesedil that was **before** Best of Both Worlds.  I am talking about **after**.  The USS Melbourne you are referencing was destoryed during the Battle of Worf 359
Comment: Actually, it was at the very beginning of [Best of Both Worlds](http://memory-alpha.wikia.com/wiki/The_Best_of_Both_Worlds_(episode)). "Alone with Picard, Hanson details his approval of Shelby. He tries to encourage the captain to accept her as his first officer and convince Riker to assume captaincy of the USS Melbourne, a command offer that Picard was heretofore unaware of and follows two previous proposals – the USS Drake and the USS Aries – that Riker has declined." Picard, Shelby, and several others spend much of the episode talking to Riker about accepting it.
Comment: Riker likely reaffirmed his preference to decline the Melbourne after *Best of Both Worlds* is resolved, particularly since high-level Starfleet officers were still hoping he would accept it.
Comment: @Ellesedil yes, that is stated in the episodes, but still completely irrelevant to this answer.  I'm not talking about the Melbourne.  I am talking about the period **after** Best of Both Worlds Part 2.  By this time I am addressing, the Melbourne was destroyed, Riker was a captain, and possibly/likely had his choice of command.  He chose to remain on the Enterprise.
Comment: Hmm. I thought the Melbourne was destroyed sometime after Part 2, not during it.
Comment: @Ellesedil during Best of Both Worlds Part 2, the Enterprise arrives are Wolf 359 after the Borg cube left, at which Commander Shelby is listing the ships destroyed.  The [Melbourne is one of them](http://memory-alpha.wikia.com/wiki/Starships_at_Wolf_359#Starships_at_Wolf_359).
Answer: In addition to the examples given in previous answers, Riker also served as first officer aboard the Klingon Bird-of-Prey, the IKS Pagh, in "A Matter of Honor", and briefly relieved Captain Kargan of command, before returning it to him. By not killing Kargan, as per Klingon custom, he effectively turned down command.
Comment: Ah, but is not taking command of a Klingon warship "turning down promotion" or "dodging a bullet?"


What is the best way to write TDD test cases? Can I achieve TDD through JMeter?

Question: I have been asked to write test cases in the TDD style. I have no experience about writing TDD test cases. I have read about TDD and in essence it talks about defining test cases prior to code and then the code must pass the preceding test cases. What are the best practices to implement TDD? What approach and tools befit TDD? Can I achieve TDD using JMeter?
Answer: No.  jmeter is used for performance testing.
To do TDD and BDD you need to learn how to write tests that call system components.  Some will be backend for internal code quality, some will be front end which will also test actual user product functionality.
You could probably twist jmeter to achieve TDD but you would be making it very very hard.  If you are new to TDD you would likely make a horrific tangled mess that is neither maintainable or extendable.
Just focus on:

Write a failing test in the same language as the application (not required but helps a lot usually)
Write the application code to make the test pass
Refactor the code to be maintainable
Iterate

i.e. red-green-refactor
Read some more books on applying TDD and BDD with specific examples in a language of your choice and don't even think about jmeter until you are looking at performance of many users with working application functionality that was already achieved through TDD.
Answer: This is not very applicable to JMeter as it assumes testing existing application and in the majority of cases performance testing is an ad-hoc process targeting identifying performance bottlenecks so there is nothing you can do using TDD approach here.
If you're using JMeter for functional testing you can consider the following options:

Ruby DSL for JMeter
There is a possibility to either execute existing .jmx test scripts or create new ones on the fly using JMeter API in Java or other language which can be run in JVM (Scala, Kotlin, Groovy, etc). See Five Ways To Launch a JMeter Test without Using the JMeter GUI for example implementation.

If you want to use performance tests in your CI/CD pipeline you can consider running your JMeter scripts in Jenkins and use Performance Plugin to visualize results and mark build as unstable/failed if performance will be worse than specified threshold. However it is more suitable for regression testing rather than for TDD


Mail Hosting with Shell Access

Question: I'm looking for an email host (ideally one who will allow me to use my own domain) that will give me shell (ssh) access to my mail.  A lot of webhosts provide shell access, but only to the file storage for web stuff and not to the mailboxes/mailspool/MTA.
Answer: I can be wrong here, but maybe you can try a free shell service and set up a mail client on it.
I am a big fan of Devious, I am pretty sure you can do that with them.
Answer: If you're after a UK-based solution get in touch with me, I might be able to help you. :-)

Mail Hosting with Shell Access


Does PCA preserve linear separability for every linearly separable set?

Question: After using PCA to reduce dimensionality, does PCA preserve linear separability for any linearly separable set? Will the data still be linearly separable after the transformation? I am thinking that it does preserve linear separability because the PCA just reduces the dimension and not the relationship between the points in terms of separability. Am I on the right line of thinking?
Comment: The question is ambiguous. It could be "Is there any linearly separable set for which PCA preserves linear separability?" (i.e. is there some such set?) or "Is it the case that for any linearly separable set, no matter which one, PCA preserves linear separability?" (i.e. is this true of every such set). I suspect the latter was intended, in which case just changing "any" to "every" would make it unambiguous.
Comment: @MichaelHardy, I will fix that accordingly. Thank you for catching the ambiguity
Answer: No, it may be that the discriminative information is in the direction of a principal component that explains a relatively small amount of the total variance, and hence gets discarded.
Consider a two-dimensional dataset where the two classes lie in long parallel cigar-shaped elongated Gaussian clusters with a small gap between them.  Most of the variance lies along the long axis of the clusters, so the first PC will be in that direction and the second will be orthogonal to it.  The data are indistinguishable from the first component, so if you discard the second component, the data will no longer be separable.
Comment: +1.  The simplest example I can find uses the line $y=\epsilon/2$ to separate the points $(\pm1,0)$ from the point $(0,\epsilon)$ for tiny positive $\epsilon.$ Clearly the first principal component must be nearly parallel to the x-axis, thereby projecting the first two points approximately to $\pm 1$ and the second point to $0,$ lying between them on the line: obviously no longer linearly separated.
Answer: No, reducing dimensionality with PCA will only maximize variance, which may or may not translate to linear separability.
Here are two visualizations of variance and separability in opposition. In both cases, the discriminative information lies primarily along the low-variance axis, which would get discarded by rote dimensionality reduction.

Minimal example of three data points (adapted from whuber's comment)

Example of parallel, elongated Gaussian clusters (adapted from Dikran's answer)

<code>import numpy as np
from sklearn.decomposition import PCA

# generate gaussian samples (n by 2)
rng = np.random.default_rng(4)
n = 100
X = rng.standard_normal((n, 2)) @ rng.random((2, 2))

# peel classes apart (+1 and -1 vertically)
y = 2 * np.arange(X.shape[0]) // n
X[:, 1] = np.where(y, X[:, 1] - 1, X[:, 1] + 1)

# project X
mu = X.mean(axis=0)
X -= mu
pca = PCA(n_components=2).fit(X) # explained variance ratios: [0.83267962, 0.16732038]
X_pca = pca.transform(X)

# reduce dimensionality via PC1
X_pc1 = X_pca[:, [0]] @ pca.components_[[0], :] + mu

# reduce dimensionality via PC2
X_pc2 = X_pca[:, [1]] @ pca.components_[[1], :] + mu
</code>
Answer: No. PCA targets different target than Linear discriminant analysis (LDA). Both of them actually provide linear transformation, but (rough an quick explanation follows):

PCA will set the direction of the first axis of the output space in the direction of the maximum variance of the input data (it does not know the concept of classes per se, all samples are treated equally)
LDA will set the direction of the first axis of the output space in the direction which has (roughly) the best ratio of inter-class variance vs intra-class variance. For that, it needs a concept of classes.


Frame size is smaller than recommended

Question: I'm 191 cm tall and I want to buy UPTEN ZERO, the problem is the biggest frame size is "L" and is adapted for (173cm - 185cm) only, my question is it ok to ride a small bike? dose it effects me or what are the consequences?
Thank you
Comment: What sort of rides are you planning to do? The answer may be different between all day endurance rides and short trips
Comment: It all depends on the length of you legs which is more important than general body height.
Comment: I am fairly confident saying the bike is too small for an ideal fit. If your looking for a commuter for 1-5km trips it might be OK, but if you looking for day long MTB trips a better fit would be advised.
Answer: Is there a local bike shop near to you where you can go and try one for size and perhaps get advice?
I think, generally speaking, it's easier to get a slightly small frame to fit rather than trying to adapt a too big frame...
Comment: Slightly too small might be OK but in this case the frame is for a body size that is on average 10cm smaller than OP's size. I'd be cautious here.
Comment: @Carel: Raising the saddle by 5cm and using a 4cm longer stem is almost always possible (at least on road bikes, not sure about MTBs).
Comment: @Michael You will most likely also have to raise the handlebars or get higher rise handlebars to make it comfortable to ride on
Answer: Generally, it's not OK to ride a bike that is significantly too small for you, it's going to cause you problems.
Firstly, you may not be able to raise the saddle far enough to accommodate your leg length. You may find you are having to flex your hip joint too far which is inefficient and uncomfortable.
The handlebars will be too close to you, resulting in a cramped feeling and a riding position that is too upright.
You can replace the seat post and stem with longer ones but it's better to get a bike that fits you in the first place.
Comment: addition: When using a frame which is too small, even if you can adjust the seat height far enough so it is correct for your height you will have issues, especially with the handlebar height in my experience. The higher the seat is the lower your hands will be relatively/the more hunched over you'll be. For short trips the difference in frame size will not be such an issue but on longer trips (150-200+km) you will start to notice. There are certain fixes you can do such as angle adjustable stems, riser bars (with more rise), setback seat posts, longer stems etc.

Frame size is smaller than recommended


Keyboard mappings on laptop seem irreversible

Question: Laptop with Xubuntu 15.04, Linux 3.19.0-26-generic (x86_64), AT Translated Set 2 keyboard.
I am working with an 105 key keyboard on it, using /settings/keyboard/layout/.
problem:
when I unplug the external keyboard there is no way to get back to the normal laptop keyboard. Whatever I change in settings, the keyboard map keeps on functioning as type 105. I have tried several laptop layouts without success.
In /settings/keyboard/layout the option selected is "use system defaults". This is the option that works when I start up from a live USB, but that same option does not work in the installed version.
how can this be solved?
Answer: go to settings/keyboard/behavior and uncheck : Restore num lock state on startup.


Charging batteries and how voltage affects it

Question: I know that when I am charging a battery, we need higher voltage than the battery is rated at in order to "push" current into the battery itself. Right? OK. Since that is true, is it possible for me to use a lower voltage, but into the separate battery packs? I WILL EXPLAIN. I am sending current into a 10 volt light bulb. The batteries I am using to send that current are eight 1.2V rechargeable aaa batteries (NI-MH) put into series. BUT I am using 3 battery holders, 2 of them hold 3 batteries, and one holds 2 batteries, as shown on the following pictures. So basically these battery holders are put into series. Now, when I charge them, how is the voltage distributed amongst all 8 batteries? Like, is the 5 volts going to go to each battery holder charging them individually, even thought they are in series? Is there a way I can charge this battery pack with 5 volts?
If this doesnt work, how about this?:  Will each aaa battery get 5 volts, or each battery pack get 5 volts, or my whole setup get 5 volts? The reason I am asking this is because I know that in order to charge a battery you need higher voltage than it gives out, and a diode won't solve my problem of my setup won't work.
Answer: The first diagram doesn't work, since you'd have a short circuit (look at the red/blue lines near the interconnect between the two 3-cell holders - they are shorted through this interconnect):

The second diagram also doesn't work, since 5 volts is not enough to push charge through 8 cells; the voltage of the 5-volt battery would be lower than the battery pack, thus the diode will be reverse-biased.
If you do want a solution similar to your second diagram, you can use that, but provide higher voltage — around 12V — and place a series resistor instead of the diode. Select the resistor so that it limits the charge current to a lowish value when the pack is fully charged (20 mA or less is probably fine), since if there's no human around to monitor things, you'll continue pushing that current even when there's nothing more to charge, which only heats and degrades the cells. If the current were larger, the cells would be damaged quickly.
Comment: I've added a picture to clarify.
Comment: It's not about the way you drew them, it's the connection topology. "+" from 5-volt goes to "+" on the second 3-cell holder. Through the interconnect it goes to the "-" of the first 3-cell holder. Then it goes to the "-" of the 5-volt. So it's a direct wire connection from "+" to "-" on the 5-volt: a subtle short circuit.
The video shows nothing new - it's similar to your second diagram, which, as I said, will work, but you need higher voltage than 5 volts, and a current limiting resistor. The "12 volt car battery charger" shown in the video includes current limiting, so no resistor is needed
Comment: how is that a short curcuit. I dont understand.
Comment: they arent touching though. The reason i drew them like that is because i couldnt draw them any other way.
Comment: whatch this video. please. Because it backs up my claim.   https://www.youtube.com/watch?v=sN2mkvUOL5E
Comment: sorry I drew the picture wrong. I will fix it.
Answer: You could merge the two sets of 3 batteries and charge them in series with 7.2v (assuming they're balanced) but the pack of 2 batteries needs to be charged separately with a source of 2.4v.
Nevertheless, if you could remove the batteries it would be extremely recommended to charge each cell separately so they will be balanced and the risk of corrosion will be practically zero.
Comment: You COULD theoretically charge them in parallel with a single 1.2v+ source, but it's not recommended for the harm it may cause


How to get descrete fourier tarnsfom

Question: Could anyone explain me please how to produce descrete fourier transform of such signal? There are no anymore information besides the picture in this task.
Comment: So, first off: sorry, we're not a "copy out an obvious source of information for me" service. So, we have to expect you to do your research and describe your problem with what you've read. So, really, have you tried understanding the [Wikipedia](https://en.wikipedia.org/wiki/Discrete_Fourier_transform) article? What's been the problem with that? The question "explain everything about the DFT for me" is simply too broad, and underresearched, and will be closed here.
Comment: These are values. The d**i**screte Fourier Transform is a well-documented algorithm (Wikipedia, or literally thousands of results from your favourite search engine, every single textbook of the last 40 years on systems and signals…) that operates on vectors of values. So, what is your question, specifically?
Comment: My question is how to get fourier transform of that sequence, because I didnt understand how to do it. Thought that someone can explain it here a bit simply.
Comment: Okej, thanx for your explanation. I expected that someone explains in more details. Thought that here I can place a question on things I didnt understood. Thank you, you were the best explainer
Comment: You're still very welcome to read the source I linked to, and explain, in your question, what was unclear to you. It's about as easy as anyone of us would have written, so if you think we can knowledge magically appear in your  head with lesser lecture or work on your side, I'm afraid I'll have to disappoint you.
Answer: Hint:

Look at the ratio between two adjacent samples
Express the picture as a closed form time domain formula
Calculate the DFT using it's mathematical definition or just look it up in a table

It's not entirely clear whether the sequence is supposed to continue or is supposed to end at the right edge of the picture. You need to ask whoever posed this problem.

How to get descrete fourier tarnsfom


Configure MC and aptitude color schemes

Question: I'm using Ubuntu, and I'm having trouble reading text in MC and Aptitude because of the color scheme. Is there any way to change it?
Answer: Maybe a quick fix: mc -b forces no-color mode ;)
You can write your own skins for mc, which include a color scheme. They live in ~/.mc/skins and are selected by mc -S skinname. This article talks a bit about it and has an example available for download at the end.
But maybe the deeper trouble is that your term background is "not the expected color", so another way would be to change how your term displays the 16 "standard colors". (For example, this would make all formerly-green items purple, if that's better for you from a contrast standpoint.) How this is done depends on your terminal emulator, for example XFCE's Terminal has it in its preferences dialog, for xterm you probably need to edit a configuration file etc.
Comment: Link seams to be dead. Adding an example directly to the answer would be nice.
Comment: Q idea how to start nocolor by default?
Comment: `alias mc="mc -b"` in your terminal or your login script.
Answer: From the changelog:

Version 4.8.0-pre1
WARNING: Configuration files was moved from your $HOME/.mc directory into
XDG_CONFIG_* directories to respect FDO standard
(http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html)

mcedit .config/mc/ini
search for skin with F7
skin=modarin256 is really nice for example :)
Look into /usr/share/mc/skins/ to see the different themes.
Answer: You can create your own color theme for Aptitude. There is even nice documentation.
As was already said in accepted answer, deeper trouble is in fact that colors are depending on each other, so there is standard terminal color theme you are using and ncurses app theme is build upon that. Thus i.e. aptitude have different "blue" then you may expect.
Here is my yellow/black style, which I design to be high contrast and used with base16_materia terminal theme:
aptitude::UI::Styles "";
aptitude::UI::Styles::MenuBar "";
aptitude::UI::Styles::MenuBar::bg "yellow";
aptitude::UI::Styles::MenuBar::fg "black";
aptitude::UI::Styles::HighlightedMenuBar "";
aptitude::UI::Styles::HighlightedMenuBar::fg "yellow";
aptitude::UI::Styles::HighlightedMenuBar::bg "black";
aptitude::UI::Styles::Header "";
aptitude::UI::Styles::Header::bg "black";
aptitude::UI::Styles::Header::fg "yellow";
aptitude::UI::Styles::Status "";
aptitude::UI::Styles::Status::bg "yellow";
aptitude::UI::Styles::Status::fg "black";
aptitude::UI::Styles::DisabledMenuEntry "";
aptitude::UI::Styles::DisabledMenuEntry::fg "white";
aptitude::UI::Styles::DisabledMenuEntry::bg "black";
aptitude::UI::Styles::MenuEntry "";
aptitude::UI::Styles::MenuEntry::fg "yellow";
aptitude::UI::Styles::MenuEntry::bg "black";
aptitude::UI::Styles::MenuBorder "";
aptitude::UI::Styles::MenuBorder::fg "yellow";
aptitude::UI::Styles::MenuBorder::bg "black";
aptitude::UI::Styles::HighlightedMenuEntry "";
aptitude::UI::Styles::HighlightedMenuEntry::bg "yellow";
aptitude::UI::Styles::HighlightedMenuEntry::fg "black";
aptitude::UI::Styles::MultiplexTab "";
aptitude::UI::Styles::MultiplexTab::bg "cyan";
aptitude::UI::Styles::MultiplexTab::fg "black";
aptitude::UI::Styles::MultiplexTabHighlighted "";
aptitude::UI::Styles::MultiplexTabHighlighted::bg "black";
aptitude::UI::Styles::MultiplexTabHighlighted::fg "yellow";

Just add it to the end of ~/.aptitude/config file.
Comment: You mean, add a file `/etc/apt/conf.d/01aptitude-local.conf`.

Configure MC and aptitude color schemes


Getting relative pitch and roll

Question: This may be more suited for another exchange site, but I thought it'd try here anyway. I'm trying to figure out how to get pitch and roll relative to the ground. Say my vehicle is going up a hill, but my vehicle is level with that hill as it goes up to a degree. How would I go about getting that pitch? I've been playing with the MPU6050 and this still boggles my mind.
Comment: By "level with that hill" do you mean the vehicle plane is parallel to the ground plane? "Level" means parallel to the horizon.
Comment: Yes excuse me, I meant parallel to ground plane
Comment: I'm not sure what to recommend, but you might be able to use the gyro/accelerometer. You would just need to calibrate it first on level ground, then keep track of changes in incline as the vehicle moves.
Answer: Orientation can be represented in a number of ways. In all cases you have the concept of a fixed "world" coordinate system from which your "local" coordinate system is defined. The easiest to understand is probably Euler angles, which is essentially the roll, pitch and yaw of an object. The 3 angles describe how much the object has rotated about each of its 3 axes. A rotation matrix can also be used to represent orientation. It's not as easy to intuitively understand exactly what the rotation the matrix represents looks like, but it's very easy to perform mathematical operations on a rotation matrix. Finally, quaternions also represent rotation, but are entirely unintuitive and quite hard to wrap your head around.
The MPU6050 (datasheet) is a combined accelerometer and gyro IC with an I2C interface.
You can actually use either of the sensors to work out orientation, but each have drawbacks on their own.
In theory, integrating gyroscope data (which tells you rotational speed in rads per second) will give you the rotation from your starting point in radians. Essentially, read the gyroscope at some time interval (say every 0.1 seconds) and multiply the reading by the timestep (0.1) and add it to your previously calculated orientation. Do this for each axis.
The major problem with this approach is that gyroscopes suffer from "drift". Over time, small errors in the measured rotation will add up and the calculated orientation will diverge from the actual physical orientation. The quality of the device will influence how quickly this error builds up - MEMS gyros like the one you have might only give a few seconds of accurate readings, while a laser gyro in an aircraft inertial navigation system could provide accurate readings for hours. The gyroscope does, however, give fairly smooth (noise-free) readings which, in the short term, are accurate.
You could also just use the accelerometer. When you're sitting still, the sensor will read a constant acceleration towards the earth. You can use this as a reference point for your roll and pitch orientation (yaw requires another reference - often the earth's magnetic field, read with a magnetometer). The major issue with this is that the moment you move it, even slightly, the gravitational reference will be overwhelmed by the movement vector and you'll lose your orientation reference. If your device is sitting still or moving in a fairly smooth manner then this might not be an issue. This SO question addresses calculating orientation from just accelerometer values.
What you need is to combine (or "fuse", in sensor parlance) the smooth but drifting gyroscope reading with the absolute reference to the outside world from your accelerometer. This is a complicated topic which can get quite maths heavy, but fortunately for a simple implementation you don't need to get too involved.
The first step is reading data from the IC. You haven't named your microcontroller, but I'll assume you've figured out its I2C library and are able to read data from it. If you haven't dealt with I2C ICs before, generally the steps needed are:

Read 1 or 2 bytes from the relevent register
If there's 2 bytes, join them together to produce a 16 bit integer
Multiply the result by some factor to get the value in SI units

It's not actually particularly complicated, but just reading the datasheet can seem daunting. I'd recommend reading a tutorial or two on reading I2C IC data (not necessarily for the chip in question) and comparing the tutorial to the relevant datasheet to get an idea of how they are generally written.
Looking at the datasheet linked above, you seem to have 2 options. Either you can individually read the accelerometer and gyroscope data from the IC, or you can use the inbuilt "Digital Motion Processor", which I imagine will also perform sensor fusion algorithms for you (the datasheet is a little light on details - perhaps there's an application note or some further documentation on what it actually does). If you do it yourself, the algorithm you use will be somewhat application dependent, but I'd try:

Use accelerometer data as outlined here
Use a "complementary filter" - gyroscope integration with some accelerometer readings taken into account.
Investigate the Kalman filter. Implementation gets a little bit trickier here, and tends to be more application dependent.

Try and gather data at a few hundred Hz (timestep of 0.01 seconds or smaller).
Comment: This did everything but answer my question.
Comment: Perhaps ask a more focused question then? What have you tried to do? What microcontroller are you using? Have you managed to read any data from the IMU? Are you having trouble converting the read data into an acceleration or rotation rate value? Are you having trouble converting acceleration and gyroscope readings into orientation? If you ask a vague and broad question you get a vague and broad answer! (Or none at all).
Comment: I asked a pretty specific question actually, I wasn't asking how to get pitch and roll, I was asking how to get them relative/parallel to ground plane
Answer: For the task you describe, which is essentially a 3D inclinometer, the easiest way to go would be to calculate the orientation of the Gravity vector.  The problem is getting rid of the impact of any accelerations the car might make, or centripetal accelerations made during arc-like motion.  A fair first approximation would be to low-pass filter the acceleration signals at about 0.1Hz, but you'd be damping out transient tilts.
The point mentioned in LeoR's answer about Euler angles and quaternions has to do with the math of rotations, which don't commute.  From https://physics.stackexchange.com/a/10368 :

For the types of rotation you're talking about, I don't think this will be important
Comment: Just a note that referencing another answer (in this case, LeoR's) as *above* or *below* is subject to change based on voting.

Getting relative pitch and roll


Trading OTC FX options: choosing expiries

Question: For FX options that are traded OTC vol quotes are given on a standardised grid, e.g. expiries 1D, 1W, 1M, 3M, 6M, etc. maturity and for each of these expiries you have quotes for ATM, 25 delta Risk reversal, 25 delta butterfly, etc. This is different to listed equity index options where you have fixed dates as expiries.
The implied volatility for Options with expiries or strikes not on this grid can be computed via interpolation.
My understanding is that people  usually trade the standardised expiries, since market makers would give you the best price for these, e.g. you would usually open a position with 3M expiry, but not with 3M minus 3 days. Now suppose I have some systematic strategy and I bought the 3M ATM option a few days ago and now my strategy wants to increase position in 3M ATM. Spot has not moved much, so the option I bought a few days ago still offers me a decent exposure to 3M ATM, maybe with a small adjustment factor. Is it true that buying a new 3M ATM option would be much cheaper than increasing my position in the strike, expiry pair I already have in the book, since market makers prefer to trade standardised expiries? Would people then usually open positions in New options in this case? But wouldn't that mean that you will end up with a huge number of expiries in your book if you run this strategy for a while, making it very hard to manage the book?
Answer: The treatment of off the run expiries differ depending on if you are a client or a counterparty in the transaction. If a client asks me for a strange date in a reasonable size I would do some simple checks (is this a non-farm payrolls day, or on some central bank meeting) and would adjust my pricing according as opposed to adjusting solely due to them asking for a 7 month option, forward or STIR product. Also, if I already have the original trade that would tend to improve the pricing. If it was abnormally large I would show a better price on a standard maturity vs something off the run as any hedging trades match better for reasons that will follow. A counterparty asking for a non-standard date in the inter dealer broker space I treat as a massive red flag (hence the better pricing for large requests for quotes on standard dates, no red flags). This is as it suggests some sort of concentration risk they have that they are unwilling to hedge with a standard date product.
Another thing to consider here is less to do with dates drifting and more to do with the underlying changing. Lets say your 25d call is now a 5delta call, the relative cost of trading deep OTM options are higher than trading options closer to the market.
Now in the FX option IDB space, you typically see the following run: 1m, 2m, 3m, 6m, 1y and 2y ATM options and 25D RR's through out the day at the market convention cut (when in doubt NYC) while the 10 delta RR and any fly being much more sporadic in the non G10 space. There are however standard dates that do trade as well in the currency and rates space, the IMM dates and they are very popular with fast money funds as you do not have the expiry drift problems you are asking about.
Comment: Many thanks for the answer. Suppose I bought a 3M ATM call. 2 weeks have passed and the option is now a 40 delta Call. What would usually be cheaper and more common: to roll the option to a 50 delta call of the same expiry or to roll the option to a 50 delta 3M ATM. The first trade is a strike spread, but on a nonstandard expiry. The second trade is a diagonal spread as we change both strike and expiry
Answer: I'll caveat this to begin with by saying that i'm not an FX trader, so the below is just how i would expect it to work.
I would not expect a significant charge for trading off the standard expiries.
When people quote prices in broker markets on OTC stuff, they typically provide what are called runs, where that means a semi standarised strip of prices. The standard runs and the way they're quoted are different in different markets. In FX markets, i believe that these runs are the ATM and 25d RR and Flys, on some (arbitrary) grid of maturities. People choose stuff like 1w, 2w,  1m, 2m, 3m, 6m, 1y maybe because it's simple. The next day, everything they traded the day before will have these "off" expiries you talk about, so pepole will build up an inventory of all sorts of expiries.
On the topic of having a huge numer of expiries in the book being difficult to manage, this is often easier to manage - it reducees 1 large pin risk to hundreds of tiny pin risks, which is much more preferable if you're not planning on offloading the risk.


How does Apple file a patent for a paper shopping bag?

Question: Apple's new "iBag"
I picked this up reading some blog.  Why... is this even allowed?  It's a paper bag with a handle.
Comment: We are reading the same blog. I suppose it surprises many of us, but it shouldn't. The amount of outrageous patent applications is constantly rising. Which can only mean that there is a small (?) but considerable degree of success.
Answer: Reading only the first page of a patent is often not very helpful to understanding what the patent or patent application is covering. In this case, the patent application isn't trying to claim all paper bags, but constructing a paper bag with 60% or greater post consumer content paper. The second thing to remember here is this is only a patent application, not an issued patent. It is common for patent applications to have extremely broad claim language. Should the application ever be granted, it is likely the claims will be narrowed considerably. As for this specific application, it doesn't seem all that novel to me, but I have no specific knowledge in the fabrication of paper bags and how difficult it is to make a paper bag out of paper with 60% post consumer content.


Is there a way to query openFDA for drug pair interaction?

Question: openFDA is awesome particularly the drug/event database. But I can't find a way to query whether a particular drug (e.g. xanax) has any drug interaction warning, precaution, or contraindication. Essentially, I want to know whether by specifying two drug names, openFDA tells me whether the interaction is unsafe. Something like what webMD drug interaction checker does. Your assistance is greatly appreciated.
Answer: Unfortunately, Open FDA cannot assess safety of a particular drug interaction.
To see if a drug has any interaction warnings, precaution, or contraindication, you can query the Drug Label API and inspect the SPL elements returned; for example:
https://api.fda.gov/drug/label.json?search=openfda.brand_name:xanax&limit=10
<code>"contraindications": [
    "Alprazolam tablets are contraindicated in patients with known sensitivity to this drug or other benzodiazepines. Alprazolam may be used in patients with open angle glaucoma who are receiving appropriate therapy, but is contraindicated in patients with acute narrow angle glaucoma. Alprazolam is contraindicated with ketoconazole and itraconazole, since these medications significantly impair the oxidative metabolism mediated by cytochrome P450 3A (CYP3A) (see WARNINGS and PRECAUTIONS: Drug Interactions)."
  ],"precautions": [
    "General Suicide As with other psychotropic medications, the usual precautions with respect to administration of the drug and size of the prescription are indicated for severely depressed patients or those in whom there is reason to expect concealed suicidal ideation or plans. Panic disorder has been associated with primary and secondary major depressive disorders and increased reports of suicide among untreated patients. Mania Episodes of hypomania and mania have been reported in association with the use of alprazolam in patients with depression. Uricosuric Effect Alprazolam has a weak uricosuric effect. Although other medications with weak uricosuric effect have been reported to cause acute renal failure, there have been no reported instances of acute renal failure attributable to therapy with alprazolam. Use in Patients with Concomitant Illness It is recommended that the dosage be limited to the smallest effective dose to preclude the development of ataxia or oversedation which may be a particular problem in elderly or debilitated patients. (See DOSAGE AND ADMINISTRATION.) The usual precautions in treating patients with impaired renal, hepatic or pulmonary function should be observed. There have been rare reports of death in patients with severe pulmonary disease shortly after the initiation of treatment with alprazolam. A decreased systemic alprazolam elimination rate (eg, increased plasma half-life) has been observed in both alcoholic liver disease patients and obese patients receiving alprazolam (see CLINICAL PHARMACOLOGY). Information for Patients For All Users of Alprazolam To assure safe and effective use of benzodiazepines, all patients prescribed alprazolam should be provided with the following guidance. Inform your physician about any alcohol consumption and medicine you are taking now, including medication you may buy without a prescription. Alcohol should generally not be used during treatment with benzodiazepines. Not recommended for use in pregnancy. Therefore, inform your physician if you are pregnant, if you are planning to have a child, or if you become pregnant while you are taking this medication. Inform your physician if you are nursing. Until you experience how this medication affects you, do not drive a car or operate potentially dangerous machinery, etc. Do not increase the dose even if you think the medication "does not work anymore" without consulting your physician. Benzodiazepines, even when used as recommended, may produce emotional and/or physical dependence. Do not stop taking this medication abruptly or decrease the dose without consulting your physician, since withdrawal symptoms can occur. Additional advice for panic disorder patients The use of alprazolam at doses greater than 4 mg/day, often necessary to treat panic disorder, is accompanied by risks that you need to carefully consider. When used at doses greater than 4 mg/day, which may or may not be required for your treatment, alprazolam has the potential to cause severe emotional and physical dependence in some patients and these patients may find it exceedingly difficult to terminate treatment. In two controlled trials of 6 to 8 weeks duration where the ability of patients to discontinue medication was measured, 7 to 29% of patients treated with alprazolam did not completely taper off therapy. In a controlled postmarketing discontinuation study of panic disorder patients, the patients treated with doses of alprazolam greater than 4 mg/day had more difficulty tapering to zero dose than patients treated with less than 4 mg/day. In all cases, it is important that your physician help you discontinue this medication in a careful and safe manner to avoid overly extended use of alprazolam. In addition, the extended use at doses greater than 4 mg/day appears to increase the incidence and severity of withdrawal reactions when alprazolam is discontinued. These are generally minor but seizure can occur, especially if you reduce the dose too rapidly or discontinue the medication abruptly. Seizure can be life-threatening. Laboratory Tests Laboratory tests are not ordinarily required in otherwise healthy patients. However, when treatment is protracted, periodic blood counts, urinalysis, and blood chemistry analyses are advisable in keeping with good medical practice. Drug Interactions Use with Other CNS Depressants If alprazolam tablets are to be combined with other psychotropic agents or anticonvulsant drugs, careful consideration should be given to the pharmacology of the agents to be employed, particularly with compounds which might potentiate the action of benzodiazepines. The benzodiazepines, including alprazolam, produce additive CNS depressant effects when co-administered with other psychotropic medications, anticonvulsants, antihistaminics, ethanol and other drugs which themselves produce CNS depression. Use with Imipramine and Desipramine The steady state plasma concentrations of imipramine and desipramine have been reported to be increased an average of 31% and 20%, respectively, by the concomitant administration of alprazolam tablets in doses up to 4 mg/day. The clinical significance of these changes is unknown. Drugs that inhibit alprazolam metabolism via cytochrome P450 3A The initial step in alprazolam metabolism is hydroxylation catalyzed by cytochrome P450 3A (CYP3A). Drugs which inhibit this metabolic pathway may have a profound effect on the clearance of alprazolam (see CONTRAINDICATIONS and WARNINGS for additional drugs of this type). Drugs demonstrated to be CYP3A inhibitors of possible clinical significance on the basis of clinical studies involving alprazolam (caution is recommended during coadministration with alprazolam) Fluoxetine Coadministration of fluoxetine with alprazolam increased the maximum plasma concentration of alprazolam by 46%, decreased clearance by 21%, increased half-life by 17%, and decreased measured psychomotor performance. Propoxyphene Coadministration of propoxyphene decreased the maximum plasma concentration of alprazolam by 6%, decreased clearance by 38%, and increased half-life by 58%. Oral Contraceptives Coadministration of oral contraceptives increased the maximum plasma concentration of alprazolam by 18%, decreased clearance by 22%, and increased half-life by 29%. Drugs and other substances demonstrated to be CYP3A inhibitors on the basis of clinical studies involving benzodiazepines metabolized similarly to alprazolam or on the basis of in vitro studies with alprazolam or other benzodiazepines (caution is recommended during coadministration with alprazolam) Available data from clinical studies of benzodiazepines other than alprazolam suggest a possible drug interaction with alprazolam for the following: diltiazem, isoniazid, macrolide antibiotics such as erythromycin and clarithromycin, and grapefruit juice. Data from in vitro studies of alprazolam suggest a possible drug interaction with alprazolam for the following: sertraline and paroxetine. However, data from an in vivo drug interaction study involving a single dose of alprazolam 1 mg and steady state dose of sertraline (50 to 150 mg/day) did not reveal any clinically significant changes in the pharmacokinetics of alprazolam. Data from in vitro studies of benzodiazepines other than alprazolam suggest a possible drug interaction for the following: ergotamine, cyclosporine, amiodarone, nicardipine, and nifedipine. Caution is recommended during the coadministration of any of these with alprazolam (see WARNINGS). Drugs demonstrated to be inducers of CYP3A Carbamazepine can increase alprazolam metabolism and therefore can decrease plasma levels of alprazolam. Drug/Laboratory Test Interactions Although interactions between benzodiazepines and commonly employed clinical laboratory tests have occasionally been reported, there is no consistent pattern for a specific drug or specific test. Carcinogenesis, Mutagenesis, Impairment of Fertility No evidence of carcinogenic potential was observed during 2-year bioassay studies of alprazolam in rats at doses up to 30 mg/kg/day (150 times the maximum recommended daily human dose of 10 mg/day) and in mice at doses up to 10 mg/kg/day (50 times the maximum recommended daily human dose). Alprazolam was not mutagenic in the rat micronucleus test at doses up to 100 mg/kg, which is 500 times the maximum recommended daily human dose of 10 mg/day. Alprazolam also was not mutagenic in vitro in the DNA Damage/Alkaline Elution Assay or the Ames Assay. Alprazolam produced no impairment of fertility in rats at doses up to 5 mg/kg/day, which is 25 times the maximum recommended daily human dose of 10 mg/day. Pregnancy Teratogenic Effects Pregnancy Category D (See WARNINGS section). Nonteratogenic Effects It should be considered that the child born of a mother who is receiving benzodiazepines may be at some risk for withdrawal symptoms from the drug during the postnatal period. Also, neonatal flaccidity and respiratory problems have been reported in children born of mothers who have been receiving benzodiazepines. Labor and Delivery Alprazolam has no established use in labor or delivery. Nursing Mothers Benzodiazepines are known to be excreted in human milk. It should be assumed that alprazolam is as well. Chronic administration of diazepam to nursing mothers has been reported to cause their infants to become lethargic and to lose weight. As a general rule, nursing should not be undertaken by mothers who must use alprazolam. Pediatric Use Safety and effectiveness of alprazolam in individuals below 18 years of age have not been established. Geriatric Use The elderly may be more sensitive to the effects of benzodiazepines. They exhibit higher plasma alprazolam concentrations due to reduced clearance of the drug as compared with a younger population receiving the same doses. The smallest effective dose of alprazolam should be used in the elderly to preclude the development of ataxia and oversedation (see CLINICAL PHARMACOLOGY and DOSAGE AND ADMINISTRATION)."
  ],"warnings": [
    "Dependence and Withdrawal Reactions, Including Seizures Certain adverse clinical events, some life-threatening, are a direct consequence of physical dependence to alprazolam. These include a spectrum of withdrawal symptoms; the most important is seizure (see DRUG ABUSE AND DEPENDENCE). Even after relatively short-term use at the doses recommended for the treatment of transient anxiety and anxiety disorder (i.e., 0.75 to 4 mg per day), there is some risk of dependence. Spontaneous reporting system data suggest that the risk of dependence and its severity appear to be greater in patients treated with doses greater than 4 mg/day and for long periods (more than 12 weeks). However, in a controlled postmarketing discontinuation study of panic disorder patients, the duration of treatment (3 months compared to 6 months) had no effect on the ability of patients to taper to zero dose. In contrast, patients treated with doses of alprazolam greater than 4 mg/day had more difficulty tapering to zero dose than those treated with less than 4 mg/day. The importance of dose and the risks of alprazolam as a treatment for panic disorder Because the management of panic disorder often requires the use of average daily doses of alprazolam above 4 mg, the risk of dependence among panic disorder patients may be higher than that among those treated for less severe anxiety. Experience in randomized placebo-controlled discontinuation studies of patients with panic disorder showed a high rate of rebound and withdrawal symptoms in patients treated with alprazolam compared to placebo-treated patients. Relapse or return of illness was defined as a return of symptoms characteristic of panic disorder (primarily panic attacks) to levels approximately equal to those seen at baseline before active treatment was initiated. Rebound refers to a return of symptoms of panic disorder to a level substantially greater in frequency, or more severe in intensity than seen at baseline. Withdrawal symptoms were identified as those which were generally not characteristic of panic disorder and which occurred for the first time more frequently during discontinuation than at baseline. In a controlled clinical trial in which 63 patients were randomized to alprazolam and where withdrawal symptoms were specifically sought, the following were identified as symptoms of withdrawal: heightened sensory perception, impaired concentration, dysosmia, clouded sensorium, paresthesias, muscle cramps, muscle twitch, diarrhea, blurred vision, appetite decrease, and weight loss. Other symptoms, such as anxiety and insomnia, were frequently seen during discontinuation, but it could not be determined if they were due to return of illness, rebound, or withdrawal. In two controlled trials of 6 to 8 weeks duration where the ability of patients to discontinue medication was measured, 71% to 93% of patients treated with alprazolam tapered completely off therapy compared to 89% to 96% of placebo-treated patients. In a controlled postmarketing discontinuation study of panic disorder patients, the duration of treatment (3 months compared to 6 months) had no effect on the ability of patients to taper to zero dose. Seizures attributable to alprazolam were seen after drug discontinuance or dose reduction in 8 of 1980 patients with panic disorder or in patients participating in clinical trials where doses of alprazolam greater than 4 mg/day for over 3 months were permitted. Five of these cases clearly occurred during abrupt dose reduction, or discontinuation from daily doses of 2 to 10 mg. Three cases occurred in situations where there was not a clear relationship to abrupt dose reduction or discontinuation. In one instance, seizure occurred after discontinuation from a single dose of 1 mg after tapering at a rate of 1 mg every 3 days from 6 mg daily. In two other instances, the relationship to taper is indeterminate; in both of these cases the patients had been receiving doses of 3 mg daily prior to seizure. The duration of use in the above 8 cases ranged from 4 to 22 weeks. There have been occasional voluntary reports of patients developing seizures while apparently tapering gradually from alprazolam. The risk of seizure seems to be greatest 24 to 72 hours after discontinuation (see DOSAGE AND ADMINISTRATION for recommended tapering and discontinuation schedule). Status Epilepticus and Its Treatment The medical event voluntary reporting system shows that withdrawal seizures have been reported in association with the discontinuation of alprazolam. In most cases, only a single seizure was reported; however, multiple seizures and status epilepticus were reported as well. Interdose Symptoms Early morning anxiety and emergence of anxiety symptoms between doses of alprazolam have been reported in patients with panic disorder taking prescribed maintenance doses of alprazolam. These symptoms may reflect the development of tolerance or a time interval between doses which is longer than the duration of clinical action of the administered dose. In either case, it is presumed that the prescribed dose is not sufficient to maintain plasma levels above those needed to prevent relapse, rebound or withdrawal symptoms over the entire course of the interdosing interval. In these situations, it is recommended that the same total daily dose be given divided as more frequent administrations (see DOSAGE AND ADMINISTRATION). Risk of Dose Reduction Withdrawal reactions may occur when dosage reduction occurs for any reason. This includes purposeful tapering, but also inadvertent reduction of dose (e.g., the patient forgets, the patient is admitted to a hospital). Therefore, the dosage of alprazolam should be reduced or discontinued gradually (see DOSAGE AND ADMINISTRATION). CNS Depression and Impaired Performance Because of its CNS depressant effects, patients receiving alprazolam should be cautioned against engaging in hazardous occupations or activities requiring complete mental alertness such as operating machinery or driving a motor vehicle. For the same reason, patients should be cautioned about the simultaneous ingestion of alcohol and other CNS depressant drugs during treatment with alprazolam. Risk of Fetal Harm Benzodiazepines can potentially cause fetal harm when administered to pregnant women. If alprazolam is used during pregnancy, or if the patient becomes pregnant while taking this drug, the patient should be apprised of the potential hazard to the fetus. Because of experience with other members of the benzodiazepine class, alprazolam is assumed to be capable of causing an increased risk of congenital abnormalities when administered to a pregnant woman during the first trimester. Because use of these drugs is rarely a matter of urgency, their use during the first trimester should almost always be avoided. The possibility that a woman of childbearing potential may be pregnant at the time of institution of therapy should be considered. Patients should be advised that if they become pregnant during therapy or intend to become pregnant they should communicate with their physicians about the desirability of discontinuing the drug. Alprazolam Interaction With Drugs That Inhibit Metabolism Via Cytochrome P450 3A The initial step in alprazolam metabolism is hydroxylation catalyzed by cytochrome P450 3A (CYP3A). Drugs that inhibit this metabolic pathway may have a profound effect on the clearance of alprazolam. Consequently, alprazolam should be avoided in patients receiving very potent inhibitors of CYP3A. With drugs inhibiting CYP3A to a lesser but still significant degree, alprazolam should be used only with caution and consideration of appropriate dosage reduction. For some drugs, an interaction with alprazolam has been quantified with clinical data; for other drugs, interactions are predicted from in vitro data and/or experience with similar drugs in the same pharmacologic class. The following are examples of drugs known to inhibit the metabolism of alprazolam and/or related benzodiazepines, presumably through inhibition of CYP3A. Potent CYP3A Inhibitors Azole Antifungal Agents Ketoconazole and itraconazole are potent CYP3A inhibitors and have been shown in vivo to increase plasma alprazolam concentrations 3.98 fold and 2.7 fold, respectively. The coadministration of alprazolam with these agents is not recommended. Other azole-type antifungal agents should also be considered potent CYP3A inhibitors and the coadministration of alprazolam with them is not recommended (see CONTRAINDICATIONS). Drugs demonstrated to be CYP3A inhibitors on the basis of clinical studies involving alprazolam (caution and consideration of appropriate alprazolam dose reduction are recommended during coadministration with the following drugs) Nefazodone Coadministration of nefazodone increased alprazolam concentration two-fold. Fluvoxamine Coadministration of fluvoxamine approximately doubled the maximum plasma concentration of alprazolam, decreased clearance by 49%, increased half-life by 71%, and decreased measured psychomotor performance. Cimetidine Coadministration of cimetidine increased the maximum plasma concentration of alprazolam by 86%, decreased clearance by 42%, and increased half-life by 16%. Other Drugs Possibly Affecting Alprazolam Metabolism Other drugs possibly affecting alprazolam metabolism by inhibition of CYP3A are discussed in the PRECAUTIONS section (see PRECAUTIONS: Drug Interactions)."
  ]
</code>
Last but not least, please do not rely on openFDA to make decisions regarding medical care. While we make every effort to ensure that data is accurate, you should assume all results are unvalidated. Thank you.


Okay Google option to open from lock screen using Moto G 3rd Gen

Question: Can anyone help me? On my Moto g 3rd Gen I cannot open by saying OK Google from the lock screen. In fact it doesn't even give me that option. The only option that i have when i go to my OK Google detection in the settings is "FROM THE GOOGLE APP"-Say OK Google to start a voice search from the Google app or any Home screen in the Google Now Launcher. That's it. I have tried everything. I have spoken to Motorola a number of times and they are, to say the least, clueless. I also contacted Google and they understood what I was saying but had no idea's on how to fix it. If anyone can help me - Please, I'm taking suggestions.
Answer: Sometimes it's just the gapp you have. I had a rom that had gapps preinstalled and the option wasn't there, but when I flashed official gapps from opengapps.org it gave me the option.


Proof of composition of one way function is not one way in general

Question: In this How to show composition of one way function is not such? question, the accepted answer uses g(x,y) as a one way function.
But, for a given output of g(x,y) = 0|x| of length l (say), isn't the output of g(any x of length l, 0l) the same as the earlier output? Isn't this a possible preimage of 0|x|?
Answer: "for a given output of g(x,y) = 0|x| of length l (say)," "the output of g(any x of length l, 0l)"

is "the same as the earlier output", which means that is "a possible preimage of 0|x|".

Accordingly, for  $g\hspace{-0.04 in}\circ \hspace{-0.03 in}f$  to be one-way, it had better be the case that
$\operatorname{Prob}_{\langle \hspace{.02 in}x,y\rangle \hspace{.02 in}\leftarrow \hspace{.02 in}\left(\hspace{-0.03 in}\{\hspace{-0.02 in}0,1\hspace{-0.02 in}\}^{\hspace{.02 in}L}\hspace{-0.03 in}\right)^{\hspace{.05 in}2}}\hspace{-0.1 in}\left[g(x,\hspace{-0.04 in}y) = 0^{\hspace{.03 in}L}\hspace{-0.0 in}\right] \;\;\;$ is negligible.
Comment: For the ten billionth time, all the spaces you insert into your LaTeX markup make your answer illegible on other people's screens. Are you using some kind of graphical equation editor to produce that code?
Comment: Could the equation be edited please? It's tough to understand that bit. Thank You


Why would CuSO4-EDTA drops be used in Pb titrations?

Question: We use CuSO4-EDTA drops (4) when preparing our lead titration samples for final titration by EDTA.  What mechanism would there be for adding this to a titration?  What benefit does it produce on Pb titration?  We digest galena with nitric and sulfuric, clean up samples with a 5% sulfate wash, and remaining sample is washed into original beaker with 50% ammonium acetate solution (ammonium acetate/acetic acid buffer).  Samples are boiled then cooled before final steps.  The samples have ~1.5g ascorbic acid, 4 copper-EDTA drops, and 4 xylenol orange drops added to each sample prior to titration with EDTA.
Comment: Galena is the mineral form of lead sulfide. I'd guess that the copper is added to remove any residual sulfide in solution since the Ksp for copper sulfide is $6\times10^{-37}$ which is more insoluble than lead sulfide which has a Ksp of $3\times10^{-28}$
Comment: @MaxW and both and extremely insoluble. I suspect non-equilibrium and kinetic effects might dominate here.
Answer: I'm not an expert on coordination chemistry, and in particularly, metal-indicator complexes in EDTA titrations for heavy metals. But, I assume, the addition of $\ce{[Cu(EDTA)]^2-}$ solution to your unknown $\ce{Pb}$ sample is to get a sharp end-point (example of Replacement or Substitution Titration). Since, the extra metal ion added ($\ce{Cu^2+}$) has already complexed with EDTA, it won't interfere with the calculations. Meantime, both $K_{\mathrm{f}}$s of $\ce{[Cu(EDTA)]^2-}$ and $\ce{[Pb(EDTA)]^2-}$ are so closed ($5\times 10^{18}$ and $2\times 10^{18}$, respectively) that following equilibrium exists:
$$\ce{[Cu(EDTA)]^2- + Pb^2+ <=> [Pb(EDTA)]^2- + Cu^2+}$$
Where, $$K_{\mathrm{eq}} = \frac {[\ce{(Pb(EDTA))^2-}][\ce{Cu^2+]}}{[\ce{(Cu(EDTA))^2-}][\ce{Pb^2+]}} = \frac{K_{\mathrm{f}(\ce{(Pb(EDTA))^2-})}}{K_{\mathrm{f}(\ce{(Cu(EDTA))^2-})}} = \frac{2}{5} = 0.4$$
Thus, released $\ce{Cu^2+}$ cpmplexed with Xylenol Orange to give stable red color at operating pH (e.g., Figure 1A, Ref.2). My assumption is based on EDTA titration of $\ce{Pb^2+}$ and $\ce{Bi^3+}$  ion mixtures in the presence of Xylenol Orange as an indicator. In that titration, pH of a test sample solution containing $\ce{Pb^2+}$ and $\ce{Bi^3+}$ is adjusted to $3$  and add the indicator (Xylenol Orange). The test solution becomes red due to the complex formation of $\ce{Bi^3+}$ and Xylenol Orange (Figure 1B). When titrate with EDTA, at the first end point, the solution becomes yellow, the color of the free indicator at that pH. To titrate for $\ce{Pb^2+}$ at the same solution, it is needed to adjust pH to 5 - 5.5 until the appearance of red color again (indicating the complexation of $\ce{Pb^2+}$ with Xylenol Orange). Now, the slution can be titrated with EDTA until the turning of red to yellow. It is important to note that solution of $\ce{Pb^2+}$ ions does not become red with Xylenol Orange until pH is above 5. That means, the [$\ce{Pb^2+}$ + Xylenol Orange] complex is unstable below pH 5.

Also note that use of ammonium acetate ($\ce{NH4OAc}$) as a neutral buffer is misleading. $\ce{NH4+}$  and $\ce{AcO-}$  are not a conjugate acid/base pair, which means that they do not constitute a buffer at pH 7. However, dissolution of ammonium acetate salt in water results in pH 7, but this pH is highly labile (Ref.1). Ammonium acetate does provide buffering around pH 4.75 (the $\mathrm{p}K_{\mathrm{a}}$ of acetic acid) and around pH 9.25 (the $\mathrm{p}K_{\mathrm{a}}$ of ammonium). Thus, advantage for using $\ce{NH4OAc}$ is a drop from pH 7 to around pH 4.75, which is considerably less dramatic (e.g., addition of $\pu{1 mM} \: \ce{H+}$ to a $\pu{10 mM}$ neutral pH solution will decrease the pH to 5.8) than doing the same to pure water. Remember, during the titration, with out "real" buffer, pH of the solution changed due to release of $\ce{H+}$ ions by complexation.
References:

L. Konermann, "Addressing a Common Misconception: Ammonium Acetate as Neutral pH "Buffer" for Native Electrospray Mass Spectrometry," J. Am. Soc. Mass Spectrom. 2017, 28(9), 1827–1835 (https://doi.org/10.1007/s13361-017-1739-3).
Interesting reading: O. J. V. Belleza, A. J. L. Villaraza, "Ion charge density governs selectivity in the formation of metal–Xylenol Orange (M–XO) complexes," Inorganic Chemistry Communications 2014, 47(1), 87–92 (https://doi.org/10.1016/j.inoche.2014.07.024).
Relevant: S. Murakami, "Semi-Xylenol Orange Complexes with Bivalent Metal Ions," J. inorg, Nucl, Chem. 1981, 43(2), 335–343 (https://doi.org/10.1016/0022-1902(81)90020-8).
Comment: Your chemical equation for the equilibrium depicts the charges on the metal ions wrongly. They should be "2+", not "2-".
Comment: This makes more sense than my guess about sulfide ppts.
Comment: @Tan Yong Boon: Thanks for the finding. It was a typo and changed accordingly. I appreciate very careful reading.
Comment: @MaxW: I glad somebody like it. Sulfide precipitation is a believable suggestion as well.
Comment: Thank you for the detailed response.  I did some experimentation with Ascorbic and the copper drops on lead nitrate after my post.  I did not find any discernable difference between the endpoint characteristics with or without either of these reagents.  I need to do further testing with our digested mine concentrate samples to evaluate any variance (e.g. sulfide precipitation).


What are the grammar rules when making questions using auxiliary verbs combining all the three tenses or either of them in a single sentence?

Question: Should I repeat the main verb after every auxiliary verb or can I simply skip it after the first or second auxiliary verb and use it after the last auxiliary verb in a sentence? For example, can I say "Have you ever(I've skipped the main verb "fall" here) or would you ever fall in love with someone you met on the internet?"
Comment: This is one of the cases where neither option feels right to a native speaker (at least, to this native speaker), and whatever rule you may have found in a grammar book is something that somebody made up because they think there should be rules.
Answer:
[Have you ever] or [would you ever] fall in love with someone you met
on the internet?

Strictly speaking this is unacceptable because "fall in love ..." cannot satisfy the complement requirements of both bracketed coordinates.
"Have you ever" requires a past participle complement ("Have you ever fallen in love ...?"), whereas "would you ever" requires an infinitival one ("Would you ever fall in love ...?").
Nevertheless, you are likely to hear this kind of sentence spoken, and many people wouldn't even notice the error. What this teaches us is that ungrammaticality is gradient, and humans are amazingly tolerant of slight departures from full grammaticality.
Answer: You need not repeat the main verb after every auxiliary verb, you can skip it after the first or second auxiliary verb and use it after the last auxiliary verb in a sentence only when the main verbs have the same forms.

"Have you ever fallen or would you ever fall in love with someone you met on the internet?"

Here, we can't skip the first main verb because the two main verbs have different forms : 'fallen' & 'fall'.
Answer: Information you can use
Same tense of a verb:
Have you ever traveled or been to Hungary? [OK, have traveled, have been: no need to repeat have, the auxiliary]
Two different tenses:
Have you ever traveled or would you ever travel to Hungary? [OK, have traveled BUT would travel, two different helping verbs. have traveled and would travel must be used]
Two different present tenses:

Am I making myself clear and do I make myself clear in general around here? [two different tenses taking two different forms]

Rule: Follow the verb form: if the forms are different, you need to show that.

Do you ever speak or write English? [same form: present perfect, no repetition
Have you ever spoken English or would you ever speak it? [different forms: present perfect and conditional, you have to use the forms.]


After Effects - How do I create animated coding

Question: Are there any tutorials on how to create animated 'coding', where it looks like code is being typed in? I want to do something similar to this: http://footage.shutterstock.com/clip-1355773-stock-footage-a-d-animation-about-the-network-data-flow.html. In that video about half way through it pans to a section where it looks like code is being typed in.
Answer: I dont know of any tutorials off hand (you will need to do a google) but to animate text to make it look as if its typing on isnt too hard:

Create your text layer
Expand the later (clicking the white triangle next to the name)
Click on the animate button > select Opacity
Now you can use the range selectors to animate what is changed.

There is also a typewriter preset in the Effects and Presets panel which does the same thing.
Answer: There's some text animation effects you can use to automate it.
This tutorial http://www.videocopilot.net/tutorials/text_blur_titles/ uses the text animation blur, one of the others is text typing.
Answer: This may not be exactly what you are after, but the simplest way could be to use a screen recording tool to record you typing the code. Have a look at this question for guidance - it is very easy to do, and you can time it as you like, rather than have to worry about setting animation schedules etc.


What actions can be taken as a free action?

Question: I just got my first model for X-Wing Minis (an E-Wing) and received a card in the box called "Advanced Sensors". It's a 3-point card granting "...1 free action..." "Immediately before you reveal your maneuver,...". My question is What can I do as a Free Action using this card? All I can find in the rule book is that it is "something specified in a card or a game type" and nothing else.
Comment: Have you got a core set of some sort? You need one of those to play the game. The extra ships are just expansions.
Answer: Free actions are actions that are specified on the ship's action bar, other cards or special mission rules. You can normally only perform actions during the Perform Action step of the Activation phase.
Advanced Sensors allows you to perform any one of these free actions outside of the regular step at the cost of skipping that step.
From the X-Wing Rules reference (pg 12)

A free action is an action granted to a ship through a card ability or other effect. It does not count as the one standard action that a ship performs during the "Perform Action" step.
• A stressed ship cannot perform free actions.
• A ship can perform free actions even if it skipped its "Perform Action" step due to overlapping an asteroid obstacle or another game effect.
• If a ship is specifically granted a free barrel roll action or a free boost action and cannot complete the action in the desired direction, it may choose a different direction. It cannot choose to perform a different action.
Comment: Thanks for pointing out the page, I guess I didn't read it closely enough the first time...


Can I have an animated GIF with more than 256 colours per frame?

Question: Can I have an animated GIF with more than 256 colours per frame? I want to do an animated GIF but the limited colour pallet is making it look like rubbish.
Answer: Yes, you can, with certain limitations.

GIF supports per-frame (local) palettes and has an "as-is" frame disposal method that allows combining of several frames.
I've written [a GIF encoder "gifski" using this technique]. It produces animations with about 1000-3000 colors per frame.
The catch is you can only take advantage of this when not all pixels of the image change between frames. So, if you have something moving in front of a still background, you can have more than 256-color animation — the moving object will be limited to 256 colors, but the background could be composed of several frames with different palettes. With clever dithering, it's even possible to reuse some pixels of moving objects.
Comment: @Pacerier This works only for animations. In theory it would be possible for a static GIF, but due to legacy/bugs browsers interpret `0` frame delay as ~1/16th of a second, so at best you can have animation that builds a static image. For static you're better off with PNG/JPG anyway.
Comment: Yea gif doesn't even seem to have a single advantage in the domain of static images.
Comment: @GeorgeEdison you could, but GIF has awfully weak compression, so it'd be worse in every way than just using PNG or anything else.
Comment: @g491 gifsicle can build files like that (use multiple gifs with transparency and disposal=keep mode)
Comment: Do you mean that only **animated** images can have more than 256 colors? Is it possible to hack it in anyway that we can display a *static* image with more than 256 colors?
Comment: You could load the static image this way to hide the fact that you're doing this to squeak out more colors: https://blog.codinghorror.com/content/images/uploads/2005/12/6a0120a85dcdae970b0128776fcab6970c-pi.gif
Comment: @Kornel What tool(s) can be used to produce GIFs like this?
Answer: No, you can't; GIF format only allows 256 colours.
Comment: Per frame. Before you mention practicality issues, I'm pretty sure Bing is using these true-color GIFs right now.
Comment: I see 32697 colors on this gif: http://phil.ipal.org/tc.html and also http://goo.gl/DBdg1o
Answer: At least, in theory, you can stack GIFs and make the extra colors transparent.

First, you copy each frame so that you have two of each.
Then, select the area by color with the sensitivity low enough so that it selects half the picture.
Then, just erase everything inside the selection.
Now, invert the selection.
Then, go to the next frame and erase everything again.
Save the end result (raw-ani.gif).
Delete half the frames.
Save with a new file name (ani1.gif).
Load the previously saved version.
Delete the other half of the frames.
Save again (ani2.gif).

Hack some HTML with absolute positioning and put ani2.gif on top of ani1.gif.
Repeat the process to make four, eight, 16 layers or what you want.
You could also speed up the raw-ani.gif result and have what Kornel described.
Answer: No gif files are not limited to 256 colors.
Comment: While sort of true, the true-color GIF hack has some major limitations: it doesn't work on image viewers that don't support animation (or in browsers where the user has disabled GIF animation), it may render very slowly in some browsers that impose a [minimum frame delay](http://webmasters.stackexchange.com/a/26998), and it tends to produce huge files that compress poorly. It's neat, but not really very useful in the real world. Just use PNG if you need more than 256 colors. (Alas, MNG/APNG browser support is really spotty.)
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Answer: It is possible to have a true colour gif and there are various articles online, however they are not very practical.


Cyanide complexes in Molecular Orbital Theory

Question: In molecular orbital theory, please explain why cyanide ion combines with metal from the carbon end and not from the nitrogen end?
Comment: It can be other way round, depending on cation. Why this theory not another? You need sth more advanced then HSAB?
Comment: agree with Mith, HSAB is the best explanation imo since cyanide is ambidentate, but I guess if you just want an explanation of why it *can* coordinate via C then I suppose the shape of the HOMO would explain it. That doesn't mean it *always* coordinates via C.
Answer: In this answer of Martin's, you can find a molecular orbital diagram of $\ce{CO}$. The corresponding diagram for cyanide, $\ce{CN-}$ is essentially identical, there will only be different orbital energies and very slightly different extends of the lobes.
When forming a coordinate bond to a metal centre, cyanide will primarily attack with its highest occupied molecular orbital, the HOMO, since it is a nucleophile (attacking a positively polarised metal centre). You can also see the HOMO depicted as the bottom image of the following set as taken from Wikipedia:

Note the large lobe extending outwards on carbon's side. An attack with this lobe is greatly preferred, hence why isocyanides are comparatively rare.


Pharmacokinetics: why do certain drugs follow zero-order kinetics?

Question: I understand that alcohol and phenytoin are two examples of drugs that follow zero-order kinetics. Why do these two particular drugs follow zero-order kinetics as opposed to first-order kinetics?
Comment: Hi and welcome to Biology.SE! We encourage making a decent attempt to answer questions before we make new posts - could you let us know some of your thinking that led to this question, and what part of it you couldn't find easily by searching the web?
Comment: You would observe zeroth order kinetics when the metabolism is dependent on a catalyst (enzyme) that is limiting. Very low $K_m$ and low enzyme concentration compared to substrate would show this kind of effect.
Comment: Zero-order kinetics is linear, and the rate of metabolism of a particular drug is constant despite the amount of drug present. I was curious to know if there were any biochemical processes involved that would cause alcohol and phenytoin to follow zero-order kinetics.
Answer: Basically any compound in concentrations sufficient to saturate its metabolization machinery will show zero-order pharmacokinetics. This reflects the fact that metabolization is taking place at full speed while facing a comparatively enormous amount of substrate (just as @WYSIWYG pointed out). This effect can also be shown in vitro with pure substrate/enzyme solutions.
But the above is a rather simplistic model, valid only in specific situations.
Most of the time in humans, zero-order kinetics stem from the fact that liver enzymes are saturated. However, for most drugs the redistribution phase is much more important than metabolization/elimination in defining the duration of effect. A good example of that would be sodium thiopental. As a single iv bolus dose, it will induce loss of consciousness for a short time due to redistribution. However, continued infusion will allow blood and tissue concentrations to equilibrate, and then the metabolization/elimination rate will become much more prominent in defining the duration of effect. And as sodium thiopental happens to have zero-order metabolization kinetics in continued infusion, it will take you a loooooooooong time to wake up! This is why in human pharmacology, we use context sensitive half-life to better represent drug kinetics.
Answer: Alcohol is a drug that is cleared by an enzyme. This interaction is what follows zero-order behavior. However, initially alcohol follows first order behavior because the ability of the enzyme to clear the alcohol exceeds the concentration of alcohol. That means clearance is constant and does not depend on the alcohol concentration.
Now what makes alcohol zero order is that the desired effect of alcohol (the therapeutic effect) occurs when the dose is greater than that enzymes ability to clear the alcohol. Once the alcohol concentration is greater than a certain point the body begins to struggle to clear the alcohol (roughly near the Km of the clearance enzyme) because of a physical limitation on the quantity or quality of the enzyme. So now when you increase the concentration of alcohol, the rate of clearance is not able to account for that increase proportionally because it is saturated. Therefore the alcohol you consume after a certain point (Km of the clearance enzyme) has a greater toxic effect. One drink too many is a very real thing.


What purpose does getChildHtml('top') and getChildHtml('bottom') have in wishlist/view?

Question: I undersand getChildHtm() is used for rendering child blocks which are connected in layout xml files, but I can not find any template or block named 'top' or 'bottom'. Also both of them are empty strings. Why are those there in the first place and from where and how is the content eventually attached to them?
Answer: There are a lot of getChildHtml() calls throughout a lot of templates to give you the possibility to add new blocks.
If there is no child block, there is nothing rendered.
If you add a child block - tada - it gets rendererd :-)
Comment: I think so, but why do you want this? There is no need, and better don't delete them, if you are wrong and there is a child block somewhere defined, e.g. in an extension you install later ;-)
Comment: because I'm creating a custom theme and I would not like this unknown data to potentially break my layout, but I guess better idea would be to leave a possible place for those in layout.
Comment: so these are just placeholders and I can delete those without worrying about closing a channel for some valuable data :) ?


Which printer software driver should I use?

Question: When adding a printer in OS X, and assuming the printer is AirPrint enabled, which driver should I use: 1. the AirPrint driver or 2. the CUPS driver for that specific printer?

My assumption is that while AirPrint is easy to use, it also must be generic enough to support a wide range of printers and a limited number of functions. Thus, while I can easily print with the AirPrint driver, I won't have access to all of the printer's functions and would be better off using the CUPS driver for that specific printer if I intend to print from that printer often or need more control over the printing process.
Anyone have documentation to support/refute my assumptions?
Answer: Doesn't matter. I've used both with an Epson multifunction printer/scanner and I have not lacked for any features with AirPrint.


How do I show that a two-qubit state is an entangled state?

Question: The Bell state $|\Phi^{+}\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle )$ is an entangled state. But why is that the case? How do I mathematically prove that?
Answer: A two qudit pure state is separable if and only if it can be written in the form $$|\Psi\rangle=|\psi\rangle|\phi\rangle$$ for arbitrary single qudit states $|\psi\rangle$ and $|\phi\rangle$. Otherwise, it is entangled.
To determine if the pure state is entangled, one could try a brute force method of attempting to find satisfying states $|\psi\rangle$ and $|\phi\rangle$, as in this answer. This is inelegant, and hard work in the general case. A more straightforward way to prove whether this pure state is entangled is the calculate the reduced density matrix $\rho$ for one of the qudits, i.e. by tracing out the other. The state is separable if and only if $\rho$ has rank 1. Otherwise it is entangled. Mathematically, you can test the rank condition simply by evaluating $\text{Tr}(\rho^2)$. The original state is separable if and only if this value is 1. Otherwise the state is entangled.
For example, imagine one has a pure separable state $|\Psi\rangle=|\psi\rangle|\phi\rangle$. The reduced density matrix on $A$ is
$$
\rho_A=\text{Tr}_B(|\Psi\rangle\langle\Psi|)=|\psi\rangle\langle\psi|,
$$
and
$$
\text{Tr}(\rho_A^2)=\text{Tr}(|\psi\rangle\langle\psi|\cdot |\psi\rangle\langle\psi|)=\text{Tr}(|\psi\rangle\langle\psi|)=1.
$$
Thus, we have a separable state.
Meanwhile, if we take $|\Psi\rangle=\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)$, then
$$
\rho_A=\text{Tr}_B(|\Psi\rangle\langle\Psi|)=\frac12\left(|0\rangle\langle 0|+|1\rangle\langle 1|\right)=\frac12\mathbb{I}
$$
and
$$
\text{Tr}(\rho_A^2)=\frac14\text{Tr}(\mathbb{I}\cdot\mathbb{I})=\frac12
$$
Since this value is not 1, we have an entangled state.
If you wish to know about detecting entanglement in mixed states (not pure states), this is less straightforward, but for two qubits there is a necessary and sufficient condition for separability: positivity under the partial transpose operation.
Comment: +1 This is a much more elegant method compared to the brute force algorithm.
Comment: @Dohleman Yes, they're just labels for the two parts of the system, one part held by A (Alice), and the other by B (Bob). In this case it's the two qudits.
Comment: What are $A$ and $B$?  Are these just the qudits themselves?
Answer: Actually an even simpler way is as follows (reusing @nbro's notations). We have:

\begin{align}
|\Phi^{+}\rangle
&= |a\rangle \otimes |b\rangle \\
&= \left( \alpha |0\rangle + \beta |1\rangle \right) \otimes \left( \gamma |0\rangle + \lambda |1\rangle \right)
\end{align}

We can now simply apply the distributive property to obtain

\begin{align}
|\Phi^{+}\rangle
&= \cdots \\
&= \left( \alpha \gamma  |00\rangle +  \alpha \lambda |01\rangle + \beta \gamma |10\rangle + \beta \lambda |11\rangle \right)
\end{align}

Now if we multiply the coefficients of $|00\rangle $ and $|11\rangle $, we get
$\alpha \beta \gamma \lambda$.
Also, if we multiply the coefficients of $|01\rangle $ and $ |10\rangle $, we get $\alpha \beta \gamma \lambda$
If these two are equal, then the qubits are in a product state. Else, it automatically means the qubits are in an entangled state.
For the Bell state above, the first product = $1/2$ and the second product = 0. Since they are unequal they are in an entangled state.
I find this is the quickest and easiest way to tell if a pair of qubits are entangled or not.
Comment: I mean the other direction: if the product of the coefficients in front of |00> and |11> equals the product of coefficients in front of |01> and |10>, then the state is a product state.
Comment: That works for a pure two qubit state. You might want to add a proof for your claim that if the two products are equal => the state is a product state?
Comment: hmm... I am not sure what exactly you are looking for. Basically, starting out with arbitrary variables α,β,γ, and λ, doesn't this already show they need to be equal to be in a product state...
Comment: A nice explanation can be found in this [answer](https://quantumcomputing.stackexchange.com/a/2287/26941). To conclude, if we are given an equation of form |Φ>=a|00>+b|01>+c|10>+d|11> then |Φ> is a product state iff ad=bc.
Answer: Take a look at "entanglement of formation". It's a nice metric for how much is a state entangled. the "units" are (a log of) how many bell states required to get into this state. See here for more info, and also here.
Example:
from qiskit.quantum_info import entanglement_of_formation
import numpy as np
li = np.sqrt(0.5) #shortcut for 1/sqrt(2)

Bell state:
bell = [li, 0, 0, li]
entanglement_of_formation(bell)
#returns 0.9999999999999999 (practically 1...)

|00> state:
just00 = [1, 0, 0, 0]
entanglement_of_formation(just00)
#returns 0.0

Not really Bell (|+0>):
plus0 = [li, li, 0, 0]
entanglement_of_formation(plus0)
#returns 1.6017132519074586e-16 (practically zero...)

Comment: When you think about the chosen metric, it amusingly follows... measuring Bell states in Bells (or dB :))
Answer: There are several ways. Easiest of the is:

Find $\rho = |\Psi\rangle\langle\Psi|$
Find $\rho^2$
Check if $\rho^2 = \rho$. If yes, it is a pure state and entangled. This state $|\Psi\rangle$ can not be written as $|\psi\rangle\otimes|\phi\rangle$ form.

Another way is to find Tr($\rho^2$). If it $1$, then the state is entangled.
Third way would be checking the Schmidt decomposition method.
Comment: Pure state can be either entangled or separable. Pure and entangled are not synonyms.
Comment: You are right. I have used "i.e." instead of "and/also". Thanks for correcting me. I'm going to modify it :)


Stellar smart contract

Question: Where does the stellar smart contracts stored. Its storing in blokchain (similar like ethereum) or its runs separately and storing only the signed transactions?. As i know stellar stores only the transactions in ledger so where the contracts stored.
Answer: From https://www.stellar.org/developers/guides/walkthroughs/stellar-smart-contracts.html

A Stellar Smart Contract (SSC) is expressed as compositions of transactions that are connected and executed using various constraints

SSCs are not stored as executable contracts. They are formed as the logical outcome of constraints placed around transactions.
The constraints available include:

Multisignature - What keys are needed to authorize a certain operation? What parties need to agree on a circumstance in order to execute the steps?
Batching/Atomicity - What operations must all occur together or fail? What must happen in order to force this to fail or pass?
Sequence - In what order should a series of transactions be processed? What are the limitations and dependencies?
Time Bounds - When can a transaction be processed?

Examples of how to construct SSCs are given in the docs and this repo.
Comment: Thanks for the reply. So the contract transactions are stored in any place inside blockchain?. because i am having a doubt if the contract not stored inside blockchain then there are possibilities to modify in future. So how stellar controlling the future contract modifications?.
Comment: Yes, the individual transactions are recorded in the ledgers once submitted. But, more to the point, signed transactions cannot be modified by other parties, whether they have been submitted or not. You can take this conversation to the slack channel for the finer details.
Comment: Sure thanks for the details. As i understand in stellar we need to must use transactions in order to create a contract. So it will not efficient and flexible enough as ethereum
Comment: I argue that it's 1: more efficient; 2: less flexible; 3: less flexible == more secure
Comment: i agree the term of security but cant write logic as we want because we have transaction restriction. it will be supper efficient for contracts that dealing with money but for only transfer assets or record data without any money involvement stellar will be not the first choice.
Comment: As i got the understanding stellar contract will be good for the crypto projects and money transactions, because when we create contract it store only transaction hash not any other logic. if i am right

Stellar smart contract