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
| require |
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
| // Created at: Thursday, February 16, 2012 at 4:29 PM | |
| // replace method util | |
| static void MethodSwizzle(Class c, SEL orig, SEL new){ | |
| Method origMethod = class_getInstanceMethod(c, orig); | |
| Method newMethod = class_getInstanceMethod(c, new); | |
| if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))){ | |
| class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); | |
| } else { | |
| method_exchangeImplementations(origMethod, newMethod); |
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
| Feb 25 12:37:58 Igor-Khomenkos-iPhone networkd[100] <Notice>: -[NETAWDManager reportStats:metricID:] server 0x136655570, container 0x13652bee0, metrid 2686983, successfully reported: | |
| <AWDLibnetcoreTCPConnectionReport: 0x13652a7c0> { | |
| cellularFallbackReport = { | |
| dataUsageSnapshotsAtNetworkEvents = ( | |
| { | |
| bytesIn = 6600; | |
| bytesOut = 3000; | |
| } | |
| ); | |
| "fallbackTimer_msecs" = 0; |
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
| C2S - RECV (1083417823): <?xml version='1.0'?> | |
| C2S - RECV (1083417823): <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='chat.example.com'> | |
| C2S - SENT (1083417823): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="chat.example.com" id="5a051bc8" xml:lang="en" version="1.0"> | |
| C2S - SENT (1083417823): <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features> | |
| C2S - RECV (1083417823): <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/> | |
| Starting Hazelcast Clustering Plugin | |
| C2S - RECV (1083417823): <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='chat.example.com'> | |
| C2S - SENT (1083417823): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/strea |
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
| 02-01 18:00:28.858 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 55 | |
| 02-01 18:00:28.858 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 56 | |
| 02-01 18:00:28.866 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 57 | |
| 02-01 18:00:28.866 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 58 | |
| 02-01 18:00:28.866 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 59 | |
| 02-01 18:00:28.873 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 60 | |
| 02-01 18:00:28.873 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 61 | |
| 02-01 18:00:28.873 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 62 | |
| 02-01 18:00:28.873 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 63 | |
| 02-01 18:00:28.873 25451-25679/com.quickblox.sample.content D/GalleryActivity: progress: 64 |
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
| 01-29 16:40:04.722 13429-13994/com.sdk.snippets I/SnippetsContent: progress: 97 | |
| 01-29 16:40:04.722 13429-13994/com.sdk.snippets I/SnippetsContent: progress: 99 | |
| 01-29 16:40:04.730 13429-13994/com.sdk.snippets I/SnippetsContent: progress: 100 | |
| 01-29 16:40:04.730 13429-13994/com.sdk.snippets W/System.err: java.io.EOFException | |
| 01-29 16:40:04.730 13429-13994/com.sdk.snippets W/System.err: at libcore.io.Streams.readAsciiLine(Streams.java:203) | |
| 01-29 16:40:04.730 13429-13994/com.sdk.snippets W/System.err: at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:579) | |
| 01-29 16:40:04.730 13429-13994/com.sdk.snippets W/System.err: at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:827) | |
| 01-29 16:40:04.737 13429-13994/com.sdk.snippets W/System.err: at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283) | |
| 01-29 16:40:04.737 13429-13994/com.sdk.snippets W/System.err: at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:497) | |
| 01- |
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
| import logging | |
| import time | |
| from sleekxmpp import ClientXMPP | |
| class EchoBot(ClientXMPP): | |
| def __init__(self, jid, password): | |
| ClientXMPP.__init__(self, jid, password) | |
| self.add_event_handler("session_start", self.session_start) |
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
| // init test user | |
| final QBUser qbUser = new QBUser(); | |
| qbUser.setId(ApplicationConfig.getInstance().getTestUserId1()); | |
| qbUser.setPassword(ApplicationConfig.getInstance().getTestUserPassword1()); | |
| log("login with user: " + qbUser); | |
| // | |
| // |
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
| from gcm import GCM | |
| API_KEY = "..." | |
| gcm = GCM(API_KEY) | |
| data = {'param1': 'value1', 'param2': 'value2'} | |
| # JSON request | |
| reg_ids = ['...'] | |
| response = gcm.json_request(registration_ids=reg_ids, data=data) |
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
| final int fileId = 2641910; | |
| QBContent.downloadFileTask(fileId, new QBEntityCallbackImpl<InputStream>(){ | |
| @Override | |
| public void onSuccess(final InputStream inputStream, Bundle params) { | |
| long length = params.getLong(Consts.CONTENT_LENGTH_TAG); | |
| Log.i(TAG, "content.length: " + length); | |
| Thread thread = new Thread() { |