<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Gabinn的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/Gabinn</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; Gabinn]]></copyright><item><title><![CDATA[MySQL插入数据、更新和删除数据、创建和操纵表]]></title><link>https://blog.csdn.net/Gabinn/article/details/113250370</link><guid>https://blog.csdn.net/Gabinn/article/details/113250370</guid><author>Gabinn</author><pubDate>Thu, 04 Feb 2021 15:42:26 +0800</pubDate><description><![CDATA[MySQL插入数据、更新和删除数据、创建和操纵表
插入数据：

插入数据：insert into customers values(null, 'Pep E. LaPew', '100 Main Street', 'Los Angeles', 'CA', '90046', 'USA', NULL, NULL);
更安全的方法插入数据：insert into customers (cust_name, cust_address, cust_city, cust_state, cust_zip, cust_co]]></description><category></category></item><item><title><![CDATA[MySQL组合查询，全文本搜索]]></title><link>https://blog.csdn.net/Gabinn/article/details/113247200</link><guid>https://blog.csdn.net/Gabinn/article/details/113247200</guid><author>Gabinn</author><pubDate>Wed, 27 Jan 2021 15:28:34 +0800</pubDate><description><![CDATA[MySQL组合查询，全文本搜索

使用UNION进行组合查询：举一个例子，假如需要价格小于等于5的所有物品的一个列表，而且还想包括供应商1001和1002生产的所有物品(不考虑价格)。当然，可以利用WHERE子句来完成此工作，不过这次我们将使用UNION。如果用where语句，则为：select vend_id, prod_id, prod_price from products where prod_price &lt;=5 or vend_id in (1001, 1002);     用UNION则为]]></description><category></category></item><item><title><![CDATA[MySQL子查询，联结表]]></title><link>https://blog.csdn.net/Gabinn/article/details/113182159</link><guid>https://blog.csdn.net/Gabinn/article/details/113182159</guid><author>Gabinn</author><pubDate>Tue, 26 Jan 2021 17:23:22 +0800</pubDate><description><![CDATA[MySQL子查询，联结表
子查询：

select cust_id from orders where order_num in (select order_num from orderitems where prod_id = 'TNT2');
对每个客户执行COUNT()计算，应该将COUNT()作为一个子查询：select cust_name, cust_state, (select count(*) from orders where orders.cust_id = customers.cust_]]></description><category></category></item><item><title><![CDATA[MySQL使用函数处理数据以及分组数据]]></title><link>https://blog.csdn.net/Gabinn/article/details/113179958</link><guid>https://blog.csdn.net/Gabinn/article/details/113179958</guid><author>Gabinn</author><pubDate>Tue, 26 Jan 2021 15:48:16 +0800</pubDate><description><![CDATA[MySQL使用函数处理数据以及分组数据

在MySQL的SELECT语句中，可使用Concat()函数来拼接两个列：select concat(vend_name, ' (', vend_country, ')') from vendors order by vend_name;
删除数据右侧多余的空格可以用RTrim()函数来完成：select concat(RTrim(vend_name), ' (', RTrim(vend_country), ')') from vendors order by ve]]></description><category></category></item><item><title><![CDATA[MySQL正则表达式]]></title><link>https://blog.csdn.net/Gabinn/article/details/113055317</link><guid>https://blog.csdn.net/Gabinn/article/details/113055317</guid><author>Gabinn</author><pubDate>Sat, 23 Jan 2021 17:06:13 +0800</pubDate><description><![CDATA[MySQL正则表达式

检索列prod_name包含文本1000的所有行：select prod_name from products where prod_name regexp ‘1000’ order by prod_name;
用点（.）表示匹配任意一个字符：select prod_name from products where prod_name regexp ‘.000’ order by prod_name;
进行or匹配：select prod_name from products whe]]></description><category></category></item><item><title><![CDATA[MySQL中Where子句操作符，组合以及通配符]]></title><link>https://blog.csdn.net/Gabinn/article/details/113050628</link><guid>https://blog.csdn.net/Gabinn/article/details/113050628</guid><author>Gabinn</author><pubDate>Sat, 23 Jan 2021 15:59:46 +0800</pubDate><description><![CDATA[MySQL中Where子句操作符，组合以及通配符




