teleren/devto huggingface dataset:
Synchronize and refresh Excel data to the database in real time
Tags: realtime, sync
Published: 2024-03-29 02:18:06



Earlier, we talked about [Scheduled Import of Excel into Database](https://dev.to/ryjfgjl/scheduled-import-of-excel-into-database-4pcd).  We only need to make a slight modification to achieve real-time refresh.
Add a new scheduled task, and keep the default setting for timing, which means running in real time

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckvjm5nrce5sb8vx8tjy.png)



You can see the task running in the scheduled task interface.  When the Excel data is updated, click Save and you can immediately see the updated data in the database.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3o433qpjyq1db6k41f5.png)


Because the refresh frequency is fast and needs to be continuously run, it consumes certain system resources. We can determine whether to execute the import by detecting whether the Excel file has been updated.  If the file has not been updated, the execution can be skipped.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxfzj6ys8gcr3o3t7209.png)



## Introduction and Download of ExcelToDatabase
- [ExcelToDatabase - Automation tool for batch importing Excel files into database](https://github.com/ryjfgjl/ExcelToDatabase/blob/master/README.md)
Merging data from multiple Excel files
Tags: merge, excel
Published: 2024-03-29 02:02:42


In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files or multiple sheets.  At this point, we need to merge them into one Excel file or into a database for analysis and processing.

## Example
As shown in the figure, we need to merge the data from four Excel files into one.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16aqpjpusrj2ylxy4ic3.png)



The headers of the files are the same, except for the data.  Even if the headers are different, you can choose to ignore or add different columns

## Using the ExcelToDatabase tool
Select the files to be merged, manually specify the target table, and enter the table name or select a table that already exists in the database

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yta4xovrhh2g1jwpw67k.png)



Wait a moment, and you can view the merged data in the database

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tr959d5cm0016un4l77.png)


Although the data is merged here, how can we distinguish which file each row of data comes from?
Select the Overwrite option in the import mode, switch to the database options interface, and fill in the Excel file name to be saved to the field

After re-importing the data, you can see that a new field has been added to the table

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/san0k8bfusuc1l8prkob.png)


Here, the full name of the Excel file is added to the end of each row of data.  What if you only want to save the date inside the file name?
Select the import mode as "reconstruction", save the Excel file name (which can be extracted using regular expressions) to the column, select the date (YYYYMMDD), and fill in the field name with the date.  If you want to extract other characters, you can write your own regular expression to extract them.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u5g5td49c5p9f885ic9c.png)


View the data again

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jz5j0a14szrfsgyv7dq.png)


## Introduction and Download of ExcelToDatabase

- 
[ExcelToDatabase - Automation tool for batch importing Excel files into database](https://github.com/ryjfgjl/ExcelToDatabase/blob/master/README.md)
Merging data from multiple Excel files
Published: 2024-03-29 02:02:35


In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files or multiple sheets.  At this point, we need to merge them into one Excel file or into a database for analysis and processing.

## Example
As shown in the figure, we need to merge the data from four Excel files into one.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16aqpjpusrj2ylxy4ic3.png)



The headers of the files are the same, except for the data.  Even if the headers are different, you can choose to ignore or add different columns

## Using the ExcelToDatabase tool
Select the files to be merged, manually specify the target table, and enter the table name or select a table that already exists in the database

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yta4xovrhh2g1jwpw67k.png)



Wait a moment, and you can view the merged data in the database

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tr959d5cm0016un4l77.png)


Although the data is merged here, how can we distinguish which file each row of data comes from?
Select the Overwrite option in the import mode, switch to the database options interface, and fill in the Excel file name to be saved to the field

After re-importing the data, you can see that a new field has been added to the table

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/san0k8bfusuc1l8prkob.png)


Here, the full name of the Excel file is added to the end of each row of data.  What if you only want to save the date inside the file name?
Select the import mode as "reconstruction", save the Excel file name (which can be extracted using regular expressions) to the column, select the date (YYYYMMDD), and fill in the field name with the date.  If you want to extract other characters, you can write your own regular expression to extract them.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u5g5td49c5p9f885ic9c.png)


View the data again

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jz5j0a14szrfsgyv7dq.png)


## Introduction and Download of ExcelToDatabase

