常量关键字 let变量关键字 var数组和字典 ([])\ () 格式字符串标记
在swift语法中使用let关键字声明常量,例如
let myConstant = 42
使用let声明的常量在编译时候不需要赋值,但是你必须在某个时候给它且只能赋值一次,意味着你可以声明一次,可以在许多地方使用多次。
使用var关键字声明变量,例如...
分类:
其他好文 时间:
2014-06-07 15:47:33
阅读次数:
229
1、错误描述
六月 03, 2014 11:00:35 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
严重: Template processing error: "Expression nums is undefined on line 10, column 25 in list.ftl."
Expression nums is...
分类:
其他好文 时间:
2014-06-20 12:59:50
阅读次数:
229
function blink(e_Id, second) { var soccer = document.getElementById(e_Id);
soccer.style.visibility = (soccer.style.visibility == "hidden")
? "visible"
: "hidden"
setTimeout(_show(e_Id, second)...
分类:
其他好文 时间:
2014-06-07 14:38:57
阅读次数:
173
typedef unsigned char* byte_pointer;
void show_bytes(byte_pointer start, int len)
{
for (int i = 0; i
{
printf("%2x", start[i]);
}
cout
}
int _tmain(int argc, _TCHAR* argv[])
{
char* b...
分类:
其他好文 时间:
2014-06-07 16:22:02
阅读次数:
312
用减法可能会超时,但可以用二分
class Solution {
public:
int divide(int d1, int d2) {// d1/d2
if(d1==0)
return 0;
if(d2==1)
return d1;
if(d2==-1)
...
分类:
其他好文 时间:
2014-06-29 07:22:02
阅读次数:
208
freemarker序列的拆分
1、简易说明
2、实现源码
${"hudjfkskhd你好,hifdjkfjd面积扩大房价肯定,佛idkgjdhfdjkg?!的"[0..20]}...
3、实现结果
hudjfkskhd你好,hifdjkfj......
分类:
其他好文 时间:
2014-06-20 10:59:42
阅读次数:
195
编写高质量代码——重载operator=的标准三步走...
分类:
其他好文 时间:
2014-06-07 14:02:15
阅读次数:
204
首先介绍下表结构:目前有两张表,一张是student,一张是Teacher。其中student对teacher是多对一关系:
下面是添加的数据:
-(IBAction)add:(id)sender
{
Teacher * tea = (Teacher *)[NSEntityDescription insertNewObjectForEntityForName:@"Tea...
分类:
其他好文 时间:
2014-06-20 09:02:15
阅读次数:
213
20140603
对error.c 的源代码进行分析
继续看error.c中的函数
现将代码和自己查阅的资料整理如下:
1.#include
2 #include
3 #include
4 #include
5 #include
6 #include "error.h"
7 #include "dxyh_thread.h"
8...
分类:
其他好文 时间:
2014-06-20 10:00:11
阅读次数:
194
在机器学习中,模型的训练是一个很重要的过程,它通常是对一个目标函数进行优化,从而获取模型的参数,比较常见的优化算法包括梯度下降法、牛顿法与拟牛顿法等。但在大数据的背景下,尤其对于并行实现来说,优化算法通常是越简单越好,如坐标下降法(CD)和随机梯度下降法(SCG)就比较受欢迎。本文是阅读完论文 Distributed Coordinate Descent Method for Learning with Big Data 的一则笔记,主要介绍算法 Hydra (一种分布式坐标下降法)的算法框架、收敛性理论、...
分类:
其他好文 时间:
2014-06-29 07:38:26
阅读次数:
350
参考材料:深入理解计算机系统,第六章
6.1.1 随机访问存储器RAM
1.静态RAM(SRAM)与动态RAM(DRAM)
首先。要有的基本概念:SRAM存储一个位的结构要六个晶体管,DRAM存储一个位的结构为一个电容(DRAM可达到较SRAM更高的密度)。因此SRAM比DRAM更加昂贵,带来的效果是访问更快。(一个桌面系统SRAM不超过几兆字节,DRAM可有几百到几千字节)
然后...
分类:
其他好文 时间:
2014-06-07 14:48:49
阅读次数:
198
java实现用邻接矩阵(相邻矩阵)实现图,缺点是矩阵中大量的0元素会耗费大量的存储空间
public class Graph {
final int MAX_VERTEX = 10;// 最多10个顶点
Vertex[] vertex;// 顶点数组
int[][] adjacency;// 邻接矩阵
int numOfVertex;// 当前图...
分类:
其他好文 时间:
2014-06-20 12:12:49
阅读次数:
207
题目:
Roman numerals come from the ancient Roman numbering system. They are based on specific letters of the alphabet which are combined to signify the sum (or, in some cases, the difference) of th...
分类:
其他好文 时间:
2014-06-20 12:27:09
阅读次数:
394
编写高质量代码——运算符重载,是成员函数还是友元函数...
分类:
其他好文 时间:
2014-06-20 13:30:30
阅读次数:
164