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
% 定义一个行向量: | |
x = [1 2 3] | |
x = | |
1 2 3 | |
% 定义一个列向量: | |
x = [1; 2; 3;] |
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
% a : b 可以得到一个从 a 到 b 的整数组成的行向量,其中 a、b 是整数: | |
1 : 3 | |
ans = | |
1 2 3 | |
% a : b : c 可以得到一个从 a 到 c 并且相隔 b 的行向量,其中 a、b、c 都是实数: | |
1 : 2 : 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
// 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; |
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
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
// 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
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
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
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
# 这个还能保留上一次的更改。 | |
git reset --soft HEAD^ | |
# 这个不能保留上一次的更改。 | |
git reset --hard HEAD^ |
OlderNewer