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 | |
go | |
--SQL SERVER SHORTCUT CTRL+5 | |
--Declare @DB as VarChar(200) = db_name(); exec master.dbo.SelectLastTopN 50, @DB, | |
If OBJECT_ID('SelectLastTopN') Is Not Null Drop Procedure SelectLastTopN | |
Go | |
Create Procedure SelectLastTopN |
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
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
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
// ==UserScript== | |
// @name Order Pluralsight Courses | |
// @version 1.1 | |
// @description Ordena o cursos da pluralsight por data | |
// @match http://*www.pluralsight.com/* | |
// @require http://code.jquery.com/jquery-latest.js | |
// @copyright 2014+, Rods | |
// ==/UserScript== | |
var s_ajaxListener = new Object(); |
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
WebService wsrc = new WebService(); | |
wsrc.Proxy = WebRequest.DefaultWebProxy; | |
wsrc.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials; |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Base class disposable implementation.</Title> | |
<Shortcut>bdisp</Shortcut> | |
<Description> | |
Code snippet to create a scheleton implementation | |
of the IDisposable pattern for a base class. | |
</Description> |
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 string RenderPartialViewToString(string viewName, object model) | |
{ | |
if (string.IsNullOrEmpty(viewName)) | |
viewName = ControllerContext.RouteData.GetRequiredString("action"); | |
ViewData.Model = model; | |
using (StringWriter sw = new StringWriter()) | |
{ | |
ViewEngineResult viewResult = ViewEngines.Engines.FindPartialView(ControllerContext, viewName); |
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
void Main() | |
{ | |
string fileName = @"c:\windows\setupapi.log"; | |
byte[] array = new byte[100]; | |
using (FileStream fs = new FileStream(fileName, FileMode.Open)) | |
{ | |
if (fs.CanSeek && fs.Length > 100) | |
{ | |
fs.Position = fs.Length - 100; |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Linq; | |
using System.Data; | |
using System.ComponentModel; | |
using System.Dynamic; | |
namespace DynamicStatus | |
{ |
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
using System; | |
using System.Net.Mail; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
public class EmailHelper | |
{ | |
MailAddressCollection EmailsTo = new MailAddressCollection(); | |
/// <summary> |
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
## This is a directory/file filter template for WinMerge | |
name: SVN2 | |
desc: SVN2 | |
## Select if filter is inclusive or exclusive | |
## Inclusive (loose) filter lets through all items not matching rules | |
## Exclusive filter lets through only items that match to rule | |
## include or exclude | |
def: include |