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
source 'https://rubygems.org' | |
group :test do | |
gem 'minitest' | |
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 class RefreshService extends Service { | |
public void refreshTimeline() { | |
//build the intent with new messages | |
this.sendOrderedBroadcast(intent, null); | |
} | |
} |
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 TimelineActivity { | |
private RefreshTimelineReceiver refreshReceiver; | |
public void onResume() { | |
super.onResume(); | |
IntentFilter filter = new IntentFilter(RefreshService.REFRESH_TIMELINE); | |
refreshReceiver = new RefreshTimelineReceiver(); | |
registerReceiver(refreshReceiver, filter); | |
} | |
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 RefreshService extends Service { | |
public void refreshTimeline() { | |
//build the intent with new messages | |
sendBroadcast(intent); | |
} | |
} |
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 MyApplication extends Application { | |
private static MyApplication singleton; | |
public static MyApplication getInstance(){ | |
return singleton; | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
singleton = this; |
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
MyApplication mApplication = (MyApplication)getApplicationContext(); | |
String username = mApplication.getUsername(); | |
String password = mApplication.getPassword(); |
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 MyApplication extends Application { | |
private SharedPreferences mPrefs; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
mPrefs = PreferenceManager.getDefaultSharedPreferences(this); | |
} | |
public String getUsername(){ |
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
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name="MyApplication"> |
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
mac-mini:newsite bl0ck$ ruby script/server | |
=> Booting Mongrel | |
=> Rails 2.3.5 application starting on http://0.0.0.0:3000 | |
config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. | |
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Wed Jan 26 20:28:25 +0800 2011: Read error: #<LoadError: Expected /Library/Ruby/Gems/1.8/gems/unindentable-0.1.0/lib/unindentable.rb to define Unindentable> | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:426:in `load_missing_constant' | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Action Controller: Exception caught</title> | |
<style> | |
body { background-color: #fff; color: #333; } | |
body, p, ol, ul, td { | |
font-family: verdana, arial, helvetica, sans-serif; | |
font-size: 13px; | |
line-height: 18px; |
NewerOlder