teleren/devto huggingface dataset:
Day 1 -> 40 days of code.
Published: 2020-11-20 18:59:14

shallow comparison operator.
When it comes to string  a(sc)b returns true and in case of array and object it returns false.
ie for primitive data types a(sc)b true and for complex data types a(sc)b false.

Let's check
var a="data";
var b="data";
var a=c;
console.log(a===b,a===c);//true,true

var a=[1,2,3];
var b=[1,2,3];
var a=c;
console.log(a===b,a===c);//false,true

#javascript #code
FB Notes' gone.. here :'/
Tags: facebook, url, social, media
Published: 2020-11-20 18:53:15

In the good old days, I used **FB notes** as my diary. It recorded the ups and downs in my youth. That time, I had a crush on a girl and I wrote to her nearly every day. She was the only audience of those notes, but I guessed she never knew because she probably wouldn't click into my wall or profile. Yup, it was an 1-way love. 

For 10 years, I kept the habit of writing down my thoughts in occasional notes and setting her to be the single audience. Until one day, she messaged me... She told me about a mid-night notification that someone shared a note ONLY with her... **FB changed the rule...**

What an embarrassing moment. But this might be a deepest wish in my heart for some day she found that out of her own will... We had some chat and she said she didn't remember much: The months she evaded from me. The dates I confessed to her. The years she let me wait for an answer which never came. After years, I know I don't love her any more. It is merely the imagination I created out of my memory. But the love was real and all recorded on the notes... 

Today, I just knew **FB removed the Notes...** It's like part of me has ended with it. Thank you for reading the story of a geek. If you love someone, I have 3 thoughts to share:
- treasure the love
- ask for no return
- be proud of yourself if you did the above

Lastly, I'm glad my **notes are still archived** here on FB, hope this link could help someone similar to me but less geek=)
# **https://fb.com/0/allactivity?category_key=NOTECLUSTER**
miching
Published: 2020-11-20 18:48:12

When I set out to build my command-line interface application, I knew I wanted to find an application programming interface which was related in some capacity to music. After some research, combing through lists of free API's, I still hadn't found something which resonated which me. A moment later, though, I typed in the words 'baroque music API' into the Google search box and lo! OpenOpus.org was one of the first results.

As I began examining the metadata contained within the OpenOpus API, I recalled how struck I'd been in a recent lesson in which I discovered .sample -- a Ruby method which allows you to extract a random value from an array of data. I remember being moved by that particular concept, because as when one rolls dice, picks a random card, or flips a coin, what are the forces at play in determining what side of the coin falls, or which side of the dice is on top? Plainly, when a machine makes a random selection, how does it do that?

Since Bach was a numerologist, deeply spiritual, but also intensely analytical, I decided to build a little cleromancy machine which would receive a genre name (chamber, keyboard, orchestral, or vocal) as user input, and then use .sample to spit out a 'random' title of a piece by Bach which fits into that genre. 

Another facet of random selection that interests me is the way one can use games or activities of chance within structured parameters to increase or enrich creativity, as with Brian Eno's Oblique Strategies -- a deck of cards, upon each is an insight or a directive for musicians and producers when they are working in the studio and get stuck. For instance, one might draw a card which says 'use an old idea', or 'honour thy error as hidden intention', or 'what would your closest friend do?'. These cards were inspired in part, I've read, by the I Ching, an ancient Chinese tradition of cleromancy.
Is gaming laptops are perfect for programming stuff?
Tags: laptop, programming, gaminglaptop, webdev
Published: 2020-11-20 18:47:48

Actually I'm currently using intel i3 7th gen machine,which is lagging a lot on multitasking .I usually do a lot of programming stuff(c,python, java etc).also works on frontend and backend development. Currently I'm facing a huge lagging problem on my system. That's why I am finding a suitable laptop which is enough powerful. But now there are lot of choices available in the market ,which are so confusing. guy's can you show some light, which laptop should I go for?
Don't Panic: The Solidus Guide to ReactJS
Tags: rails, ruby, ecommerce, solidus
Published: 2020-11-20 18:46:25

{% youtube AgHZLrhNAEo %}

Sean Denny hits us with a workshop-style guide on implementing ReactJS with Solidus - and rebuilds an entire product page in ReactJS to boot!

