#include <stdio.h> #include <stdlib.h> void swap(int *x,int *y) // 交换函数 { int temp; temp = *x; *x = *y; *y = temp; } int choose_pivot(int i,int j ) // ...
分类:
编程语言 时间:
2016-10-30 00:07:40
阅读次数:
290
文件上传到服务器后,需要更改几个目录权限才能保证ECSHOP的正常运行 data/ 目录及其所有子目录 temp/ 目录及其所有子目录 cert/ 目录 includes/ 目录及其所有子目录 images/ 目录及其所有子目录 themes/ 目录及其所有子目录 以上目录、文件在网站运行过程中会被 ...
分类:
其他好文 时间:
2016-10-29 21:33:26
阅读次数:
220
数组翻转的两种方法方法一:创建一个新数组,将原数组从后面添加到新数组的前面,实现翻转var arr = [1,2,3,4,5,6] ; //待翻转数组var newArr = [] ; //用来接收翻转之后的数组for(var i=0 ; i arr[j+1] ){ var temp = arr[j... ...
分类:
编程语言 时间:
2016-10-29 12:23:53
阅读次数:
411
三种方式1.定义第三方变量2.相加法3.异或法
inta=3;
intb=5;
inttemp=a;
a=b;
b=temp;
a=a+b;
b=a-b;
a=a-b;
a=a^b;
b=a^b;
a=a^b;
分类:
其他好文 时间:
2016-10-29 02:25:40
阅读次数:
110
1.CSS控制页面文字不能复制: body{-webkit-user-select:none;} 2.【php过滤汉字和非汉字】 $sc="aaad....##--__i汉字过滤"; //iconv("UTF-8","GB2312",$sc);utf-8转码 echo $temp=eregi_rep ...
分类:
Web程序 时间:
2016-10-28 20:28:50
阅读次数:
207
本文中,收集了一些比较常用的Javascript函数,希望对学习JS的朋友们有所帮助。 1. 字符串长度截取 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 function cutstr(str, len) { var temp, icount ...
分类:
Web程序 时间:
2016-10-28 09:58:53
阅读次数:
375
测试一: var fud01 = function() { var temp = 100; this.temp = 200; return temp + this.temp; } alert(typeof(fud01)); alert(fud01()); 运行结果: function 300 最普通 ...
分类:
其他好文 时间:
2016-10-28 02:36:26
阅读次数:
172
通常来说一个页面只调用查询一次文章。have_posts() 如果页面,比如首页需要按照不同的查询参数调用多次文章 需要做如下处理: //loop前 $temp_query = $wp_query; query_posts($args); //loop后 $wp_query = $temp_quer ...
分类:
其他好文 时间:
2016-10-27 19:42:30
阅读次数:
377
1、在非服务器控件的页面导出数据,需要借助一张temp空页面post回后台的数据。 前台:window.location.href = "../Temp.aspx"; 后台: try{ dtSource = Session["MyDataTable"] //假设数据在Session中 if (dtS ...
方法一:先是全字符反转,然后再以空格为界定符反转单词。 #include<stdio.h>#include<string.h>string_change(char * p, int start, int end) //字符反转{ int i,len; char temp; len = strlen( ...
分类:
移动开发 时间:
2016-10-26 14:25:47
阅读次数:
294