2024/03/08 typescript delete some key from any object,typescript const newObject = {...oldObject,wantToDeleteKey1:undefined,wantToDeleteKey2:undefined}delete newObject. wantToDeleteKey1delete newObject. wantToDeleteKey2 Read more
2024/03/03 golang, gorm gorm,update zero value db.Select("*").Omit("CreatedAt").Updates(d)=>will update zero values in d Read more
2024/03/03 golang golang,string,containsAny, strings.ContainsAny("hello", "open")=>truebecause the character o,e Read more
2024/02/29 react how to set file name when upload file,react const modifiedFile = new File([file], "_icon.jpg", { type: file.type });const formData = new FormData(); formData.append("file", modifiedFile); Read more
2024/02/29 javascript, map javascript, join object array objArray.map(obj=>obj.a).join(',')- map-join Read more
2024/02/28 docker Docker not found when freshly installed on Mac Docker not found when freshly installed on Mac- Docker Desktop -> Settings -> Advanced -> Choose System, not User -> Click [Apply & restart] Read more
2024/02/27 javascript Arrow function vs Function declaration arrow function can not use thisarrow function must be defined before useFunction declaration can use new Read more
2024/02/27 spring spring boot test,spring context get value from application.yamluse environmentuse profile@componentcomponent scan initialize the componentadd it to spring application contextcan get the bean from application context@Component equals @Bean in a @Configurationcan use @SpringBootTest to load spring application context Read more