teleren/devto huggingface dataset:
How to set your rate as a freelancer?
Tags: freelance, productivity, business
Published: 2021-01-19 16:35:23

This is a very controversial topic, as well as salaries: everybody talks about it but nobody actually says anything.

I don't say I have THE answer for you (unfortunately 😞), but I'll try to give you some starting points and tips that will help you get started. As well as driving a car or running a business, you'll get better at this over time, as you get more experience.

I've been freelancing for 4 years and some simple but very important things I learned about rates are: you need to be comfortable with it (don't blame yourself that you work for too little or always be afraid that you ask too much) and you have to be realistic about it (we all want to earn more but if I'm going tomorrow and ask a client to pay me $1000 per hour he'll most probably ask me if I'm ok 😂). 

Now, that we created a bit of context around this subject, let's see how you can get started and have some actual numbers.

## Use your salary
This is a very simple technique that I present to all people asking me how to set their rate when starting freelancing. If you had a job recently, this might be a good starting point for you. 

Let's assume you'll work 8h/day. Take your annual gross salary (**NOT** net salary) and divide that by 40hours/week * 52weeks/year.
*Example*
$100,000(salary) / (40(hours/week) * 52(weeks/year)) = 100,000/(40*52) = 100,000 / 2080 = ~$48/hour

I've made a very [simple rate calculator](https://statescu.net/rate-calculator) starting from this formula on my website.

After your first year as a freelancer, you start having some numbers that you can use to improve this rate.
You can see how much money you made, how much you paid in taxes, what other expenses you had (bills, subscriptions, equipment, etc).

Take those numbers, determine how much you need to make this year, and input those in the [rate calculator](https://statescu.net/rate-calculator) to see your hourly rate. 

As you start freelancing, you might now see many expenses but let me tell you some common ones:
* Rent
* Bills for telephone, internet, utilities
* Software and service subscriptions 
* Taxes
* Marketing costs
* Legal and accounting costs
* Courses

If you want to reach me, check out [my website](https://statescu.net).
LiteSpeed Turbo Active Code
Tags: litespeed, wordpress, wpspeedexpert
Published: 2021-01-19 16:21:57

<IfModule LiteSpeed>
    CacheEnable public
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^GET|HEAD$
    RewriteCond %{HTTP_HOST} ^site.com [NC]
    RewriteCond %{REQUEST_URI} !login|admin|register|post|cron
    RewriteCond %{QUERY_STRING} !nocache
    RewriteRule .* - [E=Cache-Control:max-age=300]
</IfModule>

Follow:https://www.fiverr.com/share/3baY3x
Let's Code Kotlin: For & While
Tags: kotlin, android
Published: 2021-01-19 16:04:17

---
title: Let's Code Kotlin: For & While
published: true
description: Fors and Whiles in Kotlin are pretty similar to their Java counterparts. Let's go over them so you can become proficient in Kotlin!
tags: kotlin, android
cover_image: https://www.gatling.xyz/content/images/2021/01/20210110_021221_0000.png
canonical_url: https://www.gatling.xyz/blog/2021/01/18/lets-code-kotlin-for-while/
---
Last week I went over [If, Else, And When](https://dev.to/gatlingxyz/let-s-code-kotlin-if-else-when-1p9). This week I explore two more pieces of Kotlin syntax. Lucky for us, they are almost equivalent to their Java counterparts: `For` and `While`. The latter may seem new, but you'll come to find that it's an old concept with a new name.

# For
You can loop through a collection in Kotlin similar to how you can in Java.

```Kotlin
for (spell in spellbook) {
	print("${spell.name}")
}
```

If you don't need anything more advanced, this will work for you just fine in many cases without any added complexity. Actually, you can perform this version of looping in another way by making use of a convenient extension function on Collection: `forEach`.

```Kotlin
spellbook.forEach {
	print("${it.name}")
}

spellbook.forEach { spell ->
	print("${spell.name}")
}
```

In the first example, `it` is the default name for each item in the collection. The second example shows you how to rename `it` to something a bit more specific.

Looping through a range of numbers is a bit different. You may be used to writing `for (int i = 0; i < 10, i++)`. That's not a complex thing to write, but it's much simpler in Kotlin.

```Kotlin
for (i in 0..10) {
	// this will loop, from 0 to 12, inclusive.
}
```

Despite being simpler, however, I find that I almost never loop through things like this. In Java, it was customary to start at 0, go until the size of the list, incrementing by one each time. In the code block of that for loop, I'd make a variable for the item at the given index. I've abandoned this method in Kotlin. I think I've used it *maybe* once; I find myself using the `.forEach` extension method more.

It's worth noting that ranges can get complex. They're not too difficult and open up some possibilities that could be useful, like looping from ten to zero but only going through the even indices. Again, I don't loop through ranges anymore, but it's interesting to see how this differs from its Java implementation.

```Kotlin
for (i in 10 downTo 0 step 2) {
    // this will loop from 10 to 0, but only the event numbers, inclusive
}
```

You can find more documentation on For loops on the [official Kotlin page](https://kotlinlang.org/docs/reference/control-flow.html#for-loops) (and also the page about [Ranges](https://kotlinlang.org/docs/reference/ranges.html)).

# While
For the sake of completion, `while` and `do while` are pretty much exactly like they are in Java.

```Kotlin
while (x > 10) {
	x += 2
}
```

```Kotlin
do {
	update()
) while (x != 3)
```

Short and simple! Check out my other posts and stay tuned for more Kotlin tips!
Writing an Env Setup Script
Tags: node, javascript, env, setup
Published: 2021-01-19 16:02:53

The other day, I decided to make a setup script for wasteof.money. If you don't know what wasteof.money is, check it out at dev.wasteof.money!
To start, I wanted to write to .env. The script I wrote for that simply wrote to .env using fs.

```js
const fs = require("fs");
fs.writeFile(".env", `DB_URL=`, "utf8", function () {
  console.log("Got it!");
});
```

Then, I wanted to have the user be able to put in inputs. For that, I used the prompts package from NPM. My code now looked like this:

```js
const prompts = require("prompts");
const fs = require("fs");
(async () => {
  const response = await prompts([
    {
      type: "text",
      name: "url",
      message:
        "What is your MongoDB URL? (If you are using MongoDB Atlas, you can keep the <> values)",
    },
    {
      type: "text",
      name: "port",
      message: "What port should the site run on?",
      initial: 8080,
    }
  ]);

  fs.writeFile(
    ".env",
    `DB_URL=${response.url
      \nLISTEN_PORT=${response.port}`,
    "utf8",
    function () {
      console.log("Your settings have been written to .env!");
      console.log("Run npm run serve to start the server or npm run dev to start it with nodemon.");
    }
  );
})();
```

At this point, the code was working, but it still didn't satisfy me. I wanted the user to be able to input a password and have that switched out with the <password> value from MongoDB Atlas.

I decided that it should also ask the user if they are using local, or Atlas. My final version looked like this.

```js
const prompts = require("prompts");
const fs = require("fs");
require("dotenv").config();
const port = process.env.LISTEN_PORT || 8080;
const url = process.env.DB_URL || "localhost/social";

(async () => {
  const response = await prompts([
    {
      type: "text",
      name: "url",
      message: "What is your MongoDB URL? (If you are using MongoDB Atlas, you can keep the <> values)",
      initial: url,
    },
    {
      type: "select",
      name: "value",
      message: "Pick a hosting type",
      choices: [
        {
          title: "MongoDB Atlas",
          description: "MongoDB Atlas cloud hosting",
          value: "atlas",
        },
        {
          title: "Local MongoDB",
          value: "local",
          description: "A local MongoDB instance",
        },
      ],
    },
    {
      type: (prev) => (prev == "atlas" ? "password" : null),
      name: "password",
      message: "What is your MongoDB Password?",
    },
    {
      type: "text",
      name: "port",
      message: "What port should the site run on?",
      initial: port,
    },
  ]);

  fs.writeFile(
    ".env",
    `DB_URL=${response.url.replace("<password>", response.password).replace("<dbname>", "social")}\nLISTEN_PORT=${
      response.port
    }`,
    "utf8",
    function () {
      console.log("Your settings have been written to .env!");
      console.log("Run npm run serve to start the server or npm run dev to start it with nodemon.");
    }
  );
})();
```
Day 26 Of 100DaysOfCode: Class Inheritance
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-19 16:02:32

Today is my 26th day of #100DaysOfCode and #python. Today I revised python basic, iterator, map, filter, reduce function, generator and class on python.

Tried to write some code on python class. Below is the code in class inheritance.

# Class Inheritance
Inheritance is the capability of one class to derive or inherit the properties from another class. There are many benefits of inheritance it represents real-world relationships well. It provides reusability of a code. We don’t have to write the same code again and again. Also, it allows us to add more features to a class without modifying it.
It is transitive in nature, which means that if class B inherits from another class A, then all the subclasses of B would automatically inherit from class . My simple code which I tried to write is given below.

```python
class Classroom:
    def __init__(self,subject):
        self.subject = subject
    
    def getSubject(self):
        return self.subject
    def isCompulsory(self):
        return True
    def isOptional(self):
        return True
    
class Compulsory(Classroom):
    def isCompulsory(self):
        return False
class Optional(Classroom):
    def isOptional(self):
        return True
    
    
sub1 = Classroom("Science")
print(sub1.getSubject(),sub1.isCompulsory())

sub2 = Compulsory("Optional_Math")
print(sub2.getSubject(),sub2.isCompulsory())

sub3 = Optional("Computer")
print(sub3.getSubject(),sub3.isOptional())
```

When this code is run it give following output

```python
Science True
Optional_Math False
Computer True
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 26 of <a href="https://twitter.com/hashtag/100DaysOfcode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfcode</a> and <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <br>* More About Class<br>* Learned About Bubble Sort<br>* Revised python basic<br>* Class inheritance<a href="https://twitter.com/hashtag/100DayOfcode?src=hash&amp;ref_src=twsrc%5Etfw">#100DayOfcode</a>, <a href="https://twitter.com/hashtag/CodeNewbies?src=hash&amp;ref_src=twsrc%5Etfw">#CodeNewbies</a> ,<a href="https://twitter.com/hashtag/beginner?src=hash&amp;ref_src=twsrc%5Etfw">#beginner</a> ,<a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <a href="https://t.co/OBxFoNWcu4">pic.twitter.com/OBxFoNWcu4</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1351558192988241923?ref_src=twsrc%5Etfw">January 19, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Open source URL Shortener of the future. Looking for open source contributors.
Tags: opensource
Published: 2021-01-19 16:01:16

I created Short Shortnner, an open-source URL Shortener. Any one can contribute to it as it's open source. Here's the link:

https://github.com/dingus45191/shortnner-production

Blog https://github.com/dingus45191/short-shortnner-blog in Next JS.



Get started by opening a pull request or creating an issue!

Help Short Shortnner stand out from other URL Shorteners and win by contributing!
And We're Live!
Tags: wordpress, github
Published: 2021-01-19 15:59:23

Over the last few months we have been testing, adding new features and getting ready for the big launch.

Its finally here with automated theme and plugin updates, run via gitlab action workflows.

We still have much more we are working on that will be coming in the future:

1. mu-plugin updates
2. Gitlab, Bitbucket, Travis and Circle CI integrations
3. Auto update disabler plugin for plugins managed by WP Git Updater
4. Auto merging updates

Additionally in the coming days we will be launching our Docker based WordPress development environment we use internally for WordPress development.

As part of the launch we are offering you a massive **40% discount** on any of the subscription plans **FOREVER**.

Simply use the coupon code **LAUNCH** when subscribing.

But don’t wait too long, the **LAUNCH** coupon expires the 28th of February.

Before then you can take advantage of the 10 day free trial offered for new users.

Once again thank you for your interest in WP Git Updater, if you need support, want to request a feature, or just catch up please don’t hesitate to let us know

[Signup Today!](https://wpgitupdater.dev/register)
How it's going so far
Tags: codenewbie, beginners, python
Published: 2021-01-19 15:56:25

It's been 3 weeks since I last posted so I am due for an update. Progress was slow and intermittent to start with but things are beginning to build some momentum. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tqlp5yt8hv5dxweefmpc.gif)

I am currently working my way through Colt Steele's Modern Python 3 Bootcamp and Angela Yu's 100 Days of Python on Udemy. My goals were to do some coding every day but it has taken some trial and error to get settled into a consistent flow. I also have a few Python books to supplement my learning or to use as a reference. These are also easier to pick up and put down if I am potentially going to be interrupted. 

I work three 12-hour night shifts each week and these are the hardest days to do any coding. My goal for those days is an hour while my days off, I hope to get no less than 4 hours in. There are 3 days of the week that my kids stay with me. There are some weeks when the schools are closed due to COVID and they stay home with me. When that happens, I've found that if I get everything else done (cleaning, laundry, next day prep, etc.), I can usually get a few decent hours of studying in after they go to bed (depending on how fatigued I am). If they go to school, as will be the case this week, I have a solid block of time during the day that I can be very productive. 

I've also spent some time this past week getting my workspaces setup to my liking. This week, I scored an LG Ultrawide monitor that is awesome for workflow. I was previously using my iPad as a second monitor to watch the Udemy videos. Now I have have my browser, Sublime, terminal, and Notion open, in view, and with room to spare. Here's a list of what I current am playing with:

**Apple shiz:**
2015 Macbook Pro with 2.8 GHz i7, 16 GB RAM, 512 GB Storage
iPad Air 3
iPhone 12 Pro Max
Airpods Pro

**Monitors:**
LG 34uc98 Ultrawide
LG UltraFine 4K Display

**Keyboards:**
Logitech MX Keys
Keychron K2
Keychron K6

**Mouse:**
MX Master 2 and 3

**Chair:**
Autonomous Ergo Chair

**Desk Decorations:**
NECA Godzilla
Gundam RX-78
Death Trooper from Rogue One
Various Funko pops
Build An Pexels Clone  Website Using HTML CSS & JS | Create Full Website In 2021
Tags: html, css, javascript, codepen
Published: 2021-01-19 15:48:50

Design A Pexels Clone  Website Using HTML CSS & JS | Create Full Website In 2021

demo ==> https://codepen.io/Bilal1909/full/PoGLYyM

 <img src="https://i.postimg.cc/dVtwJdXP/clone.png">

 <img src="https://i.postimg.cc/zvcS3Tjt/screenshot-codepen-io-2021-01-19-20-24-01-294.png">
Cara Cek Kuota Internet Indosat Dengan Mudah, Terbaru 2021
Tags: kuota, indosat
Published: 2021-01-19 15:29:22

Smartphone yang kehilangan pulsa ataupun paket informasi memanglah hendak menewaskan Kamu. Di jaman saat ini dimana seluruhnya merupakan ponsel pintar, pulsa serta paket informasi internet wajib dicermati. Terlebih, siklus billing paket informasi umumnya dicoba seminggu sekali ataupun sebulan sekali. Bila paket informasi habis tanpa disadari, sisa pulsa Kamu bisa jadi tidak hendak bermanfaat.

Dengan begitu, disini aku hendak membagikan metode cek paket Indosat dengan gampang serta kilat:

Metode Cek Kuota Internet Indosat

1. Cek Kuota Internet Indosat Ooredoo via Kode Dial

•	Pada menu panggilan, masukkan* 363#, kemudian tekan OK/ CALL/ YES.

•	Pilih opsi 2 buat Internet/ telp/ sms, kemudian seleksi 8 buat status serta data, serta seleksi 1 buat pengecekan kuota.

•	Harap tunggu sebagian dikala sampai timbul jendela pop- up dengan data tentang sisa kuota internet.

2. Cek Kuota Internet Indosat Melalui SMS

•	Pada menu SMS, ketik USAGE, kemudian kirim SMS ke no 363.

•	Tunggu operator mengirimkan SMS balasan terpaut kuota Internet Indosat Ooredoo Kamu.

3. Cek Kuota Internet Indosat Ooredoo via Aplikasi

•	Seperti halnya pengecekan pulsa Indosat Ooredoo, bila telah mendownload aplikasi MyIM3 serta mendaftar, lumayan buka aplikasi serta cek sisa kuota internet Indosat Ooredoo.

•	Selain mengecek bermacam data terpaut kartu yang Kamu pakai, Indosat pula sering mengadakan promosi, kuis serta bermacam program menarik di aplikasi MyIm3. Oleh sebab itu, yakinkan buat mengunduh serta mencantumkan aplikasi supaya lebih gampang.

Metode Cek Status Paket Internet Indosat Yang Digunakan

1. Cek Status Paket Internet Indosat via SMS

•	Pada menu SMS, ketik STATUS, kemudian kirim SMS ke 363.

•	Tunggu operator mengirimkan SMS balasan terpaut status paket aplikasi Internet Indosat Ooredoo.

2. Cek Status Paket Internet Indosat via Dial Kode

•	Pada menu SMS, ketik STATUS, kemudian kirim SMS ke 363.

•	Tunggu operator mengirimkan SMS balasan terpaut status paket aplikasi Internet Indosat Ooredoo.

Baca juga : https://abduweb.com/cara-transfer-pulsa-indosat-ke-telkomsel/


Demikianlah panduan pendaftaran ulang kartu Indosat Ooredoo dengan gampang serta kilat. Bila Kamu menemui hambatan dikala mendaftarkan no Indosat, coba konsultasikan ke konter terdekat ya serta terimakasih.
15 Code Snippet Website For Developer
Tags: html, css, javascript, webdev
Published: 2021-01-19 15:13:53

Code Snippet is where you can find solutions to problems in FrontEnd and Backend programming. In addition, we can also learn more about how to solve these problems from other programmers when having problems in website development. Now you and I go to learn the top code snippet website in 2021.
https://en.niemvuilaptrinh.com/article/code-snippet-website
Is this element a descendant of another?
Tags: javascript, frontend
Published: 2021-01-19 14:49:56

###**The Problem**
Recently I was charged with ironing out the functionality of a custom modal which houses a form. I had to be able to open the modal with a button, and close it one of two ways: click outside of the modal, or submit the form.

###**The Thought Process**
Initially I thought it'd be simple! Just write some conditional logic, checking the class of each element in the form. If the event target doesn't have any of those classes, then the modal can be closed. If the submit button is targeted, close the form. But it wasn't this simple...

Reason being that this project includes third-party framework - **Select2** - which was generating a dropdown that was positioned absolutely on the page and was not a descendant of my modal! Now, I could have written some JavaScript to add class selectors to those elements on page load, but this seemed inefficient. That's when I decided I had to traverse the DOM a bit.

###**The Solution**
I ended up writing a single function that took two arguments: the target element and the parent I need to check for. The function returns true is it's a descendant of the parent, false if not.

```javascript
function isDescendant(el, selector) {
  let isChild = false;
  /* 
  if the target element *is* the parent 
  I'm looking for, return true 
  */
  if (el.id === selector) {
    isChild = true;
    return isChild;
  }
  /* 
  this loop travels upward from the target element
  until it reaches the parent I'm searching for
  and returns true
  */
  while (el = el.parentNode) {
    if (el.id === selector) {
      isChild = true;
      return isChild;
    }
  }
  /*
  if neither of the above cases occur, return false.
  The target element is not a descendant.
  */
  return isChild;
}
```

And there you have it! This function was incredibly helpful in getting my form modal to function properly. Hopefully it can be a bit of help to you too!
Starting web development in 2021
Tags: beginners, webdev
Published: 2021-01-19 14:27:46

If you want to start web development in 2021, you might be pretty overwhelmed 🙄.

Here I'm walk you through a handy roadmap to start web dev as a complete beginner.

### Hold Tight 🦉

Okay, so first thing first if you want to start web dev, you are going to be a programmer which mean you'll write some code and for writing code you'll need a code editor.

__A quick note ⚠__

_If you are going to use notepad for writing code, leave it right now. You are going to be a programmer, not a typewriter._

You need a code editor which designed for programmer.

A code editor not only help you to write code but also improve your programming experience.

There are lot of code editor and you don't have to try them all.

Try VS Code, the only best code editor.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kbfxnicx171j7gfix772.png)

__Now__, if you don't know thing you see on web are build upon three key element
__HTML__, __CSS__, and __JavaScript__

## __HTML__ , _building block 🧱 of web page_
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jgil51m4lxvtdkusiluf.png)

Everything you see on web is written is HTML, like an image, button, text, shapes etc.

So start learning HTML which you can easily learn in a couple of week.

## __CSS__ , _styling 🎨 the web__
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z7pn4d2x7odzxhz88vdw.png)

After learning HTML, you're going to use CSS(Cascading Stylesheet)
CSS help to style HTML element like align them, changing font-style, background-image, color, position and much more.

It takes you 2-3 week 📅 to learn CSS, so you can build something with HTML and CSS 👨‍🎨.

## __JavaScript__ , _programming 👨‍💻 the web__
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qr8rmxdvx6gghf5m04kr.png)

Now, after learning HTML and CSS, you are going to learn the only programing language of a webpage.

JavaScript help you to make a webpage even dynamic.

It takes you 10-12 month to learn JS, so you can call yourself a programmer.

## So what next
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/awm1to6h2x728xcn2yex.jpg)

Now its time to build some project with all the thing you've learn.

Building project not only help you think like a programmer but also takes your programming skill to next level.

So, bang 💥 on your keyboard and get your hand dirty by building recipe 🍴 with programming.

### Thanks for reading. Have a good day 😎
PHP Projects Free Download
Published: 2021-01-19 14:19:49

Free PHP project with source code download at PHPTPOINT. We provide a free PHP project with MySQL for those students who want to learn more and create a full-featured web application. Students can easily free to download PHP projects on our website.
PHP is one that mostly used to create a web application either static or dynamic. Around 75% PHP is used to create a website.
If you are looking for the best, innovative free PHP project download with source code then you visit PHPTPOINT. To know more visit here https://www.phptpoint.com/projects/