Skip to content

Instantly share code, notes, and snippets.

View px-amaac's full-sized avatar

Aaron McIntyre px-amaac

View GitHub Profile
public class Object1{
public ArrayList<Object2> results;
public ArrayList<Object1> locations;
//public ArrayList<Object1> results; I need this at some point here
@px-amaac
px-amaac / Redirection
Last active August 29, 2015 14:06
Many to Many relationship.
(0.1ms) begin transaction
SQL (2.4ms) INSERT INTO "tags" ("created_at", "key", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", "2014-09-05 04
:02:04.349445"], ["key", "heydude"], ["updated_at", "2014-09-05 04:02:04.349445"], ["value", "dudehey"]]
(4.3ms) commit transaction
<p>
<%= form_for([@photo, @tag]) do |f| %>
<div class="field">
<%= f.label :key %>
<%= f.text_field :key %>
</div>
<div class="field">
<%= f.label :value %>
<%= f.text_field :value %>
</div>
<?xml version="1.0" encoding="utf-8"?>
<com.leafviews.ItemView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/panel_content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/chiclet">
package com.teststaggeredgrid;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.squareup.picasso.Picasso;
import java.util.Collections;
import java.util.List;
public void bindTo(FSStore item, Picasso picasso) {
targetImage = item.getImage();
picasso.setLoggingEnabled(true);
imageRequest = picasso.load(targetImage.getUrl());
distance.setText(String.valueOf(item.getDistance()) + "miles away");
imageAspectRatio = 1f * targetImage.getWidth() / targetImage.getHeight();
@px-amaac
px-amaac / _form.html.erb
Last active August 29, 2015 14:05
Simple has_many :through
<%= form_for @photo, :html => { :multipart => true } do |photo| %>
<div class="field">
<%= photo.label :title %>
<%= photo.text_field :title %>
</div>
<div class="field">
<%= photo.file_field :image %>
</div>
<%= photo.fields_for :tags do |tag| %>
/My\ Documents/**/build/
/**/build/
build/
/**/build
/My\ Documents/**/build
#!/bin/bash
PREFIX=$1
START=$2
END=$3
for i in $(eval echo {$START..$END})
do
echo "deleting $PREFIX$i"
qdel $PREFIX$i
private void findMaid(String httpRequestExtension) {
PassRestClient.get(httpRequestExtension, null,
new JsonHttpResponseHandler() {
@Override
public void onSuccess(JSONObject response) {
new ParseMaid().execute(response);
}
});
}