teleren/devto huggingface dataset:
Set Background Color and Image for Excel Using Java
Tags: java, excel, background
Published: 2021-06-28 06:13:56

Usually the default background of Excel documents is white, and in order to beautify the document, we can set background color or background image for the Excel document. Now, this article will introduce how to do this programmatically using Free Spire.XLS for Java.

**Import the Jar dependency**
**Method 1:** Download the [Free Spire.XLS for Java] (https://www.e-iceblue.com/Download/xls-for-java-free.html)and unzip it, then add the Spire.Xls.jar file to your project as dependency.

**Method 2:** Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.xls.free</artifactId>
        <version>3.9.1</version>
    </dependency>
</dependencies>
```

**Set background color:**
```java
import com.spire.xls.ExcelVersion;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

import java.awt.*;

public class BackgroundColor{
    public static void main(String[] args){
        //Create a Workbook instance
        Workbook workbook = new Workbook();
        //Load an Excel file
        workbook.loadFromFile("input.xlsx");

        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);
        //Set background color for the used cell range in the worksheet
        sheet.getRange().getStyle().setColor(Color.pink);
        //Set background color for a specified cell range in the worksheet
        //sheet.getCellRange("A1:E19").getStyle().setColor(Color.yellow);

        //Save the file
        workbook.saveToFile("SetBackColor.xlsx", ExcelVersion.Version2013);
    }
}
```
![BgColor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7cahhtcwjxcw16uoj2j.jpg)

**Set background image:**
```java
import com.spire.xls.ExcelVersion;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class BackgroundImage {
    public static void main(String[] args) throws IOException {
        //Create a Workbook instance
        Workbook workbook = new Workbook();
        //Load an Excel file
        workbook.loadFromFile("input.xlsx");

        //Get the first worksheet
        Worksheet sheet = workbook.getWorksheets().get(0);
        //Load an image
        BufferedImage image = ImageIO.read( new File("C:\\Users\\Administrator\\Desktop\\bg.jpg"));
        //Set the image as the background image of the worksheet
        sheet.getPageSetup().setBackgoundImage(image);

        //Save the file
        workbook.saveToFile("SetBackImage.xlsx", ExcelVersion.Version2013);
    }
}
```
![BgImage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/soovermj87gly3y8ngeb.jpg)
Best Software to repair PST file
Tags: pstrecovery, repairoutlookpst, outlookrecovery
Published: 2021-06-28 06:11:20

Hi! I want to share information about DRS PST Recovery software that can convert PST file and save easily ant format. It is the best tool for repair and recover corrupt PST file.
know more: https://www.data-recovery-solutions.com/pst-recovery.php
Internet Dedicated + IT Support untuk Perusahaan di daerah Istimewa Yogyakarta
Tags: internet, itsupport, yogyakarta
Published: 2021-06-28 06:09:48

Hallo!!! Perkenalkan kami adalah HMN IT Support.
Kami merupakan startup baru di yogyakarta. lingkup kami untuk daerah kota jogja, sleman dan bantul. kami membuka jasa layanan internet include IT Support. jadi, tidak perlu sewa IT support karena sudah paket lengkap dengan jasa kami. layanan internet yang kami tawarkan yaitu dedicated 1:1, sehingga kecepatan stabil ketimbang up to. ada banyak bonus yang kami tawarkan selain IT support. info selengkapnya bisa cek di: http://helesmedianetwork.com/harga-itsupport-internet-dedicated/
Windows 11 browser layout
Tags: showdev, html, css3, beginners
Published: 2021-06-28 05:54:15

I just tried to make windows 11 layout in browser with HTML, CSS and JAVASCRIPT. 

Windows 11 provides a calm and creative space where you can pursue your passions through a fresh experience. From a rejuvenated Start menu to new ways to connect to your favorite people, news, games, and content—Windows 11 is the place to think, express, and create in a natural way.

Looking forward to m add more functionalities to make this browser layout more similar to Windows11. 

Contributions and suggestions are Welcome ❤
- If you feel like contributing to this go to [GitHub Repo](https://github.com/Garima-sharma814/windows11-browser-clone) and create [Pull Request](https://github.com/Garima-sharma814/windows11-browser-clone/pulls).

- [See the code](https://github.com/Garima-sharma814/windows11-browser-clone)
- [Final output](https://windows11clone.netlify.app/)

{% github https://github.com/Garima-sharma814/windows11-browser-clone %}
Web Document Management in Chrome OS
Tags: chromebook, chromeos, documentmanagement
Published: 2021-06-28 05:19:18

Since from version 17.1, **Chromes OS** comes into the supporting list of [Dynamic Web TWAIN](https://www.dynamsoft.com/web-twain/overview/). The supported desktop operating systems of Dynamic Web TWAIN now include **Windows**, **Linux**, **macOS**, **Raspberry Pi OS** and **Chrome OS**. This article helps Chromebook users to install Dynamic Web TWAIN service in Chrome OS. Building web document management applications for Chrome OS has come true.

## Experiencing the Free Online Document Management Application in Chrome OS
Let's open the free [online demo](https://demo.dynamsoft.com/web-twain/) of Dynamic Web TWAIN.

As you visit the page for the first time, you will be required to download the `*.deb` file for Chrome OS.

![download Dynamic Web TWAIN for Chrome OS](https://www.dynamsoft.com/codepool/img/2021/06/download-dwt-chrome-os.png)

After clicking the download button, a file named `DynamsoftServiceSetup.deb` will be saved to the `Downloads` folder of Chrome OS. We need to install the deb file.

### How to Install Dynamic Web TWAIN Service (*.deb) in Chrome OS

To install the deb file, we go to `Settings > Developers` to enable the `Linux development environment`. The process takes a little bit of time. 

Once the Linux environment is ready, we will see a Linux terminal in the launcher and a `Linux files` folder under the `Downloads` folder. 

From now on, as long as we connect a document scanner to the Chromebook, a `CONNECT TO LINUX` notification will pop up. We have to click it to make the scanner discoverable in the Linux environment.
  
Here are the steps to install Dynamic Web TWAIN service:
1. Copy `DynamsoftServiceSetup.deb` from `Downloads` to `Linux files`.
2. Install SANE:
    
    ```bash
    sudo apt install sane
    ```

3. Install `DynamsoftServiceSetup.deb`:
    
    ```bash
    sudo dpkg -i DynamsoftServiceSetup.deb
    ```

You probably have noticed that when you right-click on the deb file, an item `Install with Linux` will appear in the context menu. It is **not a recommended way** for installing Dynamic Web TWAIN service.

The following command helps check the status of Dynamic Web TWAIN service:

```bash
ps aux | grep dynamsoft*
```

## Trying the Web Document Management Application

It is time to refresh the page and have fun with the web document management demo in Chrome OS. The experience should be the same comparing to other desktop operating systems.


![Dynamic Web TWAIN for Ruby on Rails](https://www.dynamsoft.com/codepool/img/2021/06/chrome-os-web-document-management.png)

## Video
For getting more details, you can watch the video.

<video src="https://www.dynamsoft.com/codepool/img/2021/06/chrome-os-web-document-management.mp4" controls="controls" muted="muted" style="max-height:640px;max-width:100%;"></video>
Create a PDF Document in Flutter
Tags: flutter, pdf, widget, webdev
Published: 2021-06-28 05:16:39

Get an overview of the Syncfusion's [Flutter PDF library](https://www.syncfusion.com/flutter-widgets/pdf-library "Flutter PDF library"). This video explains how to add the Syncfusion [Flutter PDF library](https://www.syncfusion.com/flutter-widgets/pdf-library "Flutter PDF library") to a Flutter project. It also explains how to create a PDF document and add text, images, and tables to it. You will also learn how to save the file and download the document on mobiles and on the website.

**Product overview**: https://www.syncfusion.com/flutter-widgets/pdf-library

**Documentation**: https://help.syncfusion.com/flutter/pdf/overview

**API Documentation**: https://help.syncfusion.com/flutter/introduction/api-reference

**Examples** – GitHub: https://github.com/syncfusion/flutter-examples

{% youtube tMM9ty4Wfq0 %}
Express middlewares and  Higher Order Functions
Tags: node, express, advanced
Published: 2021-06-28 05:15:06

Like I said in the first post of the series, Express is all about middlewares. 
So, here's the problem statement

## Problem Statement
> Can we create a middleware out of any function, so that developers don't have to worry about the tricky syntax and testing of middlewares

Well, the hardest part is over, defining the problem. Let's get our hands dirty now. 

The generic syntax of a middleware is 
```javascript
//generic express middleware syntax
const middleware = (req, res, next) => {
  // EXECUTION LOGIC
  next(); // This is where the control leaves this middleware and moves to next item in the queue, which could be another middleware, or the final controller etc
}
```

Our intention is make it work in a way, that we should be able to inject the `EXECUTION LOGIC` dynamically. 

For this, we slightly move away from OOPS of JS and take help of a functional programming concept called __Higher Order Function__.

How does it help, you ask? Well, we're going to create a function, that returns a middleware. and through that function, we're going to inject the _execution logic_.

We're going to create a file, withMiddleware.js
```javascript
//withMiddleware.js

