Thursday, December 11, 2008

Google SMS Search Engine

Google introduced search engine through SMS. Now, you can just send an SMS your queries to 9773300000 (NO need to prefix 0 or +91) from any of the indian networks.

For example,

1. If you want to know your PNR status of your booked train ticket
. Just SMS your 10 digit PNR number on the above specified mobile number and instantaneously you will get your ticket's current status along with all other journey related details.

2. If you want to know the address of Dominos pizza in Adyar, Just simply send "Dominos Adyar" to 9773300000. You will get the address of the Dominos pizza in adyar.

This Google SMS service is very useful, if we are away from our computer and internet.

For more information, Click here

Hope this will help everyone.

Thursday, October 30, 2008

Kathipara Junction Flyover

The Chennai most important Kathipar Junction Flyover is constructed and opened on 26th october, 2008. Here is the image comparison of the new and old kathipara junction.

Kathipara Junction in October 2008



Kathipara Junction in April 2005


Tuesday, October 28, 2008

New Mobiles from Nokia and Sony Ericsson

Recently i have seen these two mobiles from Nokia and Sony Ericsson.

Nokia 5800



Very good phone with more memory for processing and also the processor speed is nearly 369Mhz with 3.2MP camera. Its same like My Nokia 5700 but the RAM and Memory card memory is more when compared to my 5700.

And Here is also a phone, we can't just say its as a mobile, its almost a digital camera from Sony Ericsson.

Sony Ericsson C905



This phone is having almost all the features like 2G,3G, Wi-Fi, Bluetooth, Push Mail and with a 8MP Camera. The camera features are 8 MP, 3264x2448 pixels, autofocus, face detection, smart contrast, video(QVGA 30fps), xenon flash.

But the only thing it is lagging from 5800 is memory. Nokia 5800 can support Memory card up to 16Gb, but C905 can support up to 4GB it seems.

But to be sad, these two phones are not yet released in India. Expecting to be released by the end of 2008.


Free online space to store files thru GSpace

Gmail offers plenty of space (almost 3 GB), it's not a very good idea to use it for storing files. There are tools that make it easy to upload files to Gmail (the most well-known are the Firefox extension Gspace and the Windows application Gmail Drive), but Gmail was not created for this purpose, so they're just clever hacks. If you upload too many files, Google could even lock your account for 24 hours.

How to Search Mail in Gmail

Using a number of clever search operators, you can narrow your search significantly and precisely. You can search in the Subject line only, for example, or combine that with a date range, a particular sender, and exclude all messages with attachments.

Use the following operators:

  • subject: - Search the Subject line.
    Example: "subject:KGHouse" finds all messages with "bahamas" in the Subject.
  • from: - Search for sender name and email address. Partial addresses are okay.
    Example: "from:Senthil" finds all messages from "Senthil@gmail.com", but also all messages from "ksenthilraja@gmail.com".
  • to: - Search the To line for names and addresses.
    Example: "to:ksenthilraja@gmail.com" finds all messages sent directly (not via Cc: or Bcc:) to ksenthilraja@gmail.com.
  • cc: - Search recipients in the Cc field.
    Example: "cc:ksenthilraja@gmail.com" finds all messages that were sent to ksenthilraja@gmail.com as a carbon copy.
  • bcc: - Search for addresses and names in the Bcc field. Note this only works with emails you sent to Bcc recipients from Gmail.
    Example: "bcc:senthil" finds all messages that you sent with, for example, "senthil@gmail.com" in the Bcc field.
  • label: - Search for messages assigned a label. (Replace whitespace characters in label names with hyphens.)
    Example: "label:KGHouse" finds all messages labeled "KGHouse".
  • is:starred - Search for messages that are starred.
  • is:unread - Search for new and unread messages.
  • is:read - Search for messages that have already been opened.
  • has:attachment - Search for messages that have files attached to them.
  • filename: - Search within file names of attachments. You can also search for file name extensions to restrict your search to certain file types.
    Example: "filename:.doc" finds all messages with word processing attachments.
  • lang: - Search for messages in a particular language. (Specify the language in English; "Chinese" works, but "Putonghua" or "Mandarin" do not, for example.)
    Example: "lang:French" returns all emails that contain at least un peu de Français.
  • in: - Search in a standard "folder". You can search in Drafts, Inbox, Chats, Sent, Spam, Trash and All (for everything, including Spam and Trash).
    Example: "in:drafts" finds all messages in your Drafts folder.
  • after: - Search for messages sent after a date. The date must given in YYYY/MM/DD format.
    Example: "after:2005/05/05" finds all messages sent or received after (and not including) May 5, 2005.
  • before: - Search for messages sent before a date.
    Example: "before:2005/05/05" finds all messages sent or received on May 4, 2005 and earlier.

