teleren/devto huggingface dataset:
What questions do you ask a new client?
Tags: discuss
Published: 2020-10-26 15:32:38

Every client and every project is different. There is no checklist that fits every client and every project - at least not that I'm aware of!

But there are some basics that are necessary to get started with a new client.

## What do you ask them at first contact? How do you store this?

**I'm curious!**

I use Google Forms and here is what I ask new clients before making an offer for a project:
- Web/App/Other project or combination?
- If applicable: are domains already registered?
- If applicable: Name of registrar
- If applicable: Name of domain(s)
- If applicable: Do you have an existing host?
- If applicable: Should I take care of hosting? (charging included)
- Base data of company and client (Name, address, VAT-Id, and whatnot is required)
- Can I display this project in my portfolio?
- Upload of resources (Logo, other stuff)
CyboShool against Education Problem that comes with COVID 19 Pandemic
Tags: ucsc2020
Published: 2020-10-26 15:27:26

## Team Declaration

#### Team Name - Bits N' Bytes

|             | Name     | Student ID Number | Github Handle |
|-------------|----------|-------------------|---------------|
| Team Leader | Hansana Prabavith Ranaweera | 2019CS135        | @ranaHP      |   

## What we are building

This is Virtual Learning Environment for kids. Actually, this is more than a normal Virtual Learning Management System because we created an AI-powered 3D character to Interact with the kid. And  3D character can predict the kid's facial expression using Machine-Learning. So According to the kid's facial expression, we decide what we are going to do.


## How we built it

**[Initial Update]**
Initially, I had to consider the current situation in Sri Lankan to get an idea about what I going to build. So I found a very serious problem that every teacher who teaches to grade 1-5 students and also a student and their parents had. That is not efficient in online learning because It is difficult to stay students who are studying grade 1-5  with computer and Online meeting. Actually, they are kids so they would like to play some games, dance, sing, and they usually unable to concentrate their minds on online studies. So Parents should have to stay with them during the online meeting or online study times. You know It is not possible. To that problem, I decide to make a VIRTUAL LEARNING MANAGEMENT SYSTEM with AI POWERD 3D Character 

**[Update 3]**
I made a basic prototype with character and characters animation.

**[Update 4]**
Then I add Machine Learning to Detect facial expression and get what the student current facial expression

**[Update 5]**
after I worked with Text to Speech API. and add to prototype

**[Final Update]**
Finally, I assemble the whole prat together and wrote Main Algorithm to work all part correctly and work randomly and also add some style according to neon colors

## Conclusion
Hacktoberfest actually this is one of the best hackathons because I learned a lot of new stuff and I studied how I manage my project and interact with friends and seniors. I learned how to work with 3d characters, how to animate them and learn some machine learning to predict facial expression and a lot of things.

## Demo Link
 Demo Link: <i>-------- (Optional)</i>


## Link to Code
<u>Github</u> 
Frontend: <i>https://github.com/ranaHP/CyboSchool</i>
Monday, Week 3
Tags: ruby, webdev, beginners
Published: 2020-10-26 15:15:44

We finished our first Model View Controller today. A cookbook repository with web scraping using Nokogiri to grab recipe names, ratings and descriptions from a popular website. The debugging was a slog. The finished product however was incredibly satisfying. Last year someone on stackoverflow told me I should "start thinking in terms of Object Oriented Programming". After an hour of reading around I still wasn't sure what he meant exactly. I'm beginning to now though. The code I've been writing this week is a far cry from the endless lines of repitition and method after method with no inheritance that I'd been asking for help with a year ago.
MVC is tricky to be sure, I'm making stupid mistakes with getters and setters but I'm also able to track those mistakes down. It feels good.
I ate a whole pizza for lunch today. Pineapple cheese and meatballs. No comma there, the cheese was pineapple flavored. It sounds egregious and it was. When I sat back down at my computer all I wanted to do was get under the desk and take a nap. But I managed to force myself through the haze of dough and got on with adding a mark_as_done method to the cookbook. I don't normally have such a stupid lunch but I've been living in Chengdu for four years. There's a limit to the variety of foreign food there and since arriving in Shanghai three weeks ago I've been indulging myself a little. Sometimes, when you haven't been back to your own country for two years, you need to give yourself a big pizza for lunch. Tomorrow I'll go with rice and beans.
As the evening's live code started I noticed that one of the remote students had asked me for help. An hour before. It's the second time I missed someone asking for help and I felt bad for not catching the message. I need to keep an eye on my slack notifications when I'm dialled in.
Tomorrow we're building four MVCs. It took us two days to make one. This is going to be interesting. I'm not sure how they're going to communicate unless it's just a question of **attr_accessor**. I guess we'll find out tomorrow. Take care x
Data Structures & Algorithms using Rust: Duplicate Zeros
Tags: rust
Published: 2020-10-26 15:14:49

As part of Data Structures and Algorithms implementation using Rust, today we will explore `Duplicate Zeros` problem.

Leetcode problem link: https://leetcode.com/problems/duplicate-zeros/

###### Problem Statement

```rust 
Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right
```

###### Instructions

```rust
Note that elements beyond the length of the original array are not written.

Do the above modifications to the input array in place, do not return anything from your function.

Example 1:

Input: [1,0,2,3,0,4,5,0]
Output: null
Explanation: After calling your function, the input array is modified to: [1,0,0,2,3,0,0,4]
Example 2:

Input: [1,2,3]
Output: null
Explanation: After calling your function, the input array is modified to: [1,2,3]
 

Note:

1 <= arr.length <= 10000
0 <= arr[i] <= 9
```

###### Solution

Here is my solution to above problem

```rust
impl Solution {
    pub fn duplicate_zeros(arr: &mut Vec<i32>) {
        let mut n = 0;
        while n < arr.len() {
            let t = arr[n];
            if t == 0 {
                arr.pop();
                arr.insert(n, 0);
                n += 2;
            } else {
                n += 1;
            }
        }
    }
}
```

Please feel free to share your comments.

Happy reading!!!
How to Restart All Pods in a Kubernetes Namespace
Tags: engineeringpractices, languages, opensource, kubernetes
Published: 2020-11-25 15:29:24

---
title: How to Restart All Pods in a Kubernetes Namespace
published: true
date: 2020-10-26 13:06:05 UTC
tags: EngineeringPractices,Languages,OpenSource,kubernetes
canonical_url: https://qvault.io/2020/10/26/how-to-restart-all-pods-in-a-kubernetes-namespace/
---

 ![How To Restart All Pods in a Kubernetes Namespace](https://qvault.io/wp-content/uploads/2020/10/The-Nuances-of-Constants-in-Go-Go-Isnt-JavaScript.jpg "The Nuances of Constants in Go Go Isnt JavaScript")

The post [How to Restart All Pods in a Kubernetes Namespace](https://qvault.io/2020/10/26/how-to-restart-all-pods-in-a-kubernetes-namespace/) first appeared on [Qvault](https://qvault.io).

[Where I work](https://app.qvault.io/) we use a repo-per-namespace setup and so it is often the case that I want to restart all the pods and deployments in a single Kubernetes namespace. Maybe I want to see the startup logs, maybe I want to take down production for a few seconds, don’t question my motivations.

Anyhow, what does matter is that bouncing all the deployments one-by-one is really obnoxious and I don’t like typing. In true developer laziness fashion I wrote a little script that will do it for me:

```bash
deploys=`kubectl -n $1 get deployments | tail -n +2 | cut -d ' ' -f 1`
for deploy in $deploys; do
  kubectl -n $1 rollout restart deployments/$deploy
done
```

The usage is fairly simple, assuming we named the file `kubebounce.sh`

```bash
./kubebounce.sh {NAMESPACE}
```

I made a little [open-source repo](https://github.com/lane-c-wagner/kubebounce) with installation instructions if you want to add it to your $PATH. Be sure to star the repo if you find it useful.

## How It Works

Bash isn’t exactly the easiest language to read. Let’s go over each portion of the script.

```bash
deploys=`kubectl -n $1 get deployments | tail -n +2 | cut -d ' ' -f 1`
```

In bash, `$1` refers to the first command-line argument, the namespace in our case. In essence, this line gets all the deployments in the target namespaces and saves them into a `deploys` variable. We pipe the output of the `kubectl get deployments` command into a `tail -n +2` command, which just strips of the first line of the output. Then we run that output through a `cut` command which leaves us with a nice list of all the deployment names.

That’s actually the trickier part, next we just loop over all the deployments and restart them one-by-one:

```bash
for deploy in $deploys; do
  kubectl -n $1 rollout restart deployments/$deploy
done
```

## Thanks For Reading!

Follow us on Twitter [@q\_vault](https://twitter.com/q_vault) if you have any questions or comments

Take some [coding courses on our new platform](https://app.qvault.io)

[Subscribe](https://mailchi.mp/5c7f5c281bbe/qvault-newsletter-subscribe) to our Newsletter for more programming articles
So You Think You Can France is Pretty Much Done!
Tags: devjournal, sideprojects, react
Published: 2020-10-26 14:53:25

_This post was originally published on October 22, 2020 on [my blog] (https://alexlsalt.github.io/blog)._

My latest side project, a rebuild of my So You Think You Can France website, is pretty much done! Yay!

Well, it's at least a very viable minimum viable product (MVP), and I'm super excited about it!

One of the major positive points for me is finally being able to implement React Router into one of my projects. It was one of those things floating around in my peripheral awareness, and I finally took it on.

There are still a few administrative things to finish up with it - including adding in more blog posts and inputting more city guide data into Firebase, but for the moment, it's pretty much good to go!

The entire project was built with React, used Firebase Firestore to store the data - and it's deployed with Netlify.

[You can check the project out here >>] (https://soyouthinkyoucanfrance.netlify.app/)

Gotta think of a new side project now! I'm feeling a subtle nudge in the direction of a React Native project... Stay tuned!


----------


P.S. Did you know I have a podcast with new episodes each Wednesday? Go listen [right over here >>] (https://www.ladiescodecollective.com/podcast)

![The Ladies Code Collective Podcast cover art](https://dev-to-uploads.s3.amazonaws.com/i/e9bnxljvfrdjeti7fvbr.png)
XAMPP Installation Step By Step on MacOs

Tags: php, sql, webdev, beginners
Published: 2020-10-26 14:49:55

# Introduction
**XAMPP** is the most popular PHP development environment
**XAMPP** is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
Today we are going to install it.

# Installation

First of all we have to download it. Just click [here](https://www.apachefriends.org/index.html) to download.

You will see a page like this.

![image14](https://dev-to-uploads.s3.amazonaws.com/i/vvrxvd5ttai04a7d7nvl.png)
 

Just download the version of your operating system. From Mine, I am using macOS.
Once it finishes downloading, we have to install it. In your Downloads folder search the XAMPP application and click it twice to install.

![image11](https://dev-to-uploads.s3.amazonaws.com/i/exnb5wk5hyvdiymvxvuy.png)


 You'll see the install window, once everything will be ready.

![image13](https://dev-to-uploads.s3.amazonaws.com/i/46jzkn7we3gv7m7p7hi8.png)
 
Click it twice and when a warning box will appear, click **open**.

![image4](https://dev-to-uploads.s3.amazonaws.com/i/9b0pyo5deugwmlhe89za.png)

You will have to enter your **computer password** to allow XAMPP to install and click on “**OK**”.

![image3](https://dev-to-uploads.s3.amazonaws.com/i/npcdbdsi43z9wc6cdngv.png)

Now we get to the setup process. Click "Next" to start the process.

![image7](https://dev-to-uploads.s3.amazonaws.com/i/mfizpmasxrp3mqamrdaw.png)

After checking all options if it’s not yet checked. Click ‘“Next” to continue.

![image9](https://dev-to-uploads.s3.amazonaws.com/i/fn0de6q2mbrsaebettn7.png)

**XAMPP** will be installed in your **Applications** directory. Click “**Next**”.
 
![image1](https://dev-to-uploads.s3.amazonaws.com/i/eq7ejror5x9l8uz0b74y.png)

After click on “**Next**”.

![image2](https://dev-to-uploads.s3.amazonaws.com/i/vwhade9semdp0dppkhpo.png)
 
Now everything is ready for installation. Click on “**Next**”.

![image15](https://dev-to-uploads.s3.amazonaws.com/i/p2w04692brydr10z7hwc.png)

Now **XAMPP** will start installing in your computer automatically just leave it run. 

![image5](https://dev-to-uploads.s3.amazonaws.com/i/5p5jvygdscfixa7fzwet.png)

When it will finish you will see this screen. Just check ”**Launch XAMPP**” and click on “**Finish**”. 

![image12](https://dev-to-uploads.s3.amazonaws.com/i/1ao8zehxwg5nw7wzn39v.png)

 
Now you will see a XAMPP window as follows.

![image10](https://dev-to-uploads.s3.amazonaws.com/i/v9hvgwjtg3l13cnkeh31.jpg)

**Congratulations.**
You have successfully installed XAMPP on your Mac.
![party-image](https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/whatsapp/238/face-with-party-horn-and-party-hat_1f973.png)
Instagram User Online with HTML & CSS
Tags: html, css, codenewbie, oneappaday
Published: 2020-10-26 14:47:05

Coding everyday has been a wonderful thing and here's sharing with you how to code an Instagram User Online interface with HTML and CSS with detailed explanation of each line of codes. Here is a link to it. Enjoy! :-)

https://rasheedatoba.com.ng/instagram-user-online/
What's New in Laravel 8?
Tags: codequality, laravel, tutorial
Published: 2020-10-26 14:46:28

Learn about the new features and changes in the latest Laravel 8 release.
[Read more...](https://auth0.com/blog/whats-new-in-laravel-8/?utm_source=content_synd&utm_medium=sc&utm_campaign=laravel_8)
Data Structures & Algorithms using Rust: Squares of a Sorted Array
Tags: rust
Published: 2020-10-26 14:45:39

As part of Data Structures and Algorithms implementation using Rust, today we will explore `Squares of a Sorted Array` problem.

Leetcode problem link: https://leetcode.com/problems/squares-of-a-sorted-array/

###### Problem Statement

```rust 
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
```

###### Instructions

```rust
Example 1:

Input: [-4,-1,0,3,10]
Output: [0,1,9,16,100]
Example 2:

Input: [-7,-3,2,3,11]
Output: [4,9,9,49,121]
 
Note:

1 <= A.length <= 10000
-10000 <= A[i] <= 10000
A is sorted in non-decreasing order.
```

###### Solution

Here is my solution to above problem

```rust
impl Solution {
    pub fn sorted_squares(a: Vec<i32>) -> Vec<i32> {
        let mut ret_arr: Vec<i32> = a.iter().map(|x| x * x).collect();
        ret_arr.sort_unstable();
        ret_arr
    }
}
```

Please feel free to share your comments.

Happy reading!!!
How to create a profile readme on GitHub
Tags: github, git, devops, coding
Published: 2020-10-26 15:28:13

---
title: How to create a profile readme on GitHub
published: true
date: 2020-10-26 14:42:28 UTC
tags: github,git,devops,coding
canonical_url: https://medium.com/certifried-it/how-to-create-a-profile-readme-on-github-2943e377c0a5
---

[![](https://cdn-images-1.medium.com/max/2392/1*60zoJM_RTgnbZryjGDEPdQ.png)](https://medium.com/certifried-it/how-to-create-a-profile-readme-on-github-2943e377c0a5?source=rss-bf1ef9317cf6------2)

With renewed efforts to innovate and ship new features following their acquisition by Microsoft, GitHub quietly launched one of their most…

[Continue reading on CertiFried IT »](https://medium.com/certifried-it/how-to-create-a-profile-readme-on-github-2943e377c0a5?source=rss-bf1ef9317cf6------2)
React JS - Set State of Parent Component from Child
Published: 2020-10-26 14:38:21

Parent
```js
function Parent() {
    const [value, setValue] = React.useState("");

    function handleChange(newValue) {
      setValue(newValue);
    }

    // We pass a callback to Child
    return <Child value={value} onChange={handleChange} />;
}
```
Child
```js
function Child(props) {
    function handleChange(event) {
        // Here, we invoke the callback with the new value
        props.onChange(event.target.value);
    }
  
    return <input value={props.value} onChange={handleChange} />
}
```
Data Structures & Algorithms using Rust: Max Consecutive Ones
Tags: rust
Published: 2020-10-26 14:26:00

As part of Data Structures and Algorithms implementation using Rust, today we will explore `Max Consecutive Ones` problem.

Leetcode problem link: https://leetcode.com/problems/max-consecutive-ones/

###### Problem Statement

```rust 
Given a binary array, find the maximum number of consecutive 1s in this array.
```

###### Instructions

```rust
Example 1:
Input: [1,1,0,1,1,1]
Output: 3
Explanation: The first two digits or the last three digits are consecutive 1s.
    The maximum number of consecutive 1s is 3.
Note:

The input array will only contain 0 and 1.
The length of input array is a positive integer and will not exceed 10,000
```

###### Solution

Here is my solution to above problem

```rust
use std::cmp;

impl Solution {
    pub fn find_max_consecutive_ones(nums: Vec<i32>) -> i32 {
        let mut i_max: i32 = 0;
        let mut i_cnt: i32 = 0;
        for i in 0..nums.len() {
            let t = nums[i];
            if t == 0 {
                i_max = cmp::max(i_cnt, i_max);
                i_cnt = 0;
            }
            i_cnt += t;
        }
        cmp::max(i_cnt, i_max)
    }
}
```

Please feel free to share your comments.

Happy reading!!!
Data Structures & Algorithms using Rust: Find Numbers with Even Number of Digits
Tags: rust
Published: 2020-10-26 14:21:37

As part of Data Structures and Algorithms implementation using Rust, today we will explore `Find Numbers with Even Number of Digits` problem. 

Leetcode problem link: https://leetcode.com/problems/find-numbers-with-even-number-of-digits/

###### Problem Statement

```rust
Given an array nums of integers, return how many of them contain an even number of digits.
```

###### Instructions
```rust
Example 1:

Input: nums = [12,345,2,6,7896]
Output: 2
Explanation: 
12 contains 2 digits (even number of digits). 
345 contains 3 digits (odd number of digits). 
2 contains 1 digit (odd number of digits). 
6 contains 1 digit (odd number of digits). 
7896 contains 4 digits (even number of digits). 
Therefore only 12 and 7896 contain an even number of digits.


Example 2:

Input: nums = [555,901,482,1771]
Output: 1 
Explanation: 
Only 1771 contains an even number of digits.
```

###### Solution

Here is my solution to the above mentioned problem using Rust.

```rust
impl Solution {
    pub fn find_numbers(nums: Vec<i32>) -> i32 {
        nums.iter().filter(|&x| {
            let mut i_cnt: i32 = 1;
            let mut i: i32 = *x;
            while i / 10 > 0 {
                i = i / 10;
                i_cnt += 1;
            }
            i_cnt % 2 == 0
        }).count() as i32
    }
}
```

Please feel free to let me know your feedback.

Happy reading!!!
How to detect loop in linkedlist?
Tags: interview, tutorial, datastructures, oops
Published: 2020-10-26 14:21:17

---
title: How to detect loop in linkedlist?
published: true
description: Interview question
tags: interview, tutorial, datastructures, oops
//cover_image: https://direct_url_to_image.jpg
---

1) Two pointers (each node is assigned with an address)

2) Traverse through each node till end , tracking visited node using visited flag.

If you find node that is already visited, then there is a loop in LinkedList and if you reach till end while traversing then there is no loop in LinkedList
A memo to my past self: 3 things I wish I had known when I started my career as a dev
Tags: career, motivation, beginners
Published: 2020-10-26 14:20:52

## You don't have to be a pro at everything
Probably stating the obvious, but during the start of my career as a front end developer, I was so overwhelmed by the number of technologies that I had yet to explore, I grew anxious just thinking about it. The solution: take it easy - you don't need to know every single language or framework, as there are so many out there it would take more than a lifetime to learn all of them!

## One step at a time
As a follow up from above - learn one thing at a time. You need to grant yourself the opportunity to process all of the information so it will stick so you can actually use it in practise. It's not a competition so pick one at a time and remember to have fun!

## Don't be afraid to ask questions
This was probably my biggest challenge. But to be honest, it's one of the biggest ways to improve yourself as a dev, or any career path for that matter. I think it's more valuable to share what you don't know rather than to keep quiet. Because what on earth could you be ashamed of anyway? In the end, honesty is valued way more than wasting time on something that could've been solved in just a minute, had you just asked. And remember, there are no such things as dumb questions. So write them all down, ask and learn!
TIL: How to pass data from child to parent component using a template variable
Tags: angular, todayilearned
Published: 2020-10-26 14:18:00

Was trying to look for ways on how to pass data around from a child to a parent component and I found a very easy way - using a template variable.

If you had followed my previous post, I used the `postMessage` component to post a message that has been used on the child component i.e the `message` component by using `Output()`. But I have found a cleaner way. 
####post-message.component.html
```html
<div>
    .. other stuff
    <message #myMessage></message>
  <div>{{myMessage.message.value}}</div>
</div>
```
`#myMessage` is a template variable that you can use on the `postMessage` component's view. So here, I could access any public field or methods of the `message` component through the template variable.
####message.component.ts
```typescript
import { Component, EventEmitter, OnInit, Output } from "@angular/core";

@Component({
  selector: "message",
  templateUrl: "./message.component.html",
  styleUrls: ["./message.component.css"]
})
export class MessageComponent implements OnInit {
  message: IMessage;
  constructor() {}

  ngOnInit() {
    //eg message - would basically come from user input though
    this.message = {
      value: "This is a message I like to post",
      id: 1
    };
  }
}
```

So, whatever I assign to `this.message` will have the value available on the `postMessage` component which is the parent component of `message`

Hope that is handy. :D