teleren/devto huggingface dataset:
Install a Haskell compiler on Macbook with chip M1
Tags: haskell, programming
Published: 2021-02-16 19:13:25

Hi everyone!

I struggled with this after getting my new macbook (Apple Silicon (arm64) based macs),  the instructions can be very confusing for a newbie so I thought a post would be useful. I followed the instructions of Moritz Angerman @angerman_io 

The first step is to open terminal and install rossetta 2:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

after this, lets install nix

sudo curl -L https://nixos.org/nix/install | sh

then just follow the instructions (you just have to copy a path), and once its installed you can set up a nix compiler, as explained in Moritz tweet, typing this:

nix-shell -p haskell.compiler.ghc882

finally type: 

ghci and you should get Prelude> 

That is it!! You have haskell, hope it works and helps  


Raquel
dev.to bug with creating a new post
Tags: bug, help
Published: 2021-02-16 20:16:46

I was going to file a bug on GitHub, but as a non-contributor, I wasn't sure if that would be more counterproductive. 

**Issue**: The title field to create a new post is shorter than font
**Description**: The title field when you create a new post is too short and cuts off the text. This makes it impossible to see what you're typing

**To reproduce:**
1. Click on "Write a post"
2. Click into the title field. Once you click on the field, it immediately resizes. 

**Browser**: This issue is present when using both Chrome and FD

###Screenshots:
**Before**:
 ![screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgi5632t6q75rgyu6g6w.png)

**After**:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2bqfxw4j0hzh6o8798p.png)
 
![screenshot](https://user-images.githubusercontent.com/6508734/108113580-b116c780-7065-11eb-8130-217a39ca24e7.png) 

**My workaround**:
1. Open the dev console
2. Change the height (23px in Chrome, 24px in Firefox) to 80px

**Before**:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4s6ggiuluiyxzcpvpf7.png)

**After**:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgvff6jboq4f1mgfpuhf.png) 

**The Code**:
```html
<div data-testid="article-form__title" class="crayons-article-form__title">
<textarea type="text" id="article-form-title" placeholder="New post title here..." autocomplete="off" class="crayons-textfield crayons-textfield--ghost fs-3xl m:fs-4xl l:fs-5xl fw-bold s:fw-heavy lh-tight" aria-label="Post Title" autofocus="" style="height: 23px;"></textarea>
</div>
```
GameDevHQ Intensive Training Week 01 / Week 08 [Day 2]
Tags: unity3d, gamedev
Published: 2021-02-17 00:06:19

I will honestly lie if I tell you that today was easy.  For the second day of week 1, personally, it took me a while to figure it out. 

Today's task was to create the spawn manager, where we need to control the spawning of the enemy and to optimize with an object pooling from the beginning. 

Spawn Manager
Create start & end points on the map
Turn the SpawnManager into a Singleton
Spawn Enemies at the start position
Randomize enemy types
Assign target destination one spawned
The appropriate delay between spawns
Keep Environment tidy when spawning
Recycle Enemies not Destroyed
Wave System (Amount to spawn = 10 * currentWave)
Use Object Pooling

The spawn manager actually started very easy all you have to do is create the starting point and end point were the enemies going to walk the path and then you're going to create a spawn manager, turn into a Singleton and then randomize the enemy types; when I read about the Object pooling system that's when I dropped blank for at least 3 hours🤣.

In order to make the fully work I decided to take like a small break and then get back to it and then once I analyze what I need to do I create a simple pulling system in which at the beginning of the spawn I will Instantiate 10 enemy object and depending on the wave that number will either increase or will use the same 10 enemy and run it depending on the number of the wave.

2nd Day really put my brain to work. My goal for each week is to tackle any task in the first two day of the week and have the rest of the week to optimize or play around with ideas for these projects.

Next up will be to see how I can I Optimize or play around with the spawn manager and the EnemyAI.

Day 2 done

