自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(45)
  • 收藏
  • 关注

原创 autotools 在MAC上编译问题

通常在MAC上可以和其他linux机器一样用 autoreconf -vi && cd bin && ../configure && make 但是在需要编译iOS(iPhone, AppleTV, WatchOS)之类的二进制文件时需要有其他的设置 -isysroot /Applications/Xcode.app/Cont...

2017-04-20 21:24:07 454

原创 archiva的一些安全性配置

http://archiva.apache.org/docs/2.0.1/adminguide/customising-security.html 写道Security properties and password rules can be configured in the security.properties file, which by default is searched f...

2017-04-10 10:44:01 287

原创 迁移助手迁移文件之后homebrew权限问题

https://digitizor.com/fix-homebrew-permissions-osx-el-capitan/ 写道sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local 

2016-12-26 15:34:41 813 1

原创 C Shell 流重定向的操作符说明

http://stackoverflow.com/questions/6762348/what-do-and-do-in-tcsh 写道In tcsh redirection the ! symbol means overwrite the existing file even if noclobber is set.In other words, if noclobber is set t...

2016-12-05 16:31:43 253

原创 libtool 2.2.6b以后链接时间接依赖丢时导致的undefined symbol的解决方法

在debian 或者ubuntu这类操作系统上libtool从2.2.6b版本开始,间接依赖库会在链接时被丢掉。导致会发生莫名奇妙的undefined symbol。 http://stackoverflow.com/questions/11802727/libtool-doesnt-provide-library-dependencies-to-link 写道4down vote...

2016-11-24 20:26:08 172

原创 windows中 Vim 运行python命令崩溃的解决方法

http://stackoverflow.com/questions/35597157/gvim-crashes-when-running-python 写道Finally solved the problem.It turned out that Python uses PYTHONPATH variable to resolve the PYTHON folder (used to l...

2016-09-07 16:28:38 325

原创 动态库文件依赖修改工具 chrpath, install_name_tool

    部署不同版本程序时比较有用的一个东西。mark一下。    chrpath 这个工具可以将写死的依赖去掉. Usage: chrpath [-v|-d|-c|-r <path>] <program> [<program> ...] -v|--version Display program vers...

2016-09-05 20:24:58 4333

原创 log4j PatternLayout里各参数对性能的影响

在官网上有介绍,但还是复制一下,以免忘掉 转自  https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.htmlOverview Package  Class Use Tree Deprecated Index Help ...

2016-08-10 11:12:58 427

原创 pthread_rwlock_t 未定义的问题

最近在linux上次编译时出现pthread_rwlock_t没有定义的现象.但是已经include了pthread.h,网上查了一些资料后发现,原因竟然是因为显示使用了-std=c99参数导致. 在c99没有完全实现时,如果不显示指定-std, 则gcc默认使用gnu89(或gnu90)标准.一般而言,               gnuXX标准 = cXX标准 + GNU ...

2016-08-06 15:02:25 1228

更改kde login时的cursor theme

装过几个桌面环境之后,发现原来的登录界面的光标颜色由白变黑了。找来找去最后在一个bug贴里找到方法. https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/288502 写道$ sudo update-alternatives --config x-cursor-themeThere are 7 choices fo...

2015-07-26 13:01:19 530

原创 [转]web.xml 各版本示例

    转自 http://blog.csdn.net/z69183787/article/details/36008097   web.xml 2.3<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD We...

2015-06-19 15:42:41 133

原创 debian 7 gvim 奇怪warning

