Skip to main content

Posts

Recent posts

Accessing Data with JPA with memory-based h2 database

  What You need Java and OOP concepts (if not you can see my videos on java) A favorite text editor or IDE : Intellj , Eclipse, VS code Java 8 or later Gradle 7.5+ or Maven 3.5+ Postman   Overview: In this tutorial   will walk you through the process of building Springboot application that uses Spring Data JPA to store and retrieve data using in memory h2 relation database. Spring Data JPA make it easier to integrated data access technologies i.e. relational and non-relational databases, map-reduce frameworks, and cloud-based data services through java code.   Features • Powerful repository and custom object-mapping abstractions • Dynamic query derivation from repository method names • Implementation domain base classes providing basic properties • Support for transparent auditing (created, last changed) • Possibility to integrate custom repository code • Easy Spring integration via JavaConfig and custom XML namespaces • Advanc...

How to format code block in blogger? [Blogger Code Formatter]

    Open the code formatter from the link http://codeformatter.blogspot.com/  Paste your source code block on the text area  Customized the source code formatter option. (Default options worked for me ) Click format source code button Copy paste the code and switch to html view in your blogger post and paste the html copied  to your blogger.  Image Reference   Source Code Formatter for Blogger, Blogspot , Blog & Blogging, Format Formatting Tool Source Code Beautifier And Formatter For Blogger and Websites, Format Source Code , Format Source code for blog or blogging & website, Online line source code formatter tool, blogger code format tool, Format source code for blogspot,Insert formatted source code

Install json-server to Mock your data with zero coding

 Install JSON Server npm install -g json-server if there is any issue with permission on Mac/Linux sudo npm install -g json-server Create a db.json file with some data {   "posts": [     { "id": 1, "title": "json-server", "author": "typicode" }   ],   "comments": [     { "id": 1, "body": "some comment", "postId": 1 }   ],   "profile": { "name": "typicode" } } Start JSON Server json-server --watch db.json Now if you go to http://localhost:3000/posts/1, you'll get { "id": 1, "title": "json-server", "author": "typicode" } Resource: https://www.npmjs.com/package/json-server

Getting Started with Postgres Docker image

This command will download and run docker container sudo docker run --name dipen-postgres -p 5432:5432 -e POSTGRES_PASSWORD=<your-password> -d postgres Note: username = postgres To run the image and expose the port 5442 of docker image to host port sudo docker run -p 5432:5432 postgres If you need to download postgresql client sudo apt-get install postgresql-client To connect the postgres data hosted in docker container with psql client psql -h localhost -p 5432 -U postgres https://docs.docker.com/samples/library/postgres/ https://zaiste.net/posts/docker_postgresql_how_to/ https://hub.docker.com/_/postgres/ https://docs.docker.com/engine/examples/postgresql_service/#connecting-from-your-host-system

Create React App

Install npm package manager before proceeding forward. Click Here Step: 1 Creating react app npm package manager sudo npm install -g create-react-app create-react-app my-app Navigate into my-app directory cd my-app Start your application npm start Now your application is served and you will be able to see output on your browser http://localhost:3000/ Note : If you run into error specified below ERROR: npm 5 is not supported yet Then you need to install 4.6.1 version globally with following command and follow the step one again. sudo npm i -g npm@4.6.1 Useful links  A re-introduction to JavaScript  Reactjs