###新的标签
- mark
- video
- audio
###存储
- localStorage - 没有时间限制的数据存储 ,永远有效。
- sessionStorage - 针对一个 session 的数据存储,回话内有效。
###INPUT新的type类型
let s:tlist_def_scala_settings = 'scala;t:trait;c:class;T:type;' . | |
\ 'm:method;C:constant;l:local;p:package;o:object' |
###新的标签
###存储
###INPUT新的type类型
< ?xml version="1.0" encoding="utf-8"?>
< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
< TextView
###运行方式
###数据结构
def foo | |
f = Proc.new { return "return from foo from inside proc" } | |
f.call # control leaves foo here | |
return "return from foo" | |
end | |
def bar | |
f = lambda { return "return from lambda" } | |
puts f.call # control does not leave bar here prints "return from lambda" | |
return "return from bar" |
***********************JS原型 | |
1. js 中 apply 和 call 区别是必须apply(someobj,[a,b]),call(someobj,a,b) | |
1. 函数P.prototype,对象有new P().__proto__=P.prototype的原型链 | |
p.__proto__.constructor ==Person | |
{}.prototype.constructor=={} | |
Object.prototype.constructor==Object | |
a.prototype.constructor==a | |
2. 每个对象都有函数constructor和__proto__(Object对象没有) | |
3. 每个constructor中都有prototype属性和__proto__属性. |
###0)同步,异步(在这里指的是application和kernel之间的交互方式,是否需要排队),阻塞,非阻塞(application是否等待IO操作的完成,是否需要领回执单)
同步:不立即返回,如排队买票,当前线程不挂起
异步:抽取流水号,等被叫号,可立即返回,请求方和处理方沟通方式包括:状态,通知,回调。
阻塞:不立即返回,线程被挂起。
非阻塞:不等待IO操作的完成就开始执行其它操作。
###1) 测试网页请求时间#
def abstract(func): | |
func.__isabstract__ = True | |
return func | |
class Abstract(type): | |
def __new__(metaclz, definedclzname, supers, attrs): | |
clz = type.__new__(metaclz, definedclzname, supers, attrs) | |
# 這個類別自己定義的抽象方法 | |
abstracts = {name | |
for name, value in attrs.items() |
package test | |
object Simon_test { | |
class My_1{ | |
private[this] val name = "Simon" | |
def showName(my:My_1){ | |
println(my.name) //Error | |
println(this.name) //OK | |
} |