teleren/devto huggingface dataset:
Referral system with cryptocurrency tokens 
Published: 2021-12-08 11:35:52

## Why have a referral system?
A referral invite system has proven to be a useful tool to acquire new users or customers in a cost-efficient way.

We have examples such as [Guild of Guardians](https://www.guildofguardians.com/) (GoG) where more than 50% of their sales come from referral links being used. Another example is [Wonderverse](https://www.wonderverse.xyz/). They give you 10 of their fungible tokens (cryptocurrency) by joining their discord server and additional 10 for each referral you have invited to earn up to 150 tokens more. 


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

I have personally experienced the above examples and seen the massive growth of both; GoG >50K Discord members and >$10M in sales, Wonderverse >12K Discord members in less than a month.

## Won't I attract the wrong people into my community?
It is true that there is a risk of getting a lot of user who won't engage with your product. But we also see a lot of good reasons why to use this type of carrot stick.
Using tokens as a reward allows you to cost-effectively attract and educate users. The more educated they become the more likely they are to stick and use your product or contribute to your community. This is why, we see examples like the biggest crypto exchange in the U.S, [Coinbase, who had acquired Earn.com](https://www.cnbc.com/2018/04/16/bitcoin-exchange-coinbase-buys-earn-com-for-a-reported-100m.html#:~:text=Coinbase%20will%20acquire%20Earn.com,Coinbase's%20first%20chief%20technology%20officer.). With Earn, Coinbase has created an academy platform where one can learn about different crypto projects and receive $10 of the projects tokens by watching tutorials and doing quizzes. I have a friend who did this and 4-5 months afterwards his tokens went from being worth $10 to $400. That's a pretty good pay from just watching a 10-min tutorial and do a quiz.

## Do I have to learn Web3?
You might wonder if you need to learn how to write smart contracts in order to build a Dapp that has fungible tokens and a referral system to reward users with the tokens. This is no longer necessary, as we have marketplaces for smart contracts like [the Hyperverse](https://www.decentology.com/blog/composing-the-hyperverse).

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

Hyperverse has composable smart modules such as fungible token modules that allow you to create, mint and transfer tokens. The modules have been audited and deployed on blockchains such as Ethereum, Algorand, and Flow. This means developers get to focus on what they are good at, which is building apps, and won't have to worry about the integration of crypto wallets or writing smart contract code.
New NoCode Developer and Mentoring Marketplace
Published: 2021-12-08 11:25:36

Hi everyone!  My name is John and I am the founder of [NoCodeGuides.io](https://nocodeguides.io) which makes it easy to find NoCode developers and mentors for Bubble, Glide, Adalo, Webflow and more.  The site allows for purchasing calls with vetted mentors as well finding Bubble developers to build your project for you.  My mission is to make it easier to ship your app using NoCode, whether that's just by getting a little extra help or having someone do it for you.

[NoCodeGuides.io](https://nocodeguides.io)
Ops Docker it is #2: Build a Docker Image for Flask Application 
Tags: python, devops, docker, beginners
Published: 2021-12-08 11:24:32

Let's first start with creating the Docker file where we will pull Python 3.9 image.

**_Flask Dockerfile template_** 

```
FROM python:3.9.7
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
EXPOSE 5000
ENTRYPOINT ["python3"]
CMD ["app.py"]
```

Here we are pulling Python 3.9.7 image from the Python dockerhub repository.

**COPY**
Copy the current directory contents into the container at `/app`.

**WORKDIR**
It's a directory inside container image that can be set with the WORKDIR instruction in the Dockerfile. 

**RUN** command will install all the required packages for the Dockerfile. 

**EXPOSE**
The EXPOSE instruction tells Docker to get all its information required during the runtime from a specified Port.

**ENTRYPOINT**
The initiating point for the dockerfile while we run it. ENTRYPOINT command and parameters will not be overwritten from the command line. Instead, all command-line arguments will be added after ENTRYPOINT parameters.

**CMD**
CMD instruction is used to define what command the container should execute when launched and CMD sets default command and/or parameters, which can be overwritten from the command line when the docker container runs.

Now Let's run the Docker command for building the image 

`docker build -t asmi-flask .` 
This will build the image(asmi-flask) for the flask application. Give it a tag `-t` called asmi-flask.

`docker run -p 5000:5000 asmi-flask` 
In this command we tell docker to run an image called asmi-flask. `-p` Publish a container's port(s) to the host. Since Flask is running on port 5000 by default, the second part of this flag needs to be 5000. 

After this, we can run `docker ps` command to check if the image has been built or not. 

Output: 

```
ubntu@asmijafar20:~/Flask-App$ docker images
REPOSITORY              TAG          IMAGE ID       CREATED       SIZE
asmijafar20/dockerhub   asmi-flask   2e155e2820a0   3 days ago    922MB
```

In the next blog, we can build CI/CD pipelines and configure them using GitHub Actions. 

Till then Happy Coding!
Export Buttons In Datatable
Tags: laravel, export, button, datatable
Published: 2021-12-08 02:56:54

In this example I will show you how to add export buttons in datatable laravel, If you want to export datatable data in excel, pdf or csv file format, then you have to add export button in datatable.

Datatables provide DataTable Buttons plugin for add export button in datatable. After adding of export button, you can easily export data to CSV file or Excel sheet file, pdf file and also you can copy all datatable data in html format. The HTML5 export buttons plug-in for Buttons provides four export buttons like copyHtml5, csvHtml5, excelHtml5, pdfHtml5.

You need to simply add below javascript cdn to add export button in datatable.

```
https://code.jquery.com/jquery-3.5.1.js

https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js

https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js

https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js

https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js

https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js

https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js
```
 
---

**_[Read Also : Remove/Hide Columns While Export Data In Datatable](https://techsolutionstuff.com/post/remove-hide-columns-while-export-data-in-datatable)_**

--- 

And also add following CSS library files are loaded for use in this example to provide the styling of the table:

```
https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css

https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css
```

Add below javascript code in your script tag.

```
$(document).ready(function() {
    $('#export_example').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5'
        ]
    } );
} );
```

--- 

You might also like :

- **_[Read Also : Laravel 8 Google Recaptcha Example](https://techsolutionstuff.com/post/how-to-convert-php-array-to-json-object)_**

- **_[Read Also : How To Convert PHP Array To JSON Object](https://techsolutionstuff.com/post/laravel-8-google-recaptcha-example)_**

- **_[Read Also : How To Integrate Paypal Payment Gateway In Laravel 8](https://techsolutionstuff.com/post/how-to-integrate-paypal-payment-gateway-in-laravel-8)_**
Bug notification on Slack
Tags: actionshackathon21, slack
Published: 2021-12-08 11:21:54

### Instructions
Following repository contains the GitAction which triggers the work flow(sending notification to the slack) whenever an issue with label bug 🐞 is raised. The issue of type bug are one that require high attention of project owner and required to be fixed as soon as possible.


### My Workflow
[Link](https://github.com/shivamarora1/gitactions-slack-notification-bug-issue-raised) to my submission.



### Submission Category: 
**Maintainer Must-Haves**, **Wacky Wildcards**



### Yaml File or Link to Code

{% github https://github.com/shivamarora1/gitactions-slack-notification-bug-issue-raised %}


### Additional Resources / Info
1. [Learn how to get Slack bot token](https://api.slack.com/bot-users)
2. [How to use Git Actions](https://docs.github.com/en/actions)

### Screen of alert that will come on slack
![alt text](https://github.com/shivamarora1/gitactions-slack-notification-bug-issue-raised/blob/main/res/screenshot.png?raw=true "Notification on slack")
Day 57 of 100 Days of Code & Scrum: Connecting Next.js to Ghost Headless CMS
Tags: 100daysofcode, beginners, javascript, productivity
Published: 2021-12-08 11:19:00

Good day, everyone!

I'm back from my two days of inactivity. Today was a fairly great start, I managed to connect the [Rammina business page](https://www.rammina.com/) Next.js frontend with my Ghost headless CMS. I'm pretty glad to be coding again!

Anyway, let's move on to my daily report!

## The past two days

I took a break from work and coding. I was spending time with my family.

## Today

Here are the things I learned and worked on today:

### Company Website

- connected my [company page](https://www.rammina.com/)'s Next.js frontend with Ghost CMS.
- I learned a lot about `getStaticProps` and `getStaticPaths`.
- got some Typescript learning in from using the Next.js and Ghost Content API built-in functions.
- learned some methods in Ghost Content API.

### Scrum

- I did some practice flashcards for Scrum.
- reviewed some of the things I've learned before.

Thank you for reading! I hope everyone's doing well.

![Rammina Thank You Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9ayfxxxaz2g2hfcqbsk.png)

### Resources/Recommended Readings

- [Content API | Ghost](https://ghost.org/docs/content-api/)
- [Next.js Specific Types](https://nextjs.org/learn/excel/typescript/nextjs-types)
- [The 2020 Scrum Guide](https://scrumguides.org/scrum-guide.html)
- [Mikhail Lapshin's Scrum Quizzes](https://mlapshin.com/index.php/scrum-quizzes/)

### DISCLAIMER

**This is not a guide**, it is just me sharing my experiences and learnings. This post only expresses my thoughts and opinions (based on my limited knowledge) and is in no way a substitute for actual references. If I ever make a mistake or if you disagree, I would appreciate corrections in the comments!

<hr />

### Other Media

Feel free to reach out to me in other media!

<span><a target="_blank" href="https://twitter.com/RamminaR"><img src="https://res.cloudinary.com/rammina/image/upload/v1636792959/twitter-logo_laoyfu_pdbagm.png" alt="Twitter logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://github.com/Rammina"><img src="https://res.cloudinary.com/rammina/image/upload/v1636795051/GitHub-Emblem2_epcp8r.png" alt="Github logo" width="128" height="50"/></a></span>
Fusing NFTs together to mint a new special NFT
Published: 2021-12-08 11:02:57

## Introduction
When people think about NFTs ([Non-fungible tokens](https://ethereum.org/en/nft/)) they can be quick to assume that these tokens are just jpegs that can be right clicked and saved.

But NFTs can be much more than just jpegs. They can represent anything digital and/or physical assets. They can hold as much data as you would like by either storing it on the blockchain or point to an off-chain storage for its metadata.

## Make NFTs more valuable for you or others
You can make NFTs interactive by creating a smart contract that allows one to fuse multiple NFTs in order to create (mint) a new special NFT. This allows collectors to really 'play' with their NFTs instead of only holding or trading them. Giving this option can make trading much more valuable as you might end up creating, through the fusion of multiple NFTs, a special NFT that others may want. So you are creating something that others might find valuable.

An example of this is [Basic Beasts](basicbeasts.io), Basic Beasts is a Pokémon-inspired interactive collectibles game. You can collect, breed, trade, and evolve beasts. You evolve a lower level 1-star beast by fusing three of its kind in order to get a 2-star level version of the beast.

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

## How can you get started with this?

[Hyperverse](https://www.decentology.com/blog/composing-the-hyperverse), which is a marketplace for smart contracts, allow you to reuse modules that have been audited and deployed on the blockchain, so you don't have to worry about web3 stuff. You will be able to rapidly build a Dapp (Decentralized app) by combining different modules that fits your use-case.


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

In case, there are some modules you need but isn't available, you can choose to build them yourself or hire some developers and receive support from [Decentology](https://www.decentology.com/), the company behind Hyperverse.
By making your own smart modules. You allow others to reuse your code and you would receive lifetime royalty for your code, which could create an extra income source for you.
how to create age calculator with html
Published: 2021-11-28 19:23:53


Add bookmark
#1
Here are the features I try to incorporate into the age calculator.what does age calculator ?
Age calculator age calculator
1. You can estimate the age of your child in terms of days
2. age calculator calculates age in seconds.
3. age calculator calulates age in minutes.
4. The 4 age calculator calculates the age in months.
5. age calculatorcalculates in years,
<html>
<head>
<title>Exact Age Calculator</title>
<link rel='stylesheet' href='style.css'/>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script src='script.js'></script>
</head>
<body>
<div id="main_container">
<div id="birth_date_input">Birth Date*: <input type="date" id="birth_date"></div>
<br/>
<div id="calculate">Calculate your age**</div>

<div id="age_container"><span id="exact_age">Age</span></div>
<p><em>* The year here is 365 days and the month here is 30 days, that means your birthday may not mean you will be 0 days old.</br>
**Don't worry I will not share your input.</em></p>
</p>
</div>
</body>
</html>
#main_container {
width: 400px;
margin: 20px;
margin-left: auto;
margin-right: auto;
padding: 30px;
font-family: sans-serif;
border-radius: 20px;
border: 3px solid #999;
}

#birth_date_input, #age_container {
text-align: center;
margin: 20px;
margin-left: auto;
margin-right: auto;
}

#age_container {
margin: 40px 5px;
padding: 20px;
border-radius: 50px;
border: 1px solid #000;
font-weight: bolder;
background: #EEE;
font-size: 20px;
line-height: 40px;
}

#calculate {
cursor: pointer;
text-align: center;
width: 200px;
padding: 5px;
margin: 10px;
margin-left: auto;
margin-right: auto;
border: 1px solid #999;
border-radius: 10px;
background: #FFD119;
background: -webkit-gradient(linear, left top, left bottom, from(#FFD119), to(#E6B800));
background: -moz-linear-gradient(top, #FFD119, #E6B800);
font-weight: bold;
height: 28px;
box-shadow: 0 -8px inset;
}

#calculate:hover {
background: -webkit-gradient(linear, left top, left bottom, from(#E6B800), to(#FFD119));
background: -moz-linear-gradient(top, #E6B800, #FFD119);
margin-top: 13px;
height: 25px;
box-shadow: 0 -5px inset;
}

#calculate:active {
background: #403300;
padding-top: 10px;
height: 20px;
box-shadow: 0 5px #000 inset;
}

#age {
padding: 5px;
border: 3px dashed #AAA;
background-color: green;
}
html{
background:rgb(100, 100, 1000);
}
Why we need age calculator ?
Let's first learn about what is the age calculator, age calculator is a term that has multiple meanings. Different people use age calculator differnetly. Some call the age calculator, Some calls birth calculator,Some uses the term date of birth calculator, Some calls dob calculator, while others call date of birth calculation.
"Assign to me" declarative action in workspace
Tags: servicenow
Published: 2021-12-08 10:31:36

Let's be fancy and not use the old ui action for our assigned to me button, lets use the new declarative actions.

To do that you first need to create an action bar declarative action same as in my previous post (https://dev.to/23thom/add-a-new-button-to-your-action-bar-on-a-workspace-4445).
Use the implement as 'UXF Client Action' and create a new Action Payload Definition. Tell the payload definition that it is applicable to 'form'. As we will make everything dynamic, we don't need to add a payload (we can if we want to).

Do the same as in the previous post with the UX Form Action Layout so the button shows up in the action bar on your workspace.

Lets go back to our workspace and lets create on our page level a handled event. That is our container were we put in other events. I called mine ThomsEvent :)

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

Now we need to got to 'sys_ux_addon_event_mapping', our UX Add-on Event Mapping table, to connect our declarative action to our handled event. So when we click on the button, our handled event gets fired and we can do a good old setValue from our gform data broker.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8bra1z1r1wzb9yovkbff.png)
Please be aware, that the handled event just shows up on the record page that is used in our workspace.

Now we will see our handled event on the page level event mappings.

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

Here we can now add a SET_VALUE event from our gform data broker.

We can then use the script mode to create our dynamic payload and use the context.session object to get dynamically the user sys_id.

```javascript
function evaluateEvent({api, event}) {
	return {
		fieldName: 'assigned_to',
		value: api.context.session.user.sys_id,
		displayValue: api.context.session.user.fullName
	};
}

```

Thats it! :) We could now also add a save event from our gfrom data broker, if we want to.
Have fun!
Bases de datos y ORM
Tags: javascript, orm, webdev, database
Published: 2021-12-08 02:53:29

La base de datos es una recopilación de datos e información de forma organizada y estructurada.
Normalmente cuentan con un sistema de gestión de base de datos (DBMS).

## BASES DE DATOS RELACIONALES

Es el modelo más utilizado hoy en día.
En esencia las bases de datos relacionales son un conjunto de tablas formadas por columnas (campos) y filas (registros). La estructura nos ayuda a hacer **relaciones** entre tablas mediante **claves foráneas**.

**¿QUÉ ES UN DBMS?**

Es un programa que te permite crear, editar y administrar las bases de datos. La mayoria de las relacionales utilizan SQL, como MySQL o PostgreSQL.

**¿QUÉ ES SQL?**

Es un lenguaje de programación usado por casi todas las bases de datos relacionales para consultar, definir y manipular datos. 

**PRINCIPIOS ACID**

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



## OBJECT RELATIONAL MAPPING (ORM)
 
Es un modelo de programación que consiste en la transformación de las tablas de una base de datos, en una serie de entidades que simplifiquen las tareas básicas de acceso a los datos para el programador. 

¿Porqué queremos un ORM?

Como sabemos SQL es el lenguaje más utilazado de consulta pero existen varios sistemas de gestión de base de datos que cuentan con diferencias en los mismos tipos de consultas, por ejemplo

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

Esto nos lleva a dificultades en el desarrollo ya que deberiamos aprendernos estas variaciones para cada base de datos distinta en la que trabajemos, y mas importante aún, si en un futuro deseamos migrar la aplicación, habría que reescribir una gran cantidad de consultas.

Con el ORM nos facilitamos el trabajo, nos brinda ayuda en las labores básicas de cualquier acceso a datos, el CRUD (Create, Read, Update, Delete). Realizando todas estas labores a través de un lenguaje orientado a objetos.
Flexbox help!
Tags: css, flexbox, webdev, beginners
Published: 2021-12-08 10:01:49

Hello 👋
I've been learning Front-end Web Development for a couple of months now, and I have worked through a fair few different resources that cover CSS. I'm currently working through The Odin Project on the CSS Fundamentals and I'm really struggling to get my head around Flexbox. 

In principle I understand what it does and can understand and use some of the really basic properties of it, but then it just gets a bit too much and everything starts to fall apart. 

On TOP I've read through all the articles they provided and they make sense when reading but when it comes to applying it's a completely different story and I feel like I'm stuck and it's a little bit overwhelming as the next project is going to use a lot of Flexbox. 

Has anyone else had difficulty with FB and can recommend any resources that helped, ideally video tutorials would be helpful, I've read a lot already. I feel silly because I can't say exactly which part of the process I don't understand, it's almost like I understand and then I don't. 

Any help would be greatly appreciated!
Introduction to purpose-specific neural networks
Tags: watercooler
Published: 2021-12-08 09:56:10

Artificial neural networks (ANNs) are versatile and can be designed to address different problems. Specific architectural styles are useful for solving certain problems. Think of the architecture as being the fundamental configuration of the network.

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

Convolutional neural networks (CNNs) are designed for image recognition. These networks can be used to find the relationships among different objects and unique areas within images. If you’ve ever searched for an image online, you have likely interacted indirectly with a CNN.

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

Whereas standard ANNs accept a fixed number of inputs, recurrent neural networks (RNNs) accept a sequence of inputs with no predetermined length. These inputs are like spoken sentences. RNNs are useful in applications pertaining to speech and text recognition and prediction.

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

A generative adversarial network (GAN) consists of a generator network and a discriminator network. For example, the generator creates a potential solution like an image or a landscape, and a discriminator uses real images of landscapes to determine the realism or correctness.

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

GANs can be used to generate convincing fake images and videos (also known as deepfakes), which raises concern about the authenticity of information in the media. They can also be used in extraordinary ways for CGI for movies.

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

Learn more about artificial neural networks in Grokking AI Algorithms with Manning Publications: [http://bit.ly/gaia-book](http://bit.ly/gaia-book), consider following me - [@RishalHurbans](https://twitter.com/RishalHurbans), or join my mailing list for infrequent knowledge drops: [https://rhurbans.com/subscribe](https://rhurbans.com/subscribe).