码迷,mamicode.com
首页 >  
搜索关键字:res    ( 29153个结果
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? 解题思路: 这是一个典型的斐波那契数列,对于...
分类:其他好文   时间:2014-07-31 00:02:55    阅读次数:243
平方剩余
平方剩余 POJ:1808 链接:http://poj.org/problem?id=1808 题意:给定a,n(n为质数) 问 x^2 ≡ a (mod n) 是否有解    可以用a^((n - 1)/2) ≡ ±1(mod n) 当为1是二次剩余,为-1是非二次剩余 但上述方法仅仅是判断是否有解,下面的方法能够求最小整数解 Ural(Timus) 1132 链接...
分类:其他好文   时间:2014-07-30 23:56:45    阅读次数:732
SqlHelper
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Data;using System.Data.SqlClient;using System.Configurat...
分类:数据库   时间:2014-07-30 23:52:25    阅读次数:331
常用github命令
假设repository的名字叫hello-world:1.创建一个新的repository:先在github上创建并写好相关名字,描述。$cd ~/hello-world //到hello-world目录$git init //初始化$git add . ...
分类:其他好文   时间:2014-07-30 23:37:15    阅读次数:264
创建sql自定义的函数及商品分页sql存储过程
--商品筛选时判断品牌ID是否存在--select dbo.isValite(94,94)create function isValite(@brandId int,@bId int)returns intas begin Declare @rNumber int if @brandId = @b....
分类:数据库   时间:2014-07-30 23:36:55    阅读次数:443
chrome 隐藏技能之 base64 图片转换
有时候我们要转换图片为base64,或者将base64转回图片,可能都需要找一些在线工具或者软件类型的工具才行。当然 chrome 也算是软件,但是好在做前端的都有 chrome。好了,来看下简单的例子,我随便截了个桌面背景当例子。分别保存为 png, jpg 两种。然后用 chrome 打开图片,...
分类:其他好文   时间:2014-07-30 23:26:26    阅读次数:424
在MVC的项目中访问静态页面
MVC在生成项目的时候会生成的WEB-INF底下.这个文件夹下面的文件是受保护的,都会走MVC的流程,但是我希望在WebContent底下可以使用静态页面,那么需要进入springmvc-servlet.xml 页面,加上一句话: 这样,使用mvc:resources标签,可以将根目录下的文件全部定...
分类:Web程序   时间:2014-07-30 23:17:15    阅读次数:345
单链表练习
//code:#include#includeusing namespace std;typedef int status;typedef int elemType;typedef struct lNode{elemType num;struct lNode *next;}lNode,*linkNo...
分类:其他好文   时间:2014-07-30 23:13:45    阅读次数:189
android的生命周期
android的生命周期指activity从启动到销毁的过程,在这个过程中,activity一般表现为4种状态,分别是活动状态,暂停状态,停止状态,和非活动状态。 活动状态,当activity在用户界面处于最上层(手机永远都是显示activit...
分类:移动开发   时间:2014-07-30 21:00:54    阅读次数:271
lvm_extend
vi?lvm_extend.sh #!/bin/bash #jk409???2014-7-30 #eg. #lvm_extend.sh???/dev/sdb?????9.9 #扩展10g yp=$1 Size=$2 fdisk?${yp}?<<?EOF n p 1 t 8e wq EOF partprobe mkfs.ext4??${yp}1 pv...
分类:其他好文   时间:2014-07-30 21:00:15    阅读次数:245
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!