//Higher Order Function
const withMiddleware = (func) => {
  return (req, res, next) => {
    func(); //func has the EXECUTION LOGIC
    next();
  }    
}

module.export = withMiddleware;

```

Let's see how we can make this work for us. 
```javascript
const withMiddleware = require('./withMiddleware');

const funcOne = () => {
  //YOUR BUSINESS LOGIC
}

const funcTwo = () => {
  //YOUR ANOTHER BUSINESS LOGIC
}

const middlewareOne = withMiddleware(funcOne);
const middlewareTwo = withMiddleware(funcTwo);

//use this middlewares in a standard way.
app.get("/path", middlewareOne, middlewareTwo, (req, res)=>{
  //further execution, if any
  res.send({});
})
```

The Magic ends here for now, but there are a few problems yet to be solved for this. In the next post we're going to take this a little higher and address the following 

1. How will we handle the __async middlewares__?
2. What if I'm writing auth or validation middlewares, that needs access to the __request object__?
3. __Passing data between middlewares__? Although we solved it in the first post, see the PS: section, but how can we make it work effortlessly
3. __Logging__. The generic activities of the middlewares needs to be logged. Like, in case of async middleware, that fetches data over another API, or fetches data from a DB, the time taken for the async operation needs to be logged.
Keep improving your lighthouse score
Tags: seo, ux, webdev
Published: 2021-06-28 05:04:27

Lighthouse is a perfect way to evaluate work that needs to happen on your website.

And over the years, I've done many optimizations for websites to enhance the user experience by making the website better on the points mentioned by Lighthouse.

![A perfect Lighthouse score](https://cdn.hashnode.com/res/hashnode/image/upload/v1624426029177/cSX7Bv78C.png)

However, in the modern-day and age, It's getting more important not to stop when you hit 💯.

## Evaluate multiple pages in Lighthouse

The biggest mistake I've seen is when people say, "Oh, my website gets a 100 score on Lighthouse", and it turns out this is only the case for the homepage.
This is a great start, but try out a blog page. You might find the SEO semantics are not great and can do with improvement.

Another issue for other pages is often image optimization. The main page might have optimized images, but your other pages might not.

What I often do in this case is get the most viewed organic pages, so what pages do people enter on?
And lighthouse score these as well, this will enhance our overall website experience, and you might find specific issues that will address multiple pages at once.

## Make Lighthouse checks a recurring task

Another tip is to evaluate Lighthouse scores recurrently, how often I'll leave it up to you.
I've seen people do this as a GitHub action, which is also pretty cool.

So I tend to check it every two weeks. Generally, it doesn't need many changes, but you might find I changed an image or Google upped their criteria.

These criteria are a big point. Browsers keep improving, and devices as well. So Google will keep evaluating what's an acceptable approach.

A couple of years ago, a little background story you would have gotten away with JPG/PNG images as this was a standard.
However, nowadays, we can leverage moderns formats like webp, JPEG 2000, or JPEG XR. This is already reflected in Lighthouse, so your old score might not be true anymore.

## Make it fun, not just strict

I enjoy improving the website and finding small elements I can improve on, but with everything, keep it fun.

Lighthouse or any other tool like this can be super frustrating, and sometimes you have to understand something is not worth fixing.
This comes down to experience, and thinking is this method necessary.

For me, the biggest pain point is Lighthouse whining about a gtag which is something of themselves (🤦‍♂️). It keeps saying this has unused JavaScript, but it's not something I can change because I don't own this file.

So this will stay as is. However, it might be worthwhile trying out modern ways of loading this file.

Another great tip, make small changes at a time, don't try and go from 80 to 100 in one go.
Make a small change and take that win!
Then the next day or week, go for the next item on the list.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
No Code WhatsApp Chatbot
Published: 2021-06-28 05:01:27

This stack helped me build a No code **WhatsApp Chatbot** using:

* WhatsApp for the business account: Chatbot UI
* Google DialogFlow: For training & testing, adding NLP capabilities
* Google Sheets: To collect responses from the bot
* Razorpay or Stripe: To add a payment gateway

You can refer to this video : [Link](https://https://www.youtube.com/watch?v=ut9fYi3rgWA&t=1s)
Insertion sort using go
Tags: go, sort
Published: 2021-06-28 04:17:47

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc3o5n9b2n6u9yoqzg1n.png)
<center><small> Photo by <a href="https://unsplash.com/@sumekler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Jarosław Kwoczała</a> on <a href="https://unsplash.com/s/photos/cards?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  </small></center>
Sorting is always a good start point to learn algorithm. Not only it is easy but it also quite challenging too, that's why we have plenty of sorting algorithms are available.

Now, lets talk about Insertion Sort.
### Insertion Sort
Insertion Sort algorithm is relatively a simple an efficient algorithm for sorting a smaller array.
It works the way many people sort a hand of playing cards.

We start an empty hand, remove one card from the table and one card into the hand in the correct position.
For that, we need to compare the previous card from hand. If the previous value is bigger than new card then move previous card to right and move current card to the left (Basically, just swap position based on value).
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huskie5f31sxn2wz128q.png)
 Enough talk, let do this in code.
``` go
package main

