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
/*ストーリー読み込み*/ | |
TextClass::LoadStory(){ | |
//真の変数 | |
int FileHandle; //ファイルハンドル | |
char TmpBuf[128]; //テキスト取得用一時変数 | |
char FileName[64]; //ファイル名格納 | |
std::string TmpText; //テキスト取得後操作用一時オブジェクト | |
std::vector<std::string> SplitTextArray; //分割された文字を格納する配列 | |
//カウンタ |
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> | |
#include<ctype.h> | |
#define TRUE 1 | |
#define FALSE 0 | |
#define MAX_MAGIC 2 | |
#define MAX_SOURCE 20 |
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> | |
int main(void){ | |
char str[256],pat[256]; | |
strcpy(str,"chino-chan"); | |
strcpy(pat,"nd"); | |
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
<?php | |
function janken($player, $enemy){ | |
$table = [['あいこ', '勝ち', '負け'], | |
['勝ち', 'あいこ', '負け'], | |
['負け', '勝ち', 'あいこ']]; | |
return $table[$player][$enemy]; | |
} | |
if( isset($_POST['gu']) ) $hand = 0; |
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 <string.h> | |
#include <stdlib.h> | |
// 16進数文字列 | |
int getHexDumpToStr(FILE *fp, char* retStr, int byteSize) { | |
char buffer[100]; | |
char str[100] = "\0"; | |
const char ln = '\n'; | |
int tmp; |
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
#*** カレントディレクトリをTerminal(&タブ)のタイトルに表示 ******************** | |
function changetitle { | |
# pwdを二回も実行しているのがなんかダサい... | |
current_dir=`pwd | sed -e "s%\(/\([^.]\|\..\)\)[^/]*%\1%g"``pwd | sed -e "s%^.*/\([^.]\|\..\)\([^/]*\)$%\2%"` | |
# タイトル用に整形 | |
title=[${USER}]${current_dir} | |
case "${TERM}" in | |
xterm*|kterm*|rxvt*) | |
echo -ne "\033]0;${title}\007" | |
;; |
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
# Modelのメソッドでいっぱい分岐するパターン ( メソッドの責務が明確でない ) | |
class Model | |
def func(x) | |
if ( x.is_a ) { | |
# aの処理 | |
} elsif ( x.is_b ) { | |
# bの処理 | |
} | |
end |
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
package main; | |
import java.util.*; | |
import java.io.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
@SuppressWarnings("unchecked") | |
class Paint4 extends Frame implements MouseListener,MouseMotionListener,ActionListener{ | |
int x,y; |
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
package main; | |
import java.util.*; | |
import java.io.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
@SuppressWarnings("unchecked") | |
class Paint4 extends Frame implements MouseListener,MouseMotionListener,ActionListener{ | |
int x,y; |
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
package main; | |
import java.util.*; | |
import java.io.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
@SuppressWarnings("unchecked") | |
class Paint4 extends Frame implements MouseListener,MouseMotionListener,ActionListener{ | |
int x,y; |
OlderNewer