Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct sockaddr_in localSock;
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
#include <unistd.h>
#include "c_dbg.h"
#define MAX_PATH_LEN 1024
/*************************************************
Version: 0.1@20141202
Function:
Description: 函数功能等的描述
Author: Jay
Input:
-----------------------------------------------------
parameter | Description
@goog
goog / showif.c
Last active August 29, 2015 14:28 — forked from OrangeTide/showif.c
example to list network interfaces on linux/bsd/osx/etc
/* showif.c : PUBLIC DOMAIN - Jon Mayo - August 22, 2006
* - You may remove any comments you wish, modify this code any way you wish,
* and distribute any way you wish.*/
/* finds all network interfaces and shows a little information about them.
* some operating systems list interfaces multiple times because of different
* flags, modes, etc. if you want to use this code you should be aware that
* duplicate interfaces is a possibility */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@goog
goog / iconv_practice.cpp
Last active September 11, 2015 10:24 — forked from suapapa/iconv_practice.cpp
iconv utf8 to ucs2 example
#include <stdio.h>
#include <iconv.h>
#include <string.h>
#include <errno.h>
#include <stdint.h>
int conv_utf8_to_ucs2(const char* src, size_t len)
{
iconv_t cb = iconv_open("UTF-16", "UTF-8");
if (cb == (iconv_t)(-1))
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Queue widget example</title>
<style type="text/css">
body {
font-family:Verdana, Geneva, sans-serif;
font-size:13px;
color:#333;
var $db = $.couch.db("test");
$(function() {
$("#uploader").plupload({
// General settings
runtimes : 'flash,html5,browserplus,silverlight,gears,html4',
url : 'http://192.168.0.20:5984/test/test',
max_file_size : '1000mb',
max_file_count: 20, // user can add no more then 20 files at a time
//chunk_size : '1mb',
//unique_names : true,
@goog
goog / memcached
Created May 25, 2012 11:06
memcached
memcached其实也只是transport的一种,之前了解不多,搞错了。。。
@goog
goog / senti_test.txt
Created August 10, 2012 23:46
senti_test.txt
高 好 超出 好 皮实 问题 与众不同 细腻 精巧
----------
轻巧 喜欢 不错 没有 问题 卡 一般 可以
----------
漂亮 精致 好看
----------
好 快 舒服
----------
一流 漂亮
----------