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
/** | |
* Copyright 2012 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
[info] C:\Users\Christian\workspace\envisia\rsflex\target\windows\RSFlex.wix(1757) : error CNDL0027 : The Shortcut/@Name attr | |
ibute's value, '\application.conf', is not a valid long name because it contains illegal characters. Legal long names contai | |
n no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be | |
used: \ ? | > < : / * ". | |
[info] C:\Users\Christian\workspace\envisia\rsflex\target\windows\RSFlex.wix(1757) : error CNDL0027 : The Shortcut/@Name attr | |
ibute's value, '\elasticsearch.conf', is not a valid long name because it contains illegal characters. Legal long names cont | |
ain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may | |
be used: \ ? | > < : / * ". | |
[info] C:\Users\Christian\workspace\envisia\rsflex\target\windows\RSFlex.wix(1757) : error CNDL0027 : The Shortcut/@Name attr | |
ibute's value, '\messages', is not a valid long name because it contains illegal characte |
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
$q.when(next). | |
then(function() { | |
if (next) { | |
var locals = angular.extend({}, next.resolve); | |
angular.forEach(locals, function(value, key) { | |
locals[key] = angular.isString(value) ? | |
$injector.get(value) : $injector.invoke(value, null, null, key); | |
}); | |
return $q.all(locals); |
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
// TLS config, do not set InsecureSkipVerify to true in production | |
// since it will accept all certificates | |
config := &tls.Config{ | |
InsecureSkipVerify: false, | |
ServerName: host, | |
} | |
c, err := smtp.Dial(server) | |
if err != nil { | |
log.Fatal(err) |
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.math.BigDecimal.RoundingMode | |
object Demo extends App { | |
val d: Double = 1.0 / 3 * 3 + 0.01 | |
val bd1 = BigDecimal(1.0) / BigDecimal(3) * BigDecimal(3) + BigDecimal(0.01) | |
println("d: " + d) | |
println("bd1: " + bd1.setScale(2, RoundingMode.HALF_DOWN)) | |
} |
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
object Demo { | |
def simple = { | |
SimpleDBIO[Long]{d => | |
val lobj = d.connection.unwrap(classOf[PGConnection]).getLargeObjectAPI | |
val oid = lobj.createLO(LargeObjectManager.READWRITE) | |
val lo = lobj.open(oid, LargeObjectManager.WRITE) | |
val out = lo.getOutputStream // Use this outputstream to write directly to the database | |
// Write to the outputstream, call close |
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
[vagrant@centos-7 vagrant]$ ./activator rpm:packageBin | |
[info] Loading project definition from /vagrant/project | |
[info] Set current project to loki-erp (in build file:/vagrant/) | |
[info] Updating {file:/vagrant/}pdfgen... | |
[info] Resolving org.springframework#spring-beans;3.0.6.RELEASE ... | |
[info] Packaging /vagrant/target/scala-2.11/loki-erp_2.11-1.3.2-sources.jar ... | |
[info] Resolving com.google.zxing#core;2.3.0 ... | |
[info] Done packaging. | |
[info] Resolving jline#jline;2.12.1 ... | |
[info] Done updating. |
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 javax.inject.Inject | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
import play.api.libs.json.{JsObject, JsString, Json} | |
import play.api.mvc._ | |
import scala.concurrent.Future | |
class BodyFilter @Inject()() extends Filter { |
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
package controllers | |
import javax.inject.Inject | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
import play.api.libs.json.{JsObject, JsString, Json} | |
import play.api.mvc.{ActionBuilder, Request, Result} | |
import scala.concurrent.Future |
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
package controllers | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
import play.api.libs.json.{JsObject, JsString, Json} | |
import play.api.mvc.{Action, Results} | |
object EVRequest extends Results { | |
def json[A](action: Action[A]) = Action.async(action.parser) { request => | |
action(request).map { result => |
OlderNewer