Skip to content

Instantly share code, notes, and snippets.

@A-limon
A-limon / math_util.js
Last active July 2, 2021 02:17
解决JavaScript浮点数计算的问题
;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root._Math = factory();
}
}(this, function() {
var _Math = {
@A-limon
A-limon / hexo-insert-images
Last active January 3, 2016 18:49
在Hexo的文章中插入图片
![hello]({{BASE_PATH}}image/hello.jpg)
$(function(){
$(document).keydown(function(e) {
var url = false;
if (e.which == 37 || e.which == 74) { // Left arrow and J
{% if page.previous %}
url = '{{page.previous.url}}';
{% endif %}
}
else if (e.which == 39 || e.which == 75) { // Right arrow and K
{% if page.next %}