Saturday, December 13, 2014

Enjoy food with salad this winter

Fall is changing into winters and the salad season is due to change gears. The grocery store is reloaded with greens and warm new seasonal delights will overpower your kitchen. So it’s about time to give-up eating thawed veggies. And with all these available at the local farm at great prices, there is really no excuse to get your daily fix of health.

So, are you ready to get out of your Salad rut?

Here we have put together some tips-- from a chef at a North Indian restaurant in Saket-- to make this health-packed crunchy delight even more colourful, flavourful and aromatic. Throw a look and build a meal with unusual flavours around these.

•    Play around with greens

Anything that qualifies under green leafy vegetable is power packed with goodness and is edible raw. They all come with different flavours so it is somewhat fun experimenting with them. Start off with exotic herbs to familiarize your family’s palate with the rawness of health, suggests professional tasters at best restaurants in Delhi. Arugula, radicchio, baby spinach and romaine will make a pretty variety. You can also lend flavours like freshly ground pepper, sour cream, Dijon, vinaigrette, mayo etc.


•    Grow your herbs

It’s always easier (and cheaper) to grab a scissor and reach out to your window sill or backyard every time you are trying to add zest to your meals. Herbs are the best plants to grow. They are pretty little things which need least care and fussing about and are tremendously useful kitchen ingredients. Cilantro leaves, basil, lemon basil, mint, chives etc. may not cost a fortune but they have a short shelf life. Besides, you tend to put them in instinctively rather than as planned while you were grocery shopping for the week. Though, if you choose to use store brought herbs, be sure to use them before they turn flaccid.

•    Create a Salad Bar

The only catch in including greens in your meals is you will have to be a little particular about storing them. It’s best to do that on the day you come from shopping itself. Just clean all the veggies and put them on a cooking rack or paper towel to dry. Once moisture free, cut them and store them in separate zipper pouches and mix and match them for each day of the week. You can even store readied cubes of meat, bacon strips, tuna, fresh turkey slices etc. whatever doesn’t gets tossed in the salad bowl by the end of the week can serve as filling for your hamburgers and sandwiches.

Saturday, August 23, 2014

Networking Commands for windows

Switches for ipconfig-

There are different types of switches for ipconfig that add functions These are invoked by entering "ipconfig /{switch}". To Find a list of switches, enter "ipconfig /?" or "ipconfig -?".  The switches of most interest to everyday use are "release" and "renew". Note that IP addresses are typically assigned or "leased" for a period of time, most of a day or more. It sometimes happens that IP addresses are no longer valid or are in conflict. we can often be solved by first releasing the IP address and then renewing it. Sometimes cable or DSL modems that seem to be disabled can be restored this way. If you travel and use broadband connections elsewhere, you will often find this procedure of releasing and renewing the IP address to be necessary.

Tracert-

Tracert  is another old tool taken from Unix. The main path between two computers on the Internet is not a straight line but consists of numerous segments or "hops" from one intermediate computer to another. Tracert shows each step of the path taken. It can be interesting to see just how convoluted it is. The times for each hop and the IP addresses for each intermediate computer are displayed. Tracert shows up to 30 hops. It is convenient for finding if there is one particular segment that is causing a slow or bad connection.

Pathping

This commands combines functions of Ping and Tracert. This will first list the number of hops required to reach the address you are testing and then send diffrent 2  pings to each router between you and the destination. After that, it computes results based on the packets returned from each router. Because pathping displays the degree of packet loss at any given router or link, you can determine which routers or subnets might be having network problems. Note down that whole process can consume 6-11 minutes because many pings are being sent. Here are switches to modify the process and these can be seen by entering  in the command prompt.

Netstat

Netstat Shows the updated TCP connections and ports on which  computer is listening, Ethernet statistics, the IP routing table, statistics for the IP, ICMP, and UDP protocols. It occurs with a number of switches for displaying a variety of quality of the network and TCP connections.  One possible use for Netstat is to determine if virus have established connections that you do not know about. The command "netstat -a" will display all your connections. The command "netstat -b" will show the executable files involved in creating a connection. 

