现在位置: 首页 > cantar发表的所有文章
  • 11月
  • 19日
综合 ⁄ 共 355字 评论关闭
 很有用的一段代码,学习了。 在没有地方查看dbms_output的时候,可以用get_line方法获取。 --创建临时表 create table test (fline varchar2(256)); / --测试put_line与get_line declare line varchar2(256); status integer; begin dbms_output.enable; dbms_output.put_line('Hello, World'); dbms_output.get_line(line, status); if status = 0 then insert into test (fline) values (line); end if; end; / --读取表内容 select * from test; / --删除临时表 drop table test;
阅读全文
  • 11月
  • 10日
综合 ⁄ 共 10366字 评论关闭
Author :Jeffrey  My Blog:http://blog.csdn.net/gueter/  引言                                        HTTP是一个属于应用层的面向对象的协议,由于其简捷、快速的方式,适用于分布式超媒体信息系统。它于1990年提出,经过几年的使用与发展,得到不断地完善和扩展。目前在WWW中使用的是HTTP/1.0的第六版,HTTP/1.1的规范化工作正在进行之中,而且HTTP-NG(Next Generation of HTTP)的建议已经提出。 HTTP协议的主要特点可概括如下: 1.支持客户/服务器模式。 2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。请......
阅读全文
  • 08月
  • 08日
综合 ⁄ 共 1584字 评论关闭
转自:http://blog.csdn.net/leweet/archive/2009/01/05/3707378.aspx   C++提供的内存管理机制非常灵活,内存的分配和释放完全有程序员自己控制。不过任何事物都是其两面性,灵活的另一面则是带来了复杂性。经常我们用New,malloc,realloc分配了内存,却可能也很容易忘记用Delete,free来释放。C++内存泄露这是很多程序常见的问题,也给初学者带来不少的困惑。如为什么程序运行后内存在不停的增加(Windows通过任务管理器可以观察到)。因为分配了内存而没有释放,逐渐耗尽内存资源,最后导致系统崩溃。内存泄露除了堆中的之外,......
阅读全文
  • 02月
  • 25日
综合 ⁄ 共 522字 评论关闭
题目链接~~> 做题感悟:这题跟上一题都看了很久,没有忍住百度了一下,然后~~ 解题思路:动态方程      F[ i ] = max{ g[ i ] , F[ j ] ( 0<=j<i ) } . 代码: #include<stdio.h> #include<iostream> #include<map> #include<string> #include<string.h> #include<stdlib.h> #include<queue> #include<algorithm> using namespace std ; const int MX = 300005 ; int g[1005],b[1005] ; int main() { int n ; while(~scanf("%d",&n)&&n) { ......
阅读全文
ActionBarSherlock与Fragment的结合使用非常广泛,再加上Viewpager的滑动效果,可以实现很多很炫的效果。 MainActivity.java: public class MainActivity extends SherlockFragmentActivity implements TabListener,OnPageChangeListener{ /*定义顶部Tab的title*/ private String[] mTabTitles; /*ViewPager对象的引用*/ private ViewPager mViewpager; /*装载Fragment的容器,每一个界面都是一个Fragment*/ private List<Fragment> mFragment; /*ActionBar对象的引用*/ private ActionBar mActionBar; @Overr......
阅读全文
  • 05月
  • 19日
综合 ⁄ 共 1242字 评论关闭
定义和用法 CONVERT() 函数是把日期转换为新数据类型的通用函数。 CONVERT() 函数可以用不同的格式显示日期/时间数据。 语法 CONVERT(data_type(length),data_to_be_converted,style) data_type(length) 规定目标数据类型(带有可选的长度)。data_to_be_converted 含有需要转换的值。style 规定日期/时间的输出格式。 可以使用的 style 值: Style ID Style 格式 100 或者 0 mon dd yyyy hh:miAM (或者 PM) 101 mm/dd/yy 102 yy.mm.dd 103 dd/mm/yy 104 dd.mm.yy 105 dd-mm-yy 106 dd m......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 443字 评论关闭
虽然不难,但是本渣还是要看一下题解才做出来 #include<iostream> #include<cstring> using namespace std; int dis[300010]; int main(int argc, char const *argv[]) { int m, s, t; bool f = 0; while(cin >> m >> s >> t) { if(f) cout << endl; memset(dis, 0, sizeof(dis)); int r = 0; for (int i = 1; i <= t; ++i) { if(m > 9) { dis[i] = dis[r] + 60; ......
阅读全文
  • 03月
  • 20日
综合 ⁄ 共 3244字 评论关闭
http://www.360doc.com/content/11/1231/14/1954236_176297236.shtml java 反射 Field类 -------用到一个bean  Java代码   package com.ncs;      public class Point {          private int x;       public int y;              public Point(int x, int y) {           super();           this.x = x;           this.y = y;       }          }   --------------------  Java代码   package com.ncs;      import java.lang.reflect.Field;      //need another bean Point   public......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 1334字 评论关闭
 B. Red and Blue Balls 这道题是Codeforces Round #233 (Div. 2)的B题,觉得在思维方面的考察挺不错的。 初看我以为是考栈,结果刚跟小伙伴学长一讲,他就说不行,用栈绝对过不了= = 但是最近正好在看栈 ,所以很想拿这道题来练练用栈的能力。后面在龙酱和小伙伴的帮助下,总算写了粗来,不过只能过掉样例,但是对我来说也挺有意义的~ 用栈的方法如下: #include <iostream> //龙酱友情提供 #include <stack> using namespace std; int n; char a[10005]; int main() { //freopen("b.txt", "r",......
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 66字 评论关闭
imageview.layer.masksToBounds = YES; imageview.layer.cornerRadius = 35;
阅读全文
  • 11月
  • 22日
综合 ⁄ 共 1487字 评论关闭
  Professor Ben Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 7590   Accepted: 1840 Description Professor Ben is an old stubborn man teaching mathematics in a university. He likes to puzzle his students with perplexing (sometimes boring) problems. Today his task is: for a given integer N, a1,a2, ... ,an are the factors of N, let bi be the number of factors of ai, your job is to find the sum of cubes of all bi. Looking at the confused faces of his students, Prof.......
阅读全文
  • 11月
  • 22日
综合 ⁄ 共 1449字 评论关闭
Turn the corner Time Limit:1000MS  Memory Limit:32768KTotal Submit:16 Accepted:9 Description Mr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a width y. The car has a length l and a width d.Can Mr. West go across the corner? Input Every line has four real numbers, x, y, l and w.Proceed to the end of file. Output If he can go across the corner, print "yes......
阅读全文