teleren/devto huggingface dataset:
Programming C == Computer
Tags: programming, devops
Published: 2020-11-20 11:51:11

This is my First Dev. to blog on C programming and my Nontech background to DevOps Engineer journey
When I started my computer science diploma in the year 2013, I don't idea programming and computer too much I had completed only a basic computer course where I learn only the use of paint and playing the game pinball.
after completion of my 12th in science background, I took admission to Computer Diploma. and what happens my journey start towards the Computer world. 
Ok, my first programming subject was C Programming. in the first attempt, I was failed in C.
because I don't have an idea of how it works. so one of my teachers gives me the basic idea of c.
I passed the exam with good marks. But in mind, I always had dought why C is too hard, and Why C is important to become Computer Engineer, 
And in the end, I find the answer->
   When you start learning computer science we heard too many concepts like networking, hardware, CPU, Memory, etc
C programming is one of the programmings where most of the theories related to the computer are explained and working on that. for example Memory, related work is explained using pointer where most of the students are stuck on the pointer concept.

There is a lot of benefits to learning C programming. some of the application of c programming
1. Operating Systems
2. Embedded Systems
3. Development of New Languages

Many more.
#PureCSS - Responsive PS5 Logo
Tags: codepen, purecss, css
Published: 2020-11-20 11:46:21

---
title: #PureCSS - Responsive PS5 Logo
published: true
tags: codepen, purecss, css
---

<p>Pure CSS Responsive PS5 Logo</p>

