Category Archives: Uncategorized

SQL Scratch

These are just scratches/notes for my work with Prestashop select id_product, reference from ps_product where reference like ‘9254050’ limit 10; Uppercase first letter only on string, and lowercase the others (remove any spaces infront or at the end)select name, concat(upper(left(name,1)),lower(substring(name,2,length(name)))) … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Functions as Arguments Java vs Scala, Game Set Match Scala Wins!

This is how you would create a function that takes a function as argument in Java The Function<A,B> myFunc = num -> “Value = ” + num;Here :A = the type of the first argument, in this example an intergerB … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Apache Zeppelin, with Spark and Cassandra, the perfect tool

Zeppelin has become one of my favourite tools in my toolbox. I am heavily designing stuff for Cassandra and in Scala, and even though I love Cassandra there are times when things just gets so complicated with the CQL command … Continue reading

Posted in Uncategorized | 8 Comments

SQL LIKE operation in Cassandra, is possible in v3.4+

For a long time it has not been possible to do a SELECT * FROM table WHERE firstname like ‘t%’; in Cassandra like you could in eg.. MySQL or any other Relation Database for that matter. In Cassandra v3.4 this … Continue reading

Posted in Uncategorized | 3 Comments

Apache SPARK and Cassandra and SQL

This is a short intro to start using Apache SPARK with Cassandra, running SQL on the Cassandra tables. Note that I am not running a SPARK cluster, I am running “local”, to me this is really convenient, not having to … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 2 Comments

Create an MBean (JMX) in Scala

Create the MBean like this

NOTE, that the interface/trait must end with MBean in the name And this is how you register your MBean

And the simply launch Java Mission Control (imc), attach to the JVM, and modify … Continue reading

Posted in Uncategorized | 2 Comments

SBT module not found, why ?

I have an build.sbt file that looks like this

But for some reason I can’t get slf4j downloaded from the Maven repository (http://mvnrepository.com) If I search the Maven Repository, I can clearly see that the version I intend to … Continue reading

Posted in Uncategorized | Leave a comment

See who is connected to the same network / WIFI

There are tools out there, such as Angry IP Scanner, iNet or IP Scanner,  but this can easily be done using a bash script, not as nice looking perhaps but it does the job. The script :

Which should … Continue reading

Posted in Uncategorized | 1 Comment

Printopia a great AirPrinter server for your USB printer

I have recently starting to use Printopia on my iMac, it makes it possible to use my USB printer connected to my iMac as a AirPrinter, and thus I am able to print from my iPhone or iPad. What a … Continue reading

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Me and my son off for a short trip with the bike

This is me and my son taking a ride, we have only been out for a couple of times, but he likes it, and I like it a lot !!!

Posted in Uncategorized | Tagged , | 1 Comment