自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (1)
  • 收藏
  • 关注

原创 数据库安全管理

创建角色&赋予权限创建角色create role "R_Customer" withloginnosuperusernocreatedbnocreateroleinheritnoreplicationconnection limit -1;赋予权限grant select,insert,update,delete on 地区表 to "R_Seller";创建用户&将角色赋予用户创建用户create user "U_Customer" withlogin

2020-06-28 12:29:18 156

原创 数据库触发器编程

创建触发器编写functioncreate or replace function Tri_InsertSale ()returns trigger as $$declare a int; b int; c int;beginselect into a 库存量 from 库存;c:=a-new.销售数量;update 库存 set 库存量=cwhere 商店编号=new.商店编号 and 图书ISBN=new.图书ISBN;return new;end;$$ langua

2020-06-24 10:15:51 395

原创 数据库存储过程编程

改内容学习自https://blog.csdn.net/neweastsun/article/details/90316547返回表类型return query 方式create function test8()returns table( 销售金额 money, 销售数量 numeric)as $$beginreturn query select销售.销售金额,销售.销售数量from 销售;end;$$language 'plpgsql';select * from te

2020-06-22 09:04:07 308

原创 conflicting types forXXX问题解决

错误原因有两种:后面使用的函数在之前没有声明变量的类型不对例如: pid_t p1; char* p1="Child process 1 is sending a message!\n";

2020-06-12 17:08:02 2404

原创 子进程与父进程之间利用管道(pipe)进行通信

问题两个子进程分别将内容输入到管道中,父进程从中读出内容然后输出代码#include <unistd.h>#include <string.h>#include <stdlib.h>#include <stdio.h>#include <sys/wait.h>#include <strings.h>int main(void){ pid_t p1,p2; char buf[1024]; int fd[2],a1

2020-06-12 17:03:25 4514 1

原创 利用fork函数在一个进程中创建多个子进程

代码#include <stdio.h>#include <unistd.h>#include <sys/types.h>int main(void){ printf("before fork(),pid=%d\n",getpid()); //这里创建第一个进程 pid_t p1=fork(); //如果是父进程,则会跳过这个if语句继续进行下面的语句 //如果是子进程,则会进入这个if语句 if(p1==0){ //子进程执行if语句内容 p

2020-06-12 16:01:01 1544

原创 进程通信之生产者消费者问题

题目有四个生产者(producer)和三个消费者(customer),生产者从文件中读取内容,然后存放到缓存区中,消费者从缓存区中获取内容代码#include <stdio.h>#include <pthread.h>#include <stdlib.h>//作为缓冲区char buffer[10];void producer(int name);void customer(int name);//线程锁//full:customer使用,使同时只

2020-06-11 23:44:39 525

原创 C语言将int类型的值转变为char类型相同的值

例如将int类型的0转变为char类型的0int a;char b;a=0;//此时b就是char类型的0b=(char)(0+48);及利用ascii码中数字对应的值来进行运算后转换得到

2020-06-09 11:22:52 2721 1

原创 Linux系统中用C语言实现哲学家问题:涉及多线程、线程

问题叙述:五个哲学家坐在一个圆桌上,座子上有五根筷子。每两个哲学家之间有一根筷子。哲学家思考一段时间后就餐,每次准备就餐时,如果左右两边筷子都在则就餐,否则继续思考一段时间。代码实现#include <stdio.h>#include <pthread.h>#include <stdlib.h>//思考函数void think(int num);//开始就餐函数int start(int num);//结束就餐函数void end(int num)

2020-06-05 17:08:25 834

原创 Linux 环境下使用gcc运行C语言文件报错:file not recognized: File format not recognized

原因该文件不是C语言文件,无法进行编译解决方法将文件名后加上.c就可以解决例如:filename改为filename.c

2020-06-05 16:09:39 3958 2

ssm配置下resources需要的配置文件.zip

该压缩文件为SpringBoot学习课程中第六讲ssm和maven中resources需要的配置文件,可以下载后解压复制到文件下使用,希望可以帮助到更多想要学习SpringBoot相关知识的人

2020-03-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除