const _ = require('lodash');
// RequestedDateTimeHelper is a helper related to requested times.
// Requested dates can be either datetime or time (military).
class RequestedDateTimeHelper {
/**
* isDateTimeDifferent method returns true if datetime/time is different
*
* Time can change from:
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
const upsertAuthUser = async (result: { | |
email: string | null; | |
userId: string | null; | |
token: string | null; | |
refreshToken: string | null; | |
name: string | null; | |
meta: any; | |
}, providerType: ProviderTypes): Promise<Result> => { | |
let foundSocialUser: null | SocialAuthUser = null; |
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
let htmlString = ` | |
<script type="text/javascript"> | |
if (typeof (smartWeb) == 'undefined') smartWeb = {}; | |
if (typeof (smartWeb.Appointment) == 'undefined') smartWeb.Appointment = {}; | |
smartWeb.Appointment.Constants = { | |
NL_VALUE: 99999, | |
NL: 'NL', | |
NR: 'NR', | |
DEFAULT_LIMIT_DATA: '0-0-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
{ | |
"lastIndex": 110016362472800256, | |
"clientSegment": [ | |
0, | |
128 | |
], | |
"updates": [ | |
{ | |
"index": 110015715536535552, | |
"timestamp": "2023-03-13T11:23:16.887Z", |
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
let update8 = { | |
lastIndex: 110016159375425536, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110015715536535552, | |
timestamp: '2023-03-13T11:23:16.887Z', | |
before: null, | |
after: { | |
voyageId: 'b0571ec1-ff7c-4b67-b00d-0121bd8dc372', |
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
let updates3 = { | |
lastIndex: 110014217503309824, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110014180472848384, | |
timestamp: '2023-03-13T04:52:53.677Z', | |
before: { | |
voyageId: '5a21e768-9670-48e6-8522-551e4eef7f00', | |
declarant: { |
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": "com.portbase.hinterland.api.common.Terminal", | |
"shortName": "NONPCS_ROTTERDAM", | |
"ean": null, | |
"bicsCode": "00RHB", | |
"quayName": "Rotterdams Haven Bedrijf", | |
"smdgCode": null, | |
"location": { | |
"name": "Rotterdam", |
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
let updates2 = { | |
lastIndex: 110014179357687808, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110013966679998464, | |
timestamp: '2023-03-13T03:58:31.456Z', | |
before: { | |
voyageId: 'b4ee3a61-ede9-43bd-aef8-0eb65e19cfaf', | |
declarant: { |
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
/* A quick reminder on how to use Promises with Node and Express in order to run potentially | |
* time-consuming jobs asynchronously (assuming the jobs are able to run in the background thanks to | |
* libuv and actually return Promises). | |
* | |
* Start the server, navigate to /startjob, then refresh a few times, the job should be in progress. | |
* You can navigate elsewhere in the "app" in other browser tabs in the meanwhile (/). After about | |
* 20s, you should get a result by refreshing the tab where you originally submitted the job. | |
* | |
* I hope this pattern will be useful e.g. for processing images with the `sharp` library (see | |
* <http://sharp.dimens.io>). |
I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/
It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.
Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?
NewerOlder