Skip to main content

Posts

Showing posts with the label Web development

PostgreSQL list of commands

PostgreSQL, or Postgres, is an object-relational database management system that utilizes the SQL language. PSQL is a powerful interactive terminal for working with the PostgreSQL database. It enables users to execute queries efficiently and manage databases effectively. Here, we highlight some of the most frequently used PSQL commands, detailing their functionalities to enhance your PostgreSQL experience. Top PSQL Commands in PostgreSQL Here are the top 22 PSQL commands that are frequently used when querying a PostgreSQL database: Serial No.CommandDescription1 psql -d database -U user -W Connects to a database under a specific user 2 psql -h host -d database -U user -W Connect to a database that resides on another host 3 psql -U user -h host "dbname=db sslmode=require" Use SSL mode for the connection 4 \c dbname Switch connection to a new database 5 \l List available databases 6 \dt List available tables 7 \d table_name Describe a table such as a column, type, modifiers of c...

How to deply Ollama & open web-ui on your laptop

How to deploy Ollama  Installation: Download Ollama:   Get the Ollama package from the  GitHub repository .   Install Dependencies:   Ensure you have any required dependencies, including libraries for your specific model.   Verify Installation:   Use  ollama --version  to confirm Ollama is installed correctly.   2. Model Deployment and Usage: Pull the Model:   Use the  ollama pull <model_name>  command to download the desired model.   Run the Model:   Use  ollama run <model_name>  to initiate the model's execution.   Interacting with the Model:   Ollama provides an API at  http://localhost:11434/api/generate  for interacting with the model.   Optional: Web UI:   Explore  Open WebUI  for a user-friendly interface to manage and interact with models.   Optional: Custom Applications:   Build custom applications using libraries like FastAPI and Gr...

Go error: go : go.mod file not found in current directory or any parent directory; (working on GOPATH/src)

As of Go 1.16, the   GO111MODULE   environment variable is treated as "on" by default, meaning Go expects to find a   go.mod   file, and no longer falls back to pre-module   GOPATH   behavior. If you want to go back to the pre-1.16 behavior, you now have to explicitly specify  GO111MODULE=auto , but you're far better off creating a  go.mod  file. See  https://golang.org/doc/go1.16#go-command  and  https://golang.org/ref/mod Source - https://stackoverflow.com/questions/67929883/go-error-go-go-mod-file-not-found-in-current-directory-or-any-parent-director 

𝐒𝐲𝐬𝐭𝐞𝐦 𝐃𝐞𝐬𝐢𝐠𝐧 𝐆𝐨𝐥𝐝𝐦𝐢𝐧𝐞 ❤️️

 System Design rounds are an important part of the Software Engineering interview process because they test a candidate's ability to design and implement large-scale systems. Here is the list of some amazing resource on System Design - ✅ Things you must know in System Design 👉System design basics: https://bit.ly/3SuUR0Y 👉Horizontal and vertical scaling: https://bit.ly/3slq5xh 👉 Load balancing and Message queues: https://bit.ly/3sp0FP4 👉High-level design and low-level design, Consistent Hashing, Monolithic and Microservices architecture: https://bit.ly/3DnEfEm 👉 Caching, Indexing, Proxies: https://bit.ly/3SvyVDc 👉 Networking, How Browsers work, Content Network Delivery ( CDN): https://bit.ly/3TOHQRb 👉 Database Sharding, CAP Theorem, Database schema Design: https://bit.ly/3CZtfLN 👉 Concurrency, API, Components + OOP + Abstraction : https://bit.ly/3sqQrhj 👉 Estimation and Planning, Performance: https://bit.ly/3z9dSPN 👉 Map Reduce, Patterns, and Microservices: https://bit.ly/...

API architectural styles

The following image displays the most common architectural styles for APIs. 🔹 1. REST REST, which was proposed in 2000, is the most widely used style for APIs. It is often utilized between front-end clients and back-end services, and it adheres to six architectural constraints. The payload format may be JSON, XML, HTML, or plain text. 🔹 2. GraphQL Meta proposed GraphQL in 2015. It provides a schema and type system that is ideal for complicated systems where entities' relationships are graph-like. In the diagram below, GraphQL can retrieve user and order information in one call, while REST necessitates multiple calls. GraphQL does not replace REST but can be built upon existing REST services. 🔹 3. Web socket Web socket is a protocol that enables full-duplex communications over TCP. Clients create web sockets to receive real-time updates from back-end services. Unlike REST, which always "pulls" data, web socket allows data to be "pushed". 🔹 4. Webhook Webhook...

From UX perspective is it good to show all prerequisite checks in a single screen or split them into multiple screens?

From a UX perspective, it's generally best to split prerequisite checks into multiple screens if they are numerous or complex, especially if they require user input or interaction. When multiple prerequisite checks are displayed on a single screen, it can be overwhelming for the user, and it may be difficult to understand which checks have been completed and which ones are outstanding. This can lead to confusion, frustration, and errors. Splitting the prerequisite checks into multiple screens can make the process more manageable for the user. Each screen can focus on a specific task or set of tasks, with clear instructions and feedback on completion. This can help the user feel more in control of the process and less overwhelmed by the overall number of prerequisite checks. However, if the prerequisite checks are simple and can be completed quickly, it may be appropriate to display them all on a single screen, provided they are clearly organized and easy to understand. In this case...

Type or Category or Classification of Design Patterns

 Type or Category or Classification of Design Patterns Creational   Based on the concept of creating an object.     Class       Factory Method This makes an instance of several derived classes based on interfaced data or events.     Object       Abstract Factory Creates an instance of several families of classes without detailing concrete classes.       Builder Separates object construction from its representation, always creates the same type of object.       Prototype A fully initialized instance used for copying or cloning.       Singleton A class with only a single instance with global access points.                    Structural   Based on the idea of building blocks of objects.     Class   ...