码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
逆置单链表
我自己的方法是用的递归,毕竟也是接触了一点点点点点点 scheme 的骚年是吧,代码如下:ListNode* reverseList(ListNode* head) { if (head == nullptr){ return nullptr; } ListN...
分类:其他好文   时间:2015-08-04 18:56:08    阅读次数:174
在基础管理下添加一个商品类型维护的模块(7-31)
一 ? ?验证不能为空的操作: 在form中添加代码@NotEmpty(field="商品类型", message="{errors.required}") 在controller中对应不能为空的位置添加 ? ? ?if(results.hasErrors()) ? ? ? ?return "manager...
分类:其他好文   时间:2015-08-04 17:30:20    阅读次数:192
leetcode算法之Valid Anagram
原文算法说明如下: Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t = "car", return false. 翻译:...
分类:编程语言   时间:2015-08-04 17:19:11    阅读次数:121
LeetCode#43 Multiply Strings
Problem Definition:Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily lar...
分类:其他好文   时间:2015-08-04 17:07:12    阅读次数:112
Java 数据Entity加密和文件上传
一,数据加密 1.org.apache.commons.codec.digest.DigestUtils 提供了,md5,Hex,Sha等不可逆算法加密 public?static?String??MD5(String?src) { return?DigestUtils.md5Hex(src); } public?static?Str...
分类:编程语言   时间:2015-08-04 16:04:21    阅读次数:167
python的一些总结4
这篇继续水 但是在水的的基础上 让搭建能正常使用flask 搭建一个站上篇讲到在 模板view中 输入{{xx }} 可以打印 后台传的值。 这篇讲一下 循环控制 条件控制等修改后台代码:1 @app.route('/')2 def hello_world():3 #return 'Hell...
分类:编程语言   时间:2015-08-04 15:00:50    阅读次数:156
随机不同的数
int MyRand ( int nMin, int nMax ) { if ( nMin > nMax ) { int nTemp = nMin; nMin = nMax; nMax = nTemp; } return ( nMin + rand() % ( nMax - n...
分类:其他好文   时间:2015-08-04 14:58:57    阅读次数:117
心急的C小加
?? #include #include #include using namespace std; typedef struct {     int length;     int weight; }stick; bool cmp(stick x,stick y) {     if(x.length         return true;     if(x...
分类:其他好文   时间:2015-08-04 13:38:34    阅读次数:103
Objective-C学习笔记_内存管理(二)
一、属性的内部实现原理assign的属性内部实现setter方法:// setter方法 @property (nonatomic, assign) NSString *name;- (void)setName:(NSString *)name { _name = name; }getter方法:// getter方法 - (NSString *)name { return _name; }...
分类:其他好文   时间:2015-08-04 13:30:50    阅读次数:116
(leetcode)Summary Ranges
Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].思想很简单逐个比较...
分类:其他好文   时间:2015-08-04 13:16:30    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!