Skip to content

Instantly share code, notes, and snippets.

@KarthiPnsmy
KarthiPnsmy / table.js
Created May 21, 2012 06:08
hide table row header in Android
exports.CourseList = function(page_title){
var platform = Ti.Platform.osname;
var courseDetail = require('ui/CourseDetailWindow');
var config = require('config/config');
var win = Ti.UI.createWindow({backgroundColor:'#000'});
// create table view data object
var params = [
#in my controller (following code works fine)
def index
p User.current.communications.size
@msg = Communication.find(:all)
@msg.each do |note|
p note.user.name
end
end
@KarthiPnsmy
KarthiPnsmy / redmine_active_record_relationship
Created April 20, 2012 11:52
redmine_ active record relationship
#in my communication.rb file, I have added following code
class Communication < ActiveRecord::Base
unloadable
belongs_to :user
User.class_eval do
has_many :communications
end
@KarthiPnsmy
KarthiPnsmy / app.js
Created March 7, 2012 09:57
Create Album and Post Photos in Facebook Using Appcelerator Titanium
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
//FACEBOOK CREDENTIAL
Titanium.Facebook.appid = "134793934930";
Titanium.Facebook.permissions = ['publish_stream', 'read_stream'];
//
// create root window