Skip to content

Improve performannce - resize image, lazyloading #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -65,7 +65,6 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
wdm (0.1.1)

PLATFORMS
ruby
@@ -80,7 +79,6 @@ DEPENDENCIES
kramdown
kramdown-parser-gfm
rouge
wdm (>= 0.1.0)

BUNDLED WITH
2.1.4
2.2.11
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -58,6 +58,6 @@ adsense-data-ad-client: "ca-pub-4206814002327904"
adsense-data-ad-slot: "1363087678"

# Lazy Images ("enabled" or "disabled")
lazyimages: "disabled"
lazyimages: "enabled"

exclude: [changelog.md, LICENSE.txt, README.md, Gemfile, Gemfile.lock]
10 changes: 5 additions & 5 deletions _pages/about.md
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@ comments: false
<div class="row justify-content-between">
<div class="col-md-8 pr-5">

<p>Hello 👋🏼 its Gaurav,
<p>Hello 👋🏼 I am Gaurav,
let's find out what is coderolls.</p>

<p>coderolls is a blog about coding. Here I do write articles about Java programming language, Spring Framework, Hibernate, SQL, GIT and many related technologies. </p>
<p>coderolls is a blog about coding. Here I do write articles about Java programming language, Spring Framework, Hibernate, SQL, GIT, and many related technologies. </p>

<p>At coderolls I am trying to write easy to undersatnd but in detail tutorials. I am writing few examples in the tutorials which elaborate the conecpt.</p>
<p>At coderolls, I am trying to write easy-to-understand but in detail tutorials. I am writing few examples in the tutorials which elaborate the concept.</p>

<p>If you have any questions please feel free to reach us at hello@coderolls.com</p>

@@ -39,7 +39,7 @@ let's find out what is coderolls.</p>

<h4>About Gaurav</h4>

<p>"Hi 👋🏼 I'm Gaurav Kukade, a software developer. Here I write tutorials for Java programming language and related technologies."</p>
<p>Hi 👋🏼 I'm Gaurav Kukade, a software developer. Here I write tutorials for Java programming language and related technologies.</p>

<p>I like to try new things in the world of coding.</p>

@@ -54,7 +54,7 @@ You can connect with me on <a href="https://linkedin.com/in/gauravkukade/">Linke
<div class="sticky-top sticky-top-80">
<h5>Buy me a coffee</h5>

<p>Thank you for your support! Your donation helps me to maintain and improve <a target="_blank" href="/">coderolls <i class="fab fa-github"></i></a>.</p>
<p>Thank you for your support! Your donation helps me to maintain and improve <a target="_blank" href="/">coderolls<i class="fab fa-github"></i></a>.</p>

<a target="_blank" href="https://paypal.me/GauravKukade" class="btn btn-success">Buy me a coffee ☕</a>

