Skip to content

Instantly share code, notes, and snippets.

View amrishodiq's full-sized avatar

Amri Shodiq amrishodiq

  • Depok, Jawa Barat, Indonesia
View GitHub Profile
@amrishodiq
amrishodiq / HttpClient.java
Created December 17, 2011 17:09
Wrapper to simplify most common usage of HTTP connection
/**
* Copyright (c) E.Y. Baskoro, Research In Motion Limited.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
@amrishodiq
amrishodiq / Lakban.java
Created November 17, 2011 07:33
This is just a simple example of how to make a good user experince using native Java for Blackberry devices.
package com.durianapp.kertasdanlakban;
import net.rim.device.api.ui.UiApplication;
public class Lakban extends UiApplication {
public Lakban() {
pushScreen(new LakbanScreen());
}
public static void main(String[] args) {
@amrishodiq
amrishodiq / Lakban.java
Created November 17, 2011 07:18
Blackberry: Make a screen with wooden background
package com.durianapp.kertasdanlakban;
import net.rim.device.api.ui.UiApplication;
public class Lakban extends UiApplication {
public Lakban() {
pushScreen(new LakbanScreen());
}
public static void main(String[] args) {
@amrishodiq
amrishodiq / chart.js
Created November 16, 2011 06:59
Example of using Touch Charts's Column Chart
// This sample is based on given example by Sencha,
// http://dev.sencha.com/deploy/touch-charts-rc/examples/Column/
// I simplify it so I hope this example is easier to read by newbies
Ext.setup({
onReady: function() {
// store untuk menyimpan data
window.store1 = new Ext.data.JsonStore({
fields: ['name', 'data1', 'data2'],
@amrishodiq
amrishodiq / FileCounter.java
Created November 4, 2011 07:48
A servlet to show integer value from FileDao
package com.durianapp.helloservlet.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@amrishodiq
amrishodiq / FileDao.java
Created November 4, 2011 07:47
A simple class to write and read integer content to a file.
package com.durianapp.helloservlet.dao;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class FileDao {
@amrishodiq
amrishodiq / app.js
Created October 28, 2011 09:42
Sencha Touch 2 Tutorial Part 4
Ext.application({
name: 'App',
launch: function()
{
Ext.create("Ext.TabPanel", {
fullscreen: true,
tabBarPosition: 'bottom',
items: [
{
@amrishodiq
amrishodiq / app.js
Created October 28, 2011 09:30
Sencha Touch 2 Tutorial Part 3
Ext.application({
name: 'App',
launch: function()
{
Ext.create("Ext.TabPanel", {
fullscreen: true,
tabBarPosition: 'bottom',
items: [
{
@amrishodiq
amrishodiq / app.js
Created October 28, 2011 09:21
Sencha Touch 2 Tutorial Part 2
Ext.application({
name: 'App',
launch: function()
{
Ext.create("Ext.TabPanel", {
fullscreen: true,
items: [
{
title: 'Home',
iconCls: 'home',
@amrishodiq
amrishodiq / app.js
Created October 28, 2011 09:13
Sencha Touch 2 Tutorial Part 1
Ext.application({
name: 'App',
launch: function()
{
alert("Yaa. Akhirnya jalan juga.");
}
});