Apr. 7th, 2016

juan_gandhi: (VP)
http://pda.pravo.ru/news/view/127838/

""Мы предложили администрации "Википедии" – "Викимедиа" – создать постоянно действующую рабочую группу из редакторов высокого уровня и, соответственно, экспертов Роскомнадзора, наркоконтроля, Роспотребназдора и при необходимости Генпрокуратуры, и, когда возникает спорная ситуация, отрабатывать и, если необходимо, отредактировать статью", – сказал Жаров. Причем, по его словам, редактировать нужно сразу и не доводить вопрос до внесения "Википедии" в единый реестр запрещенной информации."
juan_gandhi: (VP)
I'm totally excited with this idea; it looks like either nobody got it, or it is totally obvious.
It was not obvious to me until last night.
juan_gandhi: (VP)
Here's the essence of cache as I wrote about earlier tonight.

trait TimeReader {

  def currentTime: Long = System.currentTimeMillis

  def flowOfTime = Iterator.iterate(currentTime){_ => currentTime}

  def interval(n:Long) = {
    flowOfTime.next // the first drop, may be stale
    val end = flowOfTime.next + n
    flowOfTime takeWhile (end >)
  }

  def interval(duration: Duration) = interval(duration.toMillis)
  //...


Note that you can override currentTime
for {
value <- readFromSource
t <- interval(60 seconds)
} useThisValue(value)


e.g.
for {i <- 1 to 10; t <- interval(1 second) } {Thread.sleep(1); println(s"$i @$t") }

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 01:37 pm
Powered by Dreamwidth Studios