I just changed to new themes ..
July 22nd, 2010 / No Comments » / by admin
Hope this new theme will be ok…more pleasent…
" />
July 22nd, 2010 / No Comments » / by admin
Hope this new theme will be ok…more pleasent…
July 22nd, 2010 / No Comments » / by admin
/*
* File: main.c
*
* Created on May 3, 2010, 12:35 PM
*/#include <stdio.h>
#include <stdlib.h>
#include <mqueue.h>
#include <sys/stat.h>
#include <errno.h>
#include <signal.h>
#include <sys/resource.h>#define MSGQUEMAX 100
#define MSGQUESIZEMAX 256
#define MSGQUE_X “/mqix”/*
*
*/
void send_mq();
int main(int argc, char** argv) {
int iret;
pthread_t send_thread;
struct rlimit limit;/* Set the file size resource limit. */
limit.rlim_cur = 4194304 ;
limit.rlim_max = 4194304 ;if (setrlimit(RLIMIT_MSGQUEUE, &limit) != 0) {
printf(“setrlimit() failed with errno=%d\n”, errno);
exit(1);
}printf(“The limit is %d \n”, limit.rlim_max);
iret = pthread_create(&send_thread, NULL, send_mq, NULL);while(1){
}return (EXIT_SUCCESS);
}void send_mq(){
int i,ret;
char mqsend[20];
char buffer[20];
struct mq_attr mqa;struct rlimit curr_limits;
mqa.mq_maxmsg = MSGQUEMAX;
mqa.mq_msgsize = MSGQUESIZEMAX;mqd_t sendMQ;
for(i=0;i<MSGQUEMAX;i++){
sprintf(mqsend, “%s%d”, MSGQUE_x, i);
if ((sendMQ = mq_open(mqsend,O_CREAT|O_EXCL|O_RDWR|O_NONBLOCK, S_IRWXU | S_IRWXG | S_IRWXO, &mqa)) < 0){
mq_close(sendMQ);
}
else{
mq_close(sendMQ);
}
if ((sendMQ = mq_open(mqsend, O_WRONLY|O_NONBLOCK)) < 0){
mq_close(sendMQ);
}
else{sprintf(buffer,”mqix%d send successfully \n”,i);
ret = mq_send(sendMQ, buffer, mqa.mq_msgsize, 0);
if (ret < 0)
{
}
else{
printf(“mqix%d send successfully \n”,i);
}
}
}
}
Here are the code to increase the number of message queues.Before this the number of message queues that can be created is so limited,around 20 only.Now i can create around 100 message queues.
/* Set the file size resource limit. */
limit.rlim_cur = 4194304 ;
limit.rlim_max = 4194304 ;
The two lines above is very important.It will determined how many message queues can be created…
July 22nd, 2010 / No Comments » / by admin
Its Julai already…The earth look not change much..i miss this planet so much…finally i successfully came back alive…so nice
May 21st, 2010 / No Comments » / by admin
1.Iron Man 2
2.Ip Man 2
3. a Nightmare on Elm Street
May 8th, 2010 / No Comments » / by admin
May 4th, 2010 / No Comments » / by admin
Just now ,i solved a problem of boot options.I have windows 7 on my computer.Before this ,i have both windows 7 and ubuntu. Then i uninstalled ubuntu .But,when i start my computer,i always given two options ; start win 7 or ubuntu.If i click on Ubuntu,these message appear:
File: \ubuntu\winboot\wubildr.mbr
status: 0xc000000e
Info: The selected entry could not be loaded because the application is missing or corrupt.
How do i solve it?I searched on Google and found about bcdedit.
So go to Accessories,then go to command prompt,run as administrator.Then type bcdedit.Choose the unused OS that you don’t want to use it.
Get it’s long number…i don’t now what is that.Something like key i guess.Put it like the message shown below.
Then type :bcdedit /delete {4c21825f-e04b-11dd-b760-00195b61617a}
Then settle.For more information ,you can visit http://www.sevenforums.com/tutorials/2676-bcdedit-how-use.html
May 3rd, 2010 / No Comments » / by admin
1.Download 3 components
a.netbeans-6.8-ml-linux.sh
b.jre-6u20-linux-i586.bin
c.jdk-6u20-linux-i586.bin
You can download it from Sun Java Website or netbeans website
2.Then copy jre-6u20-linux-i586.bin and jdk-6u20-linux-i586.bin into /usr/ directory.
3.Then copy netbeans-6.8-ml-linux.sh into /home/zs/ directory.
4.Install jre-6u20-linux-i586.bin and jdk-6u20-linux-i586.bin by type these two commands
First open new terminal first.
a.Type : cd /
b.Type : cd /usr/
c.Type : Sudo sh jre-6u20-linux-i586.bin
d.Type : Sudo sh jdk-6u20-linux-i586.bin
5.Then install netbeans by type this command
a.Open new terminal first
b.Type : cd /home/zs/
c.Type : sudo sh netbeans-6.8-ml-linux.sh
Then done…Success..
Good luck
May 2nd, 2010 / 3 Comments » / by admin
Last night,i upgraded my ubuntu from 9.10 to 10.04 LTS.After all the processes finished,i rebooted my computer.Than , my computer failed to boot.Then this message showed up on the black screen.
error : file not found
grub rescue>
FYI,i installed ubuntu on windows 7 OS.So what i did is :
1.Boot off your Windows Vista/7 installation DVD
2.Click next after you get to the Regional settings, select your Location/Keyboard .
3.Click on “Repair your computer.”
4.Then make sure Windows Vista/7 installation is UNSELECTED.
5.Then click on “Command prompt”.
6.Then type : bootrec.exe /fixboot
7.After that type : bootrec.exe /fixmbr
8.Then close the windows and click “Restart.”
This is my references : http://ubuntuforums.org/showthread.php?t=1014708
May 1st, 2010 / No Comments » / by admin
You can use PhoneGap.What is PhoneGap?
PhoneGap is an open source development framework for building cross-platform mobile apps. Build apps in HTML and JavaScript and still take advantage of core features in iPhone/iTouch, iPad, Google Android, Palm, Symbian and Blackberry SDKs.
To know more,you can visit here (http://www.phonegap.com/)…
May 1st, 2010 / No Comments » / by admin
Right now i am upgrading my ubuntu from version 9.10 to 10.04 LTS…..Its look like a nice problem.My Ubuntu 9.10 is having problem in gdm…I cannot set login window and cannot change splash screen.Hope this 10.04 successfully resolve this problem…