1.导入jar包 mysql-connector-java-5.1.7-bin.jar。并加入到环境中。 2.注册驱动,获取连接 //注册驱动 Class.forName("com.mysql.jdbc.Driver");//com.mysql.jdbc.Driver mysql驱动 //获取链接 ...
分类:
数据库 时间:
2020-11-25 12:17:02
阅读次数:
8
A.快速排序 1.算法逻辑 若要对 def quick_sort(alist,first,last): if first >= last: # 递归结束条件 return high = last low = first media_data = alist[first] while low < hi ...
分类:
编程语言 时间:
2020-11-25 12:12:17
阅读次数:
8
Case 1 : ParamType是一个指针或者引用,但不是universal reference T& const T& T* Case 2 : ParamType是Universal Reference 注意区别Universal Reference与右值引用 Case 3 : ParamTy ...
分类:
编程语言 时间:
2020-11-25 12:10:25
阅读次数:
6
Case 1 : type specifier是一个指针或者引用,但不是universal reference Case 2 : type specifier是一个universal reference Case 3 : type specifier既不是指针也不是引用 数组和函数类型推断 auto ...
分类:
编程语言 时间:
2020-11-25 12:09:31
阅读次数:
7
解题思路 三指针,一个指向前半部分待插入位置,一个指向后半部分待插入位置,最后一个从前往后遍历 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListN ...
分类:
其他好文 时间:
2020-11-25 12:06:05
阅读次数:
7
Java并发编程系列23|循环屏障CyclicBarrier收录于话题#进阶架构师|并发编程专题12个本篇介绍第二个并发工具类CyclicBarrier,CyclicBarrier的字面意思是可循环使用(Cyclic)的屏障(Barrier),分以下部分介绍:CyclicBarrier的使用CyclicBarrier与CountDownLatch比较CyclicBarrier源码解析1.Cycli
分类:
编程语言 时间:
2020-11-24 12:54:55
阅读次数:
6
#include<math.h> #include<stdio.h> int main(){ float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c:"); while(scanf("%f%f%f",&a,&b,&c)!=EOF){ ...
分类:
其他好文 时间:
2020-11-24 12:17:23
阅读次数:
9
8 1 #include<stdio.h> 2 int num[100]; 3 int main() 4 { 5 int x; 6 int cnt = 0; 7 scanf("%d", &x); 8 while(x) { 9 num[++cnt] = x % 10; 10 x = x / 10; 1 ...
分类:
编程语言 时间:
2020-11-24 12:15:10
阅读次数:
9
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:
其他好文 时间:
2020-11-24 12:14:01
阅读次数:
6
使用循环逐个转换 public class Test1 { public static void main(String[] args) { int[] a = { 11, 12, 13}; // 打印输出 for (String i : intArrToStringArr(a)) { System ...
分类:
编程语言 时间:
2020-11-24 12:05:33
阅读次数:
9