Tuesday, July 27, 2010

Interface

In object-oriented languages the term "interface" is often used to define an abstract type that contains no data but exposes behaviors defined as methods. A class  having all the methods corresponding to that interface is said to implement that interface. Furthermore, a class can implement multiple interfaces, and hence can be of different types at the same time.

An interface is hence a type definition; anywhere an object can be exchanged (in a function or method call) the type of the object to be exchanged can be defined in terms of an interface instead of a specific class. This allows later code to use the same function exchanging different object types; hence such code turns out to be more generic and reusable.

Usually a method in an interface cannot be used directly; there must be a class implementing that object to be used for the method invocation. For example, one can define an interface called "Stack" that has two methods: push() and pop() and later implement it in two different versions, say, FastStack and GenericStack—the first being faster but working with a stack of fixed size, and the second using a data structure that can be resized but at the cost of somewhat lower speed.

This approach can be pushed to the limit of defining interfaces with a single method; e.g. the Java language defines the interface Readable that has the single read() method and a collection of implementations to be used for different purposes, among others: BufferedReader, FileReader, InputStreamReader, PipedReader, and StringReader.
In its purest form, an interface (like in Java) must include only method definitions and constant values that make up part of the static interface of a type. Some languages (like C#) also permit the definition to include properties owned by the object, which are treated as methods with syntactic suga

Use of lambda operator => "Goes To"

delegate bool D();
    delegate bool D2(int i);

    class Test
    {
        D del;
        D2 del2;
        public void TestMethod(int input)
        {
            int j = 0;
            // Initialize the delegates with lambda expressions.
            // Note access to 2 outer variables.
            // del will be invoked within this method.
            del = () => { j = 10;  return j > input; };

            // del2 will be invoked after TestMethod goes out of scope.
            del2 = (x) => {return x == j; };
            
            // Demonstrate value of j:
            // Output: j = 0 
            // The delegate has not been invoked yet.
            Console.WriteLine("j = {0}", j);

            // Invoke the delegate.
            bool boolResult = del();

            // Output: j = 10 b = True
            Console.WriteLine("j = {0}. b = {1}", j, boolResult);
        }

        static void Main()
        {
            Test test = new Test();
            test.TestMethod(5);

            // Prove that del2 still has a copy of
            // local variable j from TestMethod.
            bool result = test.del2(10);

            // Output: True
            Console.WriteLine(result);
            
            Console.ReadKey();
        }
    }

Generating Alphanumeric Unique series

function randomPrefix($length)
{
$random= "";
srand((double)microtime()*1000000);
$data = "AbcDE123IJKLMN67QRSTUVWXYZ";
$data .= "aBCdefghijklmn123opq45rs67tuv89wxyz";
$data .= "0FGH45OP89";
for($i = 0; $i < $length; $i++)
{
$random .= substr($data, (rand()%(strlen($data))), 1);
}
return $random;
}
randomPrefix(10);

Wednesday, July 21, 2010

Ad Posting Jobs Without Investment.Earn Money By Posting Ads.

Post Ads Online and Earn Rs30 Per post.Join Free Today.
Ad Posting Jobs Without Investment.Earn Money By Posting Ads. 
www.Adpost2Earn.com
India 

Wednesday, July 14, 2010

Format a credit card number

Function FormatCreditCard(ByVal text As String) As String
    Dim i As Long
    
    ' ignore empty strings
    If Len(text) = 0 Then Exit Function
    
    ' get rid of dashes, spaces and invalid chars
    For i = Len(text) To 1 Step -1
        If InStr("0123456789", Mid$(text, i, 1)) = 0 Then
            text = Left$(text, i - 1) & Mid$(text, i + 1)
        End If
    Next
    ' then, re-insert them in the correct position
    FormatCreditCard = Format$(text, "!@@@@ @@@@ @@@@ @@@@")
    
End Function

Francesco Balena

Monday, July 12, 2010

Hotel Le Pozze di Lecchi

Set deep in the Chianti countryside, Le Pozze di Lecchi is a peaceful, rural retreat with impressive amenities. This lovingly restored 15th-century mill has large grounds with a panoramic pool.

Despite the tranquillity of this green, relaxing hotel, exploring Tuscany is easy from here, with Siena just 30 minutes' drive away. The family who manage Hotel Le Pozze di Lecchi will be pleased to book a variety of activities for you, from wine tasting and cooking classes organised directly in the hotel, to tours of nearby landmarks.

Stroll through Le Pozze di Lecchi's well-kept gardens and their 7 hectares of vineyards and olive groves. Alternatively take a bike out and go visit the natural springs at Lecchi, from which the hotel takes its name. Play bowls or table tennis, or just relax by the split-level pool and soak up the sun as you enjoy the views.

Hotel Le Pozze di Lecchi has a lovely relaxation area where you can enjoy a Jacuzzi, a sauna or a Turkish bath. After an aromatherapy massage why not head to the restaurant for a taste of some typical Tuscan delicacies?

skin deep

<a rel="nofollow" href="http://www.bloggerwave.com/Bloggerwave/c/403/35733/1">Oxis on Twitter </a>Next year, I will be turning the big 3-0, and by then I already have two daughters in tow. I used to think that by the time I reach that age, I wouldn’t care much of how I look. But as I am about to give birth to my second daughter in a month’s time, I look at the mirror and see not an almost 29- year- old lady, but someone who looks harassed and stressed. In short, I don’t look my age.



I was never really concerned about physical attributes. After all, I thought it was quite superficial to even think of physical appearance when I have kids to take care of. But then I realized that my physical appearance serves as my indicators of good health. Lately I have seen people spend much of their hard earned money in antioxidants and glutathione. At first I thought that they use it just to have beautiful skin, like that of an anti-aging beauty product. But then I realized that these products actually keep you healthy, and beautiful skin is just a side effect.






And if you would like to invest in quality, I suggest that you go for Oxis International. They offer products that range from dietary supplements, personal care, to food and beverage. Their products help address major health issues on oxidative stress and inflammation. Antioxidants in their products fight free radicals that harm our body. And it’s really a good way to start caring for your body.






Every day, we continue to face stress and challenges that build up and let us age faster. By using antioxidants and similar products, we save up for our good health. Think of it as penny stocks, one that you don’t need to invest much but will still gain a lot.

Features of Visual Studio 2010

Features of Visual Studio 2010

How to create a view to display list data from specific month in sharepoint

How to create a view to display list data from specific month in sharepoint

Sunday, July 11, 2010

Get Data Entry Project :

Hi Friends


Get Data Entry Project :


Editing In Word Document As per given Requirement:

Fee to be paid: 5000Rs

Monthly Remuneration : 10,800 Rs.

Work Submission : 30 days.

Contract period: 11 Months.

Work load :900 Pages.

Rate per page: 12 Rs. Appx.



You have To convert PDF File To Word by given Software and just Editing As per requirement.


As Per Security We have Legal contract  For 11 moths:


Requirement Accuracy must have above 95%.


Conact:
Hitendra Patel
(+9428843272)