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
SELECT [PlantFieldModel].[Plant_ID] AS [id], [PlantFieldModel].[Plant_CreateSeasonID] AS [createdSeasonId], [PlantFieldModel].[Plant_Name] AS [name], [PlantFieldModel].[Plant_No] AS [no], [PlantFieldModel].[Plant_Moo] AS [villageNo], [PlantFieldModel].[Plant_SubDistrict] AS [subdistrict], [PlantFieldModel].[Plant_District] AS [district], [PlantFieldModel].[Plant_Province] AS [province], [PlantFieldModel].[Zone_ID] AS [zoneId], [PlantFieldModel].[Plant_Latitude] AS [lat], [PlantFieldModel].[Plant_Longitude] AS [long], [PlantFieldModel].[Plant_AreaRai] AS [areaAsRai], [PlantFieldModel].[Plant_AreaShape] AS [areaFromShape], [PlantFieldModel].[Plant_GeoLocation] AS [geoLocation], [PlantFieldModel].[Quota_ID] AS [quotaId], [PlantFieldModel].[Plant_Created] AS [createdAt], [PlantFieldModel].[Plant_Changed] AS [updatedAt], [PlantFieldModel].[Plant_Creator] AS [createdBy], [PlantFieldModel].[Plant_CreateBy] AS [creatorFullName], CONVERT(varchar(max), [Plant_GeoLocation]) AS [geoLocationParsed], CAST(Plant_CreateDate |
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 { CommonEntityAttrs } from './default' | |
// Reference to ./docs/assessment-specs.md | |
export interface PlantFieldAssessment extends CommonEntityAttrs { | |
kind: 'PlantFieldAssessment' | |
plantSeasonId: number | |
seasonId: number |
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 { isNull } from 'util' | |
type Empty = null | undefined | 0 | false | '' | |
export function IsEmpty<T>(thing: T | undefined | null | 0 | false | ''): thing is Empty { | |
const undefinedOrNull = typeof thing === 'undefined' || thing === null | |
if (undefinedOrNull) { | |
return true | |
} |
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
declare @p geography = geography::Point(10.5, 10.5, 4326); | |
SELECT * | |
FROM ( | |
select Plant_ID,Plant_GeoLocation.STIsValid() as IsSTValid, Plant_GeoLocation.MakeValid().RingN(1).STDistance(@p) as Distance, Plant_GeoLocation as Geolocation from dbo.tb_opr_Plant | |
WHERE Plant_GeoLocation IS NOT NULL AND Plant_GeoLocation.STIsValid() = 1 | |
) DistanceMeastureFromPoint | |
WHERE Distance < 1000 |
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
interface UserAccount { | |
id: string | |
createdAt: Date | |
name: string | |
mobileNumber: string | |
password: string | |
} | |
type CreateNewUserAccountInput = Pick<UserAccount, Exclude<keyof UserAccount, 'id' | 'createdAt'>> | |
export type CreateNewUserAccount = (input: CreateNewUserAccountInput) => UserAccount |
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
interface UserAccount { | |
id: string | |
createdAt: Date | |
name: string | |
mobileNumber: string | |
password: string | |
} |
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
interface CreateUserAccountInput{ | |
name: string | |
mobileNumber: string | |
password: string | |
} | |
interface CreateUserAccountOutput extends CreateUserAccountInput{ | |
id: string | |
createdAt: Date | |
} |
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
/* | |
* Copyright (c) 2019. Inception Asia | |
* Maintain by DigithunWorldwide ❤ | |
* Maintainer | |
* - [email protected] | |
* - [email protected] | |
*/ | |
package util |
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 * as React from 'react' | |
import Head from "next/head"; | |
export default () => { | |
return ( | |
<div> | |
<Head> | |
<link rel="stylesheet" | |
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" |
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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"github.com/stellar/go/build" | |
"github.com/stellar/go/clients/horizon" | |
"github.com/stellar/go/keypair" | |
"net/http" |