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
test |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// logger = require('logger'); | |
// logger.log_to_console(true); | |
// logger.log_to_folder('log','_app.log'); | |
// logger.set_log_level('DEBUG'); | |
// logger.info('Happy to be here.'); | |
exports.logger = (function() { | |
var that = {}; | |
that.levels = { | |
"TRACE": 0, | |
"DEBUG": 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
select abs(extract (epoch from (age('2015-01-15 14:00:00','2015-01-15 14:00:00')))) from task where "taskId"='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
package com.test; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; |
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
try { | |
//String sourcePath="https://gist.githubusercontent.com/CootCraig/6186298/raw/26fb35a849fac60cb3653e9b8b9877af5ce39f66/logger.js"; | |
//readHtmlFile(sourcePath); | |
FileInputStream fs = new FileInputStream("/home/devbwh/IdeaProjects/test/src/1.txt"); | |
byte[] buffer = new byte[1024]; | |
int content; | |
while ((content = fs.read()) != -1) { | |
// convert to char and display it | |
System.out.print((char) content); | |
} |
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
$.ajax({ | |
accepts: { | |
"content-type": 'application/json' | |
}, | |
url: 'http://127.0.0.1:3000/todos', | |
type: 'post', | |
data: { | |
"data": response | |
}, | |
cache: false, |
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
//调整express默认允许的大小 | |
app.use(bodyParser.json({ | |
limit: '1024mb' | |
})); | |
app.use(bodyParser.urlencoded({ | |
limit: '1024mb', | |
extended: true | |
})); |
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 app = angular.module('materializeApp', ['ui.materialize']) | |
.controller('BodyController', ["$scope", function ($scope) { | |
$scope.select = { | |
value: "Option1", | |
choices: ["Option1", "I'm an option", "This is materialize", "No, this is Patrick."] | |
}; | |
}]); |
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(window, $) { | |
/** | |
* 实现打印功能(只打印网页中的一部分) | |
* | |
* Usage: | |
* <button jw-click-print="#printContext">Print</button> | |
*/ | |
var print = function($dom) { | |
$("iframe.js-print").remove(); |
OlderNewer