{% codepen https://codepen.io/AsyrafHussin/pen/ZEONdwE %}
Time to learn C# with Notebook in VS Code
Tags: vscode, jupyter, csharp, dotnet
Published: 2020-11-20 03:17:58

[Jupyter Notebook](https://jupyter.org/) is popular platform to write and execute your code. However, not many C# developer use it as we have Visual Studio as our preferred IDE. 

However, according to [Introducing the Jupyter Extension for VS Code](https://devblogs.microsoft.com/python/introducing-the-jupyter-extension-for-vs-code/) article, VS Code start supporting Jupyter Notebook more and more these days. So it's time to try C# on Jupyter Notebook.

# .NET Interactive Notebooks

[.NET Interactive Notebooks](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode) is an extension for VS Code, and it's easy to start using with 3 steps.

1\. Install [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/) as it's preview feature at the moment. By the time you read this article, it would be included in normal VS Code though.

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

2\. Install .NET Core SDK, which I believe all C# developer already have. The official page says to install [.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1).

3\. Install  .NET Interactive Notebooks extension.

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

Just restart VS code to complete the installation.

# Create your first notebook

Now you're ready to use it. Go to command palette and select "Create new blank notebook"

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

It may take a bit of time for initial notebook creation, so just wait until you see new notebook. Once it's ready, you see the notebook like below.

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

Type your code and execute by either click arrow icon or Shift+Enter.

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

Of course you can define class and use it.

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

# .NET 5?

.NET 5 GA this week! Yay! But the extension supports .NET Core 3.1 at the moment. Let's wait until it support .NET 5. Check [GitHub issue](https://github.com/dotnet/interactive/issues/869) for more detail. I cannot wait to try [Record type](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#record-types) in notebook :)

# Other than C#?

Yes, the extension supports various other dotnet related languages.

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

For example, you can write and execute PowerShell as well :)

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

# Reference

[dotnet/interactive](https://github.com/dotnet/interactive)
[notebook samples for C#](https://github.com/dotnet/interactive/blob/main/samples/notebooks/csharp/Samples)
Gravitee.io API Management 3.x on GKE
Published: 2020-11-20 11:31:21

Nowadays, there are more and more deployments on Kubernetes to operate cloud-native applications regardless of the environment and underlying infrastructure.

If you would like to see a demo, please click here.

Obviously, Gravitee.io can also be deployed on a Kubernetes cluster to very quickly provision a new environment and allow you to expose your APIs and services publicly, in a secure way.

This post will be the first in a series of about Kubernetes deployment. This first post will explain how to deploy Gravitee.io API Management 3.x to the Google Kubernetes Engine.

https://www.gravitee.io/article/gravitee-ioapim3-xongke
Complex Pipelines in Go (Part 3): Transforming Data to Tab Separated Values
Tags: go, postgres, tutorial
Published: 2020-11-20 11:28:17

### Transforming Data to Tab Separated Values

In [part 2](https://dev.to/mariocarrion/complex-pipelines-in-go-part-2-storing-values-in-batches-f2m) we focused on persisting data previously transformed, in this post we will be work on implementing that transformation step. Specifically we will be using the data we got and we will make sure that is manipulated in a way the downstream pipeline can handle it the _easiest way_ possible, this component is a key piece of the **Data Producer Process**.

### Minimum Requirements

All the code relevant to this post is on [Github](https://github.com/MarioCarrion/complex-pipelines/tree/master/part3), feel free to explore it for more details, the following is the minimum required for running the example:

* Go 1.14

### Parsing Values

Selecting the right package for parsing values depends on the format being used, common examples of those formats include [JSON](https://pkg.go.dev/encoding/json@go1.14.7?tab=doc), [CSV](https://pkg.go.dev/encoding/csv@go1.14.7?tab=doc) or [Protocol Buffers](https://pkg.go.dev/mod/github.com/golang/protobuf@v1.4.2); knowing the right data format is definitely important but so is knowing the specific standard and version being used.

In the end the package to be used will be determined by the original datasource. With that in mind in and recalling what we talked in [part 1](https://dev.to/mariocarrion/complex-pipelines-in-go-part-1-introduction-32bo), we know for sure our origin datasource will be [IMDB](https://datasets.imdbws.com/), the concrete file is gziped and contains tab-separated-values. By the way, in this post we are not be covering the gunzipping part, that will be discussed in future posts.

So what is exactly needed for this? 

We can be tempted to use `encoding/csv` and set up our reader with a configuration similar to:

```go
cr := csv.NewReader(br)
cr.Comma = '\t'
cr.LazyQuotes = true
```

However **this will not work**, the reason being is that the original datasource is not really using the expected format this package implements. I'm explicitly mentioning this because it is really important to determine this in advance, it may look like a CSV (using tabs instead of commas) but really it is not.

In reality the implementation for parsing IMDB's TSV file is easier than that. We can use [`bufio`](https://pkg.go.dev/bufio@go1.14.7?tab=doc) and do something like the following:

```go
br := bufio.NewReader(f)

for {
	line, err := br.ReadString('\n')
	if err == io.EOF {
		return
	}

	if err != nil {
		log.Fatalf("Reading TSV %s", err)
	}

	fmt.Printf("%#v\n", strings.Split(strings.Trim(line, "\n"), "\t"))
}
```

This should give us what we expect: a data structure (in this case a slice of strings) that can easily be handled by out downstream pipeline.

### What's next?

The next blog post will cover the phenomenal [`errgroup` package](https://pkg.go.dev/golang.org/x/sync/errgroup?tab=doc)! We are so close to connect everything together.
Learning Julia (7): apropos Types
Tags: julia, neo4j, types
Published: 2020-11-20 11:25:25

Everything in Julia has its type, we can use `typeof()` to obtain its type. There is a complex hierarchical type Tree structure in Julia, meaning that every non-root type has its 'parent' type from which it is 'derived'. We can use `supertype()` to get parent type and `subtypes()` to get all its children types:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7kike2izumdidbsafsif.png)
 

I wrote several lines of code for studying this tree-structure of Types in Julia. The *root* variable is defined as input which should be a Type in Julia and this file shall output all its derived types. The output of this code is a file where each line contains a type-type pair and their relation (simple entity-relation case of Knowledge Graph). 



```julia

using InteractiveUtils   # thus we can call subtypes() without interactive mode

root = Real    # or other types that we want to get all its derivative types

## a  parent - (relation) -> son data struct
struct TypeLink
    node_parent::String
	relation::String
    node_son::String
end


function getLink(parentName, childName)
    return TypeLink(parentName, "is_parent_of", childName)
end

l = TypeLink[]


println(length(subtypes(root)))
function getAllChildren(node)
    if length(subtypes(node)) > 0
        for i in subtypes(node)
		    s = getLink(string(node), string(i))
			push!(l, s)
			# println( string(i))
			if i != Any
			    getAllChildren(i)
			end
		end
	end
	return
end


# GO! 
getAllChildren(root)
println(length(l))

# save to file
open(string(root)*"Type.txt", "w") do f
    for i in l
	    n1 = i.node_parent
		n2 = i.node_son
		n3 = i.relation
        write(f, "$n1, $n2, $n3 \n")
	end
end
```
The output file content is shown below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o9kqkknn25rgg7yw53fu.PNG)



Now I load the output data to Neo4j, and check the output:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mrjnr193yt7os3k4a5jc.PNG)


I tried also obtaining all derived type of **Any** type. This yields more than 10k links：

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

Impossible to plot the entire graph, I show a partial graph who contains 100 relations:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k4uar959ebn6qc5lzenx.PNG)
Published Isolated, Reusable - React Component 🎉🎉 
Tags: react, typescript, javascript, a11y
Published: 2020-11-20 11:17:41

---
title: Published Isolated, Reusable - React Component 🎉🎉 
published: true
description: My first isolated, reusable react component is published on Bit.dev
tags: Reactjs, TypeScript, JavaScript, A11y
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/de5yu2o8s33i50kg3mmp.png
---
Happy to announce that I published my first Isolated & Reusable React Component on Bit.dev platform 🎉🎉🎉🎉.

Here is the link [DayNightSwitcher](https://bit.dev/navdeepsingh/react-components/ui/day-night-switcher).
Description: The accessible day-night theme switcher react component.

Already implemented on my newly developed website which crafted using Tech Stack: Gatsby & Netlify CMS [https://navdeepsingh.in/](https://navdeepsingh.in/)

Here is the screencast. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bqivtn1vacnqhxyv7v9m.gif)

Hope it will serve the purpose. The benefit of the loosely coupled component is that we can do testing easily and also state management can be done with a personal choice like ContextAPI, Redux, MobX, etc.

Looking for your comments!!
Udemy Black Friday
Tags: python, programming, productivity, career
Published: 2020-11-20 11:05:37


If you are looking to learn new skills, consider leveraging [Udemy's Black Friday offer](https://www.tryblackfriday.com/2020/11/udemy-black-friday.html
). As 183,000+ online courses on this biggest marketplace for learning are going at the lowest price of the year.

Do check this out and learn more about the offer..
❎❓Quiz: Web Performance #20
Tags: challenge, webperf, webdev, quiz
Published: 2020-11-20 11:01:37

Response time is an important topic.

What is the maximum response time you should aim for the completion of the whole task?


- 50 ms
- 100 ms
- 200 ms
- 250 ms

---
<center>[Answer the question](https://marcradziwill.com/web-performance-quiz/what-is-the-maximum-response-time-you-should-aim-for-the-completion-of-the-whole-task/)</center>
---
8 useful console methods in JavaScript.
Tags: javascript, node
Published: 2020-11-22 20:10:06

---
title: 8 useful console methods in JavaScript.
published: true
date: 2020-11-20 11:00:00 UTC
tags: javascript, nodejs
canonical_url: https://blog.murtajaziad.xyz/8-useful-console-methods-in-javascript/
---

In this article, I will show you 8 useful console methods.

* * *

![Photo by Sam Kolder — Pexels](https://blog.murtajaziad.xyz/static/91af3e8bebc0d28240e9d3ef4ad72c0f/1c72d/pexels-sam-kolder-2387873.jpg)

* * *

### 1. console.log

console.log() is used to output a message to the console, the message can be a string, a number, an array, an object, or a JavaScript expression.

```js
console.log(1); // number.
console.log("hi"); // string.
console.log([1, 2, 3]); // array.
console.log({ hi: "bye" }); // object.
console.log(10 + 20); // expression.
```

### 2. console.assert

console.assert() writes the error message to the console only when the assertion is false.

```js
console.assert(false, "The statement is false");
console.assert(50 > 100, "50 isn't bigger than 100");
```

### 3. console.clear

console.clear() clears the console _only if it’s allowed by the environment_.

```js
console.clear();
```

### 4. console.dir

console.dir() displays an interactive list of the properties of the specified JavaScript object.

```js
console.dir(document.location);
```

### 5. console.error

console.error() is used to display an error to the console.

```js
console.error("A simple error.");
```

### 6. console.count

console.count() logs the number of times that this particular call to count() has been called.

```js
for (let i = 0; i < 10; i++) {
  console.count("number");
}
```

### 7. console.table

console.table() is used to display data in the form of a table.

```js
let object = {
  a: "hi",
  b: "hello",
  c: "bye",
};

console.table(object);
```

### 8. console.time

console.time() tracks how long an operation takes.

```js
console.time("loop");
for (let i = 0; i < 10000; i++) {}
console.timeEnd("loop");
```
A free tool for creating QR menus for restaurants
Tags: qrmenu, restaurants, javascript, html
Published: 2020-11-20 10:59:44

Created a free tool for generating QR code for restaurant menus. 
Many restaurants are adopting QR menus to avoid customers touching physical menus during these difficult times . This tool can be used to create one ..
https://fullstackdeveloper.guru/2020/11/18/built-a-tool-a-no-touch-qr-menu-for-restaurants/
Simple voting Smartcontract on XinFin XDC Network
Tags: blockchain
Published: 2020-11-20 10:46:48

Anyone looking for simple #voting #smartcontract in solidity language can refer my smartcontract that I deployed on XinFin XDC Network under injected web3 environment.
Check the code here: 
`pragma solidity ^0.4.17;
contract Voting {
    struct Proposal {
        string title;
        uint voteCountPos;
        uint voteCountNeg;
        uint voteCountAbs;
        mapping (address => Voter) voters;
        address[] votersAddress;
    }
    struct Voter {
        uint value;
        bool voted;
    }
    Proposal[] public proposals;
    event CreatedProposalEvent();
    event CreatedVoteEvent();
    function getNumProposals() public view returns (uint) {
        return proposals.length;
    }
    function getProposal(uint proposalInt) public view returns (uint, string, uint, uint, uint, address[]) {
        if (proposals.length > 0) {
            Proposal storage p = proposals[proposalInt]; // Get the proposal
            return (proposalInt, p.title, p.voteCountPos, p.voteCountNeg, p.voteCountAbs, p.votersAddress);
        }
    }
    function addProposal(string title) public returns (bool) {
        Proposal memory proposal;
        CreatedProposalEvent();
        proposal.title = title;
        proposals.push(proposal);
        return true;
    }
    function vote(uint proposalInt, uint voteValue) public returns (bool) {
        if (proposals[proposalInt].voters[msg.sender].voted == false) { // check duplicate key
            require(voteValue == 1 || voteValue == 2 || voteValue == 3); // check voteValue
            Proposal storage p = proposals[proposalInt]; // Get the proposal
            if (voteValue == 1) {
                p.voteCountPos += 1;
            } else if (voteValue == 2) {
                p.voteCountNeg += 1;
            } else {
                p.voteCountAbs += 1;
            }
            p.voters[msg.sender].value = voteValue;
            p.voters[msg.sender].voted = true;
            p.votersAddress.push(msg.sender);
            CreatedVoteEvent();
            return true;
        } else {
            return false;
        }
    }
}`
Janet: manage your python projects more efficiently
Tags: python
Published: 2020-11-20 10:40:51

Janet is a python project manager that makes your life a whole lot easier. Janet will monitor your current project directory and detect new module imports in your .py scripts, it will then download all the imported modules silently so you don't have to, it will also maintain and update a requirements.txt. Janet also features a sweet CLI for users to run their scripts or kill them (if it is a web application though), it also come with autocomplete just like what you would expect from any CLI out there!

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

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

all you need is to pip install Janet and you are all set, the README talks more about the various commands you can issue through Janet.

https://github.com/veryprofessionalusername/janet

Janet creates a janetrecord.json to keep tabs on all the files in your project, it will also insert itself in your projects .gitignore so you don't have to do it, get back to coding your next startup champ!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2g0946cvr5olds0hk578.png)
React + LitElement Have Beers 🍺🍺
Tags: javascript, react, webcomponents, litelement
Published: 2020-11-20 10:14:36

[Two simple beer listings show](https://www.jimmont.com/code/components.html) a React and LitElement implementation side by side. These show the nearly identical lifecycle API and feature set, including some benefits of the newer technology like encapsulation and how to use them together--which is especially useful when [more performance](https://labs.thisdot.co/blog/showcase-react-vs-lit-element-rendering-performance) is needed or better [developer/designer experience](https://web.dev/web-components-io-2019/) wanted.

![screenshot-beer-listings](https://dev-to-uploads.s3.amazonaws.com/i/zxxp4w98itphnsf4t1b4.png)
Redux, Rails, and A New Project Idea!
Tags: devjournal, sideprojects, redux, react
Published: 2020-11-20 09:49:33

_This post was originally published on November 20, 2020 on [my blog] (https://alexlsalt.github.io/blog)._

Hello and happy Friday! I've taken a couple days off, but I'm diving in again today.

I recently started in on Dave Ceddia's course Pure Redux to familiarize myself with Redux (I'd officially put it off long enough), and I'm happy to report I now have a working knowledge of its job with state management in apps! I'm looking forward to really solidifying my knowledge with it.

In other news, I've also started dipping my toes into Ruby on Rails! I think for now I'm going to focus more on working through and finishing my Pure Redux course instead of splitting my attention - but I can already tell that Rails is something I want to really explore and add to my skillset just by virtue of seeing so many interesting job posts that call for a React frontend and a Rails backend.

Lastly, whilst in the shower (of course), I had the idea for the perfect new side project idea! It's going to take the Spotify API and allow users to choose content for a daily/morning sort of "radio show" - like with songs and news clips from preferred podcasts.

So, for instance, I'd probably sprinkle in NPR daily news with some random songs from the 'Daily Mix' playlist that the Spotify algorithm puts together based on each user's specific music taste.

Oooh! I'm excited about that! But, of course -- first things first. Focusing on one thing at a time will get me further and faster!
JavaScript Instagram Bot P2
Tags: javascript, instagram, bot, instagrambot
Published: 2020-11-20 09:48:48

<h3>Hi, This my second JavaScript Instagram "bot", but not actually a bot 😝, just a useful piece of code used in a smart way.</h3>
<br/>

<h4>The best way to gain followers on Instagram is by following others who already follow people with similar content as yours. </h4>

**BTW check out my previous [article](https://dev.to/danijelajs/javascript-instagram-bot-3nmk) about my Instagram bot for likes for better clarification**

<br/>

Let's begin!
Like last time, you need to log in to your Instagram account on your computer, search for the account with similar content as yours, and click on their followers. Inspect the **Follow** button, and see which class the button has. Now, click on the browser console, and paste this code, **don't forget to add the classes of the button**.

<pre><code>

  var followed = 0;
  setInterval(function() {
    const button = document.querySelector('button.classes');
    //change classes with classes you got when inspecting the button
    if(button) {
        button.click();
        followed++;
        console.log(`` `You followed ${followed} people` ``);
    }
  }, 10000); 

</pre></code>

-Keep in mind Instagram has the tendency to change the classes frequently.

P. S. Be careful, set the setInterval to at least 10-15 seconds  so your account doesn't get banned 😁

You are welcome 😁
Birth of Worker Microservice from Monolithic code
Published: 2020-11-20 09:36:48

This story is all about the creation of TWO Microservices that were extracted from the Monolithic System.

Domain: Online Bill Payment / Financial

Tech Spec: Java, Spring Boot, PostgreSql, Redis, Kafka, Azure

Whenever there is a repetitive work happening in any System, the idea of modularization should be implemented. The same thing happened in the project that I have been working on. I proposed this idea to my team with POC and felt heard, when the team and my boss appreciated my idea.

Happily took my first step for this little milestone. There are many places in the monolithic system project calling the External Broker Service for the below needs:

To fetch Bill details
2. Company details that the bills were paid for.
3. Paying the Bill through Integrated service.
4. Confirming the Bill Payment.

Also there are other microservices that are calling these apis from many places directly to the Broker Service. I created the Worker/External Utility service that receives Internal http calls from these local services and makes External https calls to External Broker Service.

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

Later at a point of time, the entire logic is of Worker Microservice consumption is developed as Jar file and added as a Dependency for all required Monolithic and other microservices. The microservice is now busy with serving the Centralized Traffic of 75% utilization every hour.
The secondary microservice that I mentioned earlier was a Mocking Microservice for other consumer Services in development & UAT setups.