tech fixtechnical topics I don't want to forgetsp_MSforeachdb > one query against all databases
Ever need to run a single SQL query against every database on your SQL Server? No sweat, just use the stored procedure sp_MSforeachdb
usage: EXEC sp_MSforeachdb 'USE ? SELECT * FROM yo ' To all my SQL Server homiesJava Date object custom format
/////////////////////////// // get the current date in 2|21|12 format String dateStamp() { return new SimpleDateFormat( "MM|dd|yyyy" ).format( new Date() ); } EPOCH time in Coldfusion
<cfoutput> #DateDiff( "s", DateConvert( "utc2Local", "January 1 1970 00:00" ), now() )#; </cfoutput> Want to read your Twitter feed inside of MS Outlook?Here's a handy tip for reading Twitter feeds inside of MS Outlook. If you want to read the twitter feed of a particular user in Outlook, just add their RSS feed. Here is the formula for getting a Twitter feed in RSS : RSS URL = http://api.twitter.com/1/statuses/user_timeline.rss?screen_name={ twitter user }
* This tip applies to any version of Outlook that includes RSS support. I think this is Outlook 2007 and higher. Open hidden files in TextEdit, using Terminal
* Just change the file path to your hidden file.
Ever need to window.close() a Telerik RadWindow after a PostBack?Here's a quick little tip for closing a Telerik RadWindow modal dialog automatically after a Postback. After your postback operation, refresh the parent opener using javascript and the dialog disappears.
// all good, reload parent to close the RadWindow popup
Response.Write("<script type=\"text/javascript\">parent.location.href = parent.location.href;</script>");
This isn't a silver bullet, but it works for my project since reloading the parent page is perfectly acceptable.
How to get the current asp.net file name in one line of code.using System.Linq; // .Last is a LINQ extension. Be sure to import System.Linq first Request.Url.Segments.Last<string>();
// If you don't want to use LINQ, you can do this Request.Url.Segments.GetValue( Request.Url.Segments.Length-1).ToString();
ASP.NET Page events and methods diagram
Did you know ASP.NET's Page class has this many events and methods?
![]() You can read more about the ASP.NET Page lifecycle on MSDN.
Slowly letting go of Linked InI've got a fulltime gig now, and LinkedIn is becoming more and more of a time waster. So now I'm trying something out. Updated my email auto signature and replaced LinkedIn profile profile with my Google+ profile. Doesn't sound like much, but it is stategery.
|
|