显示标签为“.NET Framework”的博文。显示所有博文
显示标签为“.NET Framework”的博文。显示所有博文

2009年3月26日星期四

March 27th Links:ASP.NET,JAVASCRIPT,C# Using,Delegate,SQL SERVER

ASP.NET
    where compilation seems to mysteriously( 不可思议的) pause for 30+ seconds(or even minutes),before continuing each time you do a build or F5 of the project.VS2005 Web Sites will copy the assembly picked into the \bin directory of the project as well as(by default) add a .refresh file into the \bin directory that contains a relative path string that points back to the original assembly path location.When you build the solution,VS will automactically check those assembiles with .refresh files to see if a newer version of the assembly is available,and if so automatically re-copy the assembly and re-compile the solution using it.
    1) So Which Project Option Builds Faster?
    When doing full builds of projects,the VS2005 web application project options will complie projects much faster that the vs2005 web site

C#

JAVASCRIPT

SQL SERVER

.NET Framework

Other

English
    1. fledged: 成熟的
    2. unobtrusive: 不打扰的
    3. scratch the surface: 冰山一角

2009年3月21日星期六

March 22th-23th Links: .NET Framework,Silverlight,SQL Server

1. .NET
    3) What is .NET RIA Services?

2. Silverlight
    Here's the source to the WriteableBitmap sample I showed at Mix.The sample uses WriteableBitmap to take a "snapshot" of the running video to make a thumbnail

3. SQL Server
    1) Index Maintenance 
    if your indexes are less than 30% fragmented(碎片) than you can run a DBCC INDEXDEFRAG else rebuild.

English
    1. Resemble:相似,像
    2. Encounter:遇到,偶遇
    3. Revealed:透露,显示
    4. overlap: 重复,重叠
    5. rectangle: 长方形,矩形
    6. ellipse: 椭圆
    7. replicate: 折叠,复制

2009年3月17日星期二

March 17th:C#,Debug,HTML

C#
    This post touches on four major expression subjects:
    1) String Comparison - does a string contain a particular sub-string?
    a. finding valid HTML tags- RegEx.Matches return MactchCollection
    valid html tags: Regex HTMLTag = new Regex(@"(<\/?[^>]+>)");
    2) Splitting a string into segments(分割,部分)- we will take an IPv4 address and retrieve its dotted components
    a. splitting decimal Tcp/IP address looks like xxx.xxx.xxx.xxx with x being a decimal number
    Regex tcpIp = new Regex(@"(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})");
    3) String Replacement
    4) Substitution Patterns
    5) Stricter input validation- how to harden your expressions
    1) The ? conditional evaluation operator
    example:int max = (x > y) ? x : y;
    2) Null-Coalesce(合并,联合) operator(??)
    example:obejct e = ( c != null ) ? c : d; => object e = c ?? d;
    3) Object Initializers
    Customer c = new Customer{ Name="James",Address="204 Lime Street"};(c# 3.0)
    4) The using statement
    5) Aliases(别名) for long winded namespaces and types
    example: using Word = Microsoft.Office.Interop.Word;
                     Word.Application = new Word.Application(){ Visible = true};
    6) Nullable objects
    example: Nullable x = null;
     int? x =  null;
    7) Automatic Properties(c# 3.0)
    8) Type inference(c#3.0 var)
    note: There is no performance impact results form using type inference.The compiler does all the work figuring out the data type at compile time.
    9) Lambda Expressions
    10) string.IsNullOrEmpty
    Optional and named parameters in C# 4.0
    Example:app.Document.open(ref filename,ref missing.......);
    app.Documents.open(@"c:\Document.docx",Readonly:true);
    1) what is an anonymous type?
      One important motivation(动机)for this was to make code written with LINQ easier to read.Anonymous types simply mean that you don't specify the type- but let the complier do it instead.
    2) what is the beneficial for Anonymous type?
    a. simple definitions,simplified
    b. using anonymous types for creating arrays
    c. Saving time and code with anonymous types
    d. Combining Lambda expressions with Queries
    3) other questions?
    a. Is var typesafe? yes
    b. Is there a performance penalty(处罚,征罚) for using "var"? no
    c. On using anonymous definitions in large projects

Debugger
    1) Install the Visual Studio 2008 QFE( Quick-Fix-Engineering)
    2) Start Visual Studio 2008 and bring up Tools > Options > Debugging > General
      Turn OFF the "Enable Just My Code" setting
      Turn ON the "Enable Source Server Support" setting
    3) Next,bring up the "Symbols" page and set the symbols download URL and a cache location.
      Set the symbol file location to be:http://referencesource.microsoft.com/symbols

Sliverlight

Other

2009年2月22日星期日

February 23th Links:SQL SERVER

.NET Framew粗体ork
  1) .NET Framework:
.net framework = CLR + manage libraries + tools;
2) CLR(common language runtime)
  CLR takes care of code management upon program execution and provides various services such as memory management,thread management,security management and other system services.
    3) CTS(common Type system)
CTS describes how types are declared,used and managed.
4) CLS(common language specification)公共语言规范
The CLS is specification that defines the rules to support 
Language integration.That is done in such a way that
program written by any language(.net compliant兼容)
can interoperate with one another

SQL SERVER
1) inner join : produces the set of records that match in both Table A and Table B
2) Full outer join: produces the set of reacords that match all both Table A and Table B,if
    there's no match,the missing side will contain null.
3) Left outer join: produces a complete set of records from Table,with the matching records(where available) in Table B.If there's no match,the right side will contain null.
4) Left outer join + where B.Id is null:
     To produce the set of records only in Table A,but not in Table B.
5) Full outer join + where B.Id is null and A.Id is null.
    To produce the set of records unique to Table A and Table B.
6) Cross join:  a x b:
    To produce the set of records that per record from Table B has all of Table A                        records. 

1)  Clustered Index:
only 1 allowed per table.
physically rearranges the data in the table to conform to the index constraints
For use on columns that are frequently searched for ranges of data
For use on columns with low selectivity
2) Non-Clustered Index
up to 249 allowed per table
create a sprated list of key values with pointers to the location of the datta in the data pages
For use on columns with high selectivity
3) Included Column Index(New in Sql Server2005)
 Why does SQL2005 create new index?
There are limitations to creating indexes that make covering queries defficult:
a. A 900-byte size limit on indexes
b. A maximun of 16 columns can be named in the index
c. Columns wite data types like narchar(max),text,and ntext can't by used in    indexes
So a new type of index was developed in SQL2005 that assists in covering queries:indexes with included columns.

Related Post:

    The sql statement:
 
  USE AdventureWorks - Replace AdventureWorks with your DBName
GO
SELECT DISTINCT[TABLE] = OBJECT_NAME(OBJECT_ID)
FROM SYS.INEXES
WHERE INDEX_ID = 0
AND OBJECTPROPERTY(OBJECT_ID,'IsUserTable') = 1
 
    SQL SERVER provides three different recovery models that allow u to specify the way SQL Sever manages log files and perpare your enterprise for a disaster。Each of these models represents a different approach to balancing the tradeofff between conserving disk space and providing for granular disaster recovery options.
    1) simple recovery model
    2) full recovery model
    3) bulk-logged recovery model


 Englis Words
1. venn diagrams:(维恩图,用图表示集与集之间的关系)
2. populate:填充,构建
 3. IRC : internet Relay chat
 4. specification:规范
5. compliant:兼容,顺从的
 6. disaster:灾难
 7. bulk:大批,体积