teleren/devto huggingface dataset:
Git Hooks for your Golang project
Tags: go, git, tutorial, programming
Published: 2022-03-07 05:42:32

I have been developing in JavaScript for a while now and one of my favourite tool was [husky](https://www.npmjs.com/package/husky) but when I started developing on golang I really missed the husky tool to manage my git hooks so I created a spin off to husky written in golang. 

**[Check it out
](https://github.com/automation-co/husky)**

Lets see how you can use it?

![Captain Hook](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5r3e74u5ntjz0i1y6kiu.gif)

### Installation

```bash
go install github.com/automation-co/husky@latest
```

### Getting Started

You can initialise husky by `$ husky init`

> Make sure you have git initialised

This will make the .husky folder with the hooks folder and a sample pre-commit hook

You can add hooks using

```bash
$ husky add <hook> "
  <your commands for that hook>
"
```

### Example

```bash
$ husky add pre-commit "
  go build -v ./... 
  go test -v ./...
"
```

If you have made any other changes in the hooks you can appply them by using `$ husky install`



## Get Familiar with Git Hooks

Learn more about git hooks from these useful resources:
- https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- https://www.atlassian.com/git/tutorials/git-hooks
- https://medium.com/@f3igao/get-started-with-git-hooks-5a489725c639



### Other Alternatives

If you feel husky does not fulfill your needs you can also check out:
- https://github.com/typicode/husky
- https://pre-commit.com/

---
Document.designMode, What is it?
Tags: javascript, webdev, productivity, writing
Published: 2022-03-07 05:42:08

**Probably you haven’t heard about this weird designMode, according to MDN it’s

> document.designMode controls whether the entire document is editable. Valid values are "on" and "off". According to the specification, this property is meant to default to "off". Firefox follows this standard. The earlier versions of Chrome and IE default to "inherit". Starting in Chrome 43, the default is "off" and "inherit" is no longer supported. In IE6-10, the value is capitalized.

simply it’s a feature allow you to edit your pages LIVE without changing the source code, it’s useful to test how your web site/app response to different text sizes or fonts, and it’s main use is when you done styling and you want to write a lot of content and you want to make sure long content doesn’t break your design.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyntce8ynqmnk7h09a7s.gif)
Credits : https://dev.to/arbaoui_mehdi/edit-your-website-live-in-google-chrome-by-using-document-designmode-5d9h

thanks to read.
Poppy Playtime Run 3D
Published: 2022-03-07 05:36:36

**Have you ever considered creating a new survival-running game with a horror protagonist?**

It's not your typical hide and seeks poppy game. Poppy Playtime Run 3D is a fun running reaction game in which you play as Huggy Wuggy and gather all the cash while avoiding various obstacles. 

Take on the role of the terrifying hairy creature Huggy Wuggy and complete each stage avoiding colliding with the obstacles and dangerous traps in this free online game.

**What is Huggy Wuggy, exactly?**

Huggy Wuggy is the main antagonist in MOB Games' survival horror game [poppy playtime](https://poppyplaytimeonline.com). Players in Poppy Playtime must solve riddles and stay alive for the night in an abandoned toy factory.

Normally, you'd have to flee from this terrifying creature, but in this entertaining obstacle-dodging game, you'll have to assist him in reaching the finish line. Be cautious of the axes, barrels, and robots along the road; if you strike too many of them, you may lose.

**Enjoy this Poppy Playtime Run 3D game: https://poppyplaytimeonline.com/poppy-playtime-run-3d**
Laravel 9 Drag and Drop Image Upload Using Dropzone
Tags: laravel
Published: 2022-03-07 05:30:11

Hello Dev,

This article is focused on laravel 9 drag and drop file upload dropzone js. if you want to see an example of laravel 9 dropzone example then you are in the right place. you can see laravel 9 dropzone multiple files. we will help you to give an example of laravel 9 dropzone image upload. You just need to some steps to do laravel 9 dropzone file upload.

Dropzone.js is a jquery plugin, dropzone.js we can select one by one image and also with preview. After choosing an image from browse we can see a preview of the image. dropzone.js also provide filter like we can make validation for max upload, a specific image or file extension, etc.

In this example i create two route, one for display view and another for store image. i also create two methods on DropzoneController and one blade file with dropzone js plugin js and css that way we can display the layout. You can implement in your laravel application by following few steps.

[Laravel 9 Drag and Drop Image Upload Using Dropzone](https://www.codecheef.org/article/laravel-9-drag-and-drop-image-upload-using-dropzone)
Networking
Tags: flatiron, beginners, programming, webdev
Published: 2022-03-07 05:10:27

This week my primary focus has been on networking and connecting with people who have the time to talk and share their experiences.
Fortunately, I work as a Barista in Seattle so each and every day I meet new engineers who all have been more than generous to help with the job search.

A few key pointers that I've gained through Career Services and personal connections and experiences:

1.) Build connections with everyone, send messages, mingle, and constantly outreach. The more you know means more opportunity and knowledge of the career field and what to expect.
2.) Keep up with old and new connections. Emails, LinkedIn or even in person to have a constant flow of ideas and work relationships.
3.) Don't give up, people see your hard work and applaud your efforts. Always keep going.

