This file contains hidden or 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
series: [{ | |
type: "surface", | |
name: "围栏模型", | |
parametric: true, | |
itemStyle: { | |
opacity: 1, | |
color: "#313695" | |
}, | |
parametricEquation: { |
This file contains hidden or 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
/** | |
* | |
* @param {*} hex | |
* 把一个hex表示的色值转换为rgb表示的色值,并将r g b值以数组形式返回 | |
*/ | |
const hex2RgbArr = function(hex) { | |
let reg = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; | |
hex = hex.toLowerCase(); | |
if (hex && reg.test(hex)) { | |
//4位是包含井号 |
This file contains hidden or 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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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
#!/usr/bin/ruby | |
# Calculate the countdown for the meeting of the party. | |
require 'Date' | |
days=(DateTime.new(2012,10,15)-DateTime.now).ceil | |
if days >= 0 | |
puts "Maybe #{days} days left." | |
else | |
puts "Passed for #{days.abs} days." |