- 浏览: 1788335 次
- 性别:
- 来自: 北京
-
最新评论
-
youngcoder:
haohaohao~
Spring cache 注解功能不起作用的解决方案 -
kanpiaoxue:
lixz 写道有具体实例demo吗好多年前写的了。你还是去官网 ...
spring batch(一):基础部分 -
lixz:
有具体实例demo吗
spring batch(一):基础部分 -
BuDongOrz:
...
Spring MVC controller 读取配置文件 -
hvang1988:
理解错了,原来还是计数,不是时间
spring batch(二):核心部分(1):配置Spring batch
文章列表
----------- 行转列 start
select * from(
select sum(d.acu) acu, sum(d.pcu) pcu, sum(d.pay) pay, sum(d.expend) expend
from game_kpi_day d,tmp_game_list g
where d.game_id = g.id
and game_id = 4
and d.log_date between to_date('2010-01-01','yyyy-mm-dd') and to_date('2010-01-10','yyyy-mm-dd') )
unpi ...
python程序需要编码设置,如在文件头添加 #-*-coding:utf-8-*-
可是每次创建一个文件都需要手动添加,很是繁琐。
这里为使用PyDev的朋友提供一个解决的方案,就是利用eclipse的模板定义功能。
操作如下:
window->Preferences->PyDev->Editor->Templates
右面可以看见 Templates for editor and new modules
里面有个 <Empyt>的,双击它。或者选中它,点击 edit 。
在里面添加
#-*-coding:utf-8-* ...
用数值配置spring装配的JavaBean内部的List类型很容易,下面介绍如何用javabean装配JavaBean中的List
public class Element implements Serializable{
/**
*
*/
private static final long serialVersionUID = -6956332143541075576L;
private Integer id;
private String name;
private String url;
public Integer getId() {
...
birt去除报表下面的日期
- 博客分类:
- birt
birt去除报表下面的日期 首先点击设计器主页 - 点击属性,- 取消“页眉”“页脚”。即取消显示页眉和页脚。也可以在xml里设置:
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="type">a4</property>
<property name="leftMargin"& ...
python email: Examples
- 博客分类:
- python
参考: http://docs.python.org/library/email-examples.html#email-examples
Here are a few examples of how to use the email package to read, write, and send simple email messages, as well as more complex MIME messages.
First, let’s see how to create and send a simple text message:
# Import smtp ...
import os
class DiskWalk(object):
'''
API for getting directory walking collections
'''
def __init__(self, path):
if path is None or len(path) == 0:
print 'Error: Please enter a valid path!'
return False
self.path = path
def e ...
#-*-coding:utf-8-*-
from email.mime.text import MIMEText
import smtplib
mailto_list = ["person@163.com", "person@gmail.com"]
#####################
mail_host = "smtp.126.com"
mail_user = "hello"
mail_pass = "world"
mail_postfix = "126.c ...
secureCRT 改变显示宽度
- 博客分类:
- Linux
secureCRT 改变显示宽度
每次用secureCRT登陆后sqlplus查询数据都是折行显示,即使set lines 1024参数后也没用,很不爽,今天终于搞定了。SecureCRT v5.5.1 (build 407) 1、首先全局设置:Options - Global Options - Terminal - Appearance - Maximumcolumns 最大只能设置成1024(推荐256),设置越大越占用内存,并选上show horizontal scrollbar,然后重启SecureCRT;2、然后session设置:Options - Session Opt ...
birt开发整理(个人)
- 博客分类:
- birt
解决问题的网址:
http://www.birthome.cn
1、设置table隔行变色
新建table,选择表格,点script,在onprepare事件里写:count=0;
再选择明细行,在明细行script oncreate方法里写:
count++;
if(count%10 ==0){
style.pageBreakAfter ="Always"; //设置每页显示10行
}
if(count%2 !=0){
style.setBackgroundColor("white");
}else{
...
eclipse字体大小设置
- 博客分类:
- eclipse
以前一直使用MyEclipse,刚刚开始使用eclipse的jee-eclipse。突然发现一个问题,在Editor里面写汉字的时候,汉字很小,而代码(英文)却是正常的大小。解决问题如下:
eclipse打开Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic
里面有 Text Editor Block Selection Font 以及 Text Font 两个可以设置的地方。
在这里设置字体为 Courier New ,大小为: 10
如果你的字体里面没有 ...
cx_Oracle 中文汉字乱码问题解决
- 博客分类:
- python
写一个python应用,在开头声明了编码 #-*-coding:utf-8-*- 可是插入数据的时候,依然乱码。后来查了好多资料,终于找到了办法。在程序的头部加入:
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
能够正常的insert和update中文
例子:
# -*- coding: utf-8 -*-
import osos.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
import cx_Oracledb = ...
python APScheduler 框架,模仿Java的Quartz框架写的,强大给力。
它的主页是:http://packages.python.org/APScheduler/index.html
提问的地方:http://groups.google.com/group/apscheduler (老外很认真的回答你的问题)
它的按照很简单:参考主要的install就可以了,就两三步
例子如下:
from apscheduler.scheduler import Scheduler
import time
# Start the scheduler
sched = ...
最近研究python。看了部分内容,开始尝试写Multiple-thread(多线程)的东西。中间遇到了问题:我书写了自己的线程类,在实例化之后,运行start()。程序会立即执行一次,而不像run()方面里面我定义的while True: 里面的代码那样运行。找了好久,才发现:原来我设置了setDaemon(True),然后start()。因为线程是守护线程,主线程结束之后,它会立即结束。当我把setDaemon去掉之后,就没有问题了。
而且给线程命名self.name = name ,要生效必须用start(),而不能用run()。因为run()被调用的时候,self.name指向的是主线 ...
在做导出excel功能时发生异常,程序检查都是正常的,debug进去也是正常的。但是IE死活就无法正确的下载。搞了很久,最后才发现,原来我用汉字命名了下载的文件,改成英文就能正确下载了。用汉字做下载文件的名字,是有问题的。如果真的需要对下载文件用汉字的话,需要额外的做处理。这里就不介绍了,可以google。
<script>
/**
* 利用JavaScript内置的hash去重数组中的重复元素
* @author kanpiaoxue
* date 2011/08/29 13:29:01
*/
function uniqueArray(arr){
if(null == arr || arr.length == 0 ){
return arr;
}else{
var innerHashMap = {};
for(var i = 0, j = arr.length; i<j; i++){
innerHashMap[arr[i ...