This file contains 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
async function handleRequest( | |
c: any, | |
args: any | |
): Promise<any> { | |
const cacheKey = new URL(c.req.url).toString(); | |
const cachedResponse = await caches.default.match(cacheKey); | |
if (cachedResponse) { | |
return c.json(await cachedResponse.json()); | |
} |
This file contains 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
#!/bin/sh | |
# OSX | |
ln -s /usr/local/bin/yarn /usr/local/bin/ypm |
This file contains 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(context) { | |
'use strict'; | |
var Timer = Java.type('java.util.Timer'); | |
var Phaser = Java.type('java.util.concurrent.Phaser'); | |
var TimeUnit = Java.type('java.util.concurrent.TimeUnit'); | |
var AsyncHttpClient = Java.type('com.ning.http.client.AsyncHttpClient'); | |
var timer = new Timer('jsEventLoop', false); | |
var phaser = new Phaser(); |
This file contains 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
/** | |
* @descreption Calculate impression ratio for Arms by ArmStatistics. | |
* @author Minkyu Cho(mrnoname@naver.com) | |
* The logic of this class is based on R code in below article(Figure 4). | |
* http://mktg455cnu.net/wp-content/uploads/2014/10/scott.pdf | |
*/ | |
@Slf4j | |
@Component | |
public class RatioCalculator { | |
private static final int SIMULATE_COUNT_BASE = 100; |