teleren/devto huggingface dataset:
Git and GitHub
Tags: github
Published: 2022-11-27 06:51:01

##Introduction to Git and GitHub
Working on a project alone can be sometimes tiring and slow, hence the need for more than one individual for a more fast and productive project. Git and GitHub as a platform encourages group project, source control and lot more, it gives the individual the leverage of contributing to a Project at a convenient time and space

## Get started with git and github

**Download Git for Windows**

1. Browse to the official Git website: https://git-scm.com/downloads

2. Click the download link for Windows and allow the download to complete.

**Basic Command in Git and GitHub**

Version:
displays the version of github that is on you system

```
git --version
```
Create an account: 
This command is for creating an identity on github which will be required when trying to pull or push to a github repository

```
git config --global user.name "Jane William"
$ git config --global user.email "williamjane@email"
```
Settings your default branch:

By default Git will create a branch called master when you create a new repository with git init. From Git version 2.28 onwards, you can set a different name for the initial branch.

To set main as the default branch name do:

```
git config --global init.defaultBranch main
```
Getting Help
Getting help in git is quite easy, there is a compile list of command to get you started on git and github, the help command are straight forward and can be done in three ways

```
git help <verb>
git <verb> --help
man git-<verb>
```
Cloning an existing project:

The git clone command get the full copy of a particular git repository into your local machine, it is meant to easy development and can be done using 

git clone <URL>
```
https://github.com/ecommerce/website
```

**Conclusion**
Git and github has alot of command which cannot be covered on this article, here we make sure you can get started with using git and github , on the next article we will be take on more command on git and there usage
COBS decoder working
Tags: opensource, fpga, vhdl
Published: 2022-11-27 06:03:47

The COBS decoder for the Haifuraiya open source amateur satellite project is working. One of the volunteers wrote a Python script that does an AXI stream torture test, so that's what is happening right now. After that, the documentation will be updated and the decoder integrated into the reference design on the zc706.
【Java】Notes when you download JDBC driver from MySQL website
Tags: java
Published: 2022-11-27 06:01:04

*OS...Windows

If you are coding with Java for backend, and want to use database, you need to download "JDBC" driver from MySQL website.

##What is JDBC?##
JDBC is an API(Application Programming Interface)that allows Java program access to database (such as Oracle, MySQL ,etc.) 

##What is JDBC driver?##
JDBC driver is a collection of classes that includes interfaces (that are defined in JDBC API) and their methods get called when 
Java program accesses to database. It makes the program to connect to the database, execute the queries and process the result data.

You need to use the JDBC driver that corresponds to your database. (Each vendor supplies its JDBC driver.)

##Download MySQL JDBC driver##
1.Go to https://www.mysql.com/products/connector/.
2.Find "JDBC Driver for MySQL (Connector/J)" and click "Download."
3.Select "**Platform Independent**." (<---IMPORTANT!!)
4.Click "Download" of whatever file you need.
5.Login/sign up in MySQL (if you have not logged in yet).
6.Starts downloading.

*If you select "Windows" on step 3, you will find "mysql-installer-web-community". Looks like you can install JDBC driver ("Connector/J") through it. (I have not tried!!)
446. Leetcode Solution in cpp
Tags: cpp
Published: 2022-11-27 04:59:07

```cpp
class Solution {
 public:
  int numberOfArithmeticSlices(vector<int>& nums) {
    const int n = nums.size();
    int ans = 0;
    // dp[i][j] := # of subseqs end w/ nums[j] nums[i]
    vector<vector<int>> dp(n, vector<int>(n));
    unordered_map<long, vector<int>> numToIndices;

    for (int i = 0; i < n; ++i)
      numToIndices[nums[i]].push_back(i);

    for (int i = 0; i < n; ++i)
      for (int j = 0; j < i; ++j) {
        const long target = nums[j] * 2L - nums[i];
        if (numToIndices.count(target))
          for (const int k : numToIndices[target])
            if (k < j)
              dp[i][j] += (dp[j][k] + 1);
        ans += dp[i][j];
      }

    return ans;
  }
};
```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/arithmetic-slices-ii-subsequence/
Apps and Services with .NET 7: Build practical projects with Blazor, .NET MAUI, gRPC, GraphQL, and other enterprise technologies
Tags: tutorial, csharp, programming, beginners
Published: 2022-11-27 04:40:34

