Is Eli blind, or can he just read braille?

Question: In the Movie "The Book of Eli" we discover at the end that the Bible Eli has been carrying the entire movie is written in Braille.
Does this imply that he is blind (and has been living completely "by faith" his entire life)  or is the punchline of the movie that he is the simply the last living man on Earth who can read Braille?
Comment: The spoiler tags in the question are a little pointless, given the title.
Comment: He is blind. It's not totally obvious for most of the film.
Comment: @SSumner Not the last *human*, but perhaps the last man.
Comment: I'm glad you asked this.  I just watched this movie the other night and, truthfully, if I hadn't gone to look up the synopsis of the movie online I don't know that I would have figured out that Eli was blind.  I think I would have just assumed that since he was literate he was also able to read Braille (for some reason...).
Comment: He just really, really liked his sunglasses.
Comment: "Once inside, Eli, who is revealed to be blind, begins to dictate the Bible from memory to Lombardi" - Wikipedia
Comment: @MichaelRichardson [Your suspicion is totally correct](http://holynessbiblesfortheblind.org/bibles/braille-bibles/) ([And another version, just as large](http://www.braillebibles.org/Braille.html))
Comment: At the end, the woman who has become blind can apparently read braille, so he is not the last
Comment: @MegCoates - You are self evidently literate. Can you read Braille? One does not necessarily entail the other.
Comment: Honestly I thought the punchline was that he ***couldn't*** read braille,  but through God he could still read the last bible, as the latest prophet of God.
Comment: I.e. that he was blind never even occurred to me. He read the bible as if he was sighted, even though it was braille. Remember one of the things attributed to prophets is the gift of speaking in tongues.
Comment: @JohnRiselvato: Funny. That's exactly the quote that, after watching the movie, made me wonder whether WP was wrong there. I didn't notice the subtle cues mentioned in some of the answers here while watching, and thus was convinced he was not blind, given that the movie itself provides the best reasons why he'd carry a braille bible as a sighted man (with bibles being systematically destroyed, he probably was in no position to choose a particular edition, and furthermore, the bible turns out to be effectively protected against reading even though it falls in the wrong hands).
Comment: How large would a single compilation of a Bible in braille be?  I don't think his Book is large enough.
Comment: @Izkata  Holy cripes!!   I was thinking just thicker and/or taller/wider.   A single compilation of that would put even the largest of the medieval bibles to shame.
Answer: He is blind, although it is not always obvious. This was particularly the case for me since I saw this movie on a plane, which had been edited (the movie, not the plane).
Some of the subtle clues to demonstrate he is blind:

When he flicks the lighter open and flicks it, he moves his hand over the flame to prove to him it works because he's blind.
He kept clicking the iPod even though it said battery low. If he could see, he'd realize the battery was low. Only after clicking like crazy did he realize it was low.
He kicked the bottom stair before walking up the steps to the old folks house.
He didn't see the no trespassing sign because he was blind.
At the beginning of the movie, he shoots a hairless cat only when he hears it move.
It is only after Eli is fired upon from the guy on the roof that Eli takes cover and fires back. And each time someone fires on him, Eli turns in that direction and returns fire. Eli accidentally shoots Carnegie in trying to shoot the guy running in Carnegie's direction.
When Solara first comes to seduce Eli she is obviously dressed for solicitation and she says "don't worry you don't have to pay." Eli replies "pay for what," since he can't see all the visual clues that Solara is giving him.
Just before he cooks the cat, Eli searches the house he's in. While he does so, he touches the contents of a shelf in order to glean what its contents are.
Comment: What does an edited plane look like?
Comment: @Xantec The wings are shorter.
Comment: When you watch the movie for the second time, knowing that he is blind, a lot of these things you mentioned, plus a lot of other small things, become glaringly obvious (IMO).
Comment: Plus, more leg room.
Comment: There is a scene where he looks directly at the sun before putting his sunglasses on. That was when I realised what was going on.
Comment: Actually, few blind people who can only read Braille are completely blind. Most have some very limited vision, e.g. detecting light, or some very blurry shapes. Which is not enough to read, or to even recognize people, but is a little more than nothing.
Comment: @Xantec: an edited plane isn't that much different from a regular plane; it's the abridged planes you should watch out for.
Comment: @kojiro: Really? Read the question title. "Is Eli blind, or can he just read braille?". That's a big fat spoiler right there.
Comment: @JackBNimble oh, I see. I apologize and have deleted my comment.
Comment: @Zano Only if you think the answer to the title question is obvious. If it's not obvious by reading the question, then it's not a spoiler.
Comment: @kojiro: No need to apologize (nor remove the comment). It's only a discussion. We're all friends here :-)
Comment: "When Solara first comes to seduce Eli ..." - I perceived that as a clear statement that he was totally aware of the situation but had no intention of participating in the game set up for him.
Comment: I would like to consolidate some of the partial answers in this one, and so add some counterpoints which apparently show that he was not totally blind.  Would that be acceptable to you?
Comment: @can-ned_food Go ahead I suppose, if I disagree with what becomes of my answer I can modify it or revert it.
Answer: In the Bible, Eli grew gradually more blind, from partial sight up to the stage of 'his eyes were set so he could not see'. I'm not sure that would happen over the brief duration of the film, but maybe he wasn't fully blind in the film, but had learnt brail in 'the world before' so as to better be able to read.
I agree all the things above could prove he had bad eyesight or possibly even be blind, but there are parts in the film that make me think he could see at least slightly, like when the motorcycle gang attacked the two travellers, granted he could hear them, but he looked around the rubble to better see, and then pinpointed the gangleader in the bar in town.
Comment: @GeneralDecline it's the whole 'if i cant see them they cant see me' routine again
Comment: He hid pretty good for a blind fella.
Answer: From a technical point of view. it's possible to have enough sight to shoot at moving targets as shadows on a bright background but still not be able to read at all. Using sound to identify targets versus friendlies helps. Eli knows when there are people there, but waits for them to declare their intentions. Once that is established, he simply aims at the body mass. Targets at a gun range don't need faces or hair styles to get shot in the chest.
If you just knew the order of the books in the bible, you could learn braille by just learning the letters of the names of the books. I bet you could get most of the braille alphabet from just the names of the books, which are on every page of each book if you already know the names and order of books. Thirty years is a long time. Helen Keller was reading braille at a younger age than that and she was born blind.
Answer: He is not totally blind, for the reason that when they go back in the old cannibal couple's house and ask for weapons Eli looks at the window to check the surroundings. This takes place around minute 77.
Answer: When he was leaving the house at the beginning, after eating the cat and feeding the mouse, we see his eyes. Then at the end his eyes are obviously white and blind.
Comment: It could also be that his mind was focused in recollection and that his eyes were glazed over with tears, not cataracts.  Easier when your vision is not optimal, yes, but not necessarily implying that be the condition.  Anyways, this talks more about the appearance of his eyes, not whether he could use them to see.
Answer: He was partially blind, not blind. Due to the 'flash'. There are hints that he had trouble seeing, the use of the glasses throughout shows the light hurt his eyes. But if you watch again with the sole purpose to see if he is completely blind, the movie fails to show this.
Comment: "Blind" normally doesn't mean "completely blind."
Answer: Eli is blind throughout the whole movie. How he became blind is up for debate. He is not the last living blind person; Solara's mother tells him that she was born blind. He asks her whether it happened after or during the war, which may give the reason for his blindness. He walks for thirty years because that's how long it takes for him to remember the entire Bible and to understand its message, which he tells Solara toward the end.
If you notice, throughout the movie, he uses his senses a lot except for the sense of sight. Everyone wears glasses because of the glare, not just him. He tells Solara that the message is to treat others better than yourself. This message rings loud and true at the end when the villain tries to get Solara's mother to read the book. She tells him that she's forgotten how, which is not true. He treated her so badly, why should she do this for him?
Answer: Eli was blind before the war and after finding the bible and hearing God's voice he regained his sight until his task was completed (finding a safe place for the bible) This is why he did things a blind man would do and could read braille and also why is eyes were normal at the start of the film and clouded and the end. God gave him guidance and protection and the gift of sight.
Comment: Is this just your personal opinion?


What is the /= operator in Java?

Question: The following code sample prints 1.5.
float a = 3;
float b = 2;
a /= b;
System.out.println(a);

I don't understand what the /= operator does. What is it supposed to represent?
Answer: It's a combination division-plus-assignment operator.
a /= b;

means divide a by b and put the result in a.
There are similar operators for addition, subtraction, and multiplication: +=, -= and *=.
%= will do modulus.
>>= and <<= will do bit shifting.
Answer: It is an abbreviation for x = x / y (x /= y). What it does is it divides the variable to be asigned by the left hand side of it and stores it in the right hand side. You can always change:
x = x / y
to
x /= y
You can do this with most other operators like * / + and -. I am not sure about bitwise operators though.
Answer: A/=B means the same thing as  A=(A/B)
Java (copying from C) has a whole set of operators  X op = Y meaning X=X op Y, for op being any of:  + - * / % & | ^
Answer: a/=b; implies that divide a with b and put the result into a
Answer: X/=Y it is same as X=X/Y.
Also you can try the same thing for these operators + - * %
Answer: As most people here have already said, x/=y is used as a shortened form of  x=x\y and the same works for other operators like +=, -=, *=, %=. There's even further shortcuts for + and - where x++ and x-- represent x=x+1 and x=x-1 respectively.
One thing that hasn't been mentioned is that if this is used in some function call or conditional test the original value is used then replaced, letting you do the iterator for a while loop inside the call that uses that iterator, or write a true mod function using the remainder operator much more concisely:
public int mod(int a, int b){
    return ((a%=b)>=0?a:a+b);
}

