Archive for the ‘Web Hosting’ Category

Configuring Oracle SQL Developer for Microsoft SQL Server and MySQL

Configuring Oracle SQL Developer for Microsoft SQL Server and MySQL

Most of DBAs I know, use TOAD for doing daily tasks, but I prefer Oracle SQL Developer. In my opinion, it has 3 important advantages against TOAD:

  • It’s platform-independent: Although I use Windows on my laptop now, I’m a big fan of Linux and Solaris, and I don’t like being dependent on a specific OS. Thanks to Java, Oracle SQL Developer is platform-independent.
  • It supports multiple databases: You can use SQL Developer for Microsoft Access, Microsoft SQL Server, MySQL, TimesTen, DB2 and (of course) Oracle.
  • It’s extendible: Yes I know that there are not too much documents about it, but it’s extensible. For example, check FourthElephant’s extensions for SQL Developer: http://www.fourthelephant.com/sqldeveloper/download/

TOAD has a better interface because of using native Windows components but you can get used to SQL Developer if you spend time on it. Anyway, this blog has nothing to do with comparing SQL Developer and TOAD. I’ll just show how to configure SQL Developer to connect Microsoft SQL Server and MySQL.

You need to download and install the required (and supported) JDBC drivers to make Oracle SQL Developer connect MySQL and Microsoft SQL Server.

For MySQL download the J/connecter from http://www.mysql.com/products/connector/

For Microsoft SQL Server download the jTDS from http://sourceforge.net/projects/jtds/. The JDBC driver which is published by Microsoft doesn’t work with Oracle SQL Developer, at least I couldn’t make it work.

After you download the JDBC drivers, unzip them and then open prefences window in SQL Developer ( tools >> preferences ):

To add JDBC driver for Microsoft SQL Server, click “add entry…” button and find “jtds-1.2.5.jar” in the file open dialog.

To add JDBC driver for MySQL, click “add entry…” button and find “mysql-connector-java-5.1.17-bin.jar” in the file open dialog.

You need to restart SQL Developer to make these new JDBC drivers active. Then you can create a connections for Microsoft SQL Server, Sybase (because JDTS supports Sybase) and MySQL:

that’s it.

Hack WordPress, Edit More Default Comments & Save Time

Hack WordPress, Edit More Default Comments & Save Time

wordpress comments editor image

This tutorial explains how to increase the default number of comments shown on the WordPress Admin Comments Editor page, by editing edit-comments.php.

Dunno about you, but life’s too short to be clicking thru’ all those view/edit comments pages, with only 20 listed by default per page. Let’s sort that.

Problem: Too darned popular. OK .. maybe it’s all the damn spam, mam.

Solution: Hack the WordPress code.

So I get back from a few days hols and, having clearly neglected my blog, crack it open to find a fistful of comments. Shucks. I can feel a hack coming on.

Googling “wordpress how display more than 20 comments”, up pops the splendid Woopran John P’s OneMansBlog, a resource that rarely fails to tease. Then again, being WordPress, John’s fix is outdated, so I figured I’d tweak his solution, and here’s the deal. (Course, this fix will be outfoxed eventually too. Such is strife.)

Goto the root of your WordPress installation and, from there, open the file wp-admin/edit-comments.php

Search for the line:-

1.$comments_per_page = 20;

Swap the default 20 to however many comments you want to see per page. I figure 50 comments is about right for guvnr.

Save the file.

Thassit. Except ..

When you upgrade WordPress, you’ll have to do that again but, hey, it’s a whole lot quicker than clicking through all those pages, so you will save lots of time.

Erls Corporation is on Github.com

We, Erls Corporation are proudly happy to announce that we are on github.com

we may be reach at :- https://github.com/organizations/Erls-Corporation

github

Designing a vimeo player for website

Coding a vimeo Player is not a hard task but maitaining its skin and style is a very deficult task. any one can design a small vimeo player just by coding some of the lines like the lines given below and the vimeo player is ready for you.

Note :- Please replace &lt; by < and &gt; by > before making it as your player. the code is as follows.

&lt;div style=”width:504px; height:412px; overflow:hidden;”&gt;
&lt;object&gt;
&lt;param name=”allowfullscreen” value=”true” /&gt;&lt;param name=”wmode” value=”opaque” /&gt;
&lt;param name=”allowscriptaccess” value=”always” /&gt;
&lt;param name=”movie” value=”http://vimeo.com/moogaloop.swf?clip_id=2285902&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#8243; /&gt;
&lt;embed src=”http://vimeo.com/moogaloop.swf?clip_id=2285902&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&#8243; type=”application/x-shockwave-flash” allowfullscreen=”true” wmode=”opaque” allowscriptaccess=”always” width=”504″ height=”412″&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;

Now the vimeo player has been designed.

A detailed Discussion about CSS3 : border-image

Another exciting new border feature of CSS3 is the property border-image. With this feature you can define an image to be used instead of the normal border of an element. This feature is actually split up into a couple of properties: border-image and border-corner-image. These two values are shorthands for:

  • border-image:
    • border-top-image
    • border-right-image
    • border-bottom-image
    • border-left-image
  • border-corner-image:
    • border-top-left-image
    • border-top-right-image
    • border-bottom-left-image
    • border-bottom-right-image

border-image currently works in Safari and Firefox 3.1 (Alpha). The syntax to use it is:

border-image: url(border.png) 27 27 27 27 round round;

Which results in:

Lorem ipsum dolor sit amet.

Or:

