「double」を含む日記 RSS

はてなキーワード: doubleとは

2014-06-04

http://anond.hatelabo.jp/20140604161616

すでにそうなっているものに文句を言ってもしょうがないだろ。

どうでもいいけど

Nullableの説明で

通常、値型は null 値(無効な値)を取れません。

http://ufcpp.net/study/csharp/sp2_nullable.html

とあるけど そもそも double型などはそもそも値だけではなく最初からNaNが使える。

数値とNaNの併用が可能な型。(Cの場合というのがある。)

まり用途に応じてEnumだったりdoubleだったりオブジェクトだったりを使い分ければいい。

フォーム型なんかの場合は元々オブジェクト指向になっていて、中身の実装がポインタポインタ=NULL とポインタ=BooleanObjectという実装だから出来る話。

ちなみに、未設定をCでやる場合enumではなく、ビット演算子を使うことになるかとは思う。3値ならenum C#ならNULLABLEでもいいんじゃね?

2014-05-20

malloc関数を覚えた

必然、manalloc関数必要とする。引数にはアナル拡張する直径mmを指定する。戻り値アナル拡張によって得られた快楽指数「ヘゲナ」を返す。「ヘゲナ」はfloatの拡張であり、double性奴隷である。decimalとは竿兄弟である。reanalloc関数必要であろう。というのも、アナル拡張は必ずしも1度ではない、否、むしろリピーターが多いのではないか?おれはそう思っていて、やはりreanallocは需要がある。引数は2つ必要だ。拡張対象アナルへのポインタ(どちらも表記は*だし実にちょうど良いと考える。C言語の創始者もそれを想定していたのではないか・・・?と思うほど、実に調和の取れていて、不気味に符合するのだ。閑話休題。2つ目の引数は再拡張するためのサイズを示す。ここではsize_tが型になる。tとは勿論ちんぽのことで、直径cm意味する。しかし考えてみると、各種アナルを開放するfree関数は実に意味深だ。何から開放するのだろうか?ちんぽだろう。おれは、そう考えている。C言語楽しいぞ。

2014-02-03

http://anond.hatelabo.jp/20140203022836

情報科学分野だと:

…他の分野ではどんな感じ?

http://anond.hatelabo.jp/20140203014319

え? 普通に差読者と投稿者、お互いの素性がわからないってあるよ?

Double-Blind Reviewってやつなんだけど。

普通投稿者が差読者が誰かわからないSingle-Blind Reviewってやつね。

2014-01-24

週末ジロリアン 作詞 秋元康

僕らはまだたどり着けてない

黄色看板

心の中では描いてる

ヤサイ越しの君の顔

湯気で見えない午後6時

何が真実なのかって

まだまだ僕らはわからない

大きな声で叫ぶんだ 流した汗を思い出せ

ヤサイニンニク味濃いめ

好きな気持ちを声に出せ

Change your size!

Change dai double!

僕らはまだたどり着けてない

スープの中の麺

心の中では笑ってる

カウンター越しのおやっさん

今日も会えない午後7時

何が正しいのかなんて

まだまだ僕らはわからない

大きな声で叫ぶんだ  流した涙を見返そう

大きさだけならもう言える

好きな気持を声に出せ

Change your size!

Change dai double!

2013-10-09

Gmailからエラーメール

ユーザーからメールエラーメッセージについて質問

Gmai宛に送ったら、なにやら長文が帰ってきたというので確認してみたら…

: host gmail-smtp-in.l.google.com[173.194.79.27] said:

550-5.1.1 The email account that you tried to reach does not exist. Please

try 550-5.1.1 double-checking the recipient's email address for typos or

550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1

え~っと…

このメールは配信できなかったよ、アドレスをよく確認して余計なスペースが入ってないか見てね…か。

で、詳しくは↓を見ろと。

http://support.google.com/mail/bin/answer.py?answer=6596

なになに?

「この Gmail ユーザー存在しません...」

だったらUser Unknownって書いとけ!

言葉細やかに丁寧な説明だと思うけど、

英語苦手なユーザーが悩む→ISPの余計な仕事が増えるんだが…勘弁してくれ。

2013-09-11

倍返しだ!を英語で言うと

やられたらやり返す。倍返しだ

これを英語で何というかっていう記事が散見される。

なかなか難しいみたいだ。

ところが、WSJに日本人記者が書いた『半沢直樹』に関する記事がある。

そこでは、倍返しだ!を

Take the double paybackと訳している。

そうなのかと思ったら、読者から意味不明とのコメントが寄せられていた。

で、Retun double the painの方がいいんじゃないかと。

一方で、遊戯王カードに「倍返し」というトラップカードがあり、その英訳double paybackとなっている。

paybackには仕返しって意味があるので、WSJの役でもよさそうだ。

2013-05-13

[]Double Dealing Character













 

(● (__ω__)  ●)

2012-08-13

C#基礎文法最速マスター

1. 基礎
classの作成

プログラムclass記述します。たとえばSampleという名前classを作る場合、Sample.csファイル内に次のように書きます。(C#場合ファイル名とクラス名は同一でなくても良い。複数のクラスを書いても良い)

public class Sample {

}
Mainメソッドの作成

プログラムclass内のMainメソッドの先頭から実行されます。Mainメソッドは次のように書きます

public class Sample {

    public static void Main( String[] args ) {
         // 処理を書く
     }

}
Console.WriteLineメソッド

文字列を表字するメソッドです。

Console.WriteLine( "Hello world" );
コメント

コメントです。

// 一行コメント

/*
   複数行コメント
 */
変数の宣言

変数の宣言です。変数の宣言時にはデータ型を指定します。

// 変数
int num;
データ型

データ型です。C#データ型には値型と参照型とがあります。以下は値型のデータ型です。

// int(整数)型
int num;
// char(文字)型
char c;
// float(単精度浮動小数点)型
float val;
// double(倍精度浮動小数点)型
double val;
// bool(論理)型
bool flag;
// DateTime(日付)型
DateTime date;

以下は参照型のデータ型です。

// StringString s;
// 配列String[] array;
プログラムのコンパイル

プログラムコンパイルするには、コマンドラインで以下のようにします。

csc Sample.cs
プログラムの実行

プログラムを実行するには、コマンドラインで以下のようにします。

.net framework on Windows場合

Sample.exe

Mono.frameworkの場合

mono ./Sample.exe
2. 数値
数値の表現

int、float、double型の変数に数値を代入できます。int型には整数だけ代入できます。float、double型には整数でも小数でも代入できます

int i = 2;
int i = 100000000;

float num = 1.234f;

double num = 1.234;
四則演算

四則演算です。

num = 1 + 1;
num = 1 - 1;
num = 1 * 2;
num = 1 / 2;

商の求め方です。割る数と割られる数が両方とも整数場合計算結果の小数点以下が切り捨てられます

num = 1 / 2;  // 0

割る数と割られる数のどちらかが小数場合計算結果の小数点以下が切り捨てられません。

num = 1.0 / 2;    // 0.5
num = 1 / 2.0;    // 0.5
num = 1.0 / 2.0;  // 0.5

余りの求め方です。

// 余り
mod = 4 % 2
インクリメントとデクリメント

インクリメントとデクリメントです。

// インクリメント
 ++i;

// デクリメント
 --i;
3. 文字列
文字列の表現

文字列ダブルクォートで囲みます

String str = "abc";
文字列操作

各種文字列操作です。

// 結合
String join = "aaa" + "bbb";

// 分割
String[] record = "aaa,bbb,ccc".Split( "," );

// 長さ
int length = "abcdef".Length();

// 切り出し
"abcd".Substring( 0, 2 )   // abc

// 検索
int result = "abcd".IndexOf( "cd" ) // 見つかった場合はその位置、見つからなかった場合は-1が返る
4. 配列
配列変数の宣言

配列です。

// 配列の宣言
int[] array;
配列の生成

配列の生成です。配列の生成時には要素数を指定するか、初期データを指定します。

int[] array;

// 要素数を指定して配列を生成
array = new int[5];

// 初期データを指定して配列を生成
array = new int[] { 1, 2, 3 };

// 宣言と同時に配列を生成
int[] array2 = new int[5];
配列の要素の参照と代入

配列の要素の参照と代入です。

// 要素の参照
array[0]
array[1]

// 要素の代入
array[0] = 1;
array[1] = 2;
配列の要素数

配列の要素数を取得するには以下のようにします。

array_num = array.Length;
配列のコピー

配列の要素を別の配列コピーするには以下のようにします。

int[] from = new int[] { 1, 2, 3 };
int[] to = new int[5];

from.CopyTo(to, 0);
5. 制御文
if文

if文です。

if ( 条件 )
{

}
if ~ else文

if ~ else文です。

if ( 条件 )
{

}
else
{

}
if ~ else if 文

if ~ else if文です。

if ( 条件 )
{

}
else if ( 条件 )
{

}
while文

while文です。

int i = 0;
while ( i < 5 )
{
    
    // 処理
    
    ++i;
}
for文

for文です。

for ( int i = 0; i < 5; ++i )
{
    // 処理
}
for-each文

for-each文です。配列の各要素を処理できます

int[] fields = new int[] { 1, 2, 3 };

foreach (int field in fields)
{
    // 処理
}
6. メソッド

C#では関数メソッドと言いますメソッドを作るには次のようにします。戻り値を返却するにはreturn文を使います

static int sum( int num1, int num2 )
{
    int total;

    total = num1 + num2;

    return total;
}
9. ファイル入出力

ファイル入出力です。ファイル入出力を行うには、プログラムの先頭に以下を記述します。

using System.IO;

以下がファイル入力の雛形になりますファイルオープンや読み込みに失敗した場合catch節に処理が移ります

String filename = "text.txt";
StreamReader reader = null;
try
{
    reader = new StreamReader(filename);

    String line;
    while ((line = reader.ReadLine()) != null)
    {

    }

}
catch (IOException e)
{
    // エラー処理:

}
finally
{
    if (reader != null)
    {
        try
        {
            reader.Close();
        }
        catch (IOException e) { }
    }
}

またはC#ではusing ステートメントと言うものがあり、この様にも書ける

String filename = "text.txt";
using (StreamReader reader = new StreamReader(filename))
{
    try
    {

        String line;
        while ((line = reader.ReadLine()) != null)
        {
            // 読み込んだ行を処理
        }

    }
    catch (IOException e)
    {
        // エラー処理:

    }
}

usingをつかうとCloseがなくなったことからわかるようにusing(){}を抜けるとき自動的にDisposeメソッドを呼び出し、オブジェクトを廃棄する。その分コードスッキリするが、使いにくい場面もあるので考えて使うこと。

以下がファイル出力の雛形になりますファイルオープンや書き込みに失敗した場合catch節に処理が移ります

String filename = "text.txt";
StreamWriter writer = null;

try
{
    writer = new StreamWriter(filename));

    writer.WriteLine("abc");
    writer.WriteLine("def");
    writer.WriteLine("fgh");

}
catch (IOException e)
{
    // エラー処理:

}
finally
{
    if (writer != null)
    {
        writer.Close();
    }
}

こちらもusingを使って書ける。が、割愛する。

知っておいたほうがよい文法

C#でよく出てくる知っておいたほうがよい文法の一覧です。

繰り返し文の途中で抜ける

繰り返し文の途中で抜けるにはbreak文を使用します。

for ( i = 0; i < 5; ++i ) {

    if ( 条件 ) {
        break;    // 条件を満たす場合、for文を抜ける。
    }

}
繰り返しの残り部分の処理をスキップする

残りの部分処理をスキップし、次の繰り返しに進むにはcontinue文を使用します。

for ( i = 0; i < 5; ++i ) {

    if ( 条件 ) {
        continue;    // 条件を満たす場合、残りの部分処理をスキップし、次の繰り返しに進む。
    }

}
例外処理

例外を投げるにはthrow文を使用します。

throw new Exception( "Error messsage" );

例外処理をするにはtrycatch文を使用します。

try {

    // 例外が発生する可能性のある処理

} catch ( Exception e ) {

    // 例外発生時の処理

}

2012-07-05

http://anond.hatelabo.jp/20120705023743

自己評価自分でも高いかいかよく分からない。

問題を他人に押し付けられる感じが嫌なんだよね。

まったりと、自分の好きな課題だけに取り組んでいきたい。そういう風にして生きている。

プログラミングも同じで、自分の作りたいものだけを作って生きている。

それともう一つ不満なのは(或いは『自分に合ってない』と表現した方が適切なのかも知れない)、洗練されたデータ構造設計必要性が問題中に殆ど出現しない所。

これは多くの言語に対して同じ問題を提供するには仕方のない事かも知れない。でも個人的にはそれが不自由で仕方がなかった。

例えばC++における純粋仮想関数インターフェイス)と継承を使った下記の様な「木」を表現した構造、まず出てこないでしょ?C++ではなくCならswitchテーブルを使った再帰関数で実現する必要があるし、これが言語間で共通な問題を隔てる原因にもなっている。

