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
# 这个还能保留上一次的更改。 | |
git reset --soft HEAD^ | |
# 这个不能保留上一次的更改。 | |
git reset --hard HEAD^ |
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
Mount-DiskImage -ImagePath X:\cn_windows_server_2012_r2_with_update_x64_dvd_4048415.iso | |
# Note that ImagePath must be absolute path. |
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
Set-VirtualDisk -FriendlyName "September Disk" -IsManualAttach 0 |
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 Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Table; | |
/// <summary> | |
/// The table entities that extend from this type will have rich support in property types. | |
/// </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
// Copied from: | |
// http://www.minddriven.de/index.php/technology/dot-net/c-sharp/efficient-expression-values | |
public static class Guard | |
{ | |
public static void AssertNotNull<T>(Expression<Func<T>> selector) | |
{ | |
var memberSelector = (MemberExpression)selector.Body; | |
var constantSelector = (ConstantExpression)memberSelector.Expression; | |
var value = ((FieldInfo)memberSelector.Member).GetValue(constantSelector.Value); |
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
findstr /s /i /m "stringToFind" * |
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
// Modified based on http://stackoverflow.com/questions/1322037/ | |
public static class StringUtils | |
{ | |
private static Regex FormatPattern = | |
new Regex(@"(\{+)([^\}]+)(\}+)", RegexOptions.Compiled); | |
public static string Format(this string pattern, object template) | |
{ | |
if (template == null) |
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
<div id="content-wrapper"> | |
<div id="content"> | |
<!-- blah blah blah --> | |
</div> | |
</div> | |
<div id="sidebar"> | |
<ul> | |
<!-- blah blah blah --> | |
</ul> |
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
namespace EventTest | |
{ | |
using System; | |
class Parent | |
{ | |
public event Action Event; | |
public virtual void DoEvent() | |
{ |
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
// 395A1 & 395A2 - Skis | |
// http://codeforces.com/problemset/problem/395/A1 | |
// http://codeforces.com/problemset/problem/395/A2 | |
#include <cstdlib> | |
#include <iostream> | |
#include <algorithm> | |
const int N = 1111111; |