This file contains 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
#! /bin/bash | |
/Users/ariefbayu/Documents/Applications/phonegap-2.5.0/lib/android/bin/create $1 $2 $3 |
This file contains 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
class Model_CatalogImage extends Orm\Model { | |
public static function getRelations() { | |
$return = array(); | |
if(isset(Model_CatalogImage::$_belongs_to)){ | |
$return['belongto'] = Model_CatalogImage::$_belongs_to; | |
} | |
if(isset(Model_CatalogImage::$_has_many)){ | |
$return['hasmany'] = Model_CatalogImage::$_has_many; | |
} |
This file contains 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 | |
class ExampleRestController extends Controller_Rest { | |
/** | |
* @var array List all supported methods | |
*/ | |
protected $_supported_formats = array( | |
'xml' => 'application/xml', | |
// 'rawxml' => 'application/xml', |
This file contains 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
#!/usr/bin/env python | |
import os | |
import urllib2 | |
import datetime | |
import time | |
try: | |
import json | |
except: |
This file contains 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
{"title": "this is title", "content": "this is english content"} |
This file contains 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
//taken from: http://stackoverflow.com/questions/182630/jquery-tips-and-tricks/382922#382922 | |
$.extend($.expr[":"], { | |
over100pixels: function (e) | |
{ | |
return $(e).height() > 100; | |
} | |
}); | |
$(".box:over100pixels").click(function () | |
{ |
This file contains 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
//require line | |
var SceneView = require('ui').SceneView; | |
//`:load` line | |
var scene = new SceneView({ style: { width: 'fill-parent', height: 36 }}); | |
scene.setLayers(sceneLayers.count); | |
scene.defineSpritesheet('headerImage', app.imageURL('header_image.png'), 128, 36); | |
scene.add({ | |
sprite: 'headerImage', |
This file contains 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
File file1 = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/Master/CAM_" + s.getType() + "_" + s.getJobCode() + ".jpg"); | |
File file2 = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/Master/SIGN_" + s.getType() + "_" + s.getJobCode() + ".jpg"); | |
Log.d("LOG", "File1: "+ (file1.exists() ? "E" : "N") + " -> " + file1.getAbsolutePath()); | |
Log.d("LOG", "File2: "+ (file2.exists() ? "E" : "N") + " -> " + file2.getAbsolutePath()); | |
RequestBody requestBody = new MultipartBuilder() | |
.type(MultipartBuilder.FORM) | |
.addFormDataPart("gambar1", file1.getName(), | |
RequestBody.create(MEDIA_TYPE_IMAGE, file1)) |
This file contains 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
(for FILE in *.flac ; do ffmpeg -i "$FILE" -f mp3 -ab 320000 -map_metadata 0 -id3v2_version 3 "`basename "$FILE" .flac`.mp3" || break; done) |
This file contains 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
SmartLocation.with(getApplicationContext()).location() | |
.oneFix() | |
.config(LocationParams.NAVIGATION) | |
.provider(new LocationGooglePlayServicesWithFallbackProvider(getApplicationContext())) | |
.start(new OnLocationUpdatedListener() { | |
@Override | |
public void onLocationUpdated(Location location) { | |
latitude = location.getLatitude(); | |
longitude = location.getLongitude(); |
NewerOlder