「false」を含む日記 RSS

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

2021-04-13

anond:20210413061256

こんなにブクマ付いちゃったら辞めらんないじゃん。

Boolean 退職( int ブクマ )

{

  if(ブクマ==1)

   return( TRUE );

  else

   return( FALSE );

};

void main( void )

{

int ブクマ;

printf( "ブクマ数を入力:" );

scanf( "%d", &ブクマ );

if( 退職( ブクマ ) == TRUE )

  printf( "この度私は退職することとなりました。\n" );

else

  printf( "この度私は退職しないこととなりました。\n" );

};

2020-12-31

anond:20201230203458

日本でどうなるかは分からないが、米国では1970年代から選択夫婦別姓が取り入れられているためデータの蓄積がある。

夫婦別姓を選ぶ割合

米国では約70%が夫婦同姓を選んでいる。概ねこ割合は高く保たれてきたが、最近夫婦別姓を選ぶ夫婦が増えている。

https://surveys.google.com/reporting/question?hl=en-US&survey=tpjh7dfv56ff2&question=1&raw=false&transpose=false&tab=chart&synonyms=true&grouping=q2

※ ちなみに日本調査でも、未婚男女の3割が夫婦別姓希望していることから、同程度の割合になると予想される。

https://www.watabe-wedding.co.jp/company/press/rizokonlab/kekkontomyoji/

世帯収入について

米国夫婦別姓を選ぶ女性は「高学歴」「高収入」(「晩婚」)である傾向がある。

https://www.investopedia.com/financial-edge/0712/financial-implications-of-keeping-your-maiden-name.aspx

また男性については、「低学歴男性ほど、別姓を選んだ女性を罰する傾向がある」という調査結果がある。

https://slate.com/human-interest/2017/01/lower-educated-men-are-more-likely-to-punish-women-for-keeping-their-maiden-names.html

まり米国では、夫婦別姓を選ぶ夫婦は共に高学歴である傾向があり、世帯収入も高いと考えられる。

結婚継続

高学歴」「世帯収入の高さ」「晩婚」は離婚率を下げる因子になっている。

学歴、晩婚:https://familyinequality.wordpress.com/2015/07/17/no-you-should-get-married-in-your-late-40s-just-kidding/

学歴https://www.fastcompany.com/3058534/see-how-your-likelihood-of-divorce-changes-with-age-education-and-ethnicity

収入http://www.randalolson.com/2014/10/10/what-makes-for-a-stable-marriage/

晩婚:https://www.mckinleyirvin.com/family-law-blog/2012/october/32-shocking-divorce-statistics/

夫婦別姓を選ぶと離婚しにくい」という訳ではなく、「夫婦別姓を選ぶような夫婦は、離婚しにくい夫婦の特徴を持っている」。

出生率

出生率については、関連するデータを見つけられなかった。もし何か情報を知っていたら教えてほしい。

根拠のない推測では、子育てがよほど贅沢品にならない限り、同姓夫婦の方が出生率が高いのではないか


*****

以上のデータは、決して同姓または別姓夫婦をおとしめるものではない。

また、米国に関するデータであるから、異なる文化を持つ日本では異なる傾向を示す可能性が十分にある。

大事なことは、例え夫婦別姓/同姓を選ぶ夫婦が少数であったとしても、その選択を確保すること。そして異なる選択をした夫婦非難しないことだ。

例え早婚の離婚率が統計的に高いからといえ、若いカップル馬鹿にするのは筋違い名字選択も同じこと。

2020-12-02

anond:20201202154128

オブジェクト指向は,ゲームに例えると下のように敵クラス(金型)を作ったなら

>||

class 敵(名前, HP, 攻撃力, 防御力){

auto 名前;

auto HP;

auto 攻撃力;

auto 防御力;

auto alive=True;

}

||<

簡単にそのオブジェクトインスタンス)を複数生成できるんやで

||>

敵A = new 敵("A", 100, 10, 1);

敵B = new 敵("B", 80, 8, 5);

