teleren/devto huggingface dataset:
GlitchyNFT - Appwrite Hackathon
Tags: appwritehack, vue, typescript, webdev
Published: 2022-05-10 10:06:11

### Overview of My Submission

GlitchyNFT is a creator which allowed you to create your own 'NFT' from prepared assets. Why creator for 'NFT'? We all love them (right?)!

### Techstack

- [Vue](https://github.com/vuejs/vue)
- [Pinia](https://github.com/vuejs/pinia)
- [Typescript](https://github.com/microsoft/TypeScript/)
- [Appwrite](https://github.com/appwrite/appwrite)

### Assets resource

- [Craftpix](https://craftpix.net/freebies/)


### Submission Category: 

#### Web2 Wizards


### Link to Code

{% embed https://github.com/RufusMotus/glitchynft %}


## Screenshots
![Explorer view](https://github.com/RufusMotus/glitchynft/blob/master/doc/explorer.png?raw=true)
![Creator view](https://github.com/RufusMotus/glitchynft/blob/master/doc/creator.png?raw=true)

### Problems during development
- Appwrite has problem with serving SVG files (CORB error in Chrome) that's why everything is base64
- function for creating an attribute in the collection (server side) resolves before the attribute is created which isn't convenient, I would rather wait a little longer than have to check recursively if the attribute is available (which doesn't work too well)

### Conclusions

I had a lot of fun participating in this hackathon! 😄 Appwrite is a really great tool that I followed for some time now but haven't had the occasion to try out till now. Also, this was my first hackathon ever and this is my first post ever on Dev.to so Hello everyone! 🥳
Computer's electronics is your body with emotions - give some hormone (code) & see what happens !
Tags: computerscience
Published: 2022-05-10 09:48:12

I've started learning electronic (e.) gates recently (should say electronics in generally ) . I am actually certified physiotherapist in Lithuania who transitioning to official programmer day by day ...

> **Let me tell you a secret** – give a code as a hormone & behaviour will change ! 

> **NOTE** : Engineers design electronics of upon limits programming code will work within, but not vice versa, meaning that programming code CAN change behaviour (physiology) but not your computers anatomy (hardware parts won't change their places as people can change their seats in the train for a nice view through window) 

In the nutshell it's just transistors (switchers) along with electronic gates & bunch of disciplines of science (boolean algebra, linear algebra, etc, physics, _metaphysics which is also important_) –> that's your computer . Start with e. gates & ohm's law , and of course, don't forget "law of least resistance" as reflection of any living creature (computer) behaviour in this world !
⚠️ Eng keng tarqalgan dasturlash xatosi!
Published: 2022-05-10 09:40:34

---
title: ⚠️ Eng keng tarqalgan dasturlash xatosi!
published: true
description: Agar siz bu xatodan qochmasangiz - loyihangizni saqlab qolish qiyin bo'lishi mumkin!
---

DRY Principle — yani **Don't Repeat Yourself**, O'zingizni takrorlamang.

Agar 10 sahifada siz bir xil tugmani yaratgan bo'lsangiz...Misol:

index.html
```html
<button style="padding: 10px; border-radius: 8px; color: white; background: black;">
  Ma'lumot olish
</button>
```

contacts.html
```html
<button style="padding: 10px; border-radius: 8px; color: white; background: black;">
  Aloqaga chiqish
</button>
```

socials.html
```html
<button style="padding: 10px; border-radius: 8px; color: white; background: black;">
  Obuna bo'lish
</button>
```

Va hokazo.

Har bir sahifadagi tugmani o'zgartirish kerak bo'lganda nima bo'lishini tasavvur qiling...

Agar sizda 10, 50, 100 sahifa bo'lsa-chi?

Har bir sahifada "padding" ni o'zgartirishingiz kerak bo'ladi. Bu sizga bir necha soat vaqt oladi!

Shuning uchun kodni ikki yoki undan ortiq takrorlash aqlli emas.

Buning yechimi nima? "class" dan foydalaning.

styles.css
```css
.btn {
  padding: 10px;
  border-radius: 8px;
  color: white;
  background: black;
}
```

index.html
```html
<button class="btn">
  Ma'lumot olish
</button>
```

contacts.html
```html
<button class="btn">
  Aloqaga chiqish
</button>
```

socials.html
```html
<button class="btn">
  Obuna bo'lish
</button>
```

Endi barcha tugmalarning ranglarini o'zgartirish kerak bo'lsa nima bo'ladi? Siz shunchaki atiga styles.css faylini o'zgartirishingiz kerak.
Comand: if - else vs else if
Published: 2022-05-10 09:39:13

*Odatda if else komandasi ternary komandasini o'rnida bemalol kela oladi. Farqi ternaryda branchlar 2ta bo'lsagina, masalani ishlasa bo'ladi, if komandasi 2 va undan ortiq execution partlar mavjud bo'lgan masalalarni bemalol ishlay oladi.*

## *if* komandasida beriladigan ifoda tog'ri bo'lsagina uni chop etadi.
```cpp
   if( expression )
{
statement1
}
```
**if statementda yo'l qo'yiladigan kichik xatolar**

- if (expression) shu ifodadan so'ng **;** mana bu belgini qo'yish xato hisoblanib, ifoda shu qatorda tugadi degan komadani berib yuboradi.
- if ning (expression) qismida **=** bu belgini bitta qo'yish xato, chunki teng bir o'zi kelganda o'zgaruvchi uchun yangi qiymat o'zlashishida ishlatiladi, ya'ni **==** shu belgini qo'yish to'g'ri bo'ladi.
  - yana bir kichik qoida bor, agarda if, elseda statement, ya'ni buyruq bitta bo'lsa, {} bularni qo'yish shart emas.

## **if-else**

If else bn ko'p hollarda qo'llanadigan qo'shimcha komanda bu else hisoblanib, if dagi ifoda xato bo'lganda ikkinchi statement chiqar degan buyruq berishda ishlatiladi.

```cpp
if(expression) 
{
statement1
}
else 
{
statement2
}
``` 
## **if else vs else if**

*Bu ikki komanda aslida bir xil bo'lib, else komandasini ichida bemalol xohlagancha, if else komandasini o'zida foydalansa bo'ladi. Shuni hisobiga aslida if else komandasi else if deb ko'rinadi, ya'ni:*

```cpp
#include <iostream>

 using namespace std;

 int main()
{

int baho;

cin >> baho;

if(baho >= 90)

{

cout << "A" << endl;

}


else


{

if (baho >= 80)

{

cout <<< "B" <<<< endl;

}


else


{

if (baho > 70)

{

cout << "C" << endl;

}

else

{

if (baho > 60)

{

cout << "D" <<<<endl;

}

else


{


cout << "F" << endl;

}

}

}

}

return 0;

42}
```
```cpp
1 #include <iostream>

3 using namespace std;


5 int main()
{


int baho;


cin >> baho;

10

if (baho >= 90)

cout << "A" << endl;

else if(baho >= 80)

cout << "B" << endl; 

else if(baho >= 70)

cout << "C" << endl;

else if(baho >= 60)

cout << "D" << endl;

else

cout << "F" << endl;


return 0;
}
```
Selection statements | Difference between if else and if.
Published: 2022-05-10 09:28:39

Selection statements
if statement   if~else
statement
*************************************************************
.2 yoki undan kop execution path larni tanlaydi

if ( a > = 0 )
cout << "positive"
if ( a < 0 )
cout << "negative"


*************************************************************
IF STATEMENT
. if expression is true exekute statement
syntax

*************************************************************
IF-ELSE STATEMENT
if expession is true execute statement 1.if false execute statement 2
SELECTION STATEMENTS
Published: 2022-05-10 09:28:22

##C++ supports the usual logical conditions from mathematics:

### Less than: ```a < b```
### Less than or equal to :``` a <= b```
### Greater than : ```a > b```
### Greater than or equal to :``` a == b```


##C++ has the following conditional statements:

-Use **if** to specify a block of code to be executed , if a specified condition is true 
-Use **else** to specify a block of code to be executed , if the same condition is false
-Use **if else** to specify a new condition to test , if the first condition is false.
```
NOTE THAT' "if" is in lowercase letters . Uppercase letters (If or  IF) will generate an error'
```
```
NOTE : 'The code inside { } is the body of the /if/ statement
```
```
NOTE : `There can be more than one - else if statement but only one *if* and *else* statements.
apt update vs apt upgrade: What's the difference?
Tags: linux, cloud, beginners, tutorial
Published: 2022-05-10 09:17:56

**Package Managers are fantastic!**
Let me tell you what made me say that.

### Features of Package Managers:
* Downloads, installs and updates existing software from a repository.
* Ensures the integrity and authenticity of the package.
* Manages and resolves required dependencies.
* Knows where to put all the files in the Linux file system.

Just imagine performing tasks like **checksum verification**, **installing dependencies**, **storing components like docs, binaries and config files in different folders** manually. 

Although for some package managers like **"dpkg"**, you still need to install dependencies manually. But I don't know why would one use package managers like dpkg if we have more advanced package managers which use these low level package managers under the hood and simplifies the task. 

**"apt"** is one such high level package manager.

If you ever googled `how to install <package_name> in Ubuntu machine`, you'd have probably came across these commands:

```
sudo apt update
sudo apt upgrade
sudo apt install <package_name>
```
You might be thinking that we only wanted to install a certain package so why are people suggesting us to execute those 2 additional commands?

Let's understand that.
<br></br>
## What does apt update do?

**"apt update"** updates the _package sources list_ with the latest versions of the packages in the repositories.

> **Package sources list** contains the locations or **URLs** of some of the repositories from which a package is installed.

You can view this list using the command :

```
cat /etc/apt/sources.list
```
It would give output:

![Sources List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nq70ln8roc00mbu7n5c3.png)

One such location in these repositories is `/ubuntu/dists/bionic-updates/main/source` (You can check that [here](http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/source/)) where **Sources.gz** file contains all the information about the packages including:

* Dependencies of the package
* Latest versions of the package
* Checksums of the packages to verify integrity
* And much more as shown in the figure below.

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

So, whenever we type in **apt update** it browses these lists from the repositories and copies the latest version of them to the local system. It actually **doesn't install any package** on the system.

## What does apt upgrade do then?

**"apt upgrade"** compares the version of all the packages currently installed on the system with the ones in the list we fetched through `apt update` and upgrades all of them to their latest versions.


Generally, when upgrading all the packages in the system, we merge both   `apt update` and `apt upgrade` commands in a single line:

```
sudo apt update && sudo apt upgrade
```

All these things happen in the backend within a few seconds.
kubernetes config generation scripts
Tags: kubernetes, k8s, binarydeployment
Published: 2022-05-10 09:12:41

A simple script to generation of certificates, kubernetes config files, systemd files, etc. required for binary deployment of kubernetes clusters

- 
The generated certificate and configuration file can directly start the kubernetes cluster

- Does not depend on any tool

- Please modify the domain or address required by your cluster in openssl.conf

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1j8ggk73c6kbfdletoa.png)
 
[quick start](https://github.com/CylonChau/kubernetes-certificates-generator)
Selection statements | Difference between if else and else if
Tags: beginners, firstyearincode, wecoded, cpp
Published: 2022-05-10 08:38:16

## **Selection statements**

##`if statement` `if~else statement`
- ikki yoki undan ko'p **execution path**larni tanlaydi

```
if (a>=0)
cout << "positive";
if (a<0)
cout << "negative";
```

## **If statement**
- if expression is true, execute statement1
  - Syntax

```
if(expression)
{(body) 
statement1
} 
```

- Example

```
if (a>=0)
cout << "positive";
```

- **don't use `semi-colon (;)` after if(expression)**
  - Agar semi-colon ishlatilsa, if statement mustaqil bo'lib qoladi.
- Agar **if statement**da faqat bitta statement bo'lsa `{}` qo'yilmaydi.

```
	int a,b,c;
 
  cin >> a >> b >> c;
  
  int max = a > b ? a : b;
  
  	if (max > c)
      cout << max << endl;
```

- Agar **if statement** `condition` bajarilmasa output da hech narsa chiqmaydi.
- If statement faqat o'zidan keyingi birinchi turgan `cout` ga ta'sir qiladi.

- **Use == (Realtion operator), don't use = (Assignment)**

```
	if (team == '10')
	cout << "Lions" << endl;
not
	if (team = '10')
        // result team is 10
```

## **If-else statement**
- If expression is true, execute statement1. If false, execute statement2
- Syntax

```
if(expression)
{(body) 
statement1
} 
else
{(body) 
statement2
}  
```

- Example

```
	if (son%2 == 0)
	cout << "even" << endl;
	else 
	cout << "odd" << endl;
```

- **if statement contains another if statement (including if-else statement)**

```
if (a>=0)
   if (x%2 ==0)
   cout << "positive even number" << endl;
   else 
   cout << "positive odd number" << endl;
```

## **else-if statement**
- Example

```
	if (a>='A' && a<='Z')
	cout << "Upper-case" << endl;
		else if (a>='a' && a<= 'z')
		cout << "Lower-case" << endl;
			else if (a>='0' && a<='9')
			cout << "Number" << endl;
				else 
				cout << "Others" << endl;
```
Use Side Effect with RTK Query Redux Tookit
Published: 2022-05-10 08:19:55

How to detect side effect in RTK Query Redux Toolkit?
We can use React Hook sideEffect and put RTQ query into sideEffect for retrieve any changes.


Example call function from RTK Query:
```
const {data,isSuccess,isLoading,isError} = useGetUserQuery()
```

and we can detect isSuccess,data,isloading with useEffect Hook

```
useEffect(()=>{

if(isSuccess==true){
// detect isSuccess
}

if(isLoading==true){
// detect isLoading
}

if(isError==true){
// detect isError
}

},[isSuccess,data,isLoading,isError])
```
Why we won't need to move to RUST?
Tags: rust, opensource, blst
Published: 2022-05-10 08:14:49


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hhx6h8nf531bjcria0v0.jpg)
Just because we are using RUST ❤️.


Contribute and Give us a star at [https://github.com/blst-security/cherrybomb](https://github.com/blst-security/cherrybomb).
Tell me a stupid app idea and I'll make it
Tags: react, javascript, webdev, discuss
Published: 2022-05-10 08:09:38

I'd love to hear some funny app ideas!
I've had some extra free time lately and want to build something weird and funny

Comment your ideas below or on this [Youtube community post]( https://www.youtube.com/channel/UCRzS48bskynAxoI38BFypfQ/community?lb=Ugkx1ujaEJERmzBGsV5O_iydsG7HqUNvrO80)
Thanks!


## Edit 3: I made your genius app ideas 👇
{% youtube gheeg-5sxDQ %}


## Edit 2: I made another one of your ideas 👇
{% youtube SGFNhz91yNQ %}


## Edit 1: I made your app ideas 👇
{% youtube ndmzLQPbg7s %}
The Reasons You Will End Up Popular If You Opt For Followers From Fstagram?
Published: 2022-05-10 08:02:37

[mallwart.store](https://mallwart.store) prensented

There are numerous benefits that account owners on Instagram will get when they get loves and readers with regard to their profiles with this well-liked social networking community.

It is rather difficult to begin a fresh page on Instagram without any or few follower. Sustaining a following in case you have just no audience may be an extremely huge job. Because of this you happen to be commencing from your bottom part on Instagram or IG platform. There may be nothing awful in you beginning now and immediately achieving large number of natural readers for this program. You can do this objective with a take care of people at fstagram who definitely have what is needed to deliver proposal providers much quicker than may be got elsewhere.

You may always obtain the best using this organization. You will be able to boost your affect on any social websites by partnering using this type of company likes [fstagram.co](https://fstagram.co) .




If you must know, Instagram can be like many other social media networking sites whose algorithm criteria will simply choose accounts which may have more visitors and supporters. So, if you buy opinions or loves from your trustworthy site, these will be seen with regards to your IG profile

1.Your posts will by positioned topmost by Instagram algorithm.

2.Traffics coming to your IG webpage and account will substantially improve.

3.It will be simpler to send out and post on Instagram plus your meaning is certain to get to targeted target audience.




Understand that in the event you provide to buy IG followers from your reliable and reliable web site, you will get distinct fans or likes from your place or region you want. You can also pay money for whatever product you order for with utilization of either in the subsequent.

VISA.

Amex Charge Card.

MasterCard.

PayPal etc.

Finally, if you opt for followers on Instagram from your reputable source, you are getting natural visitors on the most famous social websites world wide. This results in you getting preferred globally.

kindly visit the site at [fstagram.com](https://fstagram.com) to get the knowledge about buy likes,followers,reels,subscribers and more





Sponsored by [mallwart.co](https://mallwart.co)
Reasons For Building The Uber Clone App
Published: 2022-05-10 06:20:45


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48puh3zwwhm9zcy9e6g7.png)
In earlier times people used to take public transportation when there was no existence of on-demand apps. It was a very tiring as well as time taking process. From the time apps like uber, and radio taxi came into the market, these on-demand apps came with a revolution in the ride-hailing industry.

Now people can call taxis at their doorstep by doing some taps on their mobile phones. All they need is a good internet connection and a smartphone. Many entrepreneurs and startups get motivated by seeing the success of these on-demand apps. Though from there the term Uber Clone came into the scenario.

Entrepreneurs and startups have already the business idea in their minds. All they need to do is to implement it in their taxi booking app. They knew that building the app from the scratch will take a lot of money and resources. It's a time taking process.

Mobile app development companies came up with the idea to build a ready-made Uber clone app that will fulfill all the requirements of the business owners and startups. With the introduction of the uber clone script, things have become too easy for those who want to start their own taxi booking business in a short period of time.

## **What exactly the Uber Clone App IS?**

Uber clone app is a ready-made online mobile app solution for launching the online taxi booking business. It is just a replica of a Uber app that comes with more advanced features and options.

The main advantage of the uber clone app is that it is very cost-effective. It is a 100% custom mobile app solution. You can customize and modify this app according to the need of the business. Just give your list of demands that you want in your uber clone app to the best uber clone app development company. After that, the company will give you a free demo of their ready-made app. 

With the [uber clone](https://www.apporio.com/product/apporio-taxi-uber-clone-script/) you can go live in just 7-8 days, So hurry up! And get your customized app now.
Not able to install therubyracer gem
Tags: ruby, rails
Published: 2022-05-10 07:41:21

Hey all I am trying to install this gem therubyracer on windows but its not installing its shows an error of libv8 couldn't be installed. The ruby version is 2.7.6 and rails version is 7.0.2.4
And I tried to follow this link to: https://github.com/eakmotion/therubyracer_for_windows .
If anyone has any solution would be much appreciated.
Thanks
difference of pointer and reference in storage
Tags: pointer, reference, memory, storage
Published: 2022-05-10 07:41:14

A pointer registers the address in memory of a variable. Therefore, the pointer value is the address.

A reference is a variable that contains the address of the targeted variable. More than 1 reference can be applied to a targeted variable; they can be pointed to the same address of the targeted variable.

In my opinion, their difference is more on the perspective of practice. For the targeted variable, if you want to manipulate it, it just offers you ONE pointer; whereas, the reference, there can be many, whilst saving redundant memory consumption.
RVM did not work in the shell script, so I had to fix it
Tags: rvm, ruby, jekyll
Published: 2022-05-10 07:40:23

---
title: RVM did not work in the shell script, so I had to fix it
published: true
description: Some commands just cannot work in shell scripts.
tags: rvm, ruby, jekyll
//cover_image: https://direct_url_to_image.jpg
---

## What happened

So I was building my portfolio site the other day and I decided to use [Jekyll](https://github.com/jekyll/jekyll).

The server I'm renting can run Ruby via RVM, so with the power of symbolic links, I can pull the source on the server, build the static site there (which can be done in a breeze,) and safely serve it to the Internet.

But I ran into a problem - the script simple as _this_ did not work:

```sh
#/usr/bin/env bash

set -eu

rvm use 2.7.2
```

```
RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
```

Interesting, so RVM I use at the terminal prompt is _not_ `/usr/local/rvm/bin/rvm` but a *shell function* that gets injected as a part of the profile.  

```
# Run type command directly from the shell prompt
$ type rvm
rvm is a function
(function gets printed out)

# shell script that contains `type rvm`
$ ./test.sh
rvm is /usr/local/rvm/bin/rvm
```

(NGL, I was fairly confused when they said "RVM is not a function..." Like, is RVM complaining that I tried to use RVM as a function when it cannot possibly be a function? Nope! What it means is that **there is a shell function version of RVM and `rvm` must be a function** to select Ruby interpreters.)

## You need to source the profile yourselves

It turns out [you must `source` the file provided by RVM](https://stackoverflow.com/questions/19954043/how-to-use-rvm-in-shell-scripting). There can be two places that RVM may exist:

```
source "$HOME/.rvm/scripts/rvm" # $HOME installation
source "/usr/local/rvm/scripts/rvm" # System installation
```

## But that did not quite do the trick

Apparently, RVM relies on *unbound variables,* so running the script with `set -eu` crashes it:

```sh
#!/usr/bin/env bash

set -eu

source "/usr/local/rvm/scripts/rvm"

rvm use 2.7.2
```

```
/usr/local/rvm/scripts/functions/support: Line 182: _system_name: Unbound variable
```

So we need to temporarily allow such variables while we run all the RVM commands.

## Example working script

```sh
#!/usr/bin/env bash

set +u # WTF: Avoid RVM crashing due to unbound variables

source "/usr/local/rvm/scripts/rvm"
rvm use 2.7.2

set -eu # Restore strict error checking

bundle install
JEKYLL_ENV=production bundle exec jekyll build
```

## Random thought

I remember having similar issue trying to use `pyenv` in a Jenkins-triggered shell script... It could've been an issue of the similar nature.