With those tips in mind, I now spend each day being confident  with my new career path, and again everyone I have met has been more than kind to share pointers and information for their respective companies. This field is daunting, but with the right network anything is possible.
{} - Object Literals in Javascript
Tags: javascript, webdev, beginners, productivity
Published: 2022-03-07 05:08:58

`{}` is object literal syntax.
let say 
`const circle = {};` 

Above circle is returning an object.

> Object in Javascript is essentially collection of key-value pair.

```
const circle = {
    radius: 1,
    location: {
       x: 1,
       y: 1
    },
    draw: function() {
     console.log('draw');
    }
 };
```

This circle object have 3 members: `radius`, `location` and `draw`

If a member is 

- function then it refers as `method()`, so `draw` is method.
- Other members are called as `properties`. 

Now, you can access the method or property using the `.` notation like:
`circle.draw()` and it will output, draw in console.

So, this is most commonly used method of defining an object.
You, can also define an object using factories and constructors.

How factories and constructors works and what is the other way of accessing the object will be explained in next blog.

Follow @msabir to keep yourself updated.

Cheers.
SQLZoo
Tags: sql
Published: 2022-03-07 04:58:23

I've been practicing SQL a lot recently. SQLZoo is a classic and great place to practice SQL. Today, I worked through the 
[Adventure Works](https://sqlzoo.net/wiki/AdventureWorks) set of problems...I liked this one a lot because of the cycling related theme. Spring is around the corner and this problem set made me excited to be thinking about my bicycle. Anyway, below is some of the problem set: 


```
-- How many items with ListPrice more than $1000 have been sold?

SELECT COUNT(*) AS count
FROM SalesOrderDetail
JOIN Product
ON SalesOrderDetail.ProductID = Product.ProductID
WHERE Product.ListPrice > 1000;

-- Give the CompanyName of those customers with orders over $100000. Include the subtotal plus tax plus freight.

SELECT Customer.CompanyName
FROM SalesOrderHeader
JOIN Customer
ON SalesOrderHeader.CustomerID = Customer.CustomerID
WHERE SalesOrderHeader.SubTotal + SalesOrderHeader.TaxAmt + SalesOrderHeader.Freight > 100000;
 

 -- Find the number of left racing socks ('Racing Socks, L') ordered by CompanyName 'Riding Cycles'

SELECT SUM(SalesOrderDetail.OrderQty) 
FROM SalesOrderDetail
JOIN Product
ON SalesOrderDetail.ProductID = Product.ProductID
JOIN SalesOrderHeader
ON SalesOrderDetail.SalesOrderID = SalesOrderHeader.SalesOrderID
JOIN Customer
ON SalesOrderHeader.CustomerID = Customer.CustomerID
WHERE Product.Name = 'Racing Socks, L' AND Customer.CompanyName = 'Riding Cycles';```
What does the Array method `reduce` do?
Tags: javascript
Published: 2022-03-07 04:26:50

First of all, the name "reduce" doesn't actually reduce anything. It's a confusional/tricky naming convention you often find in programming. Although for better understanding you can assume - it takes lots of values and reduce them into a single value and return.

reduce is a higher order function which takes two arguments:
1. Callback function and
2. Initial Value.

And the callback function takes four arguments:
1. previousValue,
2. currentValue,
3. currentIndex,
4. array

More often you will find the callback function takes only two arguments according to the problem we need to solve, which is Okay.

```
[1, 2, 3].reduce((previousValue, currentValue, currentIndex, array) => {
  // here the return statement goes...
}, initialValue);
```
Now let's look at a practical example. Write a program to return the sum of all the elements in an array. Please think in a as-usual way/procedure first, then we will solve the same thing with reduce. Here is the as-usual way/procedure of writing this program:

```
function sum(arr) {
  let sum = 0;
  for(let i = 0; i < array.length; i++) {
    sum = sum + arr[i];
  }
  return sum;
}
```

So, if we call sum with an array it will return the sum of it's all elements. Right?

Yeah, And we can do the same thing with reduce also. Here is the code:
```
[1, 2, 3, 4].reduce(function(previousValue, currentValue) {
  let result = previousValue + currentValue;
  return result;
}, 0);
```

It does the same thing. The reducer walks through the array element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) - until there are no more elements to add.(reference: [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce))

