自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 如何debug部署到客户环境里面的release版本的产品

有时候有些问题只能在客户环境里面重现,从log文件里面又发现不了什么线索,于是想着是否可以debug,想来想去没有直接的办法,只能是work around:1. 在自己的环境里面编译同样版本的产品,编译之前将优化选项-O2替换成-g,保证debug symbol在生成的binary或者executable文件中,并拷贝到客户的环境里面。2.将可能产生问题的那部分源代码folder(e.g.

2015-09-11 22:30:53 553

原创 如何恢复被误删的 symbolic link libc.so.6

有时候也许你想更改一下libc.so这个link指向的libc的版本,于是你先把libc.so删除了,然后执行下面这个命令使其指向一个新的版本:/bin/ln -s /lib/libc-2.11.3.so /lib/libc.so.6结果发现出现这样的错误:/bin/ln: error while loading shared libraries: libc

2015-09-09 23:16:43 993

转载 Get UUID

#ifndef _LINUX#include #pragma comment(lib, "Rpcrt4.lib")#else#include #endifstring GetUUID(){ string strUUID;#ifndef _LINUX UUID uuid; ::ZeroMemory(&uuid, sizeof(UUID)); ::Uui

2014-11-19 18:38:26 1720

转载 java-file stream

the hierarchy of the file stream in java

2014-10-05 21:35:36 398

转载 position

http://www.w3school.com.cn/cssref/pr_class_position.asp可能的值值描述absolute生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定位。元素的位置通过 "left", "top", "right" 以及 "bottom" 属性进行规定。

2014-09-27 10:30:18 392

转载 margin

http://www.w3schools.com/css/css_margin.asp

2014-09-27 08:11:18 443

转载 autocomplete

http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_autocomplete

2014-09-27 07:54:01 498

转载 center display

For non-html5:This text will be center-aligned.For html5, this tag is no longer available. Use css instead.h1 {text-align:center;}p {text-align:center;}This is a heading

2014-09-23 20:55:23 439

转载 jQuery的几个常用方法

jQuery 属性操作 - hasClass() 方法

2014-09-21 22:49:32 321

转载 about dll export and import

https://gcc.gnu.org/wiki/Visibility// Generic helper definitions for shared library support#if defined _WIN32 || defined __CYGWIN__ #define FOX_HELPER_DLL_IMPORT __declspec(dllimport)

2014-09-21 22:20:24 562

转载 Java Annotations

Annotation is code about the code, that is metadata about the program itself. In other words, organized data about the code, embedded within the code itself. It can be parsed by the compiler, annotati

2013-10-25 10:24:56 540

转载 Annotations in JUnit

http://www.devmanuals.com/tutorials/java/JavaTestingTools/junit/AnnotationsInJUnit.htmlhttps://github.com/junit-team/junit/wiki/Getting-started Annotations are like meta-tags that you can add to

2013-10-24 19:10:38 656

转载 Difference between Comparator and Comparable in Java

简单说:实现Camparable接口可以直接使用sort方法Collections.sort(List list)排序实现Comparator接口的可以用Collections.sort(List list, Comparator c)排序一个类实现了Camparable接口则表明这个类的对象之间是可以相互比较的,这个类对象组成的集合就可以直接使用sort方法排序。Comp

2013-10-24 13:46:15 692

转载 Java equals() and hashCode() Contract

http://www.programcreek.com/2011/07/java-equals-and-hashcode-contract/The Java super classjava.lang.Object has two very important methods defined:public boolean equals(Object obj)publi

2013-10-22 15:56:03 698

转载 How to make a java class immutable

An immutable class is one whose state can not be changedonce created. There are certain guidelines to create an class immutable. Inthis post, we will revisit these guidelines.Sections:Benefits

2013-10-21 21:59:18 862

转载 Working with hashCode and equals methods in java

In thispost, i will point out my understanding about hashCode() and equals() method. Iwill talk about their default implementation and how to correctly overridethem. I will also write about implemen

2013-10-21 19:23:50 696

转载 find command in UNIX

find command is one of the versatile command in UNIX and Linux  and I used it a lot in my day to day work.I believe having knowledge of find command in UNIX andunderstanding of its different u

2013-10-20 22:18:35 544

转载 ReentrantLock

ReentrantLock in Java is added on java.util.concurrent package in Java 1.5along with other concurrentutilities like CountDownLatch, Executors and CyclicBarrier.ReentrantLock is one of the most

2013-10-19 21:15:54 636

转载 threadlocal

ThreadLocal in Java is another way to achieve thread-safety apart from writing immutable classes.If you have been writing multi-threaded or concurrent code in Java then you must be familiar with c

2013-10-19 20:19:11 355

原创 cluster index in sqlserver

A clustered index determines the physical order of data in a table. A clustered index is analogous to a telephone directory, which arranges data by last name.Because the clustered index dictates t

2013-10-05 13:32:02 583

转载 the equivalent of _vscprintf && _vscwprintf under Linux

Reference Link:http://msdn.microsoft.com/en-us/library/28d5ce15(v=vs.71).aspxhttp://stackoverflow.com/questions/16351523/vscwprintf-on-mac-os-x-linuxMicrosoft describes the functions asretur

2013-07-08 13:46:09 3975 2

转载 The instanceof Keyword

http://www.java2s.com/Tutorial/Java/0060__Operators/TheinstanceofKeyword.htmThe instanceof keyword can be used to test if an object is of a specified type.public class MainClass { public s

2013-06-23 02:09:00 446

转载 java.lang.NullPointerException

java.lang.Object java.lang.Throwable   java.lang.Exception     java.lang.RuntimeException       java.lang.NullPointerException public class NullPointerException extends RuntimeExceptionT

2013-06-22 19:59:04 473

转载 Java String Split Example

*2.Java String split example.3.This Java String split example describes how Java String is split into multiple4.Java String objects.5.*/6. 7.public class JavaStringSplitExample{8.

2013-06-21 06:00:42 762

原创 C# - String Split

regular expression and string methods:    http://msdn.microsoft.com/en-us/library/1bwe3zdy.aspx    http://hi.baidu.com/sqeaawusycbauwq/item/9d8a1bfd53f977d442c36a30

2013-06-21 05:49:46 577

原创 sereral common used sh command

1. Get the total file number under the current folder    find ./ -type f | wc -l

2013-06-21 05:18:48 553

转载 lib and dll

lib有staticlib和dynamic lib之分。静态lib将导出声明和实现都放在lib中,编译后所有代码都嵌入到宿主程序, 链接器从静态链接库LIB获取所有被引用函数,并将库同代码一起放到可执行文件中。动态lib相当于一个h文件,是对实现部分(.dll文件)的导出部分的声明,编译后只是将导出声明部分编译到宿主程序中,运行时候需要相应的dll文件支持, 包含了函数所在的DLL文件和文

2013-06-15 18:58:41 493

原创 Eclipse 常用快捷键

Eclipse 常用快捷键1.      【Ctrl+K】【Ctrl++Shift+K】快速向下和向上查找选定2.      【Ctrl+O】显示类中方法和属性的大纲3.      【Ctrl+M】窗口最大化和还原,4.      【Ctrl+Shift+T】查找Workspace构建路径中的可找到Java类文件5.      【Ctrl+Shift+R】查找Workspace

2013-05-11 11:05:03 425

原创 如何将一个已有的vdi文件attach到一个虚拟机上

环境:Linux Suse + Vbox一个vbox的虚拟机的主体其实就是一个vdi文件,如果虚拟机由于某种原因无法正常运行,而其中又保存了一些重要数据,此时如果要访问这些数据,可以新建一个虚拟机,然后将原有的虚拟机vdi文件作为一个harddisk attach到新建的虚拟机上,从而可以存取原有的数据。具体步骤为:1.      通过SATA_Controller将原有的vdi文

2013-03-30 17:45:57 1323

原创 Linux下的gettimeofday

gettimeofday用于获取当前时间。相应头文件:#include ; #include 函数说:int gettimeofday ( struct timeval * tv , structtimezone * tz )gettimeofday()会将当前时间timeval返回,当地时区信息则放在timezone中。返回值成功则返回0,失败返回-1,错误代码存于errno.

2013-03-20 13:22:40 1990

原创 关于 python中的.pyc 文件

.py源文件在执行时会首先被编译成.pyc(compiled py)文件,.pyc文件中存放着byte code,可以直接被PVM(The Python Virtual Machine )执行。如果pyc文件存在,那么下次执行相应的py文件时,会直接执行pyc文件,执行速度较第一次执行py文件时会快一些。借用learning python一书中的描述:Byte code is the

2013-03-18 22:34:14 1073

转载 static lib和dynamic lib

lib有staticlib和dynamic lib之分。静态lib将导出声明和实现都放在lib中,编译后所有代码都嵌入到宿主程序, 链接器从静态链接库LIB获取所有被引用函数,并将库同代码一起放到可执行文件中。动态lib相当于一个h文件,是对实现部分(.dll文件)的导出部分的声明,编译后只是将导出声明部分编译到宿主程序中,运行时候需要相应的dll文件支持, 包含了函数所在的DLL文件和文

2013-03-15 14:17:28 743

原创 怎么写makefile?

头文件:h1.h, h2.h. h3.hc文件:c1.c, c2.c, c3.c, c4.cdependent relation:      h1.h 依赖于h2.h和h3.h      所有c文件依赖于h1.hmakefile1:头文件改变不会引起rebuild。OBJS := c1.o c2.o c3.o c4.oCFLAGS+= -g -wCC = gccma

2013-03-14 17:06:27 794

转载 从 Java 程序调用 C/C++ 代码

http://www.ibm.com/developerworks/cn/education/java/j-jni/section2.html概述当无法用 Java 语言编写整个应用程序时,JNI 允许您使用本机代码。在下列典型情况下,您可能决定使用本机代码:希望用更低级、更快的编程语言去实现对时间有严格要求的代码。希望从 Java 程序访问旧代码或代码库。需要标准 Jav

2013-03-12 22:07:28 706

转载 Controlling serialization

the default serialization mechanism is trivial to use. But what if you have special needs? Perhaps you have special security issues and you don’t want to serialize portions of your object, or perhaps

2013-03-11 13:30:11 382

转载 Object serialization

From Thinking in Java.Java's object serializationallows you to take any object that implements theSerializableinterface and turn it into a sequence of bytes that can later be fully restored

2013-03-11 13:09:56 450

原创 VC++中的stdafx.h与stdafx.cpp

stdafx.h// stdafx.h : include file for standard system include files,// or project specific include files that are used frequently, but// are changed infrequently//#pragma once#include "targe

2013-03-10 13:05:56 1001

转载 C++中的预编译.PCH

Microsoft C 和 C++ 编译器提供了用于预编译任何 C 或 C++ 代码(包括内联代码)的选项。利用此性能特性,可以编译稳定的代码体,将已编译状态的代码存储在文件中,以及在随后的编译中,将预编译的代码与仍在开发的代码结合起来。由于不需要重新编译稳定代码,因此后面每次编译的速度都要快一些。预编译代码有助于在开发周期中缩短编译时间,特别是在以下情况中:总是使用不经常改动的大

2013-03-10 00:32:40 1353

转载 Makefile中的常用函数

原文link:http://blog.csdn.net/liangkaiming/article/details/6267357 Makefile规则中,通配符会被自动展开。但在变量定义和函数引用时,通配符将失效。这种情况下如果需要通配符有效,就需要使用函数“wildcard”。用法是:$(wildcard PATTERN...) ,它被展开为已经存在的、使用空格分开的、匹配此

2013-03-09 18:13:00 493

转载 Makefile中的几个自动化变量

$@表示规则中的目标文件集。       在模式规则中,如果有多个目标,那么,"$@"就是匹配于目标中模式定义的集合。$      如果依赖目标是以模式(即"%")定义的,那么"$$^表示所有的依赖目标的集合,以空格分隔。      如果在依赖目标中有多个重复的,那个这个变量会去除重复的依赖目标,只保留一份。 $+这个变量很像"$^",也是所有依赖目标的集合,只

2013-03-08 19:32:53 372

空空如也

空空如也

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

TA关注的人

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