and (52,035)


Calculate relative time in C#

Calculate relative time in C#

Given a specific DateTime value, how do I display relative time, like: 2 hours ago 3 days ago a month ago…


.net Difference between Math.Floor() and Math.Truncate()

What is the difference between Math.Floor() and Math.Truncate() in.NET?…


SQL Server 2005 implementation of MySQL REPLACE INTO?

MySQL has this incredibly useful yet properitary REPLACE INTO SQL Command. Can this easily be emulated in SQL Server 2005? Starting a new Transaction, doing a Select() and then either UPDATE or INSER…


Generate list of all possible permutations of a string

How would I go about generating a list of all possible permutations of a string between x and y characters in length, containing a variable list of characters. Any language would work, but it should b…


c# WinForms ComboBox data binding gotcha

Assume you are doing something like the following List<string> myitems=new List<string>{"Item 1", "Item 2", "Item 3"}; ComboBox box=new ComboBox(); box.DataSource=myitems; Combo…


What is the difference between an int and an Integer in Java and C#?

I was reading More Joel on Software when I came across Joel Spolsky saying something about a particular type of programmer knowing the difference between an int and an Integer in Java/C#(Object Orien…


c# Robust Random Number Generation

I'm looking for a performant, reasonably robust RNG using no special hardware. It can use mathematical methods(Mersenne Twister, etc), it can "collect entropy" from the machine, whatever. On Linux/et…



php Encrypting Passwords

What is the fastest, yet secure way to encrypt passwords in(PHP preferred), and for which ever method you choose is it portable? In other words if I later migrate my website to a different server wil…


windows Visual Studio Setup Project-Per User Registry Settings

I'm trying to maintain a Setup Project in Visual Studio 2003(yes, it's a legacy application). The problem we have at the moment is that we need to write registry entries to HKCU for every user on th…


svn Why is Git better than Subversion?

I've been using Subversion for a few years and after using SourceSafe, I just love Subversion. Combined with TortoiseSVN, I can't really imagine how it could be any better. Yet there's a growing nu…




how example with between difference from java the for not