set datefirst 1 select count(*) from (select date from(select dateadd(dd,number,'2015-01-01') date from master..spt_values where [type] = 'p' and numb...
分类:
其他好文 时间:
2015-09-02 18:49:18
阅读次数:
163
SELECT * from rpt_history_money where customer_price_per_day =0 and real_pay_money date(beable_service_days);SELECT count(DISTINCT service_day),order....
分类:
其他好文 时间:
2015-09-02 18:34:54
阅读次数:
245
PHP的四种基本排序算法为:冒泡排序、插入排序、选择排序和快速排序。下面是我整理出来的算法代码:1. 冒泡排序:思路:对数组进行多轮冒泡,每一轮对数组中的元素两两比较,调整位置,冒出一个最大的数来。//简单版:function bubbleSort($arr){ $n = count($arr); ...
分类:
编程语言 时间:
2015-09-02 13:19:17
阅读次数:
151
使用spark-1.4.1-bin-hadoop2.6进行处理,测试文件大小为3G,测试结果:1:统计一个文件中某个字符的个数scala> sc.textFile("/home/y/my_temp/1.txt").filter(line=>line.contains("ok")).count()sc...
分类:
其他好文 时间:
2015-09-02 09:22:08
阅读次数:
123
public static void main(String[] args) { int count_abc=0,count_num=0,count_oth=0; //输入一串数 Scanner scan=new Scanner(System.in); String str = scan.next....
分类:
其他好文 时间:
2015-09-02 01:47:06
阅读次数:
183
1 //统计每个字符出现的次数 2 #include 3 #include 4 #include 5 6 int main() 7 { 8 FILE *fp_read; 9 char ch;10 int count[26];11 int index;12 ...
分类:
其他好文 时间:
2015-09-01 21:15:44
阅读次数:
223
MySQL中有两个函数来计算上一条语句影响了多少行,不同于SqlServer/Oracle,不要因为此方面的差异而引起功能问题出处:mysqlpub.comMySQL中有两个函数来计算上一条语句影响了多少行,不同于SqlServer/Oracle,不要因为此方面的差异而引起功能问题:1,判断Sele...
分类:
数据库 时间:
2015-09-01 19:49:40
阅读次数:
255
在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。 1 class Solution { 2 public: 3 int InversePairs(vector data) { 4 int count=...
分类:
编程语言 时间:
2015-09-01 16:37:59
阅读次数:
144
string file = FileDialogHelper.SaveExcel(string.Format("{0}.xls", excelName)); if (!string.IsNullOrEmpty(file) && dt.Rows.Count > 0) ...
分类:
Web程序 时间:
2015-09-01 14:02:39
阅读次数:
255
linux dd 创建ext3分区1. 使用dd创建100M的快文件。命令:dd if=/dev/zero of=/tmp/test.ext3 bs=1024 count=512000说明:dd是linux/UNIX下的一个非常有用的命令,作用是用指定大小的块拷贝一个文件. 参数if: 输入文件,....
分类:
系统相关 时间:
2015-09-01 12:35:01
阅读次数:
162