import "fmt"

func main() {
	// declare an array
	items := [6]int{5, 2, 4, 6, 1, 3}
	// calculate length of array
	var n = len(items)
	// loop through array
	for i := 1; i < n; i++ {
		// set limit for current index (for leftside shift)
		j := i
		// loop through array until we reach the last element
		for j > 0 {
			// If the Item from right side is greater than left side
			// we need to swap the values
			if items[j-1] > items[j] {
				items[j-1], items[j] = items[j], items[j-1]
			}
			/*
			* else {
			* no need to swap, because this unit already sortted
			* }*/

			// reduce inner index by one
			j = j - 1
		}
	}
	fmt.Println(items)
}

```
 
Gist Link :https://gist.github.com/NaveenDA/3f71583594a2795c838ab4e044c09d35


I recommend everyone should try this algorithm in your favorite programming language. It improve our knowledge and more importantly it gives some challenges until we solve it.
 <hr />
<center>Thanks for reading <3.</center>
Prioritizing your Mental Health As a Developer
Tags: mentalhealth, devops, productivity
Published: 2021-06-28 04:09:11

There is no perfect answer when it comes to telling people where you work about the condition of your mental health. What you have chosen to tell others really depends on how much it affects your role, your relationships with your colleagues and the amount of support you have outside the workplace. The following are some of the things you can do to prioritize your mental health.

Eat well—poor food choices can affect brain function. More healthier foods like vegetables, fruits and grains contribute greatly to an improved mental health.

Rest—Good hours of sleep at night helps improves your ability to handle problems and react in a good way to situations.

Exercise—a regular physical exercise can improve the metabolic function and produces endorphins which helps reduces tension, increase alertness and improves good mood.

I hope this helps :-)

If you enjoy this, please subscribe to my [Newsletter] (https://www.getrevue.co/profile/STEMInstructor) and check out my work [here] (https://gum.co/wynyaajd). You can also hook me up on [Twitter] (https://www.twitter.com/STEMInstructor_)
Solana From Source
Tags: solananetwork, rust
Published: 2021-06-30 17:55:49

---
title: Solana From Source
published: true
date: 2021-06-28 04:06:08 UTC
tags: solananetwork,rust
canonical_url: https://medium.com/coinmonks/solana-from-source-527cec3730b1
---

[![](https://cdn-images-1.medium.com/max/1200/1*1RmTW8WOF6o3UGBkjuTOYA.jpeg)](https://medium.com/coinmonks/solana-from-source-527cec3730b1?source=rss----721b17443fd5---4)

Solana is an interesting blockchain project that promises to be an L1 with low gas fees and fast block times. To check it out I decided to…

[Continue reading on Coinmonks »](https://medium.com/coinmonks/solana-from-source-527cec3730b1?source=rss----721b17443fd5---4)
Don't let these lies define your learning journey
Tags: productivity, learning, career, beginners
Published: 2021-06-28 03:56:53

You will find a lot of free advice lying around the internet. Stuff that very experienced and successful people endorse. Extracts from famous books. Not all of them will be relevant to you and not all of them will be enough to put you on the right path. Do not let these lies define your learning process.

## Lies


1. **Follow your passion**
    - you don’t need to be passionate to become good at something and enjoy improving your craft
    - being passionate about something does not mean building a career is the only way to pursue it
    - aim for creativity, control and impact instead
    - sometimes passion arises after learning
2. **You can avoid risk**
    - risk is part of the process
    - to succeed at something, enjoy taking risks
    - do not hesitate from trying new things once in a while
    - get out of your comfort zone and stop playing safe
3. **Your mentor is always right**
    - a mentor's opinions and knowledge are bounded by their own experience
    - don't always agree with one person or one  source of information
    - form your own opinions and techniques
    - nobody knows everything completely
4. **Mastery needs 10000 hours**
    - practice matters but there are many factors involved
    - your intelligence and learning capability matters
    - your current level decides how tough or easy the path is for you
    - you don't always have to be a hard worker
    - focus on efficient learning and not on how much time you put into it.

---

Happy Learning!!
![Learning](https://i.giphy.com/media/3ohuAxV0DfcLTxVh6w/giphy.webp)

You can connect with me at &nbsp;
[LinkedIn](https://www.linkedin.com/in/abh1navv)
[Twitter/@abh1navv]
(https://www.twitter.com/abh1navv)
How can a fresh passionate graduate enter in to world of AWS cloud as Solutions architect(SSA-C02)? 
Tags: career, aws, help, beginners
Published: 2021-06-28 03:44:24

I completed my graduation this year. I am very much interested in cloud technology. I am doing my certification as solutions architect. What are other things should I learn to get in as Solutions Architect? 
I will thrive hard to learn what ever is required in the process. I want to be the cloud solution architect, no matter what it takes...
The project begins...
Published: 2021-06-28 03:42:16

This is how my mind works.  Always listening to find a problem that can be solved.  I am sitting talking with my wife about how our son overspends on groceries and supplies while living as a college student.  She wants to keep him to a monthly limit, help him understand how his choices affect what he'll be able to afford and help him learn how to balance wants and needs.  So "BOOM" I'm already building an app in my mind that she can use when she's shopping with him, to keep track of things in his cart and how it is affecting his available balance.  It will give them the option to record what the item is and how much it costs.  It will provide a running total and usable balance remaining.  It will allow multiple additions and allow for deletions.  It will be "event" specific so that once the shopping trip is completed, another shopping trip with a new limit can be created - allowing for multiple limits, if desired.  I could also have a interval based limit (monthly, weekly, etc.) that could keep a running total across multiple trips.  It sounds like I've already planned my model :)  Now, my first inclination would be to write it in PHP and host it on my business server, because that's what I've always done.  But, my recent education is in React, Redux and other JavaScript front and backend technologies - so I'm going to see what I can do there.  My previous projects have been locally served only so getting something up on a host server is going to be my first challenge.  I have options with Netlify, Heroku, Replit ... but I'm using Replit for all of my coding challenges (oh, yes - I'm also doing coding challenges) so I think I'm going to give Replit the first shot.  We'll see how this goes...