## Apps and Services with .NET 7: Build practical projects with Blazor, .NET MAUI, gRPC, GraphQL, and other enterprise technologies

Bestselling author Mark Price is back to guide you through the coolest and most common technologies a .NET developer should know: Blazor, .NET MAUI, gRPC, GraphQL, SQL Server, Cosmos DB, OData, SignalR, Azure Functions, and more!

Key Features

1. Build services using a variety of technologies including Web API, OData, gRPC, GraphQL, SignalR, and Azure Functions

2. Learn how to use specialized libraries to improve all aspects of your applications, including performance and localization

3. Leverage .NET MAUI to develop cross-platform desktop and mobile apps with ease

Apps and Services with .NET 7 is for .NET 6 and .NET 7 developers who want to kick their C# and .NET understanding up a gear by learning the practical skills and knowledge they need to build real-world applications and services. It covers specialized libraries that will help you monitor and improve performance, secure your data and applications, and internationalize your code and apps.

With chapters that put a variety of technologies into practice, including Web API, OData, gRPC, GraphQL, SignalR, and Azure Functions, this book will give you a broader scope of knowledge than other books that often focus on only a handful of .NET technologies. It covers the latest developments, libraries, and technologies that will help keep you up to date.

You’ll also leverage .NET MAUI to develop mobile apps for iOS and Android as well as desktop apps for Windows and macOS.

What you will learn

- Learn how to build more efficient, secure, and scalable apps and services

- Leverage specialized .NET libraries to improve your applications
Implement popular third-party libraries like Serilog and FluentValidation

- Build cross-platform apps with .NET MAUI and integrate with native mobile features

- Get familiar with a variety of technologies for implementing services like gRPC and GraphQL

- Explore Blazor WebAssembly and use open-source Blazor component libraries

- Store and manage data locally and in the cloud with SQL Server and Cosmos DB

Website: https://www.lenbookz.com/

Download Here: https://www.lenbookz.com/item/830/apps-and-services-with-net-7-build-practical-projects-with-blazor-net-maui-grpc-graphql-and-other-enterprise-technologies
How To Switch From Manual to Automation Testing || 5 Steps & Lesson Learned.
Tags: webdev, beginners, tutorial, testing
Published: 2022-11-27 04:39:21

In this video, I have given 5 step process to switch from Manual Testing to Automation testing.

These 5 steps are 

1. Changing your Mind Set.
2. Getting Out of Your Comfort Zone
3. Learn From Other QA / Network.
4. Grab Opportunity
5. Be Patient

Mindmap used  : https://mm.tt/1345827488?t=J1h5UfGd0k

Join Facebook Group :  http://bit.ly/learntesting2019
Website:   https://scrolltest.com
Website:   https://thetestingacademy.com
Twitter: https://twitter.com/itstechmode

#automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest

{% embed https://youtu.be/ZYynls4qmOI %}

https://youtu.be/ZYynls4qmOI

🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅Selenium Training and Certification -
https://scrolltest.com/go/edureka

✅Learn Jenkins for QA -
https://bit.ly/learnjenkins-p1

✅Programming Java -
https://bit.ly/learnjava2020-p1

✅Test Automation - 
https://bit.ly/learnautomation2020

✅API Testing - 
https://www.learnapitesting.com

✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com
Unit Testing ILogger with NUnit and Moq
Tags: dotnet, csharp, nunit, moq
Published: 2022-11-27 04:19:33

Environment: .NET 6.0

Create a console application, then create `Foo.cs` and fill in it with the followin code:

```csharp
using Microsoft.Extensions.Logging;

namespace MyLog;

public class Foo
{
    private ILogger<Foo> _logger;
    public Foo(ILogger<Foo> logger)
    {
        _logger = logger;
    }

    public void PrintMessage()
    {
        _logger.LogInformation("Hello World!");
    }
}
```

Create an NUnit project and create a `UnitTest.cs` with the following content:

```csharp
using Moq;
using Microsoft.Extensions.Logging;
using NUnit.Framework;
using MyLog;

namespace MyTest;

public class Tests
{
    [Test]
    public void Test1()
    {
        List<string> logMessages = new List<string>();
        var mockLogger = new Mock<ILogger<Foo>>();
        mockLogger.Setup(m => m.Log(
            It.IsAny<LogLevel>(),
            It.IsAny<EventId>(),
            It.IsAny<It.IsAnyType>(),
            It.IsAny<Exception>(),
            It.IsAny<Func<It.IsAnyType, Exception, string>>()!
        )).Callback(new InvocationAction(invocation => {
            var logLevel = (LogLevel)invocation.Arguments[0];
            var eventId = (EventId)invocation.Arguments[1];
            var state = invocation.Arguments[2];
            var exception = (Exception)invocation.Arguments[3];
            var formatter = invocation.Arguments[4];
                    
            var invokeMethod = formatter.GetType().GetMethod("Invoke");
            var logMessage = invokeMethod!.Invoke(formatter, new[] { state, exception });
            logMessages.Add((string)logMessage!);
        }));

        Foo foo = new Foo(mockLogger.Object);
        foo.PrintMessage();
        Assert.That("Hello World!", Is.EqualTo(logMessages[0]));
    }
}
```

Finally, execute the test and it will pass successfully. All logs will be stored in `logMessages`, you can manipulate it for unit testing.
Using Uart on Stm32f407g
Tags: c, stm32
Published: 2022-11-27 04:09:15

Environment: windows 10, STM32CubeIDE 1.8.0

In this tutorial we will use uart4 through `PA0` and `PA1` pins.

## Project Initialization

First, add a new stm32f407g project in CubeIDE, and name the project "uart_test".

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

In `RCC`, set `High Speed Clock` and `Low Speed Cock`.

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

In `SYS`, set `Debug` and `Timebase Source`.

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

Set `PA0` to UART4_TX and `PA1` to UART4_RX.

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

Set `UART4`->`Mode` to Asynchronous and `Baud Rate` to 9600 Bits/s.

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

Now press `Ctrl+S` to automatically generate the code.

## Test Output String

The wiring of the board is as follows:

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

Rewrite the main function of the project's `main.c` as follows:

```c
int main(void)
{
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_UART4_Init();
  /* USER CODE BEGIN 2 */
  char text[13] = "Hello World\r\n";
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
    HAL_UART_Transmit(&huart4, text, 13, HAL_MAX_DELAY);
    HAL_Delay(1000);
  }
  /* USER CODE END 3 */
}
```

Next, execute the program, and it is expected to output a line of "Hello World" every second:

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

## Print User-Input Strings

Rewrite the while loop as the following, and the screen will output strings entered by users.

```c
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
    uint8_t receive;
    while (HAL_UART_Receive(&huart4, &receive, 1, 1000) != HAL_OK);
    HAL_UART_Transmit(&huart4, &receive, 1, HAL_MAX_DELAY);
    if ((char)receive == '\r')
        HAL_UART_Transmit(&huart4, "\n", 1, HAL_MAX_DELAY);
  }
  /* USER CODE END 3 */
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mas4j7bgro23jog48f1c.png)
Release 0.2 - PR #4
Tags: opensource, github, podcast
Published: 2022-11-27 03:59:57

## Issue I worked on

For my last PR, I contributed to the [se-unlocked](https://github.com/mgreiler/se-unlocked) repo which manages the transcripts for the [Software Engineering Unlocked podcast](https://www.se-unlocked.com/).  

I worked on issue [#132](https://github.com/mgreiler/se-unlocked/issues/132), which involved making improvements to the transcript for Episode 53. Each of the transcripts is automatically generated, thus they contain many minor errors throughout which have to be adjusted manually by contributors.  
I browsed the document for the Episode 53 transcript and made various changes, including grammar improvements and adjusting the script so it matched what was actually spoken in the podcast episode.

## Preparation for the fix

To prepare for the fix, I first had to review the relevant podcast episode on their website, [viewable here](https://www.software-engineering-unlocked.com/tests-find-bugs/).  
Additionally, I had to ensure that any changes I made were consistent with the formatting rules outlined in the project's [instructions on editing transcripts](https://github.com/mgreiler/se-unlocked/blob/master/Transcription_Guidelines.md).


## Code Explanation

This fix did not involve any changes to the code.

The associated file can be found here:
- [Ep53 transcript before my changes](https://github.com/mgreiler/se-unlocked/blob/a8f387f24a66331d78eedd0863c67e24d48c2bd7/Transcripts/EP_53_Mauricio_Aniche.md)
- [Ep53 transcript after my changes](https://github.com/a-parris21/se-unlocked/blob/a6a1b33703a8eec246ce24ea7b64362e8371d617/Transcripts/EP_53_Mauricio_Aniche.md)

## Research

No programming-related research was required to complete the fix for this issue.  
Although, I did have to familiarize myself with the formatting rules outlined in the project's documentation. Additionally, 

## Interactions with project maintainers

I had no noteworthy interactions with the project maintainers.

## Difficulties

I did not find this issue to be very difficult to work on. I had to familiarize myself with the project's formatting rules for transcripts, I found this mildly tedious though not difficult.  

## Link to Pull Request

[PR #179](https://github.com/mgreiler/se-unlocked/pull/179)
Dynamically Create an Array of Arrays
Tags: javascript, array
Published: 2022-11-27 03:51:57

## The Reason 

In a recent algorithm challenge, I wanted to create an iterable collection of ten "buckets" for grouping data. In practice, this meant creating an array of arrays like:

```
[[], [], [], [], [], [], [], [], [], []]
```

## What Did Not Work
Rather than hard code each set of arrays, I wanted to create this dynamically. My first attempt (from memory and a cursory skim of the MDN docs), was to use the Array constructor with the `.fill` method chained on:

```
const arr = new Array(10).fill([]);
console.log(arr);
// => [[], [], [], [], [], [], [], [], [], []];
```
At first glance, this seemed to work. Console logging my new `arr` revealed an array containing 10 empty arrays, so I continued solving the algorithm. 

As soon as I began populating the inner arrays (the buckets), I noticed that there was an issue - adding an element to one "bucket", for example at index 5, updated EVERY bucket to match, rather than only the intended bucket:

```
arr[5].push("hello");
console.log(arr);
// => [["hello"], ["hello"], ["hello"], ["hello"], ["hello"], ["hello"], ["hello"], ["hello"], ["hello"], ["hello"]];
```

Returning to the MDN docs for [`Array.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill), the issue became clear:

![Screenshot of MDN docs for fill method](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rp68bk3o292o4xuk2p6h.png)

As arrays are a type of object, each of my array buckets were actually referencing the same object in memory. So rather than creating 10 distinct arrays, my array was merely displaying 10 copies of the same array.

## `Array.from` to the Rescue
To dynamically create an array of arrays (or other objects), you can instead use the `.from` method:

```
const newArr = Array.from({ length: 10 }, () => []);
console.log(newArr);
// => [[], [], [], [], [], [], [], [], [], []];
```

Per MDN, [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) accepts an iterable or "array-like" object as it's first argument, and an optional callback function ("mapFn") for a second argument.

Here, `{length: 10}` is an "array-like" object which will provide the length of the array being created.

The second argument `() => []` is the "mapFn", which is called for each element and whose return value is used to populate the array.

Now, pushing an element to the array at index 5, updates only that array, as expected:

```
newArr[5].push("hello");
console.log(newArr);
// => [[], [], [], [], [], ["hello"], [], [], [], []];
```
HTML5 and CSS3 Masterclass: In-depth Web Design Training with Geolocation, and More
Tags: tutorial, webdev, javascript, css
Published: 2022-11-27 03:10:00



## HTML5 and CSS3 Masterclass: In-depth Web Design Training with Geolocation, the HTML5 Canvas, 2D and 3D CSS Transformations, Flexbox, CSS Grid, and More

