CPRIMERPLUS 6 P372 第十三题

13.编写一个程序, 反序显示命令行参数的单词。 例如, 命令行参数是see you later, 该程序应打印later you see #include<stdio.h> #include<string.h> #include<ctype.h> void st(char**,int); int main(int argc,char *argv[]) { //printf("%d\n",argc); for(int i=1;i<argc;i++) { puts(argv[i]); } st(argv,argc); ret...
hbccc 发布于 2020-12-13 21:51 | 阅读 1225 次 | 评论 0 条

ssh免密登陆ubuntu16.04失效的一次排查过程

cd /var/log tail -f auth.log 新开一个终端尝试免密登陆,上面的命令输出最新日志: ov 28 21:53:49 bccnsoft sshd[24812]: Authentication refused: bad ownership or modes for directory /root Nov 28 21:53:49 bccnsoft sshd[24812]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth] ...
静夜思 发布于 2020-11-28 22:12 | 阅读 2923 次 | 评论 0 条

推荐一个sql server数据库结构对比工具

https://github.com/OpenDBDiff/OpenDBDiff
静夜思 发布于 2020-11-28 18:16 | 阅读 2743 次 | 评论 0 条

SQL SERVER与C#的数据类型对应表

序号 类别 SQLServer C Sharp 备注 1 整数 bit ...
静夜思 发布于 2020-11-26 18:35 | 阅读 1625 次 | 评论 0 条

在linux上部署.NET

先转载,后面再总结:https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0
静夜思 发布于 2020-11-25 18:25 | 阅读 1578 次 | 评论 2 条

C PRIMER PLUS 6 P276 第七题

#include <stdio.h> #include <string.h> #include <ctype.h> int letter(char); int main() { char ch; int i; while((ch=getchar())!=EOF) { if(i%10==0)printf("\n"); printf("%c=%d\t",ch,letter(ch)); i++; } return 0; } int letter(char ch) { int a; a=isalpha(c...
hbccc 发布于 2020-11-24 21:56 | 阅读 1230 次 | 评论 0 条

C PRIMER PLUS 6 P276 第六题

#include <stdio.h> #include <string.h> void large(double*,double*,double*); int main() { double first,second,third; printf("input first:"); scanf("%lf",&amp;first); printf("input second:"); scanf("%lf",&amp;second); printf("input third:"); scanf("%lf",&amp;third);...
hbccc 发布于 2020-11-24 21:39 | 阅读 1287 次 | 评论 0 条

小练笔

编写程序,计算使用某快递公司运输货物的运费(用if语句)。 要求: 1)显示目的城市列表,通过输入需要选择城市。 2)输入货物重量 3)根据运费价格表来计算运费,其中首重费用为1kg以内的费用,超过1kg的部分每公斤使用续重费用计算。 4)1kg内的总运费=首重费用 大于1kg的总运费=首重费用+(重量-1)*续重 城市 费用 广东 首重8元,续重2元 上海 首重9元,续重7元 北京 首重12元,续重10元 东三省 首重15元,续重13元 #include <stdio.h> #include <string.h> ...
hbccc 发布于 2020-11-23 19:54 | 阅读 1603 次 | 评论 0 条

C PRIAMER PLAS 第六版 P276 第三题

#include <stdio.h> void small(char,int,int); int main(void) { int x,y; char ch; printf("zifu:"); ch=getchar(); printf("lie:"); scanf("%d",&amp;y); printf("lines:"); scanf("%d",&amp;x); small(ch,x,y); return 0; } void small...
hbccc 发布于 2020-11-22 21:50 | 阅读 1188 次 | 评论 0 条

CPRIMERPLUS6 P242 第4题

#include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { int ch=0; int up=0,a=0,b=0; int count=0,let=0; double pj; while((ch=getchar())!=EOF) { a=isalpha(up); if(a)a=1; b=isalpha(ch); if(b){b=1;let++;} if(a==0&amp;&amp;b==1)count++; up=ch; } ...
hbccc 发布于 2020-11-21 11:56 | 阅读 1244 次 | 评论 0 条

CPRIMERPLUS6 P216 第11题

#include <stdio.h> #define pyj 2.05 /* 洋蓟:2.05美元/磅 */ #define ptc 1.15 /* 甜菜:1.15美元/磅 */ #define phlb 1.09 /*胡萝卜:1.09美元/磅 */ #define b100d 100 /*100美元订单有5%的优惠*/ #define yhu 0.05 /*100美元订单有5%的优惠*/ #define b5b 5 /*5磅以内收取6.5美元的运费和包装费*/ #define yubf0 6.5 /*5磅以内收取...
hbccc 发布于 2020-11-19 21:51 | 阅读 1655 次 | 评论 0 条

