自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(108)
  • 问答 (1)
  • 收藏
  • 关注

原创 how to restore network after clone or create new vm based on existing image

        when clone or create a new vm based on existing image, you may notice the network is malfunction. One possible solution is to delete existing net rules such as sudo rm -f /etc/udev/...

2015-01-04 13:06:10 120

原创 static building lxml

well  it is not really straightforward.. when building with static deps like python setup.py build --static_deps you may see two possible errors 1: when you saw crc iconv.xx error, you c...

2014-08-13 19:15:36 148

原创 build pyrun/python from source

quite easy on ubuntu. 1: build sqlite first.. use the latest autoconf version2: apt-get install libbz2-dev3: apt-get install zlib1g-dev4: apt-get install libssl-dev5: apt-get install lib...

2014-08-01 19:39:49 141

原创 Ice 3.4.2 on ubuntu 12.04

 it is much easy to install Ice 3.4.2 on Ubuntu 12.04. simply  sudo apt-get install zeroc-ice34  for python config. make sure /usr/lib/pymodules/python2.7 is the first one in PYTHO...

2014-05-22 02:30:50 137

原创 how to use google play services in IDEA

project structure: ->   modules --> dependecies                  --> add module dependency                        --> add google play services folder                 --> add ja...

2014-04-14 11:24:38 177

原创 install gnome desktop

yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" "Internet Browser"  /etc/inittab for changing X window

2014-04-03 11:07:50 102

原创 install gcc and other things

yum groupinstall "Development Tools" "Development Libraries"

2014-04-03 10:59:46 88

原创 network config on centos

 edit /etc/sysconfig/network-scripts/ifcfg-eth0 (first network card, ifcfg-eth1 is the second) DEVICE=eth0BOOTPROTO=staticIPADDR=192.168.3.110NETMASK=255.255.255.0ONBOOT=yesDHCPCLASS=...

2014-04-03 09:50:53 85

原创 remove network manager

yum remove NetworkManager

2014-04-03 09:46:27 381

原创 install vncserver on lubuntu

os: ubuntu server 12.04 LTS with lubuntu desktop sudo apt-get install tightvncserver, autocutsel vncserver  vncserver -kill :1 now edit ~/.vnc/xstartup replace /etc/X11/Xsessio...

2014-03-21 12:19:05 198

原创 use yum to install clamav on centos

well install anti-virus on linux is a stupid idea but sometimes we don't have choice. 1: update yum firsttry:rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6....

2014-02-21 16:11:11 84

原创 build apsw manually