Nslookup

This command helps solve the problem of Domain Name System (DNS) infrastructure and occurs with a number of sub-commands. These are mostly for systems admin. The primary interest for average computer users is its use to get the computer name corresponding to a numeric IP. For example, if you want to know who is "216.109.112.135" , enter "nslookup 216.109.112.135" and you will find that it is  a Yahoo computer. My firewall keeps a log of the IPs involved in the attempts to probe my computer and I sometimes look a few up to see who they are. 

Netsh

The network services shell is a large suite of many tools. I discuss it in some depth on another page. 


Saturday, August 9, 2014

How to install Android in PC | Way to install Android in PC

We speak about Android, what is the first thing that comes to your mind? I bet 90% of people will answer smart phones or computer. Though Android, the open source and stack full platform and fast growing operating system for Smartphone it is being run on it that provides more flexibility in terms of hardware and so on, as well as architecture x 86 computer that can run just fine there Android is out. Yes - not a full-blown like Blue Stacks Android, natively running in this post, we will show exactly how to achieve that. Android run on eclipse that have included server like tomcat it is platform independent like java and more secure and easy to use in Smartphone.

Step to install Android in System--

Step 1- First of All install eclipse in your system according to your windows version.

Step 2- After follow 1st step open SDK file in your system and agree to all.

Step 3- Finally open AVD file in your PC and edit and set AVD name and choose android version according to your work, start it so simply you can use Android software in your system.


Prior to we start, let's take a look at what Android on PC. Dubbed Android-x 86, for the Intel x86 hardware architecture specifically designed to work with Google's operating system (a) informal formation. This is available for the likes of Dell XPS12 Android on Intel project; it gives you that something is. However, Android- x 86, 32 as well as provide support for a number of other hardware producers that takes a step ahead of. It also supports the latest Android 4.4 Kit Kat, jelly belly, Ginger bread, and is fairly easy to install.

Tuesday, August 5, 2014

Email sending code in java

Here full java codes are below for sending email it is most and creative program for java programmer. If you still problem to write code for that see all code listed here.
java is platform independent programming language and it is more secure as comparison to other language, due to this reason many big e-commerce website are build in java.
For using email sending code open net beans or eclipse and go in servlet and write code step by step and run this program.

                                                                   
                                                                   
                                                                   
                                           
package com.sonu.email;

import javax.mail.*;
import javax.mail.internet.*;
import javax.mail.internet.MimeMessage.RecipientType;

import java.util.*;


public class GmailSender {

    private static String HOST = "smtp.gmail.com";
    private static String USER = "sonu.stoic@gmail.com";
    private static String PASSWORD = "9760769897";
    private static String PORT = "465";
    private static String FROM = "sonu.stoic@gmail.com";
    private static String TO = "anuj.patel58@gmail.com";

