强制保留两位小数的js方法 //写一个公共的强制保留两位小数的js方法 function toDecimal2 (x) { var f = parseFloat(x) if (isNaN(f)) { return false } var f = Math.round(x * 100) / 100 var s = f.toString() var rs = s.indexOf('.') if (rs < 0) { rs = s.length s += '.' } while (s.length <…
存储过程都写在一个指定的表中了,我们只要使用like查询就可以实现查询当前这台SQL Server中所有存储过程中包括了指定关键字的存储过程并显示出来,下面一起来看看我总结了几条命令. 例子1 代码如下 OBJECT_NAME(id),id from syscomments where id in ( select object_id(name) from dbo.sysobjects where xtype='P' ) and text like '%FieldName%' id 例子2 在S…
工作中,所有的tools里有一个project是只包含若干个schema的工程,研究了一下,发现创建这种只包含schema的dll其实非常简单. 首先,在visual studio-new project,选择Visual C#-Class Library,在这个interface的右面可以看到,class Library这种project是“A project for creating a C# class library(.dll)”.确定之后在Solution Explorer windo…
首先我们建立一张带有逗号分隔的字符串. CREATE TABLE test(id int(6) NOT NULL AUTO_INCREMENT,PRIMARY KEY (id),pname VARCHAR(20) NOT NULL,pnum VARCHAR(50) NOT NULL); 然后插入带有逗号分隔的测试数据 INSERT INTO test(pname,pnum) VALUES('产品1','1,2,4'); INSERT INTO test(pname,pnum) VALUES('产…
我们先来看一个例子,如果你读过<java编程思想>的话 应该会有印象 package com.test.zj; public class PolyConstructors { public static void main(String[] args) { // TODO Auto-generated method stub new RoundGlyph(5); } } class RoundGlyph extends Glyph { private int radius = 1; publi…