<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[gent__chen的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/gent__chen</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; gent__chen]]></copyright><item><title><![CDATA[php类中使用未定义的属性说明]]></title><link>https://blog.csdn.net/gent__chen/article/details/79165212</link><guid>https://blog.csdn.net/gent__chen/article/details/79165212</guid><author>gent__chen</author><pubDate>Thu, 25 Jan 2018 18:16:52 +0800</pubDate><description><![CDATA[一般情况下，在类中要使用一个属性，最好是先申明这个属性。否则就是给自己的挖坑了。 
先来看以下一段代码，<?php
class test_class{
    public function out(){
        $this->test = 8;
        return $this->test;
    }
}
$obj = new test_class();
echo $obj->o]]></description><category></category></item><item><title><![CDATA[Ionic3项目开发——页面跳转与参数传递]]></title><link>https://blog.csdn.net/gent__chen/article/details/78690877</link><guid>https://blog.csdn.net/gent__chen/article/details/78690877</guid><author>gent__chen</author><pubDate>Fri, 01 Dec 2017 20:40:50 +0800</pubDate><description><![CDATA[ionic3在页面跳转以及参数传递上做了修改。但不了解ionic或者刚接触的新手就难以理解，即使是官方提供的教程(https://ionicframework.com/docs/api/navigation/IonicPage/)也并不详细，还有一些坑存在。这里我做一下简单的演示。在home.html页面上点击一个按钮，执行home.ts的一段函数，最后传递一个变量并显示在about.html中。按]]></description><category></category></item><item><title><![CDATA[Ionic3项目开发——发起定向HTTP请求]]></title><link>https://blog.csdn.net/gent__chen/article/details/78627174</link><guid>https://blog.csdn.net/gent__chen/article/details/78627174</guid><author>gent__chen</author><pubDate>Fri, 24 Nov 2017 18:17:57 +0800</pubDate><description><![CDATA[ionic项目在手机中，在测试环境下往局域网的某服务器发起一个请求。如果发起一个http://www.a.com/test的请求，手机端又没有对这个域名的解析。以下有两个方法可以解决。修改手机hosts文件可以修改手机的hosts文件，实现特定的域名解析。但这个方法需要获取手机的root权限。我大华为不允许我这么搞啊。修改请求头host字段大家都知道http请求头内有许多字段，其中host字段的作用]]></description><category></category></item><item><title><![CDATA[Ionic3项目开发——跨域请求]]></title><link>https://blog.csdn.net/gent__chen/article/details/78626427</link><guid>https://blog.csdn.net/gent__chen/article/details/78626427</guid><author>gent__chen</author><pubDate>Fri, 24 Nov 2017 17:05:18 +0800</pubDate><description><![CDATA[最新在学习ionic开发android app，但有时候需要发起对另一个服务器的请求，假设为www.a.com。解决跨域的方法可以从目标服务器的修改和客户端修改两个方面去解决。这里由于我的服务器自己可以修改，所以就直接修改我的服务器配置（nginx）。在nginx服务器上添加三行add_header。重启nginx即可。 
    server 
    { 
        include con]]></description><category></category></item><item><title><![CDATA[Ionic3项目开发——环境安装]]></title><link>https://blog.csdn.net/gent__chen/article/details/78575038</link><guid>https://blog.csdn.net/gent__chen/article/details/78575038</guid><author>gent__chen</author><pubDate>Sun, 19 Nov 2017 16:19:14 +0800</pubDate><description><![CDATA[想使用ionic开发一个android的app，但在国内，环境的安装并不是一个容易的事，以下是我在使用代理的情况下在ubuntu14.04环境下搭建的项目环境。配置nodejs在官网上下载最新的nodejs（8.9.1），将这个文件放置在/opt目录下解压。并设置环境变量。
