📣 独立日限时特惠: VIP通行证立减$68
查看: 38673| 回复: 163
跳转到指定楼层
上一主题 下一主题
收起左侧

撸起袖子加油干。。俯身落实一百天。。

全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
周日 南京 雨
不想做没有目标得过且过的人 不想做什么都懂就是没有行动的人
自己的惰性真是可怕 目标有了 行动方案有了 就是懒得动啊
不过做一条咸鱼 每天吃吃喝喝 吹吹牛逼是真的舒服
所以就把目标修改为在加州海滩上吹牛逼吧
从没在社交媒体上立过什么flag 今天试试
可能外部的压力会有些用 毕竟这么大岁数了 要脸
先来个一百天吧 尝尝咸淡



补充内容 (2018-6-27 00:20):
6.26
周二 包头 热
一百天结束
再来个flag
从现在到离境前多刷200道题

评分

参与人数 4大米 +23 收起 理由
chenWick712 + 3 给你点个赞!
carry12345678 + 10
michaelcorleone + 5 same dream
evanescence + 5 给你点个赞!

查看全部评分


上一篇:PRE4PHD
下一篇:懒癌晚期督促自己刷题
推荐
 楼主| shaonan 2018-5-21 23:54:14 | 只看该作者
全局:
5.21
Hashtable + String |

收到了面试邀请, 和金一夫畅聊三小时,开始意淫在一号公路上开车的样子了。。
回复

使用道具 举报

推荐
 楼主| shaonan 2018-3-19 00:26:55 | 只看该作者
全局:
3.18
一:完成61b abstract classes和Java packages,lab5
1. abstract classes should just be extended, we cannot say new on that type.
2. abstract method has no body, and abstract method should only appear in abstract class. we can use it to define part of the protocol for a group of subclasses and for polymorphism.
3. the first concrete class must implements all abstract methods
4. the compiler decides whether you can call a method based on the reference type, not the actual object type.
5. java doesnot allow multiple inheritance, but you can implements as many interfaces as you want. the interface is 100% pure abstract class. and the methods in interface are all public and abstract, we'd better donot type these two words.
6. use super to invoke superclass's methods.

二:leetcode 119. Pascal's Triangle II
回复

使用道具 举报

推荐
 楼主| shaonan 2018-4-10 01:18:52 | 只看该作者
全局:
4.9
一:chest day
bench press(40*10reps*1sets 60*10reps*3sets 80*5reps*3sets)
butterfly (50 60 70 80 10reps/set)
incline press (30*10reps*1set 40*10reps*2sets)
cable crossover (30*10reps*4sets 40*10reps*2sets)
二:cs61b lab11
三:操作系统第二章
处理器管理
处理器管理是操作系统的重要组成部分,由于程序都要在处理器上执行实现,所以处理器管理的优劣直接影响系统性能。程序以进程的形式占用处理器和系统资源,所以处理器管理中最重要的是处理器调度,即控制,协调进程对处理器的竞争。

处理器

程序可分为系统程序(完成系统任务,有权管理和分配资源)和应用程序(完成应用任务,只能向系统申请使用资源)。为区分这两种程序,在处理器硬件上设置标志位,将处理器划分为两个状态:内核态(管态)和用户态(目态)
特权指令(操作系统可控制的,在内核态运行的全部机器指令,包括所有敏感性操作)和非特权指令(应用程序执行的,全部机器指令的子集,在内核态和用户态都可以执行)
处理器状态的转换(从目态到管态):1.当程序请求执行系统调用时,2.当程序运行时产生中断事件(例如I/O操作完成),转去执行中断处理程序时,3.当程序运行时发生异常事件(例如在目态执行特权指令),转向执行异常处理程序时。所以,中断和异常是用户态到内核态转换的唯一途径。
用户栈(保存应用程序函数调用的参数,返回值,返回点,局部变量等)和核心栈(核心栈或系统栈,1.保护中断现场,处理嵌套中断,2.保存系统程序的调用参数,返回值,返回点。。。)
程序状态字:将程序运行时的动态信息(例如当前处理器在目态还是管态,下一条要执行指令的位置等)汇集在一起,存放在处理器的一组特殊的寄存器里,称为program status word PSW


中断技术
(指在程序执行过程中遇到需要紧急处理的事件时,暂时中止现行程序在cpu上的运行,转而执行相应事件处理程序,处理完再返回断点继续执行)

硬中断(硬件发出或产生的中断):分为外中断(称为中断或异步中断,来自处理器外部,包括时钟中断,键盘中断等)和内中断(称为异常或同步中断,来自处理器内部的中断信号,包括访管中断(执行系统调用引起),程序性异常(除数为0,地址越界等)等等)
中断(由与当前运行程序无关的中断信号触发,故与cpu是异步的)和异常(源于现行程序在执行指令过程中检测到例外,与cpu同步)
中断/异常响应:1.发现中断源(对于中断,cpu每执行完一条指令就去检查中断控制器看是否有中断事件发生;对于异常,是在cpu执行指令时,发现异常就转向内核的异常处理程序),2.保护现场,3.转向中断/异常事件处理程序执行,4.恢复现场
多重中断处理方法:1.设置中断优先级,2.设置中断屏蔽,在处理某个中断时可不理会新发生的中断