border-image: url(border.png) 27 27 27 27 stretch stretch;

Which then results in:

Lorem ipsum dolor sit amet.

For those of you not so lucky as to be able to see this, here are screenshots of the two examples.

Number one:
border-image first example
Number two:
border-image second example

The new CSS3 property border-image is a little tricky, but it can allow you to create flexible boxes with custom borders (or drop shadows, if that’s your thing) with a single div and a single image. In this article I explain how the border-image shorthand property works in today’s browsers.

The basic idea

The border-image shorthand property has 3 parts:

border-image: url(border-image.png) 25% repeat;

Essentially, these allow you to specify:

  1. An image to use as the border
  2. Where to slice that image, dividing the image into 9 sections
  3. How the browser should apply those sections to the edges of your element

The pertinent details

Let’s look at each part of the process in a little more detail. The first part is easy, and is familiar from the background-image property. For demonstration purposes I’ll use this image, which is 100px x 100px:

A border-image

Slicing your image

The second part can have from one to four values, much like the border-width property, and they are specified in the same order: top, right, bottom, left. You can use percentages or pixels. Strangely, the percentages require the “%”, while pixels should be listed without the “px”:

border-image: url(my-image.gif) 25% 30% 10% 20% repeat;
border-image: url(my-image.gif) 25 30 10 20 repeat;

In this case, since my image is 100px x 100px, the two rules above are equivalent – they slice the image in the same places. I’ve added some dimensions on my image to demonstrate:

A border-image

Repeat, Round, Stretch

border-image will always place the corner sections of your image into the corresponding corners of your element box, but the third part of the shorthand rule tells the browser how to treat the middle sections of your image — the ones that will go along the edges of your element. Repeat (repeat, or tile, the image) and stretch (stretch, or scale, the image) are pretty self-explanatory. Round means tile the image but only so that a whole number of tiles fit, and otherwise scale the image. Right now, Safari and Chrome interpret round asrepeat. There can be up to two values: one for the top and bottom edges of the element, and one for the left and right. Here’s an example with the top/bottom value set to repeat, and the left/right value set to stretch:

#example-one {
 border-width:25px 30px 10px 20px;
 -moz-border-image:url("border-image.png") 25 30 10 20 repeat stretch;
 -webkit-border-image:url("border-image.png") 25 30 10 20 repeat stretch;
 border-image:url("border-image.png") 25 30 10 20 repeat stretch;
}

Screenshot for Example One

LIVE DEMO, RSS READERS CLICK OVER TO SEE. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu arcu non dui consequat vestibulum non vitae eros. Donec imperdiet lorem at mi rhoncus lacinia. Phasellus porttitor ligula eu justo condimentum eget placerat arcu pharetra. Proin fringilla vulputate eros in accumsan. Sed mi nibh, pulvinar eu sollicitudin ut, feugiat non ipsum. In ornare, quam sit amet tempor suscipit, erat odio suscipit nisi, eu gravida nisl orci ut arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Border-width

border-image won’t do anything if you don’t specify a width for your border. For browsers that understand border-image, your image slices will be scaled to the specified width. If you use the border shorthand property, it provides a nice fallback for browsers that don’t:

#example-two {
 border:50px double orange;
 -moz-border-image:url("border-image.png") 25 30 10 20 repeat;
 -webkit-border-image:url("border-image.png") 25 30 10 20 repeat;
 border-image:url("border-image.png") 25 30 10 20 repeat;
}

Screenshot of Example Two

LIVE DEMO, RSS READERS CLICK OVER TO SEE.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu arcu non dui consequat vestibulum non vitae eros. Donec imperdiet lorem at mi rhoncus lacinia. Phasellus porttitor ligula eu justo condimentum eget placerat arcu pharetra. Proin fringilla vulputate eros in accumsan. Sed mi nibh, pulvinar eu sollicitudin ut, feugiat non ipsum. In ornare, quam sit amet tempor suscipit, erat odio suscipit nisi, eu gravida nisl orci ut arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Or you can specify each width individually (in this example I’ve specified widths such that the image slices aren’t scaled at all):

#example-three {
 border-color:orange;
 border-style:double;
 border-width:25px 30px 10px 20px;
 -moz-border-image:url("border-image.png") 25 30 10 20 repeat;
 -webkit-border-image:url("border-image.png") 25 30 10 20 repeat;
 border-image:url("border-image.png") 25 30 10 20 repeat;
}

Screenshot of Example Three

LIVE DEMO, RSS READERS CLICK OVER TO SEE. dolor sit amet, consectetur adipiscing elit. Aenean eu arcu non dui consequat vestibulum non vitae eros. Donec imperdiet lorem at mi rhoncus lacinia. Phasellus porttitor ligula eu justo condimentum eget placerat arcu pharetra. Proin fringilla vulputate eros in accumsan. Sed mi nibh, pulvinar eu sollicitudin ut, feugiat non ipsum. In ornare, quam sit amet tempor suscipit, erat odio suscipit nisi, eu gravida nisl orci ut arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Using a plain border at the same widths as your border-image won’t always be ideal, however, so you may want to use conditional stylesheets to give IE some different border styles altogether.

Browser quirks

Predictably, IE doesn’t understand anything of border-image. Browsers that do support border-image only support the shorthand property, not all the individual properties that aredescribed in the spec. Some potentially useful properties aren’t supported at all, especiallyborder-image-outset, which would solve this problem.

Also, the default behavior is supposed to be to discard the center section of the image, and use the ‘fill’ keyword on the border-image-slice property to preserve it:

The ‘fill’ keyword, if present, causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.) (Read the spec)

But the current browser behavior is to preserve the middle, and there is no way to turn it off. Thus, if you don’t want your element’s content area to have a background, the center section of your image must be empty. However, you can use this filling behavior to your advantage, to create a box with a fancy border and background, with only one image.

Interactive demo

I built a border-image demo page to help me get my head around this complicated new set of CSS3 properties. You can pick an image, specify repeat, round, or stretch, and adjust the border-width and slicing. Enjoy!

Examples in the wild

CSS3 makes it possible to specify an image as an element’s border, instead of just a solid color. While on the surface this doesn’t seem particularly interesting, the way the property works makes it more than that which meets the eye. The border-image property lets you specify a single image for the purpose and then slices that image to create the desired border effect. Yes, CSS is slicing now. border-image is currently supported in all the modern browsers to various degrees except IE (as of IE9). The shorthand syntax is:

border-image: url(image.png) 25 40 12 10 stretch;

Where:

  • url: The image that should be used as the border image.
  • slicevalues: Up to four numbers that specify where the browser should slice the image:
    • The 1st value sets the offset of the first horizontal cut from the top of the image. For pixel units, do NOT include the “px” suffix.

    • The 2nd value sets the offset of the second vertical cut from the right edge of the image.

    • The 3rd value sets the offset of the third horizontal cut from the bottom of the image.

    • The 4th value sets the offset of the fourth vertical cut from the left edge of the image.

  • stretch: How the slices should be oriented inside the element’s border. Valid values are “stretch”, “repeat”, “round”, or “space”.

For slicevalues, if only one number is defined, the same value will be used for all 4 cuts. If 2 numbers are defined, the first is used for the top and bottom cuts, and the second the left and right cuts. Regardless, 4 cuts are made to the image in total, and the browser ends up with 9 slices that it uses to put together the border image of an element. Each slice is used to fill the corresponding edges of the element’s border, with the center slice covering the element itself (and should be made transparent in most cases).

This post isn’t about a detailed description of border-image– that will have to be for another post. For this post, what I want to demonstrate is how to use this property to easily add image frames to containers on your page. First, create the image you’d like to use as the frame; here I’ve whipped up 2 simple frames to illustrate the technique:

  

Note that both images above have a transparent inside so the content they are framing can show through.

Now, to the heart of the matter- to add an image border to an element, define the border-image property with slicevalues that cut up the image as desired. Also define a border-width property echoing those values. Enough talk, to some examples now! Note that the below examples do not work in IE (as of IE9):

Example 1:

Found across much of the tropics, the coconut is known for its great versatility as seen in the many domestic, commercial, and industrial uses of its different parts. Coconuts are part of the daily diet of many people. Its endosperm is known as the edible “flesh” of the coconut; when dried it is called copra. The oil and milk derived from it are commonly used in cooking and frying; coconut oil is also widely used in soaps and cosmetics. The clear liquid coconut water within is a refreshing drink and can be processed to create alcohol. The husks and leaves can be used as material to make a variety of products for furnishing and decorating. It also has cultural and religious significance in many societies that use it. -Wikipedia

CSS:

.imageborder{
border-width: 20px;
-moz-border-image: url(frame.gif) 20 stretch; /*Mozilla version*/
-webkit-border-image: url(frame.gif) 20 stretch; /*Webkit version*/
-o-border-image: url(frame.gif) 20 stretch; /*Opera version*/
-ms-border-image: url(frame.gif) 20 stretch; /*IE syntax when it does support this prop*/
border-image: url(frame.gif) 20 stretch; /*Standard version*/
}

Markup:

<div style=”width:50%;min-height:150px”>
Content text here…
</div>

Example 2:

CSS: Same as above.

Markup:

<img src=”coconut.jpg” />

Example 3:

CSS:

.imageborder2{
border-width: 25px 30px;
-moz-border-image: url(frame2.png) 25 30 stretch;
-webkit-border-image: url(frame2.png) 25 30 stretch;
-o-border-image: url(frame2.png) 25 30 stretch;
-ms-border-image: url(frame2.png) 25 30 stretch;
border-image: url(frame2.png) 25 30 stretch;
}.

Markup:

<div style=”width:470px;height:300px;background:url(ocean_thumb.jpg) center center no-repeat”>
</div>

 

If you have other examples on live sites, I’d love to see them. Leave a link in the comments!

Debugging : How To Configure IIS 7.0 and Tomcat on Windows Server 2008

Question/Problem : How To Configure IIS 7.0 and Tomcat on Windows Server 2008
I have a Website designed in ASP.NET 3.0 and have another application in Java and after i read your some of the bogs came to know about the dependencies of java and dotnet so decided to combine both of the application in a single one web application. Actually Website in ASP.net is a Bio Portal and the application in java is a webmail Portal. since both are right at there places but the problem is that java based webmail needs Apache tomcat for execution as a must and have installed Bio Portal on a domain hosted on IIS 7.0 (Windows server 2008). is unable to interrelate both the technologies into one. could any one can help me.

Solution : For the purposes of this installation guide I used Java Runtime Version 6 Update 21, Apache Tomcat 6.0.29 and the Microsoft IIS Application Request Routing (ARR) 2.0 module.

You can download the software that I used in this guide from the following locations :

1. Java JRE Version 6 Update 21 (If have installed this go to point 2)
http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Apache Tomcat (32-bit/64-bit Windows Service Installer) (If have installed this go to point 3)
http://tomcat.apache.org/download-60.cgi

