teleren/devto huggingface dataset:
Day 20 of 100 days of SwiftUi
Published: 2021-04-03 07:22:22

I just completed day 20 of 100 days of SwiftUi. Today, I learnt about the `HStack`, `VStack`, `Button` `Alert` views

The `VStack` view is used to stack views vertically while the `HStack` view is used to stack views horizontally. For example, `VStack` and `HStack` in SwiftUI can be written like this
```swift
var body: some View {
    VStack {
        Text("Hello World")
        Text("This is inside a stack")
    }
}
var body: some View {
    HStack {
        Text("Hello World")
        Text("This is inside a stack")
    }
}

```
The button view is used to create a button. For example, `Button` in SwiftUI can be written like so
```swift
var body: some View {
   Button("Tap me!") {
    print("Button was tapped")
   }
}
```
The code above creates a button view with the text "Tap me". It also accepts a closure that prints the text "Button was tapped" anytime the button was tapped.


If you are interested in taking the challenge, you can find it at https://www.hackingwithswift.com/100/swiftui
See you tomorrow ;)
Day 20 of SwiftUI
Tags: swift, 100daysofcode
Published: 2021-04-03 07:13:33

I just completed day 20 of 100 days of SwiftUi. Today, I learnt about the `HStack`, `VStack`, `Button` `Alert` views

The `VStack` view is used to stack views vertically while the `HStack` view is used to stack views horizontally. For example, `VStack` and `HStack` in SwiftUI can be written like this
```swift
var body: some View {
    VStack {
        Text("Hello World")
        Text("This is inside a stack")
    }
}
var body: some View {
    HStack {
        Text("Hello World")
        Text("This is inside a stack")
    }
}

```
The button view is used to create a button. For example, `Button` in SwiftUI can be written like so
```swift
var body: some View {
   Button("Tap me!") {
    print("Button was tapped")
   }
}
```
The code above creates a button view with the text "Tap me". It also accepts a closure that prints the text "Button was tapped" anytime the button was tapped.


If you are interested in taking the challenge, you can find it at https://www.hackingwithswift.com/100/swiftui
See you tomorrow ;)
Git Hub
Tags: github, gitbash, jenkins
Published: 2021-04-03 05:52:23

GIT HUB

Git is the leading distributed version control system.

Git originates from the Linux kernel development and was founded in 2005 by Linus Torvalds. Nowadays it is used by many popular open source projects, e.g., Visual Studio Code from Microsoft, Android from Google or the Eclipse developer teams, as well as many commercial organizations.



The core of Git was originally written in the programming language C, but Git has also been re-implemented in other languages, e.g., Java, Ruby and Python.



A Git repository manages a collection of files in a certain directory. A Git repository is file based, i.e., all versions of the managed files are stored on the file system.



A Git repository can be designed to be used on a server or for an user:



bare repositories are supposed to be used on a server for sharing changes coming from different developers. Such repositories do not allow the user to modify locally files and to create new versions for the repository based on these modifications.



non-bare repositories target the user. They allow you to create new changes through modification of files and to create new versions in the repository. This is the default type which is created if you do not specify any parameter during the clone operation.



A local non-bare Git repository is typically called local repository.



Git allows the user to synchronize the local repository with other (remote) repositories.



Users with sufficient authorization can send new versions of their local repository to the remote repositories via the push operation. They can also integrate changes from other repositories into their local repository via the fetch and pull operation.



Every local repository has a working tree. The files in the working tree may be new or based on a certain version from the repository. The user can change and create files or delete them.



After doing changes in the working tree, the user can capture new versions of the files in the Git repository. Or the user can restore files to a state already captured by Git



Nowadays Github has Become a great tool to work you can even push our project on daily basis and you can put a daily basis graph to maintain your practice 



Under github we have git bash to push our project by command lines steps to use git bash

1) download github and git bash

2) As git bash download open in the folder were your files are

3) git clone ("url") where you want to keep your project in which repository

4) git add ("filename")

5)git clone -m ("comments")

6) git push



In git we can make aa many different repository we want to like we can distribute our project like c++ projects different repository python project different repository and many more you can do it



Even In Jenkins it's mostly use to download our project and if any change occurs change it again update your project In further Blogs I will be more discussing on Jenkins Its really a great tool to work



