ストライクゾーンがかなり広がる 手取りだとバイト時代より稼ぎが悪い 金融は結果残してるやつは人もうらやむ高給 学生時代からの友人、彼女はものすごく、ものすごく大事 社会人は案外適当にやってる バラエティ番組見てるとテレビを蹴飛ばしたくなる ”やりがい”のむなしさ ”合コン”のむなしさ
実行すると自分自身のコードを吐き出すプログラム。こういうのってなんていうんだっけ。自己複製? コード→文字列の変換のエスケープが不要になるrubyが一番作りやすくて、しくみも理解しやすいかも。 注意したところは、改行文字を直接使わないようにしたこと。そうすることで改行が機種ごとに違っても二段階以降は同じものが生成されるようになるから。あと、コードを無用に切り詰めないこと。 ruby lines = %{ print "lines = %{" print lines print "}" print lines } print "lines = %{" print lines print "}" print lines (要最後の空行) もしくは lines = %{ puts "lines = %{" puts lines.strip puts "}" puts lines.strip }
Quine の難しい点はたぶん、 自分自身を出力しようとして永久に書き終わらないよギャース クォート文字列中にクォート文字を入れられないよギャース という2点じゃないかなぁと思います。前者は変数を使えば簡単です。後者はクォート文字をエンコードできるようにしてやる、っていうのがまぁ基本的な考えかたではないかと思いますが、これは色々方法があります。一般的な作り方としては以下とかがすごくわかりやすかったです。 http://d.hatena.ne.jp/KeisukeNakano/20070814/1187070401 format 系 多くの言語で手軽に書ける…と思う。 %s で自分自身を出力できる && クォート文字列は %c で、っていうのが基本的な発想。 Ruby だと、 printf a="printf a=%c%s%c,34,a,34",34,a,34 とかが基本形。いくつか短くする
There are lots of people and places that create and collect algorithms of all types (here are a few WWW sites). Unfortunately, in building systems hardware and software, we in The Aggregate often have found it necessary to do relatively obscure low-level things very efficiently. Many of the tricks we've devised or collected either require assembly language coding or are not entirely portable when
Engineering, R&D Aerospace & Defense Chemical Engineering Control Systems Electrical Engineering Image Processing Industrial Engineering Mechanical Engineering Operations Research More... Education All Solutions for Education Finance, Statistics & Business Analysis Actuarial Sciences Bioinformatics Data Science Econometrics Financial Risk Management Statistics More... Software & Web Software Devel
証明は後回しにして、 n に具体的な数を代入してみましょう。 例) n = 6 のとき f (6) = Σd|6 g (d) = g (1) + g (2) + g (3) + g (6) f (3) = Σd|3 g (d) = g (1) + g (3) f (2) = Σd|2 g (d) = g (1) + g (2) f (1) = Σd|1 g (d) = g (1) となるので、g (1)、g (2)、g (3)、g (6)について解くと、 g (6) = f (1) - f (2) - f (3) + f (6) g (3) = -f (1) + f (3) g (2) = -f (1) + f (2) g (1) = f (1) これを利用して、 Σd|6μ(d) f (6/d) = μ(1) f (6/1) + μ(2) f (6/2) + μ(3) f (6/3) +
この項目では、数論的メビウス関数について説明しています。組合せ論的メビウス関数については「隣接代数 (順序理論)」をご覧ください。 メビウス関数(メビウスかんすう、英: Möbius function)は、数論や組合せ論における重要な関数である。メビウスの輪で有名なドイツの数学者アウグスト・フェルディナント・メビウス (August Ferdinand Möbius) が1831年に紹介したことから、この名が付けられた。 0 を含めない自然数において、メビウス関数 μ(n) は全ての自然数 n に対して定義され、n を素因数分解した結果によって -1、0、1 のいずれかの値をとる。 メビウス関数は次のように定義される(ただし 1 は 0 個の素因数を持つと考える): μ(n) = 0 (n が平方因子を持つ(1以外の平方数で割り切れる)とき) μ(n) = (-1)k (n が相異なる k
This site contains resources to help you debug stuff — mostly software and electronic hardware, but other stuff, too. We’ll publish and link to advice and stories about any kind of debugging or troubleshooting, including cars, furnaces, plumbing, and even human bodies. (Disclaimer: We are not doctors, and don’t even play them on TV. Consult your physician about any health problems. If your phys
In computer science, the Rabin–Karp algorithm or Karp–Rabin algorithm is a string-searching algorithm created by Richard M. Karp and Michael O. Rabin (1987) that uses hashing to find an exact match of a pattern string in a text. It uses a rolling hash to quickly filter out positions of the text that cannot match the pattern, and then checks for a match at the remaining positions. Generalizations o
► 2024 ( 2 ) ► 11月 ( 1 ) ► 6月 ( 1 ) ► 2022 ( 1 ) ► 11月 ( 1 ) ► 2021 ( 5 ) ► 9月 ( 1 ) ► 8月 ( 1 ) ► 1月 ( 3 ) ► 2020 ( 12 ) ► 10月 ( 1 ) ► 6月 ( 5 ) ► 5月 ( 1 ) ► 4月 ( 2 ) ► 3月 ( 2 ) ► 1月 ( 1 ) ► 2019 ( 6 ) ► 9月 ( 1 ) ► 7月 ( 1 ) ► 6月 ( 1 ) ► 3月 ( 2 ) ► 2月 ( 1 ) ► 2018 ( 6 ) ► 12月 ( 1 ) ► 11月 ( 1 ) ► 5月 ( 1 ) ► 3月 ( 1 ) ► 2月 ( 1 ) ► 1月 ( 1 ) ► 2017 ( 6 ) ► 12月 ( 1 ) ► 11月 ( 1 ) ► 8月 ( 1 ) ► 7月 ( 1 ) ► 5月
そろそろネタ元をばらしましょう。次の論文です。これを[Fiore/Leinster]として引用します。 Marcelo Fiore, Tom Leinster "Objects of Categories as Complex Numbers" http://arxiv.org/abs/math/0212377 [Fiore/Leinster]から参照されている以下の論文がSeven Treesを詳しく扱ったもののようです(僕はまだ読んでません)。 A. Blass "Seven trees in one" Journal of Pure and Applied Algebra, 103:1.21, 1995. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.8517 Seven trees と A tree が同じにな
【注意】 こちらのページは2001に作成した、古い内容となっています。 残念ながら(時代が変わり)Javaアプレットでのお試しはできません。 最近の内容については、こちらのページを御覧ください。 Last modified:2001/04/15 SandSキーお試しアプレット ここで提案する『SandS』キーは、スペースキーにシフトキーの機能も持たせたものです。 親指でスペースキーを押しながら、アルファベットキーを押すと大文字が入力できます。単にそれだけですが、使って見ると意外に使いやすいです。最近は日本語の文章でもアルファベットが多く混じるようになりました。特にNHK、IBM、SONYなど、アルファベットの大文字が続くようなケースが多いようです。SandSはこのような場合に威力を発揮します。『SandS』はSpace and Shift の略です。これが本当の親指シフトですよね。 以下の
チャリンコ通勤による滝のような汗で、朝からTシャツがシースルーになってしまうmikioです。さて今回は、Tokyo Cabinet(TC)のデータベースを各種のアルゴリズムで圧縮して利用する方法についてご紹介します。 圧縮B+木 B+木とは、比較関数の値による順序が近いレコード群を単一のページにまとめ、各ページにB木(multiway balanced treeの略であり、二分木(binary tree)とは違います)の索引を張ったものです。理論的にはレコードの探索も更新も O(log n) の時間計算量で行え、内部ノード(B木)の操作をキャッシュすると実質的には O(1) の時間計算量で探索や更新が行えるという、かなり安定した性能を備えるデータ構造です。その上、レコードが一定の順序に基づいて並べられているので、数値の範囲検索や文字列の前方一致検索が高速に行えたり、カーソルによって順序に基
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く