Comment by LMeyer on Which is the efficient way to insert huge records in DB...
@matt Slick is just a data access library, connection pooling isn't its job. That being said, you can easily plug in a pooled datasource in it.
View ArticleComment by LMeyer on Dynamically Load an Actor if it's there
Actually you can just use the resolveOne method on ActorSelection to retrieve a Future[ActorRef] directly now.
View ArticleComment by LMeyer on How to reschedule the job execution interval in Quartz?
@MiDhuN rescheduleJob deletes it using its key.
View ArticleComment by LMeyer on Type bound issue using Quartz from Scala
@0__ Updated question. Existential type gives me "unbounded wildcard type".
View ArticleComment by LMeyer on IntelliJ Idea 14: cannot resolve symbol spark
Correct. Or he can just double the first % operator and remove _2.11 (well except there's no 2.11 version for Spark-parent on central)
View ArticleComment by LMeyer on A safe way of 'overwriting'/'forcing' a certain implicit...
I think the only thing you can do to prioritize your own implicit is to move it into the current scope of where it is used (which isn't good in your case because duplication). Can't you extend Format...
View ArticleComment by LMeyer on How to use for instead of flatMap/map in Scala?
That first presentation you linked is the most useful resource on understanding advanced Scala I've ever read.
View ArticleComment by LMeyer on scala n-arity tree tail recursive evaluation
I don't have any solution right now but if regular tailrec is impossible, maybe you could consider using a trampoline ?
View ArticleComment by LMeyer on How to create my own custom converts class
Shapeless can probably help if you want to stay typesafe
View ArticleComment by LMeyer on How can I (best) convert an Option into a Try?
Except you rely on Try mechanism as well as throwing exceptions instead of just converting values. This is inefficient.
View ArticleAnswer by LMeyer for Virtual Win8 keyboard in WebBrowser control
Finally found it here... As written, the Winforms WebBrowser has better wrapper for HTMLDocument, making it way easier than using MSHTML interop. Here's a code snippet :C# :public partial class...
View ArticleAnswer by LMeyer for Domain and service methods for banking transaction
Since the idea here is to retrieve Accounts, it should be inAccountService.Both methods looks fine in AccountService to me because you're operating on accounts. If you want to persist the transaction...
View ArticleAnswer by LMeyer for jsessionid cookie management with Gatling tool
That's because Gatling takes care of this for you. It stores them automatically in the user's session and pass them onto the next request.
View ArticleAnswer by LMeyer for Gatling2: Get response body as byte array
I think you can try something like this :.check(status.is(200), bodyBytes.saveAs("responseBody"))This will save the body of the response in the virtual user's session.
View ArticleAnswer by LMeyer for Store Hierarchical data in a best way: NoSQL or SQL
If MySQL is giving you more troubles than it solves, I'd take a look at MongoDB, CouchDB or ElasticSearch (depending on your use case). Maybe even Neo4j. Your choice should come down to several points...
View ArticleAny full Eclipse skin available?
Since I have some ocular problems and my eyes start bleeding when the display is too bright, I was wondering if there is any full Eclipse skin available.I already found darker theme for the code...
View ArticleAnswer by LMeyer for what is akka and for which purpose it is used?
In a nutshell, Akka is a convenient framework for doing reactive and distributed application on the JVM. It is based on the reactive manifesto and therefore it is :Event-driven with message passing...
View ArticleAnswer by LMeyer for Scala style: More than one class in a file?
This is all covered in Scala style guideSummary :As a rule of thumb, you should have one logical compilation unit (i.etrait, class, object) per file. Exception made of companion objectswhere you can...
View ArticleAnswer by LMeyer for How to handle master actor failure
From the docs :/user: The Guardian ActorThe actor which is probably most interacted with is the parent of all user-created actors, the guardian named "/user". Actors created using system.actorOf() are...
View ArticleAnswer by LMeyer for Can akka handle heavy algorithms to transform data from db?
Well, all I can offer here is my experience. As a matter of fact I am currently working on something similar (i.e an ETL with text files). We're essentially taking a lot of text files and loading their...
View ArticleAnswer by LMeyer for Scala: Package import conflicts
Use import rename :import scala.concurrent.ExecutionContext.Implicits.{global => newName}
View ArticleAnswer by LMeyer for Akka, futures and critical sections
Just to support Jean's answer here's the example from the docs :class MyActor extends Actor { var state = ... def receive = { case _ => //Wrongs // Very bad, shared mutable state, // will break your...
View ArticleAnswer by LMeyer for How to keep library dependencies updated to Scala version?
name := "Hello Test #1"version := "1.0"scalaVersion := "2.11.2"resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"libraryDependencies += "com.typesafe.akka" %%...
View ArticleHow to programmatically retrieve some build files in TeamCity?
I'm currently doing a plugin for TeamCity 8.1.4 to support our tool. The latter generates some JSON and HTML/CSS/JS files I would like to include in TeamCity UI through respectively a graph and some...
View ArticleAnswer by LMeyer for Schedule restart of Akka actor
Delay on restart hasn't been implemented yet. Thread.sleep is out of the question performance wise.I see two choices :Have your main actor create the querying actor on a message. When it blows up...
View ArticleAnswer by LMeyer for Implicitly convert an Iterable to Option
Implicit conversion alone is not going to help you if you want to do this. What you need here is an implicit class :object Rich { implicit class RichIterable[T](it: Iterable[T]){ def toOption:...
View ArticleAnswer by LMeyer for Play framework tutorial: Cannot resolve symbol 'index'?
I managed to make it work on IDEA Community 14 by solely cleaning IDEA cache (File -> Invalidate Caches / Restart)
View ArticleAnswer by LMeyer for Type bound issue using Quartz from Scala
Alright, just made it work by casting oldTrigger to SimpleTrigger... That turned TriggerBuilder<? extends Trigger> getTriggerBuilder() into TriggerBuilder<SimpleTrigger> getTriggerBuilder().
View ArticleAnswer by LMeyer for Iterating over JSON object in jquery
Your JSON isn't valid. What about this :var json = '[ {"DisplayName":"Answer Number 1","Value":"Answer1","Option":"True"}, {"DisplayName":"Answer Number 1","Value":"Answer1","Option":"False"},...
View ArticleAnswer by LMeyer for Is there a better way to check if a number should be...
You can use a matcher. Checking a range for the numbers you gave don't make much sense but this does for example :numberExample should be (6 +- 1)Here the test will fail if numberExample is lower than...
View ArticleAnswer by LMeyer for Scala play framework Form Validation for numbers
Check your imports. You should have play.api.data.Forms._ maybe you have only play.api.data.Forms.nonEmptyText
View ArticleThere is no action mapped etc.. In Struts 2
Yet another question on this I know, but let me just say I looked everything else or about. So, I'm currently building the structure of my Struts 2 Project. I use Struts 2.3.4, JBoss 7.1 and Eclipse...
View ArticleAnswer by LMeyer for Struts 2 XML Validation
You'll have to do it before the request, that is, on the client side. You could use Javascript with a OnChange or OnKeyDown event on the textboxes. The triggered method could invalidate the submission...
View ArticleAnswer by LMeyer for What is a unary type?
Unary is another way of saying "of arity one". A one parameter function is said to be unary, whereas a two parameters function is binary, three is ternary and so forth...The same principle applies to...
View ArticleAnswer by LMeyer for Use Circe to decode Normal Class (not case class)
With io.circe.generic.auto._, you're using Circe's automatic generic derivation, which is backed by Shapeless's LabelledGeneric typeclass. LabelledGeneric only works with product types like tuples and...
View ArticleAnswer by LMeyer for Akka - assign dispatcher to an actor based on name pattern
The docs explicitly state you cannot :You can use asterisks as wildcard matches for the actor path sections, so you could specify: /*/sampleActor and that would match all sampleActor on that level in...
View ArticleAnswer by LMeyer for Scala cats, traverse Seq
Cats does not provide typeclass instances for Seq, so besides implementing it yourself you're stuck with the conversion.As to why, there's an ongoing discussion in an (somewhat old) Cats issue. To sum...
View ArticleComment by LMeyer on Scala, ZIO - convert Future[Either[...]] into ZIO
I would just do ZIO.fromFuture(_ => futureEitherMethod()).absolve
View ArticleComment by LMeyer on Why override bootstrap, not work for run method?
Mmh this is weird indeed. I tried playing with ZIOApp overriding things but still get the same error... I'd ask on the Discord
View ArticleComment by LMeyer on Why override bootstrap, not work for run method?
Did you actually try it with OP's code ? Because I did and have the same error
View ArticleAnswer by LMeyer for Running zio.dev Hello, world! yields error
The errors comes from the fact they commented out a common sbt plugin library here I think, yet they still use it in their build definition. More precisely the methods enableZIO() and stdSettings()...
View ArticleComment by LMeyer on Where is Scala 2.10.3 hosted?
After clicking on a version on this page, you'll have the installers available at the bottom of the new page. Or you can just go here.
View Article