Thank you
Vim Cheat Sheet!
Tags: tutorial, cheatsheet, programming
Published: 2021-04-03 06:56:12

Vim is a powerful text editor,it ships with every unix-like operating system. It is a editor to which if you get addicted you can’t go back. Here’s a cheat sheet I prepared for you guys.

Note! -
`<x>` - Means imaginary number
`<c>` - Means - imaginary character

Modes in VIM -

`Normal Mode`- To run commands and move through h,j,k,l keys in the document
`Insert Mode` - To type on the document
`Visual Mode` - To select text inside the document

Commands in Vim:
`:q` - Quits
`:wq` - Saves & quits
`:q!` - Quits without saving
`i or a` - Insert Mode
`Shift + i` - Insert mode with ignoring white spaces
`v` - For Visual Mode
`GG` - Go to first character of document
`Shift+G` - Go to last character of document
`O` - Go to first character of the line
`<x>G` - Go to <x> Line number
`<x>l` - Go <x> characters up
`<x>k` - Go <x> characters right
`<x>h` - Go <x> characters left
`<x>j` - Go <x> characters down 
`x` - Deletes a character
`<x>x` - deletes <x> characters
`<x>d` - Delete <x> Line
`u` - Undo 
`<x>u` - Undo <x> times
`Ctrl + r` - Redo
`dw` - Delete a whole word
`dd` - Deletes a whole line
`d$` - Deletes whole line from cursor to the end
`w` - Go to beginning character of word
`W` - Moves to word & ignores special characters
`b` - Moves to preceding word
`B` - Moves to preceding word & ignores special characters
`e` - Moves to last character of word
`E` - Moves to last character of word & ignores special characters
`A` - Takes to last character of line & appends
`<x>` - Takes to <x> character of line
`<x>w` - Go to beginning character of <x> word
`<x>+shift+g+p` - Moves a line to <x> number
`r` - replace a character
`C` - Deletes whole line from cursor to the end & takes in insert mode
`cw` - Deletes a word and takes in the insert mode
`c$` - Deletes the whole line from the cursor to end & takes in insert mode
`jk` - Moves by logical line
`gj` - Moves by visual line
`f<c>` - Moves forward to <c> character
`F<c>` - Moves backward to <c> character
`t<c>` - Moves forward to preceding / until character to character <c>
`T<c>` - Moves backward to preceding character to character <c>
`s` - deletes a character
`S` - deletes entire line
`O` - takes us to next line & insert
`yw` - Copy’s the next word
`yy` - Copy’s the whole line
`y$` - Copy’s whole line from cursor to the end
`p` - to paste
`%` - To highlight open & close parentheses 
`/<c>` - To search <c> instance forward in the document
`?<c>` - To search  <c> instance backwards in the document
`N` - Takes us to the next instance of the search
`Ctrl + O` - Takes us back to the instance that you were before
`Ctrl + i` - Takes us next to the instance that we’re before
`:%/s/<c>/<c2>/g` - Replace <c> with <c2> in the document
`<x>,<.x...>s/<c>/<c2>/g` - Replace <c> with <c2> in the <x> lines
`<x>,<.x...>s/<c>/<c2>/gc` - Replace <c> with <c2> in the <x> lines & ask every time
`:!<command>` -  Runs <command> in terminal in vim
`:term` - Launch terminal inside vim

That's it for today, soon to be bringing a post on vim customization.
roadmap of machine learning
Tags: python, machinelearning, datascience, computerscience
Published: 2021-04-03 06:16:40

I am here for you ..so guys are you ready?

#steps how to become a machine learning programmer:#

![image](https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fdam%2Fimageserve%2F966248982%2F960x0.jpg%3Ffit%3Dscale)

**1.suitable language for machine learning**:-
-Python is a simple and easy-to-learn language. less step of code gives you amazing output. so you can prefer this language.
-I suggest the best course ...you can follow it.
https://www.youtube.com/watch?v=aqvDTCpNRek&list=PLu0W_9lII9agICnT8t4iYVSZ3eykIAOME

**2.mathematics is required**:-
-Linear Algebra
-Optimization Theory
-Probability and Statistics
-Signal Processing

**3.you must know how to use a python library**:-
-NumPy
-scipy
-pandas
-matplotlib
-seaborn

