Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
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
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<servlet>
<servlet-name>Rest</servlet-name>
package com.mastercard.android.atmlocator.view;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.AbsListView;
import android.widget.GridView;
var output = "";
var dump = function(){
$(".sitemapTree > .sitemapExpandableNode").each(function(index, element){
printNode(element);
});
console.log(output);
}
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.1'
}
@simekadam
simekadam / gist:b803f2a6642c29a86304
Created February 17, 2015 10:21
Removes Small Apps widget from recents tasks screen on Sony Z3
adb shell
pm block com.sony.smallapp.launcher
pm block com.sony.smallapp.app.widget
exit
adb reboot
public class AddPersonPresenterImpl implements IAddPersonPresenter{
List<Person> mPersons;
private IAddPersonView mView;
public AddPersonPresenterImpl(IAddPersonView view) {
this.mView = view;
this.mPersons = new ArrayList<>();
updateNumberOfAddedPersons();
}
public class AddPersonActivity extends Activity implements IAddPersonView {
private TextView vPersonsAdded;
private EditText vPersonName;
private Button vAddPerson;
private IAddPersonPresenter mPresenter;
@Override
public interface IAddPersonView {
void showNumberOfPersons(int size);
}
//! The given info object contains all the current workout
//! information. Calculate a value and return it in this method.
function compute(info) {
// See Activity.Info in the documentation for available information.
var minutesPerMile = 1 / (info.currentSpeed * 60 / 1609.34);
var minutes = minutesPerMile.toNumber();
var seconds = (minutesPerMile - minutes) * 60;
if (seconds < 10) {
seconds = "0"+seconds;
} else {