"Don't Panic: The Solidus Guide to ReactJS"
How do you bring the speed of ReactJS to the flexible and scalable Solidus ecosystem? The first step: Don't panic. Sean will take you through the basics - taking a vanilla Solidus store and adding ReactJS in step by step. Follow along as we take a look at how the Solidus API interacts with React, how React routing works, and some of the benefits of using ReactJS with Solidus. Just don't forget to bring your towel.

Here's a link to the chat log, which includes the URLs and code snippets posted: https://gist.github.com/seand7565/1f47e9c90abebbf4f5c358f3a0cf7c71
Video: Learn How to Use Watson Language Translator Service Without Writing Any Code
Tags: nocode, tutorial, video, ibmwatson
Published: 2020-11-23 04:36:03

---
title: Video: Learn How to Use Watson Language Translator Service Without Writing Any Code
published: true
date: 2020-11-20 18:42:03 UTC
tags: NoCode,Tutorial,Video,Watson
canonical_url: https://maxkatz.org/2020/11/20/video-learn-how-to-use-watson-language-translator-service-without-writing-any-code/
---

This short (only 5 min) video shows how to use the Watson Language Translator service without writing any code.

In this video you will learn:

- How to get the latest news in Portuguese
- How to translate the news using Watson Language Translator service to English
- How to save the results to Google Sheets file

{% youtube 0mqssckUDnE %}

