What should I look for in a good, multi-purpose chef's knife?

Question: If I want to buy a good multi-purpose chef's knife, which characteristics should I look for?
Comment: @kiamlaluno - what's your price point?  That makes a huge difference.
Comment: @justkt: We probably live in different countries; the price would not be a good parameter.
Comment: I could swear I've seen this identical title before, but I can't seem to find the duplicate.  Anyone?
Comment: @Aaronut: I thought the same, but couldn't find it. I know I've given a similar answer to another question.
Comment: I know where I saw the question before to ask it; I searched for the question here, and I didn't find a similar question, so it should not be in this site. Did you see it between the Area 51 example questions?
Comment: Looks like it was on Area 51, good call @kiam: http://area51.stackexchange.com/proposals/1288/food-and-cooking/3348#3348
Answer: One of the most important things is a full tang. The tang is an extension of the metal of the blade into the handle. In knives with a full tang, it goes all the way through the handle. This improves stability, control, and durability. Cheaper knives with partial tangs will have the handle break off over time.
In a chef's knife, you want a blade from 8 to 10 inches long, whichever is more comfortable.
You can also either get a forged or stamped blade. I suggest reading this article on the differences. To summarize, forged blades are softer, easier to sharpen, heavier, and have a bolster. Stamped blades are sharper, harder to sharpen, lighter, and have a welded on a bolster if any. With current manufacturing processes forged is not necessarily better than stamped. You should make your own decisions. All crap knives are stamped, but not all stamped knives are crap.
This brings me to one of the most important points: It must feel good in your hand. Don't buy an expensive knife just because it's expensive, or you recognize the name. Go to a store that will let you use the knife, Williams-Sonoma will do this. If you can, bring a carrot in your pocket and actually cut that in the store.
I'll do some research on steel quality and update this later.
Comment: It's been nearly 2 years; any updates on steel quality? :)
Comment: I would disagree with you that a full tang is a marker of quality, I have many extremely high quality Japenese knives that have rat tag and wooden handles. Indeed these knives are made in such a way that it is easy to change the handle should it become worn / damaged, or you simply would like a different material for the handle. I agree with everything else you said though :-)
Comment: I'd also add that a forged blade over a stamped blade is important for durability.  In-store Williams-Sonoma tests are great for testing the varying feels of different knives.
Comment: Full tang is a quality indicator in western and yo-style japanese knives. Wa-style knives have no full tang, and if correctly used, do not need one.
Comment: It's been 11 and a half years; how's that steel quality research coming along? :)
Answer: Besides a good sharp blade and a solid comfortable grip, your preference for heavier vs. lighter blades will determine your choice. That said, over the years CooksIllustrated / America's Test Kitchen has reviewed knives and consistently recommended the inexpensive Victorinox (Victorinox Forschner) Fibrox 8-Inch Chef's Knife, particularly if the question is "what one knife should i buy?" Top-quality at a bargain price.
Even when reviewing more expensive "innovative" chef's knives, they still found little to justify the additional cost. Reviews of hybrid chef's knives produced some standouts, for a cost. The final results are on the pay side of their site, but you can get the jist of it from the free articles.
What to look for? From the reviews:

We want one that's versatile enough to handle almost any cutting task, whether it's mincing delicate herbs or cutting through meat and bones. We want a sharp blade that slices easily, without requiring a lot of force. We want a comfortable handle that doesn't hurt our hands or get slippery when wet or greasy.

and

A good handle should virtually disappear in your grip, making the knife the oft-cited "extension of your hand."
Comment: +1 for Victorinox Fibrox.  My 8" Victorinox Fibrox chef knife is fantastic, a treat to use, and currently running on more than 8 months without sharpening in a professional kitchen.  It is still so sharp that it draws comment from other cooks.
Comment: I loooooooove my Forschner blades!
Answer: Consider stainless vs. high carbon steel
Stainless knives are nice because the edges might be more stable because they won't rust and tarnish. They can be dishwasher safe (as long as some care is taken so they don't bang into other things), and are a bit more durable.
High-carbon steel is better at keeping an edge because the steel is harder. The edge will remain sharp for more cuts than the stainless. The downside is that the steel can corrode if lots of acidic things are cut, or the knife is not cleaned after use. Stainless is considered more difficult to sharpen properly than steel, but you probably shouldn't sharpen your own knife anyhow (honing, on the other hand, you can and should do).
Some manufacturers make a laminated blade, in an attempt to balance the benefits of both. I've only seen this in Japanese knives that are fairly expensive, but it seems a good idea: a thin sheet of very hard steel is sandwiched between a pair of soft stainless pieces. The hard steel is too brittle to make a blade from, but keeps an edge very well. The stainless adds strength to the knife, and keeps everything shiny.
Blade shape
Knives come in a wide range of shapes, from a blade that barely extends down from the handle to the large rounded (Japanese-inspired) shapes with a flat blade. This is a matter of personal preference. I do a lot of chopping, so I prefer a flatter, wider blade that gives my knuckles some clearance over the board while chopping.
I find the scalloping along the blade, which is fashionable these days, to be unnecessary, but others seem to disagree on this. I don't slice enough delicate things to notice any effects.
Other Notes
Knives come in hundreds of shapes and sizes. For a chef's knife, you probably want a 8-10" blade, no serration (that is important), and it must be comfortable in your hand. I have known people who do most of their cutting with a large Chinese-style vegetable cleaver, and they are perfectly able to do anything I could do with an agile 8" chefs knife.
For a good quality knife, you want to avoid stamped blades. Stamped blades are usually thinner, made of cheaper steel, and are more flexible. Forged blades are heavier, more durable, and easier to sharpen. The knife sets sold for $10 at Walmart are stamped and suck. Avoid them. A forged blade will be thick on the dull edge, and will taper more or less uniformly to the bevel of the cutting edge.
If you plan to put the knife in a dishwasher (not recommended--they get banged into other things in the dishwasher, dishwasher detergents damage non-stainless steel), get one with a plastic handle. Wood doesn't like dishwashers.
You will want a honing steel. This is used to correct the edge (it bends a bit during use, the steel straightens it out). They are usually rods of hard steel with a handle.
Here is my favorite cheap knife. Only $30 and it is awesome.
Comment: You could also mention that there are carbon/stainless hybrids (carbon core, clad with stainless) which perform extremely well. Also as regards stamped knives - there is a brand/knife called the Misono UX10 that is stamped, and is exteremly high quality. The sell them in Korin in N.Y.C as well as online.
Comment: "in a dishwasher (not recommended)" - I would strengthen this statement to "Don't ever wash a nice knife in the dishwasher". It will even void the warranty on some expensive knives.
Comment: Some of the highest quality knives use stamped Japanese-steel blades. Global and Shun are known for this.  Also, with modern alloys nobody I've seen uses carbon steel anymore; high-carbon stainless can hold an excellent edge, and it resists staining pretty well.  It's just much lower-maintenance than normal stainless or high-carbon steel.
Comment: I'm a fan of carbon steel for a utility pocket- or belt-knife, but for cooking? I use way to much acidic stuff for that to be a good idea.
Comment: Far to much acid and water in a kitchen to use a carbon steel knife unless you like that patina look. You can also find stainless that rivals or bests common carbon steels for edge retention.
Answer: I worked in a professional kitchen, so apologies if I go on at some length about knives;  when you use them for hours every day, you tend to care deeply about what you're using.
Shape
For general use, you want a 7"/17.5cm santoku or 8–10"/20–25cm French-style chef knife.  These blade shapes provide the most flexible kitchen use, and these sizes offer a good balance between cutting area and ease of use.  Santokus are slightly easier for chopping and vegetables, while chef knives have an advantage for detail work, slicing, and meat.  Some people also swear by smaller Japanese or Chinese cleavers, which take a little more practice to use, but fill the same role.
Care and Sharpening
People reviewing knives never mention the most important part of buying a knife: caring for it!  After 6 months, how you maintain and use your knife matters more than which one you purchased.  Proper care, honing, and sharpening are the difference between effortlessly cutting slices so thin you can see through them, and mashing tomatoes rather than slicing them.  Let me give you a couple extreme examples from personal experience:

My executive chef used Global knives, which are well known for quality steel.  He rarely sharpens them, and is not skilled at sharpening. The result is that half the time you could slice onions better with a $5 steak knife than his $100+ chef knife.
One of the cooks used a cheapo Japanese-style mini-cleaver for almost everything.  It cost under $20 and uses cheap steel, but has an excellent edge.  Why?  He sharpens the knife regularly and hones before use.

