Friday, July 22, 2011

Google+ reached to 20M Users,It will hit 100M users inside of three months

Google+ lets people share comments, articles, photos and videos with various "circles" of friends or contacts, or they can share content publicly with any userwho wants to view their posts. Eventually, Google plans to incorporate features of Google+ in its other services, such as its YouTube video site.

Google+ took only 16 days to reach 10 million Users.Here is the graph with stats of google+'s rivals.





Still, the growth of Google+ has impressed observers because access to it is by invitation only, meaning people can join only if a current member invites them. And the company hasn't yet marketed the service to the more than one billion monthly visitors who use its search engine, Gmail and other services.

Here is Time to reach 20 million Users:




Google has a long way to go to reach the scale of Facebook Inc., which has more than 750 million users, and Twitter Inc., which has more than 200 million registered accounts.and I believe that Google will hit 100M users inside of three months  If you agree hit +1, if you disagree post why.

Tuesday, January 25, 2011

How To Facebooked a Blog on Blogger/Blogspot

Facebook offers Social plugins which let you see what your friends have liked, commented on or shared on sites across the web. All social plugins are extensions of Facebook and are specifically designed so none of your data is shared with the sites on which they appear.
Please check this links just below :
Here i am sharing how these plugins  you can Add on your Blog.
1.Like button
The Like button lets users share pages from your site back to their Facebook profile with one click.
Click here to know  how to embedd this like button.

2. Activity feed
The Activity Feed plugin shows users what their friends are doing on your site through likes and comments.
In order to add this widget.Go to Design -->Add a Gadget --> Select Html/Java Script...and copy the Generated Code(which is generated on facebook) to it.

3.Comments
The Comments plugin lets users comment on any piece of content on your site.Click here to use this.
You can also Disable you default comments.visit this link

4.Like box
The Like Box enables users to like your Facebook Page and view its stream directly from your website. 
Click Here to Add.
 
5.Recommendations
The Recommendations plugin gives users personalized suggestions for pages on your site they might like.
In order to add this widget.Go to Design -->Add a Gadget --> Select Html/Java Script...and copy the Generated Code(which is generated on facebook) to it.

I also Suggest you to Optimise your blog title.By default when your post page is displayed, your blog title is always shown in this manner:
<blog title>: <post title>
If you want your Blogger blog post be easily indexed by search engines, on each post page, your blog title has to be in this order:
<post title>: <blog title>
Click Here to Add. 

Thursday, January 20, 2011

ADO.NET Using C# - Part -7


 HOW TO LOGIN THROUGH DATABASE (WINDOWS FORM)
 

DATABASE:NAME = Northwind.
TABLE :NAME = Login.
FIELDS:
username,password.

private void BtnLogin_Click(object sender, EventArgs e)
  {
  SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True");
  SqlDataAdapter da = new SqlDataAdapter("select * from login", cn);
  SqlCommand cmd = new SqlCommand();
  cmd.Connection= cn;
  cmd.CommandText = "select *from login where username = '" + txtUser.Text + " ' and password = '" + txtPwd.Text + "'";
  cmd.Connection.Open();
  SqlDataReader dr;
  dr=cmd.ExecuteReader();
  if(dr.Read())
  {
  Form1 f = new Form1();
  f.Show();
  this.Hide();
  }
  else
  {
  MessageBox.Show( "Invalid UserName or Password!!","invalid");
  }
}

ADO.NET Using C# - Part -6


NAVIGATION/PAGINATION IN C# (WINDOWS FORM)

DATABASE:
NAME = NORTHWIND.
TABLE :
NAME = PRODUCTS.
FIELDS:
productid,productname,unitprice,unitsinstock,categoryid,supplierid.


SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True");
DataSet ds = new DataSet();
private CurrencyManager cm;

public void NAVIGATIONFORM_LOAD(object sender, EventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("select *from products", cn);
cm = (CurrencyManager)BindingContext[ds.Tables["PRODUCTS"]];
da.Fill(ds, "products");
TextBox1.DataBindings.Add("text", ds.Tables["products"], "productid");
TextBox2.DataBindings.Add("text", ds.Tables["products"], "productname");
TextBox3.DataBindings.Add("text", ds.Tables["products"], "unitprice");
TextBox4.DataBindings.Add("text", ds.Tables["products"], "unitsinstock");
TextBox5.DataBindings.Add("text", ds.Tables["products"], "categoryid");
TextBox6.DataBindings.Add("text", ds.Tables["products"], "supplierid");
dg.DataSource = ds.Tables["products"];
}
private void BTNFIRST_Click(object sender, EventArgs e)
{
cm.Position = 0;
}
private void BTNNEXT_Click(object sender, EventArgs e)
{
cm.Position += 1;
}
private void BTNPREVIOUS_Click(object sender, EventArgs e)
{
cm.Position -= 1;
}
private void BTNLAST_Click(object sender, EventArgs e)
{
cm.Position = cm.Count - 1;
}

