When you have primary keys generated by the database not by the application, then you might need it to be returned. In postgres you have to use RETURNING function in your sql query in order to have...

25 Nov, 2019
How to downgrade packages in ArchLinux. There is a nice package that automates this process for you. For me I ran into an issue with postgresql version update that broke the service. So I downloaded...

23 Nov, 2019
An example of a simple dropzone using Semantic UI. Is achieved by using "react-dropzone", which does not provide theming.

23 Nov, 2019
This snippet shows you how you can use google places api in react to create address autocomplete dropdown. There are other service providers than google, but google supports business names in...

19 Nov, 2019
Use this snippet when you have created a menu using BrowserRouter from 'react-router-dom' and you need to reset the state when you click on the current menu item (same url path as you are currently...

13 Nov, 2019
You can create input fields or use libraries like react-dropzone in React very easily. You still need to get the files from the form and send them to backend for saving. This snippet is the upload...

28 Oct, 2019
How to install yay on ArchLinux. I used to use yaourt, since it is no longer developed I switched to yay.

23 Oct, 2019
This snippet shows you how to trim whitespaces from each array value in PHP. Expects all array values to be strings.

8 Oct, 2019
You can use FormData to send form data using AJAX, including files. This is for you if you have to manually add files, you don't take them from a form, for some reason. This snippet is a react...

2 Oct, 2019
Get file name from file input and save it into state. You might need to use this when you hide your html file input and use button or some other element to trigger the click on the file input.