**4.TensorFlow library:**
-TensorFlow is a free and open-source software library for machine learning. It can be used across a range of tasks but has a particular focus on training and inference of deep neural networks


**the best course for ML. I personally recommend:**
-Coursera
-udemy
-youtube
graphic designers training in karimnagar
Tags: startup, ios, webdev, wordpress
Published: 2021-04-03 05:46:22

SVAPPS may be a software company in Karimnagar, Warangal, Hyderabad. which has a training/internship period too. And it has a world-class web design and development, android development & digital marketing company that believes in delivering only the best software solution. Our svapps takes pride in developing efficient, innovative, and captivating mobile apps & websites, etc.

SVAPPS is that the Leading Software Company that's Providing Outstanding and sophisticated Implementation Services for the Business across Different Functional areas and Technologies With a Core specialization in Mobile App Development, Digital Marketing, and Web Design Services. Our Team is our Core Strength, we've Selected the foremost Skilled and Talented Specialists from the IT Industry, and that we Continuously Invest in Developing Their Capabilities.

By the way, The Core Management has Many Years of Experience and Has Successfully led Complex Projects for Major Corporations in the field of E-Commerce, Education, Health, Finance, and Food & Beverage. During the Term of those Projects, the Team had Needed to Develop a complicated Implementation Methodology to Integrate all the simplest Practices that they had Encountered.

Mission: Always wanted to supply and deliver the standard of labor so as to succeed in bent the views and ambitions of Entrepreneurs.

We want to become one of the foremost trusted and preferred IT solutions for all successful Startups, with all the support of innovation.
Create your Apps Here
Websites |Applications|Bulk SMS|Domain Registration|
Hosting| Application Maintenance|
How to fix Epson Printer error code 0x97
Published: 2021-04-03 05:43:22

The <a href="https://epsonprintersupportnumber.net/epson-printer-error-code-0x97">Epson printer 0x97 error</a> is a mistake code alluding to your problems in the printer components. A malfunction at the printer motherboard or any other internal components could lead to the screen of the code. If you're facing this error code, then don't hesitate to dial our <a href="https://epsonprintersupportnumber.net/epson-printer-customer-service">customer phone number for Epson printer</a> and our specialist will help fix this matter.
Do you know, you can create custom charts with no code?
Tags: dataviztool, datavisualization, customcharts
Published: 2021-04-03 05:10:41

