This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
#-*-coding:utf-8 | |
#filename:softDict.py | |
''' | |
softDict | |
copyright 2013. All right reserved to sooop. | |
''' | |
class SoftDict: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *coding*: utf-8 | |
import sqlite3 | |
import time | |
# 데이터베이스 연결 생성 | |
# 존재하지 않는 파일이라고 가정. 새 파일을 생성함 | |
db_filename = 'test.db' | |
conn = sqlite3.connect(db_filename) | |
# 테이블 제거, 생성 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FileManager() | |
{ | |
var _self = this; | |
this.$defaultFilename = "default-ace-file"; | |
this.files = {}; | |
this.currentFile = null; | |
this.new = _newFile; | |
this.save = _saveSessions; | |
this.load = _loadFile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function EditorInstance(key) | |
{ | |
// class variables | |
var _self = this; | |
this.key = key || _newKey(); | |
this.wrapper = null; | |
this.editor = null; | |
this.fileManager = null; | |
// internal property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
"""Bootstrap distribute installation | |
If you want to use setuptools in your package's setup.py, just include this | |
file in the same directory with it, and add this to the top of your setup.py:: | |
from distribute_setup import use_setuptools | |
use_setuptools() | |
If you want to require a specific version of setuptools, set a download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c", | |
"variants": | |
[ | |
{ | |
"name": "Run", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// basic function | |
char * reverse(const char* s1); | |
int __strlen(const char *s1); | |
char * ljust(const char *s1, int length, char c); | |
char * ltrim(const char *s1, char c); | |
int max(int a, int b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
NSString *mutipliyStrings(NSString *str1, NSString *str2); | |
NSString *stringWithReversedArray(NSArray *reversedArray); | |
NSString *ltrim(NSString *str, unichar ch); | |
NSString *rjust(NSString *str, NSUInteger length, unichar ch); | |
NSString *addStrings(NSString *str1, NSString *str2); | |
NSString *factorial(NSString *str); | |
NSString *rjust(NSString *str, NSUInteger length, unichar ch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctype.h> | |
void strupr(char *somestr) | |
{ | |
while(*(somestr+i)!='\0') | |
{ | |
*(somestr+i) = toupper(*(somestr+i)); | |
somestr++; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> // for calloc() | |
#include <string.h> // for strcpy() . not necessary because compiler will automatically include string.h. (with warning) | |
#define MAXNUM 50 | |
int main(void) | |
{ | |
char **arrs; // declare arrs with pointer of char pointer. | |
arrs = (char**)calloc(MAXNUM, sizeof(char*)); // allocate 50*4bytes to arrs. it holds address of each string array. |