한마디로 표현하자면...
대실망
핸드폰 케이스와 스피커만이 가득했다.. -_-;
가장 볼만했던건 3D프린터와 의료기기를 스마트폰과 접목시킨 무슨 대학이었는데... 기억이 안난다.(가장 볼만했던걸 사진을 찍지 않았어 ㅠ)
![]()  | 
| 캔고루에서 무료초정장으로 들어갔다. | 
![]()  | 
| 조금은 관심이 갔던 무선충전 | 
![]()  | 
| 무선충전 비싸!! | 
![]()  | 
| 카드형 USB | 
![]()  | 
| 컴터를 제어하는 리모컨? 같은 기기 | 
![]()  | 
| !? | 
![]()  | 
| 코엑스에서 이런걸 보게될줄이야...!! | 
어찌되었건 실망만 가득한 주변기기 박람회
"소스코드는 읽어보셨나요?"
"그 프로젝트는 너무 커요, 원하는 내용을 찾을 수 없다고요!"
"나는 그것을 이해할 만큼 똑똑하지 않답니다."
"그 코드는 정말 끔찍하군요! 도저히 살펴볼 엄두가 안 납니다."
| 기억나지 않나? 학교앞 병아리 | 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
 | 
#include <stdio.h> 
#include <sys/types.h> 
#include "MyQueue.h" 
#include "dirent.h" 
#pragma warning(disable:4996) 
myQueue mQueue; 
static int 
find_directory( 
    const char *dirname) 
{ 
    DIR *dir; 
    char buffer[PATH_MAX + 2]; 
    char *p = buffer; 
    const char *src; 
    char *end = &buffer[PATH_MAX]; 
    int ok; 
    char * extName; 
    /* Copy directory name to buffer */ 
    src = dirname; 
    while (p < end  &&  *src != '\0') { 
        *p++ = *src++; 
    } 
    *p = '\0'; 
    /* Open directory stream */ 
    dir = opendir (dirname); 
    if (dir != NULL) { 
        struct dirent *ent; 
        /* Print all files and directories within the directory */ 
        while ((ent = readdir (dir)) != NULL) { 
            char *q = p; 
            char c; 
            /* Get final character of directory name */ 
            if (buffer < q) { 
                c = q[-1]; 
            } else { 
                c = ':'; 
            } 
            /* Append directory separator if not already there */ 
            if (c != ':'  &&  c != '/'  &&  c != '\\') { 
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) 
                *q++ = '\\'; 
#else 
                *q++ = '/'; 
#endif 
            } 
            /* Append file name */ 
            src = ent->d_name; 
            while (q < end  &&  *src != '\0') { 
                *q++ = *src++; 
            } 
            *q = '\0'; 
            /* Decide what to do with the directory entry */ 
            switch (ent->d_type) { 
            case DT_REG: 
                /* Output file name with directory */ 
                extName = strrchr(ent->d_name, '.'); 
                if(extName == NULL) break; 
                if(strcmp(extName, ".txt") == 0) 
                { 
                    //printf("fine txt file : %s\n", ent->d_name); 
                    //printf ("%s\n", buffer); 
                    enqueue(&mQueue, buffer); 
                } 
                break; 
            case DT_DIR: 
                /* Scan sub-directory recursively */ 
                if (strcmp (ent->d_name, ".") != 0   
                        &&  strcmp (ent->d_name, "..") != 0) { 
                    find_directory (buffer); 
                } 
                break; 
            default: 
                /* Do not device entries */ 
                /*NOP*/; 
            } 
        } 
        closedir (dir); 
        ok = 1; 
    } else { 
        /* Could not open directory */ 
        printf ("Cannot open directory %s\n", dirname); 
        ok = 0; 
    } 
    return ok; 
} 
void myDir(const char * dirPath) 
{ 
    DIR * dp; 
    struct dirent * ent; 
    char * extName; 
    dp = opendir(dirPath); 
    if(dp != NULL) 
    { 
        while(1) 
        { 
            ent = readdir(dp); 
            if(ent == NULL) 
                break; 
            extName = strrchr(ent->d_name, '.'); 
            if(strcmp(extName, ".txt") == 0) 
                printf("fine txt file : %s\n", ent->d_name); 
        } 
    }  
} 
int IsAvailableEMail(const char * srcMail) 
{ 
    // 찾음 : 1 
    // 없음 : 0 
    int iAtCount = 0;   //@ 위치 
    int iDotCount = 0;  // . 위치 
    int i; 
    char * eMail = (char*)malloc( strlen(srcMail) + 1 ); 
    strcpy(eMail, srcMail); 
    if(strcmp(eMail, "") == 0)    return 0; 
    for(i = 0; i < strlen(eMail); i++) 
    { 
        if(i > 0 && eMail[i] == '@' ) iAtCount = i+1;    // ① 
        if(iAtCount > 0 && i > iAtCount && eMail[i] == '.') iDotCount = i+1;   // ② 
    } 
    free(eMail); 
    if(i > iDotCount && iAtCount > 0 && iDotCount > 0) return 1;     // ③     
    else return 0; 
} 
int main() 
{ 
    //입력받은 디렉토리에서 확장자가 .txt인 파일을 찾고 
    //큐에 넣은 후 이메일 주소를 뽑아내는 구조 
    //큐 초기화 
    FILE * fp; 
    char buf[1024]; 
    char * path; 
    const char * filePath; 
    initQueue(&mQueue); 
    //디렉토리 순회 
    find_directory("C:\\Mail"); 
    ////제대로 나오는지 출력 
    //while( !empty(&mQueue) ) 
    //{ 
    //    printf("%s\n", frontQueue(&mQueue)); 
    //    deQueue(&mQueue); 
    //} 
    // 
    //찾은 파일을 열어서 이메일 주소를 확인 
    while( !empty(&mQueue) ) 
    { 
        path = frontQueue(&mQueue); 
        filePath = path; 
        fp = fopen(filePath, "r"); 
        if(fp != NULL) 
        { 
            int isEmail; 
            char * ch; 
            int i; 
            //while(fgets(buf, 1024, fp)) 
            while( 0 < fscanf(fp, "%s", buf) ) 
            { 
                //printf("%s", buf); 
                isEmail = IsAvailableEMail(buf); 
                if(isEmail) 
                { 
                    ch = strchr(buf, '"'); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    ch = strchr(buf, '('); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    ch = strchr(buf, ')'); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    printf("%s\n", buf); 
                } 
            } 
            fclose(fp); 
            deQueue(&mQueue); 
        } 
    } 
    destroyQueue(&mQueue); 
    return 0; 
} 
 | 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
 | 
