- 博客(33)
- 资源 (5)
- 收藏
- 关注
原创 函数模版例子
#include using namespace std;template void array_init(T (&parm)[N]){ for (size_t i=0; i!=N; ++i) { parm[i] = i; }}int main(void){ int x[42]; array_init(x); for (size_t i
2012-08-15 19:13:23 123
函数模版例子
#include using namespace std;template void array_init(T (&parm)[N]){ for (size_t i=0; i!=N; ++i) { parm[i] = i; }}int main(void){ int x[42]; array_init(x); for (size_t i
2012-08-15 19:11:58 134
原创 c++的库
在C++中,库的地位是非常高的。C++之父 Bjarne Stroustrup先生多次表示了设计库来扩充功能要好过设计更多的语法的言论。现实中,C++的库门类繁多,解决的问题也是极其广泛,库从轻量级到重量级的都有。不少都是让人眼界大开,亦或是望而生叹的思维杰作。由于库的数量非常庞大,而且限于笔者水平,其中很多并不了解。所以文中所提的一些库都是比较著名的大型库。1、C++标准库已被实
2011-12-01 14:32:46 652
原创 yaxin分拣
分拣:从交换机下导数据。asininfo的作法是用文件来保存文件。longshine的做法是用数据库来采集数据。 asininfo实现:用数组来读取文件文件。用配置来控制记录每一个字段的意义。用配置来控制文件格式。分通道来均衡负载。对每个字段按
2011-10-11 10:38:13 97
asininfo分拣
分拣的思路:将交换机的不同格式统一,即标准化。asininfo的做法:用文件导交换机文件。然后用配置文件定义每一个位置的意义。程序的代码实现用数组来实现,或者是vector、deque、list等 这里的难点:对内存的控制;对文件的操作能力;对
2011-10-11 10:30:19 106
原创 一个良好的匿名块异常传递机制。
create or replace procedure aa_test isexe_exp exception;exe_exp2 exception;a number := 1;b number := 0;begin if a dbm
2011-09-23 23:22:17 108
原创 一个失败的结构
oracle函数必须要返回一个类型。常常为了监控一个过程执行的效果。在表里边设计一些字段。用来在执行的过程中监控使用。 于是定义一个number变量。通过函数返回number数值,当-1时就写上失败的信息。这个思路很不错。但是代码结构只有一层时,这个方法是管用
2011-09-04 20:44:22 94
原创 record可以作为入参
record类型可以作为参数来使用。 type rec_type is record ( serv_id number(12), product_offer_instance_id number(12),
2011-09-04 10:49:02 170
原创 for循环
declareobj number(12);num number;beginfor cur3 in (select aa_id from ls65_sid.aa_t a where a.type = 'R' and a.state = 'A' and rownum
2011-09-04 09:50:27 88
原创 被动触发的exception
没有数据搜索到 = NO_DATA_FOUND 违反唯一性约束 = DUP_VAL_ON_INDEX --------------------------------------------------------------- Exception
2011-08-31 16:42:14 116
原创 oracle的exception学习、局部变量的学习
oracle的触发异常方式和把握:1 自动触发exception: 这种是被动的。 设计expcetion,主要依赖于常见的分类,预期过程会报哪些错误,在异常处理部分就设计相应的报错返回信息,或者是处理。2 主动触发:raise、raise_applition_e
2011-08-30 11:45:03 763
原创 重载
#include using namespace std;class Ratio{public: Ratio(int n=0, int d=1):num(n), den(d){}; Ratio(const Ratio&); void operator=
2011-08-25 21:36:58 104
原创 对象的模型
#includeusing namespace std;class Widget{public: Widget() { ++count; } ~Widget() { --count; } int numWidgets()
2011-08-24 12:02:23 82
原创 文件的学习
#include using namespace std;class File {public: File() { outfile.open("result2.txt"); } void out() { outfile }
2011-08-23 16:44:13 79
原创 字符串的位置?
#include #include #include #include using namespace std;void print(ostringstream&, ofstream&);int main(){ char* p;
2011-08-02 18:15:38 119
原创 字符串在哪?(用指针来漂)
#include #include #include #include using namespace std;void print(ostringstream&, ofstream&);int main(){ char* p;
2011-08-02 17:30:20 82
原创 文件学习
#include #include using namespace std;bool more(ifstream& fin, int& n){ if (fin >> n) { return true; }
2011-08-02 10:52:52 100
原创 C++克服了C的字符串硬伤
#include #include using namespace std;int main(){ string s1 = "IBM"; string s2 = "123"; string *p; char *pc;
2011-07-30 20:31:39 135
原创 C++克服了C的字符串硬伤
#include #include using namespace std;int main(){ string s1 = "IBM"; string s2 = "123"; string *p; char *pc;
2011-07-30 19:40:24 73
原创 危险的字符串
#include #include using namespace std;int main(){ char *p = "xyz"; char s1[] = "ABCDEFG"; char s2[] = "XYZ"; cou
2011-07-29 18:09:09 154
原创 C++指针的内存分配
我不知道现在的编译器是不是都这么做的。但是今天发现了指针对内存的方式。#include using namespace std;int main(){ int n = 44; cout cout int *pn = &n; cout co
2011-07-20 15:20:53 719
原创 C++存储方式
今天,莫名其妙地“奋奋”。看着一本C++的时候,突然想到,是不是可以用数组越界来探讨一下,C++的存储方式呢?由于书页上的内容太多。就简单地写写吧。int main(){ const int SIZE = 4; float a[SIZE] = {33.3, 44.4,
2011-07-13 10:58:50 165
原创 对比 04068
create or replace procedure aa_zhou_tt is prod_inst number(12); detail_flag number; v_exe varchar2(4000); crm_str varchar2(512) := select * from nc_gouqi_pricing_state a where a.remark=Y;be
2011-06-29 11:54:00 111
原创 一些oracle网站(不知道啥东东,先记着)
在网上搜索一下吧,应该有的。 下面是我积累的一些关于ORACLE的网站,希望对你能有帮助: 人气 网址 5 http://www.itpub.net 3 http://www.oraclefan.net/ 3 http://www.oradb.net 3 http://asktom.oracle.com/ 2 http
2011-06-29 09:20:00 88
原创 ORA-00054 [转抄]
重建索引的时候报ORA-00054错误,此错误在Oracle 10G Error Messages是如下描述的: ORA-00054:resource busy and acquire with NOWAIT specified Cause:Resource interested is busy. Action:Retry if necessary. 此错
2011-06-23 11:15:00 132
原创 pls 00103 的 end-of-end 错误
这是由于在动态语句中采用块语句的方式导致的。 create or replace procedure solution_781_zhou( error_type varchar2 ) is type ref_cur_type is ref cursor; error_result_cur ref_cur_type; an_serv number(30); par
2011-06-23 11:13:00 252
原创 嵌套表的使用
declare oper_id number(30) := 10100797110502002977; type tab_temp_type is table of number(30); tab tab_temp_type; type cur_ref is ref cursor; cur cur_ref; tab_tmp tab_temp_type;begin open cur f
2011-06-21 20:28:00 116
原创 HW 01
-华为员工标准岗位工资明细及分析华为员工对应的标准岗位工资13-C:5500, B:6500, A:750014-C:7500, B:9000, A:1050015-C:10500,B:12500,A:1450016-C:14500,B:17000,A:1950017-C:19500,B:22500,A:2550018-C:25500,B:29000,A:3
2011-06-17 09:47:00 102
原创 ora 04068 的解决方法
这个问题是oracle的两种情况。一种是自己的程序里边出现了动态执行语句。在动态执行的过程中,将对象失效了。而下面的程序还是静态编译生成的。对它的引用还是老的物理地址。导致报错。原来的对象失效。另一种是oracle本身的错误。针对第一种情况。1. goto fang an go to buneng huicha . jiaru chengxu zai houmian ,jiu wangxiazou .caiyong tiaoguo d fangfa 2. caiyong tongtai guoch
2011-05-27 10:38:00 233
原创 神奇的ora 04068错误 的最终解释 【抄】
Oracle Bug 6136074: ORA-04068/ORA-04065/ORA-06508错误解决 2011-01-06 15:04平台: RHEL4.8 x86_64 + Oracle10.2.0.4<br /><br /><br /> --故障症状提示: 2011-01-05 11:42:44,416 ERROR [com.echargingmid.service.QueryService] ORA-04068: existing state of packages has been disc
2011-05-26 15:26:00 410
原创 学习体会。
<br />面向过程:是早期为了实现某一个事务功能、为了实现某一个特定的计算功能在实践。特征是有一个特定的对象,针对数据流、针对计算功能、针对如何存储等,关注如何在这个方面实现后,做到通用。<br />面向对象:是在过程化设计中,由于涉及到数据数量级过大,需求变化周期更短,客户尝了一个甜饼,想要一盒甜饼的时候,给软件工程师踢去了一个“超级麻烦”,如何实现?在过程化的尝试中,发现代码量的修改数量级过大,灵活性急缺的时候,在抽象事物对象,梳理相互间的对象联系,总结出用对象来代码分模块,这个模块带有对象特征,所以
2011-01-20 10:51:00 116
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人