2015-11-29 Oliver Wang
没什么好解释的,直接看代码吧。 js (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. //define(['jquery', 'underscore'], factory); } else if (typeof exports === 'object') { // Node/CommonJS style for Browserify/Seajs module.exports = 继续阅读 »
2015-09-17 veryyoung
近来 AMD 和 CMD 的讨论异常的激烈,他们到底有哪些相同或不同的呢? more 本来想写篇文章说明一下,结果随便 Google 一下,发现 SeaJS 的作者玉伯已经说的很明白了! 直接贴链接吧! 继续阅读 »
2014-01-01 Klaus Ma
Environment LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch: graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.4 (Santiago) Release: 6.4 Codename: San 继续阅读 »
2017-07-09 AnnatarHe
组装电脑 最近特别想组装一台电脑。起因是我用了 Mac 半年之后感觉并不是那么的好。它也不是我梦想中的完美开发环境,依旧很痛苦。被折磨了很久就想自己组一台电脑。 作为一个程序员,我肯定是想上高配。无奈钱包不够,只给了自己 4k 的预算。不过。。。。最后还是超支了,到了 7k T_T 由于我第一台电脑的 CPU 是 AMD 家的,是在小学时候买的。感觉并不好,电脑会很卡。而且网上风评也都是 AMD 的 CPU 一直是被压着打的节奏。所以一开始完全没有考虑用 AMD 的。后来本来是准备上 i5。查了一些信息之后发现不用买显卡,这样剩下的预算就飙到了 i7,感觉 i7 7700 挺不错的。然后就放在了购物车里面。 关于显卡是选择了 继续阅读 »
2015-04-15 KasperDeng
Installation Download go official & Getting Started golang中国 Go Complier: offcial: gc GNU GC: gccgo Go supports 3 instruction sets amd64 (a.k.a. x86-64); 6g,6l(Plan9 gc),6c,6a // support x84-64, naming as amd64 is to amd's contribution of inventing 64bit instruction set 386 (a.k.a. x86 or x86-32); 8g,8l,8c(Plan9 gc) 继续阅读 »
2015-12-31 浩阳
content {:toc} 起因 起因是这样的,在尝试前后端分离的这条道路上,我自己也在不断摸索,感觉要把大部分的坑都踩踩了。目前我用的技术是: webpack 自动构建 AMD 模块化 js Sass 预处理 CSS 使用前端模板引擎 handlebars 解决动态操作将 html 拼接在 js 中的问题 但最近写了一个项目类似知乎这样的多页网站。前端 url 的处理让我觉得不够优雅。我使用的是 hash 的方式处理动态 url 的,为此我专门在知乎上提了一个问题:前端如何处理动态url? 继续阅读 »
2015-07-13 Eric Wang
Version:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 函数 可接受任意数量参数的函数 为了能让一个函数接受任意数量的位置参数,可以使用一个*参数 ```python def avg(first, *rest): return (first + sum(rest)) / (1 + len(rest)) Sample use avg(1, 2) # 1.5 avg(1, 2, 3, 4) # 2.5 `` 在这个例子中,rest`是由所有其他位置参数组成的元组。然后我们 继续阅读 »
2015-07-04 Eric Wang
Version:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 数字日期和时间 数字的四舍五入 ```python !/usr/bin/python coding: UTF-8 """ Created on 2015/7/3 23:01 @author: 'WX' """ print(round(1.23, 1)) # Prints 1.2 print(round(1.27, 1)) # Prints 1.3 print(round(-1.27, 1)) # Prints 继续阅读 »
2015-07-06 Eric Wang
Version:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 文件与I/O 读写文本数据 使用带有rt模式的open()函数读取文本文件 ```python with open('test.csv', mode='rt', encoding='utf-8') as f: data = f.read() print(data) with open('test.csv', mode='rt', encoding='utf-8') as f: for line in 继续阅读 »
2015-07-02 Eric Wang
Version:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 There are two ways of constructing a software design: one way is to make it so simple that there are obviously no deficiences; the other is to make it so complicated that there are no obvious deficiences. ---- C.A.R. 继续阅读 »