摘要: 有关DBLINK操作的语句执行机制及优化方式 - Oracle开发-ITPUB论坛-it168旗下专业技术社区 用户名 自动登录 找回密码密码 登录 注册 只需一步,快速开始快捷导航首页论坛博客频道认证专区招聘大话IT名人堂OCM联盟文库会议自测版主团手机版 本版搜索热搜: oracleSAPsap二维码dbaOraclec++C++CRM银联信息中心比特币小额... 阅读全文
posted @ 2015-02-06 17:12 阳光树林 阅读(399) 评论(0) 推荐(0) 编辑
摘要: in 多个数据使用动态SQL传入字符串 1.动态SQL传入字符串CREATE OR REPLACE PROCEDURE p_test (v_str VARCHAR2) AS TYPE cur_type IS REF CURSOR ; c_fzt cur_type; v_sql VARCHAR2( 2000); v_jrh VARCHAR2( 20);BEGIN v... 阅读全文
posted @ 2015-02-06 17:09 阳光树林 阅读(588) 评论(0) 推荐(0) 编辑
摘要: CentOS升级Python2.7及安装pip CentOS升级Python2.7及安装pip1) 升级Python2.7?1234567891011121314151617181920212223242526272829303132python -V # 查看版本:Python 2.6.6mkdir -p ~/Env/python; cd ~/Env/python # 创建个目录w... 阅读全文
posted @ 2015-02-06 17:07 阳光树林 阅读(1177) 评论(0) 推荐(0) 编辑
摘要: Dim table_Name$Sub JugeData()Dim i%, Cnum%, dt$, arry1 () As String, arry2 () As String, arry3 () As String, cnn As Object, rst As Objectcdt = Format(Date, "MMDD")table_Name = InputBox("请输入数据库表名", "数据... 阅读全文
posted @ 2015-02-06 17:06 阳光树林 阅读(8352) 评论(0) 推荐(0) 编辑
摘要: vba基础知识汇总 1.工作簿事件写到THISWORKBOOK中,工作表事件写到sheet中,其他通用代码和函数子程序之类的写到模块中,窗体代码写到对应的窗体中,类相关的代码写到类模块中。2.If 句法,if 有两种写法,单行和块结构。 1、If 条件 Then 符合条件后的语句 2、If 条件 Then 符合条件后的语句 End If其实就是... 阅读全文
posted @ 2015-02-06 17:01 阳光树林 阅读(2336) 评论(0) 推荐(0) 编辑
摘要: from apscheduler.scheduler import Scheduler import datetime # Start the scheduler sched = Scheduler() def job_function(): print "Hello World" , 'start job1 at: ', datetime.datetime.now()def jo... 阅读全文
posted @ 2015-02-06 16:59 阳光树林 阅读(1787) 评论(0) 推荐(0) 编辑
摘要: pip install InstallationPython & OS Supportpip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.pip works on Unix/Linux, OS X, and Windows.NotePython 2.5 was supported throug... 阅读全文
posted @ 2015-02-06 16:57 阳光树林 阅读(1024) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8import urllib, urllib2, cookielibimport os, timeimport redef login (): user = 'user' cookiename = 'chd%s.coockie' % ( user ) logined = False cj = cookielib .LWPCookieJar () ... 阅读全文
posted @ 2015-02-06 16:56 阳光树林 阅读(460) 评论(0) 推荐(0) 编辑
摘要: hcsv导入oracle#coding:gbkimport csv import cx_Oraclefields = []data = []table_name = 'ygl_test3'file_name = '清单.csv'with open(file_name, 'rb') as f: reader = csv.reader(f) contents = [i for i in r... 阅读全文
posted @ 2015-02-06 16:54 阳光树林 阅读(8973) 评论(0) 推荐(0) 编辑
摘要: #coding:gbkimport xlrdimport cx_Oraclefields = []data = []table_name = 'ygl_test1'wb = xlrd.open_workbook("清单.xlsx")sheet1 = wb.sheet_by_index(0)#取第一行做数库字段名title = sheet1.row_values(0)#取第二行开始做数据for ro... 阅读全文
posted @ 2015-02-06 16:52 阳光树林 阅读(414) 评论(0) 推荐(0) 编辑
摘要: #coding:gb18030import cx_Oracleimport xlsxwriterimport timeimport sys reload(sys) sys.setdefaultencoding("gb18030")con = cx_Oracle.connect("user/user123@user")cursor = con.cursor()query1 = cursor.exec... 阅读全文
posted @ 2015-02-06 16:51 阳光树林 阅读(666) 评论(0) 推荐(0) 编辑
摘要: Windows下Python添加库(模块)路径 用Python已经有一段时间了,自己也写了一些实用的库。为了更加方便的使用这些库,需要将他们的路径添加到Python的库路径中去。经过查找资料,总结了如下两种方法:动态的添加库路径。在程序运行过程中修改sys.path的值,添加自己的库路径import syssys.path.append(r'your_path') 在Python安装... 阅读全文
posted @ 2015-02-06 16:49 阳光树林 阅读(812) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-import osimport sysimport stringnewline, s = ("", "")try: f = open(u"简易记账.csv")except IOError: print "文件不存在!".decode('utf8').encode('gbk') sys.exit()f1 = open(u"结果.txt"... 阅读全文
posted @ 2015-02-06 16:48 阳光树林 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 你可能不知道的 30 个 Python 语言的特点技巧 1 介绍从我开始学习Python时我就决定维护一个经常使用的“窍门”列表。不论何时当我看到一段让我觉得“酷,这样也行!”的代码时(在一个例子中、在StackOverflow、在开源码软件中,等等),我会尝试它直到理解它,然后把它添加到列表中。这篇文章是清理过列表的一部分。如果你是一个有经验的Python程序员,尽管你可能已经知道一... 阅读全文
posted @ 2015-02-06 16:47 阳光树林 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 版本一:#coding:utf-8import re#把文档中的单引号替换为2个单引号def replacestr(matched): matchedstr = matched.group() x = matchedstr.replace("'", "''") return xdef main(): f_sql = open('fzt_dd.sql', 'r') sq... 阅读全文
posted @ 2015-02-06 16:45 阳光树林 阅读(280) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8a = '''update ph_daily t set t.{0} = decode((to_number(to_char(sysdate-2,'DD'))*t.{1}),0,0,t.{2}/(to_number(to_char(sysdate-2,'DD'))*t.{1})); '''b = ('N5S_M_TARGET','N5S_M','N5S_M_RATE','... 阅读全文
posted @ 2015-02-06 16:41 阳光树林 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 版本一:#coding:utf-8import Queueimport threadingimport timeimport urllib2import reexitFlag = 0class myThread (threading.Thread): def __init__(self, threadID, name, q, txt_dict): threading.Threa... 阅读全文
posted @ 2015-02-06 16:39 阳光树林 阅读(195) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf8 -*-from bs4 import BeautifulSoupimport os, sys, urllib2, urllibimport thread, threadingclass downloader(threading.Thread): """docstring for downloader""" def __init__(self, url... 阅读全文
posted @ 2015-02-06 16:34 阳光树林 阅读(243) 评论(0) 推荐(0) 编辑
摘要: sublime text3 运行python配置 一、1. 在工具栏点击tools,打开bulid system->new bulid system。2. 修改以下内容并保存{"cmd": ["python", "-u", "$file"],"path":"c:/Python27","file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)","... 阅读全文
posted @ 2015-02-06 16:33 阳光树林 阅读(657) 评论(0) 推荐(0) 编辑
摘要: Python3 读写文件碰到的编码问题 1,远程文件资源读取 response的为 bytes,即utf-8或者gbk,需解码decode为unicode如:[python] view plaincopy# coding=gbk import urllib.request import re url = 'http://www.163.com' file = 'd:/test.ht... 阅读全文
posted @ 2015-02-06 16:31 阳光树林 阅读(2039) 评论(0) 推荐(0) 编辑