teleren/devto huggingface dataset:
Estos son los NFTs más Justos
Published: 2022-09-21 18:35:13

---
title: Estos son los NFTs más Justos
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8dbhdgouqzm7uaad7d2.png
---

Podemos lanzar NFTs de maneras más justas y divertidas combinando whitelists con eventos de comunidad y gamification. En este video exploramos una implementación de whitelist en un contrato de NFTs y también otras ideas que [Vitalik ha planteado en su blog](https://vitalik.ca/general/2021/08/22/prices.html) para ofrecer una mejor experiencia a los participantes.

https://youtu.be/pu_tp4d8ii0

## Antes de comenzar

Para este tutorial ocuparás [Metamask](https://metamask.io/) u otra wallet compatible con fondos en Goerli que puedes obtener desde un [faucet](https://goerlifaucet.com/).

## El Smart Contract

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract MyWhitelistNFT is ERC721Enumerable, Ownable {  
    uint256 public price = 0.01 ether;
    uint256 public constant MAX_SUPPLY = 10000;
    string public baseTokenURI = "https://baseurl.com/";

    bool public saleActive = false;
    mapping (address => uint256) public whitelistReserved;

    constructor () ERC721 ("My MNFT", "MNFT") {
    }

    // Overide functions

    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    // Public functions

    function mintToken(uint256 _amount) public payable {
        uint256 supply = totalSupply();
        require( supply + _amount <= MAX_SUPPLY, "Can't mint more than max supply" );
        require( msg.value == price * _amount, "Wrong amount of ETH sent" );

        if(!saleActive)
        {
            uint256 reservedAmt = whitelistReserved[msg.sender];
            require(reservedAmt > 0 && _amount <= reservedAmt, "Sale isn't active and you are not whitelisted" );
            whitelistReserved[msg.sender] = reservedAmt - _amount;
        }

        for(uint256 i; i < _amount; i++){
            _safeMint( msg.sender, supply + i );
        }
    }
    
    // Admin functions

    function editWhitelistReserved(address[] memory _a, uint256[] memory _amount) public onlyOwner {
        for(uint256 i; i < _a.length; i++){
            whitelistReserved[_a[i]] = _amount[i];
        }
    }

    function setSaleActive(bool val) public onlyOwner {
        saleActive = val;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        baseTokenURI = baseURI;
    }

    function withdraw() public payable onlyOwner {
        (bool sent, bytes memory data) = owner().call{value: address(this).balance}("");
        data;
        require(sent, "Failed to send Ether");
    }
}
```

**Gracias por ver este video!**

Sígannos en dev.to y en [Youtube](https://www.youtube.com/channel/UCNRB4tgwp09z4391JRjEsRA) para todo lo relacionado al desarrollo en Blockchain en Español.
Ceux-ci sont les NFTs les plus Justes
Published: 2022-09-21 18:31:31

---
title: Ceux-ci sont les NFTs les plus Justes
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evpofbm89245ck9k9imd.png
---

On peut combiner des whitelistes, avec des événements communautaires et gamification pour lancer des NFTs. Dans cette vidéo on va explorer une implémentation d'un contrat d'NFTs et d'autres [idées de Vitalik](https://vitalik.ca/general/2021/08/22/prices.html) pour une meilleure expérience pour les participants.

https://youtu.be/rygoKOO8lao

## Avant de commencer

Pour ce video tu auras besoin de [Metamask](https://metamask.io/) ou n'importe quel wallet compatible avec l'EVM et aussi du GoerliETH que tu peux trouver gratuitement en un [faucet](https://goerlifaucet.com/).

## Le Contrat Intéligent

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract MyWhitelistNFT is ERC721Enumerable, Ownable {  
    uint256 public price = 0.01 ether;
    uint256 public constant MAX_SUPPLY = 10000;
    string public baseTokenURI = "https://baseurl.com/";

    bool public saleActive = false;
    mapping (address => uint256) public whitelistReserved;

    constructor () ERC721 ("My MNFT", "MNFT") {
    }

    // Overide functions

    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    // Public functions

    function mintToken(uint256 _amount) public payable {
        uint256 supply = totalSupply();
        require( supply + _amount <= MAX_SUPPLY, "Can't mint more than max supply" );
        require( msg.value == price * _amount, "Wrong amount of ETH sent" );

        if(!saleActive)
        {
            uint256 reservedAmt = whitelistReserved[msg.sender];
            require(reservedAmt > 0 && _amount <= reservedAmt, "Sale isn't active and you are not whitelisted" );
            whitelistReserved[msg.sender] = reservedAmt - _amount;
        }

        for(uint256 i; i < _amount; i++){
            _safeMint( msg.sender, supply + i );
        }
    }
    
    // Admin functions

    function editWhitelistReserved(address[] memory _a, uint256[] memory _amount) public onlyOwner {
        for(uint256 i; i < _a.length; i++){
            whitelistReserved[_a[i]] = _amount[i];
        }
    }

    function setSaleActive(bool val) public onlyOwner {
        saleActive = val;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        baseTokenURI = baseURI;
    }

    function withdraw() public payable onlyOwner {
        (bool sent, bytes memory data) = owner().call{value: address(this).balance}("");
        data;
        require(sent, "Failed to send Ether");
    }
}
```

**¡Merci pour voir ce video!**

Suivez nous ici en dev.to et en [Youtube](https://www.youtube.com/channel/UCl3hXoRETXvoTWI-j0Y6ZTw) pour tout ce qui a à voir avec Blockchain en Francais.
These are the fairest NFTs
Published: 2022-09-21 18:28:07

---
title: These are the fairest NFTs
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0gaeqb11tjl8kp8j3ygd.png
---

We can launch NFTs in the fairest and funniest ways by combining whitelists with community events and gamification. In this video we will explore an implementation of whitelists in an NFTs contract and other ideas that [Vitalik proposed in his blog](https://vitalik.ca/general/2021/08/22/prices.html) to offer a better experience to the participants.

https://youtu.be/x63Hal7xTCQ

## Before we start

For this tutorial you will need [Metamask](https://metamask.io) or another compatible wallet with Goerli funds that you can get from a [faucet](https://goerlifaucet.com/).

## The Smart Contract

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

contract MyWhitelistNFT is ERC721Enumerable, Ownable {  
    uint256 public price = 0.01 ether;
    uint256 public constant MAX_SUPPLY = 10000;
    string public baseTokenURI = "https://baseurl.com/";

    bool public saleActive = false;
    mapping (address => uint256) public whitelistReserved;

    constructor () ERC721 ("My MNFT", "MNFT") {
    }

    // Overide functions

    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    // Public functions

    function mintToken(uint256 _amount) public payable {
        uint256 supply = totalSupply();
        require( supply + _amount <= MAX_SUPPLY, "Can't mint more than max supply" );
        require( msg.value == price * _amount, "Wrong amount of ETH sent" );

        if(!saleActive)
        {
            uint256 reservedAmt = whitelistReserved[msg.sender];
            require(reservedAmt > 0 && _amount <= reservedAmt, "Sale isn't active and you are not whitelisted" );
            whitelistReserved[msg.sender] = reservedAmt - _amount;
        }

        for(uint256 i; i < _amount; i++){
            _safeMint( msg.sender, supply + i );
        }
    }
    
    // Admin functions

    function editWhitelistReserved(address[] memory _a, uint256[] memory _amount) public onlyOwner {
        for(uint256 i; i < _a.length; i++){
            whitelistReserved[_a[i]] = _amount[i];
        }
    }

    function setSaleActive(bool val) public onlyOwner {
        saleActive = val;
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        baseTokenURI = baseURI;
    }

    function withdraw() public payable onlyOwner {
        (bool sent, bytes memory data) = owner().call{value: address(this).balance}("");
        data;
        require(sent, "Failed to send Ether");
    }
}
```

**Thanks for watching this video!**

Follows us on dev.to and in [Youtube]( https://www.youtube.com/channel/UCbF5CFuXv2vTkcGfepWV2nA) for everything related to Blockchain development.
Security - Cybersecurity breach case
Tags: cybersecurity, security, phishing, example
Published: 2022-09-21 17:40:21


On Thursday, September 15th, Uber Company confirmed reports of an organization-wide cybersecurity breach.

[Here to continue reading the complete post](https://blog.gitguardian.com/uber-breach-2022/amp/)


You must always be aware of any engineering that can be established on cyber security issues. phishing, social, engineering, ransomware, email, etc.

Thanks for read.
Developer Update Logs | XML Version: 1.0
Tags: webdev
Published: 2022-09-21 15:28:44

UPDATE LOGS | Encoding='UTF-8' | [Sitemap](https://indiadaily-news.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=500)

**Version: 1.0.6(22)**

Launched Beta Version of our Website.(Access available only for approved users)
Added Radio Option In The Footer.
Optimised Website For Mozilla Firefox.
Updated Footer Theme.
Fixed Minor Bugs.

**Version: 1.0.5(22)**

Added Visual Stories Section.
Removed "Upcoming Major Updates" Section.
Updated "Top News Labels" Placement.
Changed "Top News Label" Frequency.
Removed Footer "Contact Us" Option.
Fixed Minor Bugs & Optimized the Responsive Straps.
Removed "Facebook" Social Logo From Footer Menu.
Added Source Code Link On Footer.

**Version: 1.0.4(22) | [MAJOR UPDATES]**

MAJOR UPDATE: Durga Puja Festive Theme Added.
Updated Trending News Label Section.
Fixed Minor bugs.
Added Upcoming Major Updates Section.
Added New Live TV Feature.
Added New Contact Us Button.

**Version: 1.0.3(22)**

Fixed Some Minor Bugs.
Updated the Footer Menu.
Added New Contact Us(BETA) Form (NOT FUNCTIONAL NOW).
Fixed Sponsored Advertisements Section.
Removed Footer Payment Safety Badges.
Added New Notification Advertisements Pop-Ups.
Updated Social (Twitter) Follow Icon.

**Version: 1.0.2(22)**

Added More Options To Footer Menu.
Fixed Some Minor Bugs.
Added News Tags & Labels.
Started Validation Update For Page Indexing.
Updated Validation Source.
Optimised Website For Microsoft Edge.
Fixed Top Stories Section Bug.
Added Web Push Notification Feature.

**Version: 1.0.1(22)**

Optimised Mobile View Experience.
Optimised Footer UI.
Optimised Sponsored Ads UI & Redirection.
Updated Google Ads. Cookies.
Optimised Website for Chrome & Safari.
Fixed Minor & Major Bugs Causing Website to Crash.
Fixed Website Re-Loading Issues.
Added Correction Policy & Privacy Policy.
Updated Website Favicon.
Validating Web Index Error.
Added News Headlines Feature.
Reduced Website Loading Contents For Smoother Server Loading.

**Version: 1.0.0(22)**

Added Website Contents.
Added Footer.
Added Sidebar.
Added Featured News Section.
Added News Labels.
Added News Archives.
Added Top Stories Section.
Added Subscribe Feed Option.(BETA)
Updated Favicon.
Optimised Mobile View.
Added Advanced Theme.
Updated Website & Page Index.
Why tailwind ?
Tags: css, tailwindcss, webdev
Published: 2022-09-21 17:27:51

Tailwind is an amazing utility-first css framework that boosts our development process. Anyone, who is familiar with normal css can easily migrate to tailwind css for faster development and designing of webpages.

**<u>Merits of tailwind</u>**

- It gives more flexibility to developers.
- It has awesome documentation. So that we can easily reach out 
  for what we needed.
- It allows creating custom classes so that we can customize the 
  classes in the way we needed.
- It can be added via CDN or installed using npm.

- Its documentation contains guides to installing tailwind in different 
  frameworks like React js, Vue js, Next js, etc.


       So, i strongly recommend all the upcoming developers to start using tailwind for saving time and building incredible pieces of stuff.
Some Advice for New(ish) Developers
Tags: advice, beginners, management, positivity
Published: 2022-09-21 17:23:35

There are professional developers out here who weren't born when I started, so I've been around a while. I have worked on some incredible systems and even built many of them from scratch. I have worked for non-profits and governments. I have worked with startups and multinational conglomerates. I have helped build organizations from the ground up. Suffice it to say people who know me professionally don't consider me incompetent or inexperienced. 

I still spend a ton of time looking things up on Google. I still make mistakes and get stuck on silly things. I still ask other developers for help because: 

- It's okay not to know how to do something 
- It's okay to be wrong about something 
- It's okay to make mistakes
- It's okay to ask for help 

Anyone that tells you otherwise is a fool, a jerk, or both. 

Be kind to yourself.

You got this.

 

----
* Photo by [krakenimages](https://unsplash.com/@krakenimages?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText ) on [Unsplash]("https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText")
Vote
Published: 2022-09-23 17:18:45

---
title: Vote
published: true
date: 2022-09-21 17:01:00 UTC
tags: 
canonical_url: 
---

[https://www.linkedin.com/feed/update/urn:li:activity:6978315014696747008/](https://www.linkedin.com/feed/update/urn:li:activity:6978315014696747008/)
Supercharging VS Code Live Server
Tags: vscode, extensions, browser, debugging
Published: 2022-09-21 16:32:13

---
title: Supercharging VS Code Live Server 
published: true
description: By using the Edge DevTools extension together with Live server in VS Code you don't only get a server that shows your changes live in the browser, but a browser and developer tools right in the editor 
tags: vscode, extensions, browser, debugging
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgu03n4in8ddwyc4piu1.png
# Use a ratio of 100:42 for best results.
---

The [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension for Visual Studio code has been installed 25M times and is incredibly useful. It enables you to right-click an HTML document, and it runs a server for you and opens a browser window with the file in it. Any changes you make to the file causes the browser to reload and you can immediately see them - hence "live server".

The problem is that you still have to jump in between the editor and the browser if you want to debug the project using the browser developer tools. 

If you use the [Edge DevTools for VS Code](http://aka.ms/devtools-for-code) extension in addition to live server, you don't have that problem. Instead you can: 

* Get a live preview of changes to the file in a browser window right inside VS Code
* Use the browser developer tools and automatically sync the changes with your source files
* Get information about issues in your code and how to fix them
* Get a Console to try out JavaScript or see your `console.log()` messages right in VS Code

You can see this in action in the following video:

{% youtube HRpG_LLx0fI %}

The process is not quite straight forward yet, but we're working on it. 

* Right-click the file you want to open and choose "Open with live server"
* Copy the location from the URL bar of the browser tab that Live server opened
* Go back to VS Code and right-click the same file, this time choosing "Open with Edge" and either "Open Browser" or "Open browser with DevTools"
* In the browser panel that opens, paste the URL from earlier
* … and that's it. 

What could be done to make that easier? You can [chime in on this issue on GitHub to give us some ideas](https://github.com/microsoft/vscode-edge-devtools/issues/1189).
Instalar NodeJS en Linux
Tags: javascript, node
Published: 2022-09-21 16:15:02

Esta es una breve guía para la instalación de NodeJS en Linux.


> Esta publicación está basada en el siguiente sitio, el cual deberían visitar antes de instalar para validar que está instalando la última versión [Install NodeJS](https://github.com/nodesource/distributions/blob/master/README.md)


Comando a correr (para sistemas basados en Debian):

```
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
```

Verificar versión instalada:

```
node --version
```
LinkedIn Agile Methodologies Assessment Skill Answers
Tags: linkedin, agile, webdev, programming
Published: 2022-09-21 16:01:41


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



LinkedIn Agile Methodologies Assessment Answers 2022: Agile Methodologies Skill Badge: Agile Methodologies LinkedIn Test Answers: In this post you will get all the correct answers of [LinkedIn Agile Methodologies Quiz answers](https://www.rbtechtips.com/linkedin-agile-methodologies-assessment-answers/) given by the experts. Get All LinkedIn Assessment Answers.
INTEGRATE IMAGE PICKER SERVICE IN YOUR FLUTTER PROJECT
Tags: flutter, dart, mobile
Published: 2022-09-21 15:55:58

## Add the image picker plugin in your pubspec.yaml file

*There are mainly two ways for adding a package to your project.*

### First Approach (Long approach)
1. Head over to [pub.dev](https://pub.dev/) and search for **image_picker 0.8.5+3** [Link here](https://pub.dev/packages/image_picker).

2. Click on installing and copy the image picker version *image_picker: ^(current version number)*

3. Go to your pubspec.yaml file and paste what you have copied under dependencies and make sure it is properly aligned.

4. Hit save or run *flutter pub get* to install all dependencies.

### Alternate method (Shorter approach)
1. Head over to your terminal and run **flutter pub add image_picker** to add the image picker plugin to your project. As simple as it can be 😀


## Implementation of the image picker plugin

1. In the state of your class (StatefulWIdget), declare a nullable variable `File? imageUrl;` that will hold the file image. I will explain the reason for making your variable null very shortly.

2. Now we have to write a function for the image picker.
```
void selectImage() async {
    final picker = ImagePicker(); //Initialize the image picker service
    final pickedImage = await picker.pickImage();
    if (pickedImage == null) { //Check if the user did not pick any image, then we return.
      return;
    }
   setState((){
     imageUrl = File(pickedImage!.path); //Set imageUrl to the to File of the picked image.
   });
  }
```
Note that the `.pickImage()` method has some number of properties you can set, including imageQuality, source and many more.

3. Now head over to where you want to display your image.
```
Container(
  height: 200,
  width: 200,
  child: FileImage(imageUrl ?? 'any dummy image url here');//This line checks if imageUrl is null, then it displays the dummy image url else it will display your image. This is where the power or dart nullable comes in 😀.
);
```
🗓 If you missed the news, Luos will be attending the NuttX conference on September 24th and 25th.
Tags: opensource, microservices, nuttx, luos
Published: 2022-09-21 15:38:44

Nicolas Rabault will present what the Luos engine is technically with these features, how Luos and NuttX share the same vision, our upcoming projects connecting the Luos technology with NuttX and our latest news.

▶️ https://finance.yahoo.com/news/luos-ceo-speak-industry-event-160000561.html
Readme Pro - An Easy and Simple way to create Readme
Tags: quasarframework, vue, readmegenerator, readm
Published: 2022-09-21 15:22:11

Hello Everyone,

I made Readme Pro - An open source project which offers simple and easy way to create readme generator and GitHub profile readme generator.

Website - https://readmepro.netlify.app/
Please star this repo - https://github.com/mayur091193/readme-pro
Please support - https://www.buymeacoffee.com/mayur091193                            
https://github.com/sponsors/mayur091193
https://paypal.me/mayurpp

UI Screenshots:

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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0tba0lmgoxf4117c4oa.png)
How to Use Enums in PHP 8.1 With Practical Examples
Tags: php, php8, programming, tutorial
Published: 2022-09-21 15:04:50

Enumerations, or enums for short, are a new feature in PHP 8.1. Enums are a way of representing a fixed number of values. Enums can be used to represent things like days of the week, months of the year, or even colors. Enums can make your code more readable and maintainable.

Enums can be thought of as a set of named constants. The values in an Enum must be unique and can be any scalar type (integer, float, string, or boolean). Enums are declared using the enum keyword.

{% youtube 81b-0E-_EaI %}

## Basic Syntax
Here’s what a simple enum looks like:

```
enum PostStatus {
    case Published;
    case InReview;
    case Draft;
}
```
The case keyword, previously part of switch statements, is used to delineate the specific values the enum accepts. Values are referenced in the same way as class constants:

```
$published = PostStatus::Published;
```

▶ [Enums in PHP 8.1 with Practical Examples](https://qirolab.com/posts/how-to-use-the-new-php-enum-in-laravel-1663697723).

▶ [PHP 8.1: Enums in Depth Video tutorial](https://www.youtube.com/watch?v=81b-0E-_EaI)

▶ [How to use the Enums of PHP 8.1 in Laravel](https://qirolab.com/posts/how-to-use-the-new-php-enum-in-laravel-1663697723)
14G10DaysCodeChallenge: Day 1(Remove Duplicates from Sorted Array)
Tags: javascript, programming, challenge, career
Published: 2022-09-21 14:57:56

Two Pointers were applied in this challenge, the first pointer[j] which is used to iterate through the given array of numbs and second pointer [i] which is used in placing a unique value to the position after it.

Procedure

- Return 0, if nums.length = 0; which means there will be no elements in the array.

- Start j with the value of 1.

- Using the for loop, set i = 0; i < nums.length - 1 (we subtract 1 because once we get to the last value of array, we will not have any value to compare with).

- On each iteration, there is comparison between the current value of nums[i] with the next value of nums[i + 1].

- Using the if statement, compare[i] with [i + 1], if they are not equal, set nums of [j] equals to nums of [i + 1] and increment j.

- Return j.
All Okta Workflows Community-Created Flows
Tags: nocode, workflows, okta, ipaas
Published: 2022-09-21 14:57:47

A collection of community-created [Okta Workflows](https://www.okta.com/platform/workflows/) flows. 

{% embed https://dev.to/oktaworkflows/a-flow-to-audit-inactive-google-workspace-users-in-okta-572h %}

{% embed https://dev.to/oktaworkflows/a-flow-to-automatically-generate-shipping-labels-and-email-them-to-users-2jnk %}

{% embed https://dev.to/oktaworkflows/a-flow-to-help-with-lifecycle-reporting-5dhj %}