Wednesday, February 17, 2010

An error shown when you try to start the SharePoint Search service

After installing the SharePoint Server when you try to start the search service you might end up with the following error.

An unhandled exception occurred in the user interface.Exception Information: OSearch (Administrator)

or

An unhandled exception occurred in the user interface.Exception Information: OSearch (UserName)

If this comes don’t panic, what you need to do is when providing the username provide it with the full domain name. For example Domain.Local\Administrator.

image

You can find the Microsoft knowledge base article here.

Windows Mobile 7

Highly awaited Windows Mobile 7 is at last showing in horizon.

Have a glance at it by visiting the following URL.

http://www.microsoft.com/presspass/presskits/windowsphone/videoGallery.aspx?contentID=mobileworldcongress2010

http://www.microsoft.com/windowsmobile/en-us/cmpn/windowsphone7series/default.mspx

http://www.windowsphone7series.com/

Microsoft is planning to release phones with Windows Mobile 7 at the end of 2010.

Sunday, February 14, 2010

How Networks Work

I found a really good video which explains how data is travelled in the network. This explains in simple words with animation about the tasks done by the following main components and more.

  • Packet
  • Router
  • Switch
  • Firewall

If anyone is interested in networking I highly recommend you to watch this.

Thursday, February 04, 2010

Making Reliable Connections in BlackBerry Applications

Recently I came up across a blog which provides valuable information on the connections we can make in a BlackBerry application.

If you are interested read more at the following URL.

http://www.localytics.com/blog/post/how-to-reliably-establish-a-network-connection-on-any-blackberry-device/

Tuesday, December 29, 2009

BlackBerry Security Permissions

If you are eager to find out about BlackBerry security permissions and ways to handle prompts following video from BlackBerry will help you in understanding the basics of it.

http://www.blackberry.com/DevMediaLibrary/view.do?name=SecurityPrompts

Further more if you are seeking ways to change application permissions using code, following link will help you to get more details of the Application Permissions class from RIM device API.

http://docs.blackberry.com/en/developers/deliverables/6022/net/rim/device/api/applicationcontrol/ApplicationPermissions.html#PERMISSION_INPUT_SIMULATION

Monday, December 28, 2009

Disabling Date-Time Changes

Do you know that you can programmatically stop the user changing the date and time of a Pocket PC device?

This is useful if your applications need to take time accurately for some reason from the device.

