teleren/devto huggingface dataset:
Day 100/100 Reverse Function
Tags: 100daysofcode, programming, javascript, motivation
Published: 2021-12-24 10:39:35


![banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ybgzmwp13itssqiufpj.png)

## Declaring  Functions

Functions allow you to package up lines of code that you can use (and often reuse) in your programs.

```
function reversString(reverseMe) {
         var reversed = "";
         for (var i = reverseMe.length - 1; i >= 0; i--) {
              reversed += reverseMe[i];
         }
         return reversed;
} 
```

The reverseString() function had one parameter: the string to be reversed. In both cases, the parameter is listed as a variable after the function name, inside the parentheses. And, if there were multiple parameters, you would just separate them with commas.

## Return statements

```
function sayHello() {
    var message = "Hello!"
    console.log(message);
}
```
In the sayHello() function above, a value is printed to the console with console.log, but not explicitly returned with a return statement. 

You can write a return statement by using the return keyword followed by the expression or value that you want to return. 

```
function sayHello() {
    var message = "Hello!"
    return message; // returns value instead of printing it
}
```

## Function Recap

- Functions package up code so you can easily use (and reuse) a block of code.

- Parameters are variables that are used to store the data that's passed into a function for the function to use.

- Arguments are the actual data that's passed into a function when it is invoked:

```
function add(x, y) {
var sum = x + y;
return sum; // return statement
}
```

## Code Snippets

```
for(var i=0; i<numbers.length; i++){
   for(var j=0; j<numbers[i].length; j++){
      if(numbers[i][j]%2===0)
         numbers[i][j]="even";
      else
         numbers[i][j]="odd";
      }
}
console.log(numbers);


var facebookProfile = {
    name: "Bear",
    friends: 123,
    messages: ["Bear loves fish", "Bear loves nap", "Bear love honey"],
    postMessage: function(message) {
        facebookProfile.messages.push(message);
    },
    deleteMessage: function(index) {
        facebookProfile.messages.splice(index, 1);
    },
    addFriend: function() {
        facebookProfile.friends = facebookProfile.friends + 1;
    },
    removeFriend: function() {
        if(facebookProfile.friends >0) 
           facebookProfile.friends = facebookProfile.friends - 1;
    }
};

console.log(facebookProfile);

```

## Summary

Happy Hacking!!!


[![Resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3bw4ngwmz06ch79pwrb.png)](https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X)
How to jump a line inside CSS pseudo-elements content
Tags: css, fun
Published: 2021-12-24 10:28:18

If you add text inside the `content` property of a CSS pseudo-element such as `:before` or `:after`, you might also want to jump a line. I stumbled uppon the following:

```CSS
.my-element:before {
    display: block;
    white-space: pre-line;
    content: "line 1 \a\ line 2"
}
```

