Sunday, October 30, 2011

Smart VPN Connection Problem SOLVED.

   This was a solution to the problem encountered when trying to connect to a VPN using a Smart Bro kit. There were two steps that were taken in order to solve the problem:
1. Changing the APN to internet.
2. Using a Smart Buddy sim and not a Smart Bro sim, with a balance of 2 pesos.
If you follow this configuration,  you should be able to connect to any VPN of your choice.
ENJOY. :))

Monday, June 27, 2011

Mountain.java

package mountain;

import java.util.Scanner;

public class Mountain {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.print( "Enter height: " );
        int height = scan.nextInt();
        for (int i=0, j=1, l=(((height*2)*2)-1)-1; i<height; i++, j+=2, l--) { for (int x=0; x < l; x++) System.out.print( " " ); for (int x = 0; x < j; x++) System.out.print( "*" ); System.out.println(); }
        for (int i=0, j=height-1, k=(height*2)-2, l=1, t=((height+1)*2)-1; i<height; i++, j--, k-=2, l+=2, t+=2) { for ( int x=0; x<j; x++ ) System.out.print( " " ); for ( int x=0; x<l; x++ ) System.out.print( "*" ); for ( int x=0; x<k; x++ ) System.out.print( " " ); for ( int x=0; x<t; x++ ) System.out.print( "*" ); for ( int x=0; x<k; x++ ) System.out.print( " " ); for ( int x=0; x<l; x++ ) System.out.print( "*" ); System.out.println(); }
    }
}