If you're buying a quality knife, then you ought to be buying quality tools to maintain it.  A smooth steel or ceramic sharpening/honing rod is absolutely critical, and costs under $30.  The knife should be honed regularly at an angle slightly steeper than the primary bevel. generally daily or before a major task.  Regular honing prevents the edge from coming out of alignment and folding over, and a ceramic rod will slightly sharpen it.  Cheap and grooved butcher's steels can rapidly worsen a knife, by chipping it away with their coarse surface.  This is especially a problem with harder Japanese steels.
When the knife becomes dull enough that honing won't restore it, after a year or two, get the knife sharpened by a professional, or invest in a professional-grade sharpening system.  Putting a more acute angle on the knife (15 degrees per side instead of 20-23) will produce an even sharper result than normal; in many cases this will produce slicing power superior to the original factory edge.
Steel
The primary quality here is hardness, as measured with the Rockwell C hardness test, abbreviated HRC.  Hardness determines how acute an angle you can sharpen the knife to, which in turn determines how sharp it will be.  Superhard steels can go as low as 8 degrees per side, while softer steels may be better served by a comparatively dull 20 degrees per side.  Harder steel also will retain an edge against wear for longer.
Japanese steels are known for being harder but more brittle than German steels.  This trade-off means they require special care to use and sharpen; I've heard of a tortilla chip taking a chunk out of a particularly thin and hard knife.  Japanese knives should NEVER be used to cut hard materials, particularly bone, or to pry at things. They can even shatter when dropped. In contrast, softer German steels are easier to sharpen, and more forgiving.  They tend to bend rather than breaking, and can be restored more easily with honing.  As I said before, edge maintenance matters more than steel. In the hands of a gifted sharpener, low-grade stainless steel can become quite sharp; however, a better steel will allow them to refine the edge to an unbelievable result.
Construction: Forged vs. Stamped Knives
Blades may either be forged or stamped.  In the past, stamped knives were generally of inferior quality, but improvements in manufacturing mean that extremely high quality stamped knives are now available.  Stamped blades are generally lighter and thinner; due to their thinness they may cut more easily than thicker forged blades.  Common manufacturers of stamped blades include Global, Victorinox, and Shun.  If you want a knife that is easy to maneuver, precise, and not tiring to use, a stamped blade is for you.
Forged blades are generally heavier and more durable, and some people find the edge is easier to sharpen.  The thicker blades survive wear and sharpening longer than thinner stamped blades. Wusthof and Henckels are traditionally known for their forged knives. Forged knives often feature a bolster, a raised ridge between the blade and the handle.  A bolster makes the knife considerably stronger, but also more difficult to sharpen, and it reduces the usable knife area slightly.  If you want a knife that is heavier, with some momentum to help your cutting, and durable against punishment, a forged knife is for you.
It is a personal choice whether to use a stamped or forged knife.  With proper care, both types will stay sharp and last a lifetime.  There is also some crossover; stamped knives may also have a bolster welded on to them, and some manufacturers will produce both stamped and forged knives.  The forged version is generally more expensive, due to higher manufacturing costs.
Personal bias: I prefer the sharpness and lightness of stamped knives. They let me do 15 or 20 pounds of julienne onions without fatigue.
Construction: Handles and Balance
A knife should be evenly balanced when you wrap your fingers around the handle and pinch the blade with thumb and forefingers.  If the knife tips toward the handle or the blade, it is off-balance and will be less comfortable to use.  As far as construction, "full-tang" knives are preferred; these have blades extending fully into the handle.  This makes the knife slightly heavier, but provides a stiffer, more durable construction, and makes it much harder for the handle to break off the blade.
Handles come in a variety of materials, including plastic, wood, steel, bamboo, and bone.  There is often some texturing to help grip a handle; this can literally be a life-safer (or at least finger-saver) if you work with greasy, slippery sides of bacon, meat, or fish.  In my experience, the Victorinox Fibrox handles have fantastic grip even when oily, and absorb impacts.  In contrast, the dimpled steel handles of the Global knives are worthless and should carry a "slippery when wet" warning.  The most common wood or synthetic handles fall in between, with Wusthof's Classic line being more or less the standard.
Wood and bamboo handles deserve special mention: although these are beautiful, they also require special care to avoid wearing out or splintering.  They should not be washed in a dishwasher or allowed to sit in water; although this is true for any quality knife, it goes doubly for these materials.
Specific Knives and Reviews
Cooking for Engineers and Cook's Illustrated both did excellent knife reviews. My main knives are a 8" Victorinox Fibrox and a MAC MTH-80 granton-edge.  Both definitely deserve their strong reviews; the Victorinox is a phenomenal value, and the MAC takes an absolutely unbelievably edge.  I've met duller razor blades.
Answer: This is the best info I could find.
Also look at Kitchen-Confidential-Adventures-Culinary-Underbelly from Anthony Bourdain:

How to Cook Like the Pros Unless you're one of us already, you'll probably never cook like a professional. And that's okay. On my day off, I rarely want to eat restaurant food unless I'm looking for new ideas or recipes to steal. What I want to eat is home cooking, somebody's - anybody's - mother's or grandmother's food. A simple pasta pomodoro made with love, a clumsily thrown-together tuna casserole, roast beef with Yorkshire pudding, all of this is pure exotica to me, even when I've been neck-deep all day in filet mignon and herb-infused oils and all the bits of business we do to distinguish restaurant food from what you get at home. My mother-in-law would always apologize before serving dinner when I was in attendance, saying, 'This must seem pretty ordinary for a chef . . .' She had no idea how magical, how reassuring, how pleasurable her simple meat loaf was for me, what a delight even lumpy mashed potatoes were - being, as they were, blessedly devoid of truffles or truffle oil.
Let's talk about tools first. What do we have in our kitchens that you probably don't? The joke is that many of our stock items - herb oils, crushed spices, chiffonaded parsley, pured starches and veggies - are often made with home-model equipment, just like yours. I may have a 25-quart professional Hobart mixer and an ultra-large Robot-Coupe, but chances are I used a home blender to make that lovely roast red pepper coulis dotted with bright green basil oil drizzled around your plate. So, what do you absolutely need?
You need, for God's sake, a decent chef's knife. No con foisted on the general public is so atrocious, so wrongheaded, or so widely believed as the one that tells you you need a full set of specialized cutlery in various sizes. I wish sometimes I could go through the kitchens of amateur cooks everywhere just throwing knives out from their drawers - all those medium-size 'utility' knives, those useless serrated things you see advertised on TV, all that hard-to-sharpen stainless-steel garbage, those ineptly designed slicers - not one of the damn things could cut a tomato. Please believe me, here's all you will ever need in the knife department: ONE good chef's knife, as large as is comfortable for your hand. Brand name? Okay, most talented amateurs get a boner buying one of the old-school professional high-carbon stainless knives from Germany or Austria, like a Henkel or Wusthof, and those are fine knives, if heavy. High carbon makes them slightly easier to sharpe! n, and stainless keeps them from getting stained and corroded. They look awfully good in the knife case at the store, too, and you send the message to your guests when flashing a hundred-dollar hunk of Solingen steel that you take your cooking seriously. But do you really need something so heavy? So expensive? So difficult to maintain (which you probably won't)? Unless you are really and truly going to spend fifteen minutes every couple of days working that blade on an oiled carborundum stone, followed by careful honing on a diamond steel, I'd forgo the Germans.
Most of the professionals I know have for years been retiring their Wusthofs and replacing them with the lightweight, easy-to-sharpen and relatively inexpensive vanadium steel Global knives, a very good Japanese product which has - in addition to its many other fine qualities - the added attraction of looking really cool.
Global makes a lot of knives in different sizes, so what do you need? One chef's knife. This should cut just about anything you might work with, from a shallot to a watermelon, an onion to a sirloin strip. Like a pro, you should use the tip of the knife for the small stuff, and the area nearer the heel for the larger. This isn't difficult; buy a few rutabagas or onions - they're cheap - and practice on them. Nothing will set you apart from the herd quicker than the ability to handle a chef's knife properly. If you need instruction on how to handle a knife without lopping off a finger, I recommend Jacques Pepin's La Technique.
Okay, there are a couple of other knives you might find useful. I carry a flexible boning knife, also made by the fine folks at Global, because I fillet the occasional fish, and because with the same knife I can butcher whole tenderloins, bone out legs of lamb, French-cut racks of veal and trim meat. If your butcher is doing all the work for you you can probably live without one. A paring knife comes in handy once in a while, if you find yourself tourneing vegetables, fluting mushrooms and doing the kind of microsurgery that my old pal Dimitri used to excel at. But how often do you do that?
A genuinely useful blade, however, and one that is increasingly popular with my cronies in the field, is what's called an offset serrated knife . It's basically a serrated knife set into an ergonomic handle; it looks like a 'Z' that's been pulled out and elongated. This is a truly cool item which, once used, becomes indispensable. As the handle is not flush with the blade, but raised away from the cutting surface, you can use it not only for your traditional serrated blade needs - like slicing bread, thick-skinned tomatoes and so on - but on your full line of vegetables, spuds, meat and even fish. My sous-chef uses his for just about everything. F. Dick makes a good one for about twenty-five bucks. It's stainless steel, but since it's serrated it doesn't really matter; after a couple of years of use, if the teeth start to wear down, you just buy yourself another one.

Also look at this online resource for knife choices.
Comment: Global knives: fantastic, award-winning steel and blade, failure of a handle.  Seriously, I've never held a knife that needed a "slippery when wet" warning before, but Globals really do.  It's very much love-hate.  MAC brand knives have similar steel and blade profiles (Japanese-style) but a more comfortable and less-slippery Western-style handle.
Comment: @Bob, We don't have Globals around here. After following your link, I just had to sharpen all of my knifes.
Answer: Most important thing is comfort of the grip. If it's not comfortable, you will not want to use it. If you don't want to use it, you have wasted your money. A "fancy" knife that doesn't get used is a paperweight.


What makes a 'primary' taste?

Question: I just noticed this proposal that 'starchiness' should be recognised as the sixth primary taste (after sweetness, sourness, saltiness, bitterness, and umami). I've never really been clear on the distinction between a 'primary' taste and any other sort of taste - is this purely about whether the taste is detectable by receptors specifically on the taste buds? I have heard this as an argument against the recognition of 'pungency' ('spiciness') as a taste, since the mechanism of sensing pungency is different, but I believe some cultures do also recognise pungency as a primary taste - so is this a cultural definition, a scientific definition, or neither?
Comment: Hmm, so rereading the article I linked a few seconds after asking this I spotted a line that suggests this *is* defined by whether the taste is detectable solely by a receptor on a taste bud. I deleted the question at first, but on reflection I suppose this could be useful to other site visitors so I've undeleted it. I'd prefer a better source for this definition though, so I will give someone else a chance to answer it before I jump in.
Comment: This is going to sound strange, but [my answer about classifications in the question about quick breads](https://cooking.stackexchange.com/a/91697/67) is related.  The book I referenced discusses cultural color classifications, although that's a little less subjective than taste.
Answer: Unless they found a taste receptor, it likely is a part of the texture (including heat conductivity, solubility etc.) part of flavor. Spicy heat actually is related to temperature and texture (triggers heat - as in literal heat - receptors, does not trigger injury receptors and/or temperature receptors deeper in tissue, so we will not mistake spicy for actually dangerously hot).
The five/six basic taste system (the sixth being fat, currently being scientifically debated) does not describe flavor completely: It completely ignores the factors of aroma, texture (including how non-flavor ingredients will just mechanically keep most of some flavor compounds from ever getting near your tongue), temperature and their interactions. It assumes that bitterness is one dimensional, which is also debated.
Adstringency is considered a separate taste in some cultures, one could also consider it a textural factor (excites tissue in a certain way, just as capsaicin does).
Comment: Thanks for the answer. The 'taste receptor' definition sounds slightly circular though - if there is a receptor that is triggered by capsaicin, what stops that receptor being identified as a taste receptor? Is something only a taste receptor if it has no other triggers?
Comment: Heat receptors aren't only found in the mouth.... and these in the mouth aren't the only one that tend to get triggered by capsaicin and convey a pain-like reaction that can and needs to be learned to receive as pleasurable.... need I really be more explicit?
Answer: I am currently doing some research on the topic an came across these criteria proposed to constitute a "primary taste" by two research groups:
Kurihara & Kashiwayanagi (1998)
1)  A primary taste is a characteristic taste which is evidently different from any other primary taste
2)  A primary taste is not reproduced by mixing other primary taste stimuli
3)  A primary taste is a universal taste induced by components of many foods. If a taste is not often encountered, we do not call it a primary taste, even if it is a unique taste.
4)  There are intrinsic taste receptors for a primary taste and single taste neurons specific to the primary taste
Running, Craig & Mattes (2015)
1)  has ecological consequence
2)  is elicited by a distinctive class of chemicals,
3)  stems from activation of specialized receptors,
4)  is detected through gustatory nerves and is processed in taste centers,
5)  has a quality non over-lapping with other primary qualities, evokes a behavioral and/or physiological response
Sources:
Kurihara, K., & Kashiwayanagi, M. (1998). Introductory remarks on umami taste. Annals of the New York Academy of Sciences, 855(1), 393-397.
Running, C. A., Craig, B. A., & Mattes, R. D. (2015). Oleogustus: the unique taste of fat. Chemical senses, 40(7), 507-516.
Comment: I was going to say that 'unctuousness' in terms of fat might be considered a primary taste based on the second definition ... but then I realized from the article title that it's likely what they're trying to argue for.

