自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

^_^-Beluga, ^_^-Stefli

Everyday is full of joy!

  • 博客(240)
  • 收藏
  • 关注

转载 Retrieve data from xml and show in listField

<br />Application code:<br />package com.myapp.blackberry;import net.rim.device.api.ui.*;import net.rim.device.api.system.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.xml.parsers.Do

2010-11-20 23:22:00 515

转载 iPhone style title bar in BlackBerry

<br />Quote:<br />http://www.naviina.eu/wp/blackberry/iphone-style-field-for-blackberry/<br /> <br />iPhone-style Field for BlackberryThe source illustrates how to achieve a linear, top to bottom, gradient and also some basic dynamic sizing and font sele

2010-11-10 09:29:00 1003

转载 Introduction to unittest using python

<br />Introduction to unittestStarting Testing with Python<br />ContentsIntroductionTestingThe unittest ModuleLoaders, runners and all that stuffAutomatic test discoveryThe assert methodsThe assert statementsetUp and tearDownDuck typing and mock objectsMon

2010-10-26 11:02:00 912

转载 Introduction to unittest using python

<br />Introduction to unittestStarting Testing with Python<br />ContentsIntroductionTestingThe unittest ModuleLoaders, runners and all that stuffAutomatic test discoveryThe assert methodsThe assert statementsetUp and tearDownDuck typing and mock objectsMon

2010-10-26 11:01:00 824

原创 Useful Shell Command

ps -ef|grep python|grep -v grep|awk {'print $ 2'}

2010-10-08 12:59:00 556

转载 虚拟机上网设置

<br /> <br />NAT的DHCP配置:<br />这个网上别人写过,自己实验了下,没有问题。<br />1 .最重要的是你的两个服务必须开启:VMware DHCP Service 和VMware NAT Service。<br />具体操作如下: 开始---设置--控制面板---管理工具---服务(在运行里输入services.msc回车即可),确保 VMware DHCP Service 和VMware NAT Service 服务已经启动.<br />2 把你的虚拟网卡VMnet8设置为自动

2010-10-08 12:58:00 1049

转载 虚拟机上网设置

