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
import sbt._ | |
import Keys._ | |
object VersionInfoPlugin extends Plugin { | |
val versionInfoPackage = SettingKey[String]("version-info-package") | |
val versionInfoClassTask = TaskKey[Seq[java.io.File]]("version-info-class", "writes a java class VersionInfo with information about the versionInfo to sourceManaged") | |
val versionInfo = TaskKey[String]("version-info", "the current versionInfo") | |
private val Classname = "VersionInfo" |
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
import sbt._ | |
import Keys._ | |
import play.Project._ | |
object ApplicationBuild extends Build { | |
val appName = "javatest" | |
val appVersion = "1.0-SNAPSHOT" | |
val appDependencies = Seq( |
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
import sbt._ | |
import Keys._ | |
import play.Project._ | |
object ApplicationBuild extends Build { | |
val appName = "javatest" | |
val appVersion = "1.0-SNAPSHOT" | |
val appDependencies = Seq( |
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 aOpt: Option[Int] = Some(1) | |
val c = for { | |
a <- aOpt.toRight("Missing something in first level!").right | |
b <- Option(2).toRight("Another failure!").right | |
} yield { | |
a + b | |
} |
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
import org.junit.runner.RunWith | |
import org.specs2.mutable.Specification | |
import org.specs2.runner.JUnitRunner | |
@RunWith(classOf[JUnitRunner]) |
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
libraryDependencies ++= Seq( | |
"org.specs2" %% "specs2" % "1.8.2" % "test", | |
"junit" % "junit" % "4.7" % "test" | |
) |
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
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView | |
{ | |
if (scrollView.contentOffset.y == | |
self.table.contentSize.height - self.table.frame.size.height) | |
|| (self.table.contentSize.height - self.table.frame.size.height ) < 0) { | |
//When table is dragged this will be enabled | |
[self loadMoreElements]; | |
} | |
} |
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
#import <Foundation/Foundation.h> | |
@class AsyncURLWrapper; | |
@protocol AsyncURLWrapperDelegate <NSObject> | |
@optional | |
- (void) didFinish: (NSData*) data sender: (AsyncURLWrapper*) urlWrapper response: (NSHTTPURLResponse*) response; | |
- (void) didFail: (NSError*) error sender: (AsyncURLWrapper*) urlWrapper; | |
- (void) beforeRetry: (NSError*) error sender: (AsyncURLWrapper*) urlWrapper; | |
- (void) didUpdateProgress: (float) percentCompleted sender: (AsyncURLWrapper*) urlWrapper; |
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
#pragma mark - AsyncURLWrapper delegates | |
- (void) didFinish: (NSData*) data sender: (AsyncURLWrapper*) blob | |
{ | |
if (blob == _asyncWrapper1) { | |
NSLog(@"string from wrapper 1: %@", [AsyncURLWrapper asUTF8String:data]); | |
} | |
if (blob == _asyncWrapper2) { | |
NSLog(@"string from wrapper 2: %@", [AsyncURLWrapper asUTF8String:data]); | |
} | |
} |
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
- (void) didFinish: (NSData*) data sender: (AsyncURLWrapper*) blob | |
{ | |
if (blob == _asyncWrapper1) { | |
NSLog(@"data 1: %@", data); | |
} | |
if (blob == _asyncWrapper2) { | |
NSLog(@"data 2: %@", data); | |
} | |
} |