which is a much shorter way of writing:
public int mod(int a, int b){
    a = a % b
    if (a>=0){
        return a;
    }
    return a+b;
}

Answer: You could say a = a / b OR (for short) say a /= b
Comment: Your answer is not adding anything that was not already suggested by the numerous older answers.

What is the /= operator in Java?


Is this an asbestos floor?

Question: My wife and are just bought an old house (1927) and we are concerned about a floor mat in one of the bedrooms. We have been told that it could have asbestos so we would really appreciate any feedback. See the image below:
Answer: The only way to be sure is to send a sample to a testing lab. Send a sample of the adhesive too, since asbestos was sometimes mixed into that. I'm assuming this is tiles; if so you can lift one buy using a heat gun to soften the adhesive and gently lifting with a putty knife.
In most cases, encapsulating the suspect tile under a floating floor is acceptable if the stuff isn't already shedding fibers.
Comment: Other than guessing it's sheet linoleum and you'll need to cut a piece out with a utility knife, agree. The only way to know is to have it tested by a lab - you can't eyeball it and know for sure.

Is this an asbestos floor?


h2o glm tweedie for categorical variables?

Question: To build a tweedie glm for categorical variables, the document suggested that I can use data['variable_name'].asfactor().
However, in the model output, there is no reference level, i.e., if I have gender = Male or Female as categorical variable, it will result in both categories with none-zero coefficient. Any idea how to resolve this?
Answer: The way categorical levels are handled is described in the documentation here, and if regularization is enabled then GLM doesn't drop a reference level - you will only see a level dropped if you disable regularization by setting lambda = 0 .
I will repost the relevant sections for your convenience:
Handling of Categorical Variables
If the response column is categorical, then a classification model is created. GLM supports both binary and multinomial classification. For binary classification, the response column can only have two levels; for multinomial classification, the response column will have more than two levels. We recommend letting GLM handle categorical columns, as it can take advantage of the categorical column for better performance and memory utilization.
We strongly recommend avoiding one-hot encoding categorical columns with any levels into many binary columns, as this is very inefficient. This is especially true for Python users who are used to expanding their categorical variables manually for other frameworks.
Handling of Numeric Variables
When GLM performs regression (with factor columns), one category can be left out to avoid multicollinearity. If regularization is disabled (lambda = 0), then one category is left out. However, when using a the default lambda parameter, all categories are included.
The reason for the different behavior with regularization is that collinearity is not a problem with regularization. And it's better to leave regularization to find out which level to ignore (or how to distribute the coefficients between the levels).


JSS Placeholder Children

Question: I'm developing a carousel using JSS.  The items that would go into the carousel are well known
(through the Placeholder Settings), but I am using a Placeholder to hold those items.
I need to get the children of the Placeholder, so that I can show each item individually.  I am using NextJS for the framework.  The idea is using the React useState and useEffect to show or hide each slide.
The issue is that once the slides are rendered in the Placeholder, I need to access each individual element to show or hide the active one.  Using the old document.querySelectorAll is failing because for whatever reason document is null, which is the usual JavaScript environment, returns the current document.
I tried assigning a variable to the result of the Placeholder like this:
{(content = <Placeholder name="carouselItems" rendering={props.rendering} />)}

but then if seems like it is just returning an object, not the underlying elements that were rendered.
Please correct me if my approach is wrong.  If it makes sense, how do I get to the underlying document in the underlying browser?  I feel like I am missing something!
Answer: The answer is to use the renderEach property of the Placeholder.  This is a callback that takes the component to render and the index of the item being rendered.  There is also a render property of the Placeholder that lets you have  control and it takes the components, the placeholder data, and properties of the Placeholder.

JSS Placeholder Children


Why am I getting "debug domain is off" error message when using Xtensa Tensilica OCD?

Question: I'm trying to start Tensilica's Xtensa OCD Daemon by typing xt-ocd.exe in the appropriate directory but I keep getting a warning stating that "Debug domain is OFF (PWRSTAT:0x0)!" followed by an error message saying "Cannot set JTAG Usable bit while debug module is off (PWRSTAT=0x0)!". I have made sure that my external debugger is actually powered. It seems like the "debug domain" (whatever that means!) is off and I don't know how to turn it on. There's virtually no documentation on this.
Has anyone had the same problem or does anyone know how to solve this issue? Thanks in advance.
Answer: I had this error when the Xtensa processor was in reset mode. Check to ensure that the processor is not in reset.


How to straighten a motor shaft?

Question: I have a drone with a motor shaft that got slightly bent. I can't buy a replacement bell because they only sell the motor as a whole. Is there any way to bend the motor shaft back into position?
Answer: This will be very hard to do.
If the shaft is very bent, I advise ordering a new one, if slightly bent, you can lay it flat on a table and try to straighten it with a hammer or vice.
Comment: A hammer & vice will likely just crush the shaft or deform it. Very difficult indeed.
Comment: @ifconfig yes, that's why it's almost always better to get a replacement
Comment: It's worth noting that motor shafts follow a fairly standard range of sizes, both metric and imperial, so if you can't find a spare shaft for your motor, you can probably find one from a different manufacturer that will fit.
Answer: I found this interesting method that can work for larger motor shafts. It involves putting the motor shaft into a drill to spin it. Then something longer is attached to the other side so that it can be bent slightly until it is back in place.

Here is a video of it: https://www.youtube.com/watch?time_continue=120&v=9bY8JcDpyRY&feature=emb_title
Comment: It might be worth removing the shaft from the bell, so that only the bent section is between the two chucks. As pictured, you could get a new bend inside the bell.

How to straighten a motor shaft?


What types of machine learning model would fit?

Question: I am working on a supervised machine learning problem where I have more than 10 probably 50 or 100 predicting label categories. Which type of model can be used to work on this type of problem in anaconda python.
Comment: What do you mean by predicting categories? Do you mean that you have 50 (or more) categories, that is, that a data point in your domain can be belong to one of 50 (or more) categories? Or do you mean that you have 50 (or more) features? Anyway, I think you should describe more in detail your problem.
Comment: Please, be more specific: if you have all your data already categorized, it would fall under supervised learning; if you don't know the categories, unsuper learning
Answer: Welcome to AI.SE @Par!
What you have might be either a multi-label or a multi-class classification problem. If the classes are disjoint (each example belongs to just 1 of the 50 classes), it's a multi-class problem. If not (so each example can belong to several classes at once), it's a multilabel problem.
Multi-label classification is usually handled by training a separate model for each of the labels. If you want to label a new point, you then ask each model what it thinks, and assign the union of the labels that the models suggest together. An alternative approach is to use something like a neural network, which can have many outputs. You can then have one output neuron for each possible label.
Multi-class classification can be addressed by using the multilabel techniques, but this is usually not a good idea. The three main approaches that are used are "one-v-one", "one-v-all", and "many-v-many".

In 1-v-1, we train one model to discriminate each pair of classes (n(n+1)/2 models in total for n classes). To classify a new point, we ask each model which class it belongs to and assign a "vote" to the class the model returns. The class with the most votes overall is selected as the label for the new point. In case of a tie, we can report several possible answers to the user.
In 1-v-all, we train one model to discriminate each class from all the other classes (n models in total for n classes). To classify a new point, we ask each model whether it belongs to the model's primary class or not. Ideally, just one model claims the new point. If more than one does, we can report a tie, or use some notion of classifier confidence to select a winner.
In many-v-many, we train k models each of which is tasked with discriminating some subset of the classes from all the rest. To classify a new point, we ask all of these models to label the point. We then pick the class that that is most consistent with the results of all the models. This can also be done by deliberately constructing the models to form an error correcting code.

So which approach should you use? Well, Rifkin & Klautau's 2004 JMLR paper argues convincingly that the answer is to use one-versus-all classification. This is also pretty easy to do in most packages. For example, in Python's ScikitLearn, you can do it with OneVsRest. If you're not sure what to try, that's probably a safe bet.


GRUB (or rather BURG) takes 30 seconds to load

Question: I installed a new drive today in my old computer. I'm running Windows 8 and Ubuntu 13.04 using BURG as my bootloader. On my old drive grub/burg would load up instantly. However, now that I've replaced my old one with the new one, the computer just sits at the BIOS screen for about 30 seconds, and then "grub loading" comes up and I'm good. Googling "grub takes 30 seconds to load" brought up a bunch of other threads, but their problem was slightly different. In their problems they said that the computer sat at "grub loading" for 30 seconds. However, mine doesn't even show "grub loading" until the end of the 30 seconds. I'm not sure if this is a problem with grub or a problem with my bios/new drive. Furthermore, if I press f12 to go into the boot menu, and choose my hard drive manually there, grub loads up immediately. This is strange cause grub always loaded up immediately on my old drive.
Answer: If the delay occurs before grub screen (or burg, doesn't make any difference) it's not a grub problem. Check your bios configuration, maybe your system is trying to boot from the old hardrive but since you added a new one, it spends 30 seconds looking for a media to boot that is not there anymore. Try to change the boot up sequence in the bios (can't help you about how to because that depends on the motherboard problem, but usually you can acces to the bios setup trough F2, F8, F10 or the DEL key before grub jumps in. Set the new hardrive as primary boot media.
Good luck!
Answer: 1) Reduce the default grub load time:
you can simply use the following command to open grub configuration:
sudo gedit /etc/default/grub &

And change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=2. This will change the boot time to 2 seconds. Prefer not to put 0 here as you will lost the privilege to change between OS and recovery options. Once you have changed the grub configuration, use the following command to make the change count:
sudo update-grub

2) Speed Up Ubuntu Booting Time via Grub (Source = Ubuntubuzz)
here's to do it, open your grub configuration file (/etc/default/grub) and find this line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash", do as follows :
sudo gedit /etc/default/grub

replace
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash profile"

save and exit
sudo update-grub2

sudo reboot

Grub does a search for all the necessary drivers to load, Instead of making Grub search for required drivers, the profiling actually makes Grub remember every necessary driver to work, This action will cutting down all of the driver load times.
after your system up, edit /etc/default/grub and remove some option  which we have added before.
sudo gedit /etc/default/grub

replace
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash profile"

with
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

save and exit
sudo update-grub2


Is it essential that I learn Try/Catch and Finally statements for Game Programming, or is it something I can come back to?

Question: Doesn't seem like something that would be an essential part of GAME Programming.
Comment: Actually, it is essential that you learn ALL statements. It's not like there are some parts of the language that are "optional".
Comment: And regarding game programming, try/catch/finally is far from the hardest thing you'll have to tackle.
Comment: This isn't a good kind of question: http://gamedev.stackexchange.com/faq#dontask.  Is there actually a problem to be solved here?
Comment: There's a C# and XNA tag in there - then it's absolutely essential. Heck, if you ever go XBLIG you'll have to deal with dozens of (well-documented) exceptions just for the standard Xbox Live handling, if nothing else...
Comment: @Jari: There's an immense difference between the question "When and how should I use exceptions?" and "Do I need to learn what exception keywords do?"
Comment: @Joe: true. My point here was that exceptions are a bit different from other, more common constructs.
Comment: What if someone came through and asked about every single control statement and if it was essential for "GAME Programming". This question is not appropriate.
Comment: @Everyone: Please don't answer questions like this. Some of the answers here have as many upvotes/hr as legitimate gamedev questions have views/hr.
Comment: I agree that this isn't a good question, *but* exceptions are a bit.. exceptional. In the C++ world, some platforms explicitly forbid exceptions, for instance.
Comment: I took probably longer to write your post, than it would have taken to learn try, catch and finally.
Answer: They are 100% essential. Do you want your game to crash any time an error happens? Granted, some errors will always cause a crash, but what about something as simple as network timeout? Wouldn't it be smarter to tell the player and have him try again, or check his network connection?
Picking them up is very easy.
<code>try
{
    //open a network connection and try to get the leaderboard
}
catch(Exception ex)  //type of exception, and a variable to access it by
{
    //tell the user something happend, and have them try again.
    //maybe you jut want to log it.

    LogError(ex);
    //so we have a record it happend, but the error was really bad! (out of memory) just throw it again if you need to
    throw;
}
finally
{
    //this happens no matter what. it will run on success and failure
}
</code>
Comment: let me rephrase his answer you **need** to learn how to use `try/catch/finally` and use them but there is **no need** to learn about `throw`.
Comment: Actually the finally part will not run everytime, see http://stackoverflow.com/questions/4193493/finally-block-not-running
Answer: While I agree with Joe's answer that exception handling is a useful skill to learn, it's my experience that they are rarely used in game development.
I'm not too sure on the differences in implementation, but in C++ the overhead involved with keeping stack traces to allow for effective unwinding whenever a 'throw' is encountered is pretty much the sole reason they're frowned upon.
This answer may provide you with more insight on the overheads involved with C# exception handling.
In terms of general program architecture, exceptions are not useful for determining the exact reasons for a crash, and make it troublesome to determine exactly where an error is occuring. You'll unwind to the point of the catch, but have little to no information (depending on usefulness of your exception) of where the error actually originated.
Comment: I strongly disagree, network sessions, storage (saves), setting up the render device, all these kind of elementary things will often throw exceptions and the users expects you to handle this properly.
Comment: In c++ you are right, throw and catch are not really used, but in c# it's a different story, even casting will throw if something goes wrong!
Comment: Gajet : As C# is much less used for 'proper' game development, that's another problem :P
@Roy T. I've never personally used any sort of game programming framework that uses exceptions to inform the programmer of an error, only ones that return error codes or leave you with a NULL pointer.
Comment: @JonathanConnell I think that is a very old fashioned view. The whole idea of exceptions is that error checking becomes easier, simpler and that you can't forget important errors. It reduces the amount of seriously hard to debug errors by adhering to 'fail early' and an amount of boiler-plate if statements that could be done with a few try-catches, since most places that can fail (mainly IO) are close together. I do see/agree that functions in the standard game loop do not throw exceptions often, but simply because they can't fail. Exceptions mainly occur in IO and networking parts of a game.
Comment: Als in C# exception *handling* is basically free (see the second answer here http://stackoverflow.com/questions/52312/what-is-the-real-overhead-of-try-catch-in-c ) generating exceptions is expensive though, but that's ok since it should only happen in exceptional situations. If you're generating 1000 exceptions per frame then something is seriously wrong.
Comment: Unless you're writing a Windows Phone application that makes HttpWebRequests, in which case you get exceptions every time you get 404 or some other undesirable status code in the response, despite this arguably being an unexceptional scenario. Okay, maybe not 1000 every frame, but still.
Answer: I would agree that it is something that you can come back to.
It is perhaps not essential to "game programming" in the ways that it can be to maintenance/support programming. In other words, if you can think of "game programming" as the discipline of crafting and delivering the game, then exception handling's benefits come to light after shipping out-the-door.
That said, there are things that can play a role in how soon:

Your logging. So there will be a point when you
start formulating a error management strategy. How early you form your
strategy is directly related to the amount of support you incur from
bug reports and captured log entries like "null reference". Often
times, without the context that you can capture from the exception,
you have to do more detective work and it is more difficult to group
errors together, to see the similarities.
Your patch system. If you can push out updates, then you have a lot
of freedom to wait on doing exception handling. Same with if your logic
is a web app and clients are just browsers.
Your team size. If you are a one man team, then you have tremendous
freedom to wait. You know your code. You may even know before hand that
the exception was on your todo list. If you work and share code with
other developers, you may be assigned a ticket to trace someone else's
code so you may not immediately see where the exception is tripped.
Concurrency. To me, this one is hard to plan for so it may not be worth
the effort. Also, I feel this is part of robustness or resiliency. So
if the requirements allow sudden crashes, then you have great freedom
and so you'll wait to address exceptions. One thing you may find with
threads is that it is easy to get non-deterministic behavior. When this
happens, you want ways to capture as much information about the state
leading up to the failure. This can include simulation in a lab of
machines, regression tests, logs, (live) data. Individually each of
these pieces can offset the the others to some degree. For example, if
you have infinite tests you should be able to expose every logic failure
and therefore not need exception handling (or logging or anything else).
Answer: Exception handling is a cleaner way to handle unexpected errors from any point in the game. But the beauty of it is, in your codebase, it won't matter how deep you are in the code to handle it. Without exceptions, some kind of error handling routine would be returning a bool or int for some kind of status, then unwinding the nested subroutines till you got to a top-level area (your game class) and exit from there. It will get very cumbersome to write your code to error check from any possible point, wheras using exceptions requires little to no refactoring.
Since your question is XNA specific, it will probably be of good use to know how to handle exceptions in an Xbox game, because when a game in there doesn't catch one, you are not left with a clue as to why it happened. This article shows you a clever way to work around that by running your entire game in a try/catch block. It will launch a new "ExceptionGame" if something happens to go wrong, passing the details of the error to display in the ExceptionGame.
Answer: I don't know anything about C#, but here are my three cents:

The try/catch/finally exception handling paradigm is widespread, and for good reason: it provides an excellent framework for dealing with exceptions in your code.
If you're using a certain language, you should learn all its statements and how to use them or your code will be some combination of confusing, buggy, and inefficient. A lot of thought goes into the design of programming languages, and trying to write a program without using all the tools available to you is just... silly.
Not to be disparaging, but there are many challenging aspects of game development and trying to do it with the attitude of "I'm only going to learn what I absolutely need to get by" is not going to end well. You'd be better served using the journey to your goal of developing a game as an opportunity to learn as much as you possibly can.
Answer: No, exceptions aren't vital or essential in any way.  For the most part traditional game programs are very heavy on error checks and knowing exactly what's going on with the data and parameters.
The exception to that is when accessing system calls, those will be throwing exceptions and how to catch them is very well documented and you can use the try/catch like a black box until you start to use exceptions more deeply on your own.
The whole try/catch thing is however very easy to pick up and once you get familiar with C# you will be able to see where exceptions make sense and you can start to add them into your own code naturally.
Assuming, of course, that you're just starting out.  If you're learning C# after other languages then you should pick up exceptions and not wait until later.
Comment: No, exceptions ARE vital in a very important way. Understanding and using try-catch-throw can easily cut your debugging time ten-fold.
Comment: I bow to the collective wisdom of these forums!  I won't edit my answer but instead will leave it behind as a reminder to not do that, and follow the best answer(s) myself above should I ever dive deeper into C# =)
Comment: Exceptions might be optional if we were talking c++, but not c#.
Comment: I've got to disagree.  Solid game programs existed long before exceptions and continue to exist without them to this day, complex games that are vetted for 48 hour continuous running times by major publishers and not just little toy titles.  If you're arguing that exceptions should be an essential part of the logic running the game then I think you might either be misusing exceptions or forgetting about assert, which is indeed a vital debugging tool.
Comment: @Patrick Hughes You can write a "solid game program" without using anything except base x86 assembler. It doesn't mean you _should_. If we're talking about C#, exceptions are an essential and very important part of the language. (Assertions, OTOH, are not part of the language at all, although I can't dispute their usefulness)
Comment: @Nevermind I totally agree with you. The fact that you can make games without a certain technology doesn't mean it's smart to ignore it. Btw asserts are part of the C# language (or more correct of .NET), see the Debug.Assert namespace.
Comment: @Roy T. Debug.Assert is part of the Base Class Library, not C# language itself. I'm not sure it'll even work on all platforms.
Answer: I believe it depends on the nature of your game code. Are there areas in your flow of execution where things may fail? Is your code 100% handled? If the code has no way of failing, if you are aware of the post condition and certain of it, then exception handling is of little use, and would simply increase the use of resources to check for no reason. However, the majority of code does have situations where things may fail. Especially in game development, if a game is predictable, it would most likely lack the essence of being a game. Regardless of its use in game development, you MUST be aware of it and how to use it. But apply it where needed.
Answer: Do you want to know what went wrong in ur program without inserting breakpoints or looking at your entire code. If yes, then try-catch statements help you to do just that. It tells you what went wrong using preset types of errors. So by actually learning these statements and knowing what error stands for what, you can effectively debug your code without any hassle.
Answer: Well,
Normally Object-Oriented software trend to use Exceptions for reporting errors in the running proccess. If something happens that the current method can't deal/resolve, it should throw an exception and let someone in the higher to treat this problem. If you do this way, your main processing methods (the more specific ones) will be much cleaner without the need to treat errors that it can't solve.
But normally, in game development Exceptions are not thrown because you are designing the hole enviorment. If you are designing your Engine, then yes, you'll use exceptions to basically I/O features, but in the scene, for example, it's not likely that you'll use it. I find out that it's better to try to add to a list of things that must be solve instead of throwing an error. For example, you have a client/server game. In the client, you noticed something that gone wrong. I find that it's better (for me) to add this error to a list of errors that must be solve, instead of breaking the sequence. That way, you could just jump this error and don't throw an exception, but someone will try to fix this problem.
But in any OO software you'll work with, remember that exceptions are always used. It's a really good thing to learn, very usefull and not hard at all.


Eigenvalue distribution of real anti-symmetric Gaussian random matrices

Question: Let $A_{ij} = - A_{ji}$ be a $n \times n$ matrix with real entries distributed according to a Gaussian distribution with zero mean and standard deviation $\sigma$. What is the eigenvalue distribution of such matrices? I am mostly interested in the case where $n\rightarrow\infty$. If the matrices were symmetric, rather than anti-symmetric, then the answer to this question in the $n \rightarrow \infty$ limit would be the Wigner semi-circle law.
Answer: I can't find a reference but based on a few simulations the imaginary part of the eigenvalues (the real part is of-course zero) seem to follow the semi-circle law as well if the entries are picked independently from the standard normal distrbution. Here is a quick python script:
<code>%matplotlib inline   # For use in a Jupyter notebook
import numpy as np
import matplotlib.pyplot as plt

N=100
mu = 0
sigma = 1

matlist = list()
eval_list = list()

for i in range(1,1000):
    mat = sigma*np.random.randn(N,N) + mu
    matlist.append((mat - mat.T)/2)

for matrix in matlist:
    eigs, vecs = np.linalg.eig(matrix)
    eval_list.extend(map(lambda k: np.imag(k), eigs))

plt.figure()
plt.hist(eval_list)
plt.show()
</code>
Answer: For such random matrices $A$, we have that $iA$ is a complex Wigner matrix (i.e. hermitian, zero-mean, independent entries). So the spectrum of $iA$, which is $i$ times the spectrum of $A$, follows the semi-circle law


Is it bad for headphones to be attached to magnets?

Question: Is it bad for headphones to be attached to magnets?  Will it damage them and make the sound quality worse or something?
Comment: It depends on the size of the magnet and how you're attaching them. All speakers and headphones contain magnets, so there might be an issue with changing the magnetic field on the headphones. But that's my high school science guess.
Comment: Jonathan, maybe you could consider my answer "the answer" since it's complete, no one else is answering, and you could check it at physics.stackexchange.com, or against a high school physics book as Randolph points out.  Just a thought.
Comment: Yes sorry, I don't often visit SU and forgot thanks for the reminder.
Answer: The basic functionality of a speaker (your headphones are small speakers) is this:
An electromagnet has a varying current applied to it.  The varying current creates a change in the magnetic field and causes a reactive material to fluctuate (deform in proportion to the change in magnetic field).  The fluctuation causes changes that are detected by your ears.  Setting a magnet next to a speaker does not change the reactive material or the magnet in the speaker itself.  This is because there is no applied current in the "other" magnet, and therefore no fluctuation in magnetic field.  This causes no net change in the speaker (headphones).  Now if you force similar polarities of two magnets together (N + N or S + S) you negate the two fields.  Look up degaussing on the web for an explanation.
Short answer: There should be no negative effect from this behavior.  Forcing the two similar polarities of the two magnets together may cause a decrease in the strength of the magnetic field in both magnets over time, decreasing the responsiveness of the speakers.  You would have to force this behavior as two similar polarities will naturally repel each other.


Is it possible to save a blob using phonegap?

Question: I'm using Sencha Touch 2.1.1. When my app requests a pdf, the server generates the binary data for the pdf, holds it in a buffer and finally spits it out to the browser with
<code>header('Content-Length: '.strlen($this->buffer));
header('Content-disposition: attachment; filename="'.$name.'"');
</code>
which, when surfing normally with a web browser, causes one of those 'save or open with' dialogs to be displayed by the browser. With Sencha Touch, I can get a blob from the server, as follows:
<code>            var xhr = new XMLHttpRequest();
            console.log('new XMLHttpRequest');
            var url = 'http://bladhdeblah.com/ws/Download/';
            var params = "loginId=" + loginId +  "&sId=" + surveyId;
            xhr.open('POST', url, true);
            xhr.responseType = 'blob';
            xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xhr.onload = function (e) {
                if (this.status == 200) {
                    Ext.Viewport.setMasked(false);
                    blob = new Blob([this.response], {type: 'application/pdf'});
                    console.log('new Blob');
                    var cd = (this.getResponseHeader("Content-disposition"));
                    var filenameStart = cd.indexOf("\"") + 1;
                    var filename = cd.substring(filenameStart, cd.length - 1);
                    console.log('pdf filename is ' + filename);
                    if (Ext.os.is.Android) {
                        window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
                    }
                }
                else {
                    LRS.util.common.displayAjaxFailure(this.response, 1);
                }

            };
            xhr.send(params)
;
</code>
My problem is that phonegap obviously doesn't understand 'new Blob' (logcat on Android shows 'Uncaught TypeError: Illegal constructor') and, as far as I can discover, it is in any case not possible to use phonegap's filewriter to write anything other than plain text (which I have done successfully elsewhere).
I've googled a fair bit, but can't find a solution. With WinJS, I've been able to get the blob and save it using Windows.Storage.Streams.RandomAccessStream.copyAsync, but can't find any similar functionality in phonegap.
I would have thought there must be plenty of people who want their apps to download and save images, mp3s or whatever, so I'm hoping that some phonegap guru out there will be able to point me towards a solution.
I'm aware of phonegap's FileTransfer, but, if I've understood correctly, I would need to provide it with the url of a file saved on the server. I could change the server code so that it saves the pdf, but would prefer not to make such a change.
Incidentally, my app's using a SQLlite database, so maybe a solution is to stick the binary data into there somewhere and display it from there? Trouble is I don't know how to display it.
Answer: Instead of using Blob, use WebKitBlobBuilder.
Some examples of BlobBuilder can be found here. The link says BlobBuilder is obsolete, but Android (4.1.2 at least) hasn't yet moved to Blob.


Add point to center of polygon graphic in the Esri javascript api

