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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:s="http://www.w3.org/2001/XMLSchema" targetNamespace="http://SMSBox.gateway.webservice.sspk.co.ir/" xmlns:tns="http://SMSBox.gateway.webservice.sspk.co.ir/" name="SMSBoxImplementationService"> | |
<wsdl:types> | |
<s:schema elementFormDefault="qualified" targetNamespace="http://SMSBox.gateway.webservice.sspk.co.ir/"> | |
<s:element name="Send"> | |
<s:complexType><s:sequence> | |
<s:element minOccurs="1" maxOccurs="1" name="Auth" type="tns:Auth" /> | |
<s:element minOccurs="1" maxOccurs="1" name="Recipients" type="tns:ArrayOfString" /> | |
<s:element minOccurs="1" maxOccurs="1" name="Message" type="tns:ArrayOfString" /> |
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
#!/bin/bash | |
# | |
# ========================================================================= | |
# Copyright 2014 Rado Buransky, Dominion Marine Media | |
# | |
# 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 |
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
lazy val commonSettings = Seq( | |
organization := "com.example", | |
version := "0.1.0-SNAPSHOT" | |
) | |
lazy val core = (project in file("core")) | |
.settings( | |
commonSettings, | |
// other settings | |
) |
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
(defun sort-import-group () | |
"This function basically sorts a comma separated list of strings but it's been | |
written to sort grouped imports in Scala. | |
Example: | |
`import org.temp.{ B, C, A }` | |
By selecting the grouped imported items (`B, C, A`) from the above code sample and run (M-x) `sort-group` | |
you'll get the following result: | |
`import org.temp.{ A, B, C }`" | |
(interactive) | |
(let* ((bounds (cons (region-beginning) (region-end))) |
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
;; global variables | |
(setq | |
inhibit-startup-screen t | |
create-lockfiles nil | |
make-backup-files nil | |
column-number-mode t | |
scroll-error-top-bottom t | |
show-paren-delay 0.5 | |
use-package-always-ensure t | |
sentence-end-double-space nil |
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
def getUser(id: Int): Option[User] = ??? | |
getUser(10) match { | |
case None => println(“User not found”) | |
case Some(user) => println(s”User: $user”) | |
} |
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
def getUser(id: Int): Future[Option[User]] = ??? | |
getUser(10).map { | |
case None => println(“User not found”) | |
case Some(user) => println(s”User: $user”) | |
} |
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
def getUser(id: Int): Future[Option[User]] = ??? | |
def getCity(user: User): Future[Option[City]] = ??? | |
def getCountry(city: City): Future[Option[Country]] = ??? | |
def getCountryByUserId(id: Int): Future[Option[Country]] = { | |
getUser(id) flatMap { | |
case None => Future.successful(None) | |
case Some(user) => | |
getCity(user) flatMap { | |
case None => Future.successful(None) |
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
def getCountryByUserId(id: Int): Future[Option[Country]] = { | |
val result = for { | |
user <- OptionT(getUser(id)) | |
city <- OptionT(getCity(user)) | |
country <- OptionT(getCountry(city)) | |
} yield { | |
country | |
} | |
result.value | |
} |
OlderNewer