敵C = new 敵("C", 120, 2, 10);

||<

そこから各値にかんたんにアクセスできるから

||>

if 敵A.HP <= 0{

敵A.alive = False

}

||<

この処理で死亡処理を作れる.

2020-11-14

PHPドットを含むURLが動かない問題

正確にはPHPビルトインサーバーindex.phpなどのルーターを使っていると、URLパスに.(ピリオドドット)を含むリクエスト

cssjsなどのリソースファイルへのアクセスだと判定されて、ルーター(index.php)がパイパスされPHPが実行されない

という現象に遭遇した。

これはビルトインサーバー起動時に明示的にルーター(index.php)を指定することで回避できる。

明示的にルーター指定すると、リクエストが必ずルーター(index.php)を通るようになる。

上記対応だけだと、今度はcssjsなどのリソースファイルがほしいだけなのに、必ずindex.php呼ばれてしまい通常のファイルが取得できなくなってしまう。

https://www.php.net/manual/ja/features.commandline.webserver.php

の例3の通り、画像css,jsなどのリソースへのアクセス場合は、return false; でルータースクリプト強制停止すると、PHP処理がキャンセルされてビルトインサーバーファイルなどのリソースを返すようになる。

2020-10-24

Twitter FactCheker

ツイッターで影響力のあるアカウント根拠もなく風説を流布する時代なので

True Falseの二派に分けて根拠提示できるサイトがあったら面白いと思う

2020-09-01

anond:20200901215421

if(i<3)return true;else false;

ぐらいのこーどをかんがえても

? (i<3) true:false;

では大きく意味が違ってくる。関数コールの文は説明の都合だからじょがいするとしても if elseと ?:は全く違う。場合がある。

2020-08-21

https://togetter.com/li/1579442

true 固定は、仮だけどあとで else の方にするみたいなものだったり、

サーバサイドで js 作るときtrue/false を埋め込んだりするからなんとも言えんけどな