struct interface_tree{
    virtual double eval() const = 0;
    virtual std::size_t subtree_num() const = 0;
    virtual interface_tree *subtree(std::size_t) = 0;
    virtual ~interface_tree(){}
};

// expression tree, add
struct tree_add : public interface_tree{
    tree_add(std::size_t n, interface_tree **t){ subtree_[0] = t[0], subtree[1] = t[1]; }
    virtual double eval(){ return subtree(0)->eval() + subtree(1)->eval(); }
    virtual std::size_t subtree_num() const{ return 2; }
    virtual interface_tree *subtree(std::size_t i){ return subtree_[i]; }
    virtual ~tree_add(){ delete subtree_[0]; delete subtree_[1]; }
    interface_tree *subtree_[2];
};

// expression tree, sub
struct tree_sub : public interface_tree{
    tree_add(std::size_t n, interface_tree **t){ subtree_[0] = t[0], subtree[1] = t[1]; }
    virtual double eval(){ return subtree(0)->eval() - subtree(1)->eval(); }
    virtual std::size_t subtree_num() const{ return 2; }
    virtual interface_tree *subtree(std::size_t i){ return subtree_[i]; }
    virtual ~tree_add(){ delete subtree_[0]; delete subtree_[1]; }
    interface_tree *subtree_[2];
};

// expression tree, value
struct tree_val : public interface_tree{
    tree_val(double n_) : n(n_){}
    virtual double eval(){ return n; }
    virtual std::size_t subtree_num() const{ return 0; }
    virtual interface_tree *subtree(std::size_t i){ assert(0); }
    virtual ~tree_add(){}
    double n;
};

// ...

2012-05-29

フリーダイヤルに営業電話

1週間で3回フリーダイヤルに営業電話をかけてきたバカ会社

フリーダイヤルに営業電話」をgoogle検索すると1番目(社長秘書迷惑電話ブログ

に出てくる。)