3. IIS Application Request Routing (ARR) 2.0 (If have installed Proceed from here to next)
http://www.iis.net/download/applicationrequestrouting

Start by installing the Java runtime (JRE) and accept the license agreement.

Then change the installation target folder to C:\Java and then click OK and wait while Java installs

Once you have installed Java you can start installing Tomcat. Double-click the apache-tomcat-6.0.29.exe file to invoke the Apache Tomcat Setup Wizard.

Choose a Custom installation and ensure that the Examples are selected as shown here. You wouldn’t necessarily want to install the sample applications in a production environment but we will be using them in this walkthrough so we need to install them.

Select to install Tomcat in the C:\Tomcat folder as shown here and then click Next.

Leave the default HTTP/1.1 Connector port set to 8080 and choose a password for the admin account.

The setup wizard should find your Java installation automatically.

Click install and wait while Tomcat setup completes. When the installation is complete click Finish.

Now that you have Tomcat up and running you can test your installation by pointing your server’s browser at http://localhost:8080 and you should see the default Apache Tomcat welcome page as shown here.

Now that we have got Tomcat working

Now the configuration of IIS 7.0 and Tomcat can be done with two ways

  1. using IIS ARR Module
  2. Using JK 1.2 ConnectorWe will be proceding for the solution step by step, so let us start our first step using IIS ARR Module.

1. How To Configure IIS 7.0 and Tomcat with the IIS ARR Module

we need to install and configure the IIS Application Request Routing module which will allow IIS to act as a proxy server and forward requests on to Tomcat. Run the ARRv2_setup_x86_en-us.EXE file (or ARRv2_setup_amd64_en-us.EXE if you are using 64-bit Windows) to begin the ARR setup routine.

When the ARR module installation has completed it will create a log file (arr_setup.log) which can be found the %TEMP% folder.

Now that the Application Request Routing (ARR) module has been installed we need to configure it to act as a proxy server (this functionality isn’t enabled by default). In IIS Manager highlight the Application Request Routing Cache feature and click Open Feature in the Actions pane.

Click Server Proxy Settings in the Actions pane.

Tick the Enable proxy checkbox and then click Apply. Leave all the default values in place.

Next we need to configure a URL Rewrite rule so that IIS knows what to do with requests which we want to forward to Tomcat. Click the Default Web Site, highlight the URL Rewrite icon and then click Open Feature in the Actions pane.

In the URL Rewrite feature click Add Rules in the Actions Pane.

In the Add Rule(s) dialog box select Blank rule and click OK.

In the Edit Inbound Rule feature assign a name to the new rule and type (examples.+) in the Pattern dialog box. The new rule should default to using Regular Expressions (if it doesn’t ensure that you select this option)

In the Action section of the Edit Inbound Rule feature ensure that the Action type is set to Rewrite and then enter http://localhost:8080/{R:0} in the Rewrite URL dialog box as shown below. Click Apply to create the new rule.

Everything we need to configure is now in place and we are ready to test. Start by browsing the ‘Request Headers’ sample application from Tomcat directly on port 8080 with the result shown here.

The final step is to browse the same ‘Request Headers’ sample application on port 80 so that the request will be handled by IIS before being forwarded to Tomcat by the ARR proxy. If everything is configured correctly you should see the sample application load successfully as shown here.

If you now examine the IIS log file (which can be found in C:\inetpub\logs\LogFiles by default) you will see that the request for the Tomcat sample application was processed by IIS and proxied by the ARR module. The IIS log file contains both the X-ARR-CACHE-HIT and X-ARR-LOG-ID details as shown here.

Using the IIS ARR module means that there is no longer any need to use the Tomcat JK 1.2 ISAPI Connector. However, I would always recommend that you test your application rigorously before deploying it in a production environment. If you do find any issues with ARR you can always get support in the IIS ARR forums here :

http://forums.iis.net/1154.aspx

2. How To Configure IIS 7.0 and Tomcat with JK 1.2 Connector

Now we need to configure the JK 1.2 Connector which will allow IIS to effectively act as a proxy and forward requests on to Tomcat. Start by creating a folder called ‘ISAPI’ under the Tomcat root folder. Then copy the isapi_redirect-1.2.28.dll file into the ‘ISAPI’ folder and rename the file to isapi_redirect.dll as shown here.

In order to configure the Tomcat connector you need to either add an entry in the Windows registry or you can use the isapi_redirect.properties file. The isapi_redirect.properties file tells the connector where to find its configuration files and also where the isapi_redirect DLL file is located. If you have used the same directory structure as I have you can configure your isapi_redirect.properties file as shown here.

We also need to either update or create the two Tomcat connector configuration files (workers.properties and uriworkermap.properties) so that the connector knows how to handle the requests it receives. These configuration files are documented on the Tomcat web site here : The Apache Tomcat Connector – Reference Guide
If you have just installed Tomcat with the sample applications then you can copy the sample uriworkermap.properties file shown here. Both config files need to placed in the Tomcat ‘conf’ folder which in this example is C:\Tomcat\conf

You can also copy the sample workers.properties file as shown below and save it to the C:\Tomcat\conf folder.

Now we need to configure IIS. Start by creating a virtual directory and give it an alias of ‘jakarta’ as shown here. Incidentally, you don’t have to call the virtual directory ‘jakarta’ – you can actually give it any name you like, just so long as the name you choose appears in the extension_uri line of your isapi_redirect.properties file.

