Wee Lau 的个人资料Life.passion!照片日志列表 工具 帮助

日志


2009/9/24

Rainmeter… on my desktop :O

my desktop

 

 

 

 

 

 

 

 

 

 

 

 

 

the current state of my desktop as of 24 September 2009.

which,I make use of the some downloaded rainmeter skins (which are nice looking one), and have it running on top of rainmeter engine, (plus personal customized each of them to fit better into my desktop). Really enjoy making skins and customized them now… hehe ;D Check out the customize.org then, it’s my favourite source for designs and to customized.

2009/5/30

Jaunty Jackalope – Ubuntu Linux – 9.04~!

Finally another update. Just it is at least getting better than previous version. In this release a new login interface was introduced, as well as the OS loading screen. Besides, I noticed that the network managers seems can automatically connect/dial to 3G internet connection for my Novatel U530 (Obsolete) PCMCIA datacard ! Though occasionally seems fails to connect for unknown reason, it is a great news for me! :D (as being able to use internet in Ubuntu Linux finally with my u530 3g card.)

     This is also the first upgrade i did for Ubuntu Linux. Previous version was a clean reinstalled. For the first time I did a network upgrade which took about 2-3 hours, while I was away from home to give tuition.

     At least, I’m getting myself into this command console environment, approaching these terminal thing… such as “sudo apt-get” etc… as a Windows Environment User for years, I somehow get a pleasant feeling of using the other type of OS, which it has a different look and feel. The Gnome environment used in Ubuntu is an interesting example. … still much to go and to explore….

2009/1/4

Windows Vista x64, Finally~!

  • Windows Vista Installation a Success.~! Home Basic Edition!
  • Some problems with 64 bit Environment.. & Drivers.
  • the Sidebar Widget and the Chess Titan wasn't found.
  • The Verdict, moving from the 32bit to 64 bit OS ?

At this time of writing, my home desktop which now is next to my laptop seems working well with the Windows Vista Home Basic Edition installation. I chose that edition due to insufficient RAM at 512MB at the moment. Hurray, while writing this sentence, it has boot into Windows Vista Environment. :) Running a x64, aka 64 Bit OS Environment. Feels exciting! Can't wait to test it Hehe!!

   Exploring the Windows Vista... hmmm, begins to notice some problems. Looks since the introduction of 64 bit OS environment, it really gives a hard time to the community. Most of the old software written in 32-bit environment wouldn't run on a 64 OS. (No wonder during my internship, I've seen many Business Edition Vista, is 32bit OS instead of 64 bit, should be due to the compatibility issue). One of the Significant one, would be my audio. The creative sound blaster 5.1 PCI audio card. Seems like there is no support from the manufacturer. Neither a development plan for it. This would be true as well. It's hard to expect those machine that still use PCI slot, would run Vista .. My Desktop would be a little exception, though with Pentium 4 630 processor with HT Technology, supporting EM64T instruction set, (support 64 bit Processing), it's running on a hardware platform, that's aging, and might be going obsolete soon.

   Hence, the installation was Smooth. and the OS runs fine on my hardware platform. Which now dual booting a 32bit XP, aka Windows XP x86, and a 64 bit Vista, aka Windows Vista x64. Performance is good. Rating I got is 2.9 (found in the Vista Computer Details.)

   I was anticipating to see the Chess Titan game available in the Windows Vista. To my disappointment, it's only available for Vista Ultimate edition, and Home Premium. Hmm I see, there is still way to get a copy of the game though :) Besides, I didn't notice the Widget Sidebar yet. I wonder if that's not part of Vista Basic too? Well, it seems windows vista basic would be still lack some of persuasion for many of us to totally migrate to it from Windows XP. (Which the Windows Xp that most of us having now, a stable OS environment.)

   For conclusion, I actually did the Vista installation on a separate disk and partition, now dual booting XP and Vista, which (XP is known as the Legacy OS), I get to test and evaluate how Vista looks and feels like. What's more, soon, I guess Windows Seven (the temporary codename for next generation windows) would have quickly replaced Vista.

    The verdict, we still need some time to migrate and adapt to a newer 64 bit OS computing environment... Though in fact 64 bit computing architecture has been with us some quite some time ago. ( before to be used in Public..)


