teleren/devto huggingface dataset:
How Can Custom Magnetic Signage Make Your Business Stand Out from the Crowd?
Tags: custom, howto, stand
Published: 2023-08-04 17:15:16

Custom magnetic signage can make your business stand out from the crowd in several ways:

1. Unique branding: By designing custom magnetic signage, you have the opportunity to showcase your unique brand identity. This allows you to create a visually appealing and memorable representation of your business that sets you apart from competitors.

2. Increased visibility: Magnetic signs can be easily placed on various metal surfaces such as vehicles, storefronts, or even temporary event setups. This flexibility enables you to reach a wider audience and maximize your visibility. Wherever you go, your custom signage will attract attention and create awareness for your business.

3. Professionalism: Having customized magnetic signage shows that you care about your business's image and professionalism. It conveys a sense of trust and reliability to potential customers, which can significantly impact their decision-making process.

4. Cost-effective advertising: Magnetic signage is a cost-effective advertising solution compared to more traditional methods like billboards or print ads. It allows you to promote your business to a broad audience without breaking the bank. Additionally, since magnets are reusable, you can easily update your signs or move them to different locations as needed, saving you money in the long run.

5. Versatility: Custom magnetic signage offers great versatility in terms of customization options. You can choose different sizes, shapes, colors, and fonts to create a design that perfectly aligns with your brand. Whether you want to display your logo, tagline, contact information, or unique selling points, magnetic signage allows you to do so effectively.