Next we need to configure the virtual directory to have execute permission. This was a simple tick-box option in IIS 6.0 but in IIS 7.0 we need to click on the Jakarta virtual directory and then double-click Handler Mappings.

Within the Handler Mappings feature click Edit Feature Permissions in the Actions Pane.

Click Execute in the Edit Feature Permissions dialog box and click OK.

In the Handler Mappings feature you can now see that calls to ISAPI-dll files are enabled.

The next step is to add an ISAPI filter on the web site. To do this click on the web site and then double-click the ISAPI Filters feature.

In the Actions pane click Add.

In the Add ISAPI Filter dialog box enter a name and the path to the isapi_redirect.dll file and click OK.

The Tomcat ISAPI filter should now appear in the ISAPI Filters list as shown here.

The final step we need to take is to configure the ISAPI and CGI Restrictions feature in IIS 7.0. This is analogous to adding or allowing a Web Service Extension in IIS 6.0. In IIS Manager navigate to the Server Home and then double-click on the ISAPI and CGI Restrictions feature.

In the ISAPI and CGI Restrictions feature click Add on the Actions pane.

In the Add ISAPI or CGI Restriction dialog box enter a name and the path to the isapi_redirect.dll file, tick the Allow extension path to execute option and click OK.

The Tomcat ISAPI extension should now appear in the list with a Restriction status of allowed as shown here.

Everything we need to configure is now in place and we are ready to test. I started by requesting the ‘Hello World’ sample application from Tomcat directly on port 8080 with the result shown here.

The final step is to request the same ‘Hello World’ sample application using port 80 so that the request will be handled by IIS before being forwarded to Tomcat. If everything is configured correctly you should see the sample application load successfully as shown here.

If you now examine the IIS log file (which can be found in C:\inetpub\logs\LogFiles unless you moved it) you will see the request for the sample application being handled by IIS over port 80. One behaviour change that I have noticed is that the actual resource being requested isn’t logged with IIS 7.0 whereas it was in IIS 6.0, although I think this is likely to be a change in the bahviour of the ISAPI filter itself rather than any change in how IIS logs requests.

That’s It. I think it will help all of my visitors to have the solution for their problems. If have any Problems please feel free to post comments right here.

Creating Self Email Company like Gmail and Hotmail

Create your own Email Company like Gmail and Hotmail

 

Gmail and Hotmail provides great free email service. They both provide many free tools with their email service. Have you ever thought to create your own email company like Gmail, Hotmail? Yeah ! Many times, but didn’t find any good site to do this. Here is the guide to create your own professional email service like Gmail and Hotmail. All you must have is a domain name and good knowledge of Internet. We will do this by registering with Windows Live Domains which provides 500 free email accounts with 5 GB Space in each account and with many free services.

gmail hotmail 300x200 Create your own Email Company like Gmail and Hotmail

Steps to Create your own Email Company:

First of all, Go to https://domains.live.com. It requires your Hotmail Username and password, so keep them ready. Now, you have reached the Windows Live Admin Center, Click “Sign in”, at the login page, enter your Hotmail email address and password then click “Sign in”. I have registered two domains at there, so I will get a different page then the new ones. Click “Add Domain” button, then you will get a page saying “Create a Windows Live experience for your domain”. Enter your domain name in the field labeled “Provide your domain name” and mark the “Set up Windows Live Hotmail for my domain” and click “Continue”.  Now, you’ve reached the page “Review settings and accept agreement”, Click “I accept”. Then you will be redirected to the “Domain Settings” page. Now, all the settings in the Windows Live Domains have been setup, now go to your “Domain Manage” panel and change MX Records.

What happens after 500 Email accounts exceeded?

Windows Live Domains provides 500 email accounts, so you (and other users) can create 500 email accounts, what if you exceed this? The solution is available. Windows Live Domains provides more email accounts on the request of the domain admin. So, when you exceed it, just ask for more accounts.

Promote your Email Service:

email promote TechListen Create your own Email Company like Gmail and Hotmail

After getting email service, it’s time to promote it. Promote it on your blog/website, in emails, on business cards, etc. way. The more you promote, the more users you’ll get. You are not getting just the Email service for your domain, but you are getting lots of services free with it. You get SkyDrive (25 GB Free Space), Photos, etc. So, attract your visitors with these free services.

If you have any question about this process, then please let me know by commenting here. I will be happy to assist you icon smile Create your own Email Company like Gmail and Hotmail

Designing a division modal (Div Modal) Box Overlay

Designing a division modal (Div Modal) Box Overlay

Lets start with the designing of the overlay, before procedding with the overlay i would like to introduce why this overlay is named as such. as this overlay is designed using <div> tags used inside html programming language so i named it as such (you are free to name it as like you want)

there are four steps to design this overlay.

1.  Making an div overlay

2. giving it some attractive look

3. functioning of the overlay

4. Calling overlay on some action using mouse

here we goes with the design of the overlay :-

1.  Making an div overlay

<div id=”modalPage”>
<div>
</div>
<div>
<div>
<div><a href=”test.html”>X</a></div>
<div>
<p>i want to show the text box values here….</p>
</div>
</div>
</div>
</div>

Test.html is the name of the page where we are designign the overlay

2. giving it some attractive look

