teleren/devto huggingface dataset:
Tips and Guide to Grow Your Discord Server
Published: 2022-08-05 12:01:00

Are you planning to create your own discord server? Or are you looking for a way to grow your discord server? If so, you have come to the right place. It can be difficult to launch your server and hard to obtain many users to join your server. However, there is no need to worry because this article will help you. After reading this, you can apply these tips to gain more users. Yes, it's hard at first, but you'll be getting more users in no time. 

**Tip 1: Branding**
You must choose the right logo on your discord server. It must be relevant to the type of server. A creative logo can bring more users to your server. Make sure your logo reflects the personality of your server. 

**Tip 2: Be active in your Community**
Keep your server active at all times, talk with your members regularly. Tell some interesting stories and topics. Humor in the chatbox is an effective way to accumulate and retain more users on the server. 

**Tip 3: Advertise your server in [Discord Servers](https://discordhome.com/) Listing**
There are many [discord servers lists](https://discordhome.com/) that you can advertise your discord server in. This helps you grow your server and gain more members.

**Tip 4: Bots**
A discord server without a bot is boring. Some bots in discord are entertaining can boost your user count. It also adds functionality to your server. 

**Tip 5: Custom [Discord Emotes](https://discordhome.com/emojis) and [Discord Emojis](https://discordhome.com/emojis)**
It is recommended that you make use of emotes and emojis to liven up your discord server. It can bring a positive impact to your server and make it less boring. 
How to find emotes and emojis
You can add emoji or emotes to your discord server by using the emoji menu. If you own the server, you have the permission to add custom emoji and emotes. Many websites offer free emotes and emojis to download or use custom emojis in other Discord servers.
how does this gauge dev's capability to work on .NET Web app ?
Published: 2022-08-05 11:55:26

Curious to know - how would the following piece of code gauge my ability to code a .NET API project. This is a genuine question. I did not know the answer, took me a minute after the interview. 

There was an error on the third line. Not sure if it was my IDE. Anywho any ideas. 

```
byte foo = 100; 
dynamic blue = foo;
Console.WriteLine(Type.GetType(blue));
blue += 100;
Console.WriteLine(Type.GetType(blue));
Console.ReadKey();

```
Joins In SQL Server mesameergaikwad
Tags: mesameergaikwad, sameergaikwad1996, sql, database
Published: 2022-08-05 11:39:00


[sameer gaikwad types of joins, Inner Joins, Left Outer Joins, Right Outer Joins, Full Outer Joins, Cross Joins and Self Joins - mesameergaikwad](https://mesameergaikwad.blogspot.com/2022/03/joins-in-sqlserver.html)

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



[Joins In SQL Server mesameergaikwad](https://mesameergaikwad.blogspot.com/2022/03/joins-in-sqlserver.html)
The joy of things that are unmatched
Tags: programming, webdev, softwaredevelopment, motivation
Published: 2022-08-05 11:35:25

👉 Creating something useful
👉 Completing a project and watching it go live
👉 Recieving positive feedback for your hardwork
👉 Your product is enabling people to grow and pay their bills
👉 Seeing yourself achieve goals that you never knew you could

Stay humble and enjoy the journey while you are here!
Sending validation errors through a Formik form
Tags: javascript, react, typescript
Published: 2022-08-05 11:29:00

When we need to validate a Formik form (often with Yup) we can use the following method: validateForm.
It returns a promise so we have to check if it resolves or not.
However, the validation errors are sent directly inside the promise as an argument and not caught. So the promise is always resolved in this case.

To pass the validation error, then, we have to pass the errors as an argument of the promise itself.

```js
  formik.validateForm({...})
    .then((errors) => submit(formik, values, errors))
```

Then the errors can be checked and the logic can be written in the submit method.

```js
const submit = (formik, values, errors) => {...}
```

Bonus: here are the types (for TS users) for the 3 arguments above:
```js
formik: FormikContextType<FormikValues>
values: FormikValues
errors: FormikErrors<FormikValues>
```

Thank you for reading, and let's connect on [Twitter](https://twitter.com/AlexBuaiscia)!
What is Npm
Tags: javascript, webdev, npm, node
Published: 2022-08-05 11:24:53

Npm stands for **Node package manager**. npm is a package manager for the JavaScript programming language. it is default package manager for the JavaScript runtime environment Node.js
Npm consists of components 
 Command line client also called npm
 Online database for public and paid for private packages 
 called npm registry

**What can do with npm ?**
 npm allow us to new package from the registry. also it allow 
 us to discover and publish new node packages.

**What is Package?**
A package in Node.js contains all the files you need for a module. Moudles are JavaScript libraries you can include in your project.

**Install new package**
To install new package, you use the command `npm install`

```
npm install <package-name>
```
**How to Update Package**
To update the package installed install locally in your nodejs project write the following command 

```
npm update <package-name>
```
**What is package.json ?**
Every project in JavaScript whether it is nodejs or a browser application can be scoped as an npm package with its own package information and its package.json job to describe the project.

we cna think of package.json as stamped labels on those npm good boxes that our army of wombats delivers around.

package.json will be generatied when npm `npm init` is run to initialise a javaScript/Node.js project, with these basic metadata provided by developers:
Example: 

```
{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.3.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
```
**What is Dependencies**
When you install an npm package using `npm install <package-name>`, you are installing it as a dependency. the package is automatically listed in the package.json file, under the dependiecies list
How We Grew Out of Bootstrap
Tags: webdev, css, html, web3
Published: 2022-08-05 11:13:45

When we started our redesign of the Cheezburger network we had the daunting task of building a front-end framework that met the needs of not only our developers but our vast network of sites. After many meetings, grueling discussions and attempts at DIY we finally choose [twitter] Bootstrap. It was the ‘it’ framework and had just reached its 2.0 milestone, so why not?

Going into this we had no idea how to take bootstrap and make it Cheezburger. We initially tried to “extend” Bootstrap by overriding styles in our own chzboot library. This proved to be less than ideal since we were duplicating code for everything we wanted to extend. Eventually, we merged our changes with Bootstrap core and forfeited any upgrade path to newer versions.

Our own pseudo fork of Bootstrap has worked well throughout. However, as our design has changed and matured we have begun to migrate away from the Bootstrap core components and build our own. It was nice to have Bootstrap to fall back on when we needed a quick UI treatment for something, but now we have our own style guide and documentation around what components to use and how to use them. If something isn’t in the style guide then we need to build and add it to the bucket of things that can be reused later.

It has become difficult to develop our own components along with maintaining existing Bootstrap based components. Finding parity between what Bootstrap offers and the needs of our sites is the one thing that has effectively driven us away from continuing to use Bootstrap as our core foundation. We have talked about completely removing anything Bootstrap from our code and rewriting components, but that is a task that isn’t logical at this time. Eventually, as we continue to mature our code Bootstrap will play less of a role.

Ultimately we grew out of bootstrap not because it’s a bad framework but because we grew up, we started needing things that were not in its core. We changed so much it didn’t make sense to continue to maintain a connection to the core library. We have maintained many of the naming and structural conventions that bootstrap employs but we don’t rely on its library of UI elements.

One thing I didn’t mention, when we made the decision to use Bootstrap over creating our own I pushed for it out of fear of “re-inventing the wheel”†. Throughout this experience I have come to believe you should not fear re-inventing the wheel, you should fear using a round wheel when you need a square one.
Setting up Nuxt3 for Scale with Turborepo and TDD
Published: 2022-08-05 11:09:14

---
title: Setting up Nuxt3 for Scale with Turborepo and TDD
published: true
description: Using test suites, reusable components and multiple apps - turn your nuxt3 repo into an agency.
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

{% embed https://youtu.be/Q6CK3LyYqmM %}
Write a program by creating an 'Employee' class having the following methods and print the final salary.
Tags: ds, webdev, interview, beginners
Published: 2022-08-05 11:06:39

**this is also a question part** 

**1 - 'getInfo()' which takes the salary, number of hours of work per day of employee as parameter**

**2 - 'AddSal()' which adds 10 to salary of the employee if it is less than 500.**

**3 - 'AddWork()' which adds 5 to salary of employee if the number of hours of work per day is more than 6 hours.**


Hello Everyone 👋

You must be seeing the above question. So here we discuss the problem 

There is some few step which we hove do it-

1. First we will create a Employee class

2. Create a 3 methods which is mention the about question 
     
   . First method getInfo()
   . Second method AddSal()
   . third method AddWork()

3. here we create one more method that is final salary() which give use the employee salary 


Here is the Ans of this Problem 

```
class Employee:

    def __init__(self,name):
        self.name=name

    def getInfo(self,salary,hours):
        self.salary=salary
        self.hours=hours

    def AddSal(self):
        if self.salary<500:
            self.salary+=10
            return self.salary
    def AddWork(self):
        if self.hours>6:
            self.salary+=5
            return self.salary

    def print_final_salary(self):

        print(self.name,self.salary)


name=str(input("enter name:"))
salary=int(input("Enter Salary:"))
hours=float(input("enter hours:"))

emp=Employee(name)
emp.getInfo(salary,hours)
emp.AddSal()
emp.AddWork()
emp.print_final_salary()
```
 
I hope you like will help you for your DSA interview preparation 

Thank You
Shivani Tiwari
New Things Added - Laravel 9.23 Released
Tags: laravel, php, webdev, programming
Published: 2022-08-05 11:03:40

Let's get started quickly I found new things in Laravel 9.23 Released I wanted to share with you.

- Artisan docs command
https://github.com/laravel/framework/pull/43357

new amazing artisan docs command, giving developers quick access to website documentation from the command line
```php
# Opens a choice dialog you can use to type what you want
php artisan docs
 
# Opens the validation docs
php artisan docs validation

php artisan docs validation unique
 
# partial searches, will open the unique validation rule
php artisan docs va un
```

- Delete a model quietly

method to delete a model from the database without raising any events
```php
use App\Models\Flight;
 
$flight = Flight::find(1);
 
$flight->deleteQuietly();
```

- Conditionable trait added to Filesystem adapters
https://github.com/laravel/framework/pull/43449

adding the Conditionable trait to Filesystem to allow you to use when() and unless() methods
```php
Storage::disk('public')
    ->when(true)
    ->delete('StardewTaylor.png');
```

- Add whereNot method to Fluent JSON testing matchers
https://github.com/laravel/framework/pull/43383

I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://laravel-news.com/laravel-9-23-0
Source :- https://www.youtube.com/watch?v=Fv_GgcK6pZ0
Source :- https://www.youtube.com/watch?v=OzXgrQfKjbk
3 macos settings to boost your productivity
Tags: osx, productivity, programming, devex
Published: 2022-08-05 10:32:00

# Caps lock position 

Unless you're a manager and have to scream on people at the slack caps lock is a useless key. In macos you can easily replace it with the esc key.

Why? To press esc you have to move your wrist.

<img width="100%"  src="https://media.giphy.com/media/nYo1kdLNfV27MAClI2/giphy.gif">

You only need a finger to press caps lock key. 

<img width="100%"  src="https://media.giphy.com/media/rUYm88Rs73RtIvWo6i/giphy.gif">

For some macbook users this is the only way to get the physical esc key ;)

# Keyboard speed

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

Now arrows will move pointers faster. 

<img width="100%"  src="https://media.giphy.com/media/sGZ5pRXjHrnXxiJSMP/giphy.gif">

I know that it doesn't sound like a huge upgrade, but saving a few seconds a day can bring you tangible benefits throughout your career :)

# Dock

You don't need the Dock. At all. Unfortunately there's no way  to remove it, but we can make him as small as possible.

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

Instead of Dock I suggest using spotlight/[alfred](https://www.alfredapp.com/) and [amethyst](https://ianyh.com/amethyst/) - great tiling window manager.

# Cursor color [Edited]

When you work on many monitors sometimes detecting cursor position takes some time. You can change the cursor color to more visible, e.g. red.

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

# Summary

I can not guarantee that you will like these options. I'm using it in my daily tasks and I love it.
C # da tanlash tanlash operatorlari
Published: 2022-08-05 10:00:44




Oy raqami kiritiladi shu oy raqami qaysi yilga tegishliligini topadigan dastur tuzing 

```cs
int oy ;
oy = int.Parse(Console.ReadLine()!);
switch (oy)
{
    case ( 12 or 1 or 2):
    Console.WriteLine($"winter");  break;
    case ( 3 or 4 or 5):
    Console.WriteLine($"spring");  break;
    case ( 6 or 7 or 8):
    Console.WriteLine($"summer");  break;
    case (9 or 10 or 11):
    Console.WriteLine($"autumn");  break;
    default : Console.WriteLine
($"Oy raqamini xato kiritdingiz"); break;
    
}


Console.WriteLine(
 oy switch 
{ ( 12 or 1 or 2)=> "winter",
   ( 3 or 4 or 5)=> "spring",
   ( 6 or 7 or 8)=> "summer",
   (9 or 10 or 11)=>"autumn",
   _=> "Oy raqamini xato kiritdingiz",

}
);

```
Rest vs spread in javascript
Tags: javascript, webdev, beginners, programming
Published: 2022-08-05 10:00:00

In javascript has lot of miss conception like spread and rest they look same or identical but there behaviour something different. Today in this articel we will discover what is the main dfferent between rest and spread.

> Spread & Rest syntex `...array`

```
let array1 = [1,2]
let array2 = [3,4]
// we want to concat two array
// we can concat two way like

let array3 = [...array1, ...array2]
// another way 
let array3 = array1.concat(array2)

```

First example is concat through 
***spread*** operator you can use spread like you have 10 array you can concat via  spread. 

Second example is built-in javascript.

You can use it on string array.

```
let strArray = [..."developer life is tough"]
// output like devide all letter and space like array just try your self
```

The most important thing of array you can copy an array it called ***shallow*** copy.

Just keep in mind that this one only clone the first level. This work with primitive type, like number and string but not ***object***

``` 
let arrToClone = [1,2,3,4,5,6,7,8]
let shallowCopy = [...arrToClone]
```

Let understand use of spread in object.

```
let obj1 ={
  age: 23,
  profession : 'developer'
}

let obj2 ={
  language: 'javascrip',
  girlfriend : false
}

let obj3 = {...obj1, ... obj2}
console.log(obj3)
// It will marge two object 

// we can shallow copy with object but conditions is obly first lavel like array 

let shallowCopyObj = {...obj1}
```

Last thing is Function.

In javascript function we can use it two way. 


***Rest***
```
//this it rest
function exp(x,y,...other){
  return other;
}
// rest operator
exp(1,2,3,4,5,6,7,8,9)
// return [3,4,5,6,7,8,9]
```

***Spread***
```
function exp2(a,b,c){
  return a+b+c
}
let number = [1,2,3]

// spread operator
exp2(...number) 

```

Finally, we cover main different beetween rest and spread operations.

## Summary

- when you use (...) on function parameter is called ***Rest***

- when you use (...) on function argument is called  ***Spread***

- ***Spread*** operator help to merge object and array ***but*** conditionally.😄
This week’s newsletter is out! (30-07-2022) - Mid-week special: Fat ankle
Tags: javascript, tech, webdev, discuss
Published: 2022-08-05 09:49:53

---
title: This week’s newsletter is out! (30-07-2022) - Mid-week special: Fat ankle
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Mid-week special: Fat ankle

https://markjgsmith.substack.com/p/mark-smiths-newsletter-05-08-2022

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
End-to-End Testing with Cypress
Tags: cypress, endtoend
Published: 2022-08-05 09:43:00

It is important for us to take into account the satisfaction of our users. That's why we decided to take you behind the scenes of the Cypress tool, allowing us to test our platform to improve the user experience as much as possible.

‍

## I. Why Cypress ?‍

In addition to unit and component testing made with Jest Framework, we were looking for an E2E (end-to-end) tool to simulate and test the full user journey on the Eden AI Platform.

We had heard a lot about a tool called Selenium but it seemed quite complicated to integrate for non-experimented automation engineers.

Our research led us to a more recent tool: Cypress.

When compared to other automation frameworks, Cypress is more universal because it is written in JavaScript and based on Mocha and Chai. It also uses Node.js when running in browsers. Javascript is the main language for our front-end developers team so it seemed like an obvious choice.

Cypress consists of a free, open source, locally installed application and a Dashboard Service for test’s recording.

Cypress also provides features that will make our tests more efficient :

As it automatically waits for DOM to be loaded, we don’t have to implement additional waits, nor implicit or explicit.
We can also test how our API interacts with our front-end by executing http requests with Cypress.
The framework also captures the test execution in real time. This allows testers or developers to hover a specific command in the command log to see exactly what happened at that particular step.
We can also run cross-browser testing by executing tests with Cypress on Firefox and browsers within the Chrome family, such as Edge and Electron.
Cypress can also provide screenshots of test failures, which makes finding defects and debugging apps quick and simple.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/blhsr8v0bqmdlwzrohfu.png)
Cypress testing interface
‍

## II. How do we integrate Cypress to our CI-CD ?‍

In addition to punctual testing with the Cypress interface, we wanted to add the E2E testing process to our CI/CD. 

When a new feature is pushed to a certain branch of our repository, circle CI will launch headless Cypress tests by adapting Cypress environment with the current git branch. For example : when a feature is added on our staging environment, Cypress will test the user journey on the staging app. 

We also needed to schedule automatic e2e tests each day.

The integration of Cypress to Circle CI was pretty easy. Cypress provides an orb to correctly install, cache and run Cypress with very little effort.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9sxmpmunykug9oqmot0.png) 
Circle CI running Cypress tests 
‍
In conclusion, we used a E2E testing tool called Cypress, allowing us to test our platform to give the best performance for our users. We also added it to our CI-CD, which was a relatively easy process. If you have any questions, you can email me: françois.humbert@edenai.co.
Live review of LinkedIn profiles
Published: 2022-08-05 09:41:09

I'll be doing a live review of live review of LinkedIn profiles software engineers on Monday, August 8th, at 7pm BST:

https://www.youtube.com/watch?v=C4H0JDTEbq4&ab_channel=NadiainTech 

Join us if you want to improve your profile and get more job offers and other opportunities.

Subscribe to my channel to not miss the stream: https://www.youtube.com/c/beetlehope

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/to8ud8ggtju33k6tpc4z.jpg)
5 Basic Linux Command You Should Know
Tags: linux, programming
Published: 2022-08-05 09:25:00

[](url)Hey!! There if you are using Linux operating system these Linux command you should definitely know which will boost your productivity in Linux 
soo.. Let's get started 

**1. cd**
  -> cd command used to navigate through files and directories. it requires either full path of directory or just name of that, depend on the current working directory you're in. 
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3erjwr73jbv3attb4p14.png)
**2. pwd**
-> pwd command used to know in which directory you are currently working. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cnon8isnmbzd07f2g5my.png)
Look the above terminal image, from the cd command you go to Desktop directory now you want to know in which directory i'm curently working to show tht just type pwd it show your current directory here is Desktop.
**3.mkdir**
-> _mkdir stands for make directory_ which used to create a directory in your currently working file. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7bh241njkg2jfrfl2w3.png)
in above image here i'm working in _working Direcory_ i want to make a folder name **new-folder** in working Directory for that type `mkdir new-folder` and it will create folder of name new-folder.
**4. ls**
-> `ls` command used to view the content of a directory. By default it shows the content of current working directory.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9y5jay070gblcfa85hj6.png)
**5. touch**
-> `touch` command used to create blank file 

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