#include
void Reverse(int *p , int size)
{
int i , tmp;
for(i = 0 ; i < size/2 ; i++)
{
tmp = p[i] ;
p[i] = p[size-1-i] ;
p[size-1-i] = tmp ;
}
...
分类:
编程语言 时间:
2016-06-16 14:39:16
阅读次数:
141
1. Linux上的文件管理类命令都有哪些,其常用的使用方法及其相关示例演示。2. bash的工作特性之命令执行状态返回值和命令行展开所涉及的内容及其示例演示。3. 请使用命令行展开功能来完成以下练习:3.1 创建/tmp目录下的:a_c, a_d, b_c, b_d3.2 创建/tmp/mylin... ...
分类:
其他好文 时间:
2016-06-15 23:37:25
阅读次数:
285
由于一直没升级系统版本,php也一直用的是系统默认的,导致新的一些东西用起来会有问题,比如composer...之前一直没去理会,这次有个资源在github上没找到,想了想还必须弄弄这个东西了,废话不多说了,流水账如下:系统版本:osx10.9.5php5.4.45php配置简记‘/private/var/tmp/..
分类:
Web程序 时间:
2016-06-15 16:17:46
阅读次数:
404
比如在当前目录下创建目录/tmp/test/,过程如下: 开始我这样写的: 然后运行抛出异常(no such file or directory,mkdir...)如下: 后来发现目录要一层一层创建,修改后代码如下: ...
分类:
Web程序 时间:
2016-06-15 12:24:34
阅读次数:
6600
使用文件缓存 #settings.py CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': '/var/tmp/django_cache', 'TI ...
分类:
系统相关 时间:
2016-06-15 10:54:28
阅读次数:
121
[root@linux-node1~]#catfw.sh#!/bin/bashcat/var/log/nginx/access.log|awk-F":"‘{print$1}‘|sort|uniq-c|sort-rn|head-10|grep-v"127.0"|awk‘{if($2!=null&&$1>4){print$2}}‘>/tmp/dropipforiin$(cat/tmp/dropip)do/sbin/iptables-AINPUT-ptcp--dport80-s$i-jD..
分类:
其他好文 时间:
2016-06-15 00:19:07
阅读次数:
205
1 建立根文件系统目录与文件 (1) 创建目录 #mkdir rootfs #cd rootfs #mkdir bin dev etc lib proc sbin sys usr mnt tmp var #mkdir usr/bin usr/lib usr/sbin lib/modules (2)创 ...
分类:
其他好文 时间:
2016-06-14 23:49:39
阅读次数:
168
python2.7 <1> file_path是必须给出的参数,是要读取文件的绝对或者相对路径,要包含文件后缀. 绝对路径的3种表示方法:>>> file_path = "C:/tmp/123.txt" >>> file_path = "C:\\tmp\\123.txt" >>> file_path ...
分类:
编程语言 时间:
2016-06-14 23:49:27
阅读次数:
259
#include<stdio.h>
#include<stdlib.h>
intmain()
{
inta=1;
intb=2;
inttmp=a;
a=b;
b=tmp;
printf("a=%db=%d\n",a,b);
system("pause");
return0;
}上面是用创建中间变量的方法交换,下面是不创建中间变量的另一种方法:a=a+b;
b=a-b;
a=a-b;
当然..
分类:
其他好文 时间:
2016-06-14 19:46:51
阅读次数:
169
题目描述 定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数。 public class Solution { Stack<Integer> data = new Stack<>(); Stack<Integer> min = new Stack<>(); Integer tmp ...
分类:
其他好文 时间:
2016-06-14 19:32:48
阅读次数:
130