/**
*
*
* ClassName ClimbingStairs
*
*
* Description You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps.
* In how many...
分类:
其他 时间:
2015-03-20 00:05:42
收藏:
0 评论:
0 赞:
0 阅读:
283
最近做项目的时候用到了将GridControl中一列设置为PictureEdit类型,然后通过这一列来显示图片。经过尝试发现有以下两种方式可行。
方法一、知道图片的路径与名称
比如:在数据库中存储了图片的路径(包括:本地路径、服务器路径),那么在可以通过非绑定列的方式来实现。
1、创建了一个非绑定列并设置其相应的属性,属性设置如下:
FieldName设为...
分类:
其他 时间:
2015-03-20 00:05:32
收藏:
0 评论:
0 赞:
0 阅读:
522
题目链接:Sqrt(x)
Implement int sqrt(int x).
Compute and return the square root of x.
这道题的要求是实现int sqrt(int x),即计算x的平方根。
考虑二分,即先令l和r分别为1和x/2+1(x的平方根一定小于等于x/2+1),然后m等于(l+r)/2,不断比较m*m和x的大小。
由于...
分类:
其他 时间:
2015-03-20 00:05:22
收藏:
0 评论:
0 赞:
0 阅读:
244
题目链接:Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
这道题的要求是爬n阶...
分类:
其他 时间:
2015-03-20 00:05:12
收藏:
0 评论:
0 赞:
0 阅读:
327
本文介绍在EA工具中,从最初的用例延续下来,先设计类及其方法,再设计时序图过程,以及时序图分层设计方法。...
分类:
其他 时间:
2015-03-20 00:05:02
收藏:
0 评论:
0 赞:
0 阅读:
1952
题目大意:
求解两个不相等的正整数N、M(N<M),使得 1 + 2 + … + N = (N+1) + … + M。输出前10组满足要求
的(N,M)。
思路:
要使 1 + 2 + … + N = (N+1) + … + M,那么 N*(N+1)/2 = (M-N)(M+N+1)/2,即
(2*M+1)^2 - 8*N^2 - 1,令x = 2*M + 1,y = N,就有x^2 - 8*y^2 = 1,就变成了典型的佩尔方程,
已知x1 = 3,y1 = 1,由迭代公式得:
xn = x(n-1)*...
分类:
其他 时间:
2015-03-20 00:04:52
收藏:
0 评论:
0 赞:
0 阅读:
318
题目:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place wit...
分类:
其他 时间:
2015-03-20 00:04:42
收藏:
0 评论:
0 赞:
0 阅读:
346
题目大意:
求满足以a、b为直角边,c为斜边,并且满足a + b + c n,且若m为奇数,则n为偶数,若m为偶数,则n为奇数。
枚举m、n,然后将三元组乘以i倍,保证 i * (x + y + z)在所给范围内(2 * m^2 + 2 * m*n <= L),
就可以求出所有满足条件的三元组。...
分类:
其他 时间:
2015-03-20 00:04:32
收藏:
0 评论:
0 赞:
0 阅读:
307
本篇内容讲述回归问题中最常用的ridge regression与Lasso,同时深入浅出地探讨稀疏约束,正则,分析了Lasso稀疏的原因。...
分类:
其他 时间:
2015-03-20 00:04:23
收藏:
0 评论:
0 赞:
4 阅读:
8654
解决超大数相加的问题的一种思路是把整形转化成字符串,废话不多说直接上代码,已经调试通过。
#include
#include
#include
using namespace std;
string add(string str1, string str2)
{
int i;
string str;
int len_str1 = str1.length();
int len_...
分类:
其他 时间:
2015-03-20 00:03:52
收藏:
0 评论:
0 赞:
0 阅读:
360
题意:把H和m一一配对,他们所需走的最小步数和 为多少。
做法:用bfs 先找出 任意 H 和 m 直接的最小步数。记录下来。 然后像二分图一样建图。 起点到 所有home 流量1,费用0。 home 和man 之间的费用为距离,流量1,man和终点ee之间流量1,费用0。 建图完,然后用最小费用最大流 跑一边就ok了。...
分类:
其他 时间:
2015-03-20 00:03:42
收藏:
0 评论:
0 赞:
0 阅读:
412
本文主要整理简绍来自互联网的各项异性滤波的知识。
原文链接:http://www.linuxgraphics.cn/graphics/using_anisotropic_texture_filtering_in_opengl.html
基本的纹理过滤
纹理是数据的简单矩阵排列——例如,颜色数据、亮度数据或者颜色和alpha(透明度)数据。纹理数组中的每一个独立的数值通...
分类:
其他 时间:
2015-03-20 00:02:42
收藏:
0 评论:
0 赞:
0 阅读:
445
Problem Description
In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matr...
分类:
其他 时间:
2015-03-20 00:00:46
收藏:
0 评论:
0 赞:
0 阅读:
356
Given the value of a+b and ab you will have to find the value of an+bn
Input
The input file contains several lines of inputs. Each line except the last line contains 3 non-negative integers p, q...
分类:
其他 时间:
2015-03-19 23:59:12
收藏:
0 评论:
0 赞:
0 阅读:
567
Problem Description
In order to get rid of Conan, Kaitou KID disguises himself as a teacher in the kindergarten. He knows kids love games and works out a new game called "hand in hand".
Initiall...
分类:
其他 时间:
2015-03-19 23:58:42
收藏:
0 评论:
0 赞:
0 阅读:
516
原因:在Django项目下相应的应用下面的models.py配置的model(也就是class)没有创建成相应的表。
这是怎么回事呢?
首先,将models.py里面的model创建成对应的数据库表的执行命令(DOS命令)为:manage.py syncdb。
但是我自己的电脑上执行该命令时,显示.Unknown command:syncdb.执行...
分类:
其他 时间:
2015-03-19 23:58:12
收藏:
0 评论:
0 赞:
0 阅读:
565
思路:生成全排列,用next_permutation,注意生成之前先对那个字符数组排序。
AC代码:
#include
#include
#include
#include
#include
using namespace std;
char str[20];
int main() {
int n;
cin >> n;
while(n--) {
scanf("%...
分类:
其他 时间:
2015-03-19 23:56:12
收藏:
0 评论:
0 赞:
0 阅读:
434
目录1、登录2、数据库连接3、配置用户和权限4、配置基本信息5、录入新生儿信息6、新生儿信息导出7、系统设置
分类:
其他 时间:
2015-03-19 23:55:22
收藏:
0 评论:
0 赞:
0 阅读:
396
1.下载R最新版和RStudio最新版2.安装R到路径C:\Program Files\R\R-3.1.33.安装RStudio到路径C:\Program Files\R\R-3.1.3\RStudio提示:请把RStudio安装到R的安装路径
分类:
其他 时间:
2015-03-19 23:55:12
收藏:
0 评论:
0 赞:
0 阅读:
412
SVN提交时,如果没有注释,在查阅历史时,会非常不方便。因此我们需要有一个让程序员提交代码时,强制添加注释的规则。下面看看在SVN中怎么实现。1. 推荐使用VisualSVN作为服务端(免费下载地址:http://www.visualsvn.com/)。安装完毕后,打开VisualSVN Serve...
分类:
其他 时间:
2015-03-19 23:54:32
收藏:
0 评论:
0 赞:
0 阅读:
373