This file contains hidden or 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
| -- 대시 두 개는 한 줄짜리 주석을 의미합니다. | |
| --[[ | |
| [와 ]를 두 개씩 추가하면 여러 줄 주석이 됩니다. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. 변수와 흐름 제어 | |
| ---------------------------------------------------- |
This file contains hidden or 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
| DbxEntry.WithChildren listing = dbxClient.getMetadataWithChildren("/"); | |
| if (listing.entry instanceof DbxEntry.Folder) { | |
| for (DbxEntry child : listing.children) { | |
| String shareableUrl = dbxClient.createShareableUrl(child.path); | |
| shareableUrl = shareableUrl.replace("www.dropbox.com", "dl.dropboxusercontent.com"); | |
| System.out.println(shareableUrl); | |
| } | |
| } |
This file contains hidden or 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
| java.io.File dir = new java.io.File("<path>"); | |
| for (java.io.File f : dir.listFiles()) { | |
| String name = f.getName(); | |
| File body = new File(); | |
| body.setTitle(name); | |
| body.setMimeType("<mimetype>"); | |
| FileContent mediaContent = new FileContent("<mimetype>", f); | |
| File file = service.files().insert(body, mediaContent).execute(); |
This file contains hidden or 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
| # scp를 이용한 파일 전송 | |
| scp -r [local file] id@host:[target directory] | |
| # 크기가 0바이트 이상인 pdf 파일을 찾아 대상 디렉터리로 복사하기 | |
| find . -type f -size +0 -iname '*.pdf' -exec cp {} ~/pdf \; | |
| # MySQL 백업 | |
| mysqldump -u [id] -p [password] [database] > [filename].sql | |
| # MySQL 복원 |
This file contains hidden or 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
| <% | |
| String url = "http://wikibook.github.io/learnlayout/"; | |
| response.setStatus(response.SC_MOVED_PERMANENTLY); | |
| response.setHeader("Location", url); | |
| %> |
This file contains hidden or 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
| print '~/python/one-liners.py'.split('.')[-1] |
This file contains hidden or 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
| Sub SaveAsTIFF() | |
| Dim folder As String, filename As String | |
| Dim doc As Visio.Document | |
| Dim pg As Visio.Page | |
| Dim i As Integer | |
| Dim formatExtension As String | |
| '// Init folder, doc and counter: | |
| folder = ThisDocument.Path | |
| formatExtension = ".tif" |
This file contains hidden or 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
| from pathlib import Path | |
| input_folder = 'C:/myPyExcel/data/ch07/sales_data/input' # 원본 데이터 폴더 | |
| raw_data_dir = Path(input_folder) | |
| excel_files = raw_data_dir.glob('상반기_제품_판매량_*') # 폴더 내 데이터 파일 이름 | |
| for excel_file in excel_files: | |
| print(excel_file) # 원본 데이터 파일 경로 출력 |
This file contains hidden or 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
| from pathlib import Path |
This file contains hidden or 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
| input_folder = 'C:/myPyExcel/data/ch07/sales_data/input' |
OlderNewer