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
PRAGMA encoding="UTF-8"; | |
CREATE TABLE localidades ( clave_entidad text, entidad text, clave_mpo text, municipio text, clave_loc text, localidad text, ambito text, latitude real, longitude real) ; | |
.separator , | |
.import localidades.csv localidades | |
ALTER TABLE localidades ADD COLUMN geom blob ; | |
UPDATE localidades SET geom = PointFromText ( 'POINT(' || longitude || ' ' || latitude || ')', 4326 ) ; |
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
package plugins; | |
import play.PlayPlugin; | |
import play.mvc.Http; | |
import play.mvc.Http.Request; | |
import play.mvc.Http.Response; | |
import play.mvc.Router.Route; | |
import play.vfs.VirtualFile; | |
import util.MetricsUtil; |
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
public final class CompositeAdapter<T> extends BaseAdapter { | |
private final List<T> fHeadings; | |
private final List<ListAdapter> fAdapters; | |
private int[] fLookupTable; | |
private final DataSetObserver fChildObserver; | |
private final Object fLock; |
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
.gradle | |
/local.properties | |
/.idea/workspace.xml | |
/.idea/libraries | |
.DS_Store | |
/build | |
/captures | |
.idea | |
*.apk | |
app/src/release |
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
#import <RestKit/RestKit.h> | |
#import "CoreData+MagicalRecord.h" | |
// Use a class extension to expose access to MagicalRecord's private setter methods | |
@interface NSManagedObjectContext () | |
+ (void)MR_setRootSavingContext:(NSManagedObjectContext *)context; | |
+ (void)MR_setDefaultContext:(NSManagedObjectContext *)moc; | |
@end | |
@implementation AppDelegate |
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
http://velouria.org/a-webobjects-development-environment-on-os-x/ | |
This is a reminder to myself about how to install a WebObjects development environment on a fresh OS X Yosemite: | |
WebObjects logo + Yosemite logo | |
Install Xcode 6.1. Install the developer tools by typing in the Terminal: xcode-select –install Install ant (with, for instance, brew). | |
Install Java SE Development Kit from Oracle. | |
version "8u25" |
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
public class TabsPagerAdapter extends FragmentPagerAdapter implements PagerSlidingTabStrip.IconTabProvider { | |
final int[] ICONS = new int[]{ | |
R.drawable.tab_1, | |
R.drawable.tab_2, | |
R.drawable.tab_3, | |
R.drawable.tab_4, | |
}; | |
public TabsPagerAdapter(FragmentManager fm) { |
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
//Auto playing vimeo videos in Android webview | |
mWebView.getSettings().setJavaScriptEnabled(true); | |
mWebView.getSettings().setAppCacheEnabled(true); | |
mWebView.getSettings().setDomStorageEnabled(true); | |
// how plugin is enabled change in API 8 | |
if (Build.VERSION.SDK_INT < 8) { | |
mWebView.getSettings().setPluginsEnabled(true); | |
} else { | |
mWebView.getSettings().setPluginState(PluginState.ON); |
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
cd [my workspace folder] | |
cd .metadata | |
find . -name .markers -exec rm {} \; | |
eclipse -clean -refresh |
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
package com.sjl.util; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import java.util.List; |
NewerOlder