Incorporating [custom magnetic signage](https://rochestermagnet.com/industries-applications/signs-and-displays/) into your business's marketing strategy is an excellent way to enhance your visibility, professionalism, and brand identity. It offers a cost-effective and versatile solution that helps your business shine in a crowded marketplace.
TIL about the === operator in Ruby
Tags: ruby, webdev, beginners
Published: 2023-08-04 17:05:17

Hey everyone! 👋 

The other day I talked about conditionals, and finished off by addressing the `case` method, which I mentioned uses the `===` operator.

Today, I want to talk about that "triple equals" operator. It confused me a little bit at first, so I had to really read up on it, and now I'll try my best to explain it in a simple way.  It is not used often in programming (in fact, some would suggest you not use it yourself), but it is used "under the hood" by different methods in Ruby, and understanding how it works can help you understand how those methods work.

So, we often use the regular `==` operator to compare if two things are equal. For instance, `2 == 2` would be `true`.  Well, the `===` method is kind of like that, but it's a bit more flexible. It's not just for comparing whether two objects are identical – it's used in a special way by different classes to check if something "matches" or "fits" into a certain category.

Let's take an example. Imagine we're working with ranges. Ranges are sets of values between a start and an end. Ranges will use the `===` operator to check if the value on the right appears within the range. For instance, if we have a range like `1..5`, and we want to check if the number `3` is inside that range, we can do `1..5 === 3`. If the number is within the range, it will return `true`. If not, it will be `false`.  So, if a range is on the left, it will check to see if the value on the right is within that range.  Or, in other words, `if 1..5 === 3` is roughly equivalent to `if (1..5).member(3)?`

But here's the thing – different classes use the `===` method differently. For arrays, it checks whether the array contains a certain element. For regular expressions, it's like asking if a string matches the pattern. It's changes its behavior based on the context!  You can even use it to check against the class of an object, without directly calling for the class, for instance `if Integer === 3` would be equivalent to `if 3.class == Integer`

It is important to keep in mind though that the behavior is based on the element to the left!  `1..5 === 3` is NOT the same as `3 === `1..5`

To sum it up, the `===` method in Ruby is a special operator used by different classes to do specific kinds of comparisons. It's not just about simple equality like `2 == 2`, but rather about checking if something belongs to a particular category or matches a certain pattern.
Push Protocol: Why I Sold All of My $PUSH Tokens and You Should Sell Too
Tags: cryptocurrency, web3, blockchain, ethereum
Published: 2023-08-04 17:02:41

I've sold all of my $PUSH tokens, and after reading this, I hope you will too. This isn't a decision made in haste but rather the culmination of months of frustration, disappointment, and betrayal. Allow me to explain why I've lost faith in what was once known as Ethereum Push Notification Service (EPNS), now rebranded to Push Protocol.

I started as a believer, drawn by the innovative promise of a notification service for Ethereum. A token designed for governance, they said, with possibilities abound. However, that belief was shattered as the team behind $PUSH showed their true colors.

When they realized their token would inevitably crash due to lack of utility, they panicked. They rebranded to Push Protocol, claiming to be the communication layer for Web3. To me, this was nothing but a transparent attempt to extend their life and squeeze more money from unsuspecting venture capitalists.

Take their so-called "decentralized" chat protocol, for instance. They've never open-sourced their code, and upon digging into their tech, it's clear they're not decentralized at all. It's a gimmick, a blatant deception to lure more funds.

With established players like XMTP and Status in the messaging industry, Push Protocol quickly realized they had no place in the market. So, they pivoted, launching Twitter-like spaces for Web3, again with the false claim of being "decentralized."

Their application is a technical disaster. Logging in requires signing messages 4-5 times, only to access an app riddled with flaws and practical uselessness. I liken it to a tasteless stew, filled with spoilt ingredients that neither nourish nor satisfy.

And who's behind this failing enterprise? A team of inexperienced college students, guided by founders living the high life in Dubai, funded by the scamming of people and venture capitalists.

I've seen enough, and I've sold all of my $PUSH tokens. I write this as a caution to others who may still be holding onto the hope that Push Protocol may yet deliver on its promises. Don't be deceived by the allure of grand visions without substance.

I urge you, fellow investors, to take a hard look at the facts. Sell your $PUSH tokens before the mirage fades entirely, leaving you stranded in a desert of deception.

Invest wisely. Let the story of Push Protocol be a lesson to us all, a grim reminder that not all that glitters is gold.

Disclaimer: The views and opinions expressed in this article are those of the author and do not necessarily reflect the official policy or position of any agency, organization, employer, or company. The information presented here is intended to articulate the personal experiences and perspectives of the author and should not be construed as an attempt to defame, malign, or cause damage to any individual, organization, or entity. Readers are encouraged to conduct their own research and reach their own conclusions.
Livros em Português para aprender Ruby
Tags: ruby, beginners, programming, webdev
Published: 2023-08-04 17:01:49

No estudo da linguagem Ruby, muito há a questão da falta de materiais em português brasileiro, tais como livros digitais ou físicos, cursos e documentações.

Dessa forma, busco agregar aqui, dois livros que conheço e recomendo:

## Use a cabeça! Ruby

Considero um livro fora da curva, como todos desta série "Use a Cabeça". Esta série utiliza técnicas da neurociência, que posso afirma que de fato aumenta o aprendizado.

O livro mostra mais lentamente o assunto, permitindo que este seja aos poucos sendo fixado na mente. É um livro de introdução, de forma que se não conhece a linguagem e nem sabe muito bem de Orientação a objetos, é um bom livro para você sair do zero em alguns meses.

Adquiri no ano passado, de forma que foi minha entrada a entender de fato Orientação a Objetos, pela forma inusitada e fácil que o livro ensina.

Aborda a versão 2.0 do Ruby, estando já um pouco antigo.
Todavia, como foca no básico da linguagem, é perfeitamente em grande parte utilizável o conhecimento para as versões atuais (3.2).

O livro não possui versão nova a venda, mas pode encontra-lo não muito difícil a versão usada, em sebos virtuais como a estante virtual ou no mercado livre.

## Conhecendo Ruby (versão 2)

Já este, está super atualizado, sendo escrito por Eustáquio Rangel, um profissional bem conhecido na comunidade Brasil da linguagem Ruby, onde o mesmo já havia lançado um livro no passado de mesmo nome. Todavia agora, realizou uma total reformulação, com um livro na versão atual da linguagem (3.2).

O livro aborda todo o escopo da linguagem, desde tipagem e estruturas básicas, paradigmas como orientação a objetos, como usar e fazer módulos (mixins), threads, RubyGems, integrar Ruby e Java com JRuby, construir extensões em C para Ruby, dentre outros.

Pode ser obtido gratuitamente (ou pago para quem possa contribuir), em:
https://leanpub.com/conhecendo-ruby

Assim, busco contribuir para seus estudos, a conhecer esta maravilhosa linguagem, que é o Ruby !
What is view component?
Tags: learning, design, dotnet, opensource
Published: 2023-08-04 17:00:32

This article is about the view component in [Elanat](https://elanat.net); This is different from the views module in [Drupal](https://www.drupal.org). The fetch component in [Elanat](https://github.com/elanatframework/Elanat) is similar to the views module in Drupal, and in a detailed article, both of them have been compared.
Link to the article comparing the fetch component in Elanat and the views module in Drupal:
[https://dev.to/elanatframework/fetch-component-vs-view-module-13k8](https://dev.to/elanatframework/fetch-component-vs-view-module-13k8)

The view component is a powerful tool for you to display any part of your website as you like. This component exists in the Elanat core and is located in the appearance system section by default. Each view is activated based on the path parameters and query string you want.

You can create a view using the following match types:

- Full match
- None query
- All query
- Exist
- Start by
- End by
- Regex

Then you can do the following:

- Block the location you want from being created and displayed
- Connect with styles that support views and customize text colors and background colors of styles
- Choose a style and template for the view
- Add whatever you want in the head section of HTML pages

For example, you can add a image to the background for some categories, and in another example, remove the left and right locations from the main page.

This component is compatible with styles, and if you use a style that supports common and natural colors, you can change the default colors of styles on the same style.
Common and natural colors include the following:

- view common light text color
- view common middle text color
- view common dark text color
- view natural light text color
- view natural middle text color
- view natural dark text color
- view common light background color
- view common middle background color
- view common dark background color
- view natural light background color
- view natural middle background color
- view natural dark background color

By using the view component in Elanat, you can give the desired display style to different parts of the website and color different parts with different styles.

We really liked to compare the view component in Elanat with similar plugins of other systems; but the lack of time made our research go nowhere and we did not find a similar case; you can send similar items to us as a comment in the section below.
It's Follow Friday! Celebrate the Stars of dev.to! ✨💫
Tags: discuss, followfriday
Published: 2023-08-04 16:59:11

Friday is when we celebrate the brilliance that shines within our DEV community! Following your fellow developers is like adding extra stardust to your feed. ✨ 

So let's get to it!

🌠 Showcase Your Brilliance: Let the world know why they should follow you! Highlight your projects, expertise, and unique perspective. It's your time to shine!

🌠 Recommend Top-notch Developers: Spread the love and recognize the exceptional talents that inspire you. Lift them up and let others discover their brilliance too!

Follow-backs are cool, but no pressure! This is about building a community that thrives on mutual support and encouragement.
JavaScript Substring: The Hidden Gem to Supercharge Your Web Development Skills
Tags: javascript, webdev, developers
Published: 2023-08-22 05:48:47

---
title: JavaScript Substring: The Hidden Gem to Supercharge Your Web Development Skills
published: true
date: 2023-08-04 16:55:13 UTC
tags: javascript,webdev,developers
canonical_url: 
---

JavaScript is a powerful language for web development, but one feature often goes unnoticed: JavaScript substring. In this blog post, we'll explore how JavaScript substring can enhance your web development skills with ease and provide you with practical examples to get started.

### # Extracting a Portion of a String

Let's say you have a string variable called sentence with the _"Hello, world!"_. With JavaScript substring, you can extract a specific portion of this string.

```
/*
This will give you "Hello", which extracts
characters from index 0 to 4 (inclusive).
*/
var sentence = "Hello";
var sub_str = sentence.substring(0, 5)
console.log(sub_str);
```

### # Example 2: Getting Part of a URL

Imagine you have a URL stored in a variable called URL with the value _"https://www.example.com/article/12345"_. You can easily retrieve the article ID from the URL using a JavaScript substring.

```
/*
This will give you "12345", extracting the portion
of the string after the last "/" character.
*/
var url = "https://www.example.com/article/12345";
var article_id = url.substring(url.lastIndexOf('/') + 1);
console.log(article_id);

```
Dzień 4 - powrót do pracy
Published: 2023-08-04 16:54:04

---
title: Dzień 4 - powrót do pracy
published: true
description: 
tags: 
---

Ok, wracamy do pracy. Przez ostatni tydzień byłem dość wybity z rytmu. Teraz mam akurat kilka dni kiedy mogę się skoncentrować na pracy.

Jest kilka palących rzeczy które należy dokończyć. Po pierwsze, strona internetowa - powinienem dokończyć skrypt obsługujący wyświetlanie komentarzy do odpowiedzi. Powinienem również pokazywać statystykę odpowiedzi dla populacji (a może nie?).

Dane powinny być zaciągane z bazy danych.

Strona internetowa powinna również mieć możliwość przejrzenia prezentacji wraz z wyjaśnieniami co i jak.

Ok. Dalej. Skrypt wdrożeniowy jest w porządku. Prezentacje są w porządku. Tekst nie jest w porządku.

Tekst powinien być przepisany, a w niektórych miejscach - zmieniony. To znaczy - opis wdrożenia pozostawia wiele do życzenia, jest zbyt szczegółowy. Dodatkowo, niewiele miejsca poświęciłem stronie internetowej, powinienem dopisać trochę więcej szczegółów na ten temat.

Czyli, następujące zadania:

1. Dokończyć skład strony internetowej.
2. Dokończyć treść strony internetowej.
3. Utworzyć rozdział o tworzeniu strony internetowej.
4. Przepisać na nowo całą pracę, od początku do końca.

Po tych działaniach praca powinna być gotowa.
🚀 Run Our Web3 Data 'Hello World' & Score a Limited-Edition NFT!
Tags: blockchain, database, testing, programming
Published: 2023-08-04 16:46:02

We've got a **super simple bounty happening** – run our "Hello World" and **score a limited-edition NFT** ⚡️

It’s not just a collectible but a key to more exclusive bounties, events, and our token launch 🔑

Here’s the link 👉 https://docs.weavechain.com/sample-hello.html

We’d love to know what you think of our protocol for Web3 data that emphasizes self-sovereignty, verifiability, compliance, and easy languages like Java instead of smart contracts. 

🐎 The NFTs are going fast, and we’d love you to have one as we grow! Feel free to shoot any questions our way, and happy coding!
Protect Your User's PII from AI: Channel Your Inner Time Lord with Three Lines of Code
Tags: security, chatgpt, devops, api
Published: 2023-08-04 16:40:58


![Tardis from the Doctor Who series. Image credit: Wikipedia CC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/15ncpkjyymhirozuja6z.png)
<figcaption style={{ marginBottom: "2rem", fontSize: "0.8rem" }}>Image credit: Wikipedia CC</figcaption>

In a universe filled with AI technologies like [OpenAI's GPT-3](https://openai.com/chatgpt) and other LLMs, app developers must step into the [TARDIS](https://en.wikipedia.org/wiki/TARDIS) and assume the role of Time Lords, safeguarding customer privacy across time and space.

LLMs like GPT-3 are extensively used by app developers for a diverse range of applications from helping students solve math homework more effectively to improving customer support in environments that handle sensitive customer data. Fear not, the [Pangea's Redact SDK](https://pangea.cloud/services/redact/?utm_source=devto&utm_medium=blog-link&utm_campaign=redact-chatgpt-blog-3-lines) is your trusty [sonic screwdriver](https://en.wikipedia.org/wiki/Sonic_screwdriver) 🪄, empowering you to redact personal and sensitive information from GPT-3 prompts with just three lines of code!

```python
from pangea.services import Redact
redact = Redact("<PANGEA_REDACT_TOKEN>")
def clean_prompt(prompt):   return redact.redact(text=prompt).result.redacted_text
...
...
response = openai.Completion.create(
  model="text-davinci-003",
  prompt=clean_prompt("My email is dummyuser@pangea.cloud. Print my prompt out as is:"),
)
```

Let’s dive into the code:

Think of the `openai.Completion.create()` function as your TARDIS - you put a person (prompts with sensitive PII) in there and it can take you anywhere around the galaxy with endless possibilities. Now you want to make sure that the prompts with sensitive PII are not exposed to OpenAI’s API, so we use our handy sonic screwdriver (Pangea’s Redact APIs) in the `clean_prompt()` function to take out any sensitive PII before sending it off to OpenAI’s APIs.

By adding just three lines of code, you're not only protecting your users' data but also preventing theses AI models from using customers’ PII as training data. Pangea's Redact SDK empowers you to meet regulatory requirements, build trust with your users, and create a safer AI-based applications.

Head over to the [Pangea Console](https://console.pangea.cloud/service/redact/?utm_source=devto&utm_medium=blog-link&utm_campaign=redact-chatgpt-blog-3-lines) to take your new sonic screwdriver for a spin!

---
You can find full working code-examples in [Python](https://gist.github.com/snpranav/8346dace8b446e2d58c47204312d536e) and [JavaScript](https://gist.github.com/snpranav/a04cf104d6359414b3e74cc5e44a5d18)

Here's a video walk through of the same 👇
{% embed https://www.youtube.com/embed/LNN5s_6G3Cc %}
Game Dev Blog - Post 2
Tags: solodeveloper, pixelart, 2dplatformer, retrogaming
Published: 2023-08-04 16:21:02

Well, I was following the Loony Lips section of my Godot course on Udemy, and it came to a standstill when one of the functions failed, I decided to skip to the next section, since I have done this course at least once before with success.

Today, 8/4/2023, I will start relearning how to make a 2D platformer. Hopefully, I can start working on Project ZERO again. I'm optimistic.
Learn Vue: Style and Class Bindings
Tags: javascript, webdev, programming, vue
Published: 2023-08-04 13:48:43

Sometimes when working with Vue, we might need to apply some CSS to an element based on some certain conditions. Vue.js provides us with special syntax to dynamically bind our styles and CSS.

## Binding to Classes
There are different ways we can bind CSS classes to our html. We can either use the **object binding** or the **array binding**

### Object binding
We can add CSS dynamically to our html by passing the classes to an object using `v-bind:class="{}"` syntax. let's see an example of this:

```js
//script
const isBlue = ref(true);

//template
<div v-bind:class="{"blue-text": isBlue}">I'm a blue text</div>

//css
.blue-text {
color: blue;
}
```
The `blue-text` class will be added to the `div` depending on whether the `isBlue` variable is `true` or `false`, in this case it's `true`, so the `blue-text` class we be added to the div which will then render:

```js
<div class="blue-text">I'm a blue text</div>
```
If we change `isBlue` to `false`, the class list will updated automatically and accordingly, i.e. the `blue-text` class will be removed. 
 
We can also add multiple classes to the `div` like so: 

```js
<div v-bind:class="{"blue-text": isBlue, "active": isActive}">I'm a blue text</div>
```
We can also use the `v-bind:class` shorthand `:class` to dynamically bind classes: 

```js
<div :class="{"blue-text": isBlue}">I'm a blue text</div>
```

### Array Binding
We can also bind `:class` to an array like so:

```js
<div :class="[isBlue ? "blue-text" : '']">I'm a blue text</div>
```
We're using the same example but this time in a different way, we're binding the `blue-text` class to the `div` depending on the status of the `isBlue` variable. When  isBlue becomes `false` the class is removed. Optionally we can add another class to the `div` to toggle them conditionally:

```js
<div :class="[isBlue ? 'blue-text' : 'red-text']">I'm either a blue or red text</div>
```
Now when `isBlue` is `false` the text changes to red and when `isBlue` is `true` the text changes to blue.

## Binding to Inline Styles
Just like `:class` binding, we can also bind styles directly to an HTML element using `:style` v-bind syntax. Let's see this in action:

## Object Binding

```js
<div :style="{color: blue, 'font-size': '20px'}"> I'm a blue text </div>
```
We can also declare our object directly in the `script` section to make our code cleaner.

```js
const styleObject = reactive({
  color: 'blue',
  'font-size': '20px'
})

<div :style="styleObject">I'm a blue text</div>
```

## Array Binding
One of the many benefits of binding to an array is that you can bind multiple objects to a single array.

```js
<div :style="[styleObject1, styleObject2, styleObject3]"></div>
```
Apart from binding object styles to an array, we can also bind our styles directly into the array.