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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Image Test</title> | |
<style> | |
html, | |
body { | |
overflow-x: auto; |
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
阮一峰的网络日志 » 首页 » 档案 | |
搜索 | |
上一篇:科技爱好者周刊(第 2 | |
分类: 周刊 | |
科技爱好者周刊(第 241 期):中国的增长动力在内陆 | |
作者: 阮一峰 | |
日期: 2023年2月10日 | |
这里记录每周值得分享的科技内容,周五发布。 |
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
<div style=" | |
position: fixed; | |
background: rgba(253, 202, 202, 0.26); | |
padding: 100px 180px; | |
z-index: 100; | |
transform: translate(-50%, -50%); | |
left: 50%; | |
top: 50%; | |
border-radius: 50px; | |
-webkit-mask-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(255,255,255,0) 100%),linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(255,255,255,0) 100%); |
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 () { | |
window.addEventListener('mousemove', async ev => { | |
const path = ev.path || ev.composedPath(); | |
const elm = path.find(ev => ev.tagName === 'A'); | |
if (!elm || elm.visited) { | |
return; | |
} | |
elm.visited = true; | |
const parts = /.*github\.com\/(.*?)\/(.*?)\/.*/.exec(elm.href + "/"); | |
if (!parts) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="resizable textares"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
div { | |
box-sizing: border-box; |
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 x=[1,2,3,4,5,6]; | |
function factorial(i) { | |
if (!factorial.memorize[i]) { | |
factorial.memorize[i] = i * factorial(i-1); | |
} | |
return factorial.memorize[i]; | |
} | |
factorial.memorize = {0:1}; |
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 nextPerm (str) { | |
var arr = str.split("").reverse(); | |
for (var i=1; i<arr.length; ++i) { | |
if ( arr[i] < arr[i-1] ) { | |
break; | |
} | |
}; | |
if ( i >= arr.length ) { | |
return false; | |
}; |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- | |
Copyright 2010 Yu Jianrong, All Rights Reserved | |
Licensed under BSD License. | |
--> | |
<head> | |
<meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0,maximum-scale=1.0"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
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
// | |
// Copyright 2010 Yu Jianrong, All Rights Reserved | |
// | |
// Licensed under BSD License. | |
// special case, remove iframe of dm5 page (not include the comic page) | |
if (window.location.host==="www.dm5.com" && !(/^\/m/.test(window.location.pathname))) | |
{ | |
var ifs=document.getElementsByTagName("iframe"); |
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 linksIterator=document.querySelectorAll("a[href^='http://github.com/'],a[href^='https://github.com']"); | |
var links=[]; | |
var callbackIndex = 0; | |
for (var i=0;i<linksIterator.length;++i) { | |
linksIterator[i].addEventListener("mouseover", (function(link) { return function(e) { | |
if ( link.watched ) return; | |
link.watched = true; |