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
class ActionItem | |
field :due_date, :type => Date | |
field :completed, :type => Boolean | |
field :description | |
has_one_related :person | |
embedded_in :meeting, :inverse_of => :action_items |
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
$(function() { | |
$(".multiselect").multiselect(); | |
$('#sortFields').sortable({ | |
update:function(event,ui) { | |
var arr = $('#sortFields').sortable('toArray'); | |
var newVal = ""; | |
for(i=1; i<arr.length; i++) { newVal += arr[i] + ","; } | |
$('#sortOrderIds').val(newVal); | |
} | |
}); |
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
<!--- | |
Database Migration Script: | |
Instructions here | |
---> | |
<cfsavecontent variable="up"> | |
<!--- The contents in this section will be used to apply your update ---> | |
CREATE VIEW [ats].[VW_R_T1] | |
AS | |
SELECT TOP 3 * FROM ats.vw_r | |
</cfsavecontent> |
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
component name="col" { | |
function init( | |
required string name, | |
required string displayName, | |
required string dataType="string", | |
required boolean canSort=false, | |
required boolean canDisplay=false | |
) { | |
variables.tbl = ""; | |
variables.name = arguments.name; |
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
#base_template.rb | |
#sets up basic rails3 application structure with jquery-ujs | |
#remove index page | |
run "rm public/index.html" | |
@jquery_link = "http://code.jquery.com/jquery-1.4.1.min.js" | |
@jquery_ujs_link = "http://github.com/rails/jquery-ujs/raw/master/src/rails.js" | |
#setup Gemfile |
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
<h1><%= @path %></h1> | |
<ul> | |
<% if archives.length > 0 %> | |
<% archives.sort! {|x,y| y[:date] <=> x[:date] } %> | |
<% archives.collect {|a| a[:date].year }.uniq.each do |year| %> | |
<h3><%= year %></h3> | |
<% archives.select {|e| e[:date].year == year }.each do |entry| %> | |
<li> |
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
component output="no" { | |
public function fileAnchorTag( | |
required relativePath, | |
displayName, | |
fileType) { | |
// determine file details | |
var fileInfo = GetFileInfo(ExpandPath(relativePath)); | |
// set default params |
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
component output="no" { | |
function init() { | |
variables.itemArray = []; | |
} | |
function append(item) { | |
ArrayAppend(variables.itemArray, arguments.item); | |
} | |
function sortBy(key){ |
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
component { | |
function init(required string configFile) { | |
variables.configFile = arguments.configFile; | |
variables.loadSections = ["common", CGI.SERVER_NAME]; | |
return getConfig(); | |
} | |
private function getConfig() { | |
var config = StructNew(); |
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
require 'net/http' | |
require 'uri' | |
print <<INFO | |
QR Code Generator | |
Generated codes will be saved to "label.png" in the current directory | |
INFO | |
print "Text to encode: " | |
label_contents = gets.strip |
OlderNewer