goo blog サービス終了のお知らせ 

日々のDraft

回答原案集

教えてgoo Q4994976

2009-05-29 12:30:10 | 教えてgoo
http://oshiete1.goo.ne.jp/qa4994976.html

回答地点では#1が見えてなかった。
System.Enumは知らなかった。
間に挟まると回答は見劣りするよねorz (特に#3が#1の焼き直しに見えてしまい,個人的にはちょっとイライラ)

愚痴

2009-05-22 18:05:46 | その他
http://shimax.cocolog-nifty.com/search/2009/05/web-87d2.html#more

書式に関する記述を残すこと,入力欄を分けておく事には賛成するが,
サーバ側での自動変換には賛成しない。(あらかじめ行なわれる変換処理が全て述べられている場合を除く)

それ以外は概ね賛成。

教えてgoo Q4980726

2009-05-22 17:13:00 | 教えてgoo
http://oshiete1.goo.ne.jp/qa4980726.html

>#1
ちっがーう。

それだと,
System.out.println("10".getBytes()[0]);
System.out.println("10".getBytes()[1]);

49
48
になる。

こうする。

class hoge{
public static void main(String[] args){
try{
short s = Short.valueOf("700");
byte[] bs = new byte[2];
java.io.PipedInputStream pistream = new java.io.PipedInputStream();
java.io.PipedOutputStream postream = new java.io.PipedOutputStream(pistream);
java.io.DataOutputStream istream = new java.io.DataOutputStream(postream);
istream.writeShort(s);
istream.flush();
pistream.read(bs);
System.out.println(bs[0]);
System.out.println(bs[1]);
}catch(java.io.IOException e){
System.out.println("エラー");
}
}
}

2
-68

ちなみに
700ではなく-1なら
-1
-1
になるはずだ。

教えてgoo Q4979416

2009-05-22 09:23:26 | 教えてgoo
http://oshiete1.goo.ne.jp/qa4979416.html

Steps to Reproduce:

1. create csv file with notepad.
2. save as "test.ipt".
3. Open Calc
4. Open test.ipt.
5. a dialog to speficy character encoding and font appears - click OK.
6. the file is opened in Writer, not in Calc.

He knows that if file name extension was .txt or .csv, the file can be opened in Calc, however , for the program he made, he needs the file name extension to be neither .txt nor .csv.

Any Solutions?

Memo(not the solutions):
http://www.openoffice.org/issues/show_bug.cgi?id=18228
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Configuring_a_Filter_in_OpenOffice.org
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Filtering_Process

教えてgoo Q4974299

2009-05-20 18:35:42 | 教えてgoo
http://oshiete1.goo.ne.jp/qa4974299.html

うっ、と思って一応検索してみる

Standard ECMA-335
Common Language Infrastructure (CLI)
8.2.2 Built-in value and reference types

Name in CIL assembler
float32

CLS Type?
Yes System.Single

Name in class library
System.Single

Description
IEC 60559:1989 32-bit float

(仕様全ては読んでないので,絶対とはいえないが)多分C#は大丈夫だ。

愚痴

2009-05-20 16:49:25 | その他
いっけね、今まで
List l = new List<String>{ 略 }
l.sort()
とかやってたけど,駄目ジャン。

http://msdn.microsoft.com/en-us/library/system.string.compare.aspx

>The comparison uses the current culture to obtain culture-specific information such as casing rules and the alphabetic order of individual characters. For example, a culture could specify that certain combinations of characters be treated as a single character, or uppercase and lowercase characters be compared in a particular way, or that the sorting order of a character depends on the characters that precede or follow it.

こっちだよ、使うなら。
http://msdn.microsoft.com/en-us/library/af26w0wa.aspx

教えてgoo Q4972740(演算子のオーバーロード)

2009-05-20 08:32:27 | 教えてgoo
http://oshiete1.goo.ne.jp/qa4972740.html

>#1
問題はそれがJavaScript 2.0での定義だということ。
>JavaScript 2.0 の軽量化のために将来のバージョンに見送られた

それっぽいのもあるけどES4って書いてあるんだよな,これも。
http://wiki.ecmascript.org/doku.php?id=proposals:generic_functions

Harmonyで使えるかどうか…。
http://ejohn.org/blog/ecmascript-harmony/

#オーバーライドって書いてたのを修正