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
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
angular.module('starter', ['ionic']) | |
.run(function($ionicPlatform) { | |
$ionicPlatform.ready(function() { | |
if (window.cordova && window.cordova.plugins.Keyboard) { |
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
./sendab.sh | |
This is ApacheBench, Version 2.3 <$Revision: 1528965 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking services.viber.com (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
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
./sendab.sh | |
This is ApacheBench, Version 2.3 <$Revision: 1528965 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking services.viber.com (be patient) | |
Completed 3000 requests | |
Completed 6000 requests | |
Completed 9000 requests | |
Completed 12000 requests |
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
Server1: | |
~/viber$ ./sendab.sh | |
This is ApacheBench, Version 2.3 <$Revision: 1528965 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking services.viber.com (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests |
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
ab -n 1000 -c 20 -T "application/json" -p m.json https://services.viber.com/vibersrvc/1/send_message | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking services.viber.com (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
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
ionic plugin add https://github.com/apache/cordova-plugin-whitelist.git |
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 | |
public void testJoiner() throws Exception { | |
List<String> texts = Lists.newArrayList("eins", null, "drei", "vier", "fünf", "sechs", "sieben", null); | |
String joined; | |
String expected; | |
joined = Joiner.on(";") | |
.skipNulls() | |
.join(texts); |
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 myApp = angular.module('myApp').service('CordovaNetwork', ['$ionicPlatform', '$q', function($ionicPlatform, $q) { | |
// Get Cordova's global Connection object or emulate a smilar one | |
var Connection = window.Connection || { | |
"CELL" : "cellular", | |
"CELL_2G" : "2g", | |
"CELL_3G" : "3g", | |
"CELL_4G" : "4g", | |
"ETHERNET" : "ethernet", | |
"NONE" : "none", | |
"UNKNOWN" : "unknown", |
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
07 Jul 2015 11:55:39.177 [SimpleAsyncTaskExecutor-4] INFO sd-viber-core - Sending to http https://services.viber.com/vibersrvc/1/send_message pl {"service_id":3010,"dest":"79261532939","tag":"tag","seq":347937,"type":6,"message":{"#txt":"www.ya.ru"}} | |
07 Jul 2015 11:55:39.191 [SimpleAsyncTaskExecutor-4] ERROR sd-viber-core - org.apache.http.NoHttpResponseException: services.viber.com:443 failed to respond | |
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143) | |
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) | |
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261) | |
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165) | |
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167) | |
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272) | |
at org.apache.http.protocol.HttpR |
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
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m" |