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.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web.Http; |
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.Linq; | |
namespace TimeZones | |
{ | |
/// <summary> | |
/// Responsible for converting between different time zones. | |
/// </summary> | |
public class TimeZoneConverter | |
{ |
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
$(document).ready(function() { | |
$('#elementId') | |
.keypress(function(e) { | |
// Prevent users from being able to type into the field. | |
e.preventDefault(); | |
}) | |
.keydown(function (e) { | |
// Prevent users from being able to type into the field. | |
e.preventDefault(); | |
}) |
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
[TestFixture] | |
class RestSharpIntegration | |
{ | |
[Test] | |
public void EnsureFormIsPosted() | |
{ | |
// Arrange | |
var request = CreateRequest(); | |
// Act |
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
sc queryex wuauserv | |
SERVICE_NAME: wuauserv | |
DISPLAY_NAME: Windows Update | |
TYPE : 20 WIN32_SHARE_PROCESS | |
STATE : 4 RUNNING | |
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_PRESHUTDOWN) | |
WIN32_EXIT_CODE : 0 (0x0) | |
SERVICE_EXIT_CODE : 0 (0x0) | |
CHECKPOINT : 0x0 |
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
sc delete <name-of-service> |
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.Linq; | |
namespace Brian.Federici | |
{ | |
/// <summary> | |
/// An object that can iterate over an IGrouping collection. | |
/// </summary> | |
/// <typeparam name="T">Value type.</typeparam> |
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
/// <summary> | |
/// Encapsulates extension methods related to compression. | |
/// </summary> | |
public static class CompressionExtensions | |
{ | |
/// <summary> | |
/// Compresses <paramref name="uncompressedString"/> and returns the result. | |
/// </summary> | |
/// <param name="uncompressedString">An uncompressed string.</param> | |
/// <returns>A base-64 string.</returns> |
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
/* | |
Make sure to wrap a using() around any calls to DownloadAndResizeStream: | |
using (var stream = DownloadAndResizeStream(uri, 100, 100, true)) { | |
// Do what you need to with "stream" here | |
} | |
*/ | |
private Stream DownloadAndResizeStream(Uri sourceImageUrl, int width, int height, bool crop) | |
{ |
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
<!-- | |
Given the following files in C:\ | |
* app.1.config | |
* app.2.config | |
* app.3.config | |
* file.txt | |
This task will perform 3 iterations and set ${filename} to the following: | |
* C:\app.1.config | |
* C:\app.2.config |
NewerOlder