显示标签为“Silverlight”的博文。显示所有博文
显示标签为“Silverlight”的博文。显示所有博文

2009年4月2日星期四

April 1th Links:JQuery,TFS,VSS,Silverlight,SQL SERVER

JQuery
    Lazy loading is a well-known design pattern that is intended to prevent redundant processing within your application.

SQL SERVER

Silverlight

Other
    This chapter explains the fundamental difference between Visual Source Safe(VSS) and VSTS Team Foundation.

2009年3月18日星期三

March 19th-21th: C#,SQL SERVER,Silverlight 3

C#
    bad:
    1) No two consecutive(连续的) empty lines
    2) No empty line before a closing curly(卷发的,弯曲的,大括号)
    3) No empty line after an opeing curly
    good:
    1) one empty line between same level declarations.
    2) one emtp line between members of a type
    3) one empty line after #region and before #endregion
    Ruby's send functionality is that being able to dynamically invoke a method on an object like this:  
thisobject.Send("Foo",1,2,3);
Web
    Yesterday we released a new people selector widget on Flickr.This widget downloads a list of all of your contacts,in javasript,in under 200ms(this is even for member with 10,000+ contacts).In order to get this level of performance,we had to completely rethink how we send data from the server to the client.
    1) Server Side:Cache Everything
    2) Testing the Performance of Differenct Data Formats
      a) JSON,Eval() is Slow
      b) JSON and Dynamic Script Tags: Fast but Insecture

Silverlight

SQL SERVER
    One way to script the Stored Procedures of your SQL SERVER2008 databse is to use the SQL SERVER Management Stuio(SSMS).
    1) Open SSMS > Your Database > Programmablility > Stored Procedures > Right Click Stored Procedure Name > 'Script Stored Procedure As' > 'Creat To'
    2) Or Complete the same task using below T-SQL:

USE NORTHWIND
SELECT obj.Name as SPName,
modu.definition as SPDefinition,
obj.create_date as SPCreatinDate
FROM sys.sql_modules modu
INNER JOIN sys.objects obj
ON modu.object_id = obj.object_id
WHERE obj.type = 'P'
    2. Find All Servers From Local Network- Using sqlcmd- Pinal Dave
    1) Go to command prompt and type in "osql -L" or "sqlcmd -L"
    
CREATE TABLE #servers(sname VARCHAR(255))
INSERT #servers(sname)
EXEC master..xp_CMDShell 'ISQL -L'
DELETE
FROM #server
WHERE sname = 'Servers:'
OR sname IS NULL
SELECT LTRIM(sname)
FROM #servers
DROP TABLE #servers
Other

2009年3月10日星期二

March 10th-13th Links:C#,Struct,Word,Javascript

C#
    1. What The Defference Between Const and Readonly in .NET?
    1) The readonly keywork differs from the const keyword.A const field can only be initialized at the declaration of the field.A readonly field can be initialized either at the declaration or in a constructor.
    2) A const field is a compile-time constant,the readonly field can be used for run-time constants,as in this line: public static readonly unit l = (uint)DateTime.Now.Ticks;
    3) When using const,the value has to be set before compiling,and can not be changed. Once u make your assembly,the value of the const is baked in there.if u want to change the value of the const,u must go back into your code,change the value,then recompile.if another assemly(Assembly B) wants to use the const in the first assembly(Assembly A),the const is also baked in there as well.So,if u change the value of the const,not only will you have to rebuild your first Assembly A,you will also have to build all other assembly(e.g.:assembly B,C,D...).
    4) Another difference between const and readonly,is that const are static by default,where with readonly,you must define it as static(if you wnat it to be).
    c# 2.0(which shipped with VS2005) introduced the concept of anonymous methods,which allow code blocks to be wrritten "in-line" where delegate values are expected.
    Lambda Expressions provide a more concise(简明的),functional syntax for writing anonymous methods.Since they provide a very compact and type-safe way to write functions that can be passed as arguments for subsequent evaluation.
    syntax: params => expression
    One of the things that make Lambda expressions particularly(adv尤其) powerful from a framework developer's perspective(看法) is that they can be compiled as either a code delegate(int the form of IL based method) or as a expression tree object which can be used at runtime to analyze,transform or optimize the expression.
    1) Lambda Expressions to Code Delegates
    2) Lambda Expressions to Expression Trees

Design Patterns
    If u want to do something that requires interacting with multiple subsystems you can create a facade that same only a few methods that handle all the interaction with the subsystem.

JAVASCRIPT

Silverlight
    I have been wording extensively with both WPF and Silverlight over the past many months.Not too long ago,my workstation started having trouble - specifically Visual Studio 2008 was crashing when tring to open XAML files.Not just crashing either.maybe u should need this patch:  download this patch

English
    1. Unethical
    2. Survey: 调查,民意调查
    3. reusable: 重复使用
    4. fetch: 取得
    5. paragraphs:段
    6. Enumerable: IEnumerable
    7. concise
    8. syntax
    9. subsequent: 后续的
    10. evaluation: 付值,评估,评价
    11. perspective: 看法,透视