Do you want to have a toolbar at the bottom of the browser on your WordPress website? Then you’ve come for the right tutorial.
The WP Social Toolbar plugin is currently live on this very page. Just simply look towards the bottom of your browser.
Tutorials by Jeff Robert Dagala
Do you want to have a toolbar at the bottom of the browser on your WordPress website? Then you’ve come for the right tutorial.
The WP Social Toolbar plugin is currently live on this very page. Just simply look towards the bottom of your browser.
Here is how to make a login form on WordPress. On this tutorial, I will put the login form on my sidebar.
First, we will detect if the user had logged or not and we’ll display “Welcome! ” if the user had logged in.
Here’s the code on how to detect if the user had logged or not.
<?php //this will detect if the user had logged or not. if (is_user_logged_in()){ // displays Welcome! if the user had logged in. echo "<h2>Welcome! </h2>"; ?> <ul> <li><a href="<?php echo wp_logout_url(get_permalink()); ?>">Logout</a></li> </ul> <br/> <?php } ?>
Here is the example on how to code Array Based Stack Class in Java
/** * @(#)Stack.java Name: Jeff Robert Dagala BSCOE - 5 Course: COE 18 LAB WF 9:00 - 10:30 * @version 1.00 2010/7/16 */ public interface Stack { public void setup(int size); public void clear(); public void push(Object newElem); public Object pop(); public boolean isEmpty(); public boolean isFull(); public void showStructure(); }
Continue to read on Array Based Stack Class in Java Part 2
The constructor class of AStack.java, is where we implements the function that we create on our interface Stack.java.
/** * @(#)AStack.java Name: Jeff Robert Dagala BSCOE - 5 Course: COE 18 LAB WF 9:00 - 10:30 * @version 1.00 2010/7/14 */ import java.util.*; import java.lang.*; import java.io.*; public class AStack implements Stack{ // Array based stack class private static final int maxSize = 10; // Default size of the array private int size; // Maximum size of stack private int top; // Index for top Object private Object [] element; // Array holding stack Objects public AStack(){ // Constructor: default size setup(maxSize); } public AStack(int size){ // Constructor: specific size setup(size); } public void setup(int size){ // Called by constructors only this.size = size+1; this.top = 0; this.element = new Object[this.size]; } public void clear(){ // Remove all Objects from stack this.top = 0; } public void push(Object newElem) { // Push Object onto stack if(this.top < this.size){ this.element[this.top] = newElem; this.top++; } else throw new IllegalArgumentException("Stack Overflow"); } public Object pop() { // Pop Object from top of stack if(!isEmpty()){ return this.element[--this.top]; } else throw new IllegalArgumentException("Empty Stack"); } public boolean isEmpty(){ // Return true if stack is empty return (this.top == 0); } public boolean isFull(){ // Return true if stack is full int max = this.size-1; return (this.top == max); } public void showStructure(){ int i; for(i=0;i<=this.top;i++){ if(element[i]!=null) System.out.print(element[i] + " "); } } }
Continue to read on Array Based Stack Class in Java Part 3
This is the tester class in AStack.java.
/** * @(#)AStackTester.java Name: Jeff Robert Dagala BSCOE - 5 Course: COE 18 LAB WF 9:00 - 10:30 * @version 1.00 2010/7/14 */ import java.util.*; import java.io.*; import java.lang.*; public class AStackTester { public static void main(String args[]) throws IOException{ Stack newStack = new AStack(5); char element = 'x'; char command = 'y'; // Input command System.out.println("Commands:"); System.out.println(" + : Push "); System.out.println(" - : Pop"); System.out.println(" C : Clear"); System.out.println(" E : Check if stack is empty"); System.out.println(" F : Check if stack is full"); System.out.println(" Q : Exit"); System.out.println(); do { System.out.print("Command: "); // Read command command = (char)System.in.read(); while (Character.isWhitespace(command)) // ignore whitespace command = (char)System.in.read(); if ( command == '+' ){ element = (char)System.in.read(); if (Character.isWhitespace(element)) // element is whitespace System.out.print("Element to add: "); while (Character.isWhitespace(element)) element = (char)System.in.read(); // get valid element } System.out.println("Display Stack: "); newStack.showStructure(); switch ( command ){ // start sa switch case '+' : // push System.out.println("\nPush " + element); if(!newStack.isFull()) newStack.push(new Character(element)); break; case '-' : // pop if(!newStack.isEmpty()) System.out.println("\nPopped " + newStack.pop()); else System.out.println("Stack is Empty!"); break; case 'C' : case 'c' : // clear System.out.println("\nClear the stack"); newStack.clear(); break; case 'E' : case 'e' : // empty if ( newStack.isEmpty() ) System.out.println("\nStack is empty"); else System.out.println("\nStack is NOT empty"); break; case 'F' : case 'f' : // full if ( newStack.isFull() ) System.out.println("\nStack is full"); else System.out.println("\nStack is NOT full"); break; case 'Q' : case 'q' : // Exit break; default : // if invalid command if (!(Character.isWhitespace(command))) System.out.println("Invalid command"); } // end sa switch } while ( command != 'Q' && command != 'q' ); } }
This is the code for constructor class in Quadratic.java
/** * @(#)Quadratic.java Name: Jeff Robert Dagala BSCOE - 5 Course: COE 18 LAB WF 9:00 - 10:30 * @version 1.00 2010/6/25 */ import java.util.*; import java.lang.*; public class Quadratic { private double A; private double B; private double C; private double x; public Quadratic() { } public Quadratic(double A, double B, double C) { this.A = A; this.B = B; this.C = C; } /** START OF SETTERS **/ public void setA(double tempA){ this.A = tempA; } public void setB(double tempB){ this.B = tempB; } public void setC(double tempC){ this.C = tempC; } /** END OF SETTERS **/ /** START OF GETTERS **/ public double getA(){ return this.A; } public double getB(){ return this.B; } public double getC(){ return this.C; } /** END OF GETTERS **/ public double evaluate (double x){ double result = 0; this.x = x; result = ((this.A*(this.x*this.x)) + (this.B*this.x) + this.C); return result; } public double discriminant(){ double result; result = ((this.B*this.B) - (4*this.A*this.C)); return result; } public boolean isImaginaryRoots(){ boolean z = false; if (discriminant() < 0){ z = true; } return z; } public boolean isRealRoots(){ boolean z = false; if (discriminant() >= 0){ z = true; } return z; } public float firstRoot(){ float x1; //since Math.sqrt is double, we need to type cast the result into float x1 = (float)(((this.B*(-1)) + (double)Math.sqrt((this.B*this.B) - (4*this.A*this.C))) / (2*this.A)); return x1; } public float secondRoot(){ float x2; //since Math.sqrt is double, we need to type cast the result into float x2 = (float)(((B*(-1)) - Math.sqrt((B*B) - (4*A*C))) / (2*A)); return x2; } public String toString() { boolean bool = true; StringBuilder result = new StringBuilder(); String NEW_LINE = System.getProperty("line.separator"); result.append("Quadratic expression: "+this.getA() +"x2 + "+this.getB() +"x + "+this.getC()+ NEW_LINE); if(bool == isRealRoots()){ result.append("The roots are real: x1 = "+this.firstRoot() +" ; x2 = "+this.secondRoot()+NEW_LINE); if(firstRoot() == secondRoot()){ result.append("It is a perfect square."+NEW_LINE); } else { result.append("It is not a perfect square."+NEW_LINE); } } else { result.append("The roots are imaginary."+NEW_LINE); } return result.toString(); } }
Continue to read on Quadratic Equation in Java Part 2
This is the code for tester class in QuadraticTest.Java
/** * @(#)QuadraticTest.java Name: Jeff Robert Dagala BSCOE - 5 Course: COE 18 LAB WF 9:00 - 10:30 * @version 1.00 2010/6/25 */ import java.util.Scanner; public class QuadraticTest { public static void main( String[] args ){ double x; boolean bool; Scanner scan = new Scanner(System.in); Quadratic eq1 = new Quadratic(); Quadratic eq2 = new Quadratic(4,4,1); eq1.setA(2); eq1.setB(5); eq1.setC(10); System.out.println(eq1); System.out.print("Enter x: "); x = scan.nextInt(); System.out.println("Result: "+eq1.evaluate(x)); } }
Go back to read on Quadratic Equation in Java Part 1
Most suites or programs of Microsoft Office 2007 allows user to evaluate the product. The trial version of 2007 Microsoft Office system can be installed by using a 25-character trial product key available from Microsoft while you download the free Office software, and you can use the Microsoft Office 2007 suite or program with full functionality for 60 days.
Continue to read on Hack to Activate Microsoft Office 2007 Evaluation Trial Version
The .fadeIn() and .fadeOut() are method that animates the opacity of the matched elements. .fadeOut() will decrease opacity until it reaches 0. Once the opacity reaches 0, the display style property is set to none, so the element no longer affects the layout of the page.
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.