Question: I'm using the ESRI JavaScript API 3.3 to develop an application.  I am selecting parcels and adding a graphic for the selected polygon.  What I would like to do is add a point marker to the center of the polygon graphic after the graphic is added.  Does anyone know of a sample I could take a look at, or know how to quickly implement this functionality?   I feel like I'm missing something simple.
Answer: Unless your parcel polygons are unusually shaped, you get get the center point of the extent of the parcel polygon and use that to draw your center graphic.
<code>// in this example, the graphic variable is the graphic of the parcel you added to the map
var centerPoint;
switch (graphic.geometry.type) {
    case "point":
        // if the graphic is a point
        centerPoint = graphic.geometry;
        break;
    case "extent":
        // if the graphic is an extent
        centerPoint = graphic.getCenter();
    default:
        // if the graphic is a line or polygon, which for a parcel this will probably
        // be the case.
        centerPoint = graphic.getExtent().getCenter();
}
var centerGraphic = new esri.Graphic(centerPoint, centerSymbol);
</code>
...
Comment: Nice solution and clean.
Comment: Beautiful, that is it exactly.  I had flirted with a variation on it but was missing the getExtent before I tried to do the getCenter.  A +1 and the solution.
Answer: So here are two quick solutions.  I really do not think either are the optimal way, but would be easy.

Place a marker symbol where the user clicks.  That way the visual effect will be the point will be on the polygon that was selected.
User the label points geometry task to get an geometry to know where to place the marker symbol.  http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/geometryservice.html#GeometryService/onLabelPointsComplete
Comment: Per @Jamie #2 solution, you need to enable the geometry service on your arcgis server or you can use the http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer. One caveat, for those who might use the service for centriod creation, it does not guarantee a centroid from the docs, but it does guarantee an interior point. You could publish a geoprocess from the "Feature To Point" tool to enable centroids.


Bezier curves are important?

Question: A theoretical practice question for you: are Bezier curves really important?
I'm not at all a "graphic-one", that's for sure, but sometimes used Inkscape (or other software that had Bezier curves among its tools) for simple tasks and I never felt the need to use them... I'm wondering what am I missing? I mean, what's most common use for them? How would your life be worse without them? And what couldn't be done at all without them? I think you got the point about what I'm asking about, thank you in advance!
Answer: Not really. We could use any number of other parametric curves. However when Adobe defined their specification for printers they chose to use Bézier curves for the job. Since Adobe decided to use Béziers everybody used those for printer output. Since then we have just inherited the choice of Béziers, in PostScript in PDF in SVG etc.
Like I said the choice is pretty arbitrary. Engineers made a different choice and chose rational B-splines instead. But again we could have chosen other basis curves as well but at that time Béziers and B-splines were the top contenders. It has since been shown that they in fact both are reducible to rational  B-splines (but not vice versa since the B-spline space is a super set of Béziers). Today we would probably choose some other parametrisation, that would preferably have closed form solutions for length.
Basically we use Béziers to be able to use standard formats.
Do we need parametric curves?
Yes, without parametric curves it would be pretty hard to evolve the surfaces and curves we use in day to day design (be it 2D or 3D). If we simply used a bunch of lines we would have all sorts of problems with booleans and manipulation of curves.
Splines make forming of curves easy even to people who aren't so mathematically oriented.
When do you need one?
Whenever you need something to actually curve. Fonts would be much much larger files and such things as modern cars couldn't be designed digitally.
But like i said that curve does not have to be a Bézier. Its just that if you wish to share the data across applications or to your printer then you don't have much choice its either Bézier or rational B-splines. That or then flatting the curve so its useless for re-editing which is fine for output but not archival.
The nice thing of this approach is that even the things you do not think of as Béziers probably are internally Béziers anyway. So you only really have to implement one shape primitive, lines are most likely Beziers. Circles are in many apps, although you can not make exact circles with Béziers, but no one would notice (and this is why engineers use rational splines instead). So, in fact, you're probably using Bézier curves all the time.

Bezier curves are important?


Frameshift Mutation

Question: With regards to LMNA frameshift mutations further downstream in the tail region, specifically (p.Arg455Gln fs*5) which has yet to be found/recorded in any medical literature...Does anyone have any knowledge regarding frameshift mutations (esp. concerning LMNA)? Is it possible that this is a "background mutation" and of little consequence?
Answer: Check in gnomAD. It is not in the population. It truncates the protein and the protein has a pLI of 1. So it does not tolerate LoF mutations. This mutation removes the lamin tail domain.

Frameshift Mutation


I think my iphone 5's battery have some problem.

Question: One day i charged my iphone till 90%to92% then in didn't use my phone and went to sleep after 10 hours I checked my phone and the battery is showing only 20% charge is left. In the meantime i didn't used my phone so is there a battery issue or some thing else???
Answer: Apple has a battery replacement program for iPhone 5. You can check eligibility on this Apple page

Apple has determined that a very small percentage of iPhone 5 devices may suddenly experience shorter battery life or need to be charged more frequently. The affected iPhone 5 devices were sold between September 2012 and January 2013 and fall within a limited serial number range. (...)
The program covers affected iPhone 5 batteries for two years after the first retail sale of the unit or until March 1, 2015, whichever provides longer coverage.
Comment: Definitely, the iPhone 5 is notorious for that.
Answer: First, check to see what application is consuming battery power. To check this, open Settings>General>Usage. Under Battery, touch 'Battery Usage'. After some loading time, you will see a list of Applications that have used Battery power in the last 24 hrs and last 7 days. If there is an application using a significant percentage of power that you have not used, you may wish to kill that app or restart your iPhone.
Specifically to the iPhone 5, see @Tetsujin response on extended warranty from Apple.


I have 225 45 r17 winter tyres on golf but peugeot 207 with 205 45 r17 tyres - could I interchange

Question: I have 225 45 r17 winter tyres on my golf that are nearly new. I have just purchased a Peugeot 207 with 205 45 r17 tyres - could I also use my winter tyres on this car?
Comment: Did you check your owners manual? Also what year is the Peugeot?
Comment: 2008 - not got manual yet as new purchase
Comment: The specs for the Peugeot 207 2006 - 2009 say 185 and 205 as tire widths, so my guess is that 225 is too much for it. Don't you have a registration document or something specifying the allowed sizes for tires? Even if it would work physically to use them, you may not be allowed legally. I even doubt that the R17 you have should be allowed (but that's equivalent to the allowed 205 55 R16, so it fits).
Comment: Assuming the bolt patterns are the same, If you really wanted to fit those tires you could use wheel spacers for extra clearance. Be warned, however, as  good ones aren't cheap, and have the potential to cause serious damage if not installed correctly.
Answer: You probably can't use them. They are too wide for the Peugeot - the max I could find was 215, and even that I think is a stretch for a car so small.
Also, depending on what rims you have on the Peugeot they may not fit on them and you'd need different rims (the ones from the Golf will not work because the Golfs usually have 5 bolts and the Peugeot has 4).
Answer: Are you planning to use the whole wheel from the Golf, or just the tyres?
The difference between the 205 and 225 tyres are that the 225 is two cm wider (that would mean one cm on each side if you change only the tyres), it will also be a little higher (about 157mm instead of 143mm).
You will have to take a look on your car and make sure that there is enough clearance between the current wheel and the inner wheel wells and the fenders. Don't forget to account for the movement of the wheel, both up and down, and as you turn the wheel. But just as @alin-purcaru says, it's likely to be too big for the car.
Otherwise, if you mean to change the whole wheel, well then first of all the number of bults must fit, then the bult pattern. You will also have to check that the ET number of the rim fits your car. Most likely this option will not work.


What does the output waveform from audio source look like?

Question: I understand that every audio waveform will be different but in terms of frequency and amplitude what can I expect? The audio source is an audio jack connected to an Ipod or computer audio jack. What I plan to build is a device that will light some LED's when say a frequency below 700 Hz is embedded into the waveform, however not sure what the waveform is composed of. Is it possible to have filters decompose the waveform into the different frequencies?
Comment: I'm not really sure what you're asking, but if you want to detect frequencies below 700 Hz you can use the Fast Fourier Transform (digital), or an aggressive lowpass filter and an envelope detector (analog).
Comment: Yes, filters can decompose the signal. Filter design is a big topic and I am not an expert. But the basic idea is that the selectivity of filters is not perfect. They transition gradually from a pass band to a reject band. The more elements you add to your filter, the more steep the transition can be. There are also issues such as phase linearity, smoothness (the filter, when looked at in the frequency domain, may have ripple in it) etc. If you just want to light up some LED's, then you don't need to worry too much about ripple or smoothness. Digital Signal processing can also be used.
Comment: I think you need a 'scope.  You can make a cheap audio scope with a computer and sound card.
Answer: A waveform for audio can be seen in two ways, the Frequency Domain and the Time Domain. Any common audio application tends to have a visualizer that can show either.

This image shows a simplified view of how different frequencies meld into each other and change the waveform.

(source: electronics-tutorials.ws)
To cut off part of a waveform, you would use a band pass filter, which only allows a certain section of frequencies (bands) to pass through. A common consumer example of these are EQs, audio equalizers. They can be simple Bass/Mid/Treble or larger multi-frequency ones.

They allow you to Cut Off or Boost/Amplify certain frequencies.
Now more to your point, you want to light leds with only frequencies below 700Hz. Using a bandpass filter, a lowpass essentially, you can cut off most of the frequencies present, and the rest will light your leds. They will flash mostly based on the amplitude of the waveform in those frequencies, using them like a turn on signal. This is called a Color Organ.

