This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Execute() { | |
EmployeeResult result = PayrollDatabase.Instance.GetEmployee(_empId); | |
if(result!=EmployeeResult.NotFound) { | |
Change(result.Employee); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Execute() { | |
var employee = PayrollDatabase.Instance.GetEmployee(_empId); | |
if(employee!=Employee.NotFound) { | |
Change(employee); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Execute() { | |
var employee = PayrollDatabase.Instance.GetEmployee(_empId); | |
if(employee!=null) { | |
Change(employee); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://www.journaldev.com/2856/java-jvm-memory-model-and-garbage-collection-monitoring-tuning | |
jstat -gc 27037 | tail -1 | awk '{ print $3 + $4 + $6 + $8}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logparser "select cs-username, c-ip,date,time,cs-uri-stem,cs-uri-query,time-taken into rapp_logs from <logfile>" -o:SQL -server:<dbserver> -createtable:on -database:<database> -I:W3C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Customer { | |
public ICollection<Order> Orders{get;set;} | |
// business logic and other properties omitted | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
o list all available commands enter "/?". | |
João Duarte joined group chat. | |
João Duarte left group chat. | |
João Duarte joined group chat. | |
João Duarte 11:18 AM | |
hey | |
João Duarte left group chat. | |
me 11:18 AM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CASE DTL.REQUEST_SESSION_ID | |
WHEN -2 THEN 'ORPHANED DISTRIBUTED TRANSACTION' | |
WHEN -3 THEN 'DEFERRED RECOVERY TRANSACTION' | |
ELSE DTL.REQUEST_SESSION_ID END AS SPID, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sELECT CONVERT (varchar, getdate(), 126) AS runtime, | |
mig.index_group_handle, | |
mid.index_handle, | |
CONVERT (decimal (28,1), | |
migs.avg_total_user_cost * | |
migs.avg_user_impact * | |
(migs.user_seeks + migs.user_scans)) | |
AS improvement_measure, | |
'CREATE INDEX missing_index_' + | |
CONVERT (varchar, mig.index_group_handle) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @DatabaseName SYSNAME = DB_NAME(), @TableName VARCHAR(256) | |
DECLARE @DynamicSQL NVARCHAR(max) = | |
'DECLARE curAllTablesInDB CURSOR FOR SELECT TABLE_SCHEMA + | |
''.'' + TABLE_NAME AS TABLENAME | |
FROM ' + @DatabaseName + '.INFORMATION_SCHEMA.TABLES WHERE | |
TABLE_TYPE = ''BASE TABLE''' | |
BEGIN | |
EXEC sp_executeSQL @DynamicSQL -- create tables cursor | |
OPEN curAllTablesInDB | |
FETCH NEXT FROM curAllTablesInDB INTO @TableName |