View MonixScheduler.scala
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 java.util.concurrent.TimeUnit | |
import monix.execution.Scheduler.{global => scheduler} | |
import scala.concurrent.duration._ | |
object MonixScheduler extends App { | |
val delayOnce = scheduler.scheduleOnce( | |
2, TimeUnit.SECONDS, | |
new Runnable { |
View MonixScheduler.scala
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 java.util.concurrent.TimeUnit | |
import monix.execution.Scheduler.{global => scheduler} | |
import scala.concurrent.duration._ | |
object MonixScheduler extends App { | |
val delayOnce = scheduler.scheduleOnce(2.seconds) { | |
println("Schedule Once Example 2") | |
} |
View MonixScheduler.scala
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 java.util.concurrent.TimeUnit | |
import monix.execution.Scheduler.{global => scheduler} | |
import scala.concurrent.duration._ | |
object MonixScheduler extends App { | |
val fixedDelay = scheduler.scheduleWithFixedDelay( | |
2, 3, TimeUnit.SECONDS, | |
new Runnable { | |
def run(): Unit = { |
View MonixScheduler.scala
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 java.util.concurrent.TimeUnit | |
import monix.execution.Scheduler.{global => scheduler} | |
import scala.concurrent.duration._ | |
object MonixScheduler extends App { | |
scheduler.scheduleWithFixedDelay(2.seconds, 3.seconds) { | |
println("Fixed Delay Example 2") | |
} | |
View MonixScheduler.scala
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 scala.concurrent.ExecutionContext | |
trait Scheduler extends ExecutionContext | |
{ | |
// ... | |
} |
View MonixScheduler.scala
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
delayOnce.cancel() | |
fixedDelay.cancel() |
View sum.py
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
a = 3 | |
b = 5 | |
sum = a + b | |
print(sum) |
View mul.py
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
number1 = 5 | |
number2 = 6 | |
multiply = number1 * number2 | |
print(multiply) |
View phantom_dependency
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
libraryDependencies += "com.outworkers" % "phantom-dsl_2.11" % "2.14.5" |
OlderNewer