#include
void my_strcpy(char* dest,const char* str)
{
if(NULL != dest || NULL != str)
{
while(((*dest++) = (*str++)))//注意运算的优先级
{
;
}
}
*dest = '\0';...
分类:
其他 时间:
2015-04-09 17:23:48
收藏:
0 评论:
0 赞:
0 阅读:
148
题意Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.思路基本的深搜,注意一点就是必须是根到叶子节点求和,不可在非叶子节点处停。代码/**
* Definition for binary tree
* struct TreeNode {
*...
分类:
其他 时间:
2015-04-09 17:23:38
收藏:
0 评论:
0 赞:
0 阅读:
91
什么是GCD
Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。该方法在Mac OS X 10.6雪豹中首次推出,并随后被引入到了iOS4.0中。GCD是一个替代诸如NSThread, NSOperationQueue, NSInvocationOperation等技术的很高效和强大的技术,它看起来象就其它语言的闭包(Closure)一样,但苹...
分类:
其他 时间:
2015-04-09 17:23:29
收藏:
0 评论:
0 赞:
0 阅读:
421
#include
#include
using namespace std;
class string1
{
private:
char *str;
public:
string1(const char *s)
{
str = new char[strlen(s) + 1];
strcpy(str,s);
cout<<"str...
分类:
编程语言 时间:
2015-04-09 17:23:08
收藏:
0 评论:
0 赞:
0 阅读:
159
题目:Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguo...
分类:
其他 时间:
2015-04-09 17:22:59
收藏:
0 评论:
0 赞:
0 阅读:
177
ListView中嵌套GridView时GridView的数据无法完全显示...
分类:
其他 时间:
2015-04-09 17:22:48
收藏:
0 评论:
0 赞:
0 阅读:
211
/**
* 在for-each循环中使用entries来遍历
* 这是最常见的并且在大多数情况下也是最可取的遍历方式。在键值都需要时使用
* 如果遍历的是一个空的map,会报数组越界 ,java5引入,不兼容老版本
* @param map
*/
public void methodOne(Map map){
for (Map.Entry entry : map.entrySet()...
分类:
编程语言 时间:
2015-04-09 17:22:28
收藏:
0 评论:
0 赞:
0 阅读:
243
上一讲聊了什么时候不要使用索引,但有时候使用了也不见得会被使用。...
分类:
数据库技术 时间:
2015-04-09 17:22:18
收藏:
0 评论:
0 赞:
0 阅读:
236
python调用函数可以提供 key=value 代表这个参数的值,我们可以不用根据函数定义顺序来调用函数。。。。
(*a,**b) 可以作为装饰器提供不定参数。。。使装饰器和被装饰函数 耦合度大幅度降低
函数 def func():
return 1
///返回 函数的名字
func.__name__
//////通过装饰器实现类的静态方法
clas...
分类:
编程语言 时间:
2015-04-09 17:22:08
收藏:
0 评论:
0 赞:
0 阅读:
252
window.location.href、location.href是本页面跳转
parent.location.href是上一层页面跳转
top.location.href是最外层的页面跳转...
分类:
Web开发 时间:
2015-04-09 17:21:58
收藏:
0 评论:
0 赞:
0 阅读:
214
IOS动画的使用方法总结...
分类:
移动平台 时间:
2015-04-09 17:21:48
收藏:
0 评论:
0 赞:
0 阅读:
288
Python是动态类型语言 ,也是若类型语言这种 语言特性就决定了 他不会有多么的复杂。。
#简单的输出打印
#coding=utf-8
import time; # This is required to include time module.
word = 'word'
sentence = "This is a sentence."
paragraph = """This is a ...
分类:
编程语言 时间:
2015-04-09 17:21:38
收藏:
0 评论:
0 赞:
0 阅读:
266
#include
#include
#include
#include
using namespace std;
int main()
{
//最简单的lambda表达式
[](){};
//lambda表达式也就是一个函数,我们可以把它赋给函数指针,也可以在后面加上括号使用。
//
//[]里面可以添加一些限制lambda块语句中使用外部变量的限制符。一共有四种情况...
分类:
编程语言 时间:
2015-04-09 17:21:28
收藏:
0 评论:
0 赞:
0 阅读:
153
Java远程调试的原理是两个VM之间通过debug协议进行通信,然后以达到远程调试的目的。两者之间可以通过socket进行通信。...
分类:
编程语言 时间:
2015-04-09 17:21:18
收藏:
0 评论:
0 赞:
0 阅读:
284
def TestDic1():
dict2 ={'aa':222,11:222}
for val in dict2:
print val
def TestDic2():
dict2 ={'aa':222,11:222}
for (key,val) in dict2.items():
print key,":",val
de...
分类:
编程语言 时间:
2015-04-09 17:21:09
收藏:
0 评论:
0 赞:
0 阅读:
416
软件环境:Win7,Keil MDK 4.72a, IAR EWARM 7.2, GCC 4.2,Python 2.7 ,SCons 2.3.2
硬件环境:Armfly STM32F103ZE-EK v3.0开发板
参考文章:RT-Thread编程指南
RT-Thread_1.2.0+lwip+rtgui0.8.0 移植心得
RT-Thread RTOS组件:RTGUI...
分类:
其他 时间:
2015-04-09 17:20:58
收藏:
0 评论:
0 赞:
0 阅读:
420
直接上代码就可以了,所以的学习都在注释当中呢!#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H#ifndef __ASSEMBLY__//如果宏定义了__CHECKER__
//详细学习一个Sparse
#ifdef __CHECKER__/**
* 这个使用来修饰一个变量的,这个变量必须是非解除参考的,no
* dereference...
分类:
其他 时间:
2015-04-09 17:20:48
收藏:
0 评论:
0 赞:
0 阅读:
273
func.py
# -*- coding: GBK -*-
"""
在Python中默认是 Ansi编码格式 要使用中文需要 明确指定编码
数组分为动态数组和静态数组 动态数组可以动态添加 元素
静态数组不能改变 数据结构
def 定义function
def Func:
return
void 类型的函数定义
def FuncShow():
print "v...
分类:
编程语言 时间:
2015-04-09 17:20:38
收藏:
0 评论:
0 赞:
0 阅读:
260
SQL Server调试存储过程...
分类:
数据库技术 时间:
2015-04-09 17:20:28
收藏:
0 评论:
0 赞:
0 阅读:
256
把码头作为0点处理。
首先判断不建码头是否可以生成最小生成树
最小生成树用kruskal算法,若对于代价
若可以:Min(最小生成树(不建码头),最小生成树(建码头));
若不可:最小生成树(建码头)
#include "stdio.h"
#include "string.h"
#include "algorithm"
using namespace std;
int fathe...
分类:
其他 时间:
2015-04-09 17:20:18
收藏:
0 评论:
0 赞:
0 阅读:
273