Ubuntu Startup , Shutdown Splash Fix.

  • ubuntu startup/shutdown splash screen settle
  • 3G Modem for ubuntu comes next
  • Windows Vista x64, 64bit OS seems yet to work.
  • BIOS update for my home desktop

Following the previous problem I have with Intrepid Ibex, Ubuntu 8.10, which after installation, blank screen when loading into the OS. Finally from internet, found the solution. The cause would be the "COMPIZ" component somehow doesn't work with Intel Onboard Graphic Card. :)

   Secondly, as a result of that, I notice that, the startup and the shutdown part of Ubuntu has become blank screen. Which it seems nothing appear on the screen. By pressing CTRL + ALT+ F1 (If i'm not mistaken, there will be text running down the screen. ) Hence, this shows that the GUI is MISSING for both startup and shutdown phase. Google is just like the best friend in internet for solution. Starting from googling the case, I come to know about the "startupmanager". After some luck of trying , finally gets a working build from sourceforge. After installing and running the StartupManager, and make some tweaks, seems everything working now :D With a better splash screen at startup at 1024x768 at 8 bit (I have even added text status display) compare to previous only 640x480.

   Glad that the Ubuntu is working towards my plan. Next step would be to figure out how to get it works with my 3G modem. From the officials it mentions that this version of Ubuntu build has better support for 3G. Still It doesn't seems that easy to be done in Windows.

   On the other hand, Windows Vista x64 version, I have yet to make it works for my home desktop. After burnt into the DVD, it seems not able to boot from it. (Not yet done any further trials, and testing). However, I notice that my BIOS has a newer revision. Which latest was 108, and I was still using the 050 revision, which was nearly 3 years ago. Having things upgraded seems like a pleasure :)


2008/8/12

Solution.java [Find the Min, repeated times]

one of a very interesting algorithm... I want to keep...

It does
- ask user to enter a list of integers [no limit]
- input -999 to stop the input process
- get the smallest , min integer values, and find out how many times it repeats in the list

   1: /**
   2:  * @(#)solution.java
   3:  *
   4:  *Write a program that asks the user to enter a list of integers and key in sentinel value -999 to stop. 
   5:  *The program is to determine the smallest value entered and the number of times it was entered. 
   6:  *For example, if the following series is entered:
   7:     16  11  15  14  18  20  13  11  12  19  18  11  17  20
   8:    it would output:  The smallest value is 11 and it was entered 3 time(s). 
   9:  *
  10:  * @author cheongweelau
  11:  * @version 1.00 2008/8/12
  12:  */
  13:  
  14: import java.util.*;
  15: class Solution {
  16:     int store;
  17:     int count;
  18:     
  19:     public static void main(String args[])
  20:     {
  21:         int min = 10000;
  22:         int prev_min = 0;
  23:         int loopCount = 0;
  24:         Scanner scan = new Scanner(System.in);
  25:         Solution my = new Solution();
  26:         
  27:         System.out.println("start input here:");
  28:         
  29:         
  30:         //label for break
  31:         find: 
  32:         while(true)  // remember no ; here.....
  33:         {
  34:             loopCount+=1;
  35:             my.store = scan.nextInt();
  36:             if(my.store==-999) 
  37:                 break find ;
  38:  
  39:             //validation check     
  40:             if(my.store < 0) 
  41:                 System.out.println("value too small"); 
  42:                     
  43:             //MOST IMPORTANT Part of algorithm... our human way of thinking hehe...        
  44:     
  45:             else if(my.store<=min && my.store!=-999)
  46:             {
  47:                 min = my.store;
  48:                 if(loopCount==1)
  49:                    my.count+=1;
  50:                 if(min == prev_min)
  51:                    my.count+=1;
  52:                 else
  53:                    my.count=1;
  54:                    
  55:                 prev_min = my.store;   
  56:             }   
  57:         }    
  58:         System.out.println("min: "+min+" input times: "+my.count);
  59:     }
  60: }

2008/7/23

Bluetooth Service - "Access Denied"

Today when I want to use my Sony Ericsson K618 the bluetooth remote control for Winamp... it doesn't work out like it used to be, in my laptop with Windows XP service pack 2...

