自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 获取delegate

let appDel:AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate

2014-10-08 20:31:24 118

原创 Swift CoreData 注意事项(NSArray element failed to match the Swift Array Element typ)

在 Swift 项目中使用 CoreData 时,使用Xcode自动生成的 Entity 类定义:import Foundationimport CoreData//下面这行是需要手工添加的[color=red][b]@objc(ToDoItem)[/b][/color]class ToDoItem: NSManagedObject { @NSManage...

2014-10-06 22:42:59 349

原创 oracle 表空间

create temporary tablespace user_temp tempfile 'C:\app\joey\oradata\orcl\user_temp.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local; create ta...

2014-05-21 11:03:14 112

原创 卸载Django

如果你是通过执行命令 ``setup.py install`` 来安装 Django, 卸载的方法很简单, 只要在``site-packages`` 目录下删除 ``django`` 目录就可以了. 如果你使用 Python egg 来安装 Django, 直接删除 Django ``.egg`` 文件, 并且删除 ``easy-install.pth``中的 egg...

2014-03-18 09:20:58 136

原创 算法稳定性

最近在看算法,书上关于稳定性的概念一带而过,甚觉不爽,于是网上搜了个貌似靠谱的答案。答案来自stackoverfollow问:I m very curious, why stability is or is not important in sorting algorithms?Any ideas?靠谱的答:Background: a "stable" sortin...

2014-03-07 15:24:13 143

原创 linux编译apache,mod_wsgi

每次在redhat上编译apache,总是提示configure: error: APR not found . Please read the documentation类似这样的问题。简单的方案:编译apache需要依赖apr,apr-util,pcre。先下载这三个软件,解压缩,去掉名称后面的版本号,把他们移到apache/srclib目录下,./configure --p...

2013-12-13 12:59:02 142

原创 shell变量$#,$@,$0,$1,$2

linux中shell变量$#,$@,$0,$1,$2的含义解释: 变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出...

2013-12-12 13:23:28 74

原创 ant打包时赋予文件执行权限

最近在用ant打包代码,打包的文件里有shell脚本,测试非得让打包的时候赋予脚本可执行的权限,汗呢。好吧,开始到处搜集资料,最后发现tar有这个功能。示例代码如下:[code="java"] [/code]根据自己的需要修改mode的值即可...

2013-10-08 13:23:21 546

原创 bat调用ant后继续执行之后的命令

用Windows的批处理bat调用ant,ant执行完后后面的命令无法执行,直接退出。例如:@echo offsetlocal enabledelayedexpansionset BUILD_PATH="%cd%/build"set DIST_PATH="%cd%/dest" if exist %BUILD_PATH% (rd /q /s %BUILD_PATH...

2013-09-06 11:06:50 462

原创 ORA-12162: TNS:net service name is incorrectly specified

SQL> conn /as sysdba ERROR:ORA-12162: TNS:net service name is incorrectly specified原因是ORACLE_SID没有指定SQL> export ORACLE_SID=xxxSQL> echo $ORACLE_SI...

2013-07-17 16:22:39 95

原创 rpm 强制安装

linux安装rpm包时有的有依赖关系,或与系统中的补丁包有冲突安装不成功时,可以考虑1.加上 --nodeps,意思不考虑依赖2.更狠的--force,强制安装

2013-06-18 12:44:29 120

原创 vnc无法连到linux server,但ssh可以的解决方法

今天用vnc连远程服务器,一直给我提示Failed to connect to server.记录下解决该问题的步骤:1 确认ssh能登录,查看vncserver是否开启。 /etc/init.d/vncserver status 我查看了一下我的vncserver确实处于运行状态2 查看vncserver的设置是否正确 打开文件/etc/sysco...

2013-06-07 18:42:49 4435

原创 密码管理小工具

因为要记录的密码实在多,网站要密码,软件要密码,应用要密码,到处都是密码,这么多密码总是忘,索性空闲时间用swing写了个简单的密码管理小工具。附件中有源码,也有可运行的二进制文件。...

2013-05-30 18:47:18 82

原创 在Redhat中启动Oracle

1 在终端中登录oracle sqlplus "/ as sysdba" 如果是连接到一个空实例,那么再执行 startup2 退出登录,在命令行检查监听器是否开启? lsnrctl start

2013-05-30 16:29:54 93

原创 linux下基本ftp操作

1. 连接ftp服务器格式:ftp [hostname| ip-address]a)在linux命令行下输入:ftp 192.168.1.1b)服务器询问你用户名和密码,分别输入用户名和相应密码,待认证通过即可。2. 下载文件下载文件通常用get和mget这两条命令。a) get格式:get [remote-file] [local-file]...

2013-01-15 16:38:15 94

原创 oracle存储过程入门

 一. 概述  Oracle存储过程开发的要点是:  • 使用Notepad文本编辑器,用Oracle PL/SQL编程语言写一个存储过程;  • 在Oracle数据库中创建一个存储过程;   • 在Oracle数据库中使用SQL*Plus工具运行存储过程;  • 在Oracle数据库中修改存储过程;  • 通过编译错误调试存储过程;  •...

2013-01-06 17:26:23 84

原创 oracle触发器例子

把这些例子都亲自敲一遍,Oracle触发器就应该了解的差不多了--格式:create or replace trigger 名称[after|before][delete|update|insert][on 表 | on schema][referencing new as 别名 old as 别名][for each row]declare....begin...

2013-01-06 17:25:38 58

原创 oracle忘记密码

sqlplus /nologsql>connect /as sysdbasql>alter system identified by password

2013-01-06 16:19:17 64

原创 An XML parsing error has occurred while parsing the XML document

