Programming Hub
Programming code, javascript code, javascript tutorial, javascript program, programming tutorial, programming language tutorial with explanation, programming guide, easy way to learn programming language, how to code write code
Sunday, April 5, 2020
Thursday, June 20, 2019
VBA CODE
Private Sub cancle_Click()
Unload Me
End Sub
Private Sub clear_Click()
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
End Sub
Private Sub save_Click()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Sheet1.Range("A" & sh).Value = Me.TextBox1.Value
Sheet1.Range("A" & sh).Offset(0, 1).Value = Me.TextBox2.Value
Sheet1.Range("A" & sh).Offset(0, 2).Value = Me.TextBox3.Value
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
Call clear_Click
End Sub
Private Sub UserForm_Initialize()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
End Sub
Unload Me
End Sub
Private Sub clear_Click()
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
End Sub
Private Sub save_Click()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Sheet1.Range("A" & sh).Value = Me.TextBox1.Value
Sheet1.Range("A" & sh).Offset(0, 1).Value = Me.TextBox2.Value
Sheet1.Range("A" & sh).Offset(0, 2).Value = Me.TextBox3.Value
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
Call clear_Click
End Sub
Private Sub UserForm_Initialize()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
End Sub
Tuesday, June 27, 2017
HTML Menu
HTML Menu sample program tutorial.
<html>
<head>
<link rel="stylesheet" href="hyper.css" type="text/css">
</head>
<body>
<a href="a.html">Home</a> | <a href="b.html">Login</a>
</body>
</html>
Explanation
It will look like this
when clicking on home it will redirect to a.html and when clicking on another menu login it will redirect to b.html.
Below code is very simple menu code with css (Cascading Style Sheet)
Code:
<head>
<link rel="stylesheet" href="hyper.css" type="text/css">
</head>
<body>
<a href="a.html">Home</a> | <a href="b.html">Login</a>
</body>
</html>
Explanation
It will look like this
when clicking on home it will redirect to a.html and when clicking on another menu login it will redirect to b.html.
How to refresh webpage using meta tag to another webpage
Meta Tag Sample Program to refresh webpage and redirect to
targeted webpage
<! DOCTYPE HTML> <html> <head> <title> Meta tag </title>
<meta
http-equiv="refresh" content="7;url=D:\ASPDoTNet
Practical\a.html">
</head>
<body>
hello world
</body>
</html>
Explanation
Here in this html code meta tag refresh web page in 7 second
and redirect to a.html page.
Wednesday, April 19, 2017
Android Simple Calculator Source Code
"Android Simple Calculator Source Code", Edit main.xml file and activity file..!Below I addressed two file main.xml and P1Activity.java file for simple android calculator source code, You can easily copy and paste this code into your eclipse or android studio.
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/n1"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/ed1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number" >
<requestFocus />
</EditText>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/n2"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/ed2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/a"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/ed3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number" />
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/pluse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pluse" />
<Button
android:id="@+id/min"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/minus" />
<Button
android:id="@+id/mul"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/mul" />
<Button
android:id="@+id/div"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/div" />
</TableRow>
</LinearLayout>
</LinearLayout>
P1Activity.java
package com.p1;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
public class P1Activity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
EditText ed1,ed2,ed3;
Button pluse,min,mul,div;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ed1=(EditText)findViewById(R.id.ed1);
ed2=(EditText)findViewById(R.id.ed2);
ed3=(EditText)findViewById(R.id.ed3);
pluse=(Button)findViewById(R.id.pluse);
min=(Button)findViewById(R.id.min);
mul=(Button)findViewById(R.id.mul);
div=(Button)findViewById(R.id.div);
pluse.setOnClickListener(this);
min.setOnClickListener(this);
mul.setOnClickListener(this);
div.setOnClickListener(this);
}
public void onClick(View arg0) {
// TODO Auto-generated method stub
String st1=ed1.getText().toString();
String st2=ed2.getText().toString();
int p=Integer.parseInt(st1);
int r=Integer.parseInt(st2);
if(arg0.getId()==R.id.pluse)
{
double a=p+r;
ed3.setText(""+a);
}
else if(arg0.getId()==R.id.min)
{
double a=p-r;
ed3.setText(""+a);
}
else if(arg0.getId()==R.id.mul)
{
double a=p*r;
ed3.setText(""+a);
}
else if(arg0.getId()==R.id.div)
{
double a=p/r;
ed3.setText(""+a);
}
else
{
}
}
}
Friday, December 9, 2016
Shortcut Tips
1.How to quickly Log-off Computer
Ans: Start Button+Press L
2.Want Alarm Clock Online?
Ans: http://kukuklok.com
3.How to make beautiful online wallpaper?
Ans:http://bighugelabs.com
Ans: Start Button+Press L
2.Want Alarm Clock Online?
Ans: http://kukuklok.com
3.How to make beautiful online wallpaper?
Ans:http://bighugelabs.com
Tech and Tips
Some Basic Meaningful Answer
1.What is the meaning of 32k & 64k SIM ?
Ans: It Means your SIM is Operating in the frequency of 32khz or 64khz & your sim is a GSM SIM Card.
2.What is Auxiliary Memory ?
Ans:Devices that provide backup storage are called Auxiliary memory. They holds information that are not presently used by devices (computer).
3.Forgot Computer Password?
Ans: 1. Restart PC
2. Press F5 key
3. Select-Safe Mode
4. Select Control Panel
5. Select Administrator
6. Goto User Account
7. Remove Password
8. Restart..Enjoy...!
4.Microsoft office is now online!
Ans: Edit your office work anywhere, anytime
Address: http://office.microsoft.com/en-in/web-apps/
1.What is the meaning of 32k & 64k SIM ?
Ans: It Means your SIM is Operating in the frequency of 32khz or 64khz & your sim is a GSM SIM Card.
2.What is Auxiliary Memory ?
Ans:Devices that provide backup storage are called Auxiliary memory. They holds information that are not presently used by devices (computer).
3.Forgot Computer Password?
Ans: 1. Restart PC
2. Press F5 key
3. Select-Safe Mode
4. Select Control Panel
5. Select Administrator
6. Goto User Account
7. Remove Password
8. Restart..Enjoy...!
4.Microsoft office is now online!
Ans: Edit your office work anywhere, anytime
Address: http://office.microsoft.com/en-in/web-apps/
Subscribe to:
Posts (Atom)