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
#include <iostream> | |
using namespace std; | |
int main() { | |
int i, n; | |
cin >> n; | |
for (i=0; i<n; i++) { | |
cout << "hello world\n"; | |
} | |
return 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
rails g model Part name:string description:text | |
rake db:migrate |
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
017-03-28T18:37:12.826Z 20268 TID-oxi3cqvik INFO: Running in ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16] | |
2017-03-28T18:37:12.826Z 20268 TID-oxi3cqvik INFO: Sidekiq Pro 3.4.5, commercially licensed. Thanks for your support! | |
2017-03-28T18:37:12.828Z 20268 TID-oxi3cqvik DEBUG: Client Middleware: Sidekiq::Batch::Client, SidekiqUniqueJobs::Client::Middleware | |
2017-03-28T18:37:12.828Z 20268 TID-oxi3cqvik DEBUG: Server Middleware: Sidekiq::Middleware::Server::Logging, Sidekiq::Middleware::Server::RetryJobs, Sidekiq::Middleware::Server::ActiveRecord, Sidekiq::Batch::Server, SidekiqUniqueJobs::Server::Middleware, Honeybadger::Plugins::Sidekiq::Middleware, NewRelic::SidekiqInstrumentation | |
2017-03-28T18:37:12.828Z 20268 TID-oxi3cqvik INFO: Starting processing, hit Ctrl-C to stop | |
2017-03-28T18:37:12.829Z 20268 TID-oxi3cqvik DEBUG: {:queues=>["default", "pentaho_job", "ruby_job"], :labels=>[], :concurrency=>10, :require=>".", :environment=>nil, :timeout=>8, :poll_interval_average=>nil, :average_scheduled_ |
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 DwTestJob1 | |
include Sidekiq::Worker | |
sidekiq_options queue: :default, retry: false | |
def perform(opts={}) | |
puts('Starting Job1') | |
sleep(1.minute) | |
puts('Ending Job1') | |
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
#<%= link_to 'New Article', new_article_path, :id => 'create_article' %> | |
jQuery -> | |
$('#create_article').click( (e) -> | |
url = $(@).attr('href') | |
dialog_form = $('<div id="dialog-form">Firing up...</div>').dialog( | |
autoOpen: false | |
width: 520 | |
modal: true | |
open: -> |
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
Given: | |
Organization | |
has_one :plan, dependent: :destroy, inverse_of: :organization | |
validates_presence_of :name, :plan | |
Plan | |
belongs_to :organization, inverse_of: :plan | |
validates :organization, :type, presence: true |
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
require "spec_helper" | |
module TimeZoneTestHelper | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods |
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
{ | |
"debug_info" => [], | |
"html_attributions" => [], | |
"result" => { | |
"address_components" => [ | |
[0] { | |
"long_name" => "Provo", | |
"short_name" => "Provo", | |
"types" => [ | |
[0] "locality", |
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
[15] pry(main)> details | |
{ | |
"debug_info" => [], | |
"html_attributions" => [], | |
"result" => { | |
"address_components" => [ | |
[0] { | |
"long_name" => "Monterra Apartments", | |
"short_name" => "Monterra Apartments", | |
"types" => [ |
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 Middleware::Caring::Api | |
include HTTParty | |
#debug_output $stdout | |
base_uri 'dir.caring.com' | |
format :json | |
RESOURCE = '/api/v1/reviews/feed.json' | |
PID = 'fb0487e0' |
NewerOlder