在用rfhutil给测试message broker flow时,如果指定的编码类型不正确,可能会发生以下错误:ExceptionList RecoverableException File:CHARACTER:F:\build\S000_P\src\DataFlowEngine\ImbDataFlowNode.cpp Line:INTEGER:1129 Funct...

2012-12-24 09:38:13 915

原创 SQL0332N Character conversion from the source code page "1386" to the target co

SQL0332N Character conversion from the source code page "1386" to the targetcode page "xxx" is not supported. SQLSTATE=57017运行如下命令db2set db2codepage=1208db2set db2country=86db2 ter...

2012-11-29 14:15:34 2322

原创 host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost

解决方法:1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"mysql -u root -pvmwaremysql>use mysql;mysql>update use

2012-11-01 22:20:12 65

原创 mysql jdbc url

jdbc:mysql://localhost:3306/sample_db?user=root&password=browser&useUnicode=true&characterEncoding=UTF-8

2012-11-01 22:19:31 105

原创 在Mac上启动不了Mysql

版本如下:OS: Mac OS X 10.6.4MySql: mysql-5.5-osx10.6-x86.dmg在Macbook上安装Mysql过程没问题,可是重启后问题就来了,弹出窗口说:Insecure Startup Item disabled.“/Library/StartupItems/MySQLCOM” has not been started beca...

2012-10-31 22:54:09 184

原创 mysql readme

2.4.10 Installing MySQL on Mac OS X-----------------------------------You can install MySQL on Mac OS X 10.3.x (`Panther') or newer using aMac OS X binary package in PKG format instead of the ...

2012-10-31 22:22:38 191

原创 DB2 error 1069: the service did not start due to logon failure

更换了系统密码,再启动db2就报错。“error 1069: the service did not start due to logon failure”。解决方法(从ibm网站拷贝):Problem(Abstract)How to resolve an error SQL1397N or "Error 1069" when starting a DB2 instance or ...

2012-10-22 17:17:08 336

原创 span固定宽度

2012-10-08 22:29:11 63

原创 antlr parser 生成代码增加package

用antlr的eclipse插件,每次修改parser文件,都会自动生成java代码,但生成的java代码没有package信息,增加如下代码即可:[code="java"]@header {package mypack;}@lexer::header {package mypack;}[/code]...

2012-06-22 20:47:23 384

原创 assertion failed in ItemFileWriteStore

[code="java"]Discovery.fullFillCombo = function(comboId,options,setDefault){ var targetCombo = dijit.byId(comboId); var comboOptions = new dojo.data.ItemFileWriteStore({data: {identifier: ...

2012-04-09 13:22:16 173

原创 Dojo innerHTML 代码不能执行的解决方案

有的时候需要用javascript动态生成一些html,常用的方式为动态拼一串html,然后通过innerHTML输出到dom中。类似[code="java"]sourceNodeDiv.innerHTML="" + "" + "System:" + "" + "" + "";[/code]但通过innerHTML

2012-03-28 14:27:43 198

原创 UIManager properties

import java.awt.Color; import java.awt.Font; import java.nio.charset.Charset; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Enumeration; import java.ut...

2012-01-07 09:28:31 88

原创 Session Bean

什么是Session Bean?Session Bean封装了业务逻辑的,能被本地客户端,远程客户端,以及web service客户端通过编程的方式调用。为了访问部署在服务器上的应用,客户端需要调用session bean的方法。Session Bean在服务器中为客户端执行运算,使客户端不必关注复杂的业务逻辑。Session bean不是持久的。Session Bean的类型:有...

2011-07-18 17:51:43 99

原创 查看jdk位数

查看机器上jdk是多少位的,用下面的方法String arch = System.getProperty("sun.arch.data.model"));System.out.println(arch);

2011-06-12 09:45:02 71

原创 Spring Security 权限控制

搞了一天的Spring Security,从早折腾到黑。在这把思路整理一下,为需要的朋友做个参考。主要参考了http://blog.csdn.net/csuliky/archive/2009/06/17/4277413.aspx的文章及Spring官网的例子。首先配置web.xml[code="java"] org.springframework....

2011-05-07 22:22:44 83

原创 jpa分页

Query query = em.createQuery("from Person p order by id asc");List list = query.setMaxResults(max).setFirstResult(index).getResultList();

2011-04-06 14:21:16 89

原创 ubuntu下apache2整理

启动,停止,重启sudo /etc/init.d/apache2 startsudo /etc/init.d/apache2 stopsudo /etc/init.d/apache2 restart配置文件路径 /etc/apache2/apache2.conf 网站字符编码配置路径 /etc/apache2/conf.d/charset 默认网站根目录...

2011-03-11 10:00:01 68

原创 java read xml

Tom Cruise Paul Enderson George Bush import java.io.File;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;impo...

2011-03-02 19:51:04 53

原创 Template method

[code="java"]/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.beforespring.template;import java.sql.Connection;import java....

2010-12-14 08:25:48 84

原创 remove rhythmbox notification

when song change,the rhythmbox will prompt a notification which show the song's name .but sometimes it is so bored .so if you want to remove the notification.open the command line and type 'gnome-os...

2010-12-08 10:20:42 145

原创 Error opening the wallet 'kdewallet'. please try again.

If you use the 'kdewallet' in ubuntu,sometimes maybe forget the password you have set.When you open some software ,ubuntu will prompt the error message just like 'Error opening the wallet 'kdewallet'....

2010-11-30 11:27:35 240

原创 ubuntu 飞鸽乱码

ubuntu安装飞鸽网上到处都是,安装完了乱码问题却没几个人说对。在飞鸽的主界面选择设置首选项,在字符编码的外部代号选择gb18030,就是兼容gbk和gb2312的编码,选择是就可以解决乱码问题了。...

2010-09-14 10:05:37 371

空空如也

外包ibm

2011-06-10

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

TA关注的人

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