Operators and search terms can be combined with the following modifiers:

  • By default, terms are combined with (an invisible) "AND".
    Example: "Senthil Raja" finds all messages that contain both "Senthil" and "Raja".
  • "" - Search for a phrase. Case is disregarded.
    Examples: "Senthil Raja's" finds all messages containing the phrase "Senthil Raja's"; 'subject:"Senthil Raja's' finds all messages that have "Senthil Raja's" in the Subject field.
  • OR - Search for messages containing at least one of two terms or expressions.
    Examples: "senthil or raja" finds messages that contain either "senthil" or "raja" or both; "from:senthil or label:KGHouse" finds messages that either come from a sender that contains "senthil" or appear under the label "KGHouse".
  • - - Search for messages that do not contain a term or expression.
    Examples: "-raja" finds all messages that do not contain the word "raja"; "senthil -raja" finds all messages that contain the word "senthil" but not "raja"; 'subject:"senthil raja" -from:senthil' finds all messages with "senthil raja" in the subject that were not sent from an email address or name containing "senthil".
  • () - Group search terms or expressions.
    Examples: "subject:(senthil raja)" finds messages that have both "senthil" and "raja" somewhere in the Subject line (but not necessarily as a phrase); "from:senthil(subject:(senthil OR raja) OR label:KGHouse)" finds all messages from a sender who has "senthil" in their name that either have "senthil" or "raja" (or both) in the Subject line or appear under the label "KGHouse".

Sunday, August 24, 2008

My New DELL Laptop

I have a bought a new laptop on 11th July 2008. The red one is mine and the black is my friend ganesh's laptop. I am very much happy when got connected with the internet through WIFI. Laptop Model: DELL Inspiron 1420

Friday, April 4, 2008

Resize windows Form Controls w.r.t Screen Resolution

We have a main problem in developing windows application is that the controls which we are placing inside a form may not visible when the screen resolution changes. For that, we can use the below class to change the position of the controls. For this, u have to design the form in low resolution, so that the controls will change their position with respect to higher resolution monitors

Add this class to your project and change the namespace name

Layout Manager Class

Now, your form will set displayed for all resolution monitors.....

Happy coding....

Friday, January 25, 2008

Unsharp Mask Algorithm in C#

Unsharp masking is a traditional darkroom technique that has proven very suitable for digital imaging.



Original


Unsharp Mask


The principle of unsharp masking is to create a blurred copy of the image and compare it to the underlying original. The difference in colour values between the two images is greatest for the pixels near sharp edges. When this difference is subtracted from the original image, the edges will be accentuated.



