Some notes in Stanford CS106A(4)
1.x++ is a method , the return value is x. (post increment)
++x is also a method , the return value is x+1. (pre increment)
2.muti-dim Array
int[][] matrix = new int[2][3];
matrix[0][1] = 5;
3.Boxing : Creating an object around a particular primitive
Unboxing : getting the value out of the box
4.array and ArrayList
Pros of ArrayList : dynamic resizing , contains other operations
Cons of ArrayList : less efficient , syntax bulky ( error prone ) , pre java 5.0
If have fixed size , use array.
5.Map is a interface in java, it's to add Key and value pairs.
Dictionary is a map.
6.Iterator : list through set of values. Hashmap has no ordering , so we use Iterator get the order. ( ex. it.next() )
Some notes in Stanford CS106A(4)的更多相关文章
- Some notes in Stanford CS106A(3)
1.If ( str1==str2 ) means if str1 and str2 are refers to the same OBJECT. But when compare string , ...
- Some notes in Stanford CS106A(2)
1.Local variable(local) ex. int i = 0; factorial(i); the "i" outside the method factorial( ...
- Some notes in Stanford CS106A(1)
Karel world 1.During make a divider operation --int x=5; double y = x/2 => y=2 we need sth as a ...
- Lotus Notes中编程发送邮件(二)
在编程发送各种类似通知的邮件时,时常会需要发件人显示为某个特定的帐户,比如某个部门的名称或者管理员的名字.另一种需求是,用户收到某封邮件后,回复邮件的地址不同于发件人栏显示的地址.而正常情况下,发送邮 ...
- 46. Lotus Notes中编程发送邮件(一)
邮件是Lotus Notes体系的核心和基本功能,以至于Send()是NotesDocument的一个方法,任何一个文档都可以被发送出去,Notes里的一封邮件也只是一个有一些特殊字段的文档.在程序开 ...
- Stanford NLP学习笔记:7. 情感分析(Sentiment)
1. 什么是情感分析(别名:观点提取,主题分析,情感挖掘...) 应用: 1)正面VS负面的影评(影片分类问题) 2)产品/品牌评价: Google产品搜索 3)twitter情感预测股票市场行情/消 ...
- Machine Learning Algorithms Study Notes(4)—无监督学习(unsupervised learning)
1 Unsupervised Learning 1.1 k-means clustering algorithm 1.1.1 算法思想 1.1.2 k-means的不足之处 1 ...
- 84. 从视图索引说Notes数据库(下)
作用和代价上文介绍了关系型数据库里的索引.Notes数据库里的索引隐藏在视图概念里(本文的讨论仅仅针对Notes的视图索引,不包括全文索引.).开发者创建的视图仅仅是存放在数据库里的一条设计文档.数据 ...
- 83. 从视图索引说Notes数据库(上)
索引是数据库系统重要的feature,不管是传统的关系型数据库还是时兴的NoSQL数据库,它攸关查询性能,因而在设计数据库时须要细加考量.然而,Lotus Notes隐藏技术底层.以用户界面为导向.追 ...
随机推荐
- 按照分层设计理念,完成《XXX需求征集系统》的概念结构设计
按照分层设计理念,完成<XXX需求征集系统>的概念结构设计. 1.概要架构-初步设计 有关<XXX需求征集系统>的鲁棒图如下: 2.概要架构之高层分割 切系统为系统: 高层功能 ...
- 前端使用JS-SDK上传图片(文件)到七牛
Qiniu-JavaScript-SDK (下文简称为 JS-SDK)适用于 :IE11.Edge.Chrome.Firefox.Safari 等浏览器,基于七牛云存储官方 API 构建,其中上传功能 ...
- 爬虫(五)requests模块2
引入 有些时候,我们在使用爬虫程序去爬取一些用户相关信息的数据(爬取张三“人人网”个人主页数据)时,如果使用之前requests模块常规操作时,往往达不到我们想要的目的,例如: #!/usr/bin/ ...
- samba及其基本应用
Samba 137/udp,138/udp,139/tcp,445/tcp windowns主机共享: linux主机进行访问查看资源:smbclient -L Server_IP -U 用户名 li ...
- oracle中delete、truncate、drop的区别 (转载)
一.delete 1.delete是DML,执行delete操作时,每次从表中删除一行,并且同时将该行的的删除操作记录在redo和undo表空间中以便进行回滚(rollback)和重做操作,但要注意表 ...
- sys 模块的应用
1.常见的sys模块的应用: 1.在解释器启动后, argv 列表包含了传递给脚本的所有参数, 列表的第一个元素为脚本自身的名称 argv(命令行参数个数) #!/usr/bin/env python ...
- js设置radio单选框值选中
html页面: <div> <label><input type="radio" name="sex" value="m ...
- php 查询mysql数据批量转为PDF文件二(批量使用wkhtmltopdf html导出PDF)
上节讲到配置wkhtmltopdf,这节讲下如何批量操作 首先讲下wkhtmltopdf如何使用 直接命令行输入: wkhtmltopdf http://www.baidu.com/ baidu.p ...
- 棋牌平台开发教程之扎金花大小比较算法在php中的实现
PHP中扎金花比大小如何实现 在棋牌游戏中,不管是现实的还是线上的,扎金花无疑是最热门棋牌游戏之一,鄙人从小就酷爱扎金花,机缘巧合后面从事了IT行业,话不多说,直接进去正题吧. 扎金花两副牌的比较规则 ...
- CSS可见区域全局居中
top:$(document).scrollTop() + ($(document).height() - $(document).scrollTop())/2,