摘要:
Path 在浏览器的URL中输入的字符(必须的)Type 连结到本映射的Action的全称(可选的)Name 与本操作关联的Action Bean在<form-bean/>中定义name名(可选的)Scope 指定ActionForm Bean的作用域(session和request),缺省为session。(可选的)Input 当Bean发生错误时返回的控制。(可选的)ClassName 指定一个调用这个Action类的ActionMapping类的全名。缺省用org.apache.struts.action.ActionMapping,(可选的)Forward 指定处理相应请求 阅读全文
摘要:
using System.Timers;protected void Application_Start(Object sender, EventArgs e){ System.Timers.Timer timer = new System.Timers.Timer(1000); //AutoReset 属性为 true 时,每隔指定时间循环一次; //如果为 false,则只执行一次。 timer.AutoReset = true; timer.Enabled = true; timer.Elapsed += new System.Timers.ElapsedEventHandler(thi 阅读全文
摘要:
1. 常见用法。 char buf[512] = {0}; sscanf("123456 ", "%s", buf);printf("%s\n", buf);结果为:1234562. 取指定长度的字符串。如在下例中,取最大长度为4字节的字符串。sscanf("123456 ", "%4s", buf);printf("%s\n", buf);结果为:12343. 取到指定字符为止的字符串。如在下例中,取遇到空格为止字符串。 sscanf("123456 abcded 阅读全文
摘要:
void executeinfo(string cc) {string ab;ab = "C:\\cli.exe ";ab.append(cc);TCHAR cmdline[100];copy(ab.begin(), ab.end(), &cmdline[0]);cmdline[ab.size()] = _T('\0');} 阅读全文
摘要:
#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <string.h> int main(int argc, char **argv){ int fd[2]; int pid; pipe(fd); int rpipe = fd[0]; int wpipe = fd[1]; pid = fork(); if (pid == 0) { /* 子进程关掉读的那端,只用写的一端 */ close(rpipe); /* 把标准... 阅读全文
摘要:
int getopt (int argc, char **argv, const char *options) The getopt function gets the next option argument from the argument list specified by the argv and argc arguments. Normally these values come directly from the arguments received by main. The options argument is a string that specifies the opti 阅读全文
摘要:
-lrt 阅读全文
摘要:
-lpthread 阅读全文
摘要:
/dev/ttyS0,这表示使用串口1(com1),如果是/dev/ttyS1则表示使用串口2(com 2). 阅读全文
摘要:
Mounting a partition means attaching it to the linux file system. To mount a linux partition:# mount -t ext2 /dev/sda1 /opt-t ext2File system type. Other types you are likely to use are:ext3 (journaling sile system based on ext2)msdos (DOS)hfs (mac)iso9660 (CDROM)nfs (network file system)/dev/sda1De 阅读全文