C++ Ö®Boostѧϰ±Ê¼Ç Linuxϱà³Ì
C++ѧϰ±Ê¼Ç--Linuxϱà³Ì
Ò»¡¢¹ØÓÚBoostµÄʹÓ㬼¸ÖÖ³£Ó÷½·¨£¬Ö»ÊÇ×Ô¼º¹¤×÷¡¢Ñ§Ï°ÖÐ×ܽáµÄ£¬ÓÐЩ·½·¨µÄÈ·ÓÐЩ·±Ëö£¬ÄÜÂú×ãÐèÇó£¬Ó¦¸Ã»¹Óиü¼Ó¼òµ¥¿ì½ÝµÄ·½Ê½£¬´ý¸Ä½ø¡£
1¡¢ÅжÏ×Ö·û´®ÓëÕýÔò±í´ïʽÊÇ·ñÆ¥Å䣨ÍêÈ«Æ¥Å䣩
bool IsMatch(const char* data,const char * regx)
{
boost::regex expression(regx);
string str(data);
if(boost::regex_match(str, expression))
{
return true;
}
return false;
}
2.1¡¢°´Ä³Ò»×Ö·û´®½øÐзָî²Ù×÷£¬²¢´æ´¢µ½vectorÖС£
void split1(const char* data,boost::regex expression,vector<string> &dataVector)
{
string str1(data);//½«char *ת»¯ÎªstringÀàÐÍ
boost::sregex_token_iterator p(str1.begin( ), str1.end( ), expression, -1);
boost::sregex_token_iterator end;
const char *start=NULL,*endp;
while (p != end)
{
string str = *p;
printf("string:[%s]\n",str.c_str());
if ( str.compare("") != NULL )
{
dataVector.push_back(str);
}
p++;
}
}
2.2¡¢°´Ä³Ò»×Ö·û´®½øÐзָî²Ù×÷£¬²¢´æ´¢µ½vectorÖУ¬²¢±£Áô·Ö¸î·ûÖеļ¸Î»¡£
void split2(const char* data,boost::regex expression,vector<string> &dataVector,int length)
{
if ( length < 0 )
{
return ;
}
string str1(data);//½«char *ת»¯ÎªstringÀàÐÍ
boost::sregex_token_iterator p(str1.begin( ), str1.end( ), expression, -1);
boos
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......
×òÌ콫LinuxϵͳӲÅÌÈûÂúÁË£¬½ñÌì¾Í½ø²½ÁËϵͳÁË£¬ÄÇÐоÍÖ±½Ó¸øÐéÄâ»úÔÙÔö¼ÓÁË¿éÓ²ÅÌ£¬ÉèÏëwindows¾ÍÊÇÕâÑùÀ´ÁË£¬ËÖªµÀ»¹ÊÇÒ»Ñù¾Í²»È¥¡£ÎÊÁËÏÂͬʲÅÖªµÀ£¬ÐèÒª°ÑÓ²Å̹ÒÉÏÈ¥²ÅÉúЧ¡£
ÄDz»²ÒÁË£¬ÎÒϵͳ¶¼½ø²»È¥Ôõô¹ÒÓ²ÅÌÄØ£¬ÖӸ磨ͬÊ£©¸æËßÎÒLinuxÓõ¥Óû§½øȥɾ³ýµã¶«Î÷¾ÍÄܽøÈ¥ÁË¡£
ÐУ¬ÄǾÍÂíÉÏÊÔߣ¬»¹Ã»³¢ÊÔ¹ýÄØ¡ ......
OK6410ÊÇÒ»¿îÉè¼ÆÓÅÁ¼£¬ÐԼ۱ȳöÖڵĻùÓÚS3C6410X-66µÄARM11¿ª·¢°å²úÆ·¡£¹Ù·½ÌṩÁËwince6 linux android µÄÖ§³ÖÓëDEMO³ÌÐò¡£¸ù¾ÝÆäÊֲᣬÉÕдWINCEûÓÐʲô´óÎÊÌâ¡£µ«Èç¹ûÔÀ´ÊÇWINCE£¬Ïë¸ÄÉÕдU-boot¾Í»á³öÏÖһЩÎÊÌâ¡£
°´ÕÕÊֲᣬÔÚÓÃSD¿¨Æô¶¯ºó£¬ÏÂÔØu-bootµ½¿ª·¢°åÉÏ£¬ÓÃu-boo ......