private unsafe Bitmap UnsharpMask(Bitmap img, double amount, double radius, double threshold)
{
if (amount > 500) amount = 500;
amount = amount * 2;
if (radius > 50) radius = 50;
radius = radius * 2;
if (threshold > 255) threshold = 255;

if (radius == 0)
{
img.Dispose();
return img;
}
int w = img.Width; int h = img.Height;
Bitmap imgBlur = new Bitmap(w, h);


ConvMatrix con = new ConvMatrix();
imgBlur = (Bitmap)img.Clone();
BitmapFilter.Conv3x3(imgBlur, con);

BitmapData imgdata1 = img.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
BitmapData imgdata2 = imgBlur.LockBits(new Rectangle(0, 0, w, h), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);

byte* p1 = (byte*)(void*)imgdata1.Scan0;
byte* p2 = (byte*)(void*)imgdata2.Scan0;

if (threshold > 0)
{
for (int x = 0; x < y =" 0;" imgrvalue =" p1[2];" imggvalue =" p1[1];" imgbvalue =" p1[0];" imgblurrvalue =" p2[2];" imgblurgvalue =" p2[1];" imgblurbvalue =" p2[0];" rnew =" (Math.Abs(imgRValue">= (int)threshold)
? Math.Max(0, Math.Min(255, ((int)amount * (imgRValue - imgBlurRValue)) + imgRValue)) : imgRValue;
int gNew = (Math.Abs(imgGValue - imgBlurGValue) >= (int)threshold)
? Math.Max(0, Math.Min(255, ((int)amount * (imgGValue - imgBlurGValue)) + imgGValue)) : imgGValue;
int bNew = (Math.Abs(imgBValue - imgBlurBValue) >= (int)threshold)
? Math.Max(0, Math.Min(255, ((int)amount * (imgBValue - imgBlurBValue)) + imgBValue)) : imgBValue;

if ((imgRValue != rNew) || (imgGValue != gNew) || (imgBValue != bNew))
{
p1[0] = (byte)bNew;
p1[1] = (byte)gNew;
p1[2] = (byte)rNew;

//img.SetPixel(x, y, System.Drawing.Color.FromArgb(rNew, gNew, bNew));
}
p1 = p1 + 3;
p2 = p2 + 3;


}
}

}
else
{
for (int x = 0; x < y =" 0;" imgrvalue =" p1[2];" imggvalue =" p1[1];" imgbvalue =" p1[0];" imgblurrvalue =" p2[2];" imgblurgvalue =" p2[1];" imgblurbvalue =" p2[0];" rnew =" ((int)amount"> 255)
rNew = 255;
else if (rNew < rnew =" 0;" gnew =" ((int)amount"> 255)
gNew = 255;
else if (gNew < gnew =" 0;" bnew =" ((int)amount"> 255)
bNew = 255;
else if (bNew < bnew =" 0;" p1 =" p1" p2 =" p2" topleft =" 1," topmid =" 2," topright =" 1;" midleft =" 2," pixel =" 4," midright =" 2;" bottomleft =" 1," bottommid =" 2," bottomright =" 1;" factor =" 16;" offset =" 0;" topleft =" TopMid" topright =" MidLeft" pixel =" MidRight" bottomleft =" BottomMid" bottomright =" nVal;" 0 ="=" bsrc =" (Bitmap)b.Clone();" bmdata =" b.LockBits(new" bmsrc =" bSrc.LockBits(new" stride =" bmData.Stride;" stride2 =" stride" scan0 =" bmData.Scan0;" srcscan0 =" bmSrc.Scan0;" p =" (byte*)(void*)Scan0;" psrc =" (byte*)(void*)SrcScan0;" noffset =" stride" nwidth =" b.Width" nheight =" b.Height" y =" 0;" x =" 0;" npixel =" ((((pSrc[2]" npixel =" 0;"> 255) nPixel = 255;

p[5 + stride] = (byte)nPixel;

nPixel = ((((pSrc[1] * m.TopLeft) + (pSrc[4] * m.TopMid) + (pSrc[7] * m.TopRight) +
(pSrc[1 + stride] * m.MidLeft) + (pSrc[4 + stride] * m.Pixel) + (pSrc[7 + stride] * m.MidRight) +
(pSrc[1 + stride2] * m.BottomLeft) + (pSrc[4 + stride2] * m.BottomMid) + (pSrc[7 + stride2] * m.BottomRight)) / m.Factor) + m.Offset);

if (nPixel < npixel =" 0;"> 255) nPixel = 255;

p[4 + stride] = (byte)nPixel;

nPixel = ((((pSrc[0] * m.TopLeft) + (pSrc[3] * m.TopMid) + (pSrc[6] * m.TopRight) +
(pSrc[0 + stride] * m.MidLeft) + (pSrc[3 + stride] * m.Pixel) + (pSrc[6 + stride] * m.MidRight) +
(pSrc[0 + stride2] * m.BottomLeft) + (pSrc[3 + stride2] * m.BottomMid) + (pSrc[6 + stride2] * m.BottomRight)) / m.Factor) + m.Offset);

if (nPixel < npixel =" 0;"> 255) nPixel = 255;

p[3 + stride] = (byte)nPixel;

p += 3;
pSrc += 3;
}
p += nOffset;
pSrc += nOffset;
}
}

b.UnlockBits(bmData);
bSrc.UnlockBits(bmSrc);

return true;
}