- declaration は 「宣言」 と訳しているが、「定義」 の方が適しているような気がしなくもない。
- 「インスタンス」 と 「オブジェクト」 という言葉を使うことがあるが、本文書中ではどちらも同じ意味で使用している。
- 「
String
オブジェクト」 という表現は、「String
クラスのインスタンス」 を意味している。 (Java に限らず一般的な表現だと思う。)
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
// clientId や clientSecret、topicId を設定して、groovy コマンドでこのファイルを実行すれば動きます。 (指定のトピックに投稿されます。) | |
// このサンプルコードはコピペ等でご自由にお使いください。 (問題が発生しても責任は負いかねます。) | |
String clientId = "XXXX" | |
String clientSecret = "XXXX" | |
// 投稿先トピックの ID | |
String topicId = "XXXX" | |
// 投稿するメッセージ | |
String message = "Groovy でこんにちは!" |
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
// buildSrc/src/main/groovy/JavaAptPlugin.groovy | |
class JavaAPT extends DefaultTask { | |
private File _destinationDir | |
def getDestinationDir(dir) { _destinationDir } | |
void setDestinationDir(dir) { | |
_destinationDir = dir | |
outputs.dir _destinationDir | |
} |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.5.+' | |
} | |
} | |
apply plugin: 'android' | |
tasks.withType(JavaCompile) { |
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
Text-MeCab-0.20014$ make | |
cc -c "-I." "-I/usr/include" "-I." -fPIC -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=97 -I src -Wall -W -Wno-comment -O2 -DVERSION=\"0.20014\" -DXS_VERSION=\"0.20014\" -o xs/MeCab.o -fpic "-I/home/nobuoka/perl5/perlbrew/perls/perl-5.8.8/lib/5.8.8/x86_64-linux/CORE" -DUSE_PPPORT -DTEXT_MECAB_ENCODING='"euc-jp"' -DTEXT_MECAB_CONFIG='"/usr/bin/mecab-config"' xs/MeCab.c | |
xs/MeCab.xs:64: warning: excess elements in struct initializer | |
xs/MeCab.xs:64: warning: (near initialization for ‘TextMeCab_vtbl’) | |
xs/MeCab.xs: In function ‘XS_Text__MeCab_version’: | |
xs/MeCab.xs:116: warning: assignment discards qualifiers from pointer target type | |
xs/MeCab.c: In function ‘boot_Text__MeCab’: | |
xs/MeCab.c:1140: error: ‘MECAB_ONE_BEST’ undeclared (first use in this function) | |
xs/MeCab.c:1140: error: (Each undeclared identifier is reported only once | |
xs/MeCab.c:1140: error: for each functio |
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
var Cc = Components.classes; | |
var Ci = Components.interfaces; | |
var PromptService = Cc["@mozilla.org/embedcomp/prompt-service;1"] | |
.getService(Ci.nsIPromptService); | |
// インストール時に呼び出される | |
function install(aData, aReason) { | |
PromptService.alert(null, "Bootstrapped Extension Sample", "Install"); | |
} |
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
" filetype が typescript の場合にのみ動作する neocomplcache プラグイン | |
" jsx_complete.vim を参考にしてます. | |
" https://github.com/osyo-manga/neocomplcache-jsx/blob/master/autoload/neocomplcache/sources/jsx_complete.vim | |
let s:source = { | |
\ 'name': 'typescript_complete', | |
\ 'kind': 'ftplugin', | |
\ 'filetypes': { 'typescript': 1 }, | |
\ } |
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
{ | |
"name": "Extension for test", | |
"version": "1.0", | |
"manifest_version": 2, | |
"description": "for test of alert, confirm and prompt functions", | |
"browser_action": { | |
"default_popup": "popup.html" | |
}, | |
"permissions": [ | |
] |
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
# coding: UTF-8 | |
#============================== | |
# 指定した自分のリストに指定したユーザーを放り込みます. | |
# 多量のユーザーをリストに放り込みたいときに便利. | |
#============================== | |
# 本プログラムは OAuthSimple ライブラリを使用します. | |
# https://github.com/nobuoka/ruby-OAuthSimple | |
# で公開しているので, git clone するなりして使用してください. |
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
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c | |
index 54d36c9..cab9d92 100644 | |
--- a/ext/stringio/stringio.c | |
+++ b/ext/stringio/stringio.c | |
@@ -1209,7 +1209,7 @@ strio_putc(VALUE self, VALUE ch) | |
/* | |
* call-seq: | |
- * strio.read([length [, buffer]]) -> string, buffer, or nil | |
+ * strio.read([length [, outbuf]]) -> string, outbuf, or nil |