<style type=”text/css”>
body
{
margin: 0px;
}
#modalPage
{
display: none;
position: absolute;
width: 100%;
height: 100%;
top: 0px; left: 0px;
}
.modalBackground
{
filter: Alpha(Opacity=40); -moz-opacity:0.4; opacity: 0.4;
width: 100%; height: 100%; background-color: #999999;
position: absolute;
z-index: 500;
top: 0px; left: 0px;
}
.modalContainer
{
position: absolute;
width: 300px;
left: 50%;
top: 50%;
z-index: 750;
}
.modal
{
background-color: white;
border: solid 4px black; position: relative;
top: -150px;
left: -150px;
z-index: 1000;
width: 300px;
height: 300px;
padding: 0px;
}
.modalTop
{
width: 292px;
background-color: #000099;
padding: 4px;
color: #ffffff;
text-align: right;
text-decoration: none;
}
.modalTop a, .modalTop a:visited
{
color: #ffffff;
}
.modalBody
{
padding: 10px;
}
</style>

3. functioning of the overlay

<script language=”javascript” type=”text/javascript”>
function revealModal(divID)
{
window.onscroll = function () { document.getElementById(divID).style.top = document.body.scrollTop; };
document.getElementById(divID).style.display = “block”;
document.getElementById(divID).style.top = document.body.scrollTop;
}

function hideModal(divID)
{
document.getElementById(divID).style.display = “none”;
}

</script>

4. Calling overlay on some action using mouse

<body>
<input id=”Button1″ type=”button” value=”Click here to be naughty” onclick=”revealModal(‘modalPage’)” />
</body>

so going with the pattern we used here to design the overlay the page layout and design using html programming language can be given as follows :-

<html>
<title>Divison Modal (Div Modal) Box</title>
<head>
<div id=”modalPage”>
<div>
</div>
<div>
<div>
<div><a href=”test.html”>X</a></div>
<div>
<p>i want to show the text box values here….</p>
</div>
</div>
</div>
</div>
<style type=”text/css”>
body
{
margin: 0px;
}
#modalPage
{
display: none;
position: absolute;
width: 100%;
height: 100%;
top: 0px; left: 0px;
}
.modalBackground
{
filter: Alpha(Opacity=40); -moz-opacity:0.4; opacity: 0.4;
width: 100%; height: 100%; background-color: #999999;
position: absolute;
z-index: 500;
top: 0px; left: 0px;
}
.modalContainer
{
position: absolute;
width: 300px;
left: 50%;
top: 50%;
z-index: 750;
}
.modal
{
background-color: white;
border: solid 4px black; position: relative;
top: -150px;
left: -150px;
z-index: 1000;
width: 300px;
height: 300px;
padding: 0px;
}
.modalTop
{
width: 292px;
background-color: #000099;
padding: 4px;
color: #ffffff;
text-align: right;
text-decoration: none;
}
.modalTop a, .modalTop a:visited
{
color: #ffffff;
}
.modalBody
{
padding: 10px;
}
</style>
<script language=”javascript” type=”text/javascript”>
function revealModal(divID)
{
window.onscroll = function () { document.getElementById(divID).style.top = document.body.scrollTop; };
document.getElementById(divID).style.display = “block”;
document.getElementById(divID).style.top = document.body.scrollTop;
}

function hideModal(divID)
{
document.getElementById(divID).style.display = “none”;
}

</script>
</head>
<body>
<input id=”Button1″ type=”button” value=”Click here to be naughty” onclick=”revealModal(‘modalPage’)” />
</body>
</html>

and here is the div overlay looks like the design

that’s all ..

Can I convert my WSP into a WAP, without starting from scratch?

Differences between Web Site Projects (WSP) and Web Application Projects (WAP) are highlighted in blogs such as this one. Based on that, if you feel a WAP would be better for your particular needs than a WSP, but have already created a WSP, you may be asking yourself, “Can I convert my WSP into a WAP, without starting from scratch?”.

This posting explains how to convert an existing Web Site Project to a Web Application Project in Visual Studio 2010. The most striking differences to a Web Site Project are that WAPs have a project file to include and exclude files, and compile to a single assembly.

The guidelines below include several of the basic steps detailed in the Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio. This is an excellent topic to review as it discusses some specific issues you may encounter which were discovered in previous versions of Visual Studio (VS). Please keep in mind while reading it that it is based on a WSP to WAP conversion using previous versions of Visual Studio.

Let’s get started.

Open and Verify your Visual Studio Web Site Project
Before converting your WSP to a WAP, you should open it in Visual Studio and verify that is it working correctly.  This will help prevent the need to research errors that have nothing to do with the conversion process.

  1. In the File menu, click Open Web Site.

  2. The Open Web Site dialog box is displayed.

  3. Select the project folder that you want to open, and then click Open.

  4. In the Build menu, click Build Web Site.

  5. In the Debug menu, click Start Debugging. Alternatively, you can press F5.

  6. Verify your project compiles and runs as expected

Create a new, empty Visual Studio WAP
A good strategy for converting a WSP to a WAP is to create a new, blank Visual Studio Web Application Project in a separate directory, but in the same solution. This avoids changing any part of the existing Web site files. It also allows you to copy existing functionality and files into the new WAP easily, within the same Visual Studio instance.

  1. In the File menu, click Add, and then click New Project.

  2. The Add New Project dialog box is displayed.

  3. In the Installed Templates section of the Add New Project dialog box, expand the language that you want to use, and then select Web to display the Web-related templates.

  4. Select Empty ASP.NET Web Application.

  5. Type values for NameLocation, and then click OK to create the Web Application Project.

  6. After the project has been created, delete the Web.config file that is created automatically.