NAT的DHCP配置:这个网上别人写过,自己实验了下,没有问题。1 .最重要的是你的两个服务必须开启:VMware DHCP Service 和VMware NAT Service。具体操作如下: 开始---设置--控制面板---管理工具---服务(在运行里输入services.msc回车即可),确保 VMware DHCP Service 和VMware NAT Service 服务已经启动.2 把你的虚拟网卡VMnet8设置为自动获得IP、自动获得DNS服务器,启用。3 把你虚拟机中操作系统(我的是RE

2010-09-17 22:20:00 523

原创 Encode issue in python, 0x96, ascii

try:return text.decode('utf-8')except:try:        return text.decode('cp1252', 'replace')except:try:return text.decode('iso-8859-1')except:pass

2010-09-17 10:46:00 638

原创 How to filter the ManyToManyField or ForeignKey in modelForm?

<br />If you don't make some changes on modelForm, it will generate all items of related model to html.<br />So, if you want to only show the related items, you should add some codes to views.<br /> <br />def xxx_view(request):<br />form = XXXForm()<br /> 

2010-09-03 16:06:00 478

原创 How to make a direct download link to a static file

<br /> I want to make a link to allow user to download the static file.with open(path, 'rb') as f: response = HttpResponse(f.read())response['Content-Type'] = 'application/octet-stream';response['Content-Disposition'] = 'attachment; filename="%s"'

2010-08-17 12:41:00 514

转载 How to flash the recovery

Copy recovery-RA-sapphire-v1.7.0G.img to the root of your sdcardstart the terminal app#flash_image recovery /sdcard/recovery-RA-sapphire-v1.7.0G.img

2010-07-13 12:23:00 379

原创 Install jdk1.6 on Ubuntu

<br />Enter below commands to install jdk1.6<br /> <br />sudo apt-get install sun-java6-jdk sun-java6-plugin sun-java6-fonts<br />sudo update-java-alternatives -–set java-6-sun

2010-07-08 13:47:00 496

原创 Sed command usage

<br />Replace string using REGExpression<br />sed 's/<pattern>/<string/g' file<br /> <br />Example:<br />sed 's/[0-9]//g' test.txt<br /> <br />Remove lines<br />sed '/<pattern>/d' file<br /> <br />Example:<br />sed '/[^//]$/d' test.txt<br /> 

2010-07-07 10:35:00 425

转载 Ubuntu mod-rewrite has no right to access remote url(403 forbidden)

I had a big problem getting an Ubuntu Feisty Fawn Apache2 instance to use proxying rewrite rules.Firstly, mod_rewrite is not enabled by default, which is probably no bad thing. So ’sudo a2enmod rewrite’ fixes that.Now I can use a rule to allow my m

2010-06-24 13:08:00 1452

原创 The application **** has attempted to open a connection to a location inside the firewall and outside the firewall which is not

<br />If you encounter following warning when launching application, please refer to <br />http://www.bber.info/post/it_policy <br />Download the tool and wipe all settings, after restart the blackberry, the application works fine!!<br /> <br />***********

2010-06-21 14:06:00 1032

原创 Continuous restarts with warning "Blackberry preprocessor is being configured...."

<br />Add following settings to eclipse.ini, then solve the issue<br /> <br />-Dosgi.framework.extensions=org.eclipse.mtj.core.hooks,net.rim.ejde

2010-06-12 17:00:00 647

转载 影响个人成功的18个经典故事(带图)

影响个人成功的18个经典故事(带图)    故事一:疯子与呆子一个心理学教授到疯人院参观,了解疯子的生活状态。一天下来,觉得这些人疯疯癫癫,行事出人意料,可算大开眼界。想不到准备返回时,发现自己的车胎被人卸掉了。“一定是哪个疯子干的!”教授这样愤愤地想道,动手拿备用胎准备装上。事情严重了。卸车胎的人居然

2010-04-30 00:02:00 943

转载 Install SopCast Player in Ubuntu 9.10 from Repository

Quote:http://www.kabatology.com/11/08/install-sopcast-player-in-ubuntu-9-10-from-repository/SopCast Player makes use of the P2P(Peer-to-Peer) technology to bring live streaming video and audio t

2010-04-29 21:37:00 734

原创 Add new line and delete line using javascript

ADD:var tbl = ;var r = tbl.rows.length;var tr = tbl.insertRow(r);var c0 = tr.insertCell(0);c0.innerText = "test";  DELETE:tbody = tr.parentNode;    tbody.removeChild(tr);     

2010-04-29 17:41:00 418

原创 How to let your home page to be gray

body *{filter:gray;}

2010-04-24 13:48:00 417

原创 How to setup signature image in outlook

Copy your signature image to the following folder:C:/Documents and Settings/stevenl/Application Data/Microsoft/Signatures/signature_files Modify the C:/Documents and Settings/stevenl/Application

2010-04-06 12:23:00 859

转载 My gvim configuration(.gvimrc)

 " An example for a gvimrc file." The commands in this are executed when the GUI is started."" Maintainer: Bram Moolenaar " Last change: 2001 Sep 02"" To use it, copy it to"     for Un

2010-04-01 13:39:00 618

原创 How to generate high quality image by using Imagemagick

Install Imagemagick first, then use "convert" command to generate high quality image: convert -verbose -colorspace RGB -resize 1800 -interlace none -density 300 -quality 100 test.pdf test.jpg

2010-03-30 18:30:00 598

转载 Get "Server Down" when retrieve the channel list in sopcast, how to solve it?

Quote: http://code.google.com/p/sopcast-player/issues/detail?id=10I replaced DatabaseOperations.py with the version from ranjanksharma.Now , i can get the correct channel list.

2010-03-13 22:13:00 668

原创 mplayer error opening/initializing the selected video_out (-vo) device

mplayer error opening/initializing the selected video_out (-vo) device cd ~/.mplayer/sudo gedit gui.conf change the vo_drive="xv"

2010-03-13 22:07:00 1094

转载 How to setup django, python environment in ubuntu

Quote: http://club.topsage.com/thread-412466-1-1.htmlDjango开源项目网站:http://www.djangoproject.com/Django是用python语言写的开源web开发框架(open source web framework),它鼓励快速开发,并遵循MTV设计。Django遵守BSD版权,初次发布于2005年7月, 并于200

2010-03-13 20:10:00 680

转载 Common errors in django

Quote: http://skyfen.javaeye.com/blog/515176 报错:1.local variable allreciver referenced before assignment  .   allreciver 变量无效2.invalid literal for int() with base 10: 字段中用了int类型,说明有的字段不一

2010-03-10 13:43:00 2488

转载 Android have lots of intent

Quote:http://blog.chinaunix.net/u1/49742/showart_1913854.html Android have lots of intent,its powerful and useful,here is some tips for you:1,start web browserUri myBlogUri = Uri.parse("h

2010-02-24 11:24:00 436

原创 Encoded Phone Number help

Python is so powerful! I like it~! Encoded Phone Number likes:NAME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E9=98=BF=E8=80=81=E5=B8=88 Using python to decode it, the code like below:import

2010-02-23 13:33:00 446

原创 Online Android Unlock Pattern

https://www.google.com/accounts/displayunlockcaptcha

2010-02-17 13:04:00 674

原创 Cannot assign value of type 'java.lang.String' to property 'file' of type 'org.apache.struts.upload.FormFile'

Exception:org.apache.commons.beanutils.ConversionException: Cannot assign value of type java.lang.String to property file of type org.apache.struts.upload.FormFile    at org.apache.struts.ac

2010-01-06 10:23:00 4771 1

原创 Internet security warning

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> saved from url=(0022)http://www.stefli.com/ -->

2009-11-24 10:07:00 780

原创 Invalid cursor state & Instance name is invalid

ISSUE: Invalid cursor stateSOLUTION: Just upgrade the SQL Server to Sp4  ISSUE: Instance name is invalidSOLUTION: follow the steps below1.Add shortcut of Setup.exe of MSDE to desktop. 2.

2009-11-13 17:34:00 1013

转载 How to record log of specified package by using log4j

The key is:log4j.logger.packageName[.ClassName]=level[,appender]   Quote: http://penghao122.javaeye.com/blog/Reference: 先看一个log4j.properies配置文件:————————————————————我是强大的分割线——————

2009-09-30 10:43:00 657

转载 Details of classloader

 Quote: http://www.objectsource.com/j2eechapters/Ch21-ClassLoaders_and_J2EE.htm Chapter 21Classloadersand J2EEIn this chapter:1.      You will understand why cla

2009-09-29 10:39:00 871

原创 java.io.FileNotFoundException: /tmp/upload_234sad_

Reason: you upload a file with no content.  Solution:Upload file with some content!

2009-09-07 13:06:00 2823 1

原创 [/WEB-INF/applicationContext-dao.xml]; nested exception is java.lang.ClassCastException

weblogic.management.DeploymentException: Exception:weblogic.management.ApplicationException: start() failed. Module: TestPart Error: weblogic.management.DeploymentException: Unexpected exception p

2009-09-03 14:54:00 3220

原创 J2EE Web Project configuration

 test         com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder             org.eclipse.jdt.core.javabuilder             com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator             com.genuit

2009-09-01 17:52:00 765

转载 How to access remote mysql

Quote:http://benrobb.com/2007/01/15/howto-remote-root-access-to-mysql/Howto: Remote Root Access to MySqlVeryquickly, another thing that I typically like to do on my server boxesis allo

2009-09-01 11:04:00 774

转载 Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'XXXException'.

This message can be quite confusing. The cause of this message cannot be easily guessed from the error message CheckStyle gives.Thecause is that the class ConfigurationException, which is mentio

2009-08-20 16:28:00 4305

空空如也

空空如也

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

TA关注的人

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