Then I check the Device properties in the Bluetooth Setting... hmm, all the services are unchecked.  (SPP, HID device, Serial Port), when I tried to enable them... it comes out a message - "Access Denied" ? @@ This is a headache. Tried to online for a solution... eventually found this one that works for me.

Solution (At least this works for me )...

1.  Bring up the service console, START ->RUN-> services.msc

  • locate “Bluetooth Support Service”
  • Right click the service and choose “Properties”
  • If the “This account” radio button is checked, that’s the problem.
  • Check the “Local System account” radio button instead
  • Click “OK”
  • Right click the service in the list again, this time choose “Restart

:) after this....... surprising I can enable all the bluetooth services without error.

Reference / Source from :

laszlo.nu - Bluetooth Serial Port Profile (SPP) Problem

http://www.laszlo.nu/post/30274938/bluetooth-serial-port-profile-spp-problem

 

many thanks to the author. :)


2008/5/11

In my holiday: Ubuntu Linux - Hardy Heron 8.04 LTS

I'm having my year one semester two holiday break. A fresh new upcoming Year 2 is waiting around the corner starting on 26 of May. The cameron trip was excellent, luckily we had an experienced and nice tour guide, he makes the day eventful and interesting enough for the Full day tour package.

     I had my laptop hard disc repartition yesterday... to make room for the new system - Ubuntu Linux. I used to have a Windows XP Operating system along with Ubuntu Linux 7.10 (Gusty Gibbon) dual boot, goes into 3 partition, (10GB WinXP -NTFS, 9.5GB Ubuntu Linux -ext3, and 500MB for Linux Swap partition)... reading and writing files between NTFS and Ext3 file system ... even though with a driver (ext2fsd...etc)... still it has some problems. (problem writing filename in mandarin etc, file renaming capital letter and small letter, undeletable folder? - folder Not empty bug? ... so on)... Somehow... perhaps I accidentally... (Don't even know wut I've done) My Ubuntu 7.10 is mess up, couldn't boot anymore... during recovery process from boot option, it shows, cluster corrupted... etc... tons of problem. During the process ( I simply click yes yes... "yes"... ).As Texts flow from top to down, in black and white console screen... just in the end, I notice something wrong, stopping the whole process, returning back to Windows, found that I couldn't render some files anymore... I lost the whole Kenny G - 2008 "Rhythm and Romance" Album.

Ubuntu 8.04 LTS Hardy Heron Wallpaper     The newly planned system, 10GB for Windows XP (Unchanged), 4GB for my own NTFS partition (for storage purpose), 4.5GB for Ubuntu Linux 8.04 ! and 500MB for swap partition... *?GB - rough calculation of disk space. Order a LIve CD is really good and it is free! But downside is to wait for its delivery that might take up 6-10 weeks... :S Besides, I would rather an alternate Installer CD (which could only get via downloads) than a Live CD. So I got my copy via internet download from ubuntu.com (much faster hehehe than CD delivery). Running through the text based installation for my laptop... finally it's a success! Feel a bit proud, having a dual boot system.  As if now reached a further milestone, load with Ubuntu Linux 8.04 LTS (Long Term Support Version) (Hardy Heron)...

     So... ahhem... wut's next? Well at least now I have gained a little experience in Ubuntu Linux OS... At least a step into an UNIX environment... It's still fresh and new to me. Somehow, I can say, I feel that 8.04 Hardy Heron is giving me a better feel of it than its predecessor, Gusty Gibbon. :) It has a loading screen while booting compare to last time when I'm running 7.10... hmm bunchs of text at shut down and blank on boot? :S

     Utilize 20GB of hard drive, repartition for dual boot OS, Ubuntu Linux and Windows XP... every byte is precious... still I'll cherish this... :)


2008/3/25

Finally... I code a virus with C programming language

As a computer science student... I made a virus... I should say.... malicious code, I prefer to name it as "purpose-driven code".

