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
! | |
!! | |
!!< | |
!< | |
!= | |
# | |
### | |
#&& | |
#:: | |
#::: |
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
! | |
!! | |
!&& | |
!? | |
!|| | |
# | |
##:: | |
#:: | |
% | |
%%= |
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
//Vimなどに使えるScala系のdictファイルを生成することができます | |
//先にdefのある行をgrepしてお使いください | |
//例: | |
//grep -h def -r ~/scalaz-scalaz-seven > scalaz.txt | |
//scala scalaToDict.scala scalaz.txt > scalaz.dict | |
import scala.io.Source | |
val regSym = """def\s([^0-9a-zA-Z_]+?)[\s\(\[]+""".r | |
val regAlf = """def\s(.+?)[^0-9a-zA-Z_]""".r | |
if(args.length > 0) { | |
val lines = Source.fromFile(args(0)).getLines().toList |
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
import System.Environment | |
import Data.List | |
import System.Directory | |
import System.IO | |
import Control.Exception | |
dispatch :: String -> [String] -> IO () | |
dispatch "add" = add | |
dispatch "view" = view | |
dispatch "remove" = remove |
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
set nocompatible | |
set hidden | |
filetype off | |
set autoread | |
set noswapfile | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif |
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
set nocompatible | |
set hidden | |
filetype off | |
set autoread | |
set noswapfile | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif |
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
set nocompatible | |
set hidden | |
filetype off | |
set autoread | |
set noswapfile | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif |
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
#include <stdio.h> | |
int main(void){ | |
int n; | |
int i,j; | |
int max; //最大サイズ | |
int sum = 0; //総価値を覚える | |
int tmps = 0; //サイズの和 | |
int tmpw = 0; //価値の和 | |
int item[64][2]; | |
printf("n = "); |
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
#include<stdio.h> | |
#define MAX 128 | |
int Item[MAX][2]; | |
int n; //アイテムの数 | |
int total = 0; //総額の最大値 | |
int maxSize; //ナップサックのサイズ | |
void knapsack(int tmpSumSize, int tmpSumPrice, int count){ | |
int i; | |
//count番目から初めて、重複したものを探さないようにする。 |
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
#include<stdio.h> | |
#define ITEM 128 | |
int Item[ITEM + 1][4]; | |
void ZAQ(int item, int grade, int prise, int MAX){ | |
int i; | |
for (i = 0; i < item; i++){ | |
if (Item[i][3] == 0 && grade + Item[i][1] <= MAX){ | |
Item[i][3] = 1; |