teleren/devto huggingface dataset:
M.ASHFAQ.KHAN
Tags: html, javascript, php, css
Published: 2021-01-27 18:49:58

I'm a Web-Developer, php Back-end, front-end (Laravel, JavaScript, CSS, HTML, Bootstrap4).
The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. This tutorial helps you to build your base with PHP.
 Validation means check the input submitted by the user. There are two types of validation are available in PHP. They are as follows −

Client-Side Validation − Validation is performed on the client machine web browsers.

Server Side Validation − After submitted by data, The data has sent to a server and perform validation checks in server machine.
   OVERVIEW
You can use a phpinfo() page to view the current PHP information for your server.

This file outputs a large amount of information, such as:

Information about PHP compilation options and extensions
PHP version
Server information and environment (if compiled as a module)
PHP environment
OS version information, paths, master and local values of configuration options
HTTP headers
PHP license
Because every system is set up differently, phpinfo() is commonly used to check PHP configuration settings and for available predefined variables on your particular system.

phpinfo() is also a valuable debugging tool, as it contains all EGPCS (Environment, GET, POST, Cookie, and Server) data.

CREATE A PHPINFO.PHP PAGE
Luckily, creating a phpinfo page can be performed fairly quickly and easily!

Open your website files using a File Manager, FTP, or SSH.
Navigate to your website's root directory. This generally will be:
Plesk: httpdocs
cPanel: public_html
Create a new file named phpinfo.php in your associated website root directly
You do have the option to add this file into any subdirectory of your choosing.
Add the following lines into your phpinfo.php file:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
 Save your edits.
You have just created a php info page! Feel free to continue through this article for instructions on how to view your page.
VIEW YOUR PHPINFO PAGE
To view your php info page, open a browser and go to the URL http://www.example.co/phpinfo.php

Replacing example.com with your actual domain name

g5.png

The php info page will be under example.com/phpinfo.php assuming you uploaded the file to your website root directory.

You can view all of the information about PHP for your server for that particular directory.
If you'd like to search for a specific module or resource limit, you can press the following keys:
Windows: CTLR + F
Mac: CMD + F
Then type the name of the module or resource in question.

g6.png
That's it! You should now know how to create, view, and search through a phpinfo.php page!

                       Experience
M.ASHFAQ.KHAN
Tags: html, javascript, php, css
Published: 2021-01-27 18:39:15

I'm a Web-Developer, php Back-end, front-end (Laravel, JavaScript, CSS, HTML, Bootstrap4).
The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. This tutorial helps you to build your base with PHP.
 Validation means check the input submitted by the user. There are two types of validation are available in PHP. They are as follows −

Client-Side Validation − Validation is performed on the client machine web browsers.

Server Side Validation − After submitted by data, The data has sent to a server and perform validation checks in server machine.
   OVERVIEW
You can use a phpinfo() page to view the current PHP information for your server.

This file outputs a large amount of information, such as:

Information about PHP compilation options and extensions
PHP version
Server information and environment (if compiled as a module)
PHP environment
OS version information, paths, master and local values of configuration options
HTTP headers
PHP license
Because every system is set up differently, phpinfo() is commonly used to check PHP configuration settings and for available predefined variables on your particular system.

phpinfo() is also a valuable debugging tool, as it contains all EGPCS (Environment, GET, POST, Cookie, and Server) data.

CREATE A PHPINFO.PHP PAGE
Luckily, creating a phpinfo page can be performed fairly quickly and easily!

Open your website files using a File Manager, FTP, or SSH.
Navigate to your website's root directory. This generally will be:
Plesk: httpdocs
cPanel: public_html
Create a new file named phpinfo.php in your associated website root directly
You do have the option to add this file into any subdirectory of your choosing.
Add the following lines into your phpinfo.php file:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
 Save your edits.
You have just created a php info page! Feel free to continue through this article for instructions on how to view your page.
VIEW YOUR PHPINFO PAGE
To view your php info page, open a browser and go to the URL http://www.example.co/phpinfo.php

Replacing example.com with your actual domain name

g5.png

The php info page will be under example.com/phpinfo.php assuming you uploaded the file to your website root directory.

You can view all of the information about PHP for your server for that particular directory.
If you'd like to search for a specific module or resource limit, you can press the following keys:
Windows: CTLR + F
Mac: CMD + F
Then type the name of the module or resource in question.

g6.png
That's it! You should now know how to create, view, and search through a phpinfo.php page!
How to Create a B2B Wholesale Marketplace
Tags: ecommerce, b2b, onlineshopping, onlinemarketplace
Published: 2021-01-27 14:21:59

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o0gqo7idur15jsszaz3n.png)
Online marketplace is the right place for selling and buying online. Many online retailers choose to promote their business on marketplaces, as it’s a convenient platform that provides all necessary features, like creating a merchant account, possibility to add products and its descriptions and even analyze their current sales process.

