码迷,mamicode.com
首页 >  
搜索关键字:temp    ( 7776个结果
43. Multiply Strings
string multiply(string num1, string num2) { if (num1 == "0" || num2 == "0") return "0"; int sa = num1.size(); int sb = num2.size(); vector temp(sa + s...
分类:其他好文   时间:2016-03-08 23:30:18    阅读次数:210
[leetcode] Invert binary tree.
Invert a binary tree. class Solution { public: TreeNode* invertTree(TreeNode* root) { TreeNode* temp; if(root) { temp=root->left; root->left=root->rig
分类:其他好文   时间:2016-03-08 10:35:17    阅读次数:107
关于tcpl习题4-14定义宏swap(t,x,y)
题意要求宏,能交换t类型的两个参数。由于愚昧,没读懂题意。于是在网上查到答案: #define SWAP(t,x,y) (t temp;temp = x;x = y;y = temp;) 虽然懂了意思但用gcc写了个例子编译失败。 #include<stdio.h> #define SWAP(t,x
分类:其他好文   时间:2016-03-08 00:26:44    阅读次数:213
代码重构(二):类重构规则(Swift版)
在上篇博客《代码重构(一):函数重构规则(Swift版)》中,详细的介绍了函数的重构规则,其中主要包括:Extract Method, Inline Method, Inline Temp, Replace Temp with Query, Introduce Explaining Variable
分类:编程语言   时间:2016-03-07 10:17:18    阅读次数:287
two sum
#include #include #include #include using namespace std;vector twoSum(vector& nums, int target) { int len = nums.size(); map temp; vector re; for (int...
分类:其他好文   时间:2016-03-07 10:13:31    阅读次数:119
软件测试作业1--描述Error
记忆犹新的错误: 上个学期选修了可视化这门课程,最后大作业用d3实现,在使用d3读取csv数据的时候出现了以下Error: 我先是在代码中读取了某csv格式的数据,并且将其存入变量root中,然后对root进行遍历,然后进行统计,最后将一些统计得来的结果存入了另一个变量temp。而且这个temp声明
分类:其他好文   时间:2016-03-06 23:40:16    阅读次数:174
Verify Preorder Serialization of a Binary Tree
bool isValidSerialization(string preorder) { int len = preorder.size(); vector temp; bool flag = true; for (int i = 0; i 1 && temp[sz - 1] == '#'&&tem...
分类:其他好文   时间:2016-03-06 15:37:22    阅读次数:110
冒泡排序
int arr[5]={12,6,1,40,9}; for(int i=0;i<4;i++){ for(int j=0;j<4-i;j++){ int temp; if(arr[j]>arr[j+1]){ temp=arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; }
分类:编程语言   时间:2016-03-05 23:20:24    阅读次数:205
8.1.2 纯路径操作
纯路径操作对象提供了一些操作路径的功能,但不会访问文件系统的功能。主要提供下面三个类对象:class pathlib.PurePath(*pathsegments) 创建一个通用表示文件路径的类。例子:#python 3.4from pathlib import * p = PurePath('F:\\temp\\py')print(p)p = PurePath('foo', 'some/path...
分类:其他好文   时间:2016-03-05 10:23:19    阅读次数:148
手动执行把nconf生成的配置文件附加到nagios下
清空temp目录 rm -rf /var/www/nconf/temp/* 执行 /var/www/nconf/bin/generate_config.pl 删除原来配置文件 rm -rf /usr/local/nagios/etc/Default_collector rm -rf /usr/loc
分类:移动开发   时间:2016-03-04 16:03:15    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!