Sunday, January 26, 2014
Wednesday, January 15, 2014
JAVA SE Basic
Example of Java
import java.util.Scanner;public class secondDegree {
public static void main(String[] args){
int a, b, c;
double delta; // Declaration of variable
Scanner input = new Scanner(System.in);
Ssytem.out.println("Second Equation");
System.out.println("Enter number of Axx:");
a = input.nextInt();
System.out.println("Enter number of Bx:");
b = input.nextInt();
System.out.println("Enter number of C:");
c = input.nextInt();
delta = (b*b) - 4(a*c);
if(a + b + c == 0){
System.out.println("x1 = 1 and " + "x2 = " + (c/a));
}
else if(a + c = b){
System.out.println("x1 = -1 and " + "x2 = " + -(c/a));
}
else{
if(delta < 0){
System.out.println("delta no Root!...");
}
else if(delta > 0){
System.out.println("x1 = " + (-b + (Math.sqrt(delat) ) / 2* a) );
System.out.println("x1 = " + ( -b - (Math.sqrt(delta)) / 2*a) );
}
else if(delta == 0){
System.out.println("Root is " + -b/(2*a));
}
}
}
}
///////////////////////////////////////////Example Two//////////////////////////////////////////////
import java.util.Scanner;
public class Score {
public static void main(String[] args){
Scanner mysc = new Scanner(System.in);
double avg = 0, score[], totalScore = 0;
String grade = "";
String username = "";
String password = "";
String[] subJect = {"Java", "PHP & MySQL", "Introduction to Programming", "HTML"};
int i = 0;
score = new double[subJect.length];
System.out.println("User name:");
username = mysc.next();
System.out.println("Password:");
password = mysc.next();
for(i = 0; i < subJect.length; i++){
System.out.println(subJect[i]);
score[i] = mysc.nextDouble();
totalScore += score[i];
}
avg = totalScore / subJect.length;
if(avg >= 85 && avg <= 100){
grade = "A";
}else if (avg >= 75 && avg <= 84) {
grade = "B";
}else if (avg >= 65 && avg <= 74) {
grade = "C";
}else if (avg >= 50 && avg <= 64) {
grade = "D";
}else if (avg >= 0 && avg <= 49) {
grade = "F";
}else{
grade = "Invalide Grade!";
}
System.out.println();
System.out.println("...............................................");
System.out.println("UserName is:" + username);
System.out.println("Password is:" + password);
for(i = 0; i < subJect.length; i++){
System.out.println(subJect[i] + "=" + score[i]);
}
System.out.println("TotalScore is:" + totalScore);
System.out.println("The Average is:" + avg);
System.out.println("Grade is:" + grade);
}
}
Monday, January 13, 2014
Introducing SharePoint 2010
SharePoint 2010 as a Development Platform
Over the past few years, Microsoft SharePoint has experienced a rapid rate of adoption in the software industry. As more and more companies and organizations begin to use SharePoint technologies, there has also been a significant increase in the number of software development projects that target SharePoint environments. The industry is currently witnessing scores of professional developers who are migrating to Microsoft SharePoint 2010 from other development platforms, such as Microsoft ASP.NET, Lotus Notes, Enterprise JavaBeans, and IBM WebSphere, just to name a few.SharePoint Development Building Blocks
Although you can create many different types of components within a SharePoint solution, the most common type is a Feature. A SharePoint Feature provides a mechanism for adding elements to a target website or site collection through a process known as Feature activation. The types of elements that you can add to a site include menu commands, link commands, page templates, page instances, list definitions, list instances, event handlers, and workflows.Every Feature has an activation scope that defines the context in which the Feature can be activated and deactivated. For example, a Feature can have an activation scope setting of Web, which means that it can be activated and deactivated within the context of the a website. If you create a Feature that has an activation scope of Site, your Feature definition is then activated and deactivated within the scope of a site collection. The two other possible activation scopes for a Feature definition are WebApplication scope and Farm scope.
Friday, January 3, 2014
PHP 5
What is PHP?
- PHP is an acronym for "PHP Hypertext Preprocessor"
- PHP is a widely-used, open source scripting language
- PHP scripts are executed on the server
- PHP costs nothing, it is free to download and use
What is a PHP File?
- PHP files can contain text, HTML, CSS, JavaScript, and PHP code
- PHP code are executed on the server, and the result is returned to the browser as plain HTML
- PHP files have extension ".php"
What Can PHP Do?
- PHP can generate dynamic page content
- PHP can create, open, read, write, and close files on the server
- PHP can collect form data
- PHP can send and receive cookies
- PHP can add, delete, modify data in your database
- PHP can restrict users to access some pages on your website
- PHP can encrypt data
Example
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>
HTML Scripts
The HTML <script> Tag
The <script> tag is used to define a client-side script, such as a JavaScript.The <script> element either contains scripting statements or it points to an external script file through the src attribute.
Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
Example
<script>
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>
React to events:
<button type="button" onclick="myFunction()">Click Me!</button>
Manipulate HTML styles:
document.getElementById("demo").style.color="#ff0000";
Thursday, January 2, 2014
HTML5 BASIC
HTML5
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
The text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example Explained
The DOCTYPE declaration defines the document typeThe text between <html> and </html> describes the web page
The text between <body> and </body> is the visible page content
The text between <h1> and </h1> is displayed as a heading
The text between <p> and </p> is displayed as a paragraph
Subscribe to:
Posts (Atom)