Buyers who use marketplaces take advantage of big product assortment and user reviews that help to be done with selecting.

On the example of the leading marketplaces, like eBay or Amazon, we can make a conclusion that such a business model has big prospects for fast growth. As proof, let’s look a little into the statistics. *Amazon has up to 300 million buyer accounts and nearly 2 million sellers*. 

Online marketplaces have all facilities to drive sales. If you would like to check things out from inside and discover the main steps of wholesale marketplace development from the concept to implementation, keep on reading.

Speaking about the concept, initially, you should pick the best business niche for you. Here are some tips on how to do this:

* Review specific markets you can run a leading business in.
* Make sure your potential business direction is profitable in 2021.
* Don’t opt for too narrow niches, for in time you will certainly need more opportunities for business development.

The next step is to create a business plan and set goals that would lead to an unconditional success. Of course, you may veer from the plan once it’s needed, but without a scratch you won’t be able to create a painting. 

Once your business plan is completed and you have a clear understanding of what your upcoming project should look like, it will be much easier to proceed. 

Suppliers, monetization method and marketplace main features should be your next stop on the road to a thriving marketplace. [This article](https://dinarys.com/blog/b2b-wholesale-marketplace), dedicated to marketplace development, accurately describes main monetization methods and other important aspects you should consider. 

To conclude, here is one more advice for you. Don’t do all this on your own and assign this task to professionals ;)
Fundamentals of software architecture - review 
Tags: architecture, books
Published: 2021-01-27 18:16:43

One of my resolutions for 2021 is to get more into software architecture. As an entry point for this topic, I chose fundamentals of software architecture by Mark Richards and Neal Ford. It was a great starting point and in this review, I will tell you why. 

## The great

The bread and butter of this book is a middle part that describes eight architecture styles. Each one is described in enough detail but without any unnecessary clutter. Great are practical examples that point out the weaknesses and strengths of each described architecture. The architecture styles also come with a handy table that can serve as a quick overview of the strengths and weaknesses of each architecture style. We will see how quickly will this part get old but until that, it will be a go-to resource for me when doing initial research on how to approach a problem from an architectural point of view. 

## The mind-bending

The book, in the first part, goes over basic architectural knowledge such as modularity, coupling, components... What was completely new for me was the introduction of formal methods of evaluating architecture characteristics. This part of the book is on my bucket list to read again in the hope to understand it better than during the first read. This part was also the hardest to read but for me, that is always a good sign of learning, so be prepared and take your time, it is worth it.

## The not so good

The last part of the book focuses mainly on softer parts of the architect job. There are good parts (I enjoyed the risk analysis part and Architecture decision records) but overall I had a feeling that this is something "extra". If this is what you would like to get from architecture book, look somewhere else.  

## The Conclusion

The fundamentals of software architecture was a great introduction to the topic of software architecture. The technical parts are excellent with great examples. The book is worthy of your time, you get a great overview of the discipline and a great handbook for everything architecture related.
Welcome Thread - v109
Tags: welcome
Published: 2021-01-27 18:06:02