This circuit has a pre-amp, and three bands, using a lowpass, a midpass, and a highpass Resistor Capacitor circuit, connected to a transistor and led for each. This covers Treble, Mids, and Bass. They can be done independently, you only need one. You can use a more specific, custom bandpass RC filter (google for calculators) to filter close to the frequency you want.
There is also the LM3914/5/6, which is a linear, logarithmic, and dedicated VU-meter IC. You can use a bandpass before the input to only measure the strength of those frequencies you choose.
Newer options involve an IC (like the MSGEQ07) that takes an analog signal, digitizes with an ADC, and spits out frequency band information digitally, for use with a microcontroller. This of course, is a bit more complicated/involved, but makes for a great project.
Comment: Fantastic answer really appreciate you taking your time to provide all the great info.
Answer: 700Hz or below calls for a low pass filter. If it's music, the waveform will be packed with fundamentals and harmonics of virtually all frequencies from 20Hz to 20kHz.
If you are wanting a specific frequency to provide control using a triac or other transistor configuration, you will want to build a narrow bandpass filter.
Answer: Are you trying to make a circuit that does this?
You will require a design with a number of stages to transform the data of the sound into a usable form.

The sound needs to be supplied at a sufficient voltage via some headphone jack/amplifier.
Low Pass at a frequency sufficiently below 700Hz such that frequencies at and above 700Hz do not influence your output. Many circuits are available to you. The simplest is a resistor and a capacitor. This is called an RC filter.

Now that we have the part of the sound we're interested in we need to convert that into data the light can use.

Rectify the signal. A sound wave will consist of positive and negative deviations around a mean value (usually/hopefully zero). We only want to know when this sub-700Hz part of the signals amplitude is large. We don't care if it is positive or negative. So we rectify the signal. This is the process of making all of the negative parts positive or making all the negative parts zero. This can be performed with a half wave rectifier (requiring 1 diode) or a full wave rectifier (requiring 4 diodes.).
Now that will result in a very 'bumpy' signal that won't drive an LED very well. We want to smooth it out. This can be achieved with a capacitor to ground. This will get charged up during the peaks of the sound and in the valleys of the sound wave the capacitor will dissipate that energy.
Now all you need to do is use this signal to drive the LED. You will possibly need to amplify the signal with a bjt or fet.
Comment: I just ignored the title because it actually didn't make any sense to me. I suppose the question that might have been intended was: "How do I make a spectrum analyzer?" but that was not this question. The answer to that question is: write a program to calculate the FFT and display that as a graph. Or use averages of specific ranges and assign them to each LED.
Comment: The question is *"What does the output waveform from audio source look like?"*. So include something to answer that also.


Format data, before or after inserting into database?

Question: I can never decide if it's better to format data before inserting it into the DB, or when pulling it out.
I'm not talking about data sanitization; we all know to protect against SQL injection. I'm talking about if the user gives you a URL, and it doesn't have http:// in front of it, should you add that before inserting it into the DB or when pulling it out? What about more complex things, like formatting a big wad of text. Do I want to mark it up with HTML (or strip it down) before or after? What if I change my mind later and want to format it differently? I can't do this if I've already formatted it, but I can if I store it unformatted... but then I'm doing extra work every time I pull a piece of data out of the DB, which I could have done once and been done with it.
What are your thoughts?

