How can I plan the chapters in my book?

Question: I'm looking for methods of planning chapters for books. I always saw structures and scripting in the macro level, but never in the micro level.
Answer: I'd consider a chapter either a "movement" in a story, or a setting in a story (and sometimes it is both).
A "movement" is when a character (or more than one) goes from one governing mental state to another governing mental state. For example, Cindy's initial mental state is "normal life", she wakes up, eats, runs, dresses, goes to work. On her way to work, she witnesses a murder. Now, if she is a normal person, she is in a new mental state, we might call it "Holy Shit Panic". Or if you prefer, "extreme alarm". That is a good chapter break.
A locale change, for a chapter break, is when you want to skip the mundane BS of travel or getting somewhere or time going by. You can often do that with exposition; e.g.

Cindy finished her three miles, and walking back into the front door realized she was running mindlessly, she couldn't remember a thing about what she had seen. She arrived at work fifteen minutes early. Just as well, the Brafield account was still a puzzle and she was behind on it.

But you can also do it with a chapter break: Reader's presume any "lost time" between chapters was uneventful. So Cindy leaves for her run, and that is the end of the Chapter. The next chapter can begin hours, days or weeks later.
You can make this less jarring by ending one chapter with a task to be done, and beginning the next chapter with the task complete, with as much time passed as you want. The task may or may not be important to the plot, it can be just a patch of "something that happened" in the intervening time.
So maybe Cindy leaves on her run, determined to figure out some way to solve the puzzle of the Brayfield account. The next chapter picks up with her being congratulated for her brilliant work on the Brayfield account. We might want that to serve a greater purpose, so that congratulations could actually lead to a plot point: Cindy you did such a good job, I want you to take a look at this other account: For a guy that happens to be a mobster and is lethal to even know. Or For the prince that will become the love of her life. Whatever your plot is.
In general, you want to end chapters in a way that leaves readers wanting to find out what happens in the next chapter. That does NOT have to be a cliffhanger, it can be mild, but be sure to break in a place where there should be some question in the reader's mind about "what happens next".
In the case of Cindy witnessing a murder, the reader wants to know what she does next. Chapter endings are generally dramatic turning points so there is a fresh situation or determination or plan or knowledge or realization, and the reader wants to see what happens with that new situation.
Other than that, it is up to you how many you create; I've seen anywhere from 10 to 40 in a novel, and chapters less than two pages long. I'd look for the breakpoints as I described, and use them as you see fit. If two are very close together, or you think some are weak breakpoints, you don't have to use every one you find.
Comment: In your example here, chapter 2 should end with something: She learned something new, or she realizes she has drawn the attention of law enforcement by poking around and asking questions, or finds out the person she saw killed had ***her name*** in his pocket, or whatever. If Ch2 is about her investigation, the end of Ch2 has advanced that investigation to reveal something of significance to the plot. Perhaps Ch2 ends with the detective appearing. Cindy calmly assumes she was seen on a video camera and found as a witness. But in Ch3 his interrogation reveals to her she is his main suspect.
Comment: ... But that said, yes, Ch2 could just break because she is at a dead end, needs sleep, whatever and you (the author) need some time to pass for it to be plausible a detective appears next.
Comment: I forgot to mention that new chapters would start for a new POV character. I generally don't write multiple POV characters, but if you do, any such change of POV demands a chapter break (IMO). I believe the two-page chapter I saw was just because of a POV change, a traveling character learned something new that warranted a change of their destination; it was necessary to the plot in some way.
Comment: So you do something like "Chapter 1, Cindy is at a normal mental state, but then, she witness a murder. Chapter 2, Cindy is in an alert state, so, she tries to know what is going on. Chapter 3, Cindy still is in an alert state, but then, a detective appears and thinks she's the murderer." I guess you leave it open if the chapters changes depending on the movement of the plot, or the movement of the character. Either the character changes or the plot changes (or even the ambient changes). That's an excellent answer, Amadeus.
Answer: One can plan plot in details, or one can design characters' traits and see what story can't help but develop from that. You might find either approach or something in between serves you, but it sounds as if you've settled on something nearer the first end of the spectrum. One approach is to first write a synopsis of the whole story, in roughly the level of detail a future Wikipedia article about your book would; but even if you do, you might not find your initial "this is how much each chapter will cover" plans don't work out, either because they'd be the wrong length or because they wouldn't end on high notes.
It might be easier to let a synopsis guide you roughly as to the "parts" of a novel (which is what I did for one manuscript), and then see as you write which parts are several chapters and which stop in the middle of a chapter. You needn't display the "part" labels in the text itself; it'd only give away the twists. But you need to serve the needs of your story; for example, another manuscript based each chapter on one term at school, and therefore the storyline determined fairly neat chapter division.
Comment: This is the "snowflake method"
Comment: @Hanilucas I distinguished between chapter summaries, "part" summaries and a detailed but unstructured synopsis. The snowflake method is more about iteratively making the plan more and more detailed, by using each stage to guide the next: https://www.advancedfictionwriting.com/articles/snowflake-method/
Comment: @Which part? I mentioned more than one approach. The plot vs character distinction is also sometimes referred in terms of architects & gardeners, or (if you dislike the latter sort of writer) plotters & pantsers.
Comment: I was talking more about the synopsis approach. Can you clarify the other approach? It looked like they were the same, especially because they are on the same paragraph
Answer: What I would do, would be to write down every basic event, and then on top write which event in which chapter. So it would be like this:
Chapter 1:
-Event 1
-Event 2
-Event 3
Chapter 2:
-Event 1
-Event 2
Answer: I found that it is hard to plan chapters when you have less than 1k words. You may know the end, the middle part and the start but nothing in between. Once I hit 10k words (or 10% of the book) it became a bit challenging to find some story parts and that's where chapters became necessary.
But that's my own personal experience, I know that many writers have different systems.
Comment: Wait, do you mean that you subdivide chapters in your writings *after* part of the text is done?
Comment: Not exactly - mostly it's in progress.
Answer: Not sure I have the handle on this either, but what I've been doing in my rough drafts is to insert (Chapter break) Formated "center" and with the () when I feel there needs to be one. I can go back later and decide to either keep it in or remove it. In a later draft I may give them numbers.
Having it stand out centered also helps me be able to use the search function to jump to chapters when reviewing and editing, etc.
So far along with what others have mentioned about passages of time and skipping mundane stuff, I sometimes come across areas I feel needs to have a break.
A scene ended and the protagonist, or POV character is left with something to ponder over, or there's some tension left that can't be resolved yet. There may be something important that I feel needs to be left at the end of a chapter to add importance. I guess that may be considered a turning point in the plot as mentioned by another answer.
Another good time for a chapter break is when you're doing a POV shift, either past to present or into another character's mind. Also useful if your story includes sub plots. I like to have those in separate chapters when possible.

How can I plan the chapters in my book?


IFRS9 hedge accounting - fx risk hedge with Cross currency swap with notional reset

Question: My understanding is that notional resetable cross currency swaps (MTM CCS) are  very common amoung interbank markets, and MTM CCS are  often used to hedge fx exposure.
However, the notional resettable feature is not usaually included in hedged items, and hypothetical derivatives can not be created with the features which hedged items don't have under IFRS9, and so some ineffectiveness might occur between hypo with non notional reset feature and actual actual hedging MTM CCS
Thus, I would like to understand the validity of MTM CCS as effective hedging items under IFRS9, and whether hypothetical deriva can have the feature of notional reset  or not, considering hedge strategy and the fact that for major currencies, only MTM CCS is available in the interbank market.
Answer: If we work through this practically, a hypothetical derivative under IFRS9 cash flow hedge should be representative of the underlying, henceforth the MTM CCS must be mark to market on the currency side opposite to that of the hedged instrument.
For example, a EUR corporate might issue a yankee bond in 100mm USD and cross currency swap it back to EUR under a cash flow hedge. The cash flows of the USD bond, say 3M LIBOR, and the redemption of the 100mm USD at maturity should be matched on the currency swap. (This is non-standard in the first instance, since a EURUSD cross currency swap will MTM in USD not EUR, which would create the effect of only partially hedging the cashflows on the underlying USD bond). Lets assume that the MTM is performed in EUR and that the USD leg remains constant throughout the life of the swap, i.e. always replicates the bond cashflows.
Ordinarily an IFRS9 cashflow hedge is Non-MTM and the hedge PnL can be allocated by performing an analysis (npv-ing cashflows including basis adjustments and excluding them):
                              T_0 (usdeur=1)  T_1 (usdeur=1.01)
Cashflow NPV                  € 1.0mm         € 2.0mm
Cashflow NPV (inc basis)      € 1.1mm         € 2.3mm

Between accounting periods T_0 and T_1 the cashflow NPV has moved has moved by €1mm and the NPV including basis (i.e. real PnL of the derivative) has moved by €1.2mm, so the ineffective part of the hedge is assessed as € 0.2mm. The accounting would read:
Bond € -1mm
Hedge Effective € 1mm
Hedge Ineffective € 0.2mm

In this case, because the bond is floating rate, the explanation for the PnL change will be due to the EURUSD FX rate changing over the period. Essentially the liability (bond) will have increased because the USD has strengthened relative to EUR.
Now suppose instead that our cross currency derivative was not an ordinary IFRS9 non-mtm cashflow hedge but instead was a MTM cashflow hedge then we have the following:
                              T_0 (usdeur=1)  T_1 (usdeur=1.01)
Cashflow NPV                  € 1.0mm         € 1.0mm
Cashflow NPV (inc basis)      € 1.1mm         € 1.3mm
MTM receipt                   € 0             € 1.0mm

In this case the value of the derivative excluding basis is unchanged over the accounting period and the basis component is still measured as €0.2mm. However, the MTM payment (separated from regular coupon payments) must be recognised as being part of the hedge PnL so that we still record the same to the accounts:
Bond € -1mm
Hedge Effective € 1mm
Hedge Ineffective € 0.2mm

The basis component can vary by small amounts based on whether the swap is mtm or non-mtm but in an IFRS9 environment, given how esoteric these calculations are it would never be questioned by regulators or auditors.