Set Project / Assembly References
If the WSP required additional project or assembly references, you need to add them to the WAP. You can see the list of default references associated with the new (empty) Visual Studio Web Application Project under the References node in Solution Explorer.

  1. In the Solution Explorer, make sure Show All Files is turned on.

  2. In the Solution Explorer, right-click References, and then click Add Reference.

  3. The Add Reference dialog box is displayed.

  4. Select the reference that you have already added in the Web Site Project and then click OK.

  5. Note: To help prevent errors, add references to the Web Application Project for assemblies that existed in the \bin folder of the WSP.

 

Copy and Convert the App_Code folder from the Web Site Project to the Web Application Project
In WSPs, the files in the App_Code folder are all compiled together and then referenced (automatically) as a “dll” by all other files in the WSP. In WAPs, this is not the case. All code is compiled together as one .dll. I’ve found that copying the App_Code folder over first and converting it to the WAP model helps to head off some dependency issues which could arise if one copied the entire site, converted, and then tried to compile.

  1. In the Solution Explorer, copy the entire App_Code folder from the WSP to the WAP

  2. In the Solution Explorerselect the WAP’s root node; right-click, select Convert to Web Application

  3. You will see our standard Convert to Web Application confirmation dialog.  Select “Yes” to this dialog.

  4. The App_Code folder should now be renamed to Old_App_Code folder

  5. Note: Do NOT name it back. As mentioned above, in the WAP model all code will be compiled into one assembly. At runtime, ASP.NET doesn’t know what type of project model you have created and will take anything in the “App_Code” folder and create a dynamic assembly for it, thereby causing “could not load type” exceptions as there would be duplicate types exists in two assemblies (the one for the VS web application and the one for App_Code).  Learn more about why App_Code folder does not work well with WAPs.

  6. Compile the WAP

  7. If you see an error, the most likely causes are:

    1. Missing assembly reference. See the section above to add missing references to your project.

    2. Files marked with Build Action = Content instead of Build Action = Compile. Any file you want compiled should be marked as such.

    3. To set the Build Action property:

      1. Select the file in the Solution Explorer

      2. Press F4 (Brings up the File’s Property Grid)

      3. Look at the Build Action property. Change as necessary.

Copy and Convert the remaining Files and Folders from the WSP to the WAP
Once your Old_App_Code folder is compiled (by compiling your WAP in the step above), your WAP will have an assembly in the \bin directory. This will make it easier for the remaining files you are copying over to successfully compile, especially if they reference or use code in the files contained within that folder.

  1. Select the remaining files / folders from the WSP project and copy them into the WAP.

  2. Make sure not to copy the App_Code folder again.

  3. In the Solution Explorer, right click the root node of the WAP and select Convert to Web Application.

    1. Don’t worry, this won’t affect (or try to reconvert) any files or the Old_App_Code folder you have already converted.

  4. Note: This will cause VS to automatically generate a .designer.cs (or .vb) file for each page, user-control, and master page in the project. Additionally, each .aspx/.ascx will be modified to use the ‘Codebehind’ instead of the ‘CodeFile’ attribute in the Page directive.

    1. Example of the ‘CodeFile’ to ‘Codebehind’ change

      1. WSP file:  <%@ Page Title=”Home Page” Language=”C#” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>

      2. Converted WAP file:  <%@ Page Title=”Home Page” Language=”C#” Inherits=”_Default” Codebehind=”Default.aspx.cs” %>

Compile your WAP
After all the files have been added and converted, you should build your project again to see if there are any compilation errors. At this point, some of the most likely causes of errors are:

  1. Code files set with Build Action = Content. These should be changed to Compile. Refer to the above section.

  2. Missing project or assembly references. See above for steps for adding project or assembly references.

  3. Class name collisions. In the WSP model, each .aspx and associated codefile was compiled together as a separate, individual unit. Therefore, one could have files such as foo\widget.ascx.cs and bar\widget.ascx.cs where the classes were the same. Once these files are moved to a WAP and all compiled together, class name collisions occur with errors something like, “has multiple definitions with identical signatures”. If this occurs, unique class names should be created.

Run your WAP
After completing the above steps and you have a WAP which successfully compiles, you are ready to try running your application. One of the most common problems I’ve seen encountered is the “Unknown server tag ‘SomeTag: Control’ (as it applies to user controls and such)”. This can be corrected in one of two ways.

  1. Add or modify the register directive on the page that is using the control. This will only register it for this specific page.

    1. <%@ Register Namespace”namespace the control is in” TagPrefix=”SomeTag” Assembly=”Name of dll compiled into the \bin folder” %>

  2. Register the control in the Web.config, making it available to all pages in the project

    1. In the <pages><controls> section add the following:

    2. <add tagPrefix=”SomeTag” namespace=”namespace the control is in” assembly=” Name of dll compiled into the \bin folder” />

Hope this helps!

Manually Installing Php on any system

This section contains instructions for manually installing and configuring PHP on Microsoft Windows. For the instructions on how to use PHP installer to setup and configure PHP and a web server on Windows refer to Windows Installer (PHP 5.2 and later).

Selecting and downloading the PHP distribution package

Download the PHP zip binary distribution from » PHP for Windows: Binaries and Sources. There are several different versions of the zip package – chose the version that is suitable for the web server being used:

If PHP is used with IIS then choose PHP 5.3 VC9 Non Thread Safe or PHP 5.2 VC6 Non Thread Safe;

If PHP is used with IIS7 or greater and PHP 5.3+, then the VC9 binaries of PHP should be used.