What makes a 'primary' taste?


How do I create a branch?

Question: How do I create a branch in SVN?
Answer: Create a new branch using the svn copy command as follows:
$ svn copy svn+ssh://host.example.com/repos/project/trunk \
           svn+ssh://host.example.com/repos/project/branches/NAME_OF_BRANCH \
      -m "Creating a branch of project"

Comment: Next use `svn switch svn+ssh://host.example.com/repos/project/branches/NAME_OF_BRANCH .` (if you want to switch current checkout to new branch) or `svn checkout svn+ssh://host.example.com/repos/project/branches/NAME_OF_BRANCH` (if you want to have new branch in seperate directory) to start working on newly created branch.
Comment: ***Note:*** in some cases you would need to use **`--parents`** option with `svn copy`!
Comment: for some reason I used this cmd and it didn;t work, but when i changed the svn+ssh to just https it did work. Did I do anything wrong? what is the meaning of svn+ssh? Thanks!
Comment: you have to create first a new directory in your branch ->  svn mkdir host.example.com/repos/project/branches/NAME_OF_BRANCH
-m "make the branches directory to hold all the branches"
Comment: If I omit the `-m` option, it says like `svn: E155010: Path '/home/constantine/someDirectory/svn+ssh:https:/myhost.com/svn/dir1/dir2/trunk/dir3/dir4/dir5' does not exist`. With `-m` it says `svn: E205009: Local, non-commit operations do not take a log message or revision properties`. *(I replaced the addresses, but they do exist, except, ofc, the new branch directory, and the whole path+url that SVN for some reason merged in the error)*.
Comment: Okay, the answer below worked. Since, I guess, `svn cp` == `svn copy`, the part `svn+ssh` in this answer is wrong, it doesn't work *(triggers the above error ↑ )*.
Answer: Branching in Subversion is facilitated by a very very light and efficient copying facility.
Branching and tagging are effectively the same. Just copy a whole folder in the repository to somewhere else in the repository using the svn copy command.
Basically this means that it is by convention what copying a folder means - whether it be a backup, tag, branch or whatever. Depending upon how you want to think about things (normally depending upon which SCM tool you have used in the past) you need to set up a folder structure within your repository to support your style.
Common styles are to have a bunch of folders at the top of your repository called tags, branches, trunk, etc. - that allows you to copy your whole trunk (or sub-sets) into the tags and/or branches folders. If you have more than one project you might want to replicate this kind of structure under each project:
It can take a while to get used to the concept - but it works - just make sure you (and your team) are clear on the conventions that you are going to use. It is also a good idea to have a good naming convention - something that tells you why the branch/tag was made and whether it is still appropriate - consider ways of archiving branches that are obsolete.
Comment: "svn copy" has the advantage that it will retain history previous to the branching. Manually copying to another directory won't.
Comment: Also note that it's usually a bad idea to tag or branch subdirectories of "trunk". This makes it difficult to keep track of which subdirectory was branched, and most tools will get confused by these branches (e.g. switching branches will mean the directory structure of the WC changes, which will confuse IDEs and build tools). Just always branch "trunk".
Comment: @Will Actually `svn cp` uses cheap copies, it does **not** copy the actual files during the branching. See http://svnbook.red-bean.com/en/1.1/ch04s02.html
Answer: If you're repo is available via https, you can use this command to branch ...
svn copy https://host.example.com/repos/project/trunk \
       https://host.example.com/repos/project/branches/branch-name \
  -m "Creating a branch of project"

Answer: svn cp /trunk/ /branch/NEW_Branch

If you have some local changes in trunk then use Rsync to sync changes
rsync -r -v -p --exclude ".svn" /trunk/ /branch/NEW_Branch

Comment: It does, confirmed with svn, version 1.8.5
Comment: There is no requirement to use `rsync` in this way.  `svn cp` will also copy any local changes.
Comment: @KevinPanko It won't copy uncommitted changes.
Comment: I am wondering about this. This seems like the easiest option, and AFAI remember, this is what I did when I was working with SVN 3 years ago. But what is the difference between this and the ones working directly with the server urls?
Comment: @KevinPanko Do you know whether it also copies newly created files?
Answer: Top tip for new SVN users; this may help a little with getting the correct URLs quickly.
Run svn info to display useful information about the current checked-out branch.
The URL should (if you run svn in the root folder) give you the URL you need to copy from.
Also to switch to the newly created branch, use the svn switch command:
svn switch http://my.repo.url/myrepo/branches/newBranchName

Comment: You can also use ^ in place of the Repository Root
Answer: Suppose you want to create a branch from a trunk name (as "TEST")
then use:
svn cp -m "CREATE BRANCH TEST" $svn_url/trunk $svn_url/branches/TEST

Answer: Normally you'd copy it to svn+ssh://host.example.com/repos/project/branches/mybranch so that you can keep several branches in the repository, but your syntax is valid.
Here's some advice on how to set up your repository layout.
Answer: If you even plan on merging your branch, I highly suggest you look at this:
Svnmerge.py
I hear Subversion 1.5 builds more of the merge tracking in, I have no experience with that. My project is on 1.4.x and svnmerge.py is a life saver!
Answer:
Create a new folder outside of your current project. You can give it any name. (Example: You have a checkout for a project named "Customization". And it has many projects, like "Project1", "Project2"....And you want to create a branch of "Project1". So first open the "Customization", right click and create a new folder and give it a name, "Project1Branch").
Right click on "Myproject1"....TortoiseSVN -> Branch/Tag.
Choose working copy.
Open browser....Just right of parallel on "To URL".
Select customization.....right click then Add Folder. and go through the folder which you have created. Here it is "Project1Branch". Now clik the OK button to add.
Take checkout of this new banch.
Again go to your project which branch you want to create. Right click TorotoiseSVN -> branch/tag. Then select working copy. And you can give the URL as your branch name. like {your IP address/svn/AAAA/Customization/Project1Branch}. And you can set the name in the URL so it will create the folder with this name only.
Like {Your IP address/svn/AAAA/Customization/Project1Branch/MyProject1Branch}.
Press the OK button. Now you can see the logs in ...your working copy will be stored in your branch.
Now you can take a check out...and let you enjoy your work. :)
Answer: Below are the steps to create a branch from trunk using TortoiseSVN in windows machine. This obviously needs TortoiseSVN client to be installed.

Right Click on updated trunk from local windows machine
Select TortoiseSVN
Click branch/Tag
Select the To path in SVN repository. Note that destination URL is updated according to the path and branch name given
Do not create folder inside branches in repository browser
Add branches path. For example, branches/
Add a meaningful log message for your reference
Click Ok, this creates new folder on local system
Checkout the branch created into new folder

How do I create a branch?


Mathematical underpinnings of the square root of time rule

Question: Often when I am reading about options pricing (and/or options greeks) the square root of time continually comes up. What the mathematical justification for why this keeps on turning up?
Comment: @barrycarter in fact the normality assumption is not required at all. Plus what you say is not true if the normal variables are correlated. See Alex C answer which is spot on IMHO.
Comment: When you add two normal distributions with standard deviations alpha and beta, you get a normal distribution with standard deviation sqrt(alpha^2 + beta^2). The other answers are probably correct, but, in my opinion, unnecessarily verbose.
Answer: For any process with independent increments, by the very fact of statistical independence the variance of $x_{t3}-x_{t1}$ is going to be the sum of the variances of $x_{t2}-x_{t1}$ and $x_{t3}-x_{t2}$ for $t1\leq t2 \leq t3$.  Many processes have independent increments, including ABM, GBM, Poisson, etc. Then if you add a homogeneity assumption (the parameters of the process do not change over time) you get a proportionality of the variance to the length of the time interval and thus a proportionality of the standard deviation to $\sqrt t$.
Answer: The reason is that in many common models including geometric Brownian motion, the variance of the logarithmic returns is proportional to time. Thus, their standard deviation/volatility is proportional to the square root of time.
Consider for example the class of Levy models where $X$ is is the logarithmic stock price process such that $S_t = S_0 e^{X_t}$. The cumulant generating function of $X_t$ takes the form
\begin{equation}
\psi_{X_t}(\omega) = \psi_{X_1}(\omega) t,
\end{equation}
where $\psi_{X_1}(\omega)$ is the characteristic exponent which is independent of $t$. You obtain the $n$-th cumulant as the $n$-th derivative of the cumulant generating function with respect to the transform parameter evaluated at zero, i.e.
\begin{equation}
c_n(X_t) = \frac{1}{\mathrm{i}^n} \frac{\partial^n \psi_{X_t}}{\partial \omega^n}(0).
\end{equation}
You immediately see that the cumulants are proportional to $t$. Since the second cumulant corresponds to the variance, this confirms that the standard deviation of logarithmic returns is proportional to the square root of time.
As mentioned the above setup includes the geometric Brownian motion setting with
\begin{equation}
\psi_{X_t}(\omega) = \left( \mathrm{i} \omega \left( r - \frac{1}{2} \sigma^2 \right) - \frac{1}{2} \sigma^2 \omega^2 \right) t.
\end{equation}
You get
\begin{equation}
c_2 \left( X_t \right) = \sigma^2 t
\end{equation}
as expected.


Real life example fo Floating Point error

