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
export const findDistanceOf2Locations = ({ target, source }: { | |
target: { lat: number, lon: number, fencingRadius: number }, | |
source: { lat: number, lon: number } | |
}): { | |
distance: number, | |
isInside: boolean, | |
distancePretty: string // Format the distance in meters or kilometers (e.g. 100m or 1.5km) | |
} => { | |
const { lat: lat1, lon: lon1 } = source; |
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
class Topping { | |
String name; | |
double price; | |
Topping(this.name, this.price); | |
} | |
class CafeItem { | |
String name; |
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 'dart:async'; | |
import 'dart:collection'; | |
FutureOr<T?> executeWithRetry<T>( | |
FutureOr<T?> Function() function, { | |
int maxRetries = 3, | |
int delayFactor = 2, // in seconds | |
throwIfFailed = true, | |
}) async { | |
int retries = 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
package com.cubetiqs.rps.example; | |
import com.cubetiqs.sdk.rps.RpsClient; | |
import com.cubetiqs.sdk.shared.util.JsonUtil; | |
import com.cubetiqs.sdk.socketio.Utils; | |
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* @author sombochea |
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 dk.im2b | |
import java.io.OutputStream | |
import java.net.ServerSocket | |
import java.net.Socket | |
import java.nio.charset.Charset | |
import java.util.* | |
import kotlin.concurrent.thread | |
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 com.example.mytest; | |
import io.swagger.annotations.ApiOperation; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.annotation.AliasFor; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
import springfox.documentation.builders.PathSelectors; |
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
{ | |
"template": { | |
"name": "My template 1", | |
"source": "<#list data.getData() as item> <h1>${item.name}</h1> </#list> <br /> ${title} - ${sock.mind.title}" | |
}, | |
"dataSource": { | |
"type": "JSON", | |
"source": "[{\"name\": \"Sambo\"},{\"name\": \"Chea\"}]" | |
}, | |
"options": { |
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
{ | |
"configs": { | |
"title": "CUBETIQ Coperation Co,Ltd", | |
"headline": "Export Items", | |
"logoUrl": "https://visme.co/blog/wp-content/uploads/2017/08/40-Creative-Logo-Designs-to-Inspire-You-Movers-logo.jpg" | |
}, | |
"data": { | |
"invoiceNumber": "INV00001", | |
"date": "13-10-2020", | |
"time": "10:30 AM", |
NewerOlder