Profile cover photo
Profile photo
Hossein Kazemi
Hossein's posts

Post has attachment
Java 8 Examples dedicated blog
I have recently started a new blog dedicated to Java 8 examples. I will be covering a lot of topics for Java 8 there.
Here is the link: Java 8 Examples

Post has attachment
Fruit Cut Ninja

Post has attachment
Plants vs Monsters

Post has attachment
How to create Interstitial Ad for AdMob in Ionic Cordova app?
You might have encountered an error like, when requesting an ad from AdMob using Cordova AdMob Plugin: interstitialAd is null, call createInterstitialView first Chances are you are doing it wrong. To create an Interstitial Ad you need to take of three thing...

Post has attachment
Using AmCharts in Play Framework 2 with Java
In this post, I am going to show you how you can use AmCharts in Play Framework 2 using Java. First create a new Play Framework 2 Java project and download the Javascript libraries for AmCharts. download .
After you uncompress the file, you see that there a...

Post has attachment
Switching between multiple JDKs on Mac OSX
Suppose you are working on a few Java projects and each of which needs a specific version of JDK. First. make sure that you download your required JDKs: JDK 8 and JDK 7 .
gm Second, look for .bash_profile in your home directory ~ . If you can't find it, cre...

Post has attachment
How to test file upload action in Play Framework 2 in Java?
In this post, we will see how we can test an action that expects a file upload (e.g. a profile picture or an image) in Play Framework 2 for Java.
First, lets create an action that accepts a file upload as below: public static F.Promise uploadProfileImage() ...

Post has attachment
How to test an action secure by SecureSocial in Play Framework 2 in Java?
SecureSocial is an authentication module for Play Framework 2 applications supporting OAuth, OAuth2, OpenID, Username/Password and custom authentication schemes.
Suppose you have an action and you have secured it with @SecureSocial.SecuredAction annotation:...

Post has attachment
How to test actions annotated with @RequireCSRFCheck in Play Framework 2?
Let say you have an action as below that you want to protect against CSRF attacks, so you add the @RequireCSRFCheck annotation: @RequireCSRFCheck
public Result saveUser() {
// Handle body (process a form)
return ok();
} Now suppose you want to write...

Post has attachment
Importing a CSV file into a SQLite3 database table in Python
For this you need to import csv, sqlite3 libraries: import csv, sqlite3 Lets use an in-memory database and create a simple table with two columns: con = sqlite3.connect(":memory:")
cur = con.cursor()
cur.execute("CREATE TABLE t (col1, col2);") Now, lets loa...
Wait while more posts are being loaded