Do I have to list all of the previous employment information in the DS-160 visa form?

Question: My dad and I are filling out the DS-160 Visa form online. We got to where he is asked to list all of his previous employment. The problem is that he has worked in a lot of schools in the past 25 years. Would it matter, and would he risk rejection, if he didn't list all of his employment on the form?
Answer: No. The DS-160 FAQ says

enter information regarding your previous two employers only.

However, same FAQ elaborates that

Applicants may choose to bring along a separate written list of all previous employers to the visa interview for reference.
Answer: He should list as many as he remembers. Do not fret over those he does not remember. The USA is primarily concerned with working for or affiliation with terror sponsoring organizations, criminal enterprises, and terrorist organizations. He will not be refused because he worked for some school twenty years ago for a few months and forgot to include it.
How do I know? Because during my green card and citizenship process I forgot some minor companies I briefly worked for and it was not a problem. Note that green card and citizenship applications are scrutinized even more stringently than visa applications.
Answer: DS-160 FAQ mentions about previous employers in last 5 years.
<code>For US employers, It's better to put those details where one worked with valid work petitions, tax/W2 history.

For Non-US employers in last 5 years, it's better to put that information, if available.
</code>
Few Non-USCIS website to substantiate above info:
Few non-USCIS websites supporting above information is as :
Immihelp - DS160 - Previous Employment - Details
Immihelp - DS160 - Previous Employment - Discussion Forum
Comment: substantiate with the link to the original data, please. The official FAQ, linked above, does not have the information you quoted
Comment: @mzu, I could not find a link that substantiates above information on USCIS website, however I have been working in the USA for the past 11 years on non-immigrant visa with many times filing DS-160 form with above details. Few non-USCIS website links are added to substantiate the info above.


Why did V'ger choose Ilia?