操作符
说明




=
等于


&lt;&gt;
不等于


!=
不等于


&lt;
小于


&lt;=
小于等于


&gt;
大于


&gt;=
大于等于


BETWEEN
在指定的两个值之间


Where子句操作符：

只返回prod_price列中值为2.50的行：select prod_name, prod_price from products where prod_price = 2.50;
检查单个值：select p]]></description><category></category></item><item><title><![CDATA[MySQL基础语法]]></title><link>https://blog.csdn.net/Gabinn/article/details/113046993</link><guid>https://blog.csdn.net/Gabinn/article/details/113046993</guid><author>Gabinn</author><pubDate>Sat, 23 Jan 2021 15:11:38 +0800</pubDate><description><![CDATA[MySQL 基础语法

显示某个表的列：show columns from customers;
从products表中检索三个名为prod_id, prod_name, prod_price的列：select prod_id, prod_name, prod_price from products;
检索所有的列：select * from products;
从products表中检索列vend_id的不同值：select distinct vend_id from products;
限制返回的行数：]]></description><category></category></item><item><title><![CDATA[数据库MySQL的一些基础知识（MySQL必知必会）]]></title><link>https://blog.csdn.net/Gabinn/article/details/112356113</link><guid>https://blog.csdn.net/Gabinn/article/details/112356113</guid><author>Gabinn</author><pubDate>Fri, 08 Jan 2021 13:53:46 +0800</pubDate><description><![CDATA[数据库MySQL的一些基础知识（MySQL必知必会）
记录下在Mac OS环境下使用MySQL的一些基础知识：

MySQL是一个数据库管理系统，Database Management System（DBMS），即它是一种数据库软件
该软件可以从oracle官网下载安装，具体步骤可以看这篇文章Mac下MySQL安装步骤；同时也可以下载相应的工作台workbench来进行操作（我没有下载，而是使用终端命令行来操作）
下载完成后，在终端输入 /usr/local/mysql/bin/mysql -uroot -]]></description><category></category></item><item><title><![CDATA[递归问题：汉诺塔]]></title><link>https://blog.csdn.net/Gabinn/article/details/112245438</link><guid>https://blog.csdn.net/Gabinn/article/details/112245438</guid><author>Gabinn</author><pubDate>Wed, 06 Jan 2021 14:23:43 +0800</pubDate><description><![CDATA[汉诺塔问题（C语言）
题目要求：汉诺塔问题是个典型的函数递归问题
古代有一个梵塔，塔内有3个座A，B，C。开始时A上有64个盘子，盘子大小不等，大的在下，小的在上（如图所示）。有一个老和尚想把这64个盘子从A移动到C，但规定每次只允许移动一个盘，且移动过程中在3个座上都始终保持大盘在下，小盘在上。在移动过程中可以利用B座，要求编程输出移动盘子的步骤。

思路：