Here the `previousValue` is the as-usual `sum` and `currentValue` is the as-usual `arr[i]`.

In the first iteration, there is no `previousValue (return value of the previous calculation)` - right? In this case, `initialValue` will be used as `previousValue`. If there is no `initialValue`, the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).

Instead of using extra variable result, you can write the program like this:
```
[1, 2, 3, 4].reduce(function(previousValue, currentValue) {
  previousValue += currentValue;
  return previousValue;
}, 0);
```

And more shortly:
```
[1, 2, 3, 4].reduce((previousValue, currentValue) => previousValue += currentValue, 0);
```

Hope you understand. Now it's your task to write a program which will find the minimum number from a non-empty array using reduce (consider all the elements in the array are positive).

Here it is:
```
const arr = [4, 2, 3, 1];
let result = arr.reduce((minValue, currentValue) => {
  if (currentValue < minValue) {
    minValue = currentValue;
  }
  return minValue;
}); // no initial value 😎
console.log(result);
```

❤️ Happy Coding ❤️
Here is the 8 Best Cleaning Company Website Templates to build your Cleaning Business Online 
Tags: website, templates
Published: 2022-03-07 04:01:39

If you are looking for the best Cleaning Company Website Templates, then follow along and go through this exclusive article on the best cleaning service templates.

You must choose the right cleaning service website template if you want to create a professional-looking cleaning service website to promote your cleaning services online. There are many business website templates to choose from, but here we have compiled a list of 8 of the most remarkable business website templates well suited for cleaning services websites.

These business website templates have been chosen because they allow users to create professional-looking websites with ease. We will discuss what each business website template offers and why it is one of the best options for businesses in this industry!

## Purified – Cleaning Service Agency HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/02s0qz9weig8v98ldrab.png)
 

## Brook – Creative Agency & Business HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ibfd0uf4fvg07ybnumr.png)
 

## Arden – Multipurpose HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zfce846yz0j0cspek2ru.png)
 

## Uptimo – Multipurpose Responsive HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/trqsfxohpt7npkc50ji7.png)
 

## Klenar – Cleaning Services HTML5 Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ok6iaxi2aicnf94hgqdv.png)
 

## Bixol – Cleaning Services HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvtdrk96tgeuj6bvd3dd.png)
 

## Eco Clean – Cleaning HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7rz6epiputfv3l5h62x.png)
 

## Qondri – Dry Cleaning & Laundry HTML Template
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bx6v0vh779xutow89yki.png)
 

## Watch the video about 5 Best Cleaning Company Website Templates | Cleaning Services HTML 

