This file contains hidden or 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 SessionsController < ApplicationController | |
@base_uri = 'service.hwrdprkns.com:8080/' | |
def new | |
@title = 'Sign In' | |
end | |
def create | |
if params[:session][:email].blank? || params[:session][:password].blank? |
This file contains hidden or 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
# == Schema Information | |
# | |
# Table name: players | |
# | |
# id :integer not null, primary key | |
# first_team :boolean | |
# preffered_position :string(255) | |
# rating :integer | |
# hometown :string(255) | |
# notes :text |
This file contains hidden or 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
<%= flash.each do |key,value| %> | |
<div class="flash <%= key %> span-22 last prepend-1"> | |
<%= value %> | |
</div> | |
<% end %> |
This file contains hidden or 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 URLRead(URL url) { | |
BufferedReader reader; | |
awl = new ArrayList<AptWrapper>(); | |
Log.d(TAG,url.toExternalForm()); | |
try { | |
reader = new BufferedReader(new InputStreamReader(url.openStream())); | |
String str; | |
boolean flag = false; | |
error_flag = false; | |
while ((str = reader.readLine()) != null && error_flag == false) { |
This file contains hidden or 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 AppRater { | |
private final static String APP_TITLE = "YOUR-APP-NAME"; | |
private final static String APP_PNAME = "YOUR-PACKAGE-NAME"; | |
private final static int DAYS_UNTIL_PROMPT = 3; | |
private final static int LAUNCHES_UNTIL_PROMPT = 7; | |
public static void app_launched(Context mContext) { | |
SharedPreferences prefs = mContext.getSharedPreferences("apprater", 0); | |
if (prefs.getBoolean("dontshowagain", false)) { return ; } |
This file contains hidden or 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
9 Pylon | |
10 Queue up 3 Probes and Chrono Boost their production twice in a row. | |
13 Gateway | |
14 1st Vespine Gas | |
16 Pylon | |
18 Cybernetics Core | |
18 2nd Vespine Gas | |
19 Zealot (GET ZEALOT BEFORE CYBERNETICS CORE IF YOUR OPPONENT MIGHT BE AGGRESSIVE) | |
23 Research Warp Gates | |
23 Zealot |
This file contains hidden or 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
private Drawable LoadThumbnailFromURL(String url) { | |
if(downloader.getBitmapFromCache(url) != null){ | |
Bitmap b = downloader.getBitmapFromCache(url); | |
//HERE IS WHERE I WANT TO SCALE THE IMAGE IF ITS IN THE CACHE | |
} | |
try { | |
URLConnection connection = new URL(url).openConnection(); | |
String contentType = connection.getHeaderField("Content-Type"); |
This file contains hidden or 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
1AqYrZijbENBSQSyLbsRAGUwbstsvKBg95 |
This file contains hidden or 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
Process: Xcode [1060] | |
Path: /Developer/Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 4.1 (516) | |
Build Info: IDEApplication-516000000000000~18 | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [173] | |
Date/Time: 2011-08-08 10:24:33.663 -0400 | |
OS Version: Mac OS X 10.7 (11A511) |
This file contains hidden or 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
/* | |
USAGE: | |
copy and paste all of this into the javascript console. you can then call falseVote(ians_comment_id, times) to upvote | |
ian as partygoer times times. you can also provide your own comment_id by doing an inspect element on the voting div | |
on anyone's profile. | |
the ajax requests are synchronous to allow for the coockie bs. this makes the execution seem slow for large times. | |
i wonder how long it takes to run it for thousands of iterations... | |
*/ |
OlderNewer