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.exports = function (grunt) { | |
grunt.initConfig({ | |
// jshint: { | |
// browser: ["public/js/**/*.js"], | |
// }, | |
jshint: { | |
client: ["public/js/**/*.js", "!public/js/vendor"], | |
}, | |
// less: { | |
// compile: { |
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
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
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 Show < ActiveRecord::Base | |
def self.highest_rating | |
Show.maximum(:rating) | |
end | |
def self.most_popular_show | |
self.where("rating=?",self.highest_rating).first | |
end |
Getting started:
Related tutorials:
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
# Hello World program in Python | |
import random | |
secret_number = random.randint(0, 100) | |
guess = -1 | |
counter = 0 | |
while secret_number != guess and counter < 10: | |
guess = int(input("Enter a number: ")) | |
if 0 <= guess <= 100: | |
if guess < secret_number: |
NewerOlder