teleren/devto huggingface dataset:
Set Row Height and Column Width in Excel using a free Java API
Tags: java, excel, column, api
Published: 2021-04-20 06:15:55

In most cases, we need to adjust the row height and column width to better display the contents of certain Excel cells. This article will introduce how to set the row height and column width programmatically by using a free Java API (Free Spire.XLS for Java).

**Installation** (2 Method)
**1#** Download the [free API](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.
**2#** You can also 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>
```

**Relevant code snippet**
```java
import com.spire.xls.*;

public class SetWidthAndHeight {
    public static void main(String[] args) {

        //Load the sample document
        Workbook workbook = new Workbook();
        workbook.loadFromFile("sample.xlsx");

        //Get the first worksheet.
        Worksheet worksheet = workbook.getWorksheets().get(0);

        //Set the height of the third row to 25
        worksheet.setRowHeight(3,25);

        //Set the width of the second column to 20
        worksheet.setColumnWidth(2, 20);

        //Save to file
        workbook.saveToFile("output/SetWidthAndHeight.xlsx", ExcelVersion.Version2016);
    }
}
```

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ozt98yua697lxilp2x52.jpg)
🐱‍👓The Real test , Sb3 VS Vscode(Must watch) #1
Tags: sublimetext, visualstudiocode, productivity, test
Published: 2021-04-20 04:39:47

Hey everyone ! 
I'm going to make three parts of this article about me developing for 3 days , and the lines added, lines removed, and time spent in the text editor.

## 🐱‍🚀 Why is this the best Sb3 vs Vscode Article ? 
Simple , People talk about pros and cons, I'm talking about productivity, time spent, and what really matters. 

## 🐱‍👤 Lets get started!!
### 🐱‍🐉 Sublime text
Up first is sublime text, Note i'm putting a timer for 45 minutes and we will see who is the winner.
Here are the stats: 

Code time today :                                         44 min
2569 	Keypresses
**This stat is by a SB3 extension it's really bad**

Here is some more info! 
Code time	50 m	⬇  31% vs. 90-day avg (1 hr 13 m)
Active code time	44 m	⬆  50% vs. 90-day avg (29 m)
Lines added	775	⬆  29% vs. 90-day avg
Lines removed	37	⬇  53% vs. 90-day avg
Keystrokes	2411	🚀  270% vs. 90-day avg
**This stat is by a vscode extension, somehow it was very smart and did the job for us!!**

Sadly i didn't have a lot of stats, i am using 2 SB3 packages if you guys know any better one please tell me!!!

### 🐱‍💻 Visual studio Code

~Unlike SB3 I have much better stats!~

Code time	1 hr 31 m	⬆  25% vs. 90-day avg (1 hr 13 m)
Active code time	1 hr 24 m	🚀  185% vs. 90-day avg (29 m)
Lines added	1039	⬆  72% vs. 90-day avg
Lines removed	60	⬇  24% vs. 90-day avg
Keystrokes	4511	🚀  592% vs. 90-day avg

# 🙌 The winner ! 
🥳🎊🥳🎊
Visual Studio Code!!
Public speaking can transform your career
Tags: career, journey, advice
Published: 2021-04-20 05:47:50

---
title: Public speaking can transform your career
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eroyb9sfv4ef1ihnwwki.png)

I'm a big advocate for speaking at conferences, meetups, user groups, etc. You'll gain the respect of your local industry, you'll learn a topic thoroughly and you'll build skills for your future. I fully encourage you to give it a go.

Hopefully, in the coming years, in-person events return and we can have safe and enjoyable conferences and meetups again.  

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
Hosting a website / webserver on your PC / Laptop using Reverse SSH Tunnel on a custom domain name
Tags: tutorial, webdev, testing
Published: 2021-04-20 05:30:43

## Requirements
- A cloud server with SSH access to be used as jump server (yes you still need one)
- Local PC or Laptop

> NOTE:
> If you do not have a cloud server, you can use [localhost.run](https://localhost.run/)

Step 1: Make sure you are able to SSH into your server
```
ssh -i <private_key_file> <username>@<your_domain_or_ip> 
```

Step 2: Setup the tunnel
```
ssh -i <private_key_file> -N -T -R <remote port>:localhost:<local port> <username>@<your_domain_or_ip>
# e.g.:
ssh -i private.key -N -T -R 2523:localhost:8000 user@kdnanmaga.xyz
```
The above example will tunnel port number 8000 on my local machine to port number 2523 on the remote machine

Step 3: Verify the tunnel is working
```
# On local machine
$ python3 -m http.server 8000 # Or any other test server