To be continued
Assembly: Embedded Resource elenco e lettura
Tags: assembly, embeddedresource, streamreader, devandreacarratta
Published: 2021-02-17 10:15:12

🔥 Assembly: Embedded Resource elenco e lettura

❓ Step0: cosa sono le Embedded Resource?

Sviluppare in C# mi ha sempre portato ad utilizzare le Embedded Resource e devo dire che senza di loro la vita dello sviluppatore non sarebbe interessante come ora. 

Nell'articolo verra' spiegato come ...

1️⃣ Come adeguo il mio file csproj?

2️⃣ Come capisco quali Embedded Resource ho a disposizione nel mio progetto? 

3️⃣ Come le posso utilizzare?

... ed ora non vi resta che leggere il post ed ottenere risposta alle domande.

📰 [Articolo Completo](https://blog.devandreacarratta.it/assembly-embedded-resource-streamreader/?utm_source=devto&utm_medium=coding-tips&utm_campaign=dotnet&utm_content=assembly-embedded-resource-streamreader)

Buona giornata!
前端判斷網頁是不是webview開啟
Published: 2021-02-17 13:01:11

第一次使用不太熟悉
用了找到的code不過依然判斷不了

```javascript
function isWebview() {
    var useragent = navigator.userAgent;
    var rules = [
      "WebView",
      "webview",
      "(iPhone|iPod|iPad)(?!.*Safari/)",
      "Android.*(wv|.0.0.0)",
    ];
    var regex = new RegExp(`(${rules.join("|")})`, "ig");
    return Boolean(useragent.match(regex));
  }
```

後來裝了Vconsole
在app中打開後看到需要判斷的關鍵字
'wv'後 前端頁面就能判斷了
```javascript
function isWebview() {
    var useragent = navigator.userAgent;
    var rules = [
      "wv",
      "WebView",
      "webview",
      "(iPhone|iPod|iPad)(?!.*Safari/)",
      "Android.*(wv|.0.0.0)",
    ];
    var regex = new RegExp(`(${rules.join("|")})`, "ig");
    return Boolean(useragent.match(regex));
  }
```
Multi-account AWS environments with superwerker
Tags: aws, cloud, opensource, github
Published: 2021-02-17 16:33:34

Managing and securing multiple AWS accounts gets complex. [superwerker](https://superwerker.cloud) is a free and open-source solution to automate the setup and management of your multi-account AWS environments. Based on our experiences at [superluminar](https://superluminar.io/), we teamed up with [kreuzwerker](https://kreuzwerker.de/) from Berlin to bundle prescriptive best practices from multiple years of cloud consulting and created [superwerker](https://superwerker.cloud).

![superwerker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6nm4roavrcj65l1jgbt.jpeg)

Available as an official [AWS Quick Start](https://aws.amazon.com/quickstart/architecture/superwerker/), [superwerker](https://superwerker.cloud) helps you to set up various AWS services recommended for AWS cloud environments consisting of multiple AWS accounts.

[Read more »](https://sbstjn.com/blog/superwerker-aws-multi-account-environment/)
Day 4
Tags: 100daysofcode
Published: 2021-02-17 17:31:46

Day 4/100 of #100DaysOfCode

scroll-animation | Codewars | Node.js

Hours coded: 3.2
Lines of code: 246
Keystrokes: 3666


1. Completed the "scroll-animation" project. It's part of the "50 Projects in 50 Days" Udemy Course.

Technology: HTML, CSS, JavaScript DOM


2. I tried to solve the "(4kyu) Next bigger number with the same digits" problem on Codewars. And the result was
Passed:95 Failed:55. I tried for more than 2 hours but I could not pass all tests.

3. I enjoyed my time when practicing on the Postman tool. It's a great tool when trying to dissect RESTful APIs.

via @software_hq's #vscode extension https://lnkd.in/ggsUNjy
React - how to create dynamic table
Tags: react, javascript, webdev, html
Published: 2021-02-17 18:51:21

###Hello Coders! 👋 😊
In this article, I would like to show you how to create a dynamic table in React.

__Before we start__, I would highly recommend you to check out __runnable examples__ for the solution on our website:
[How to create customized dynamic table in React](https://dirask.com/posts/How-to-create-customized-dynamic-table-in-React-pqa53p)

The final effect of this post:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uly61p6vz6n3o51lddso.png)
 

Below example presents how to create a dynamic table from an array. Example table should consist of a header and some data records. While creating such records use `map()` function to convert them into elements.
Remember that each record should have a unique key 🗝️ - it helps React optimally manage changes in the DOM. Such a key may be, for example, the `id` assigned to an element of the table.

```jsx
import React from 'react';

const tableStyle = {
    border: '1px solid black',
    borderCollapse: 'collapse',
    textAlign: 'center',
    width: '100%'
}

const tdStyle = {
  	border: '1px solid #85C1E9',
    background: 'white',
    padding: '5px'
};

const thStyle = {
  	border: '1px solid #3498DB',
    background: '#3498DB',
  	color: 'white',
    padding: '5px'
};

const App = () => {
  	const students = [
        { id: 1, name: 'Bob',  age: 25, favFruit: '🍏' },
        { id: 2, name: 'Adam', age: 43, favFruit: '🍌' },
        { id: 3, name: 'Mark', age: 16, favFruit: '🍊' },
        { id: 4, name: 'John', age: 29, favFruit: '🍒' }
    ];
    return (
      <div>
        <table style={tableStyle}>
          <tbody>
            <tr>
              <th style={thStyle}>Id</th>
              <th style={thStyle}>Name</th>
              <th style={thStyle}>Age</th>
              <th style={thStyle}>Favourite Fruit</th>
            </tr>
            {students.map(({ id, name, age, favFruit }) => (
              <tr key={id}>
                <td style={tdStyle}>{id}</td>
                <td style={tdStyle}>{name}</td>
                <td style={tdStyle}>{age}</td>
                <td style={tdStyle}>{favFruit}</td>
              </tr>
            ))}
          </tbody>
        </table>
      </div>
    );
};

export default App;
```

You can run this example [here](https://dirask.com/posts/How-to-create-customized-dynamic-table-in-React-pqa53p)

That's how it works. 
If you found this solution useful you can react to this post or just leave a comment to let me know what you think. Thanks for reading! 😊

## Write to us!
If you have any problem to solve or questions that no one can answer related to a React or JavaScript topic, or you're looking for mentoring write to us on [dirask.com -> Questions](https://dirask.com/questions)
The Top 3 Office 365 Backup And Recovery Solutions
Tags: recovery, office365, backup, microsoft
Published: 2021-02-17 19:13:03


Having a comprehensive and customizable <a href="https://vmarena.com/altaro-office-365-backup-solution/">Office 365 backup</a> and recovery solution is increasingly important for Office 365 clients.

Backup and recovery solutions capture a copy of a file, database, or even an entire computer at a given time and save the data to the secondary storage device so that users can return them in the future. Microsoft does not provide a natural backup for Microsoft Office 365.

Standard settings only protect data for 30-90 days on average, leading to many complications when organizations believe their systems are backed up and later discover that they are missing.

Luckily, I am about to share with you the top 3 backup solutions for Office 365, starting with Altaro:

##1.Altaro Office 365 Backup

Altaro Software is a market-leading vendor for backup and recovery solutions for SMBs and MSPs. Altaro <a href="https://www.altaro.com/office-365-backup/">Office 365 Backup</a> is their MS O365 replication and restoration software solution, which focuses on backing up your Office 365 mailboxes and files stored in OneDrive and SharePoint.

Office 365 Backup is cloud-based, making it easy to deploy and configure. The solution is also easy to manage via a central cloud management console, from which administrators can configure complete and granular data recovery.

##2.Veeam Backup for Microsoft Office 365

<a href="https://www.veeam.com/backup-microsoft-office-365.html">Veeam</a> is one of the best global markets in backup and recovery solutions, holding the largest EMEA market share (Europe, the Middle East, and Africa).

Veeam offers a range of solutions to suit business needs, with their Backup & Replication solution being one of the most popular leading products.

##3.Commvault Backup & Recovery

Commvault is a market leader in data and information management, offering intelligent, scalable solutions. Their powerful, practical products have resulted in <a href="https://www.commvault.com/">Commvault</a> being recognized as a leader for eight consecutive years in the Gartner Magic Quadrant for Data Center Backup and Recovery Solutions.


##Wrap Up
I know it’s a tough choice, and all of the companies we mentioned offer some great products. But ultimately the decision is yours, so share a thought about which one of our __top 3 Office 365 backup and recovery solutions__ do you think is the best.
Why Programmers don't make money?
Tags: earnmoneyprogramming, programming, programmersdontmakemoney, problemsolving
Published: 2021-02-18 06:49:48

I am not aware of anything in your mind, but if you are reading this post, you probably don’t agree with me. Right? And I know that it would be hard for many people to believe this but if you’re going to read this to the end, you will understand what I mean.

When I started programming, I was very curious. I knew nothing about programming. All I wanted to know how systems work and how people create applications. I also wondered how the richest people are programmers. How do they make money? Is programming really the way to becoming the richest person?

As I went deep in learning different programming languages, I started to understand that programmers don’t just make money. Programming is not about making money and becoming a programmer is not a way to becoming rich, even though it may lead you to that.

As days passed, I understood that programmers solve problems. They identify challenges and develop solutions for that problem identified. And what about making money?

**Let me get to that.**

When you develop solutions, you are solving some problem, but also at the same time, you can make money from it. And many people are wrong when they think that money comes first. When you put money on the front, you are not only poisoning your mind, you are also limiting the level of what you can achieve. I am not ignoring the fact that many new programmers join programming clubs or communities because they are thirsty for money.

Because they have heard someone saying that programmers make a lot of money, they think that they will also make a great amount of money. I can understand them. But let me ask you something, what causes most people to give up?

Well, for some it’s because they are not aware of what they need, for others it’s because of society and current environmental influences, and for others, it’s because they didn’t get what they thought they would get or because they got it and they think they don’t need to work anymore.
I am now talking about those who give up because they think they have found what they wanted.

Let’s take an example for someone who came in Programming looking for money, he will develop some kind of an application and luckily make a lot of money, and then after that, because he thinks he has found what he wanted, he may even forget that he is a programmer. That’s like students, many of them learn for an exam, but they don’t actually know when the real exam will start.

But when your commitment is to solve problems, you will always solve problems because there is always a new problem. And if you are to make money, you will make money constantly.

I am not telling you to leave programming if you are looking for money. Actually, you have a point too, but your goals should be clear. Making money is not a goal, it may be an outcome of your achievements towards your goal, or even an award to consistently achieving your goal.

So, keep this in mind, _Programmers don’t make money, they solve problems._ And before deciding to become one, make your goals clear.
Mathematical Calculator
Published: 2021-02-18 11:04:15

Dealing with math homework statistics seems to be a daunting task though; It has its benefits that should help you a lot. The first is that you are able to prepare and further improve your problem-solving skills, and another thing is that by doing your maths with homework, you will be able to continually be exposed to the goal involved, to help you get better. your math homework help to speed up the process of resolving questions and disputes and looking at your completed results For this reason, it is only a good idea if you have many online websites in your mind that will help you speed up your math work, as such choices can make a big difference.

<a href="https://www.standarddeviationcalculator.io/"> https://www.standarddeviationcalculator.io/ </a>

Online Stats Calculator 

 high-quality statistics calculators online calculators that provide mathematical help for the homework you need. One excellent example of Web site us will certainly be easycalculation.com.Although the web page has been subjected to a number of statistical problems, the web page itself still offers more than just online calculations for statistics. , root means square, probability, factorial are just some of the online calculators in the calculations provided by the page. Like other separate calculators, make sure you submit your data in order to solve the parameters you need. 

Online Web Site Search. The left pane of the site contains a number of backlinks that, when clicked, will take you to a specific website. I'm mainly <a href="https://medium.com/nyu-a3sr-data-science-team/how-to-talk-about-statistics-and-data-in-an-era-of-public-distrust-a-guide-for-statistical-e51bdb7965a2"> talking about statistics </a> and I'm asking for help with statistics homework, so click the statistics URL. Then you will be able to see a hyperlink to the calculator mentioned previously. At least with the intention of realizing and knowing how to rely on them, go through and look at several calculators. The information about internet calculators on the website is that they usually give you the exact formula used in the calculations. If the problem is caused by the mathematical terminology of a particular statistical term, the website also offers discussions on phrases that are embarrassing or unintelligible. This is especially useful if you need statistical homework help, but be careful to use it. While each website will do its best to provide you with the most accurate information there may still be a chance to give you incorrect information. items in auto-pilot rain.
What's in a name?
Tags: architecture, software, design
Published: 2021-05-27 12:31:19

There is one very important problem in software engineering: naming accurately.

How many times have you stumbled upon a github repository, a class or a variable wondering what it is used for? Would a more precise and accurate name have eliminated ambiguity in reading a name?

Naming things is as old as humanity itself. It has always been an art to name anything, be it humans, inanimate objects, or abstract idea. The process of naming things varies based on the purpose of naming. 

For humans, we name ourselves after positive emotions or the gods, even if we did not possess those qualities that our names indicate. This is fine for naming people, as people are generally complex and a name isn't supposed to really define what or who they are.

Naming, in software, is for an entirely different purpose altogether. The purpose of naming is to indicate clearly what the intended owner (classes, variables, components) of the name is supposed to represent; the complete opposite of what human names are used for. Stereotyping software components has big advantages in the engineering industry as noone wants to maintain software that is as complex as human beings.
How to Install Drupal 9 on Ubuntu 20.04
Published: 2021-02-18 13:46:59

In this article, we’ll explain how to install Drupal 9 on Ubuntu 20.04. The tutorial will guide you to install and configure Nginx as web server, PHP, MariaDB as a database.

Drupal is a free and open-source content management system. With robust content management tools, sophisticated APIs for multichannel publishing, and a track record of continuous innovation—Drupal is ready to stand as the hub of your digital presence.

Learn more: <a href="https://www.hostnextra.com/kb/how-to-install-drupal-9-on-ubuntu-20-04/">Install Drupal 9 on Ubuntu 20.04</a>
Data Type and Type Casting
Tags: javascript
Published: 2021-02-18 17:59:40

#DailyJS
There are 5 different data types that contain values.
    1) String
    2) Number
    3) Boolean
    4) Object
    5) Function
There are 6 types of objects.
    1) Object 
    2) Date
    3) Array
    4) String
    5) Boolean
There are two types that don't contain values.
 1) NUll      2) Undefined

### Type Casting 

There are two types of typecasting.
1) implicit conversion.
2) Explicit conversion.

### implicit conversion :
In certain situations,  javascript automatically converts one data type to another. 

```javascript
var res ;
res = '3' + 5 //output '35'
res = '3' + true  //output : '3true'
res = '3' + null //output  : '3null'
res = null + '3' //output  : 'null3'
res = null + null //output : 0


res = '10' - '3'  // output : 7 
res = '10' - 3    // output : 7
res = '10' * 3    // output : 30
res = '10' / 2    // output : 5

res = 'hello' - 5  // output : NaN

res = '7' - true   // output : 6 
res = '7' + true   // output : 8
```

### Explicit Conversion

In Explicit one data type convert to another manually.

```javascript
// string to number 
res = Number('324')  // 324
res = parseInt('20.01')  // 20
res = parseFloat('20.01') // 20.01

//convert to string
res = String(324) 


```