Since c language can almost do a lot of things... only if we coded it in a malicious way... and its output turn out would be named as a virus. But actually wut for I'm coding a malicious thing? It is more to an experiment, or a test, at time of writing...  NO intention to make a harm by spreading it. ;)

        so I briefly explain my little mischevious code....

        - random a number, with mathematic formula, by typecasting it to A, B, C  (Alphabets)
        - hence I can generate random name now...
       - and I do a random name of . extension type.... like .exe  .doc .abc   or anything
      - eventually append a string... together becomes a name of a file... example "abcde.fgh"
       - and so with a loop.... and execute "writing" the file to hardisk...
      - so afterall... just within a blink of eyes... it can load up the computer with hundreds.. or thousand of rubbish...

     I did it in class today...... by using a friend's computer... and demonstrate how the malicioius code works... since i quarantine inside folder... so... eventhough it goes.. wild (FREAKING WILD)... rampaging.. the whole folder with funny files, of funny types...  if anything goes wrong... and we can just delete the folder... Generating thousand of files... real fast 5000+... in a very short while....... deleting it.... takes up to minutes.. :S and the total file size of that folder.... even less than <200kb... wow :P

      Never simply compile a code... when u're wondering wut is it doing... the destruction has already become severe.... >.<

     so cheongweelau has written his first... (EXPERIMENTAL) virus...


2008/3/6

Linked List... that was so abstract... boo~

<!> source code are for educational purpose as reference, intent to help understanding on Linked List. (NO Plagiarism, taken as own work. Thanks) Please contact author for usage on other purpose. Thanks. :)
 
Header File
#ifndef    NODE_H
#define NODE_H

struct StaffRecType
{
char id[6];
char name[30];
int category;
};
typedef struct StaffRecType StaffRec;

struct nodeRec {
StaffRec staff;
struct nodeRec *nextPtr;
};
typedef struct nodeRec Node;


struct LinkedListRec
{
int count;
Node *headPtr;
};
typedef struct LinkedListRec List;

Node *makeNode(char id[], char name[], int category); // function prototypes void printList(Node *listHead);
Node *setPosition(const List *listPtr, int position);
void insertRecord(List *listPtr, char id[], char name[], int category, int position);
void deleteNode(List *listPtr, char id[]);
void initializeList(List *listPtr);

//assessment 2 void createNewList(List listPtr, List *newListPtr, int category);


#endif
Source File
#include<stdio.h>
#include<string.h>
#include "node.h" int main()
{
int choice;
char id[6], name[30], idsearch[6];
int category, cat, position, number;

List myDatabase; //List type variable declared List NewDB; // New List for Assessment 2 initializeList(&myDatabase); initializeList(&NewDB); do{
puts("WELCOME TO LINKED LIST");
puts("Select ur option, 1. autofill, 2. manual, 3. print list 4. del 5. copytoNewList 6. printNewList 7. exit");
scanf("%d", &choice);


switch(choice)
{
case 1:
//assume the list is empty, SO only position 0 available now insertRecord(&myDatabase,"15005","Andy Lau",1,0);
// at this point onwards, position 0, 1 available after finish record insert insertRecord(&myDatabase,"14004","Sammy Cheng",1,1);
insertRecord(&myDatabase,"13003","David Lim",1,2);
insertRecord(&myDatabase,"16006","Raymond Chong",2,3);
insertRecord(&myDatabase,"12002","Darren Chong",2,4);
printf("\nStaffID\tName\t\tcategory\n");
printList(myDatabase.headPtr);

break;
case 2:
fflush(stdin); //clean up wut is remain in "input stream" puts("insert record a follows");
puts("id number");
gets(id);
puts("name");
gets(name);
puts("category type 1- permenant, 2 - non-permenant");
scanf("%d", &category);
puts("insert position: ");
scanf("%d", &position);

insertRecord(&myDatabase,id,name,category,position);
system("cls");
break;

case 3:
printf("\nStaffID\tName\t\tCategory\n");
printList(myDatabase.headPtr);
printf("\n\n\n");
break;

case 4:
fflush(stdin);
puts("Del based on ID Number, key in ID num");
gets(idsearch);
deleteNode(&myDatabase,idsearch);
break;

case 5: // assessment2 feature - COPY TO NEW LIST based on category puts("define the category type to be copied");
scanf("%d", &cat);
createNewList(myDatabase, &NewDB, cat);
break;

case 6: // assessment2 feature - PRINT NEW LIST printf("\nStaffID\tName\t\tCategory\n");
printList(NewDB.headPtr);
printf("\n\n\n");
break;


default: choice=7; exit(); break;

}
}while(choice!=7);

