タグ

関連タグで絞り込む (199)

タグの絞り込みを解除

cに関するtyruのブックマーク (427)

  • PC�o������ | Unix�nerrno����

    �����������d���������������������o�����������B �����������Y��������������������������(*�L�D�M) Unix�n������タ�s�����G���[�����������������G���[�l���������B �R�������������������������B�B�B��������Web������������������(T_T) ��������ゥ���������������������������������������B Unix�n�������������v���O�����������������A�����I���l��-1�������A ����errno�������G���[�R�[�h�����������A�������������������

  • 2004-09-09


    googlelocaltime_r  strtok_r, getpwnam_r () 8/9POSIXlocaltime() struct tm *localtime(const time_t *timer); 使libcmutex使localtime_r使POSIX(TSF)8/21 localtime
    2004-09-09
    tyru
    tyru 2009/08/27
  • 使っている処理系にstrtok_rがなかったので自作 - p95095yy's diary

    こんな感じかな。strspnとstrcspnを使います。 #include <string.h> char *strtok_r(char *str, const char *delim, char **saveptr) { size_t width; char* head; head = (NULL != str)? str: *saveptr; width = strcspn(head, delim); if(0 == width){ head += strspn(head, delim); width = strcspn(head, delim); } if('\0' == *head){ return NULL; } *saveptr = head + width + strspn(head + width, delim); *(head + width) = '\0'; retur

    使っている処理系にstrtok_rがなかったので自作 - p95095yy's diary
    tyru
    tyru 2009/08/27
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • Manpage of MMAP

    Section: Linux Programmer's Manual (2) Updated: 2008-06-05 Index JM Home Page roff page 名前 mmap, munmap - ファイルやデバイスをメモリにマップ/アンマップする 書式 #include <sys/mman.h> void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); int munmap(void *addr, size_t length); 説明 mmap() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成する。 新しいマッピングの開始アドレスは addr で指定される。マッピングの長さは length 引き数で指定される。 addr が NULL の場合、カーネ

  • コンピューター:C言語講座:mmapについて


    Cmmap mmapUNIXOS 使malloc()realloc()使realloc()使mmap使
  • メモリ管理


    ()  (Entry Point) CPU  CPU    ()    (
  • 続・バグを生まないコーディング法 | EE Times Japan

    フォーラムでの議論は次のような発言から始まった。 「中括弧を使って複合文を記述し、文の切れ目にセミコロン「;」を使う言語では、オールマン・スタイルを使うべきではない」 私はどちらのスタイルでもよいと思っているが、「1TBSでは図2のような間違いを人間のコード・レビュワーが発見しにくい」という1TBSに対する批判は受け入れがたい。 人間のコード・レビュワーが、このような間違いを見落とす可能性があることは認める。しかし、まさにこの例は、ここで紹介するようなコーディング規則の重要性を物語っている。つまり、「バグを効果的に排除するためには、コーディング規則に強制力がなければならない。2個以上の競合する規則がそれぞれバグを防げても、それらの中の1つの規則だけが自動的に強制できる場合は、より強制力がある規則の適用が推奨される」ということだ。 われわれのコーディング規則では、上記のような例はまさに自動

  • Sufficiently Small » In C++ throw is an expression

    tyru
    tyru 2009/07/31
  • Big Sky :: C++で軽量Webサーバ書いた。


    Web CGI使 CGIapache... WebWeb blogapache... "tinytinyhttpd"(tthttpd) mattn's tinytinyhttpd at master - GitHub tiny tiny httpd http:
    Big Sky :: C++で軽量Webサーバ書いた。
    tyru
    tyru 2009/07/30
  • SANS - Internet Storm Center - Cooperative Cyber Threat Monitor And Alert System

    © 2024 SANS™ Internet Storm Center Developers: We have an API for you! Link To Us About Us Handlers Privacy Policy

    SANS - Internet Storm Center - Cooperative Cyber Threat Monitor And Alert System
  • AndroidアプリでC/C++のライブラリを流用可能に,Googleが開発キット投入


    Google2009625AndroidCC++Android 1.5 Native Development KitNDK, Release 1 AndroidJavaDalvikAndroidJavaDalvikNDK使CCCC++.apks NDKClibc
    AndroidアプリでC/C++のライブラリを流用可能に,Googleが開発キット投入
  • VC10はstatic_assertをコンパイル前に評価してくれるらしい - Faith and Brave - C++で遊ぼう

    Visual C++ Team Blog - Intellisense and Browsing with C++0x コーディング時のエラー検出で、static_assertも評価するみたいです。 コンパイルすらしないテンプレートメタプログラミングができそうですね。 (IDE落ちそうだ…)

    VC10はstatic_assertをコンパイル前に評価してくれるらしい - Faith and Brave - C++で遊ぼう
  • ウノウラボ Unoh Labs: diff with C++

    ミートソーススパゲティを作るときは、ミートソースから作るのが信条のbokkoです。それはさておき、今日はdiffのお話です。 diff diffは指定した2つのファイルの差分を求めるコマンド、もしくはその差分そのものを指します。普段から何気なく使用しているコマンドですが、その中で使われているアルゴリズムは結構難しいです。 差分を計算するということ 差分を計算するというのは以下の3つを求めることに帰結します。 ・Levenshtein Distance(Edit Distance) ・LCS(Longest Common Subsequence) ・SES(Shortest Edit Script) 上から順に1つずつ説明していきます。 Levenshtein Distance Levenshtein Distanceは2つのシーケンスの違いを数値化したもので編集距離とも言います。これは後述

    tyru
    tyru 2009/07/13
    diffのアルゴリズムの説明やライブラリ。ヘッダをインクルードするだけで使える。
  • 仮想関数テーブルを出力するには? - Seasons.NET

    gccのオプションには、-fdump-class-hierarchyというオプションがあり 各クラスの階層構造と仮想関数テーブルのレイアウトの表現をファイルに ダンプします。ファイル名は、ソースファイル名に .class を追加して作成されます。 -options 形式が使用されるなら、options は -fdump-treeと解説されています。 class Hoge { public: virtual void func(){} }; int main() { return 0; } をビルドすると、main.cpp.t01.class というファイルが作成され、中に Vtable for Hoge Hoge::_ZTV4Hoge: 3u entries 0 (int (*)(...))0 4 (int (*)(...))(& _ZTI4Hoge) 8 Hoge::func Class

    仮想関数テーブルを出力するには? - Seasons.NET
    tyru
    tyru 2009/07/12
  • #if 0ハックすごくね?すげーってw - Seasons.NET


    #If 0C,C++#endif 使便  http://gpwiki.org/index.php/SDL:Tutorial:Using_SDL_net #if 0 #!/bin/sh gcc -o a a.c exit #endif int main( void ) { printf( "Hello\n"); return 1; } (chmod 755)  # ./a.c a ./a Hello Makefilegcc -o a a.c Makefile sh
    #if 0ハックすごくね?すげーってw - Seasons.NET
    tyru
    tyru 2009/07/12
  • ECMA-372 - Ecma International

    C++/CLI language specification 1st edition, December 2005 This Standard specifies requirements for implementations of the C++/CLI binding. The first such requirement is that they implement the binding, and so this Standard also defines C++/CLI. Other requirements and relaxations of the first requirement appear at various places within this Standard. C++/CLI is an extension of the C++ programming l

  • @IT:特集:Visual C++ 2005 いままたC++が熱い!「C++/CLI」として大進化したVisual C++ 2005


    C++ C++調C++ C++Java2005JavaWindowsJavaC#Visual BasicJavaC++
    tyru
    tyru 2009/07/11
  • C++ Reference Project

    C Library The elements of the C language library are also included as a subset of the C++ Standard library. These cover many aspects, from general utility functions and macros to input/output functions and dynamic memory management functions: <cassert> (assert.h)C Diagnostics Library (header)<cctype> (ctype.h)Character handling functions (header)<cerrno> (errno.h)C Errors (header)<cfenv> (fenv.h)F

  • cppreference.com

    Function objects − hash (C++11) Swap − Type operations (C++11) Integer comparison (C++20) pair − tuple (C++11) optional (C++17) expected (C++23) variant (C++17) − any (C++17) String conversions (C++17) Formatting (C++20) bitset − Bit manipulation (C++20) Debugging support (C++26)