- 
[ExcelToDatabase - Automation tool for batch importing Excel files into MySQL/Oracle/SQL Server/PostgreSQL/Access/Hive/SQLite/Dameng database](https://github.com/ryjfgjl/ExcelToDatabase/blob/master/README.md)
Home Improvement at 192.168.0.1
Tags: homelab
Published: 2024-03-29 01:57:03

Interestingly enough, working in  Azure with IaaS, and configuring resources to work together has driven me to explore my own at home 'infrastructure'.  


I live in a small apartment- so I don't need much in terms of complex IoT services, but I do have a small nas that I host files on and a few wireless devices. None of these resources are managed at all and honestly they don't need to be, but Vlans are like friends right? The more the merrier!

My current setup is pretty sparse:

![My current setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k59rvglg8l0payf889ky.png)


There are two Phases:

Phase 1: 

Implement a managed router and firewall.

The reasoning behind this is pretty obvious, I want my network organized and segregated so I can see what's going in and out of it. Some coworkers have recommended the [Unifi Dream Router](https://store.ui.com/us/en/collections/unifi-dream-router/products/udr) and after looking at it, I'm extremely impressed and excited to try it. The capabilities look amazing for the price and it looks like I'll be able to get a lot out of it as a beginner. 



Phase 2:

Implement Vlans for different groups of devices. 

I don't really know how I want this to look- I definitely want a Vlan for guests, and I'm considering creating one for IoT devices (and maybe getting a few more IoT Devices). I do know that I want to maximize the wired connections in my home and I don't want to just rely on Wifi for everything. 


Eventually I want to run a small application server on prem just to learn how to do it (and then obviously put it back in the cloud), but that's going to take time. Stay tuned for more updates! :)
Batch import of multiple excel files into the database
Tags: batch, import, excel
Published: 2024-03-29 01:55:22

##Batch import of multiple excel files into the database
**Abstract**: If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming to manually import one by one. Here we use [ExcelToDatabase](https://github.com/ryjfgjl/ExcelToDatabase/blob/master/README.md)Tools can be directly imported in batches, and it is just fine to hand over all to the tools for automatic import, completely freeing your hands!
##Example of use
As shown in the figure, I need to import all excel files under the folder into the database

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qasq4fbuc29j95o3admc.png)



There are two ways to select excel. One is to select the excel file to be imported, and the other is to select the directory. If the directory is selected, all excel files under the directory will be imported. When selecting a directory, if Excel of the subdirectory under the directory also needs to be imported, you can check the Traverse Subdirectory option in the Excel Options interface

Method 1: Select files

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rmo2rb9oc1u3bl4zlpqq.png)


As shown in the figure, six files are selected here, click Start, and six files will be imported into the database in one second

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d87ey35too76xgfuxhvc.png)



Note that the file contains three sheets, so you can see that the table name is followed by the sheet name


Mode 2: Select directory

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15zupzw5o6gpmt37k8d1.png)


Note: When you select a directory, you cannot see the specific Excel file, but only the directory name. We just need to go to the upper directory containing the Excel file and select the directory

We can see that there is a new folder under the directory. By default, Excel under the new folder will not be imported. If we want to import the Excel files under the new folder as well, we can check the Traverse Subdirectory option under the Excel option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7mzncke17srrx4e4l19o.png)



##ExcelToDatabase Introduction and Download

