serving the solutions day and night

Pages

Tuesday, June 22, 2010

Installtion, Configuring Internet Information Server (IIS) with Apache Tomcat

Internet Information Server (IIS) can not execute Servlets and Java Server Pages (JSP). Using Apache Tomcat redirector plugin (isapi_redirect.dll) will let IIS send Servlets and JSP requests to Apache Tomcat.

This blog explains installation of Tomcat and how to setup IIS to interface with Apache Tomcat 6.0.26.

Install Apache Tomcat 6.0.26
1)Download Apache Tomcat 6.0.26 'zip' or '32-bit/64-bit Windows Service Installer' file and 'unzip' or 'install' it. Download link

Monday, June 14, 2010

AJAX, Send XML Request/Response Using ASP.NET ,C# - Part 4

What is Ajax - More detail read Ajax Blog
1)Ajax are HTML, DOM, CSS, XML, JavaScript and XMLHttpRequest.
2)Submit Request and Get Server Response without doing page refresh.
3)Do the Asynchronous call to the server and get response from it.

This blog is going to explain
1)Send a XML request from Ajax to ASP.NET using C#.
2)Receive a XML Response from ASP.NET using C#to Ajax.


View Sequence Diagram for AJAX
View AJAX Flow Diagram

Friday, June 11, 2010

AJAX, Send XML Request/Response Using PHP XML DOM - Part 3

I blogged What Ajax is and higher-level codes, let's put all together and example for send XML request/response using Ajax enabled PHP application.

Here i explain 2 application of XML.
1)To send a request from a Ajax to a PHP in XML format.
2)To receive a response from a PHP in Ajax in XML format.

Tuesday, June 8, 2010

AJAX, Send/Receive XML Request/Response using JAVA - Part 2

I blogged What Ajax is and higher-level codes, let's put all together and example for send XML request/response using Ajax enabled Java application.

Sequence Diagram for AJAX Using JAVA

Saturday, May 29, 2010

Ajax (Asynchronous JavaScript and XML) - Part 1

Ajax is to update the web page, using data fetched from the server/internet, without reloading the whole page in the browser.  

Monday, May 10, 2010

CAPTCHA Image Code - JAVA, JSP, AJAX

CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
A CAPTCHA is used to ensure that the response is not generated by a computer, means response from human. It is used to distinguish between human and bots.

Saturday, May 8, 2010

Force SSL/https using code - PHP, JAVA, .NET, C#.NET

Below the codes will explain to detect if URL is secured ssl with php, .net or java in https. If not, then code will automatically change to the secured page from http to https.

Sunday, May 2, 2010

Executing SQL Server Stored Procedure from PHP

Difference between PHP on Windows and PHP on Linux is:

On windows, the MS SQL Server support module is running as a DLL file. In order to enable the extension, must uncomment the line from the php.ini file : extension=php_mssql.dll

On Linux, the MS SQL Server support module is compiled into libphp5.so, there is no need to load it from extensions.

Friday, April 23, 2010

C# Questions

struct vs Class
  • structs are value types that can contain data and functions
  • structs are value types and do not require heap allocation.
  • structs directly store their data in the struct, classes store a reference to a dynamically allocated object.
  • structs are useful for small data structures
  • structs can affect performance
  • Constructors are invoked with the new operator, but that does not allocate memory on the heap
  • A struct constructor simply returns the struct value itself (typically in a temporary location on the stack), and this value is then copied as necessary
  • With classes, multiple variables may have a reference to the same object
  • It is possible for operations on one variable to affect the object referenced by the other variable.
  • With structs, the variables each have their own copy of the data, and it is not possible for operations on one to affect the other.
  • structs do not support user-specified inheritance, and they implicitly inherit from type object
Public struct PointStruct
{
 public int x;
 public int y;

 public PointStruct(int x, int y)
 {
  this.x = x;
  this.y = y;
 }
}

static void Main(string[] args)
{
 PointStruct ps = new PointStruct();
 ps.x = 10;
 ps.y = 10;
 Console.WriteLine(“Initial struct values are “ + ps.x +”, “+ ps.y);
 ModifyStructPoint(ps);
 Console.WriteLine(“After ModifyStructPoint, struct values are “ + ps.x +”, “+ ps.y);
}

void ModifyStructPoint(PointStruct newStruct)
{
 newStruct.x = 20;
 newStruct.y = 20;
 Console.WriteLine(“Inside ModifyStructPoint()”);
 Console.WriteLine(“Modified values are “ + newStruct.x +”, “+ newStruct.y);
}

Initial struct values are 10,10
Inside ModifyStructPoint()
Modified values are 20,20
After ModifyStructPoint, struct values are 10,10
class PointClass
{
 public int x;
 public int y;

 public PointClass(int x, int y)
 {
 this.x = x;
 this.y = y;
 }
}

static void Main(string[] args)
{
 PointClass pc = new PointClass(10,10);
 Console.WriteLine(“Initial class values are “ + pc.x +”, “+ pc.y);
 ModifyClassPoint(pc);
 Console.WriteLine(“After ModifyClassPoint, class are “ + ps.x +”, “+ ps.y);
}

void ModifyClassPoint(PointStruct newPoint)
{
 newPoint.x = 20;
 newPoint y = 20;
 Console.WriteLine(“Inside ModifyClassPoint()”);
 Console.WriteLine(“Modified values are “ + newPoint.x +”, “+ newPoint.y);
}

Initial class values are 10,10
Inside ModifyClassPoint()
Modified values are 20,20
After ModifyClassPoint, struct values are 20,20

Saturday, April 10, 2010

Storing Images, Documents, FingerPrints, Signatures in Mysql (medium blob data type) using C# .Net

Storing Images, Documents, Fingerprints, Signatures in Mysql (medium blob data type) using C# .Net.
Mysql table structure, C# code  and Mysql tips.