[Watch the video](https://www.youtube.com/watch?v=_xjYy0BNqzE)


[All Items link here ](https://hasthemes.com/blog/cleaning-company-website-templates/)

Website templates for cleaning companies are a fast and cheap way to get started. Modifying the design, layout, or features of your site can save you time in creating new websites from scratch as well as provide an easy-to-use foundation on which future modifications will be built; ideal if you want this type of flexibility! We hope this article will help you get a cleaning website design idea for designing your own cleaning service website.
Image Resolution Optimization (DPI)
Published: 2022-03-07 03:53:08

---
canonical_url: https://ironsoftware.com/csharp/ocr/examples/ocr-image-dpi-for-tesseract/
---

The OcrInput class will automatically resolve low resolution images for Iron Tesseract.

Although Tesseract generally requires a 300DPI input - IronTesseract has been tuned to work with 99+% accuracy on 225 DPI scans. This can double OCR speed.

Too high a DPI is slow. Too low a DPI causes inaccuracies. If in doubt, do nothing and Iron Tesseract will preconfigure everything for you.

**C#:**
```cs
using IronOcr;
 
var Ocr = new IronTesseract();
using (var Input = new OcrInput(@"images\image.png"))
{
    Input.MinimumDPI = 250;
    Input.TargetDPI = 300;
 
    var Result = Ocr.Read(Input);
    Console.WriteLine(Result.Text);
}
```

**VB:**
```
Imports IronOcr
 
Private Ocr = New IronTesseract()
Using Input = New OcrInput("images\image.png")
	Input.MinimumDPI = 250
	Input.TargetDPI = 300
 
	Dim Result = Ocr.Read(Input)
	Console.WriteLine(Result.Text)
End Using
```
Using Custom Tesseract Language Files (Code Example)
Published: 2022-03-07 03:51:15

---
canonical_url: https://ironsoftware.com/csharp/ocr/examples/ocr-tesseract-custom-languages/
---

Iron Tesseract OCR fully supports custom or downloaded languages and fonts following the Tesseract **.traineddata** file format standard.

**C#:**
```cs
using IronOcr;
 
var Ocr = new IronTesseract();
 
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
 
using (var Input = new OcrInput(@"images\image.png"))
{
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
```

**VB:**
```
Imports IronOcr
 
Private Ocr = New IronTesseract()
 
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
 
Using Input = New OcrInput("images\image.png")
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
```
Inspired by art bots on Twitter, I created RightClickSaveBot for NFTs
Tags: twitter
Published: 2022-03-07 03:43:18

https://twitter.com/RClickSaveBot

Inspired by the amazing bots (e.g. [this](https://twitter.com/met_armsarmor)) by Andrei Taraschuk, I wanted to create my own. 

Instead of scraping museum archives, this tweets out the most popular NFT images.
Load Excel From SQL Database (Code Example)
Published: 2022-03-07 03:41:25

---
canonical_url: https://ironsoftware.com/csharp/excel/examples/load-excel-from-sql-database
---

IronXL allows us create an Excel workbook from the SQL DataSet using `System.Data`.

**C#:**
```cs
using System.Data;
using System.Data.SqlClient;
using IronXL;
 
//Your sql query
string sql = "SELECT * FROM Users";
 
//Your connection string
string connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=usersdb;Integrated Security=True";
 
using (SqlConnection connection = new SqlConnection(connectionString))
{
    //Open connections to the database
    connection.Open();
    SqlDataAdapter adapter = new SqlDataAdapter(sql, connection);
    DataSet ds = new DataSet();
    // Fill DataSet with data
    adapter.Fill(ds);
 
 
    //Create an Excel workbook from the SQL DataSet in one line
    WorkBook workbook = WorkBook.Load(ds);
}
```

**VB:**
```
Imports System.Data
Imports System.Data.SqlClient
Imports IronXL
 
'Your sql query
Private sql As String = "SELECT * FROM Users"
 
'Your connection string
Private connectionString As String = "Data Source=.\SQLEXPRESS;Initial Catalog=usersdb;Integrated Security=True"
 
Using connection As New SqlConnection(connectionString)
	'Open connections to the database
	connection.Open()
	Dim adapter As New SqlDataAdapter(sql, connection)
	Dim ds As New DataSet()
	' Fill DataSet with data
	adapter.Fill(ds)
 
 
	'Create an Excel workbook from the SQL DataSet in one line
	Dim workbook As WorkBook = WorkBook.Load(ds)
End Using
```
Day 12/100, 100 Days of Code
Tags: javascript, beginners, codenewbie, devjournal
Published: 2022-03-07 03:31:58

Today I learned more about Objects. I learned about looping through objects using the **for...in** statement. I also started working on advanced objects introduction. 

I'm actually almost done with the javascript introductory course. After that I'll be starting some new courses. 

I'm still looking for some small projects to start on because I know how important it is to actually build things vs just study code all day.
Difference between web 2.0 and web 3.0
Published: 2022-03-07 01:46:43

DIFFERENCES BETWEEN WEB 2.0 AND WEB 3.0

**INTRODUCTION**
Before discussing the differences between web 2.0 and web 3.0, let’s look at the origin of the world wide web. The WWW started as web 1.0 and was dominant during the year 1991 to the year 2004, in web 1.0 the users are just consumers while the developers build only static pages. Then came web 2.0 which refers to the present state of the internet (2004-present), Web 2.0 refers to second-generation internet content alongside interoperability and usability for end-users. Web 2.0 is based on a server-client structure, meaning centralized private corporations control and own the data. The result is that these corporations have enormous monopoly power and create barriers to entry for potential competitors. All Web 2.0 applications are controlled by centralized corporations, including the entire banking and financial system. examples of web 2.0 include Wikipedia, Facebook, Twitter, and various blogs. Web 3.0 is the third generation of internet services for websites and applications that will focus on using a machine-based understanding of data to provide a data-driven and semantic web, web 3.0 is aimed at decentralization of the web services in whereby no permission is needed from a central authority to post anything on the web.

**MAJOR DIFFERENCES BETWEEN WEB 2.0 AND WEB 3.0**
The most significant difference between web 2.0 and web 3.0 is their mode of operation, where web 2.0 is centralized and users are the creators of contents and web 3.0 is decentralized, users are owners of the owners of their content. Web 2.0 focus is on community development and the network owns the data unlike web 3.0 that focus on the empowerment of individual users and also entities that have ownership of their data. In terms of technology, web 2.0 is built using AJAX, html5, css3, and JavaScript while web 3.0 is based on Artificial intelligence, Machine learning, and decentralized protocol.

**CONCLUSION**
The Web3 has set out to break up the market power of these centralized players by replacing the centralized server-client infrastructure with distributed ledgers,
the most common type being the blockchain
So instead of all data being stored on a centralized server, it will be scattered across a decentralized computer network. Centralized entities, which previously acted as intermediaries, will thus become obsolete.

**BENEFITS OF WEB 3.0 OVER WEB 2.0**

1. Anti-monopoly and Pro-privacy.
2. Secure Network.
3. Data ownership.
4. Interoperability.
5. No interruption in service.

This article is written as part of a task in a training (Blockgames https://blockgames.gg/) organized by zuri team(https://zuri.team/) in collaboration with Nestcoin (https://nestcoin.com/).

Thanks for reading
.map() and console.log: A Love Story
Tags: javascript, beginners, tutorial, webdev
Published: 2022-03-07 03:29:16

Have you ever found yourself in a situation where you have reluctantly rewritten that nice one-line map function just to log your outputs?

```
const data = ['1', '2', '3'];

const mappedData = data.map((el) => {
	console.log(el);

	return Number(el);
});
```

Well, now you don't have to. You see, console.log returns undefined which is perfect for a conditional statement.

```
const data = ['1', '2', '3'];

const mappedData = data.map((el) => console.log(el) || Number(el));
```


Thank you for participating in my Tom Blog.