Let me introduce you to [Charticulator](https://charticulator.com/).

**Charticulator** is an open source and free to use tool from [Microsoft Research](https://www.microsoft.com/en-us/research/) team, which helps you to create reusable custom chart layouts with no code. This tool is implemented as an HTML5 application and uses technologies including *React*, *Typescript* and *Web Assembly*. This is a browser based tool, which means your charts stay in your browser as long you don't delete your browsing history. Its interface is *easy to use* and *intuitive*. You can export your built charts as *Image files* (JPEG, PNG, SVG), *HTML*, *Charticulator template*. The best part is, it lets you export your visual as *Power BI Custom Visual* which can imported as a template into Power BI and can be used as a normal chart by plugging in data of your choice (of course, your data should support the chart design).

Below image is an example from [Charticulator gallery](https://charticulator.com/gallery/index.html). Here is the [demo](https://charticulator.com/gallery/mushrooms.html) showing how this chart was built. There are many examples in the gallery which would give you inspiration to ideate your own chart designs.

![Image from Charticulator gallery](https://charticulator.azureedge.net/images/gallery/mushrooms.png "Image from Charticulator gallery")

So far so good, but why do we need a separate tool to build custom charts? And, what are custom charts?

If you work with data visualizations, you will be familiar with the limitations of BI tools available. Mostly, these tools only provide predefined chart layouts like bar charts, scatter plots etc. What if you have a dataset which doesn't fit into any of the predefined standard charts? In other words, you cannot explain your data with any of the existing charts. You will need to create custom chart which lets you present insights from your data. Custom charts are novel charts which are not readily available for use and has to be built from scratch. Unfortunately, creating these charts is not a straight-forward process and only few tools helps you in this process and they require a lot of coding, which means you have to code your chart yourself.

[**D3.js**](https://d3js.org/)  is one such visualization library which lets you code your own visual. Unfortunately, there is a steep learning curve involved with **D3.js**. What if you have more than one chart design in mind and you want to test the designs with your data to understand which one works best? Then, D3.js is not a go-to tool as it involves lot of coding and it takes time to prototype all your chart designs. Especially, when you are pressed for time and you need a quick prototype. For these scenarios, *Charticulator* comes in handy.

If you would like to learn more about this project, please read their [paper](https://www.microsoft.com/en-us/research/uploads/prod/2018/08/Charticulator-InfoVis2018.pdf).
My stats 14 days after starting a Modified Version of 100 days of Code
Tags: 100daysofcode, codenewbie, programming, productivity
Published: 2021-04-03 04:38:52

I recently came across an [article](https://h.daily-dev-tips.com/i-blogged-every-single-day-for-a-year) by [Chris Bongers](https://hashnode.com/@dailydevtips)  where he talks about his journey blogging every single day for a year. It is a really inspiring journey and I hope to emulate at least 27.3972% of it( 100 days).

As of today, April 3rd, I am on day 14 and although it's been challenging, I am looking forward to the next 86 days.

### My Challenge for the 100 days
- Code at least for an hour a day

- Post content every day related to Python, SQL, or programming in general 

### Why am I doing this?
- I started writing articles somewhat consistently on Medium in October 2020. I want to be more consistent and build a productive habit

- Writing an article/ blog post helps me understand concepts better and drives me to learn new things. 

- Increasing online presence 

### My Stats when I started the challenge
- [Twitter](https://twitter.com/rahulbanerjee99)  - 48

-  [Hashnode](https://realpythonproject.hashnode.dev/series/daily-programming-content/)  - 9

-  [Dev.to](https://dev.to/rahulbanerjee99)  - 10

-  [Medium](https://medium.com/daily-programming-tips)  - 0 people following Publication, 330 people following me

-  [Wordpress Blog Email Subscribers](https://www.realpythonproject.com/newsletter/)  - 5


### My Current Stats
- [Twitter](https://twitter.com/rahulbanerjee99)  - 48 -> 72

-  [Hashnode](https://realpythonproject.hashnode.dev/series/daily-programming-content/)  - 9 -> 31

-  [Dev.to](https://dev.to/rahulbanerjee99)  - 10 -> 89 (Wow)

-  [Medium](https://medium.com/daily-programming-tips)  - 0 -> 10 people following Publication, 330 -> 344 people following me

-  [Wordpress Blog Email Subscribers](https://www.realpythonproject.com/newsletter/)  - 5 -> 9

I plan to provide an update every 14 days so my next update will be on day 28 :) 

-----
Connect with me

https://linktr.ee/rahul2699
React state hook , easy way
Tags: javascript, react
Published: 2021-04-03 04:28:32


#### Hooks are additional in react 16.8, Hooks let us use use state and other React features without writing class wooow 😎
The first "hook" that we will learn is `useState`, and the other "hook" is `useEffect`. 

`useState` is similar to declaring state at class component include the `setState` functionality in one wrap.


#### Example using class component
```
class PlusOne extends React.Component{
    // prepare and declaring state 
    constructor(props);
    super(props);
    this.state = {
        count:0
    }
    render() {
        return(
            <div>
                <p>you hit {this.state.count}</p>
                <button onClick={() => this.setState({ count: this.state.count + 1 })}>
                    +
                </button>
            </div>
        )
    }
}
```
#### Example function components using hooks

> bear in mind that hooks doesn't work with class component 
```
   // import useState from react lib
   import React, { useState } from 'react';
   function PlusOne() {
       const[count,setCount]= useState(0); 
       /* first count variable value set to 0 */
       /* 
        those above line actually is an `array destructuring`
        they are consist of two variable
        count is  current value
        setCount is function that let us update it
       */
       return(
           <div>
            <p> you hit {count} </p>
            <button onClick={()=> setCount(count+1)}>
                +
            </button>
           </div>
       )
   }
```
### Conclusion

- State hook is similar to declaring state
- React hook can't use in class components 
- React hook make our components looks more clean
I have built an async to sync service using Vert.x event bus; please review the code and suggest better approaches
Tags: discuss, java, codequality
Published: 2021-04-03 03:44:52

TLDR; Please visit here - https://github.com/Ananto30/vertx-async-gateway and review the code.

I have used `ConcurrentHashMap` to keep track of the requests. And assuming each async request should have a unique identifier that can be used to track it when we get the callback in a webhook.

Using this code, one can write new endpoints that will be calling third parties who are async (send the response in a callback URL). So when a call is received from a user, the response will be put in the ConcurrentHashMap against the identifier and block the request using the blocking handler of vertx (the response is not `end()`). Then a callback will be received in the callback endpoint and an event will be published in the bus. Another verticle will take the event and find it from the hashmap and `end()` the result to that specific request. 

Is this code seems good enough for this purpose?
Server Authentication With Client Certificate X.509
Tags: linux, web, smime, encryption
Published: 2021-04-03 03:43:07

## Introduction

Basics of setting up certificate based authentication on Apache.

## Assumptions

Your Server is already configured to use SSL/TLS. This is required because the browser refuses to use its certificate for authentication on an insecure connection.

## Creating all the files we need

Note: The key sizes and expiration dates must be adjusted to suite your need.

 

Create the CA

```
openssl genrsa -out CA.key 2048
openssl req -x509 -new -nodes -key CA.key -days 7300 -out CA.pem
```

Create a signing request and signing it with the CA private key

```
openssl genrsa -out alice.key 2028
openssl req -new -key alice.key -out alice.csr
openssl x509 -sha256 -req -in alice.csr -out alice.crt -CA CA.pem -CAkey CA.key -CAcreateserial -days 1095
```

Convert the alice.crt to alice.p12 so a browser knows what to do with it. (Note: On safari the .p12 file has to have a password for the import to work)

```
openssl pkcs12 -export -clcerts -in alice.crt -inkey alice.key -out alice.p12
```

Convert the .p12 to .pam so tools like curl can use it

```
openssl pkcs12 -in alice.p12 -out alice.pem -clcerts
```

## Configuring Apache

copy your CA.pem in a file readable by apache. In my case it is /home/CA.pem but this might differ for your server.

in your virtual hosts configuration file add SSLCACertificateFile  and SSLVerifyClient  like shown below.

```
<IfModule mod_ssl.c>
<VirtualHost *:443>

    SSLCACertificateFile /home/CA.pem
    SSLVerifyClient require


# ..... your additional configuration here
# .....

</VirtualHost>
</IfModule>
```

## Finally… we can use it

To use the certificate with curl

```
curl -E alice.pem https://restricted.example.de
```

To install in Safari on a Mac just double click the .p12 file and follow the instructions

To install on iOS the file can be send by email (messengers don’t work) and installed by tapping on it and following the instructions. If the file is considered a production file it should NOT be send over the internet instead plug in a usb cord and transfer via iTunes.
[Fix] Issue while Installing Ruby with Rbenv in M1 Mac
Tags: ruby, rails
Published: 2021-04-03 03:38:19

When installing Ruby with Rbenv in M1 Mac, it throws Build Failed error with message **Inspect or clean up the working tree error...** Let's look at how we can resolve the error and install the Ruby with Rbenv in our M1 Mac.

## Error Message

Let's reproduce the error first:

1. Install ruby with rbenv

    ```cmd

      $ rbenv install 2.7.2

    ```

2. Install error

    You will get the following error message 

      - BUILD FAILED (macOS 11.2.3 using ruby-build 20210309)
      - Inspect or clean up the working tree at `/var/folders/.....`

![Ruby installation error message](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/laqxfos8d7z07zhd46hh.png)

_NOTE_: In my M1 Mac, I tried installing various ruby versions with rbenv like 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.7.2  and always ran into this same issue.

## Fix

Instead of running the normal ruby install command with rbenv, let's prepend it with `RUBY_CFLAGS="-Wno-error=implicit-function-declaration"`, which will supress all error and warnings and let the ruby installation complete.

```cmd
$ RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.0
```

## Conclusion

Tada! See the magic? Ruby should install without any issue now.

Are you using any another method to fix the issue? Let us know in the comments below. 

Thank you for reading!

**References**

- <a href="https://github.com/rbenv/ruby-build/issues/1691#issuecomment-753636901" target="_blank">[Github] Installation issues with Arm Mac (M1 Chip)</a>

**Image Credits:** 

Cover Image by <a href="https://unsplash.com/@joshuafuller?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText" target="_blank">Joshua Fuller</a> from <a href="https://unsplash.com/s/photos/ruby?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText" target="_blank">Unsplash</a>