teleren/devto huggingface dataset:
How do you know it’s the right time to leave a company?
Tags: anonymous, discuss, career
Published: 2022-05-10 14:35:57

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment or if you want to ask your own anonymous question._

***


Lately, I've been feeling like I should move on to other opportunities, but I can't quite figure out if now is a good time, or if I should wait. Should I make a list of the reasons why? Interview at other companies before I leave? Give my current company plenty of notice before my hypothetical departure? How do I know that it's the right time to leave at all? I'd love to hear any opinion and guidance on this!
Useful Git commands for common tasks
Published: 2022-05-10 14:27:26

**1)Git Clone**

Git Clone Is A Command For Downloading Existing Source Code From A Git Repository (Like Azure DevOps, GitHub)

**git clone “repository url” -b “branch name”**

**2) Git Branch**

Branches Are Highly Important In The Git World. By Using It, Developers Are Able To Work In Parallel On The Same Project.

i) Creating A New Branch:
**git branch “branch-name”**

ii) To Push The New Branch
**git push -u “remote” “branch-name”**

iii) Viewing Branches:
**git branch or git branch — list**

iv) Deleting Branch
**git branch -d “branch name”**

**3) Git Commit**

Most-Used Command Of Git. Once We Reach A Certain Point In Development, We Want To Save Our Changes (Maybe After A Specific Task Or Issue).
**git commit -m “commit message”**

**4) Git Push**

After Committing Your Changes, The Next Thing You Want To Do Is Send Your Changes To The Remote Server. Git Push Uploads Your Commits To The Remote Repository.
**git push “remote” “branch-name”**

**5) Git Status**
The Git Status Command Gives Us All The Necessary Information About The Current Branch.
**git status**

**6) Git Diff**

You can use this command to see the unstaged changes on the current branch.

**git diff — staged**

**7) Git Add**

This is the command you need to use to stage changed files. You can stage individual files

**git add “file path”**

for all files
**
git add**
Paracetamol.js💊| #113: Explica este código JavaScript
Tags: javascript, webdev, spanish, beginners
Published: 2022-05-10 14:25:32

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Avanzado</mark></center>

```js
const datos = [
  {
    id:1,
    nombre:"Ana",
    edad:25
  },
  {
    id: 2,
    nombre: "Cris",
    edad: 26
  },
];

const getDatos = () => {
  return new Promise((resolve, reject) => {
    if(datos.length > 0){
      setTimeout(() => {
        resolve(datos)
      },3000-1000)
    }else{
      reject(new Error("Algo ocurrio mal"))
    }
  })
}

getDatos()
  .then((datos) => console.log(datos.filter((item) => item.edad > 25)
                                    .map((item) => item.edad)))
  .catch((error) => console.log(error.message))
  .finally(() => console.log("FIN"))
```

A. `"Algo ocurrio mal"`, `FIN` (después de 3000 ms)
B. `[]`, `FIN` (después de 2000 ms)
C. `[26]`, `FIN` (después de 2000 ms)
D. `Promise { <pending> }` (después de 0 ms)

Respuesta en el primer comentario.

---
ANYONE CAN VOTE APPLICATION USING APPWRITE..
Tags: appwritehack, docker, html, css
Published: 2022-05-10 14:24:31


## Appwrite

- It is an open source backend as a service.
- It can manage backend without writing a code.
- Appwrite provide API's and tools.
- It can console to manage all resources.

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

## INSTALLATION OF APPWRITE
If we want to use Appwrite our system must consist Docker.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8a2r6tqendsxn66snmgs.png)
check the activity whether the **_Appwrite_** and _**Docker**_ is present or not using **cmd**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0e8zo21ceptvoq5fns6p.png)
If we want to make sure Everything set the localhost and signup the account start create a project.

_ADD A PLATFORM FOR THE PROJECT WHETHER IT IS A WEB APPLICATION ADD WEB TO THE PROJECT._

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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wt1954yo81k9lkorzn0c.png)
I upload my source code on GitHub........

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmqua4093piu86hfkvgg.png)
This is my CSS code which is used in the project it exhibits different styles.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivu2jofqicm1y0gw3uql.png)
It is an html code where in this we use dot operation many functions too.... for vote page

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnt10uku678jgcufzt6l.png) 
 It is also a html code for Login form.

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

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

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

> The project contains the appropriate GitHub repository,and includes license and README.

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


## Submission Category:

```
Web2 Wizards
```

## Link to Code

https://github.com/maturusupriya/VOTING_APP.git

## Additional Resources

**Appwrite link:**

https://appwrite.io/

**Docker link:**

https://www.docker.com/

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

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


# APPWRITE #VOTE FOR EVERYONE #LOGIN FORM
Curva de aprendizaje con HTML y CSS
Tags: html, css
Published: 2022-05-10 03:21:00

Recuerdo cuando empece con HTML tenia mi primera laptop!
Era una laptop blanca ASUS que me habian regalado.

Recuerdo haber encontrado un PDF de HTML 4 en el cual habia mucho codigo obsoleto. Que ya no me servia, y lo segui aprendiendo.

esa vez fue cuando encontre a una persona el cual le comente que sabia programar en HTML   uff no sabia bien lo que decia o hacia.

Entonces me dijo que me capacitaria para aprender a programar!
y me estaba mostrando hacer peticiones a un servidor desde el primer dia yo no entendia nada solo sabia un poco de HTML y nada mas y ya llevaba 2 ciclos en la Universidad y aun asi no me sentia preparado para aprender a programar!

Me tomo mucho tiempo pero tome la desicion de aprender HTML lo cual me resulta bastante tediosos y aburrido, mientras que CSS me fue dificil entenderlo por que no sabia que necesitaba saber HTML para entenderlo y con el tiempo le fui hagarrando el gusto por la programacion hablo del 2016 oh 2017...

Paso bastante tiempo y en el 2018 iba a mis clases o capacitaciones de programacion en los cuales aprendi bastante cosas que nunca hubiera aprendido en la universidad!

Empece aprendiendo javascript fue algo dificil sin tener idea de como hacer algoritmos, con tiempo y dedicacion logre comprender mas cosas como:
variables
tipos de datos
bucles
que es un if, for, while, switch
entre otros 
logre comprender los objetos y arrays
que la verdad no los entendia pero con ejercicios me resulto
facil...

tiempo despues ya podia aprender por mi propia cuenta
no necesitaba que me explicaran paso a paso todo
buscando por internet encontre react y Angular los cuales me llamaron la atencion

empece aprender Angular que usaba typescript, la verdad no me gusto mucho (es gusto personal) y lo deje a medio camino eso si levante una app con Angular y no entendia nada con un curso de udemy

luego de ello, segui con react y me gusto pero no entendia nada, sin embargo logre tener bases en javascript y asi poder entender mejor react

con el tiempo deje la programacion del 2019 a 2021 por la pandemia que hubo y me centre en jugar, de un momento a otro deje de jugar de pasar 50 horas jugando por semana 
oh de salir solo al banio oh a comer y seguir jugando 
a dejar de hacerlo.

Y enfocarme en programar me costo me fue muy dificil seguir el ritmo a la programacion pero volvi a mis clases y volvi a tomar la programacion esta vez mas enserio y cada dia le dedico aprender mas, 

es impresionante cuando empiezas a entender las cosas y llega a un punto donde comprendes lo que estas haciendo y te llama la atencion, al principio me parecia una salvajada que no entendia.

ahora estoy usando react y typescript de un momento a otro solo aprendi javascript y realizando un proyecto.

logre usar github y subir varios proyectos que estan ahi por tutoriales oh propios que siguen a media hoy en dia, y que intentare volver y mejorarlos, por el momento es todo
What Is the Difference Between GPL and LGPL License ?
Tags: productivity, opensource
Published: 2022-05-10 14:02:04

## Short version
- Don't use **GPL** libraries in commercial products.
- You can use **LGPL** libraries in commercial products.

## Longer version

GPL License enables a product to be use and redistributed freely. The counterpart is that GPL License is contaminating. Meaning, to use a GPL Library in your application, you need to make it GPL too. Which is generally not the goal for commercial product.

LGPL is not contaminating. You can freely use an LGPL library but if you use it in your product, you just have to mention it somewhere in documentation, in an EULA, License.txt or whatever. You can then use whatever license you want for your product.

To help you remind it, **L**GPL stand for **Lesser** GPL. As there is Less restriction in this license, it gives you more freedom to use it.

**Disclaimer**: I'm not a lawyer. Take this as a quick reminder, but Licensing is something really subtle. If you have doubt, don't hesitate to directly contact the 3rd party provider to know if you can use it in your specific case.
Can we call root.render() inside setInterval()?
Tags: react, tutorial, beginners, help
Published: 2022-05-10 13:57:20

Why doesn't the below code work? 

```
const root = ReactDOM.createRoot(document.getElementById('root'));
  
function Clock() {
  return (
    <div>
      <h1>Hello, world!</h1>
      <h2>It is {new Date().toLocaleTimeString()}.</h2>
    </div>
   );
}

setInterval( root.render(<Clock />), 1000);
```

But why does wrapping the root.render() in a tick method like below work?

```
const root = ReactDOM.createRoot(document.getElementById('root'));

function Clock(props) {
  return (
    <div>
      <h1>Hello, world!</h1>
      <h2>It is {props.date.toLocaleTimeString()}.</h2>
    </div>
  );
}

function tick() {
  root.render(<Clock date={new Date()} />);
}

setInterval(tick, 1000);
```
Forgive me! I'm a beginner :)
Practice really helps
Tags: beginners, programming
Published: 2022-05-10 13:55:35

This post is for those brothers and sisters who took programming but can't seem to find a way. There is no way I can tell what you are doing and what you are doing wrong. I just wanna say don't give up. I went to test my python skills on leetcode and found out i suck at coding lol. I tried the same code with bugs hoping it would magically work. Almost forgot how to make a For loop. Messed up a simple index. After all the times i got stuck and all the times i was ready to give up, I just looked away from the monitor took a deep breath and looked at the code after a few minutes and suddenly everything makes sense.

What I am trying to say is don't leave something just because you learned it once. Keep learning until you can solve bugs in your dream.
I bootstrapped Hacker News for Dev-tools with Astro and GitHub Discussions
Tags: tooling, news, discuss
Published: 2022-05-10 13:46:43

👋 Hey DEV Community,

I'm a developer who works at a [super early stage deep-tech & dev-tool venture fund](https://lunar.vc). I see a lot of new cutting edge developer tools in my job and thought I'd start a small side project where I share some of the best tools with the community.

The project is called [Starstruck.dev](https://starstruck.dev) and it is a Hacker News-like site that covers the latest and greatest frameworks, databases, terminals, ml-tools etc.

I bootstrapped the site with [Astro](https://astro.build/) - a new static site builder - using GitHub Discussions as a back-end to add community features like commenting and up voting.

If you could take a look at the site and let me know what you think, I would really appreciate it. :) 

Particularly what kinds of content you would like to see featured would be helpful.

If you like the site dont forget to leave a star <3

Thanks again for your time and have a great day!
Minimum Light Radius
Tags: cpp, programming, algorithms, 100daysofcode
Published: 2022-05-10 13:40:55

# ****Minimum Light Radius****

# Description

You are given a list of integers `nums` representing coordinates of houses on a 1-dimensional line. You have `3` street lights that you can put anywhere on the coordinate line and a light at coordinate `x` lights up houses in `[x - r, x + r]`, inclusive. Return the smallest `r` required such that we can place the `3` lights and all the houses are lit up.

**Constraints:** 

- `n ≤ 100,000` where `n` is the length of `nums`

## Example 1

### Input

```
nums = [3, 4, 5, 6]
```

### Output

```
0.5
```

### **Explanation**

```
If we place the lamps on 3.5, 4.5 and 5.5 then with r = 0.5 we can light up all 4 houses.
```

---

# Intuition

### **High-precision binary search**

**1. Radius from 0 to the farthest house.**

**2. Try middle point each time;**

**3. The range is from the last house, which can't be lightened to 2 * radius, so the farthest point can be lightened is `right = nums[idx] + 2 * r`.**

# Implementation

```cpp
const int lights = 3;
const double eps = 1e-6;
int canLitUp(vector<int>& nums, double r) {
    int right = -1, count = 0;
    for (int i = 0; i < nums.size(); i++) {
        if (nums[i] > right) {
            count++;
            right = nums[i] + 2 * r;
        }
    }
    return count <= lights;
}

double solve(vector<int>& nums) {
    sort(nums.begin(), nums.end());
    double l = 0, r = nums.back() - nums[0];
    while (r - l > eps) {
        double mid = (l + r) / 2;
        if (canLitUp(nums, mid))
            r = mid;
        else
            l = mid;
    }
    return r;
}
```

## Time Complexity

- Time: O(nlogn)
- Space: O(1)
Healthy snacks ideas? (office)
Published: 2022-05-10 13:33:10

I'm looking to find some healthy snacks idea for the office.

All of the healthy 0-guilt food that I have by now is:

- Baby cucumber 

- Baby carrots

- Sparkling water 

## Help please :)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8ebxl5fspm57kudc371.jpg)
What Is the Difference Between Deep Links and App Links?
Tags: webdev, android, ios, tutorial
Published: 2022-05-10 13:13:25

An App Link is a deep link based on your website URL that has been validated to belong to your website, whereas a deep link is an intent filter system that allows users to immediately access a certain activity in an Android app. When a user clicks on that URL, your app will launch.

Here is a more detailed explanation of each of these topics, with real-life examples:

## What is Deep Links?
Deep links are a navigational concept that allows users to move between the web and apps. They are essentially URLs that route visitors to specific information in applications.

## What is App Links?
App Links, commonly known as Android App Links, enable an app to declare itself the default handler of an application domain or URL. Unfortunately, it is only compatible with Android versions 6.0 (API level 23) and higher.

## Deep Links Used for App Content
When a user clicks a URL, the Android system tries each of the steps below in succession until the request is successful:

1. If one is specified, open the user's favorite app that can handle the URI.
2. Open the only program that can deal with the URI.
3. Allow the user to choose an app from a drop-down menu.

I hope you can now understand the difference between a deep link and an app link.

[Subscribe to our newsletter](https://www.developernoon.com/#/portal) to receive exclusive & premium programming content for FREE.
JavaScript - Set
Tags: bfe, javascript, programming
Published: 2022-05-10 13:06:07

#### Set

<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set">Set - MDN</a>

The `Set` object lets you store unique values of any type, whether primitive values or object references.

```js
let set = new Set();
set.add(1);
set.add({ name: "kitty" });
console.log(set); // { 1, { name: 'kitty' } }
```

`Set` objects are collections of values. You can iterate through the elements of a set in insertion order. A value in the `Set` <b>may only occur once</b>; it is unique in the `Set`'s collection.

```js
// A value in the Set may only occur once
let set = new Set();
set.add(1);
set.add({ name: "kitty" });
set.add(1);
console.log(set); // { 1, { name: 'kitty' } }
```

Value equality: 1.`+0` & `-0` are the same(ES6); 2.`NaN` & `undefined` can also be stored in a Set. All `NaN` values are equated(NaN is considered the same as NaN, even though NaN !== NaN)

```js
//1.`+0` & `-0` are the same(ES6)
let set1 = new Set();
set1.add(+0);
set1.add(-0);
console.log(set1); // { 0 }
//2.`NaN` & `undefined` can also be stored in a Set. All `NaN` values are equated(NaN is considered the same as NaN, even though NaN !== NaN)
let set2 = new Set();
set2.add(NaN);
set2.add(undefined);
set2.add(NaN);
console.log(set2); // { NaN, undefined }
```

Constructor - `Set()`
The `Set` constructor lets you create `Set` objects that store unique values of any type, whether primitive values or object references.
Syntax - `new Set(iterable)`

```js
let set = new Set([1, 2, 3, 4, 5]);
```

Instance properties & methods

  - `size` - Returns the number of values in the `Set` object.

  ```js
  let set = new Set([1, 2, 3, 4, 5]);
  console.log(set.size); // 5
  ```

  - `clear()` - Removes all elements from the `Set` object.

  ```js
  let set = new Set([1, 2, 3, 4, 5]);
  set.clear();
  console.log(set); // {}
  ```

  - `delete()` - The `delete()` method removes a specified value from a `Set` object, if it is in the set.

  ```js
  let set = new Set([1, 2, 3, 4, 5]);
  set.delete(1);
  console.log(set); // { 2,3,4,5 }
  ```

  - `forEach()` - The `forEach()` method executes a provided function once for each value in the `Set` object, in insertion order.

  ```js
  let set = new Set([1, 2, 3, 4, 5]);
  set.forEach((element) => console.log(element)); // 1 -> 2 -> 3 -> 4 -> 5
  ```
Hello April!!!
Published: 2022-05-10 13:05:35

Hello readers! This section will narrate the happenings in the month of April as an intern.

```
WEEK 4 (April 1 - April 7, 2022) (Day 16 - 20)
```

Hi everyone! hope you have a wonderful day...
My week 4 is no difference with the other weeks yet I have different parts I finished in the website and some technical stuff I performed in other offices.

- Admission section done

- Admission Requirements for Basic Education, Tertiary, ETEEAP, Graduate School, and School of Law done.

- Checking network in a soon to re-operate office,

- Reformatting computer units.

Pictures be uploaded soon (technical error)

```
WEEK 5 (April 8 - April 20, 2022) (Day 21 - 25)
```
Hello readers! I just wanna say that this week is quiet challenging for me, not because of the task I made but because I am not in myself caused by anxiety, but thanks goodness I survived it. So lets go back to the task I made. Well, there is no new things I made, as usual the same task I'm assigned to. So here it goes;

- Academic Section (Undergraduates) done

- Academic (Graduates) done

- Academic (Basic Education) done

- Academic (LRC) done

- Reformatting computer units.

- Attending concerns to other offices with supervision.

Pictures be uploaded soon (technical error)

```
WEEK 6 (April 21 - 28, 2022)(Day 25-30)
```
Konnichiwa Minasan! this week is really exciting, you wanna know why? it is because I just want it to be exciting to lift up myself. :-D  Anyway, about my week task again, as usual the same as before, there is just a few new task that is added. Alright, lets go! read below ;-)

- Academic Section (Scholarship) done

- Academic (Cloud Services) done

- Checking and repairing in elementary computer lab.

- Reformatting units

Pictures be uploaded soon (technical error)\

```
Message from the author
```
Hi everyone! thank you so much for visiting my post. Please stay safe and have a blissful life. See you on the next post everyone. This would be the end of this section.

Please click link below for the next part..

https://dev.to/naaamae/hi-may-p8e
JavaScript - Object
Tags: bfe, javascript, programming
Published: 2022-05-10 13:03:58

#### Object

<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object - MDN</a>

An object is a collection of properties(key/value pairs). When the value is a function, the property becomes a method.
Objects can be created using the `Object()` constructor, `Object.create()` or the literal notation.

- `Object()` constructor: The `Object` constructor creates an object wrapper for the given value - `new Object(value)`
  - If the value is `null` or `undefined`, it will create and return an empty object.
  ```js
  let obj1 = new Object(null);
  console.log(obj1); // {}
  let obj2 = new Object(undefined);
  console.log(obj2); // {}
  // let obj = new Object() will do the same
  ```
  - Otherwise, it will return an object of a Type that corresponds to the given value.
  ```js
  let obj3 = new Object(2);
  console.log(obj3); // [Number: 2]
  let obj4 = new Object("hi");
  console.log(obj4); // [String: 'hi']
  let obj5 = new Object(true);
  console.log(obj5); // [Boolean: true]
  ```
  - If the value is an object already, it will return the value.
  ```js
  let obj6 = new Object({ age: 2 });
  console.log(obj6); // { age: 2 }
  ```

* `Object.create()`
  The `Object.create()` method creates a new object, using an existing object as the prototype of the newly created object.

  ```js
  const person = {
    isHuman: false,
    printIntroduction: function () {
      console.log(`My name is ${this.name}. Am I human? ${this.isHuman}`);
    },
  };

  const me = Object.create(person);

  me.name = "Matthew"; // "name" is a property set on "me", but not on "person"
  me.isHuman = true; // inherited properties can be overwritten

  me.printIntroduction();
  // expected output: "My name is Matthew. Am I human? true"
  ```

* The literal notation

```js
const object = { a: 1, b: 2, c: 3 };
```

We can access the values in an object by using `object['key']` or `object.key`.

```js
const object = { a: 1, b: 2, c: 3 };
console.log(object["a"]); // 1
console.log(object.a); // 1
```

Deleting a property from an object - `delete` operator
The JavaScript `delete` operator removes a property from an object.

```js
const Employee = {
  firstname: "John",
  lastname: "Doe",
};

console.log(Employee.firstname);
// expected output: "John"

delete Employee.firstname;

console.log(Employee.firstname);
// expected output: undefined
```