码迷,mamicode.com
首页 >  
搜索关键字:open source    ( 40776个结果)
FIFO管道探索历程
刚开始代码的实现如下:voidCreateFIFO(){if((mkfifo(FIFOPATH,O_CREAT|O_EXCL|O_RDWR)<0)&&(errno!=EEXIST)){printf(strerror(errno));}}intOpenFIFO(){fd=open(FIFOPATH,O_RDWR|O_NONBLOCK);returnfd;}觉得非常的不优雅,毕竟需要调用两个函数,而且写函数又有一..
分类:其他好文   时间:2014-09-08 10:59:37    阅读次数:499
APUE源码编译及问题解决
首先阅读readme文件,要求 To build the source, edit the Make.defines.* file for your system and set WKDIR to the pathname of the tree containing the source code.  Then just run "make". 我的系统环境是Linux的,因此修改....
分类:其他好文   时间:2014-09-08 09:38:36    阅读次数:278
linux下IPTABLES配置详解
如果你的IPTABLES基础知识还不了解,建议先去看看.开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况[root@tp ~]# iptables -L -nChain INPUT (policy ACCEPT)target prot opt source ...
分类:系统相关   时间:2014-09-07 19:45:25    阅读次数:372
ubuntu 12.04下安装中文输入法
在Ubuntu 12.04以及基于Ubuntu的发行版上安装fcitx小企鹅输入法,并安装Linux版本搜狗输入法。 方法: 提供两种输入法,一种添加PPA安装,第二种直接添加源安装。 下面是第二种直接安装(个人觉得比较方便:) 实现过程: 先 卸载ibus输入法: sudo apt-get remove ibus 然后 sudo gedit /etc/apt/source...
分类:其他好文   时间:2014-09-07 09:50:24    阅读次数:249
ruby on rails上传报编码错误
Encoding::UndefinedConversionErrorinProductsController#create"\xFF"fromASCII-8BITtoUTF-8在使用ruby1.9.3做上传照片的时候,报这个错误,解决办法是将控制器里的File.open("#{Rails.root}/app/assets/p_w_picpaths/"+new_name,"w"){|file|file.write(img_data)}换为File.o..
分类:其他好文   时间:2014-09-07 03:22:55    阅读次数:199
通过获取的一个值和本地的一个值比较来获取一个boolean值
/**      * Sets the port of the local Socks5 proxy. Default is 7777. If you set the port to a negative      * value Smack tries the absolute value and all following until it finds an open port.    ...
分类:其他好文   时间:2014-09-07 03:18:54    阅读次数:250
通过本地存储的一个值和当前获取值得比较得到一个boolean值
/**      * Sets the port of the local Socks5 proxy. Default is 7777. If you set the port to a negative      * value Smack tries the absolute value and all following until it finds an open port.    ...
分类:其他好文   时间:2014-09-07 03:18:44    阅读次数:207
Android源码-SignApk.java
1 /* 2 * Copyright (C) 2008 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you ...
分类:移动开发   时间:2014-09-07 02:12:44    阅读次数:311
搭建spring-framework环境
1.下载spring-framework3.2.7,取其中的lib文件。后缀为jar的是我们必须的文件,doc以及resource后缀分别是文档注释和源代码。在添加jar包的时候可以指定。   2. 创建用户的自定义的libray库。   3导入自定义的包,在导入的过程中可以指定包的source以及docs     4. 完成之后的效果图基本如下...
分类:编程语言   时间:2014-09-07 01:08:04    阅读次数:235
Qt中使用inherits判断drag and drop事件发起源
有时候我们需要在dragMoveEvent, dropEvent这样的函数中进行一些判断, 过滤不合法的drag或者是区分不同类型的drag做不同的处理, 比如.代码大致如下: void Scene::dragMoveEvent(QGraphicsSceneDragDropEvent *event) { if(event->source()********) {...
分类:其他好文   时间:2014-09-07 01:07:44    阅读次数:193
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!