「(」と「t」の間にスペースあることからPHP やら Python やらのサーバサイドの処理が入ってそうな気はする



2020-07-04

/*メーカーしかしらないおまじない*/bool flag = true;

flag = false;//パッチ

if(flag){

 かなりきびしいライセンス処理

}else{

ライセンス認証パソコントラブルで失敗するお客様のための超簡易処理

}

2020-06-19

anond:20200619210452

そんなにも増えてないから何とも言えないね

https://www.google.com/publicdata/explore?ds=d5bncppjof8f9_&met_y=sp_pop_totl&idim=country:PRK:KOR&hl=ja&dl=ja#!ctype=l&strail=false&bcs=d&nselm=h&met_y=sp_pop_totl&scale_y=lin&ind_y=false&rdim=world&idim=country:PRK:JPN:VNM&ifdim=world&hl=ja&dl=ja&ind=false

2020-06-16

anond:20200616201306

これはなんだろう。

人間の脳は天然のコンピュータとでも形容できる。

TRUEでありFALSEでもある命題に直面すると、コンピュータと同じくエラーが出るのではないか

2020-05-24

anond:20200512191623

これ、なんかアンチウイルスソフトがやってるぽい

QuicAllowedってやつがfalseになってた

Quicに対応できてないから一旦無効にしとくねみたいなことっぽい

2020-05-23

anond:20200523200759

元増田ですが、第三引数falseってそんなにダメですか?

かに、MDNwebdocs見ても、やめといた方がいいって書いてあるけど

結果帰ってくるまで待たないとその後の処理が成り立たないんですよねー

2020-05-19

プログラミングセンス

認めたがらない人は多いが、プログラミングセンスである。そして、世の中のためにならないので、センスのない人はプログラミングに携わるべきではない。

ポーカーの役を判定するプログラムを書くことを考える。普通の人なら、何も考えずに以下のようなロジック実装するだろう。

これら個別の処理を関数化しておき、順番に呼び出して判定する。場合によっては、手役のオブジェクト定義しておき、強さを比較するメソッド等を作るかも知れない。

ところが、世の中にはどういうわけか、1回のループの中で

のような超複雑な処理を実装する人が存在する。

前者が後者より優れていることには、いくらでも説明が与えられる。たとえば、[wikipedia:結合度]による説明だ。後者実装は、内容結合または共通結合に分類される。明らかにワンペア判定の実装が、フルハウス判定等の結果に影響を与えている。このため、一部を修正した際に他の部分に影響を及ぼしてしまう。また手役ごとに個別テストもできない。前者ではこのようなことは起こらない。

しかし、ことの本質後者瑕疵分析ではなく、後者のようなコードを書いてくる奴は「頭がおかしい」ってことだ。そもそも彼らは物事のとらえ方が常人と異なる。だからちょっとコツを教えたところで、改善することはない。

プログラミングに限らず、世の中には物事のとらえ方が悪い意味常人と異なる奴が多い。正直、成人になって、そういう根本的な部分がズレている奴が、正常な感覚を取り戻すのはかなり難しい。そもそも、そういう奴は自分が異常だということを自覚してさえいないからタチが悪い。

いま仕事してるシステム共通ルーチン。

DBからデータを取ってきて、配列で返す処理だけど、データがなかったらなぜか空文字列を返してくる。

普通空の配列を返すよな。

せめてfalseなりnullだと思うが。

2020-03-27

楽園こちら側」の「事実に誠意を」をほぼdeepLで翻訳してみた その2

その1https://anond.hatelabo.jp/20200327214055

12 Dr. Hiroshi Nishiura is one of the few professionals of mathematical models of infectious diseases in Japan, and it is well known that his ability is outstanding. However, many people don't understand mathematical models themselves (I must confess that I can't say that I understand all of the findings because I'm not a professional of mathematical models either), so his findings and comments are easily deified. Because the contents of the mathematical model are a complete black box to many people, it makes it seem like the oracle is coming out like a shrine's oracle. Much of Japan's infection control policy relies on the Nishiura theory. So there is nothing wrong with that, but one of the problems in Japan is that there is no plan B in case plan A goes bust. Dr. Nishiura is an excellent scholar. It is not God. Hence the need to have that Plan B with the possibility of making a mistake. I am greatly concerned that bureaucrats and politicians who are prone to infallibilism will mistake science for an oracle. It is only when falsifiability is assured that science can continue to be scientific.

感想おみくじ神託が同じoracleだったので変な文章になったが直していない。

13 数理モデル演繹法活用産物である演繹法帰納法アブダクションで補完するのが、学問の基本であり、臨床医学常識である演繹法的にどんなに正しく見えても実はそれは違っていた、ということはこの業界ではよくあることなのだ。ヘーゲルマルクスのような巨大な知性でも演繹法オンリーでは間違うのである

Mathematical models are the product of deductive methods. The deductive method is complemented by the inductive or abduction method, which is the basis of scholarship and the common sense of clinical medicine. It's a common occurrence in this industry that no matter how deducibly correct it may seem, it's actually not true. Even a huge intellect like Hegel or Marx can make a mistake by deduction alone.

感想:「蓋を開けてみれば」を「実はそれは」に変更した。

14 モデルを使うな、といっているのでは決してない。ぼく自身モデルを用いて論文を書く。しかし、モデル無謬ではなく、そこには前提である仮定があり、仮定はしばしば間違っている。グラム染色活用するとは、グラム染色にできないこと、分からないことを知悉していることであり、グラム染色万能論者にグラム染色は使えない。同じことだ。英国でも数理モデル活用されているが、だからこそ英国人はその結語には非常に懐疑的で、常に反論異論が起きている。健全科学的な態度である

 I'm not saying don't use the model at all. I myself write a paper using a model. However, the model is not infallible, there are assumptions that are assumptions, and the assumptions are often wrong. Making use of Gram's stain means having full knowledge of what Gram's stain cannot do and does not understand, and Gram's stain cannot be used by Gram's stain universalists. It's the same thing. Mathematical models are also utilized in the UK, which is why Brits are very sceptical of their conclusions, and there are always counter-arguments and objections. It is a sound and scientific attitude.

感想:「前提たる仮定」がうまく訳せていなかったので「前提である仮定」にしたが、assumptions that are assumptionsになってしまった。

英国人は」がないと主語がIになってしまったので追加した。しかBritsじゃ意味違うよ。もっと正しく訳してくれない?

15 Japan's "now" is a well-controlled state of infection, which is much better than Wuhan at its worst, or Italy, Spain, France, England, or New York at the present time. The problem is that it doesn't guarantee that it will "always work".

感想特にない。便利だなあ。

16 懸念されるのは東京だ。感染報告が増えたことだけが問題なのではない。クラスター形成できない、トレースできない感染者が増えているのが問題である。そして、その陽性患者数に比べて検査数がずっと少ない。47人の感染者を捕捉するために100人未満(陽性者の検査日が不明だが、おそらくこのへんだろう)しか検査していないのは少なすぎる。

It is Tokyo that is of concern. The increase in reports of infection is not the only problem. The problem is that more and more infected people are unable to form clusters and cannot be traced. And the number of tests is much lower than that number of positive cases; it's too little that they only tested less than 100 people (the date of testing for the positives is unknown, but it's probably around here) to capture 47 infected people.