Any white-space `pre` combined with `\a\` would work but the `white-space: pre-line;` is important to avoid an extra-space before "line 2".

I experimented with the trick in [this stupid demo](https://demos.julien-maury.dev/pure-css), and then I found the explanation in [this excellent book by Lea Verou](https://www.amazon.fr/gp/product/B01M0NLIM3/ref=dbs_a_def_rwt_bibl_vppi_i2):

> Technically, 0x000A corresponds to "Line Feed" characters, which is what we get in JavaScript with "\n".
There is actually a Unicode character that corresponds to line breaks: 0x000A. In CSS, this would be written as "\000A", or more simply "\A"

Photo by [Almos Bechtold](https://unsplash.com/@almosbech?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
Microsoft Azure Certification Course With Online Training - HKR


Published: 2021-12-24 09:51:38

Microsoft Azure Certification Course With Online Training - HKR

[ Azure Training in Hyderabad ](https://hkrtrainings.com/microsoft-azure-certification-training)enables you to learn the most in-demand cloud platform to develop, handle, and deploy web applications on the Azure cloud platform. Our certified trainers make you grasp Azure fundamentals like Azure active directory, Azure policy, Role-Based Access Control(RBAC), Azure policy, Azure subscriptions, and Azure PowerShell. During this Azure Training in Hyderabad, trainees will implement live projects and practical scenarios to gain an in-depth knowledge of Virtual Machine Planning, Azure App Service, Storage Backup, Azure Alerts, and Azure Load Balancer. You will also acquire proficiency in VPN Gateways, Azure Storage, Blob Containers, and app service plan. 

Join our Azure online training in Hyderabad to become a certified Azure Developer and Administrator.
My thoughts on the Contentful Certification
Tags: contentful, certification, content
Published: 2021-12-24 09:48:27

I recently passed the Contentful certification, and became a "certified professional". I want to share my thoughts about the exam and recommendations on what to study to pass the exam. Please remember that the following reflects the conditions when I took the exam (winter 2021) and things might have changed. 

## The Contentful Training Center
Contentful has its own training center, [training.contentful.com](https://training.contentful.com/). It gives you access to courses, consisting of text, interactive images, videos and knowledge checks. The content is good, short pieces of text describes features and concepts, and videos show how to work with them. There is some overlap in the different courses, but its easy skip through. However, it is quite difficult to get an overview of the available material in the training center. There are activities, paths and courses, and its difficult to find the way back to where you were. 

I went throught an activity called Contentful Essentials. It has paths for developers, content modelers and content authors. Since I wanted to be prepared for the exam, I took all three paths. The courses in the paths are good, but sometimes too basic. Being a developer, I especially liked the developer courses, since they showcased specific Contentful features. There are excellent videos on how to setup approval flows, configure webhooks, etc. 

## Contentful Developer Documentation
There is also technical documentation available at [contentful.com/developers/docs/](https://www.contentful.com/developers/docs/). The documentation includes API references, videos showing features and more. Since the exam is said to be not only for developers, but also for project managers and content architects, I did not study the developer documentation as much as I would have wished. In retrospect, the exam contained quite many technical questions that are covered by these docs. 

## The exam
* 50 questions
* 75 minutes
* 70 % score needed to pass
* "closed-book", no notes or google allowed

You are presented with one question at a time and you can't go back to change your answers! Your score is presented to you directly after submitting the last question. 

The exam was more difficult than I anticipated. I thought the questions were gonna be as difficult as the knowledge checks in the training courses, or should I say as *easy* as the knowledge checks... I was wrong. 

The exam does contain some easy questions, however, there are a lot of questions on details, for example on the capabilities of the Contentful CLI and the SLAs.

To make things even more difficult, there are a lot of questions where you should select all the correct answers out of the four alternatives, and the alternatives are slightly rephrased from what you have seen before. 


## Summary
Don't be fooled by the easy knowledge checks. Prepare for technical questions by spending more time reading the developer documentation, but make sure to go through some training courses, especially if you are lacking content model experience.
Create a Serverless app in a few seconds
Tags: webdev, javascript, beginners, serverless
Published: 2021-12-24 09:45:28

Would you like to create a [Serverless](https://www.serverless.com) app quickly? 

I created a CLI tool to create boilerplate TypeScript apps with additional setup that most of the developers need. 

Run:
`npx create-full-sls-app`

Answer the questions, and you are good to go! :) 

## What's included?

- [Gitlab](https://www.gitlab.com) CI/CD setup
- or [GitHub](https://www.github.com) Actions setup (not fully complete)
- [SonarCloud](https://www.sonarcloud.io) setup (optional)
- [DataDog](https://www.datadoghq.com/) setup (optional)
- [Sentry](https://www.sentry.io) setup
- [Yup](https://www.npmjs.com/package/yup) validation integration
- [Husky](https://github.com/typicode/husky) setup in place for pre-commit and pre-push
- [TypeScript](https://www.typescriptlang.org/), [Webpack](https://webpack.js.org/) 5, [serverless.yml](https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml) setups
- [Example API endpoint](https://github.com/ebsaral/create-full-sls-app/blob/1.4.0/templates/serverless-full-sls-app/src/handlers/status/index.ts) (with [middy](https://www.npmjs.com/package/middy) package and additional middlewares)
- A regional setup and default region is `eu-central`
- Multi-Region support (adding `us-east1`) (optional)

You can check the tool [here on GitHub](https://github.com/ebsaral/create-full-sls-app).
State&Props, JSX
Published: 2021-12-23 16:45:25

React.js is one of the most widely used JavaScript libraries.Understanding what props and state are and the differences between them is important for learning React.
Today I will explain what props and state are:

**1. What are props?
**
Ans: React’s data flow between components is uni-directional that is from parent to child only. Props are used to pass data between React components. 

**2. How do you pass data with props?
**
Ans: 

const ParentComponent = () => {  
	return{
		<ChildComponent name="First Child" />
	      }                    
    }

const ChildComponent = (props) => {    
    return <p>{props.name}</p>; 
};

**3. What is state?
**
Ans: React has another built-in object called state, which is allow components to create and manage their own data. Components cannot pass data with state, but internally they can create and manage it.

**4. How do you update a component’s state?
**
Ans: State should not be modified directly, but it can be modified with a special method called setState().

this.setState({  
    name: "Arif"
});

**5. What happens when state changes?
**
Ans: When A change in the state happens based on user-input or something any other reason. React components (with state) are rendered based on the data in the state. State holds the initial information.

So when state changes, React gets and immediately re-renders the DOM and updated state. And thats why React is fast.




**1. What is JSX?
**
Ans: This is a JavaScript Extension Syntax which is used in React to easily write HTML and JavaScript together.

**2. How to Add JavaScript Code in JSX
**
Ans: 
const  = () => {
 const number = 10;
 return (
  <div>
   <p>Number: {number}</p>
  </div>
 );
};

**3. What is Conditional Operators in JSX Expressions?
**
Ans: We can't write if conditions in JSX expressions like others programming languages. But we can use like this
<p>{a > b ? "Greater" : "Smaller"}</p>
<p>{shouldShow && "Shown"}</p>
My first post
Tags: firstpost, dotnet, challenge, writing
Published: 2021-12-24 09:26:31

Hello, my name is Fábio and I am a [Web developer](https://fabiocosta.eu/#about), specialized in .NET. Although I have a developer degree, I always considered myself a web developer, since I started my career doing web development and I love it.

I live in [Luxembourg](https://en.wikipedia.org/wiki/Luxembourg) for almost 8 years now, and I like it. It's a very international (small) country, where you can find several different cultures.

![Luxembourg flag](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rzesr83qpkv8c14vpy71.jpg)

Now the question, why did I create a blog? I could have just created my website, with just my information and done, right?..

Well, I could do that and then go to [Medium](https://medium.com/) or [Dev](https://dev.to/) and read some post from some other developer. The world is full of content consumers and there aren't many creators. Most people spend their free time reading newspapers, on Facebook, Instagram, blogs, etc. I am one of those people also...

So, I decided I need to create content. Even if it's only for myself. About what? Wherever comes to my mind at the time. About thoughts, tech, coding, .NET, etc.

![Une person at the top of a rock](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tr4m3lebyvhmii3ed0z4.jpg)

And here is my first post, with a small introduction and a promise (that I will give my best, not to fail), with my quest of producing content, relevant and interesting preferentially, and contributing to the world's content. I will share my knowledge and learn a lot with this challenge.

Accept yourself the challenge. Produce some content for others. Contribute with your knowledge. It will be hard, but you will learn in the process and feel good in the end.

*This was first published on my website [fabiocosta.eu](https://fabiocosta.eu/blog/my-first-post).*
VS Code's built-in browser
Published: 2021-12-24 09:23:58

Hey there,
Let's talk about **VS Code's built-in browser**.

## 💎 Why it matters
Integrations **accelerate** your work.

## 🔍 Problem
You **waste time** switching between VS Code and the browser.

## 💡 Solution
Open the **command palette** (⇧+Ctrl/⌘+P) and write **Simple Browser: Show**.

## 🎯 When should I use it?
When you **don't need debugging** or the browser's **DevTools**.

## Want more?
Click [here](https://www.andrecasal.com/#newsletter) and subscribe to VS Code's Newsletter.

Thanks,
André Casal
AWS Elasticsearch Vs Opensearch Vs Open Distro
Tags: aws, elasticsearch
Published: 2021-12-24 09:21:54

In this post, we are going to cover some of the most common misconceptions and queries users have about AWS Elasticsearch, Open Distro & OpenSearch as these three terms are often being used interchangeably to refer to any Amazon backed distribution of Elasticsearch and Kibana.

**The Early Days**

Three years ago the first iteration of AWS’s Open Distro for Elasticsearch looked like a combination of different repositories which included both Elasticsearch and Searchguard. At this early stage, the aim to combine Elasticsearch with out of the box security features was still in progress and was nowhere near production-ready.

The open-source version of the ELK Stack (where Elasticsearch originated from in the first place) did not come supplied with out of the box security features, to the dismay of many users at the time who wanted an alternative to having to use Elastic’s offering of Xpack.

Prior to Elastic choosing to release all future ELK versions under SSPL licensing (as of 2021), there were many users that found Xpack to not be as affordable as they would need to continue building their Stacks securely.

For users who wished to have access to something as simple as privileged user controls, they found that this was a paid-for feature when they saw this as something vital for the integrity of their data’s security.

Back in this AWS backed project's infancy, AWS didn't provide Kibana multi-tenancy or role-based access controls either. Fortunately, this is no longer the case and the AWS backed OpenSearch Dashboards includes these features as part and parcel of the current edition.

[Read the rest here](https://logit.io/blog/post/aws-elasticsearch-vs-opensearch-vs-open-distro)
Important Points to Not Miss Out When Writing an Assignment!
Published: 2021-12-24 08:53:01

There is no doubt that an assignment is a boring task, especially when it is quite lengthy. In order to work on it faster often student misses out on some important points that improve the content quality. There are so many crucial elements that enhance the content of the assignment. But if silly mistakes are not rectified and focus on structure and formatting is not given rightly, then assignments can get messed up. So along with looking for experts online by searching ‘[do my assignment](https://www.assignmentdesk.co.uk/do-my-assignment),’ some guidelines should be followed. 

## Points to not miss out while working on the assignment:

**Focus on the guidelines given:**
It is important to make sure that you follow every guideline your tutor has given. Your teacher’s job is to give you some challenges and see if you have understood and followed the same. But if you have not followed the guidelines or missed out on some important pointers, you may lose marks. Therefore, it is better to check the guidelines two times. One before you start working on the assignment and the second time once you are done and about to submit it. This way, you can rest assured that you have covered all the points that your tutor was expected.

**Check the formatting:**
There is a certain set of formatting rules in every university and college that a student must follow. In some university, the reports of Grammarly and plagiarism needs to be attached as part of the submission. In some colleges, to begin with, indexes, citations, and references are important in the assignment. You need to have clarity on the format of the assignment, which fort should be used, and whether an article should be written in a justified format. These basic things do have marks, and hence you must not be careless about it.

**Proofreading is important:**
Grammar errors, punctuation, missing out on certain words like a and the are quite common things. After all, you are writing a lengthy assignment and have stipulated time to finish it. Therefore, you must focus well on finishing your assignment but also proofread and check if all errors and silly mistakes are worked upon. 

## **Conclusion:**
The guidelines shared above should be followed for all types of assignments. Whether it is essay writing, thesis, or dissertation, make sure you submit your assignment only if you have followed the above tips. You might want to speak with your tutor and senior member if you are stuck up at any point in working on the assignment. It is important to focus well while writing the assignment because silly mistakes can negatively impact the overall submission.
Django + Mongodb works slowly
Tags: help, django, mongodb, bigdata
Published: 2021-12-24 08:37:00

Hello there.
I am working on a project /API/ where I have to deal with a big data. For the project I'm using django and for database mongodb. Now I have an issue with API, it works very slowly. When I'm trying to find something with some fileds by mongo shell it takes some ms but by django it takes seconds sometiems minutes. I wonder why it goes so. Can anybody help me to understand what's wrong with my code in django?
Fields types are string, date.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkbcflfijqgf9o70sbq6.png)
Dynamically change back-end's environment on run-time in Android Application
Tags: android, beginners, kotlin, mobile
Published: 2021-12-24 08:26:03

Do you configure your android app based on `build variant` or `build flavor` to change your back-end's environtment?

Worry no more! Because now you don't have to do that anymore.

Read more about it [here](https://jimlyas.medium.com/dynamically-change-back-ends-environment-on-run-time-in-android-application-effcb8c5c941).
Overwrite Portal Outlet
Tags: angular, javascript, typescript
Published: 2021-12-24 08:24:55

So, I have a custom portal outlet as such:
`<div id="title-bar-outlet">some text content</div>`

And I have a portal component like below:

```
import { CdkPortal, DomPortalOutlet } from '@angular/cdk/portal';
import {
  AfterViewInit,
  ApplicationRef,
  Component,
  ComponentFactoryResolver,
  Injector,
  OnDestroy,
  ViewChild
} from '@angular/core';

