Source Code Try these examples: int (*(*foo)(void ))[3] declare bar as volatile pointer to array 64 of const int cast foo into block(int, long long) returning double cdecl C gibberish ↔ English permalink by ridiculous_fish (and many others)
From Marshall Cline: Bjarne Stroustrup, Herb Sutter, Andrei Alexandrescu, Pearson / Addison-Wesley Publishers and I collaborated to create a new C++ Super-FAQ! It's a team effort, with huge contributions from each of us and with amazing support from dozens of brilliant editors. The result is "awesomer" than ever! I originally wrote/published the FAQ in 1991 and now look forward to this new phase -
今回はLinuxカーネルのソースコードに注目してセキュリティコードレビューを行いたいと思います。Linuxのカーネルはネタの宝庫!といってもよいほど数多くの脆弱性が発見・修正されており、NIST(米国国立標準技術研究所)のNational Vulnerability Databaseで「Linux kernel」をキーワードに単純に検索するだけでも過去に624件の脆弱性が見つかっていることが分かります(執筆時点)。また、2010年は既に42件の脆弱性が登録されています。 サンプルコード 以下のコードはLinuxカーネル2.6.30のdrivers/net/tun.cから抜粋したものです。それでは、このコードのどこに問題があるか考えてみましょう。 /* Poll */ static unsigned int tun_chr_poll(struct file *file, poll_table
The Deoxyribonucleic Hyperdimension Since 1993 The most effective thing that psychedelics did was they triggered great ideas in highly creative self-actualized individuals who were very stable and produced new memes, new visions...The people who had the most effect were the people who were most creative and could transmit that energy.—Bruce Eisner, LSD & Aldous Huxley's Island A L T E R N A T I V
ここでは、プログラムなどでよく使用されるアルゴリズムについて紹介したいと思います。 元々は、自分の頭の中を整理することを目的にこのコーナーを開設してみたのですが、最近は継続させることを目的に新しいネタを探すようになってきました。まだまだ面白いテーマがいろいろと残っているので、気力の続く限りは更新していきたいと思います。 今までに紹介したテーマに関しても、新しい内容や変更したい箇所などがたくさんあるため、新規テーマと同時進行で修正作業も行なっています。 アルゴリズムのコーナーで紹介してきたサンプル・プログラムをいくつか公開しています。「ライン・ルーチン」「円弧描画」「ペイント・ルーチン」「グラフィック・パターンの処理」「多角形の塗りつぶし」を一つにまとめた GraphicLibrary と、「確率・統計」より「一般化線形モデル」までを一つにまとめた Statistics を現在は用意していま
Programming with C Blocks On Apple Devices by Joachim Bengtsson What are Blocks? What are Blocks Good For? Getting Started On and for Mac OS X 10.6 Snow Leopard, or for iOS 4 On Mac OS X 10.5 Leopard or for iPhone Blocks in C Syntax and Usage Memory Management Blocks in Objective-C Blocks and ARC (Automatic Reference Counting) Blocks in C++ Block Goodies References and Additional Sources Version H
by Doug Lea [A German adaptation and translation of this article appears in unix/mail December, 1996. This article is now out of date, and doesn't reflect details of current version of malloc.] Introduction Memory allocators form interesting case studies in the engineering of infrastructure software. I started writing one in 1987, and have maintained and evolved it (with the help of many volunteer
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
ディレクトリの中にある大量のファイルを高速に読み込む方法が知りたかったので、実験してみた。想定しているシチュエーションは、一つ一つのファイルは数KB程度だが数が多い、という場合である。適当な順番でアクセスすると、ランダムアクセスになってしまいとても時間がかかる。個々のファイルを読み込む順番はどうでも良く、すべてのファイルを処理することさえできればいいので、原理的にはシーケンシャルアクセスで処理できてしかるべきである。 まず、ファイルシステムについて。HDDやSSDなどのハードウェアにアクセスする際には、ファイル名などという概念はもちろん存在しない。ファイル名と実際のディスク上の対応を管理するのがファイルシステムの主な役割である。ファイルシステムは、ファイル名からそのファイルに対応するブロック番号(メモリアドレスみたいなもんだな)を調べて、そのブロック番号を指定してHDDやSSDにアクセスす
About CBBs What is CBBs? News Quick Links Wiki Blog Issue Tracker Tutorial Quick Start Java Components C++ Components STM Get CBBs Download Release Notes Licence Get Involved Contributor Licenses Developer Docs Java API Docs C++ API Docs Project Documentation Project Information About Issue Tracking Mailing Lists Project License Project Team Overview Project provides a set of concurrent building b
一番右端の立っているビット位置(RightMostBit)を求めるコードで速いのないかなーと探していたら、ものっっっすごいコードに出会ってしまったのでご紹介。2ch のビット演算スレで 32bit 値のコードに出会って衝撃を受けて、その後 64bit 値版のヒントを見つけたのでコードを書いてみました。 この問題は ハッカーのたのしみ―本物のプログラマはいかにして問題を解くか (Google book search で原著 Hacker's delight が読めたのでそれで済ませた) で number of trailing zeros (ntz) として紹介されています。bit で考えたときに右側に 0 がいくつあるかを数えるもの。1 だと 0、2 だと 1、0x80 なら 7、12 なら 2 といったぐあい。0 のときに表題どおりの問題として考えるといくつを返すの?ってことになるので、
News [Note: I am no longer working on TCC. Check the mailing list to get up to date information.] Features SMALL! You can compile and execute C code everywhere, for example on rescue disks (about 100KB for x86 TCC executable, including C preprocessor, C compiler, assembler and linker). FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and link several times faster than GCC. UN
ヤフー株式会社は、2023年10月1日にLINEヤフー株式会社になりました。LINEヤフー株式会社の新しいブログはこちらです。LINEヤフー Tech Blog こんにちは、ショッピング事業部開発部の吉野です。 Yahoo!ショッピング開発部では新人エンジニア向けにコマンドのソースコードを読むことを奨励しています。 その初期の題材として、lsコマンドがよく挙げられます。 今回は「lsコマンドをハックしてみよう」と題し、lsコマンドについてお話しさせていただきます。 突然ですがエンジニアの皆さん、lsコマンドのソースコードを読んだことはありますか? 読んだことのない方はぜひ一度、目を通しておくことをおすすめします。 意外と知られていませんが、lsはcd,pwdなどのコマンドと違いシェルの組み込みコマンドではありません。 一口にlsと言っても、複数のソースコードが存在します。 代表的なのはGN
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く