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…
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
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
次のようなプログラム 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,
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
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 型と同じ大きさであり、明示的に単一のオブジェクトのサイズを保持するために使われるものとして定義されている
以前の記事にも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つきでコ
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
二カ国語を話す人を対象に行われた新たな研究によれば、複数の言語を話す人は、それぞれの言語の持つ世界観の良い所を持ち合わせているため、柔軟に思考することができるとのこと(Slashdot、Science)。 認知科学者らは1940年代より、母国語が思考に及ぼす影響について研究を行ってきた。これによれば、話し手が何に焦点をあてるのかは母国語の影響を受けているのだそうだ。そこで、二カ国語を話す人の場合には、「二つの思考が、一人の人間の中に存在し得るのか」という疑問が湧いたという。 研究の結果、第二言語は物事の見方において、重要な潜在的役割を果たしていることが分かったとのこと。「他の言語を話せる場合、もう一つの視点を持っている」ことになり、言語を素早く切り替えるがごとく、物の見方も素早く切り替えることができるのだそうだ。
B! 92 0 0 0 PythonやRubyなんかはShebangをファイルの先頭に書いておくと、 ファイルの実行権限を持っていれば内容をその言語のものとして読み取って実行してくれます。 これと同じような事をしてくれるコマンドが cです。 c Shebangを使って実行 コマンドとしてファイルを引数として渡して実行 その他出来るコト c cはファイルの中身を見ると結構単純なシェルスクリプトです。 中でccを使ってコンパイルして実行する、を一気にやってくれるわけです。 その際、実際の実行ファイルなんかは 一時ディレクトリ($C_CACHE_PATH or $TMPDIR or /tmp) に作られるのでまるでスクリプトを実行してる様な感じで コマンドが実行されます。 使うには上のレポジトリからcスクリプトを取ってきて適当なPATHの通った ディレクトリにインストールします。 Shebang
使用するシステムコール、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_
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く