Question: Is there any examples of a company that was burned by floating point data that caused a rounding issue?  We're implementing a new system and all the monetary values are stored in floats.  I think if i can show actual examples of why this has failed it'll have more weight than the theory of why the values can't be stored properly.
Answer: These examples are from the embedded world (Ariane 5, Patriot) but are not floating-point rounding errors stricto sensu. The Ariane 5 bug is a bug in a conversion. The Patriot bug was introduced during adaptations of the software. It involves computations in different precisions with an inherently unrepresentable constant (which happens to be the innocuous-looking 0.10).
There are two problems I foresee with binary floats for monetary values:

decimal values as common as 0.10 cannot be represented exactly.
If the precision is too small, what could have been a clean overflow raising an exception becomes a hard-to-track loss of precision.

Note that base-10 floating-point formats have been standardized precisely for monetary values: some currencies are worth 1/1000000 of a dollar, are never exchanged in less than thousands, and the maximum amount you may want to be able to represent is proportionally big, so a scalable representation makes sense. The intent is that the mantissa is large enough for the largest sums with the official resolution.
Comment: @PeteKirkham How ironic that the same person who wrote this answer in 2010 would completely forget about it, and independently get tired of superficial analyses of the Ariane 5, Patriot bugs to the point of writing this rant in 2012: http://blog.frama-c.com/index.php?post/2012/11/18/About-the-rounding-error-in-these-Patriot-missiles . Anyway, I have updated the answer, I hope it is more factual now.
Comment: Nice, though the second shows why floats would be a good thing - if consistant.
Comment: @Michael Yes, sorry, I wanted to expand on that, but I was called away.
Comment: holy crap... I thought I marked this as the answer.  sorry about that.  It's only a year and a half later...
Comment: The first example states "This calculation was performed using a 24 bit fixed point register," so neither of these examples shows a floating point rounding issue.
Answer: I worked on a team that created an FPU (hardware design) that passed testfloat level 3 for single, double, and extended precision.  There are many bad fpus out there, mostly patched in software if they can catch the instruction or exception, that kind of thing.  I think the testfloat guy said the primary fpu errors are in the int to float and float to int conversions, I remember the pentium 4 failed for that reason.  The pentium III I had passed testfloat though.  I have not tried it in a while, dont know what the state of these multicore processors is.  Dont be fooled into thinking that the pentium I was the only one with errors, almost all, certainly the bigger named companies, have fpu errors.  IEEE 754 is a horrible standard, getting an fpu to meet that standard is very difficult and very expensive, after that experience I avoid floating point math as much as possible.  compilers and c libraries (atof, ftoa, strtod, printf, etc) are are part of the problem, not just the hardware.
single precision float has only 23 bits of mantissa, you are going to start throwing away pennies or dollars or thousands of dollars often.  With or without rounding.  The rounding should average out if the data is random enough gain a penny here lose a penny there.  If the items being tracked are always in some fixed size or a limited of number of units.  say widgets at 9.99 or two for 15.99 then the randomness goes away and rounding as well as the mantissa will cost someone in accuracy, either the company or the customers.
Sure there are probably lots of numbers between 0.00 and 0.99 that you cannot represent, if you are dealing with small quantities you will be into the rounding sooner rather than later.
Using floats for money is just a bad idea, perhaps you are looking for ammo to change that?
We had a motor controller that was driven by software that used a single precision fpu, there was one section of the control algorithm that the constants had to add up to 1.0, I didnt know this rule, I simply let a C program compute the constants.  We had to adjust the lsbit of the mantissa on one of the constants by hand to get the motor controller to stabilise.
Answer: I worked on a system that calculated people's pay raises and bonuses. The calculations were relatively complex due to the number of parts (company performance, department performance, personal performance) but each part was simple enough (generally compounded percentages) something like:
personal_bonus = salary * personal_bonus_percentage
department_bonus = personal_bonus * 50%
company_bonus = personal_bonus * 110%
total_bonus = personal_bonus + department_bonus + company_bonus
Where personal_bonus_percentage was a calculated value based on size of the bonus pot, the person's rating and the people with that rating.
When we tested we didn't manually calculate (i.e. on paper) what the results should have been, instead comparing them to Excel running the same formula. Employees did do the calculations on paper and when we rewrote the algorithm to counter the floating point problem about 5% of the awards were wrong.
Answer: I don't think you will find anyone who really got burned.  I have heard of companies where the payroll or interest programs used floating point instead of fixed decimal and the programmer collected the fractional bits from all the accounts to embezzle without the account holders raising the alarm.  But, that sort of thing was usually quietly fixed years ago.  Now there are best-practice rules to prevent that sort of thing.
The other way the error can get big enough to trip you up is if you try to extrapolate from a small sample.  Like taking a poll in a small town and trying to predict the popular results for the whole country.
I was working on a project the other month where we were using matrix math to calculate polynomials for a calibration curve.  The coefficients from our program were coming out radically different from the ones done on a spreadsheet.  When I went through both the program and the spreadsheet and rounded everything to the correct number of significant digits, then they agreed pretty well.  When the junk was being multiplied by junk, and then squared or cubed, then it became a problem.
Answer: The only real FPU error I can think of is an equality comparison on floats.  For instance, 0.123456 and 0.123457 are very close; in fact, they could very well be equal if they are both the result of a series of calculations where rounding errors could accumulate.  Instead of comparing with ==, you should author a fuzzy equals that determines if they are sufficiently close as to be considered equal.
A quick google search turns up this page, which goes into great length about the associated caveats regarding a fuzzy equals function.  http://adtmag.com/articles/2000/03/16/comparing-floats-how-to-determine-if-floating-quantities-are-close-enough-once-a-tolerance-has-been.aspx
Answer: double: 1.000167890
single: 1.000167847
(b*(b-1)) - (b*b-b):  0.0000000281725079
(a*(a-1)) - (a*a-a):  0.0000000000000001
resultSmall - result: 0.000000028172507807931691
double^12 - single^12:0.000000593091349143648472

I remember that errors--or eccentricities--used to exist in supercomputers designed by Seymour Cray.  His multipliers would only check the first twelve bits for zero, while the adder searched 13, leaving behind a tiny percentage of numbers that might be zero to one, but have a valid number for the other.
One of William Kahan's students was doing an air turbulence simulation for helicopter rotors using IBM's 360 when it first came out with its unusual 32 bit fp format.  a - b wasn't computed exactly, even if the two numbers were within a factor of two of each other, causing an escalating problem of lost accuracy with each calculation.  Consequently, the computer was giving wrong results.
Kahan had his student rewrite his code using doubles, which produced correct stall points.


Any good online writing courses?

Question: I'm looking for a good online creative writing course to take. I want it to be less than 100 dollars (free would be wonderful), and that can be done for high school credits. I live in Alberta, Canada so I would like the credits to be applicable for my location. Feedback on assignments would also be wonderful, maybe I could email them to the teacher? If anyone knows of a course like this please tell me as I have been looking all over for a course with this criteria. You will truly make my day as I really want to take a good creative writing course.
Comment: It would be nice if you would tell us about whether or not you've researched this. This seems like something you can just look up on google and read some reviews on.
Comment: Citing your research is part of a good question. You need to explain exactly what your problem is and go into detail
Comment: I have looked at many different websites, I haven't been able to find one with this  this criteria and was wondering if maybe I missed one.
Comment: I really liked these two:
Comment: I really liked this one    https://www.virtualhighschool.com/courses/outlines/ewc4u.asp       but found the price tag was a bit high. There was another one I really liked but I can't find it now, if I do I will post a link
Answer: Have you heard of Massive Open Online Courses (MOOCs)?
Something like this: https://www.coursera.org/learn/craft-of-plot, or the one that appears (I can't post the link as I'm new) if you replace the word 'plot' in that first link with 'setting-and-description'.
That's just a couple  which I stumbled on last week. I think they might be part of a wider series, if you explore the website. They charge a course fee, but there is a free option to 'audit only', which lets you access everything except the assignments. If you're looking to get school credit, maybe you could show the course materials to your English teacher, and agree some suitable assignments he/she is willing to grade for you?
If you'd like something at a good introductory level, I've followed this course, operated by the UK's Open University, and it was worthwhile: https://www.futurelearn.com/courses/start-writing-fiction.
I haven't looked around the internet, and I'm sure you'll find more options if you invest some time in searching. Organisations/websites offering MOOCs include Coursera, FutureLearn, Iversity and edX. There are probably more, too.
Good luck with your writing!

Any good online writing courses?


System can't find disks on boot

Question: I installed ubuntu server 10.04 on a PC with two HD drives 500 GB each. I used raid1 to provide data protection. The /boot partition is installed also on a mirrored device /dev/md0.
After the installation has completed, the system did not boot properly. I got the following error message:
ALERT! /dev/disk/by-uuid/<long characters> does not exist. Dropping to a shell!

Any idea what could cause such a problem?
UPDATE:
I booted into rescue mode using the installation CD. Executing fdisk showed me the partitions, but it said "Partition 1 does not end on cylinder boundary.". Can this be related to the problem at hand?
UPDATE2:
I re-installed ubuntu server without the Raid at all. The system booted as it should be! Also, I got the same error from fdisk after booting. So, this error should not be related to this problem of not being able to boot.
It is puzzling me. Can't I install ubuntu server 10.04 with raid1?!!
Answer: Probably either the initramfs didn't include a raid hook.Assuming it happens after the grub menu.But why don't you use btrfs built-in raid1?
Comment: I think Grub doesnt support btrfs now
Comment: I updated my question!

System can't find disks on boot


Where do we use windowing?