From the answers, there seems to be a general consensus that things like URLs, phone numbers, and emails (anything with a well-defined format) should be normalized first to a consistent format. Things like text should generally be left raw or in a manipulable format for maximum flexibility. If speed is an issue, both formats may be stored.
Answer: I think it's best to make sure data in the database is in the most consistent format possible.  You might have multiple apps using this data, so if you can make sure it's all the same format, you won't have to worry about reformatting different formats in every application.
Comment: +1: It's important for data you just plan to retrieve and reuse elsewhere, and CRITICAL for data that might make it into a WHERE clause.
Answer: Normalising URLs to a canonical form prior to insertion is probably okay; performing any kind of extensive formatting, e.g. HTML conversion/parsing etc. strikes me as a bad idea - always have the "rawest" data possible in your database, especially if you want to change the presentation format later.
In terms of avoiding unnecessary post-processing on every query, you might look into adopting object caching or similar techniques for the more expensive operations.
Answer: You're asking two questions here.
Normalization should always be performed prior to the database insertion, e.g. if a column only has URLs then they should always be normalized first.
Regarding formating, that's a view problem and not a model (in this case DB) problem.
Answer: In my opinion, it should be formatted first. If you choose to do it at the time of retrieval instead of insertion, this can cause problems down the road when other applications/scripts want to use data out of the same database. They will all need to know how to clean up the data when they pull it out.
Answer: depends
if you are doing well defined items, SSN, zip code, phone number, store it formatted (this does not necessarily mean to include dashes or dots, etc. it may mean removing them so everyhting is consistent.
Answer: You have to be very careful if you change data before you store it.  You could always run into a situation where you need to echo back to the original user the exact text that they gave you.
Comment: What situations would that be? And how often do you run into them? I can't think of any ATM, so I'm not really inclined to factor that into my designs....
Comment: The case I ran into it was the case of a product SKU.  We have a EDI process that needed to feed back the SKU to the original requester and they had a system that was case sensitive.
Answer: My inclination is usually to store data in the most flexible form possible. For instance, numbers should be stored using integer or floating-point types, not strings, because you can do math with numeric types but not with strings (although it's easy enough to parse a number into a string that this is not a big deal). Perhaps a more practical example: dates/times should be stored using the database's actual date/time data type instead of strings. Also, maybe it's easier to convert HTML into plain text than vice versa, in which case you'd want to store your text as HTML. Or maybe even using a format like Markdown which can be easily converted into either HTML or plain text.
It's the same reason vector graphics formats (SVG, EPS, etc.) exist: an SVG file is essentially a sequence of instructions specifying how to draw the image. It's easy to convert that into a bitmap image of any size, whereas if you only had a bitmap image to start with, you'd have a hard time changing its size (e.g. to create a thumbnail) without losing quality.
Answer: It is possible you might want to store both the formatted and unformatted versions of the data.  For instance, let's use American phone numbers as an example. If you store one column with just the numbers and one column with the most frequently needed format, such as (111) 111-1111, then you can easily format to client specifications for the special cases or pull the most common one out quickly without lots of casting. This takes very little extra time at the time of insert (and can be accomplished with a calculated column so it always happens no matter where the data came from).
Data should be scrubbed before being put in the database so that invalid dates or nonnumeric data etc aren't ever placed in the field. Email is one field that people often put junk into for some reason. If it doesn't have an @ sign, it shouldn't be stored. This is especially true if you actually send emails thorugh your application(s) using that field. It is a waste of time to try to send an email to 'contact his secretary' or 'aol.com' if you see what I mean.
If the format will be consistently needed, it is better to convert the data to that format once on insert or update and not have to convert it ever again. If the standard format changes, you will need to update the column for all existing records at that time, then use the new format going forth. If you have frequent changes of format and large tables or if differnt applications use different formats, it might be best to store unformatted.


Why does Robert Redford pour water on his radio and a cellphone?

Question: I'm at a loss for why Robert Reford poured water on his radio and cellphone in All Is Lost. The movie is on Netflix and the scene in question is at 16:50. Any ideas?
Answer: Redford pours water on the electronics to remove conductive sea salt from them so that they can dry out and can (hopefully) be used again. He tries to use the radio the next day by connecting the boat's service battery to it.

"The next day he continues patching the hole in the side of the boat and pumping more water. It's slow, exhausting work. He pulls out the radio equipment and pours bottled water on the interior of the devices to remove conductive sea salt from them. He sets them out to dry on deck.
  The next day, he's able to complete cleaning the cabin with a sponge and mop. His fiber glass patch seems tentative, but at least keeps water out. He drags one of the boat's service battery on deck and hooks it to his radio. The radio does not work. He consults his navigation charts. He goes below and as he's looking through a book on celestial navigation, he hears someone speaking on the radio. He hurries back up on deck and makes an SOS call. It doesn't appear to work before the radio goes dead."
Source
Comment: It's really hard to dry out salt short of baking. It's hygrosopic so even dry salt in a humid environment will become conductive as it absorbs humidity. And any salt deposited by a dunk in salt water will retain it's conductive nature. Flushing and diluting it with fresh water reduces the chances of small particles of salt and salt water causing issues. And false, solid salt will conduct, given a high enough voltage, like any insulator. Just won't conduct at low or ultra low voltage (120 volts and under.
Comment: Which is partially realistic. In real life you would want to use high percentage alcohol or atleast purified water. Plain bottled water could add contaminates. But it's better than nothing.
Comment: But salt isn't conductive is it? Salt *water* is conductive, but pure salt I don't think so. "Solid salts do not conduct electricity." https://en.wikipedia.org/wiki/Salt_(chemistry)#Conductivity
Comment: @cde, It appears that the solubility of salt in alcohol (of various types) is very low compared to the solubility in water. It is probably more effective to use a water rinse first. Ideally that would be distilled water, but the situation he was in does not appear to provide many options.  My personal preference would be to then flush with significant quantities of 99% Isopropyl Alcohol to flush out the remaining water. Alternately, place in a plastic bag with some uncooked rice, which will absorb water vapor, and allow it to sit in the sun for several hours.
Comment: To me it seems like giving the electronics another dousing of water would be a greater risk than having some salt coated on them that could be shaken or rubbed off. But this does seem to be the correct answer. Thanks!


Multi-page text report with BIRT

Question: I have a report which I need to create with BIRT which is simply two large sections of text. The text will come in from XML, so I could use an XML datasource to load the text, but how do I just create a text section which could span multiple pages, I'm not using tabular data or anything like that.
Comment: What you're trying to do is to split your text on different pages ?
Answer: If you have an XML source with two elements, each containing a large section of text, you can use the XML data source or the Scripted Data Source. Drop the Data Set into a table, and set the page break on the Detail row to 1 row and always. This will break up the two large text elements into separate pages.
Answer: No special measures should be required for a text section to split over multiple pages - this will happen automatically, if the field is large enough to require paging.
Answer: Something to note when having dynamic text span multiple pages:
The report layout should be set to "Auto Layout", otherwise it duplicates the text over multiple pages. This is only applicable when using the report viewer.
No good if you want to use fixed layout for a report.

Multi-page text report with BIRT


I have installed ubuntu into my windows 7 64 bit, i am having problems with boot

Question: I have a problem I have not found any solution to, I am not so familiar with ubuntu commands or ubuntu in general. My problem started when I chose in windows 7 settings/ bootloader settings as ubuntu default, and it boots straight into grub, and in grub if I choose windows, it goes to the loader for half a sec, and goes straight back to grub. So I have disabled my windows 7 completely. And I have not found any way to boot back to windows, so I could go to settings and set it to windows...
My only option seems to be re-installing the whole Windows 7...thus loosing all my saved games etc... I am fine using ubuntu for basic needs, but I am getting desperate here...
Comment: Do you mean your dual boot install worked fine till you changed some settings in Win7?
Comment: Yep, linux works like a charm, no problem there. But the very clever windows boot loader goes straight to grub, and when i choose windows in grub it goes to the windows oh so nice dual boot loader and as the default is set to Ubuntu it just skips right back to Grub. I would need a way to magically boot into my windows so i can change it back to win by default, and never touch that configuration again in my life...
Answer: I have no clue how to change Win7 bootloader settings from Ubuntu.
A possible workaround could be:

Fix Win7 bootloader (excerpt from here):

Windows Vista or Windows 7 installation CD/DVD
Boot from Windows Vista installation disc, select language and
  keyboard or input method, click Next and choose to Repair your
  computer. Then you will need to select the operating system that you
  want to repair. In the System Recovery Options dialog box click
  Command Prompt and type the following:
Bootrec.exe /FixMbr
Bootrec.exe /FixBoot
If you want to completely rebuild Windows Vista Boot Configuration
  Data, then you should issue the following command:
Bootrec.exe /RebuildBcd
This command scans all disks for installations that are compatible
  with Windows Vista. Additionally, this option also allows select the
  installations that you want to add to the Boot Configuration Data
  store.
Further information is available at
  http://support.microsoft.com/kb/927392/ More information
Please keep in mind that fixmbr is supported only on x86-based
  machines.

Start Windows and restore previous boot settings;
Start Ubuntu from LiveCD or LiveUSB are from type from terminal sudo update-grub


Steps to create a kickstart server on Ubuntu 14.04

Question: Need a step by step procedure for creating a kickstart server on Ubuntu 14.04 LTS
Answer: This is a good step-by-step guide

TL;DR; use isohybrid after repacking the custom iso
To make this usb, I used a virtual machine with Ubuntu 14.04
  installed. The goal here is to make a bootable usb that doesn't
  require selection of things like keyboard layout, language, etc. We
  want an automatic install of an Ubuntu server.
We need to get the ubuntu image that we're going to be customizing for
  our installation.
wget http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso

We're going to need a place to mount the unpacked iso file.
sudo mkdir -p /mnt/iso

After we have created a mount point for it, now we have to mount it.
  This will expose the files that are held inside the iso.
  Unfortunately, the files will be read-only
. sudo mount -o loop ubuntu-14.04.2-server-amd64.iso /mnt/iso
In order to modify the files, we need to copy them to a directory
  where we can modify them, so we'll create the directory and then copy
  the files to it.
sudo mkdir -p /opt/ubuntuiso
sudo cp -rT /mnt/iso /opt/ubuntuiso

Our new working directory will be /opt/ubuntuiso
cd /opt/ubuntuiso

In order to avoid being prompted for language selection in the
  installation process, we need to tell it what language we're going to
  use. In this case, en is being used because I speak english.
echo en | sudo tee isolinux/lang

Now we are actually going to build the kickstart file with a program
  called system-config-kickstart. So we make sure it's installed and
  then run it.
sudo apt-get install system-config-kickstart
system-config-kickstart

Then save the file from the GUI in /opt/ubuntuiso/. This should save
  a file called ks.cfg. My ks.cfg looks like the following
#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone America/Denver
#Root password
rootpw --disabled
#Initial user
user ubuntu --fullname "ubuntu" --iscrypted --password $1$MQ0zGB4W$pwjX8nolgr2RJch2Omamt.
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use CDROM installation media
cdrom
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype ext2 --size 100 --asprimary
part swap --recommended
part / --fstype ext4 --size 1 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
%post
#!/bin/bash
exec < /dev/tty6 > /dev/tty6
chvt 6
echo 'Acquire::http { Proxy "http://10.2.4.27"; };' > /etc/apt/apt.conf.d/02proxy
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get install -y git ansible openssh-server vim
chvt 1

There is a little bit of hijacking done in the postscript (everything
  after %post). The line beginning with exec and the following line
  (chvt 6) are forcing the installer show the output from the commands
  that are run after that. The reason for this is that the loading bar
  will not move during the installation, and it can appear as though the
  installer has hung. The following line that does the proxy is for the
  apt-cache on our local network. The final line (chvt 1) reverts the
  output to the main installer.
Now we need to add the preseed file so that we can avoid other
  questions.
echo 'd-i partman/confirm_write_new_label boolean true d-i partman/choose_partition \ select Finish partitioning and write changes to disk d-i partman/confirm boolean true' | sudo tee ks.preseed

Now we need to tell the installer about the files that we just saved,
  so we need to modify isolinux/txt.cfg. First we need to make the file
  writable.
sudo chmod +w isolinux/txt.cfg

Then we need to replace the append line of the following section
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet --

Replace the append line with
append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz ks=cdrom:/ks.cfg preseed/file=/cdrom/ks.preseed --

Save and exit the file. We also need to make sure that we put the file
  back in its original state, so remove the write permissions.
sudo chmod -w isolinux/txt.cfg

Now create the new iso file that we will use to create the bootable
  usb.
sudo mkisofs -D -r -V "ATTENDLESS_UBUNTU" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/autoinstall.iso /opt/ubuntuiso

In order to finalize the bootable iso for a usb, we need to hybridize
  it.
sudo isohybrid /opt/autoinstall.iso

After hybridizing it, we can push it to the usb drive. The usb drive
  in my virtual machine shows up in /dev/sdb, but you need to use the
  correct label, so replace X accordingly Make sure that the usb drive
  is unmounted.
sudo umount /dev/sdX

And finally push the iso onto the usb drive. (Please note **this
  destroys data on the target device - make sure you know what you are
  doing)
sudo dd if=/opt/autoinstall.iso of=/dev/sdX

Now your usb drive should be ready for installation!
Comment: While this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.  Especially in case the site ever goes down.
Answer: The complete solution:
Remaster a CD, ie, download a non-graphical Ubuntu installation ISO (server or alternate installation CD) and mount it. In this case, your Ubuntu 14 ISO.
sudo mkdir -p /mnt/iso
sudo mount -o loop ubuntu.iso /mnt/iso

Copy the relevant files to a different directory
sudo mkdir -p /opt/ubuntuiso
sudo cp -rT /mnt/iso /opt/ubuntuiso

Prevent the language selection menu from appearing
cd /opt/ubuntuiso
echo en | sudo tee isolinux/lang

Use GUI program to add a kickstart file named ks.cfg
sudo apt-get install system-config-kickstart
system-config-kickstart # save file to ks.cfg

To add packages for the installation, add a %package section to the ks.cfg kickstart file, append to the end of ks.cfg file something like this.
%packages
@ ubuntu-server
openssh-server
ftp
build-essential

This will install the ubuntu-server "bundle", and will add the openssh-server, ftp and build-essential packages.
Add a preseed file, to suppress other questions
echo 'd-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition \
select Finish partitioning and write changes to disk
d-i partman/confirm boolean true' | sudo tee ks.preseed

Set the boot command line to use the kickstart and preseed files
sudo nano isolinux/txt.cfg

Search for
label install
  menu label ^Install Ubuntu Server
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet --

add ks=cdrom:/ks.cfg and preseed/file=/cdrom/ks.preseed to the append line. You can remove the quiet and vga=788 words. It should look like
append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz ks=cdrom:/ks.cfg preseed/file=/cdrom/ks.preseed --

Now create a new iso
sudo mkisofs -D -r -V "ATTENDLESS_UBUNTU" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /opt/autoinstall.iso /opt/ubuntuiso

That's it. You'll have a CD that would install an Ubuntu system once you boot from it, without requiring any input.
Tweak the ks.cfg and preseed files as needed.


Are the sorting algorithms used by NSArray stable sorts?

Question: Are the sorting algorithms used by the various sorting methods in NSArray stable?  (As in are they "stable sort" algorithms, where items with the same sort key have their relative orders preserved.)
Comment: @TDeBailleul "Giving it a try" is not really helpful in this case. The sorting may be stable in certain cases, but not others, depending on the size of the data, how the array was constructed, etc.
Comment: Ok, I thought the behavior was always the same. Good to know.
Comment: If it is not stable in one single case, then it is not stable. So "giving it a try" _is_ helpful.
Answer: Stable sort is not guaranteed unless you use NSSortStable. From the documentation on NSSortOptions:

NSSortStable
Specifies that the sorted results should return compared items have equal value in the order they occurred originally.
If this option is unspecified equal objects may, or may not, be returned in their original order.

If you need to guarantee a stable sort, try something like:
[array sortWithOptions:NSSortStable usingComparator:^NSComparisonResult(id obj1, id obj2) {
    return [obj1 compare:obj2];
}];

Comment: `(void)sortWithOptions:usingComparator:` works for mutable arrays... there's also `(NSArray *)sortedArrayWithOptions:usingComparator:` if that floats your boat
Answer: The only "official" answer I've found about this is a 2002 mailing list post by Chris Kane from Apple:

The stability of NSArray/NSMutableArray's sorting methods is undefined,
  so you should anticipate that they are unstable.  Being undefined, the
  situation may also change from release to release, though I don't
  (myself) anticipate that this is likely.  The current implementation
  uses quick sort, a version of the algorithm nearly identical to BSD's
  qsort() routine.  A bunch of experimentation found at one point that it
  was hard to do better than that for the general types of data we
  through at the tests.  [Of course, if one has additional information
  about the data being sorted, one can use other algorithms or
  modifications which help that case.]

I don't know whether this is still true, given how old the post is, but it's probably best to assume that NSArray's sorting methods are not stable.
Answer: In the doc, no details are given as to the final order of identical items.
Therefore, I feel making any assumptions about the order would be a bad idea. Even if you determine experimentally what the order is, this could change based on the number of items in the array or which version of iOS runs the sort.
For me, I would stick with the promises provided by documentation.
Comment: The documentation *does* specify, it's just buried behind the documentation for `NSSortOptions`: https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html#//apple_ref/doc/c_ref/NSSortOptions
Comment: I wouldn't trust it even if I had tested it thoroughly, Apple might change the used algorithm(s) in the next version rendering any tests pointless and might cause some strange bugs.


Are there other known public security sections other than Section 9?

Question: We're all aware of Public Security Section 9, its operatives and scope.
The question is: are there other known sections, and if so, what are their scopes/mandates?
Answer: Yes, there are other sections, first mentioned in the first movie.
Section 1
Also known as the Special Service Squad, it acts like a special police unit (compare: SWAT)
Section 2

Section 2 is under the control of the Ministry of Health, Labour and Welfare, in charge of conducting law enforcement matters regarding unauthorized experiments and patents take place without the Ministry of Health, Labour and Welfare's consent.

Section 3
Enforces the anti-drug operations in Japan.
Section 4
A special unit in the Japanese Ground Self Defence Forces, also known as "The Rangers".
Section 6

Section 6 is an Intelligence, Surveillance and Reconnaissance unit under jurisdiction of the Ministry of Foreign Affairs known as the Treaty Council.

Qoutes are from the Ghost In The Shell-Wikia.
Answer: Section 1
Also known as "Special Service Squad". This section investigates very serious crimes, and its reach is limited to Japan only.
Section 2
Enforces law in the area of biomedical experiments (un)authorized by Ministry of Health, Labour and Welfare. Also enforces patents.
Section 3
Works the drug-related crimes in Japan.
Section 4
Special forces unit called "The Rangers". Batou is an ex-ranger and has cyberized eyes like the rest of his former colleagues, as seen in GITS:SAC.
Section 6
Surveillance and Reconnaissance unit. They are not very cyberized and they don't see much action.
Source is Wikipedia plus my own recollection of the events. It is currently unknown what sections 5, 7 and 8 do.


Are there profitable hedge funds using AI?

Question: Is there any research in this area?
Comment: To OP, I expect there is research on it, but expecting someone to do a literature review on the keywords  "AI" and "hedge fund" and publish the results here is a bit too much work. Any chance you can add some details and some focus to the question so that it is not too broad and could be answered?
Comment: Also have a look at the quant forum for more info e.g. https://quant.stackexchange.com/questions/111/how-can-i-go-about-applying-machine-learning-algorithms-to-stock-markets/
Answer: High-frequency trading is where you see it being used, essentially, decision-making algorithms analyzing and making transactions in microseconds.  It accounts for a significant percentage of market activity, and has been considered a source of greater market volatility (See: Flash Crashes).
You can bet that hedge funds are evaluating every form of AI for trading and predicting market trends in general, but, unlike academics (and a segment of the tech sector) I doubt they consider it in their interests to publish methods which competitors could then utilize.
It's difficult to source information on exactly what is being looked into and utilized in the financial sector because there is a lot of marketing noise (exaggerated claims,
 unreliable sources) but I did find these articles:
Will AI-Powered Hedge Funds Outsmart the Market? (Tech Review; 2/4/2016)
"AI Hedge Fund Is Said to Liquidate After Less Than Two Years (Bloomberg; 9/7/2018)"
My gut tells me that Machine Learning methods will surpass humans in these kinds of decisions before too long (educated guess), and only increase in utility as the dataset these algorithms draw from grows, because it's ultimately a statistical problem.

AI is related to Game Theory, the study of economic decision-making, in the context of utility.  Game Theory might be said to have had its greatest success in computing in general, via minimax, but has traditionally been much harder to apply in real world economics.  Minimax can be utilized in machine learning, and it's actually hard to think of any economic decision-making that wouldn't utilize it in some form.
Answer: Machine learning based hedge funds are currently the worst performing slice through the industry. Large quant funds also claim to use ML but their performance is also very poor and worsening over time. Mostly what they say they are dong is not really what they are actually doing. I know of cases where funds claimed to be doing AI but actually its just simple technical analysis. Successful applications are more in the area of data collation of sentiment using NLP or feature extraction using dimensional reduction but these are not actually part of the trading strategies themselves. The only ML influenced trading I know is HFT trading of the order book which is a well define problem divorced from the actual price series itself. Apart from that 99% of ML use in the hedge fund industry is solely as snake oil for their marketing departments. Out of 10,000 or so hedge funds world wide only 0.25% generate alpha according to academic studies. That's 25 out of 10,000 ... and many of those will be cheating like SAC.
The fundamental problem is that ML requires data that is high dimensional, highly structured and is low noise and has stationary dynamics and statistical moments. Unfortunately financial price series are low dimensional, unstructured and noise dominated (negative SNR) and exhibit multi-level non-stationarity of the underlying processes and statistical moments in a manner highly related to multi fractals. It is hard to imagine a time series less suitable for machine learning.
Comment: Correct - its a level 2 chaotic system where realisation of some inefficiency and subsequent exploitation means it will vanish so even if you do find something it wont be there for long unless you have a significant moat of innovation to exclude others. Observation changes the thing being observed
Comment: There was a marketwatch article on this re: the techniques not providing utility when everyone is using them--essentially they seem to cancel each other out. [AI has become so popular in picking stocks that it's become ineffective](https://www.marketwatch.com/story/ai-has-become-so-popular-in-picking-stocks-that-its-become-ineffective-2017-10-06)


ASP.NET: 3rd party plugins to export data from GridView to Excel

Question: Been using this method to export an excel file:
HttpContext.Current.Response.Clear();
        HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Single_Raw.xls"));
        HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
using (StringWriter sw = new StringWriter())
{
    using (HtmlTextWriter htw = new HtmlTextWriter(sw))
    {
       // some code

        HttpContext.Current.Response.Write(sw.ToString());
        HttpContext.Current.Response.End();
    }
}

But there's a huge limitation with this method, Excel displays this warning every time I open the Excel file:
The file you are trying to open < > is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
The second method suggested to me was using Interop, but there were also some limitations:
http://www.gemboxsoftware.com/LA/Excel-Automation-and-Excel-Interop.htm
One of which is that all the client's computers should have the same Excel version.
Now I'm desperately looking for other methods even if it means using a third party plugin. As long as it's free and can be used in a company website.
Answer: Use: LumenWorks.Framework.IO.Csv
http://www.codeproject.com/KB/database/CsvReader.aspx


Adjective for having enough and satisfactory food

Question: I have eaten enough food. The food was delicious and may be I have eaten a lot more than required. I enjoyed it. Now I am very happy about it. How to describe this? Should we say "I have had enough food/ satisfactory meal" or should it be "a decent meal". Somebody suggested me "bellyful" which I don't think is right in this situation because 'bellyful' talks about only quantity. Please suggest right vocabulary.
Comment: I would be very surprised if this would count as English idiom, but my grandfather used to say after a such a meal:
_If things don't change, I'll never eat again_.
This referred both to his full belly and the feeling of satisfaction because of the quality of the meal.
Comment: *Well-fed* is the first thing that comes to mind.
Answer: There are many ways to say this, some more colloquial than others.
The most common in my experience is "full".

I'm full.  I couldn't eat another bite.

Others:

I'm stuffed.
I'm satisfied
I'm satiated.
I couldn't eat another thing.

Some colorful colloquialisms

I'm stuffed to the gills
If I eat any more I'll pop.
If I eat any more you'll have to cart me out in a wheelbarrow.
I'm stuffed like a turkey

I'm sure there are dozens more, but that's all I can come up with for now.