teleren/devto huggingface dataset:
Writing a QML Application in Rust (Part 2)
Tags: rust, qt, qml
Published: 2021-11-01 11:03:23

## Introduction
In the last part, we went over the basic setup for qtmetaobject-rs. In this post, we will set up the basic logging stuff for qt. While logging is not flashy or the best way to debug, it seriously sucks to work without it.
<!-- more -->

## Initialize Logging
1. We first need to add [log](https://crates.io/crates/log) and [env_logger](https://crates.io/crates/env_logger) as dependencies in `Cargo.toml`.
2. Initilaize logger in `main.rs`.
```rust
fn main() {
    qmetaobject::log::init_qt_to_rust();
    env_logger::init();
    info!("Log⋅Test");

    // Everythin Else
}
```
3. Run project
```
RUST_LOG=warn,error,info,debug,trace cargo run
```
Note: Logging from both Rust and QML side (console.log()) should now work.

## Autoload variable
While this works, it would be preferable not to set RUST_LOG every time for the project. I decided to use [direnv](https://direnv.net) to set the RUST_LOG variable for the directory rather than a global variable. The instructions are given below:
### Install direnv
The install instructions for different distros can be found [here](https://direnv.net/docs/installation.html). Since I am using arch, I decided to install it from AUR.
### Hook into Shell
direnv works with many shells. Instructions to each shell can be found [here](https://direnv.net/docs/hook.html).
### Create `.envrc` file
We need to create `.envrc` file in the root of the project with the following contents:
```
export RUST_LOG=error,warn,info,debug,trace
```
direnv should ask us to allow the `.envrc` file the first time we cd to the project directory. Then the RUST_LOG variable should automatically be set and unset when entering and leaving the project, respectively.

## Conclusion
The following post will be about using KI18n with qmetaobject-rs, which is a KDE localization framework.
Advanced Excel Training in Gurgaon | Advanced Excel Course in Gurgaon
Tags: tutorial, career, beginners, programming
Published: 2021-11-01 11:01:04

Learn various functions, data visualization, pivot tables & more in Advanced Excel training.  

Whether you're interested in learning the fundamentals of Excel, or developing more advanced Microsoft Excel skills, iClass Gyansetu has a course for you. 

Advance Excel for Data Analytics is a Job Oriented Course designed to meet the job requirement of Freshers and Experienced professionals. In this course you will learn- Advanced Excel, Automation using VBA programming & SQL Database.

This Excel Training course in Gurgaon starts with the Excel basics and quickly progresses to a more advanced level.  

This course teaches you basic to advance concepts of Microsoft Excel. This tutorial covers in-depth lessons on how to use various Excel Formulas.
Release new Library to measure & compare your Code!!
Tags: javascript, node, typescript
Published: 2021-11-01 10:38:58

Hello Guys, I hope All of you doing well.

Sometimes we want to measure our code to check how much time it took to work, Moreover, after improving the code we'd like to check if it works more efficiently than the older version, Or for academic purpose we want to compare algorithms to check the time complexity on a chart, For that reason I Present you **YubaPerf**

## How To install it 
  
```
npm i @youba/yubaperf
# OR
yarn add @youba/yubaperf
```

## How to use it 

#### Measuring your code:  

To measure your code, you need to use these functions: 

```
Perf.start("Algorithm1");
//The code you want to measure
Perf.end("Algorithm1");
console.log(perf.result("Algorithm1"));
```

#### Comparing Sync functions: 

The concept here is to pass one or more than function with multiple args to measure and compare between them,

You simply need:
```
Perfom.setfuncsToCompareSync([addUpToFirst, addUpToSecond], args);
Perfom.generateChart(); // the chart located on perf/index.html file
```
> Passing Array of functions & Another one for arguments .the arguments may be a simple Array like :
`[1,10,1000,1000,122]` Or dimensional one for Functions who has more than input like `[['yes',19],['yes',1900],['yes',19999]]`


The Chart: 
![Chart](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzl33uy7tyep05eas6aj.png)

## What's next 
The lib is on development,the next version will have more features like: 
   * Comparing async functions
   * `setfuncsToCompareSync` Return an object of the result 
   * ...

For more information on the library you can check the repo [HERE](https://github.com/AyubTouba/yubaperf)
Hackoctober recap
Tags: opensource, hacktoberfest, javascript, webdev
Published: 2021-11-01 10:31:17

## Why is Hackoctober ?

To be honest, right in the first place I did not think Hackoctober will be usefull for a rusty programmer like me. But turn out Hackoctober is a welcoming comunity of programmers who willing to put their time and effort to help the newbies to start contributing to the open source world. I think the name "Hackoctober" make a good sense to me where you might not be able to understand the whole project, you might not be able to understand every single line of code but somehow you can contribute to fixing bugs, adding features and start contributing right after you forked and cloned. It did really feel "hacking" ! 

## Upgrade my git workflow and working in big project

I would consider Telescope is a big project, so everytime I working on Telescope I have to do the following to make sure my project is up to date because there might be a merged into upstream master branch every 2 hours

```bash
git checkout master
git pull upstream master
git checkout <topic branch>
git rebase master
```
Also when changings the docs, I did made a lot of small change then using `git rebase -i HEAD~#` to squash the small commits together and I can say I'm quite confidence if someone ask me to rebase, squash or rebase cause I have a chance to practice it all during hackoctober

## Digging more gold 

Every project or issue help the contributors a lot in term of acquiring knowledge by doing. When taking the 3rd PR, I did think it just a snap of my finger to finish it but it did require some reading and I did learn more new stuff such as knowing what is a `semver` range, updating pakages, etc.... My conclusion will be that you will be able to learn as long as you want to even with the easiest issue !

 
I would have to say it has been quite an enjoyable ride for me in term of my first Hackoctober but sure will be many more to come !
Lazy debugging gone long
Tags: codenewbie, beginners, coding, decodingcoding
Published: 2021-11-01 10:26:55

---
title: Lazy debugging gone long
published: true
description: Codenewbies: Don't be lazy when it comes to debugging, especially if you knew better right from the onset
tags: codenewbies, beginners, coding, decodingcoding
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ey5xuas92xbgyuvd4j6.jpg
---


## *Codenewbies: Don't be lazy when it comes to debugging, especially if you knew better right from the onset*

---

That’s what I learned from my first 4-day hitting-head-against-wall experience of trying to debug code. 

### Debugged for 4 days because I was lazy
I wanted to do a POST request to my Rails API using a Vue app. Both are super basic setups, just for learning purposes on how to develop an API and to use it. And out of laziness and not doing prior research, I created a single text input field to POST to my API, thinking that if I type a proper JSON in the text input it would work. And of course, it didn’t. Actually before that, I somehow knew that I needed to have a proper form to structure the JSON so that it gets POSTed properly, but ***I was lazy***. And all because of a little bit of laziness, I spent days to debug what could have been solved in a few hours. 

So the key lesson I need to hammer into my head: **DON’T BE F\*\*KING LAZY**, especially if you knew better. 

### There are no shortcuts
There’s no shortcuts in coding. Yes, even using libraries and frameworks. All shortcuts come with trade-offs, and a price. You either pay it much later, or very soon. Thankfully I paid up in four days. Imagine if I had to hammer at this for weeks?! I would have given up coding altogether. But that also showed me just how much perseverance is needed when it comes to coding your own thing. More bugs like this will come for sure, and very likely even bigger ones taking more days or weeks. 

*Better to enjoy the challenge, than to want to wish it away at first encounter.*

It’s strange, I do kind of enjoy digging down deeper into the rabbit hole to solve a problem. And even stranger - there’s a stubborn kind of streak in me that ‘likes’ to keep at it till I win. Man vs machine kind of game. It’s not always a delightful game, but a satisfying one nonetheless when I solve it. 

If this was a relationship, it ain’t romance and fireworks in the honeymoon period. It’s fighting and loving, hitting and kissing, all at the same time. Not a typical relationship, but one full of life for sure!

---

Follow my daily writings on [Lifelog](https://golifelog.com/goals/30), where I write about learning to code, goals, productivity, indie hacking and tech for good.
NextJS API working on locals but not working on production
Tags: nextjs, javascript, react, programming
Published: 2021-11-01 10:25:05

Hey, I am writing this post to share the experience I had dealing with NextJS API not working on production (that is, returning a 404 Bad Request).

A 400 Bad Request simply means that the server cannot process a request due to client error and this errors could be wrong URL or issues in the service use in the request.

For this particular use-case, the problem was related to the environment variables.

The environment variables store in the .env.local file wasn't working after deploying to [Vercel](https://vercel.com) and the solution is to also setup your variables on Vercel.

Let me show you a walkthrough;

Adding the variables needed in your project in .env file, you can check [Environment Variable](https://nextjs.org/docs/basic-features/environment-variables) for more information of that. (NOTE: Make sure you add it to **.gitignore** so you don't expose it).

**SAMPLE ENV VARIABLE**

```
DB_USER=james
```
After deploying the app on Vercel, navigate to **Settings**

![Image Navigate to Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7veree7j0mn13gt9aloe.png)
 

Click on **Environment Variables**

![Image Navigate to environment variable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmqahfionpsjyuix591g.png)

From there, you can add your environment variable and your web app will work as expected.

I hope this is helpful to you.

❤️❤️❤️
My last contributions for Hackoctoberfest 
Tags: webdev, programming, opensource, javascript
Published: 2021-11-01 10:09:02

## PR 4 : Telescope

I got mentioned in [issue-2407](https://github.com/Seneca-CDOT/telescope/issues/2407) where it seem like our `stagging` server is broken after my PR got merged 

>The issue is that @typescript-eslint/eslint-plugin and @typescript-eslint/parser don't support eslint v8.1

So I got a change to practice to do `git revert <commit-id>` to revert my commit and return the packages version back to where it were before. 

```bash
git checkout master
git pull upstream master
git checkout -b issue-2407
git revert 3d7a3336d4bf89b6174b81c0999c29f411490ffc
```

Eventhough we did attempt to update other plugins to the latest version but once again the code broke and sadly I have to fully revert my commit and made [PR-2408](https://github.com/Seneca-CDOT/telescope/pull/2408#event-5544732573)

```bash
While resolving: @senecacdot/telescope@2.2.0
#9 13.23 npm ERR! Found: eslint@7.23.0
#9 13.23 npm ERR! node_modules/eslint
#9 13.23 npm ERR!   dev eslint@"7.23.0" from the root project
#9 13.23 npm ERR! 
#9 13.23 npm ERR! Could not resolve dependency:
#9 13.23 npm ERR! peer eslint@">=7.28.0" from eslint-plugin-prettier@4.0.0
#9 13.23 npm ERR! node_modules/eslint-plugin-prettier
#9 13.23 npm ERR!   dev eslint-plugin-prettier@"4.0.0" from the root project
```

##PR 5: Updating the [environment-setup.md](https://github.com/Seneca-CDOT/telescope/pull/2400) for Telescope

When I try to set up the Telescope project, I did have some good reading and usefull links so as to help other new contributors to join the project can set up the environment faster and I decide to create another PR just to add some more usefull information on how to set up WSL2 ready to go. Compare to other docs PR that I did, this time I has to put a lot of consider and fix my draft many times so it work for the project in general and for people who trying to set up the environment, but I was really happy after my PR got merged. Also during the time that I try to update the environment-setup.md, @Cindy Le also fixing and updating the same doc and it is my first time ever resolving a conflict and I have to redo it 3 times just to have it work like the way I wanted.

I thought I will make it to [PR-6](https://github.com/industrial-optimization-group/desdeo-frontend/issues/3#event-5538349288) for Hackoctober but unfortunately weekends work hold me down a bit.
Command Line Based Web Portfolio!
Tags: linux, css, angular, webdev
Published: 2021-11-01 10:06:39

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

👋Hi there fellow developers! 🎊
I hope you're doing fantastic!

In the past, I was powerfully impressed by a portfolio that was inspired by 🪟 Windows 11 made by VovaCodes (https://www.vovacodes.ca/).
So, this basically has always been my small dream to build a portfolio-app that visually mimics a Command Line Interface.

Recently, I had some free time and I finally decided to turn this plan into reality. So, I started working on Command Line 
inspired portfolio ✨.
You can try it out here: https://ashwathmittal.github.io/AshwathMittal/#/terminal

Source Code On GitHub: https://github.com/AshwathMittal/AshwathMittal/

This is an Angular app. It is written in TypeScript, so if you're learning it, you could explore the GitHub repo 💥


Cheers! 🤙

Join My Discord: https://discord.gg/uK3M55eZGq

Keep in mind, this is a work in progress! More features to come (and bugs tackled 😄)
Adding PhpMyAdmin to Laragon
Tags: php, laravel, webdev, windows
Published: 2021-11-01 09:56:16

PhpMyAdmin is still your favorite MySQL database admin tool, right? RIGHT? Say no more, let's add it to Laragon.

## Download The Latest PhpMyAdmin

Download it from [https://www.phpmyadmin.net/downloads](https://www.phpmyadmin.net/downloads), extract the archive to the `C:\laragon\etc\apps` (if you use the default laragon installation directory) and name the folder as `phpMyAdmin`

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

And restart the laragon's apache server to take effect and make sure the MySQL server is started.

## Access the PhpMyAdmin

Now when you click the `Database` button in laragon,

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

It will open the browser and direct you the phpmyadmin login page.

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

In case you forgot, The DEFAULT credential for login to mysql is using `root` as username and leave the password blank.

______________

Tell me if this article is so helpful and helped you fix your problem in the comment below.
search Index with AWS- S3 is failing
Tags: discuss, npm, javascript, node
Published: 2021-11-01 09:55:08

Hi, I tried to create index with (search-index npm module) with a different backend (AWS -S3 bucket) using the s3leveldown module as a DB store option. The Index is being created, but while querying using _SEARCH/ QUERY methods, the result set is inappropriate. Like for eg, when I initialise the DB with the S3 bucket and use the PUT method to add documents, where my text is "Final is the file name".. and "what is the version" . This is how its created ::

current Indexed one:: { key: 'description:file#0.60', value: [ '1635744247556-1-1' ] }.
Another one:: { key: 'description:version#0.50', value: [ '1635744285856-1-1' ] }

I am able to see the above in my store, when I do a createReadStream. But when my search keyword is "version", my expected result should be only the 2nd indexed document. But it gives me both 1st and 2nd.I tried using both _SEARCH/ QUERY methods, but both r giving same wrong/additional results.
I took reference from the below test folder examples:: https://github.com/fergiemcdowall/search-index/blob/master/test/src/memdown-test.js .
Can someone guide on the correct approach for implementing other backend store options like AWS-S3 ?
Start server and test scripts - NPM script - ready solution.
Tags: node, devops
Published: 2021-11-01 09:53:52

**Summary** I have made my alternative finding different pitfalls. Meanwhile We were applying the library [start-server-and-test](npmjs.com/package/start-server-and-test) to our solution. Surprisingly  [start-server-and-test](npmjs.com/package/start-server-and-test) covered all pitfalls. The solution solves the problem.

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

It is a simple script and we need to understand it. **It does how it is written.** It runs the server and then tests it. For details check the documentation page of [start-server-and-test](npmjs.com/package/start-server-and-test)

**Pitfalls:**
* All processes have to be ordered.
* Pipes have to be disposable to be finished.
* Tests need to know when the server starts to start testing.
* The script has to know when tests are finished to terminate all processes.

**It takes only three parameters:**
* The first: To run the server.
* The second: Server path. Address to wait for its availability.
* The third: Test commands.

**How it works**
The script runs the first to start the main development server and waits until it is up. The second parameter is the server path that the script checks if the development server is available. The development server continues running. The script runs tests that are set in the third parameter. The script waits for the finish of the tests. When tests are passed the script terminates the development server and disposes of the main thread.

**P.S.** It should help you to start using the script faster.
Unique Identifiers: UUID vs NanoID
Tags: javascript, uuid, nanoid, uuidv4
Published: 2021-11-01 09:46:03

I think every developer used unique identifiers at least once in their life. You can use those to generate a primary key in a database, a unique filename, etc. 

In this article, I'll compare the popular UUID with the rising start NanoID.

![UUID vs NanoID](https://img.bloggu.io/ipfs/bafybeiduuvsexkicp34lfewu6vh6blawdhdh2pa2jpqm4faxpej2s2nmyq)

# [UUID](https://www.npmjs.com/package/uuid)
This is one of the most popular libraries to generate unique identifiers right now.

- It's small in size (483 bytes)
- 11.6k starts on Github and over 59 million weekly downloads on NPM
- It has zero dependencies
- Supports for CommonJS, ECMAScript Modules and CDN builds
- Supports for all major browsers (including IE 11 😅)
- It's secure and well documented

## Quickstart

### Install
`npm install uuid`

### Generate UUID
**ES6 syntax**
```
import { v4 as uuidv4 } from 'uuid';
uuidv4(); 
```
**CommonJS syntax**
```
const { v4: uuidv4 } = require('uuid');
uuidv4(); 
```

# [NanoID](https://www.npmjs.com/package/nanoid)
NanoID is a tiny, secure, URL-friendly, unique string ID generator for JavaScript.

It's not as popular as UUID but it has grown very fast in the last period and looks very promising. It has 14.5k starts on Github right now (more than UUID).

- Very small in size (130 bytes - minified and gzipped)
- No dependencies
- 2 times faster than UUID
- Safe (it uses a hardware random generator)
- Shorter IDs (21 symbols) than UUID (because it uses a larger alphabet)
- Available in 19 programming languages
- Supports modern browsers, Node.js and React Native

## Quickstart
### Install
`npm i nanoid`

### Generate NanoID
```
import { nanoid } from 'nanoid'
cosnt id = nanoid() 
```

# Conclusion
I've recently started using NanoID in my projects and it's working very well. I like the fact that the strings are shorter.

If you want to reach me, check out [my twitter](https://twitter.com/StatescuRazvan).

---

*Article posted using [bloggu.io](https://bloggu.io). Try it for free.*
20 Amazing Developers You Should Follow To Improve
Tags: programming, 100daysofcode
Published: 2021-11-01 09:29:00

Website developers that will teach you everything you need to know for HTML, CSS and JS. These creators do videos on frontend, backend, databases, cloud servers and much more. If you want to learn anything from React, Angular, Vue or even NodeJS, Mongo, AWS and much more, there are great people to follow here.

1. Ben Awad
https://www.youtube.com/channel/UC-8Q...

2. The Coder Coder
https://www.youtube.com/thecodercoder

3. Brad Traversy
https://www.youtube.com/user/TechGuyWeb

4. Dev Ed
https://www.youtube.com/channel/UClb9...

5. Florin Pop
https://www.youtube.com/c/florinpop

6. Fireship IO
https://www.youtube.com/channel/UCsBj...

7. Danny Thompson
https://www.youtube.com/DThompsonDev

8. The Net Ninja
https://www.youtube.com/c/thenetninja

9. Niall Maher
https://www.youtube.com/channel/UCvI5...

10. William Candillon
https://www.youtube.com/channel/UC806...

11. developerHabits 
https://www.youtube.com/channel/UCJLZ...

12. Tim
https://youtube.com/techwithtim

13. Gary Simon
https://www.youtube.com/user/DesignCo...

14. James Q Quick
https://www.youtube.com/channel/UC-T8...

15. Weibenfalk
https://www.youtube.com/user/Weibenfalk

16. Kevin Powell
https://www.youtube.com/user/KepowOb

17. Dennis Ivy
https://www.youtube.com/c/DennisIvy

18. codeSTACKr
https://www.youtube.com/codeSTACKr

19. Chris Sean
https://www.youtube.com/c/ChrisSean

20. Erik
https://www.youtube.com/c/programwith...
What is Biometric Authentication?
Tags: webauthn, biometric, passkey
Published: 2022-11-01 06:40:05

---
title: What is Biometric Authentication?
published: true
date: 2021-11-01 09:11:23 UTC
tags: webauthn, biometric, passkey
canonical_url: https://mojoauth.com/blog/what-is-biometric-authentication/
---

Biometric authentication refers to security processes that authenticate a user’s identity through unique biological characteristics such as retinas, voices, facial, and fingerprints. Biometric authentication systems store this biometric data to verify a user’s identity when authenticating their account. The word biometric is a combination of bio (human) and metric (measurement). In simpler terms, biometrics are metrics related to human features that make an individual different from others. Biometric data is unique to individual users, and biometric authentication is generally more secure than other authentication.

[Read On](https://mojoauth.com/blog/what-is-biometric-authentication/)