Skip to content

Instantly share code, notes, and snippets.

View scq000's full-sized avatar

Chason scq000

  • Bytedance
  • Shenzhen
View GitHub Profile
@scq000
scq000 / row count 根据行数分割
Last active February 11, 2018 09:03
SplitExcel.xlsb
Sub SplitData()
'Updateby20140617
Dim WorkRng As Range
Dim xRow As Range
Dim SplitRow As Integer
Dim xWs As Worksheet
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
@scq000
scq000 / BigDecimal.js
Created October 27, 2017 03:31 — forked from xinlc/BigDecimal.js
JavaScript高精度计算
//除法函数,用来得到精确的除法结果
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。
//调用:accDiv(arg1,arg2)
//返回值:arg1除以arg2的精确结果
function accDiv(arg1, arg2) {
var t1 = 0,
t2 = 0,
r1, r2;
try {
t1 = arg1.toString().split(".")[1].length
@scq000
scq000 / gcd-lcm.js
Last active September 2, 2017 02:17
最小公倍数和最大公约数
function gcd(a,b){
return a%b === 0 ? b: gcd(b, a % b);
}
function lcm(a,b) {
return a * b / gcd(a, b);
}
function lcms(...nums) {
let result = 1;
@scq000
scq000 / heroku
Last active May 18, 2017 07:58 — forked from dprabu17/heroku
Heroku 使用 部署 node应用
Heroku
install
https://toolbelt.heroku.com/
heroku login
#cd project folder
heroku create
var http = require('http');
module.exports = http.createServer(function(req, res){
console.log('%s %s', req.method, req.url);
var body = 'Hello World';
res.writeHead(200, { 'Content-Length': body.length });
res.end(body);
});
@scq000
scq000 / webpack.config.js
Created May 18, 2017 07:01 — forked from yukhnevych/webpack.config.js
Webpack 2 config file: Hot reloading, split css, generate HTML, split vendor files.
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
// Path to project entry points.
entry: {
// replace it with your project related path.
@scq000
scq000 / .gitignore
Created May 18, 2017 06:26 — forked from smebberson/.gitignore
Express simple authentication example
node_modules
*.swp
@scq000
scq000 / 0_reuse_code.js
Created May 18, 2017 06:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@scq000
scq000 / dailyui-001-sign-up.markdown
Created April 10, 2017 06:06
DailyUi#001 - Sign Up

DailyUi#001 - Sign Up

###DailyUi001 -Sign Up I started today my dailyUi challenge i hope you like this flat sign up form

A Pen by Tommaso Poletti on CodePen.

License.