现在位置: 首页 > tonne发表的所有文章
  • 08月
  • 12日
数据库 ⁄ 共 1501字 评论关闭
 源码:xx.pc /* 功能:演示了Oracle非滚动游标操作 定义游标时注意事项: 1. DECLARE CURSOR语句必须是使用游标的第一条语句 2. 游标名称是一个标识符,而不是宿主变量,其长度是可以任意的,但只有前31个字符有效 3. 游标所对应的SELECT语句不能包含INTO子句 4. 游标语句(DECLARE,OPEN,FETCH,CLOSE)必须在同一个预编译单元内 */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sqlca.h> #pragma comment(lib, "orasql10.lib") int connect(); void c......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 941字 评论关闭
@property有什么用呢?表面看来,就是将一个方法用属性的方式来访问. 上代码,代码最清晰了. class Circle(object): def __init__(self, radius): self.radius = radius @property def area(self): return 3.14 * self.radius ** 2 c = Circle(4) print c.radius print c.area 可以看到,area虽然是定义成一个方法的形式,但是加上@property后,可以直接c.area,当成属性访问. 现在问题来了,(不是挖掘机技术哪家强),每次调用c.area,都会计算一次,太浪费cpu了,怎样才能只计算一次呢?这就是lazy property.......
阅读全文
一、交互式的启动解释器       每次输入一行Python代码来执行。 1.1 Linux       1. 添加python路径到环境变量PATH。       2. 启动python:python。       3. 执行命令:print("hello world")。 1.2 Windows       1. cmd启动命令行,切换到python安装目录:C:\Python33。       2. 启动python:python。       3. 执行命令:print("hello world")。 二、Python脚本 2.1 Linux       1. 写python脚本:test001.py       2.执行python脚本:python test001.py 2.2 Windows       1. 写python脚本:test001.py       2.执行......
阅读全文
  • 07月
  • 15日
综合 ⁄ 共 395字 评论关闭
Problem: Windows Error Reporting Event Id 1001 errors are caused by missing system files or broken system registry structures. This is a critical sign of an unstable system that is typically caused by improper maintenance of the computer. Quick Instructions: STEP 1: Download Regcure & Install for Free. STEP 2: Scan your computer. STEP 3: Click the 'Fix Errors' button to repair. from:http://pcspeedupfree.com/windows-error-reporting-event-id-1001.php
阅读全文
  • 05月
  • 08日
综合 ⁄ 共 150字 评论关闭
http://news.hxsd.com/CG-dynamic/201305/676191.html     切图神器 slicy功能介绍(通过psd文件生成切图,和photoshop配合使用) http://apluck.iteye.com/blog/1728299    automator制作自动缩小图片服务
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 172字 评论关闭
grep -i "wfi_paypal_pkg.get_pp_response" `find ./ -type f -name "*.pm"`   grep -iR wfi_paypal_pkg.get_pp_response ./   find ./ -type f -name "*.pm" | xargs grep -i 'wfi_paypal_pkg.get_pp_response'
阅读全文
  • 04月
  • 12日
综合 ⁄ 共 2278字 评论关闭
 Problem C. Card Game 两次三维DP,没想到还能这样@@ 对段【i,j】判断能否被完全消除(j>=i+2),递推公式是 ( i,m,j) 可以消除,【i+1,m-1】,【m+1,j-1】可以消除(即i,j作为边界两点和中间某个m点一起消除) i<m<j  【i,m】可以消除,【m+1,j】可以消除    i+2<=m<j,m+=3 然后对端【i,j】计算最小剩余牌的数目。【i,j】的count初始化为 j-i+1(初始值)  0  if 【i,j】能消除  min{ 【i,m】+【m+1,j】}      i<=m<j #include  <iostream> #include <vector> using namespace std; in......
阅读全文
From: http://yangelc.blog.sohu.com/68245920.html Linux 用户态与内核态的交互   在 Linux 2.4 版以后版本的内核中,几乎全部的中断过程与用户态进程的通信都是使用 netlink 套接字实现的,例如iprote2网络管理工具,它与内核的交互就全部使用了netlink,著名的内核包过滤框架Netfilter在与用户空间的通读,也在最新版本中改变为netlink,无疑,它将是Linux用户态与内核态交流的主要方法之一。它的通信依据是一个对应于进程的标识,一般定为该进程的 ID。当通信的一端处于中断过程时,该标识为 0。当使用 netlink 套接字进行......
阅读全文
  • 04月
  • 02日
综合 ⁄ 共 5636字 评论关闭
From: http://m.blog.csdn.net/blog/WTBEE/9001859 1. rtsp摘要认证协议流程 RTSP协议,全称Real Time Streaming Protocol,是应用层的协议,它主要实现的功能是传输并控制具有实时特性的媒体流,如音频(Audio)和视频(Video)。Rtsp认证主要分为两种:基本认证(basic authentication)和摘要认证( digest authentication )。基本认证是http 1.0提出的认证方案,其消息传输不经过加密转换因此存在严重的安全隐患。摘要认证是http 1.1提出的基本认证的替代方案,其消息经过MD5哈希转换因此具有更高的安全性。下面将以一......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 2377字 评论关闭
D. Palindrome Degree time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output String s of length n is called k-palindrome, if it is a palindrome itself, and its prefix and suffix of length  are(k - 1)-palindromes. By definition, any string (even empty) is 0-palindrome. Let's call the palindrome degree of string s such a maximum number k, for which s is k-palindrome. For example, "abaaba" has degree equals to 3. Yo......
阅读全文
  • 02月
  • 12日
综合 ⁄ 共 16647字 评论关闭
using System; using System.ComponentModel; using System.Collections; using System.Diagnostics; using System.Data; using System.Data.SqlClient; using System.Data.OleDb; using System.Configuration; using System.IO; namespace DataAccess {     public class Database : IDisposable     {                       private SqlConnection connection;         ///////////////////////////////////////////////////////////////////////////////////////////////////////////         /*  描    述: 执行连锁......
阅读全文
  • 12月
  • 14日
综合 ⁄ 共 9810字 评论关闭
第一部分、十道海量数据处理面试题   1、海量日志数据,提取出某日访问百度次数最多的那个IP。   此题,在我之前的一篇文章算法里头有所提到,当时给出的方案是:IP的数目还是有限的,最多2^32个,所以可以考虑使用hash将ip直接存入内存,然后进行统计。   再详细介绍下此方案:首先是这一天,并且是访问百度的日志中的IP取出来,逐个写入到一个大文件中。注意到IP是32位的,最多有个2^32个IP。 同样可以采用映射的方法,比如模1000,把整个大文件映射为1000个小文件,再找出每个小文中出现频率最大的IP(可以采用hash_......
阅读全文