常用接口: 注册驱动告诉程序使用哪个数据库驱动 2Connection:数据库连接对象 createStatement()有sql注入 PreparedStatement()继承createStatement()类解决了sql注入问题 2管理事务 开启setAutoCommit(Boolean au ...
分类:
数据库 时间:
2019-03-12 18:46:54
阅读次数:
173
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp ...
分类:
其他好文 时间:
2019-03-11 13:06:41
阅读次数:
155
练习6 练习7 体会:我在 t=s[i+1]+s[i] s.append(t)这个代码这花费了很长时间,总是用s[i+2]=s[i+1]+s[i]来跑程序,总是提示我超了,我干脆就用t来表示,这样append的时候也方便很多。 练习8 #判断101-200之间有多少个素数,并输出所有素数。 体会:s ...
分类:
编程语言 时间:
2019-03-10 17:56:03
阅读次数:
168
1.MVC 有一种程序设计模式叫MVC,核心思想:分层,解耦,分离了 数据处理 和 界面显示 的代码,使得一方代码修改了不会影响到另外一方,提高了程序的可扩展性和可维护性。 MVC的全拼为Model-View-Controller,最早由TrygveReenskaug在1978年提出,是施乐帕罗奥多 ...
分类:
Web程序 时间:
2019-03-10 13:49:22
阅读次数:
323
1 、 /* 输出 9*9 口诀。共 9 行 9 列, i 控制行, j 控制列。 */#include "stdio.h"main(){int i,j,result;for (i=1;i<10;i++){ for(j=1;j<10;j++){result=i*j;printf("%d*%d=%-3 ...
分类:
编程语言 时间:
2019-03-10 10:02:02
阅读次数:
190
Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive ...
分类:
其他好文 时间:
2019-03-09 23:16:42
阅读次数:
170
自定义模态 屠龙宝刀,点击就送 油腻的师姐,在哪里 用户名: 密码: ... ...
分类:
Web程序 时间:
2019-03-09 20:20:55
阅读次数:
181
inline 内联元素:是不可以控制宽和高、margin等;并且在同一行显示,不换行,直到该行排满。 block 块级元素:是可以控制宽和高、margin等,并且会换行。块级对象元素会单独占一行显示,多个block元素会各自新起一行。 inline-block 内联块级元素: 具有宽度高度特性,又具 ...
分类:
其他好文 时间:
2019-03-09 01:23:17
阅读次数:
244
Codeforces Beta Round #73 (Div. 2 Only) http://codeforces.com/contest/88 A 模拟 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lson l,mid,rt ...
分类:
其他好文 时间:
2019-03-08 22:03:18
阅读次数:
160
正巧在之前面试中遇到问实现拖拽效果 当时面试的时候简单回答了实现的方式与逻辑。 现在闲来无事,把这个东西实现了一下。 原理很简单,写的很方便。 数据驱动,建立一个数组,数组初始长度为1 拖动触发时,添加一个对象到数组中,拖动的是下标为0的对象,新建的还在原来位置放着,等待下次拖动。 话不多说,上代码 ...
分类:
其他好文 时间:
2019-03-08 16:54:10
阅读次数:
161