Again, it's not necessary to figure out all the infected people. However, it is troubling that the flow of infection, movement and clusters are out of sight. Therefore, the threshold for testing must be lowered in Tokyo. The threshold for testing varies with the circumstances. That's what I explained with the Korean example. Sticking to the Ministry of Health, Labour and Welfare's "standards" will lead to a misunderstanding of the phenomenon itself. Already in the Kansai region, infected people have been found with taste and smell abnormalities, and clusters have been detected from there. I would like to make more use of the athletic sensibilities of these clinicians. I'm not sure "where" in Tokyo is the barrier to lowering the number of inspections, but that barrier needs to be removed immediately.

感想:「捕捉するのに」を「捕捉するために」に変更した。多分これでいいと思う。思いたい。

アスチュートathleticになっているのはどう反応したらいいかからない。

17 This conceptual diagram that everyone is looking at - lowering the peak of the infection and shifting it to the side. This is all a product of deduction, and I don't know if it's really true. As mentioned above, the UK estimates already suggest that this is not enough. It is possible that the damage that was shifted to the side could simply be "extra-long damage".

感想特に言うことはない。便利だなあ。

18  そして、ここが肝心なのだが、ピークを下げるという理念が、「ピークを下げなければいけない」という観念になり、「ピークは下がっているはずだ」という確信になり、「ピークは起きていないんだ」という自己暗示に転じてはいけないということだ。プランAに固執する日本あるあるの失敗のパターンで、ダイヤモンドプリンセスでは「二次感染が起きてはいけない」が「起きているはずがない」に転じてノーガード下船を許してしまった。「ピークが起きてはいけない」が「ピークなんて見たくない」にならないように現実を見据える必要がある。たとえ、それが我々の見たくない不都合な真実であったとしても。

And this is the key point: the idea of lowering the peak should not become the notion that the peak must be lowered, or the belief that the peak must be lowered, or the self-implication that the peak is not happening. In a pattern of Japanese failure to stick to Plan A, Diamond Princess allowed no-guard disembarkation by changing "secondary infection should not occur" to "it can't have happened". We need to keep our eyes on reality so that "peak shouldn't happen" doesn't become "I don't want to see a peak. Even if it is an inconvenient truth that we don't want to see.

感想:mustが違う文脈で二回出てきている。よくわかるように変更したいものだ。

カギカッコがないとうまく訳せなかったので追加しているが、なぜかカッコ閉じるがいくつか抜けている。この箇所以外にも抜けがある。

