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 spray.examples | |
import scala.util.{Success, Failure} | |
import scala.concurrent.duration._ | |
import akka.actor.ActorSystem | |
import akka.pattern.ask | |
import akka.event.Logging | |
import akka.io.IO | |
import spray.json.{JsonFormat, DefaultJsonProtocol} | |
import spray.can.Http |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 1 in line 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
1 ECU = 1GCU, GCP fixs 2.75 GCU/CPU, EC2 provides ECU as dynamic range based on instance type. This compares EC2 vs GCP based on number of ECU & GCU | |
Gamma Current Usage GCP Amazon EC2 GCP Price EC2 Price | |
CPU GCU Ram CPU ECU Ram | |
(1)C3.Large 4 11 4 2 8 4 94.48 96.63 | |
(3) c3.2xlarge 12 33 15 8 28 15 302.2 387.23 | |
(4) c3.xlarge 6 16.5 7.5 4 14 7.5 151.1 193.98 | |
(1)C4.Large 4 11 4 2 8 3.75 94.48 105.41 |
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
# -*- coding: utf-8 -*- | |
import re | |
from collections import OrderedDict | |
import os | |
import urllib2 | |
ESPISODE_LINK="http://www.theoyeucau.com/episode" | |
ESPISODE_LINK_REGEX = re.compile("http\:\/\/www\.theoyeucau\.com\/episode\/[a-zA-Z-]+\/") |
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
updateShipper(id, goods, function (shippers) { | |
if (shippers.length) { | |
response = send(shippers, options, callback); | |
} else { | |
response = deny(options, callback); | |
} | |
}); | |
Muốn lấy cái giá trị response trả về |
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
# origin question&answer | |
# http://www.vithon.org/2015/04/30/ph%E1%BB%8Fng-v%E1%BA%A5n:-tim-1-tri%E1%BB%87u-s%E1%BB%91-nh%E1%BB%8F-nh%E1%BA%A5t-trong-1-t%E1%BB%B7-s%E1%BB%91 | |
# the origin version use heapq | |
# this version do not use external module, but use sorted cheat when iterate through set (is not sorted) | |
def solve(inp, n=1000000): | |
print inp | |
heap = set() | |
for i in inp: | |
i = -i |
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
MediaPlayer.dependencies.FragmentLoader = function () { | |
"use strict"; | |
var RETRY_ATTEMPTS = MediaPlayer.dependencies.FragmentLoader.RETRY_ATTEMPTS, | |
RETRY_INTERVAL = MediaPlayer.dependencies.FragmentLoader.RETRY_INTERVAL, | |
xhrs = [], | |
doLoad = function (request, remainingAttempts) { |
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
00:00:00 687 debug Skipping splice frame generation: first new buffer at 1292933us begins at or before existing buffer at 1292933us. | |
00:00:00 687 debug Skipping splice frame generation: first new buffer at 6721733us begins at or before existing buffer at 6721733us. | |
00:00:01 292 debug Skipping splice frame generation: first new buffer at 1292933us begins at or before existing buffer at 1292933us. | |
00:00:01 293 debug Skipping splice frame generation: first new buffer at 6721733us begins at or before existing buffer at 6721733us. | |
00:00:01 904 debug Skipping splice frame generation: first new buffer at 1292933us begins at or before existing buffer at 1292933us. | |
00:00:01 905 debug Skipping splice frame generation: first new buffer at 6721733us begins at or before existing buffer at 6721733us. | |
00:00:02 517 debug Skipping splice frame generation: first new buffer at 1292933us begins at or before existing buffer at 1292933us. | |
00:00:02 517 debug Skipping splice frame generation: first new buffer at 6721733us begins at |
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
[log] > manifest loaded,3 level(s) found, first bitrate:1560000 | |
logger.js:37 [log] > demuxing in webworker | |
logger.js:37 [log] > switching to level 0 | |
logger.js:37 [log] > (re)loading playlist for level 0 | |
logger.js:37 [log] > media source opened | |
logger.js:37 [log] > demuxing in webworker | |
logger.js:37 [log] > switching to level 0 | |
logger.js:37 [log] > (re)loading playlist for level 0 | |
logger.js:37 [log] > media source closed | |
logger.js:37 [log] > level 0 loaded [0,121],duration:675.0599999999989 |
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
GET http://localhost:8001/ net::ERR_CONNECTION_REFUSED | |
GET http://dailymotion.github.io/streams.js | |
[log] > loadSource:http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8 | |
[log] > attachMedia | |
[log] > media source opened | |
[log] > manifest loaded,5 level(s) found, first bitrate:2149280 | |
[log] > demuxing in webworker | |
[log] > switching to level 3 | |
[log] > (re)loading playlist for level 3 | |
[log] > level 3 loaded [0,63],duration:634.584 |
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 vn.ethicconsultant.commons.memcachedpool2.Test; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.logging.Level; | |
import net.spy.memcached.MemcachedClient; | |
import net.spy.memcached.compat.log.Logger; | |
import net.spy.memcached.compat.log.LoggerFactory; | |
import org.apache.commons.pool2.impl.GenericObjectPoolConfig; | |
import vn.ethicconsultant.commons.memcachedpool2.MemcachedPool; |