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
| import Ember from 'ember'; | |
| import config from './config/environment'; | |
| const Router = Ember.Router.extend({ | |
| location: 'none', | |
| rootURL: config.rootURL | |
| }); | |
| Router.map(function() { | |
| this.route('scientists'); |
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
| New: | |
| class BaseNotifier | |
| def initialize(attributes={}) | |
| @client_ip, @ec2_instance_id, @environment, @hl7_message, | |
| @hl7_response, @queue_response, @stats, @title = %i( | |
| client_ip ec2_instance_id environment hl7_message | |
| hl7_response queue_response stats title | |
| ).map do |key| | |
| attributes.fetch(key, '') | |
| 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
| <?php | |
| $term_list = ''; | |
| $terms = get_terms('product_cat', array( 'taxonomy' => 'product_cat', 'child_of' => 16, 'exclude_tree' => 15 );); | |
| foreach ($terms as $term) { | |
| $term_list .= '<li><a href="/shop/product-category/' . $term->slug . '/" title="' . sprintf(__('View all products filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a></li>'; | |
| } | |
| echo $term_list; | |
| ?> |
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 AddSchedulingAppointmentStatuses < ActiveRecord::Migration | |
| def change | |
| create_table :appointment_status do |t| | |
| t.string :code | |
| t.string :description | |
| t.timestamps | |
| end | |
| AppointmentStatus.create(:code => 'S', :description => 'Scheduled') |
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 AddSchedulingAppointmentStatuses < ActiveRecord::Migration | |
| def change | |
| create_table :schapptstatc do |t| | |
| t.string :code | |
| t.string :descrip | |
| t.timestamps | |
| end | |
| AppointmentStatus.create(:code => 'S', :description => 'Scheduled') | |
| AppointmentStatus.create(:code => 'I', :description => 'Checked In') | |
| AppointmentStatus.create(:code => 'O', :description => 'At Resource') |
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
| <script type="text/javascript"> | |
| $(function () { | |
| var eventDate = new Date(2013, 2-1, 1); | |
| if (eventDate - (new Date()) <= 0) { | |
| $('.countdown-<?php the_id(); ?>').countdown({until: eventDate}); | |
| }else{ | |
| $('.countdown-<?php the_id(); ?>').html('Married on ' + eventDate.getMonth() + '/' + eventDate.getDay() + '/' + eventDate.getFullYear()) | |
| } | |
| }); | |
| </script> |
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
| [root@cramp ~]# irb | |
| irb(main):001:0> @foo = Struct.new(:foo, :bar) | |
| => #<Class:0x2b40c83d5bb0> | |
| irb(main):002:0> def create_structure(arr) | |
| irb(main):003:1> f = @foo.new(arr[0], arr[1]) | |
| irb(main):004:1> puts f.foo | |
| irb(main):005:1> end | |
| => nil | |
| irb(main):006:0> create_structure(["foo", "bar"]) | |
| NameError: undefined local variable or method `foo' for main:Object |
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
| <script type="text/javascript"> | |
| $(function() { | |
| noty({"text":"Hi!","layout":"top","type":"error","textAlign":"center","easing":"swing","animateOpen":{"height":"toggle"},"animateClose":{"height":"toggle"},"speed":"500","timeout":false,"closable":true,"closeOnSelfClick":true}); | |
| }); | |
| </script> |
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
| <?php | |
| if (!$post->post_parent) { | |
| $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); | |
| } else { | |
| $p = end(get_post_ancestors($post->ID)); | |
| $children = wp_list_pages('title_li=&child_of='.$p.'&echo=0'); | |
| } | |
| if ($children): | |
| $parent_title = end(get_post_ancestors($post)); |
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
| !!! 5 | |
| %html{:class => 'no-js', :lang => 'en'} | |
| %head | |
| -# To render a different stylesheet partial inside the head (i.e. for admin layout) | |
| -# just copy _stylesheets.html.haml, and point to that partial instead. | |
| = render "layouts/head", :stylesheet_partial => "layouts/stylesheets" | |
| %body{ :class => "#{controller.controller_name}" } | |
| #container | |
| %header#header |
NewerOlder