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
import Data.List (intersect) | |
import qualified Data.Map as Map | |
prefs = Map.fromList | |
[("Lisa Rose", Map.fromList [("Lady in the Water", 2.5) | |
, ("Snakes on a Plane", 3.5) | |
, ("Just My Luck", 3.0) | |
, ("Superman Returns", 3.5) | |
, ("You, Me and Dupree", 2.5) | |
, ("The Night Listener", 3.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
#include <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
#define MAX_DATA 512 | |
#define MAX_ROWS 100 | |
struct Address { |
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
(define-route main ("" :method :get) | |
(with-html-output-to-string (out) | |
(:html | |
(:body | |
(:h1 (princ-safe "Le Reader")))))) |
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
GIT | |
remote: git://github.com/pilu/web-app-theme.git | |
revision: b7310fe5001ed03b965049f293fce3527ae98dae | |
specs: | |
web-app-theme (0.8.0) | |
rails (~> 3.2.0) | |
thor (~> 0.14) | |
PATH | |
remote: vendor/gems/acts-as-taggable-on-2.3.3 |
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
import urllib | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import re | |
import time | |
# expressao regular pra remover a sujeira do campo da linha de onibus | |
linha_r = re.compile('[\t\n\r\-\|]+') | |
url = "http://www.pmf.sc.gov.br/servicos/index.php?pagina=onibus" |
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 Instructions | |
# | |
# Write a function, extend_prefix, nested in find_words, | |
# that checks to see if the prefix is in WORDS and | |
# adds that to results if it is. | |
# | |
# If not, your function should check to see if the prefix | |
# is in PREFIXES, and if it is should recursively add letters | |
# until the prefix is no longer valid. |
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
(defparameter *num-players* 2) | |
(defparameter *max-dice* 3) | |
(defparameter *board-size* 2) | |
(defparameter *board-hexnum* (* *board-size* *board-size*)) | |
(defun board-array (lst) | |
(make-array *board-hexnum* :initial-contents lst)) | |
(defun gen-board () | |
(board-array (loop for n below *board-hexnum* |
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
-javascript 'post' | |
= simple_form_for(@post) do |f| | |
= render 'shared/error_messages', :target => @post | |
.inputs | |
= f.input :title | |
= f.input :sequence | |
= f.input :description, :input_html => {:rows =>5} | |
= f.simple_fields_for :sections do |section_f| |
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
puts "Ola!" | |
puts "Vamos calcular?" | |
puts "Coloque uma valor para a em ax2+bx+c=0, sendo a diferente de 0." | |
a = gets.chomp.to_f | |
puts "Agora, coloque uma valor para b em ax2+bx+c=0." | |
b = gets.chomp.to_f | |
puts "Agora, para finalizar, coloque uma valor para c em ax2+bx+c=0." | |
c = gets.chomp.to_f | |
x = (b*b) - (4*a*c) | |
puts '' |
NewerOlder