CSS清除浮动的办法:clear & clearfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CTOR_NAME = 'initialize'; | |
var extend = function(child, parent) { | |
if (typeof parent === 'undefined') { | |
parent = Object; | |
} | |
child.__super__ = parent; | |
child.prototype.__proto__ = parent.prototype; | |
var currnetClass = child; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//十进制转二进制 | |
Console.WriteLine(Convert.ToString(69, 2)); | |
//十进制转八进制 | |
Console.WriteLine(Convert.ToString(69, 8)); | |
//十进制转十六进制 | |
Console.WriteLine(Convert.ToString(69, 16)); | |
//二进制转十进制 | |
Console.WriteLine(Convert.ToInt32("100111101", 2)); | |
//八进制转十进制 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// 利用反射和泛型,把DataTable转成List | |
/// </summary> | |
/// <param name="dt"></param> | |
/// <returns></returns> | |
public static List<T> ConvertToList(DataTable dt) | |
{ | |
// 定义集合 | |
List<T> ts = new List<T>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh-cn"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="author" content="EdieLei" /> | |
<title>HTML5 图片上传预览</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('#img').change(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Navicat MySQL Data Transfer | |
Source Server : mysql-db | |
Source Server Version : 50172 | |
Source Host : localhost:3306 | |
Source Database : test | |
Target Server Type : MYSQL | |
Target Server Version : 50172 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Javascript quiz</title> | |
<meta charset="utf-8"> | |
<script type="text/javascript"> | |
/* | |
* 要求: | |
* how to use js to set the backgournd color of the | |
* sencond option(value="b") to be grey? | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
前台aspx页面输出for循环 | |
<% string[] arr = new string[] { "1", "2", "3" };%> | |
<% for (int i = 0; i < arr.Length; i++) | |
{%> | |
<%= arr[i] + " " %> | |
<%}%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// 根据指定的url下载数据 | |
/// </summary> | |
/// <param name="url">url</param> | |
/// <returns></returns> | |
public byte[] DownloadImg2Bytes(string url) | |
{ | |
WebClient wc = new WebClient(); | |
byte[] bytes; | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// DataTable 排序 | |
/// </summary> | |
/// <param name="dt"></param> | |
/// <param name="orderBy"></param> | |
/// <returns></returns> | |
protected DataTable SortDataTable(DataTable dt, string keyword, string orderBy) | |
{ | |
LogHelper.LogInfo("调用 SortDataTable() 方法"); |