Vprašanje:
Zdravo,
Sem rekel, da se bom kar na tebe obrnil, ker si mi zdiš najbolj primeren za to vprašanje.
Sem mal pregledal zadevo in sedaj imam sledeči spisek:
- Ruby
- Java
import cats.Traverse | |
import cats.effect._ | |
import cats.effect.concurrent.Semaphore | |
import cats.temp.par._ | |
import cats.syntax.all._ | |
import scala.concurrent.duration._ | |
object Main extends IOApp { | |
import ParTask._ |
akar.try-out=> (macroexpand-1 '(match n | |
(:and [(!div-by 3)][(!div-by 5)]) "Fizzbuzz" | |
[(!div-by 3)] "Fizz" | |
[(!div-by 5)] "Buzz" | |
:_ n)) | |
(akar.primitives/match* n | |
(akar.primitives/or-else | |
(akar.primitives/clause* (akar.combinators/!and (!div-by 3) (!div-by 5)) (clojure.core/fn [] "Fizzbuzz")) | |
(akar.primitives/clause* (!div-by 3) (clojure.core/fn [] "Fizz")) |
implicit def dateTimeOrdering: Ordering[DateTime] = Ordering.fromLessThan(_ isBefore _) |
import scala.math.{pow} | |
import scala.concurrent._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
import scala.collection.mutable.ArrayBuffer | |
object Regression { | |
def linear(pairs: IndexedSeq[Seq[Double]]) = { | |
val n = pairs.size |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
Vprašanje:
Zdravo,
Sem rekel, da se bom kar na tebe obrnil, ker si mi zdiš najbolj primeren za to vprašanje.
Sem mal pregledal zadevo in sedaj imam sledeči spisek:
- Ruby
- Java
# from http://pushandpop.blogspot.com.au/2011/05/handling-gzip-responses-in-ruby-nethttp.html | |
# i wanted syntax highlighting | |
require 'net/http' | |
debug = Proc.new{|msg| STDERR.puts "[#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}] #{msg}" } | |
page = nil | |
http = Net::HTTP.new( "www.google.com", 80 ) | |
req = Net::HTTP::Get.new( "/search?num=20&hl=en&noj=1&q=test&btnG=Search", { "Accept-Encoding" => "gzip", "User-Agent" => "gzip" } ) |
# Simple Car class. Nothing special here... | |
class Car | |
attr_accessor :brand | |
attr_accessor :model | |
attr_accessor :year | |
def initialize(brand, model, year=2011) | |
@brand, @model, @year = brand, model, year | |
end | |