12 changes: 6 additions & 6 deletions _posts/groovy/2020-12-31-hello-world-in-groovy.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "Hello World In Groovy"
author: gaurav
image: assets/images/2020-12-31/groovy-logo.png
image: assets/images/2020-12-31/groovy-logo.webp
categories: [ Groovy]
description: "In this article you will say 'Hello' to Groovy. We will see the installation and 'the' most important 'Hello World!' program."
featured: false
@@ -23,7 +23,7 @@ Here is a [link for Windows Installer for Groovy 3.0.7](https://bintray.com/groo

Once you download the .msi file ( i.e. installer) simply double click on it and you will see the installation screen.

![Groovy Installation Screen](/assets/images/2020-12-31/groovy-installation-screen.png)
![Groovy Installation Screen](/assets/images/2020-12-31/groovy-installation-screen.webp)

The installation is pretty simple and straight-forward. Click on next and go with the default setting.

@@ -37,7 +37,7 @@ Refer to the [official installation guide](https://groovy-lang.org/install.html)

Once you are done with the installation, you can search for the Groovy Console from your start menu. And finally, you are ready to write your first "Hello World!" program.

![Groovy Console in the Start Menu](/assets/images/2020-12-31/groovy-console-in-start-menu.png)
![Groovy Console in the Start Menu](/assets/images/2020-12-31/groovy-console-in-start-menu.webp)


## Hello World In Groovy
@@ -55,7 +55,7 @@ Open your Groovy Console. Add the following statement to it.
```groovy
println "Hello World!"
```
![Groovy Hello World Program In the Groovy Console](/assets/images/2020-12-31/groovy-hello-world-program-and-run-option.png)
![Groovy Hello World Program In the Groovy Console](/assets/images/2020-12-31/groovy-hello-world-program-and-run-option.webp)

To run your program right click on the console and choose the 'Run' option.

@@ -65,7 +65,7 @@ Boom!! 🎉

You can see the string "Hello World!" is printed on the console.

![Groovy Hello World Program Output](/assets/images/2020-12-31/groovy-hello-world-output.png)
![Groovy Hello World Program Output](/assets/images/2020-12-31/groovy-hello-world-output.webp)

So you have successfully written your first groovy program.

@@ -85,4 +85,4 @@ You can support me by [giving a cup of Coffee ☕](https://www.paypal.me/GauravK
- [Learn About Java String Pool And intern() Method](https://coderolls.com/java-string-pool-and-intern-method/)
- [How Do I Compare Strings In Java](https://coderolls.com/compare-strings-in-java/)
- [Compare Two Strings Lexicographically In Java](https://coderolls.com/compare-two-strings-lexicographically-in-java/)
- [Difference Between StringBuffer and StringBuilder class](https://coderolls.com/difference-between-stringbuffer-and-stringbuilder/)
- [Difference Between StringBuffer and StringBuilder class](https://coderolls.com/difference-between-stringbuffer-and-stringbuilder/)
4 changes: 2 additions & 2 deletions _posts/java-basic/2019-11-29-java-introduction.md
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ Let’s understand Java as a programming language.

Java is a high-level programming language. It is a concurrent, class-based, object-oriented programming language.

![Java Language Feature](/assets/images/2019-11-29/java-language-feature.png)
![Java Language Feature](/assets/images/2019-11-29/java-language-feature.webp)

We will understand Java by the following simple terms, let’s discuss one by one,

@@ -136,7 +136,7 @@ When we compile this file with the javac compiler, the .class file will be gener

Refer the following diagram,

![How Java Code Works](/assets/images/2019-11-29/how-java-code-works.png)
![How Java Code Works](/assets/images/2019-11-29/how-java-code-works.webp)

What was your experience when you started learning Java, share with us in the comment section.

Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "How To Read File Using BufferedReader In Java?"
author: gaurav
image: assets/images/2021-01-03/read-file-using-bufferedreader.png
image: assets/images/2021-01-03/read-file-using-bufferedreader.webp
categories: [Java, Java File IO]
description: "In this article we will see how to read a file using the `BufferedReader` class in Java."
---
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ Java `compareTo()` method Compares two strings lexicographically, The comparison

The character sequence represented by the String object is compared lexicographically to the character sequence represented by the argument string.

![Showing which one is the argument string](/assets/images/2019-11-30/compareto-method-string-def.png)
![Showing which one is the argument string](/assets/images/2019-11-30/compareto-method-string-def.webp)

```java
int compareTo(T o)
@@ -104,12 +104,12 @@ Compairing character sequence of fourthString (Cheese) to the character sequence
Explanation:
1. In first case,`compareTo()` method returns zero since firstString and secondString are same.
2. In second case, `compareTo()` method returns 14 since secondString follows thirdString by 14 characters. The pictorial explanation for this case is given below.
![An explanation for the second case of the java program for `compareTo()` method](/assets/images/2019-11-30/comapreto-method-secondstring-compareto-thirdstring.png)
![An explanation for the second case of the java program for `compareTo()` method](/assets/images/2019-11-30/comapreto-method-secondstring-compareto-thirdstring.webp)

3. In third case, `compareTo()` method returns -1 since thirdString precedes fourthString by 1 character.
4. In last case, `compareTo()` method returns -13 since fourthString precedes firstString by 13 characters. The pictorial explanation for this case is given below.

![An explanation for the fourth case of the java program for `compareTo()` method](/assets/images/2019-11-30/comapreto-method-fourthString-compareto-firstString.png)
![An explanation for the fourth case of the java program for `compareTo()` method](/assets/images/2019-11-30/comapreto-method-fourthString-compareto-firstString.webp)

## 2. By creating a user-defined method

5 changes: 3 additions & 2 deletions _posts/java-string/2019-12-02-reverse-a-string-in-java.md
Original file line number Diff line number Diff line change
@@ -85,11 +85,12 @@ In the `for` loop, I have assigned `blogName.length()-1` to i instead of `blogNa

I have given an image below to show the string indexing.

![Showing indexes of the characters in the string.](/assets/images/2019-12-02/string-indexing.png)
![Showing indexes of the characters in the string.](/assets/images/2019-12-02/string-indexing.webp)

Also you can watch [the video on my youtube channel for reverse a string with the above method](https://www.youtube.com/watch?v=vrTYrQuB0BE).

[![How To Reverse A String In Java](https://img.youtube.com/vi/vrTYrQuB0BE/0.jpg)](https://www.youtube.com/watch?v=vrTYrQuB0BE "How To Reverse A String In Java")
<iframe width="560" height="315" src="https://www.youtube.com/embed/vrTYrQuB0BE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## 2. Using `getBytes()` method of String
In the `getBytes()` method of Java String first encodes the specified string into the sequence of bytes using the platforms default charset and then save the result in the byte array. The same byte array will be returned.
8 changes: 4 additions & 4 deletions _posts/java-string/2019-12-10-compare-strings-in-java.md
Original file line number Diff line number Diff line change
@@ -176,7 +176,7 @@ If it is present in the string pool, the reference to the memory address of that

The following image shows the pictorial explanation of the same.

!['firstString' pointing towards the "coderolls" string in string pool](/assets/images/2019-12-10/firstString-pointing-to-coderolls-in-string-pool.png)
!['firstString' pointing towards the "coderolls" string in string pool](/assets/images/2019-12-10/firstString-pointing-to-coderolls-in-string-pool.webp)

‘firstString’ pointing towards the “coderolls” string in string pool

@@ -186,13 +186,13 @@ Since the string object with that value is already created in the previous step.

The following image shows the pictorial explanation for the same

!['firstString' and 'secondString' pointing towards the "coderolls" string in string pool](/assets/images/2019-12-10/secondString-pointing-to-coderolls-in-string-pool.png)
!['firstString' and 'secondString' pointing towards the "coderolls" string in string pool](/assets/images/2019-12-10/secondString-pointing-to-coderolls-in-string-pool.webp)

‘firstString’ and ‘secondString’ pointing towards the “coderolls” string in string pool

When we create string using the `new` operator, a new string object is created and stored in the Java heap space.

!['firstString' and 'secondString' pointing towards the "coderolls" string in string pool and 'thirdString' pointing towards the "coderolls" in java heap space.](/assets/images/2019-12-10/thirdString-pointing-to-coderolls-in-heap.png)
!['firstString' and 'secondString' pointing towards the "coderolls" string in string pool and 'thirdString' pointing towards the "coderolls" in java heap space.](/assets/images/2019-12-10/thirdString-pointing-to-coderolls-in-heap.webp)

‘firstString’ and ‘secondString’ pointing towards the “coderolls” string in string pool and ‘thirdString’ pointing towards the “coderolls” in java heap space.t

@@ -202,7 +202,7 @@ When we create string using the `new` operator, a new string object is created

`compareTo()` method compares the character sequence of the argument string with the character sequence of the specified string.

![Showing argument string and specified string.](/assets/images/2019-12-10/showing-argument-string-and-specified-string.png)
![Showing argument string and specified string.](/assets/images/2019-12-10/showing-argument-string-and-specified-string.webp)

Showing argument string and a specified string.

4 changes: 2 additions & 2 deletions _posts/java-string/2019-12-12-java-substring-method.md
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ If the given string is “codeRolls.com” and we applied the substring() method

See the pictorial explanation shown below.

![substring() method explanation with both parameter i.e. beginIndex and endIndex](/assets/images/2019-12-12-java-substring-method/substring-method-with-beginIndex.png)
![substring() method explanation with both parameter i.e. beginIndex and endIndex](/assets/images/2019-12-12-java-substring-method/substring-method-with-beginIndex.webp)

substring() method explanation with one parameter i.e. beginIndex

@@ -126,7 +126,7 @@ Let us take a simple string like “codeRolls.com” and I will apply the `subs

See the pictorial explanation shown below.

![substring() method explanation with both parameter i.e. beginIndex and endIndex](/assets/images/2019-12-12-java-substring-method/substring-method-with-beginIndex-and-endIndex.png)
![substring() method explanation with both parameter i.e. beginIndex and endIndex](/assets/images/2019-12-12-java-substring-method/substring-method-with-beginIndex-and-endIndex.webp)

Let us see the full java code for the example stated above.

Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "Difference Between StringBuffer and StringBuilder class"
author: gaurav
image: assets/images/2019-12-24-difference-between-stringbuffer-and-stringbuilder/blog-cover.jpg
image: assets/images/2019-12-24-difference-between-stringbuffer-and-stringbuilder/blog-cover.webp
categories: [ Java, Core Java, String]
description: "In this article, we are going to discuss the differences between the `StringBuffer` and `StringBuilder` class. And we will see why it `StringBuilder` is preferable to `StringBuffer` class."
featured: false
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "How To Convert StringBuilder To String In Java?"
author: gaurav
image: assets/images/2020-12-24/convert-stringbuilder-to-string-in-java.png
image: assets/images/2020-12-24/convert-stringbuilder-to-string-in-java.webp
categories: [ Java, Core Java, String]
description: "In this article you will see, how to convert a StringBuilder to String in Java."
featured: false
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "Your Guide To UUID In Java"
author: gaurav
image: assets/images/2020-12-19/uuid.png
image: assets/images/2020-12-19/uuid.webp
categories: [ Java, Core Java, String]
description: In this article you will learn what is UUID and about the Java UUID class.
featured: false
@@ -50,7 +50,7 @@ UUID can be used in the following cases

df6fdea1-10c3-474c-ae62-e63def80de0b

![Structure of UUID](/assets/images/2020-12-19/uuid.png)
![Structure of UUID](/assets/images/2020-12-19/uuid.webp)
## Java UUID class

UUID Class belongs to the `java.util` package. It represents an immutable universally unique identifier (UUID).
2 changes: 1 addition & 1 deletion _posts/java-uuid/2020-12-23-create-uuid-in-java.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
layout: post
title: "How To Create UUID in Java?"
author: gaurav
image: assets/images/2020-12-23/create-uuid-in-java.png
image: assets/images/2020-12-23/create-uuid-in-java.webp
categories: [ Java, Core Java, String]
description: "In this article you will see, how to create UUID in Java."
featured: true
6 changes: 3 additions & 3 deletions assets/css/screen.css
Original file line number Diff line number Diff line change
@@ -330,7 +330,7 @@ span.post-read-more a:hover {
}

.article-post {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1.1rem;
line-height: 1.84;
color: rgba(0, 0, 0, .8);
@@ -711,7 +711,7 @@ h6 {
}

.layout-page .article-post {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
}

@@ -933,4 +933,4 @@ right social connect svg's.

.lh-condensed-ultra{
line-height: 1!important;
}
}
Binary file modified assets/images/13.jpg

Unable to render rich display

Invalid image source.

Binary file added assets/images/2019-11-29/how-java-code-works.webp
Binary file not shown.
Binary file added assets/images/2019-11-29/java-introduction.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified assets/images/2019-12-02/alex-radelich.jpg

Unable to render rich display

Invalid image source.

Binary file added assets/images/2019-12-02/alex-radelich.webp
Binary file not shown.
Binary file modified assets/images/2019-12-02/string-indexing.png

Unable to render rich display

Invalid image source.

Binary file added assets/images/2019-12-02/string-indexing.webp
Binary file not shown.

Unable to render rich display

Invalid image source.

Binary file not shown.

Unable to render rich display

Invalid image source.

Binary file not shown.

Unable to render rich display

Invalid image source.

Binary file not shown.

Unable to render rich display

Invalid image source.

Binary file not shown.

Unable to render rich display

Invalid image source.

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-add.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-branch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-clone.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-commit.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-init.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-new-branch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-pull.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-push.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/2019-12-20-basic-git-commands/git-status.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified assets/images/2020-12-19/uuid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/2020-12-19/uuid.webp
Binary file not shown.
Binary file modified assets/images/2020-12-23/create-uuid-in-java.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/2020-12-23/create-uuid-in-java.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified assets/images/2020-12-31/groovy-console-in-start-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified assets/images/2020-12-31/groovy-hello-world-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified assets/images/2020-12-31/groovy-installation-screen.png
Binary file not shown.
Binary file modified assets/images/2020-12-31/groovy-logo.png
Binary file added assets/images/2020-12-31/groovy-logo.webp
Binary file not shown.
Binary file modified assets/images/2021-01-03/read-file-using-bufferedreader.png
Binary file not shown.
Diff not rendered.
Binary file modified assets/images/2021-01-07/parse-json-in-java.png
Binary file modified assets/images/4.jpg
Binary file modified assets/images/jumbotron.jpg