<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ch2ch2oh的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/ch2ch2oh</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; ch2ch2oh]]></copyright><item><title><![CDATA[CSDN页面完美格式打印]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/122362494</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/122362494</guid><author>ch2ch2oh</author><pubDate>Fri, 07 Jan 2022 13:38:48 +0800</pubDate><description><![CDATA[如果直接在CSDN页面上Ctrl + P打印，肯定会是这样的预览页面
页面显示不全，格式不正确，等等。
这是因为页面的CSS等元素干扰了打印。
只要把那些干扰元素删除，再打印就OK了
复制以下代码，打开要打印的页面。
 (function(){

    $("#side").remove();

    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();]]></description><category></category></item><item><title><![CDATA[Python3：__repr__和__str__的思考和理解]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/122358890</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/122358890</guid><author>ch2ch2oh</author><pubDate>Fri, 07 Jan 2022 10:23:07 +0800</pubDate><description><![CDATA[最近一下子学了很多的知识点，导致我有点没反应过来，粗略的在草稿纸记了点自己的想法，趁休息的时间将它敲到博客里面去，免得丢失，这一篇写的挺废话的，有点啰嗦，本篇的重点是第二段程序后开始的总结和后面的几个细节问题。
关于__repr__和__str__这连个东西，我最开始就感觉有点难以理解，百度来的东西看了很多遍，定义都能背下来了，随口一说就是一个给机器看的一个给人看的，但是感觉只理解了最表面，当然不是网上大佬给的答案不够好，而是某些东西还是需要自己去思考，然后有一番自己的理解，然后写点程序验证下，这才是最好的]]></description><category></category></item><item><title><![CDATA[Linux下DIR，dirent,stat等结构体详解]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/121474279</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/121474279</guid><author>ch2ch2oh</author><pubDate>Mon, 22 Nov 2021 16:25:17 +0800</pubDate><description><![CDATA[Linux下文件读取目录、文件路径：
首先说说DIR这一结构体
DIR结构体的定义：
    struct __dirstream   
       {   
        void *__fd;    
        char *__data;    
        int __entry_data;    
        char *__ptr;    
        int __entry_ptr;    
        size_t __allocation;    
        ]]></description><category></category></item><item><title><![CDATA[转换说明符(%s、%u、%c.....)]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/121400673</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/121400673</guid><author>ch2ch2oh</author><pubDate>Thu, 18 Nov 2021 14:50:58 +0800</pubDate><description><![CDATA[图片转自网络）

十六进制输出   %x
printf("%x %X %#x",31,31,31);
    //1f 1F 0x1f

整数的左、右宽度
     NSString *aa = [NSString stringWithFormat:@"%10d",100];
        //       100  右移10个字符位置宽
        NSString *aaa = [NSString stringWithFormat:@"%-10d",100];
        //100     ]]></description><category></category></item><item><title><![CDATA[linux的readdir和readdir_r函数]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/121145754</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/121145754</guid><author>ch2ch2oh</author><pubDate>Thu, 04 Nov 2021 16:41:37 +0800</pubDate><description><![CDATA[1.首先要打开目录文件
DIR *opendir( const char *name);
DIR *fdopendir( int fd);
2.读取目录文件信息的函数
注意：这是个库函数
struct dirent *readdir( DIR *dirp);
int readdir_r(    DIR *dirp,     struct dirent *entry,    struct dirent **result);
文件目录结构体：
    struct dirent {
          ino_]]></description><category></category></item><item><title><![CDATA[int main(int argc, char *argv[]) 到底是干啥用的？]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/121144944</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/121144944</guid><author>ch2ch2oh</author><pubDate>Thu, 04 Nov 2021 16:37:35 +0800</pubDate><description><![CDATA[前言
在旧版本的IDE中新建一个C/C++源文件，你可能会看到这种样子的main函数
int main(int argc,char* argv[])
{
	return 0;
}

上面这个argc，argv到底有什么用呢？
分析
初探类型
先看argv，可以理解成它是一个string数组(char数组可以理解成一个string，为了方便叙述都用string来表示)，而argc是一个int类型
int argc,char* argv[]

这两者的关系是：**argc表示argv中存放string的个数，*]]></description><category></category></item><item><title><![CDATA[C++迭代器（STL迭代器）iterator详解]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/120967774</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/120967774</guid><author>ch2ch2oh</author><pubDate>Tue, 26 Oct 2021 10:50:12 +0800</pubDate><description><![CDATA[要访问顺序容器和关联容器中的元素，需要通过“迭代器（iterator）”进行。迭代器是一个变量，相当于容器和操纵容器的算法之间的中介。迭代器可以指向容器中的某个元素，通过迭代器就可以读写它指向的元素。从这一点上看，迭代器和指针类似。
迭代器按照定义方式分成以下四种。

正向迭代器，定义方法如下：

容器类名::iterator  迭代器名;

常量正向迭代器，定义方法如下：

容器类名::const_iterator  迭代器名;

反向迭代器，定义方法如下：

容器类名::reverse_iterator]]></description><category></category></item><item><title><![CDATA[Linux下调用Windows中txt，因行尾不同读取时出错]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/120945447</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/120945447</guid><author>ch2ch2oh</author><pubDate>Mon, 25 Oct 2021 08:53:46 +0800</pubDate><description><![CDATA[回车、换行的区别
在Windows中：
‘\r’ (回车)：即将光标回到当前行的行首(而不会换到下一行)，之后的输出会把之前的输出覆盖
‘\n’ 换行：换到当前位置的下一位置，而不会回到行首；
每行结尾是“&lt;回车&gt;&lt;换行&gt;”，即“\r\n”；
Unix系统里
每行结尾只有“&lt;换行&gt;”，即"\n"；
Mac系统里
每行结尾是“&lt;回车&gt;”，即"\r"；
也就是：
Linux中遇到换行符’\n’会进行回车+换行的操作，回车符’\r’反而只会作为控制字符’^M’显示，]]></description><category></category></item><item><title><![CDATA[C++ vector 容器浅析]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/120848108</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/120848108</guid><author>ch2ch2oh</author><pubDate>Tue, 19 Oct 2021 16:03:03 +0800</pubDate><description><![CDATA[一、什么是vector？
向量（Vector）是一个封装了动态大小数组的顺序容器（Sequence Container）。跟任意其它类型容器一样，它能够存放各种类型的对象。可以简单的认为，向量是一个能够存放任意类型的动态数组。
二、容器特性
1.顺序序列
顺序容器中的元素按照严格的线性顺序排序。可以通过元素在序列中的位置访问对应的元素。
2.动态数组
支持对序列中的任意元素进行快速直接访问，甚至可以通过指针算述进行该操作。提供了在序列末尾相对快速地添加/删除元素的操作。
3.能够感知内存分配器的（Alloc]]></description><category></category></item><item><title><![CDATA[vector与string]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/120847750</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/120847750</guid><author>ch2ch2oh</author><pubDate>Tue, 19 Oct 2021 15:50:54 +0800</pubDate><description><![CDATA[1 vector
1.1 vector是什么？
向量（vector）是一个能够存放任意类型的动态数组。
1.2 vector怎么用？
创建

vector&lt;int&gt; a; // 创建一个空类型为int的vector
vector&lt;float&gt; b(10); // 创建一个有10个元素类型为float值为0的vector
vector&lt;char&gt; c(20,'a'); // 创建一个有20个元素类型为char值为'a'的vector

获取元素个数
获取元素个数`对象.si]]></description><category></category></item><item><title><![CDATA[python OS库]]></title><link>https://blog.csdn.net/ch2ch2oh/article/details/119968960</link><guid>https://blog.csdn.net/ch2ch2oh/article/details/119968960</guid><author>ch2ch2oh</author><pubDate>Sat, 28 Aug 2021 16:04:11 +0800</pubDate><description><![CDATA[当前目录
os.path.dirname
父目录
os.path.pardir
绝对路径
os.path.abspath是绝对路径
import os

print '***获取当前目录***'
print os.getcwd()
print os.path.abspath(os.path.dirname(__file__))

print '***获取上级目录***'
print os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
pri]]></description><category></category></item></channel></rss>