system("pause");
return 0;

}

//makeNode Node *makeNode(char id[], char name[], int category)
{
Node *temp=(Node*)malloc(sizeof(Node));//allocate address in memory if(temp==NULL)
puts("run out of memory");
else { strcpy(temp->staff.id, id); strcpy(temp->staff.name, name); temp->staff.category=category; temp->nextPtr=NULL;//assign temp nextPtr=NULL marks the list to end } return temp;//return temp is actually return to an empty list } //printList void printList(Node *listHead)
{
Node *temp = listHead;/*assign node to listHead*/ while(temp!=NULL)
{
printf("%s", temp->staff.id);
printf("\t%s", temp->staff.name);
printf("\t%d\n", temp->staff.category);
temp=temp->nextPtr;
}
}

//setPosition Node *setPosition(const List *listPtr, int position)
{
int i;

Node *temp=listPtr->headPtr;//assign temp to the head node if(position <0||position> listPtr->count)//check if the postion is within the range printf("invalid position\n");
else { for(i=0; i<position; i++)//count is less than position temp=temp->nextPtr;//follow link to the next node } return temp;
}
// void insertRecord(List *listPtr, char id[],char name[],int category,
int position)
{
Node *newTemp = makeNode(id, name, category);
Node *prevPtr=NULL;

if(position==0)
{
newTemp->nextPtr = listPtr->headPtr; // NEW points to first node listPtr->headPtr=newTemp; // copy NEW data to the first node, NEW become FIRST } else { prevPtr=setPosition(listPtr, position-1); newTemp->nextPtr=prevPtr->nextPtr; //NEW insert after PREV , point to wut PREV points prevPtr->nextPtr=newTemp; // PREV points to NEW } listPtr->count++; } void deleteNode(List *listPtr, char id[])
{
Node *temp = listPtr->headPtr; //!!!!! TEmp is HEAD POINTER //Node *oldTemp = NULL; Node *prevPtr=NULL; int i;
for(i=0; i<listPtr->count; i++)//traverse through the list { if(!strcmp(temp->staff.id, id))
{
if(i == 0) // at position 0 oldTemp = listPtr->headPtr;
listPtr->headPtr = temp->nextPtr; //COPY P0 to FIRST node, prepare to free P0 else
{
prevPtr =setPosition(listPtr, i-1);// Get PREV temp =prevPtr->nextPtr; //PREV points to temp, TEMP get itself. prevPtr->nextPtr=temp->nextPtr; //PREV takes TEMP's nextPtr } listPtr->count--; free(temp); // RELEASE 'OLD' break;
}
else if(i==listPtr->count)
printf("no matched");

temp=temp->nextPtr;
}

}

void initializeList(List *listPtr)
{
listPtr->headPtr=NULL;
listPtr->count=0;
}

void createNewList(List listPtr, List *newListPtr, int category)
{
int position=0, i;

Node *temp = listPtr.headPtr; //Node *temp_NEW = newListPtr->headPtr;

for(i=0; i<listPtr.count; i++)//traverse through the list { // if equals to the category type defined if(temp->staff.category == category)
insertRecord(newListPtr, temp->staff.id, temp->staff.name, temp->staff.category, position++);
//NO ELSE- coz ~if FIND then COPY, and ALWAYS KEEP TRAVERSE, if "ELSE" means ~ FIND then COPY, and NO TRAVERSE ANYMORE...
temp=temp->nextPtr;//follow link to the next node
}
}

a very abstract idea of learning the Linked list..... but I do learn it in a very unusual way... eventhough blur blur on it.... by reading thru the code and explain to my gf... gives me sudden enlightenment... and during  the assessment class... the sudden additional question on part 1 given by tutor... agains.. enlightens me for the Part 2 assessment given on the day.. helps me "BREAK the DAY" ... My understanding is actually being squeezed out... :S But thanks a lot XD