Thursday, October 6, 2016

lambda expression in C#

A lambda expression is an anonymous function means no name of method. The => token is called the lambda operator. It is used in lambda expressions to separate the input variables on the left side from the lambda body on the right side.


Example
delegate int del(int i);
static void Main(string[] args)
{
    del myDelegate = x => x * x;
    int my = myDelegate(5); //my = 25
}


Example 2:

        public static void Main()
        {
            Func<int, int> t = x => x + 1;

            Func<int, int> t2 = x => { return x + 1; };

            Func<string, string> t3 = x => { return x; };

            Action<int> example1 =  (int x) => Console.WriteLine("{0}", x);
       
       
            Console.WriteLine(t.Invoke(1));
            example1.Invoke(7);
            Console.ReadLine();
        }
Output : 2
               7

Using hashtags on Instagram

How do I use hashtags?

You can add hashtags in the caption or comments of your post. If you add hashtags to a post that's set to public, the post will be visible on the corresponding hashtag page.


To tag a photo or video with a hashtag:

1. Take or upload a photo or video
2. Choose to add a filter, then type # followed by text or emoji in the Caption field (ex: #flower)
3. If you want to add a hashtag to a post you've already uploaded, edit the caption or include your hashtag in a comment on your photo

After you tag your post with a hashtag, you'll be able to tap the hashtag to see a page that shows all photos and videos people have uploaded with that hashtag.

Things to keep in mind:

  • When people with private profiles tag posts, they won't appear publicly on hashtag pages.
  • Numbers are allowed in hashtags. However, spaces and special characters, like $ or %, won't work.
  • You can only tag your own posts. You can't tag other people's photos/videos.
  • You can use up to 30 tags on a post. If you include more than 30 tags on a single photo/video, your comment won't post.
  • Older versions of Apple IOS don't support tapping hashtags. Instead, search hashtags by going to  Search & Explore > Search > Tags.


How can I change the phpmyadmin automatic log out time?

In PHPMyAdmin 4 this no longer appears in the config.inc.php file. Instead go to PHPMyAdmin in your browser. Ensure you are at the localhost level to see the Settings link. Then set Settings > Features > Change the value of 'Login cookie validity' > Save