@Component({
  selector: 'app-title-bar',
  template: `
    <ng-template cdkPortal>
      <ng-content></ng-content>
    </ng-template>
  `
})
export class TitleBarComponent implements AfterViewInit, OnDestroy {
  @ViewChild(CdkPortal)
  private portal: CdkPortal;
  private host: DomPortalOutlet;

  constructor(
    private crf: ComponentFactoryResolver,
    private appRef: ApplicationRef,
    private injector: Injector
  ) {}

  ngAfterViewInit(): void {
    this.host = new DomPortalOutlet(
      document.querySelector('#title-bar-outlet'),
      this.crf,
      this.appRef,
      this.injector
    );
    this.host.attach(this.portal);
  }

  ngOnDestroy(): void {
    this.host.detach();
  }
}
```

Now when using the portal like this:
```
<app-title-bar>Some title bar content</app-title-bar>
```
I want the content in #title-bar-outlet to be replaced by content of app-title-bar component. However, above code just appends component contents to the #title-bar-outlet DOM element
CSS Cheat Codes
Tags: javascript, css, html, webdev
Published: 2021-12-24 08:12:20

Few of the cheat sheets on CSS positioning

#css #javascript #reactjs #webdevelopment #programming #coding

**Credits**: https://www.linkedin.com/in/pratham-abb051175/.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m1f66g0nfa30wg5svq4c.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/akigyuuneo9m6d88zu32.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8hw1xcltd8tq6akhk3u.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6bhp4mgmrejh24khvqc.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6qpcjua5ju2l4llxpsw.jpg)
What does a Shopify developer need to do? 
Tags: shopifydeveloper
Published: 2021-12-24 07:48:53

As a Shopify developer, you can provide many services to companies who seek your work. The key responsibility of a shopify developer is to set up an online Shopify store for a company. Their work also involves developing custom Shopify themes and generating new templates for the online store. They also collaborate with UX and UI design teams to generate a vibrant online store. 

Following is a list of services you, as a freelancer, can offer to a potential client:

Shopify theme development: For any brand, having a visual aesthetic is essential. A Shopify developer can provide a unique theme to each online store they develop through this service. There are many different Shopify themes and customizations available on the platform. 
Shopify store set-up: To set up an online store, a significant amount of coding and other technicalities are required, which can be provided by the Shopify developers. They can develop pages like the landing page, modify existing pages, customise or build the store from scratch. 
Shopify app development: Shopify app development is highly specialised work that may require much more work than generating an online store. The company may ask the Shopify developer to build a new private app. 
Shopify migration- Shopify developers also have to sometimes migrate the online store from one platform to another since many companies may already have existing businesses there. 
Shopify store updating and maintenance- Shopify developers also need to add the new features that keep on coming so that the online stores are up-to-date with recent trends. 

If you are a freelancer trying to find work, look no further! Eiliana provides you with a platform to showcase your skills, even if you choose to stay anonymous.
Pinoy Teleserye | Pinoy Tambayan | Pinoy HD | Pinoy TV Replay

Published: 2021-12-24 07:31:40

Watch Our [Pinoy Teleserye](https://hdteleseryereplay.su/) Replay provides [Pinoy TV Shows](https://hdteleseryereplay.su/) free online to all Pinoy Flix. Watch your favorite [Pinoy Channel](https://hdteleseryereplay.su/), [Pinoy Lambingan](https://lambingansreplay.su/), [Pinoy Tambayan](https://pinoyteleseryetambayans.su/) and [Pinoy Tv Replay](https://pinoyteleseryestv.su/) for free.