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
解题思路 三指针,一个指向前半部分待插入位置,一个指向后半部分待插入位置,最后一个从前往后遍历 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListN ...
分类:
其他好文 时间:
2020-11-25 12:06:05
阅读次数:
7
#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
实验任务4#include<stdio.h> #include<math.h> int main() { int n,a,b,i,s; printf("Enter a number:"); scanf("%d",&n); while(n){ i=0; s=0; while(n!=0){ a=n%10 ...
分类:
其他好文 时间:
2020-11-23 12:22:09
阅读次数:
3
基本原理: 通过指针从头节点开始,将该链表的各节点依次接到临时指针的前面,然后返回临时指针所指向的地址。 算法分析: 第一:定义三个指针变量。一个用来存放下一个节点tem;一个用当做临时指针存放提取出来的节点h;一个用来指向该链表的头节点u。 第二:判断下一个节点(tem)是否为空,如果为不为空,则 ...
分类:
编程语言 时间:
2020-11-23 12:14:58
阅读次数:
8
Dart语言的控制语句跟其他常见语言的控制语句是一样的,基本如下:
- **if 和 else**
- **for 循环**
- **while 和 do-while 循环**
- **break 和 continue**
- **switch 和 case**
- **assert** ...
分类:
编程语言 时间:
2020-11-23 12:01:42
阅读次数:
8
#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) !=EO ...
分类:
其他好文 时间:
2020-11-23 11:57:34
阅读次数:
4