# On cloud machine
$ curl http://localhost:2523
# You must be able to see the contents of your local folder printed here
``` 

Step 4: Setup a reverse proxy using NGINX on the cloud server
```
# Install NGINX if not present
$ sudo apt install nginx

# Add server block as shown below
$ sudo nano /etc/nginx/sites-available/local

# Symlink and activate
$ sudo ln -s /etc/nginx/sites-available/local /etc/nginx/sites-enabled/
$ sudo systemctl restart nginx
```
```
# File contents for /etc/nginx/sites-available/local
server{
  server_name <your domain name>;
  location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
        
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
        
    proxy_pass http://localhost:2523/;
    proxy_redirect off;
    proxy_read_timeout 240s;
  }

  listen 80;
}    
```

Step 5: Make sure DNS for the domain name you used above has an A record poiting to your server IP

Step 6: Install SSL certificate using Let's Encrypt so you can access via https://
```
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt install python-certbot-nginx
$ sudo certbot --nginx -d <your domain name>
```
With the commands in Step 2 and Step 3 still running, you should be able to access your local machine via the domain name now! 

> Find me on twitter: @[1upkd](https://twitter.com/1upkd)
Laravel Convert PDF to Image Tutorial
Tags: laravel, php, image, pdf
Published: 2021-04-20 05:30:00

Today,I will learn you how to convert pdf to image in laravel. we will Pdf To Image Convert using imagick package. you can  easyliy convert pdf to image any formate in laravel. if you want to convert pdf to image than you can use here example. we will show setp by step example laravel pdf to image convert.
more....


https://itwebtuts.blogspot.com/2021/04/laravel-convert-pdf-to-image-example.html
【Redis Week】 - 7 Days Best Practice With Alibaba Cloud ApsaraDB - Day01
Tags: database, redis, webdev
Published: 2021-04-20 05:22:26

Learn best practices of Redis in 7 Days

## Day 1 - How To Realize Second-kill For Your Online Business By Using Redis

[Watch Now (30 mins)>](https://www.youtube.com/watch?v=iXmxLioMgs4)

> This video is in Chinese, and it's free. The contents are suitable for all developers, DBAs and database enthusiasm. For English speakers, we recommended to click the playlist in the end of the video or you can click the link below to start learning directly.
> [Best Practice of Redis (EN)>](https://www.youtube.com/playlist?list=PL54EFTJJZrwgfve8XuYSKTnIfve08WmfN)



## Main Contents：
1. Redis I/O model and problems 
😭The I/O model of open-source community Redis and problems it introduced.
😊The I/O design of ApsaraDB for Redis and how it can resolve the problems of open-source Redis.

2. Resource competition and distributed lock
Realize CAS/CAD using string or LUA.

3. Details of a second-kill system
Learn how to realize it using a sample.
49 Days of Ruby: Day 24 - Self
Tags: ruby
Published: 2021-04-20 05:20:58

---
title: 49 Days of Ruby: Day 24 - Self
published: true
description: Join us on a 49 day learning journey through Ruby!
series: 49 Days of Ruby
tags: #ruby
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/9m73qaetuse3nm3y3it8.png
---

**Welcome to day 24 of the 49 Days of Ruby! 🎉**

Today, we are going to discuss the `self`. No, not yourself or myself, but rather the `self` in Ruby.

## What is the `self`?

The `self` in Ruby is a special keyword that enables you to access the current object.

What does that mean in practical terms? Let's take a look at an example:

```ruby
class Coffee
  def identify_me
    puts self
  end
end

> Coffee.new.identify_me

