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
body { | |
background-color: #bfbfbf; | |
section{ | |
border-width: 8px; | |
border-style: double; | |
border-color: #555; | |
height: ~"calc(50% - 16px)"; | |
float: left; | |
width: 50%; | |
} |
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
var path = "perl"; | |
var found = Environment.GetEnvironmentVariable("PATH").Split(';') | |
.Select(x => Path.Combine(x, path)) | |
.SelectMany(_ => Environment.GetEnvironmentVariable("PATHEXT").Split(';') | |
.Concat(new String[] { Path.GetExtension(path) }), | |
(p, ext) => Path.ChangeExtension(p, ext)) | |
.Where(File.Exists).FirstOrDefault(); | |
// found => "c:\cygwin\bin\perl.EXE"(インストール済みの場合) |
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
/** | |
* http://outcesticide.hatenablog.com/entries/2012/12/12 | |
* の記事を参考にしています。 | |
*/ | |
import java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; |
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 -*- | |
from PIL import Image | |
from PIL import ImageDraw | |
import colorsys | |
import sys | |
### http://code.activestate.com/recipes/266466-html-colors-tofrom-rgb-tuples/history/2/ | |
def RGBToHTMLColor(rgb_tuple): | |
""" convert an (R, G, B) tuple to #RRGGBB """ | |
hexcolor = '#%02x%02x%02x' % rgb_tuple |
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 | |
/* | |
* NextMottoMotto | |
* Author:高見知英( http://onpu-tamago.net/ ) | |
* 次のもっともっと交流ステーションの日付を取得するスニペット | |
*/ | |
if(!isset($format)) { | |
$format="Y/m/d"; | |
} |
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
protected float resolveSize(int type, float value, int size, int parentSize) { | |
switch (type) { | |
case ABSOLUTE: | |
return value; | |
case RELATIVE_TO_SELF: | |
return size * value; | |
case RELATIVE_TO_PARENT: | |
return parentSize * value; | |
default: | |
return value; |
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
public class TranslateAnimationEx extends TranslateAnimation implements | |
AnimationListener { | |
private AnimationListener mListener; | |
private View mView; | |
private int mFromX; | |
private int mFromY; | |
private int mToX; | |
private int mToY; |
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
public class SavePictureRunner implements Runnable { | |
private File mFileName; | |
private View mView; | |
public SavePictureRunner(View view, File filename) { | |
this.mView = view; | |
this.mFileName = filename; | |
} | |
@Override |
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
dim fso = CREATEOLEOBJ("Scripting.FileSystemObject") | |
for i = 0 to GETOLEITEM(fso.Drives) - 1 | |
// ドライブの検索(リムーバブルかつ、制御用画像が存在するか?) | |
dim d = ALL_OLE_ITEM[i] | |
PRINT d.DriveLetter + ": Type " + d.DriveType | |
IFB d.DriveType = 1 THEN | |
PRINT "found " + d.path | |
dim path = fso.buildPath(fso.buildPath(fso.buildPath(d.path, "DCIM"), "100__TSB"), "FA000001.JPG") | |
PRINT "path " + path | |
IFB fso.FileExists(path) THEN |
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
var wsh = new ActiveXObject("WScript.Shell"); | |
var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var command = App.ParamCount > 0 ? App.Params(0) : "commit"; | |
var path = fso.buildPath(wsh.RegRead("HKCU\\Software\\GitExtensions\\InstallDir"), "GitExtensions.exe") | |
if(fso.fileExists(path)){ | |
// .gitフォルダを探索 | |
var doc = Documents.newDocument(); | |
if(doc.save()){ | |
var folder = fso.getFolder(fso.getParentFolderName(doc.fileName)) | |
try{ |
OlderNewer