The following code will disable the user from accessing the date time changing settings using his Windows Mobile powered device.





  1. private void btnDisableClock_Click(object sender, EventArgs e)
  2. {
  3.     RegistryKey hklm = Registry.LocalMachine;
  4.     hklm = hklm.OpenSubKey(@"\Software\Microsoft\Clock\", true);
  5.     System.Byte[] offValue = new byte[1];
  6.     offValue[0] = 0x30;
  7.     hklm.SetValue("AppState", offValue);
  8.     lblTitle.Text = "Change Clock Status - Disabled";
  9. }




 

If you want to re-enable the setting, to make the user able to change the data and time use the below code.





  1. private void btnEnableClock_Click(object sender, EventArgs e)
  2. {
  3.     RegistryKey hklm = Registry.LocalMachine;
  4.     hklm = hklm.OpenSubKey(@"\Software\Microsoft\Clock\", true);
  5.     System.Byte[] offValue = new byte[1];
  6.     offValue[0] = 0x11;
  7.     hklm.SetValue("AppState", offValue);
  8.     lblTitle.Text = "Change Clock Status - Enabled";
  9. }




Saturday, December 19, 2009

Boeing 787 - DreamLiner

Boeing's newest plane 787 DreamLiner had made its first flight. As of Boeing this is a great achievement and a history changer.
View the video and lots of other details at New Air Plane and Boeing.

Sunday, December 13, 2009

Disabling Right Click

To disable right click context menu you can use one of the following methods.


Method 1 – Using attribute oncontextmenu attribute of the body tag.
By using this you can block the right click action and the context menu without using JavaScript.





  1. <body oncontextmenu="return false">




This will be useless if you need to do some action on the click. In such a case use the Method 2.

 

Method 2 – Using JavaScript.

Place the following JavaScript and modify the script as you need. This will just show a popup window to the user saying that Right clicking is disabled.





  1. <script language="javascript">
  2.     document.onmousedown = disableRightClick;
  3.     function disableRightClick(e) {
  4.         if (event.button == 2) {
  5.             alert("Right click is disabled.");
  6.             return false;
  7.         }
  8.     }
  9. </script>




Tuesday, December 08, 2009

Finding the Image Format

Here is a small code that I wrote to find the image format of an image.

This code will check for the raw image format of the image you select and will display in a pop up window.

Hope this helps.





  1. using System.Drawing.Imaging;








  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3.     openFileDialog1.ShowDialog();
  4.     Image img = Image.FromFile(openFileDialog1.FileName);
  5.     ImageFormat imgfmt = img.RawFormat;
  6.     if (imgfmt.Equals(ImageFormat.Bmp))
  7.         MessageBox.Show(ImageFormat.Bmp.ToString());
  8.     else if (imgfmt.Equals(ImageFormat.Jpeg))
  9.         MessageBox.Show(ImageFormat.Jpeg.ToString());
  10.     else if (imgfmt.Equals(ImageFormat.Tiff))
  11.         MessageBox.Show(ImageFormat.Tiff.ToString());
  12.     else if (imgfmt.Equals(ImageFormat.Wmf))
  13.         MessageBox.Show(ImageFormat.Wmf.ToString());
  14.     else if (imgfmt.Equals(ImageFormat.Icon))
  15.         MessageBox.Show(ImageFormat.Icon.ToString());
  16.     else if (imgfmt.Equals(ImageFormat.Png))
  17.         MessageBox.Show(ImageFormat.Png.ToString());
  18.     else if (imgfmt.Equals(ImageFormat.Gif))
  19.         MessageBox.Show(ImageFormat.Gif.ToString());
  20. }




Saturday, December 05, 2009

Rapping Flight Attendant

If you have flown in aircraft's you may definitely have heard of the in flight safety announcements made by the flight attendants. But have you paid enough attention to it?
Anyway I bet that you have never listened to anything like this before.

This is David Holmes, a flight attendant of Southwest Airlines who is known as rapping flight attendant who came up with a nice idea.
Enjoy.
http://www.youtube.com/watch?v=rhMOnr0GxU8&feature=related
http://www.youtube.com/watch?v=yiXGm_TiRVQ&feature=related
http://www.youtube.com/watch?v=7P2-vEtXSug&feature=related

Tuesday, December 01, 2009

Remember the Old Days

Thought to add the following photos in remembrance of AirLanka which was Sri Lankas national carrier before being renamed to SriLankan.



Monday, November 30, 2009

Open a Port in Windows Firewall

If you tried to open a port in Windows Firewall which comes with Windows Server 2008 R2 you will find that Microsoft had given Windows Firewall a new look and feel.

At first you may feel that you are lost with the new interface, so thought to show how to open a port.

I will be creating an inbound rule opening the port 1443, which normally SQL Server is using for communications (Yes this machine is having SQL Server installed).

Go to Start -> Control Panel -> Windows Firewall.

Click Advance Settings from the left pane to bring up the Windows Firewall main screen.

Click on Inbound Rules and then right click on the same. If you only right click on this you will only see the options Refresh and Help. First click on it and then right click, now click on New Rule ….

This will bring the New Inbound Rule Wizard.

Select Port since we are going to open a port, if you need to open an application you can select the Program radio button, to create a rule based on an existing rule use Predefined radio button, use Custom to create a custom rule. Press Next to proceed.

Make sure TCP is selected and type in 1433 in the Specific local ports textbox then press Next.

Select the Allow Connection action and press next.Select all the available profiles, since I need this rule applicable to all the profiles. Otherwise you can select only the ones you need. Then click Next.

Give a name for the rule and click Finish.

This will add your rule to the firewall.