UPDATE
table
SET
datetimecol = DATEADD(day, (ABS(CHECKSUM(NEWID())) % 65530), 0)
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Wednesday, May 13, 2015
How to update rows with a random date
How to convert IList to IQuerable
IQueryable query = new List() { 1, 2, 3, 4, 5}.AsQueryable();
How to check if IQueryable result set is null or empty
list will never be null with LINQ; it will simply represent an "empty collection" if need be. The way to test is with the Any extension method:
// list has at least one item
}
if (list.Any()) {// list has at least one item
}
What “exec sp_reset_connection” shown in Sql Profiler means?
sp_reset_connection indicates that connection pool is being reused
Saturday, May 9, 2015
Disabling Chrome, Firefox, Safari, Opera, IE Autofill
<form> <!-- fake fields are a workaround for chrome autofill getting the wrong fields --> <input style="display: none" type="text" name="fakeusernameremembered" /> <input style="display: none" type="password" name="fakepasswordremembered" /> </form>
Subscribe to:
Comments (Atom)