2013年9月21日 星期六

學習筆記JAVA

Java Platform, Standard Edition (Java SE)

http://docs.oracle.com/javase/

Java™ Platform, Standard Edition 7 API Specification

http://docs.oracle.com/javase/7/docs/api/index.html

Java Language and Virtual Machine Specifications

http://docs.oracle.com/javase/specs/index.html

Java Platform Standard Edition 7 Documentation

http://docs.oracle.com/javase/7/docs/index.html

JDK 7 and JRE 7 Installation Guide

http://docs.oracle.com/javase/7/docs/webnotes/install/index.html

學習筆記ASP.NET

AJAX Control Toolkit 該怎麼安裝
http://www.dotblogs.com.tw/mis2000lab/archive/2008/09/17/ajax35_vs2008.aspx

逐步解說:建立具有基本使用者登入的 ASP.NET 網站

http://msdn.microsoft.com/zh-tw/library/ff184050(v=vs.100).aspx

GridView的標題欄、列凍結效果(跨瀏覽器版)

學習筆記VB.NET

How to parse XML

學習筆記C#.NET

Loading XML into DataGridView

http://www.youtube.com/watch?v=iGlvRTxV3Lc


2013年9月15日 星期日

運算子多載

當搭配自己的資料型別使用時,可以重新定義更有意義的運算子。在下列範例中會建立結構 (Struct),以便將一週中的一天儲存在列舉型別 (Enumeration) 所定義的變數型別中。
using System;

// Define an DayOfWeek data type
enum DayOfWeek { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };

// Define a struct to store the methods and operators
struct Day 
{
    private DayOfWeek day;

    // The constructor for the struct
    public Day(DayOfWeek initialDay)
    {
        day = initialDay;
    }

    // The overloaded + operator
    public static Day operator +(Day lhs, int rhs)
    {
        int intDay = (int)lhs.day;
        return new Day((DayOfWeek)((intDay + rhs) % 7));
    }

    // An overloaded ToString method
    public override string ToString()
    {
        return day.ToString();
    }
}

public class Program
{
    static void Main()
    {
        // Create a new Days object called "today"
        Day today = new Day(DayOfWeek.Sunday);
        Console.WriteLine(today.ToString());

        today = today + 1;
        Console.WriteLine(today.ToString());

        today = today + 14;
        Console.WriteLine(today.ToString());
    }
}