Looking for more no-code videos? Check out my [no-code playlist on YouTube](https://www.youtube.com/watch?v=0mqssckUDnE&list=PLSAWywyhniCOpvlFSfUWVNAbclc2-1Kne)!
How to resolve merge conflicts in git :
Published: 2020-11-20 18:38:12

# __What is Merge Conflict :__
__Merge conflicts__ Happen when we try to merge two branches, which have same file updated by two or more developers .

![merge conflict](https://docs.microsoft.com/en-us/azure/devops/repos/git/media/merge-conflict.png?view=azure-devops)

If you try to merge the bugfix branch then git can not determine which changes to determine in the merge version .

![merge conflict](https://docs.microsoft.com/en-us/azure/devops/repos/git/media/merge-conflict-resolved.png?view=azure-devops)

# __Hands on :__

```touch demo```
```nano demo```
```
Original code (Master)
```

```$git branch dev1```
```$git branch dev2```
```$git checkout dev1```
```nano demo```

```
Original code(Master) 
code added by dev1
```

```$git add .```
```$git commit -m "code added by dev1"```
```$git checkout master```
```$git merge dev1```

```$git checkout dev2```
```nano demo```

```
Original code(Master) 
code added by dev2
```

```$git add .```
```$git commit -m "code added by dev2"```
```$git checkout master```
```$git merge dev2```

```
It displays a merge conflict error
This because in master we have a uncomplete code
``` 

* so we have to manually fix this :
```$git mergetool```

* Change the final code that you want and then save it .
```$git status```
```$git commit -m "merge conflict resolved"```
Frontend developer 
Tags: react, javascript
Published: 2020-11-20 18:27:43

Hi Dev network. 

Hope you are all staying healthy and safe at home.
As some of you have heard, I recently finished the wild code school Frontend development bootcamp.
I am excited to put my background and experience in JavaScript and react to good use in accomplishing my goal of starting a new chapter in my life, more rewarding and challenging.
If you or anyone you know is hiring for Frontend Developer in Switzerland or Portugal I would love to connect and learn more about the position and how I can provide impact. I am passionate and excited to make a difference.
 You can ask for my resume so you can learn more about my background, or check my GitHub : https://github.com/Teixeira66

I appreciate your help!
GitME: A simple README generator for your profile or repo
Tags: showdev, markdown, javascript, github
Published: 2020-11-20 18:13:43

So, I wanted to redo my GitHub README, because my [old one](https://github.com/aboutDavid/aboutDavidold) didn't look so good, and I wanted my new README to be fancier, like displaying my blog posts, Get my latest commit, etc.

So, I made GitME. A very simple README.md generator. You can use EJS or Nunjucks (hoping to add more soon). You can take data (from like a API) and use it in your templates. You can find more about this [here](https://github.com/aboutDavid/gitme#how-do-you-get-data-from-stuff-like-apis). I tried to make it something like [11ty's](https://11ty.dev) data files (in the `_data` folder) so people that used 11ty could easily use GitME and people who don't use 11ty can easily learn.

**How does it work**?
1. GitME will first compile all of the data into one object. Basically scanning the data directory and just merging the exported data into one object so you can use that data in your template file
2. GitME will read the file and give the data/file to the template engine
3. GitME will render the Markdown into HTML
4. GitME will push the rendered README to your repo.

It's just that simple.
Example: https://github.com/aboutdavid
GitHub repo (and more directions): {% github aboutdavid/gitme %}
Unifye
Tags: javascript, startup
Published: 2020-11-20 18:06:30

Kindly check out our project Unifye - Unifye is a contact information consolidation service which aims to cut the time it takes people to find the places you're located online. So far we have it hosted on a temporary domain provided within the source below. If you would like to be apart of building it to it's complete stage, message us or contact helpus@flytlabs.dev. Expect resume opportunity, monetization cuts, and a great team to further develop and create with at your own wish.

Thank you for your consideration!
https://findcollabs.com/project/unifye-HgdHQkLaJrHSI8yyf4aI
Log clustering in Rust
Tags: rust, cluster, devops, logging
Published: 2020-11-20 18:01:37

---
title: Log clustering in Rust
published: true
description: log clustering library for rust using the drain algorithm
tags: rust, cluster, devops, logging
//cover_image: https://direct_url_to_image.jpg
---

# Log clustering in Rust

Log clustering is a powerful tool for finding insights in large amounts of logs. Spikes in log categories can indicate a change point in the system warranting investigation.

Here is a simple library I wrote [drain-rs](https://github.com/benwtrent/drain-rs). And [lg-rs](https://github.com/benwtrent/lg-rs) is an example command line utility using the drain library.

Drain is an online, unsupervised semi-structured text clustering algorithm. It is based on the original work by [logpai](https://github.com/logpai/logparser). Drain boasts some impressive numbers when compared against other clustering algorithms:

![parsers](https://dev-to-uploads.s3.amazonaws.com/i/lmfsx8hwxu9cw6b6bkhy.png)

Paring this clustering efficacy with the throughput and low overhead capabilities of Rust is a no-brainer. 

![demo](https://dev-to-uploads.s3.amazonaws.com/i/1itg4rbzyahmzu5oonlc.gif)
  

Let me know what you think. Its OSS, so issues/PRs are welcome.
Test your frontend knowledge with this little fun quiz
Tags: quiz, frontend, css, watercooler
Published: 2020-11-20 17:56:40

---
title: Test your frontend knowledge with this little fun quiz
published: true
description: How well do you know frontend?
tags: quiz, frontend, css, watercooler
cover_image: https://ss.dt.in.th/api/screenshots/dt.in.th-citd3quiz.png
---

In February 2019, I created this little quiz for a [Code in the Dark](http://codeinthedark.com/) event[^citd] in Chiang Mai, Thailand. Now I’m making this quiz available online.

This quiz tests for general knowledge of HTML and CSS, as well as topics related to frontend development such as colors, typography and animation. It does not include JavaScript though.

It’s just for fun and is not indicative of skill (even skilled developers may get only half of them correct) but rather experience[^exp].

Here is it ([direct link to quiz](https://dt.in.th/citd3quiz.html)):

{% glitch citd3quiz app %}

I created this quiz while I was preparing to run the 3rd Code in the Dark event in Thailand.

I recalled that in the past events, many people would register as an observer (not a contestant), even though I see them as very good developers. When I asked why, some friends said that they are not confident enough to compete.

So in the 3rd event I changed the registration process. Now everyone registered as a participant, and before each round, we’d run a quiz and offer the top scorers a chance to be a contestant in that round.

This way, the truly skilled and experienced would get a better chance to compete, regardless of their self-confidence. That’s also why the quiz is separated into 3 rounds — people who did not make it in the first round are given 2 more chances.

Anyways, hope you enjoyed it, and thanks for reading!

[^citd]: It is a competition where contestants are asked to create a webpage according to the design within 15 minutes. Contestants must stay in text editor the whole time and no preview is allowed.

[^exp]: I wouldn’t expect anyone to memorize all the little things. However, with experience, the chance of recalling obscure details increase. It’s like how one may have been doing web design and development for so long that at one point they realized they now posses the ability to mix RGB colors in their head. Anyways, this quiz would be a very bad way to assess someone’s web development skills.
Game Review Zone (update)
Tags: ruby, rails, flatiron
Published: 2020-11-20 17:45:30

## GRZ Updated

Gaming Review Zone (GRZ - Pronounced as Gears) is a simple web app where you can create reviews about video games. I've created and built this project with Sinatra so I thought upgrading the code in Rails would be great idea!

## The Process

I worked with Ruby on Rails along with `ActiveRecord`. I used `devise` to create my `User` class which added all of my user authentication.

I've created my `Reviews` and `Games` class and formed the `has_many`, `belongs_to`, and `has_many_through` relationship between them. I've added validations and a custom validation.

```rb
# app > models > game.rb

  has_many :reviews
  has_many :users, through: :reviews

  validates :title, presence: true, uniqueness: true
  validates :title, length: { maximum: 35 }
  validate :is_title_case

  def is_title_case
    if title.split.any?{|w|w[0].upcase != w[0]}
      errors.add(:title, "must be in title case")
    end
  end
```

 I've added `Omniauth` to the authentication system so users can be able to sign in with Google. I've added all of the necessary nested and non-nested routes in the config/routes directory.

```rb
# nested route

 resources :games do 
    resources :reviews, only: [:new, :show]
  end
```

## Overall

Being so comfortable with Sinatra, transitioning to Rails was a little tough. After working on this project, I was able to grasp it more. There's still so much to learn, but once again I've proved to myself that I can stick through.
JavaScript here I come! ✨

##### Chapter 3 completed 🎉
#####~ RoyalTerminal 👩🏾‍💻

######// LEARN. LOVE. CODE. ♥
What was your win this week?
Tags: discuss, weeklyretro
Published: 2020-11-20 17:37:34

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Happy Friday!


**Looking back on your week — what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Cleaning your desk... or whatever else might spark joy 😊 


**Have a relaxing weekend!**

![Relaxed pup in a tent!](https://media.giphy.com/media/cgGw9jWiPxLTa/giphy.gif)
Setup Prometheus monitoring on k8s :
Tags: prometheus, devops, monitoring
Published: 2020-11-20 17:33:08

# __What is Prometheus :__
Prometheus is an open source application monitoring software which is used to achieve the continuous monitoring of our application state .

# __Let's set up a sample monitoring in our k8s cluster with Prometheus and Grafana :__

![prom and graph](https://dev-to-uploads.s3.amazonaws.com/i/1jmzhe17gxj6a07gzenm.png)

* Instead of creating all the configuration files we are going to use Prometheus __Helm charts__ 
* And Internally __Kubernetes operators__ are going to manage all the configurations .

* Install the Prometheus Helm Chart :
```$helm install --name prometheus stable/prometheus```

* Have a look at some default files that we are going to need in the future using these commands .
```$kubectl get pod```
```$kubectl get service```
```$kubectl get configmap```
```$kubectl get cidr```
```$kuctktl get statefulsets```

* Two things we need to take care of when we add a new configuration to our cluster .

1. About the configuration settings 
2. About the Alert manager     

* Access the grafana dashboard by using the port-forward command .
* Check in which port __Grafana dashboard__ is running 
```$kubectl logs prometheus-grafana-5c5885d488-b9mlj ```
```$ kubectl port-forward -n prometheus prometheus-grafana-5c5885d488-b9mlj 3000 ```

* Then open the browser and visit to 
``` http://localhost:3000 ```

* On the login page, enter __admin__ for username and password.
Lack of confidence, need suggestion
Tags: help, code, javascript, confidence
Published: 2020-11-20 15:35:11

Hi everyone,

I am working in the technical support field for the last 10 years. We mainly support customers with their e-commerce website and HTML, CSS, REST API, Liquid, and basic Javascript.

For the last 2 years, I have been making internal tools for our agents and have delivered more than 6 projects successfully, without any complaints. 

I used the MEAN stack (MongoDB, Angular 6 to 9, Node JS, Express) with JWT, Passport, and even Okta Integration for development. I know the basics of AWS as well.

For the last few months, I am trying to switch from Technical Support to Front End Development, without success (no internal option, so trying externally). I failed in my interviews on some basic questions, even though I was able to explain the entire project on Github and some advanced JS concepts like ES6 features, event bubbling, etc. 

I have gone through JS basics many times, but still no success. I worked on questions after every failure but still failing. 

What am I missing or doing wrong?
I never pass wrong parameter values to a method again with Visual Studio 2019
Tags: visualstudio, csharp, ide, editor
Published: 2020-11-20 17:28:08

Have you ever pass wrong parameter values to a method because:

- The method has too many parameters
- There are also default values for parameters
- There are many overrides

Of course Visual Studio let you know when you pass wrong type, but not for the same type.

Let's see the simplest example.

```csharp
using System;

namespace SampleConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var me = new Person("kenichiro", "nakamura");
            Console.WriteLine($"Hello {me.Firstname} {me.Lastname}");
        }
    }

    class Person
    {
        public string Firstname { get; set; }
        public string Lastname { get; set; }
        public Person(string firstname, string lastname)
        {
            this.Firstname = firstname;
            this.Lastname = lastname;
        }
    }
}
```
When I write code, Visual Studio helps me by showing parameter name.

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

However, after I finish entering values, now I don't see any hint.

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

# Enable Experimental Feature

The latest Visual Studio 2019 has following option.

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

Once you enable it, you can see parameter names like this.

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

Of course, the official document has this information [here](https://docs.microsoft.com/en-us/visualstudio/ide/reference/options-text-editor-csharp-advanced?view=vs-2019#editor-help)

# Who need this feature?

I do. But it's not required for everyone, every time. There was a discussion in [GitHub issue](https://github.com/dotnet/roslyn/issues/47597) which suggest some improvements and re-consideration.

So I recommend you to try out first, then if it bothers you, you can turn it off anytime without restarting your VS 2019.
Check if a string contains Zalgo text
Published: 2020-11-20 17:26:32

#What is Zalgo Text?
[Zalgo Text](https://www.calculatorology.com/zalgo-text/) typically falls in the CC and CD Unicode ranges. Writings are going through irregular moves and these alterations are making them exceptionally prevalent. Nearly every week, we meet with a modern fashion of content. But a few of the content styles are profoundly acknowledged and utilized over the web. Memes are prevalent to utilize extraordinarily styled writings. A few styles make them appealing while a few make them see revolting, but their topic is arranged sometime recently utilizing them. In this way, a few meme-makers utilize peculiar content styles fair to form their meme scary. Among those weird styles, Zalgo text style is one of them.

#How Zalgo text generator works
The [Zalgo text generator](https://zalgotext.mobi) adds symbols on top, beneath and in the middle of your text. Putting stuff in the middle is discouraged, because some browsers and system that are not as good with symbols, are going to turn some letters into squares then.

#How to find is a string contains Zalgo text
Zalgo text is made from a multitude of Unicode diacritic marks. For that reason if anyone need to check if a string contains Zalgo text using this **/[\xCC\xCD]/** regular expression you can check it. This is a example in JavaScript. 

```
if ( str.match('/[\xCC\xCD]/') ) {
    alert('This is a Zalgo text');
 }
```
This is in Python

```
import re

#Check if the string contains Zalgo text:

txt = "H̛̛͠ȩl̨̀͞l̨̨͘ơ̧ W͠͡͠or̶͜ld̀"
x = re.search("/[\xCC\xCD]/", txt)

if x:
  print("YES! This string contains Zalgo text!")
else:
  print("No match")
```
This is in PHP

```
<?php
$str = "H̛̛͠ȩl̨̀͞l̨̨͘ơ̧ W͠͡͠or̶͜ld̀";
$pattern = "/[\xCC\xCD]/";
echo preg_match($pattern, $str); // Outputs 1
?>
```
This is in C#

```
public bool IsZalgoText(String str)  
    {  
        Regex objNaturalPattern = new Regex("/[\xCC\xCD]/");  
        if(objNotNaturalPattern.IsMatch(str)){
          return true;
        } 
        else{
          return false;
        }
    }  
```

Thanks and Happy Codding :)