Skip to content

Instantly share code, notes, and snippets.

View pratamawijaya's full-sized avatar

Pratama Nur Wijaya pratamawijaya

View GitHub Profile
@pratamawijaya
pratamawijaya / JSONAdapter.java
Created July 30, 2013 14:05
method getDistance dan getDuration yang ditambahkan pada file JSONAdapter.java
public String getDistance(JSONObject jsonObject)
{
String distance = null;
try
{
JSONObject objRoute = jObj.getJSONArray(TAG_ROUTES).getJSONObject(0);
Utils.TRACE("get Routes");
JSONObject objLegs = objRoute.getJSONArray(TAG_LEGS).getJSONObject(0);
Utils.TRACE("get Legs");
@pratamawijaya
pratamawijaya / AndroidManifest.xml
Created October 11, 2013 17:12
Contoh penggunaan library volley
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.volleyexample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
@pratamawijaya
pratamawijaya / webservice.php
Created October 15, 2013 08:54
webservice file
<?php
class Database {
private $host = "localhost";
private $user = "root";
private $pass = "root";
private $db = "wisata_jogja";
private $conn;
// constructor
function __construct() {
package id.pratama.menututorial;
import org.andengine.engine.camera.Camera;
import org.andengine.engine.options.EngineOptions;
import org.andengine.engine.options.ScreenOrientation;
import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.scene.background.Background;
import org.andengine.entity.scene.menu.MenuScene;
import org.andengine.entity.scene.menu.MenuScene.IOnMenuItemClickListener;
@pratamawijaya
pratamawijaya / LokasiAdapte.java
Created November 23, 2013 07:42
contoh adapter
package id.pratama.kulinerjogja;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
@pratamawijaya
pratamawijaya / AndroidManifest.xml
Created November 24, 2013 14:28
file wisata_jogja
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wisatajogja"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
@pratamawijaya
pratamawijaya / MainActivity.java
Created December 14, 2013 06:05
mainactivity a
package id.pratama.testproject;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
@pratamawijaya
pratamawijaya / MainActivity.java
Created December 25, 2013 14:03
main class untuk navigation drawer
package id.pratama.navigationdrawer;
import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Process: com.github.glomadrian.mpvcleanarchitecture, PID: 3949
java.lang.RuntimeException: Unable to create application com.github.glomadrian.mvpcleanarchitecture.app.MVPCleanArchitectureApplication: java.lang.UnsupportedOperationException: No no-args constructor on com.github.glomadrian.mvpcleanarchitecture.app.dependencyinjection.ActivityModule$$ModuleAdapter
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4521)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)