Code snippet: subListSafely()
And the unit test:
And the unit test:
Requirements Some of the sub-projects need to run flyway as a gradle task We want a single command line to do the flyway migrations for all the sub-projects mentioned above Solution Apply flyway plugin in these sub-projects Config flyway in these sub-projects Create a root-project task to call the flyway tasks in the sub-projects Code …
Disclaimer: Not sure if they will surprise you A role can be a user This is STUPID ! It’s anti common sense. utf8 charset supports 4-byte chars In mysql you have to specify the charset to be “utf8mb4”, but in postgres it can just be “utf8” When you create a new database, any role is …
Only some kinds of state need to be in Redux, State that’s shared by multiple components on the same page State that’s read by multiple components State that’s written by one component and read by another State whose lifecycle is longer than its component. For example, “recordList” for a list page – If you go …
What you need is , Only numbers can be input The length of input is limited to N, say 2 On mobile devices, a number pad will be shown And the way to do it is: If you are using material-ui, it will be
In intellij, create such a live template:
Install chromedriver You want to make the following line of code run successfully. In windows, you need to download chrome driver from https://chromedriver.chromium.org/downloads and put it in system’s path (An alternative is to set the executable file’s path as a system property “webdriver.chrome.driver”, not beautiful) In *nix or linux-based Docker, you can Options needed for …
Always use interfaces instead Problems of class: Lots of frameworks such as Redux don’t support class instances. They only support plain objects. There are tools that can convert plain objects to class instances, but the point below makes it awkward. Given a variable “someType: SomeType” in the code, you don’t know if it is a …
Opinion: Don’t use class for data structure in typescript (2019). Use interface only Read More »
One way of doing this is to create your own Router class, which extends the one from the framework; and inside this Router class you put in the tracking logic: