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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace SleepSort | |
| { | |
| class Program | |
| { |
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
| view = (message) -> | |
| console.log(message) | |
| variable = "first" | |
| parentFunction = -> | |
| variable = "second" | |
| childFunction = -> | |
| view variable | |
| childFunction |
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
| ActiveAdmin.register Company do | |
| index do | |
| column "#", :id | |
| column :name, :sortable => :"addresses.name" | |
| column "Owner", :sortable => :"users.first_name" do |company| | |
| company.owner.name | |
| end | |
| column "City", :print_city | |
| column "State", :print_state | |
| column :plan |
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
| --colour |
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
| General layout: | |
| root | |
| lib | |
| hw1 | |
| part1.rb | |
| spec | |
| hw1 | |
| part1_spec.rb | |
| .rspec | |
| Guardfile |
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 () { | |
| var jQuery; | |
| var token = "42"; | |
| var location = "<%= "http://#{ActionMailer::Base.default_url_options[:host]}/" %>"; | |
| if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.8.2') { | |
| var script_tag = document.createElement('script'); | |
| script_tag.setAttribute("type", "text/javascript"); | |
| script_tag.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"); | |
| if (script_tag.readyState) { |
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
| using System; | |
| using System.Globalization; | |
| using System.Text; | |
| public class MountainWalk | |
| { | |
| private string[] _areaMap; | |
| private int _height; |
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
| using System.Text; | |
| public class KDoubleSubstrings | |
| { | |
| public int howMuch(string[] str, int k) | |
| { | |
| int result = 0; | |
| StringBuilder stringBuilder = new StringBuilder(); | |
| foreach (string s in str) |
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
| ActiveAdmin::Dashboards.build do | |
| # Add this section in your dashboard... | |
| section "Background Jobs" do | |
| now = Time.now.getgm | |
| ul do | |
| li do | |
| jobs = Delayed::Job.where('failed_at is not null').count(:id) | |
| link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red' | |
| end |
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
| module Apibugfreak | |
| class Resources::V1::ErrorsAPI < Grape::API | |
| resources :errors do | |
| desc 'Create a error' | |
| post do | |
| authenticate! | |
| ApplicationErrorService.new(@current_application).create_application_error(params) | |
| end | |
| end |
OlderNewer