IT零碎知识
yzX845
这个作者很懒,什么都没留下…
展开
-
[C/C++]小技巧随笔
计算数组长度 原理是先计算数组占用内存的总字节数,去除以一个元素所需要的长度,便可以得到实际数组长度。 int num[] = { 0,1,2,3,4,5,6,7,8,9,10 }; int len = sizeof(num) / sizeof(num[0]);原创 2020-07-03 17:01:39 · 117 阅读 · 0 评论 -
[C/C++]疑似底层出现的问题
代码片段 #include<bits/stdc++.h> using namespace std; int check2(int n) { int a=n; char str[10]; sprintf(str,"%d",a); for(int i=0;i<10;i++){ if(str[i]=='2'||str[i]=='4'){ return 0; } } return 1; } bool ch原创 2020-07-03 15:01:16 · 228 阅读 · 0 评论 -
【MySql】MySql5.0与8.0在连接数据库时候的区别
前言 今天在做个小型前后端连接的项目时出现了一个问题就是页面什么的都正常,能够正常运行程序且能进入首页但是就是连不上数据库显示以下内容(页面跳500)。 问题所在 Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database! 愣是找不到错误最后让老师帮忙看了才发现问题出在数据库驱动程原创 2020-07-01 15:38:20 · 4168 阅读 · 1 评论