Kkyipinyipcode.hashnode.dev·Apr 6, 2023 · 1 min readtypedef in CTo give a new name to a type A normal convention of declaring a struct: struct Node { int data; struct Node* next; }; struct Node* newNode = NULL; void AddToEnd(struct Node **ppList, int value); int Count(struct Node *list); with typedef (N...00
Kkyipinyipcode.hashnode.dev·Jul 11, 2022 · 1 min readCommand - sam build deploying AWS lambda using aws cliCommon error encountered: firstlambda % sam build Your template contains a resource with logical ID "ServerlessRestApi", which is a reserved logical ID in AWS SAM. It could result in unexpected behaviors and is not recommended. Building codeuri: /Us...00
Kkyipinyipcode.hashnode.dev·Jun 22, 2022 · 2 min readSwift - Passing a function into a function parameters and ClosuresHow do we pass in a function into another function? Let say there is a calculator function, which will perform addition function. For example, let have a calculator function that take in 2 Int param, and output an Int. func calculator(num1:Int, num2:...00
Kkyipinyipcode.hashnode.dev·Feb 19, 2022 · 2 min readReact Hook : useState()The useState() function useState() function takes in a changeable value and returns an array of exactly 2 elements. Where the 1st element is the updated value itself, and the 2nd element is the updating function. const [title,setTitle] = useState('')...00
Kkyipinyipcode.hashnode.dev·Feb 17, 2022 · 2 min readComposition over inheritance in ReactThe reuse principle Composition over inheritance (or composite reuse principle) is a OOP design pattern to reuse the composition (e.g classes that have been implemented with functionality) rather then using inheritance. Example Let say you have 3 sec...00