- 博客(49)
- 收藏
- 关注
原创 Chapter 4. Composing Objects
Chapter 4. Composing Objects So far, we've covered the low‐level basics of thread safety and synchronization. But we don't want to have to analyze each memory access to ensure th...
2015-04-01 09:11:33 248
原创 RTNETLINK answers: File exists
[root@localhost network]# service network restartRestarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details. ...
2014-11-17 03:53:20 459
原创 centos7 firefox 安装flash
先查询firefox的插件是要放在那个目录下面:[test@localhost ~]$ rpm -ql firefox/usr/bin/firefox/usr/lib64/firefox/usr/lib64/firefox/LICENSE/usr/lib64/firefox/application.ini/usr/lib64/firefox/browser/blockli...
2014-11-17 02:59:00 348
原创 device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
[root@localhost wpa_supplicant]# service NetworkManager statusRedirecting to /bin/systemctl status NetworkManager.serviceNetworkManager.service - Network Manager Loaded: loaded (/usr/lib/...
2014-11-17 01:21:07 2597
原创 第八章、Linux 磁盘与文件系统管理
磁盘文件系统(filesystem)整颗磁盘的组成主要有:圆形的磁盘盘片(记录数据);机械手臂,与在机械手臂上的磁盘读取头(可擦写磁盘盘片上的数据);主轴马达,可以转动磁盘盘片,让机械手臂的读取头在磁盘盘片上读写数据。磁盘盘片的物理组成(假设此磁盘为单盘片):扇区(Sector)为最小的物理储存单位,每个扇区为 512 bytes;将扇区组成...
2014-11-08 15:15:58 121
原创 centos7安装wireless-tools
无法用yum安装wireless-tools [root@localhost wireless_tools.29]# yum install -y wireless-toolsLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.a...
2014-11-08 12:18:28 3554 3
原创 第十一章、认识与学习 BASH
bash 的环境配置文件login 与 non-login shelllogin shell:取得 bash 时需要完整的登陆流程的,就称为 login shell。举例来说,你要由 tty1 ~ tty6 登陆,需要输入用户的账号与密码,此时取得的 bash 就称为『 login shell 』;non-login shell:取得 bash 接口的方法不需要重复登陆的...
2014-09-22 23:33:13 129
原创 第十一章、认识与学习 BASH Bash Shell 的操作环境
Bash Shell 的操作环境:路径与命令搜寻顺序 命令运行的顺序:以相对/绝对路径运行命令,例如『 /bin/ls 』或『 ./ls 』;由 alias 找到该命令来运行;运行 bash 内建的 (builtin) 命令;运行搜寻$PATH到的第一个命令来。举例来说,你可以下达 /bin/ls 及单纯的 ls 看看,会发现使用 ls 有颜色但是 /bin/...
2014-09-22 23:16:10 105
原创 第十一章、认识与学习 BASH
Bash Shell 的操作环境:路径与命令搜寻顺序 以相对/绝对路径运行命令,例如『 /bin/ls 』或『 ./ls 』;由 alias 找到该命令来运行;由 bash 内建的 (builtin) 命令来运行;透过 $PATH 这个变量的顺序搜寻到的第一个命令来运行。举例来说,你可以下达 /bin/ls 及单纯的 ls 看看,会发现使用 ls 有颜色但是 ...
2014-09-22 03:00:58 121
原创 第十一章、认识与学习 BASH 命令别名与历史命令
命令别名与历史命令:在 Linux 里面,使用 clear 来清除屏幕。命令别名配置: alias, unalias [root@www ~]# alias lm='ls -al | more'[root@www ~]# alias rm='rm -i'[root@www ~]# aliasalias cp='cp -i'...
2014-09-22 02:41:19 113
原创 第十一章、认识与学习 BASH Shell 的变量功能
什么是变量?让某一个特定字符串代表不固定的内容变量的可变性与方便性 图 2.1.1、程序、变量与不同用户的关系如上图所示,由于系统已经帮我们规划好 MAIL 这个变量,所以用户只要知道 mail 这个命令如何使用即可, mail 会主动的取用 MAIL 这个变量,就能够如上图所示的取得自己的邮件信箱了!(注意大小写,小写的 mail 是命令, 大写的...
2014-09-21 02:43:33 160
原创 第十一章、认识与学习 BASH
管理整个计算机硬件的是操作系统的核心 (kernel),这个核心是需要被保护的! 所以一般使用者就只能透过 shell 来跟核心沟通,以让核心完成我们的工作。 硬件、核心与 Shell让计算机播放声音:硬件:『声卡芯片』;核心管理:操作系统的核心可以支持这个芯片组,提供芯片的驱动程序;应用程序:需要使用者输入发生声音的命令! 图 1.1.1、硬件、核...
2014-09-21 02:26:19 100
原创 7 the Adapter and Facade Patterns Being Adaptive
The Adapter Pattern's role is to convert one interface into another.The Adapter Pattern converts the interface of a class into another interface the clients expect.Adapter lets classes work togeth...
2014-07-15 16:42:32 160
原创 CentOS 命令行下连接加密模式为 WPA/WPA2-PSK 的无线网络
记录了 CentOS 最小化安装后如何配置和连接无线网络,当时的情况是路由器使用的WEP加密方式,所以设置密码的时候可以直接使用明文密码。后来当把路由器的加密模式设置为 WPA/WPA2-PSK的时候,发现已经无法连接无线网络了,原因是当使用 WPA/WPA2-PSK 加密模式之后客户端不能直接发送明文密码,而是要使用加密之后的密码,既然我们知道了原因我们该怎么做呢? 首先我们要安装一个帮我们...
2014-06-13 03:20:14 993
原创 大型网站系统与Java中间件实践第二章的笔记
我本身不是很了解这方面的知识,看了本章之后从理论上收获颇多,很希望能够阅读其他章节,并且很希望其他章节给出具体的实现方案,用实际中的例子详细讲解,最好是能够附带详细的代码。分布式系统的难点?分布式系统的搭建涉及到了很多方面的知识,比如硬件 系统 各种中间件等等性能的测试很难大型网站及其架构演进过程?1.服务器1.1 数据库服务器独立和集群 1.2应用服...
2014-06-12 01:18:25 149
原创 大型网站系统与Java中间件实践 第二章大型网站及其架构演进过程
2.1什么是大型网站 通过第 1 章我们了解了分布式系统的相关基础知识, 大型网站是一种很常见的分布式系统,而本书重点要介绍的中间件系统也是在大型网站的架构变化中出现并发展的,那么我们很有必要从大型网站的架构演进过程入手,先从整体上了解这个变化过程。首先,我们来看一下怎样的网站被称为大型网站。关于大型网站的定义,在学术上并没有精确地定义,下面是将笔者自己的理解介绍给大家。 网站是...
2014-06-11 23:35:25 187
原创 javascript的prototype链
The true prototype of an object is held by [[Prototype]] internal property:function Foo () {}var bar = new Foo(); //the [[Prototype]] of bar is Foo.prototypefunction Baz () {} //Baz.proto...
2014-06-04 06:13:54 95
原创 9.2.5. Network Bridge
A network bridge is a Link Layer device which forwards traffic between networks based on MAC addresses and is therefore also referred to as a Layer 2 device. It makes forwarding decisions based on ta...
2014-05-18 16:15:00 169
原创 Understanding “Prototypes” in JavaScript
For the purposes of this post, I will be talking about JavaScript objects using syntax defined in ECMAScript 5.1. The basic semantics existed in Edition 3, but they were not well exposed.A Whole N...
2014-05-18 15:42:44 161
原创 Firewall
IntroductionTraffic into or out of a computer is filtered through "ports," which are relatively arbitrary designations appended to traffic packets destined for use by a particular application.By ...
2014-05-08 01:25:35 200 1
原创 Configuring Bridged Networking
Configuring Bridged NetworkingWhen you install Workstation on a Windows or Linux host system, a bridged network (VMnet0) is set up for you. Bridged networking connects a virtual machine ...
2014-05-07 23:52:16 158
原创 Understanding Common Networking Configurations
You can configure bridged networking, NAT, and host-only networking for virtual machines. You can also use the virtual networking components to create sophisticated custom virtual networks.Brid...
2014-05-07 23:44:28 65
原创 RHEL / CentOS Linux: Mount and Access NTFS Partition
How to enable NTFS support on CentOS Linux version 5 or 6? How do I mount ntfs partition under RHEL 5 or 6?First, you need to install EPEL repo as described here. The following command will turn in ...
2014-04-25 02:58:58 91
原创 Thinking in java——Generics Using function objects as strategies
This final example will create truly generic code using the adapter approach described in the previous section. The example began as an attempt to create a sum over a sequence of elements (of any typ...
2014-04-20 03:52:30 104
原创 Thinking in java——Generics Applying a method to a sequence
Applying a method to a sequenceReflection provides some interesting possibilities, but it relegates all the type checking to run time, and is thus undesirable in many situations. If you can achiev...
2014-04-19 16:13:19 159
原创 Difference between WeakReference vs SoftReference vs PhantomReference vs Strong
WeakReference and SoftReference were added into Java API from long time but not every Java programmer is familiar with it. Which means there is a gap between where and how to use WeakReference and So...
2014-04-18 22:29:54 94
原创 Thinking in java——Generics Mixins
Mixins The term mixin seems to have acquired numerous meanings over time, but the fundamental concept is that of mixing in capabilities from multiple classes in order to produce a resulting class ...
2014-04-18 00:47:56 92
原创 Thinking in java——Generics Exceptions
ExceptionsBecause of erasure, the use of generics with exceptions is extremely limited. A catch clause cannot catch an exception of a generic type, because the exact type of the exception must be k...
2014-04-18 00:40:04 117
原创 Thinking in java——Generics 产生检查类型的容器类
Dynamic type safetyBecause you can pass generic containers to pre-Java SE5 code, there's still the possibility that old-style code can corrupt your containers. Java SE5 has a set of utilities in ja...
2014-04-18 00:28:12 93
原创 thinking in java Generics Self-bounded
Self-bounded typesThere's one rather mind-bending(adj. 离奇古怪令人费解的;强烈影响心绪的) idiom that appears periodically in Java generics. Here's what it looks like: class SelfBounded<T extends SelfBounded&...
2014-04-17 23:35:49 181
原创 JavaScript Scoping and Hoisting
http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html Do you know what value will be alerted if the following is executed as a JavaScript program? var foo = 1;function ba...
2014-04-17 11:55:26 115
原创 The Secret Life of JavaScript Primitives
You may not know it but, in JavaScript, whenever you interact with string, number or boolean primitives you enter a hidden world of object shadows and coercion. So dust off your Sherlock Holmes...
2014-04-15 09:03:09 114
原创 `instanceof` considered harmful (or how to write a robust `isArray`)
Checking types in Javascript is well known as a pretty unreliable process.Good old typeof operator is often useless when it comes to certain types of values:typeof null; // "object"typeof [];...
2014-04-15 09:02:48 100
原创 Checking Types in Javascript
Have you ever wondered: what is the correct way to check if a Javascript variable is an Array? Do a Google search and you will get a great variety of answers. And, unfortunately, there's is no c...
2014-04-14 16:07:45 100
原创 Understanding typeof, instanceof and constructor in JavaScript
They say in JavaScript “everything is an object”. They’re wrong. Some types in JavaScript are so-called “primitive types”, and they don’t act like objects. These types are:UndefinedNullBoolea...
2014-04-14 13:18:38 105
原创 chapter2 JAVASCRIPT: AN OVERVIEW
INTRODUCTIONJAVASCRIPT IS A prototype-based, object-oriented, loosely-typed dynamic scripting anguage. It has powerful features from the functional world, such as closures and higher-order func...
2014-04-14 07:03:07 126
原创 “'express' 不是内部或外部命令,也不是可运行的程序”
In later versions of express comand line was migrated to a separate module: express-generetorusenpm install -g express-generator@3and could use the express command
2014-04-14 02:48:51 105
原创 chapter1 THE SETUP
INSTALLING NODE.JS IS a painless process.Since its conception, one of its goals has been maintaining a small number of dependencies that would make the compilation or installation of the project ver...
2014-04-14 01:19:52 108
原创 Thinking in java——Generics
The mystery of erasureAs you begin to delve more deeply into generics, there are a number of things that won't initially make sense. For example, although you can say ArrayList.class, you cannot sa...
2014-04-12 00:35:56 84
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人