#include <stdio.h> 
#include <sys/types.h> 
#include "MyQueue.h" 
#include "dirent.h" 
#pragma warning(disable:4996) 
myQueue mQueue; 
static int 
find_directory( 
    const char *dirname) 
{ 
    DIR *dir; 
    char buffer[PATH_MAX + 2]; 
    char *p = buffer; 
    const char *src; 
    char *end = &buffer[PATH_MAX]; 
    int ok; 
    char * extName; 
    /* Copy directory name to buffer */ 
    src = dirname; 
    while (p < end  &&  *src != '\0') { 
        *p++ = *src++; 
    } 
    *p = '\0'; 
    /* Open directory stream */ 
    dir = opendir (dirname); 
    if (dir != NULL) { 
        struct dirent *ent; 
        /* Print all files and directories within the directory */ 
        while ((ent = readdir (dir)) != NULL) { 
            char *q = p; 
            char c; 
            /* Get final character of directory name */ 
            if (buffer < q) { 
                c = q[-1]; 
            } else { 
                c = ':'; 
            } 
            /* Append directory separator if not already there */ 
            if (c != ':'  &&  c != '/'  &&  c != '\\') { 
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) 
                *q++ = '\\'; 
#else 
                *q++ = '/'; 
#endif 
            } 
            /* Append file name */ 
            src = ent->d_name; 
            while (q < end  &&  *src != '\0') { 
                *q++ = *src++; 
            } 
            *q = '\0'; 
            /* Decide what to do with the directory entry */ 
            switch (ent->d_type) { 
            case DT_REG: 
                /* Output file name with directory */ 
                extName = strrchr(ent->d_name, '.'); 
                if(extName == NULL) break; 
                if(strcmp(extName, ".txt") == 0) 
                { 
                    //printf("fine txt file : %s\n", ent->d_name); 
                    //printf ("%s\n", buffer); 
                    enqueue(&mQueue, buffer); 
                } 
                break; 
            case DT_DIR: 
                /* Scan sub-directory recursively */ 
                if (strcmp (ent->d_name, ".") != 0   
                        &&  strcmp (ent->d_name, "..") != 0) { 
                    find_directory (buffer); 
                } 
                break; 
            default: 
                /* Do not device entries */ 
                /*NOP*/; 
            } 
        } 
        closedir (dir); 
        ok = 1; 
    } else { 
        /* Could not open directory */ 
        printf ("Cannot open directory %s\n", dirname); 
        ok = 0; 
    } 
    return ok; 
} 
void myDir(const char * dirPath) 
{ 
    DIR * dp; 
    struct dirent * ent; 
    char * extName; 
    dp = opendir(dirPath); 
    if(dp != NULL) 
    { 
        while(1) 
        { 
            ent = readdir(dp); 
            if(ent == NULL) 
                break; 
            extName = strrchr(ent->d_name, '.'); 
            if(strcmp(extName, ".txt") == 0) 
                printf("fine txt file : %s\n", ent->d_name); 
        } 
    }  
} 
int IsAvailableEMail(const char * srcMail) 
{ 
    // 찾음 : 1 
    // 없음 : 0 
    int iAtCount = 0;   //@ 위치 
    int iDotCount = 0;  // . 위치 
    int i; 
    char * eMail = (char*)malloc( strlen(srcMail) + 1 ); 
    strcpy(eMail, srcMail); 
    if(strcmp(eMail, "") == 0)    return 0; 
    for(i = 0; i < strlen(eMail); i++) 
    { 
        if(i > 0 && eMail[i] == '@' ) iAtCount = i+1;    // ① 
        if(iAtCount > 0 && i > iAtCount && eMail[i] == '.') iDotCount = i+1;   // ② 
    } 
    free(eMail); 
    if(i > iDotCount && iAtCount > 0 && iDotCount > 0) return 1;     // ③     
    else return 0; 
} 
int main() 
{ 
    //입력받은 디렉토리에서 확장자가 .txt인 파일을 찾고 
    //큐에 넣은 후 이메일 주소를 뽑아내는 구조 
    //큐 초기화 
    FILE * fp; 
    char buf[1024]; 
    char * path; 
    const char * filePath; 
    initQueue(&mQueue); 
    //디렉토리 순회 
    find_directory("C:\\Mail"); 
    ////제대로 나오는지 출력 
    //while( !empty(&mQueue) ) 
    //{ 
    //    printf("%s\n", frontQueue(&mQueue)); 
    //    deQueue(&mQueue); 
    //} 
    // 
    //찾은 파일을 열어서 이메일 주소를 확인 
    while( !empty(&mQueue) ) 
    { 
        path = frontQueue(&mQueue); 
        filePath = path; 
        fp = fopen(filePath, "r"); 
        if(fp != NULL) 
        { 
            int isEmail; 
            char * ch; 
            int i; 
            //while(fgets(buf, 1024, fp)) 
            while( 0 < fscanf(fp, "%s", buf) ) 
            { 
                //printf("%s", buf); 
                isEmail = IsAvailableEMail(buf); 
                if(isEmail) 
                { 
                    ch = strchr(buf, '"'); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    ch = strchr(buf, '('); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    ch = strchr(buf, ')'); 
                    if(ch != NULL) 
                        *ch = ' '; 
                    printf("%s\n", buf); 
                } 
            } 
            fclose(fp); 
            deQueue(&mQueue); 
        } 
    } 
    destroyQueue(&mQueue); 
    return 0; 
} 
 | 
![]()  | 
| 실행결과 |