Wednesday, August 17, 2011

Reinstall missing Grub after install Windows


When you are install windows after installing ubuntu linux version on your pc, no need to install ubuntu linux version again. Follow below instructions to recover grub easily.


1. Boot your computer from Ubuntu live CD


2. Go Places->My Computer


3. Click on the partition you installed ubuntu operating system. Then it will mount.


4. Get the terminal


5. Type this commands in the terminal


    $mount | tail -1


6. You will get result like below


    /dev/sda6 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=dev


7. Then type this


    $sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda


(bold texts must be the same)


8. Then Reboot the machine. Here is the command "sudo shutdown -r now" without quotes.


9. Now you can see the grub, but sometime your windows entry may not work. Then go to ubuntu, get the terminal, type this command. You have to provide your password here.


$sudo update-grub


10. End of Task...


Sinhala version

Running an Executable and Collecting the Output using C#

Sometimes you may need in the middle of a C# application you want to run an executable and collect the output.  Below sample of code will do what you want.. 

1. Simple method:

 

Process P = Process.Start("eyeDetect.exe", "hello1.jpg haarcascade_frontalface_alt.xml haarcascade_eye.xml");
P.StartInfo.UseShellExecute = false;
P.WaitForExit();
int result = P.ExitCode;
Console.WriteLine("Here is my result " + result);
Console.ReadLine(); 

2. Descriptive Method:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
    {         
        static void Main(string[] args)
        { 
            StringBuilder Output = new StringBuilder(); 
            using (Process proc = new Process())
                {
                    proc.StartInfo.FileName = "eyeDetect.exe";
                    proc.StartInfo.Arguments = "hello1.jpg haarcascade_frontalface_alt.xml haarcascade_eye.xml";
                    proc.StartInfo.UseShellExecute = false;
                    proc.StartInfo.RedirectStandardOutput = true;
                    proc.StartInfo.RedirectStandardError = true;
                    proc.OutputDataReceived += (o, e) => Output.Append(e.Data).Append(Environment.NewLine);
                    proc.Start();
                    proc.BeginOutputReadLine();
                    proc.BeginErrorReadLine();
                    proc.WaitForExit();
                    int ExitCode = proc.ExitCode;
                }
                Console.WriteLine(Output);
                Console.ReadLine();
        }
    }
}

How to re install Windows 7 Boot loader

Boot the machine using windows 7 bootable DVD, When you get the second screen go to repair your computer. Select the command prompt and type below commands. 

bootrec /fixmbr 
press enter

bootrec /fixBoot
press enter.
Restart.

Saturday, May 15, 2010

7 Things to Stop Doing Now on Facebook

by Consumer Reports Magazine
Wednesday, May 12, 2010
provided by

1. Using a Weak Password

Avoid simple names or words you can find in a dictionary, even with numbers tacked on the end. Instead, mix upper- and lower-case letters, numbers, and symbols. A password should have at least eight characters. One good technique is to insert numbers or symbols in the middle of a word, such as this variant on the word "houses": hO27usEs!

2. Leaving Your Full Birth Date in Your Profile

It's an ideal target for identity thieves, who could use it to obtain more information about you and potentially gain access to your bank or credit card account. If you've already entered a birth date, go to your profile page and click on the Info tab, then on Edit Information. Under the Basic Information section, choose to show only the month and day or no birthday at all.

3. Overlooking Useful Privacy Controls

For almost everything in your Facebook profile, you can limit access to only your friends, friends of friends, or yourself. Restrict access to photos, birth date, religious views, and family information, among other things. You can give only certain people or groups access to items such as photos, or block particular people from seeing them. Consider leaving out contact info, such as phone number and address, since you probably don't want anyone to have access to that information anyway.


4. Posting Your Child's Name in a Caption

Don't use a child's name in photo tags or captions. If someone else does, delete it by clicking on Remove Tag. If your child isn't on Facebook and someone includes his or her name in a caption, ask that person to remove the name.

5. Mentioning That You'll Be Away From Home

That's like putting a "no one's home" sign on your door. Wait until you get home to tell everyone how awesome your vacation was and be vague about the date of any trip.

6. Letting Search Engines Find You

To help prevent strangers from accessing your page, go to the Search section of Facebook's privacy controls and select Only Friends for Facebook search results. Be sure the box for public search results isn't checked.

7. Permitting Youngsters to Use Facebook Unsupervised

Facebook limits its members to ages 13 and over, but children younger than that do use it. If you have a young child or teenager on Facebook, the best way to provide oversight is to become one of their online friends. Use your e-mail address as the contact for their account so that you receive their notifications and monitor their activities. "What they think is nothing can actually be pretty serious," says Charles Pavelites, a supervisory special agent at the Internet Crime Complaint Center. For example, a child who posts the comment "Mom will be home soon, I need to do the dishes" every day at the same time is revealing too much about the parents' regular comings and goings.

Copyrighted 2009, Consumers Union of U.S., Inc. All Rights Reserved.


Sunday, February 14, 2010

Control Your Windows PC using Your Face with eViaCam

This is an amazing software.Here after no need hand to control mouse. You can control using your own face.Check this out eViacam. Download it from here. Install it and run. Have some fun using your face. Move it, Click it. View this video to take good understand about software.



After installation you can see application like this. The green box is help for select your face or you can give it automatically select face.

There are many more softwares like this but this is very user friendly and easy to use software.

Tuesday, February 2, 2010

Create a strong password

A strong password is one that's difficult for others to determine by guessing or by using automated programs. A strong password is an important first step in protecting your personal information. A strong password:

* Contains seven to sixteen characters.
* Uses three of the following four types of characters:
o Uppercase letters (A, B, C).
o Lowercase letters (a, b, c).
o Numerals (1, 2, 3).
o Special characters (` ~ ! @ # $ % ^ & * ( ) _ + - = { } | [ ] \ : " ; ' < > ? , . /) .
* Isn't a common word or name, or a close variation on a common word or name.

Your password can't contain:

* Spaces or non-English characters.
* The portion of your e-mail address before the @ symbol.
* Your question or secret answer.

Notes

* Passwords are case sensitive (Capable of distinguishing between uppercase [capital] and lowercase [small] letters. For example, A is different from a. If information is case sensitive, it must be typed with the required capitalization.) .
* To help secure your personal information, don't write down your password, or share it with anyone else.
* If you have more than one e-mail account, use a different password for each account.