设置环境变量的方法是在/etc/profile中加入环境变量的路径，并使用source /etc/profile或重启即可。]]></description><category></category></item><item><title><![CDATA[【上机笔试之十七】A的B次方]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104732</link><guid>https://blog.csdn.net/gent__chen/article/details/71104732</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:24:41 +0800</pubDate><description><![CDATA[题目要求：计算A的B次方，取结果的后三位 
思路：将次方降维，再计算结果。取结果的后三位，这就可以每次只取后三位计算。#include<iostream>
#include<math.h>
using namespace std;void main()
{
    int a;
    int b, ans = 1;
    while (scanf("%d%d", &a, &b) != EOF)]]></description><category></category></item><item><title><![CDATA[【上机笔试之十六】输出素数]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104703</link><guid>https://blog.csdn.net/gent__chen/article/details/71104703</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:20:53 +0800</pubDate><description><![CDATA[题目要求：输出所有从1到整数n之间（不包括两端）个位为1的素数。#include<iostream>
#include<math.h>
using namespace std;int judge_sushu(int num) {
    if (num <= 0)
    {
        return 0;
    }
    else
    {
        for (int i = 2;]]></description><category></category></item><item><title><![CDATA[【上机笔试之十五】判断是否是素数]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104682</link><guid>https://blog.csdn.net/gent__chen/article/details/71104682</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:18:48 +0800</pubDate><description><![CDATA[题目要求：判断一个数是否是素数。 
思路：循环从2到n开根号的数，判断是否是不是素数。#include<iostream>
#include<math.h>
using namespace std;int judge_sushu(int num) {
    if (num <= 0)
    {
        return 0;
    }
    else
    {
        for]]></description><category></category></item><item><title><![CDATA[【上机笔试之十四】最小公倍数]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104664</link><guid>https://blog.csdn.net/gent__chen/article/details/71104664</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:16:36 +0800</pubDate><description><![CDATA[计算两个数的最大公约数。
一般方法：遍历所有不大于a和b的整数，看看是否同时满足余数为0。如果其中一个为0，则最大公约数就是另外一个不为0的数。如果两个都为0，则没有最大公约数（所有数都是可以整除）。
欧几里德算法：该算法证明，a和b的最大公约数同时也是b和(a mod b)的最大公约数。所以就可以不断循环，直到a mod b 等于0时，b就是最大公约数。
#include<iostream>
us]]></description><category></category></item><item><title><![CDATA[【上机笔试之十三】最大公约数]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104636</link><guid>https://blog.csdn.net/gent__chen/article/details/71104636</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:13:45 +0800</pubDate><description><![CDATA[计算两个数的最大公约数。
一般方法：遍历所有不大于a和b的整数，看看是否同时满足余数为0。如果其中一个为0，则最大公约数就是另外一个不为0的数。如果两个都为0，则没有最大公约数（所有数都是可以整除）。
欧几里德算法：该算法证明，a和b的最大公约数同时也是b和(a mod b)的最大公约数。所以就可以不断循环，直到a mod b 等于0时，b就是最大公约数。
#include<iostream>
us]]></description><category></category></item><item><title><![CDATA[【上机笔试之十二】数位拆解-进制转换]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104615</link><guid>https://blog.csdn.net/gent__chen/article/details/71104615</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:11:27 +0800</pubDate><description><![CDATA[题目要求：设计一个特殊的乘法算法：123 * 45 = 1*4 + 1*5 + 2*4 + 2*5 + 3*4 + 3*5 = 54 
这里用到了数组的拆分，保存在数组中。#include<iostream>
using namespace std;
void main()
{
    int a, b;
    int buf_a[10], buf_b[10];
    int size_a =]]></description><category></category></item><item><title><![CDATA[【上机笔试之十一】数位拆解-特殊乘法]]></title><link>https://blog.csdn.net/gent__chen/article/details/71104594</link><guid>https://blog.csdn.net/gent__chen/article/details/71104594</guid><author>gent__chen</author><pubDate>Tue, 02 May 2017 22:08:11 +0800</pubDate><description><![CDATA[题目要求：设计一个特殊的乘法算法：123 * 45 = 1*4 + 1*5 + 2*4 + 2*5 + 3*4 + 3*5 = 54 
这里用到了数组的拆分，保存在数组中。#include<iostream>
using namespace std;
void main()
{
    int a, b;
    int buf_a[10], buf_b[10];
    int size_a =]]></description><category></category></item><item><title><![CDATA[MySQL教程之查询优化程序]]></title><link>https://blog.csdn.net/gent__chen/article/details/70569962</link><guid>https://blog.csdn.net/gent__chen/article/details/70569962</guid><author>gent__chen</author><pubDate>Mon, 24 Apr 2017 10:04:43 +0800</pubDate><description><![CDATA[MySQL查询优化程序当你调用语句时，MySQL会对它进行分析，判断出可以使用哪些优化操作来加快处理速度。例如select * from tab where false;
