- 博客(66)
- 收藏
- 关注
原创 生产者和消费者
/* * ===================================================================================== * * Filename: producer_Consumer.c * * Description: 使用单链表模拟缓冲区,生产者线程和消费者线程互斥访问缓冲区,利用互斥 *
2014-10-23 21:56:29
674
原创 c语言关系运算符语法错误
#includeint main(){int input;scanf("%d", &input);if(input printf("1");else if(1printf("1~10");else if(10printf("10~100");else printf(">100");return 0;}gcc检查不到这个错误,原因在
2014-01-25 21:59:44
1013
原创 spydroid测试在android4.0系统上报错
I/MediaRecorderJNI(3721): prepare: surface=0xbae568 (identity=91)E/MediaRecorder(3721): start failed: -19E/RtspServer(3721): start failed.W/System.err(3721): java.lang.RuntimeException: start faile
2013-06-22 20:56:40
2929
转载 ubuntu Eclipse 中文乱码
今天,把windows下的工程导入到了Linux下eclipse中,由于以前的工程代码,都是GBK编码的,而Ubuntu默认是不支持GBK编码的。所以,首先我们要先让Ubuntu支持GBK,方法如下:修改/var/lib/locales/supported.d/local文件,在文件中添加zh_CN.GBK GBKzh_CN.GB2312 GB2312sudo dpkg-reconfi
2013-05-22 11:16:21
743
转载 将linux 命令的执行结果在屏幕输出的同时保存到文件
1.直接覆盖日志文件 # ls -l | tee ./t.log # make | tee make.log2.将输出内容附加到日志文件 # ls -l | tee -a ./t.log # make image | tee -a make_image.log
2013-05-21 20:27:23
4336
转载 一位软件工程师的7年的总结
转自:http://blog.youkuaiyun.com/ghd2000/article/details/5653773一位软件工程师的7年总结1、分享第一条经验:“学历代表过去、能力代表现在、学习力代表未来。”其实这是一个来自国外教育领域的一个研究结果。相信工作过几年、十几年的朋友对这个道理有些体会吧。但我相信这一点也很重要:“重要的道理明白太晚将抱憾终生!”所以放在每一条,让
2013-05-07 11:11:25
694
转载 程序员技术练级攻略 – 学习编程的步骤 | 编程学习经验
月光博客6月12日发表了《写给新手程序员的一封信》,翻译自《An open letter to those who want to start programming》,我的朋友(他在本站的id是Mailper)告诉我,他希望在酷壳上看到一篇更具操作性的文章。因为他也是喜欢编程和技术的家伙,于是,我让他把他的一些学习Python和Web编程的一些点滴总结一下。于是他给我发来了一些他的心得和经历
2013-04-23 10:28:12
1330
转载 linux学习基本步骤
Linux学习基本步骤到这里,我们总结一下linux的学习路线图,给各位初学者作为参考。初级阶段:1. 命令是必须要学的,linux常用的命令大概在80个左右,这些常用命令一定要熟练掌握。2. 掌握linux软件包的常用安装方法,例如源码安装,rpm方式安装等等。3. 学习安装设备驱动程序(比如网卡、显卡驱动) 4. 熟悉Grub/Lilo引导程序及简单的修复操作。 5
2013-04-11 11:20:50
693
原创 查询摄像头支持的图片格式
int flag=0; int fd=-1; fd=open("/dev/video0",O_RDWR|O_NONBLOCK,0); struct v4l2_fmtdesc fmt; fmt.index=0; fmt.type=V4L2_BUF_TYPE_VIDEO_CAPTURE; while((flag=ioctl(fd,VIDIOC_ENUM_FMT,&fmt))!=-1) {
2013-04-04 12:04:17
1398
转载 V4L2编程初体验
转自:http://www.cnblogs.com/lixiaoming90/archive/2012/08/25/2657019.html内容摘要: Video for Linux two(Video4Linux2)简称V4L2,是V4L的改进版。V4L2是linux操作系统下用于采集图片、视频和音频数据的API接口,配合适当的视频采集设备和相应的驱动程序,可以实现图片、视频、音频
2013-03-31 21:45:59
5825
转载 V4L2摄像头获取单幅图片测试程序(MMAP模式)
转自:http://www.linuxidc.com/Linux/2011-03/33020.htm#include #include #include #include #include #include #include #include #include #include #inclu
2013-03-31 21:35:33
1017
转载 V4L2视频采集接口使用说明
转自:http://www.rosoo.net/a/201104/11233.htmlV4L2视频采集接口使用说明落鹤生 发布于 2011-04-19 11:14 点击:1395次 来自:blog.chinaunix.netV4L2较V4L有较大的改动,并已成为2.6的标准接口,函盖video\dvb\FM...,
2013-03-31 21:17:33
851
转载 linux 下的od命令加上重定向
可以使用linux 下的od命令加上重定向,od详解:Linux指令:od示例用法:od -c helloLinux指令:odod命令用户通常使用od命令查看特殊格式的文件内容。通过指定该命令的不同选项可以以十进制、八进制、十六进制和ASCII码来显示文件。语法:od [选项] 文件…命令中各选项的含义:- A 指定地址基数,包括:d 十进制o 八进制(
2013-03-31 15:32:56
901
转载 RGB to YUV420转换
转自:http://blog.cechina.cn/xilinxue/149954/message.aspx说明:下面的代码用C\C++执行都可以,用C的时候请把#include 删除。RGB to YUV420 原代码: RGB2YUV.CPP文件#include #include #include #include//转换矩阵#define MY(a,b,c)
2013-03-28 10:58:06
2115
转载 linux下windows文件名乱码解决方法
安装 convmv 这个软件.convmv -f 源编码 -t 新编码 [选项] 文件名使用前 先使用 convmv --list 测试一下你的linux所支持的文件编码转换格式常用参数:-r 递归处理子文件夹--notest 真正进行操作,请注意在默认情况下是不对文件进行真实操作的,而只是试验。--list 显示所有支持的编码--unescap 可以做一下转义,比
2013-03-23 10:02:39
640
翻译 Why capitalism remains in rude health
Why capitalism remains in rude healthIs capitalism broken? That is the portentous question that I and other Financial Times columnists will be attempting to answer next week in a series of “Great De
2013-03-22 22:15:47
663
转载 POJ3295--Tautology
转自:http://www.cnblogs.com/lv-2012/archive/2012/10/27/2742751.htmlTautologyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7220 Accepted: 2741Des
2013-03-19 22:02:42
832
原创 POJ2586--Y2K Accounting Bug
Y2K Accounting BugTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7799 Accepted: 3861DescriptionAccounting for Computer Machinists (ACM) has sufferred f
2013-03-19 11:18:53
614
转载 ubuntu下minicom和USB转串口
转自:http://www.cnblogs.com/xiaotlili/archive/2011/08/03/2126081.html一、安装minicom:使用以下命令:# sudo apt-get install minicom二、Linux下如何使用USB转串口设备对没有串口的笔记本持有者来说,做硬件开发经常为没有串口而烦恼,不过现在有了USB
2013-03-15 10:02:03
782
原创 POJ2109--Power of Cryptography
Power of CryptographyTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 15076 Accepted: 7652DescriptionCurrent work in cryptography involves (among other t
2013-03-12 20:52:20
606
转载 在Ubuntu中下载编译ffmpeg的过程
转自:http://shanewfx.github.com/blog/2012/09/24/compile-ffmpeg-on-ubuntu/登陆ffmpeg官网的下载页面可以得到使用git克隆ffmpeg源代码的地址:1git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
2013-03-11 16:04:29
2416
转载 Vim+cscope+ctags+tags阅读源代码
转自:http://zhwen.org/?p=articles/cscope-tagslinux源代码提供了制作cscope索引文件和tags文件的make命令。一,软件安装先安装cscope:sudo apt-get install cscope在安装ctags:http://ctags.sourceforge.net/可以使用:ctags –v
2013-03-09 11:10:41
616
转载 POJ1328----Radar Installation
转自:http://ren.iteye.com/blog/344093Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38045 Accepted: 8452DescriptionAssume t
2013-03-07 10:54:35
549
转载 基于 Android NDK 的学习之旅----- C调用Java
转自:http://www.cnblogs.com/luxiaofeng54/archive/2011/08/17/2142000.html基于 Android NDK 的学习之旅----- C调用Java许多成熟的C引擎要移植到Android 平台上使用 , 一般都会 提供 一些接口, 让Android sdk 和 jdk 实现。下文将会介绍 C 如何 通过 JNI
2013-03-06 10:24:15
586
转载 Java与C互相调用实例详解
转自:http://www.cnblogs.com/lknlfy/archive/2012/03/13/2394153.html一、概述 对于大部分应用开发者来说可能都不怎么接触到NDK,但如果涉及到硬件操作的话就不得不使用NDK了。使用NDK还有另一个原因,就是C/C++的效率比较高,因此我们可以把一些耗时的操作放在NDK中实现。 关于java与c
2013-03-01 11:00:35
403
转载 JNI字段描述符“([Ljava/lang/String;)V”
转自:http://fgsink.blog.163.com/blog/static/16716997020124310169911/“([Ljava/lang/String;)V” 它是一种对函数返回值和参数的编码。这种编码叫做JNI字段描述符(JavaNative Interface FieldDescriptors)。一个数组int[],就需要表示为这样"[I"。如果多个数组dou
2013-03-01 10:41:55
2387
原创 POJ2965----The Pilots Brothers' refrigerator
The Pilots Brothers' refrigeratorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14029 Accepted: 5261 Special JudgeDescriptionThe game “The Pilots
2013-02-27 20:25:08
3599
原创 POJ3094-- Quicksum
QuicksumTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11717 Accepted: 8059DescriptionA checksum is an algorithm that scans a packet of data and return
2013-02-27 09:56:46
691
转载 POJ2255 Tree Recovery
转载 http://blog.youkuaiyun.com/crescent_star/article/details/5494637Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8859 Accepted: 5585Des
2013-02-26 10:31:25
579
翻译 China Lashes Back at Hacking Claims
China Lashes Back at Hacking ClaimsChina fought back against a U.S. computer-security firm’s accusations that a Chinese military group stole large amounts of data from U.S. companies.中国驳斥了一个美国电脑安全
2013-02-25 15:22:57
475
翻译 New3D printing technique could speed up progress towards creation ofartificial organs
New3D printing technique could speed up progress towards creation ofartificial organsA 3D printing technique that produces clusters of stem cells couldspeed up progress towards the creation of artif
2013-02-21 11:40:30
825
翻译 9 ways you can boost your memory
Kick your memory power into high gear with savvy ways to boost your memory. Click through for 9 ways you can boost your memory power now.使用明智的方式让你的存储能力提高,来提高你的记忆力。现在使用9种方法来提高你的存储能力。(原)用聪明的方法让记忆力高速
2013-02-17 14:37:36
481
转载 Android Pull解析xml
转载 http://sinye.iteye.com/blog/763949Pull解析和Sax解析很相似,都是轻量级的解析,在Android的内核中已经嵌入了Pull,所以我们不需要再添加第三方jar包来支持Pull。Pull解析和Sax解析不一样的地方有(1)pull读取xml文件后触发相应的事件调用方法返回的是数字(2)pull可以在程序中控制想解析到哪里就可以停止解析。看
2013-02-16 14:09:42
345
原创 POJ -----3006 Dirichlet's Theorem on Arithmetic Progressions
Dirichlet's Theorem on Arithmetic ProgressionsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12774 Accepted: 6427DescriptionIf a and d are relatively p
2013-02-11 22:23:01
419
翻译 In Cambodia, A King By Another Name
In Cambodia, A King By Another Name Ahead of Monday’s cremation of NorodomSihanouk, Cambodians are expected to flood the streets this weekend to mourntheir two-time king. But many Cambodians s
2013-02-11 21:17:27
554
原创 POJ---1503 Integer Inquiry
Integer InquiryTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 25660 Accepted: 9972DescriptionOne of the first users of BIT's new supercomputer was Chip
2013-02-10 15:10:44
352
原创 POJ---3299 Humidex
DescriptionAdapted from Wikipedia, the free encyclopediaThe humidex is a measurement used by Canadian meteorologists to reflect the combined effect of heat and humidity. It differs from the heat
2013-02-10 15:08:28
579
原创 POJ 2262 ----Goldbach's Conjecture
Goldbach's ConjectureDescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number
2013-02-07 15:56:53
434
翻译 What happens when the Fed starts losing money
What happens when the Fed starts losing moneyEver since theFederal Reserve first started buying up financial assets back in 2008,some havefretted about taxpayer exposure. The private debt purchased
2013-02-07 14:18:47
777
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人