<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[nodeathphoenix的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/nodeathphoenix</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; nodeathphoenix]]></copyright><item><title><![CDATA[尊重工程师的时代终将到来]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/102877376</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/102877376</guid><author>nodeathphoenix</author><pubDate>Sat, 02 Nov 2019 22:22:24 +0800</pubDate><description><![CDATA[今天终于看到一位勇士为我们工程师发声，为这位女侠点赞，勇士也。希望中国的工程师早日得到该有的尊重。











https://money.163.com/19/1101/09/ESSTN9RD00259DLP.html
...]]></description><category></category></item><item><title><![CDATA[C#内存泄漏：Event内存泄漏]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/84549399</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/84549399</guid><author>nodeathphoenix</author><pubDate>Mon, 26 Nov 2018 16:26:54 +0800</pubDate><description><![CDATA[前言

内存泄漏是指：当一块内存被分配后，被丢弃，没有任何实例指针指向这块内存， 并且这块内存不会被GC视为垃圾进行回收。这块内存会一直存在，直到程序退出。

C#是托管型代码，其内存的分配和释放都是由CLR负责，当一块内存没有任何实例引用时，GC会负责将其回收。既然没有任何实例引用的内存会被GC回收，那么内存泄漏是如何发生的？

内存泄漏示例

为了演示内存泄漏是如何发生的，我们来看一段代码

...]]></description><category></category></item><item><title><![CDATA[针孔相机拍摄的图像坐标和空间点的对应关系]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/78172128</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/78172128</guid><author>nodeathphoenix</author><pubDate>Sat, 07 Oct 2017 22:17:34 +0800</pubDate><description><![CDATA[转自：http://wiki.opencv.org.cn/index.php/Cv照相机定标和三维重建


http://blog.youkuaiyun.com/lixianjun913/article/details/10032019

摄像机标定------标定原理
一：摄像机成像原理

        摄像机成像模型一般有三种：透镜投影模型（小孔摄像机模型）、正交投影模型和透视投影模型]]></description><category></category></item><item><title><![CDATA[理解c#中的闭包]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77606520</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77606520</guid><author>nodeathphoenix</author><pubDate>Sat, 26 Aug 2017 20:06:41 +0800</pubDate><description><![CDATA[引用：
http://www.cnblogs.com/jiejie_peng/p/3701070.html


闭包的概念

内层的函数可以引用包含在它外层的函数的变量，即使外层函数的执行已经终止。但该变量提供的值并非变量创建时的值，而是在父函数范围内的最终值。

闭包的优点
使用闭包，我们可以轻松的访问外层函数定义的变量，这在匿名方法中普遍使用。比如有如下场景，在winform]]></description><category></category></item><item><title><![CDATA[c# 闭包]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77606490</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77606490</guid><author>nodeathphoenix</author><pubDate>Sat, 26 Aug 2017 20:02:04 +0800</pubDate><description><![CDATA[引用 http://www.cnblogs.com/zhouandke/p/5870257.html


1. 首先要说明的是, delegate 被编译器 编译成一个class, 所以才能传来传去(具体参考 《CLR via C#》第四版), 所以 Action、Func也是如此
2. 在C#中,原来闭包只是编译器玩的花招而已,它仍然没有脱离.NET对象生命周期的规则，它将需要修改作用域]]></description><category></category></item><item><title><![CDATA[c# delegate]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77604441</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/77604441</guid><author>nodeathphoenix</author><pubDate>Sat, 26 Aug 2017 17:57:13 +0800</pubDate><description><![CDATA[最近换了份新工作，开发的重心从我最爱的c++转移到c#了。以前虽然说也写过c#的代码，但是现在发现对c#的理解和使用还是比较初级，有必要进一步学些下。





C# Delegate




delegate是C#中的一种类型，它实际上是一个能够持有对某个方法的引用的类。与其它的类不同，delegate类能够拥有一个签名（signature），并且它只能持有与它的签名相匹配]]></description><category></category></item><item><title><![CDATA[将IP地址转换为二进制表示]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/60580232</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/60580232</guid><author>nodeathphoenix</author><pubDate>Mon, 06 Mar 2017 15:51:46 +0800</pubDate><description><![CDATA[string convert(char* cur, int size) {
    char byte[10] = {0};
    memcpy(byte, cur - size, size);
    unsigned int value = atoi(byte);
    char final_value[9] = {0};
    for (int i = 0; i < 8; i++) {]]></description><category></category></item><item><title><![CDATA[c# 托盘程序编程]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/58051732</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/58051732</guid><author>nodeathphoenix</author><pubDate>Mon, 27 Feb 2017 12:50:29 +0800</pubDate><description><![CDATA[先后在C# Windos Form和WPF项目中涉及到了托盘编程，最近闲来总结了一下。


C# Form
通过标准的NotifyIconEx控件：

弹出tooltip，可以直接通过Shell_NotifyIcon为标准的tooltip设置了szTip值来弹出标准的tooltip(当鼠标放到状态栏上的托盘图标上时弹出)；
弹出气泡，可以直接通过Shell_NotifyIcon为标准]]></description><category></category></item><item><title><![CDATA[shared_ptr构造函数]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54586480</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54586480</guid><author>nodeathphoenix</author><pubDate>Tue, 17 Jan 2017 20:24:41 +0800</pubDate><description><![CDATA[http://www.cplusplus.com/reference/memory/shared_ptr/shared_ptr/
default (1)	constexpr shared_ptr() noexcept;

from null pointer (2)	constexpr shared_ptr(nullptr_t) : shared_ptr() {}

from pointer (3]]></description><category></category></item><item><title><![CDATA[类型操作符重载]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54574424</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54574424</guid><author>nodeathphoenix</author><pubDate>Mon, 16 Jan 2017 15:27:46 +0800</pubDate><description><![CDATA[c++除了可以重载运算操作符，还可以重载类型操作符。

operator TypeName(), 类型操作符，重载了此类操作符后，可以将Class类型的object当作TypeName类型的数据来使用。即相当于是一个隐式的类型转换，可以在需要TypeName类型的地方隐式地将object转换为TypeName类型(通过调用Class重载的的类型操作符operator TypeName())。]]></description><category></category></item><item><title><![CDATA[python中 __name__及__main()__的妙处]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54407674</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/54407674</guid><author>nodeathphoenix</author><pubDate>Fri, 13 Jan 2017 13:20:50 +0800</pubDate><description><![CDATA[#hello.py
def sayHello():
    str="hello"
    print(str);

if __name__ == "__main__":
    print ('This is main of module "hello.py"')
    sayHello()




python作为一种脚本语言，我们用python写的各个module都可以包含以上那]]></description><category></category></item><item><title><![CDATA[0/1背包问题]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52840668</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52840668</guid><author>nodeathphoenix</author><pubDate>Mon, 17 Oct 2016 18:30:46 +0800</pubDate><description><![CDATA[背包问题确实是一个让人有点费解的问题，它属于一种动态规划算法。以前确实也没有完全真正理解过这个算法，最近回头仔细品味，自觉有点心得领悟。将书本上的此算法根据自己的理解稍加整理，以一种更适合让人理解的方式呈现出来。






#include&lt;stdio.h&gt;
const int N=100;
int limitw;
int totv;
int maxv;
int option[N...]]></description><category></category></item><item><title><![CDATA[HTTP协议]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52808930</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52808930</guid><author>nodeathphoenix</author><pubDate>Thu, 13 Oct 2016 18:13:59 +0800</pubDate><description><![CDATA[HTTP
HTTP是Hyper Text Transfer Protocol，超文本传输协议；


当我们想浏览一个网站的时候，只要在浏览器的地址栏里输入网站的地址就可以了，例如http://www.microsoft.com,但是在浏览...w.microsoft.com ,你知道为什么会多出一个“http”吗？

(1)HTTP协议是什么
我们在浏览器的地址栏里输入的网站地址叫做]]></description><category></category></item><item><title><![CDATA[enable_from_this方法的使用与陷阱]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52806847</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52806847</guid><author>nodeathphoenix</author><pubDate>Thu, 13 Oct 2016 14:44:39 +0800</pubDate><description><![CDATA[enable_from_this 的使用与实现原理说明：


shared_from_this()是enable_shared_from_this的成员函数，返回shared_ptr;
注意的是，这个函数仅在shared_ptr的构造函数被调用之后才能使用。
原因是enable_shared_from_this::weak_ptr并不在构造函数中设置，而是在shared_ptr的构造函数]]></description><category></category></item><item><title><![CDATA[C++ boost库----share_from_this类的作用和实现原理]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52806818</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52806818</guid><author>nodeathphoenix</author><pubDate>Thu, 13 Oct 2016 14:41:07 +0800</pubDate><description><![CDATA[使用boost库时，经常会看到如下的类
class A:public enable_share_from_this
在什么情况下要使类A继承enable_share_from_this？
使用场合：当类A被share_ptr管理，且在类A的成员函数里需要把当前类对象作为参数传给其他函数时，就需要传递一个指向自身的share_ptr。
我们就使类A继承enable_share_from_th]]></description><category></category></item><item><title><![CDATA[C++ 全局函数std::getline]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52276755</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/52276755</guid><author>nodeathphoenix</author><pubDate>Mon, 22 Aug 2016 14:53:55 +0800</pubDate><description><![CDATA[经常会用到getline来读取文件，但是发现对于c和c++的getline之前没有一个很深入的认识，这里借鉴网上的一些资料总结一下。


1、在标准C语言中，getline函数是不存在的。在gcc编译器中，对标准c库进行了扩展，加入了一个getline函数。该函数的定义如下：


             #include 
      ssize_t getline(char **l]]></description><category></category></item><item><title><![CDATA[获取struct 中的member variable 的offset的宏定义]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51690274</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51690274</guid><author>nodeathphoenix</author><pubDate>Thu, 16 Jun 2016 10:52:20 +0800</pubDate><description><![CDATA[转自：
http://www.linuxidc.com/Linux/2013-01/78004.htm


1.offset宏讲解
#defineoffsetof(TYPE, MEMBER) ((size_t) &((TYPE*)0)->MEMBER)
对这个宏的讲解我们大致可以分为以下4步进行讲解：
1>((TYPE *)0 )  0地址强制 "转换"
为 TYPE结构类型的指针]]></description><category></category></item><item><title><![CDATA[C++和双重检查锁定模式(DCLP)的风险]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51657973</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51657973</guid><author>nodeathphoenix</author><pubDate>Mon, 13 Jun 2016 15:18:45 +0800</pubDate><description><![CDATA[转自：
http://blog.jobbole.com/86392/


多线程其实就是指两个任务一前一后或者同时发生。
1 简介
当你在网上搜索设计模式的相关资料时，你一定会找到最常被提及的一个模式：单例模式(Singleton)。然而，当你尝试在项目中使用单例模式时，一定会遇到一个很重要的限制：若使用传统的实现方法(我们会在下文解释如何实现)，单例模式是非线程安全的。
程序员们为]]></description><category></category></item><item><title><![CDATA[C++ Singleton模式之线程安全]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51657873</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51657873</guid><author>nodeathphoenix</author><pubDate>Mon, 13 Jun 2016 15:09:19 +0800</pubDate><description><![CDATA[转自：
http://blog.youkuaiyun.com/insistgogo/article/details/9412863


定义：
保证一个类仅有一个实例，并提供一个访问它的全局访问点，该实例被所有程序模块共享。

应用场景：
比如在某个服务器程序中，该服务器的配置信息存放在一个文件中，这些配置数据由一个单例对象统一读取，然后服务进程中的其他对象再通过这个单例对象获取这些配置信息。]]></description><category></category></item><item><title><![CDATA[RSA密钥长度、明文长度和密文长度]]></title><link>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51647278</link><guid>https://blog.youkuaiyun.com/nodeathphoenix/article/details/51647278</guid><author>nodeathphoenix</author><pubDate>Sun, 12 Jun 2016 16:35:29 +0800</pubDate><description><![CDATA[本文介绍RSA加解密中必须考虑到的密钥长度、明文长度和密文长度问题，对第一次接触RSA的开发人员来说，RSA算是比较复杂的算法，天缘以后还会补充几篇RSA基础知识专题文章，用最简单最通俗的语言描述RSA，让各位了解RSA算法本身其实也很简单，RSA的复杂度是因为数学家把效率和安全也考虑进去的缘故。

本文先只谈密钥长度、明文长度和密文长度的概念知识，RSA的理论及示例等以后再谈。提到密钥，我们]]></description><category></category></item></channel></rss>