Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘
...
分类:
其他好文 时间:
2015-04-11 19:33:14
阅读次数:
170
1、用于迭代器之后
Ruby的迭代器与其他语言的迭代器很不相同,它的迭代器一般都是函数,如:
def three_times
yield
yield
yield
end
使用实例: three_times { puts “hello”}
Ruby内置了一些迭代器如find,eac...
分类:
其他好文 时间:
2015-04-11 19:33:04
阅读次数:
127
使用mkdir()函数直接创建目录时,只能一层一层目录的依次创建,如果父级目录不存在,使用mk_dir()会报错:mkdir(): No such file or directory
所以最好自己封装函数来递归创建层级目录:
基本思路:从下向上层级递归操作:
步骤一,判断底层目录是否存在,存在时不操作直接返回true,否则进入第二步骤
步骤二,判断父级目录是否存在,不存在时一直递归...
分类:
其他好文 时间:
2015-04-11 19:32:42
阅读次数:
147
只要做过之前的那个Integer To Roman, 这个就不会很难啦~ 掌握转换规律, 建个table就OK了
"""
Programmer : EOF
Date : 2015.04.11
File : rti.py
E-mail : jasonleaster@gmail.com
"""
class Solution:
# @r...
分类:
其他好文 时间:
2015-04-11 19:32:28
阅读次数:
283
在嵌入式的开发过程中,我们经常要在pc端和arm板之间互相传文件:
arm-->pc:打开超级终端,选择菜单栏上的传送-->发送文件, 之后就会弹出一个框来,选择你要发送的文件
然后选择发送协议:Zmodem与崩溃恢复,点击发送按钮即可。
pc-->arm:在超级终端中,点击鼠标右键,在弹出的菜单中选择“接收文件”,开始设置接收文件的目录和协议,然后在终端中输入命令:sz XXX...
分类:
其他好文 时间:
2015-04-11 19:32:18
阅读次数:
139
scanf和scanf_s在VS2013中的使用在VS2013中,每次使用scanf都会报错:This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _C...
分类:
其他好文 时间:
2015-04-11 19:28:53
阅读次数:
1087
Clock& Clock::operator ++() //前置单目运算符重载函数{Second++;if(Second>=60){Second=Second-60;Minute++;if(Minute>=60){Minute=Minute-60;Hour++;Hour=Hour%24;}}retu...
分类:
其他好文 时间:
2015-04-11 19:30:00
阅读次数:
141
obj中创建新对象有两种方式:[classname new]和[[classname alloc] init]。两种方法等价,Cocoa惯例是使用alloc和init。1.分配对象: allocation是一个新对象诞生过程,从OS获得一块内存并指定为存放对象的实例变量的位置。同时alloc方法还将...
分类:
其他好文 时间:
2015-04-11 19:28:17
阅读次数:
210
题解链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=541 几天前百度题解后用数学知识AC的,后来大牛说这是一道动态规划题。 网上的数学解题链接:http://blog.csdn.net/x314542916/article/details/8...
分类:
其他好文 时间:
2015-04-11 19:27:24
阅读次数:
148
题目描述:给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号","隔开。现在请计算A+B的结果,并以正常形式输出。 输入: 输入包含多组数据数据,每...
分类:
其他好文 时间:
2015-04-11 19:28:35
阅读次数:
108
百度网盘地址:http://pan.baidu.com/s/1yIM8e
分类:
其他好文 时间:
2015-04-11 19:28:14
阅读次数:
129
1 #include 2 int main() 3 { 4 int n; 5 long long int a=9,b=1,x,y; 6 int i; 7 //freopen("te.txt","w",stdout); 8 scanf("%d",&n...
分类:
其他好文 时间:
2015-04-11 19:28:20
阅读次数:
116