getting this msg:
Counting objects: 8, done.
Compressing objects: 100% (3/3) done,
Writing objects: 100% (6/6)
This does not finish. I have introduced only a small change, so this should be completed very quickly.
am i doing something wrong here?
=->
git config --global sendpack.sideband false
Git は send-pack と receive-pack のプロセスを使用します。send-pack プロセスはクライアント上で実行されリモートサイド上の receive-pack プロセスに接続します。
sideband-->片方が阿呆になる??
http://git-scm.com/book/ja/v2/Git-Internals-Transfer-Protocols
これ後で読むね!!...
2015/04/29
Windows Git server
Git for Windowsをインストールする
改行コードを変更しないで
E:/gitServer/testRepo.git
でgit Bashを起動
git init --bare --shared=true
touch ./git-daemon-export-ok
git daemon --export-all --enable=receive-pack --base-path=/C/git
==これでサーバー起動完了
==>windowのサービスにして、便利
sc create servicename binPath= "C:\hoge\hogehoge.exe"
“binPath= “の後ろには1つスペースが必要とのこと。
「SC」 Create Service Success!
==>これで起動時エラになる、Sexeを仲介にして登録、起動できた!
★他のPCから接続テスト
・
git clone git://<リモートリポジトリを構築したPCのIPアドレス>/tesRepo.git
...
git windows status_access_violation
何となく TEMPフォルダのゴミファイルを削除したら gitが動くようになり...
2015/04/25
Http Boundary
コンテントタイプに以下を指定します。
Content-Type: multipart/form-data; boundary=「バウンダリ文字列」\r\n
バウンダリ文字列とは、複数の情報を続けて送る際の情報同士の「仕切線」の役目を果たします。この文字を調べて「仕切線」と判断するため、情報そのものにバウンダリ文字列が入っていてはいけません。
FireFoxで転送してみた内容を見てみると「---------------------------102852708831426」というように「-」27文字と数字15文字で構成されており、ランダムの数字が付いていました。
\r\nは改行文字を示します。
IOSは
Boundary+5BA6C7D5E1A37EBE
Boundary+5BA6C7D5E1A37EBE
Boundary+5A402217BB55E461
Boundary+0A6551C579D31296
風、、、
headers.add(new BasicHeader("Content-type", multipart/form-data; boundary=Boundary+0A6551C579D31296
));
MultipartEntityBuilder.setBoundary("");...
MultipartEntityBuilder and Charset
日本語化けになっている。。
entity.addTextBody("plain_text", plain_text);
will use the default ContentType.TEXT_PLAIN which look like this...
public static final ContentType TEXT_PLAIN = ContentType.create("text/plain", Consts.ISO_8859_1);
while ContentType.APPLICATION_JSON is using UTF-8 as below
public static final ContentType APPLICATION_JSON = ContentType.create("application/json", Consts.UTF_8);
So what i did was create our own ContentType like this..
entity.addTextBody("plain_text", plain_text, ContentType.create("text/plain", MIME.UT...
MultipartEntityBuilder: Omit Content-Type and Content-Transfer
What I want (what my chrome browser does):
POST .../some.jsp HTTP/1.1
Host: ...
Connection: keep-alive
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary6tcnkxC7txvqE5Xl
------WebKitFormBoundary6tcnkxC7txvqE5Xl
Content-Disposition: form-data; name="merkmal"
5
What I get from MultipartEntityBuilder
POST.../some.jsp HTTP/1.1
Host: ...
Content-Type: multipart/form-data; boundary=m9Zb2QD-QaH-j-HqgGQfI8KwDkToz17ULYkZ
--m9Zb2QD-QaH-j-HqgGQfI8KwDkToz17ULYkZ
Content-Disposition: form-data; name="merkmal"
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding:...
2015/04/19
MIME Content-Type 表
MIME Content-Type 表
テキスト/ドキュメント
説明
拡張子
MIME Content-Type
HTML(Hyper Text Markup Language)
html, htm
text/html
LaTeX
tex, latex, ltx
application/x-latex
PDF(Portable Document Format)
pdf
application/pdf
Postscript
ps
application/postscript
Rich Text Format
rtf
application/rtf
SGML(Standard Generalized Markup Language)
sgm, sgml
text/sgml
TSV/タブ区切り形式
tab, tsv
text/tab-separated-values
...
java Strings.format 特殊文字
書式
説明
例
%
指定を開始する。「%」自身を出力したい場合は「%%」とする。
printf("%%%n");
%
d
整数を十進数で出力する。(nullの時は「null」)
printf("%d%n", 123);
123
o
整数を八進数で出力する。(nullの時は「null」)
printf("%o%n", 123);
173
x
整数を十六進数で出力する。(nullの時は「null」)
printf("%x%n", 123);
7b
c
文字を出力する。(nullの時は「null」)
printf("%c%n", 'x');
x
s
文字列を出力する。(nullの時は「null」)
(toString()あるいはFormattableで文字列に変換される)
printf("%s%n", "xyz");
xyz
-
左詰で出力する(省略時は右詰)。
printf("[%-4d]%n", 123);
printf("[%-4s]%n", "xyz");
[123 ]
[xyz ]
0
足りない桁数を0埋めする。
数値系(%d,%o,%x)で使用可能。[2009-10-21]
他(例えば%s,%b,%h)では使用不可(例外が発生する)。
...
2015/04/07
htmlClient EntityUtils.consume?? why
try {
//... some code
HttpEntity httpEntity = httpResponse.getEntity();
BufferedReader br = new BufferedReader(new InputStreamReader(http.Entity.getContent()));
String line;
while ((line = br.readLine())!= null) {
System.out.println(line);
}
EntityUtils.consume(httpEntity);
} catch (Exception e) {
//code
} finally {
httpClient.getConnectionManager().shutdown();
}
What EntityUtils.consume will do is release all resources held by the httpEntity,
which essentially implies releasing any underlying...
2015/04/05
java ssl charles
httpClientからhttpsを接続する時、firefox/iosのように証明書が必要....
$JAVA_HOME/jre/lib/security/cacerts, where JAVA_HOME is your java home directory for the JVM you’re using.
keytool -import -alias charles -file
charles-proxy-ssl-proxying-certificate.crt -keystore
JAVA_HOME/jre/lib/security/cacerts -storepass changeit
(changeit is the default password on the cacerts file)
Then try: keytool -list -keystore JAVA_HOME/jre/lib/security/cacerts -storepass chang...