- 
[ExcelToDatabase - Automatic tool for batch importing Excel files to database](https://github.com/ryjfgjl/ExcelToDatabase/blob/master/README.md)
Golang Basic and few insights
Published: 2024-03-29 01:46:20

Started exploring Golang for while and loving its features! Here's a quick intro for anyone curious:

Statically Typed & Strongly Typed: Golang ensures type safety by requiring you to declare variable types (string, int, etc.) and preventing operations between incompatible types (like adding an integer and a string).

Compiled Language: For blazing-fast execution, Golang compiles your code into machine code before runtime, unlike interpreted languages like Python.

Built-in Concurrency: Want to handle multiple tasks simultaneously? Golang's built-in concurrency features make it a breeze!

Garbage Collection: No need to worry about manual memory management. Golang's garbage collector automatically frees up unused memory.

Packages & Modules: Golang keeps your code organized with packages (folders for related Go files) and modules (collections of packages).

Ready to join the Golang journey? Check out these resources:
- Alex Mux (youtube)
- https://go.dev/doc/
- Sandip Das
Running Servers Through VirtualBox
Tags: virtualmachine, beginners, serverless, virtualbox
Published: 2024-03-29 01:11:00

Ever wanted to run your Servers through VirtualBox OR Don't have the time or resources to run a full bare-metal hypervisors like ESXi, Microsoft Hyper-V or KVM ?

Yes, it's quite possible to do so. Just follow this guide along and you would be able to get a Server up and running in a few minutes.

## Requirements : 

1. Attach the Network to a Bridged Adapter in the Virtual Machine's Settings and Choose a Ethernet Card Network Adapter. Needless to say, the machine must be connected to your Router with a LAN cable and the Router Powered ON. If the Router has an enabled DHCP server inside, then the VM will be able to get an ip address from it quickly, after starting up.

Refer Screenshot Below : 


![Bridged Adapter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atedxsw7cxmeilm68a96.png)

2. Enable the "Remote Desktop Discovery" / "Turn on Network Discovery" from the Guest Windows Start Menu OR if your Guest Server is a LINUX Type, then install the avahi-daemon package, from your terminal package manager like apt, yum etc., for enabling network discovery. This will help your Server to get an easy host name resolution over the LAN, instead of using ip address each time. Your Server name will be something like ( with .local suffix automatically added to it )  : 

```
yourservername.local

OR

https://yourservername.local

```

That's all. If you are further interested, my open source project profile page has a number of such ready-to-use servers, here : https://sourceforge.net/u/nathan-sr/profile/
Rentzeasy
Tags: projectorrent, projectorscreenrent, speakerrental, pasysstemrental
Published: 2024-03-29 00:52:52


Established in 2010, [Rentzeasy ](https://g.page/r/CT8nOxQELZsnEBM/)is a trusted provider of audio-visual equipment rentals anywhere in Bangalore. We cater to a wide range of events, from corporate meetings and conferences to weddings and private & public parties. Our extensive inventory includes projectors rentals, televisions rentals etc to ensure your event's success and hassle free. Rent/hire branded LCD and DLP projector with all sizes tripod projector screen, rent/hire 4K and UHD smart televisions for a day or more. With over 14 years of experience we carry all the required accessories and we understand and fulfill your requirements, contact us now for more details on your projector rental, sound system rental & television rental needs.
Battery API
Tags: frontendchallenge, devchallenge, javascript, webdev
Published: 2024-03-29 00:39:00

_This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature._

## Explainer

Battery api is a powerful tool to get battery information with just a few lines of code. You can check current battery status like battery level & charging or not in your web app using Battery API. Also it provides event listeners.
[Know More](https://dev.to/dshaw0004/charge-up-javascript-with-battery-api-179k?preview=29629a47dc1d50498e7668aabb8845350cc51552acf1e258c1d2ce37705cf132c5770ef4f3a83b9c1702d2349379be3aa3154289d0731146b8ed6ef6)

## Additional Context

This explaination is only 246 characters. But I have included a link to my blog post discussing about battery api so that if any fellow developer is interested about this api then he get a detailed information about it. I hope this is not restricted and only the visible characters are counted. If not kindly ignore the link


Thank you for reading. For more blog post you can visit [my page](https://dshaw0004.netlify.app/blog)
Deletion of Data = Integrity Impact, Deletion of Data Availability Impact
Tags: cybersecurity, integrity, availability, sql
Published: 2024-03-29 00:35:36

Does Data Deletion impact Availability?

Picture this scenario:
You uncover a vulnerability that would allow an attacker to delete all files in the web server’s root directory.

How would you rate the Availability metric for this vulnerability on the CVSS calculator?

High? Low? None?

If you would have asked this question to me a few years ago, I would have answered: 

High, isn’t it obvious?
This vulnerability allows an attacker to delete all files from the web server’s root directory. This would make the website unusable for other users. Hence, “High Impact” on availability.

However, let's read the definition of the Availability metric in the CVSS specification:

While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email).
https://lnkd.in/exVsP3BP

In simple terms, it means “Availability” in CVSS calculator is the availability of the underlying system/service, not the availability of data.

Now, let’s look back at the above web server file deletion example and ask ourselves this question:

Does deleting all files in the website’s root directory impact the availability of the web “service”?

It doesn’t. The web service is still running. The only difference is that it is now not serving the intended files. Hence, this vulnerability does not affect Availability, but it impacts Integrity.

So, remember this:
Deletion of Data = Integrity Impact 
Deletion of Data ≠ Availability Impact

This a very common misconception. So common is this, that First[.]org has a section dedicated clarifying this in the CVSS user guide:
https://lnkd.in/eYYKdrsT

~~~

✍️ What are your thoughts?
♻️ Reshare if this hits.
Flipping an Image(leetcode)
Tags: dsa, java, leetcode, problemsolving
Published: 2024-03-29 00:35:27

##INTRODUCTION


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ilyjc2nvr8ftkgt1s4p.png)

Our problem says, we are given an 2D array. At first we have to reverse each row of the array, then we have to invert(if 0 then set 1, if the value is 1 then set 0)  all the elements of the array.
    


##Examples


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vieu5fkazi2aj7ejg45w.png)


##Steps
1. Take a for loop.
2. reverse each row using while loop.
3. After reversing now traverse the row again and invert the value.
4. In the end return the array.


##JavaCode

```
class Solution {
    public int[][] flipAndInvertImage(int[][] image) {
        for(int i = 0; i<image.length; i++){
            int temp = 0, j = 0, k= image[i].length-1;
            while(j < k){
                temp = image[i][j];
                image[i][j] = image[i][k];
                image[i][k] = temp;
                j++;
                k--;
            }

            for(int l = 0; l<image[i].length; l++){
                if(image[i][l] == 1){
                    image[i][l] = 0;
                }else{
                    image[i][l] = 1;
                }
            }
        }
        return image;
    }
}
```


##Output


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/un0miccx43fx92sshdlw.png)
Using LINQ in C# for Data Manipulation
Tags: csharp, webdev, beginners, programming
Published: 2024-03-29 00:29:27

