beginners

Eager vs Lazy Initialization of Spring Beans

Eager vs Lazy Initialization of Spring Beans

In Spring, one of the fundamental concepts revolves around the initialization of beans. When developing applications using the Spring Framework, you have the option to choose between eager and lazy initialization of beans. Both have their unique advantages and trade-offs, and understanding these differences can help you optimize your application’s performance and resource usage. What are Spring Beans? Before diving into eager and lazy initialization, let’s briefly touch on what Spring beans are. In Spring, a bean is simply an object that is instantiated, assembled, and managed by the Spring IoC (Inversion of Control) container. Beans are typically singleton by…
Read More
#51 - Get Rankings of Excel Rows in Each Group While Retaining the Existing Order

#51 - Get Rankings of Excel Rows in Each Group While Retaining the Existing Order

Problem description & analysis: We have an unordered Excel table, where the 1st column is the grouping column and the 2nd column contains dates. Task: Get rankings of rows in each group and write them in the 3rd column while retaining the existing order of the rows. The expected result is as follows: Solution: Use SPL XLL to do this: =spl("=E(?).derive(#:id,rk).sort(#1,#2).run(rk=rank(#2;#1)).sort(id).(rk)",A1:B14) Enter fullscreen mode Exit fullscreen mode As shown in the picture below: Explanation: E()function converts the Excel data range to a table. derive() function adds a new column. rank() function gets rankings of records in each sorted group. #…
Read More
First fully multi-GPU supporting and very advanced batch image captioner APP with Gradio interface published

First fully multi-GPU supporting and very advanced batch image captioner APP with Gradio interface published

Multi-GPU batch caption with JoyCaption. JoyCaption uses Meta-Llama-3.1–8B and google/siglip-so400m-patch14–384 and a fine tuned image captioning neural network. Link : https://www.patreon.com/posts/110613301 Link for batch caption editor : https://www.patreon.com/posts/108992085 Coding multi-gpu in Python and Torch and bitsandbytes was truly a challange. Our APP uses JoyCaption image captioning fine tuned model. Our APP supports bitsandbytes 4bit model loading as well even in multi GPU mode (9.5 GB VRAM) Tested on 8x RTX A6000 (cloud) and RTX 3090 TI + RTX 3060 (my PC) 1-click to install on Windows, RunPod and Massed Compute Excellent caption quality, automatically distributes images into each GPU, lots…
Read More
How To Use Node JS By Displaying (“Hello World”)

How To Use Node JS By Displaying (“Hello World”)

1. Buka Web Browser Seperti Chrome, Edge atau yang lain 2. Download Node.js pada Web Browser yang anda gunakan atau klik link berikut NodeJS (versi yang direkomendasikan saat ini v20.16.0 (LTS)) 3. Download GitBash untuk terminalnya pada website yang anda gunakan atau klik link berikut GitBash 4. Buka GitBash yang sudah anda download 5. Cek versi node anda (versi yang direkomendasikan saat ini v20.16.0 (LTS)) dengan mengetikkan node -v 6. Buat direktori untuk proyek anda dengan mengetikkan mkdir nama-proyek-anda 7. Masuk ke dalam direktori yang anda buat dengan mengetikkan cd nama-proyek-anda 8. Buat file main.js (nama file sesuai keperluan) menggunakan…
Read More
JoyCaption is amazing to caption training data. Advanced Gradio APP with batch processing and 1-click install

JoyCaption is amazing to caption training data. Advanced Gradio APP with batch processing and 1-click install

Here a Hugging Face space that you can test it yourself : https://huggingface.co/spaces/fancyfeast/joy-caption-pre-alpha — still working I have been requested to make a Gradio app for this so i made an advanced app and 1-click installers It uses a clip siglip-so400m-patch14–384 and Meta-Llama-3.1–8B-Instruct as model and a fine tuned checkpoint for better captioning My app who wants to checkout : https://www.patreon.com/posts/110613301 It has batch folder captioning feature as well and auto save all captioned images and captions into outputs folder Also I have a very lightweight, super fast Gradio caption editor. Since I don’t like other existing apps, i self…
Read More
Building a Responsive Navigation Bar with Flexbox: Lessons from Wes Bos’ Course

Building a Responsive Navigation Bar with Flexbox: Lessons from Wes Bos’ Course

Flexbox is a powerful tool for creating responsive and flexible layouts. In this article, I'll walk you through the process of building a responsive navigation bar using Flexbox. This is from a lesson I've learned from Wes Bos' free Flexbox course, and this article is my way of internalizing and sharing what I've learned. Creating a Flexbox Navigation Bar In this example, I designed a simple navigation bar with multiple links, including social media icons, using Flexbox for layout control. The navigation bar is responsive and adapts to different screen sizes, thanks to Flexbox properties like display: flex, flex-wrap, and…
Read More
Mastering TypeScript Generics: Enhancing Code Reusability and Type Safety

Mastering TypeScript Generics: Enhancing Code Reusability and Type Safety

TypeScript has revolutionized the way we write JavaScript, bringing static typing and enhanced tooling to our development process. One of its most powerful features is generics, which allow us to create reusable components that work with a variety of types. In this post, we'll dive deep into TypeScript generics, exploring how they can improve your code's flexibility and type safety. Understanding Generics Generics provide a way to create components that can work over a variety of types rather than a single one. They're particularly useful when you want to create a component that can handle different data types without sacrificing…
Read More
Handling Timestamp Column Changes in Laravel Migrations with PostgreSQL

Handling Timestamp Column Changes in Laravel Migrations with PostgreSQL

When working with Laravel migrations, developers may encounter issues when trying to change a column's type to timestamp, especially in a PostgreSQL environment. The problem arises from Laravel's reliance on Doctrine DBAL, which doesn’t natively support the timestamp type. The Problem: When using the change() method in Laravel migrations, a DoctrineDBALException may be thrown, stating that the timestamp type is unknown. This is because Doctrine DBAL does not support certain native database types, like timestamp, out of the box. The Workaround: To address this issue, a practical solution is to avoid using change() and instead, drop the column and recreate…
Read More
Understanding Redux: A Beginner’s Comprehensive Guide

Understanding Redux: A Beginner’s Comprehensive Guide

Introduction: What is Redux and Why Do We Need It? As web applications grow in complexity, managing state becomes increasingly challenging. If you've ever found yourself tangled in a web of unpredictable state changes and difficult-to-track data flows, you're not alone. This is where Redux comes in as a lifesaver. Redux is a state management library for JavaScript applications, renowned for its effectiveness, particularly when used with React. By providing a predictable and centralized way to manage application state, Redux simplifies the process of tracking how data changes over time and how different parts of your application interact with each…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.