总共需要移动大概2ˆ64次盘子，一般人是不可能直接确定每一个具体步骤的
但可以这样简单想：假如有另一个和尚能有办法把上面的63个盘子从一个座移动到]]></description><category></category></item><item><title><![CDATA[输入一个字符串，输出单词的个数]]></title><link>https://blog.csdn.net/Gabinn/article/details/112243938</link><guid>https://blog.csdn.net/Gabinn/article/details/112243938</guid><author>Gabinn</author><pubDate>Wed, 06 Jan 2021 14:23:23 +0800</pubDate><description><![CDATA[输入一个字符串，输出单词的个数（C语言）
题目要求：如标题
以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
	char string[81];
	gets(string);
	int num=0,word=0,i;
	char c;
	for(i=0;(c=string[i])!='\0';i++)
		if(c==' ')
			word=0;    //当c为空格时候，word置0；
		else if(c!=' ' &amp;&amp; word==0)
]]></description><category></category></item><item><title><![CDATA[编写一个程序，比较两个字符串s1和s2]]></title><link>https://blog.csdn.net/Gabinn/article/details/112243178</link><guid>https://blog.csdn.net/Gabinn/article/details/112243178</guid><author>Gabinn</author><pubDate>Wed, 06 Jan 2021 14:23:07 +0800</pubDate><description><![CDATA[编写一个程序，比较两个字符串s1和s2（C语言）
题目要求：编写一个程序，比较两个字符串s1和s2。若s1&gt;s2，输出一个正数；若s1=s2,输出0；若s1&lt;s2，输出一个负数。不要用strcpy函数
以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
    char str1[20];
    char str2[20];
    gets(str1);
    gets(str2);
    int i;
    for(i=0;i&lt;=19;]]></description><category></category></item><item><title><![CDATA[有一行电文，按以下规律译成密码]]></title><link>https://blog.csdn.net/Gabinn/article/details/112242965</link><guid>https://blog.csdn.net/Gabinn/article/details/112242965</guid><author>Gabinn</author><pubDate>Wed, 06 Jan 2021 14:22:47 +0800</pubDate><description><![CDATA[有一行电文，按以下规律译成密码（C语言）
题目要求：有一行电文，按以下规律译成密码：即第1个字母变成第26个字母，第i个字母变成第（26-i+1）个字母，非字母字符不变。要求编程序将密码译回原文，并输出密码和原文
以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
    char str[20];
    gets(str);
    printf("Key: ");
    puts(str);
    int i;
    for(i=0;i&lt;=20;i]]></description><category></category></item><item><title><![CDATA[用折半法找出该数是数组中的第几个元素]]></title><link>https://blog.csdn.net/Gabinn/article/details/112242706</link><guid>https://blog.csdn.net/Gabinn/article/details/112242706</guid><author>Gabinn</author><pubDate>Wed, 06 Jan 2021 14:22:20 +0800</pubDate><description><![CDATA[用折半法找出该数是数组中的第几个元素（C语言）
题目要求：有15个数按由小到大顺序存放在一个数组中，输入一个数，要求用折半法找出该数是数组中的第几个元素。如果该数不在数组中，则输出“无此数”。
以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
    int array[15]={1,11,22,33,44,55,66,77,88,99,111,222,333,444,555};
    printf("Please enter a number: ");
   ]]></description><category></category></item><item><title><![CDATA[找出一个二维数组中的鞍点]]></title><link>https://blog.csdn.net/Gabinn/article/details/112241596</link><guid>https://blog.csdn.net/Gabinn/article/details/112241596</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 16:27:15 +0800</pubDate><description><![CDATA[找出一个二维数组中的鞍点（C语言）
题目要求：如标题，鞍点即该位置上的元素在该行上最大、该列上最小，也可能没有鞍点
思路：

先找出每行中的最大值，并且确定其位置
然后判断该位置的值是否为该列中最小：如果找到比它小的值，则break跳出循环。若始终没break跳出循环，则说明没找到，那么这个数就是鞍点；如果有break跳出循环，那么这个数就不是鞍点

以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
    int m,n;
    printf("Please ]]></description><category></category></item><item><title><![CDATA[输出“魔方阵”]]></title><link>https://blog.csdn.net/Gabinn/article/details/112232115</link><guid>https://blog.csdn.net/Gabinn/article/details/112232115</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 14:40:35 +0800</pubDate><description><![CDATA[输出“魔方阵”（C语言）
题目要求：所谓魔方阵是指这样的方阵，它的每一行，每一列和对角线之和均相等
例如，三阶魔方阵为
8 1 6
3 5 7
4 9 2
思路：

把1放在第一行中间
对于以后的数（即2～n*n），一般情况是行数i=i-1，列数j=j+1
如果一个数在第1行，则下一个数在第n行（列数照常）；如果一个数第n列，下一个数第1列（行数照常）
如果上一个数是第1行第n列，则把下一个数放在上一个数的下面
如果按上面的规则确定的位置上已有数，则也把下一个数放在上一个数的下面（这种情况下，需要把行数j=]]></description><category></category></item><item><title><![CDATA[输出杨辉三角形]]></title><link>https://blog.csdn.net/Gabinn/article/details/112231483</link><guid>https://blog.csdn.net/Gabinn/article/details/112231483</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 14:11:12 +0800</pubDate><description><![CDATA[输出以下杨辉三角形（要求输出10行）（C语言）
题目要求：如标题
1
1   1
1   2   1
1   3   3   1
1   4   6   4   1
1   5  10 10  5   1
…
思路：

