teleren/devto huggingface dataset:
Best Ways to Keep Your Employees Happy
Published: 2021-06-17 23:36:47

While giving constructive criticism helps guide people in the right direction. It is also important to point out the good things your employees do. Pause and highlight milestones that people achieved or challenges they have overcome. Acknowledge them individually and verbally show them that you were aware of where they started and where they can go next.

Create a workplace of transparency: 

Let your employees know about changes in the workplace to ease any frustration or questions they may keep to themselves. With stress comes a lack of motivation in your employees, may become so frustrated they quit the company to find another.

Make your employees part of the bigger picture: 

It is good to communicate with your employees to provide the best benefits package for their needs. Maintaining relationships with your employees and keeping an employee wellness program may be the key to their happiness. Informing the team is key to running a successful business. It will make employees feel valued and that their hard work is going towards something great for the company.

Team building Is A Must! 

One of the best ways to deal with the social aspect of your staff is arranging happy hours, during which you can also mingle with your employees in a more relaxed atmosphere. It enables employees to learn from others and develop new skills. Working in a team helps employees take on leadership roles and see their team members fulfill their responsibilities.

Read Full Article at Hireat

https://hireat.in/best-ways-to-keep-your-employees-happy/
Data Structures in TypeScript - Stack
Tags: datastructures, typescript, stack
Published: 2021-06-17 22:58:26

---
title: Data Structures in TypeScript - Stack
published: true
description: You can use stacks for expressions evaluations and conversion, backtracking, and memory management
tags: dataStructures,typescript,stack
series: Data Structures in TypeScript
canonical_url: https://ricardoborges.dev/data-structures-in-typescript-stack
cover_image: https://res.cloudinary.com/dje4crtui/image/upload/v1626974055/articles%20covers/cover_wnn3mp.png
---

A stack uses LIFO (last-in-first-out) ordering, the most recent item added is the first item to be removed, just like a real stack.
Some uses of this data structure are expressions evaluations and conversion (prefix, postfix, and infix), backtracking, and memory management.

