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
<%= week_calendar events: @meetings do |date, meetings| %> | |
<%# Print out the date at the top %> | |
<%= date %> | |
<% (0..23).each do |hour| %> | |
<div class="hour-of-day"> | |
<%# Print out the current hour %> | |
<%= Time.parse("#{hour}:00").strftime("%l %P") %> | |
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
<input type="hidden" id="init-data" class="json-data" value="{"profileHoversEnabled":false,"baseFoucClass":"swift-loading","bodyFoucClassNames":"swift-loading","macawSwift":true,"assetsBasePath":"https:\/\/abs.twimg.com\/a\/1425667452\/","assetVersionKey":"c509db","environment":"production","formAuthenticityToken":"e0d92bab025125f0ef0c1f83ac79f339c39dfecc","isInRemoveDiscoverExperiment":false,"loggedIn":true,"screenName":"excid3","fullName":"Chris Oliver","userId":"14057736","allowAdsPersonalization":true,"scribeBufferSize":3,"pageName":"home","sectionName":"home","scribeParameters":{"lang":"en"},"recaptchaApiUrl":"https:\/\/www.google.com\/recaptcha\/api\/js\/recaptcha_ajax.js",&quo |
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 SignUpLink | |
constructor: -> | |
@setEvents() | |
setEvents: -> | |
$("#sign-up-link").on "click", @handleClick | |
handleClick: -> | |
$(".sign-up-form").show() | |
$(".sign-in-form").hide() |
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
grouped_options = { | |
'North America' => [['United States','US', attr: :wat], ['Canada', 'CA', attr: :wat]], | |
} | |
grouped_options_for_select(grouped_options) |
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
@TodoList = React.createClass | |
render: -> | |
`<ul> | |
{this.props.todos.map( | |
function(todo, index){ | |
return (<TodoItem key={index} id={todo.id} description={todo.description} completed_at={todo.completed_at} />) | |
}, this) | |
} | |
</ul>` |
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
describe Cell do | |
it "can be created" do | |
expect(Cell.new).to_not eq(nil) | |
end | |
it "can tick" do | |
cell = Cell.new | |
expect(cell).to respond_to(:tick!) | |
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
#!/usr/bin/python | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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
@user = User.find(:all) | |
@users.each do |fbid| | |
result = JSON.parse(open(URI.encode("https://graph.facebook.com/me/friends?access_token=#{fbid.utoken}")).read) | |
@friendsp = result['data'][0]['id'] | |
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
class Person: | |
population = 0 | |
def __init__(self, name): | |
self.name = name | |
Person.population += 1 | |
c = Person("chris") | |
b = Person("bob") |