?php the_time('F, Y');?>

How To Redirect To SSL Using Apache’s .htaccess File?

Friday, August 31st, 2007

# If we have neither mod_ssl nor mod_rewrite # then let's simply deny the access: deny from all # If we have mod_rewrite # then let's redirect to https version of requested page RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} # else (if we have mod_ssl) # let's make sure that we require SSL SSLRequireSSL # Finally, if anything went ...

Setting 301 Redirect - Complete Guide

Thursday, August 30th, 2007

301 Redirect is interpreted as "permanently moved". Setting a 301 redirect is the best and Search Engine Friendly method for redirecting a webpage. By using 301 redirect, you can move your files around, change file names and redirect your pages without losing your search engine rankings. 301 Redirect in Apache - ...

Simulating Oracle Synonyms in MS SQL Server

Wednesday, August 29th, 2007

Oracle Synonyms can be easily simulated in SQL Server by using Views. The following example creates a view that returns the CarID and CarPurchaseDate from Cars table. CREATE VIEW vCars AS SELECT CarID, CarPurchaseDate FROM Cars SELECT statement: SELECT * FROM vCars Let's create a view which is Sql Server version of Oracle's TABS synonym or USER_TABLES data ...

Design Patterns - Builder

Tuesday, August 28th, 2007

The Builder Pattern is a software design pattern. The purpose of using it is creating different represenatations from the same construction. It is accomplished by separating the construction of a complex object from its representation. Often, Builder Pattern is used to build Composite pattern, a structure pattern. STRUCTURE JAVA EXAMPLE /** "Product" */ ...

Design Patterns - Abstract Factory

Monday, August 27th, 2007

Design patterns are categorized in three groups: - Creational Patterns - Structural Patterns - Behavioral Patterns Today you will learn about "Abstract Factory Pattern" from "Creational Patterns" category: You can use the Abstract Factory Pattern to encapsulate a group of factories that have a common theme. It separates implementation from general use by creating implementation ...

HTML Colors - Cross-Browser Color Values

Sunday, August 26th, 2007

To ensure that all computers would display the colors correctly when running a 256 color palette, the 216 cross-browser colors palette was created: 000000 000033 000066 000099 0000CC 0000FF 003300 003333 003366 003399 0033CC 0033FF 006600 006633 006666 006699 0066CC 0066FF 009900 009933 009966 009999 0099CC 0099FF 00CC00 00CC33 00CC66 00CC99 00CCCC 00CCFF 00FF00 00FF33 00FF66 00FF99 00FFCC 00FFFF 330000 330033 330066 330099 3300CC 3300FF 333300 333333 333366 333399 3333CC 3333FF 336600 336633 336666 336699 3366CC 3366FF 339900 339933 339966 339999 3399CC 3399FF 33CC00 33CC33 33CC66 33CC99 33CCCC 33CCFF 33FF00 33FF33 33FF66 33FF99 33FFCC 33FFFF 660000 660033 660066 660099 6600CC 6600FF 663300 663333 663366 663399 6633CC 6633FF 666600 666633 666666 666699 6666CC 6666FF 669900 669933 669966 669999 6699CC 6699FF 66CC00 66CC33 66CC66 66CC99 66CCCC 66CCFF 66FF00 66FF33 66FF66 66FF99 66FFCC 66FFFF 990000 990033 990066 990099 9900CC 9900FF 993300 993333 993366 993399 9933CC 9933FF 996600 996633 996666 996699 9966CC 9966FF 999900 999933 999966 999999 9999CC 9999FF 99CC00 99CC33 99CC66 99CC99 99CCCC 99CCFF 99FF00 99FF33 99FF66 99FF99 99FFCC 99FFFF CC0000 CC0033 CC0066 CC0099 CC00CC CC00FF CC3300 CC3333 CC3366 CC3399 CC33CC CC33FF CC6600 CC6633 CC6666 CC6699 CC66CC CC66FF CC9900 CC9933 CC9966 CC9999 CC99CC CC99FF CCCC00 CCCC33 CCCC66 CCCC99 CCCCCC CCCCFF CCFF00 CCFF33 CCFF66 CCFF99 CCFFCC CCFFFF FF0000 FF0033 FF0066 FF0099 FF00CC FF00FF FF3300 FF3333 FF3366 FF3399 FF33CC FF33FF FF6600 FF6633 FF6666 FF6699 FF66CC FF66FF FF9900 FF9933 FF9966 FF9999 FF99CC FF99FF FFCC00 FFCC33 FFCC66 FFCC99 FFCCCC FFCCFF FFFF00 FFFF33 FFFF66 FFFF99 FFFFCC FFFFFF

Sending An Email In C# Using SMTP

Friday, August 24th, 2007

Sending an email from your c# application is very easy. It's even more easy if you have access to smtp server. Here is the code which you can use in your applications. using System.Web.Mail;... public static void SendEMail(string body, string subject, string from, string to, string bcc) {   MailMessage EMail = ...

Handling errors and custom errors pages in ASP.Net.

Thursday, August 23rd, 2007

Good website has to have errors handling implemented. It looks good and it's very useful. You can set up sending emails with errors details after error occurs or save errors to database. There are three ways you can handle errors in your ASP.NET pages. 1. Page_Error Method You can set error handling ...

Parsing PDF Files In C#

Tuesday, August 21st, 2007

If you are trying to extract text from pdfs by parsing them, there is a easy way to do this. All what you have to do is download itextsharp.dll from here or from this website: http://sourceforge.net/projects/itextsharp/ Then look at the implementation and usage of the class, which you can use to extract ...

SQL SERVER DATEDIFF - T-SQL version of days_between and months_between.

Monday, August 20th, 2007

Returns number of days, months, weeks, hours, minutes etc. between two dates. Syntax: DATEDIFF(datepart_code, startdate, enddate); Date Part | Code -------------------------------- Year | yy, yyyy Quarter | qq, q Month | mm, m Day of year | dy, y Day | dd, d Week | wk, ww Hour | hh Minute | mi, n Second | ss, s Millisecond | ms