码迷,mamicode.com
首页 >  
搜索关键字:float    ( 12549个结果
解决子级用css float浮动 而父级div没高度不能自适应高度
解决子级对象使用css float浮动 而父级div不能自适应高度,不能被父级内容撑开解决方法,父级div没有高度解决方法。当在对象内的盒子使用了float后,导致对象本身不能被撑开自适应高度,这个是由于浮动产生原因。如何解决父div对象自适应高度,方法有三种,接下来DIVCSS5逐一介绍。方法一:...
分类:Web程序   时间:2014-07-16 21:16:43    阅读次数:231
写出bool,int,float,指针与零值比较的if语句
这个里面float与零值的比较颇有些意思。bool: bool flag; if (flag == true) return; int: int var; if (var == 0) { return; }指针变量: char *p; if (p == n...
分类:其他好文   时间:2014-07-16 20:55:39    阅读次数:126
利用xcode6做出牛的一逼的计算器
1、利用xcode6控件搭成计算器界面2、程序#import "ViewController.h"@interface ViewController (){ float result; int i;}@property (weak, nonatomic) IBOutlet UILabel *lab....
分类:其他好文   时间:2014-07-16 20:31:06    阅读次数:334
初学者如何做一个简单的计算器,代码分享
先新建一个类 startCalculator声明如下#import @interface StartCalculator : NSObject//声明两个要计算的变量@property float opValue1;@property float opValue2;//声明一个运算符@propert...
分类:其他好文   时间:2014-07-16 20:30:08    阅读次数:241
基本概念: 均值,期望,中位数,众数,极差,总体方差,样本方差,协方差
# --*-- coding:utf-8 --*--import mathimport itertoolsdef Mean(t): """均值""" return float(sum(t)) / len(t)def E(x, p): """ 离散性随即变量的数学期望(也称为均...
分类:其他好文   时间:2014-07-16 20:18:01    阅读次数:220
哈哈镜效果
//哈哈镜效果 public static Bitmap changeToHaha(Bitmap bitmap){ int centerX = bitmap.getWidth() / 2; int centerY = bitmap.getHeight() / 2; float radius =...
分类:其他好文   时间:2014-07-16 19:36:51    阅读次数:193
java中不常见的keyword:strictfp,transient
1.strictfp, 即 strict float point (精确浮点)。 strictfp keyword可应用于类、接口或方法。使用 strictfp keyword声明一个方法时,该方法中全部的float和double表达式都严格遵守FP-strict的限制,符合IEEE-754规范。....
分类:编程语言   时间:2014-07-13 11:59:07    阅读次数:245
GDI+ 画渐变色环
在onpaint() 函数中加入如下代码,本次利用DrawArc来实现。 #define PI 3.1415926 int angle=360; int x=(rect.Width()-300)/2; int y=190; int width=300; int hight=300; int wide=34; //for(float i = 0.0; i for(floa...
分类:其他好文   时间:2014-07-11 00:24:19    阅读次数:750
Java多态特性:重载和覆写的比较
Java重载: 在同一个类中方法具有相同的名字,相同或不同的返回值,但参数不同的多个方法(参数个数或参数类型) public class MethoDemo{ public static void main(String args[]){ int one = add(10,20) ; // 调用整型的加法操作 float two = add(10.3f,13.3f) ;...
分类:编程语言   时间:2014-07-10 20:08:16    阅读次数:265
div 导航自适应浏览器宽度
<!DOCTYPEhtml><html><head> <title>自适应宽度</title> <style> #condition{float:left;text-align:center;} #conditionul{margin-top:0px;display:inline-block;} #conditionulli{float:left;list-style:none;} </style><..
分类:其他好文   时间:2014-07-10 18:34:27    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!