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
// ==UserScript== | |
// @name pixiv API | |
// @namespace http://efcl.info/ | |
// @include http://www.pixiv.net/* | |
// ==/UserScript== | |
// API 資料 http://pastie.org/735195 | |
var pxvAPI = "http://iphone.pxv.jp/iphone/" | |
// 検索結果のオブジェクト | |
var result = []; | |
var user = { |
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
#!/bin/bash | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# edit 2010.06.01 rahul kumar | |
#################################### | |
showHelp () { |
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
/* | |
* Copyright (c) 2013 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
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
import android.content.Context; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.util.TypedValue; | |
import android.widget.TextView; | |
/** | |
* サイズ自動調整TextView | |
* | |
*/ |
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
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
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
String url = "https://..."; | |
URIBuilder builder = null; | |
try { | |
builder = new URIBuilder(url); | |
builder.addParameter("param", "テスト"); | |
HttpClient client = new DefaultHttpClient(); | |
HttpPost post = new HttpPost(builder.build()); | |
byte[] bytes = IOUtils.toByteArray(Thread.currentThread().getContextClassLoader().getResource("1.jpg")); |
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
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Matrix; | |
/** | |
* 画像変換クラス | |
* | |
*/ | |
public class BitmapUtil { |
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
// ByteBufferに読み込み | |
ByteBuffer buffer = ByteBuffer.allocateDirect(width * height * 4); | |
gl10.glReadPixels(0, 0, width, height, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, buffer); | |
// 上下逆なので、上下反転 | |
byte[] tmp1 = new byte[width * 4]; | |
byte[] tmp2 = new byte[width * 4]; | |
int h = (int) height / 2; | |
for (int y = 0; y < h; y++) { | |
buffer.position(y * width * 4); |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
struct Triangle { | |
public int p1; | |
public int p2; | |
public int p3; | |
public Triangle(int point1, int point2, int point3) { |
OlderNewer