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

没有评论: