码迷,mamicode.com
首页 >  
搜索关键字:循环 if for while case    ( 74454个结果
OC原理解决定时器的循环引用
对于以下代码: @property (strong, nonatomic) NSTimer *timer; self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerTes ...
分类:其他好文   时间:2021-02-26 13:22:00    阅读次数:0
用栈+循环实现走迷宫及演示c++
main.cpp 1 #include <stdio.h> 2 #include "mystack.h" 3 #include <stdlib.h> 4 #include <string.h> 5 #include <windows.h> 6 using namespace std; 7 #defi ...
分类:编程语言   时间:2021-02-26 13:21:08    阅读次数:0
使用串口绘制实时曲线 —— SerialChart
https://www.cnblogs.com/qiyuexin/p/7067646.html 2. 串口程序 while(1){ if(++x>=180){ y = 90; x = 0; } if(x>=90) y++; else y--; z = sin(x*Pi/90); p = cos(x* ...
分类:其他好文   时间:2021-02-26 13:03:26    阅读次数:0
107. Binary Tree Level Order Traversal II
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:其他好文   时间:2021-02-26 12:54:45    阅读次数:0
时钟分频
偶数分频:通过计数器实现,进行N倍偶数分频,通过时钟触发计数器计数,当计数器从0计数到N/2-1时,输出时钟进行翻转,以此循环下去。(占空比为50%) 用于FPGA开发板进行简单的时钟分频,以下代码实现二分频和四分频,可根据实际需求改变参数输出需要的时钟。 `module clk(clk,sys_r ...
分类:其他好文   时间:2021-02-25 12:05:27    阅读次数:0
AcWing 1210. 连号区间数
原题链接 考察:枚举 错误思路: 三层for循环暴力. 做多了区间dp...枚举区间只能想到按长度枚举区间,但这道题不能这么枚举..... 正确思路: 按区间端点来枚举区间,连号区间的特点是最大值-最小值 = 右端点-左端点.随着区间向右边延长,而动态记录最值. 1 #include <iostre ...
分类:Windows程序   时间:2021-02-25 12:00:58    阅读次数:0
Java随机减法题,单分支的应用实例
/*每次产生5个随机减法算术题,提示用户输入答案,并判断是否正确,最后显示正确答案以及答题时间涉及知识点:1.随机数的生成方法Math.random()2.条件分支语句if3.获取时间System.currentTimeMillis(),4.三元运算符代替if5.String 的巧妙使用 */pac ...
分类:编程语言   时间:2021-02-25 11:58:49    阅读次数:0
event loop事件循环
了解event loop,我们先了解以下3点 ①js是单线程 ②异步基于回调实现 ③event loop是异步回调的实现原理 我们来看个图 ? 当检测到是同步任务时,该任务会直接移到调用栈里面再传给浏览器 调用栈-浏览器 当检测到是异步任务时,该任务会被放置到webAPI中即等待队列,当同步任务执行 ...
分类:其他好文   时间:2021-02-25 11:55:39    阅读次数:0
IDEA快捷键之for循环
IDEA迭代器for循环 iter Iterate iterable | Array in J2SDK 5 syntax itar Iterate elements of array itco Iterate elements of java.util.Collection iten Iterate ...
分类:其他好文   时间:2021-02-25 11:50:56    阅读次数:0
1106 Lowest Price in Supply Chain (25 分)
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer ...
分类:其他好文   时间:2021-02-24 13:20:28    阅读次数:0
74454条   上一页 1 ... 65 66 67 68 69 ... 7446 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!