855 reputation
812
bio website
location Texas
age
visits member for 3 years, 7 months
seen 23 hours ago

Mar
27
answered Write to stdout and redirect or write directly to file?
Mar
5
comment Apple eating problem
@mattnz: I suppose this algorithm needs to run for each turn.
Feb
27
comment How do I explain to my boss what a 'Virtual Machine' means?
It is The Matrix!
Feb
25
comment Apple eating problem
This seems like a solution (or at least good enough for most cases). Could you explain or proof why it is working?
Feb
24
comment Apple eating problem
Are you sure you literally repeated the original question? The question appears like a NP hard problem. Given the input size (10K), it is basically not solvable in a contest.
Jan
21
comment Should I lock a list of objects while a socket is receiving messages?
The MSDN document has a thread safety section. If you read it, you would know you cannot assume thread safety on public members, which means you should lock the object when you add, remove and access an item.
Dec
18
comment What can go wrong with composing a method name out of a string?
Am I missing something? The question asks about the problem with composing method name but this answer talks about non-existing method. Would a missing method be a problem in javascript regardless how it is called as long as no existence check?
Dec
16
awarded  Good Answer
Dec
13
answered DTOs matter on ASP.NET MVC JSON Action?
Oct
24
comment Safest way (i.e. HTTPS, POST, PGP) to send decryption keys through the web?
There may be a way to decrypt the encrypted SQLite database in memory and operate on the memory copy directly from the application. Of course a determined hacker can still scan the applications memory and recover the decrypted database but it's admittedly much harder for most casual hack.
Oct
24
answered Safest way (i.e. HTTPS, POST, PGP) to send decryption keys through the web?
Oct
23
awarded  Popular Question
Oct
4
comment Is it safe to display information about old passwords on login failure?
@Ozz: the attacker will be the worst one in his business if he relies on trying random combinations from UI. We have to agree on this - trying another one's password on UI is painful and slow, if it's not next to impossible. However, if an attacker has determined to hack an account in this way, then the only protection is a strong password. The message in question does not affect significantly efforts needed for the attack.
Oct
4
comment Is it safe to display information about old passwords on login failure?
@Rig: attackers should be your least concern because it is equivalently hard to try out the old password and the current password. The main concern should be users who accidentally typed a wrong user name and a wrong password that happened to be yours, and the user must be curious enough to decide to dig deeper about your account, now calculate the odd.
Oct
2
answered Why do books say, “the compiler allocates space for variables in memory”?
Sep
9
awarded  Yearling
Aug
28
comment Best Practices To Create Error Codes Pattern For an Enterprise Project in C#
I didn't down vote you(take it easy, otherwise everyone will have to repeat this:). If you had worked or called in service desk, it's a lot easier to just communicate a short number than an error message. An error message is guaranteed to change when it is communicated orally.
Aug
9
comment Do I need IDs in my database if the records could be identified by the date?
SQLite will always create a integer column for rowid if you don't specify an integer PK. So don't count on not having a "ID" column as a way to save space.
Aug
7
comment Find index of item closest to value, but is also less than value
Your both code examples do the different things than you are asking - they both find the first occurrence before which the sum of numbers is less than the given number. If this is your goal, both code are already the fastest way of doing it.
May
17
comment Creating a text input simplifaction tool
If your CRM is web based, don't forget GreaseMonkey. Otherwise, I don't think you need a web based solution. What you are trying to do seems like some text parsing and templating. Most scripting languages (Perl, Ruby, Python...) are really good at it and far more better than JS.