---
title: Welcome Thread - v109
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Yo](https://media.giphy.com/media/l0Exl2gzkfMptFOGA/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Facebook launches a new decompilation tool
Tags: news, machinelearning
Published: 2021-01-27 17:50:27

Facebook launched a new decompilation tool which converts program in assembly language to C++. The name of the decompilation tool is **N-Bref**. To know more about this tool read the Facebook AI [blog](https://ai.facebook.com/blog/introducing-n-bref-a-neural-based-decompiler-framework/). 

The link to paper explaining about the tool is [here](https://openreview.net/forum?id=6GkL6qM3LV). The [Github repository](https://github.com/facebookresearch/nbref) of **N-Bref** explains about the implementation of the tool along with datasets.

### What are decompilers?

According to the Facebook AI blog

> Decompilers convert low-level executable code, like assembly instructions, back to a high-level programming language, like C++, that is easier for people to read. They’re useful for detecting vulnerabilities and anomalies in computer security as well as for forensics. Decompilers can also be leveraged to find potential viruses, debug programs, translate obsolete code, recover lost source code, and more. A decompiler program is traditionally manually designed with heuristics from human experts.

Machine learning has made the process of decompilation a bit easier and N-Bref achieves state-of-the-art results for this tedious task. Transformers are used as the basic building block of this decompilation tool and it is repurposed for this specific purpose. Normally transformers are used for Neural Machine Translation but in this case they are used for converting code in one language to other.
UIKIT – Simple Contact Us Form
Tags: css, html, webdev, weeklyui
Published: 2021-01-27 17:45:20

In this contact form, we simply used form components that are given in this framework. Also, we used a custom padding class Simple Contact Us Form in UIKIT.

Also, we used margin class and container class which are important parts of this form. To make proper cementer and align-center we used flex class with and one single button for the submit-side. This fully responsive for mobile and tablet-side.

Make it yours now by using it, downloading it, and please share it.

[Source Code](https://w3hubs.com/uikit-simple-contact-us-form/)
Create loading indicator without css animation
Tags: productivity, webdev, marquee
Published: 2021-01-27 17:27:59

just use marquee.

```jsx
<div
  style={{
    background: "rgba(0,0,0,0.8)",
    color: "white",
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
    fontSize: 32,
    position: "fixed",
    top: 0,
    left: 0,
    width: "100vw",
    height: "100vh",
  }}
>
  <marquee>loading</marquee>
</div>;

```

here is demo.

![loading](https://dev-to-uploads.s3.amazonaws.com/i/dctvsr9y8btpc1yzwad9.gif)

hooray🎉
Azure 403.14 Debug Tips
Tags: azure
Published: 2021-01-27 17:21:05

Scenario: Having pushed the latest changes to your Azure App Service WebSite, you are met with this message:

HTTP Error 403.14 - Forbidden

The options are that first you must go to the logs of the site. You clearly understand something is missing but cannot understand what to do to fix it.

**Good News**
Your local copy of the code is still good! If you are using Git, then all the code there is as current as your last push/pull request. 

**More Good News**
The quickest way to 'totally' reset your website is to delete it and recreate it. 

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

Next, compile latest code and  push deployment to Azure. Everything just works!

**Root Cause**
We had been creating new DevOps instances as well as functions, somewhere along the line a push to Azure wiped out something. After some investigation, the deep-dive was too much so we just recreated the web site. It takes about 5 minutes to accomplish. Just make sure to name the new appservice the same as the old for the URLs to stay that same.

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

JWP2021
Standardize display of checkboxes in APEX
Tags: orclapex, apex, css, ui
Published: 2021-01-27 17:27:42

---
title: Standardize display of checkboxes in APEX
published: true
date: 2021-01-27 17:20:56 UTC
tags: ORCLAPEX, APEX, CSS, UI
canonical_url: 
---

 ![](https://micodify.de/media/posts/16/checkbox-pen.png)

We often encounter checkboxes in many data-driven applications. Especially in APEX they are often used. And that is a good thing. But the problem we're talking about here is choice. The problem of having to choose one option. Many developers just take any icon. This leads to an inconsistent UI.

![](https://micodify.de/media/posts/16/various-checkboxes.png)

Therefore it is important to define an application wide standard how to use these checkboxes. Of course, you can specify which ICON should be used for one value and which for the other. But even this is a choice that the developer has to make every time, now by guideline, but still by himself.  
It is easier with the help of CSS. For fields or columns that can always take fixed values, like yes and no, we can simply define two classes that take an icon from FontApex. As a result, we will always be able to use the following snippet in APEX as HTML expression of such a column.

```
<span class="fa corporate-values-#COLUMN_NAME#"></span>
```

As suitable CSS we define the following pseudo element:

```
.corporate-values-yes:before {
  content: "\f14a";
}

.corporate-values-no:before {
  content: "\f096";
}
```

![](https://micodify.de/media/posts/16/pbuilder-properties-01.png)

The Unicode value of the characters to be displayed can be determined via the Chrome Developer Toolbar or via the definition gei Github: [https://github.com/oracle/font-apex](https://github.com/oracle/font-apex).

![](https://micodify.de/media/posts/16/chrome-devtools.png)

Now the developer knows how to implement such a checkbox and does not need to worry about the layout. Even in an interactive report you can use this method and get the advantage that the column value can still be used as a filter.  
  
This method is not only bound to checkboxes. Any kind of fixed values can be handled this way.

```
with example_progress as (select (rownum-1) * 10 progress
                            from dual
                         connect by rownum <= 11)
select progress
  from example_progress  
```

![](https://micodify.de/media/posts/16/pbuilder-properties-02.png)

![](https://micodify.de/media/posts/16/demo-progress-app.png)
Mistakes that beginners in programming do
Tags: programming, learner, beginners
Published: 2021-01-27 17:11:20

I would like to start with a very famous quote which is 
"Programming is all about thinking, not typing".

When we enter the world of programming as a complete beginner,
we tend to make some common mistakes, which can be avoided by becoming aware of it and learning from others despite doing it by yourself and then learning from it.
I am not saying that doing mistake is bad, but yes of course we can be smarter by knowing about it and avoiding it.


So here are some mistakes listed that beginners might do:
- Giving up too soon: learning a programming language as a 
  complete beginner takes a lot of patience. We should keep an attitude of not giving up.

- Learning without doing: we just keep on learning and not implementing our knowledge.

- Start with multiple languages: when we start we are too confused that we are not sure which language to start with and end up trying to learn multiple languages rather mastering anyone language.

- Skip the basics: our generation wants everything to happen too fast that we just want things to happen and ignoring the basics 
of concepts.


So these are some mistakes that are common as the beginner.

I hope you will learn from it and try to avoid these mistakes.
style={{whiteSpace:"pre-line"}}
Published: 2021-01-27 17:05:45

Querying Nested Arrays

To work with tree data structure we need to flatten them.

    We will be solving a problem using Array.prototype.forEach().
    We will define Array.prototype.concatAll() using Array.prototype.forEach().
    We will solve the same problem using Array.prototype.concatAll()

    This post is a follow up post of the
    – Getting started Functional Programming in JavaScript. I would recommend reading that post first.

Problem

Flatten the movieLists array into an array of video ids

    Let’s solve with Array.prototype.forEach()

'use strict';

function queryNestedArray() {
  var movieLists = [{
      name: "New Releases",
      videos: [{
        "id": 70111470,
        "title": "Die Hard",
        "rating": 4.0
      }, {
        "id": 654356453,
        "title": "Bad Boys",
        "rating": 5.0
      }]
    }, {
      name: "Dramas",
      videos: [{
        "id": 65432445,
        "title": "The Chamber",
        "rating": 4.0
      }, {
        "id": 675465,
        "title": "Fracture",
        "rating": 5.0
      }]
    }],
    allVideoIdsInMovieLists = [];

  movieLists.forEach(function(movieList) {
    return movieList.videos.forEach(function(video) {
      return allVideoIdsInMovieLists.push(video.id);
    });
  });

  return allVideoIdsInMovieLists;
}

console.log(queryNestedArray()); // [70111470, 654356453, 65432445, 675465]
Running Kafka with Docker Compose
Tags: docker, kafka
Published: 2021-01-27 17:01:56

Confluent is the primary sponsor of Apache Kafka and not surprisingly [they provide great Docker images](https://hub.docker.com/u/confluentinc) for Kafka (and its dependency, ZooKeeper) via their Confluent Platform.

The following `docker-compose.yml` file spins up a single-node Kafka "cluster", but the `INTERNAL`/`EXTERNAL` bits enable multi-node clusters to be declared with a small amount of changes.

```yaml
version: "3"

services:
  zk:
    image: confluentinc/cp-zookeeper:${CP_VERSION:-5.5.3}
    environment:
      JAVA_TOOL_OPTIONS: -Xmx256m
      ZOOKEEPER_CLIENT_PORT: 2181
    volumes:
      - zk:/var/lib/zookeeper/data
  kafka:
    image: confluentinc/cp-kafka:${CP_VERSION:-5.5.3}
    environment:
      JAVA_TOOL_OPTIONS: -Xmx512m
      KAFKA_ZOOKEEPER_CONNECT: zk:2181
      KAFKA_ADVERTISED_LISTENERS: EXTERNAL://localhost:9092,INTERNAL://kafka:9192
      KAFKA_LISTENERS: EXTERNAL://0.0.0.0:9092,INTERNAL://0.0.0.0:9192
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_LOG_RETENTION_HOURS: 1
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: EXTERNAL:PLAINTEXT,INTERNAL:PLAINTEXT
      KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
      # some loggers are set to TRACE by default...and they're noisy
      KAFKA_LOG4J_LOGGERS: kafka.controller=INFO,state.change.logger=INFO
    volumes:
      - kafka:/var/lib/kafka/data
    ports:
      - 9092:9092
    depends_on:
      - zk

volumes:
  zk:
  kafka:
```

Docker Compose also makes it easy to exec the usual helper scripts provided by the image, such as listing topics:

```shell
docker-compose exec kafka \
  kafka-topics --bootstrap-server localhost:9092 \
  --list
```

and consuming from a topic:

```shell
docker-compose exec kafka \
  kafka-console-consumer --bootstrap-server localhost:9092 \
  --topic your-topic
```

[Confluent has extensive documentation on the images used here.](https://docs.confluent.io/platform/current/installation/docker/config-reference.html)

Also, make sure to update or pass in the `CP_VERSION` appropriate [from the newest tags published](https://hub.docker.com/r/confluentinc/cp-kafka/tags?page=1&ordering=last_updated).