## Introduction

LINQ (Language Integrated Query) is a powerful feature in C# that gives developers the ability to query data from various sources such as databases, collections, and XML files. It simplifies the process of data manipulation and manipulation, making it an indispensable tool for developers. In this article, we will discuss the advantages, disadvantages, and features of using LINQ in C# for data manipulation.

## Advantages of LINQ

1. **Efficient and easy to use:** LINQ provides a simple yet powerful syntax that enables developers to query data without having to write complex SQL statements. This makes data manipulation faster and easier, leading to improved productivity.

2. **Type safety:** LINQ is a strongly-typed language, which ensures that queries are checked for errors at compile time, leading to fewer runtime errors.

3. **Integration with IDE:** LINQ is seamlessly integrated with Visual Studio, allowing developers to write, test, and debug queries within the IDE itself, saving a significant amount of time and effort.

## Disadvantages of LINQ

1. **Steep learning curve:** LINQ has a steep learning curve, and developers need to have a strong understanding of database concepts, query syntax, and LINQ principles to use it effectively.

2. **Limited functionality:** LINQ has some limitations as it cannot perform all the operations that can be done in SQL. For complex or advanced data manipulation, developers may need to resort to traditional SQL queries.

## Features of LINQ

1. **LINQ to Objects:** Allows querying in-memory objects, arrays, and collections.

    ```csharp
    var numbers = new List<int> { 1, 2, 3, 4, 5 };
    var evenNumbers = from num in numbers
                      where num % 2 == 0
                      select num;
    ```

2. **LINQ to SQL:** Enables querying relational databases.

    ```csharp
    var db = new DataContext("ConnectionString");
    var query = from customer in db.GetTable<Customer>()
                where customer.City == "London"
                select customer;
    ```

3. **LINQ to XML:** Enables querying of XML data.

    ```csharp
    var xml = XElement.Load("Customers.xml");
    var customers = from customer in xml.Elements("Customer")
                    where (int)customer.Element("Age") > 25
                    select customer;
    ```

## Conclusion

Using LINQ in C# for data manipulation offers numerous advantages and simplifies the development process. However, it is important to consider the learning curve and limitations before implementing it in a project. Despite its drawbacks, LINQ remains a highly useful feature for developers working on data manipulation tasks.
DevOps with Guruu | Chapter 14 : Automated server shutdown and Slack messaging with AWS Lambda
Tags: webdev, devops, aws, automation
Published: 2024-03-29 00:26:45

{% embed https://youtu.be/lUK6RPKTG_M %}
DevOps with Guruu | Chapter 14 : Automated server shutdown and Slack messaging with AWS Lambda

> 0:00 Introduction
> 2:00 Create VPC
> 4:00 Create Security Group
> 5:35 Create EC2 instance
> 6:35 Incoming Web-hooks slack
> 12:10 Create Tag for Instance
> 13:20 Create Role for Lambda
> 15:30 Create Lambda Function
> 26:30 Check Result
> Clean up resources

Join me on this journey to mastering DevOps. Let's get hands-on and build a strong foundation together! Don't forget to like, share, and subscribe for more exciting content. Happy coding, future DevOps!"
Repositório Front-end Developers no GitHub
Tags: webdev, frontend, github, braziliandevs
Published: 2024-03-29 00:03:23

Criei o repositório no GitHub Front-end Developers com conteúdos de referência para pessoas desenvolvedoras front-end.

- Tutoriais
- Artigos
- Ferramentas
- Repositórios
- Cursos e Formações
- Roadmaps
- Livros

Acesse: [github.com/anamariasilva/front-end](https://github.com/anamariasilva/front-end) e ⭐ favorite o repositório.

{% embed https://github.com/anamariasilva/front-end %}