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
# ---------------------------------------------------------------------- | |
# Expires headers (for better cache control) | |
# ---------------------------------------------------------------------- | |
# These are pretty far-future expires headers. | |
# They assume you control versioning with filename-based cache busting | |
# Additionally, consider that outdated proxies may miscache | |
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ | |
# If you don't use filenames to version, lower the CSS and JS to something like |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :get_menu_ready | |
def after_sign_in_path_for(resource) | |
session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions" | |
end | |
def after_sign_out_path_for(resource) |
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
# Controller | |
def index | |
@locations = Location.all | |
respond_to do |format| | |
format.json { render json: @locations } | |
end | |
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
.pure-button-success, | |
.pure-button-error, | |
.pure-button-warning, | |
.pure-button-secondary { | |
color: white; | |
border-radius: 4px; | |
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | |
} | |
.pure-button-success { | |
background: rgb(28, 184, 65); /* this is a green */ |
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 introtocs; | |
import java.util.Date; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
public class DateCompare { | |
/** | |
* @param args |
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
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Landroid/support/v4/app/_ActionBarSherlockTrojanHorse; (150) | |
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Landroid/support/v4/app/_ActionBarSherlockTrojanHorse;' failed | |
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lcom/actionbarsherlock/app/SherlockFragmentActivity; (160) | |
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Lcom/actionbarsherlock/app/SherlockFragmentActivity;' failed | |
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lorg/devcon/android/BaseActivity; (335) | |
11-10 18:00:31.423: W/dalvikvm(450): Link of class 'Lorg/devcon/android/BaseActivity;' failed | |
11-10 18:00:31.423: W/dalvikvm(450): Unable to resolve superclass of Lorg/devcon/android/HomeActivity; (1495) | |
11-10 18:00:31.434: W/dalvikvm(450): Link of class 'Lorg/devcon/android/HomeActivity;' failed | |
11-10 18:00:31.434: E/dalvikvm(450): Could not find class 'org.devcon.android.HomeActivity', referenced from method org.devcon.andr |
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
{"id":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","name":"DevCon API","timestamp":1383201440460,"requests":[{"collectionId":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","id":"48cbe48c-8bcf-b719-322a-81c033740ad7","name":"Speakers","description":"","url":"devconmyanmar.herokuapp.com/api/v1/speakers","method":"GET","headers":"","data":[],"dataMode":"params","timestamp":0,"responses":[],"version":2},{"collectionId":"1eea17a7-4fe8-8f5e-b384-1375ab2dd0d1","id":"cadc6a9d-b386-f75e-c1c4-6441d5f6ba03","name":"Schedules","description":"","url":"devconmyanmar.herokuapp.com/api/v1/schedules","method":"GET","headers":"","data":[],"dataMode":"params","timestamp":0,"responses":[],"version":2}]} |
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 boolean getTalkStatus(String tID) { | |
Cursor fav = mDb.rawQuery( | |
("SELECT " + DBHelper.tFAV + " FROM " + DBHelper.TABLE_TALK | |
+ " WHERE " + DBHelper.tID + " = " + tID), null); | |
// it makes me half my of day gone | |
fav.moveToFirst(); | |
if (fav.getCount() > 0) { | |
do { | |
if (fav.getInt(0) == 0) { |
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
private void onSpeakersQueryComplete(Cursor cursor) { | |
mSpeakersCursor = true; | |
final ViewGroup speakersGroup = (ViewGroup) | |
mRootView.findViewById(R.id.session_speakers_block); | |
// Remove all existing speakers (everything but first child, which is the header) | |
for (int i = speakersGroup.getChildCount() - 1; i >= 1; i--) { | |
speakersGroup.removeViewAt(i); | |
} |
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
def say_hello(name) | |
puts "Hi #{name}" | |
end | |
# say_hello("devlabs") | |
def say_hello(name,age) | |
puts "Hi #{name} and your age is\n" | |
puts age | |
end | |
# say_hello("yelinaung",21) |
OlderNewer