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 System.Linq.Expressions | |
{ | |
public sealed class ParameterRebinder : ExpressionVisitor | |
{ | |
private readonly Dictionary<ParameterExpression, ParameterExpression> _map; |
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> | |
/// 十六进制映射表 | |
/// </summary> | |
private static readonly Char[] _lookup = new Char[] | |
{ | |
'0', '1', '2', '3', | |
'4', '5', '6', '7', | |
'8', '9', 'A', 'B', | |
'C', 'D', 'E', 'F' | |
}; |
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; | |
namespace Alogrithm | |
{ | |
public class Recursion | |
{ | |
public static Func<T, TResult> Fix<T, TResult>(Func<Func<T, TResult>, Func<T, TResult>> f) | |
{ | |
return n => f(Fix(f))(n); | |
} |
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
CREATE OR REPLACE PACKAGE pkg_Pagination IS | |
TYPE type_cur IS REF Cursor; --定义数据返回游标 | |
PROCEDURE Pagination ( | |
querySQL in varchar2, --SQL查询语句 | |
pageNum in number, --当前页数 | |
pageSize in number, --单页数量 | |
totalRecord out number, --返回总记录数 | |
v_cur out type_cur --返回数据游标 | |
); | |
END pkg_Pagination; |
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; | |
namespace Study | |
{ | |
public class Alogrithm | |
{ | |
/// <summary> | |
/// 交换数组中2个元素的位置 | |
/// </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
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
namespace Common | |
{ | |
/// <summary> | |
/// 一种通用的将byte数组流转换为对象的方法 | |
/// </summary> | |
/// <see cref="http://www.cnblogs.com/TianFang/archive/2012/10/06/2712987.html"/> |
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
/****************************************************************************** | |
Module: Wintellect.cs | |
Notices: Copyright (c) 2008-2009 Jeffrey Richter | |
******************************************************************************/ | |
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using Microsoft.Win32.SafeHandles; |
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
#include<iostream> | |
#include<string> | |
using namespace std; | |
long Fibonacci(unsigned int n) | |
{ | |
if(n == 0) | |
return 0; | |
else if(n == 1) | |
return 1; |
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 | |
SET NP_PATH=%~dp0 | |
SET NP_PATH=%NP_PATH:\=\\% | |
> ".\OpenWith.reg" ECHO Windows Registry Editor Version 5.00 | |
>>".\OpenWith.reg" ECHO. | |
>>".\OpenWith.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\np2open] | |
>>".\OpenWith.reg" ECHO @="Open with Notepad2" | |
>>".\OpenWith.reg" ECHO. | |
>>".\OpenWith.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\np2open\command] |
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
server { | |
listen 80; | |
listen 443 ssl; | |
server_name example.com; | |
if ($server_port = 80) { | |
return 301 https://$server_name$request_uri; | |
} | |
if ($scheme = http) { | |
return 301 https://$server_name$request_uri; |