If you edit a shell script in windows
Remember replace “\r\n” with “\n” after you finish. Otherwise you will some errors that you won’t understand, such as
Remember replace “\r\n” with “\n” after you finish. Otherwise you will some errors that you won’t understand, such as
Feature -> Release Action Branches and their versions (before) CLI commands Branches and their versions (after) More details Start a feature develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 git flow feature start xxxgit flow feature publish xxx feature/xxx: 1.0.0-SNAPSHOT.0develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 Or just branch from develop Finish a feature feature/xxx: 1.0.0-SNAPSHOT.0develop: 1.0.0-SNAPSHOT.0master: 1.0.0-SNAPSHOT.0 git flow feature finish xxx develop: …
All code that calls useMediaQuery(query) will be marked as error Your useMediaQuery2 may be still calling useMediaQuery , but it will call it with more than one arguments. So it is still valid
User story: The backend sends back a file for you to download, using headers such as “Content-Disposition” and “Content-Type: application/pdf” Upon request, the browser will download the file for me in an AJAX manner, so I can show a progress bar If backend sends an error in JSON format, I want to see the error …
Code: Download file from backend in an AJAX manner (Typescript) Read More »
Consider passing in some properties as children, instead of props . This will make the code looks cleaner: The consumer doesn’t have to build a big “props” object to pass in You will divide a single component into several ones. Each one will a take small props object, which is highly inherent For example, instead …
Some thoughts about reusable component design in react Read More »
What’s the width of child in pixel? Of course it’s 350px And the parent is like Let parent has padding The result is the same Width of child is still 350px Btw ,the parent is now Parent has padding + Child has padding Let child has padding: The result is Width of child is still …
Research into child element’s real width if percentage is used Read More »
Problem/Solution Snapshot-based backup Multi-AZ Read Replica in the same region Read Replica in multi region Wrong/deleted data casued by wrong code YesWill lose at leas one day or a few hours of data NoThe wrong data has been copied to the standby instance NoThe wrong data has been copied to the standby instance NoThe wrong …
Without “.dockerignore” the whole directory where Dockerfile is in will be sent to docker daemon, which may be huge And always create a “.git” entry in the file, because this directory can be very big. P.S. Failling to do this may lead to the hanging of “docker-compose up”. It will show the following message: You …
Always have a “.dockerignore” and always have “.git” in it Read More »
They should all have these columns: Primary key: id , bigserial (which creates a sequence behind the scene) Date created: utc_created – Use current timestamp as a default value Date updated: utc_updated – Use a trigger to automatically update it (See code below) Creator: created_by – text type, can be anything Updator: updated_by – text …
Best practice: all Postgres tables can have these columns Read More »
Always use UTC as the timezone for postgre timestamp/date columns, which is considered to be the best practice and recommended by Postgre, e.g. And you java application is normally using LocalDateTime/LocalDate, if your system is not a global operation. So there needs to be a conversion in data access layer of you java application. According …
Timezone choice for Postgre and things to do in Java Read More »