    private static String STARTTLS = "true";
    private static String AUTH = "true";
    private static String DEBUG = "true";
    private static String SOCKET_FACTORY = "javax.net.ssl.SSLSocketFactory";
    private static String SUBJECT = " Email Sending Practise";
    private static String TEXT = "Hello Friedz....";
    public static synchronized void send() {
        //Use Properties object to set environment properties
        Properties props = new Properties();

        props.put("mail.smtp.host", HOST);
        props.put("mail.smtp.port", PORT);
        props.put("mail.smtp.user", USER);

        props.put("mail.smtp.auth", AUTH);
        props.put("mail.smtp.starttls.enable", STARTTLS);
        props.put("mail.smtp.debug", DEBUG);

        props.put("mail.smtp.socketFactory.port", PORT);
        props.put("mail.smtp.socketFactory.class", SOCKET_FACTORY);
        props.put("mail.smtp.socketFactory.fallback", "false");

        try {

         
            Session session = Session.getDefaultInstance(props, null);
            session.setDebug(true);

         
            MimeMessage message = new MimeMessage(session);
            message.setText(TEXT);
            message.setSubject(SUBJECT);
            message.setFrom(new InternetAddress(FROM));
            message.addRecipient(RecipientType.TO, new InternetAddress(TO));
            message.saveChanges();

       
            Transport transport = session.getTransport("smtp");
            transport.connect(HOST, USER, PASSWORD);
            transport.sendMessage(message, message.getAllRecipients());
            transport.close();

        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    public static void main(String[] args) {
       GmailSender.send();
       System.out.println("Mail sent successfully!");
    }
}

Saturday, August 2, 2014

Nokia code

If you have Nokia mobile and facing problem to checking functionality for that below listed codes is most helpful for you. You can insert code on main screen of mobile and know all functionality typing this cod, i hope this code is most valuable for you.

#Type this code on main screen

1- If you want to check IMEI (International Mobile Equipment Identity) type *#06#
2-for reset factory setting type *#7780#
3-This code will clear the LCD display operator(operator logo) *#67705646#
4-If you want to view software version type *#0000#
5-Bluetooth device address *#2820#
6-Sim clock allowed status *#746025625#
7-Shows if sim have restrictions #pw+1234567890+1#
8-for displaying serial number *#92702689#
9-Enhanced Full Rate Codec (EFR) activation. Increase *#3370#
10-Half Rate Codec activation *#4720#
11-Half Rate Codec deactivation. The phone will restart automatically *#4720*

Friday, June 6, 2014

Activity in android

An activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. If an application has more than one activity, then one of them should be marked as the activity that is presented when the application is launched. If you have worked with C, C++ or Java programming language then you must have seen that your program starts from main() function. Very similar way, Android system initiates its program with in anActivity starting with a call on onCreate() callback method. There is a sequence of callback methods that start up an activity and a sequence of callback methods that tear down an activity as shown in the below Activity lifecycle diagram: (image courtesy : android.com )
The

The Activity class defines the following callbacks i.e. events. You don't need to implement all the callbacks methods. However, it's important that you understand each one and implement those that ensure your app behaves the way users expect.
  
Call Back                                                           Description

onCreate()                                             This is the first callback and called when the activity is first created.
onStart()                                                This callback is called when the activity becomes visible to the user.
onResume()                                           This is called when the user starts interacting with the application.
onPause()                                              The paused activity does not receive user input     
onStop()                                                This callback is called when the activity is no longer visible.
onDestroy()                                           This callback is called before the activity is destroyed by the system
onRestart()                                             This callback is called when the activity restarts after stopping it.

Examples.....

package com.example.helloworld;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;

public class MainActivity extends Activity {
String msg = "Android : ";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.d(msg, "The onCreate() event");
}
/** Called when the activity is about to become visible. */
@Override
protected void onStart() {
super.onStart();
Log.d(msg, "The onStart() event");
}
/** Called when the activity has become visible. */
@Override
protected void onResume() {
super.onResume();
Log.d(msg, "The onResume() event");
}
/** Called when another activity is taking focus. */
@Override
protected void onPause() {
super.onPause();
Log.d(msg, "The onPause() event");
}
/** Called when the activity is no longer visible. */
@Override
protected void onStop() {
super.onStop();
Log.d(msg, "The onStop() event");
}
/** Called just before the activity is destroyed. */
@Override
public void onDestroy() {
super.onDestroy();
Log.d(msg, "The onDestroy() event");
}
}

An activity class loads all the UI component using the XML file available in res/layout folder of the project. Following statement loads UI components from res/layout/activity_main.xml file:

setContentView(R.layout.activity_main);

Friday, January 31, 2014

Linux Commands

About Linux
A Linux distribution is a collection of (usually open source) software on top of a
Linux kernel. A distribution (or short, distro) can bundle server software, system
management tools, documentation and many desktop applications in a central secure
software repository. A distro aims to provide a common look and feel, secure and

Linux Commands.

1. man $command

Type man followed by a command (for which you want help) and start reading. Press
q to quit the manpage. Some man pages contain examples (near the end).
paul@laika:~$ man whois
Reformatting whois(1), please wait...

2. man $configfile

Most configuration files have their own manual.
paul@laika:~$ man syslog.conf
Reformatting syslog.conf(5), please wait...

3. man $daemon

This is also true for most daemons (background programs) on your system..
paul@laika:~$ man syslogd
Reformatting syslogd(8), please wait...

4. man -k (apropos)

man -k (or apropos) shows a list of man pages containing a string.
paul@laika:~$ man -k syslog
lm-syslog-setup (8) - configure laptop mode to switch syslog.conf ...
logger (1) - a shell command interface to the syslog(3) ...
syslog-facility (8) - Setup and remove LOCALx facility for sysklogd
syslog.conf (5) - syslogd(8) configuration file
syslogd (8) - Linux system logging utilities.
syslogd-listfiles (8) - list system logfiles

6. whereis

The location of a manpage can be revealed with whereis.
paul@laika:~$ whereis -m whois
whois: /usr/share/man/man1/whois.1.gz
This file is directly readable by man.
paul@laika:~$ man /usr/share/man/man1/whois.1.gz


Working on Directory.


1.1. pwd
The you are here sign can be displayed with the pwd command (Print Working
Directory). Go ahead, try it: Open a command line interface (like gnome-terminal,
konsole, xterm, or a tty) and type pwd. The tool displays your current directory.
paul@laika:~$ pwd
/home/paul

1.2 cd
You can change your current directory with the cd command (Change Directory).
paul@laika$ cd /etc
paul@laika$ pwd
/etc
paul@laika$ cd /bin
paul@laika$ pwd
/bin
paul@laika$ cd /home/paul/
paul@laika$ pwd
/home/paul

1.3cd ~
You can pull off a trick with cd. Just typing cd without a target directory, will put
you in your home directory. Typing cd ~ has the same effect.
paul@laika$ cd /etc
paul@laika$ pwd
/etc
paul@laika$ cd
paul@laika$ pwd
/home/paul
paul@laika$ cd ~
paul@laika$ pwd
/home/paul

1.4 cd ..
To go to the parent directory (the one just above your current directory in the
directory tree), type cd .. .
paul@laika$ pwd
/usr/share/games
paul@laika$ cd ..
paul@laika$ pwd
/usr/share
To stay in the current directory, type cd . ;-) We will see useful use of the . character

