关于模型部分参考http://blog.csdn.net/buyingfei8888/article/details/40208729
控制器部分:
<?php
class GoodsController extends Controller{
function actionShow(){
$goods_model = Goods::model(); //简单查询可以通过模型里面静...
分类:
其他好文 时间:
2014-10-18 22:23:32
阅读次数:
235
题意 在所有城市中找一个中心满足这个中心到所有公交站点距离的最大值最小 输出最小距离和满足最小距离编号最小的中心
最基础的BFS 对每个公交站点BFS dis[i]表示编号为i的点到所有公交站点距离的最大值 bfs完所有站点后 dis[i]最小的点就是要求的点咯
#include
#include
#include
#include
using namespace std;
typ...
分类:
其他好文 时间:
2014-10-18 22:23:20
阅读次数:
242
ditta和artist mode是好兄弟。artist mode帮助我快速创建字符图形,ditta是一个java程序,可以读取该字符图形,并生成图片。ditta的网站:http://ditaa.sourceforge.net/下载后,解压缩到本地目录,然后可以用java -jar命令运行之。接收的第一个参数是包含字符图形的文本文件,默认会生成同名的png图片,保存在当前目录下。由于我经常使用mu...
分类:
其他好文 时间:
2014-10-18 22:21:39
阅读次数:
225
引用计数器当一个对象被创建出来,就要分配给内存这个对象,当不用这个对象的时候,就要及时的回收,为了可以明确知道对象有没有被使用,就要用引用计数器来体现,只要计数器不为0,表明对象被使用中。1.方法的基本使用1> retain :计数器+1,会返回对象本身2> release :计数器-1,没有返回值...
分类:
其他好文 时间:
2014-10-18 22:19:17
阅读次数:
237
DirectShow, as you might have guessed, is a COM based multimedia framework that makes the task of capturing, playing back, and manipulating media stre...
分类:
其他好文 时间:
2014-10-18 22:20:24
阅读次数:
295
结构体NSRange:用来表示范围创建NSRange r1 = {2, 4}NSRange r2 = {.location = 2, .length = 4}NSRange r3 = NSMakeRange(2, 4)查找某个字符串在str中的范围NSString *str = @"i love o...
分类:
其他好文 时间:
2014-10-18 22:19:24
阅读次数:
219
房贷新政刺激换房需求 北京楼市成交量反弹行业动态华夏时报[微博]胡坤2014-10-18 00:56我要分享25本报记者 胡坤 北京报道“总算开单了!”10月15日,房山良乡一家房产中介的置业顾问王勇忍不住向《华夏时报》记者感叹道。国庆节长假过后,整整3个月没有签单的他终于促成了一笔房屋买卖的交易。...
分类:
其他好文 时间:
2014-10-18 22:20:42
阅读次数:
233
现学的左偏树。。。这可是道可并堆的好题目。首先我们考虑z不减的情况:我们发现对于一个区间[l, r],里面是递增的,则对于此区间最优解为z[i] = t[i];如果里面是递减的,z[l] = z[l + 1] = ... = z[r] = 这段数的中位数,不妨叫做w。(此处我们定义中位数为第(r -...
分类:
其他好文 时间:
2014-10-18 22:18:42
阅读次数:
283
在虚拟机下做的测试。虚拟主机1:(双网卡)eth0连接内网 ip地址为 192.168.0.100/24eth1配置一个虚拟外网的ip 200.168.0.100/24虚拟主机2:ip:200.168.0.101/24(为了测试,就和上面的一个ip在同一网段内)pc机:192.168.0.110一、...
分类:
其他好文 时间:
2014-10-18 22:18:09
阅读次数:
183
这几天的心得,汇成代码。PYTHON版,我编的。#!/usr/bin/env python# -*- coding: utf-8 -*-import os,sys,timeimport commands,logging#以下为手工命令时的动作#time format 17/Oct/2014:10:0...
分类:
其他好文 时间:
2014-10-18 22:17:49
阅读次数:
315
初学Python的时候,是不是很惊讶原来写一个类是如此的容易,不如:1 class Foo():2 pass这是一个完美有效(没什么作用)的类,我们可以创建这个类的实例对象。1 f = Foo()这是一个Foo的实例对象,我们来查查它的身份,原来是Foo的一个实例1 >>>type(f)2 ...
分类:
其他好文 时间:
2014-10-18 22:18:13
阅读次数:
251
AsyncDisplayKitAsyncDisplayKit is an iOS framework that keeps even the most complex user interfaces smooth and responsive. It was originally built to ...
分类:
其他好文 时间:
2014-10-18 22:17:45
阅读次数:
309
Freedom of ChoiceTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onUral. Original ID:151764-bit integer IO format:%lld Java class n...
分类:
其他好文 时间:
2014-10-18 22:16:45
阅读次数:
285
Write a function to find the longest common prefix string amongst an array of strings. 分析: 对一组字符串找到最长公共前缀。 因为只是找前缀所以可以以第一个字符串为基础,按个字符与其它字符串比较,直到有字符串已经...
分类:
其他好文 时间:
2014-10-18 22:17:24
阅读次数:
186
NSArrayNSArray的创建NSArray *array = [NSArray arrayWithObject:@“jack”] 创建单个元素NSArray *array3 = [NSArray arrayWithObjects:@"jack", @"rose", nil] 创建多个元素快速....
分类:
其他好文 时间:
2014-10-18 22:18:10
阅读次数:
153
1)类,对象,方法类类名:1) 类名的第一个字母必须是大写2) 不能有下划线3) 多个英文单词,用驼峰标识类的声明和实现类的声明@interface 类名 : NSObject{ @public 成员变量;}方法声明;@end类的实现@implementation 类名方法实现;@end举例说明.....
分类:
其他好文 时间:
2014-10-18 22:17:59
阅读次数:
516
开始按照顺序刷刷以前的CF。#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #...
分类:
其他好文 时间:
2014-10-18 22:15:48
阅读次数:
246