摘要:
using System;using System.Collections.Generic;using System.IO;using System.Runtime.Serialization;using System.Runtime.Serialization.Formatters.Binary; using CompositePattern;using PrototypePattern;// Prototype Pattern Pattern August 2007// Makes use of the Photo Librray examples// Shares (i.e. deep. 阅读全文
posted @ 2012-05-08 17:28
ChaunceyHao
阅读(188)
评论(0)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Collections; using System.Threading; using System.Windows.Forms; using System.Drawing; class ObserverPattern { //Observer Pattern Judith Bishop Sept 2007 // Demonstrates Blog updates. Observers can subscribe and unsubscribe // online thr.. 阅读全文
posted @ 2012-05-08 17:27
ChaunceyHao
阅读(223)
评论(0)
推荐(0)
摘要:
using System; using System.Collections; using System.Collections.Generic; using System.Linq; // Iterator Pattern Example Judith Bishop September 2007 // Illustrates the use of LINQ with iterators on a tree structure class Person { public Person() {} public string Name {get; set;} public int Birth .. 阅读全文
posted @ 2012-05-08 17:00
ChaunceyHao
阅读(173)
评论(0)
推荐(0)
摘要:
using System; using System.Xml; using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; public class Mirror { // Mirrors by Hans Lombard June 2006, revised Sept 2007 // based on Views and Views-2 by Nigel Horspool, Judith Bishop and D-J Mill.. 阅读全文
posted @ 2012-05-08 16:47
ChaunceyHao
阅读(183)
评论(0)
推荐(0)
摘要:
using System; // Interpreter Pattern - Example Judith Bishop October 2007 // Sets up an object structure and interprets it with given data static class ElementExtensions { public static string gap; public static void Print(this Element element) { Console.WriteLine(gap+element + " " + eleme 阅读全文
posted @ 2012-05-08 16:45
ChaunceyHao
阅读(171)
评论(0)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Windows.Forms; using System.Drawing; using System.Threading; // Adapter Pattern Example Judith Bishop Aug 2007 // Sets up a Coolbook // This is D-J's as changed for the book class AdapterPattern { //class SpaceBookSystem { public deleg 阅读全文
posted @ 2012-05-08 16:07
ChaunceyHao
阅读(253)
评论(0)
推荐(0)
摘要:
using System;using Wrox.ProCSharp;using Wrox.ProCSharp.VenusBank;using Wrox.ProCSharp.JupiterBank;namespace Wrox.ProCSharp{ class MainEntryPoint { static void Main() { IBankAccount venusAccount = new SaverAccount(); IBankAccount jupiterAccount = new GoldAccount(); venusAccount.PayIn(200); venusAccou 阅读全文
posted @ 2012-05-08 16:04
ChaunceyHao
阅读(179)
评论(0)
推荐(0)
摘要:
using System;namespace Wrox.ProCSharp.Basics{ class ArgsExample { public static int Main(string[] args) { for (int i = 0; i < args.Length; i++) { Console.WriteLine(args[i]); } return 0; } }} 阅读全文
posted @ 2012-05-08 16:02
ChaunceyHao
阅读(138)
评论(0)
推荐(0)
摘要:
简单实现了一个 chrome 的扩展,方法如下: 首先新建一个文件夹,用编辑器写一个文件名为 manifest.json 的文件: { "name": "抓猫!", "version": "1.0", "description": "你能抓住她吗?", "browser_action": { "default_icon": "icons/icon_19.png", "popup": "f 阅读全文
posted @ 2012-05-08 15:54
ChaunceyHao
阅读(465)
评论(0)
推荐(0)
摘要:
@Font-face基本介绍::@font-face 是一个css2的一个语法,它允许你在网页上显示一个自定义的字体。即使客户机器上可以没有安装这种字体,网页也可以显示。 本文将介绍@font-face的基本用法,以及在所有浏览器都能使用的方法。@Font-face基本语法::@font-face{font-family:<a-remote-font-name>;src:<source>[,<source>]*;[font-weight:<weight>];[font-style:<style>];} 具体介绍请移步到这里:https 阅读全文
posted @ 2012-05-08 00:24
ChaunceyHao
阅读(650)
评论(0)
推荐(0)
摘要:
作为一名前端开发工程师,平时在制作页面的时候,我们我们会用到很多中将CSS引入页面的方法,那么,今天我将分享一下这些方法,并讨论那种方法更好一些。1.用标签:这种方法是最好的一种,在页面的标签中加入如下代码:<linkrel="stylesheet"href="style.css"type="text/css"/>2.用@import规则:<style>@importurl(style.css);</style>@import 可以放在页面的style标签里面,也可以方式在css样式表里面。如果放在 阅读全文
posted @ 2012-05-08 00:19
ChaunceyHao
阅读(1001)
评论(0)
推荐(0)
摘要:
最近一个客户的网站用了一个非标准的字体,客户要求用google font API来替换这个非标准字体。由于之前没有做过这个,就上google上找了找网站,现将使用方法分享给大家。 google font API 是什么呢? google font API 是google推出的一款支持高质量的开源字体文件的服务。网站地址:http://code.google.com/apis/webfonts/ 字库地址:http://www.google.com/webfonts 怎样使用google font API ?第一步:在你的html页面里面像添加普通样式表一样,添加字体的样式连接。这里以“Fon. 阅读全文
posted @ 2012-05-08 00:17
ChaunceyHao
阅读(551)
评论(0)
推荐(0)
摘要:
sublime text 2介绍sublime text 2最近这个编辑器在国内前端的人的交流地,可谓是出尽了风头,我也跟着起个哄。最近也装上了这个编辑器,首页说一下第一印象吧:轻量级的软件,只有6M左右;打开界面很清爽,没人什么干扰的东西;试用后感觉对JS、jq等都有很友好的提示;很不幸的是这个软件是收费的,不过它也可以让用户无限期试用,在保存的时候会弹出让你注册的提示,点取消就ok了!sublime text 2 插件机制sublime text 2虽然轻量,但是它有着一些不错的插件,可以让你使用起来更顺手。首先介绍一下它的控制台插件:Package Control安装 Package C 阅读全文
posted @ 2012-05-08 00:10
ChaunceyHao
阅读(310)
评论(0)
推荐(0)
摘要:
平时我们在制作页面的时候,总是会碰到这样那样的引用,比如引用某人的一句话,或者引用一些名言警句,我们可以用一些引号将其特殊区分开来。现对平时遇到的一些引用的相关例子进行一些分析:例子1:例子2:QQ空间的一些好友说的话下面提供四种类似的解决方法:第一种实现方法:用blockquote来做左边引号的背景,用p来做右边的背景HTML代码:<blockquoteclass="bq1"><p>10M的网卡中只有四根弹片,8根线中另四根不起作用所以要求低,两边是同一顺序就行,但最好按规范做;100M的网卡中有8根弹片,四根用于数据传输,另四根用于防串扰,严格按 阅读全文
posted @ 2012-05-08 00:07
ChaunceyHao
阅读(277)
评论(0)
推荐(0)
浙公网安备 33010602011771号