![stack](https://res.cloudinary.com/dje4crtui/image/upload/v1622906576/data%20structures/stack_rccvuz.png)

### Representation

A stack can be implemented using an array or a linked list, can be either fixed or dynamic size.

### Basic operations

- **Push** - Add an item to the top of the stack
- **Pop** - Remove the top item from the stack
- **Peek** - Return the top of the stack, without removing it.
- **isEmpty** - Return true if the stack is empty.
- **isFull** - Return true if the stack is full, used when the stack is fixed size.

Here's an implementation of a stack using an array, in TypeScript an array doesn't have a fixed length, so the operation **isFull** is not required, however you can implement a stack with a fixed length and use that operation.

```typescript
class Stack<T> {
  private array: T[] = [];

  pop(): T | undefined {
    if (this.isEmpty()) throw new EmptyStackException();

    return this.array.pop();
  }

  push(data: T): void {
    this.array.push(data);
  }

  peek(): T {
    if (this.isEmpty()) throw new EmptyStackException();

    return this.array[this.array.length - 1];
  }

  isEmpty(): boolean {
    return this.array.length === 0;
  }
}
```
How a Single Mathematical question lead to the Invention of Modern Computers?
Tags: computerscience, programming
Published: 2021-06-17 22:38:49

In early 1900s German Mathematician David Hilbert put forward a question : 

###is Mathematics "Decidable"?

Which means "is there an Algorithm that can always determine whether a statement follows the axioms?"

In 1936 Alan Turing answered this question by inventing the Modern Computer, the Turing Machine. 

He ran his famous "Halting problem" on his Turing Machine to check whether a program will halt or not on a particular input. 

###Turing found out his Halting Problem and Hilbert's Decidablity Problem are similar. 

But results came to Turing such that there is no way to tell in general, if a Turing machine will halt or not on a given input. 

###This experiment by Turing answered that "Mathematics is Undecidable". 

The beauty here is that a visionary question from a Mathematician gave an idea to Turing to Invent the Modern Computer that we use today. 

###Because you know all the computers are Turing Machines and all the  programming languages are in fact Turing complete. 


###Before the invention of Modern Computers, Computers were actually Humans. 

What? Humans? Yes. To say precisely, they are Women. 

###Yes, Women Mathematical geniuses tend to do all the computation works and calculations manually. 

And it was Turing who replaced them with Machines.

Personal blog @ [danyson.github.io] (https://danyson.github.io)
C# convert float to int
Tags: c, code
Published: 2021-06-17 22:35:39

Table of contents 
Convert float value to int 
Example float to int 
3 method of conversion 
Syntax 
Summary 
Article Tags 
 

**Convert float value to int**

When we start programming we are learning a lot of new and important things that we did not know about. One of them is type conversion. First of all you should know that type in any programming language.  What is conversion? It is very simple to convert any data type to another data type. I am telling you in a very simple way. Byte b = 20 and float f = b;  If we understand carefully, the value that was in b will go to float. We have two types of data types to do conversion in programming. Conversion is what the compiler of c # does by itself. If we have a float.  We convert the data type to an integer.



Example float to int:
```
using System;

namespace convert_float_to_int
{
    class Program
    {
        static void Main(string[] args)
        {
            float f = 10.2f;
            int i = (int)f;
            Console.WriteLine("Converted float {0} to int {1}", f, i);
        }
    }
}

            ( OUTPUT )
Converted float 10.2  to int  10
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdqp6suwgdx2lmniwl8y.png)

Example 

int myfan = myFloatfan as int;
int myfan= (int) myFloatfan;
Then the compiler automatically performs the conversion. To convert the float to an integer, we write int in brackets, then the value after the point is deleted. And we can also apply the convert class.  There are three ways to convert C #.
3 methods of conversion:


1.Implicit type conversion 
2.Explicit type conversion 
3.Conversion between non compatible type

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xh0tog58b8c29mft9dlg.jpg)

Example 

```
float myFloat = 3.5F;

int myInt = Convert.toInt32(myFloat);
```
Syntax


int Convert.ToInt32(float value);

Summary 

Today we are understand to kodlog website, I try to explain  C# convert  float to int . I hope after reading this article you will be able to understand conversion float to int in c#. I would like to have feedback from my kodlog site. Please post your feedback, question, or comments about this article.

 Article Tags 
C#|Python |Python 3|pycharm |html|java|JavaScript |cpp|code|rubi|Network | Google |html5 |php|bootstrap |string |Microsoft |variable |syntax |Coders |Codinglove|
Computerscience|wordpress|html-page|php|
Xml|game| net| list | loop | integer |float | string | double |
How to Find Root Causes (Faster) 
Tags: performance, monitoring
Published: 2021-06-17 21:49:27

Like a bratty teenager, traditional monitoring answers your questions, but does so in a terse, unhelpful manner:

Why is my page slow?

_Guess it’s the API call. It’s a 504 thing — you wouldn’t understand._


Ok, so why is the API call slow?

_Ask your DB query. Gosh!_

You need a better conversation with your code — one which gives you contextual clues about your application’s performance. And that’s what we’ve delivered with our new [Trace View and Quick View](https://docs.sentry.io/product/sentry-basics/tracing/trace-view/) features.

#Connect your slow-loading dots with Trace View#

Trace View gives you a throughline between transactions across all your projects. Now you can follow poor performance to its root cause by drilling down into the details of a single trace as well as crisscrossing between front- and back-end transactions in that trace.

For example: say you have a React single-page app, and it makes a call to a backend API in Python, which then queries the database. By using Trace View, you can see how your code progresses from the initial call to the final query — and see how related errors react to each other in context.

{% youtube GHIqTh_-KTU %}
_In the above video tutorial, see how you can use Trace View to jump between parent and child transactions and, ultimately, gain a better understanding of your endpoints._

#Tl;dr your errors with Quick Trace#

You don’t read logs — you scan them. So why should your application monitoring be any different? Quick Trace gives you the context you need to see details at a glance as well as get visibility into the bigger picture. Our Quick Trace minimap helps you navigate related errors and children transactions. With it, you can flit between related errors and performance issues while also being able to order metadata like device, OS, and browser.

![quick-trace-screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rylv46wiv7vblifdf9u5.png)

_Quick Trace shows related transactions, along with any errors that occurred in them. Now you can navigate between the events of a trace without having to go back and forth between tabs._

Developers know that there’s no such thing as an isolated issue. Many of your frontend errors will have roots in your backend infrastructure — and vice versa. With our new [Trace View and Quick View](https://docs.sentry.io/product/sentry-basics/tracing/trace-view/), you’re able to see the problem clearly — so that you can solve it quicker.
Day 390 : Days Go By
Tags: hiphop, code, coding, lifelongdev
Published: 2021-06-17 21:47:30

_liner notes_:
- Professional : Can't believe it's already Thursday. Days go by quickly! Updated some documentation, approved some PRs, helping out with a community question. Day is already over. Wow.

- Personal : Last night I worked on the HACO section of the side project. There is quite of bit more involved than I originally thought. I got it so that a person can create one and it runs a function on the server that creates an entry in the database and returns a URL that a user can share. There's also a tweet button to share on Twitter. And there's a button to join the newly created room. Also, got it so that the room will show up on a list that other people can see and even filter by keywords, much like the Tutorials section. Got tired and went to sleep.

![View from the shore of a lake looking at a mountain range with the sun peaking out from behind in Glacier Nat'l Park, MT, USA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tqfe4onzfm9b6jkfu16v.jpg)

I think I can get the HACO stuff completed tonight. I'm going to work on how the data is structured so I can use it easier. My process is, try the application with the data, think how I can use it better, change the database structure and repeat. haha. I think I'm super close. After that, I'll be able to actually get the rooms working and then just do some styling and add some copy. Yeah, sounds like a plan. I'm out!

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube UosMjCMyRkA %}
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2021-06-17 21:36:00

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

This comment on "[The Hells Every Developer Experiences](https://dev.to/wadecodez/16-eternal-hells-of-programming-5h5g)" should resonate with all you "computer people". Hilarious addition, @faranaiki !
{% devcomment 1fb50 %}


If you check out "[Switching to vim](https://dev.to/siddharthshyniben/i-m-switching-to-vim-867)", you'll see some great dialogue from VSCode user @turutupa who has questions for the author about vim. Thanks for continuing the convo!
{% devcomment 1fcoi %}


Some of you may have stumbled across "[Master Binary in Five Minutes](https://dev.to/valeriavg/master-binary-in-five-minutes-2lj5)", where @eljayadobe aptly dropped this clever response to the title 😃
{% devcomment 1fcf8 %}


We must point out this comment by @valeriavg taken from this post on some "[Biased Reasons for Angular](https://dev.to/johnbwoodruff/my-completely-biased-reasons-for-choosing-angular-1hbg)". Always nice to see open, respectful discussion. 

{% devcomment 1fapb %}


Non dev-related, but this [Weekly Win](https://dev.to/devteam/what-was-your-win-this-week-4oa2) is definitely note-worthy. Glad to hear you're doing well @ibrahimcesar !

{% devcomment 1faib %}


See you next week for more great comments ✌
Why bootstrap utilities makes your Ionic development easier
Tags: ionic, webdev, mobile, npm
Published: 2021-06-17 21:34:28

[Ionic](https://ionicframework.com) makes it easy for web developers to build mobile and web apps with the same codebase. And it's latest iteration, Ionic 5, provides a [responsive grid](https://ionicframework.com/docs/layout/grid) and some basic [CSS utilities](https://ionicframework.com/docs/layout/css-utilities). However, coming from a background of web development with Bootstrap 4, I missed responsive utility classes based on breakpoints. Things like `ml-md-5` for a left margin of 5 units on medium screen sizes and up and `px-xl-3` for a horizontal padding of 3 units on extra large screen sizes and above. See the [spacing utilities docs of Bootstrap 4](https://getbootstrap.com/docs/4.1/utilities/spacing/) for a better idea. In contrast, Ionic only had basic `ion-padding-<direction>` classes with no option for choosing padding size or breakpoints.

So, I searched for a way to get these utility classes on my Ionic 5 project and found [Bootstrap Utilities](https://github.com/MohannadNaj/bootstrap-utilities-dist), a package providing only the utilities portion of Bootstrap 4.1, without the rest of Bootstrap. As a result, this is a lightweight library, having no conflict with Ionic 5's CSS classes. Can't say the same for other specialized and heavyweight utility libraries like Tailwind (for which, you may refer to ["Using TailwindCSS with Ionic 5 and Angular 10"](https://blog.andrewbrey.com/2020-07-06-using-tailwindcss-with-ionic-5-and-angular-10/)). Another advantage is, the grid breakpoints of both frameworks are compatible as well. See [Bootstrap 4's breakpoints](https://getbootstrap.com/docs/4.1/layout/overview/#responsive-breakpoints) and [Ionic 5's breakpoints](https://ionicframework.com/docs/layout/css-utilities#ionic-breakpoints).


## How To Use

`bootstrap-utilities` node package can be added to your project, with the usual steps:

```sh
npm install bootstrap-utilities --save
```

or for yarn:

```sh
yarn add bootstrap-utilities
```

Add then add the following line to `global.scss`:
```css
@import "~bootstrap-utilities";
```

Now, all the utility CSS classes from Bootstrap 4.1 are available for use in your Ionic 5 project. To see a detailed list of classes available, refer the [utilities section of Bootstrap 4.1 documentation](https://getbootstrap.com/docs/4.1/utilities/). These classes could make UI development in Ionic 5 easier and faster for developers having experience in Bootstrap, as well as those who want more advanced utilities than what Ionic offers.

##Credits & Sources
Cover image created from logos of [Bootstrap](https://worldvectorlogo.com/downloaded/bootstrap-4) and [Ionic](https://commons.wikimedia.org/wiki/File:Ionic_Logo.svg).
Easiest Way To Implement Predictive Search On An Intranet 
Published: 2021-06-17 21:29:37

In my workplace, we have an intranet website developed internally that we use for CRM. The data of our clients are shown there (MS SQL server is used as a backend to store data). The site has a limited search functionality at the moment (it'll try to match the text you type in one of the 3 fields that are indexed -company, staff contact, and director name).

I'm trying to find info about what would be the easiest method to implement a more sophisticated search (ideally that makes use of AI), like the one implemented by Google or Amazon on their website. It doesn't have to be so sophisticated, anything better than what I described above would do it. Ideally, the search should be able to guess what you're looking for based on your role, your portfolio of clients, and previous searches. It would be great if it could understand what you mean (i.e search query 'song la la la' that returns as result 'ATC -All around the world' on youtube. It would be great to implement vocal search as well.

But again it doesn't have to be that complex. Any info on where to look or which resources are readily available would be greatly appreciated. Do you know if there are (and what would be the best) search engines/AI libraries/API that are open source and that would fit this purpose? If this is not the right place to ask, on which other website or forum do you think should I ask for?

Thank you in advance
Linear Search Algorithm
Tags: algorithms, beginners, codenewbie, python
Published: 2021-06-17 21:05:59

# Linear Search Definition

Linear search also called **_sequential search_** is a type of search algorithms, that traverse an array and compare each item with the wanted item, if the item is found the algorithm returns his index otherwise, It returns a false value (false, null, None...)

![Linear search algorithm Aya Bouchiha](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mosr7vmazyxi18uc328c.jpg)

# Space and Time complexity of linear search

The **time complexity** of **linear search** is **O(n)** and his **Space complexity** is **O(1)**

![line-graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1b07zcs5rofsa4jbtrq8.png)
 

# Implementaion of linear search in python

```python
def LinearSearchAlgorithm(wantedItem,items: list):
    """
        Linear seach algorithm
        input: 
            [wantedItem]
            [items] {list}
        output:
            => returns index if the item is found
            => returns False if the item is not found
    """
    for i in range(len(items)):
        if wantedItem == items[i]:
            return i
    return False
```
   
# Implementaion of linear search in javascript

```javascript
/**
 * Linear Search ALgoritm
 * @param  wantedItem 
 * @param {Array} items 
 * @returns {(Number|Boolean)} returns index if the item is found else returns false.
 */
const LinearSearchAlgorithm = (wantedItem, items) => {
    for (let i = 0; i < items.length; i++){
        if (wantedItem == items[i]) return i;
    };
    return false;
}

```

## Exercise
Write a program that returns True if user's child can enter primary school if not returns False
Permited Ages to enter primary school: 5,6,7,8 (Array | list).
input : child's age (integer).
**example 1**
*input* : 7
*output* => True
**example 2**
*input* : 3
*output* => False

## References and useful Resources
+ [https://www.bbc.co.uk/bitesize/guides/z7kkw6f/revision/7#:~:text=A%20linear%20search%20is%20the,algorithm%20must%20deal%20with%20this.](https://www.bbc.co.uk/bitesize/guides/z7kkw6f/revision/7#:~:text=A%20linear%20search%20is%20the,algorithm%20must%20deal%20with%20this.)
+ [https://www.geeksforgeeks.org/linear-search/](https://www.geeksforgeeks.org/linear-search/)
+ [https://en.wikipedia.org/wiki/Linear_search](https://en.wikipedia.org/wiki/Linear_search)
+ [https://www.tutorialspoint.com/data_structures_algorithms/linear_search_algorithm.htm](https://www.tutorialspoint.com/data_structures_algorithms/linear_search_algorithm.htm)
+ [https://www.geeksforgeeks.org/linear-search/](https://www.geeksforgeeks.org/linear-search/)
+ [https://www.tutorialspoint.com/linear-search-in-python-program](https://www.tutorialspoint.com/linear-search-in-python-program)
+ [https://www.youtube.com/watch?v=iwo5WAldDks](https://www.youtube.com/watch?v=iwo5WAldDks)
+ [https://www.youtube.com/watch?v=4GPdGsB3OSc](https://www.youtube.com/watch?v=4GPdGsB3OSc)

\#day_5
Mac OS : Big Sur 11.2 on Unsupported Mac's . 
Published: 2021-06-16 07:11:21

Firstly, Why we need latest Mac OS Updates on unsupported Mac ? if you have enough hardware resources in the device, Answer is simple : because we can, and because these Macs can survive for a lot longer than Apple says. 

Here's a big one for those of you looking at M1 Macs, Apple Silicon is new, and is in its first generation, imagine what the next M Series Chip could be. The Apple Silicon Macs are really good right now but do have some flaws, like the lack of ports. In a couple of months, this could change dramatically, possibly with a lot more things that we've wanted for a long time. Don't take my word as 100% true, but simply waiting is fine given the chance of improvements and what they could be. 

STEPS :  First of all, you'll need to get the latest version of Patched Sur, which you can download here : (https://github.com/BenSova/Patched-Sur/releases/tag/v0.2.1) , you only need Patched-Sur.dmg. Once that downloads, open the .app file inside and it should lead you through the process, but here is some more information about each step.  

Things to remember :
1)Learn the Compatiblity 
2) Follow Exact Step from the github Profile of BesNova.
3)Patch Kexts After installation in order to make Wifi Work properly. 
4) Thank Besnova for making this happen :) 

He is working on a mini patcher which can be patched on unsupported devices to gain hands on experience on MAC OS MONTEREY. It will be out for public use soon . you can track his development through his github profile . 

Thank you .
Jay .