teleren/devto huggingface dataset:
Magento 2 File Download Extension
Tags: magento2uploadpdf, magento2fileupload, magento2filedownload
Published: 2018-06-28 12:10:18

---
title: Magento 2 File Download Extension
published: true
description: 
tags: Magento 2 upload PDF, Magento 2 file upload, Magento 2 file download
---
Magento 2 file upload extension by FME allows you to upload files of different formats to Magento 2 product & CMS pages to make them more engaging and informative. You can upload PDF, PPT, Docs,links, images, audio/video etc. and customers can download these files. These files can be user guides, tutorials, video links, license agreement and other informative materials which contribute to increased product knowledge of the customers. Magento 2 product attachments also allows you to create a dedicated 'File Download' page to list all the uploaded files.

With [Magento 2 file download extension](https://www.fmeextensions.com/product-attachments-file-uploads-magento-2.html), you can just drag & drop files to attach. Display attractive file icons and set a download limit. In order to download a file, customers must be signed in. You can restrict uploaded files to specific customer group and store views.

### Key features of Magento 2 File Upload Extension

Following are some features of this extension.

- Attach unlimited files to product & CMS pages
- Upload PDF & file types
- Create separate 'File Download' page
- Display attractive file icons
- Restrict files by customer groups & store view
- Set a download limit
- Login before download
Magento 2.2.5: 150+ Bug Fixes & Enhancements [27/06/18]
Tags: magento225, magentocommerce225, magentoopensource225, magento225release
Published: 2018-06-28 11:00:10

---
title: Magento 2.2.5: 150+ Bug Fixes & Enhancements [27/06/18]
published: true
description: Magento 2.2.5 was released on June 27, 2018, bringing about lots of bug fixes and security enhancements. Discover now!
tags: magento 2.2.5, magento commerce 2.2.5, magento open source 2.2.5, magento 2.2.5 release
---

<img src="https://www.tigren.com/wp-content/uploads/2018/06/magento-2.2.5-1024x576.png" alt="magento 2.2.5" width="1024" height="576" class="aligncenter size-large wp-image-7648" />

<h2><a href="https://www.tigren.com/magento-2-2-5/">Magento 2.2.5</a>'s Essential Updates</h2>
<ul>
 	<li>Closing stored XSS, SQL injection, and cross-site request forgery (CSRF) vulnerabilities.</li>
 	<li>Tackling the deployment issues of multi-website after upgrading your site to Magento 2.2.4 by applying the same config throughout store views by default.</li>
 	<li>Boosting the performance of data index process by nearly 15%.</li>
 	<li>Raising performance of core bundled extensions.</li>
 	<li>Enhancing core code of Magento.</li>
 	<li>Improving checkout process by allowing customers to register a new account on Order Confirmation page</li>
 	<li>Updating product sorting function to sort all items based on actual price before sale.</li>
 	<li>Adding new features related to Magento shipping: carrier selection for returns, batch shipments, collection points</li>
 	<li>Augmenting performance of catalog search result page by over 30%</li>
</ul>

<a href="https://www.tigren.com/magento-2-2-5/">[Read Full]</a>

<h2>Magento 2.2.5's Noticeable Bug Fixes</h2>
<ul>
 	<li>Impossible to run a cron job many times</li>
 	<li>Easily discarding any option of bundle product</li>
 	<li>Getting rid of bundle products when applying coupons</li>
 	<li>Running simultaneously catalog search full-text indexer and catalog product indexer</li>
 	<li>Appling new data format (dd/mm/yyyy) for saving products using a locale</li>
 	<li>Showing image of selected option for the configurable product on the wishlist</li>
 	<li>Filtering recent order according to stores on "My account" page correctly</li>
 	<li>Capturing accurate PayPal Payflow Pro credentials in multi-store</li>
 	<li>Hide out-of-stock option of configurable products in search results</li>
 	<li>Flushing cache for common search results to cut down their response time</li>
 	<li>Improving swatch function by using JavaScript mixins regardless of browsers</li>
 	<li>Easily navigating from default store's catalog page to that of different stores</li>
 	<li>Adding accurate tax amount in Order Total section (on Order Summary</li>
 	<li>Displaying both prices included/ excluded tax on the checkout page</li>
 	<li>Allowing customers to create Vertex invoice refund once the order is canceled</li>
 	<li>Handling some minor issues related to Amazon Pay, Vertex, and dotmailer</li>


<a href="https://www.tigren.com/magento-2-2-5/"><b>DOWNLOAD MAGENTO 2.2.5 NOW</b></a>
Why it is not possible to extend a final class in Java?
Tags: explainlikeimfive, java, oops
Published: 2018-06-28 09:58:32

---
title: Why it is not possible to extend a final class in Java?
published: true
tags: explainlikeimfive, java, oops
---

![why?](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRWYlCyhV9abZM-JfQgZvZ1hURdClWQlnTFh4WR_rpjA5gq8rih)
TextInput component for ReactNative ^0.54.2
Tags: reactnative
Published: 2018-06-28 06:49:04

---
title: TextInput component for ReactNative ^0.54.2
published: true
description: 
tags: ReactNative
---
![zuckerburg](https://thepracticaldev.s3.amazonaws.com/i/cygqsps3c571o8szgjcn.jpg)

From v0.54.2, a behavior of `TextInput` has changed a bit.If you use `onChangeText` with `value` or 'defaultValue', Japanese(and any other non-alphabetic text) text input is not available by default.
If you want to input the non-alphabetic text, `value(or defaultValue)` is need to be treated as `props`.So create an another `TextInput` component to catch the props value is the one of the solution.


Create the component.

```javascript
import React, { Component } from 'react';
import { Platform, TextInput } from 'react-native';

class CustomTextInput extends Component {
  shouldComponentUpdate(nextProps) {
    return Platform.OS !== 'ios' || this.props.value === nextProps.value;
  }
  render() {
    return <TextInput {...this.props} />;
  }
}

export default CustomTextInput;
```

And send the value as props

```javascript
<CustomInputForm
  style={{
    height: 40,
    borderColor: 'gray',
    borderRadius: 5,
    borderWidth: 1,
    backgroundColor: 'white',
    margin: 5
  }}
  onChangeText={value => this.setState({ value })}
  value={this.state.value}
  placeholder="Enter your name"
  placeholderTextColor="gray"
/>
```
Masonite Python Framework - New Dashboard Package!
Tags: python, framework, masonite
Published: 2018-06-28 03:06:12

---
title: Masonite Python Framework - New Dashboard Package!
published: true
description: 
tags: python, framework, masonite
---

# Introduction

I had an idea for a new Masonite package called Masonite Dashboard. This dashboard by itself is completely barebones and really only contains a welcome message but allows the ability to expand it using strictly Service Providers.

This means that any package you install has the ability to create it's own admin dashboard module. Maybe your next Stripe payment integration package contains a dashboard module to manage subscriptions or send out invoices right from the admin panel. Or maybe the next API package contains a dashboard module to monitor API usage.

That is what this new dashboard package does. You can read more about installing [Masonite Dashboard](https://docs.masoniteproject.com/official-packages/masonite-dashboard) but this documentation will be about how easy it is to expand it into a User Management system where you can:

* See users
* Add users
* Search users
* Delete users
* Login as users (badass)

If you want to follow along then you'll have to read on how to install [Masonite Dashboard here](https://docs.masoniteproject.com/official-packages/masonite-dashboard) and come back to this article. If you want to just see how awesome it is then continue reading.

Once Masonite Dashboard is installed we saw a new dashboard like this:

<img src="https://thepracticaldev.s3.amazonaws.com/i/hff7bq9ue337bsscaydn.png">

# Configuration

The configuration is very minor here. Once we have Masonite Dashboard installed and we have successfully logged in according to the documentation, we just need a few configuration steps for each add-on. We'll work on expanding the built in dashboard module here and add a user management system.


## Service Provider

First we need to add a Service Provider to our `PROVIDERS` list in `config/providers.py`:

```python
...
from dashboard.providers import UserManagementProvider
...

PROVIDERS = [
    ...
    DashboardProvider,
    UserManagementProvider,
]
```

That's it for the Service Provider. Let's move on to adding some required routes to our app.

## Routes

Just import the routes needed and add them to your `ROUTES` list.

```python
from dashboard.routes import management_routes
...

ROUTES = [
    ...
    management_routes(),
    ...
]
```

That's it! Now let's open our dashboard and we'll see a new navigation link:

<img src="https://thepracticaldev.s3.amazonaws.com/i/ckmit74zq4dnfxarhskw.png">

If we click on the link we will be taken to the new module where we can add, delete and login as other users:

<img src="https://thepracticaldev.s3.amazonaws.com/i/lhtjsrahcm4acu6ekdgo.png">

It's that simple!

****

If you want to contribute to the development of the package or interested in the development of Masonite then be sure to join the [Slack](http://slack.masoniteproject.com) channel or star the repo on [GitHub](https://github.com/MasoniteFramework/masonite). Thanks!
convert JS Object to CSS in command
Tags: vim, css, javascript, productivity
Published: 2018-06-28 01:04:14

---
title: convert JS Object to CSS in command
published: true
description: 
tags: vim, css, js, productivity
---

![image](https://thepracticaldev.s3.amazonaws.com/i/ri161v1uem9tb2wc1xl1.gif)

I found Styled Component is much convenient for me to write styles with React.

However, I already wrote a lot of styles with JS object, using jss. So I need to convert JSS to CSS.

I wrote a tiny script, which is a set of perl one liners, and call the command from Vim.

`~/bin/obj2style`

```bash
#!/bin/bash

perl -pe 's/ +$//g' \
    | perl -pe 's/ as .+//g' \
    | perl -pe 's/([A-Z])/-\L\1/g' \
    | perl -pe 's/^_//' \
    | perl -pe 's/"([a-z]+)"$/\1/g' \
    | perl -pe "s/'([a-z]+)'$/\1/g" \
    | perl -pe 's/([0-9]+),?$/\1px/g' \
    | perl -pe 's/,?$/;/'
```

(More elegant RegExp would exist but least effort here)

Test:

```bash
~> echo fontSize: 12 | obj2style 
font-size: 12px;

~> echo fontSize: 'large' | obj2style 
font-size: large;

~> echo "fontSize: 'large', " | obj2style 
font-size: large;

~> echo "fontWeight: 'bold' as 'bold'" | obj2style 
font-weight: bold;
```

Then, use that command in vim!
Using NuGet to publish .NET packages
Tags: nuget, net
Published: 2020-09-22 10:27:06

---
title: Using NuGet to publish .NET packages
published: true
date: 2018-06-28 00:00:00 UTC
tags: NuGet,NET
canonical_url: https://www.loginradius.com/engineering/blog/using-nuget-to-publish-net-packages/
---

NuGet is a free and open-source package manager for the .NET ecosystem. We can create and install packages using NuGet client tools. All of the .NET packages are hosted for publishing and consumption on a central package repository known as NuGet Gallery. Prerequisites Visual…

   
[Read On](https://www.loginradius.com/engineering/blog/using-nuget-to-publish-net-packages/)
What programming language to learn first?
Tags: beginners
Published: 2018-06-27 23:03:18

---
title: What programming language to learn first?
published: true
description: The ideal first programming language.
tags: beginners
---
![gif](https://media.giphy.com/media/3o7buirYcmV5nSwIRW/giphy.gif)

Short answer: I recommend Python or Javascript.

Depend on what is your target.

Do you become a back-end or front-end developer?

you want a back-end developer you should choose Python. For front-end development, you should learn JavaScript.

I hear that JavaScript is for Full Stack,(back-end, front-end) but I think that is not really because each one has a lot of knowledge.

Two languages have great possibilities with python you can write scripts for machine learning, data science, security, crypto, [automating things](https://automatetheboringstuff.com/), also you can create a web, desktop, terminal apps, robots, and games.

JavaScript allows creating mobile, desktop, web apps. Also, you can programming robots, IoT, etc. JavaScript is anywhere. If you want to learn JavaScript I recommend [freecodecamp](https://www.freecodecamp.org/)

Programming languages have pros and cons but remember a language is only a tool, you can choose any programming language. The important is to resolve problems and make things. 

I choose python I am interested in Data Science and IA.



___
######I'm practicing English I appreciate your feedback.
How To Stop Comparing Your Career To Other Developers
Tags: career, productivity, culture, mentalhealth
Published: 2018-06-27 22:50:48

---
title: How To Stop Comparing Your Career To Other Developers
published: true
description: As you grow, it can be tempting to compare your career to other developers.
tags: #career #productivity #culture #mentalhealth
---

As you grow, it can be tempting to compare your career to other developers.

It's only natural that as you notice other people getting promotions, recognition, and opportunities to lead exciting efforts you consider: 

"_Would I like that too?_"

But it's a slippery slope from discovering some new worthy goals, to **chasing someone else's**!

In this video I share some ways I've come to cope with many projects where I ask myself:

"_How do I feel when someone else gets recognized?_"

# [📺 Watch this video on YouTube](https://www.youtube.com/watch?v=3DCb1oeQ0Co&index=2&list=PL32pD389V8xvAiSh4rIE_xqLLBCOnap0M)

Or listen as a podcast:
[🎧 Soundcloud](https://soundcloud.com/jayme-edwards-media/how-to-stop-comparing-your-career-to-other-developers)

<hr />[🔔 Subscribe for 90+ videos on healthy software development](https://YouTube.com/c/JaymeEdwardsmedia?sub_confirmation=1)
How do you stay focused when everything sucks?
Tags: discuss
Published: 2018-06-27 22:42:44

---
title: How do you stay focused when everything sucks?
published: true
description: 
tags: discuss
---

When the news is really bad it can feel nearly impossible to care about or do anything else. I would love some thoughts from this community on how you keep up with life in the face of all the bad stuff.
Pro Tip: How to find the accidental mutation
Tags: immutability, javascript
Published: 2018-06-27 20:37:40

---
title: Pro Tip: How to find the accidental mutation
published: true
description: Using `Object.freeze()` to catch the line where an unwanted mutation occurs.
tags: Immutability, JavaScript
---

I joined a React project with no immutability library or middleware, but it's too far-gone to make that change now, especially considering it's never actually caused any issues, until this one example today. 


In cases where I need a bit more control than simple [lodash.cloneDeep](https://lodash.com/docs/4.17.11#cloneDeep), I typically use the `{...spread}` method to clone an object, and remembering that this only creates a shallow clone, propagate the same method down the tree of modified nested properties (which thankfully never goes very deep), eg:


```js
// there are a dozen variations on how you might do this...

const modifiedObj = {
    ...originalObj,
    list: [
        ...originalObj.list,
        newItem,
    ]
};

```

In this case though, I'd missed an ancestor **somewhere**, causing the original object to be mutated, and scanning up and down this 30-line function, I couldn't find where the mutation was happening.

A brainwave called out from deep inside: "`Object.freeze`!". No, it wasn't a suggestion to freeze `this.props.myProperty` to prevent the mutation (I just assume that's a very bad idea), but I could use it as a temporary debugging tool.

Remembering that `Object.freeze` also only works shallowly, I pulled out this `deepFreeze()` function from the [Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#What_is_Shallow_Freeze):

```js
// NB: you may need to apply "use strict" based on your project set-up

function deepFreeze(object) {

  // Retrieve the property names defined on object
  var propNames = Object.getOwnPropertyNames(object);

  // Freeze properties before freezing self

  for (let name of propNames) {
    let value = object[name];

    object[name] = value && typeof value === "object" ?
      deepFreeze(value) : value;
  }

  return Object.freeze(object);
}
```

Now apply this function to **the source** of any cloned object you want to debug before the mutation occurs, and the browser console will conveniently throw an error at the exact line where the mutation was being inadvertently attempted:


```js
const onlyShallowCloned = { ...this.props.myProp};
deepFreeze(this.props.myProp);
someDeepManipulation(onlyShallowCloned);
```

And easy as that, the now-obvious offending line slaps you in the face as you kick yourself: _ahh it was there all along!_.
Introduction to Coding and APIs workshop
Tags: webdev, beginners, devlive
Published: 2018-06-27 19:50:42

---
title: Introduction to Coding and APIs workshop
published: true
description: 
tags: webdev, beginners, devlive
---

Our end goal is to send a text message 24hours before it rains in New York City. First, we will work with the Twilio SMS API and send a text message. We will learn how to test an API with Postman. Second, we will incorporate the Weather API to trigger an if/else response.

By the end of the talk, you will have:

Called to Weather API and Twilio SMS API
Learned how to use Postman, a popular API testing tool
Coded a logic statement involving the API’s data


*This Live Stream was recorded on June 11, 2018*
Join the next Live Stream. See all upcoming events [here](https://dev.to/events).
Making Generative Twitter Bots
Tags: javascript, beginners, devlive
Published: 2018-06-27 19:46:45

---
title: Making Generative Twitter Bots
published: true
description: 
tags: javascript, beginners, devlive
---

This workshop will cover how to build a Twitter bot in JavaScript using Node.js. In the process we'll cover different data sources and how you can get data from APIs. The Twit node module will be used to communicate with the Twitter API. The first part of the workshop will be a showcase of different, wonderful bots!

Prerequisites:
Basic knowledge of JavaScript is helpful.
Create an Artsy account and sign into the Developer website.
Sign up for a new Twitter account for your bot.
Sign up for an account on Glitch.

*This DEV Live Stream was recorded on June 7, 2018*
Join the next Live Stream. See all upcoming events [here](https://dev.to/events).
Learning CSS Through Creating Art
Tags: devlive, webdev, css
Published: 2018-06-27 19:39:53

---
title: Learning CSS Through Creating Art
published: true
description: 
tags: devlive, webdev, css
---

Learn the basics of HTML and CSS through visual examples, and learn how to make CSS art! We will start off with explaining what CSS and HTML are, look at the anatomy of a CSS selector, and then practice with selectors, positioning, shapes, and colors. We will then do a code along to build a CSS house! 

*This DEV Live Stream was recorded on June 20, 2018*
Join the next Live Stream. See all upcoming events [here](https://dev.to/events).
Go is so slow on my machine
Tags: go, help
Published: 2018-06-27 18:55:31

---
title: Go is so slow on my machine
published: true
description: 
tags: Go, help
---

I'm having a problem with Go on my machine. Suddenly it became so slow to run (Go run file.go) and build. A simple code takes 5 to 10 seconds to run (and build). I didn't have this problem before. 

Does anyone have an idea about what could be the problem?
Introducing Bancor Protocol, a standard for designing cryptocurrencies
Tags: blockchain, security, cryptocurrency
Published: 2018-06-27 16:21:26

---
layout: post
title: "Introducing Bancor Protocol, a standard for designing cryptocurrencies"
published: true
tags: blockchain, security, techtalks, cryptocurrency
cover_image: "https://thepracticaldev.s3.amazonaws.com/i/3aqsw460vob6oyyjjhfs.jpg"
---

The <a href="https://about.bancor.network/protocol/">Bancor Protocol</a> is a standard for designing digital currencies, called smart tokens, with the embedded automatic convertibility directly through smart contracts, serving as decentralized, autonomous, and reliable market makers.

Representing a standard for ERC20 tokens, Bancor connects currencies in order to create liquidity networks providing instant continuous on-chain token conversions that occur between network users and smart contracts.

The Bancor open-source protocol uses “connector” modules, which hold balances of other ERC20 tokens within a smart contract. 

Due to constant and automatic price recalculation, the Bancor Formula achieves a balance between smart tokens and their connectors, thus balancing buys and sells.

A transparent and immutable smart contract logic allows predicting how a token purchase or sale will fluctuate in price. 

As a result, we get more stable token prices with no high pumps and dumps and price manipulations.The <a href="https://blog.bancor.network/">Bancor Network</a> significantly differs from traditional and decentralized exchanges. 

Opposed to trading on exchanges that requires matching between two parties, the Bancor Protocol allows automated token conversion without the participation of traders and market makers. The inclusion of a counterparty in the trading process is optional, not required.

So, users can purchase or sell tokens at any time, even when there is no the second party on the market. 

As the price adjusts to conversion size, there is always some price at which token can be converted. Continuous liquidity is one of the main advantages of smart tokens. 

To take a closer look at the technology, I also recommend reading:

- <a href="https://smartym.pro/blog/blockchain-tech-trends-introduction-to-bancor-protocol-a-solution-to-the-liquidity-problem/">Blockchain tech trends: Solving a liquidity problem with Bancor</a>

- <a href="https://storage.googleapis.com/website-bancor/2018/04/01ba8253-bancor_protocol_whitepaper_en.pdf">Bancor foundation and whitepaper.</a>
Are you still using Python 2?
Tags: python, discuss
Published: 2018-06-27 15:42:31

---
title: Are you still using Python 2?
published: true
description: Python 3 is better than Python 2
tags: python, discuss
---

Are you still using Python 2.7?

If so, why?

Do you know Python 3 is 10 years old?

A lot has changed since the early days of Python 3.0, today most frameworks and libraries either support both, have dropped Python 2 or are about to do so.

Python 3 is better than Python 2 (and is about the same speed). Also Python 2 is not going to be maintained __at all__ by 2020 and has been in feature freeze for a long time (since 2010 I think).

If you are still using Python 2.7 daily at work without a plan to migrate in sight, please talk about it internally. If the reason, for you being stuck at work on Python 2, is a specific third party library that hasn't been migrated so far, please ask your company to actually _fund_ the open source project so they can migrate ;-)

Python has been around for 27 years, Python 2 18 years, Python 3 10 years and the Python community is bigger than ever. The investment in Python 3 is definitely worth it.

Let's talk about it and if you need help to make the decision I think I can help.