码迷,mamicode.com
首页 >  
搜索关键字:int b)将整数n转换为以b进制的数保存到s中    ( 143001个结果
03Linux网络编程基础 ---- IO复用
select系统调用 #include <sys/select.h> int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); nfds:是指集合中所有文件 ...
分类:系统相关   时间:2021-04-20 14:09:45    阅读次数:0
十大经典排序之堆排序(C++实现)
#堆排序 通过将无序表转化为堆,可以直接找到表中最大值或者最小值,然后将其提取出来,令剩余的记录再重建一个堆, 取出次大值或者次小值,如此反复执行就可以得到一个有序序列,此过程为堆排序。 思路: 1.创建一个堆 H[0……n-1]; 2.把堆首(最大值)和堆尾互换; 3.把堆的尺寸缩小 1,并调用 ...
分类:编程语言   时间:2021-04-20 14:08:43    阅读次数:0
django-数据库的增删改查操作
django-数据库的增删改查操作 1.添加用户记录 def login(request): 增加用户记录 使用save()方法来增加记录 username = UserInfo(username='tom', password='123') username.save() 2.使用遍历方法创建用户 ...
分类:数据库   时间:2021-04-20 14:05:16    阅读次数:0
状态模式
public class StatePattern { public static void main(String[] args) { Context context=new Context(); for (int i = 0; i < 10; i++) { context.handle(); } ...
分类:其他好文   时间:2021-04-19 16:06:54    阅读次数:0
resultMap结果集映射解决属性名和字段不一致问题
解决属性名和字段名不一致的问题 1.出现的问题 数据库中的字段 ? 新建一个项目,拷贝之前的,测试实体类与数据库字段不一致的情况 public class User { private int id; private String name; private String password; } 现 ...
分类:其他好文   时间:2021-04-19 16:03:47    阅读次数:0
mybatis__第一个mybatis
思路:搭建环境-->导入Mybatis-->编写代码-->测试!### 2.1、搭建环境搭建数据库```javaCREATE DATABASE `mybatis`;USE `mybatis`;CREATE TABLE `user`( `id` INT(20) NOT NULL PRIMARY KEY ...
分类:其他好文   时间:2021-04-19 15:58:15    阅读次数:0
成绩统计
6.成绩统计(15) 对给定人数的成绩输出其及格率和优秀率(百分号前保留整数) n = int(input()) a,b=0,0 for i in range (n): s = int(input()) if s>=60: a+=1 if s>=85: b+=1 print('{:.0%}'.for ...
分类:其他好文   时间:2021-04-19 15:57:59    阅读次数:0
vector容器 单端数组、动态数组
1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<algorithm> 5 using namespace std; 6 7 void test01() 8 { 9 vector<int> v; 10 for( ...
分类:编程语言   时间:2021-04-19 15:55:39    阅读次数:0
变长参数传递与两个函数之间
1 // 变长参数传递与两个函数之间 2 template <class... Args> 3 void myTest(Args... args) { 4 printf("%d,%d,%d,%d", args...); 5 } 6 int main() { 7 myTest(1, 2, 3, 4); ...
分类:其他好文   时间:2021-04-19 15:50:56    阅读次数:0
C for,while,do while 代码实现
这里用go to 来模拟汇编他们的区别 while 代码 int i = 0; while (i < 100) { i++; } goto 实现while int i = 0; WHILE_BEGIN: if (i < 100) { goto WHILE_END; } i++; goto WHILE ...
分类:其他好文   时间:2021-04-19 15:45:52    阅读次数:0
143001条   上一页 1 ... 94 95 96 97 98 ... 14301 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!