zoukankan      html  css  js  c++  java
  • Utils

    Mix two hash code to produce a new hash code
    Code

    消影:
    消影

    忘记加的WM_SETREDRAW值了:
     public const int  WM_SETREDRAW                    = 0x000B;

    抓起Dump文件:

    Code

    详细可见:如何让程序抓到dump文件,MiniDumpWriteDump 一文

    Timer (摘自 《CLR Via C#》) 

    Timer
     // This class is useful for doing operation performance timing
     internal sealed class OperationTimer : IDisposable
     {
         
    private Int64 m_startTime;
         
    private String m_text;
         
    private Int32 m_collectionCount;
         
    public OperationTimer(String text)
         {
             PrepareForOperation();
             m_text 
    = text;
             m_collectionCount 
    = GC.CollectionCount(0);
             
    // This should be the last statement in this
             
    // method to keep timing as accurate as possible
             m_startTime = Stopwatch.GetTimestamp();
         }
         
    public void Dispose()
         {
             Console.WriteLine(
    "{0,6:###.00} seconds (GCs={1,3}) {2}", (Stopwatch.GetTimestamp() - m_startTime) / (Double)Stopwatch.Frequency,
                                                                        GC.CollectionCount(
    0- m_collectionCount, m_text);
         }
         
    private static void PrepareForOperation()
         {
             GC.Collect();
             GC.WaitForPendingFinalizers();
             GC.Collect();
         }
     }
  • 相关阅读:
    C++雾中风景16:std::make_index_sequence, 来试一试新的黑魔法吧
    神经网络中的降维和升维方法 (tensorflow & pytorch)
    论文翻译:2020_Residual Acoustic Echo Suppression Based On Efficient Multi-Task Convolutional Neural Network
    论文翻译:2018_Deep Learning for Acoustic Echo Cancellation in Noisy and Double-Talk Scenarios
    十分钟入门Apollo
    SpringSecurity实现OAuth2+JWT
    实现Vue的多页签组件
    原生redis命令
    .NET Core学习笔记(8)——Entity Framework Core之Database First
    函数极限的计算_计算机程序化实现的理论基础
  • 原文地址:https://www.cnblogs.com/anders06/p/965352.html
Copyright © 2011-2022 走看看