teleren/devto huggingface dataset:
Basic Programming Terminology
Tags: programming, terminology, vocabulary
Published: 2020-06-10 03:39:29

---
title: Basic Programming Terminology
published: true
description: Some basic programming terminology which vocabulary we used a lot in all programming languages.
tags: Programming, Basic, Terminology, Vocabulary
cover_image: https://images.unsplash.com/photo-1579705745811-a32bef7856a3?ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80
---

Let's learn some basic programming terminology and try to understand what kind of vocabulary we used in regular basis while we writing code. these vocabulary will help us to understand what we actually doing.

- **Program** – a sequence of instructions (called statements), which are executed one after another in a predictable manner. Sequential flow is the most common and straightforward sequence of statements, in which statements are executed in the order that they are written – from top to bottom in a sequential manner;

- **Statement** – a single action (like print a text) terminated by semi-colon `(;)`;

- **Block** – a group of zero, one or more statements enclosed by a pair of braces `{...}`; There are two such blocks in the program above.

- **Method** – a sequence of statements that represents a high-level operation (also known as subprogram or procedure).

- **Syntax** – a set of rules that define how a program needs to be written in order to be valid;

- **Keyword** – a word that has a special meaning in the programming language (`public`, `class`, and many others). These words cannot be used as variable names for your own program;

- **Identifier or name** – a word that refers to something in a program (such as a variable or a function name);

- **Comment** – a textual explanation of what the code does.

- **Whitespace** – all characters that are not visible (`space`, `tab`, `newline`, etc.).

That's all for now. thanks for reading.