Question: I have been studying about the box window and am unable to understand one thing, do we first sample a signal and then window it resulting in up-scaling or downscaling, or is windowing a practical case of sampling itself which is performed on a continuous time signal?
Comment: Box window=rectangular window?
Comment: yes, the rectangular window...
Answer: Alright, the way to think about the rectangular window (as well as all of the other windows) is that you begin with an infinite sequence of samples and you multiply the samples outside the window with 0 and the samples within the window with something non-zero (and usually, but not always, positive).
So the DFT (of which the FFT is fast method of doing the DFT) does periodically extend the $N$ samples passed to it.  But there are a couple of different ways of looking at it.  One way to look at it is with just the definitions of the DFT and iDFT:
$$ X[k] = \sum\limits_{n=0}^{N-1} x[n] \ e^{-j 2 \pi nk/N}  $$
$$ x[n] = \frac{1}{N}\sum\limits_{k=0}^{N-1} X[k] \ e^{j 2 \pi nk/N}  $$
The $x[n]$ that the DFT $X[k]$ is aware of is simply a periodic sequence with period of $N$. both $$ x[n+N]=x[n] $$ and $$ X[k+N]=X[k] $$ are true.
Now the alternative way to think about the DFT is that it is the sampling of the spectrum of the Discrete-Time Fourier Transform (DTFT):
$$ \hat{X}\left( e^{j \omega} \right) = \sum\limits_{n=-\infty}^{+\infty} \hat{x}[n] \ e^{-j \omega n}  $$
where $ \hat{x}[n] =
\begin{cases}
0, & n < 0 \\
x[n], & \text{for }0 \le n < N \\
0, & N \le n
\end{cases} $
and this is the same as multiplying by a rectangular window.
$$ \hat{x}[n] \ = \ x[n] \ w[n]  $$
where $ w[n] =
\begin{cases}
0, & n < 0 \\
1, & \text{for }0 \le n < N \quad \quad \\
0, & N \le n
\end{cases} $  (length-$N$ rectangular window)
But here you cannot tell that you extracted $\hat{x}[n]$ from a periodic $x[n]$ or if those $N$ samples came from an infinitely long and non-repeating stream of samples.  Whatever it is, $\hat{x}[n]$ is non-repeating, infinite in length (with all those zeros padded), and you can apply the DTFT to it.
It doesn't have to be the rectangular window, it could be any length-$N$, finite-valued window for $w[n]$ and the math that follows is the same.
Now with that definition of $\hat{x}[n]$ and  $\hat{X}\left( e^{j \omega} \right)$, it's not hard to show that
$$ \hat{X}\left( e^{j \omega} \right) \Bigg|_{\omega = 2 \pi \frac{k}{N}} = \hat{X}\left( e^{j 2 \pi k/N} \right) = X[k] $$
Now, what happens in either domain, is that when you uniformly sample the function (say, in this case, the spectrum $\hat{X}\left( e^{j \omega} \right)$)  in one domain, it causes in the other domain, the signal ($\hat{x}[n]$) to be repeatedly shifted (by $N$ samples) and overlap-added:
$$ x[n] = \sum\limits_{m=-\infty}^{+\infty} \hat{x}[n+mN] $$
It is here where the discontinuity between $x[N-1]$ and $x[N]$ (which is the same as $x[0]$) becomes a concern, and tapered windowing to reduce or eliminate this discontinuity is perhaps indicated.
Comment: What are the basic three or four windows that i should familiarize myself with?
Comment: i dunno.  there are so many.  rectangular, Hann, Hamming, Kaiser, Gaussian.  it all depends on what you want to do.  looks like i forgot to make an important point, so i will now edit the answer to make it.
Answer: Windowing is something you do after sampling, but before calculating the FFT.
When you sample a signal, you end up with a finite set of samples. Let's say you sample from $t=T_1$ to $t=T_2$. Usually, the signal around $T_1$ is very different from the signal around $T_2$. For example, the sample at $T_1$ could be large and positive, and the sample at $T_2$ could be large and negative.
However, the FFT assumes that the set of samples corresponds to exactly one period of a periodic signal. The period is $T_2-T_1$. The (possibly large) discontinuity between the sample at $T_1$ and the sample at $T_2$ introduces large frequency content that is not present in the original, continuous-time signal.
Windowing the signal reduces that discontinuity, by reducing the samples' amplitude at both ends. There are many kinds of windows, each with particular advantages and disadvantages.
Comment: @ubuntu_noob, yes, you do. I would only add that there are many different windows, and each has slightly different properties. It'd be a good idea to familiarize yourself with at least the most common ones.
Comment: This is true for windows like hamming, hann, blackman, etc. Why is it true for a rectangular window? why just cutting the signal cause a smaller difference between edges?
Comment: The rectangular window doesn't help at all. In fact, the rectangular window just multiplies every sample by 1.
Comment: From what I understand, the box car window doesn't help at all, infact it's not even windowing, it's just the sampling from T1 to T2 and then leaving the rest of the analog signal as zero. Windowing on the other hand is a DSP mechanism used to reduce the high frequencies which occur at the edges of the window due to sharp contrast between the signals at that point. Do I understand correctly?
Comment: Right, window that attanuate the edges (all the commons as @MBaz mentioned) reduce the high frequencies. Rectangular window just separate your (discrete) signal to some parts.

Where do we use windowing?


Best python library for neural networks

