JavaScript/TypeScript

Read all files and subdirectories in iterative call

Ineededtoimplementafunctionthatreadsallthefilesandthesubdirectories.Manyframeworksoffersuchafunctionbutitmightneedtobeim...
Python

Python How to pass a class constructor as an argument

Isitpossibletopassaconstructorasaparameter?Yes,itis.Therearemultiplewaystoinstantiateadifferentclassbutpassingaconstruct...
Python

Python How to mock constructor with mockito for unit testing

Aclassconstructordirectlyneedstobecalledinaclassinsomecases.Itmightnotbeagooddesignbutsometimesit'snecessarytoimplementi...
Python

Python How to handle an error from finally block

If an error occurs in finally block, the first error caught in except block is overwritten. How can we know both errors? Let's split the block and add both errors into one custom error.
Golang

Golang errors.Is() does not work for Custom error?

How can a custom error implemented in Golang? Define struct and Error() method for it. Implement Is() method if errors.Is() needs to be used for the custom error.
Dart and Flutter

Dart How to define an array with mixed data type in gRPC

Anarrayandmapdatatypeisuseful.IsitpossibletousethemingRPC?YES,itis.Let'sdefinetheminProtocolBufferandimplementtheminDart...
Dart and Flutter

Dart gRPC How to handle multi-data type property

InProtocolBuffer,wecandefineapropertythatcanhavemultipledatatypes.Adifferentdatatypeneedstobeassigneddependingonthesitua...
Dart and Flutter

Dart gRPC Bidirectional streaming example

IpostedthefollowinggRPCarticlesbefore.Ifyouhavesomethingunknowninthispost,pleasegotothefollowingpagestoo.DartHowtosetupd...
Dart and Flutter

Dart Client Streaming gRPC function example to Upload a file

WewilllearnhowtoimplementtheclientstreaminggRPCfunctioninthispost.Ifyouhavesomethingunknowninthispost,pleasegotothefollo...
Dart and Flutter

Dart Server Streaming gRPC function example to download a file

WewilldigintoastreaminggRPCfunctioninthispost.Pleasecheckthefollowingposttooifyouhaven'treadit.DartHowtosetupdevcontaine...