自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (5)
  • 收藏
  • 关注

原创 利用EF 插入数据库指定ID

解决ID随着一起添加到数据库的问题

2016-03-30 13:28:11 1238

原创 js前端分页

第一种方法//totalpage 总页数 curpage当前页数function setNavPages(totalpage, curpage) { totalpage = Number(totalpage); curpage = Number(curpage); if (totalpage == 1 || totalpage == 0) return

2016-02-05 14:20:11 694

转载 MVC完成分页

MvcPager 概述MvcPager分页控件是在ASP.NET MVC Web应用程序中实现分页功能的一系列扩展方法,该分页控件的最初的实现方法借鉴了网上流行的部分源代码, 尤其是ScottGu的PagedList类和相关方法,经过站长不断完善和改进后推出的比较成熟而且功能强大的ASP.NET MVC分页解决方案。MvcPager主要功能:实现最基本的ur

2016-02-05 13:58:42 392

原创 按照时间戳中的day 聚合排序

db.publication.group({    keyf: function(doc) { //这个函数从时间戳中得到用于分组的日期key        var date = new Date(doc.inputtime);        var dateKey = (date.getMonth()+1)+"/"+date.getDate()+"/"+date.getFullY

2014-07-15 10:25:13 1067

原创 开发计算器源代码

package com.example.android_layout;import java.util.ArrayList;import java.util.List;import java.util.StringTokenizer;import android.os.Bundle;import android.app.Activity;import android.view.Vi

2014-03-12 13:34:02 862

原创 jquery帮助文档

http://www.php100.com/manual/jquery/

2014-02-24 08:38:15 714

原创 mongodb 更新数组

IMongoQuery query = Query.EQ("_id", new ObjectId(bsonAuthor.AuthorAuid)); BsonElement orid = new BsonElement("orid", bsonAuthor.OrganizationAuid); BsonElement orname = new Bson

2014-02-18 09:49:32 709

原创 mongodb linq查询

1.Any() 验证表中是否有文档var result = (from c in collection.AsQueryable() select c) .Any(c => c.X == 1);// orvar result = collection.AsQueryable() .Any(c => c.X == 1);var result =

2013-11-14 14:45:49 1567

原创 MongoDB基本用法

MongoDB数据库基本用法show dbs:显示数据库列表 show collections:显示当前数据库中的集合(类似关系数据库中的表) show users:显示用户use :切换当前数据库,这和MS-SQL里面的意思一样 db.help():显示数据库操作命令,里面有很多的命令 db.foo.help():显示集合操作命令,同样

2013-11-04 14:27:12 898

原创 循环遍历文件夹

ListFiles(new System.IO.DirectoryInfo("D:\\"), ".jpg", "1", "5") public void ListFiles(FileSystemInfo info, string format, string start, string end) { if (info.Exists)

2013-10-31 16:11:10 669

转载 svg中的path

使用path标签时,就像用指令的方式来控制一只画笔,比如:移动画笔到某一坐标位置,画一条线,画一条曲线,完事了抬起画笔,OVER! path支持的指令有: M = moveto(M X,Y) :将画笔移动到指定的坐标位置L = lineto(L X,Y) :画直线到指定的坐标位置H = horizontal lineto(H X):画水平线到指定的X坐标

2013-08-26 09:52:36 1151

原创 冒泡排序

static void Main(string[] args) { Stopwatch sw = new Stopwatch(); sw.Start(); int[] array = { 42, 20, 17, 13, 28, 14, 23, 15 }; #region 冒泡排序

2013-08-13 09:58:27 470

原创 插入排序

static void Main(string[] args) { int[] array = { 42, 20, 17, 13, 28, 14, 23, 15 }; insertSort(array); Console.ReadLine(); } private static

2013-08-13 09:30:11 520

原创 C#中加密和解密

/// /// 加密 /// /// 需要加密的字符串 /// 密钥(8位) /// public static string Encrypt(string strText, string strEncrKey) { byte[] byKey;

2013-07-19 16:19:40 485

原创 正则提取

(?isx)(?>]*>  (?)|  (?)|(?:(?!这个正则很给力了,在使用的过程中class的内容换成自己的

2013-07-08 16:41:14 611

android开发的计算器

android开发的计算器,关键代码段落 protected Double Calculate(String str) { List<String> symbol = getsymbol(str); List<Double> num = getnum(str); if(num.size()==symbol.size()) num.add(0.0); if (symbol != null) { for (int i = 0; i < symbol.size(); i++) { if (symbol.get(i).equals("×") || symbol.get(i).equals("÷")) { String sign = symbol.remove(i); Double n1 = num.remove(i); Double n2 = num.remove(i); Double result = 0.0; if (sign.equals("×")) { result = n1 * n2; } else { result = n1 / n2; } num.add(i, result); i = i - 1; } } } while (!symbol.isEmpty()) { String sign = symbol.remove(0); Double n1 = num.remove(0); Double n2 = num.remove(0); Double result = 0.0; if (sign.equals("+")) { result = n1 + n2; } else { result = n1 - n2; } num.add(0, result); } return num.remove(0); } private List<Double> getnum(String str) { StringTokenizer tokenizer = new StringTokenizer(str, "+-×÷"); List<Double> ops = new ArrayList<Double>(); while (tokenizer.hasMoreElements()) { String string = tokenizer.nextElement().toString(); Double double1 = Double.parseDouble(string); ops.add(double1); } return ops; } private List<String> getsymbol(String str) { StringTokenizer tokenizer = new StringTokenizer(str, "0123456789."); List<String> ops = new ArrayList<String>(); while (tokenizer.hasMoreElements()) { String string = tokenizer.nextToken(); ops.add(string); } return ops; }

2014-03-12

给pdf添加水印

批量给pdf文件添加图片水印,添加速度可以达到50M/s;

2012-03-15

excel导入数据库

将excel导入sql数据库中,导入的过程中先获得excel的Sheet名字,与sql数据库中的名字匹配,若数据库中存在,在插入数据,若不存在,则新建立表。速度可以达到一万条每秒中

2012-03-15

数据库之间数据的复制

数据库中的一个表快速导入另一个数据库中。 用bcp导入数据 按照数据表结构创建相应的结构,利用bcp转换数据

2012-03-15

ppt和word转pdf格式

office转换为pdf格式,转换速度是15M/min,有点缺陷就是要装07版本以上的office软件(我是在07版本上开发的)

2012-03-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除