CPRIMERPLUS6 P215 第10题

#include <stdio.h> //#include <string.h> #define sin 17850 #define huz 23900 #define yig 29750 #define yil 14875 #define ftax 0.15 #define stax 0.28 void menu(void); void star(int i); double single(int doll,int base); double huzhu(int doll); int main(void) { char c...
hbccc 发布于 2020-11-18 21:57 | 阅读 1251 次 | 评论 0 条

CPRIMERPLUS6 P215 第九题

#include <stdio.h> bool sushu(int num); int main(void) { int num; printf("input:"); scanf("%d",&amp;num); if(num<=0)printf("sorry"); for(int i=3;i<=num;i++) { if(sushu(i)==1) printf("%d\t",i); } return 0; } bool sushu(int num) { bool judge=true; for(int i=2;i<num...
hbccc 发布于 2020-11-18 20:56 | 阅读 1111 次 | 评论 0 条

bool .c .cpp

今天发现一个小秘密: 写代码时使用了bool类型,奇怪的是,编译报错,前两天我在另一台电脑都使用正常啊,为什么呢,经过一番上网搜索,终于发现,在DEV C++里,如果源程序扩展名是 .c 则编译报错,如果扩展名是 .cpp,则编译通过,理由是,.c,编译器则按C语言编译,而C语言没有bool类型。.cpp 编译器则按C++语言编译,C++有 bool 类型。
hbccc 发布于 2020-11-16 17:27 | 阅读 1551 次 | 评论 5 条

C primer plus P175 第五题 金字塔

#include <stdio.h> int main(void) { char ch; bool boo; do { boo=true; printf("Input:"); scanf("%c",&amp;ch); if(ch=15) scanf("%c",&amp;ch); if(ch<'A' or ch>'Z') { printf("error! re-input please\n"); boo=false; } }while(!bo...
hbccc 发布于 2020-11-15 15:07 | 阅读 1211 次 | 评论 0 条

华氏摄氏开氏 C primer plus 第五章第九题

#include <stdio.h> #define shehua 5.0/9.0 void temperatrues(double ccc); const int a=32; int main(void) { double hua; printf("input hua:"); while(scanf("%lf",&amp;hua)) { temperatrues(hua); printf("input hua:"); } printf("finish"); return 0; } void temperatrues(do...
hbccc 发布于 2020-11-14 15:28 | 阅读 1194 次 | 评论 0 条

头文件h

#include <stdio.h> //printf(); //scanf() 如果是1个参数,成功读取,返回1,如果是两个参数,成功读取,返回2,如果读取不成功,返回0; //gets() 读取字符串,并且舍弃换行。常于puts()配对使用。 //puts(地址) 只显示字符串,而且自动在显示的字符串末尾加上换行符。 //fgets(目标字符串数组,大小,设备) 读取字符串,末尾加上换行符,可以从不同设备读取,如键盘(stdin)、文件等,该函数只读取 大小-1 个字符 //fputs(要输出的字符串数组,设备) 显示字符串...
hbccc 发布于 2020-11-14 11:48 | 阅读 1496 次 | 评论 2 条

mybatis 分页plugs

@Data public class User{ private String name; private String sax; private Integer state; } 一、包米豆 官网地址:https://baomidou.com/ 1.1 代码自动生成工具 待补充…… 1.2 分页 1.2.1 dao @Mapper public interface UserRepository extends BaseMapper<U...
mooncharmzx 发布于 2020-11-02 17:10 | 阅读 1596 次 | 评论 0 条

spring boot ftp 生成二维码、上传附件以及回显

环境: centos、jdk1.8、vsftpd、nginx、spring boot、docker ftp上传附件,上传的附件有两种方式回显,在下面再详细说明 此处省略ftp服务器、docker服务器nginx服务器搭建过程。 上传首先在application.yml文件中添加ftp配置 ftp: # 内网 000.000.000.000 外网 111.111.111.111 # ip: 111.111.111.111 ip: 000.000.000.000 name: ftp_user pass...
mooncharmzx 发布于 2020-10-30 11:29 | 阅读 1851 次 | 评论 0 条

windows版 the_silver_searcher(ag.exe)下载

64位: 32位: 官方下载地址: https://github.com/k-takata/the_silver_searcher-win32/releases git bash下的使用方法: 直接解压,把ag.exe拷贝到/usr/bin目录下即可
静夜思 发布于 2020-10-30 10:50 | 阅读 2523 次 | 评论 0 条