株式会社 doubLe 代表者 宮崎 隆治  本社 〒160-0023 東京都新宿区西新宿1-22-15 グラフィオ西新宿13F

SEOの営業なのに、WEBコンサルの営業なのに、全然できてない。

だいたいBingで30内にいないのにSEOの実績って・・・SEO業者のくせに電話営業とか頭にウジが湧いてるんでしょうか。

求人広告には資本金書いて

http://www.green-japan.com/company/2338

会社概要には書かないとか

http://www.doubledouble.jp/company.html

社長twitter適当だし

http://twitter.com/#!/bunshin421

営業かけてきた人間も3回目。すごいどもってる、話し方が社会人ではない。ちょっと話し聞いたらインターンっぽい。

要はインターン第2新卒にムチと完全成果報酬ってあめで奴隷電話営業労働させてるだけ、だから営業もお題目を唱えてるようなもん。

他の事業で儲けてるか、借金でまわしてるんだろうけど、評価を下げてでも無駄な営業をやるって意味あるんだろうか?

2011-12-29

Portable electronic equipment battery technology

1, about the trickle charge, rapid charging and stable battery charging algorithm

According to the energy requirements of the final application, a battery may contain up to 4 lithium ion or lithium polymer battery core, its configuration will have a variety of change, at the same time with a mainstream power adapter: direct adapter, USB interface or car charger. Remove the core quantity, core configuration or power adapter type difference, the battery has the same charge characteristics. So they charge algorithm. Lithium ion and li-ion polymer battery best charging algorithm can divided into three phases: trickle charge, rapid charging and stable charge.

trickle charge. For depth discharge core to charge. When core voltage in less than about 2.8 V, use a constant 0.1 C of the current charging for it.

fast charging. Core voltage trickle charge more than the threshold, improve the charging current rapid charging. Fast charging current should be lower than 1.0 C.

stable voltage. In the fast charging process, once the core 4.2 V voltage, stable voltage phase began. This is through the minimum charge current or timer or of the two joint to interrupt charge. When the minimum current below about 0.07 C, can interrupt charge. The timer is to rely on a default to trigger the timer interrupt.

Advanced battery charger with additional security function normally. For example, if the core temperature exceeds the given window, usually 0 ℃-45 ℃, charge will be suspended.

Remove some very low-end equipment, now on the market/li-ion polymer lithium ion battery solutions are integrated with the outer components or, in accordance with the characteristics of the charging to charge, this is not just to get better effect charge, but also for safety.

lithium ion/polymer battery charge is an example of applications-double input 1.2 A lithium battery charger LTC4097

LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. Figure 1 for double input 1.2 A lithium battery charger LTC4097 schemes. It USES constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone. The performance characteristics: no external micro controller charging termination; The input power automatic detection and choice; Through the resistance from the exchange of charging adapter input can be as high as 1.2 A programming charge current; The resistance of programmable USB charging current is up to 1 A; 100% or 20% USB charging current set; The input power output and existing bias NTC (VNTC) pin as a 120 mA drive ability; NTC thermistors input (NTC) pin for temperature qualified charged; Pre-settings battery voltage with floating plus or minus 0.6% accuracy; Thermal regulation maximize charge rate and free hot air LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. The use of constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone.

2, lithium ion/polymer battery scheme

Lithium ion/polymer battery charge scheme for different number of core, core configuration, and power types are different. At present mainly have three main charging scheme: linear, Buck (step-down) switch and SEPIC (booster and step-down) switch.

2.1 linear scheme

When the input voltage in big with the charger with sufficient clearance of core after opening voltage, it is linear scheme, especially 1.0 C fast charging current than 1 A big too much. For example, MP3 players usually only one core, capacity from 700 to 1500 mAh differ, full charge voltage is open 4.2 V. MP3 player power is usually the AC/DC adapter or USB interface, the output is the rule of 5 V; At this time, the linear scheme is the most simple, most charger of the efficiency of the scheme. Figure 2 shows for lithium ion/polymer battery solution linear scheme, basic structure and linear voltage neat device.

linear scheme charger application examples-double input Li + charger and intelligent power source selector MAX8677A

MAX8677A is double input USB/AC adapter linear charger, built-in Smart Power Selector, used for rechargeable single quarter by Li + batteries portable devices. The charger integration of the battery and the external power source and load switch charging all the power switch, so that no external MOSFET. MAX8677A ideal used in portable devices, such as smart phones, PDA, portable media players, GPS navigation equipment, digital camera, and digital cameras.

MAX8677A can work in independent USB and the power input AC adapter or two input either one of the input. When connecting external power supply, intelligent power source selector allows the system not connect battery or can and depth discharge battery connection. Intelligent power source selector will automatically switch to the battery system load, use the system did not use the input power supply parts for battery, make full use of limited USB and adapter power supply input. All the needed electric current detection circuit, including the integration of the power switch, all integration in the piece. DC input current highest limit can be adjusted to 2 A and DC and USB input all can support 100 mA, 500 mA, and USB hung mode. Charge current can be adjusted to as high as 1.5 A, thus support wide range of battery capacitive. Other features include MAX8677A thermal regulation, over-voltage protection, charging status and fault output, power supply good surveillance, battery thermistors surveillance, and charging timer. MAX8677A using save a space, hot enhanced, 4 mm x 4 mm, 24 of the pins TQFN encapsulation, regulations, work in exceptional temperature range (40 ~ + 85 ℃).

2.2 Buck (step-down) switch scheme

When A 1.0 C of the charging current more than 1 A, or the input voltage of the core than with high voltage open many, Buck or step-down plan is A better choice. For example, based on the hard drive in the PMP, often use single core lithium ion battery, the full of open is 4.2 V voltage, capacity from 1200 to 2400 mAh range. And now PMP is usually use the car kit to charge, its output voltage in a 9 V to 16 between V. In the input voltage and battery voltage is the voltage difference between high (minimum 4.8 V) will make linear scheme lowers efficiency. This kind of low efficiency, plus more than 1.2 A 1 C fast charging electric current, have serious heat dissipation problems. To avoid this kind of situation, will the Buck scheme. Figure 3 for lithium ion/polymer battery charger scheme Buck diagram, basic structure with Buck (step-down) switching voltage regulators completely the same.

2.3 SEPIC (booster and step-down) switch scheme

In some use of three or four lithium ion/polymer core series equipments, charger of the input voltage is not always greater than the battery voltage. For example, laptop computers use 3 core lithium ion battery, full charge voltage is open 12.6 V (4.2 V x3), capacity is 1800 mAh to 3600 mAh from. Power supply input or output voltage is 1 6 V AC/DC adapter, or is car kit, the output voltage in a 9 V to 16 between V. Apparently, the linear and Buck solutions are not for this group of batteries. This is about to use SEPIC scheme, it can in the output voltage is higher than when the battery voltage, can be in the output voltage less than when the battery.

3, and power detection algorithm is proposed

Many portable products use voltage measurements to estimate the remaining battery power, but the battery voltage and surplus power relationship but will with the discharge rate, temperature and battery aging degree of change, make this kind of method can top 50% margin of error. The market for longer to use product demand unceasingly strengthens, so the system design personnel need more accurate solution. Use capacity check plan come to measure battery or consumption of electricity, will be in a wide range of application power to provide more accurate estimate of the battery power.

3.1 power detection algorithm is one of the examples of application, function complete list, double the battery portable battery application design

