码迷,mamicode.com
首页 >  
搜索关键字:car recorder    ( 3461个结果
2014年9月6日
1 public class Car{ 2 3 String name; 4 int age; 5 6 public Car(String name, int age){ 7 System.out.println("执行构造器"); 8 ...
分类:其他好文   时间:2014-09-05 21:05:31    阅读次数:119
LeetCode Gas Station
There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[...
分类:其他好文   时间:2014-09-04 20:39:00    阅读次数:153
UVa 10491 - Cows and Cars
題目:有m+n個們,每個門後面有牛或者車;有n只牛,m輛車,你選擇其中1個;             然後打開其中的k你沒有選中的門後是牛的,問你改變選時得到車的概率。 說明:數學題,概率。全概率公式即可:           說明:第1001了O(∩_∩)O~ #include int main() { int cow,car,show; while (~scanf("...
分类:其他好文   时间:2014-09-04 13:23:39    阅读次数:184
(2) Module (模块)模式
module模式,是建立在对象字面量上面的,最基本的对象字面量的形式是:var Car = {};基于对象字面量的module模式的实现方式: var Car = { color: 'white', getCarPrice: function () { },...
分类:其他好文   时间:2014-09-03 21:15:37    阅读次数:172
(1) constructor(构造器)
var Car = function (model, year, miles) { this.model = model; this.year = year; this.miles = miles; this.carSituation = f...
分类:其他好文   时间:2014-09-03 21:12:07    阅读次数:232
[label][JavaScript]七个JavaScript技巧
重点:http://www.javascriptkit.com/create an object:var car = new Object();car.colour = 'red';car.wheels = 4;car.hubcaps = 'spinning';car.age = 4;The sam...
分类:编程语言   时间:2014-09-03 19:36:37    阅读次数:218
函数与对象
实例:写一个车的类//类的声明部分@interface Car : NSObject{ int _speed; //速度 int _wheel; //轮子}-(void)run;@end//类的实现部分@implementation Car-(void)run{ NSLog(@"车的速度是:%...
分类:其他好文   时间:2014-08-30 15:00:59    阅读次数:143
scjp考试准备 - 9
题目为如下代码的执行结果: abstract class Vehicle{ public int speed(){ return 0; } } class Car extends Vehicle{ public int speed(){ return 60; } } class RacerCar e...
分类:其他好文   时间:2014-08-29 22:38:28    阅读次数:192
UVA 10457 - Magic Car(最小瓶颈路)
UVA 10457 - Magic Car 题目链接 题意:m条路,每条路上必须维持速度v,现在有一辆车,启动能量和结束能量为a, b,途中消耗能量为经过路径最大速度减去最小速度,现在每次循环给定起点终点,问最小能量花费 思路:最小瓶颈路,利用kruskal去搞 代码: #include #include #include using namespace std...
分类:其他好文   时间:2014-08-28 14:51:39    阅读次数:205
装饰者模式
模式说明装饰者模式装饰者模式可以动态地给一个对象增加一些额外的职责。就增加功能来说,装饰者模式相比生成子类更为灵活。模式结构图程序示例说明:一辆车,装饰窗户,装饰轮子代码:class Car(object): def description(self): print 'basic...
分类:其他好文   时间:2014-08-25 19:03:54    阅读次数:209
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!