最近在命令行里启动gvim 时总是会弹出一个warning,非常烦人。warning 如下:(gvim:16014): GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type `<invalid>(前面的数字会变) http://askubuntu.com/questio...

2015-01-18 15:00:36 227

原创 不让archiva 2.1.1在${user.home}/.m2下自动生成archiva.xml的解决方法

  目前apache archiva的最新稳定版已经到了2.1.1. 相比1.3.x版本来说,界面看起来更卡通了一些,也加上了大量的ajax。不知道这样是好还是不好。反正对于纯文本之类的w3m来说,肯定是件坏事。  这个版本的archiva有个毛病,会自作主张地在${user.home}/.m2/下面产生一个archiva.xml,而不管你是否在安装目录下面已经预置了一个archiva.x...

2015-01-18 14:58:33 124

原创 Java memory leaks (转)

http://www.androiddesignpatterns.com/2013/01/inner-class-handler-memory-leak.html 写道While not readily obvious, this code can cause cause a massive memory leak. Android Lint will give the following ...

2014-09-25 15:55:36 122

原创 蚂蚁爬橡皮筋问题

         关于这个问题很多地方都有讨论。例如 http://blog.csdn.net/kofsky/article/details/2863590 还有 http://blog.csdn.net/born1985man/article/details/4676422 这里写点不一样的理解与解法。        原题为 “一条可以均匀拉伸无限拉伸的橡皮筋,初始长度为1米,一个累不死...

2014-07-23 17:15:08 2064

原创 手动收邮件

       最近想用mutt体验一下作高手的感觉,发现高手这个虚名真是害人不浅。       引用大家常说的一句话。mutt是一个整合工具,本身的作用并不大。收发都依赖别的程序完成。其实mutt也有一点收发的功能。用mutt -v 看一看有哪些带+号。这些带+号的就说明是有的功能,那些没有的功能就继续怨念吧。       姑且就认为自己的mutt不带收发功能吧。然后我们收发邮件可以分别利...

2013-08-10 19:55:41 2947

原创 二级指针 const 参数

http://www.parashift.com/c++-faq-lite/constptrptr-conversion.html 写道 [18.17] Why am I getting an error converting a Foo** → Foo const**?Because converting Foo** → Foo const** would be invalid and ...

2013-01-11 22:33:19 234

tricks

#include <typeinfo>#include <cstdlib>#include <iostream>#include <string>#include <vector>#include <list>using namespace std;template< template...

2012-12-31 14:21:41 78

装完 debian 通常遇到的几个问题

 装完debian 6.0.6 之后将会遇到以下几个问题0.虚拟光驱1.分辨率2.触摸板3.系统声音4.多个播放器同时工作5.杂音 很多软件都需要有安装盘。但是对于用usb 安装系统的人来说,这太糟糕了。mount /home/yourname/Download/debian.iso /media/debian-iso -o loop -t iso9660...

2012-12-22 01:25:22 257 1

多输出带前缀输出流

http://stackoverflow.com/questions/2212776/overload-handling-of-stdendl 写道#include <iostream>#include <sstream>class MyStream: public std::ostream{ // Write a stream buffer th...

2012-10-29 11:37:12 95

inherit the ostream

class cdebug_stream :public ostream{public: typedef cdebug_stream& (*manip_fnptr)(cdebug_stream&); void attach(ostream& os) { m_outs.push_back(&os); } void detach(ostream&amp...

2012-10-26 16:02:43 81

compile script for mingw64

#! /bin/sh#cd /d/opensource#wget mingw-w64#wget gcc#wget binutils#make -p /d/opensource#cd /d/opensource/#cvs -z9 -d:pserver:anoncvs@sourceware.org:/cvs/src co binutils#svn co svn:...

2012-10-24 20:34:49 108

原创 MinGW64 与 MinGW共存

1.下载最新MinGW64.从官网下载自动编译版本2.找到已经解压过的MinGW(不是MinGW64)。进入%MINGW_HOME%\msys\1.0\etcvim fstab X:\location\to\mingw64 /mingw64X:\location\to\mingw /mingw vim profile 把if [ $MSYSTEM == ...

2012-10-19 11:49:12 448

原创 freeglut Makefile.am

SOURCES = \./src/freeglut_callbacks.c \./src/freeglut_cursor.c \./src/freeglut_display.c \./src/freeglut_ext.c \./src/freeglut_font.c \./src/freeglut_font_data.c \./src/freeglut_gamemode...

2012-10-12 14:30:10 105

原创 非统一概率随机

copied fromhttp://forum.xda-developers.com/showthread.php?t=856735namespace RandomWeighting{ class Program { static void Main(string[] args) { char[] Select...

2012-10-11 11:41:42 69

原创 automake windows dll

最近的libtool工具可以生成各种库文件.包括静态库与动态库.使用这个即可 示例configure.ac # -*- Autoconf -*-# Process this file with autoconf to produce a configure script.AC...

2012-05-06 01:08:36 164

原创 模板参数 函数指针

http://stackoverflow.com/questions/5507377/template-type-deduction-for-a-pointer-to-member-function 写道 For a.connect<double> (&GApp::foo), both the foo(double) and foo(double, double) wi...

2011-12-22 13:12:04 123

原创 [转MSDN]C# Thread.Abort

Some people says that Thread.Abort is evil.But the following is what the msdn says.http://msdn.microsoft.com/en-us/library/system.threading.threadabortexception.aspxusing System;using System.Thr...

2011-11-02 21:41:39 176

原创 ODBC的一个 stack around the variable 'xx' was corrupted

OS:windows7 32bitg++ 4.5.2下编译正常,无错。vs2010下出问题stack around variable 'ac' is corruptted boolConnection::getAutocommit(){ SQLSMALLINT ac = 0; SQLRETURN ret = m_handle->getAttribute( S...

2011-10-30 23:04:52 79

原创 [转MSDN]Basic ODBC Application Steps

ODBC应用程序API使用顺序http://msdn.microsoft.com/en-us/library/ms714078%28v=VS.85%29.aspx 

2011-10-07 14:41:54 67

原创 cautions of SQLGetData

http://msdn.microsoft.com/en-us/library/ms715441.aspx 写道There are two exceptions to these restrictions and a driver's ability to relax them. First, SQLGetData should never be called for a forward-...

2011-09-21 13:03:14 119

原创 ODBC Cursor

 http://msdn.microsoft.com/en-us/library/aa215458%28v=sql.80%29.aspx 写道To set cursor options Call SQLSetStmtAttr to set or SQLGetStmtAttr to get the statement options that control cursor beha...

2011-09-14 15:23:01 183

原创 SQLBindCol & SQL_ATTR_ROW_ARRAY_SIZE

如果只设置 SQL_ATTR_ROW_ARRAY_SIZE > 1,而在绑定列的时候依然是SQL_ATTR_ROW_ARRAY_SIZE == 1时的缓存大小,在vc运行中将会导致一个HEAP_CORRUPT。在mingw中可能什么也不报,但是程序就停止在读数据的地方。所以一定要在SQL_ATTR_ROW_ARRAY_SIZE > 1时,设置正确的缓冲区。   70  ...

2011-09-10 01:38:52 349

event

#ifndef ODBCLIB_CORE_EVENT_EVENT_H#define ODBCLIB_CORE_EVENT_EVENT_H#include "Event.template"#include "Event.implement"#endif #ifndef ODBCLIB_CORE_EVENT_EVENT_TEMPLATE#define ODBCLIB...

2011-08-19 14:42:23 80

c++ Delegate

#ifndef DUMMYCLASS_H#define DUMMYCLASS_Hnamespace delegate{ class DummyClass{};}#endif #ifndef METHODSTORAGE_H#define METHODSTORAGE_H#include "DummyClass.h"namespac...

2011-08-06 19:59:26 106

Nullable (bug)

 #ifndef NULLABLE_H#define NULLABLE_H#include "odbclib.h"namespace odbclib{template<typename T>class Nullable{ typedef T const& const_reference; typedef T const* cons...

2011-06-26 23:45:40 98

C++ 接异常时的注意

 void test1(){ try { try { throw runtime_error("asdfasdf"); } catch(std::exception &e) { throw e; } } catch(std::runtime_error &e) { throw e; } ...

2011-06-24 23:55:45 83

原创 类成员函数模板特化 默认参数

 #ifndef MEMORYBLOCK_H#define MEMORYBLOCK_H#include "odbclib.h"#include <cstdlib>using std::min;namespace odbclib{ class MemoryBlock { public: typedef unsigned char ...

2011-06-19 11:23:04 212

关于抛出异常和清栈

构造函数中异常: 1.在无继承关系的前提下,构造函数中抛出异常未尝不可。 因为在对象没能构造完整的情况下,是不会去调用析构函数的。2.在有继承关系的情况下,构造函数中抛出异常可能会引起问题 2.1如果基类中有纯虚函数,而且在基类的析构函数中有被调用的话,会得到一个 pure virtual function call的异常2.2如果基类中有纯虚函数,但是基类的析构函数中没有...

2011-06-18 22:10:22 145

原创 make 死循环

因为用了reflector,又过期了,结果把日期改为5月份,结果导致make的时候,一进行到产生依赖关系时,就死循环,google之: http://kevinleo.blog.51cto.com/341461/583253 写道今天闲着没事,新装了一台机器,在编译的时候MAKE一直出现死循环,搞的头都大了。经过一个小时的分析,我估计问题是出在系统时钟上。。。改完以后果然是这样,所以以...

2011-06-14 00:53:24 410

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除