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
/* | |
@AntonyMarcano: | |
This is the default Appcelerator Titanium app.js file | |
created for you when you create a new project, including all the comments. | |
I think this makes the framework harder rather than easier to understand | |
*/ | |
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); |
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 uk.co.studentvoiceonline.android.activity; | |
import static uk.co.studentvoiceonline.android.adapter.UniversitiesAdapter.during; | |
import static uk.co.studentvoiceonline.android.adapter.UniversitiesAdapter.forListing; | |
import java.util.List; | |
import uk.co.studentvoiceonline.University; | |
import uk.co.studentvoiceonline.UniversityExpert; | |
import uk.co.studentvoiceonline.android.R; |
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 onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
theUniversities = theUniversities(); | |
showAListOf(theUniversities); | |
theUserCanFilterThemByTyping(); | |
} | |
@Override | |
protected void onListItemClick(ListView l, View v, int inThisPosition, long id) { |
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
using System; | |
using System.IO; | |
using System.Net | |
var request = WebRequest.Create("http://google.com") as HttpWebRequest; | |
using (var response = request.GetResponse() as HttpWebResponse) | |
{ | |
var reader = new StreamReader(response.GetResponseStream()); | |
Console.WriteLine(reader.ReadToEnd();); |
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
dict = File.open('/path/to/dictionary.file') | |
lines = dict.readlines | |
if ARGV[0] != nil | |
number_of_words = ARGV[0] | |
else | |
number_of_words = 1 | |
end | |
words = [] |
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
$:.unshift(File.dirname(__FILE__), ".") | |
require 'rubygems' | |
require 'rspec' | |
module Butler | |
def self.extended base | |
base.get_ready | |
end |
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
@Test | |
public void should_be_able_to_add_the_first_todo_item() { | |
givenThat(james).wasAbleTo(Start.withAnEmptyTodoList()); | |
when(james).attemptsTo(AddATodoItem.called("Buy some milk")); | |
then(james).should(seeThat(TheItems.displayed(), hasItem("Buy some milk"))); | |
} |
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
Actor james = Actor.named(“James”); |
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
@Test | |
public void should_be_able_to_add_the_first_todo_item() |
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
@Given(“James starts with one item in his todo list”) | |
public void start_with_one_todo(){ | |
james.attemptsTo( | |
Start.withAnEmptyTodoList(), | |
AddATodoItem.called(“Buy some milk”) | |
); | |
} |
OlderNewer