power detection principle. Good capacity check plan at least to have battery voltage, temperature and battery electric current, measuring method; A micro 9 a; And a set of and the verification of the punishment power detection algorithm is proposed. Bq2650x and bq27x00 is full capacity check program function, with a measuring voltage and temperature of the digital converter (ADC) and a measuring electric current and charging sensor the asp. These capacity check plan also has a microprocessor, is responsible for the implementation of the Texas instruments power detection algorithm is proposed. The algorithm can compensate the lithium ion battery life.low self-discharge, aging, the temperature and discharge rate, and other factors. Chip embedded microprocessor as host system processor save these calculation burden. Capacity check program can provide remaining power state information, bq27x00 series products also offer surplus can Run Time (Run Time to Empty) host may at any Time to capacity check plan these information query, then LED indicator light through or displays will inform the user battery. Capacity check meter is very easy to use, the system processor need only configuration 12 C or HDQ communication drive can.

The battery circuit description. Figure 4 (a) can be used for identification of IC functions with typical application circuit batteries. According to the use of IC testing program is different, the battery needs to have at least three to four outside the terminal.

VCC and BAT pins will even to the battery voltage, so that for, C power and the battery voltage measurement. The battery is connected a grounding resistance smaller detection resistors, let capacity check meter high impedance SRP and SRN input can monitor sensor resistance on both ends of the voltage. Through testing the current flows through a resistor can be used to judge the battery or release the amount of electricity. Designers choose detection resistance value must be considered when resistance on both ends of the voltage can't more than 100 mV, low resistance may be more hours in current errors. Circuit board layout must ensure that SRP and SRN to testing from as close as possible to the connection of the resistor sensor resistance end; In other words, they should be the Kelvin attachment.

HDQ pin need external and resistors, this resistance should be located the host or the main application, such capacity check plan to the battery and portable devices when sleep function enable connection broken. Advice and resistance choose 10 k Ω.

battery identification. A low cost WeiMao batteries are getting more and more serious, these cells may not contain OEM requirements of security protection circuit. So, genuine battery may contain figure 4 (a) shows the appraisal circuit. When to identify the battery, the host to contain IC (bq26150, the function is cyclic redundancy check (CRC)) issued the battery packs a ask value (challenge), the CRC will contain battery according to this inquiry value and, in the building of the IC in CRC polynomial calculation the CRC value. CRC is based on the host of command and IC secret in the query of the definition of the CRC polynomial completed, the host in CRC values calculated with the calculation result of well battery comparison to identify the appraisal success.

Once the battery through the appraisal, bq26150 will issue commands to ensure that the host and quantity test plan of material lines between normal communication. When the battery connection interruption or to connect, the whole the identification process will be repeated again.

double the battery application. Figure 4 (b) for use bq26500 support double the typical application of lithium ion battery circuit. In order to support more battery, and this circuit is adding a adjustable regulators. Capacity check millions of BAT pin and the bottom of a battery anode linked to complete the variable voltage measurement of the battery.

Host to be able to read capacity check plan of variable voltage measurement battery, to make sure the end of discharging threshold and charging terminate threshold. As for the remaining state power (RemainingStateofCapacity), do not need to read can use directly.

