Skip to content

Instantly share code, notes, and snippets.

package com.blacksquared.changers.model;
import android.content.SharedPreferences;
/**
* Created by Ed
*/
public class CachedValue<T> {
private static SharedPreferences sharedPref;
package com.blacksquared.changers.manager;
import android.content.Context;
import android.content.SharedPreferences;
import com.blacksquared.changers.Constants;
import com.blacksquared.changers.interfaces.Initializer;
import com.blacksquared.changers.model.CachedValue;
import java.util.HashSet;
String parseJS eval
{
"status":0,
"result":[
{
"CO2KG":50,
"image":"50",
"InAppIdentifier":"com.changers.inapp.50",
"Price":50
},
@edBaev
edBaev / gist:a6113c8364afb6fa7b15
Created November 5, 2014 12:31
changers string en
<!--co2 offset screen-->
<string name="co2_offset_top_label">SET YOUR JOURNEY\nCO2-FREE</string>
<string name="co2_offset_description_car">With %s Recoins you can neutralize</string>
<string name="co2_offset_description_amount">%s kg of CO2.</string>
<string name="co2_offset_bottom_label">You can either use the Recoins\nin your account or you can\npurchase them.</string>
<string name="co2_offset_count_rc">%s RC</string>
<string name="co2_offset_count_euro">%s €</string>
<string name="co2_offset_nope_not_this_time">NOPE, NOT THIS TIME.</string>
<string name="co2_offset_count_kg">for %s kg</string>
<string name="co2_offset_not_enough_recoins">You don’t have enough recoins. Your current balance is %s recoins.</string>
@edBaev
edBaev / gist:ad20f8bc8fc5574eae64
Created November 4, 2014 19:22
Track Trouble
{
"_id":"357",
"longitude":"13.1061212",
"accurancy":"39.0",
"distance":"475.555553242888",
"latitude":"52.3920098"
},
{
"_id":"358",
"longitude":"13.0826189",
@edBaev
edBaev / gist:6118e6f06c8a0355b422
Created October 7, 2014 10:13
Changers before
{
"status":0,
"result":[
{
"guid":7,
"type":"Local",
"subtype":null,
"amount":"1.448",
"location":null,
"startLatitude":"48.49385",
{
"status":0,
"result":{
"request":{
"guid":7,
"type":"Local",
"subtype":null,
"amount":"1.448",
"location":null,
{
"_instruments": {
"1": {
"AccountID": null,
"_spreadWidening": 0.0,
"_spread": 0.0,
"DepartmentID": null,
"_enable": true,
"InstrumentID": 1,
"_leverage": 200.0000000000,
public void sendRequest(Context context, MyResultReceiver mReceiver, int method, int arrayIndex) {
final Intent intent = new Intent(Intent.ACTION_SYNC, null, context, QueryService.class);
intent.putExtra("receiver", mReceiver);
intent.putExtra("command", "queryPost");
ArrayList<String> postVariables = new ArrayList<String>();
ArrayList<String> postData = new ArrayList<String>();
User user = User.getInstance();
Order order = Order.getInstance();
switch (method) {
@edBaev
edBaev / gist:9929440
Created April 2, 2014 07:26
Было
private void openCurrentMapFragment() {
if (StateManager.getInstance().getCurrentUserType() == StateManager.UserType.DRIVER) {
openDriverFragment();
} else if(StateManager.getInstance().getCurrentUserType() == StateManager.UserType.GUEST) {
openGuestFragment();
}
}
private void openGuestFragment() {
String tag = RequestDriverFragment.TAG;