Question: In Star Trek - The Motion Picture the V'Ger entity takes Ilia to use as a template with which to make its probe for interface with the crew of the Enterprise. Is there an in universe reason as to why Ilia was chosen over any other member of the crew? Did her being a Deltan contribute to V'Ger's choice somehow? Or was it simply a random decision?
Answer: Long answer, but for those unfamiliar with Star Trek: Phase II, I think you'll find some details interesting.  (Plus I recommend a really cool book you can get on Amazon that even contains a rough draft from the 1970s for what became a ST:TNG episode!)
It was random, like the 1,000th person over a bridge or because she was there.
There's also a behind the scenes answer to that.  While I prefer to keep answers in-universe, this will help in understanding what happened.
The original plan was to make a new series, Star Trek: Phase II, about a new five year mission.  Nimoy wasn't going to sign on and a new Vulcan named Xon would replace him.  Also, there was going to be an Executive Officer, Will Decker, and a ship's counselor, Ilia.  (Yes, this was in the 1970s and some of the ideas for Star Trek: The Next Generation were already taking form.)
I can't remember if it was a deleted scene or just in the book, but there was a scene with Kirk meeting Xon and telling him to prepare to beam over to the Enterprise.  He's one of the two crewmembers involved in the transporter accident where we hear, "What came back didn't live long."  And, of course, we do see the characters of Will Decker and Ilia.  (Hmmmm... a dashing young man as a First Officer with a past relationship with an alien with some advanced mental abilities who is now the ship's counselor -- sound familiar?)
These three characters were new to the series for Star Trek: Phase II.  (You can read a lot about that series, including some scripts and story outlines in Star Trek: Phase II : The Making of the Lost Series)
But things changed and, after another TV show from the 1960s was remade into a movie, Paramount decided they wanted to do the same with Star Trek, so they decided that instead of a second series, they wanted to do a movie.  (And if the movie worked, they could do sequels or use it to start a new series.)  They took a two hour script that was supposed to be the pilot for Phase II, titled In Thy Image (by Alan Dean Foster) and re-wrote it for the big screen.
(This rewrite of a 2 hour TV teleplay for a big screen movie explains a lot of the weaknesses of Star Trek: The Motion Picture and why, sometimes, to add FX, they just ran some scenes WAY too long.  They already had a script and story and it was easier to just add FX scenes than alter the story any more than they had to.)
So they were shooting a movie with a script that was based on a pilot for a TV show.  They killed off Xon, so Spock not only got his lines, but the extra bit about going into V'ger, they added the conflict between Decker and Kirk, and changed Ilia to a navigator, since it would be too hard to explain the position of a Ship's Counselor in a one-shot movie.
The movie was now a set-up for a Trek universe that was as close as possible to the original series.  There was no reason to keep Ilia on the crew, so it was easier to use this new character as the "guinea pig" for V'ger and also set up an ending that made it easy to remove both new characters and leave the Enterprise crew as it was in the series.
At this point there was no need to give a reason for V'ger's choice of Ilia over any other.  She was, essentially, a red shirt and so was Decker.
So the in-universe reason was random choice.  The behind the scenes reasoning was a little more in depth.

Oh, just as a bit of trivia, yes, the intent was that Will Decker was the son of Matt Decker, who sacrificed himself to try to kill the planet killer in The Doomsday Machine.
Comment: In ST:TMP's defense, the director's cut is much, much better. Outside of Blade Runner, it's the greatest improvement between a theatrical release and a director's cut, IMHO.
Comment: YOu left out that, due to their prior relationship, Decker sacrificing himself leaves all the core trek characters intact, makes logical in-character sense, and creates the nearly deus ex machina answer to the problem...
Comment: "after another TV show from the 1960s was remade into a movie" - what show/movie was that?
Comment: @HorusKol: I don't remember - wish I could!  I want to say it was a comedy, but I'm not sure at this point.
Comment: @aramis: I do include that, just without using his name, at the end of the paragraph that starts, "The movie was now a set-up..."
Comment: @ChrisB.Behrens: I have the blu-ray collection of all the ST movies.  I don't think there's a director's cut there -- do you know where you saw or got ahold of the director's cut?
Comment: http://www.amazon.com/gp/aw/d/B00005JKHP...it is known as the " Director's Edition", and as I recall, it was personally reedited by Robert Wise before he died. it makes it into the movie it was intended to be.

Why did V'ger choose Ilia?


Proper way to backup and restore my python installation

Question: I am about to re-install my WinXP. I have Python 2.7.2 installed on it with many standard and third party libraries. I would like to back up the c:/python27 directory before reinstalling the OS, install fresh python and then copy the contents of the backed up directory into the newly created one. Is this a valid approach? Are there better ways to do this?
Answer: I believe it is a valid approach.  Windows lacks a package manager for things like python.  One thing to remember is that when you use the msi installer, it modifies the system path and filename associations for you, so you may want to consider backing up the directory, then doing a fresh base python install.  Once that is done, you should be able to copy the contents of the old c:\python27 to the new one.


What does a good weld look like

Question: Reading various questions and answers around here, I've heard a lot of people say you can tell the quality of the bicycle by looking at the welds.  How do I know what a good weld looks like as opposed to a bad weld.  In this answer its stated that good bikes have smoother welds.  However, when looking at my bike, the welds don't really appear to be smooth at all, even though I know it is a high quality bike.  What should I look for when looking at the welds of a bike? Pictures would be greatly appreciated.
Comment: Well, then why all the people telling others to look at the welds on a bike, to determine if the bike is of good quality.
Comment: I have worked with people who care a lot about whether welds fail (it's one way to press the "make wings fall off" button) and they seem to think that some bad welds look awful, and should be avoided. But other welds look fine until you see the x-rays or break the join, at which point you see flaws. But if they look pretty and there are no obvious breaks in the bead or overheating dips that just means they weren't done by a complete amateur. My bike has dodgy welds like that (I am a complete amateur) but hasn't broken in 10,000km because it's not operating anywhere near the material limits.
Comment: @Kibbee: A high quality bike will be finished to a high standard, mean ugly welds won't pass Quality checks. A low quality bike MAY have ugly welds, because it's cheaper to let the ugly welds through production into the market. So a bike with Ugly Welds is likely to be a low quality bike. The corollary does not hold - A nice looking weld does not mean it is a high quality bike.
Comment: The question presumes that you can tell the difference by looking at it. I doubt anyone can on a finished bike - amazing what a coat of paint can hide. A great looking weld that is not properly heat treated after the weld is complete is a bad weld, and paint will cover that up pretty easily.
Answer: I found This site about welding to be somewhat helpful. There's an image near the bottom comparing a good weld to a bad weld on aluminum.  The good weld is actually the one that isn't smooth.  The type of weld used differs on the type of material used (steel vs aluminum).  A lot of the information on this site talks about coloring, so you can tell if they went too slow and burned the material, but this would often be covered up by the paint on a bike.
Comment: Keep in mind that bike frame welding is usually done with a multi-flame jig, so that the entire joint is heated uniformly and the weld is done rapidly -- different from the referenced article.  This is a technique pioneered by Trek for aluminum frames (where the rapid welding made it practical to use AL in the first place), but it is now SOP even for most steel frames (where the rapid welding prevents the steel tubes from losing their temper).
Comment: Hmmm....  I see I said Trek one place and Cannondale another.  It was one of those two, but it was long enough ago I don't remember which, for sure.

What does a good weld look like


What can I do with unripe tomatoes when prepping a bed for winter?

Question: I have about 12-14 healthy tomato plants that I have uprooted and chopped up to till back in for their nutrients, but I'm wondering if I can do anything with the 20+ green (unripe) tomatoes that happen to fall off as the cages were removed.
Answer: If the tomatoes have any red on them, you can set them out on the counter or a windowsill and they may still ripen. If they are all green, your best bet is to use them for fried green tomatoes or green tomato relish.
Since you've already tilled the tomato plants in to your garden, you could also compost them if you aren't interested in eating them. Some people choose not to compost tomatoes or tomato plants because there are several pathogens that affect the plants which can live for years in the soil. Since you've already composted the plants, it wouldn't hurt to add the fruit.
Comment: It's not just relish, but anything similar with a reasonably long cooking time and a robust flavour. I've got a few unripe tomatoes that (as usual) I'm going to throw into a chutney.  It will otherwise be onion, apple and home-smoked chillies, so the tomatoes won't add much other than bulk.  They would also go in a pasta sauce.
Comment: My green tomatoes ripen and turn red even if there's no red on them to start with. If they're not fully grown, they may not turn red, however. I suggest just putting them in a bowl on top of your refrigerator, storage room or something (not in the refrigerator) and waiting until they turn red. They don't seem to ripen in the refrigerator as far as I've seen, yet.
Answer: Food, Not Waste
That's food you've got, not waste. Eat them before they get frostbite.
Green Tomato Pie
https://www.google.com/search?q=green+tomato+pie+recipe
Surprisingly, when cooked as a pie they do not go mushy and cook down like tomato sauce. Instead, they cook like apples, softened but retain their shape. Indeed, the recipes are basically the same as Apple Pie. Tip: Add some sliced apple along with the tomato in your pie, perhaps 50/50.
Fried Green Tomato
An old-fashioned Southern dish in the United States. As seen in the famous novel by Fannie Flagg, Fried Green Tomatoes At The Whistle Stop Café, and the movie, Fried Green Tomatoes.
Comment: @user2962794 Thanks for that caution. Wikipedia has a brief [discussion of toxicity](http://en.m.wikipedia.org/wiki/Tomato#Plant_toxicity) with links for further info.
Comment: Although it's probably still okay to eat them (at least once in a while, although if you're pregnant I probably wouldn't recommend it), you should note that the chemical thought to be toxic in tomato leaves is also said to be present in green tomatoes (perhaps in the same amounts). Not everyone thinks it's so bad, though. I imagine different varieties of tomatoes probably have different amounts of the chemical, but that's just my suspicion. However, if you want to be safe, you can let them ripen off the vine before eating them.
Answer: Unripe tomatoes can be turned into delicious pickles.
You can also make ketchup out of them.
I've tried both (not necessarily the linked recipes, just generic home-made green tomato pickles and ketchup), they are excellent.
Comment: +1 for pickling. Other recipes are probably an acquired taste, but pickled green tomatoes substitute pickled cucumbers or cornichon any day.
Answer: I usually bring green / yellow tomatoes indoors, and store them at room temperature, or even better a little below room temperature. They will normally turn into good red tomatoes after a few weeks. If the tomatoes are a little yellow, this should work. If they are very green, they may not turn red.
Answer: It is too late now, but for next year, pull up the plants, roots and all, and hang them upside down in your garage. Most of the tomatoes will ripen.
Answer: Green tomatoes will generally (not always) ripen after you pick them, if you wait (whether or not there is any red on them). Sometimes it'll take a day. Sometimes it'll take much longer. Immature tomatoes may just dry or shrivel up, however. Whatever the case, I would recommend taking all of those tomatoes and putting them in storage (not in the refrigerator) until they turn red. Room temperature is fine (I think it'll ripen faster at room temperature than in a cool storage room, although I could be wrong).
This works well with my early girl and lemon boy tomatoes, as well as whatever else we have.
In fact, I hear most store-bought tomatoes were picked green (so as to extend their shelf life or something) and allowed to ripen off the vine.
You may have heard the term, 'vine-ripened tomatoes'. There are also tomatoes that were not ripened on the vine (picked green).


What is the best brewing log sheet to use?

Question: I'm looking for a log sheet to use to start tracking all the beer and wine I brew to (hopefully) improve the results over time. What's your favorite and what could be improved in it?
Answer: THe best log sheet is which ever one you WILL use regularly.  I have brewed some great beer in the past and I never took andy good notes on certain batches unfortunately.
I think however, the best log sheet is one you make yourself; customized to the way you brew and what you think is important.
I have been brewing for 10 years and I don't think I have ever really seen a good one I liked for my process on-line somewhere.
I'd recommend looking at a few online and then picking features you like the best from each one.  I used to print my recipes on my brew sheets, then after using brewing software I started to just print the recipe and remedial brewing session info (e.g. calculated strike water temps) and using a homemade check list for capturing notes and changes in the planned process.
Here is a link to my log sheet at my blogsite if you want to look at one to get started.
Comment: Agreed. Working on your own is a good way to go. Working on your own will let you track what you want how you want. I have my own (http://ianwhitney.com/hopwise/brewing-log/) that I'm constantly updating and tweaking. I like it quite a bit, but other brewers probably won't.
Answer: I created a Google calendar for my brew log.  It makes searching easy (this is important when you start brewing a lot) and the best part is you can access it anywhere there is internet.  There have been a few times when I pulled up an old log on an iPhone while talking to someone in a bar.
Comment: I forgot, one of the other nice things about google calendar is that you can share it with your friends.  I have 4 good brew buddies and we can search each others logs any time.
Answer: I've just written up my first brew log & asked myself the same question.  I agree with brewchez - it depends what you want.
I started with brewchez's log, but as I'm going to be using simple extract-based recipes while I figure this out, it was too complex.  I started with Palmer's example in 1.2.3 Record Keeping and as I started filling it out, found I wanted to record a lot more information.
Since I'm new at this, my goal is to record as much data as possible, so I can best learn what factors influence the result & how.  Here's what I have.
<code>Type/Name:
Volume:
Date (fermentation):
Date (bottling):
Date (taste):

Yeast: (form, type, pitched?)

Temperature notes: (primary range, secondary range)

Malts: (qty, type for each)

Original Gravity: x.xxx (measured/calculated)
Final Gravity:
ABV:

Hops:
#. qty, time, type, %AA

IBU:

Sugars: (added during primary, priming)

Yield & vessel: (glass/plastic bottles, kegged)

Notes:

Picture:
</code>
My personal favourite thing here is the picture.  I look forward to having a photo of every beer I've ever brewed.  Make sure you use a white background (I use a dinner plate) so the colour is accurate.
I also use Evernote to store my notes.  It's searchable, like Google Calendar and stores pictures too.  You could just as easily use OneNote, Google Calendar, GMail, DropBox etc.
Good luck!
Answer: You really want to be using Beersmith.
Comment: I just started using Beersmith.  I haven't figured out how to take good notes in it.  The notes section at the bottom of a recipe become part of the recipe.  What I want is the notes to be separate from the recipe, allowing me to have multiple sets of notes for a single recipe - one set for each time I brew that recipe.  Is it possible to do this in Beersmith?
Comment: When you're viewing a recipe you can click the "Copy To Brewlog" button at the top. That will make a copy of the current recipe in a special folder ("Brewlog" by default, but configurable in the options). That way you can keep your logs separate from the main recipe.
Answer: I started off using ProMash until switching to a Mac.  Then I kept handwritten records.  Now I use the brewer's logbook.
Hopville is okay for recipes, but not adapted for brewing sessions.
Answer: I use TiddlyWiki to create tables of my recipes, format my brewing notes, and just keep track of everything. It's a portable wiki that's pretty easy to use. Using a free online hosted wiki might be a better idea though. There are several free online wiki sites to choose from. The only reason I didn't choose to use those is because I figured that I will do a better job of preserving and backing up my brewing data, and I didn't want to risk one of those sites just "going away" as too many sites often do.
If I need to take the brewing wiki with me, it's stored as a single file that you can throw on a flash drive, or even e-mail to yourself, since it's really small (Less than 1Mb I believe).
Answer: I am writing a web app along with a colleague that is dedicated to just this topic.  It is meant to be a cross between Hopeville, BeerSmith and a Log sheet.
http://brewershub.com/
We have recipe sharing/creation, a recipe builder, batches with a notebook.  And we are completely open to ideas. Its also totally free.  We really want to turn this into a community site dedicated to homebrewers.  Please check it out and don't hesitate to give feedback.  We recently launched and are looking for users to really give us some good feeback.
Also, we are in the processes of making some upgrades to our recipe builder right now that should be coming in a matter of weeks, mostly dedicated to partial mash and all grain brewing that should be really exciting.
Answer: I carry my ipod touch with me all the time, and am quite pleased with the newer updates to Brew Pal, an app that keeps recipes and now has decent customization.  Since I don't have a smart phone, this is the easiest way to always have my recipes on hand.  C-4 is right though, you really should use Google calendar, especially if you have brewing co-conspirators.


Does having no 'if' blocks in code mitigate side-channel attacks?

Question: Looking through descriptions of Spectre and Meltdown it seems that speculative execution - the basis for these attacks - occurs only with branched code. Therefore, it seems logical to conclude that having no if statements would preclude speculative execution and consequently, the side-channel attacks. Is this a correct statement?
Comment: Are you only asking about Spectre and Meltdown-style side-channel attacks? Because timing side-channels can come from cache and data-dependent execution times, which don't depend on `if` statements
Comment: [Side-Channel 101](https://security.stackexchange.com/a/220488/86735)
Answer: Not just if.
You will have to remove all functions, methods, lambdas, classes, loops, whiles, exceptions, polling, switch, if, lookup tables, jump tables.
You will then have no need for tests, counters, maths, polls, conditionals,  environment queries, any other form of input, including keyboards, mice, ram, rom, or other forms of storage. (You can have input streams)
Basically, remove branching and you remove computers.
Despite what is said above, even DSP (those that do FFT and stuff like that) have branches in them.
I guess you might be able to construct an ADC or a DAC - but only a very primitive one.
Try having a light circuit at home that doesn't have switches!
On intel about 15% of all instructions (by popularity, not by count) involve branches of some sort; and intel has a disproportionately high demand for moves. On most other CPUs there are a correspondingly greater proportion of branches.
Comment: @kevin, strictly speaking one doesn't need to imppement branch prediction as a part of the chip architecture - but intel chose to, and it does speed things up. It's true that unconditional branches don't need to - but prediction can look at discrete test / branch instructions - and anyhow these are often optimised by the compiler. It boils down to what I wrote: hard to avoid by changing your coding style!
Comment: Strictly speaking, you do not need speculative execution to execute an *unconditional* branch, unless you are in the business of writing self-modifying code. But in practice, I'm fairly certain you would need to make significant architectural changes if you want to execute return instructions without the use of speculation. OTOH, those same changes could potentially be used against ROP which people have been unsuccessfully trying to prevent for a long time, so maybe I'm just being overly optimistic here.
Comment: "whiles" is a subset of "loops" and "lambdas" is a subset of "functions" (or "classes" if you are using that language where everything is a class)
Comment: There are computational machines that behave like the remove all things you mentioned above yet still perform computation as we understand them. The F14 Tomcat's digital electronics was designed that way. If I'm not mistaken the architecture was called the flow-machine or flow-computer. Basically the logic is implemented 100% in hardware as wiring between different ALU units. Think how you would design an analog circuit but replace voltages with streams of 32 bit numbers. They were designed to mimic analog electornic and mechanical computers.
Answer: Removing branching would probably mitigate these problems. But so what? If you remove branching you essentially remove the need for a general purpose computer, and you're left with something that can do more or less static set of operations on some data.
Such computers are very common in the form of DSP's, but they're not general purpose computers.
Removing branching on a x86 cpu (which is the family hit by meltdown and spectre) is throwing the baby out with the bathwater.
Comment: It sounds like OP's idea wasn't to produce a CPU without branches so much as write a program that doesn't require branches anywhere in its critical path.
Comment: @Konchog No offense, but it seems to me you need to brush up on x86 assembly :) Not only that "guy" is well-known for knowing his way with assembly and compilers but the fact that `mov` is Turing complete is astonishing (He didn't discover this himself, btw). We don't have access to RTL/ucode programming here, just plain old architectural access. See the *mov-obfuscator* from the "guy who don't understand assembler (sic)" ;)
Comment: You can do a `mv`-only computer, no branches / jumps ;) https://www.youtube.com/watch?v=NmWwRmvjAE8
Comment: from a very practical perspective: you need to clean every library which you use :-(.
Comment: This answer would be a lot better if only the first word were deleted.
Comment: @cg909 To anyone who knows what the ternary operator is, they see a branch. To anyone who doesn't know what it is, they see code they don't understand in general.
Comment: @luk2302, that video is just weird; it's like the guy doesn't understand how assembler works.  After all, a call is nothing more than microcode shorthand for move pc to *sp--, move &fn to pc, and then when the function is finished, mv *sp++ to pc.  conditional branches are pretty much the same. - he has just invented what every architecture already uses.
Comment: @luk2302 I've designed and built move only CPUs and to be Turing complete they do have branches in the form of conditional moves. Different architectures do them differently. For example one of the move machines designed by Delft University uses a guard bit as part of the move instruction making all instructions conditional. Maxim's MAXQ  CPU (not to be confused with Nvidia's MaxQ branding) have multiple addresses that write to the program counter. Eg. one address writes to PC only if ALU is zero, another writes only if last ALU operation overflowed etc. Most of my own design do this.
Comment: @luk2302 Maxim's MAXQ CPU is one of the few move machine design that you can actually buy and use.
Comment: The "Probably." in your answer might reinforce the (mis-)understanding that `if` blocks are the only way to introduce conditional branching. But, e.g. the conditional ternary operator in C (`? :`) is generally compiled the same way as an equivalent if-else-block, even if the syntax makes it looks like there is no branching.
Comment: @luk2302 Or you can make a [mov-only compiler](https://github.com/xoreaxeaxeax/movfuscator) for common CPUs.
Answer: Unfortunately, even aside from the other issues mentioned, compilers can produce conditional execution even in cases where you did not explicitly write a conditional. This most commonly arises from compiler optimizations, but can also result from e.g. ABI calls to emulate missing features.
For instance:
#include <stdint.h>

uint64_t foo(uint64_t x, uint64_t y) {
    return x % y;
}

On Clang 11.0.1 on ARMv7a, this compiles to
foo:
  push {r11, lr}
  bl __aeabi_uldivmod
  mov r0, r2
  mov r1, r3
  pop {r11, lr}
  bx lr

This generally results in conditional execution within __aeabi_uldivmod. For instance, in the Clang toolchain, you have
__aeabi_uldivmod:
DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod)
[...]
bl SYMBOL_NAME(__udivmoddi4)

which then calls into __udivmoddi4:
COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int *rem) {
  [...]
  if (n.s.high == 0) {

...and now you suddenly have conditional execution.
Ditto, under the as-if rule a C compiler can translate e.g.
uint64_t foo(bool b, uint64_t x, uint64_t y) {
    return b*(x%y); /* in C a bool cast to int is 0 or 1 */
}

into
uint64_t foo(bool b, uint64_t x, uint64_t y) {
    if (b) {
        return x % y;
    }
    return 0;
}

...which may be advantageous if branching is cheap compared to remainder (which is often the case). And now suddenly you have conditional execution.
Etc, etc.
(You're not immune to this even if you drop down to assembly, by the way. For instance, unaligned access on AArch32, which isn't natively supported on all platforms, is occasionally handled by an abort handler that emulates the instruction. This, of course, involves conditional execution to parse the instruction / emulate it / etc.)
Comment: Yeah, this is a good example.
Answer: There is no IF statement at the CPU level and it is unclear which programming language with if statements you refer to. But depending on the programming language various statements will result in conditional branches (and thus speculative execution), i.e. various loops with conditions like ranges, ternary operator ...
Comment: @Barmar:  I know. But like I said in my answer: in most programming languages (it is unclear which one the OP is referring to) not only IF statements will result in conditional jumps. Thus just skipping IF statements is not sufficient.
Comment: At the CPU level there are conditional jumps, which are used to implement IF statements.
Answer: If you access any memory address that is not already known by the attacker, information can be leaked through the cache.
Consider the following function:
char get_secret_message_byte(int index) {
    return secret_code_table[encoded_secret_message[index]];
}

If the cache is not populated before this function is called, then part of secret_code_table will be loaded into the cache, leaking information about the value of encoded_secret_message[index], which is useful to an attacker.
Also, part of encoded_secret_message will be loaded into the cache, leaking information about the value of index. If the attacker already knows index, it's not useful to them.
Answer: The trick is to remove branches from those parts of the code where the pattern of branches taken gives the attacker useful information.
Usually, these are areas where "carefully crafted" input can leak single bits of secret data, and where repeated calls can then reveal additional information.
In practice, that is often avoided by chaining constant-time cryptographic operations so that the first branch afterwards is a general "passed checks" test -- so for example you'd send an encrypted and signed packet, and implement both decryption and verification to be branch-free, then an attacker would, without knowledge of the signing key, only be able to generate packets that are rejected at the exact same point.
Actually parsing the received packets would not necessarily have to be branch-free if the attacker doesn't gain anything there anymore -- most likely they are more interested in extracting secret key material (because that allows exploitation in the future), not reading single messages (which may have immediately observable effects anyway).


report user password (in the sharepoint intergrated mode) must be changed when the the AD user password changed

Question:
I am administrating my company's sharepoint server 2016 and I have developed some reports for some sharepoint website, if I want to publish these reports to sharepoint website, I have to key in my user name and password with intergrated mode in the authentication form.
The problem is all users of Sharepoint (included my admin account) is managed in Active Directory. However, after each three months, all user password must be changed(company rule), so that all of authentication setting in these report become to wrong, and I need to key in new password foreach report again EACH 3 MONTHS.
I don't want to reinput my password for each 3 months but I don't know how to do. Can anyone advise me how to resolve the problem. Thank to your help!
Notes: I'm not AD admin so I can't do any action on the AD.
Answer: If I got it right, you are managing reports with an account, and the account's password is renewed every 3 months. For this purpose, you should have a so called service account requested from your company, and the account's password should be set to not expire. Service accounts are the way to go for managing authentication-locked tasks which do not require user activity and manual steps.
It should be a relatively ordinary scenario for an organization to have service accounts which are excluded from the password renewal policy. Additionally, this is the only way to handle such scenarios with AD managed accounts.
Comment: thank for your rely. But I don't administrate AD server and my company doesn't allow creating new user with never expire password. I only administrate Sharepoint server 2016, so that I only can act on sharepoint 2016 scope.
Comment: I must put emphasis on the words I've already mentioned: you need to ask support from your AD administrators (=> no, you are not even supposed to be able to handle this by yourself); this shouldn't be an unexceptional scenario; and there are no other ways to handle the requirement. To put it into other words: If there's a reason why you wouldn't be able to communicate with your AD administrators, then there is no solution for your issue.


Data info: Orange data mining

Question: I am trying to use the widgets from Orange Data Mining in the practical world. When do you use Data Info in Orange Data Mining set?
Answer: Congratulations on getting your hands dirty with some real data science!
Data Info does what is says: provides general information on the data set. When do you use it? Well, when you wish to know basic attributes of your data. Also, please refer to the documentation to see how/when to use each widget.

Data info: Orange data mining


Why do objects have resonance at natural frequency?

Question: What actually is a natural frequency for an object and what makes it vibrate with increased amplitude when coupled with an external oscillator that matches the natural frequency?
Comment: If you strike an object that is relatively solid, it will "ring" -- effectively, a shock wave from your striking the object propagates to the far end of the object and back, then bounces off the near end and does it all again.  The rate at which it does this is it's resonant frequency.  If you supply a steady input (eg, from a loudspeaker) at that frequency, each successive pulse from the loudspeaker will reenforce the shock wave traveling back and forth and it will get stronger and stronger.
Comment: My question is different.I want to know why objects have a natural frequency?Why is that particular frequency so special to the object? It's not about positive or negative work that I am asking, im asking why is the object so interested in that frequency. Link me any such answer. Thanks in advance
Answer: Here's a simpler answer.
Resonance is really all about the capture of energy into a system and its cyclic flow between potential and kinetic states. In mechanical systems we call these states potential energy and kinetic energy, but in electrical systems, as a another example, between magnetic and electrical fields. It's the rate of this cycling back and forth that results in the natural frequency.
For example the 'singing' aluminum rods that are often used to demonstrate standing wave resonance in the classroom capture energy from your fingers as they rub over the outside of the rod. The energy excites the atomic lattice causing the lattice to expand,relax, and compress at the rate of the natural frequency - the speed at which energy moves from a fully potential state: when fully stretched or compressed and at the lowest velocity to a fully kinetic state - halfway between stretching and compressing when the lattice is at maximum velocity. If the energy flow has only a small amount of losses - for example heat generated in the rod, then we say there is a low impedance to energy flow, and so the rod will have a tendency to suck up more energy than it loses and maintain the state of resonance.
The rate of energy flow is dependent on the material properties, but also the particular geometry of object. If the rate of energy loss from the object is greater than the rate of energy entering the object, the cycling will be 'damped' and therefore lack resonance.
That's resonance in a nutshell.
Answer: Natural frequency depends on the physical properties of a system. Some of the classical examples are masses attached to springs and pendula. For the former class, the basic model is based on Hooke's law, which translates into the differential equation (1D)
$$m\ddot x + kx = 0,\qquad m,k > 0$$
where any sort of dissipative effect has been neglected. Dividing by $m$ one also gets
$$\ddot x + \omega^2 x = 0,$$
where $\omega^2 = \frac km$ is the (square of the) so-called natural frequency. As it can be seen from its defining expression, it depends on the mechanical properties of the objects involved, namely the mass of the oscillating body $m$ and the elastic constant of the spring $k$. This can be generalised to systems of couples oscillators, which are basically systems of couples masses and spring, and such abstractions are used to model complicated physical system. The most general form is then something like
$$M\ddot{\mathbf x} + K\mathbf x = 0,$$
where $\mathbf x\in\mathbb R^n$, and $M$ and $K$ are positive definite $n\times n$ matrices (assumptions on $\Omega^2$ may be weakened a bit but I will ignore this here). Since then $M$ is invertible, one can rewrite this system in the form
$$\ddot{\mathbb x} + \Omega^2\mathbb x=0,$$
where $\Omega^2$ (which at this point is an abuse of notation) is the matrix given by
$$\Omega^2 = M^{-1}K.$$
The problem becomes "interesting" when $M$ and $K$ commute, for in this case $\Omega^2$, as the notation suggests, is a positive definite matrix that can be diagonalised (physically this corresponds to the decoupling of the oscillators), and the diagonal entries are again the squares of the natural frequencies of the system under consideration. The eigenvectors (which form an orthonormal basis in this case) give the direction where the natural oscillations at the corresponding natural frequency occur.
If we relax the condition on commutativity between $M$ and $K$ one might still succeed in diagonalising $\Omega^2$, but this could fail to be positive definite. Though, when this happens, the eigenvectors won't be orthogonal to each other in general (and this happens in practice) and therefore the natural modes won't be mutually perpendicular.
Observe that we can also perform the change of coordinates $\mathbf y = M^{\frac12}\mathbf x$, with which we would obtain the new equation
$$\ddot{\mathbf y} + M^{-\frac12}KM^{-\frac12}\mathbf y=0,$$
and now $\Omega^2 = M^{-\frac12}KM^{\frac12}$ is guaranteed to be positive definite, since it is of the form $B^TB$, with $B=K^{\frac12}M^{-\frac12}$.
Answer: when the force frequency equals the natural frequency, the displacement wave exceeds the force wave by 90 degree, you can represent that if the force wave is cosine and the displacement wave is sine. this means that when the vibrating part reaches the top value and tends to change its velocity downwards it is exposed to maximum value of the force, and vice versa. This means that the force exerts the maximum energy to the mass, and the displacement will be the maximum. If the damping is not large enough, the displacement will exceed the ultimate strength limit of the material and the failure occurs.


Improve Fractalize smoothness limit in Inkscape

Question: I'm vectoring a small raster image, and I want to use the extension Fractalize (Extensions > Modify Path)
Unfortunately the smoothness parameter value is blocked at 10, and I want to use a greater value.
How can I break this limit of 10 ?
Comment: Hi, maybe you could contact the manufacturer of the extension?
Answer: Inkscape's extensions are written in Python - which means the soruce code for the extension itself is available as a text-editable file in your system.
But for this cas, you don't even need to change the extension code itself - the accepted parameters are defined in an associate XML file which control the specifications for the extension. You an just edit that file in place, and the next time you start inkscape, it will accept your newly defined parameters -
So, locate in your computer a file called fractalize.inx  -you will see it is in a folder related to Inkscape install.
Open that file in a text editor (Notepad, sublime text, notepad++, etc) - (not on  a word processor, such as Microsoft Word or WordPad). Change the lines that read:
<param name="subdivs" type="int" _gui-text="Subdivisions:">6</param>
<param name="smooth" type="float" _gui-text="Smoothness:">4.0</param>

to include a max attribute, so they will read:
<param name="subdivs" type="int" _gui-text="Subdivisions:" max="30" >6</param>
<param name="smooth" type="float" _gui-text="Smoothness:" max="30" >4.0</param>

And voilá - the next time you start Inkscape, the maximum allowed for both attributes will be "30" rather than the default 10. (Just beware that the amount of processing used by fractalize is exponential, and a value much higher than 10 could take forever to complete - try just 11 or 12 to start)
Answer: The trick is to add nodes to the path using first the function :
Modify Path > add nodes


Is charging my iPhone all night harmful?

Question: I normally charge my iPhone all night to get 100% power. Does this harm my phone's battery?
Update [Oct 1, 2017]: Thanks for all your great answers. I noticed there is a related video which addressed my question well.
Answer: Technical
Lithium Polymer batteries, such as those used in the iPhone, are a very well understood battery chemistry and use specific chargers to manage their charging.
While the latest charging ICs Apple uses are proprietary (they work with Dialog for their power management ICs), it is unlikely that Apple performs a significantly different charging process than every other battery charging IC manufacturer.
This process charges the battery as quickly as reasonable while protecting the battery from damage or increased wear and tear. Please note that the charging IC - or Power Management IC - is located inside the iPhone.  So this applies regardless of the external USB powering device you use to charge it.
When the battery is full, the charger turns off the charging process.  The battery is left alone without current going into or out of it.  This is because most Lithium chemistry batteries don't like trickle charging (a process you may hear from others where a constant voltage and low current is applied to a battery all the time to keep it topped off).
Charging ICs therefore turn the current completely off and power the phone itself from the charger. This is the only time the battery isn't charging or discharging - when it's full and the phone is plugged in.
The battery isn't discharged and charged in some sort of cycle after charging is complete.  I'm not sure where this myth stems from, because it would actually place additional wear and tear on the battery.
Self Discharge
Every battery has a "self-discharge" rate.  This is the battery's natural capacity loss when not connected to anything.  For Lithium Polymer batteries, this is a low (compared to other rechargeable battery types) 5% per month.
The charging IC does check up on the battery and if it loses significant charge over time while plugged in, it will start another charging cycle.  But this would occur perhaps once every two weeks after several percent of the battery charge has been lost - certainly not overnight.  If you leave your phone plugged in for a month, it might start another charging cycle once or twice in that time.
Conclusion
The phone and its battery, therefore, will suffer absolutely no damage being plugged in for days at a time.
Long term storage
There is one caveat to this answer: Lithium chemistry batteries don't like to be stored with full charges.  They degrade more quickly if they aren't used and have a full charge.  If you are going to store your mobile device unused for more than a month, charge it up fully, then discharge it (watch videos over wifi or play video games) until it's 40-50% charged.  Then turn the device fully off.
Long term use
If you are using an older iPhone in a fixed installation (picture frame on the wall, data collection, baby monitor, etc) while turned on and in use with it plugged into a charger all the time, you should consider disconnecting the charger and discharging it fully once a month.  Similar issue to the above - the battery doesn't like being "stored" for long periods of time at full charge, and the charger will keep it near 100% the entire time - degrading the battery a bit more quickly than desired. Going through a discharge cycle will exercise it and help it to last longer.
Personal
While I use a newer phone now, I charged my iPhone 3GS every day for 8+ hours a day (ie, overnight) regardless of how much charge was left - and more often than not, I had used less than 20% on a given day. I used it for 4 years that way, and never replaced the battery -  it still lasted much longer than a day. Since then (3 years now), it's been essentially an iPod touch, being charged for days at a time when no one is using it, and being left in the car discharged for days (or weeks!) at a time when it's forgotten.  Battery is still going strong, and this is certainly more than 900 charging cycles for this device.
My iPhone 5 and iPad (3rd gen) were used the same way.  No negative impact from having them charge all night every night.
I'm now using the iPhone 6+ the same way.  This is an expected use case for a mobile device, and it's running just fine. I expect that to continue to be the case.
You can leave your iPhone plugged in all night and it will not be harmful to your iPhone.
Comment: Apple uses similar power management ICs in the iPod touch, and says this about the iPod Touch: *"The battery stops charging when it's full, so you don't have to worry if you leave it plugged in overnight "* - though I've not been able to find a similar statement for the iPhone, I'm quite certain there's no significant difference in terms of overnight charging.  Source: https://support.apple.com/en-us/HT201545 and chip identification from iFixit teardowns for the iPod Touch and iPhone.
Comment: this is the only answer that is both accurate and provides a good explanation.
Comment: @adib research results? It's an established silicon chip. This is an engineering question, not a scientific or skeptics inquiry. If you don't trust my word take a look at the chips used, the company that makes the chip, and the well established lithium ion polymer charging process that they use. The particular chip in question is custom for Apple, but the company makes many that are essentially the same and you can check out the data sheets and application notes or consult with an expert. Or call me and let me charge you my hourly engineering rate to examine those resources and report results.
Comment: Thanks for this great explanation, Adam. It's probably the best of it's kind I've seen on here. Very helpful for me as I usually leave my phone on a dock at work in addition to charging it at night.
Comment: Citations please. Any research results that back your claim?
Answer: No, it's not harmful.
Modern phones are smart enough to stop the electric current when fully charged. That may have been a problem before lithium-ion batteries, but nowadays you shouldn't have to worry about it.
However, if your iPhone has a case that doesn't allow heat to escape very well, it might be better to remove the case to avoid overheating. Lithium-ion batteries don't like drastic temperature changes or extreme temperatures.
Answer: No it does not. Nightly charging is the norm today for many people, and unlike older technology from a few years ago, today's lithium ion based  batteries use newer technology and battery life is not damaged with nightly charging. All batteries wear out eventually, but unless you are charging multiple times per day, your battery is likely to outlast your phone or at least last a couple of years.
Comment: Regarding "multiple times per day" — it's not the number of connect/disconnect cycles, but the total amount of charge/discharge that wears down the battery.
Answer: Leaving the iPhone to charge overnight doesn't affect your iPhone drastically. As phones are very smart, once it gets fully charged, it knows when to stop the current from coming in to protect the phone from overcharging.
But there are also some reason which can affect your iPhone plugged in overnight, this can leads to slow down the lifespan of your iPhone.
Lithium ion battery is used in iPhone, which can react poorly if your iPhone experience higher temperature.
Li-ion does not need to be fully charged, as is the case with lead acid, nor is it desirable to do so. In fact, it is better not to fully charge, because a high voltage stresses the battery. Choosing a lower voltage threshold, or eliminating the saturation charge altogether, prolongs battery life but this reduces the runtime. To satisfy maximum runtime, most chargers for consumer products go for maximum capacity; extended service life is perceived less important.
Technically the Li-ion charging concept is given below.
Lithium-ion operates safely within the designated operating voltages; however, the battery becomes unstable if inadvertently charged to a higher than specified voltage. Prolonged charging above 4.30V forms plating of metallic lithium on the anode, while the cathode material becomes an oxidizing agent, loses stability and produces carbon dioxide (CO2). The cell pressure rises, and if charging is allowed to continue the current interrupt device (CID) responsible for cell safety disconnects the current at 1,380kPa (200psi).
Comment: The other answers are saying that charging for a prolonged period isn't any worse than unplugging your phone and just leaving it sitting with a full battery. This post, if I understand, is saying that both of those cause the battery to degrade slightly faster than if you left it sitting with a partially charged battery.
Comment: So your answer is that from a long perspective, charging all night is harmful to phones.
Comment: yes, prolong charging the phone will hamper the battery life,especially in the case of Li-ion battery.
Comment: I understand, but I am confused with other answers, since all have their own points.
Answer: As someone who works for a battery specific retailer and is asked this question a lot, the answer is "it won't hurt it in the short term, but in the long term it will shorten its lifespan." Between your phone's charging system and the internal circuit board built into the battery itself, there are enough layers of protection that will prevent either your phone or the battery from being damaged under normal circumstances. However to my understanding, as part of that process, if it is left in the charger beyond the point when it is charged, it will start going through charge cycles - discharging a little bit and filling back up - as part of a safety measure, and those little charge cycles will add up over time. Since Lithium Ion batteries are rated to have 250-500 cycles during its overall lifespan before it is worn out, it's better to preserve those cycles when possible, especially given phone and therefore battery usage is oftentimes pretty heavy. A good example is eating cheeseburgers: one or two won't kill you, but if you do it daily for 40 years, you'll experience some pretty significant health issues. Same concept with leaving a phone plugged in.
When my customers purchase a replacement battery from me, I oftentimes recommend they alter their charging habits. The most common is to plug it in prior to bedtime and leave it in all night. While certainly not dangerous or damaging to the battery, overall it will wear it out faster than if you didn't do this. Instead, I suggest they change their habit to charging their phone when they get home from work/school/shopping and go about your daily routine: cook dinner, wash dishes, watch television, etcetera and periodically check in on it. Once it's fully charged, unplug it.
Comment: I'm fairly sure that this answer is simply incorrect. I've had an S3 for 3 years now and I still have the original, stock, battery. I leave it on a charger about 80% of the time regardless of the battery state and I don't really pay attention to the battery level when I do (I'm more concerned about having a full battery when I leave); I'm sure that adds up to more than 500 charges. It can still hold a charge for 8 hours while I'm at work. The real answer is that if changing an $8 battery every three years is too much expense then you'd be better off with a cheaper phone anyway.
Comment: Please provide a reference for this statement: *"However to my understanding, as part of that process, if it is left in the charger beyond the point when it is charged, it will start going through charge cycles - discharging a little bit and filling back up - as part of a safety measure, and those little charge cycles will add up over time. "* As an electrical engineer I've not yet seen a lithium polymer charger that does this by design, so I'm very curious.
Comment: This answer is only correct if the phone is left on over night (I know the question didn't mention on/off state). If it's turned off, as another answer rightly states, the battery will stop drawing current when it's fully charged. It's only when the phone is on and charging that it will go through the small charge/ discharge cycles which you've described. This means that turning your phone OFF and charging over night is actually one of the best methods of preserving battery life.
Comment: this answer is completely wrong. you're thinking of older type batteries—lots of misconceptions about this. modern lithium-ion batteries come with a certain number of charge cycles (~150), and each time you go from 100% to 0%, you lose one charge cycle. if you go from 100% to 50%, then charge back up, you'll only lose 1/2 cycle. if you keep your phone plugged in all the time, you will never lose any cycles or battery health. that's all there is to it. takeaway: you should keep your devices charging as often as possible if you want your battery to last for years and years.
Comment: The notion that the battery has a "certain number of charge cycles" in it is simply wrong. So is the notion that recharging from 50% to 100% uses up "half of a charge cycle", or that recharging from 95% to 100% uses up any significant part of a "charge cycle" (whatever is meant by that).
Comment: As mentioned on the [Apple website](https://www.apple.com/batteries/why-lithium-ion/), the iPhone charging strategy uses "fast charging" to reach 80% of the battery capacity, and then switches to the slower "[trickle charging](https://en.wikipedia.org/wiki/Trickle_charging)" to fill those last 20%. Any idea whether this will protect against wearing out caused by the "discharging a little bit and filling back up" that you mentioned?
Answer: According to Apple, when an Apple device reaches full charge, it stops charging.
It's true for their macs and all other devices.
Answer: The charge controllers which charge the battery are really smart. They are designed by really great companies such as ST Microelectronics.
These charge controllers typically have many features. (I don't know if the ST ones I linked have all of them. I just pulled those parts out of the air). Every Lithium battery charging IC will have a smart charging algorithm which WILL PROTECT AGAINST OVERCHARGING. Lithium batteries are different from NiCd batteries in which you can pump a small current through continuously which will be converted to heat directly. A Lithium battery will get destroyed (violently) if subjected to minimal overcharging.
Some of the higher-end chips, like the ones used in Apple devices are really smart. They understand how a Lithium battery will last the longest and will adjust the charge and discharge to ensure the longevity of the life cycle of the battery. As mentioned in an answer above, Apple fast-charges the battery from 0-80%. The reason why they do this is because as you get closer to 100%, the charging efficiency becomes much lower. After this stage, the charging slows down. It typically goes into constant voltage mode where a specific voltage is set and the charge circuitry waits for the voltage to reach a certain threshold. However, after the battery is fully charged, there's no point in recharging it when it's voltage is 1/1000th a volt lower than what it should be. Instead, the charger has a set cutoff voltage when it will start charging again. This is often pretty low, like 50-70%. The battery is simply disconnected from the phone internally and the phone is powered off the power cord. The charging will only begin once the battery goes lower than the threshold which is set up by the manufacturer.
This prevents the wear and tear on the battery.
As a side lesson, the isolation between the battery charge circuit and the power adapter/cable you use makes very little difference to the charge quality as long as the design is not so piss poor that it causes too many voltage spikes and dips.
Answer: If you use your phone while plugin
it's not good if you do it on regular basis it can hurt your battery life. I don't recommend that you should charge your phone all night. I read some suggestions that you should turn off your phone and then plugin all night.
I recommend Just charge it to 40-50% before going to sleep.


hedging two bonds in different currencies with FX forward

Question: Is there a way to make a hedged portfolio using two bonds, one is in EUR, the other one is in USD and FX forward contract? Assume that FX rate follows geometric Brownian motion movement.
Comment: what do you try to hedge? if fx exposure then yes a strip of fx forwards or fx swap
Comment: Could you give me a hint how to do it?
Comment: are you looking for a mathematical approach or like to know how market practitioners hedge fx exposure? What is your base currency? Which exposure do you try to hedge? Please elaborate before I can help further
Comment: I am asking because a lot different risks exist in your portfolio (interest rate risk, credit risk (in case of corporate bonds), sovereign risk (in case of sovereign bonds), prepayment risk (in case of prepayment features embedded in the bonds), and new credit risk arises when implementing an fx swap. I need to know what exactly you try to hedge here...
Answer: You can mitigate your fx exposure (hedge fx risk by engaging in an fixed/fixed fx swap. Let's setup an example:
You want to invest in two bonds, one EUR denominated and one USD denominated bond. Each bond pays semi-annual coupons (at the same dates for simplicity purposes) for the next two years. You are a US-based investor and thus want to earn returns on your investments in USD and not take exposure to fx fluctuations. You can trade an fx swap with the following cash flows:

At initiation you provide USD based funding to your swap counter party in exchange for EUR based funding which you use to purchase the EUR bond (I do not go into the details of the exact amounts, if desired, we can go through the detailed math later).
During the life time of the swap, every 6 months on the bond coupon payment settlement dates you receive a fixed payment denominated in USD and surrender a fixed (known) payment in euros to your counterparty. The euro amount equals the amount you receive as coupon payment from your eur bond investment.
At maturity you receive back the USD swap notional and return the EUR notional you received at the outset of the swap agreement. This EUR notional is the amount you receive from the repayment of par of your EUR bond investment.

Now, obviously there will either be a mismatch of notional amounts either at the beginning or maturity of the bonds. As mentioned we can walk through a numerical example but obviously you want to match the notional exchanges at maturity and rather engage in a simple fx spot cash trade at the beginning to match notional amounts between swap notionals and bond cash present value (market prices).
Please keep in mind that standard fx swaps only exchange cash flows at the initiation of the swap agreement and final settlement. But the swap can be structured, as above to exchange periodic cash flows in between. Also, note that you can trade forward-starting swaps in case you already own the bonds and want to have the swap cash flow dates match the bond coupon payment dates. Additionally, you may want to look at an un/mis-matched fx swaps, which basically allows you to exchange different notionals in the spot and forward transactions of the swap. Thus you can greatly customize the swap. But as with everything in life, the more you customize the more you will pay up to get the deal done with your counter party.
Comment: Thanks for the deatiled answer, now I understand you question from the begining. My question was to hedge against exposure to geometric Brownian motion, using only these two bonds, FX forward and possbile zero interest rate savings account. Thank you!


Why can't I update to iTunes 10.6 via Software Update on Lion?

Question: I'm currently running OS X version 10.7.4 and iTunes 10.3.1 -- I noticed iTunes 10.6 has the coveted full-screen mode, but I've updated everything in Software Update and there is still no mention of any upgrades to iTunes. Is it possible my hardware doesn't support iTunes 10.6? I'm using an early 2008 Macbook with an Intel GMA X3100, but that shouldn't make a difference to iTunes. Any other possible reasons why I wouldn't be able to update?
Answer: I don't know whether Apple delivers these upgrades via Software Update at all (maybe just the minor ones). But you can easily download the current version of iTunes directly from Apple's iTunes page.
Comment: Hmm, I've always been able to update iTunes via Software Update since Leopard at least, so I didn't think it would be a good idea to download from Apple's website until I figured it why it wasn't showing up on Software Update.


How do you find and load an autosaved level in the Portal 2 Test Chamber editor?

Question: I was working on a level, hit save, quit, and after returning to the editor the level was in a previously saved state.  Is there a way I can check if there's an autosave file containing these changes and load it?
Comment: Autosaves are being made. I've had the problem before, where I clicked the save button and then quit, where it told me the app told me I quit too soon, and the program didn't have a chance to save it, but it had an autosave, and asked me if I wanted to load that. I always did, and it looked like the version I actually tried to save.
Comment: I dont think auto saves are made, and if they are, most likely they are made with each map build. If you go to your portal 2 folder, the most likely place for auto saves would be : \Steam\SteamApps\common\portal 2\portal2_dlc2\maps

The folder your looking for should have in it at least one .bsp file
Answer: You should be able to go into your workshop levels and then you should see your autosave if not it is probably in single player or co-op levels depending on what type of map your making


How to get DXF to show up in the right spot?

Question: I just followed the advice of this forum post in order to export the vector layers of a PDF for usage in ArcMap. The map vector layers in the PDF were spatially referenced. I was able to export the layers as a DXF using Inkscape and open the layers in ArcMap. I then went to the properties of the DXF in catalog and set the proper projection. However, when I brought the DXF into the map document, it was not showing up in the right location. It appears the the spatial information was somehow removed in the process of exporting into a DXF. Does anyone know of a solution to my situation? Thanks!
Answer: I'm not familiar with your InkScape step but there is Online Help here on how to go about Georeferencing CAD datasets such as DXF for display in ArcMap.
Comment: Hi PolyGeo, thanks for your respone. Spatial Adjustment only works if you have a vector to reference the DXF to. In my case, I do not have anything to reference the DXF to, I need to figure out how to preserve the vector's spatial information from the PDF and bring it into ArcMap. If someone knows of a diff workflow, I am open to that too.
Comment: I'm thinking that you should be able to read off some point values in your PDF and use those to create a few point features to use as your control.


Retrieve Strong Named Assembly for a SafeControl entry

Question: I'm trying to add a SafeControl entry for a custom web part and know how to do it but just don't know what I'm supposed to put for the Assembly Name.  It looks like it should use the template "(name of dll), (version), (culture), (publickeytoken)".  Is that the name of the .dll in the bin directory for the project and if so does it require a path or is it simply the name?  Does it matter what I set as the version?  Culture seems to just always be set as neutral but where do I find this publicKeyToken?
Answer: The SafeControl entry should be part of the SharePoint Project Item in Visual Studio. Visual Studio supports tokens that will automatically be replaced with the correct value.
The token for SafeControl is $SharePoint.Project.AssemblyFullName$
The full list is here: http://msdn.microsoft.com/en-us/library/ee231545.aspx
Answer: Ideally you should not add the safe control entry manually. If you do,Before adding a safe control entry, you need to drag and drop the dll from the bin directory to the assembly(Path:C:\Windows\assembly).Right click on the assembly to get the details. It is as shown in the figure.

You can then follow the steps here
Answer: You shouldn't be adding these entries manually. The solution package containing the custom web part should handle this for you. If not contact your developer/supplier and get them to do their job.
If you're the developer then make sure that if you re-named your web part you fix the broken refrence in the ,spdata file in your solution (show hidden files in the solution explorer to see these)


What is the difference between a hazard ratio and the e^coef of a Cox equation?

Question: As I understand it, the definition of the hazard ratio is the ratio of two hazard rates. Often the exp(coef) from a Cox model is also used as an estimate of the hazard ratio. These methods give two different, although similar, results. Are there circumstances in which it's appropriate to use one method vs. the other?
Comment: @ocram answer goes direct to the point (+1). However, you're talking about two different methods to estimate HRs, but then you mention only the Cox model. I'm curious to know what other method you use to estimate an HR. Because maybe what you're estimating using the method other than Cox model is not really an HR.
Answer: I would suggest that you write the model you are working with, and then compute the hazard ratio you are interested in, in order to know how to estimate it from your $\hat{\beta}$'s.
$$$$
Example
Suppose your Cox's proportional hazards model takes the form
$$h(t) = h_0(t) \exp(x_1 \beta_1 + x_2 \beta_2)$$
where $h_0$ is the baseline hazard function, and $\beta_1$ and $\beta_2$ are regression coefficients associated with the covariates $x_1$ and $x_2$. Suppose further that $x_1$ is binary ($0$ or $1$).
$$$$
$$\frac{h(t | x_1=1, x_2)}{h(t | x_1=0, x_2)} = \exp(\beta_1).$$
So, $\exp(\beta_1)$ is a conditional (given the value of $x_2$) hazard ratio ($x_1 = 1$ versus $x_1 = 0$).
Comment: Thanks for the answer, I wasn't clear. I'm not comparing the Cox model's hazard ratio to another model's, but to the definition of the hazard ratio as simply the ratio of two hazard rates (-log(frac. surv pop1)*time)/(-log(frac.surv pop2)*time). I have seen both methods used when either could be applied, that is, where the cox model is univariate, so one variable isn't being assessed relative to another.
Answer: In your comment you make clear that you are comparing the weighted instantaneous hazard ratio ( i.e., exp(beta)) with some summary measure of the ratios of cumulative hazards ( -log(frac.surv pop2)*time ). I think you will find that they are roughly the same during the early early phases of follow-up but they diverge as time increases. The reason for this is that as survival approaches zero the ratio of cumulative survival necessarily goes to unity, where as the hazard ratio may not.


When a website says a font is "Free for personal use", am i allowed to use it in a name card?

Question: I have an amateur question to ask. Following the title of the question, if the website says free for personal use, am i allowed to the font and print it on my name card (business card)? I dont own or work for any company. Im an independent artist who would like to hand out name cards when engaged in some events etc. Many thanks in advance to your answers.
Comment: If your intention is to gain financially, or marketing with the end goal of financial gain, don't use "Free for personal use" intellectual property. The right thing to do is either buy a license for the font if one is available for it, or find a suitable free for commercial use font. There are plenty of free for commercial use fonts out there. The bottom line is: If you make money from someone else's art, you should pay them.
Answer: Simply put, personal use means you can not use this image to make money.
If you give your business cards just so that your friends would have your data - it's ok.
If you're hoping to win new clients or business contacts through business cards then this is not personal use anymore.
This is how I see it.


Push-pull configuration over single mosfet

Question: I'm dealing with a simple application in which I need to drive a pure resistive load and to control it by voltage. I control the load through a pwm signal coming from a microcontroller in 5V logic. The pwm frequency can be easily set from a few hertz to several kHz. The supply voltage is 24V and the maximum absorbed current is 15A.
I wonder, what are the advantages in using a more complex push-pull configuration over using a single power mosfet?
I am aware that push-pull configurations are usually considered more efficient, but what about using a single mosfet with extremely low rdson?
In example, a single IRFS7430-7PPBF would be enough? With the current values required this mosfet seems to be dissipating only 0.17 W in worst conditions.
At this point I would prefer the single mosfet configuration over a more complex and costly push-pull configuration.
What about if there is a need of linearizing the output of the driving stage with an inductor and a capacitor? Would the push-pull configuration offer bigger benefits over the single mosfet?
Comment: Besides that you forget that the power dissipation is higher due to switching losses it is really hard to picture what you have in mind, you might want to show some schematics
Answer: If you don't mind that the resistive load receives a "power amplified" PWM signal then a single MOSFET being switched at the PWM frequency will be the most effective.
If you do mind (because you want a linear looking voltage proportional to duty cycle across the load) then a push-pull with inductor and capacitor filtering will be most efficient. Next most efficient would be a single MOSFET with back-emf capture diode but the diode would dissipate quite a few watts.
However, the single MOSFET solution is trickier to get right with respect to mark-space ratio. The push pull version produces an average output voltage which is duty * input voltage i.e. is largely load value dependent.
You could engineer a purely linear solution with one MOSFET but that would produce a lot of heat.
Comment: Ok. So if I get it right if I need to linearize the output and get a smooth DC-DC converter it is better to use a push-pull over single mosfet. If I don't care to linearize the output I can use a single mosfet. In that case the resistive load (a simple heater resistor) will receive a "power" square wave pwm.
Comment: If it's a simple resistive load for heating then use a single mosfet but I'd be tempted to put a flyback catch diode on for wire stray inductance.


Search or Ask on the main search component of the site

Question: I'm looking for the right pattern to support 'asking' more questions to our site community from the main search component, I'm looking for a way to combine the main search functionality which involves autocompleting to also have a way for the user to ask and then take his question and present it to him in the 'add a question' page automatically, are there any sites that combines search and ask CTAs on the same main search component? any conventions for that? I thought of adding a toggle on the right of the search area, one will be 'search' and the other will be 'ask' but then I won't have a place for the actual CTA of performing the search, I could assume that people will hit the return for it but I'll still  need to have an action button.I'll be happy to learn from your suggestions. thanks.
Comment: Are people searching for answers to previously asked questions and then creating their own question if they don't find it? Much like this site...
Comment: Right now they're only searching for projects, you can take a look here: www.hometalk.com but we want them also to add questions of their own, so naturally we will give them an autocomplete to the actual question search but if nothing is found we want them to know that they can take their query and add it as a question for the community, and this is a big challenge that we don't really know how to tackle UX wise.
Answer: What if the user does not to have to decide if it is a search or a question. The user only wants an answer.
This would mean:

Hint text in search field "search or ask question"
on enter (or click on CTA search) always start a search
Show search result AND show a CTA like "want to ask the community?" which opens the "add question" page with search term as question.

a site that has something like this is feedback.techsmith.com but they hide the "ask a question" CTA in search result at the bottom of the page so it can easily been overseen by the user.
Comment: Thank you for your answer, this is definitely one of the solutions, probably less confusing than adding a toggle, I'm adding an image for our planned solution, although I feel there's a better option. here it is: https://www.dropbox.com/s/apfqnzczz7ccxip/Screenshot%202017-08-10%2008.59.58.png?dl=0


Conditional Fields with multiple conditions

Question: I am using Conditional Fields module. I need some guidance when setting dependencies for multiple fields (accepting unlimited values). Here is the situation:
In my entity form I have two fields:

Assignment Status --> This is Select List type with two values DRAFT and FINAL
Upload File -->  This field is required field for accepting documents from student ONLY when Assignment status is FINAL else it is optional field.

Now my question is when I am using this case and creating Dependent and Dependee relation only for one assignment this work fine but when I give an option for accepting unlimited values the Conditional Fields doesn't work.
Because one student is required to submit more than one assignment I used Paragraph Module and also tested this case also  with MultipleFields Module. I am not able to find any answer to my query. Please help me to find this answer.
Answer: You can try the module Reference Option Limit
With this module you can try to make a reference.
The documentation of this modules is here
Documentation
Is a Great module, hope i can help you


Forced teleportation of traps?

Question: Recently I was DM and the wizard decided to use "hammerfall step" to teleport a trap into a pit where it couldn't do anything. The trap was fixed to the floor so it could not be pushed, but could it be teleported?
Comment: Welcome to the site! Please take a moment to check out the [tour] and the [help] to get an idea of how things work. That said, great first question, +1!
Answer: I think that depends on the definition of what you consider a legal target for Hammerfall Step.
The power specifically states each enemy in blast. Source: Arcane Power pg. 116
Since I don't rule traps as enemies, I wouldn't allow him to teleport the trap at all. If it can't be picked up, it wouldn't be able to be teleported. Additionally, this would open the system up to massive abuse. If he can teleport a trap, then what's to stop him from teleporting the key to a blacksmith's shop? Or the spellbook he likes off a shelf? I mean the possibilities for abuse are endless if you permit him to use that power to move an object.
Comment: Upvoted. Because the spell specifically targets enemies, I don't think it can be applied to an inert object like a trap.

Forced teleportation of traps?


Non-Deterministic Turing machine vs Probabilistic Turing Machine vs Deterministic Turing Machine

Question: What is the difference between a Non-Deterministic Turing machine, Probabilistic Turing Machine and a Deterministic Turing Machine ?
Answer: A Turing machine is a computation model in theory only, able to simulate any computer algorithm. By formally defining this model mathematically, Its possible to draw conclusions and limits regarding the abilities of our computers.
There are many more models, and much more literature about each of them, but below is a short review of the three mentioned in your question

Deterministic Turing Machine (DTM):
For any given state $Q_i$ the machine is presently at, and for any given symbol under the input alphabet $\Sigma$ the head is at, there is exactly one action the machine can perform.
It means in every step, the transition (and write operation) is well established, or deterministic, under a certain set of rules predefined into the machine.
Non-Deterministic Turing Machine (NTM):
A machine like the DTM, with the important exception that in every step, it may make more than one transition. So for input symbol $s$ and state $Q_i$, it may transition to to $Q_j$, but it may also transition to $Q_k$ and so forth.
Since in no step is the transition well established, we say the NTM "guesses" the best transition that eventually leads to an accepting state $Q_{F}$ (if such a transition path exists).
Imagine being in a maze, and constantly having to decide whether to turn left, or right. If you always guessed the correct choice, then you will find the find the quickest way out possible (if there was one).
Probabilistic Turing Machine (PTM):
A machine like the NTM, only its transition is subject to a probabiliy function (that is well established) and not "guess" like the NTM. For example, suppose the current input symbol is $s$ and state $Q_i$, a transition can be defined as follows:
Flip 2 coins.

If the result is ($head$, $head$), move to state $Q_j$
Else, move to state $Q_k$

Unlike the DTM, we cannot say we know how the machine will act given the situation, since we don't know what the coin flip will show. However, its also not as "lucky" as the NTM, and we can often measure accurately the probability of a mistake.

Further reading on probabilistic classes:
Randomized polynomial time class
Bounded error polynomial time class
Comment: So a PTM and NTM are both non-deterministic. While a PTM is a realisable model of computing in reality, an NTM is not. Is it because this "guessing" in the NTM is kind of esoteric? It's still quite weird that the NTM just guesses the correct answer, let me will look for a more formal definition.
Comment: @WeCanBeFriends Another way of looking at non-deterministic models like the NDTM is that when there is a choice the NDTM clones itself and its copies pursue all of the decision branches in parallel. In the maze analogy, you go left while your identical twin goes right. Remember this is only a model so we have unlimited resources.
Comment: @gandalf61 Got it, I was refraining from using words such as parallel because afaik, it's not related to anything like parallelism. I'm still looking into why this model is important, maybe just for classifying problems to be in NP?


Monopoly (advanced) with speed die

Question: So my family and I were playing when one of us landed on the "Go to Jail" space. They went, on their second roll to get out he rolled a double, now since we are playing the advanced game, does he roll the speed die since he is no longer in jail because he rolled a double with the white dice and then move with all three or does he just use the double white dice without the speed die? In the rules it does state not to use the speed die to get out of jail, but he did roll a double without the speed die.
Answer: According to the rulebook, you get out of the Jail if...

(2)
  using
  the
  "Get
  Out
  of
  Jail
  Free"
  card
  if
  you
  have
  it;
  (3)
  purchasing
  the
  "Get
  Out
  of
  Jail
  Free"
  card
  from another
  player and
  playing
  it;

Regarding the speed die:

Use
  the
  white
  dice
  ONLY
  when rolling
  to
  get
  out
  of
  jail.

Therefore, if you play the "get of of jail free" card, you immediately get out of jail and you roll to move, not to get out of the jail. Therefore, you do use your speed die, as you're already out.
Nevertheless, if you roll to get out of jail and you roll doubles, you still do not use the speed die, even if you succeed. It's just that when rolling to get out of jail, if you roll doubles you use that result as your move.
Comment: This answer misses the question as it looks like OP is talking about option (1) to get out of jail.
Answer: The applicable rule would be:
"Use the white dice ONLY when rolling to get out of jail."
The speed die is an extra die that can be used in roll.  This rule explicitly states that the speed die is NOT used for a roll where a player is trying to get out of jail.  When they go to make such a roll, they are in jail.  Once they roll they are no longer in jail, but have already completed their roll.
I am used to the speed die from playing Mega Monopoly where the speed die is used every time the dice are rolled.  The Advanced Monopoly has sometimes uses the classic two die roll and sometimes all three dice.  A roll is always a single event.

Monopoly (advanced) with speed die


CPU sending and recieve Data?

Question: I am looking for an answer regarding the CPU read and write. We know there are two clocks that are working in the computer system, one is the peripheral clock and the other is the CPU own clock on which its control systems are working. I am familiar with the clock domain crossing but I dont understand how the CPU read and write data working on different clocks.
For example the CPU sends the data to be written on the data bus and address on the address bus. Since the rest of the peripherals are working on their own clocks such as PCI or other standards, Now the CPU which is working on its own clock will execute the next instruction send the address again on the address bus and the data on the data bus to the same peripheral but data bits have still not been read by the peripheral so doesnt the data will be lost in this process or is there any mechanism of handling this situation ?
Comment: Clock domain crossings are complex, and waste several cycles for recsynchronizing. If the peripheral is seldom used, the CPU will waste many cycles, but not often. If you need performance, you will have to store data in double-port RAMs and FIFOs where blocks of data enters at one frequency and exits at another.
Answer: That's why buffers are used.
While the transfer is in progress the peripheral writes the data into a buffer and the cpu ignores it and just works on its own clock.
Then when the transfer to the buffer is complete the peripheral will issue an interrupt (or other toggle a transfer complete pin) and the cpu will read from the buffer and if applicable let the next transfer start.
The buffer used can be the RAM this is often referred to as Direct Memory Access. The peripheral is attached to the memory bus and can issue reads and writes to ram directly.

CPU sending and recieve Data?


infopath form based on data from other infopath forms

Question: i have library with items (InfoPath form that needs to be filled out). each item / form has fields for buyers...ets. I want to have in each new open form available entries which were added in other form. Example. I open new form, wite in Company field company name, lets say name is X. Than i save form. When i open new, blank, form I would like to have that X company availabe in my compayn field to choose, not to write it again
Answer: Assuming you have a dropdown where you want to show company name
Then, in your InfoPath form in which you want to show company name,

Right click on drop down and choose properties.
From data source, select list or library.
Add receive data connection to the infopath form url and choose the field you want to show.
Comment: Hi, thanks for quick answer. Will this insert other thata from that company too, or must i insert them manually? thanks
Comment: You can create aa data connection in your infopath form to query another list. That way you get multiple values based on single value. Now using rules you can control which value goes where in your form where you want to show.
Comment: you mean something like this: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=129