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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style type="text/css"> | |
html,body,ul{padding: 0; margin: 0; font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;} | |
.side{ |
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.Text; | |
using System.Threading; | |
/// <summary> | |
/// An ASCII progress bar | |
/// </summary> | |
public class ProgressBar : IDisposable, IProgress<double> { | |
private const int blockCount = 10; | |
private readonly TimeSpan animationInterval = TimeSpan.FromSeconds(1.0 / 8); |
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.Tasks; | |
using Newtonsoft.Json; | |
using System.Net.Http; | |
using System.Collections.Generic; | |
namespace DynamicProxyBuilderInterceptor | |
{ | |
class MainClass |
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.Security.Permissions; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication1 | |
{ | |
public class MyWebBrowser : WebBrowser | |
{ | |
private AxHost.ConnectionPointCookie cookie; |
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
https://github.com/malteclasen/DracWake/blob/master/DracWake.Core/WebClient.cs | |
DracWake.Core/WebClient.cs | |
//处理模拟 HTTP 请求时,如果有 302 状态码的情况。 | |
设置 HttpWebRequest 类实例的 AllowAutoRedirect 为 false |
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
/* | |
* 看到这个道题后想到了两点: | |
* 1.对 Dictionary<TKey, TValue> 的实现是否有所了解 | |
* 2.对值类型是否有所了解,或者说对值类型和引用类型的区别是否有所了解 | |
* | |
* | |
* 1.关于 Dictionary<TKey, TValue> 的实现。先看一下当实例化一个 Dictionary<TValue, TValue> 后添加键值对的方法 Add(TKey key, TValue value) | |
* Add 方法又直接调用了 Insert(TKey key, TValue value, bool add) 私有方法,我从里面摘抄了感觉重要的地方。 | |
*/ |
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 interface ILinkedSetElement<T> where T : class, ILinkedSetElement<T> | |
{ | |
T Next { get; set; } | |
} | |
public class LinkedSet<T> where T : class, ILinkedSetElement<T> | |
{ | |
private T _top; | |
private T _bottom; |