码迷,mamicode.com
首页 >  
搜索关键字:float    ( 12549个结果)
点云---随机数生成之数据采样
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <vector> float unifRand() { return (static_cast<float>(rand() / ...
分类:其他好文   时间:2020-02-28 19:09:34    阅读次数:190
float
一,浮动元素是如何定位的 当一个元素浮动之后,它会被移除正常的文档流,然后向左或者向右平移,一直平移直到碰到了所处的容器的边框,或者碰到另外一个浮动的元素 这是一个栗子: 运行结果: 二,解决浮动的副作用: 1. 针对父元素: 注意:如果一个元素里只有浮动元素,那它的高度会是0.如果你想要的它自适应 ...
分类:其他好文   时间:2020-02-28 19:00:25    阅读次数:55
vue 事件总线(bus)
1.全局引入bus Vue.prototype.$bus = new.Vue() 2.组件间传值使用(在发送事件时接收组件会实时接收到, 可以用做兄弟组件间相互传值, 但页面跳转组件间有问题 通过$emit发送,$on接收) <div style="float: left; width: 15%; ...
分类:其他好文   时间:2020-02-28 15:53:16    阅读次数:53
JDK1.8 HashMap学习
1:源码分析 1.1:构造方法 public HashMap(int initialCapacity, float loadFactor) { if (initialCapacity < 0) throw new IllegalArgumentException("Illegal initial c ...
分类:其他好文   时间:2020-02-28 14:18:09    阅读次数:51
SrpingMVC/SpringBoot中restful接口序列化json的时候使用Jackson将空字段,空字符串不传递给前端
笔者的JSON如下: { "code": 10001, "message": "成功", "nextUrl": null, "data": { "updateTime": "2020-02-23 13:43:18", "result": [ { "confirm": 24, "suspect": 0 ...
分类:编程语言   时间:2020-02-28 13:57:34    阅读次数:196
python-异常处理
异常和错误 part1:程序中难免出现错误,而错误分成两种 1.语法错误(这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正) 2.逻辑错误(逻辑错误) #用户输入不完整(比如输入为空)或者输入非法(输入不是数字) num=input(">>: ") int(num) #无法完 ...
分类:编程语言   时间:2020-02-27 21:04:57    阅读次数:92
程序里面带有浮点数,默认会自动转换为double类型存储
带有浮点数,默认会转换为double类型存储。 #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> static float test_equation = 0; int main() { //只有 ...
分类:其他好文   时间:2020-02-27 20:52:02    阅读次数:64
73课 求1到100的所有奇数之和,个数,平均值
1 #include <stdio.h> 2 3 int main (void) 4 { 5 int i; 6 int sum = 0; 7 int cnt = 0; 8 float avg;//average平均值的缩写 9 10 for (i = 1; i<101; ++i) 11 { 12 i ...
分类:其他好文   时间:2020-02-27 20:47:36    阅读次数:55
已知float后几位,谋几位保留
设变量n为float类型,m为int类型,则以下能实现将n中的数值保留小数点后两位,第三位进行四舍五入运算的表达式____. #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> //#define ...
分类:其他好文   时间:2020-02-27 20:35:32    阅读次数:51
tmp = 2/4;竟然没有发现的
我还纠结着单目运算符和双目运算符和乘除的一些优先级什么事情。 #include "common.h" #include <stdio.h> #include <stdlib.h> #include <math.h> //#define static float Mathematical_modeli ...
分类:其他好文   时间:2020-02-27 19:03:13    阅读次数:59
共12549条   上一页 1 ... 91 92 93 94 95 ... 1255 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!