タグ

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

タグの絞り込みを解除

Cに関するiwwのブックマーク (398)

  • 日本システム開発株式会社 教育 ソリューション

  • CodeIQについてのお知らせ


    2018425 CodeIQ ITmoffers by CodeIQhttps://moffers.jp/  ITCodeIQ  WebCodeIQ MAGAZINE NEXT( https://next.rikunabi.com/journal/ ) moffers by CodeIQ IT  Cod
    CodeIQについてのお知らせ
  • データ構造の授業をCからPythonにしたら単位取得率が15%から90%になった話 #PyConJP_1 #pyconjp

    Fernando Masanori @fmasanori Sou feliz 🥰 compartilhando⁣. Cozinho 👨‍🍳 dançando. Amo lavar 🧼 pratos⁣. Onde deixei meus óculos? 🤓 https://t.co/kUYd9qq7VC リンク pt.slideshare.net Teaching Data Structures with Python Data Structures is traditionally a “bogeyman” discipline in Computer Science courses and has a high degree of failure. In FATEC São José dos Campos we are adop…

    データ構造の授業をCからPythonにしたら単位取得率が15%から90%になった話 #PyConJP_1 #pyconjp
    iww
    iww 2015/10/11
    pythonって流行ってるのかな
  • Man page of READ

    Section: Linux Programmer's Manual (2) Updated: 2018-02-02 Index JM Home Page roff page 名前 read - ファイルディスクリプターから読み込む 書式 #include <unistd.h> ssize_t read(int fd, void *buf, size_t count); 説明 read() はファイルディスクリプター (file descriptor) fd から最大 count バイトを buf で始まるバッファーへ読み込もうとする。 seek に対応しているファイルでは、read はファイルオフセットから行われ、ファイルオフセットは読み込んだバイト数分だけ進められる。ファイルオフセットがファイル末尾かそれより先の場合は、読み出しは行われず、 read() は 0 を返す。 count

    iww
    iww 2015/09/01
    『count が 0 の場合、 read() は以下で説明するエラーを検出する場合がある。』 検出しない場合もあると。 ドライバ依存かな
  • pthread_cond_wait(3): wait on condition - Linux man page

    pthread_cond_wait(3) - Linux man page Prolog This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. Name pthread_cond_timedwait, pthread_cond_wait - wait on a condition Synopsis #include <pthread.h> int pthread_cond

  • 仙石浩明の日記: x86_64 Linux でメモリ・デバッグ・ツール Valgrind を使う場合の注意点

    次のようなプログラム test.c について考える: #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <string.h> struct test { int32_t len; int8_t buf[16]; }; int main(int argc, char *argv[]) { struct test *p = malloc(sizeof(struct test)); int8_t buf[16]; p->len = sizeof(p->buf); bzero(p->buf, p->len); printf("0x%lX-0x%lX => 0x%lX\n", (long)p->buf, (long)p->buf+p->len-1, (long)buf); bcopy(p->buf, buf,

  • Valgrind : 4. Memcheck: a memory error detector

    Memcheck is a memory error detector. It can detect the following problems that are common in C and C++ programs. Accessing memory you shouldn't, e.g. overrunning and underrunning heap blocks, overrunning the top of the stack, and accessing memory after it has been freed. Using undefined values, i.e. values that have not been initialised, or that have been derived from other undefined values. Incor

  • MSC12-C. プログラムに対して作用しないコードを検出して削除する


    MSC12-C.  (MSC00-C. ) MSC07-C.   () ab int a; int b; /* ... */ a == b;  =  == 使
    MSC12-C. プログラムに対して作用しないコードを検出して削除する
    iww
    iww 2015/08/05
    アクセスしちゃうのか
  • INT01-C. オブジェクトのサイズを表現するすべての整数値に rsize_t もしくは size_t を使用する

    HOME公開資料を見るINT01-C. オブジェクトのサイズを表現するすべての整数値に rsize_t もしくは size_t を使用する INT01-C. オブジェクトのサイズを表現するすべての整数値に rsize_t もしくは size_t を使用する size_t 型は sizeof 演算子の結果の符号なし整数型である。size_t 型の変数は、そのオブジェクトのサイズを表現するのに十分な精度を持つことが保証されている。size_t の最大値は SIZE_MAX マクロで規定されている。 size_t 型は一般にすべてのアドレス空間をカバーする。ISO/IEC TR 24731-1-2007 では新しい型として rsize_t が提案されている。rsize_t 型は size_t 型と同じ大きさであり、明示的に単一のオブジェクトのサイズを保持するために使われるものとして定義されている

    INT01-C. オブジェクトのサイズを表現するすべての整数値に rsize_t もしくは size_t を使用する
    iww
    iww 2015/08/04
    rsize_t は size_t のエイリアスみたいなもん
  • Mitzyuki's Blog :: C 中級者が意外と陥りやすいワナ


    C      strncpy(3)  ``\0''  strcpy(3)  strncpy(3)   strncpy(dst, src, len);   src  len  dst  ``\0''   dst   ``\0''    src
  • C言語パズル集:Cにまつわる興味深い問題あれこれ | POSTD


    CCeC  C  Gnu/Linux/gcc使  
    C言語パズル集:Cにまつわる興味深い問題あれこれ | POSTD
    iww
    iww 2015/07/27
     1   

    C

  • Man page of ERRNO


    Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page roff page  errno -   #include <errno.h>   <errno.h>  errno   errnoerrno ( -1  -1  NULL)  errno errno 0 
    iww
    iww 2015/07/09
    てっきり 0 の定数が定義されてると思ったけど、無かった。 errnoを初期化するときは 0 を即値で代入する
  • メモリーリークの検出:mtrace , valgrind:プログラマー社長のブログ:オルタナティブ・ブログ

    以前の記事にもLinuxでのメモリーリークの検出に関する事を書いたのですが、もう少し一般的なやり方を紹介しましょう(というより、自分で毎回忘れるので備忘録として・・・)。 【mtraceを使う方法】 まず、mtraceを使う方法です。リークのテストを開始したい場所でmtrace()をコールし、終了したい場所でmuntrace()をコールするようにします。 #include        <stdio.h> #include        <stdlib.h> char *test() { char    *test=malloc(10); return(test); } int main() { char    *ptr; mtrace(); ptr=test(); //*(ptr+10)='\0'; //free(ptr); muntrace(); return(0); } -gつきでコ

    メモリーリークの検出:mtrace , valgrind:プログラマー社長のブログ:オルタナティブ・ブログ
  • Valgrind Home

    Information About News Tool Suite Supported Platforms The Developers Source Code Current Releases Release Archive Variants / Patches Code Repository Valkyrie / GUIs Documentation Table of Contents Quick Start FAQ User Manual Download Manual Research Papers Books Contact Mailing Lists and IRC Bug Reports Feature Requests Contact Summary Commercial Support How to Help Contributing Project Suggestion

    iww
    iww 2015/06/01
    強そうな名前
  • 組み込み業界へ向かう人に、自分が買ってよかったと思った技術書達 - undefined


    4 CPURL78Cortex-M0Cortex-M3RxSHCortex-A9FPGA7000LUTZynqFPGA   CPU CPU : /: : 2003/10/01: : 35 :
    組み込み業界へ向かう人に、自分が買ってよかったと思った技術書達 - undefined
  • MPFRについて:任意精度数値計算ライブラリ


    1πGMP使使 調GMPMPFRMPC3gcc使gcc使GMPMPFRMPC GMP  MPFR  MPC  MPFRC /* mpfr使調
  • 任意精度計算ライブラリ(GMP)の使い方 - pyopyopyo - Linuxとかプログラミングの覚え書き -


     C/C++double15(10) 15 7 816double151 15 Cdouble(1.0 + 1e-16) 1.0  GMP使 GMP GMP(GNU Multiple Precision li
    任意精度計算ライブラリ(GMP)の使い方 - pyopyopyo - Linuxとかプログラミングの覚え書き -
  • 複数の言語を話す人は、思考がより柔軟であるという研究結果 | スラド サイエンス

    二カ国語を話す人を対象に行われた新たな研究によれば、複数の言語を話す人は、それぞれの言語の持つ世界観の良い所を持ち合わせているため、柔軟に思考することができるとのこと(Slashdot、Science)。 認知科学者らは1940年代より、母国語が思考に及ぼす影響について研究を行ってきた。これによれば、話し手が何に焦点をあてるのかは母国語の影響を受けているのだそうだ。そこで、二カ国語を話す人の場合には、「二つの思考が、一人の人間の中に存在し得るのか」という疑問が湧いたという。 研究の結果、第二言語は物事の見方において、重要な潜在的役割を果たしていることが分かったとのこと。「他の言語を話せる場合、もう一つの視点を持っている」ことになり、言語を素早く切り替えるがごとく、物の見方も素早く切り替えることができるのだそうだ。

  • c: c言語をスクリプト感覚で実行出来る様にするコマンド

    B! 92 0 0 0 PythonRubyなんかはShebangをファイルの先頭に書いておくと、 ファイルの実行権限を持っていれば内容をその言語のものとして読み取って実行してくれます。 これと同じような事をしてくれるコマンドが cです。 c Shebangを使って実行 コマンドとしてファイルを引数として渡して実行 その他出来るコト c cはファイルの中身を見ると結構単純なシェルスクリプトです。 中でccを使ってコンパイルして実行する、を一気にやってくれるわけです。 その際、実際の実行ファイルなんかは 一時ディレクトリ($C_CACHE_PATH or $TMPDIR or /tmp) に作られるのでまるでスクリプトを実行してる様な感じで コマンドが実行されます。 使うには上のレポジトリからcスクリプトを取ってきて適当なPATHの通った ディレクトリにインストールします。 Shebang

    c: c言語をスクリプト感覚で実行出来る様にするコマンド
    iww
    iww 2015/03/19
    面白いけどシェバンつけるのはイマイチだと思う
  • Pthread - Mutexでプロセス間排他制御を行う - s-kita’s blog

    使用するシステムコール、API Mutex関連 #include <pthread.h> int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); int pthread_mutex_lock(pthread_mutex_t *mutex); int pthread_mutex_unlock(pthread_mutex_t *mutex); int pthread_mutex_destroy(pthread_mutex_t *mutex); Mutex属性関連 #include <pthread.h> int pthread_mutexattr_init(pthread_mutexattr_t *attr); int pthread_mutexattr_destroy(pthread_

    Pthread - Mutexでプロセス間排他制御を行う - s-kita’s blog
    iww
    iww 2015/03/17
    プロセス跨ぎたいときは pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);