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
<?php | |
$params = array( | |
'cat' => 'a' | |
,'resumen'=> json_encode(array( | |
'speed' => array ( | |
'a' => 12,//media | |
'b' => 21,//max | |
), | |
'time' => array ( | |
'a' => 1318513036,//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
package com.moventos.test; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.http.HttpEntity; |
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
private boolean isTabletDevice() { | |
if (android.os.Build.VERSION.SDK_INT >= 11) { // honeycomb | |
// test screen size, use reflection because isLayoutSizeAtLeast is only available since 11 | |
Configuration con = getResources().getConfiguration(); | |
try { | |
Method mIsLayoutSizeAtLeast = con.getClass().getMethod("isLayoutSizeAtLeast", int.class); | |
Boolean r = (Boolean) mIsLayoutSizeAtLeast.invoke(con, 0x00000004); // Configuration.SCREENLAYOUT_SIZE_XLARGE | |
return r; | |
} catch (Exception x) { | |
x.printStackTrace(); |
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
//see http://stackoverflow.com/questions/2883355/how-to-render-pdf-in-android/ | |
public class OpenPdf extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
Button button = (Button) findViewById(R.id.OpenPdfButton); | |
button.setOnClickListener(new View.OnClickListener() { | |
@Override |
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
//recordar activar permisos | |
//<uses-permission android:name="android.permission.WRITE_SETTINGS"/> | |
private void toggleGPS(boolean enable) { | |
String provider = Settings.Secure.getString(getContentResolver(), | |
Settings.Secure.LOCATION_PROVIDERS_ALLOWED); | |
if(provider.contains("gps") == enable) { | |
return; // the GPS is already in the requested state | |
} | |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setMessage("Esta aplicación necesita activar el GPS. ¿Desea activar el GPS?") |
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 android.content.Context; | |
import android.content.SharedPreferences; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
public class App { | |
public static final String PREFERENCE_APP_KEY = "com.my.app.APP_PREFERENCE_PRIVATE"; | |
public static final String PREFERENCE_VERSION_KEY = "com.my.app.APP_VERSION"; | |
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 ToolsDraw = (function(window, gmaps, $, undefined){ | |
var STATE_HAND = 'HAND', | |
STATE_MARKER = '', | |
STATE_LINE = '', | |
STATE_POLYLINE = '', | |
state, | |
map, | |
mapListenerInstance, | |
BASE_URI_ICONMARKER = '/Images/Iconos/MapGrid/{color}.png', | |
colors = [["red", "#ff0000"], ["orange", "#ff8800"], ["green", "#008000"], ["blue", "#000080"], ["purple", "#800080"]], |
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
<%-- Este ejemplo asocia un evento 'OnGridCreated' para cuando el grid se haya creado --%> | |
<ClientSettings> | |
<Scrolling AllowScroll="True" UseStaticHeaders="True" /> | |
<ClientEvents OnRowCreated="" OnGridCreated="shootEventFromTelerik('OnGridCreated')" OnRowContextMenu=""/> | |
</ClientSettings> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://www.opengis.net/kml/2.2"> | |
<Folder> | |
<name>Nombre de todos lo vehículos (si se puede)</name> | |
<description>Trayectos desde 01-01-2000 hasta 02-02-2000</description> | |
<NetworkLink> | |
<name>Recorrido desde 01-01-2000 05:03:00 hasta 01-01-2000 05:04:00</name> | |
<description>Identificador de Vehículo y/o conductor</description> | |
<refreshVisibility>0</refreshVisibility> | |
<flyToView>0</flyToView> |
OlderNewer