进程
(为使多个程序并发执行,提高资源利用率和系统效率而引入进程。进程是具有独立功能的程序在某个数据集合上的一次运行活动,是操作系统进行资源分配和保护的基本单位)

特点:动态性(程序是静态的永久存在,进程是动态的有生命周期),共享性(同一程序运行在不同数据集上就是多个不同进程,所以程序和进程不是一一对应的),独立性(是操作系统中的一个独立实体,有自己的虚存空间,程序计数器,内部状态),制约性(进程间因共享资源或协同工作而相互制约,执行速度不可预测),并发行(在单处理器系统可并发执行,在多处理器系统可并行执行)
进程状态和转换:                                                                                                                                                                                                                                                                                                                       可能还会有挂起就绪态和挂起阻塞态(当内存资源不足或发生故障时,会把一些进程对换到磁盘对换区,释放资源,之后再解除挂起)
进程的描述和组成:
进程映像(执行的程序和操作的数据必不可少,刻画进程的静态特征;动态特征包括:进程状态,占用资源状况,调度信息等)
进程上下文(进程的物理实体以及支持进程运行的环境合称为进程上下文)
进程控制块(process control block,PCB,是进程存在的唯一标识,操作系统通过PCB掌握进程情况)
进程队列(针对可能存在多个进程处于就绪态和阻塞态,需要将同一状态的多个进程放入进程队列,实现方式有链接方式(链表slist,dlist)和索引方式(表map))


线程
(为了使并发粒度更细,将进程的“独立资源分配”和“被调度分派执行”两大功能的第二个承担下来。线程作为系统调度和分派的基本单位)

特点:
快速线程切换:同一进程中的多个线程切换只需改变堆栈和寄存器,地址空间不变
通信方便:共享进程的内存和文件
减少管理开销:线程的创建和撤销工作比进程少很多,无需再分配各种资源
并发程度更高:多线程适宜并行工作
线程也有生命周期,也有运行,就绪,等待,终止状态,无挂起态,因线程不是资源拥有单位。



处理器调度
(如何确定时间片长短,怎样在进程之间分配处理器资源,以何种原则挑选批处理作业进入内存运行。。。)

处理器调度层次
高级调度:作业调度/长程调度。控制多道程序的道数。
中级调度:平衡调度/中程调度。决定内存中可以容纳的进程数,完成内外存的进程对换工作。
低级调度:进程、线程调度/短程调度。决定就绪队列中的哪个进程/线程获得处理器。
注:高级调度面向作业,中级往往面向进程,低级往往面向进程/线程。
低级调度(操作系统最核心的部分,频繁执行,其优劣直接影响系统性能):
功能:
实现调度策略:选哪个进程/线程?
实现调度机制:如何时分复用cpu,如何处理上下文切换。。。
类型:
剥夺式:抢先式。可剥夺正在运行的进程/线程给其他。
非剥夺式:非抢先式。一旦某个进程/线程开始运行便不可被剥夺。
主要低级调度算法:
先来先服务算法(first come first served,FCFS)
最短作业优先算法(shortest job first,SJF)
最短剩余时间优先算法(shortest remaining time first,SRTF)
最高响应比优先算法(highest response ratio first,HRRF)
优先级调度算法
轮转调度算法(round-robin,RR)
多级反馈队列调度算法(multi-level feedback queue,MLFQ)
回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-20 02:17:45 | 只看该作者
全局:
3.19
一:leg day: squat 100(5*4) 80(8*2)60(10*2) rear leg pull 70 80 90  leg press 290(10*2)  260(10*2) 230  190
二:cs61b pj1
三:leetcode 1. Two Sum
回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-21 01:38:56 | 只看该作者
全局:
3.20
一:finish cs61bb pj1
二:
leetcode
21. Merge Two Sorted Lists
dummy node recursion(base case, divide and conquer)
53. Maximum Subarray
have not understood it completely...

ps: 记录一下黑妹分享的鸡汤



以及pj1中让人心生向往的话:

回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-22 03:06:03 | 只看该作者
全局:
3.21
一:chest day: bench press(80 3sets*5reps 60 1set*10rep)  incline bench press(50 4set*9reps) butterfly (70 4sets*8reps) cable crossover (60 4sets*10reps)
二:learnt git : \git add filename   \git commit -m "description"   \git status   \git diff   \git log   \git reflog   \git reset --hard commit_id   \git checkout -- filename   \git reset HEAD filename   \git rm filename
三:cs61b hw4: inheritance!
1. you can add new fields in your subclass, but not modify fields in superclass
2.in the constructor of your subclass, it will invoke super.constructor() automatically, only if you invoke another super's constructor with params.
3.inheritance means you want to use some properties of superclass, and specify some of them or add new ones. you should only focus on the specifying and adding parts. if you don't change the params and return type(can be subclass of the origin return type), you are overriding. if you change the params(order, type or numbers of params ), no matter whether you changed the return type, you are overloading!
四:cs61b Exceptions
1.when a run-time error occurs, JVM will throw a exception, you should solve it, or your program will halt. using try and catch to solve such exceptions. try can be followed by several catches, and the order is matter, cuz the program will match first proper catch. so put the most specific one on the top and the most general one on the bottom.
2. class extends Exception        method throws XxxException      in method body throw new XxxException()
3.if there are anything should be executed no matter exception occurs or not, you should put finally{} after catch. and finally will run even if there is return in try or catch.
4.when facing exceptions, you must follow try/catch or duck principle, which means other than use try/catch to solve them, you can just add the "throws XxxException" to modify your method when you calling the risky method. in this way, the method, which called the risky method , become a risky method. anyone who call this method must make a choice between try/catch and duck.
5.the top-level of class exception is Throwable, and Exception and Error are subclass of it. error and RunTimeException are unchecked, which means method dealing with them can throw exceptions without in a class with throws XxxException modifier.  other exceptions are checked, which means you must make the throws modifier.

ps:
今天和黑妹聊了俩小时,给我讲述了她疯狂关心她的牙买加妈妈制定的交往对象标准,以及她在牙买加度过的因为聪明而受校园霸凌的小学生涯,面对一个另一国度的同龄女人突然对你袒露心扉,还真有点不适应。。时不时的再来个害羞的小表情。。我仿佛看到了黑妹狂野卷发下水汪汪的大眼睛以及粉嫩的少女心。。
回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-23 09:09:34 | 只看该作者
全局:
3.22
??? 第四天就颓了???
今天好像只是学会了用github,看了看树??? 晚上我妈给我打电话说感觉我今天有好事。。接着就收到duke面试了。。然后就聊了一晚上天???下不为例下不为例。。。 慎独啊。。。

GitHub:
1.create a new repo, and use ssh in your terminal to connect that repo
2.connect the local git repo and the remote repo using "git remote add origin xxxxx"
3.push local contents to remote repo(named origin with the master branch) using "git push -u origin master"
4.clone other's repo using "git clone xxxxx"
5.fetch and merge any modification in remote repo using "git pull xxxxx"
回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-24 01:50:38 | 只看该作者
全局:
3.33
一:binary search tree  :  implement find(), insert() and delete() three functions
二:cs61b 16 more java
1.class without public can not be subclassed in another package, class with final modifier cannot be subclass, class with a private constructor cannot have subclass
2.final variables cannot be changed when initialized, final method cannot be overridden, final class cannot be extended
3.generics <T> .  
   difference between java generics and c++ templates : java compiles one bytecode for a single class no matter what type of object it contains . while c++ compiles for every types of objects, whose cons is that one class may turn into lots of machine code, and the pros are you can use primitive type in it and you get code optimized for every type of objects. however java generics do not work with primitive types.
4.you should avoid fields and method shadowing!
三:cs61b lab 6. review the exception. and how to compile java code in terminal : javac -d dir1 dir2/*.java java xxxxx (xxxxx should be completed class name including package name).
回复

使用道具 举报

🔗
wargum 2018-3-24 02:35:17 | 只看该作者
本楼:
全局:
楼主加油
回复

使用道具 举报

🔗
 楼主| shaonan 2018-3-25 01:38:09 | 只看该作者
全局:
3.34
一: shoulder-gains workout:
1. seated shoulder press (20*10reps 30*10reps 40*9reps 50*7reps*2)
2.rear-delt fly (10*15reps*2  15*15reps*2)  
3.cable single-arm lateral raise (30*10reps*2 40*7reps*2)
4.external rotation (30*12reps*2 40*10reps*1)
二:cs61b lab6 finished and pushed to github
三:cs61b 18 encapsulation : is a way of preventing our private fields and data structure.
pros:
1.if we know the interface we can implement a new version of ADT independantly
2.preventing people from visiting private data and this can reduce debugging time a lot
3.it is good for teamwork, documentation and maintenance
四:leetcode 100. Same Tree, 111. Minimum Depth of Binary Tree, 104. Maximum Depth of Binary Tree, 112. Path Sum
五:计算机系统基础
1. 计算机系统抽象层:
2. 冯诺伊曼结构:控制器 运算器 存储器 输入设备 输出设备
3. 计算机如何工作: 执行程序前(将数据和指令按序存放在存储器中,程序起始地址给PC) 执行程序(按照PC去存储器中取指令-》指令译码-》取操作数-》执行指令-》回写结果-》修改PC值-》继续下一指令)

回复

使用道具 举报

🔗
vtiaocao 2018-3-25 02:05:56 | 只看该作者
全局:
lz加油,先pink了
lz不是刚毕业么。。怎么就上岁数了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表