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
@echo off | |
cd %1 | |
git ls-files -m > %2.txt | |
echo 'done' %2.txt |
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://goo.gl/UWuR3W | |
IEnumerable<string> numbers = Enumerable.Range(1, 100).Select(x = > x.ToString("D3")); | |
foreach(var n in numbers) | |
Console.WriteLine(n); | |
// | |
// 001 | |
// 002 |
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
// | |
// jquery.jqGrid.src.js | |
// | |
// | |
// setPager = function (pgid, tp){ | |
// ................... | |
// ............ | |
// ..... | |
$('input.ui-pg-input',"#"+pgcnt).keypress( function(e) { |
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://msdn.microsoft.com/ko-kr/library/ms189741.aspx | |
SELECT TOP 20 query_stats.query_hash AS "Query Hash", | |
SUM(query_stats.total_worker_time) / SUM(query_stats.execution_count)/1000 AS "Avg CPU Time", | |
MIN(query_stats.statement_text) AS "Statement Text" | |
FROM | |
(SELECT QS.*, | |
SUBSTRING(ST.text, (QS.statement_start_offset/2) + 1, | |
((CASE statement_end_offset | |
WHEN -1 THEN DATALENGTH(ST.text) |
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
use master; | |
-- database_connection_stats | |
select database_name, cast(start_time as varchar(20)), cast(end_time as varchar(20)), | |
success_count, total_failure_count, connection_failure_count, terminated_connection_count, throttled_connection_count | |
from sys.database_connection_stats | |
where database_name = 'DB Name' | |
order by start_time desc | |
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
use master; | |
-- database_connection_stats daily, hourly | |
select database_name, cast(end_time as varchar(13)) end_date, | |
SUM(success_count) success_count, SUM(total_failure_count) total_failure_count, SUM(connection_failure_count) connection_failure_count, | |
SUM(terminated_connection_count) terminated_connection_count, SUM(throttled_connection_count) throttled_connection_count | |
from sys.database_connection_stats | |
where database_name = 'DB Name' | |
group by database_name, cast(end_time as varchar(13)) | |
having SUM(total_failure_count) > 10 |
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://stackoverflow.com/questions/12460950/how-to-pass-credentials-to-the-send-mailmessage-command-for-sending-emails | |
$EmailTo = "[email protected]" | |
$EmailFrom = "[email protected]" | |
$Subject = "Test" | |
$Body = "Test Body" | |
$SMTPServer = "smtp.gmail.com" | |
$filenameAndPath = "C:\CDF.pdf" | |
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body) | |
$attachment = New-Object System.Net.Mail.Attachment($filenameAndPath) |
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://irisclasson.com/2013/10/16/how-do-i-query-a-sql-server-db-using-powershell-and-how-do-i-filter-format-and-output-to-a-file-stupid-question-251-255/ | |
$dataSource = ".\SQLEXPRESS" | |
$user = "user" | |
$pwd = "1234" | |
$database = "Test" | |
$connectionString = "Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=False;" | |
$query = "SELECT * FROM Person" | |
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
Parallel.ForEach(strings, str=> | |
{ | |
DataRow row; | |
lock(table){ | |
row= table.NewRow(); | |
} | |
MyParser.Parse(str, out row); | |
lock(table){ | |
table.Rows.Add(row) |
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
// 2개 이상의 요소를 List로 만들기 | |
(List(1,2,3),List(4,5,6),List(7,8,9)).zipped.toList // List((1,4,7), (2,5,8), (3,6,9)) | |
(List(1,2,3),List("a","b","c"),List("!","@","#")).zipped.toList // List((1,a,!), (2,b,@), (3,c,#)) | |
// http://stackoverflow.com/questions/1664439/can-i-zip-more-than-two-lists-together-in-scala |
OlderNewer