码迷,mamicode.com
首页 >  
搜索关键字:循环 if for while case    ( 74454个结果
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
前端溯源:宏任务与微任务|事件循环
强烈建议 参考:https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/?utm_source=html5weekly 每个“线程”都有自己的事件循环,因此每个Web工作者都有自己的事件循环,因此可以独立执行,而同一源 ...
分类:其他好文   时间:2021-04-19 15:12:26    阅读次数:0
MySQL使用存储过程批量更新数据库所有表某个字段值
最近响应群里朋友完整开源之前那个博客系统,准备重构一番项目的代码,对数据库中的表决定都添加 create_by、update_by、create_time、update_time、del_flag 等字段。 当时添加表的时候没有设置默认值,现在要对二三十张表某个字段,如对 del_flag 设置默认 ...
分类:数据库   时间:2021-04-19 14:53:46    阅读次数:0
POJ1631 - Bridging signals - LIS优化 - 二分+dp - nlogn
##题意 求最长上升子序列长度 ##思路 本题直接用dp写,会超时,需要优化 优化办法:二分+dp ##AC代码 //4test n //6 p //4 2 6 3 1 5 ->3 //10 //2 3 4 5 6 7 8 9 10 1 ->9 //8 //8 7 6 5 4 3 2 1 ->1 / ...
分类:其他好文   时间:2021-04-19 14:47:09    阅读次数:0
HDU1160 - FatMouse's Speed - 最长上升子序列的变形+记录路径
##思路 最长上升子序列的变形+记录路径 ##AC代码 #include<iostream> #include<cmath> #include<string.h> #include<algorithm> #include<stdio.h> #include<iomanip> #define inf ...
分类:其他好文   时间:2021-04-19 14:43:51    阅读次数:0
变量,元字符,流程判断if,while、for循环
一: shell编程介绍 1、一个shell脚本运行必须要拥有r和x权限; chamod u+x 1.txt 2、运行一个shell脚本的3个步骤: (1)启动bash解释器 (2)bash把文件内容从硬盘读入内存 (3)bash把读入到内存的内容进行语法解释,控制操作系统执行shell代码 写脚本 ...
分类:其他好文   时间:2021-04-16 12:25:54    阅读次数:0
ingress的基本使用
1.Ingress测试示例 1.定义一个deployment [root@k8s-master01 service-ingress]# cat nginx-test.yaml apiVersion: v1 kind: Service metadata: name: ingress-test labe ...
分类:其他好文   时间:2021-04-16 12:25:19    阅读次数:0
模拟cpu/mem/io使用率
模拟cpu使用率 脚本: 可以将1个cpu-core打满 k.c #include <stdlib.h> int main() { while(1); return 0; } gcc -o out k.c ./out 查看top可以看到将1个cpu-core打满,可以根据需要,并发启动多个进程将多个 ...
分类:其他好文   时间:2021-04-16 12:03:28    阅读次数:0
Java数组遍历的几种方式
数组遍历方式参考: 方法一:for循环遍历 public static void main(String[] args) { int Arr[][]={{1,2,3},{4,5,6}}; for (int i = 0; i < Arr.length; i++) { for (int j = 0; j ...
分类:编程语言   时间:2021-04-16 11:45:39    阅读次数:0
实验3 C语言分支语句、循环语句、函数综合应用编程-1
实验1 //生成N个0~99之间的随机整数,并打印输出 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int x,n; srand(time(0)); for(n=1;n<=N;n+ ...
分类:编程语言   时间:2021-04-15 12:26:09    阅读次数:0
74454条   上一页 1 ... 43 44 45 46 47 ... 7446 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!