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
| <% form_for :email, :url => { :controller => 'contact', :action => 'send_mail' } do |f| %> | |
| <%= f.label :name %><br /> | |
| <%= f.text_field :name, :size => 60 %><br /> | |
| <%= f.label :address %><br /> | |
| <%= f.text_field :address, :size => 60 %><br /> | |
| <%= f.label :subject %><br /> | |
| <%= f.text_field :subject, :size => 60 %><br /> | |
| <%= f.label :body %><br /> | |
| <%= f.text_area :body, :rols => 10, :cols => 60 %><br /> | |
| <%= submit_tag "Send Email "%> |
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
| def custom_text(text) | |
| if text.blank? | |
| "" | |
| else | |
| text = RedCloth.new(text).to_html | |
| if text[0..2] == "<p>" then text = text[3..-1] end | |
| if text[-4..-1] == "</p>" then text = text[0..-5] end | |
| text = text.gsub("<p>", "") | |
| text = text.gsub("</p>", "") | |
| return text |
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
| - (void)awakeFromNib | |
| { | |
| NSBundle * myMainBundle = [NSBundle mainBundle]; | |
| NSString * rtfFilePath = [myMainBundle pathForResource:@"file" ofType:@"rtf"]; | |
| [controller_Out_TextView readRTFDFromFile:rtfFilePath]; | |
| } |
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
| echo "<h2>Compiling $TM_FILENAME</h2>" | |
| cd "$TM_DIRECTORY" | |
| javac -encoding UTF8 "$TM_FILENAME" &> >("${TM_RUBY:-ruby}" -rtm_parser -eTextMate.parse_errors) |
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
| cp /tmp/flickr.cache /your/rails/application/config/flickr.cache | |
| rm /tmp/flickr.cache |
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
| sudo cp -f /Path_to_Icon/icon_file.icns /Path_to_Drive_Root/.VolumeIcon.icns |
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
| def self.from_xml(xml,photo=nil) |
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 'open-uri' |
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
| [flickr=<a href="http://www.flickr.com/photos/digitalpardoe/2900618617/" title="Isolation by digital:pardoe, on Flickr"> <img src="http://farm4.static.flickr.com/3095/2900618617_26bc8abc12.jpg" width="500" height="334" alt="Isolation" /></a>][/flickr] |
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 static int calculateDuration(Date startDate, Date endDate) | |
| { | |
| Calendar startCal = Calendar.getInstance(); | |
| startCal.setTime(startDate); | |
| Calendar endCal = Calendar.getInstance(); | |
| endCal.setTime(endDate); | |
| int workDays = 0; |
OlderNewer