首先要搞清楚“空两格”的意义是什么?段首空格表示段落重新开始,基本小学写作文都这么教的。但“空两格”真的就能清楚标示段落么?这个问题被放大到互联网上,尤其在对比英文段落效果后,中文段落“空两格”的传统开始受到质疑。先来看新浪博客网志页的两格例子:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'start...' | |
git lfs install | |
git clone https://huggingface.co/coreml/coreml-lofi-V2 | |
git clone https://huggingface.co/coreml/coreml-realisticVision-v20 | |
git clone https://huggingface.co/coreml/coreml-floralPatterns-v10 | |
git clone https://huggingface.co/coreml/coreml-vanGoghDiffusion_v1 | |
git clone https://huggingface.co/coreml/coreml-Project-AIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ NAME: Cross-browser TextStorage | |
* @ DESC: text storage solution for your pages | |
* @ COPY: sofish, http://sofish.de | |
*/ | |
typeof window.localStorage == 'undefined' && ~function () { | |
var localStorage = window.localStorage = {}, | |
prefix = 'data-userdata', | |
doc = document, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parser = function(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
var search = function(search) { | |
if(!search) return {}; | |
var ret = {}; | |
search = search.slice(1).split('&'); | |
for(var i = 0, arr; i < search.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require('os'); | |
module.exports = function random() { | |
return +(process.hrtime()[1] * os.freemem() % 1000 / 1000).toFixed(2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function s2t(str) | |
local t = {} | |
local l = string.len(str) | |
local key = '' | |
local val = '' | |
local oe = 0 | |
for i = 1, l do | |
local s = string.sub(str, i, i) | |
if s ~= ' ' then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function big(n, m) { | |
var a1 = f(n), a2 = f(m); | |
var overflow = d(a1[1], a2[1]); | |
arr = [a1[0] + a2[0] + overflow[0], overflow[1]]; | |
return +arr.join('.'); | |
} | |
function f(n) { | |
var tmp = ('' + n).split('.'); | |
if(tmp.length === 1) tmp[1] = '0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 大家写在评论中吧,代码高亮可以这样写: | |
// ```js | |
// your code | |
// ``` | |
// update: Fri Aug 31 08:39:21 | |
// copyright: https://gist.github.com/3549352 | |
// 加个性能测试:http://jsperf.com/get-dom-s-first-element | |
var util = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function unique_keys(array) { | |
var values = {}; | |
for(var i = 0; i < array.length; i++) { | |
values[array[i]] = null; | |
} | |
return Object.keys(values); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function invert(tree) { | |
if (!tree instanceof Array || tree.length === 1) return tree; | |
var ret = []; | |
var inverted = tree.reverse(); | |
for(var cur in inverted) { | |
if(!inverted.hasOwnProperty(cur)) continue; | |
ret.push(inverted[cur] instanceof Array ? invert(inverted[cur]) : inverted[cur]); | |
} |
NewerOlder