Everything You Need to Know to be a Master Web Developer

Key Features

- A step-by-step guide for web developers to plan, sketch, design, create, test, and launch their web applications.

- Extensive illustrations, examples, and best practices to help you become a proficient and modern HTML and CSS developer.

- Includes simple language, short and succinct chapters, and many models to teach you every element of HTML5 and CSS3.

HTML5 and CSS3 Masterclass is an all-inclusive book that teaches and transforms you into a self-reliant web developer capable of creating your websites as soon as you finish reading the book. Every topic in this book is presented sequentially with ready-made, working examples and numerous figures explaining what a professional must understand.

This book is written in a casual, easy-to-digest style with plenty of observations and ideas to help you make the most of the current web developer tools. This book will help you master each new ability before moving on to the next by going through the examples in this book. As you proceed, this book will help you develop more explicit knowledge of the types of capabilities made accessible to you by the advanced new technologies added to HTML and CSS. At the beginning of each chapter, you are informed of the central concepts to be covered and given a goal for the information and abilities you should have acquired by the chapter’s conclusion.

With the knowledge you get and the superior understanding you attain, this book is an excellent way to improve your competitiveness as a web developer and boost your professional growth.

What you will learn

- In-depth web design training with Geolocation, the HTML5 Canvas, 2D and 3D CSS transformations, Flexbox, CSS Grid, and more.
Understanding HTML5 and CSS3’s features, capabilities, and usage methods from A to Z.

- Knowledge of the HTML5 Canvas, 2D and 3D CSS Transformations, Flexbox, and CSS Grid.

- Use established web components and layout patterns to create design schemas that look professional.

- Power up your websites and apps with geo-location, mapping, form handling, 3D animations, and audio-video effects.

- Learn to use Responsive Web Design to improve smartphone, tablet, and laptop user experience.

Download Here: https://www.lenbookz.com/item/826/html5-and-css3-masterclass-in-depth-web-design-training-with-geolocation-the-html5-canvas-2d-and-3d-css-transformations-flexbox-css-grid-and-more
Website: https://lenbookz.com
What is a Blockchain?
Tags: web3, blockchain, webdev, computerscience
Published: 2022-11-27 02:40:07

A blockchain is literally a chain of blocks.

Think of it as blocks lined together piece by piece and each block is unique and a continuation of the previous.

Now you might be wondering, what is inside these blocks? You can literally think of these blocks as storage units that stores data so we can store different kinds of things in these blocks.

You may have heard of data storage in Computers, a data storage is just data held in a computer. **A blockchain is an open and decentralized data storage**. Data in a blockchain are stored in chains of blocks spread across many computers network, instead of on a single computer. Because this data storage is open and decentralized, anyone can access, read, and store information in it at any time.

**Each blockchain has a consensus mechanism**, a way in which this distributed network agrees on what new information is written on that data storage, ensuring that the data is true and therefore trustworthy.

It is stated in the bitcoin whitepaper, **a double spend should never happen**. This is due to the bitcoin decentralized ledger, every node connected to the network ensures that no coins have been double spent.

Unlike a normal data storage, data stored in a blockchain are immutable, so once a data get into one of these blocks, it can't be changed. Everyone(or majority) participating in the network gets a copy of these data, so if an individual try to change theirs, there will be a conflict with the rest(majority) and they may get kicked out of the network.

In blockchain, a **single point of failure is also not possible**. In the bitcoin blockchain for example, there are thousands of nodes(severs) connected to the network. If a particular node goes down, the network does not go down, other nodes will continue to run.