Download list_of_surahs_name_in_the_quran.csv file
This file contains hidden or 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
val text = new ArabicText("لِّلْـَٔاكِلِينَ") | |
println(text.toString) | |
println(text.removeDiacritics()) | |
for( i <- 0 until text.getLetterCount) | |
println(text.getCharacter(i)) |
This file contains hidden or 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
scalaSource in Compile := file("./") |
This file contains hidden or 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
val mb = 1024*1024 | |
val runtime = Runtime.getRuntime | |
println("** Used Memory: " + (runtime.totalMemory - runtime.freeMemory) / mb) | |
println("** Free Memory: " + runtime.freeMemory / mb) | |
println("** Total Memory: " + runtime.totalMemory / mb) | |
println("** Max Memory: " + runtime.maxMemory / mb) |
This file contains hidden or 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
/** | |
* Make sure you include the following in your build.sbt | |
"org.json4s" %% "json4s-core" % "3.2.10", | |
"org.json4s" %% "json4s-jackson" % "3.2.10" | |
*/ | |
import org.json4s._ | |
import org.json4s.jackson.JsonMethods._ | |
import org.json4s.JsonDSL._ | |
case class Candidate(name:Option[String], age:Option[Int], party:Option[String]) |
This file contains hidden or 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
package controllers | |
import play.api.libs.json._ | |
import play.api.mvc._ | |
import slick.driver.PostgresDriver.api._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.Future | |
This file contains hidden or 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
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>2.2</version> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> |
This file contains hidden or 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
package org.scribe.builder.api; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.scribe.exceptions.OAuthException; | |
import org.scribe.extractors.AccessTokenExtractor; | |
import org.scribe.model.OAuthConfig; | |
import org.scribe.model.OAuthConstants; | |
import org.scribe.model.OAuthRequest; |
This file contains hidden or 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
def last[A](xs:List[A]): A = xs match { | |
case x :: Nil => x | |
case _ :: tail => tail last | |
case _ => throw new NoSuchElementException | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body dir="rtl"> | |
<p> <br> | |
آبِق:<br> |