<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[PengQ1的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Bubbler_726</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Bubbler_726]]></copyright><item><title><![CDATA[如何在Objective-C里定义一个全局的NSArray]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/117360902</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/117360902</guid><author>Bubbler_726</author><pubDate>Fri, 28 May 2021 14:12:10 +0800</pubDate><description><![CDATA[1，OC是一门动态的语言，不可以直接在编译的过程中直接定义这个NSArray。只能在编译的时候声明一个对象指针，然后在实际运行的时候，再进行alloc, init。

2，使用
]]></description><category></category></item><item><title><![CDATA[-fpic与-fPIC]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/108731573</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/108731573</guid><author>Bubbler_726</author><pubDate>Tue, 22 Sep 2020 18:20:10 +0800</pubDate><description><![CDATA[Object文件

我们在Linux开发过程中经常会遇到Object file这个名词，你可以称之为对象文件。常见的对象文件有三种:


	可重定位的对象文件(Relocatable file)
	这是由汇编器汇编生成的 .o 文件。后面的链接器(link editor)拿一个或一些 Relocatable object files 作为输入，经链接处理后，生成一个可执行的对象文件 (Executable file) 或者一个可被共享的对象文件(Shared object file)。我们可以使用 ar 工]]></description><category></category></item><item><title><![CDATA[32bit program cannot run on 1904 64bit]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/108368094</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/108368094</guid><author>Bubbler_726</author><pubDate>Wed, 02 Sep 2020 18:55:55 +0800</pubDate><description><![CDATA[sudo dpkg --add-architecture i386

sudo apt-get -y install lib32z1 libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses6
]]></description><category></category></item><item><title><![CDATA[Ubuntu 1904 cannot execute “sudo apt-get update“]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/108360017</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/108360017</guid><author>Bubbler_726</author><pubDate>Wed, 02 Sep 2020 12:50:46 +0800</pubDate><description><![CDATA[Refer to https://www.digitalocean.com/community/questions/unable-to-apt-update-my-ubuntu-19-04



First,


sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Then


sudo apt-get update .]]></description><category></category></item><item><title><![CDATA[C++为什么要用传引用常量替换传值]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/106349827</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/106349827</guid><author>Bubbler_726</author><pubDate>Tue, 26 May 2020 10:31:37 +0800</pubDate><description><![CDATA[优势1 效率高
假设现在有一个Person类作为基类，还有一个Student类继承自Person，如下:
class Person {
public:
    Person();
    virtual ~Person();    // 最好把基类的析构函数加上virtual
private:
    std::string name;
    std::string address;
};
class Student : public Person {
public:
    Student();
   ]]></description><category></category></item><item><title><![CDATA[C++为什么要尽可能地使用const(Effective C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/106338666</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/106338666</guid><author>Bubbler_726</author><pubDate>Mon, 25 May 2020 17:50:06 +0800</pubDate><description><![CDATA[当const遇见指针（常量指针与指针常量）
国内的很多教材、教程里常常提到常量指针和指针常量，很多公司面试的时候也会问到区别。乍一看好像很绕，其实也不难，下面的例子将具体的讲解一下。
char greeting[] = "Hello";
char* p = greeting;                 // non-const pointer, non-const data
const char* p = greeting;           // non-const pointer, const ]]></description><category></category></item><item><title><![CDATA[LeetCode4-Median of Two Sorted Arrays(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532996</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532996</guid><author>Bubbler_726</author><pubDate>Wed, 15 Apr 2020 13:26:02 +0800</pubDate><description><![CDATA[Description
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
You may assume n...]]></description><category></category></item><item><title><![CDATA[LeetCode3-Longest Substring Without Repeating Characters(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532987</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532987</guid><author>Bubbler_726</author><pubDate>Wed, 15 Apr 2020 13:25:32 +0800</pubDate><description><![CDATA[Description
Given a string, find the length of the longest substring without repeating characters.
Example 1:
Input: “abcabcbb”
Output: 3 
Explanation: The answer is “abc”, with the length of 3. 
Exam...]]></description><category></category></item><item><title><![CDATA[LeetCode2-Add Two Numbers(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532974</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532974</guid><author>Bubbler_726</author><pubDate>Wed, 15 Apr 2020 13:24:55 +0800</pubDate><description><![CDATA[Description
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers ...]]></description><category></category></item><item><title><![CDATA[LeetCode1-Two Sum(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532957</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105532957</guid><author>Bubbler_726</author><pubDate>Wed, 15 Apr 2020 13:24:08 +0800</pubDate><description><![CDATA[Description
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not us...]]></description><category></category></item><item><title><![CDATA[LeetCode15-3Sum(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315100</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315100</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 19:06:25 +0800</pubDate><description><![CDATA[Description
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set mus...]]></description><category></category></item><item><title><![CDATA[LeetCode14-Longest Common Prefix(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315085</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315085</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 19:05:28 +0800</pubDate><description><![CDATA[Description
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string “”.
Example 1:
Input: [“flower”,“flow”,“flight”]...]]></description><category></category></item><item><title><![CDATA[LeetCode13-Roman to Integer(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315048</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315048</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 19:03:08 +0800</pubDate><description><![CDATA[Description
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol&nbsp;Value 
I&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...]]></description><category></category></item><item><title><![CDATA[LeetCode12-Integer to Roman(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315033</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105315033</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 19:02:30 +0800</pubDate><description><![CDATA[Description
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol&nbsp;Value 
I&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...]]></description><category></category></item><item><title><![CDATA[LeetCode9-Palindrome Number(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305422</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305422</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 08:08:20 +0800</pubDate><description><![CDATA[Description
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
Example 1:
Input: 121 
Output: true 
Example 2:
Input: -121 
Output: fa...]]></description><category></category></item><item><title><![CDATA[LeetCode8-String to Integer (atoi)(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305418</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305418</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 08:07:28 +0800</pubDate><description><![CDATA[Description
Implement atoi which converts a string to an integer.
The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starti...]]></description><category></category></item><item><title><![CDATA[LeetCode7-Reverse Integer(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305406</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305406</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 08:04:12 +0800</pubDate><description><![CDATA[Description
Given a 32-bit signed integer, reverse digits of an integer.
Example 1:
Input: 123
Output: 321
Example 2:
Input: -123
Output: -321
Example 3:
Input: 120
Output: 21
Note:
Assume we are deal...]]></description><category></category></item><item><title><![CDATA[LeetCode6-ZigZag Conversion(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305397</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105305397</guid><author>Bubbler_726</author><pubDate>Sat, 04 Apr 2020 08:03:05 +0800</pubDate><description><![CDATA[Description
The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P   A   H   N
A...]]></description><category></category></item><item><title><![CDATA[LeetCode5 - Longest Palindromic Substring(C++)]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/105300605</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/105300605</guid><author>Bubbler_726</author><pubDate>Fri, 03 Apr 2020 20:41:47 +0800</pubDate><description><![CDATA[Description:
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example 1:
Input: “babad”
Output: “bab”
Note: “aba” is also a valid ans...]]></description><category></category></item><item><title><![CDATA[C++内联函数inline]]></title><link>https://blog.youkuaiyun.com/Bubbler_726/article/details/104728571</link><guid>https://blog.youkuaiyun.com/Bubbler_726/article/details/104728571</guid><author>Bubbler_726</author><pubDate>Sun, 08 Mar 2020 10:47:33 +0800</pubDate><description><![CDATA[内联函数
定义与使用
常规函数的调用过程
&nbsp;&nbsp;编译过程的最终产品是可执行程序–由一组机器语言指令组成。运行程序时，操作系统将这些指令载入到计算机内存中，因此每一条指令都有特定的内存地址。有时，比如说遇到循环或者判断语句，会跳过一些指令，向前或向后跳到特定的地址。常规函数调用也使得程序跳转到下一个地址–函数的地址，并在函数结束时返回。
&nbsp;&nbsp;更具体的过程是执行到...]]></description><category></category></item></channel></rss>