码迷,mamicode.com
首页 > 其他好文
TYVJ 1038忠诚 ST 求区间最值
已经不搞ACM了,就是最近随便做点题,就在这里存个代码 1 #include 2 #include 3 using namespace std; 4 const int maxn = 100005; 5 int a[maxn][20]; 6 int x[maxn]; 7 void i...
分类:其他好文   时间:2015-03-20 01:13:20    阅读次数:167
设计模式简介
一、设计模式简介设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的;设计模式使代码编制真正工程化;设计模式是软件工程的基石脉络...
分类:其他好文   时间:2015-03-20 01:12:09    阅读次数:166
安装PIL库
之前在github上看到猫猫的攻破12306代码git clone之后尝试在本地运行发现缺少PIL库,下载源码之后手动编译安装。失败后来发现是缺少jpeg和zlib的支持遂执行brew install libjpegbrew install zlib删掉之前安装的PIL,再安装,还是不成功然后继续安...
分类:其他好文   时间:2015-03-20 01:10:59    阅读次数:213
LeetCode – Refresh – Gray Code
i ^ (i >> 1), that's the general format 1 class Solution { 2 public: 3 vector grayCode(int n) { 4 vector result; 5 for (int i = 0;...
分类:其他好文   时间:2015-03-20 01:09:59    阅读次数:140
【转载】Zend Studio 10正式版注册破解
1.文件和汉化文件 ZendStudio官方下载地址:http://www.geekso.com/component/zendstudio-downloads/百度云地址:10.0.0.msi文件: url1juno汉化文件:http://pan.baidu.com/share/link?share...
分类:其他好文   时间:2015-03-20 01:10:49    阅读次数:157
Sublime Text 3 安装 Package Control
Sublime Text 3 安装 Package Control | 浏览:2461 | 更新:2014-04-26 18:07 自动安装: 1、通过快捷键 ctrl+`?或者 View > Show Console 菜单打开控制台 2、粘贴对应版本的代码后回车安装 适用于 Sublime Te...
分类:其他好文   时间:2015-03-20 00:10:32    阅读次数:201
EL表达式
格式: ${ 开头 } 结尾,中间写代码,代码一般以.或[]连接,来取出属性 如${ person.name }取出person的name属性,内部会通过反射,调用person.getName()方法 ${ list[0].name } ${ empty(object)?} empty()是EL表达式...
分类:其他好文   时间:2015-03-20 00:09:13    阅读次数:167
LeetCode --- 68. Text Justification
题目链接:Text Justification Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a ...
分类:其他好文   时间:2015-03-20 00:06:50    阅读次数:188
Climbing Stairs
/** * * * 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:07:35    阅读次数:190
在DevExpress GridControl的一列中显示图片
最近做项目的时候用到了将GridControl中一列设置为PictureEdit类型,然后通过这一列来显示图片。经过尝试发现有以下两种方式可行。 方法一、知道图片的路径与名称         比如:在数据库中存储了图片的路径(包括:本地路径、服务器路径),那么在可以通过非绑定列的方式来实现。 1、创建了一个非绑定列并设置其相应的属性,属性设置如下:         FieldName设为...
分类:其他好文   时间:2015-03-20 00:07:46    阅读次数:335
LeetCode --- 69. Sqrt(x)
题目链接: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:07:04    阅读次数:166
LeetCode --- 70. Climbing Stairs
题目链接: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:07:14    阅读次数:110
UML建模——使用EA工具开发时序图实践及经验
本文介绍在EA工具中,从最初的用例延续下来,先设计类及其方法,再设计时序图过程,以及时序图分层设计方法。...
分类:其他好文   时间:2015-03-20 00:05:57    阅读次数:293
POJ1320 Street Numbers【佩尔方程】
题目大意: 求解两个不相等的正整数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:06:43    阅读次数:139
Leetcode: Remove Duplicates from Sorted Array
题目: 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:06:15    阅读次数:175
FZU1669 Right-angled Triangle【毕达哥拉斯三元组】
题目大意: 求满足以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:05:21    阅读次数:213
机器学习:概念与理解(二):回归、稀疏与正则约束 ridge regression,Lasso
本篇内容讲述回归问题中最常用的ridge regression与Lasso,同时深入浅出地探讨稀疏约束,正则,分析了Lasso稀疏的原因。...
分类:其他好文   时间:2015-03-20 00:04:57    阅读次数:322
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!