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/bin/env ruby | |
#-*- encoding:utf-8 -*- | |
=begin | |
カレントディレクトリにある .から始まるdotfile(ディレクトリも可)をHOME以下にシンボリックリンクします。 | |
Dropboxにdotfile用のdirectoryを作りその中にこのスクリプトを入れておけば、OS(のユーザー)のセットアップ時に実行すればリンクを作ってくれます。 | |
Ruby1.9用 (JRuby --1.9 でも動作可能) | |
=end | |
puts "このスクリプトはDropbox/DotFilesの中で実行してください。" |
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
;;;; scratchnote.el | |
;;; this code requires popwin.el | |
;;; configuration sample | |
;; (require 'scratchnote) | |
;; (global-set-key (kbd "C-c m") 'scratchnote-pop) | |
;; (scratchnote-restore) | |
;; (add-hook 'kill-emacs-hook 'scratchnote-save) | |
;;; code: |
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
val ar = Array(79,56,89,100,1,2,6,5,90,21,26,75,35,67,66,65,81,10,0)//適当な配列 (0 <= x <= 100) | |
def qs(a:Array[Int]):Array[Int] = { | |
if(a.length == 1) return a | |
val pivot = if(a(0) > a(1)) a(0) else a(1) | |
val a0 = qs(a.filter( _ < pivot)) | |
val a1 = qs(a.filter( _ >= pivot)) | |
Array.concat(a0,a1) | |
} |
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> | |
int mk_file(char*); | |
int main(int argc,char* argv[]){ | |
int n; |
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 com.example.Logger; | |
/* This class is for reading.When you use Logger::getLogData method,Logger class will return Array. its member is this class. */ | |
public class LogData{ | |
protected String message,state,date; | |
protected int y,m,d,h,min,s; | |
protected boolean e; | |
public LogData(){ |
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
--- tc.lua 2012-06-03 12:32:38.000000000 +0900 | |
+++ tc.en.lua 2012-06-03 12:36:24.000000000 +0900 | |
@@ -29,20 +29,20 @@ | |
function getCoordinates() | |
repeat | |
tmp = {} | |
- print("x座標") | |
+ print("x-coordinate") | |
tmp["x"] = tonumber(io.read()) | |
- print("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
#!/usr/local/bin/zsh-4.3.11 | |
#zshスクリプト あなたにおやすみタイマーを提供します。 | |
#mplayerを呼び出すには /usr/local/bin /usr/bin /opt/local/binのいずれかにmplayerが入ってる必要がある | |
#Mplayerが有効な場合音を鳴らすなら以下の変数を書き換える------------- | |
SOUNDMUSIC="YES" #鳴らすならYES 値が不正なら無視されNO扱い | |
MFILE="" #鳴らす音のファイルPATH | |
LOG="YES" #カウント開始時間と終了時間のログを残すならYES | |
#--------------------------------------------------------------------- |
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/bin/python | |
#-*- encondig:utf-8 -*- | |
#pythonの実験で作ったやつ。pythonはわからんが. 単にQTextEditをMainWindowのセントラルウィジェットにしてMainWindowをshowしてるだけの簡単なもの。 | |
from PyQt4 import QtCore,QtGui | |
import sys,os | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self,parent=None): |
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/bin/env ruby | |
#-*- encoding:utf-8 -*- | |
# 1.9じゃないとちゃんと動かないようだよ。 | |
if ARGV.size != 2 then | |
puts "dBconv -{n|v|w} n[dB|x]" | |
exit 0 | |
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
require 'Qt4' | |
class MainWidget < Qt::Widget | |
def initialize | |
super | |
q_button = Qt::PushButton.new('quit') | |
connect(q_button,SIGNAL('clicked()'),$qApp,SLOT('quit()')) | |
txtedit = Qt::TextEdit.new |
NewerOlder