Put xml file "api_keys.xml" in the directory "res/value/".
api_keys.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>
function run(input, parameters) { | |
const appNames = []; | |
const skipAppNames = []; | |
const verbose = true; | |
const scriptName = 'close_notifications_applescript'; | |
const CLEAR_ALL_ACTION = 'Clear All'; | |
const CLEAR_ALL_ACTION_TOP = 'Clear'; | |
const CLOSE_ACTION = 'Close'; |
addmedia | |
addphoto | |
addvideo | |
appinfo | |
boot | |
bootstatus | |
clone | |
create | |
darwinup | |
delete |
// | |
// RXTimer.h | |
// | |
// Copyright 2013 Andreas Grosam | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
import logging | |
import multiprocessing | |
import time | |
import mplog | |
FORMAT = '%(asctime)s - %(processName)s - %(levelname)s - %(message)s' | |
logging.basicConfig(level=logging.DEBUG, format=FORMAT) | |
existing_logger = logging.getLogger('x') |
#cribbed from http://vimeo.com/52569901 (Twilio carrier call origination moderation) | |
# The idea is that many fan-in queues can enqueue at any rate, but | |
# dequeue needs to happen in a rate-controlled manner without allowing | |
# any individual input queue to starve other queues. | |
# http://en.wikipedia.org/wiki/Leaky_bucket (second sense, "This version is referred to here as the leaky bucket as a queue.") | |
# | |
# requires: | |
# redis 2.6+ | |
# redis-py>=2.7.0 | |
# anyjson |
package net.hockeyapp.android.demo; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import org.acra.ACRA; | |
import org.acra.collector.CrashReportData; | |
import org.acra.ReportField; | |
import org.acra.sender.ReportSender; |
/** | |
* Truncate a Java string so that its UTF-8 representation will not | |
* exceed the specified number of bytes. | |
* | |
* For discussion of why you might want to do this, see | |
* http://lpar.ath0.com/2011/06/07/unicode-alchemy-with-db2/ | |
*/ | |
public static String utf8truncate(String input, int length) { | |
StringBuffer result = new StringBuffer(length); | |
int resultlen = 0; |