摘要: 常常server返回的数据,有null,还有nil,假设在模型层不处理的话,到时候数据展现时,一定会崩啊,近期决心要解决问题,所以查看了一些资料后,有答案了: - (id) setNoNull:(id)aValue{ if (aValue == nil) { aValue = @"";//为null 阅读全文
posted @ 2017-04-13 20:49 claireyuancy 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 代码: #include<cstdio> #include<cstring> using namespace std; int n,m; int father[1005]; int Find(int a) { int r=a; while(father[a]!=a) { a=father[a]; } 阅读全文
posted @ 2017-04-13 20:17 claireyuancy 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题目: C. Appleman and Toastman time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Appleman an 阅读全文
posted @ 2017-04-13 18:48 claireyuancy 阅读(236) 评论(0) 推荐(0) 编辑
摘要: python主要是通过thread和threading这两个模块来实现多线程支持。python的thread模块是比較底层的模块,python的threading模块是对thread做了一些封装,能够更加方便的被使用。可是python(cpython)因为GIL的存在无法使用threading充分利 阅读全文
posted @ 2017-04-13 18:06 claireyuancy 阅读(19891) 评论(0) 推荐(0) 编辑
摘要: 云计算设计模式(十六)——优先级队列模式 优先发送到服务,以便具有较高优先级的请求被接收和高于一个较低优先级的更高速地处理请求。这样的模式是在应用程序是实用的,它提供不同的服务级别保证或者针对独立客户。 背景和问题 应用程序能够托付给其它服务的详细任务;比如,为了运行后台处理或与其它应用程序或服务的 阅读全文
posted @ 2017-04-13 17:14 claireyuancy 阅读(698) 评论(0) 推荐(0) 编辑
摘要: 题意: 给你N个包,要拿到M个东西(编号1~M每一个仅仅能有一个) 然后每一个包里有k个东西,每一个东西都有编号。 思路: 舞蹈连模板题 代码: #include"stdio.h" #include"algorithm" #include"string.h" #include"iostream" # 阅读全文
posted @ 2017-04-13 17:14 claireyuancy 阅读(161) 评论(0) 推荐(0) 编辑
摘要: A Absolute Mode Transform Type-in绝对坐标方式变换输入 Absolute/Relative Snap Toggle Mode绝对/相对捕捉开关模式 ACIS Options ACIS选项 Activate活动;激活 Activate All Maps激活全部贴图 Ac 阅读全文
posted @ 2017-04-13 15:57 claireyuancy 阅读(1087) 评论(0) 推荐(0) 编辑
摘要: 在iOS8之前用UIActionSheet和UIAlertView来提供button选择和提示性信息,比方UIActionSheet能够这样写: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"title,nil 阅读全文
posted @ 2017-04-13 15:01 claireyuancy 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 内核的各种协议并不直接使用前面提供的函数来訪问选路树,而是调用几个函数:rtalloc和rtallocl是完毕路由表查询的两个 函数;rtrequest函数用于加入和删除路由表项;另外大多数接口在接口连接或断开时都会调用函数rtinit。 选路消息在两个方向上传递信息。进程(route命令)或守护进 阅读全文
posted @ 2017-04-13 13:23 claireyuancy 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 在C++中,左值(lvalue)是能够获取其地址的一个量。因为常常出如今赋值语句的左边。因此称之为左值。比如一个有名称的变量。 比如: int a=10; //a就是一个左值。 传统的C++引用,都是左值引用。比如:int &ra=a;将ra关联到a。这就是左值引用。 C++11,新增了右值引用的概 阅读全文
posted @ 2017-04-13 12:29 claireyuancy 阅读(253) 评论(0) 推荐(0) 编辑
摘要: ECharts主页: http://echarts.baidu.com/index.html ECharts-2.1.8下载地址: http://echarts.baidu.com/build/echarts-2.1.8.zip ECharts官方实例: http://echarts.baidu.c 阅读全文
posted @ 2017-04-13 11:17 claireyuancy 阅读(1037) 评论(0) 推荐(0) 编辑
摘要: HDFS是什么 HDFS设计特性和概念 HDFS,全称是Hadoop Distributed Filesystem,是一个分布式的文件系统,以流式数据訪问模式来存储超大文件(一次写入、多次读取)。 HDFS具有例如以下设计特性: (1)处理超大文件,指的是GB、TB、PB级别的文件。百度、淘宝都有P 阅读全文
posted @ 2017-04-13 10:45 claireyuancy 阅读(754) 评论(0) 推荐(0) 编辑
摘要: 这里讨论使用Python解压例如以下五种压缩文件: .gz .tar .tgz .zip .rar 简单介绍 gz: 即gzip。通常仅仅能压缩一个文件。与tar结合起来就能够实现先打包,再压缩。 tar: linux系统下的打包工具。仅仅打包。不压缩 tgz:即tar.gz。先用tar打包,然后再 阅读全文
posted @ 2017-04-13 09:18 claireyuancy 阅读(52363) 评论(1) 推荐(2) 编辑