teleren/devto huggingface dataset:
Android Apps Development Difficulties?
Published: 2022-04-22 17:57:23

How Android Apps Developer face issues developing android apps.

1. Android application is always related to the user. Android app developer need to solve the user-based application problem.

2. Android Apps are very sensitive in the UI and user experience. Android is using the latest

technologies with UI and UX design. Everything has to be visually attractive. Android do not support old platforms.

3. Android app developer need to learn the art on UI, UX and JDK development. Android code is complicated and developers spend time on it.

4. Android apps development need a large number of developers in a team.

5. Android development environment is difficult.

6. Android is a modern technology based on the practical requirements of a business.

7. Android developers should understand the client – server concept and implementing DRDA stuff.

8. Android choose only the important ones to develop and support.

9. Android is prone to virus attacks and makes the communication complicated.

10. Android applications need more time for development.

11. Android development not suitable for new developers.

12. Android application development very expensive.

13. Android application development is in Google's better interest.

14. Android application easily crash and need to be developed again.

15. Android applications need to debug, testing, etc.

16. Android development uses much time for developers.

17. Android developers need to learn iOS development. Android development has many Mistakes and Negatives.

18. Android apps developer, as per the objective of your work, needs to write the commonly used application.

19. Android developer, who work on so many companies must be trained to develop their apps.
Javascript Scope
Tags: javascript, webdev, scope, beginners
Published: 2022-04-22 17:57:03



A scope in Javascript means the area of code in which certain variables are able to be accessed.

Variables are declared using `let`,` const`, and `var`.

`var` creates global scoped variables, but this is problematic if this variable is declared in multiple places as overwrites can happen.

The best reference on the internet in my opinion is Dimitri Pavlutin's [blog](https://dmitripavlutin.com/javascript-scope/) on Scope.


This JS Scope Visualized [blog](https://dev.to/lydiahallie/javascript-visualized-scope-chain-13pd) is also amazing blog for visual learners. It's a 7 part series about JS, and has a section on scope which helped me tremendously

There are three types of scope: global, function and block.

Global scope is pretty straightforward, it means that the variables can be accessed from anywhere in the code.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6hg6fofhirdsrvox089.png)
 

## Local Scope

if, for, and while statements create a scope. 

```
function fly() {
  // "fly" function scope
  const message = 'We're going to land in the river';
  if (true) {
    // "if" code block scope
    const pilot = 'Sully';
    console.log(message); // 'That seems dangerous'
  }
  console.log(pilot); // pilot is not defined
}
console.log(message); // message is not defined
```


### Standalone code blocks also create a scope: 

```
{ 
let scope = 'this is block scoped'
} 

console.log(scope) = this would return an error
```

### Also local scope

```

function localScope() {
    const array = [1, 2, 3, 4, 5];
    let sum = 0;

}

console.log(array); //arr is not defined
console.log(sum); //array is not defined
```

There are nested scopes too, an inner function within an outer function has access to the outer scope.

[![Image from Gyazo](https://i.gyazo.com/fcf1cc3ae47162cf77c1c9518f07b2dd.png)](https://gyazo.com/fcf1cc3ae47162cf77c1c9518f07b2dd)


In summary,

The Scope is the area in code from where a variable can be accessed.

It can be broken down to:

Global Scope
Local Scope: Function Scope & Block Scope

For the best explanations, please reference the links further up. If you are interested in copy/pasting your code into a web app for a visual representation of scope, then this is a cool site:

[JS Visualizer](https://js-scope-visualizer.firebaseapp.com/#visualizer)
Register now for upcoming webinar ft. MaestroQA's Infrastructure Engineering Lead, Amrisha Sinha
Tags: devops, programming, testing, productivity
Published: 2022-04-22 17:46:15

**Topic:** "[Ephemeral Environments: E2E Testing Before Merge](https://us06web.zoom.us/webinar/register/9516506497036/WN_CLMIJsawQDKLSupJGciJpw)"
**When:** Wednesday, April 27th at 2pm EST

**Discover...**

- An effective way to shorten feedback loops between developers & QA
- How to eliminate surprise blockers when attempting to deploy
- How ephemeral environments can accelerate your existing E2E tests by running them on every pull request

If you’re interested in this topic, but can't make this session - no need to worry! Register and we’ll email you a link to the recording after the live session has ended

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzx42lpl4ithvu8f9pg6.png)
Terminal komandalar| Part 2
Tags: beginners, uzbek
Published: 2022-04-22 17:39:59

`echo` 
berilgan qo`shtirnoq yoki birtirnoq ichidagi tekstni chop etadi

`rm`
berilgan faylni o'chiradi
- `-r` papkalarni o`chiradi
- `-rf` kuch bilan o`chiradi

 sanani chop etish `date`
- `echo $( date ' +%d-%m-%Y ' )` hozirgi sanani chop etadi
- `mkdir $( date ' +%d-%m-%Y ' )` joriy sana nomli papka yaratadi

`code` 
`code matn.txt` joriy papka ichida *matn.txt* nomli fayl yaratib ishga tushiradi
`code .` joriy papkani *vscode* da ishchi maydon qilib ochadi
Why You Should Start A Fiverr Affiliate Program: 10 Benefits You’ll?
Published: 2022-04-22 17:37:12

 Why You Should Start A Fiverr Affiliate Program: 10 Benefits You’ll? 1. Introduction

2. What is the Fiverr Affiliate Program? 

3. How do I become a Fiverr affiliate? 

4. What are the benefits of being a Fiverr affiliate? 

5. How do I get started? 

6. Tips for being a successful Fiverr affiliate.

Affiliate marketing can be a great way to monetize your blog or website. In a nutshell, it’s a process where you promote someone else’s product or service in exchange for a commission on the sales that you generate.



There are many affiliate programs available, and a quick search on Google will reveal pages and pages of results. However, not all affiliate programs are created equal. Some are better than others, and some are downright scams. So, how do you know which programs are worth your time and effort?
Fiverr’s affiliate program is a great way to get started in affiliate marketing. It’s free to join, and you can earn commissions on all sales that you refer. You also get access to some great marketing tools, like banners and widgets, that you can.

Affiliate marketing can be a great way to monetize your blog or website. In a nutshell, it’s a process where you promote someone else’s product or service in exchange for a commission on the sales that you generate.
การวนลูป array แบบ ForOf ของ JavaScript
Published: 2022-04-22 17:31:35

สำหรับตัวอย่างเราจะมี datas = [1,2,3,4,5]

อยากจะให้ทำการวน loop แบบ forOf ก็ จะเขียนแบบนี้คือ 

```javascript
for(const ตัวแปรใหม่หรือตัวแปรเอกพจน์ of ตัวแปรตั้งต้นหรือตัวแปรพหูพจน์){
 \\ code
}
```

ดังนั้นหากจะแสดงค่าแต่ละตัวใน array ของตัวแปร datas จะเขียนแบบนี้ 

```javascript
for(const data of datas){
 console.log(data)
}
```

ผลลัพท์จะเป็น 
```
1
2
3
4
5
```
Function Declaration vs Function Expression
Published: 2022-04-22 17:24:18

**Function Declaration** - bu funksiyani e'lon qilishdir.

E'lon qilingan funksiya keyinroq u chaqirilganda ishga tushirish uchun saqlab qo'yilgan bo'ladi.

O'zgaruvchilarni e'lon qilish **var**, **let**, yoki **const** kabi kalit so'zlar bilan boshlanganidek funksiyani deklaratsiyasi ham **function** kalit so'zi bilan boshlanadi.

Masalan:

```js
function test(){

return 4;
}
```

- Bu yerda funksiya e'lon qilindi holos. Uni ishga tushirish uchun funksiya nomi **test()**'dan foydalanib funksiyani chaqirishimiz kerak.

**Function Expression**

Javascriptda funksiya ifoda yordamida ham aniqlanishi mumkin. Funksiya ifodasi(expression) o'zgaruvchiga saqlanishi ham mumkin:
`var x = function(a,b) { return a*b};`

Funksiya ifodasi o'zgaruvchiga saqlangandan so'ng aynan shu o'zgaruvchidan funksiya sifatida foydalanish mumkin. O'zgaruvchiga saqlanadigan funksiyalarda funksiya nomini ko'rsatish shart emas. Ular doimo o'zgaruvchi nomi orqali chaqiriladi va ishga tushiriladi.

**Function Expression**:

```js
alert(test()); // ERROR! test topilmadi
var test = function() { return 5; }
```

**Function Declaration**:

```js
alert(test()); // Alert 5. dekleratsiyash birinchi amalga oshiriladi
function test() { return 5; }
```

- Funksiya deklaratsiyasi boshqa har qanday kod ishga tushishidan oldin bajariladi, funnksiya ifodasi(expression) esa interpreter shu qatorga yetib kelganda bajariladi.

- var kalit so'zidek funksiya deklaratsiyalari kodning eng yuqorisiga avtomatik ko'tariladi(hoisted). Funksiya ifoda(expression) lar esa ko'tarilmaydi.

**Function expression'ning afzalliklari:**

Funktsiya ifodalari funksiya deklaratsiyasidan ko'ra foydaliroq bo'lishining bir necha xil usullari mavjud:

- Closure sifatida;

- Boshqa funksiyalarga argument sifatida;

- Darhol chaqiriladigan funksiya ifodalari (IIFE) sifatida;
AWS Amplify and CSP/CORs
Published: 2022-04-22 17:07:20

After much wailing and gnashing of teeth, I finally got something that works in the AWS Custom Headers: 

```yaml
customHeaders:
  - pattern: '**/*'
    headers:
      - key: 'Strict-Transport-Security'
        value: 'max-age=31536000; includeSubDomains'
      - key: 'X-Frame-Options'
        value: 'SAMEORIGIN'
      - key: 'X-XSS-Protection'
        value: '1; mode=block'
      - key: 'X-Content-Type-Options'
        value: 'nosniff'
      - key: 'Content-Security-Policy'
        value: "default-src 'self' https://www.your-tld.co.uk; script-src 'self' https://www.your-tld.co.uk 'unsafe-inline' https://www.googletagmanager.com; connect-src 'unsafe-inline' https://analytics.google.com; img-src 'unsafe-inline' https://www.googletagmanager.com 'self' https://www.your-tld.co.uk 'unsafe-inline' https://i.vimeocdn.com 'self' data:; media-src 'unsafe-inline' https://f.vimeocdn.com 'unsafe-inline' https://i.vimeocdn.com; frame-src 'unsafe-inline' https://player.vimeo.com"
```

This will allow Google Tag Manager, image src as data, and Vimeo videos playing in iframes. 

I hope it saves someone the hours it's taken me to find this solution...
What are the pain points of your beloved tech stack?
Tags: discuss, programming, todayilearned, watercooler
Published: 2022-04-22 17:06:36

I'm into web development so TypeScript / JavaScript are parts of my stack. I also prefer TypeScript due to its typing system. Here are the problems.

1. Compatibility issues:
   - Every now and then, an error will pop up because the library does not fully support TypeScript.
   - ES version is also an issue, some libraries only support ES5, some ES6, and so on. This sometimes makes such a trivial task like `import` become a pain.

2. Transpiling issues:
   - Although most of the tasks are handled by bundled cli like `create-react-app`, many times I spent hours just to figure out why my `jest` tests fails as it could not run on this 1% TypeScript code. Certainly, this problem not limited to `jest` though.

Be it a framework, a library, a programming language, etc. What are the pain points of your beloved technology?
All you need to know about writing Least Privilege IAM Policies
Tags: aws, cloud, security, json
Published: 2022-04-22 17:00:20

The system of AWS IAM Policies provides a granular structure of permission sets. The reason behind this system is Least Privilege Model.  The least privileged principle allows IAM identities to have the least required access level to complete their tasks. And this is an important unit of Well Architectured best practices.

In AWS all operations are Implicitly denied until Explicitly Allowed using these policies. However, if an operation is Explicit Denied then this rule has the highest precedence. 

Read about the [Main principles of AWS Cloud Security](https://aysharshad.com/how-to-automate-aws-ec2-windows-patching-using-ssm-automation-document/) and what role [IAM plays in securing the AWS Resources](https://aysharshad.com/all-you-need-to-know-about-aws-identity-access-management-iam/).

## Structure of IAM Policies

```
{
    "Version" : "2012-10-17",
    "Statement" : 
    [
        {
            "Sid" : "Human Readable Description",
            "Effect" : "Allow/Deny",
            "Action" : 
                [
                    "Service:api/call"
                ],
            "Resource" :
                ["arn"],
            "Condition" : 
            {
                "Stringequals" : 
                    {
                        "part of string" : "value to match"
                    }
            }
        }
    ]
}
```
[Read Explanation here](https://aysharshad.com/all-you-need-to-know-about-writing-least-privilege-iam-policies/)

## Ways to create IAM Policies

You can use three main ways to create your desired [IAM Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html):

1. **JSON Editor:** You can write the policy manually using the aforementioned structure.
2. **Visual Editor:** You can use the visual editor, which is found in IAM Console, to spin the policy.
3. **Import:** You can import an existing policy from your account to customize it as per your requirements. You can import both AWS and Customer managed Policies
4. **AWS CLI:** Use AWS CLI commands to generate IAM Policies.


[Read More](https://aysharshad.com/all-you-need-to-know-about-writing-least-privilege-iam-policies/)
Function Declaration vs Function Expression
Tags: javascript, beginners, webdev, programming
Published: 2022-04-22 16:58:46

**Function Declaration** - bu funksiyani e'lon qilishdir.

E'lon qilingan funksiya keyinroq u chaqirilganda ishga tushirish uchun saqlab qo'yilgan bo'ladi.

O'zgaruvchilarni e'lon qilish **var**, **let**, yoki **const** kabi kalit so'zlar bilan boshlanganidek funksiyani deklaratsiyasi ham **function** kalit so'zi bilan boshlanadi.

Masalan:

```js
function test(){

return 4;
}
```

- Bu yerda funksiya e'lon qilindi holos. Uni ishga tushirish uchun funksiya nomi **test()**'dan foydalanib funksiyani chaqirishimiz kerak.

**Function Expression**

Javascriptda funksiya ifoda yordamida ham aniqlanishi mumkin. Funksiya ifodasi(expression) o'zgaruvchiga saqlanishi ham mumkin:
`var x = function(a,b) { return a*b};`

Funksiya ifodasi o'zgaruvchiga saqlangandan so'ng aynan shu o'zgaruvchidan funksiya sifatida foydalanish mumkin. O'zgaruvchiga saqlanadigan funksiyalarda funksiya nomini ko'rsatish shart emas. Ular doimo o'zgaruvchi nomi orqali chaqiriladi va ishga tushiriladi.

**Function Expression**:

```js
alert(test()); // ERROR! test topilmadi
var test = function() { return 5; }
```

**Function Declaration**:

```js
alert(test()); // Alert 5. dekleratsiyash birinchi amalga oshiriladi
function test() { return 5; }
```

- Funksiya deklaratsiyasi boshqa har qanday kod ishga tushishidan oldin bajariladi, funnksiya ifodasi(expression) esa interpreter shu qatorga yetib kelganda bajariladi.

- var kalit so'zidek funksiya deklaratsiyalari kodning eng yuqorisiga avtomatik ko'tariladi(hoisted). Funksiya ifoda(expression) lar esa ko'tarilmaydi.

**Function expression'ning afzalliklari:**

Funktsiya ifodalari funksiya deklaratsiyasidan ko'ra foydaliroq bo'lishining bir necha xil usullari mavjud:

- Closure sifatida;

- Boshqa funksiyalarga argument sifatida;

- Darhol chaqiriladigan funksiya ifodalari (IIFE) sifatida;
React Portals
Tags: react, javascript, portal
Published: 2022-04-22 16:55:15

Raact portals provide a way to render children into a DOM node that exists parent DOM hierarchy.

In react app the div with id root is the entry point, and all the DOM elements exits under root element.

React Portal provide ability to break out of this root and exists anywhere outside the scope of root div.

<div id="root"> </div>
<div id="portal-root"> </div>

we will use ReactDom.createPortal(component, element)


we can create a PortalDemo functional component
```
import React from 'react'
import ReactDom from 'react-dom'
export Default function PortalDemo(){
   return ReactDom.createPortal(
       <h1>Portals Demo</h1>,
       document.getElementById('portal-root')
   )
}
```
All you need to know about AWS Identity and Access Management (IAM)
Tags: aws, cloud, security
Published: 2022-04-22 16:43:53

Identity and Access Management is one of the major components of the [Triads of AWS Cloud Security](https://aysharshad.com/how-to-automate-aws-ec2-windows-patching-using-ssm-automation-document/). AWS is a vast collection of over 200 Web Services. And these Web Services are interacted with using API calls. Identity and Access Management provides the means to Authenticate, Secure and Authorize these API calls.

These API calls are either made by Users or other Digital Entities (other Applications or AWS Resources themselves). And Identity and Access Management help authenticate and authorize them all.

## Morphology

Identity and Access Management (IAM) consists of two sections:

1. **I(Identity)-Authentication:** Authenticates the requester either a Human entity (User) or Digital Entity (other Applications or AWS Resources).
2. **AM(Access Management)-Authorization:** Helps you secure access to AWS Cloud Resources.

## IAM Identities

IAM identities are a way to authenticate the API caller. These identities include:

1. Users
2. Groups
3. Roles

API calls are made via three main mediums:

1. AWS Console
2. AWS Command Line Interface (CLI)
3. AWS Language-based Tools and SDKs (like BOTO3, Terraform or Node-Red)

## Types of IAM Policies

IAM Policies can be categorized into two types based on Actors:

1. **Identity-based Policies:** Describes what an identity (users, groups and roles) has access to. 
2. **Permission Boundary:** Describes the maximum amount of access an Identity-based Policy can provide to an identity. Access of an entity to a resource is decided if allowed by both Identity-based Policy and Permission boundary.
3. **Resource-based Policies:** Describes who has access to a specific resource. 

A further classification of Identity-based Policies include two types:

1. **AWS Managed Policies:** These policies are pre-designed by AWS and just need to be attached to users.
2. **Customer Managed Policies:** Customer Managed Policies are a customer-specific combination of permission sets and they can be attached to any entity(users, groups and roles).
3. **Inline Policies:** Inline Policies are also a kind of customer-managed policy but they are limited to the scope of a specific user or role. 

[Read More](https://aysharshad.com/all-you-need-to-know-about-aws-identity-access-management-iam/)
Have a Community-Powered Earth Day 🌍
Tags: forem, meta, socialimpact, earthday
Published: 2022-04-22 16:32:43

As you might know, I've been highlighting some of the early Forems joining the network of late over the last few weeks in this series.

**Today is Earth Day**, and to celebrate, I wanted to highlight _two_ special and very relevant spaces: [Forest](https://www.joinforest.com/), and [Development Hackers](https://www.developmenthackers.com/).

I also highlighted Development Hackers [last week](https://dev.to/devteam/interested-in-the-social-impact-you-can-have-as-a-developer-read-this-post-31lh), but I wanted to bring them up again in the context of Earth Day.

Environmental justice is a matter of awareness and impact, and I think these two spaces are absolutely providing this.

{% embed https://www.developmenthackers.com/ %}

{% embed https://www.joinforest.com/ %}

While there is currently no easy and sweeping way to fix the health of our planet, the decisions we make as software developers are critical to a sustainable environment. We are a group capable of discovering and solving pressing problems like no other — especially if we commit to applying ourselves on an ongoing basis. Today, I'll be spending some time in both of these communities to fully immerse myself in their overlapping mission statements of using the power of software to help our ailing planet. I invite you to join me by clicking the links above and setting up accounts on both Forest and Development Hackers.

## [🌳🌲 Forest Welcome Thread](https://www.joinforest.com/welcome)
## [🦾🌍 Development Hackers Welcome Thread](developmenthackers.com/welcome)

***

# Happy coding and happy Earth Day!

***

One last thing. You’ll notice **"Sign up with Forem"** as an option on these Forems. This is a service we now offer to most seamlessly navigate the ecosystem and manage your identity. We want you to be able to **bring your full self without having to bring your full data**, so making this distributed ecosystem as straightforward as possible in the long run is really important. Create a [Forem account](https://account.forem.com/) and connect it with your DEV account [via your settings](https://dev.to/settings). 🙂
How to display two values in single select component
Tags: angular, ionic, html
Published: 2022-04-22 16:25:53

Hello Experts

I have input to provide users EmpId and related EmpName values. I need to enable user to see EmpId and EmpName and once he made his selection return EmpId in placeholder/input box. And also i need to enable search option during selection. So How can I achieve this ?

Thank you
Redirect www to non www via web.config on IIS web app
Tags: iis, webdev, redirec, www
Published: 2022-04-22 16:13:46

All you need to do is to add a **rule** into the rewrite module section:

```xml
<rule name="Force non-WWW" enabled="true" stopProcessing="true">
	<match url="(.*)" />
	<conditions logicalGrouping="MatchAny">
		<add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
	</conditions>
	<action type="Redirect" url="https://{C:2}{REQUEST_URI}" appendQueryString="true" redirectType="Permanent" />
</rule>
```
Your `rewrite` section should look like this: 

```xml
<rewrite>
	<rules>
		<rule name="Force non-WWW" enabled="true" stopProcessing="true">
			<match url="(.*)" />
			<conditions logicalGrouping="MatchAny">
				<add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
			</conditions>
			<action type="Redirect" url="https://{C:2}{REQUEST_URI}" appendQueryString="true" redirectType="Permanent" />
		</rule>
	</rules>
</rewrite>
```