19 Repeatedly. It's common knowledge in this industry that deductive methods are complemented by inductive methods. Nevertheless, PCR is often false-negative and has little power to determine the status of infection. That's why "testing everything" is so wrong. However, a serum test measuring immunoglobulin IgM and IgG would provide a more accurate picture of the "status of infection in the population. This, however, is not infallible. It is difficult to use for individual cases because it misses early infection, which is why it misses early HIV infection.Whether antibody testing is useful in individual cases remains to be tested, but it is well suited for epidemiological studies on a population basis. Roughly speaking, we can confirm whether the "infection is rampant" in Tokyo right now, or whether it's just an unfounded fear.

前例としては、ロンドンの血清検査で09年パンデミックインフルエンザが従来予測10倍起きていたことが血清検査でわかっている。抗体検査アウトブレイクのあとで事後的に行うことが多いが、慢性的パンデミックになりつつあるCOVID-19については、「今」こそが検証ポイントといって良い。

As a precedent, serology tests in London showed that the 2009 pandemic flu was 10 times more likely than previously predicted. Antibody testing is often performed after an outbreak, but now is a good time to examine COVID-19, which is becoming a chronic pandemic.

感想:「前例はあって」を「前例としては」に変えた。「前例はある。なおかつロンドンで〜10倍起きていた」になってしまたからだ。

20 英国さらアグレッシブだ。家庭で抗体検査を行い、「感染である」とわかればそれを自宅での自己隔離根拠に使おうというのだ。ロックダウンが起きている中で、検査陰性は「自己隔離不要」を意味しないため、その戦略に欠陥はある。が、考え方としては「感染全体を抑え込みたい」というもので、検討価値はあると思う。

The UK is even more aggressive. The idea is to test for antibodies at home, and if they are found to be infected, they will use it as a basis for self-isolation at home. That strategy is flawed because with the lockdown in place, a negative test does not mean "no self-sequestration". However, the idea is that we want to control the infection as a whole, and I think it is worth considering.

感想:「戦略に穴はある」を「戦略に欠陥はある」に変えた。

21 東京でどのくらいの感染が起きているか帰納法確認必要であり、有用だ。その結果がどうなるかは預言者ではないぼくには分からない。が、どんな結果が出てきても、それを受け入れ、場合によっては自説を変えて、プランBに移行することにも躊躇しない態度が科学者には必要だ。科学者は、首尾一貫していないことにかけて、首尾一貫していなければならないのだ。形式においては首尾一貫していなくても、プリンシプルプロフェッショナリズムにおいて一貫しなければならないのだ。事実に誠意を。 

Inductive legal confirmation of how many infections are occurring in Tokyo is necessary and useful. I'm not a prophet, so I don't know what the outcome will be.However, no matter what the outcome, scientists need to accept it and not hesitate to change their thesis and move on to Plan B in some cases. Scientists have to be coherent in their inconsistencies.They may not be coherent in form, but they must be coherent in principles and professionalism. Good faith in the facts. 

感想:首尾一貫という言葉を使いすぎて文章をアホっぽくしてしまったが他にいい方法が思いつかない。朝三暮四理解してくれなかった。「自説を曲げ」は「自説を変えて」に変更した。

文章はもう少し整形できると思うがとりあえずこれで。

岩田健太郎先生とDeepLに敬意を。

2020-03-20

anond:20200320111401

falseとかくと よしあしだが 0であることが保証されない

2020-03-11

PHPの標準関数

エラーデータが取れない場合falseを返す仕様になってるやつがある。

IOエラーと、IOは正常だけどデータがないって、普通は処理が別になると思うんだけど、なんでこんな仕様に決まったんだろうな。

2020-03-04

navigate.serviceWorker is undefined for firefox

プライベートウインドウじゃねーかという情報しかないけど、普通にChromeとかと一緒で window.isSecureContextが false だと使えない。

MDNの serviceWorkerのページには書かれてないけど https://developer.mozilla.org/ja/docs/Web/API/Navigator/serviceWorker

安全コンテキストでのみ使用できる現在機能 といページには記載がある https://developer.mozilla.org/ja/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts

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