Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÏÂcÓïÑԹػú³ÌÐò

/* Offtimer.c.For auto halt. */
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#define DELAY 60/* Time of sleeping */
int main()
{
  time_t now;
  struct tm *p;
  
  while(1)
  {
  now = time(NULL);
  sleep(DELAY);/* To reduce cpu occupation */
  p = localtime(&now);
  if ((p->tm_hour = 14) && (p->tm_min >= 30))/ *This means the system will halt after 14:30 or 14:31 */
  system("poweroff"); / *'poweroff' is the command in Red Flag Linux
Desktop 5.0 to turn off the computer.To do this you should be root. */
  }
  return 0;
}
ÒýÓÃgcc±àÒ룬ÁíÍâÐèÒªÓÐrootÓû§µÄȨÀû²ÅÄÜÐС£


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸е쬻î»î»î£¡
         &n ......

Linuxϵͳ¸÷°æ±¾±¾µØrootÃÜÂëÆÆ½â·½·¨ÕûÀí


¡¡¡¡Õâ¶Îʱ¼äÀÏÅöµ½ÓÐÈËÎʼ°¸÷¸öLinux°æ±¾µÄ±¾µØrootÃÜÂëÆÆ½â·½·¨£¬ÎÒÕâÀï×Ô¼ºÒÔ¼°ÔÚÍøÂçÉÏËѼ¯ÁËЩ×ÊÁÏ£¬Ï£Íû¶Ô¿´µ½ÁËÕâÎÄÕ¶øÓÖÇ¡ºÃÓõõ½µÄ¼¼ÊõÈËÔ±Óеã°ïÖú£º
(Ò»)RedHat/CentOS/Fedora ϵͳÃÜÂëÆÆ½â
¡¡¡¡1.ÔÚgrubÑ¡Ïî²Ëµ¥°´E½øÈë±à¼­Ä£Ê½
¡¡¡¡2.±à¼­kernel ÄÇÐÐ×îºó¼ÓÉϿոñS (»òÕ߿ոñSingle)
¡¡¡¡3.°´B£¬Æô¶¯µ ......

Linux tty/pty/pts ¸ÅÄîÇø±ð

tty0£­6ÊÇlinux±¾µØÖÕ¶Ë£¬pts/xÊÇÔ¶³ÌµÇ½ÐèÒªµÄÖÕ¶Ë£¬±ÈÈçijÈËÒªtelnetµ½ÄãµÄ»ú×Ó£¬¾ÍÐèÒªÄãµÄϵͳÓÐpts/x¡£ 
»ù±¾¸ÅÄ
¡¡
¡¡1. tty(ÖÕ¶ËÉ豸µÄͳ³Æ):
¡¡¡¡ttyÒ»´ÊÔ´ÓÚTeletypes£¬»òÕßteletypewriters£¬Ô­À´Ö¸µÄÊǵ紫´ò×Ö»ú£¬ÊÇͨ¹ý´®ÐÐÏßÓôòÓ¡»ú¼üÅÌͨ¹ýÔĶÁºÍ·¢ËÍÐÅÏ¢µÄ¶«Î÷£¬ºóÀ´Õâ¶«Î÷±»¼üÅÌÓëÏÔʾÆ÷È¡´ú ......

C#µ÷ÓÃC DLL

ÔÚºÏ×÷¿ª·¢Ê±£¬C#ʱ³£ÐèÒªµ÷ÓÃC++DLL£¬µ±´«µÝ²ÎÊýʱʱ³£Óöµ½ÎÊÌ⣬ÓÈÆäÊÇ´«µÝºÍ·µ»Ø×Ö·û´®ÊÇ£¬ÏÖ×ܽáһϣ¬·ÖÏí¸ø´ó¼Ò£º
VC++ÖÐÖ÷Òª×Ö·û´®ÀàÐÍΪ£ºLPSTR,LPCSTR, LPCTSTR, string, CString, LPCWSTR, LPWSTRµÈ
µ«×ªÎªC#ÀàÐÍÈ´²»ÍêÈ«Ïàͬ¡£
Ö÷ÒªÓÐÈçϼ¸ÖÖת»»£º
½«stringתΪIntPtr£ºIntPtr System.Runtime.InteropServ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