A free SQL Server 2008 Express profiler

Posted by: ozzie

SQL Server Management Studio 2008[r2] has a built-in profiler (tells you how long queries take, reads/writes, CPU utilization, etc…). Unfortunately you won’t find it in the Express version.  Since you’ve been getting spoiled with all the open source sugar out there lately, you’re thinking, “@#^*#”?! The heck?! Cool it, man. You got this… Go download Express Profiler […]

Wow… how time flies!

Posted by: ozzie

Has it really been over 3 years since my last post?! Un-be-lievable. That’s around the same time that I moved up to NY! Does that have something say about the pace over here? Ok, so I had actually swapped out my blog for a one page resume while being on the market a while back […]

Character Encoding for HTML and XML

Posted by: ozzie

HTML <meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ > XHTML (note the slash at the end) <meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ /> XML <?xml version=”1.0″ encoding=”utf-8″ ?> Reference http://www.w3.org/International/O-charset

ASP.Net URL/Request Paths

Posted by: ozzie

Here’s a good article on the different properties: http://www.xcess.info/request_url_parameters_details_asp_net_aen.aspx Request.Url Full URL : http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue Request.ApplicationPath : /virtual_dir Request.CurrentExecutionFilePath : /virtual_dir/myrep/page.aspx Request.FilePath : /virtual_dir/myrep/page.aspx Request.Path : /virtual_dir/myrep/page.aspx Request.PhysicalApplicationPath : d:\Inetpub\wwwroot\Websitename\virtual_dir\ Request.QueryString : /virtual_dir/myrep/page.aspx?q=qvalue Request.Url.AbsolutePath : /virtual_dir/myrep/page.aspx Request.Url.AbsoluteUri : http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue Request.Url.Host : localhost Request.Url.Authority : localhost:2000 Request.Url.LocalPath : /virtual_dir/myrep/page.aspx Request.Url.PathAndQuery : /virtual_dir/myrep/page.aspx?q=qvalue Request.Url.Port : 2000 Request.Url.Query : […]

jQuery Modal Quick Example

Posted by: ozzie

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” > <head> <title>Untitled Page</title> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js” type=”text/javascript”></script> <script src=“http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js” type=“text/javascript”></script> <link href=“http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/base/jquery-ui.css” rel=“stylesheet” type=“text/css” /> <script type=“text/javascript”> $(document).ready(function() { $(“#dialog”).dialog({ autoOpen: false, modal: true, resizable:false, overlay: { backgroundColor: ‘#000′, opacity: 0.5 }, buttons: { “Cancel”: function() { $(this).dialog(“close”); }, “No”: function() { //your javascript here […]

Generate PDF files using C# and FO.Net

Posted by: ozzie

Given that you have an XSL-FO template ready to go, it’s pretty straight-forward to generate a PDF using FO.Net. It’s not easy to create an XSL-FO from scratch, and I wouldn’t care to. There are programs that can convert your HTML into XSL-FO, though they usually cost a lot of money. You can create one […]

XML from SQL using Correlated Subqueries

Posted by: ozzie

It’s really easy to get an XML object from an SQL database and structure the elements in anyway you like. If you’re familiar with creating SELECT statements, you’ll be a pro with this cool way of creating XML objects to feed your application or whatever else. So, you have your plain vanilla select query: SELECT […]

Creating a PDF with iTextSharp and ASP.Net MVC 2

Posted by: ozzie

Here’s a simple example to create a PDF on the fly and provide it as a streaming download, rather than creating a physical file: public FileStreamResult About() { //mem buffer MemoryStream ms = new MemoryStream(); //the document Document document = new Document(); //the writer PdfWriter.GetInstance(document, ms);//fs); //open the document document.Open(); //add header image //Image headerlogo […]