Skip to content

Instantly share code, notes, and snippets.

@opklnm102
opklnm102 / 1
Last active August 29, 2015 14:06
software global project
//๋‘๊ฐœ์˜ ์›์„ ์ž…๋ ฅ๋ฐ›์•„ ๊ฒน์น˜๋Š”์ง€,์ ‘ํ•˜๋Š”์ง€,๋–จ์–ด์ ธ์žˆ๋Š”์ง€ ํŒ๋ณ„
#include<stdio.h>
#include<math.h>
typedef struct circle{
double x,y,r;
}circle;
int circleRel(circle, circle);
@opklnm102
opklnm102 / 3
Last active August 29, 2015 14:06
software global project
//์‹œ๋‚˜๋ฆฌ์˜ค์— ์ž…๊ฐํ•ด์„œ mystrlen(),mystrcmp(),mystrcpy(),mystrcat() ํ•จ์ˆ˜์ž‘์„ฑ
#include<stdio.h>
#include<ctype.h>
int mystrlen(char *); //๋ฌธ์ž์—ด ๊ธธ์ด๋ฅผ ๋ฐ˜ํ™˜ ๋งˆ์ง€๋ง‰ null๋ฌธ์ž๋Š” ๊ธธ์ด์— ํฌํ•จ x
int mystrcmp(char *, char *); //์•ž ๋ฌธ์ž์—ด์ด ๋’ท ๋ฌธ์ž์—ด๋ณด๋‹ค ํฌ๋ฉด 1 ์ž‘์œผ๋ฉด -1 ๊ฐ™์œผ๋ฉด 0
void mystrcpy(char *,char *); //๋’ท๋ฌธ์ž์—ด์„ ์•ž๋ฌธ์ž์—ด์— ๋ณต์‚ฌ
void mystrcat(char *,char *); //์•ž๋ฌธ์ž์—ด ๋’ค์— ๋’ท๋ฌธ์ž์—ด์„ ๋ณต์‚ฌ
void main(int argc, char *argv[])
@opklnm102
opklnm102 / 2
Created September 24, 2014 09:09
software global project
//x,y์ขŒํ‘œ์ƒ์˜ ํ•œ์ ์ด ์ฃผ์–ด์ง„ ์ง์‚ฌ๊ฐํ˜• ์•ˆ์— ์œ„์น˜ํ•˜๋Š”์ง€ ๊ฒ€์‚ฌ
#include<stdio.h>
#include<stdlib.h>
typedef struct point{ //์ขŒํ‘œ๊ฐ’์€ ์ •์ˆ˜
int x;
int y;
}point;
typedef struct rect{
@opklnm102
opklnm102 / file_copy
Created October 1, 2014 08:12
software global project
#include<stdio.h>
int main(int argc, char *argv[])
{
FILE *fp1,*fp2;
char ch;
fp1 = fopen("filecopy.cpp","r");
if(fp1 == NULL){
printf("Error: %s does not exist!\n","filecopy.cpp");
@opklnm102
opklnm102 / file_read
Created October 1, 2014 08:13
software global project
#include<stdio.h> //์‹คํ–‰ํŒŒ์ผ๊ณผ ๊ฐ™์€ ์œ„์น˜์— ์žˆ์–ด์•ผ ํŒŒ์ผ์„ ์ฐพ๋Š”๋‹ค
#include<stdlib.h>
int main(int argc, char *argv[])
{
FILE *fp1,*fp2;
char ch;
int start,end,n;
if(argc == 2)
@opklnm102
opklnm102 / palin
Created October 1, 2014 08:13
software global project
#include<stdio.h> //1byte์˜ ํšŒ๋ฌธ(์˜์–ด)
#include<string.h>
int main(int argc, char *argv[])
{
char str[80],*ps,*pe;
int res;
if(argc == 2){
strcpy(str,argv[1]);
@opklnm102
opklnm102 / hanpalin
Created October 1, 2014 08:14
software global project
#include<stdio.h> //2byte์˜ ํšŒ๋ฌธ(ํ•œ๊ธ€)
#include<string.h>
int main(int argc, char *argv[])
{
char str[80],*ps,*pe;
int res;
if(argc == 2){
strcpy(str,argv[1]);
@opklnm102
opklnm102 / postgres-cheatsheet.md
Created November 17, 2016 14:12 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

์ตœ๊ทผ ์ธ๊ณต์ง€๋Šฅ์„ ํ™œ์šฉํ•œ ์ฑ—๋ด‡์— ๋Œ€ํ•œ ๊ด€์‹ฌ์ด ๋†’์•„์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ฑ—๋ด‡ ์„ค๊ณ„์— ๊ด€ํ•œ ์ข‹์€ ๊ธ€์ด ์žˆ์–ด ๋ฒˆ์—ญ์„ ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ์ด ๊ธ€์€ IBM DeveloperWorks์— ๊ธฐ์žฌ๋œ Michael Yuan์˜ ๊ธ€์„ ๋ฒˆ์—ญํ•œ ๊ฒƒ์œผ๋กœ ์˜์—ญ์ด ์žˆ์Šต๋‹ˆ๋‹ค. - ๊น€์ •์ฃผ([email protected])


๋Œ€ํ™”ํ˜• ์ฑ—๋ด‡ ์„ค๊ณ„์˜ ๊ณผ์ œ

์‚ฌ์šฉ์ž๋Š” ์ฑ—๋ด‡์ด ๋งค์šฐ ๊ฐ„๋‹จํ•˜๊ณ  ์ตœ์†Œํ•œ์˜ ์š”๊ตฌ๋งŒ ํ•˜๊ธฐ์— ์ข‹์•„ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์€ ๋Œ€ํ™”์‹ ๋ฌธ์ž ๋ฉ”์‹œ์ง€์ฒ˜๋Ÿผ ๊ฐ„๋‹จํ•ด์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ์‚ฌ์šฉ์ž๋Š” ์ž์‹ ์ด ์„ ํ˜ธํ•˜๋Š” ๋ฉ”์‹œ์ง€ ์•ฑ์— ๊ณ„์† ๋จธ๋ฌผ๊ธฐ๋ฅผ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค. ์•ฑ, ์›น URL, ๋ฉ”๋‰ด, ๋ฒ„ํŠผ, ๊ด‘๊ณ , ํฌ๋กฌ ๋ฐ ๊ธฐํƒ€ ์š”์†Œ๋ฅผ ํƒ์ƒ‰ํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ๋ชฉํ‘œ๋ฅผ ๋‹ฌ์„ฑํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด ๋‹จ์ˆœ์„ฑ์€ ํฐ ์„ค๊ณ„ ๊ณผ์ œ๋„ ์ œ์‹œํ•ฉ๋‹ˆ๋‹ค. ์ฑ—๋ด‡์€ ์‚ฌ์šฉ์ž์˜ ๋ง์„ ์ •ํ™•ํ•˜๊ฒŒ ์ดํ•ดํ•˜๊ณ  ์ ์ ˆํžˆ ํ–‰๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์˜ค๋Š˜๋‚  ์ตœ๊ณ ์˜ ์ž์—ฐ์–ด AI (์ธ๊ณต ์ง€๋Šฅ)์—๊ฒŒ๋„ ๋งค์šฐ ์–ด๋ ค์šด ๊ณผ์ œ์ž…๋‹ˆ๋‹ค.

ํ˜„์žฌ ์ƒํƒœ์˜ AI์—์„œ๋Š”, ๋Œ€ํ™”์‹ ๋ฌธ์ž ๋ฉ”์‹œ์ง€ ๋˜๋Š” ๋Œ€ํ™”์‹(Conversational) UI, ์ฆ‰ CUI๋Š” (์•ˆํƒ€๊น๊ฒŒ๋„) ๊ฑฐ์˜ ํ•ญ์ƒ ์ž˜ ์„ค๊ณ„๋œ ๊ทธ๋ž˜ํ”ฝ UI(GUI)๋ณด๋‹ค ์—ด๋“ฑํ•ฉ๋‹ˆ๋‹ค. GUI์™€ ๋น„๊ตํ•˜์—ฌ CUI๋Š” ์ดˆ๊ธฐ ๋‹จ๊ณ„์— ์žˆ์Šต๋‹ˆ๋‹ค. ์ปค๋ฎค๋‹ˆํ‹ฐ๋กœ์„œ ์šฐ๋ฆฌ๋Š” ์—ฌ์ „ํžˆ CUI์˜ ๋””์ž์ธ ํŒจํ„ด๊ณผ ์šฐ์ˆ˜ ์‚ฌ๋ก€๋ฅผ ๋ชจ์ƒ‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ํŠœํ† ๋ฆฌ์–ผ์—์„œ๋Š” ์ฑ—๋ด‡์ด ์™œ ์‹คํŒจํ•˜๊ณ  ์„ฑ๊ณตํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

@opklnm102
opklnm102 / Java8DateTimeExamples.java
Created January 28, 2017 05:01 — forked from mscharhag/Java8DateTimeExamples.java
Examples for using the Java 8 Date and Time API (JSR 310)
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {