(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package com.lynas.config; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; | |
import org.springframework.web.servlet.config.annotation.EnableWebMvc; | |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; | |
import org.springframework.web.servlet.view.InternalResourceViewResolver; |
public Response postPatchDelete(HttpServletRequest request, String url, String method, Object object) { | |
Client client = ClientBuilder.newClient(); | |
try { | |
return client | |
.target(REST_URL_BASE + url) | |
.request() | |
.header(X_AUTH_TOKEN, getToken(request)) | |
.build( | |
method, | |
Entity.entity( |
package com.lynas.service.impl; | |
import com.lynas.Util; | |
import com.lynas.model.Account; | |
import com.lynas.model.AccountTransaction; | |
import com.lynas.model.Book; | |
import com.lynas.model.util.BalanceSheet; | |
import com.lynas.service.AccountTransactionService; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.criterion.Order; |
package com.lynas.service.impl; | |
import com.lynas.model.AppUser; | |
import com.lynas.service.AppUserService; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.criterion.Restrictions; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Transactional; |
func doUpdate () { | |
DispatchQueue.global(qos: .background).async { | |
let taskID = self.beginBackgroundUpdateTask() | |
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(5), execute: { | |
print("printing after 10 min") | |
}) | |
DispatchQueue.main.async { | |
self.endBackgroundUpdateTask(taskID: taskID) | |
} | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
struct Person { | |
let name : String | |
let age : Int | |
} | |
let personArray = [ | |
Person(name: "name1", age: 11), | |
Person(name: "name2", age: 12), | |
Person(name: "name3", age: 13) | |
] |
import UIKit | |
import RxCocoa | |
import RxSwift | |
class ViewController: UIViewController { | |
@IBOutlet weak var txt1: UITextField! | |
@IBOutlet weak var txt2: UITextField! | |
gradle init --type pom
##parent pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.lynas</groupId>
<artifactId>parent</artifactId>