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 com.company; | |
class GameObject { | |
// Coordinate | |
public int x; | |
public int y; | |
// Dimension | |
public int width; | |
public int height; | |
} |
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
// Assignment A. ทำโปรแกรมตัดเกรด โดย Input เป็น Number | |
// output เป็น ตัวอักษตัวเดียว A, B, C หรือ D | |
// โดยที่ | |
// 80 - 100 = A | |
// 70 - 79 = B | |
// 60 - 69 = C | |
// 50 - 59 = D |
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 "fmt" | |
// strategy: square, factorial, absolute | |
// input : integer | |
// output : integer | |
type MathStrategy interface { | |
assert(strategyType string) bool |
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 { BehaviorSubject, Subject, Observable, of, interval } from 'rxjs'; | |
import { delay, map, take, tap, timeout } from 'rxjs/operators'; | |
function PostLogin(): Observable<number> { | |
return interval(1000).pipe(take(1), map(() => 200)); | |
} | |
class LoginService { |
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
#!/usr/bin/python | |
try: | |
from AppKit import NSWorkspace, NSApplicationActivateIgnoringOtherApps | |
except ImportError: | |
print "Can't import AppKit -- maybe you're running python from brew?" | |
print "Try running with Apple's /usr/bin/python instead." | |
exit(1) | |
from datetime import datetime | |
from time import sleep |
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 ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"math/rand" | |
"net/http" | |
"strconv" | |
"time" |
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
type Random interface { | |
Number(min, max int) int | |
String(char []byte) string | |
} | |
type FakeRandomPreparer struct { | |
} | |
func (f *FakeRandomPreparer) NumberAllAny() { |
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 [PlantSeason].[PlantSeason_ID] AS [id], [PlantSeason].[PlantSeason_Active] AS [active], [PlantSeason].[PlantSeason_Changed] AS [updatedAt], [PlantSeason].[PlantSeason_Created] AS [createdAt], [PlantSeason].[PlantSeason_Changer] AS [updatedBy], [PlantSeason].[PlantSeason_NewSurvey] AS [newSurvey], [PlantSeason].[PlantSeason_BonsucroProj] AS [bonsucroProj], [PlantSeason].[PlantSeason_LoanSeason] AS [loanSeasonName], [PlantSeason].[Season_ID] AS [seasonId], [PlantSeason].[PlantSeason_BonsucroArea] AS [bonsucroArea], [PlantSeason].[PlantSeason_PlantingDate] AS [plantingDate], [PlantSeason].[PlantSeason_HarvestDate] AS [harvestDate], [PlantSeason].[PlantSeason_SurveyVolumn] AS [surveyVolumn], [PlantSeason].[PlantSeason_SurveyBy] AS [surveyBy], [PlantSeason].[PlantSeason_ApproveDate] AS [approveDate], [PlantSeason].[PlantSeason_ApproveBy] AS [approveBy], [PlantSeason].[PlantSeason_ClosePlantDate] AS [closePlantDate], [PlantSeason].[PlantSeason_ClosePlantBy] AS [closePlantBy], [PlantSeason].[Plant_ID] AS [pla |
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 [Plant_ID] AS [id], [Plant_Active] AS [active], [Plant_Changed] AS [updatedAt], | |
[Plant_Created] AS [createdAt], [Plant_Changer] AS [updatedBy], [Plant_No] AS [no], [Plant_Name] AS [name], | |
[Plant_Moo] AS [moo], [Plant_District] AS [district], [Plant_Province] AS [province], | |
[Plant_SubDistrict] AS [subdistrict], [Plant_Latitude] AS [lat], [Plant_Longitude] AS [long], | |
[Plant_AreaRai] AS [areaAsRai], [Plant_AreaShape] AS [areaFromShape], [Quota_ID] AS [quotaId], | |
[Plant_CreateBy] AS [createdBy], [Plant_GeoLocation] AS [geoLocation], CONVERT(varchar(max), | |
[Plant_GeoLocation]) AS [geoLocation] FROM [tb_opr_Plant] AS [Plant] | |
WHERE [Plant].[Plant_Active] = 1 ORDER BY [Plant].[Plant_ID] OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY; |
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 |