Question: I'm using Neural Networks to solve different Machine learning problems. I'm using Python and pybrain but this library is almost discontinued. Are there other good alternatives in Python?
Comment: And now there's a new contender - [Scikit Neuralnetwork](http://scikit-neuralnetwork.readthedocs.org/en/latest/): Has anyone had experience with this yet? How does it compare with Pylearn2 or Theano?
Comment: I'm voting to close this question as off-topic because is become a poster example of why recommendations and "best" questions don't work in the format. The accepted answer is factually inaccurate after 12 months (PyLearn2 has in that time gone from "active development" to "accepting patches")
Comment: So use multiple GPUs...nobody uses CPUs for serious work in neural networks. If you can get Google-level performance out of a good GPU or two, just what are you going to do with a thousand CPUs?
Comment: See also http://stackoverflow.com/q/2276933/2359271
Comment: @Emre: Scalable is different to high performance. It typically means you can solve larger problems by adding more resources of the same type you have already. Scalability still wins out, when you have 100 machines available, even if your software is 20 times slower on each of them . . . (although I'd rather pay the price for 5 machines and have benefits of both GPU and multi-machine scale).
Comment: Please define your criteria for "best"
Comment: If you want to only use Restricted Boltzmann Machine, you can stick with scikit-learn as well.
Comment: There is also Keras - https://github.com/fchollet/keras - which is relatively recent. The problems with tracking "best" by any measure, and keeping the Q&A valid over time is why this sort of question is usually off topic in other Stack Exchange networks.
Comment: Does any of this packages scale like h2o deep learning?
As far as I know lasagne doesn't.Theano does support GPU so as any library basing on it,but does any of them support mapreduce or spark.
Comment: h2o doesn't even use the GPU yet so it's hardly scalable.
Comment: I can't vouch for it, but [Brainstorm](https://github.com/IDSIA/brainstorm) seems to be the spiritual successor to PyBrain and looks promising.
Comment: Cross-site duplicate: https://scicomp.stackexchange.com/q/5110/3212
Comment: I'd add CNTK , presented in jun 2017 by Microsoft , Python API stable , with performance competiting with tensorflow https://minimaxir.com/2017/06/keras-cntk/
Answer: UPDATE: the landscape has changed quite a bit since I answered this question in July '14, and some new players have entered the space.  In particular, I would recommend checking out:

TensorFlow
Blocks
Lasagne
Keras
Deepy
Nolearn
NeuPy

They each have their strengths and weaknesses, so give them all a go and see which best suits your use case.  Although I would have recommended using PyLearn2 a year ago, the community is no longer active so I would recommend looking elsewhere.  My original response to the answer is included below but is largely irrelevant at this point.

PyLearn2 is generally considered the library of choice for neural networks and deep learning in python.  It's designed for easy scientific experimentation rather than ease of use, so the learning curve is rather steep, but if you take your time and follow the tutorials I think you'll be happy with the functionality it provides.  Everything from standard Multilayer Perceptrons to Restricted Boltzmann Machines to Convolutional Nets to Autoencoders is provided.  There's great GPU support and everything is built on top of Theano, so performance is typically quite good.  The source for PyLearn2 is available on github.
Be aware that PyLearn2 has the opposite problem of PyBrain at the moment -- rather than being abandoned, PyLearn2 is under active development and is subject to frequent changes.
Comment: FYI: [Pylearn2 has no more developer.](https://github.com/lisa-lab/pylearn2/pull/1565)
Comment: Note that nolearn is a wrapper that makes other libraries easier to use and compatible with sklearn. It's not of itself a neural network library, but nonetheless recommended. At the time of writing it's mostly for Lasagne but there's some Caffe code and maybe others.
Comment: Why leave out PyTorch?
Comment: Not sure if it's the same as Marks comment about nolearn, but https://github.com/aigamedev/scikit-neuralnetwork is also some form of a wrapper for a bunch of this stuff.
Comment: Would anyone care to update this list for 2019?  Since it's a CW, that should be perfectly fine.  @MartinThoma ?
Comment: Wow, this is pretty outdated after less than two years
Comment: TF is dying!!!!
Comment: Add Pytorch too..
Comment: Framework recommendations are always something personal / very specific for a use-case. For this reason I don't want to edit this.
Answer: Tensor Flow (docs) by Google is another nice framework which has automatic differentiation. I've written down some quick thoughts about Google Tensor Flow on my blog, together with the MNIST example which they have in their tutorial.
See also: My Tensorflow XOR tutorial
Lasagne (docs) is very nice, as it uses theano (→ you can use the GPU) and makes it simpler to use. The author of lasagne won the Kaggle Galaxy challenge, as far as I know. It is nice with nolearn. Here is an MNIST example network:
<code>#!/usr/bin/env python

import lasagne
from lasagne import layers
from lasagne.updates import nesterov_momentum
from nolearn.lasagne import NeuralNet

import sys
import os
import gzip
import pickle
import numpy

PY2 = sys.version_info[0] == 2

if PY2:
    from urllib import urlretrieve

    def pickle_load(f, encoding):
        return pickle.load(f)
else:
    from urllib.request import urlretrieve

    def pickle_load(f, encoding):
        return pickle.load(f, encoding=encoding)

DATA_URL = 'http://deeplearning.net/data/mnist/mnist.pkl.gz'
DATA_FILENAME = 'mnist.pkl.gz'

def _load_data(url=DATA_URL, filename=DATA_FILENAME):
    """Load data from `url` and store the result in `filename`."""
    if not os.path.exists(filename):
        print("Downloading MNIST dataset")
        urlretrieve(url, filename)

    with gzip.open(filename, 'rb') as f:
        return pickle_load(f, encoding='latin-1')

def load_data():
    """Get data with labels, split into training, validation and test set."""
    data = _load_data()
    X_train, y_train = data[0]
    X_valid, y_valid = data[1]
    X_test, y_test = data[2]
    y_train = numpy.asarray(y_train, dtype=numpy.int32)
    y_valid = numpy.asarray(y_valid, dtype=numpy.int32)
    y_test = numpy.asarray(y_test, dtype=numpy.int32)

    return dict(
        X_train=X_train,
        y_train=y_train,
        X_valid=X_valid,
        y_valid=y_valid,
        X_test=X_test,
        y_test=y_test,
        num_examples_train=X_train.shape[0],
        num_examples_valid=X_valid.shape[0],
        num_examples_test=X_test.shape[0],
        input_dim=X_train.shape[1],
        output_dim=10,
    )

def nn_example(data):
    net1 = NeuralNet(
        layers=[('input', layers.InputLayer),
                ('hidden', layers.DenseLayer),
                ('output', layers.DenseLayer),
                ],
        # layer parameters:
        input_shape=(None, 28*28),
        hidden_num_units=100,  # number of units in 'hidden' layer
        output_nonlinearity=lasagne.nonlinearities.softmax,
        output_num_units=10,  # 10 target values for the digits 0, 1, 2, ..., 9

        # optimization method:
        update=nesterov_momentum,
        update_learning_rate=0.01,
        update_momentum=0.9,

        max_epochs=10,
        verbose=1,
        )

    # Train the network
    net1.fit(data['X_train'], data['y_train'])

    # Try the network on new data
    print("Feature vector (100-110): %s" % data['X_test'][0][100:110])
    print("Label: %s" % str(data['y_test'][0]))
    print("Predicted: %s" % str(net1.predict([data['X_test'][0]])))

def main():
    data = load_data()
    print("Got %i testing datasets." % len(data['X_train']))
    nn_example(data)

if __name__ == '__main__':
    main()
</code>
Caffe is a C++ library, but has Python bindings. You can do most stuff by configuration files (prototxt). It has a lot of options and can also make use of the GPU.
Answer: Pylearn relies on Theano and as mentioned in the other answer to use the library is quite complicated, until you get the hold of it.
In the meantime I would suggest using Theanets. It also built on top of Theano, but is much more easier to work with. It might be true, that it doesn't have all the features of Pylearn, but for the basic work it's sufficient.
Also it's open source, so you can add custom networks on the fly, if you dare. :)
EDIT: Dec 2015. Recently I have started using Keras. It is a bit lower level than Theanets, but much more powerful. For basic tests the Theanets is appropriate. But if you want to do some research in field of ANN Keras is much more flexible. Plus the Keras can use Tensorflow as a backend.
Answer: TensorFlow (by Google, released on 2015-11-09) looks promising.

open source (Apache 2.0 License) (GitHub)
Python (backend in C++)
CPU/GPU
Auto-Differentiation
Portable (even works on mobile devices)

FYI:

Evaluation of Deep Learning Toolkits
Easy benchmarking of all public open-source implementations of convnets.
Soheil Bahrampour, Naveen Ramakrishnan, Lukas Schott, Mohak Shah. Comparative Study of Deep Learning Software Frameworks.  arXiv:1511.06435.
Shaohuai Shi, Qiang Wang, Pengfei Xu, Xiaowen Chu. Benchmarking State-of-the-Art Deep Learning Software Tools. arXiv:1608.07249
Was a new deep learning toolkit released once every 22 days in 2015?
Comment: Aargh!  You beat me to it  :)

Indeed, TensorFlow is super good. Has a better compile time than the big guns out there like Theano, Torch, etc
Comment: @moose In Theano generating the CUDA / C++ code takes around 30 seconds to one minute for a reasonably sized model. It makes debugging quite tedious. To measure CUDA / C++ code generation time, you can time before/after a Theano function is compiled.
Comment: @Dawny33 What do you mean with "compile time"? Theano, Torch and most of the time also TensorFlow are used in an interpreted fashion.
Comment: @moose In Theano at least, some code is compiled in C++ or CUDA.
Comment: @FranckDernoncourt Ok, but does that time really matter? When you have the training running for about 20 minutes, isn't only a couple of seconds the time it needs to generate the CUDA code? (How can I measure that?)
Answer: Pylearn2 seems to be the library of choice, however I find their YAML configuration files off-putting.
Python itself was designed to be an easy language for prototyping, why would you not use it to define the network properties themselves? We have great editors with autocompletion that would make your life much easier and Python is not like C++ where you have to wait for long builds to finish before you can run your code.
YAML files on the other hand you have to edit using a standard text editor with no assistance whatsoever and this makes the learning curve even steeper.
I may be missing the big picture but I still don't understand what were they thinking, I don't think prototyping in code would be much slower. For that reason I'm considering Theanets or using Theano directly.
Comment: I'm was also a bit thrown by the YAML files at first, but have since come to love the clean separation between configuration and code.  You can choose to use Pylearn2 without YAML files, although this option is not well documented.
Comment: In short, however, I wouldn't discard the library because of this simple design decision.
Comment: As madison may, mentioned its all about separating configuration and code. It would be fine if you were running one network and knew all the parameters, but you don't. by splitting config and code, you can run multiple networks - different hidden neurons etc, etc. and source control is straight forward ( how do you keep track of which configuration you have tried if you keep it in the code).
Answer: I like Blocks, which is also built on top of Theano. Way more approachable than PyLearn2, and more feature rich than Lasagne. Neatly written, too.
Updated Jan 2016:
At the time of writing, Keras has by far the most momentum. It is highly modular and can run on both Theano and Tensorflow, giving it great opportunities.
Comment: Yeah, I would currently recommend blocks today over pylearn2 if you're ok putting in a bit of time to understand Theano.
Comment: Great library built by great people.
Answer: MXNet:

written in C++ but has an API in Python (and a few other programming languages such as R, Julia, and Go)
Scales up to multi GPUs and distributed setting with auto parallelism.
Automatic differentiation
Decent performances:
Answer: From what I heard, Pylearn2 might be currently the library of choice for most people. This reminds me of a recent blog post a few month ago that lists all the different machine learning libraries with a short explanation
https://www.cbinsights.com/blog/python-tools-machine-learning
The section you might be interested in here would be "Deep Learning". About Pylearn2, he writes

PyLearn2
There is another library built on top of Theano, called PyLearn2 which
  brings modularity and configurability to Theano where you could create
  your neural network through different configuration files so that it
  would be easier to experiment different parameters. Arguably, it
  provides more modularity by separating the parameters and properties
  of neural network to the configuration file.
Answer: I wrote up this post detailing some of my personal favorites:
The Best Machine Learning Libraries in Python
Since over 30 different libraries are mentioned, I won't post them all here, but these are among the most popular:

Tensorflow
scikit-learn
Theano
Pylearn2
Pyevolve
NuPIC
Pattern
Caffe

(Sorry, can't link to the Github repos since my rep is still < 10...)
Edit: Added links to Github repos.
Comment: Can you comment the link under my comment here?  I shall edit and add it to your answer
Comment: Now that my answer was upvoted, I now have the required rep and was able to add the links. Thanks though!
Comment: Are you sure scikit-learn is a DN package?
Answer: neon:

Python based
Open source (Apache 2.0 License)
Developed by Nervana Systems (if you don't know them: Deep learning startup Nervana raises $20.5M;  Nervana Systems raises 3.3M USD to build hardware designed for deep learning )
Supports CPU and GPU
Basic automatic differentiation support
Framework for visualization
Answer: Just to add some more resources. Recently there was a paper studying the differences between several packages of neural networks and deep neural networks.
Here you can find the information. It looks that Torch and TensorFlow are the winners.
Note: not all of them are in python. However, I posted it to open the discussion.
Answer: PyTorch
It is gaining a lot of support due to its ease of use and similarity with basic Python.
It runs "line-by-line" (via dynamic graphs), just like normal Python and can be easily debugged - even using standard print statements. It also integrates very well with NumPy and other well-known Python linbraries, like Scikit Learn.
Because it makes modelling easy, it is great for prototyping and exploring new ideas in general.
It supports multiple GPUs and does so in a really easy way.
Check out more features here.

Although many of the benefits above make PyTorch much nicer to use than other commonly used libraries, it is worth mentioning that the upcoming major release of Tensorflow will, by default, also use dynamic graph creation (a.k.a. eager mode). This will make it comparable to PyTorch in usage.
Answer: Microsoft Cognition Toolkit (previously known as CNTK) has a  Python API. Amongst other things, it is supposed to be good for multi-GPU:

Examples and tutorials can be found on https://github.com/Microsoft/CNTK/tree/master/bindings/python
Answer: DyNet: The Dynamic Neural Network Toolkit. From {1}:

We describe DyNet, a toolkit for implementing neural network models based on dynamic declaration of network structure. In the static declaration strategy that is used in toolkits like Theano, CNTK, and TensorFlow, the user first defines a computation graph (a symbolic representation of the computation), and then examples are fed into an engine that executes this computation and computes its derivatives. In DyNet's dynamic declaration strategy, computation graph construction is mostly transparent, being implicitly constructed by executing procedural code that computes the network outputs, and the user is free to use different network structures for each input. Dynamic declaration thus facilitates the implementation of more complicated network architectures, and DyNet is specifically designed to allow users to implement their models in a way that is idiomatic in their preferred programming language (C++ or Python). One challenge with dynamic declaration is that because the symbolic computation graph is defined anew for every training example, its construction must have low overhead. To achieve this, DyNet has an optimized C++ backend and lightweight graph representation. Experiments show that DyNet's speeds are faster than or comparable with static declaration toolkits, and significantly faster than Chainer, another dynamic declaration toolkit. DyNet is released open-source under the Apache 2.0 license and available at this http URL

It was previously known as cnn (whose python binding was named pycnn).

References:

{1} Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Matthews, Waleed Ammar, Antonios Anastasopoulos, Miguel Ballesteros, David Chiang, Daniel Clothiaux, Trevor Cohn, Kevin Duh, Manaal Faruqui, Cynthia Gan, Dan Garrette, Yangfeng Ji, Lingpeng Kong, Adhiguna Kuncoro, Gaurav Kumar, Chaitanya Malaviya, Paul Michel, Yusuke Oda, Matthew Richardson, Naomi Saphra, Swabha Swayamdipta, Pengcheng Yin. DyNet: The Dynamic Neural Network Toolkit. https://arxiv.org/abs/1701.03980
Answer: I recommend you to use tensorflow which is under strong development and supports deep learning. You can use the high-level neural networks API Keras that runs on top of tensorflow and is very simply to use, just try a tutorial and you are going to love it.
Answer: If you are interested in performance comparisons, Soumith Chintala maintains a set of convnet benchmarks that cover several of the already mentioned python frameworks (TensorFlow, chainer, neon, Theano):

https://github.com/soumith/convnet-benchmarks
Comment: that's a great tool!
Answer: NeuPy is a Python library for Artificial Neural Networks. NeuPy supports many different types of Neural Networks from a simple perceptron to deep learning models.

Best python library for neural networks


solution to store 10TB /Month

Question: I'm working at a small TV company. They generates 11TB of video files per month.
What can I do?. I just need ordinary SATA disks, in RAID. What solution should I buy?
(They are using a lot of Iomega NAS)
Comment: Could you clarify...do you mean they're storing the files, you're looking to expand storage, you're looking to back it up, long term archive...? Are you having trouble with storage space alone, access time,...? What are your needs you're looking to have addressed?
Comment: Don't forget that you'll probably need some type of backup storage, too. That is, unless you don't mind losing all your data when the building burns down. Do you really need all the files to be online at once, or can you go get them from tape when you need them?
Comment: It's been four months... what solution did you settle on?
Comment: I ask because normally the site doesn't give individual purchasing advice for a specific product, but rather will help with general ideas of how to store or save things.
Comment: Hi. Long Term Storage. I need a new solution, such as dell, expandable ad infinitum.
Comment: I'd like to have such a challenge. ;-)
Answer: Hmmm
"Expanded ad-infinitum" scares me. Do you really need every second of film online there and then? Can you consider tiered storage? Fast storage for recent/highly used stuff; slower higher capacity storage to stuff you need handy, but not snaps fingers right there; and lastly tape or something similar to archive old data?
As for actual options, what do your budgets look like? I'm going to suggest stuff from the Dell range because that's what I'm most familiar with, but all the top tier server vendors will have their own products at the same points but I'm not as familiar with those and you need advice, not a long list of drive models.
I like Dell's Equallogic range of SAN devices if you want to publish this data through more than one servers, and they come in a number of options that can offer you a fast storage tier and a slower higher capacity tier and of course you can buy a tape library of any size you like from Dell too for the archival tier.
If you only want to publish this stuff through one server then consider the direct attached storage option - banks of disks that can plug into a server. Again from the Dell range I know about you'd be talking about the PowerVault range
As I said earlier, I'm not suggesting you have to buy Dell, I don't work for them and I'm not shilling for them - it's just that we use a lot of their stuff and I know it quite well. You can look at HP, Sun/Oracle, IBM and they'll all have similar ranges of products at the same levels, and there are plenty of companies out there who specialise in storage too. But letting file usage grow without managing it like this is a recipe for disaster imho.
I know you're probably being told that they need everything all instantly available, and that you need to do this cheaply, I understand the pressures. But trying to manage data like that without a management strategy is asking for the moon on a stick and it just won't work.
Comment: +1 - you can build either a massive "slow" array by using SATA disks with the Equallogic PS-series (or any other brand's equivalent) or a relitavely large, "stupidly-fast" array using 15k and SSD disks (I say "slow" because in context it is, but 16 disks will actually be fairly fast nomatter which way you mix them)
Comment: Mark - that's how we've done it, "fast tier" for VMWare farm and "mid-tier" for file servers. Seems to work quite well.
Comment: +1 - Imposing a storage hierarchy works well if the content is accessed in such a manner that it can be mapped onto that hierarchy. If the business can handle recall speed on little-used content being "slow" then it should work great.
Answer: I work for a broadcast company and we will generate LOTS of video/audio data per month. Our solution was 2 Hitachi SAN, one faster (FC) and one slower (SATA) with lots of cache (256GB cache). We expect for it to exhaust in 3 years.
Yeah, HD video is a bitch.
We have a management system in the works that will deal with all content life-cicle and moving it from faster storage (online) to slower storage (near line) and finally to be archived on tape (there's a lot of metadata involved to quickly and easily find the content on the archive later). We have a (expansible) 1000 LTO 4 tape library for archiving.
That's a thing that you should keep in mind. You really just need fast access/space to a determinate time of your programming. Say, the last month. That will be raw footage coming from news teams, recorded studio programmes, live show recordings, plus external productions (syndicated stuff, ads, etc). That is the content that will be going to the playouts and editing and for that must be fast to access (SAN connected to MACs where the editing is done, for example).
After the stuff is aired, you can (and you should) move it to a collection/archive (don't know the correct term in english), probably on tape. If a determinate piece of news, shows or programming is needed later, re-inject it to the faster storage for use and remove it after all is done.
Hope my personal experience helps.
Answer: If youre looking for a commercial solution, Isilon is one of the cheaper solutions out there and should suit your needs easily. Their product is a clustering solution. You build a storage cluster out of 3+ nodes. Each node has a bunch of disks in it, and the fault tolerance is customizable to where you can lose a node and/or multiple disks and still be operational. You simply expand by adding a new node or an external disk-pack to the existing nodes. Very simple and easy to work with.
After that I'd look at NetApp as a runner up. Theyre a little bit more expensive, but their products offer more features and performance than Isilon does.
Comment: I want to expand on this. Not only can you lose a node or disk (depending on setup, even multiple nodes), the cluster rebuilds the data on its own so that you don't need to rush a new node or disk in, unlike traditional raid storage, where you require the replacement to rebuild.
Answer: I assume that this is video data, which means compression and de-duplication won't gain you anything. I also assume that you've decided the big, bulletproof commercial SAN/NAS vendors are too pricey. If everything needs to be online and on the fast LAN (and not on a cloud service, which I assume you've looked at):
Your most cost-effective option will be something like these 45-bay SuperMicro disk chassis stuffed with 3 TB drives. That's 135 TB raw in 4U and < 1500 watts. You can keep buying similar as needed, adding them to existing file server front-ends as required. RAID 6 via good LSI hardware controllers instead of software if you can afford it - read up on the "raid 5 write hole" and be scared of software parity raid.
As storage density improves, you can migrate data from older storage boxes to newer ones, keeping your server footprint fairly constant in the long term. Use tape or removable SATA disks for offsite storage as that is the only cost-effective way to back up this much data.
You'll be buying a 135 TB unit (with drives) about every six months accounting for RAID and filesystem overhead. You'll also need an additional front-end file server every once in a while too. And powering and cooling them all 24/7, and replacing failed drives, and rolling your own management software. Maybe you can use OpenStack to make your own internal cloud storage on these boxes, or live dangerously and risk it all on some of the open source clustered file systems. You'll likely need two or more full-time bodies managing all this stuff.
The cloud is looking better and better, isn't it? If the data must be local and online, I would seriously look at data reduction... after a month or so, re-encode all of your streams (presumably MPEG-2 broadcast) into VBR H.264 video at a much lower bitrate. X264 with '--crf 23' is close to transparent, and half or less the bitrate of most broadcast MPEG2 streams. When presented with the costs, I suspect management will simply live with data older than X days being offline on removable SATA disks or tape.
Comment: FYI, I priced it out, and that SuperMicro box will be US$14000 packed with 3 TB drives. Assuming you use 9-drive RAID-6 arrays, that works out to US$0.13 per usable (decimal) GB. Powering and cooling the box assuming a normal PUE will cost about $2600/year. It looks cheap compared to the cloud, but recognize that staff time for management costs you about $0.50 per minute. Meaning the hardware is the cheapest possible thing, and you should focus on a solution that reduces the amount of people time you need to spend.
Answer: If you've got the time to set something up yourself, the guys at Backblaze have a good writeup on how they build their storage pods: http://blog.backblaze.com/2009/09/01/petabytes-on-a-budget-how-to-build-cheap-cloud-storage/
Comment: These are great if you've got the expertise to roll-your-own, but builder beware: IO throughput will be *rubbish* because of all the channel sharing.
Answer: Check GlusterFS: many-petabyte expandability, low cost per gigabyte, management console, appliance-like storage bricks, configurable replication level, as fast as your network allows, open source, etc.  The whole enchilada.

solution to store 10TB /Month


How do I get a black background with flash?

Question: I have a Canon EOS Rebel T5. How can I achieve this using flash? Anytime I take pictures with flash, the background also gets brighter. I really want to put emphasis on the subject and have a dark/black background.
Comment: When you say, _How can I achieve this with using flash?_, what do you mean by **this**? Are you referring to the image in your question? Also, would you mind editing the title of your question to be more specific that just "flash photography"? That is an awfully generic title. We have lots of questions here about different aspects and uses of flash photography. As written, the title of your question provides absolutely no indication of the actual question you are asking. Thanks! =)
Comment: Related (black background during the day) https://photo.stackexchange.com/questions/65708/how-can-i-shoot-a-low-key-portrait-outside-during-the-daytime/95585#95585
Answer: This is simple: more distance. Light falls off with the square of the distance from the flash, so it doesn't need to be a huge, but the basic idea is to get the background far enough away that the flash doesn't light it effectively.
If you are distance-constrained, you can use an external flash to the side and "flag" it — that is, block some of the light with a piece of cloth or cardboard or similar — so less is directed towards the background. That'll buy you a little more space, but since light bounces around, you still need some room.
You'll also need to make sure your flash is the primary source of light — you'll want to use the camera's flash sync speed and probably use a narrower aperture and more powerful flash, so that the room lighting is irrelevant.
Answer: Lighting for shots such as this one is not about absolute lighting levels, it is about lighting ratios. The 'dark' parts of the picture don't need to be in absolute darkness. They just need to be less bright than the bright parts of the scene by enough to make them dark by controlling exposure.
As long as the part of the scene you want illuminated is lit brightly enough compared to the part you don't want to be bright and exposure is set appropriately you'll get the effect you are looking for.
This image was taken in fairly pedestrian indoor lighting levels. There was a black curtain about 15 feet behind the subject. A fairly hot flash was illuminating the subject at about a 45° angle to lower camera left.

ISO 100, f/4, 1/80 second. No overall brightness adjustments in post. Contrast was increased +2, but the shadows were also brightened +2 and the highlights pulled back -3
Here is the wider scene at the same exposure setting for a test shot before the curtain was adjusted to cover the background behind the subject. The ambient light is underexposed by about 4 stops.

Here's an uncropped version of the first image above with the exposure pushed three stops in the raw conversion. At that point the house lights had been cut, but the overhead stage lights were the same as in the test shot. You can see the flash at lower left is spilling onto the curtain a bit, but the difference between the brightness of the curtain and the face is enough to leave the curtain very dark at the selected exposure settings as seen in the crop above.

When you want the background to be dark the key is to get enough distance between your subject and the background so that light illuminating the parts of the scene you want to be bright does not spill onto the background you want to be darker. The same is true of walls off to camera left and right: they need to be far enough away and non-reflective enough that light won't bounce off of them and back into the scene.
With a dark background you can flag your off camera flash to reduce light spilling onto the background if you need to.
For how this works out with a dark background, please see: If I want to shoot darker shots, is it better to increase the lighting and then darken in post to retain clarity? Note that the dark areas in the photo can be much brighter than they look in the image, exposure just has to be set to 'kill the ambient' and the parts you want to be bright have to be lit brightly enough to still be bright at that reduced exposure value.
For another question that deals with a lighter background, please see: How to get this particular black and white look?
Comment: Nice examples! It really helps. Also, nice vibes! Hope the concert was good!
Comment: @user1118321 Thanks, but there was no concert that night. I was killing time between a pep rally that had been at the other end of the school in the gym just before school let out and a football game that evening. I had actually been using the patterns of the seats in the auditorium to test a lens for tilt when I decided to shoot a self portrait using the mirror on the back wall of the stage. While I was doing that a couple of choral students came in and were using the piano (the same Steinway that was there when I was a student at this same school!) to practice a piece.
Answer: It's all about the ambient/flash ratio.
In order to get your background to go black, it has to be underexposed in comparison with the flash-lit portions of the scene, to the point of going to black, and is known as "killing the ambient."  In other words, without the flash, you should get a black frame.
This isn't always possible.  Particularly in bright daylight. And if you can't do HSS (high-speed sync).
The shot you show as an example looks like it was taken at night. At night, it's very easy to get a black frame without any flash. Then adding flash means only the subject/bits of the scene that are lit by the flash will show in the exposure.
In addition, you may also need to control the spread/spill of the light coming from the flash.  If the flash also manages to illuminate your background (say, a wall three feet behind your subject), it's going to show up, too.  Grids, snoots, and barn doors can help to control the spill of the light.  But distance separation between your subject and background can also do this.  But it may be more distance than you think.
See this youtube excerpt from David Hobby's Strobist DVDs. It may give you a sense of the geometry/distance involved in not cross-contaminating lights.


How to determine what code created a string, in a live debugger session?

Question: I'm using IDA 7 to debug a running application that must be a child of another application, which means I can't start it from IDA (using Debugger->Run). Instead, I have to run the application normally, and then attach IDA's debugger to the application after the application is already running. But, by the time I get the debugger attached, there are some important strings that the application has already created in the memory. These strings are not something I can find by any kind of simple hex search in the static exe binary, they only seem to appear in the memory after the application is running, so I assume they are being decompressed from somewhere. So I'm trying to determine what code is responsible for creating these strings, so that I can track down where these strings come from. Each time I run the application, the strings are found at different memory addresses. Since I can't debug the program prior to the creation of these strings, I can't step forward to see these strings as they are being created, I can only see them after it's too late. Is there a way to work backwards from a string that's already been created at a variable spot in the memory, and from there, work backwards to determine what code created it?
Answer: I don't know IDA debugger very well, but I can tell how it can be done in GDB.
First of all, I would suggest disabling ASLR (echo 0 | sudo tee /proc/sys/kernel/randomize_va_space) to prevent address space randomization. If the string you are looking for is at the same location each time, then simply setting watchpoint at that location will do the job.
If that is not the case, the only easy way I see, to achieve your goal will be to debug your application from its start. In GDB, you can do this using set detach-on-fork off option before executing the program, which does the following:

Both processes will be held under the control of GDB. One process (child or parent, depending on the value of follow-fork-mode) is debugged as usual, while the other is held suspended.

So, if follow-fork-mode is set to parent, GDB will only execute parent process while child will be frozen until you run it in another GDB instance for example (you can also use IDA debugger to attatch to the newly created process).
I'm posting the links you may find useful while using GDB as I decribed above:

searching for strings in GDB
debugging forks
similar question on stackoverflow


How to use a compressor to create a more singing sustain with the guitar?

Question: I have tried to utilize a compressor to extend sustain of notes while playing lead guitar.  I have used it in conjunction with various distortion and boost pedals and delays.  I am trying to achieve a sound similar to my late 60's Marshall plexi played at max volume but at a more tolerable volume level.  With the plexi you get a singing sustain almost like the human voice or possible a violin with a sag that I can't seem to duplicate a lower volumes on any other amp.  Is a compressor set to the proper settings the answer?  I play Gibson Les Pauls with paf pickups.  I still use the plexi's however at home I play THD univalve through a single 25w Celestian Greenback.  The THD is uniformly biased to take any tube.  I use a singel el34 and 12ay7's in the preamp and phase inverter.  It is 15w
Comment: what amp are you using? remember that sag comes from the fact it has a tube rectifier.
Comment: don't the tube rectifiers cause sag due to a power/efficiency drop at peak volume? In other words, isn't sag based on the inability of the power supply to keep up esp. with high attack? This is kind of a description of compression.
Comment: I play with an **amp simulator** often and I have an envelope follower set to control a "split mixer." On the left I might put mild gain with compression, and on the right something a lot hotter. The split mixer is set to the left. The envelope follower is on the clean signal and the harder I play, the more the "split mix" leans right. On the left, the compressor can be more aggressive so as the signal falls mix goes left, fading notes get a volume swell/sustain. For a pedal, this might be called a "blend pedal."  Differs from crossover: controlled by volume rather than frequency.
Comment: So look for a blend pedal w/envelope follower capabilities, preferably just a split that allows you to insert your own effects chain. I use this for gain, but I also use it for things like univibe etc where I want the chain to quiet down a little for soft playing and then rage when I go for hard rhythm.
Answer: I can get huge amounts of sustain using just a Keeley Compressor and what is basically an 808 Tube Screamer by another name (it's a Maxon with the same chip). It definitely doesn't sound or feel like a cranked Plexi. As the other answer points out, nothing will re-create that. But you can get a different long-lasting violin-like sustain tone, even at lower volumes.
Regardless of chasing any particular tone, I can't imagine my board without a great-sounding compressor on it. I do feel like a compressor shines more with single coil pickups than double - or you can drop the volume control on the Les Paul a little bit to hit a compressor less hard. Sounds counter-intuitive but the pedals I have overcompress a bit with higher output pickups at full volume.
Big picture: I started trying to get great low-volume tone back in 1999. The best I have been able to do is use a low power tube amp and go for a different great tone from the high-volume tone(s) I use at gigs. That means I have to have high volume practices (ideally with the band) in order to fully prepare for gigs. That's true not just for the tone, but also for the fitting into the band sound properly and having the right levels for each part of each song. When I'm gigging hard, I have two pedalboards - one for home and one for high-volume, because even the same pedal settings sound terrible at home when they work loud, or vice-versa.
Answer: In all honesty, you won't get a tone all too similar at a reasonable to what you get from your Plexi at maxed volumed. A lot of that sustain and compression/sag comes from the power amp tubes being pushed hard, the speakers moving a lot (as well as having been broken in) and also having a tube in the rectifier position.
You can get a reasonable tone using a compressor but you'll really have to work on this and really tweak the settings down to a fine tuning. You'll also probably end up spending a lot of money on compressor pedals too, especially tube ones.
If you have a look at some TC Electronic compressors, find one that's got the Tone Print options and have a look into that, it should give you a little more control over your sound.
Comment: There are also some great boutique analog compressor pedals that shouldn't be left off the short list, IMHO.
Comment: @ToddWilcox definitely agree, the TC Electronic was just the first one that sprang to mind when thinking about really digging in to the tone options!


Write a grammar for a language $L=\{ba^{2^n}b |n\ge 1\}$

Question: Write a grammar for a language $$L=\{ba^{2^n}b | n\ge 1\}.$$ It's not even context-free as I think. I just can't produce it, although I've tried a lot.
Now my best attempt is:
\begin{aligned}
S &\to RLM \\
M &\to AM | A \\
LA &\to aa \\
aA &\to Aaa \\
RA &\to \varepsilon
\end{aligned}
But I've found example with deadlock $S→RLM→RLAAA→RaaAA→RaAaaA→RAaaaaA→aaaaA$
Comment: Context-sensitive grammar?  Unrestricted grammar?  What's the context and motivation for this problem?  Why is it interesting?  Where did you encounter it?  Unrestricted grammars can generate any r.e. language, so if you know how to make a Turing machine to recognize the language, then you can mechanically apply the proof of that fact to construct an unrestricted grammar for it.  This is possible and straightforward but doesn't seem very enlightening or interesting or fun; rather it seems tedious and pointless.
Comment: Cross-posted: https://cs.stackexchange.com/q/91614/755, https://math.stackexchange.com/q/2771255/14578.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068). Each community should have an honest shot at answering without anybody's time being wasted.
Comment: I'm voting to close this question because it was cross-posted on Math.SE.
Comment: What kind of grammar are you looking for?
Comment: Any. There can be even rules like S-->SS
Comment: Unrestricted grammar. I meant it could be any type from 0 up to 3
Comment: You should start like this: https://cs.stackexchange.com/questions/14521/use-pumping-lemma-to-show-l-is-not-context-free I do not think it is deadlock (never heard it in this context, but I may be wrong). I do not see 'b' generated in any way. Could you give textual description to your attempt? By the way the similar question was already answered here (but it is far better to do it on your own, or with help for that matter, that is why I asked about textual description).
Answer: When designing a grammar you must have some idea what the productions are meant to do. You seem to have some good productions, but glued tegether in a unexplained way. What is $M$ doing in your grammar? It might generate any number of $a$'s if I am not mistaken.
The basic idea when generating stings of the form $a^{2^n}$ is indeed to have a symbol that moves over the string that duplicates every $a$. So
$aA \to Aaa$
is good as a basis for the grammar. Now add a starting production, that gives end-markers, which can be made to disappear and turn into $b$'s.
$S \to LaaR$
Now you finish. Make the $A$ appear so that it can move over the string to double the number of $a$'s, to get $La^4R$ etcetera.
Don't worry about "deadlock". That is sometimes hard to avoid if the grammar is not completely "synchronized". For instance if one side of the string wants to finish the derivation process, and the other side doesn't. Those derivations are discarded. What matters is that the strings that do have proper derivations are exactly those in $L$.
Comment: @Evil Yes, I think it is just that. The terminology seems totally nonstandard, that's why I added quotes.
Comment: Could you please comment about "deadlock" terminology? I thought it is non-terminating derivation, which is, as you said, discarded.