representing the current directory later.

1.5 cd -
Another useful shortcut with cd is to just type cd - to go to the previous directory.
paul@laika$ pwd
/home/paul
paul@laika$ cd /etc
paul@laika$ pwd
/etc
paul@laika$ cd -
/home/paul
paul@laika$ cd -
/etc

1.6 absolute and relative paths
You should be aware of absolute and relative paths in the file tree. When you type
a path starting with a slash (/), then the root of the file tree is assumed. If you don't
start your path with a slash, then the current directory is the assumed starting point.
The screenshot below first shows the current directory /home/paul. From within this
directory, you have to type cd /home instead of cd home to go to the /home directory.
paul@laika$ pwd
/home/paul
paul@laika$ cd home
bash: cd: home: No such file or directory
paul@laika$ cd /home
paul@laika$ pwd

/home
When inside /home, you have to type cd paul instead of cd /paul to enter the
subdirectory paul of the current directory /home.
paul@laika$ pwd
/home
paul@laika$ cd /paul
bash: cd: /paul: No such file or directory
paul@laika$ cd paul
paul@laika$ pwd

/home/paul
In case your current directory is the root directory /, then both cd /home and cd
home will get you in the /home directory.
paul@laika$ pwd/
paul@laika$ cd home
paul@laika$ pwd
/home
paul@laika$ cd /
paul@laika$ cd /home
paul@laika$ pwd

/home

path completion

The tab key can help you in typing a path without errors. Typing cd /et followed by
the tab key will expand the command line to cd /etc/. When typing cd /Et followed by
the tab key, nothing will happen because you typed the wrong path (upper case E).
You will need fewer key strokes when using the tab key, and you will be sure your

typed path is correct
1.7 ls
You can list the contents of a directory with ls.
paul@pasha:~$ ls
allfiles.txt dmesg.txt httpd.conf stuff summer.txt
paul@pasha:~$


Tricks and Tips