在此三角形中，一个数等于它上面的和左上角的数之和

以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
    int array[10][10];
    int i,j;
    for(i=0;i&lt;=9;i++)
    {
      ]]></description><category></category></item><item><title><![CDATA[有一个已排好序的数组，要求输入一个数后，按原来排序的规律将它插入数组中]]></title><link>https://blog.csdn.net/Gabinn/article/details/112230685</link><guid>https://blog.csdn.net/Gabinn/article/details/112230685</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 14:02:24 +0800</pubDate><description><![CDATA[有一个已排好序的数组，要求输入一个数后，按原来排序的规律将它插入数组中（C语言）
题目要求：如标题
思路：

如果一个数列由小到大排列，则对数列进行反向遍历。当遇到输入的数x大于a[i]时，就跳出循环
然后将i后面的数都往后移一位，此时i+1的位置就空出来了，可以把这个x放入这个位置

以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
	int a[11]={11,22,33,44,55,66,77,88,99,111};
	int x,i,j;
	printf(]]></description><category></category></item><item><title><![CDATA[用选择法对10个整数排序]]></title><link>https://blog.csdn.net/Gabinn/article/details/112229127</link><guid>https://blog.csdn.net/Gabinn/article/details/112229127</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 13:39:51 +0800</pubDate><description><![CDATA[用选择法对10个整数排序（C语言）
题目要求：如标题
思路：

首先令i从0～8遍历，设置最小数的下标min=i
然后对于i后面的数进行j遍历，如果a[min]&gt;a[j]，则令min=j
如果min!=i，则把a[min]和a[i]互换
最终打印出10个数字即可

以下为具体代码：
#include &lt;stdio.h&gt;
int main()
{
	int a[10];
	int i,j,t,min;
	printf("Input 10 numbers: ");
	for(i=0;i&lt;]]></description><category></category></item><item><title><![CDATA[用筛选法求100以内的素数]]></title><link>https://blog.csdn.net/Gabinn/article/details/112227697</link><guid>https://blog.csdn.net/Gabinn/article/details/112227697</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 13:24:50 +0800</pubDate><description><![CDATA[用筛选法求100以内的素数（C语言）
题目要求：如标题
思路：

有一个数i，遍历它后面的数
如果这些数字能被它整除，则这些数不是素数，把它们的值赋为0
如此循环遍历，最后只需要把不是0的数输出即可，这些数就是素数

以下为具体代码：
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;
int main()
{
	int i,j;
	int a[100];
	for(i=0;i&lt;=99;i++)
		a[i]=i+1;
	a[0]=0;
	
	for(i=]]></description><category></category></item><item><title><![CDATA[用二分法求下面方程（-10，10）的根]]></title><link>https://blog.csdn.net/Gabinn/article/details/112225321</link><guid>https://blog.csdn.net/Gabinn/article/details/112225321</guid><author>Gabinn</author><pubDate>Tue, 05 Jan 2021 12:45:43 +0800</pubDate><description><![CDATA[用二分法求下面方程（-10，10）的根（C语言）
题目要求：如标题，方程为：2xˆ3-4xˆ2+3x-6=0
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;
int main()
{
	double x,fx,fa,fb,a=-10,b=10;
	fa=2*a*a*a-4*a*a+3*a-6;
	fb=2*b*b*b-4*b*b+3*b-6;
	if(fa*fb&lt;0)
	{
		while(fabs(fa-fb)&gt;0.0001)
		{
			x]]></description><category></category></item></channel></rss>