download sqlite sources and copy all files to apsw/src open setup.py find in finalize_options of apsw_build_ext class comment ext.libraries.append('sqlite3') find ext_modules=[Extensi...

2014-01-06 01:22:15 104

原创 config ufw for router purpose

sometimes we need to share our internect connection without losing any protection, here ufw can help us. 1:open /etc/default/ufwchange DEFAULT_FORWARD_POLICY = "ACCEPT"             DEFAULT...

2014-01-03 11:22:14 88

原创 install ubuntu server from usb

If you want to use an usb stick to install ubuntu server and you use windows, the fastest way is to  use universial usb installer (the latest version) to create a usb installer.   

2013-12-26 18:38:43 197

原创 python, vs 2010 & manifest problem

    It looks like python community doesn't intend to "fix" this problem due to it is probably not a bug. a quick work around is  open /distutils/msvc9compiler.py find def manifest_setup...

2013-11-02 13:33:45 72

原创 setting css properties with hyphens on the fly

well it has nothing to do with dojo but I don't bother to create another tag, so I keep using it. when dealing with setting css properties on the fly we may come across some names with hyphens li...

2013-08-23 16:13:00 116

原创 customized event

make sure the type of event is lower case otherwise it won't work.  

2013-07-03 10:15:48 94

原创 display pdf in div

<div>    <object data="gwcs.pdf" type="application/pdf" width="500" height="500">        alt : <a href="gwcs.pdf">gwcs.pdf</a>    </obje

2013-06-20 09:04:53 125

原创 fadeTo in dojo

Jquery has a method called fadeTo can do animation for opacity change. equivalent version of dojo is require(["dojo/_base/fx"],function(BaseFx) {   BaseFx.anim("divId", {opacity: your desired v...

2013-06-03 15:00:10 81

原创 make sure async:true in dojoConfig

when dojo version >= 1.7 make sure async: true is in you dojoConfig, otherwise, it may incur some very weird problems which wasted me two hours to figure out.  

2013-05-27 12:19:03 70

原创 show up label for dynamic created checkbox

 when creating checkbox on fly like var cb = new CheckBox({}); you may find there is no label, the default checkbox is based on <input checkbox> so you need to add label manually. Based...

2013-05-23 18:12:25 145

原创 "vertical layout" in contentpane

well it's actually not a vertical layout but a work around.  I spent a few hours on internet for how to place some widgets in contentpane with vertical layout. (the default layout is horizontal). and...

2013-05-22 19:27:35 67

原创 some notes about git

first step: git config --global user.name "John Doe" git config --global user.email [email protected] to add user name & email then git config --list to check. git help confi...

2013-05-20 18:24:55 57

原创 toolbar events trigger handling

when dealing with toolbar events like onDrawEnd with latest dojo version (1.9 herein) the dojo/on or dojo/_base/connect is unable to work with it. We can use dojo/aspect instead. require(['do...

2013-05-16 18:01:58 210

原创 handcrafted json rpc on dojo

default method is GET, need POST.  <script>    require(["dojo/on","dojo/dom", "dojo/request/xhr", "dojo/json", "dojo/domReady!"],            function(On, Dom, Xhr, Json) {       

2013-05-16 12:19:11 82

原创 some changes on arcgis with dojo 1.7 or above

when dojo 1.7 and AMD style is adopted, examples on arcgis website may not work directly. this post mark some changes 1: dojo.connect  --> dojo/onevents name might be changed from "onXXX" to...

2013-05-15 17:27:17 85

原创 android,check key on windows

keytool -list -v -keystore xx.keystore keytool -list -v -keystore xx\.android\debug.keystore  

2013-05-06 23:37:28 69

原创 numpy 1.7.0 fails with cx_freeze 4.3.1

It is a work around: find /numpy/core/__init__.py, and omit 'del sys' which locates at the bottom of this file. numpy 1.6.2 doesn't need 'del sys'. update: use cx_freeze 4.3.2. this prob...

2013-02-24 16:13:29 125

原创 htc g11 hboot 2.02.0000 unlock (android 4.0)

1: go to www.htcdev.com & follow instructions of unlock bootloader.. 2: go to http://bbs.gfan.com/android-4448713-1-1.html and check details. do "fastboot flash recovery recovery.img" ...

2013-01-12 17:21:03 94

原创 build psycopg2 on windows with mingw64

caution: version match problem. if the target is 32bit we need to modify  cygwincompiler.py in /your_py_path/lib/disutils/cygwincompiler.py find class Mingw32CCompiler and its __init__ we ...

2013-01-03 20:36:23 76

原创 build postgres on ubuntu

prerequisities: 1: apt-get install build-essential1: apt-get install libreadline-dev2: apt-get install zlib1g-dev4: sudo make install5: done  it is so easy comparing with oracle inst...

2012-12-22 15:13:13 75

原创 define dynamic variable

(def a 12)(binding [a 13] a) fails on clojure 1.4 or later (I guess) instead we need to do: (def ^:dynamic a 12)  

2012-12-20 22:14:22 91

原创 manually install postgis 2.0.x on windows 7

when doing installation postgis on windows 7 manually, You may encounter a problem when  "create extension postgis" is operated.  pg may complain some errors about insecure usage of backslash ...

2012-12-12 16:46:40 73

原创 cross compile mono for windows.

on ubuntu prerequisities: 1 build-essential2 autoconf3 libtool4 gettext5 gcc-mingw32 download the latest source package. and run ./build-mingw32.sh -d /usr/i586-mingw32msvc...

2012-09-27 12:24:12 121

原创 Determining if a point lies on the interior of a polygon

link: http://paulbourke.net/geometry/insidepoly/ here is the python code snippet: def point_inside_polygon(cls, lon,lat, coors):        n = len(coors)        inside = False        p1x,p1...

2012-09-25 02:23:06 71

pypy的一个测试

pypy-1.9 昨天已经发布,据称性能又有所提高。 于是我特地用一个东西来测试一下: 就是bson的 encode效率 pymongo的bson自带一个用c写的扩展用于speed up速度。 在我的t400, win7下测试。大约一秒钟可以encode  10万的数据。 用pypy-1.9速度能达到多少呢?  同样的bson without c_exten...

2012-06-09 16:15:28 166

原创 JValue supports 32 bit integer with bson

Json.net supports Bson however JValue convert every integer value to int64 bit.. In bson. int32 need 4 bytes and int64 need 8 bytes...so there is a room to improve it. find JValue.cs  ad...

2012-05-17 16:42:25 69

原创 a naive way to use dictcursor of psycopg2 with twisted adbapi

make a new file called fakedb.py and copy some contents from psycopg1.py from psycopg2 package  class connection(_2connection):    """psycopg 1.1.x connection."""     def cursor(self):...

2012-05-03 03:14:31 63

原创 build psycopg2 on windows with vs

prerequisites: 1: postgresql 2: vs steps: 1: run python setup.py build build_ext --pg-config x:/pgsql/bin/pg_config.exe 2: make sure following dlls are on the path: libpq.dll...

2012-05-02 02:16:28 65

原创 build Ice 3.4.2 on redhat 5.1 64bit

build python 2.7.3 first...the default python version is 2.4.3...out of support.. 1: steps of python 2.7.3 building: build sqlite3 first..  we omit Tkinter building here due to we don't need...

2012-04-16 20:53:01 73

空空如也

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

TA关注的人

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