If PHP is used with Apache 1 or Apache 2 then choose PHP 5.3 VC6 or PHP 5.2 VC6.

Note:

VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the » Microsoft 2008 C++ Runtime (x86) or the » Microsoft 2008 C++ Runtime (x64) installed.

The PHP package structure and content

Unpack the content of the zip archive into a directory of your choice, for example C:\PHP\. The directory and file structure extracted from the zip will look as below:

Example #1 PHP 5 package structure

c:\php
|
+–dev
| |
| |-php5ts.lib — php5.lib in non thread safe version
|
+–ext — extension DLLs for PHP
| |
| |-php_bz2.dll
| |
| |-php_cpdf.dll
| |
| |-…
|
+–extras — empty
|
+–pear — initial copy of PEAR
|
|
|-go-pear.bat — PEAR setup script
|
|-…
|
|-php-cgi.exe — CGI executable
|
|-php-win.exe — executes scripts without an opened command prompt
|
|-php.exe — Command line PHP executable (CLI)
|
|-…
|
|-php.ini-development — default php.ini settings
|
|-php.ini-production — recommended php.ini settings
|
|-php5apache2_2.dll — does not exist in non thread safe version
|
|-php5apache2_2_filter.dll — does not exist in non thread safe version
|
|-…
|
|-php5ts.dll — core PHP DLL ( php5.dll in non thread safe version)
|
|-…

Below is the list of the modules and executables included in the PHP zip distribution:

go-pear.bat – the PEAR setup script. Refer to » Installation (PEAR) for more details.

php-cgi.exe – CGI executable that can be used when running PHP on IIS via CGI or FastCGI.

php-win.exe – the PHP executable for executing PHP scripts without using a command line window (for example PHP applications that use Windows GUI).

php.exe – the PHP executable for executing PHP scripts within a command line interface (CLI).

php5apache2_2.dll – Apache 2.2.X module.

php5apache2_2_filter.dll – Apache 2.2.X filter.

Changing the php.ini file

After the php package content has been extracted, copy the php.ini-production into php.ini in the same folder. If necessary, it is also possible to place the php.ini into any other location of your choice but that will require additional configuration steps as described in PHP Configuration.

The php.ini file tells PHP how to configure itself, and how to work with the environment that it runs in. Here are a number of settings for the php.ini file that help PHP work better with Windows. Some of these are optional. There are many other directives that may be relevant to your environment – refer to the list of php.ini directives for more information.

Required directives:

extension_dir = – The extension_dir needs to point to the directory where PHP extensions files are stored. The path can be absolute (i.e. “C:\PHP\ext”) or relative (i.e. “.\ext”). Extensions that are listed lower in the php.ini file need to be located in the extension_dir.

extension = xxxxx.dll – For each extension you wish to enable, you need a corresponding “extension=” directive that tells PHP which extensions in the extension_dir to load at startup time.

log_errors = On – PHP has an error logging facility that can be used to send errors to a file, or to a service (i.e. syslog) and works in conjunction with the error_log directive below. When running under IIS, the log_errors should be enabled, with a valid error_log.

error_log = – The error_log needs to specify the absolute, or relative path to the file where PHP errors should be logged. This file needs to be writable for the web server. The most common places for this file are in various TEMP directories, for example “C:\inetpub\temp\php-errors.log”.

cgi.force_redirect = 0 – This directive is required for running under IIS. It is a directory security facility required by many other web servers. However, enabling it under IIS will cause the PHP engine to fail on Windows.

cgi.fix_pathinfo = 1 – This lets PHP access real path info following the CGI Spec. The IIS FastCGI implementation needs this set.

fastcgi.impersonate = 1 – FastCGI under IIS supports the ability to impersonate security tokens of the calling client. This allows IIS to define the security context that the request runs under.

fastcgi.logging = 0 – FastCGI logging should be disabled on IIS. If it is left enabled, then any messages of any class are treated by FastCGI as error conditions which will cause IIS to generate an HTTP 500 exception.

Optional directives

max_execution_time = ## – This directive tells PHP the maximum amount of time that it can spend executing any given script. The default for this is 30 seconds. Increase the value of this directive if PHP application take long time to execute.

memory_limit = ###M – The amount of memory available for the PHP process, in Megabytes. The default is 128, which is fine for most PHP applications. Some of the more complex ones might need more.

display_errors = Off – This directive tells PHP whether to include any error messages in the stream that it returns to the Web server. If this is set to “On”, then PHP will send whichever classes of errors that you define with the error_reporting directive back to web server as part of the error stream. For security reasons it is recommended to set it to “Off” on production servers in order not to reveal any security sensitive information that is often included in the error messages.

open_basedir = , e.g. openbasedir=”C:\inetpub\wwwroot;C:\inetpub\temp”. This directive specified the directory paths where PHP is allowed to perform file system operations. Any file operation outside of the specified paths will result in an error. This directive is especially useful for locking down the PHP installation in shared hosting environments to prevent PHP scripts from accessing any files outside of the web site’s root directory.

upload_max_filesize = ###M and post_max_size = ###M – The maximum allowed size of an uploaded file and post data respectively. The values of these directives should be increased if PHP applications need to perform large uploads, such as for example photos or video files.

PHP is now setup on your system. The next step is to choose a web server, and enable it to run PHP. Choose a web server from the table of contents.

In addition to running PHP via a web server, PHP can run from the command line just like a .BAT script. See Command Line PHP on Microsoft Windows for further details.

%d bloggers like this: