Skip to content

Instantly share code, notes, and snippets.

@gotoweb
gotoweb / app.js
Created February 6, 2013 07:41 — forked from nervetattoo/app.js
define(['dependency'], function(Dependency)
{
console.log("Dependency loaded", Dependency);
});
@gotoweb
gotoweb / gist:2d84815013c8a5a63296
Created August 4, 2014 06:19
highchart right case
{
"chart": {
"type": "line",
"animation": true,
"reflow": false
},
"colors": [
"#A186BE"
],
"title": {
@gotoweb
gotoweb / gist:b3975604e2becf7dfb26
Created August 4, 2014 06:20
highchart wrong case
{
"chart": {
"type": "line",
"animation": true,
"reflow": false
},
"colors": [
"#A186BE"
],
"title": {

다음과 같이 field order option 추가하고, 쿼리 스트링을 넘겨서 정렬할 수 있게 만듦

정렬 비활성화 (이전 버전에서 이와 같이 작동)

<table-view-with-pager
	ng-model="dataResult"
	ng-total-count="numTotalCount"
	ng-items-per-page="numPageSize"
	ng-page-size="numPagerPageSize"
// service(factory)
logpresso.factory('serviceMovie', function(socket) {
var isready = false;
var list = [];
function get() {
return new Async(function() {
var self = this;
@gotoweb
gotoweb / extractColumn.js
Created February 16, 2016 05:53 — forked from eddieajau/extractColumn.js
Extract a column from an array of JavaScript objects.
function extractColumn(arr, column) {
function reduction(previousValue, currentValue) {
previousValue.push(currentValue[column]);
return previousValue;
}
return arr.reduce(reduction, []);
}
table.table-learnco td, table.table-learnco th {
font-size: 1.2em;
border: 1px solid silver;
padding: .5em;
}
table.table-schedule td {
white-space: nowrap;
}
@gotoweb
gotoweb / callback_in_for_loop_solution.js
Created March 14, 2019 00:43
callback in for loop: 클로저 및 bind 이용에 관한 문제에 대한 해답입니다. https://gist.github.com/gotoweb/e5d583fe28f0259fcd119c2d5355791f
/* let keyword를 이용한 해결 */
var fns = [];
for (let i=0; i<3; i++) {
fns[i] = function() {
console.log('My value:' + i);
}
}
for (var j=0; j<3; j++) {
fns[j]();
function wait(ms) {
var start = Date.now();
var now = start;
while (now - start < ms) {
now = Date.now();
}
}
function drink(person, coffee) {
console.log(person + '는 <' + coffee + '>를 마십니다');
@gotoweb
gotoweb / ordering-coffee-sync.js
Created June 26, 2019 08:45
ordering-coffee-sync.js
function waitSync(ms) {
var start = Date.now();
var now = start;
while(now - start < ms) {
now = Date.now();
}
} // 현재 시각과 시작 시각을 비교하며 ms 범위 내에서 무한 루프를 도는 blocking 함수입니다
function drink(person, coffee) {
console.log(person + '는 ' + coffee + '를 마십니다');