<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[soeben的博客]]></title><description><![CDATA[Soeben]]></description><link>https://blog.youkuaiyun.com/soeben</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; soeben]]></copyright><item><title><![CDATA[Lua脚本连接Redis]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/116214612</link><guid>https://blog.youkuaiyun.com/soeben/article/details/116214612</guid><author>soeben</author><pubDate>Wed, 28 Apr 2021 01:10:20 +0800</pubDate><description><![CDATA[1.安装 lua-socket
#选择下面一种安装方式即可
#yum安装
yum install lua-socket
#编译安装
curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz  #需要与lua版本一致
tar -zvf lua-5.3.4.tar.gz
git clone https://github.com/diegonehab/luasocket.git 
cd luasocket
make LUAINC=~/lua/luasocket/lua-]]></description><category></category></item><item><title><![CDATA[Debian 设置清华源]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/116214589</link><guid>https://blog.youkuaiyun.com/soeben/article/details/116214589</guid><author>soeben</author><pubDate>Wed, 28 Apr 2021 01:08:36 +0800</pubDate><description><![CDATA[sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list


]]></description><category></category></item><item><title><![CDATA[使用 Dockerfile 构建支持pdo&kafka的phpfpm]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/116214524</link><guid>https://blog.youkuaiyun.com/soeben/article/details/116214524</guid><author>soeben</author><pubDate>Wed, 28 Apr 2021 01:07:06 +0800</pubDate><description><![CDATA[FROM php:fpm  #选择基础镜像
RUN sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list  #设置清华源
RUN apt-get clean &amp;&amp; apt-get update -y  #更新源
RUN docker-php-ext-install pdo &amp;&amp; docker-php-ext-install pdo_mysql  #安装pdo支持
RUN apt instal]]></description><category></category></item><item><title><![CDATA[tar 压缩/解压]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/95387675</link><guid>https://blog.youkuaiyun.com/soeben/article/details/95387675</guid><author>soeben</author><pubDate>Wed, 10 Jul 2019 22:09:35 +0800</pubDate><description><![CDATA[压缩目录/文件到指定路径&amp;解压到指定路径

压缩目录/home/dir到/home/file.tar.gz
tar -zcvf /home/file.tar.gz /home/dir
压缩文件/home/file.txt到/home/file.tar.gz
tar -zcvf /home/file.tar.gz /home/file.txt
解压/home/file.tar.gz到/hom...]]></description><category></category></item><item><title><![CDATA[C++ 类实现栈]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/85057084</link><guid>https://blog.youkuaiyun.com/soeben/article/details/85057084</guid><author>soeben</author><pubDate>Mon, 17 Dec 2018 21:35:01 +0800</pubDate><description><![CDATA[#include &amp;lt;iostream&amp;gt;
using namespace std;
class Stack{
private:
    int* data_;//存放栈中的数据
    int max_size_;//栈最大空间
    int top_;//栈顶
    //初始化栈
    void initStack() {
        data_ = new int(max_...]]></description><category></category></item><item><title><![CDATA[PHP Iterator 迭代器]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/84958147</link><guid>https://blog.youkuaiyun.com/soeben/article/details/84958147</guid><author>soeben</author><pubDate>Tue, 11 Dec 2018 17:05:55 +0800</pubDate><description><![CDATA[构建一个可被forwach遍历的迭代器
class TestIterator implements Iterator {
    private $items;
    function __construct($items) {
    	$this-&amp;gt;items = $items;
    }
    // 返回当前元素
    public function current() {
 ...]]></description><category></category></item><item><title><![CDATA[MySQL ORDER BY 排序]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83186836</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83186836</guid><author>soeben</author><pubDate>Fri, 19 Oct 2018 19:14:04 +0800</pubDate><description><![CDATA[语法
SELECT * FROM table ORDER BY field1 [ASC|DESC], field2 [ASC|DESC];

ASC升序 DESC降序
例子
//结构
CREATE TABLE `user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL,
  `se...]]></description><category></category></item><item><title><![CDATA[MySQL UNION 联合查询]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83186830</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83186830</guid><author>soeben</author><pubDate>Fri, 19 Oct 2018 19:13:22 +0800</pubDate><description><![CDATA[语法
SELECT * FROM table
UNION [ALL | DISTINCT]
SELECT * FROM table

ALL全部数据 DISTINCT去重数据
例子
//结构
CREATE TABLE `user_student`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT...]]></description><category></category></item><item><title><![CDATA[MySQL DELETE 删除数据]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83181050</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83181050</guid><author>soeben</author><pubDate>Fri, 19 Oct 2018 13:22:42 +0800</pubDate><description><![CDATA[语法
DELETE FROM table_name [WHERE Clause]

例子
//结构
CREATE TABLE `user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL,
  `sex` tinyint(4) NOT NULL,
  `tel` char(11) N...]]></description><category></category></item><item><title><![CDATA[MySQL WHERE 筛选数据]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83153721</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83153721</guid><author>soeben</author><pubDate>Thu, 18 Oct 2018 21:52:16 +0800</pubDate><description><![CDATA[语法
SELECT
	field1,
	field2
FROM
	table_name
WHERE
	field1 = value1 AND field2 = value2

运算符支持 =、!=、&amp;amp;amp;amp;amp;amp;gt;、&amp;amp;amp;amp;amp;amp;lt;、&amp;amp;amp;amp;amp;amp;gt;=、&amp;amp;amp;amp;amp;amp;lt;=、&amp;amp;amp;amp;amp;amp;lt;=&amp;amp;a]]></description><category></category></item><item><title><![CDATA[MySQL SELECT 查询数据]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83153051</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83153051</guid><author>soeben</author><pubDate>Thu, 18 Oct 2018 21:07:03 +0800</pubDate><description><![CDATA[语法
SELECT
	field1,
	field2
FROM
	table_name;

例子
//结构
CREATE TABLE `user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL,
  `sex` tinyint(4) NOT NULL,
  `tel` char(1...]]></description><category></category></item><item><title><![CDATA[MySQL INSERT 插入数据]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/83152843</link><guid>https://blog.youkuaiyun.com/soeben/article/details/83152843</guid><author>soeben</author><pubDate>Thu, 18 Oct 2018 20:53:51 +0800</pubDate><description><![CDATA[#语法
INSERT INTO table_name ( field1, field2,...fieldN )VALUES ( value1, value2,...valueN );

#例子
//结构
CREATE TABLE `user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT N...]]></description><category></category></item><item><title><![CDATA[PHP中echo、print、print_r、var_dump、var_export的区别]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82959554</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82959554</guid><author>soeben</author><pubDate>Sun, 07 Oct 2018 17:17:36 +0800</pubDate><description><![CDATA[
void echo ( string $arg1 [, string $... ] )
echo 是一个语言结构，可以不用括号包围参数列表，在没有括号情况下可接收多个参数并输出

echo 'one';
//输出 one
echo('one');
//输出 one
echo 'one','two','three';
//输出 onetwothree


int print ( string $a...]]></description><category></category></item><item><title><![CDATA[C/C++输出保留n位小数]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82708410</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82708410</guid><author>soeben</author><pubDate>Fri, 14 Sep 2018 20:36:53 +0800</pubDate><description><![CDATA[c 保留两位小数

#include&amp;amp;lt;stdio.h&amp;amp;gt;
int main(){
    printf(&amp;quot;%0.2f&amp;quot;,3.1415926);
}

c++ 保留两位小数

#include&amp;amp;lt;iostream&amp;amp;gt;
#include &amp;amp;lt;iomanip&amp;amp;gt;
using namespace std;
int main(){
  ]]></description><category></category></item><item><title><![CDATA[PHP在CLI下获取输入]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82702683</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82702683</guid><author>soeben</author><pubDate>Fri, 14 Sep 2018 14:43:26 +0800</pubDate><description><![CDATA[获取参数

//使用$argc(参数数量)和$argv(参数列表)
echo &amp;amp;quot;接收到$argc个参数&amp;amp;quot;;
var_dump($argv);

获取输入

$str = fgets(STDIN);//获取一行字符(包含末尾回车符)
$str = fread(STDIN,n);//获取前n个字符
$s = fgetc(STDIN);//获取一个字符...]]></description><category></category></item><item><title><![CDATA[【京东 2019校招笔试】对比]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82562201</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82562201</guid><author>soeben</author><pubDate>Sun, 09 Sep 2018 20:57:45 +0800</pubDate><description><![CDATA[题目描述:


  现有n个物品，每个物品有三个参数 ai , bi , ci ，定义i物品不合格品的依据是 : 若存在物品 j , 且aj&amp;amp;gt;ai , bj&amp;amp;gt;bi , cj&amp;amp;gt;ci，则称i物品为不合格品。 
  现给出n个物品的a,b,c参数，请你求出不合格品的数量。




输入描述:


  第一行包含一个整数n(1&amp;amp;lt;=n&amp;amp;lt;=500000),表示物品的数量。接下来有...]]></description><category></category></item><item><title><![CDATA[【华为机试】字符逆序]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82533774</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82533774</guid><author>soeben</author><pubDate>Sat, 08 Sep 2018 21:54:03 +0800</pubDate><description><![CDATA[题目描述:


  将一个字符串str的内容颠倒过来，并输出。str的长度不超过100个字符。 如：输入“I am a student”，输出“tneduts a ma I”。




输入描述:


  输入一个字符串，可以有空格




输出描述:


  输出逆序的字符串


示例1
输入
I am a student
输出
tneduts a ma I




参考程序:



#incl...]]></description><category></category></item><item><title><![CDATA[【京东2018秋招PHP开发工程师笔试题】疯狂序列]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82467685</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82467685</guid><author>soeben</author><pubDate>Thu, 06 Sep 2018 20:33:33 +0800</pubDate><description><![CDATA[题目描述:


  东东从京京那里了解到有一个无限长的数字序列: 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, …(数字k在该序列中正好出现k次)。东东想知道这个数字序列的第n项是多少,你能帮帮他么  




输入描述:


  输入包括一个整数n(1 ≤ n ≤ 10^18)




输出描述:


  输出一个整数,即数字序列的第n项


示例1
...]]></description><category></category></item><item><title><![CDATA[Laravel session失效的一种原因]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/82430858</link><guid>https://blog.youkuaiyun.com/soeben/article/details/82430858</guid><author>soeben</author><pubDate>Wed, 05 Sep 2018 21:11:19 +0800</pubDate><description><![CDATA[session文件有某些情况下写入文件系统失败时不会报错 
请检查/storage/framework/sessions 目录是否生成了session文件 
或者在写入session之后添加session()-&amp;amp;gt;save()



session([''user_id'=&amp;amp;gt;'123']);
session()-&amp;amp;gt;save();

此时写入失败时会报错，检查session目录读写权...]]></description><category></category></item><item><title><![CDATA[【华为机试】删除字符串中出现次数最少的字符]]></title><link>https://blog.youkuaiyun.com/soeben/article/details/79660372</link><guid>https://blog.youkuaiyun.com/soeben/article/details/79660372</guid><author>soeben</author><pubDate>Thu, 22 Mar 2018 21:37:27 +0800</pubDate><description><![CDATA[题目描述:


  实现删除字符串中出现次数最少的字符，若多个字符出现次数一样，则都删除。输出删除这些单词后的字符串，字符串中其它字符保持原来的顺序。 






输入描述:


  字符串只包含小写英文字母, 不考虑非法输入，输入的字符串长度小于等于20个字节。






输出描述:


  删除字符串中出现次数最少的字符后的字符串




示例1
输入
abcdd
输出
dd






...]]></description><category></category></item></channel></rss>