# => <Coffee:...>
```

In the case of the new `Coffee` class, the method defined therein is within the context of that class. Thus, the `self` is `Coffee`.

## Why is this useful?

There are a few reasons why understanding `self` is important. We'll focus on two.

The first is disambiguation. The `self` lets us know exactly where we are inside our code. No guessing required. We may be in an instance of a class, inside a class itself, or in `main`, which is the name of the most top-level object.

The more we understand about where we are, the more empowered we are to write effective code.

The second is getting to write class-level methods.

Did you notice in the example above of the `Coffee` class I needed to instantiate a `Coffee` instance before invoking `#indentify_me`?

Take a look at this:

```ruby
class Coffee
  def self.identify_me
    puts self
  end
end
```

By appending `self` to the `#identify_me` method we mark it as a class method, not an instance method. This means we can call `Coffee.identify_me` directly without needing to instantiate a new `Coffee` instance first.

That sums up our conversation on the `self` for today! There's a lot more to discover about it. Feel free to share your learnings with the community, too!

**Come back tomorrow for the next installment of 49 Days of Ruby! You can join the conversation on Twitter with the hashtag [#49daysofruby](https://twitter.com/hashtag/49daysofruby).**
Flutter - securing http requests
Tags: flutter, dart, security, csrf
Published: 2021-04-20 04:43:12

In today's digital era, web security is of utmost importance. One of the most common attacks on web applications is the Cross-Site Request Forgery (CSRF) attack. This attack occurs when an attacker tricks the user's browser into sending a request to a web application without their knowledge or consent. To prevent CSRF attacks, it is essential to secure HTTP requests.

Flutter is a popular mobile app development framework that allows developers to build high-performance, cross-platform apps. It provides a rich set of tools and features to secure HTTP requests, including CSRF protection.

To secure HTTP requests in Flutter, developers can use the csrf package, which provides middleware to prevent CSRF attacks. The package generates a unique token for each user session and adds it to the HTTP request header. The server then verifies the token before processing the request.

To use the csrf package in Flutter, follow these steps:

Add the csrf package to your project dependencies in the pubspec.yaml file:

```
dependencies:
  csrf: ^1.0.0
```


Import the package in your code:

```
import 'package:csrf/csrf.dart';
```


Add the middleware to your HTTP requests:

```
final csrfToken = await getCsrfToken(); // Get the CSRF token
final response = await http.post(
  url,
  headers: {'X-CSRF-Token': csrfToken}, // Add the token to the HTTP request header
   body: {...},
);
```


On the server side, verify the token before processing the request:

```
function verifyCsrfToken(req, res, next) {
  const csrfToken = req.headers['x-csrf-token'];
  if (!csrfToken || csrfToken !== req.session.csrfToken) {
    return res.sendStatus(403);
  }
  next();
}
```

In the example above, the server verifies the token by comparing it to the token stored in the user's session. The server sends a `403 Forbidden` response if the tokens do not match.

In conclusion, securing HTTP requests with CSRF protection is essential to prevent attacks on web applications. Flutter provides robust tools and features to secure HTTP requests, including the csrf package. By implementing these security measures, developers can ensure that their mobile apps are protected from CSRF attacks and provide a secure user experience.
Arquiteturas CISC e RISC
Tags: braziliandevs, architecture
Published: 2021-04-20 04:24:09

CISC(Complex Instruction Set Computer) ou em uma tradução mais literal, “Computador com um Conjunto Complexo de Instruções”: é um tipo de processador que suporta mais instrução no entanto ela pode ficar lenta com a execução delas.

RISC(Reduced Instruction Set Computer) qual a tradução é “Computador com um conjunto reduzido de instruções" é o processador que suporta menos instrução e com isso executa com mais rapidez o conjunto de instruções que são combinadas.

Vantagens da arquitetura CISC é que ela possui muita das instruções guardadas no próprio processador, facilitando para os desenvolvedores de linguagem da maquina.
Reduz o código executar por já possuirem muito código parecido com outros programas, em forma de uma única instrução.

Desvantagens da arquitetura CISC é a impossibilidade de alterar alguma instrução composta para melhorar a performance.
O código equivalente as instruções compostas do CISC pode ser escrito nos RISC, utilizando um conjunto de instrução simples, da maneira que mais se adequar.

As vantagens da arquitetura RISC é que os chips são mais simples e mais baratos por terem um menor numero de circuitos internos, e podem também trabalhar com clocks altos. Processadores RISC também é capaz de executar instruções muito mais rapidamente.

Desvantagens da arquitetura RISC é que eles são capazes de executar apenas algumas instruções simples. Requer um sistema de memória rápida para alimentar suas instruções. Sistemas baseados nesta arquitetura costumam apresentar grande quantidade de memória cache interna. 

CISC possui um conjunto maior de instruções que pode ser processados, enquanto no RISC o volume de instruções alem de mais limitados, é mais simples. A tendencia é que ambas continuem coexistindo no mercado.

Referencias
https://www.lb2.com.br/blog/processadores-cisc-x-risc-qual-a-diferenca-entre-essas-duas-arquiteturas
Looking into a manual upgrade of Ceph to Pacific
Published: 2021-04-20 04:22:03

---
title: Looking into a manual upgrade of Ceph to Pacific
published: true
description: Doing a manual upgrade of my Ceph cluster. In the same process, I get the Debian operating system upgraded that my Ceph cluster is running on. The new version of Ceph called Pacific requires some extra measures and when you've updated you can't go back.
tags:
cover_image: https://i.ytimg.com/vi/RrrS4UU5U6o/maxresdefault.jpg
---

{% youtube RrrS4UU5U6o %}

Doing a manual upgrade of my Ceph cluster. In the same process, I get the Debian operating system upgraded that my Ceph cluster is running on. The new version of Ceph called Pacific requires some extra measures and when you've updated you can't go back.
How To Draw On Scroll Using Javascript
Published: 2021-04-20 04:13:08

It's a clever trick to use dash lines, but the gap in the dash is too long to cover it all the way. Then you can move it in such a way that it covers the whole path again, making it look like it is drawing itself. Follow this post to learn more:

https://frontendor.com/blog/how-to-draw-on-scroll-using-javascript/
I’d like to be able to enter a domain on a Google sheet, and fill it with the website’s tagline.
Tags: python
Published: 2021-04-20 04:02:02

I’m using Clearbit’s API to grab the logo, but not sure if you can grab the description. 

I have scrapinghub (aka zyte.com), but not sure if that’s capable. 

Help is appreciated. Thanks!
Hablar de Code Review
Tags: codereview, podcast, devlife, codequality
Published: 2021-04-20 03:46:39

Hace un par de semanas, tuve la oportunidad de ser parte del podcast [Declarando Variables](https://declarandovariables.com/code-review/) y conversar sobre **"Code Review"**

En los años que llevo haciendo código, he visto muchos códigos buenos, malos y feos! Considero que aun tengo mucho que aprender, pero es un buen primer paso, reconocer la importancia de las buenas prácticas de programación y por supuesto de incorporar en nuestras rutinas de programación la "revisión del código".

Recientemente, también aprendí "mas formalmente" sobre lo que es la **deuda técnica**, y realmente es preocupante que puedas acumular tantas horas/dinero de deuda por no haber revisado el código que escribías a tiempo, y claro, la solución no es solo cambiar de trabajo periódicamente (meme)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyf0tiuwnjrrpy8zapcx.jpg)

Empieza a pensar y utilizar más técnicas de revisión de código, tu "yo" del futuro, seguro lo agradecerá. Además, la revisión de código no tiene que ser manual todo el tiempo, existen varias herramientas que permiten automatizar esta tarea. He estado probando recientemente [Code Inspector](https://code-inspector.com/code-reviews) que me permite revisar mi código, entender otras fallas en lo que debería ser standard, y a animarme a hacer mejor código.

Esos y muchos otros pensamientos están en el podcast de aproximadamente 30 minutos donde conversamos sobre el buen *Code Review* escúchalo :) 

{% spotify spotify:episode:0ZewFo7FENfTG6HlLC4Qzr %}
Web Designer For Beginners
Tags: webdev
Published: 2021-04-20 03:43:56

Before learning web design we need to have a good idea about the website. To learn web design you need to know the following. Below-
HTML, HTML5
CSS3
SASS / SCSS
JAVASCRIPT
JQUERY
BOOTSTRAP (CSS FRAMEWORK)
JQUERY PLUGIN USE

Next, we will discuss the above issues in detail.
CSS Tips: Box Model #1
Tags: webdev, beginners, tutorial
Published: 2021-04-20 03:40:02

Hello, long time no see. This is the first series of CSS Tips that I want to share with you guys.

For now, we'll talk about CSS BOX Model. Okay, you might say that

_Hmm, I think there are a lot articles talk about this, so what's the difference?_

Wait, imagine if you have a flexible box model to some element, I means that you don't have to put `!important` to property value of `box-sizing`.

yeah, it will break the standard of better css writing style. and you will lose your time.

Now, let's get started. 

First I will answer your question, what's the difference?

## Applying Box Model The Right Way

### Old Method
Simple, just need 3 lines of code. you can reduce it only 1 line actually. But it's not flexible as I said above.
```css
*,*::before,*::after {
  box-sizing: border-box;
}
```

### New Method
This is new method, and I prefer to put the `box-sizing: border-box` on root element (html tag) and use global values `inherit` if I want to use the same box sizing behavior as the root element.
```css
html {
  box-sizing: border-box;
}
*,*::before,*::after {
  box-sizing: inherit;
}
// for example i have card component with different box-sizing value
.card {
  box-sizing: content-box;
}
```

That's all, and Thank you. I will write another cool CSS Tips for you guys. I'm also learn about CSS actually.

Bye.
What do the Hedera Hashgraph council do? And who are all the current members in 2021?
Tags: hashgraph, hederahashgraph, blockchain, javascript
Published: 2021-04-20 03:18:49

The Hedera Council are there to provide a decentralized governance model. They are an elected group of highly diversified leading global organizations committed to sporting the growth & development of the Hedera network. Who would have a lot to lose if they acted out of line or in Cajun with other organizations for their benefit. They are re elected now and then.

>“The goal was to make sure no single party has no more or less influence over the network than any single party,” said Harmon. All the 39 members are “on par with one another,” he explained.

There are to be 39 total members, currently there are 21:

* Avery Dennison
* Boeing
* Dentons
* Deutsche Telekom
* DLA Piper
* EDF (Électricité de France)
* eftpos
* FIS (WorldPay)
* Google
* IBM
* LG
* Magalu
* Nomura Holdings
* Shinhan Bank
* Standard Bank Group
* Swirlds
* Tata Communications
* University College London (UCL)
* Wipro
* Zain Group
* Chain Link

Their responsibilities include:

* Hosting & maintaining initial nodes
* Establishing a governance framework for global markets
* Overseeing the software run by hundreds of thousands of nodes at scale

Basically, govern software changes and overall direction, while bringing stability and continued decentralization to the public network.

Source: YouTube [Hedera Governing Council Overview](https://www.youtube.com/watch?v=dtVTtiTrdp4)
Hello, world!
Tags: career, 5days5blogposts
Published: 2021-04-19 19:28:31

## Hello, world!

As this my first post, please let me introduce myself. I am a software developer with 8 year of full-time experience. Most of the time I use .NET with Azure cloud, and recently I'm learning React and React Native. I work at [cloudstate.eu](http://cloudstate.eu) and at the same time I'm CTO of longevity oriented startup (PL [link](https://www.jaknieumrzec.pl/)).  

Recently I run across an inspiring [conference about blogging](https://blogconf.arkademy.dev/) so I decided to finally start a blog, what I was postponing for a long time.

## But why?

My motivations are summarized by [Andrzej](https://dev.to/andrzejkrzywda) in [What if you start your own dev blog?](https://dev.to/andrzejkrzywda/what-if-you-start-your-own-dev-blog-3g74), and I'm sure that logging solutions of day-to-day development challenges may be beneficial for someone facing the same problem. It would be ridiculous to waste time twice for the same problem. In fact, every developer use online search to look for solutions and I do the same.

Also, I would like to have an online "portfolio" as a software developer. I don't want to be anonymous anymore to anyone who would like to verify my skills.

## Challenge accepted

Supposedly it can only take 10 minutes to create a post - it was repeated a lot at the conference. This time I stayed at work a while longer and almost succeeded with the clock, although it's a very simple post without a line of code. 

I'm taking the challenge with hope that it would be beneficial for the community.