




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、更新SQLServer实例中所有数据库表的统计信息,工具类,直接复制进去,可以直接调用;Androi谷歌IP来一盘。赶快来享受美味,谷歌POI数据接口调用代码实例谷歌POI数据接口调用代码实例,关闭win10升级提示,删除更新推送图标,关于Java核心技术学习积累的例子,是初学者及核,关于Thread.IsBackground属性的理解代码 SQL代码 drop table if exists group;create table group ( id int(11) not null auto_increment, parent_group_id int(11) not null defau
2、lt -1, name varchar(255) not null, primary key (id);insert into group (id, name, parent_group_id) values (1, a, -1);insert into group (id, name, parent_group_id) values (2, b, -1);insert into group (id, name, parent_group_id) values (3, c, 1);/Python解学军中学推理社2017届招新试题/python利用or在列表解析中调用多个函数.py/python
3、模拟按键,自动翻页看u17漫画/* * 返回树状结构表中指定节点的父节点路径. * 张露兵 zhanglubing927163 * 2012-2-21 */drop procedure if exists get_path;delimiter $create procedure get_path(in id int) begin declare gid int default id; declare path varchar(255) default ; while gid is not null and gid != -1 do select concat(concat(,(,
4、g.id, ), -, path), g.parent_group_id into path, gid from group g where g.id = gid; end while; select substring(path, 1, length(path)-1) path; end$- call get_path(3);#NAME?/python将list连续元素和非连续元素分开/python将list连续元素和非连续元素分开转换为代码 php导出excel文件 并强制下载 ?phpheader(Content-Type: application/force-download);hea
5、der(Content-Disposition: attachment; filename=租赁成交记录导出-.date(y-m-d).xls);echo asd 123 qwe 456 ;代码 存储过程 - =- Author: - Create date: - Description: - =CREATE proc cCountPV(ChannelID nvarchar(50),SourceID int)asbegin declare TEMID int; -临时ID declare Now datetime; set Now = GETDATE(); declare Y s
6、mallint;-年 declare M tinyint;-月 declare W tinyint;-周 declare D tinyint;-日 declare H tinyint;-小时 set Y = DATEPART(YY,Now); set M = DATEPART(MM,Now); set W = DATEPART(WW,Now); set D = DATEPART(DD,Now); set H = DATEPART(HH,Now); select TEMID = ID from PV where ChannelID = ChannelID and SourceID=SourceI
7、D and Y = Y and M=M and D=D and H = H; if TEMID is null Insert into PV(ChannelID,SourceID,Times,Y,M,W,D,H) values(ChannelID ,SourceID,1,Y,M,W,D,H); else Update PV set Times = Times+1 where ID= TEMID; /*计算现在*/ Declare NowHourTimes int; Declare NowDayTimes int; Declare NowWeekTimes int; Declare NowMon
8、thTimes int; Declare NowYearTimes int; -Y M D H select NowHourTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = Y and M=M and D=D and H = H; -Y M D select NowDayTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = Y and M=M and D
9、=D; -Y W select NowWeekTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = Y and W=W; -Y M select NowMonthTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = Y and M=M; -Y select NowYearTimes = SUM(Times) from PV where ChannelID =
10、 ChannelID and SourceID = SourceID and Y = Y; if NowHourTimes is null set NowHourTimes = 0; if NowDayTimes is null set NowDayTimes = 0; if NowWeekTimes is null set NowWeekTimes = 0; if NowMonthTimes is null set NowMonthTimes = 0; if NowYearTimes is null set NowYearTimes = 0; /*计算之前*/ Declare PreHour
11、Times int; Declare PreDayTimes int; Declare PreWeekTimes int; Declare PreMonthTimes int; Declare PreYearTimes int; -Y M D H Declare PreHourDateTime datetime; set PreHourDateTime = DATEADD(HH,-1,Now); select PreHourTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y =
12、 DATEPART(YY,PreHourDateTime) and M=DATEPART(MM,PreHourDateTime) and D=DATEPART(DD,PreHourDateTime) and H = DATEPART(HH,PreHourDateTime); -Y M D Declare PreDayDateTime datetime; set PreDayDateTime = DATEADD(DD,-1,Now); select PreDayTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID
13、= SourceID and Y = DATEPART(YY,PreDayDateTime) and M=DATEPART(MM,PreDayDateTime) and D=DATEPART(DD,PreDayDateTime); -Y W Declare PreWeekDateTime datetime; set PreWeekDateTime = DATEADD(WW,-1,Now); select PreWeekTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = DA
14、TEPART(YY,PreWeekDateTime) and W= DATEPART(WW,PreWeekDateTime); -Y M Declare PreMonthDateTime datetime; set PreMonthDateTime = DATEADD(MM,-1,Now); select PreMonthTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = DATEPART(YY,PreMonthDateTime) and M= DATEPART(MM,Pr
15、eMonthDateTime); -Y select PreYearTimes = SUM(Times) from PV where ChannelID = ChannelID and SourceID = SourceID and Y = Y - 1; if PreHourTimes is null set PreHourTimes = 0; if PreDayTimes is null set PreDayTimes = 0; if PreWeekTimes is null set PreWeekTimes = 0; if PreMonthTimes is null set PreMont
16、hTimes = 0; if PreYearTimes is null set PreYearTimes = 0; declare HourRate float; declare DayRate float; declare WeekRate float; declare MonthRate float; declare YearRate float; set HourRate = 0; set DayRate = 0; set WeekRate = 0; set MonthRate = 0; set YearRate = 0; if PreHourTimes 0 set HourRate =
17、 ( NowHourTimes - PreHourTimes )/ (PreHourTimes+0.0); if PreDayTimes 0 set DayRate = ( NowDayTimes - PreDayTimes )/ (PreDayTimes+0.0); if PreWeekTimes 0 set WeekRate = ( NowWeekTimes - PreWeekTimes )/ (PreWeekTimes+0.0); if PreMonthTimes 0 set MonthRate = ( NowMonthTimes - PreMonthTimes )/ (PreMonth
18、Times+0.0); if PreYearTimes 0 set YearRate = ( NowYearTimes - PreYearTimes )/ (PreYearTimes+0.0); /*计算总量*/ declare Total int; select Total = SUM(Times) From PV where ChannelID = ChannelID and SourceID = SourceID; if Total is null set Total = 0; declare TempID int; set TempID = null; /*操作CountSummary
19、*/ Select TempID = ID from PVS where ChannelID = ChannelID and SourceID = SourceID; if TempID is null Insert into PVS(ChannelID,SourceID,HourRate,HourTimes,DayRate,DayTimes,WeekRate,WeekTimes,MonthRate,MonthTimes,YearRate,YearTimes,Total) Values(ChannelID,SourceID,HourRate,NowHourTimes,DayRate,NowDa
20、yTimes,WeekRate,NowWeekTimes,MonthRate,NowMonthTimes,YearRate,NowYearTimes,Total); else Update PVS set HourRate=HourRate,HourTimes=NowHourTimes,DayRate=DayRate,DayTimes=NowDayTimes,WeekRate=WeekRate,WeekTimes=NowWeekTimes,MonthRate=MonthRate,MonthTimes=NowMonthTimes,YearRate=YearRate,YearTimes=NowYe
21、arTimes,Total=Total where ID = TempID; endGO.代码 PV 表 CREATE TABLE dbo.PV( ID int IDENTITY(1,1) NOT NULL, ChannelID int NOT NULL, SourceID int NOT NULL, Times int NOT NULL, Y smallint NULL, M tinyint NULL, W tinyint NULL, D tinyint NULL, H tinyint NULL, CONSTRAINT PK_PV PRIMARY KEY CLUSTERED ( ID ASC
22、)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY) ON PRIMARYGOALTER TABLE dbo.PV ADD CONSTRAINT DF_PV_Times DEFAULT (0) FOR TimesGOALTER TABLE dbo.PV ADD CONSTRAINT DF_PV_Y DEFAULT (2000) FOR YGOALTER TABLE dbo.PV ADD
23、 CONSTRAINT DF_PV_M DEFAULT (1) FOR MGOALTER TABLE dbo.PV ADD CONSTRAINT DF_PV_W DEFAULT (1) FOR WGOALTER TABLE dbo.PV ADD CONSTRAINT DF_PV_D DEFAULT (1) FOR DGOALTER TABLE dbo.PV ADD CONSTRAINT DF_PV_H DEFAULT (0) FOR HGO.代码 PVS 表 CREATE TABLE dbo.PVS( ID int IDENTITY(1,1) NOT NULL, ChannelID int N
24、OT NULL, SourceID int NOT NULL, HourRate float NULL, HourTimes int NULL, DayRate float NULL, DayTimes int NULL, WeekRate float NULL, WeekTimes int NULL, MonthRate float NULL, MonthTimes int NULL, YearRate float NULL, YearTimes int NULL, Total int NULL, CONSTRAINT PK_PVS PRIMARY KEY CLUSTERED ( ID AS
25、C)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY) ON PRIMARYGO代码 Java代码 package sort;public class MergeSort public static void merge(int array,int start1st,int start2nd, int end2nd) /* * cur1 refers to the first item
26、 of a * cur2 refers to the first item of b * cur3 refers to the index of the next location of temp */ int temp = new intarray.length; int cur1 = start1st, cur2 = start2nd, cur3 = start1st; /* * if there exists a current item in both sequence * if arraycur1 = arraycur2 * move arraycur1 to the right e
27、nd of cur3 * else move arraycur2 to the right end of cur3 */ while(cur1 start2nd)&(cur2 = end2nd) if(arraycur1 = arraycur2) tempcur3 = arraycur1; cur1+; cur3+; else tempcur3 = arraycur2; cur2+; cur3+; while(cur1 start2nd) tempcur3 = arraycur1; cur1+; cur3+; while(cur2 = end2nd) tempcur3 = arraycur2;
28、 cur2+; cur3+; cur1 = start1st; cur3 = start1st; while(cur3 = end2nd) arraycur1 = tempcur3; cur1+; cur3+; /* * void MergeSort(int array, int first, int last) * int mid = 0; if(firstlast) * *mid = (first+last)/2; *MergeSort(array, first, mid); *MergeSort(array, mid+1,last); *Merge(array,first,mid,las
29、t); * * * * * * * * */ public static void mergeSort(int array,int first,int last) int mid; if(first last) mid = (first + last)/2; mergeSort(array,first,mid); mergeSort(array,mid+1,last); merge(array,first,mid,last); 代码 JavaScript代码 $(function() $(#getAtr).click(function() $str=; $str+=; $str+=; $str
30、+=; $str+=; $str+=; $str+=; $str+=; $str+=删除追加; $str+=; $(#addTr).append($str); ););function getDel(k) $(k).parent().remove(); -html部分 广告名称 广告图片 广告内容 广告来源 广告作者 广告描述 追加内容 图片 效果截图.jpg .代码 Java代码 /* * 压缩javascript * param JS源文件路径(D:/jquery-1.7.1.js) * param 压缩级别 * return Compiler */public Compiler mini
31、JS(String sourceJSFile, String comLevel) String primaryJavascriptToCompile = sourceJSFile; Compiler.setLoggingLevel(Level.OFF); Compiler compiler = new Compiler(); /设置压缩级别 CompilerOptions options = new CompilerOptions(); if(comLevel.equals(0) CompilationLevel.WHITESPACE_ONLY.setOptionsForCompilation
32、Level(options); else if(comLevel.equals(1) CompilationLevel.SIMPLE_OPTIMIZATIONS.setOptionsForCompilationLevel(options); else CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options); /警告级别 WarningLevel.DEFAULT.setOptionsForWarningLevel(options); List externalJavascriptFiles =
33、new ArrayList(); List primaryJavascriptFiles = new ArrayList(); for(String filename : primaryJavascriptToCompile) primaryJavascriptFiles.add(JSSourceFile.fromFile(filename); compilerpile(externalJavascriptFiles, primaryJavascriptFiles, options); return compiler; 秦皇岛同城购 侭侰侮代码 SQL代码 CREATE FUNCTION db
34、o.GetCurrentIP ()RETURNS varchar(255)ASBEGIN DECLARE IP_Address varchar(255); SELECT IP_Address = client_net_address FROM sys.dm_exec_connections WHERE Session_id = SPID; Return IP_Address;END代码 C#代码 using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Multipli
35、cation class Program static void Main(string args) string t = string.Empty; for (int i = 1; i 10; i+) for (int j = 1; j = i; j+) t = string.Format(01=2 , j, i, (j * i); Console.Write(t); if (j * i 10) Console.Write( ); if (i = j) Console.Write(n); Console.Write(请按任意键继续.); Console.Read(); 文件 MonthPan
36、el (2).java7KB下载(102) package com.mofit.plan.planDecrease.util.Components;import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dimension;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.Actio
37、nListener;import java.awt.event.ItemEvent;import java.awt.event.ItemListener;import java.beans.PropertyChangeEvent;import java.beans.PropertyChangeListener;import java.util.Date;import javax.swing.JDialog;import javax.swing.JPanel;import org.apache.poi.ss.usermodel.DateUtil;import org.openswing.swing.client.LabelControl;import co
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025至2030中国生菜有机茶行业产业运行态势及投资规划深度研究报告
- 2025至2030中国琥珀酸舒马曲普坦行业产业运行态势及投资规划深度研究报告
- 高校国防教育师资与学科专业融合发展研究
- 培训班课件首页
- 煤矿新职工培训课件
- 创新驱动下的教育科技国际化发展
- 教育技术的未来发展及其对社会的深远影响
- 智能办公教育技术助力高效工作
- 提升学习体验教育心理学在技能培训中的运用
- 教育机构品牌故事与精准营销结合
- 房地产行业数据安全管理制度及流程
- 新人教版数学五年级下册第二单元《因数和倍数》教材解读
- AI人工智能伦理与社会责任
- 2024年中国心力衰竭诊断与治疗指南更新要点解读
- 系统压力测试评估执行规范
- 北师大版五年级下册数学计算题每日一练带答案(共30天)
- 河南省建筑安全员《A证》考试题库
- 病理科生物安全培训
- 2025年立普妥行业深度研究分析报告-20241226-185650
- DB3702-T 0009-2020 市民诉求数据分析与应用规范
- 家庭教育中的创客教育与孩子创新思维
评论
0/150
提交评论