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
| http = require 'http' | |
| https = require 'https' | |
| url = require 'url' | |
| querystring = require 'querystring' | |
| class Downloader | |
| constructor: (@url, @method="GET", headers, @params) -> | |
| @headers = | |
| 'User-Agent': '*Coin-Monitor' | |
| 'Content-Type': "application/x-www-form-urlencoded" |
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
| Cryptsy = -> | |
| if Cryptsy::_singletonInstance | |
| return Cryptsy::_singletonInstance | |
| Cryptsy::_singletonInstance = @ | |
| @orders = [] |
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
| app.service 'Session', -> | |
| @create: (@sessionId, @userId) -> | |
| @destroy: -> | |
| @id = @userId = null | |
| @ |
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
| angular.module("app.directives", []).directive('pwdMatch', function() { | |
| return { | |
| link: function(scope, elm, attrs) { | |
| var checker; | |
| checker = function() { | |
| return elm.val() === scope.$eval(attrs.pwdMatch); | |
| }; | |
| return scope.$watch(checker, function(n) { | |
| return console.log("passwords" + (!n ? " do not" : "") + " match"); | |
| }); |
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
| 0100000001aca7f3b45654c230e0886a57fb988c3044ef5e8f7f39726d305c61d5e818903c00000000 | |
| fd5d010048304502200187af928e9d155c4b1ac9c1c9118153239aba76774f775d7c1f9c3e106ff33c0221008822b0f658edec22274d0b6ae9de10ebf2da06b1bbdaaba4e50eb078f39e3d78014 | |
| 730440220795f0f4f5941a77ae032ecb9e33753788d7eb5cb0c78d805575d6b00a1d9bfed02203e1f4ad9332d1416ae01e27038e945bc9db59c732728a383a6f1ed2fb99da7a4014 | |
| cc952410491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f864104865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec687441048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d4621353ae | |
| ffffffff0140420f00000000001976a914ae56b4db13554d321c402db3961187aed1bbed5b88ac00000000 |
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
| protected boolean isValidFragment(String fragmentName) { | |
| if (getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.KITKAT) { | |
| throw new RuntimeException( | |
| "Subclasses of PreferenceActivity must override isValidFragment(String)" | |
| + " to verify that the Fragment class is valid! " + this.getClass().getName() | |
| + " has not checked if fragment " + fragmentName + " is valid."); | |
| } else { | |
| return true; | |
| } | |
| } |
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 com.example.testSingleton; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.widget.Toast; | |
| public class ActivityA extends Activity { | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { |
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
| public class MyTextView extends TextView { | |
| private boolean allCaps = false; | |
| public MyTextView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| if( isLegacy() ) { | |
| allCaps = attrs.getAttributeBooleanValue("http://schemas.android.com/apk/res/android", "textAllCaps", false); | |
| if(allCaps) setText(getText()); // this line is really stupid, but initial setText() is called in TextView constructor, once allCaps isn't yet properly set... | |
| } |
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 com.elimidateapp.android.customs; | |
| import android.content.Context; | |
| import android.os.Build; | |
| import android.util.AttributeSet; | |
| import android.widget.TextView; | |
| public class MyTextView extends TextView { | |
| private boolean allCaps = false; |
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
| Ion.with(this, "http://your-url.com/file.json") | |
| .asJsonObject() | |
| .setCallback(new FutureCallback<JsonObject>() { | |
| @Override | |
| public void onCompleted(Exception e, JsonObject result) { | |
| if( e!=null ) {} // do stuff on fail | |
| if( json!=null ) {} // do stuff on success | |
| } | |
| }); |