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
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingLeft="16dp" | |
android:paddingRight="16dp" | |
android:paddingTop="16dp" | |
android:paddingBottom="16dp" | |
android:orientation="vertical"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Books</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
$(function() { | |
var i = 0; | |
var searchTerm = ''; | |
function getBooks(subject, startIndex){ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Books</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
$(function() { | |
var i = 0; | |
var searchTerm = ''; | |
function getBooks(subject, startIndex){ |
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
//page 3 changes | |
var myList = ['apple', 'orange' 'banana']; | |
var fruit = myList[2]; | |
//page 5 changes | |
//question should change to 'What is the value returned in the above function printFavoriteColor?' | |
//This should be a text answer instead of multiple choice | |
function printFavoriteColor(){ | |
var colors = ['red', 'orange', 'yellow', 'green', 'blue', 'purple']; | |
var randomString = ""; |
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
//Apex trigger | |
trigger Accepted on Training__c (before update) { | |
for (Training__c training : Trigger.new) { | |
Training__c oldTraining = Trigger.oldMap.get(training.id); | |
Boolean oldAccepted = oldTraining.Accepted__c.equals('YES'); | |
Boolean newAccepted = training.Accepted__c.equals('YES'); | |
if (!oldAccepted && newAccepted) { | |
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 void onLoginSuccess() { | |
MyTwitterApp.getRestClient().getUserCredentials(new JsonHttpResponseHandler () { | |
@Override | |
public void onSuccess(JSONObject jsonUser) { | |
User user = User.fromJson(jsonUser); | |
UserModel currentUser = new UserModel(user.getScreenName(), user.getProfileImageUrl()); | |
currentUser.save(); | |
SharedPreferences pref = getSharedPreferences("myPrefs", MODE_PRIVATE); | |
Editor edit = pref.edit(); | |
edit.putString("current_user", currentUser.getId().toString()); |
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
if defined? RSpec # otherwise fails on non-live environments | |
task(:spec).clear | |
desc "Run all specs/features in spec directory" | |
RSpec::Core::RakeTask.new(:spec => 'db:test:prepare') do |t| | |
t.pattern = './spec/**/*{_spec.rb,.feature}' | |
end | |
namespace :spec do | |
desc "Run the code examples in spec/acceptance" | |
RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t| |
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
set -e | |
gem install bundler | |
bundle install --binstubs bin | |
createuser -s -e replacemewithusername | |
rake db:create | |
rake db:migrate | |
rake db:seed |