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
| -- Dado um arquivo conta quantas linhas o mesmo tem. | |
| main = interact wordCount | |
| where wordCount input = show( length (lines input)) ++ "\n" |
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
| #index controller client | |
| def index | |
| #@clients = Client.where("user_id = ? AND name LIKE ?", current_user.id, "%#{params[:search]}%").order("name ASC") | |
| @clients = current_user.clients.search_by_name(params[:search]) | |
| end | |
| #Model Client | |
| def self.search_by_name(name) |
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
| (println "Hello") |
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
| (println )) |
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
| * (− 10 34) 2 | |
| 4 − 43 * 11 |
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 (* 100000 500000)) | |
| java.lang.Long |
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
| (.toUpperCase "Teste") | |
| "TESTE" |
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
| (str 'Hello ' 10000000 nil ' Testes') |
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
| (defn say_hello | |
| "Retorna Hello username, se username for | |
| omitido asume world" | |
| ([] (say_hello "world")) | |
| ([username] | |
| (str "Hello, " username))) | |
| (say_hello "edipo") | |
| (say_hello) |
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
| (ns exploring | |
| (:require [clojure.contrib.string :as str])) | |
| (defn a-function [word] | |
| "Capitaliza todas palavras maiores que 2 chars" | |
| (if (>(count word ) 2) (str/capitalize word))) | |
| (use '[clojure.contrib.str-utils :only (re-split)]) | |
| (filter a-function (re-split #"\W+" "A fine day it is")) |