## Who Am I?
This is [Md. Jamal Uddin](https://jaamaal.com/) working as a Software Developer based in Dhaka, Bangladesh. I love to learn new things and share them with others. Playing with cutting technologies is my hobby and working with legacy is my day job :). Connect me on [Twitter](https://twitter.com/jamal_uddin95) and [LinkedIn](https://www.linkedin.com/in/jamal-pb95/)


### Reference:
- Photo by Tijana Drndarski on Unsplash
- Vocabulary comes from JetBrains Academy.
Do you know how to use Nuxt.js with Express? Let's explain it.
Tags: javascript, vue, node, nuxt
Published: 2020-06-10 03:33:07

Last year I was obsessed with the stack below 🔥

* Could Functions: For Node.js hosting
* Nuxt.js: For backend and frontend
* Firebase Hosting: For static files (HTML, CSS, JavaScript and etc)
* Cloudinary: For media files (dev.to uses this!)

When I first started using Nuxt.js with Cloud Functions, I could not understand how they communicate with each other.

How does Express call Nuxt.js when it receives a request?

So this time, I am going to elaborate on how we can connect Express to Nuxt.js on Cloud Functions.

![Yay!](https://dev-to-uploads.s3.amazonaws.com/i/6aqrw17r3jkinb1mgqzj.png)

## Integrate Nuxt.js with Express

### Point1. Use Nuxt.js as middleware on Express.

You can use Nuxt.js as middleware like [this](https://github.com/taishikato/nuxt-express-firebase-template/blob/master/template/functions/index.js#L2)


I didn't have such an idea that I can use Nuxt.js as middleware on another framework.

## Separate processing for each path using nuxt.renderRoute()

With [nuxt.renderRoute()](https://nuxtjs.org/api/nuxt-render-route/), you can decide which page component Nuxt.js will use for each path.

For example, the application is `https://example.com`.
If you wrote the following, if you went to `https://example.com`, you would see the Nuxt.js uses `pages/top.vue`. Easy!!

```javascript
app.get('/', (req, res) => {
  nuxt.renderRoute('/top', { req })
  .then(result => {
    res.send(result.html);
  })
  .catch(e => {
    res.send(e);
  });
});
```

You cam pass the context as a second argument.

If you want to call some API on Express and pass the response to Nuxt.js, you can use `req` object like below.

```javascript
app.get('/', (req, res) => {
  (async () => {
    // Call an API with axios
    const { data } = await axios.get('https://api.com');
    req.data = data;
    const result = await nuxt.renderRoute('/top', { req });
    res.send(result.html);
  })();
});
```

You can use that data with Nuxt.js `asyncData` function.

```javascript
<template>
  <div>
    {{ apiResult }}
  </div>
</template>

<script>
export default {
  asyncData(context) {
    return { apiResult: context.req.data };
  }
}
</script>
```

## Explanation of the entire process with diagrams

1. Client send a request to Firebase Cloud Functions (or any other web servers) and Express receive it.
2. Express calls `nuxt.renderRoute()`
3. Nuxt.js generates HTML and returns it to Express
4. Express sends the HTML returned by Nuxt.js to the client

![diagrams](https://dev-to-uploads.s3.amazonaws.com/i/3sozbdc0fwiipj3aj119.png)

Hope it helps!

---

Thank you for reading!!

Check my socials as well✌️
Twitter: [@askmakers_app](https://twitter.com/askmakers_app)
Product Hunt: [@taishi_kato](https://www.producthunt.com/@taishi_kato)

I am currently looking for full-time job in Vancouver and Toronto area!
My resume is [here](https://taishikato.com/resume.pdf).
Please hit me if you can help🙏

Thank you!
Modular Sign in with Apple in iOS
Tags: ios, swift, design, apple
Published: 2020-06-10 02:42:51

This was published fitst @[Medium](https://blog.usejournal.com/modular-sign-in-with-apple-in-ios-d18ad913aa47)

Over the years, authentication has been a creep for most of the mobile apps. At first, it was required for users to signup to start using any app. Then Apple and UX developers wondered Why users are required to signup for a thing they have not seen or used.

Thus, you should let them taste the application. Then, if they like it enough and would like to access more features, they are required to sign up. This, in turn, leads to having many paths to get your user to the signup process and many entry points.


On the other hand, signing up is a process users always hate because it is a time-consuming process. That's why developers invented a single sign-in button, starting with Facebook, moving on to Google, and Apple, which lately, decided to have its button.

### So, How to deal with that in your codebase?

Will you just add it to the login controller, easy? Ok, what if you've multiple login entry points to your app? you'll copy the code? it's just a few SDK imports and login lines, right?
But that doesn't scale well, at all.


---

Every iOS app is now required to include the new sign in with Apple. Be it a new app, or a current one in the AppStore. For the current apps, Apple extended the deadline to June 30, 2020.


---

The key idea here is that using this pattern drives me to the fact of how adhering to design patterns impacted my code, making it very robust, composable, and easy to test.

### What's the "Strategy" design pattern?

Strategy Design Pattern: is a type of behavioral design pattern that encapsulates a "family" of algorithms and selects one from the pool for use during runtime. The algorithms are interchangeable, meaning that they are substitutable for each other. The key idea is to create objects which represent various strategies(source)


---

### What're we trying to achieve?
An authentication module that can easily be extended with new services, tested, debugged, monitored, and easily reused.
How can that be assembled in swift?
If you liked it so far, please continue reading it on [medium](https://blog.usejournal.com/modular-sign-in-with-apple-in-ios-d18ad913aa47).
List of ASP.NET MVC 5 posts
Tags: csharp, angular, webdev
Published: 2020-06-10 01:36:53

1.[ASP.NET MVC 5 Helllo World](https://dev.to/skipperhoa/asp-net-mvc-5-helllo-world-1o55)
2.[ASP.NET MVC 5 Create Shared Layout Razor & ViewStart](https://dev.to/skipperhoa/asp-net-mvc-5-create-shared-layout-razor-viewstart-4h3)
3.[ASP.NET MVC 5 Install Bootstrap](https://dev.to/skipperhoa/asp-net-mvc-5-install-bootstrap-2d3a)
4.[ASP.NET MVC 5 Using DBContext Connect Database](https://dev.to/skipperhoa/asp-net-mvc-5-using-dbcontext-connect-database-3846)
5.[ASP.NET MVC 5 CRUD Tutorial With Example For Beginners](https://dev.to/skipperhoa/asp-net-mvc-5-crud-tutorial-with-example-for-beginners-23d9)
6.[Pagination For Search Results ASP.NET MVC 5](https://dev.to/skipperhoa/pagination-for-search-results-asp-net-mvc-5-2nac)
7.[ASP.NET MVC 5 Ajax Pagination For Search Results](https://dev.to/skipperhoa/asp-net-mvc-5-ajax-pagination-for-search-results-3fi0)
8.[ASP.NET MVC 5 Render Sections with RenderSection](https://dev.to/skipperhoa/asp-net-mvc-5-render-sections-with-rendersection-5f23)
9.[ASP.NET MVC 5 LinQ to SQL](https://dev.to/skipperhoa/asp-net-mvc-5-linq-to-sql-3m7m)
10.[ASP.NET MVC 5 Form Validation](https://dev.to/skipperhoa/asp-net-mvc-5-form-validation-450p)
11.[ASP.NET MVC 5 Partial View with Ajax Form](https://dev.to/skipperhoa/asp-net-mvc-5-partial-view-with-ajax-form-2fnf)
12.[Login and Register using ASP.NET MVC 5](https://dev.to/skipperhoa/login-and-register-using-asp-net-mvc-5-3i0g)
13.[Repository Pattern using ASP.NET MVC 5](https://dev.to/skipperhoa/repository-pattern-using-asp-net-mvc-5-1h9h)
14.[ASP.NET MVC 5 Stored Procedure](https://dev.to/skipperhoa/asp-net-mvc-5-stored-procedure-5e53)
15.[ASP.NET MVC 5 - Multiple Comment](https://dev.to/skipperhoa/asp-mvc5-multiple-comment-473p)
16.[Build Angular + ASP.NET MVC 5](https://dev.to/skipperhoa/build-angular-asp-net-mvc-5-4gi3)
17.[Build Web API using Angular with ASP.NET MVC5 (Part 1)](https://dev.to/skipperhoa/build-web-api-using-angular-with-asp-net-mvc5-part-1-2e0i)
18.[Build Web API using Angular with ASP.NET MVC5 (Part 2)](https://dev.to/skipperhoa/build-web-api-using-angular-with-asp-net-mvc5-part-2-225j)
SSR apps - obfuscate your code?
Tags: discuss, javascript, vue, react
Published: 2020-06-10 01:18:06

For people producing enterprise / running a SaaS product, let's say in particular a server-side rendered thing or something that React/Vue has statically bundled and a large chunk of your app and it's logic is now the frontend code that gets shipped to your user's browser.

Do you use tools to obfuscate your code to prevent folks from reversing/making off with your SaaS thing? Is that a concern for you? If so, what tools do you use?
Auditing Techniques and Security Of Linux Server
Tags: security, linux, webdev, devops
Published: 2020-06-10 00:41:22

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

Any developer in this world manages to create their own server to host websites or other ... but we do not subscribe to security, especially since these are servers containing important data.

Which made me to write a gitbook which summarizes all the steps to do as soon as we have the hand in a linux server,These are personal notes During this gitbook, I share with you some security audit technique for Linux servers. In other words, the operations to perform when you check the server for the first time, browse the server and try to discover its current configuration. First look at the boot process, then the system, then the service, etc.

The book is divided into 7 parts as follows:
- Start-up process
- Materials
- System
- Users
- Logs
- Services
- Network

You will find the gitbook in this link https://osc.halas.pro/
If you have any modifications or techniques to add for the operating system audit, you are welcome. 🤗
API Versioning Talk from dotnetsheff
Tags: aspnetcore, api, apiversioning
Published: 2020-06-13 10:09:01

---
title: API Versioning Talk from dotnetsheff
published: true
date: 2020-06-10 00:37:50 UTC
tags: ASPNETCore,API,APIVersioning
canonical_url: http://wildermuth.com/2020/06/10/API-Versioning-Talk-from-dotnetsheff
---

![.NET Sheffield User Group](https://wilderminds.blob.core.windows.net/img/dotnetsheff.jpg) Another of my talks that were scheduled after offering my speaking skills on Twitter, I got to talk to a great group of developers in Sheffield England. I did a quick talk on using the Microsoft API Versioning system to version your APIs.

Since I'm doing these talks on Zoom, I'll be uploading the talks to YouTube to share them with as large of an audience as possible. This one is also available on YouTube.

As promised here are links from the talk:

> [Slides](https://www.slideshare.net/shawnwildermuth/api-versioning-in-net-core)

> [Code](https://github.com/shawnwildermuth/PresentationDemos/tree/master/DotNetSheff/Aversion)

Here's the video:

<iframe src="https://www.youtube.com/embed/8TOA8WW7nk8" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>

[![Creative Commons License](http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png)](http://creativecommons.org/licenses/by-nc-nd/3.0/)

          This work by [Shawn Wildermuth](http://wildermuth.com) is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/3.0/).  
          Based on a work at [wildermuth.com](http://wildermuth.com).

* * *

If you liked this article, see Shawn's courses on [Pluralsight](http://shawnw.me/pscourses).
 ![](http://feeds.feedburner.com/~r/ShawnWildermuth/~4/oKc387EatmY)
List of XML REST APIs?
Tags: help, xml, rest, api
Published: 2020-06-10 00:18:36

I know JSON is the better and newer format for REST APIs. However, businesses still list XML along with JSON in their job descriptions. I just want to find and use one in my portfolio just to get practice and show that I know how to work with them. The crazy part is, I've been searching most of the day, and all I am finding is JSON format REST APIs.

Does anybody have a list of REST APIs that at least offer XML as an option?

Thanks
LinkedIn Login using Node JS and passport
Tags: linkedin, login, node, passportjs
Published: 2020-09-10 05:46:54

---
title: LinkedIn Login using Node JS and passport
published: true
date: 2020-06-10 00:00:00 UTC
tags: LinkedIn,Login,NodeJS,PassportJS
canonical_url: https://www.loginradius.com/engineering/blog/linkedin-login-using-node-passport/
---

This blog article will guide you to add "log in with LinkedIn"functionality in your application. Here we will be implementing Linkedin Login using NodeJS and Passport. Passport is authentication middleware for Node, which authenticates requests and delegates all other…

   
[Read On](https://www.loginradius.com/engineering/blog/linkedin-login-using-node-passport/)
Filter Posts by Tag
Tags: blogging, javascript, tutorial
Published: 2020-06-10 18:55:52

---
title: Filter Posts by Tag
published: true
date: 2020-06-10 00:00:00 UTC
tags: [blogging, javascript, tutorial]
canonical_url: https://binyam.in/blog/filter-posts-by-tag/
---

Blogs can quickly become disorganized. You might want to link to a page on your website which only lists posts about CSS. With a bit of javascript, you can use `/blog?tag=css` to filter your posts.

⚠️ For the following method to work, each post item should have a [data attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*) of `data-tags="[tag1,tag2]">`.

First, we need to find our posts. Use the `document.querySelectorAll` method ([🔗](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)). The method takes one parameter: A selector string formatted like a css selector. Now, we need to get the tag in the url. The global `location.search` variable provides us with the query parameters at the end of the url. This will give us a string, such as `?topic=css`, which we can manipulate to find the tag.

Find which posts *don't* have the tag. For each post, check if the tags in the `data-tags` attribute include the one we found in the url. (Hint: use `Array.filter`) Then, hide the filtered posts. HTML has a handy `hidden` attribute for situations like this. Set the hidden attribute of each filtered post to `true`.

You can now filter your blog posts by tag. Here's the full snippet.

**HTML**
```html
<ul>
  <li class="post"></li>
 <!-- more -->
</ul>
```

**JavaScript**
```js
// Select all posts
const posts = document.querySelectorAll(".post");

// Get the tag in the url
const tag = location.search.slice(location.search.indexOf("=") + 1);

if(tag) {
    // Find which posts don’t have the tag
    let postsNoTag = posts.filter(l => JSON.parse(l.dataset.tags).includes(tag) === false);

	// Hide all posts which don’t have the tag
    postsNoTag.forEach(p => {
        p.setAttribute("hidden", true);
    });
}
```
What css technologies/ libraries do you use with React?
Tags: beginners, webdev, react, css
Published: 2020-06-09 23:49:02

hey everyone, still a noob in front end development (sorry in advance for the noobness lol), though I'm curious what people use to in their front-end dev process. I'm just starting to learn react but to make front end development faster do people use CSS libraries like materialize or tailwind CSS or bootstrap along with frameworks like react/ angular?
My win this week
Published: 2020-06-09 23:34:08

I worked on an Arduino project to measure soil moisture in my backyard. The projects consists of 2 devices, one that has a soil humidity sensor in my backyard and the other device as a gateway to the internet to log the data. Connectivity between the 2 devices is thru 2.4GHz radio.   Software stack used was C++ on the arduino (ESP32) devices, Nodejs on the REST endpoints and AngularJS on the mobile web app to display recent readings.

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

The sensor device measures soil moisture, then goes to sleep for 30 minutes, wakes up and repeats the process. It runs on a Li-ion battery, currently projected for 10 days only. I am working on prolonging battery life making some adjustments.

####Relay Device
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/96jfavz9w2iqe25a1en0.jpg)

The relay device receives the RF signal data (soil moisture), connects to the wifi, sends the data to a service endpoint on Heroku.

####Consumer App
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/38208hvtzfgfrbkr9hxz.jpg)

The front-end app shows the readings on a knob image, with all readings for the last 24 hours.

This project was super fun, however I am quite dissapointed with the projected battery life of approx. 10 days. I have ordered a more efficient microcontroller board, so the battery life can last longer.
93/100 100daysofcode Flutter
Tags: 100daysofcode
Published: 2020-06-09 23:20:28

day 93/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today learn to implements network image, some logic, add field to firebase
https://github.com/triyono777/100-days-of-code/blob/master/log.md
Py_counter 
Tags: python, tutorial, howto
Published: 2020-06-08 15:05:11

Hello fellow developers,

Taking this opportunity to let you all know that I have officially released a Python package - <b>py_counter</b>! <br>WOHOOO!

<b>What it does?</b> : This package takes in a list or a tuple sequence as an argument and returns a hash map of each element with the count of its occurrences in the sequence as a key:value pair. Useful right?

When I was solving coding problems like finding duplicates, finding number of duplicates, finding the recurrent characters, etc, I found myself looking for a library/package that calculated the occurrence of element in a list/tuple and returned it, thus making it easier for us.
But I wasn't convinced with what I found.

<b>But then, isn't that our responsibility & power as a developer/programmer?</b>

<strong><h3>When we look for something that we need, to solve for a problem and we realize that it's not already available, WE CREATE IT.</strong></h3>

<strong><h4>We create a solution & we make it available to everybody who might face the same problem.</h4></strong>

The joy of open source!

With that said, here are the details regarding installation, usage and code snippets to get started.

<h4><strong>Link to the PyPi package</strong></h4>

https://pypi.org/project/py-counter/

<h4><strong>How to install?</strong></h4>

Simply use the pip install to install the package.

```
pip install py_counter
```

or

```
python -m pip install py_counter
```

<h4><strong>How to import and use?</strong></h4>

The first step is to import inside your code:

```
import py_counter
```
The next step is to instantiate the class
```
word = py_counter.py_counter() #here word is the variable object
```
Then we simply use it :)
```
print(word.counter([1,2,3,4,1,3,2])) #here counter() is the method/function
```

```
OUTPUT: {1: 2, 2: 2, 3: 2, 4: 1}
```

Some more examples below:

```
print(word.counter(["shyam"]))
Output: {'shyam': 1}

print(word.counter(["i","i","am","am","a","developer"]))
Output: {'i': 2, 'am': 2, 'a': 1, 'developer': 1}

print(word.counter("codingisamazing"))
Output: {'c': 1, 'o': 1, 'd': 1, 'i': 3, 'n': 2, 'g': 2, 's': 1, 'a': 2, 'm': 1, 'z': 1}

print(word.counter(("codingisamazing","codingisamazing")))
Output: {'codingisamazing': 2}

arr = ["code","is","code"]
print(word.counter(arr))
Output: {'code': 2, 'is': 1}
```

<ul>
Points to note:
<li>If you assign a list or a tuple to a variable and reference the variable while calling counter(), then no pointers on it! Good to go. Because the counter method takes in one argument only.</li>
<li>So if you don't want to assign a variable, but want to check, you can print it by <code>print(variable.counter("amazing"))</code> or, <code>print(variable.counter((1,2,3,4,2,1)))</code>, such that the counter function has only one argument.</li>
</ul>


With that said, signing off. Hope this is useful to someone :) Please let me know via email or comments for any issues encountered with the package or for any comments/feedback on this.

Thank you!
Dica CSS: Limitar tamanho de um texto
Tags: beginners, css, design, webdev
Published: 2020-06-09 23:04:43

E aí pessoal, hoje vou explicar algo bem simples mas muito importante para a criação de páginas. Sabe quando você tem um texto um texto muito grande mas só quer mostrar uma parte? Vou explicar como fazer isso sem a necessidade de JavaScript. Então vamos lá!!

Vamos considerar o seguinte cenário:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/591b052tuuuiyukxt1zy.png)

Para limitar o tamanho do texto (Apenas uma linha) basta colocar o seguinte código na sua classe CSS:

```css
max-width: 500px; // Limite maximo do texto
white-space: nowrap; // Removendo quebra de linha
overflow: hidden; // Removendo a barra de rolagem
text-overflow: ellipsis; // Adicionando "..." ao final do texto
```

O resultado será esse (<a href="https://codepen.io/geovrodri/pen/NWxGYwo" target="_blank">Codepen</a>):
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5n4dmp314kfl40sxv505.png)


Para limitar o tamanho em várias linhas:

``` css
overflow: hidden; // Removendo barra de rolagem
text-overflow: ellipsis; // Adicionando "..." ao final
display: -webkit-box;
-webkit-line-clamp: 2; // Quantidade de linhas
-webkit-box-orient: vertical; 
```

O resultado será esse (<a href="https://codepen.io/geovrodri/pen/eYJpMyp" target="_blank">Codepen</a>):
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/byqxa6x1r0icmbdykgwk.png)

Muito obrigado e até a próxima.