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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Ajax; | |
using BaiduBce; | |
using BaiduBce.Auth; | |
using BaiduBce.Internal; | |
using Newtonsoft.Json; |
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
var http = require('http'); | |
var url = require('url'); | |
var util = require('util'); | |
var Auth = require('bce-sdk-js').Auth; | |
var kCredentials = { | |
ak: '您的AK', | |
sk: '您的SK' | |
}; |
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
{ | |
"remoteModuleConfig": { | |
"AnimationsDebugModule": { | |
"moduleID": 0, | |
"methods": { | |
"stopRecordingFps": { | |
"methodID": 0 | |
}, | |
"startRecordingFps": { | |
"methodID": 1 |
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
# | |
# Example of a user's .screenrc file | |
# | |
# This is how one can set a reattach password: | |
# password ODSJQf.4IJN7E # "1234" | |
# no annoying audible bell, please | |
vbell on |
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
[toc] | |
# BOS WEB SDK | |
## 目的 | |
为 BOS 的用户提供一种更简便,直接的方式管理 BOS 上面所属的资源。 | |
BOS WEB SDK 提供两种服务?工具?: |
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
function toIEEE754( d ) { | |
var a = new Float64Array( [ d ] ); | |
var b = new DataView( a.buffer ); | |
var f = []; | |
for(var i = 0; i < b.byteLength; i ++ ){ | |
var k = b.getUint8( 7 - i ); | |
var e = k.toString( 2 ); | |
var p = new Array( 9 - e.length ).join( 0 ); | |
f.unshift( p + e ); | |
} |
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
// assumes little endian | |
// constants taken from http://nikic.github.com/2012/02/02/Pointer-magic-for-efficient-dynamic-value-representations.html | |
var MAXDOUBLE = 0xfff80000, | |
INT32TAG = 0xfff90000, | |
BOOLTAG = 0xfffa0000; | |
var heap = new ArrayBuffer(24), | |
f64 = new Float64Array(heap), | |
ui32 = new Uint32Array(heap), |
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
var assert = console.assert; | |
var DOUBLE = 0, | |
INT32 = 1, | |
BOOL = 2, | |
PTR = 3; | |
var MAXDOUBLE = 0xfff80000, | |
INT32TAG = 0xfff90000, | |
BOOLTAG = 0xfffa0000, |
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
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
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
/*************************************************************************** | |
* | |
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | |
* $Id$ | |
* | |
**************************************************************************/ | |
/** |