首页 > 2015年05月06日 > 全部分享
CodeForces 13C && poj 3666 状态定义不同...
这个是因为状态定义不同产生的两种代码. 题意都是一样的,CF还简化了一种情况. 参考: poj3666 CF13 CF中定义: f[i][j] 表示将原始数列中的前 i 个数变成单调不降,第 i 个数最多为 B[j] 的最少操作次数 转移:f[i][j] = min(f[i][j-1],f[i-1][j]+abs(a[i]-b[j])) poj中定义: dp[i][j]表示:前i...
分类:其他   时间:2015-05-06 13:24:03    收藏:0  评论:0  赞:0  阅读:148
poj2676 Sudoku
Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1...
分类:其他   时间:2015-05-06 13:23:43    收藏:0  评论:0  赞:0  阅读:172
Palindrome Number ——解题笔记
【题目】 Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of co...
分类:其他   时间:2015-05-06 13:23:33    收藏:0  评论:0  赞:0  阅读:152
odom->base_link
turtle_tf_listener.cpp#include #include #include using namespace std; double x,y,z,ww,zz,hh,ii,Aww,Azz,Ahh,Aii; int main(int argc, char** argv){ ros::init(argc, argv, "my_tf_listener"); ros::N...
分类:其他   时间:2015-05-06 13:23:24    收藏:0  评论:0  赞:0  阅读:383
通过Thread配置定时器
在项目中需要不断的发送请求,我使用过Thread来实现 在sring.xml中配置,引入索要操作的类 实现的java代码:(去掉了相关的业务) pack...
分类:其他   时间:2015-05-06 13:23:13    收藏:0  评论:0  赞:0  阅读:193
C++ 遍历目录所有文件并判断是否为目录
1. 思路  使用FindFirstFile、FindNextFile函数,来遍历目录。结果保存在WIN32_FIND_DATA结构体中。将查询结果的dwFileAttributes和FILE_ATTRIBUTE_DIRECTORY取与操作,判断是否为目录。2. 示例代码#include #include #include using...
分类:编程语言   时间:2015-05-06 13:23:03    收藏:0  评论:0  赞:0  阅读:149
navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) 判断是不是 移动设备 'ontouchstart' in window; 判断支不支
navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) 判断是不是 移动设备   'ontouchstart' in window; 判断支不支触屏...
分类:移动平台   时间:2015-05-06 13:22:53    收藏:0  评论:0  赞:1  阅读:14530
数据结构与算法——线性表链式存储(单链表)
今天总结单链表的实现. 什么是链表?   就是采去链式存储结构的线性表,所谓链式存储就好比火车的车厢一样,一节一节的连接起来,成为一个线性表。这种方式采用动态存储分配方式,即程序在运行时根据实际需要申请内存空间,不需要时将内存空间释放掉。   链表用一组任意的存储单元存放线性表中的各个元素,这组存储单元可以是连续的,也可以是不连续的。 什么是单链表? 单链表简单理解就是单向的,就像火...
分类:编程语言   时间:2015-05-06 13:22:43    收藏:0  评论:0  赞:0  阅读:188
sqlserver 锁定一行数据,禁止读取,修改和删除
sql 事务中 有时候需要锁定某行,等事物完成后 释放此行。 使用 with(ROWLOCK,UpdLock)   锁定当前行。禁止读取,修改和删除 a 事务 ALTER PROCEDURE [dbo].[asuo] AS BEGIN  begin tran SELECT TOP 1 * FROM dbo.JYQ_HLT_Order with(ROWLOC...
分类:数据库技术   时间:2015-05-06 13:22:33    收藏:0  评论:0  赞:0  阅读:858
数组操作
1、定义一维和二维甚至高维数组的方法为: 数组类型 [ ] 数组名称; 数组类型 [ ] [ ]数组名称; 数组类型 [ ][ ]  ....数组名称; 需要注意的是在定义数组时不能指定数组的长度。 2、数组的初始化有静态初始化和动态初始化,二者的区别在:静态初始化指定数组的数组,动态初始化只指定数组的长度。 例如:int [ ] Arr;     Arr=new int [...
分类:编程语言   时间:2015-05-06 13:22:23    收藏:0  评论:0  赞:0  阅读:170
猫猫学IOS(三十四)UI之Quartz2D画画板的实现
猫猫分享,必须精品原创文章,欢迎转载。转载请注明:翟乃玉的博客 地址:http://blog.csdn.net/u013357243?viewmode=contents 源码:效果:实现过程:首先用storyboard搭建界面,没有什么好说的。 然后就是注意的功能了,这里用了触摸事件来搭配Quartz2D的路径来画画。 思路就是把路径放到数组中@property (nonatomic, s...
分类:移动平台   时间:2015-05-06 13:22:13    收藏:0  评论:0  赞:0  阅读:330
error C3861: “InitializeCriticalSectionAndSpinCount”: 找不到标识符
VS2008的工程转换成VS2010后编译报错 error C3861: “InitializeCriticalSectionAndSpinCount”: 找不到标识符 定位到atlcore.h文件,这是系统文件没有做任何更改,不该有错的呀。主要还是版本兼容性问题。 修改方法: 新建一个targetver.h头文件,复制以下代码: #pragma once // Including...
分类:其他   时间:2015-05-06 13:22:03    收藏:0  评论:0  赞:0  阅读:1933
phoneGap OC给JS传值方法
参考链接:http://www.yelanxiaoyu.com/app/phonegap开发/phonegap-ios开发-oc调用js传递参数并获得返回值.html iOS: 在要传值页面(比如城市列表)中实现如下方法: - (void)viewWillDisappear:(BOOL)animated {     [super viewWillDisappear:animate...
分类:Web开发   时间:2015-05-06 13:21:53    收藏:0  评论:0  赞:0  阅读:527
C++ Primer第四版习题--3.13
//读一组数到vector对象,计算收尾配对元素的和并输出 #include #include int main() { std::vector ivec; int temp, add; while(std::cin>>temp) ivec.push_back(temp); typedef std::vector::size_type vec...
分类:编程语言   时间:2015-05-06 13:21:43    收藏:0  评论:0  赞:0  阅读:219
fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0500. Val
fatal error C1189: #error :  This file requires _WIN32_WINNT to be#defined at least to 0x0500. Value 0x0501 or higher is recommended. VS2008的工程转换成VS2010后编译报错。 定位到afxcomctl32.h文件,这是系统文件没有做任何更改,...
分类:Windows开发   时间:2015-05-06 13:21:33    收藏:0  评论:0  赞:0  阅读:501
php中的this self parent
this是指向对象实例的一个指针,在实例化的时候来确定指向;self是对类本身的一个引用,一般用来指向类中的静态变量和常量;parent是对父类的引用,一般使用parent来调用父类的构造函数。         使用类里面静态(一般用关键字static)的成员,必须使用self来调用。使用self来调用静态变量必须使用:: (域运算符号)。 static关键字描述一个成员是静态的,...
分类:Web开发   时间:2015-05-06 13:21:23    收藏:0  评论:0  赞:0  阅读:196
点击GridView中TextBox弹出输入对话层,输入内容反传回先前点击的TextBox中(Jquery获取GridView中TextBox的ID)
项目中,由于用户反映说:GridView表中的输入框太小,不方便输入,特别是在输入内容多的时候。问能不能点击GridView中输入框的时候能弹出一个大的内容输入对话框。 介于用户的要求,我就开始修改。 先想到的就是我用Jquery在GridView中TextBox上添加一个focus焦点捕捉事件,当点击时触犯弹出内容输入框。 然后就是当输入完毕的操作了,我又使用内容输入框(其实也是一个Tex...
分类:Web开发   时间:2015-05-06 13:21:13    收藏:0  评论:0  赞:0  阅读:471
(素材源码)猫猫学IOS(三十四)UI之Quartz2D画画板的实现
猫猫分享,必须精品原创文章,欢迎转载。转载请注明:翟乃玉的博客 地址:http://blog.csdn.net/u013357243?viewmode=contents 源码:http://download.csdn.net/detail/u013357243/8666923效果:代码:NYViewNYView.h// // NYView.h // 画画板 // // Created b...
分类:移动平台   时间:2015-05-06 13:21:08    收藏:0  评论:0  赞:0  阅读:295
Binary Tree Level Order Traversal 、Binary Tree Level Order Traversal II
题目描述: Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,...
分类:其他   时间:2015-05-06 13:20:33    收藏:0  评论:0  赞:0  阅读:236
LeetCode 4 Median of Two Sorted Arrays
Problem: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Solution: 使用...
分类:其他   时间:2015-05-06 13:20:23    收藏:0  评论:0  赞:0  阅读:158
2032条   上一页 1 ... 58 59 60 61 62 ... 102 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!