Mysql会检查子句，发现没有符合查询条件的行，就根本不会去搜索表。通过执行explain可以看出explain select * from tab where false;
指导意见
分析表
生成关于键值分布情况的统计数据，它们]]></description><category></category></item><item><title><![CDATA[MySQL教程之索引的使用]]></title><link>https://blog.csdn.net/gent__chen/article/details/70548420</link><guid>https://blog.csdn.net/gent__chen/article/details/70548420</guid><author>gent__chen</author><pubDate>Sun, 23 Apr 2017 21:26:55 +0800</pubDate><description><![CDATA[使用索引索引是用于加速查询中最为重要的一个环节。如果你不使用索引，那么在许多情况下，通过其他途径来提高性能的各种尝试都是在浪费时间。在使用中，应首先使用索引来最大程度地改进性能，然后再看看是否还有其他有用的技术。索引的优点
无索引的表就只是一组无序的行。如果要找到其中的某行，就需要检查表的每一行，这是一个全表扫描操作，其效率超低。
而如果给一个表的某一列加上一个索引，这个索引会将这一列排序，对于有序]]></description><category></category></item><item><title><![CDATA[使用ffmpeg提取视频中的音频和视频画面]]></title><link>https://blog.csdn.net/gent__chen/article/details/61197443</link><guid>https://blog.csdn.net/gent__chen/article/details/61197443</guid><author>gent__chen</author><pubDate>Fri, 10 Mar 2017 15:05:46 +0800</pubDate><description><![CDATA[想要提取视频中的音频信息，首选的技术是ffmpeg。网上的绝大多数ffmpeg使用教程都是： 
比如你的文件是 test.mp4
分离视频出来：ffmpeg -i test.mp4 -vcodec copy -an 视频流.avi
分离音频出来：ffmpeg -i test.mp4 -acodec copy -vn 音频流.mp3
用这样的方法，提取视频是没有问题的。但在提取音频时，我遇到了以下错误]]></description><category></category></item><item><title><![CDATA[【上机笔试之十】栈应用-扣号匹配]]></title><link>https://blog.csdn.net/gent__chen/article/details/60963534</link><guid>https://blog.csdn.net/gent__chen/article/details/60963534</guid><author>gent__chen</author><pubDate>Thu, 09 Mar 2017 17:14:07 +0800</pubDate><description><![CDATA[括号匹配问题是堆栈的一个典型应用。题目要求：对于每个一个’(‘，如果没有对应的’)’与之匹配，则对应标号下输出’$’。对于每个一个’)’，如果没有对应的’(‘与之匹配，则对应标号下输出’?’。实现代码如下：#include <iostream>
#include<stdio.h>
#include <stack>
using namespace std;
void main() {
    stac]]></description><category></category></item><item><title><![CDATA[【上机笔试之九】贪心算法-换零钱]]></title><link>https://blog.csdn.net/gent__chen/article/details/60963415</link><guid>https://blog.csdn.net/gent__chen/article/details/60963415</guid><author>gent__chen</author><pubDate>Thu, 09 Mar 2017 17:08:09 +0800</pubDate><description><![CDATA[换零钱问题也是常考的一种题型。给定一个数，将其换成最少数量的零钱。代码如下：#include <iostream>
using namespace std;
void main() {
    int change;
    int left, i;
    int arr[4] = { 10, 5, 2, 1 };
    i = 0;
    while (1) {
        left =]]></description><category></category></item><item><title><![CDATA[【上机笔试之八】二分法查找]]></title><link>https://blog.csdn.net/gent__chen/article/details/60963364</link><guid>https://blog.csdn.net/gent__chen/article/details/60963364</guid><author>gent__chen</author><pubDate>Thu, 09 Mar 2017 17:05:29 +0800</pubDate><description><![CDATA[对于查找类题目，二分法查找是最高效的方法，有时题目也规定必须使用二分法。二分法查找的前提是，数据先按一个顺序排好序。代码如下：#include <iostream>
using namespace std;
//二分法查找/折半查找
int binarySearch(int array[], int len, int key){
    int low = 0, high = len - 1, mi]]></description><category></category></item><item><title><![CDATA[【上机笔试之七】Hash应用（2）-从大到小顺序输出其中前m大的数]]></title><link>https://blog.csdn.net/gent__chen/article/details/60963321</link><guid>https://blog.csdn.net/gent__chen/article/details/60963321</guid><author>gent__chen</author><pubDate>Thu, 09 Mar 2017 17:03:02 +0800</pubDate><description><![CDATA[题目要求：给定n个整数，按从大到小的顺序输出其中前m大的数。对于这类题目，一般人的第一想法都是，按排序，再取前m个数。但这时需要考虑题目所给定的时间限制和内存限制。最高效的方法还是使用hash，以数为数据的下标，就可以统计每个分数的数量，下标从小到大排列，如果不为0则输出，直到输出完毕。代码如下：#include <iostream>
#include <stdlib.h>
using namesp]]></description><category></category></item><item><title><![CDATA[【上机笔试之六】Hash应用]]></title><link>https://blog.csdn.net/gent__chen/article/details/60963223</link><guid>https://blog.csdn.net/gent__chen/article/details/60963223</guid><author>gent__chen</author><pubDate>Thu, 09 Mar 2017 16:57:31 +0800</pubDate><description><![CDATA[将存储位置与数据本身对应起来的存储手段就是Hash。例如上一节的【上机笔试之五】计算两个日期的差值，将一个日期对应的预处理存储在一个以该日期的年月日为下标的三位数组中。该题的目的是在读入N名学生的成绩，将获得某一给定分数的学生人数输出。这里的处理方法是：以分数为数据的下标，就可以统计每个分数的数量，每一个数组的值就是所对应的人数。代码如下：#include <iostream>
using name]]></description><category></category></item></channel></rss>