- 博客(47)
- 资源 (16)
- 收藏
- 关注
原创 nodejs项目node-sass转移问题 npm rebuild node-sass
ERROR in Missing binding H:\myWork\lvlvPro\lvlvPro\node_modules\node-sass\vendor\win32-ia32-48\binding.nodeNode Sass could not find a binding for your current environment: Windows 32-bit with Node.j
2017-09-13 16:16:04
7798
1
原创 AngularJS 控制器(Controller) 用于控制 AngularJS 应用
名: 姓: 姓名: {{firstName + " " + lastName}} var app = angular.module('myApp', []);app.controller('myCtrl', function($scope) { $scope.firstName= "John"; $scope.lastName= "Doe";});
2017-04-15 18:06:48
526
原创 AngularJS 模块定义应用 angular.module
var app = angular.module('myApp', []);AngularJS 模块定义应用 var app = angular.module("myApp", []);
2017-04-15 17:56:26
934
原创 Unity 接口注入
public interface IA { string GetA(); } public interface IB { string GetB(); } public class A : IA { public string GetA() { retur
2016-10-30 23:20:23
727
原创 C# NET DataTable转Excel 并 下载
/// /// DataTable中的数据导出到Excel并下载 /// /// 要导出的DataTable /// 类型 /// Excel的文件名 public void CreateExcel(DataTable dt, string FileType, string FileNa
2015-07-27 09:57:05
1439
原创 SQL语句在SQL Server上的执行时间 cpu
set statistics profile onset statistics io onset statistics time ongogoset statistics profile offset statistics io offset statistics time off
2015-07-21 16:49:58
692
原创 今天有时间戳转换的需求,网上找了半天才找到相关代码,经测试有效,特作此笔记和大家分享
今天有时间戳转换的需求,网上找了半天才找到相关代码,经测试有效,特作此笔记和大家分享!1.时间戳转为C#格式时间 /// /// 时间戳转为C#格式时间 /// /// Unix时间戳格式 /// C#格式时间 public static DateTime GetTime(string
2014-04-29 16:29:45
975
原创 C#的位运算
位运算符:按位与 &按位或 |按位取反 ~左移 右移 >> public static void Main() { int a=6&3; Console.WriteLine("a={0}",a); //6的二进制是00000110,3的二进制是00000011,按位与后等于00000010, 即2。 int b=6
2013-07-17 09:43:38
662
翻译 c#实现冒泡、快速、选择和插入排序算法
整理一下常用的排序算法,用c#实现,以备日后再用。1.冒泡排序将被排序的记录数组R[1..n]垂直排列,每个记录R[i]看作是重量为R[i].key的气泡。根据轻气泡不能在重气泡之下的原则,从下往上扫描数组R:凡扫描到违反本原则的轻气泡,就使其向上"飘浮"(冒泡因此得名)。如此反复进行,直到最后任何两个气泡都是轻者在上,重者在下为止。using System;using Sy
2013-07-03 16:20:25
769
原创 页面生命周期
public partial class WebForm1 : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { Response.Write("Page_PreInit"); } protect
2013-07-03 16:11:12
823
原创 快速排序详解以及java实现
快速排序作为一种高效的排序算法被广泛应用,SUN的JDK中的Arrays.sort 方法用的就是快排。快排采用了经典的分治思想(divide and conquer): Divide:选取一个基元X(一般选取数组第一个元素),通过某种分区操作(partitioning)将数组划分为两个部分:左半部分小于等于X,右半部分大于等于X。Conquer: 左右两个子数组
2013-07-01 09:16:21
2653
原创 .net网站发布后 局域网不能浏览
用在防火墙设置就可以了,增加个入站规则具体:网络==》右键==》属性==》WINDOWS防火墙==》高级设置==》入站规则==》右键--》新建规则==》端口==》TCP==》指定端口:80==》允许连接==》建立个名字==》确定。。。
2012-10-20 22:54:32
772
转载 ASP.NET MVC 自定义路由
自定义路由一定要在默认路由上面有路由名字那么代表一定是允许有多个路由的。在MVC中,自定义的路由一定要写在默认的路由上面,这样才能起作用。routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "自定义路由", // 路由名称
2012-09-26 08:47:13
2322
1
转载 webform中也可以直接url路由
以前在做asp的时候,要把 /default.asp?id=123映射成/default/123,需要借助IISRewriter这个组件,到了asp.net以后,可以用代码写了,但是个人觉得很麻烦,要写一堆代码,还要修改web.config,现在好了:asp.net4.0中 asp.net mvc中的路由规则全部可以用于webform了 使用步骤:1.Global.ascx.cs中
2012-09-07 13:07:45
3720
原创 SQL DATEDIFF语法及时间函数 Sql 查询当天、本周、本月记录
--查询当天: select * from info where DateDiff(dd,datetime,getdate())=0 --查询24小时内的: select * from info where DateDiff(hh,datetime,getDate()) --info为表名,datetime为数据库中的字段值 --查询当天
2012-08-14 10:59:37
3820
原创 sql统计排名
create table tb(员工姓名 varchar(10),销售金额 int,销售时间 datetime)insert into tb values('员工A', 10 ,'2011-8-3 00:56:01')insert into tb values('员工C', 15 ,'2011-9-1 11:56:01')insert into tb values('员工D', 20
2012-08-13 10:40:23
3173
原创 js正则
text 中取正则 来用取到的正则判断val() $(function () { $(".pp").blur(function () { var txt = $(this).val(); var reg = /^\d{1}$/;
2012-08-03 09:53:57
727
原创 IOC接口注入之Autofac
Autofac是一个为微软.NET服务的Ico容器,它管理者类与类之间的依赖关系,因而可以使得应用程序在规模和复杂度不断增长中保持易改的特性。下面是通过处理.NET的一般类来获取的组件。添加组件组件通过ContainerBuilder被注册:var builder = new ContainerBuilder();Autofac 可以使用一个Linq表达式、一个类型
2012-07-06 16:06:39
6954
1
原创 看sql语句执行时间
declare @begin_date2 datetimedeclare @end_date2 datetimeselect @begin_date2 = getdate()select Creator from Lottery_joinScheme_list where SchemeNumber ='12023SD00010'select @end_date2 = get
2012-07-04 17:17:12
662
原创 网页中实现截取等宽长度中英文字符串
/// /// 截取指定长度中英文字符串(宽度一样)/// /// 要截取的字符串/// 截取长度,中文字符长度/// 截取后的字符串public static string CutStr(string str, int length){ if (str == null) return string.Empty; int len
2012-06-20 17:13:24
1020
转载 AspNet中URL重写
打开Global.asax文件,引用命名空间System.Web.Routing,System.Web.Routing命名空间在Net3.5中就已经存在,不过功能没有4.0中的强大。在该文件中添加如下方法:void RegisterRoutes(RouteCollection routes){ routes.MapPageRoute("productdetail",
2012-06-20 09:14:14
807
原创 重绘groupbox 边框 title
private void group_Filter_Paint(object sender, PaintEventArgs e) { e.Graphics.Clear(group_Filter.BackColor); Color color = Color.Red; Pen Pen_AL = new P
2012-06-19 12:31:10
2110
翻译 c# 第三方解压sharpziplib
using System;using System.Collections.Generic;using System.Linq;using System.Text;using ICSharpCode.SharpZipLib.Zip; //开源工具using System.IO; namespace Package{ class Class1 {
2012-06-19 09:08:09
899
原创 C#判断是否为图片
private bool IsPicture(string filePath)//filePath是文件的完整路径 { try { FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
2012-06-18 11:20:03
5372
原创 winfrom SaveFileDialog用法小记
private void ShowSaveFileDialog() { //string localFilePath, fileNameExt, newFileName, FilePath; SaveFileDialog sfd = new SaveFileDialog(); //设置文件类型
2012-05-04 16:38:36
1651
原创 winfrom属性formborderstyle:none以后
右击弹出最大化\关闭菜单:#region 右击弹出菜单 const int WS_CLIPCHILDREN = 0x2000000; const int WS_MINIMIZEBOX = 0x20000; const int WS_MAXIMIZEBOX = 0x10000; const int WS_SYSMENU =
2012-05-04 16:34:38
1873
转载 windows服务每隔一段时间执行程序
using System;using System.Data.SqlClient;using System.ServiceProcess;using Timer = System.Timers.Timer;namespace WeiBo{ public partial class Service1 : ServiceBase { pub
2012-04-19 09:54:06
4160
原创 linq to sql 修改 web.config的值
string path = Server.MapPath("~/Web.config"); //"Web.config"; var xml = XElement.Load(path); var temp = from k in xml.Descendants("appSettings").Elem
2012-04-09 13:59:34
765
原创 NVelocity模板
using System;using System.Web;using System.Collections.Generic;using System.Text;using System.IO;using NVelocity;using NVelocity.App;using NVelocity.Context;using NVelocity.App.Tools;using NV
2012-04-07 16:04:43
1106
转载 文件上传处理
using System;using System.Collections.Generic;using System.Linq;using System.Text;using FileLoadHandler;namespace fileLoadHander{ /// /// 这个类是文件上传处理文件 /// public class FileLoa
2012-04-05 22:56:22
642
原创 cookies
//1.创建一个新的cookie,并赋值。 HttpCookie cookie; cookie = new HttpCookie("user"); cookie.Domain = AppConfig.DomainName; cookie.Values.Add("Username", usern
2012-03-27 12:45:21
438
原创 冒泡排序
int[] array =new int[]{ 2, 1, 8, 7, 9, 4, 6 }; int temp = 0; for (int i = 0; i { for (int j = 0; j { if
2012-03-06 20:57:17
479
原创 约瑟夫问题
static void Main(string[] args) { List people = Enumerable.Range(1, 6).ToList(); int order = 0; int index = 0; int k = 0; while (pe
2012-03-06 20:47:28
729
原创 input file 上传文件
html: C#: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { System
2012-03-05 23:19:03
32252
原创 根据url获取网页html比较网站运行是否正常
#region 判断 /// /// 根据设定的字符串比较来判断,长度来判断 /// /// 用来比较的string /// 得到的string /// 最小长度 /// public static bool Judge(string str, string ge
2012-03-05 19:54:41
1001
读取word模板修改内容并生成pdf下载(多文件zip压缩下载).zip
2020-09-11
WebAPIFileUploadDemo通过multipart/form-data方式同时上传文件以及数据包含客户端上传例子
2019-07-23
NET网页在线批量看文件txt、jpg、word、cs、excel、ppt 预览相框模式JS
2019-06-12
C# NET Apose.Slides.dll PowerPoint(ppt)转PDF附教程.rar
2019-05-24
C#NET Aspose.Cells.dll Excel转PDF附教程.rar
2019-05-24
C#NET Aspose.Words.dll(破解)转换word到PDF
2019-05-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人