ADO.NET Using C# - Part -5

HOW TO INSERT UPDATE  and DELETE DATA IN A TABLE 
BY USING ADO.NET
DataBase:
NAME = empLoyee.

TABLE:
NAME = empinfo. 

FIELDS :
ID ( primary key ) ,Name ,FatherName,PhoneNo. 

FORM: 
4 TexBoxes 3 Buttons(insert ,update ,Delete).

INSERT:

We cannot insert data where primary key is set therefore for insertion we make textbox of id unvisible or leave .

 private void INSERTBUTTON_CLICK(object sender, EventArgs e)

 {
 SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=employee;Integrated Security=True");
 SqlDataAdapter da = new SqlDataAdapter("select *from EmpInfo", cn);
  SqlCommand cmd = new SqlCommand();
  cmd.Connection = cn;
  cmd.CommandText = "Insert into EmpInfo(Name,FatherName,Phone no)VALUES( ' " +textBox1.Text + " ' , ' "+ textBox2.Text + " ' ," + textBox3.Text + " ) ";
  cmd.Connection.Open();
  cmd.ExecuteNonQuery();
  cmd.Connection.Close();
  MessageBox.Show("Record Saved");
}
ExecuteNonQuery Method:

The ExecuteNonQuery method of the SqlCommand class is used to execute commands that change a database. These commands include the Transact-SQL INSERT, UPDATE, DELETE, and SET statements. The method acts directly on a database connection and does not require a data set. It returns an integer that indicates the number of rows affected by the execution of a command. This method can also be used to perform catalog operations, such as querying the structure of a database or creating database objects.
UPDATE:

 private void UPDATEBUTTON_CLICK(object sender, EventArgs e)
  {

 SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=employee;Integrated Security=True");
  SqlDataAdapter da = new SqlDataAdapter("select *from EMPINFO", cn);
  SqlCommand cmd = new SqlCommand();
  cmd.Connection = cn;
  cmd.CommandText = "update EMPINFO set Name = ' " + textBox2.Text + " ', Fathername = ' " + textBox3.Text + " ', phoneno = " + textBox4.Text + " where id = " + textBox1.Text + " ";
  cmd.Connection.Open();
  cmd.ExecuteNonQuery();
  cmd.Connection.Close();
  MessageBox.Show("Record Updated");
  }

DELETE:
 private void DELETEBUTTON_CLICK(object sender, EventArgs e)
  {
SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=employee;Integrated Security=True");
 SqlDataAdapter da = new SqlDataAdapter("select *from empinfo", cn);
 SqlCommand cmd = new SqlCommand();
 cmd.Connection = cn;
 cmd.CommandText = "DELETE FROM EMPINFO WHERE STUID = " + textBox1.Text + " ";
 cmd.Connection.Open();
 cmd.ExecuteNonQuery();
 cmd.Connection.Close();
 MessageBox.Show("Record Deleted");
 }

ADO.NET Using C# - Part -4

HOW TO DISPLAY Data IN A COMBOBOX

Control OBJECTS:
1.
 FORM : name = form1.
2.COMBOBOX:name = combobox1. 
3. DATAGRID: name = datagridview1. 

private void Form1_Load(object sender, EventArgs e)
{
SqlConnection cn = new SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True");
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select *from products", cn);
da.Fill(ds,"products");
da.SelectCommand.CommandText = "select distinct product name from products";
dataGridView1.DataSource = ds.Tables["PRODUCTS"];
comboBox1.DataSource = ds.Tables["PRODUCTS"];
comboBox1.DisplayMember = "PRODUCTNAME";
comboBox1.ValueMember = "PRODUCTID";
comboBox1.SelectedIndex = 2; //Show product name in a combobox at index 2 when form load.
}

ADO.NET Using C# - Part -3

HOW TO SEARCH THROUGH CONTROL OBJECTS
Usually we search data by entering desired input in a control object liketextbox,comboboxetc.
After reading this post You will be able to use searching in yout project.
Drag Textbox(txtsearch) ,datagrid(dgsearch),and button named as btnsearch .Now paste below code into search buttonClick event.
private void btnsearch_Click(object sender, EventArgs e)
{
SqlConnection cnsearch = new SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True");
SqlDataAdapter dasearch = new SqlDataAdapter("select *from products", cnsearch);
DataSet dssearch = new DataSet();
Qsearch = "select *from products where productid = " + txtsearch.text+ "";
dasearch.SelectCommand.Connection = cnsearch;
dasearch.SelectCommand.CommandText = Qsearch;
dasearch.Fill(dssearch, "products");
dgsearch.DataSource = dssearch.Tables["products"];
}
NOTE:
if(textbox.text==integer)
{
"select *from products where productid = " + (textboxname).text + " "
//Dont forget to leave space between " + when giving name of textbox.
}
else
{
//only add single quotation at the end
select *from products where productid = ' " (textboxname).text + " ' "
}