
Thursday, December 23, 2010
White simple template

Monday, December 6, 2010
[KDU] Data Structure & Algorithm (Assignment 1)
Data Structure & Algorithm (Assignment 1)
For the first assignment to be marked in week 4 (or 5) you should complete question 3 and you will be asked questions about your solutions in the week 4 (or 5) lab.
Marking scheme (out of 5 marks)
One mark for the program working correctly
Up to two marks each for the correct answer to two questions.
Coding
import java.io.*;
import java.util.*;
public class assignment1 {
public static void main(String [] args) throws Exception
{
//CREATE VARIABLE TO STORE FILE EXTENTION
String currentFile = "currAccounts.txt";
String oldFile = "oldAccounts.txt";
String NewFile = "newAccounts.txt";
String GraduateFile = "gradAccounts.txt";
TreeSet
TreeSet
//CREATE NEWACCOUNT AND GRADACCOUNT FILE
createNewStudent(NewFile,oldFile,currentFile,List);
createGradStudent(GraduateFile,oldFile,currentFile,List2);
System.out.println("Both file are created");
}
private static void createNewStudent(String NewFile,String oldFile,String currentFile,TreeSet
{
FileWriter outputnew = new FileWriter(NewFile);
Scanner scold = null;
scold = new Scanner(new FileReader(oldFile));
while(scold.hasNext())
{
List.add(scold.next());
}
scold.close();
Scanner sccurrent = new Scanner(new FileReader (currentFile));
String tokennew;
String New ="";
int numberofnew = 0;
System.out.println("New Students Name:");
while (sccurrent.hasNext())
{
tokennew = sccurrent.next();
if(!List.contains(tokennew) && !tokennew.contains("0") && !tokennew.contains(".")&& !tokennew.contains("NA"))
{
New += tokennew;
New += " ";
System.out.println(tokennew);
numberofnew ++;
}
}
System.out.println("Number of New Students: "+numberofnew);
System.out.println("------------------New Student End------------------");
outputnew.write(New);
outputnew.close();
sccurrent.close();
}
private static void createGradStudent(String GraduateFile,String oldFile,String currentFile,TreeSet
{
FileWriter outputgrade = new FileWriter(GraduateFile);
Scanner sc = null;
sc = new Scanner(new FileReader(currentFile));
while(sc.hasNext())
{
List.add(sc.next());
}
sc.close();
Scanner sc1 = new Scanner(new FileReader (oldFile));
String tokengrad;
String grad ="";
int numberofgrad= 0;
System.out.println("Graduate Students name:");
while (sc1.hasNext())
{
tokengrad = sc1.next();
if(!List.contains(tokengrad) && !tokengrad.contains("0") && !tokengrad.contains("."))
{
grad += tokengrad;
grad += " ";
System.out.println(tokengrad);
numberofgrad ++;
}
}
System.out.println("Number of Graduate Students: "+numberofgrad);
System.out.println("------------------Graduate Student End------------------");
outputgrade.write(grad);
outputgrade.close();
sc.close();
}
}
Print screen for the result
Output
Saturday, October 9, 2010
Thursday, September 16, 2010
Nick Lim - FaceBook Comments-box + Like-button + Language
This is a tutorial for integrating Facebook comment-box/like-button to your blog or website, and it comes with language guide too.
This tutorial is well organized and easy to understand, hope it helps you guys out there trying to integrate with Facebook.
Friday, September 3, 2010
Wednesday, September 1, 2010
My own website
I feel like learning is fun when you see the outcome; not when you are learning it, because learn take times and patient, and i have build my patient with this experience. Through this experience i learn how to make the website look nice and beautiful through images and styling all kind of staff to make the overall look consistence. I am still learning that because i know there are always space for improvement.
Tools that i use to create my website:
- Visual studio
- MySQL
- Photo Shop
- File Zilla
- Navicat
- Firefox
- Google Chrome
- Visual Light box
- C#
- JavaScript
- JQuery
- HTML
- CSS

My site is a dynamic website, i can post my own article and create my own category in my site.
By using different kind of j Query and css, i present the information with more fancy and user friendly way to provide the information.
PS: This site is build By Nick Lim Kok Hoong
If your like my site please visit my site and like my site with your Facebook account, thank you very much.
Any feed back is appreciate, so don't feel shy to speak out your mind
You can also visit my website by (www.Nick-Limkokhoong.com)