The above bq2650x and bq27x00 etc capacity check plan provides the battery manufacturer a simple to use options, this scheme L [just measuring battery voltage to be precise, so these capacity check plan can be applied to various battery framework, and can support the battery identification and double the battery application '

3.2 power detection algorithm is an example of applications another, can apply to all kinds of general voltmeter new IC.

Today's many manufacturers can provide a variety of voltmeter IC,, the user can choose the suitable function device, to optimize the product price. Use voltmeter measurement of storage battery parameters, the separate architecture allows users in the host custom power measurement algorithm within. Eliminating embedded processor battery cost. On this to Dallase semicconductor company called cases of DS2762 chip for typical analysis. A new separate voltmeter IC, its structure see chart 5 (a) below.

DS2762 application characteristics

DS2762 is a single quarter of lithium battery voltmeter and protection circuit, integrated into a tiny 2.46 mm x 2.74 mm inversion of packaging. Due to internal integration for power detection of high precise resistance, this device is very save a space. It is the small size and incomparable high level of integration, for mobile phone battery and other similar handheld products, such as PDA, etc, are all very ideal. Integrated protection circuit continuously monitoring the battery voltage, over voltage and flow fault (charging or discharge period). Different from the independent protection IC, DS2762 allow main processor surveillance/control protection FET conduction state, such, can DS2762 through the protection of the power system and the control circuit implementation. DS2762 can also charge a battery consumption has depth, when the battery voltage within three V, provide a limit of the charging current recovery path.

DS2762 accurate monitoring battery current, voltage and temperature, the dynamic range and resolution of common satisfy any mobile communication product testing standards. The measurement of current for internally generated when the integral, realize the power measurement. Through the real-time, continuous automatic disorders correct, the precision of power measurement can be increased. The built-in measuring resistance due to eliminate manufacturing process and temperature and cause resistance change, further improve the precision of the voltmeter. Important data stored in 32 bytes, can add the lock EEPROM; 16 bytes of SRAM are used to keep dynamic data. And DS2762 all communication all through the 1-Wire, more communication interface node, minimize the battery and the connection to the host. Its main features for; Single quarter of lithium battery protector; High precision current (power measurement), voltage and temperature measurement; Optional integrated 25 m Ω measuring resistance, each DS2762 after fine-tuning alone; 0 V battery restore charge; 32 bytes can lock EEPROM, 16 bytes SRAM, 64 a ROM;

1-Wire, node, digital communication interface; Support more battery power management, and through the protection system control FET power; Dormancy mode power supply current only 2 µ A (most); Work mode power supply current for 90 µ A (most); 2.46 mm x 2.74 mm inversion of packaging or 16 feet SSOP package led, and both are can choose with or without detection resistance; After has with e

2011-08-30

キーボードリマップ 2011_08_29_

AutoHotKey・KeySwap・Atok2005を使った

また、これは AutoHotkey.ahk (AutoHotkey設定ファイル) 自身でもある。

なお、Atokでのキーボードリマップは、以下の通り。

ATOKプロパティ  =>キーローマ字・色 タブ =>キーカスタマイズ 

ここから

────────────────────

; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a

; semicolon, such as this one, are comments. They are not executed.

; This script has a special filename and path because it is automatically

; launched when you run the program directly. Also, any text file whose

; name ends in .ahk is associated with the program, which means that it

; can be launched simply by double-clicking it. You can have as many .ahk

; files as you want, located in any folder. You can also run more than

; one ahk file simultaneously and each will get its own tray icon.

; SAMPLE HOTKEYS: Below are two sample hotkeys. The first is Win+Z and it

; launches a web site in the default browser. The second is Control+Alt+N

; and it launches a new Notepad window (or activates an existing one). To

; try out these hotkeys, run AutoHotkey again, which will load this file.

#z::Run www.autohotkey.com

^!n::

IfWinExist Untitled - Notepad

WinActivate

else

Run Notepad

return

; Note: From now on whenever you run AutoHotkey directly, this script

; will be loaded. So feel free to customize it to suit your needs.

; Please read the QUICK-START TUTORIAL near the top of the help file.

; It explains how to perform common automation tasks such as sending

; keystrokes and mouse clicks. It also explains more about hotkeys.

; ! → Alt

; ^ → Control

; + → Shift

;────AutoHotKey.ahk のキーボードリマップ 2011_08_29_

; 変換 = IME ON (日本語)  =>Atok機能で実現

; 無変換 = IME OFF (英語)  =>Atok機能で実現

; カタカナ = F7  =>KeySwapで実現

; CapsLock = F10  =>KeySwapで実現

; 右Alt = Home  =>KeySwapで実現

; 右Ctrl = End   =>KeySwapで実現

; その他はAutoHotKey機能で実現。

;vk1D::return ;無変換キー単体で動かないようにする

;RShift::^z ;右Shift で Ctrl+z

;SC07B & Space::send,{Blind}{Enter} ;無変換+Space で Enter

;SC07B & j::send,{Blind}{Home} ;無変換+j で Home

;SC07B & k::send,{Blind}{End} ;無変換+k で End

;SC07B & h::send,{Blind}^{Home} ;無変換+h で Ctr+Home

;SC07B & l::send,{Blind}^{End} ;無変換+l で Ctr+End

;SC07B & u::send,{Blind}{} ;無変換+u で

;SC07B & i::send,{Blind}{} ;無変換+i で

;SC07B & LButton::send,{Blind}{Home} ;無変換 + LButton でHome

;SC07B & RButton::send,{Blind}{End} ;無変換 + RButton でEnd  =>Ctrlと組み合わせ可。

;SC07B & y::send,{Blind}^{ } ;無変換+y で Ctr+

;SC07B & o::send,{Blind}^{ } ;無変換+o で Ctr+

;SC07B & w::send,{Blind}{Home} ;無変換+w で Home

;SC07B & r::send,{Blind}{End} ;無変換+r で End

;SC07B & e::send,{Blind}{Up} ;無変換+e で Up

;SC07B & d::send,{Blind}{Down} ;無変換+d で Down

;SC07B & f::send,{Blind}{Right} ;無変換+f で Right

;SC07B & s::send,{Blind}{Left} ;無変換+s で Left

1::+1 ;1 を Shift+1 に(記号にする)

2::+2 ;2 を Shift+2 に

3::+3 ;3 を Shift+3 に

4::+4 ;4 を Shift+4 に

5::+5 ;5 を Shift+5 に

6::+6 ;6 を Shift+6 に

7::+7 ;7 を Shift+7 に

8::+8 ;8 を Shift+8 に

9::+9 ;9 を Shift+9 に

0::+- ;0 を Shift+- に

\::+\ ;\ を Shift+\ に

;──────────────────── http://nanabit.net/softwares/autohotkey/

; Alt+F6 (例:2011_08_04_)

; Ctrl+F6 (例:03:48)

; Alt+Ctrl+F6 (例:2011_08_04_16:45)

!F6::

Send, %A_YYYY%_%A_MM%_%A_DD%_

return

^F6::

Send, %A_Hour%:%A_Min%

return

!^F6::

Send, %A_YYYY%_%A_MM%_%A_DD%_%A_Hour%:%A_Min%

return

2011-05-30

バグ入りプログラムコンテストでも

したくなってきた。なんかこう、例の「バグ放置なだけで犯罪騒動」で。

#include <stdio.h>
int main(int *argc[]){
  double a=1;
  double b=0;
  printf("print %f * %f = %f",a, b, a/b);
  return 0;
}

だが俺には才能がないのでなげやり。なんというヘタレ。というかc言語文法チェックをcodepadでやろうと思ったらサイトにつながんない…。たぶんどっかでヘタこいててコンパイラ通らないと思う。

追記:Floating point exception食らってたので修正。

2011-03-01

中華ヒップホップ音楽

日本中国ヒップホップなどを聴くことはあまりないので、何曲かまとめました

中華ヒップホップ音楽【作業用BGM】 ‐ ニコニコ動画(原宿)

以下曲目。

01. 大丈夫 - YouTube

日華 a.k.a. NYCCA (日本)

V.O.W. -Victory Over War- (2007)

広東語日本語英語普通語を操る日華の曲(でもこの曲では広東語ラップしてない)。

02. 台灣之子 - YouTube

麻吉 a.k.a. MACHI (台湾)

黃立成 & 麻吉 (2003)

台湾ヒップホップの草分け、L.A. Boyzの黃立成によって結成された麻吉。台湾語ラップ

03. Hit the Rhyme - YouTube (Live ver.)

蛋堡 a.k.a Soft Lipa (台南)

收敛水 (2009)

2010年には日本JABBERLOOPアルバム「月光」(YT)を出した。同じく'10年の台湾ヒップホップダンスドキュメンタリー「街舞狂潮」主題歌(YT)も手がけてる。

04. Bring you da sky - YouTube

L.C.T (内モンゴル自治区フフホト)

龍咆 (Dragon Roar) Vol.8 (2009)

トラックは「Resurrection」Common(YT)と同ネタで、「Dolphin Dance」Ahmad Jamal (YT)から。ミックステープ「龍咆」シリーズ無料DLできる。

05. 風生水起 feat. 麥玲玲 師傅 - YouTube

農夫 a.k.a. FAMA (香港)

風生水起 (2008)

'96年DMC世界2位のDJ Tommy(YT)に見出された、6WingとC君の二人組。フューチャリングの麥玲玲は香港一有名な風水師で、本当に曲中でラップしてる。

06. 雙截棍 - YouTube

周杰倫 a.k.a. Jay Chou (台湾)

范特西 Fantasy (2001)

この10年くらい中華圏で最も人気のミュージシャンジェイ・チョウの初期の曲。雙截棍はヌンチャクの意。

07. Used to love her - YouTube

参劈 a.k.a. Tri Poets (台湾)

押韻的開始 (2008)

アルバムに収録されてる「巨蟒」(YT)は「大蛇は長くてカッコイイぜ」という歌。

08. 傻X II feat. 杨帆 - YouTube

呆宝静 a.k.a. Double.J (福州/広州)

女権運動2009 (2009)

呆宝静は広州グループ天王星 Uranus」所属。このアルバム中国女性ラッパーコンピで、無料DLできる(China Woman's Rights 2009 Mixtape)。

09. Dream Girl (Version C Kwan) - YouTube

農夫 a.k.a. FAMA (香港)

O'Fama (2010)

陳冠希(エディソン・チャン)プロデュースアルバム「O'Fama」収録。歌詞に「Facebook delete所有異性...」とでてくるのが香港っぽい。

10. 北京土著 - YouTube

張伯宏 (北京)

复生弥撒 (2007)

'88年生まれ、いわゆる80後(一人っ子政策以後の80年代に生まれた世代)の張伯宏、18歳の時の作品。

11. Learn Chinese - YouTube

Jin a.k.a. 歐陽靖 (アメリカ/香港)

The Rest Is History (2004)

アメリカ生まれの中国人ラッパーアルバムABC」(American Born Chinese)は、2010年アジア系で史上初の全米1位を取ったFar East Movement(YT)が全曲プロデュース

12. 在梅邊 - YouTube

王力宏 a.k.a. Wang Leehom (アメリカ/台湾)

蓋世英雄 Heroes Of Earth (2006)

日本人っぽく「おうりき・ひろし」とも読める。前作「心中日月 Shangri-Laから西洋中華音楽をミックスするChinked Outスタイルで、京劇などを取り入れている。

13. 在北京 - YouTube

隠藏 a.k.a. Yin Ts'ang (北京)

為人民服務 Serve The People (2003)

中国人+カナダ華僑+アメリカ人*2の4人組、隠藏の一曲。メンバーの老郑XIVとSbazzoはソロでも色々と活躍している。

14. 激光中 - YouTube

廿四味 a.k.a. 24Herbs (香港)

2009

Roman Tam(羅文)のヒット曲「激光中」(YT)のリミックス。「廿四味YaSeiMei」は24種類の漢方が入っているお茶(廿=20)。

15. 含家玲 (Live ver.) - YouTube

LMF a.k.a. Lazy Mutha Fucka (香港)

大懶堂 (2000)

香港ヒップホップ・シーンを築いた伝説グループLMFの問題作。含家玲は広東語のかなりキツイ罵倒語

16. 韓流來襲 - YouTube (Live ver.)

Mc HotDog a.k.a. 熱狗 (台北)

テレビには韓国セルアウトばっかりじゃねえかという曲。サビはFuck You的な放送禁止フレーズ

17. 中国話 - YouTube

S.H.E (台湾)

Play (2007)

台湾の人気女性アイドルグループの曲だが、「世界中国語を学んでいる」みたい歌詞媚中(大陸に媚びてる)と一部から批判を浴びた。

18. 恭喜發財 - YouTube

顏社 a.k.a. KAO! INC. (台湾)

2007

蛋堡 Soft Lipaの所属するレーベル謹賀新年曲。「恭喜發財」は「おめでとう、今年も儲かりますように」という中国っぽい新年の決まり文句。

19. 咖哩辣椒 - YouTube

潘瑋柏 a.k.a. Wilber Pan (台湾/アメリカ)

我的麥克風 Pass Me The Mic (2003)

弦子との不得不愛(YT)がヒットして、NHK中国語講座主題歌になったりした人。

20. 廣東菜 - YouTube

講者,MC仁 (広州/香港)

2009

講者は広州グループMC仁はLMFのメンバー。サビで「ホウメイ」といっているのは広東語の「好味」。

21. 北京晚报 - YouTube

阴三儿 a.k.a. In3 (北京)

未知芸術家 (2008)

カメレオンの如く舌を「er」と巻く北京弁の感じがよく分かる。

22. 霞飞路87号 - YouTube

黑棒 a.k.a. Hi-Bomb (上海)

嘻哈第一棒 (2004)

上海語ラップMVがイカしてる。

23. 我是重慶崽儿 - YouTube

潤土 (重慶)

瘋狂的石頭 Crazy Stone O.S.T. (2006)

映画「瘋狂的石頭」エンディング曲。内容は「Snatch」のパクリたいなもんですが、北京上海はな地方都市の雰囲気や、現代中国の笑いが詰まってて最高です

2011-02-10

http://anond.hatelabo.jp/20110209221517

Cの場合は使わないからだろ。関数内に関数

というか、Cの場合関数粒度を気にすることが多いからね。

再帰関数 > ループでかけ

たいな感じで、関数コールを嫌う文化からなぁ突き詰めると。

そういう事をしようと思わない。別な書き方をするとかじゃなかろうか?

 

いちおう、C++ならクラス内にクラスは書けるから似たような事はできる。

 

C/C++文化的に速度とメモリ重要視する言語からあんまりね、そう言うのは主流じゃないと思う。

class A{

private:

 int A:

public:

 void set_A(int &a){

  A=a;

 }

}

たいなことも・・・あまり、おすすめできないし・・・。論理的には美しいんだけど・・・いろいろ弊害もあると考えるのがC/C++

ましていわんや、関数内。

※一番痛いのは、設定関数が1箇所なので、動作変更がすぐできる>>大規模システムではコードカバレッジがあるので、

根元の関数の挙動を大きく変えられたら、上位のクラスの莫大なテストやり直しだから、1箇所変更で全箇所変わるのはデメリットw。上位で修正が基本。

というか、やっちゃだめwww。

たとえば、intをdoubleにとかなら、それもう別物だから、上位も変更でしょ。普通・・・。とか。

 

あと#define関数デバッガーでおえないので、なるべくC++コンパイラ通してinlineで書いてぇぇぇぇとか。色々。むしろ#defineで複雑なことしないで

2011-01-04

http://anond.hatelabo.jp/20110104182322

国政選挙立候補する資格、だよね?

国政選挙ハードさに比べれば、学士修士double majorぐらい楽勝だと思うのだが。まぁ、衆院補選のお手伝いし経験ないので何とも言えないけど。

立志伝みたいな人(○○の創業者)みたいな人だって選挙準備として3年ぐらいの勉強はしてほしいな。学卒なら異分野の修士取ればいいだけだし。修士の中では比較ハードな、MBA(経営学修士号)だって働きながら取ってる人いくらでもいるよ?

本当の本当に「底辺」な人が「国政選挙」に出て、受かって、何かを成すことを期待するのであれば、奨学金を獲得できるぐらいの運と実力を期待しても良いと思う。逆に、高等教育はどんなに金がなくても実力とポテンシャルさえあれば受けられるような制度を整える必要があるよね。

追記:

「学を修める」ということはほぼ「議論のやり方を修める」ということと等しいという理解と、「今の国会で行われているカケヒキは『事実にもとづいた議論』になってない」つまり「国会議員は議論のやり方を知らない(人が多い)」という推論、そして「事実にもとづいた議論により政治はもっと良くなる」という信念から上のようなボトムラインを考えちゃいます。議論のやりかた(ディベートのやりかたや交渉術はなく、factの前に謙虚姿勢)って自然に身につくものじゃないからね。

http://anond.hatelabo.jp/20110104161742

現状と何も変わらないのであれば、かけるお金が「(議員候補の)教育」になる分マシかな、と思う。

主婦代表とかわけのわかんない奴に議員として出てきて欲しくない。教育が不十分な奴は投票だけしてりゃいいんだよ。

まぁ、そのへんの主婦がいがいといい所の大学出てたりするので、主婦から云々、じゃなくて資格試験ってのは同意。

歴史地理外交(軍事)・マクロ経済理論マクロ経済応用・法律公衆衛生治安流通都市工学土木工学管理工学MOTあたりから3種類の学士相当の教育か、修士学士で領域の違うdouble majorか、あるいは単独の領域でも良いか博士号取得者。あるいは会計士弁護士・一級建築士あたりの上級士業の資格を持ってればok。

ハードル上げすぎかな…。

2010-10-26

Double Irish" and the "Dutch Sandwich

http://www.bloomberg.com/news/2010-10-21/google-2-4-rate-shows-how-60-billion-u-s-revenue-lost-to-tax-loopholes.html

今年の流行語はこれで決まりそうである。"Tea Party"は、選挙で使われすぎてガス抜きされているので、実績はあるが勢いが無い。

そして、ダブルアイリッシュにダッチサンドイッチ脱税手法に関する単語なので、風刺的に飲食店のメニューに取り込まれて話題になり易い。

アイルランド企業間取り引きでは、法人税が2.4%にまで引き下げられるという事を利用して、多国籍企業利益を、アイルランドに二つの法人でっち上げて、企業間取り引きを装って利益移転を行って節税するのが、ダブルアイリッシュ。この利益を、EU企業間とタックスヘイブンへの租税条約に例外事項があるオランダを通過させて、タックスヘイブンに飛ばして、法人税率を0%にするのが、ダッチサンドイッチである。

単純にタックスヘイブンに飛ばすと脱税になるが、こういった小細工を使う事で、合法的に節税が可能になる。

多国籍企業にとって、国家国民は単なる市場でしかなく、共存共栄する為の関係は構築できないという事であろう。法人税が高いと苦情を言っているうちはまだマシで、税を支払う価値が無いと判断した時点で、企業多国籍企業化して法人税を支払わなくなるのである。

凡人を何十人集めて会議をしても、良くて平凡な結論、普通は、メンツと私利私欲と無知無能をさらけ出したマヌケな結論しか出てこない。

民主主義は、独裁制や寡頭制が、最初は有能な人が始めても時が経てば老いて耄碌するし、後継者が有能であるとは限らず、凡人が凡人であることを自覚せずに権力を私し始めたときに、それを抑制し止めさせるには流血の革命を経なければならないという失敗を繰り返してたどり着いた結論である。

あらゆる情報を公開し、意見を広く求め、時間をかけて結論を醸成しなければ民主主義とは言えない。複雑怪奇制度をつくり、専門家でなければわからないようにして大衆の目から隠し、専門家としての職業の安定を作り出しても、それで最大の利益を得るのは、

その制度の穴を突いて法人税を0%にするサービス提供するような悪党とそれで税を支払わずに済ませる多国籍企業であり、

損をするのは、多国籍企業市場を荒らされて廃業に追い込まれる民族企業と税収を得られずに財政赤字を増やす政府

そして、その最終的な負担は、雇用を奪われた上に、財政赤字の負担を背負わされる人民だ。

2010-02-25

世界中ネットでキムヨナの不正が疑われている!」というけれど

どこの話なんだろうか?

「Kim Yu-Na」で検索して昨日のことに関するいくつかの記事を探した。次の四つの記事を見つけた。

しかし一番目のサイトでふれられているぐらい。

But at least one veteran skater, former Canadian medallist Elvis Stojko, suggested that Kim's marks were too high. He noted that Asada had successfully landed a triple Axel - she's the only woman who executes them regularly in competition - and got fewer marks than Kim's easier triple Lutz.

The argument is similar to the one over whether American Evan Lysacek should have won the gold medal without having landed a quad like his competitor Evgeni Plushenko.

"Yu-Na Kim is way too far ahead. I don't agree with that," said Stojko. "She skated great. Don't get me wrong, she's awesome. But for Mao to do an awesome triple Axel like that, a triple [Axel] is worth way more than a triple Lutz, triple toe."

http://www.ctvolympics.ca/figure-skating/news/newsid=50985.html

でもコメントでは批判されている。

Stojko is WRONG again! I can't believe how he's embarassing himself with his commentary. Asada's triple Axel-double toe combo is worth LESS than Kim's triple Lutz-triple toe combo. In fact for the GOE(Grade of Execution), Asada only received .60 extra for ther opening combo last night whereas Kim received 2.00 bonus for her's.

cw_pianoman22@yahoo.ca

triple axel itself does have higher score than triple lutz, but Mao combined it with double toe loop while Yuna Kim's combination was triple-triple. And she executed it way better than anyone else. Just doing one difficult jump doesn't make a great skater. How you do it also matters. Yuna Kim's program is higher difficulty overall, therefore has higher basic score than anyone else's program. And she got higher execution mark for the quality. If Stojko wants to see more jump, he can go to Cirque du soleil. Stop insulting a quality program and great effort of other athlets.

hohoho323

まじめに全部読んだ訳じゃないから絶対という訳ではないけど、コメント欄でStojkoの意見に賛成する人はいなかったはず。他の記事では不当に得点が高いと書かれていなかったはず。

ただ外国2ちゃんねるのようなところでは違うかもしれないと思って、4chanを見てみたのだが全く話題になっていなかった。そこでずばり「Kim Yu-Na bribe(=賄賂)」でググってみた。で、見つけたのがこれ。

Korean newspapers report on the internet proxy wars that are going on between Japan and Korea, through Kim Yuna and Asada Mao.

http://www.newdaily.co.kr/html.....41244.html

http://news.chosun.com/site/da.....p;Dep3=top

These describe how Japanese netizens are behaving. Some were noted for their wishing and rambling “fall fall, roll over, fall fall, trip and fall and roll over” during Kim Yuna’s performance. Once Kim’s score was announced, the Japanese internet sites exploded with comments of Koreans bribing the judges and buying the competition. The report in Chosun’s article noted how Korean netizens were taking the high road.

This is why I don’t watch nor care about this sports. Not only is it boring to watch, the overt nationalism on both sides of the sea dirties up the sports.

cm

http://www.rjkoehler.com/2010/02/24/kim-yu-na-scores-world-record/

どちらかというと日本ネチズンを批判するもの。まぁ、韓国系のブログだから不正採点とか騒いでいる人たちには意味がないけど。日本系のだと見つからなかったけど、去年のものがあってそれが興味深かった。去年というか半年ぐらい前にもあったのかという点に驚き。2ちゃんねるも知ってるブログなのだけど、コメント欄ではあきれられてる。

I must agree with you that some of the feuds between Korea/Japan/China indeed stem out of pure hatred and unjustified bias, resulting in posting videos like this that are obviously made of 100% malicious intent.

fracturedcow

Nationalism is a form of brain damage.

William George

個人的には日本の一部のネチズン世界的に迷惑をかけて申し訳ないと感じる。

キムヨナの不正が疑われているってどこの話なの。

2009-10-15

Javaが好きになれない10の理由

  1. メモリ管理がほぼVM任せ
  2. デストラクタが無い
  3. テンプレートが無い
  4. プリミティブ型とか参照型とか混乱の元
  5. friendが無い
    • friendが無いと最高位の蜜結合単位が無くなってしまう
    • 机上の単位PGでの表現単位は必ずしも1-1対応である必要は無いはず
  6. mainもclass内部
  7. キャスト構文がわかりづらい
    • Cも同じく
    • でも、C++のはちと面倒……もっと略せなかったのだろうか
  8. ファイル名とclass名、パッケージ階層ディレクトリ階層の関係マジウザイ
  9. 拡張for文は素直にforeachで良かったと思う
    • C++も同じく
  10. 何より、素直にアップデートするとJRE増殖するのが酷すぎる

2009-09-27

日本国債デフォルトは単なる可能性ではなく、だんだん現実味をおびてきている。

 

日本の日は沈むか?」 ジョナサンラング

 

一部識者によると日本国債デフォルトは単なる可能性ではなく、だんだん現実味をおびている。日本を救うことはできるのか?

 

多くの投資家にとってそのような悲観的なシナリオはばかげていると感じられるかもしれない。しかし日本経済は1990年以降、ずっと低迷している。(中略)それ以降、日本政府は巨額の景気刺激策を実施した。そしてそれが巨大な構造財政赤字をつくり上げた。日本国家負債GDPの217%であり(上の表参照)、アメリカの81.2%、G20の72.5%より大きい。今後40年の間に日本人口は20%減少し、就業年齢の人口は41%も減少すると予想されている。

もちろん、日本が深刻な問題に直面するだろうという議論には反論もたくさんある。日本負債比率は高いが、その95%は円建てであり、国内での借金である。日本の貯蓄水準は高いので、アメリカのように中国日本人のお世話になることはない。また日本債券の多くは日本政府の機関や政府関連の投資主体によって保有されているので債務は二重に勘定(double count)されている。

日本の10年債の金利は1.3%に過ぎない(アメリカは3.4%)ので利払い負担は比較的小さい。リチャード・カッツによれば日本の利払い負担額は現在過去20年で最低となっている。

 

カッツによると「弱気筋はアルマゲドンシナリオを唱えているが、日本が急激に危機に陥る可能性は低い。日本は1兆ドル外貨準備があるし、貿易収支も黒字を保っている。」

 

しかし日本が改革できる可能性に関しては疑問の声を挟む向きもある。ハーバード大学ケネディー・スクールウイリアムオーバーホルトは日本デフォルトは単なる可能性ではなく、だんだん現実味をおびつつあるとしている。彼によると「日本負債は今後も増加することが運命づけられている。なぜなら年金の積み立て不足や市町村財政破綻の面倒を国がみなくてはならないことは確実だからだ。」

日本投資家センチメントがこれまでの落ち着いたものから急激に悲観へと転ずる転換点にどんどん接近している。日本国債は世界経済歴史で最大級のバブルだったということが判明する羽目になりかねない。」

ゴールドマン・サックスの山川氏は最近レポートの中で日本国債金利が名目GDP成長率に比べて恒常的に高くなるリスク警鐘を鳴らしている。これは雪だるま式政府の利払い負担が増える結果になりかねない。民主党景気刺激策の影響もあって日本財政赤字はGDPの10%を超える状態が向こう3年くらい続く可能性もある。「これが財政破綻につながるリスクもある」とゴールドマンレポートは書いている。

 

20年近い景気の低迷とデフレの中で日本人口は今後かなり激しい減少を見ると予想される。(上のグラフで赤を参照)

また、就業年齢の人口の減少は全体の人口の減少より早いペースになる。

日本伝統的に移民政策に対して抵抗感をもっているので、人口減と相まってGDP成長をねん出するのはどんどん難しくなる。

 

日本政府競争力のある産業プロモーターという役割から負け組産業保護者という立場にかわりつつある。」

http://gaikokukabuhiroba.blogspot.com/2009/09/blog-post_27.html

2009-08-12

http://anond.hatelabo.jp/20090812142426

やっと書き込みエラーが出なくなった。

はてな記法のcppを使うとなぜか正常に書き込めないようだ。意味わからん。

今さらだけど、普通に考えて

#define NUM_LOOP 10000

int d1 = Timer();

for(int i=0;i<NUM_LOOP;i++){</p&gt;

f1();

}

d1 = Timer() - d1;

int dfor = Timer();

for(int i=0;i<NUM_LOOP;i++){</p&gt;

}

dfor = Timer() - dfor;

double dtrue = ((double)(d1 - dfor))/NUM_LOOP

とかすればマシになるんじゃないの?他の人も書いてるけど。

その他誤差が気になるんだったら適当統計処理でもして推定すればいいし。

2009-05-13

Eメール

The Slate Group is proud to announce the launch of Double X, Slate's magazine for women.

うるせえ!

俺は男だよ!

性別くらい登録しといただろうが! 多分。

2009-04-22

Xbox360PS3で新規IPはどれほど成功しているのか?

なんとなく新規IPどんくらい立ち上がってんだろう?って思って調べてみた。

拾えたデータ2008年11月時点のやつなんでだいぶ古いけど。


成功のバロメーターとしてワールドワイドミリオン超えたソフトを探して見た。PS3XBOX360ブログ(仮)さん(http://gameblog150.blog94.fc2.com/blog-entry-223.html)よりお借りしました。


単位は1=100万

PS3


1. Grand Theft Auto IV— 4.8

2. Call of Duty 4: Modern Warfare— 3.7

3. Motorstorm,— 3.6

4. Metal Gear Solid 4: Guns of the Patriots— 3.4

5. Resistance: Fall of Man— 3.2

6. Assassin’s Creed— 2.9

7. Gran Turismo 5 Prologue— 2.2

8. Uncharted: Drake’s Fortune– 1.9

9. Pro Evolution Soccer 2008— 1.6

10. Guitar Hero III: Legends of Rock— 1.6

11. FIFA 08— 1.6

12. Ratchet &amp; Clank Future: Tools of Destruction— 1.4

13. Need for Speed: ProStreet— 1.4

14. Devil May Cry 4— 1.3

15. Heavenly Sword— 1.2

16. FIFA 09— 1.1

17. WWE Smackdown vs Raw 2008— 1.0



Xbox360


1. Halo 3— 8.4

2. Call of Duty 4: Modern Warfare— 6.6

3. Grand Theft Auto IV— 6.2

4. Gears Of War— 5.3

5. Forza Motorsport 2— 4.1

6. Assassin’s Creed— 4.0

7. Guitar Hero III: Legends of Rock— 3.5

8. Elder Scrolls IV: Oblivion— 2.6

9. Marvel: Ultimate Alliance— 2.5

10. Madden NFL 08— 2.4

11. Guitar Hero II— 2.3

12. Call of Duty 2— 2.2

13. Tom Clancy Ghost Recon Advanced Warfighter— 2.2

14. Tom Clancy Rainbow Six: Vegas— 2.2

15. Call of Duty 3— 2.1

16. Gears of War 2— 2.1

17. Mass Effect— 2.1

18. BioShock2.0

19. Saints Row— 1.9

20. Rock Band— 1.9

21. Madden NFL 07— 1.8

22. Fight Night Round 3— 1.8

23. Dead Rising— 1.8

24. Tom Clancy’s Rainbow Six: Vegas 2— 1.7

25. Lost Planet— 1.7

26. Viva Pinata— 1.6

27. Need for Speed ProStreet— 1.5

28. Crackdown— 1.5

29. Fable II— 1.5

30. Project Gotham Racing 3— 1.5

31. Need for Speed Most Wanted— 1.5

32. FIFA 08— 1.4

33. Perfect Dark Zero— 1.4

34. Tom Clancy Ghost Recon Advanced Warfighter 2— 1.4

35. Need for Speed Carbon— 1.4

36. Army of Two— 1.4

37. WWE Smackdown vs Raw 2008— 1.3

38. Madden NFL 09— 1.3

39. Star Wars: The Force Unleashed— 1.2

40. Tom Clancy Splinter Cell: Double Agent— 1.2

41. Kane &amp; Lynch: Dead Men— 1.1

42. Devil May Cry 4— 1.1

43. Pro Evolution Soccer 2008— 1.1

44. Project Gotham Racing 4— 1.1

45. Pro Evolution Soccer 6— 1.1

46. Dead or Alive 4— 1.0

47. The Simpsons Game— 1.0


続編モノを抜いて見る。


単位は1=100万

PS3


3. Motorstorm,— 3.6

5. Resistance: Fall of Man— 3.2

6. Assassin’s Creed— 2.9

8. Uncharted: Drake’s Fortune– 1.9

15. Heavenly Sword— 1.2



Xbox360


4. Gears Of War— 5.3

6. Assassin’s Creed— 4.0

9. Marvel: Ultimate Alliance— 2.5

17. Mass Effect— 2.1

18. BioShock2.0

19. Saints Row— 1.9

20. Rock Band— 1.9

23. Dead Rising— 1.8

25. Lost Planet— 1.7

26. Viva Pinata— 1.6

28. Crackdown— 1.5

36. Army of Two— 1.4

39. Star Wars: The Force Unleashed— 1.2

41. Kane &amp; Lynch: Dead Men— 1.1

47. The Simpsons Game— 1.0


こんな感じか。

キャラモノの扱いが微妙だけど、一応続編じゃないので入れといた。

本体同梱のソフトも売り上げに含まれてるだろうけど、まぁそれは地域ごとに何が同梱されてるか調べるのメンドイからやめとく。


そこそこ新規IPが立ち上がってんだなーって改めて実感できた。

日本はどうなんだろう?

ログイン ユーザー登録
ようこそ ゲスト さん