Skip to content

Instantly share code, notes, and snippets.

//in third_party librrary PhpExcel
//in library Excel.php:
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH."/third_party/PHPExcel.php";
class Excel extends PHPExcel {
public function __construct() {
parent::__construct();
@William-ST
William-ST / YoutubeActivity.java
Last active August 29, 2015 14:24
YoutubePlayerFragment
//make project
//compile 'com.google.android.gms:play-services:7.5.0'
//add YoutubeAndroidPlayerApi.jar
package whatdafaqshow.mox.moxapp.activities;
import android.content.Intent;
import android.graphics.Color;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
Youtube (Android)
----------------
Ten en cuenta que durante la reproducción de los videos, el tamaño mínimo de esta vista será de 200 x 110 dp. Si reduces el tamaño de la vista, los videos dejarán de reproducirse de forma automática. Tampoco está permitido superponer la vista de este fragmento con otras vistas mientras se reproduce un video.
package com.example.usuario.mapa;
import android.location.Location;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.widget.Toast;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
Yeoman
————
{“requisito”:
[
“nodejs”,
“npm”,
“git”,
]
}
@William-ST
William-ST / transparent
Created September 14, 2015 20:32
transparent android
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
/*
xml:
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
*/
WebView webView;
webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
@William-ST
William-ST / GooglePlaceServicesUtil.java
Created March 29, 2016 21:03
Buscar direcciones a través de google places service
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
@William-ST
William-ST / MapRouteUtil.java
Created March 29, 2016 21:06
Clase para dibujar rutas en google maps
import android.graphics.Color;
import android.graphics.Point;
import android.location.Address;
import android.os.AsyncTask;
import android.os.Handler;
import android.util.Log;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
package sulca.pe.expandenditem;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Transformation;
/**
* Created by William_ST on 30/08/16.
*/
public class ResizeAnimation extends Animation {