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

C/C++ ÅжÏ·¾¶ÎªÎļþ

/***************************************************
* º¯Êý˵Ã÷: Åжϵ±Ç°path²ÎÊýÊÇ·ñΪһ¸ö¿É¶ÁµÄÎļþ
* º¯Êý·µ»Ø: 0 - Îļþ¿Ì¶È 1 - ȨÏ޾ܾø -1 -º¯Êý´íÎó
*   ²Î Êý : path Îļþ·¾¶.
***************************************************/
int isReadFile(const char *path)
{
        struct stat info;
        int euid,egid;
        if ( 0!= stat(path,&info) )
        {
                return -1;
        }
        //if it is a file
        if( S_IFREG != (info.st_mode & S_IFMT ) )
        {
                return 1;
        }
        euid=geteuid();//returns the real user ID of the
current process
        egid=getegid();//returns the effective user ID of the
current process
        //if effective user is root
        if(euid==0)
        {
                if(info.st_mode & S_IRUSR || info.st_mode &
S_IRGRP ||info.st_mode & S_IROTH)
                {
                        return 0;
                }
         


Ïà¹ØÎĵµ£º

java+swing C/sģʽµÄsocket±à³ÌÓ볤¶ÌÁ¬½Ó

ʲôÊÇsocket
³¤Á¬½ÓÓë¶ÌÁ¬½Ó
Ëùν³¤Á¬½Ó£¬Ö¸ÔÚÒ»¸öTCPÁ¬½ÓÉÏ¿ÉÒÔÁ¬Ðø·¢ËͶà¸öÊý¾Ý°ü£¬ÔÚTCPÁ¬½Ó±£³ÖÆÚ¼ä£¬Èç¹ûûÓÐÊý¾Ý°ü·¢ËÍ£¬ÐèҪ˫·½·¢¼ì²â°üÒÔά³Ö´ËÁ¬½Ó£¬Ò»°ãÐèÒª×Ô¼º×öÔÚÏßά³Ö¡£
¶ÌÁ¬½ÓÊÇָͨÐÅË«·½ÓÐÊý¾Ý½»»¥Ê±£¬¾Í½¨Á¢Ò»¸öTCPÁ¬½Ó£¬Êý¾Ý·¢ËÍÍê³Éºó£¬Ôò¶Ï¿ª´ËTCPÁ¬½Ó£¬Ò»°ãÒøÐж¼Ê¹ÓöÌÁ¬½Ó¡£ 
±ÈÈçht ......

C/C++»ù´¡ÎÊÌâÕûÀí

ÕâÆªÎÄÕÂÖмǼ±¾È˶ÔһЩC/C++»ù´¡¸ÅÄîµÄÀí½â£¬Ö÷Òª°üÀ¨ÒÔϼ¸¸ö·½ÃæÄÚÈÝ£º
1¡¢ÀàÐÍת»»
1¡¢ÀàÐÍת»»
ÔÚCºÍC++µÄÒ»¸ö±í´ïʽÖÐÍùÍù»á°üº¬¼¸ÖÖ²»Í¬µÄÊý¾ÝÀàÐÍ£¬ÒªÈÃÕâЩÊý¾ÝÀàÐÍÖ®¼ä¿ÉÒÔ½øÐÐÔËË㣬±ØÐëÈÃËûÃÇÖ®ÖеÄһЩ»òÈ«²¿½øÐÐÀàÐÍת»»£¬ÕâÖÖת»»ÓÐÁ½ÖÖÐÎʽ£¬Ò»ÖÖÊDZàÒëÆ÷×Ô¶¯½øÐе쬽ÐÒþʽÀàÐÍת»»£¬ÁíÒ»ÖÖÊDZà³ÌÖÐÇ ......

ÊýѧÅÅÁÐ×éºÏËã·¨ P(N,M) C(N,M)

yeah£¬×éºÏµÄÒ²³öÀ´ÁË£¬ÔÙÒ»Æð·¢Ò»¸ö
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication32
{
class Program
{

static int s = 0;
static void Main(string[] args)
{
Console.Writ ......

C++Á¬½ÓOracle

C++Á¬½ÓOracle
 
        ÔÚVisual C++Ï¿ª·¢Oracle¿â½Ó¿ÚÖ÷ÒªÓÐÁ½ÖÖ·½·¨¡£Ò»ÖÖ·½·¨ÊÇÀûÓÃVisual C++ÌṩµÄ¶àÖÖÊý¾Ý¿â·ÃÎʼ¼Êõ£¬È翪·ÅÊý¾Ý¿âÁ¬½ÓODBC¡¢Êý¾Ý´æÈ¡¶ÔÏóDAO¡¢¶ÔÏóÁ¬½ÓºÍǶÈëÊý¾Ý¿âOLE DBºÍActiveXÊý¾Ý¶ÔÏóADOµÈ¡£ÁíÒ»ÖÖ·½·¨ÊÇÔÚVisual C++ÖÐǶÈëSQLÓï¾ä£¬Õâ¾ÍÊÇËùÖ ......

C/C++ DIR±éÀúº¯Êý

#include <list.h>
#include <dirent.h>
#include <iostream.h>
#include <sys/stat.h>
#include <sys/types.h>
/*****************************************************************
*º¯Êý¹¦ÄÜ: Ä¿_¼_±é_Àú.
*·µ»ØÖµ:   ³É¹¦·µ»Ø0,ʧ°Ü·µ»Ø·Ç0.
*²ÎÊý   path ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