Popular recipes by J Y http://code.activestate.com/recipes/users/4170398/2010-03-16T13:24:00-07:00ActiveState Code RecipesFree segmentation fault caused by buffer overflow (C)
2009-10-10T02:45:48-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576927-free-segmentation-fault-caused-by-buffer-overflow/
<p style="color: grey">
C
recipe 576927
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/bufer_overflow/">bufer_overflow</a>).
Revision 2.
</p>
<p>Free segmentation fault caused by buffer overflow</p>
escape url characters (C)
2009-09-28T20:41:05-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576916-escape-url-characters/
<p style="color: grey">
C
recipe 576916
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/string/">string</a>).
</p>
<p>对于url中的一些特殊字符会被转义以利传输,
* 并且, 归档服务器上, php写入cookie中的值可能存在特殊字符, 需要转换</p>
scan db to login the ssh servers (Bash)
2010-03-16T13:11:17-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576877-scan-db-to-login-the-ssh-servers/
<p style="color: grey">
Bash
recipe 576877
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/awk/">awk</a>, <a href="/recipes/tags/bash/">bash</a>).
Revision 2.
</p>
<p>awk with parameters passed from bash</p>
awk sample (Bash)
2010-03-16T13:24:00-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576876-awk-sample/
<p style="color: grey">
Bash
recipe 576876
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/awk/">awk</a>).
</p>
<p>this is an awk sample</p>
the list template (C)
2009-07-30T22:59:20-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576864-the-list-template/
<p style="color: grey">
C
recipe 576864
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/list/">list</a>).
</p>
<p>reference: <a href="http://www.makelinux.net/ldd3/chp-11-sect-5.shtml" rel="nofollow">http://www.makelinux.net/ldd3/chp-11-sect-5.shtml</a></p>
code snippets (C)
2009-08-17T18:10:19-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576856-code-snippets/
<p style="color: grey">
C
recipe 576856
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/snippet/">snippet</a>, <a href="/recipes/tags/struct_tm/">struct_tm</a>).
Revision 3.
</p>
<p>code snippets</p>
getcwd (C)
2009-07-23T20:01:42-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576855-getcwd/
<p style="color: grey">
C
recipe 576855
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/getcwd/">getcwd</a>).
</p>
<p>getcwd</p>
redirect printf, stdout,stderr (C)
2009-07-02T00:36:46-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576825-redirect-printf-stdoutstderr/
<p style="color: grey">
C
recipe 576825
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/printf/">printf</a>, <a href="/recipes/tags/redirect/">redirect</a>).
</p>
<p>redirect printf, stdout,stderr</p>
make subdirs (C)
2009-06-16T19:47:31-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576813-make-subdirs/
<p style="color: grey">
C
recipe 576813
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/mkdir/">mkdir</a>).
</p>
<p>make subdirs recursively</p>
pending/blocking a signal (C)
2009-05-25T22:42:30-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576775-pendingblocking-a-signal/
<p style="color: grey">
C
recipe 576775
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/signal/">signal</a>).
</p>
<p><a href="http://www-h.eng.cam.ac.uk/help/tpl/unix/signals.html" rel="nofollow">http://www-h.eng.cam.ac.uk/help/tpl/unix/signals.html</a></p>
<p>do you want certain signals to be ignored or blocked? The sigaction(), sigprocmask(), siginterrupt(), and sigsuspend() functions control the manipulation of the signal mask, which defines the set of signals currently blocked. The manual pages give details. The following code shows how the response to signals can be delayed. </p>
Self-Printing Program (C)
2009-06-05T01:19:17-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576798-self-printing-program/
<p style="color: grey">
C
recipe 576798
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/tricky/">tricky</a>).
</p>
<p>The two key tricks here are using a string with an embedded %s specifier to allow the string to contain itself when printed, and to use the %c format specifier to allow printing out special characters like newlines, which could not otherwise be embedded in the output string. </p>
kill processes (Bash)
2010-03-15T16:44:20-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576815-kill-processes/
<p style="color: grey">
Bash
recipe 576815
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/kill/">kill</a>).
</p>
<p>kill a group of process within the same name</p>
process exist? by reading /proc (C)
2009-06-03T20:34:50-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576794-process-exist-by-reading-proc/
<p style="color: grey">
C
recipe 576794
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/proc/">proc</a>).
</p>
<p>判断一个进程还存不存在</p>
sigaction on SIGCHLD (C)
2009-05-25T23:54:57-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576776-sigaction-on-sigchld/
<p style="color: grey">
C
recipe 576776
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/signal/">signal</a>).
Revision 2.
</p>
<p>sigaction</p>
commanding via a duplex pipe stream. (C)
2009-06-07T01:41:19-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576773-commanding-via-a-duplex-pipe-stream/
<p style="color: grey">
C
recipe 576773
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/ipc/">ipc</a>, <a href="/recipes/tags/pipe/">pipe</a>).
Revision 2.
</p>
<p>commanding via a duplex pipe stream.</p>
shared memory (C)
2009-06-09T02:49:29-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576799-shared-memory/
<p style="color: grey">
C
recipe 576799
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/shm/">shm</a>).
</p>
<p>sharem mem</p>
getopt (C)
2009-07-16T01:55:53-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576769-getopt/
<p style="color: grey">
C
recipe 576769
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/getopt/">getopt</a>).
Revision 3.
</p>
<p>working with getopt</p>
util,maybe a lib (C)
2009-05-20T18:23:05-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576774-utilmaybe-a-lib/
<p style="color: grey">
C
recipe 576774
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/util/">util</a>).
</p>
<p>keep on working to avoid dimentia</p>
create a file and its parents (C)
2009-05-20T18:15:55-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576770-create-a-file-and-its-parents/
<p style="color: grey">
C
recipe 576770
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/file/">file</a>).
</p>
<p>walking down the path, create the subpath when necessary</p>
a list (C)
2009-05-20T18:19:52-07:00J Yhttp://code.activestate.com/recipes/users/4170398/http://code.activestate.com/recipes/576772-a-list/
<p style="color: grey">
C
recipe 576772
by <a href="/recipes/users/4170398/">J Y</a>
(<a href="/recipes/tags/list/">list</a>).
</p>
<p>what am i doing?</p>