teleren/devto huggingface dataset:
Introducing TypeLib JS - simplified type detection and debugging
Tags: opensource, javascript, productivity, codequality
Published: 2024-02-07 15:35:06

If you want to see it in action, check out the project landing page at: [typelib.schemetastic.com](https://typelib.schemetastic.com)

I do also have a promo short video about the project:
{% youtube KSEmMDJRsq4 %}

## Why I created this project?
**Verifying data types in JS is hard! And it can easily break code!!!
🫳🎤**

...

🤏🎤 Okay, let explain in more detail.

JavaScript can handle dozens of types of data (most of them are some sort of object), but each type behaves differently, for example, a `"string"` doesn't behave in the same way as a `new String("does")`.

To show you this, check some outputs that the native `typeof` returns:

```js
typeof []; // object
typeof NaN; // number
typeof Infinity; // number
typeof null; // object [this is a bug actually]
typeof new Date(); // object
typeof new String("does"); // object
typeof new Blob(); // object
```
Arguably, `NaN`, `Infinity` and `-Infinity` are like numbers... but not exactly, these are the kind of things that can break code if you are not aware of. If you wanted to individually verify these types, you would need to use different methods. TypeLib provides a unified experience to verify types.

Now check the TypeLib JS outputs for the same data:

```js
type([]).is; // array
type(NaN).is; // nan
type(Infinity).is; // infinity
type(null).is; // null
type(new Date()).is; // date
type(new String("does")).is; // stringobject
type(new Blob()).is; // blob
```
It makes more sense, doesn't it? You are actually receiving the results you are expecting with no complication, and it is semantic! But not just that, TypeLib was successfully tested with over 35 types of data... but... what if you don't need to be so specific? 

TypeLib JS also classifies data in 9 different groups, for example, the `.isNumeric` property classifies numbers, NaN, Infinity, -Infinity and Big integers in that group. **In the next post that will be released in the next few days, I will explain this in detail; And in a different post, I will explain how you can use it to debug code with `typeErrorIf`.** If you don't want to miss it, 🔔 subscribe to this series and follow me!

## How to install TypeLib JS?

In the terminal:
```shell
npm i typelib-js
```
You can check the documentation for more details, (link of the repo below).

## Support the project!

To create this project, I had to spend weeks researching, writing code, tests and documentation, making the website and more. And it's free under the MIT license.

**One of the best ways to support this, is giving me a star 🌟 on GitHub, and if you want to, you can spread the word 📢. Of that way, more people will use it.**

[Link to the repo 🌟](https://github.com/schemetastic/typelib-js)
The Metamodern Data Stack - Built for the age of AI
Tags: ai, database, discuss
Published: 2024-02-07 15:28:04

🔮 The CEO - Timo Hagenow of SuperDuperDB was featured in a recent MMC Ventures article, which extensively discussed the data stack and AI integration ecosystem, i.e., traditional, modern, and metamodern data stack.

🚀 Here are the two major takeaways from the article:
- Integrating AI into enterprise systems is a monumental task. The traditional methods require extracting data from its source, which needs complex pipelines that include specialized vector databases, leading to significant management and deployment overhead.

- By adopting the philosophy of "pragmatic idealism", innovative solutions like SuperDuperDB are streamlining this transition, enabling enterprises to leverage new technologies alongside their existing databases without the need for full-scale data migration, thus reducing complexity and accelerating the adoption of AI. This approach not only addresses today's technological landscape but also future-proof systems against the inevitable obsolescence of current technologies.

🔗 Learn more about the emerging metamodern data stack culture: https://mmc.vc/the-meta-modern-data-stack/
2024-01-31 Coverage testing
Tags: zip, todayilearned, z80
Published: 2024-02-07 15:28:03

Coverage testing is completed.

Shortcomings in the coverage testing:

* _patch has code to do a restart during compilation; it seems to be broken, and so is not tested.
* tick has code to search current if the word is not in context; I was unable to devise a test for that case.
* *ELSE has code for page boundary crossing that is not tested.
* *LOOP has code for page boundary crossing that is not tested.
* D* has code for propagating a negation carry that is not tested.
* D/MOD has code for negative divisors and dividends that is not tested.
2024-01-30 ZIP Coverage testing
Tags: zip, todayilearned, z80
Published: 2024-02-07 15:26:25

The TIL book refers to “PAD” but does not define it. I implemented what I thought it did, but the only code that calls it is “.R” and that is behaving weirdly. Looking at the code for “.R” I am completely baffled by it. I think it is trying to do stack arithmetic to measure the length of the string on the stack, but the code (at least as transcribed in the book) doesn’t do that. Either my implementation of “<#”, “#S”, et al is screwy; or there is a really annoying error in the book’s definition of “.R”.

Not having “.R” breaks “DUMP” and “ADUMP”.

Maybe the next step is to rummage through FIG-FORTH sources and see if I can find an equivalent word (that works) and translate it to ZIL.
Daily Code 62 | Image & Searchbar (🟥 HTML & 🟦 CSS Course 4)
Tags: beginners, daily, html, css
Published: 2024-02-07 15:09:13

And once more I’m continuing with my HTML & CSS course today https://www.youtube.com/watch?v=G3e-cpL7ofc

Today the CSS was about importing and manimpulating images + how to make a search bar inputfield. All still rather basic, but very important.

Let’s go!

# My Code

```html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>YouTube.com Clone</title>
  <style>
    .thumbnail {
      width: 300px;
      height: 300px;
      object-fit: contain;
      object-position: bottom;
      border: 2px;
      border-style: solid;
      border-color: blue;
    }
  </style>
</head>

<body>
  <img class="thumbnail" src="thumbnails/thumbnail-1.webp" alt="">
</body>

</html>
```

or here another version

```html
...
<style>
    .thumbnail {
      width: 300px;
      height: 300px;
      object-fit: contain;
      object-position: bottom;
      border: 2px;
      border-style: solid;
      border-color: blue;
    }
  </style>
...
```

Ok that was images. Now the searchbar basics

```html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>YouTube.com Clone</title>
  <style>
    .search-bar {
      font-size: 20px;
      margin: 12px;
    }
  </style>
</head>

<body>
  <input class="search-bar" type="text" placeholder="Search">
  <input type="checkbox">

</body>

</html>
```

The only new and interesting thing for me here was really how to change the behavior of images.

Alright that’s it again for today. I wish I could do a bit more but my time is really stretched these days, so I can only do these small steps. Still better than nothing!
Total Newbie
Published: 2024-02-07 15:07:35

This is my first time ever writing a blog so I'll just keep this one simple.
My name is Tiri, I live in Australia. I know absolutely nothing when it comes to coding, though I have always been interested in the Tech World. My whole life I've been working jobs that involve hard labour and I love it. I've been working the mines for 10+ years as Labourer, Operator, Boilermaker, Iron Ore Drillers Offsider etc. Through all this I've taken interest in coding but have never really done anything about it until now. I've joined a course with Academy Xi taking me through the basics of coding...
including:
- HTML
- CSS
- JS
There is more after this but I haven't gotten that far yet. 

So far there have been many challenges, being a father of 2 little munchkins, at the start I found it difficult sometimes to find time to do my studies, to even concentrate, and also to find the motivation to continue. In the end I thought no it'd be a bloody waste of money, and plus the more I learnt the more excited and curious I got. So at this point I've learnt how to animate certain HTML codes through CSS (If that makes any sense), as basic as it sounds to some of you out there, something like this actually got me keen to learn more.

Well I've written more than what I thought I could and honestly I don't really know if any of it makes sense. But yay to me for writing my first Blog. Hopefully the next could be a little bit more educational rather me ranting on about nothing. 

see ya guys
Ka ki te
THE BEST EXPERT RECOVERY  > FOLKWIN EXPERT RECOVERY }  TO HELP YOU RECOVER YOUR STOLEN BTC/CRYPTOCURRENCY FROM SCAMMERS ..
Published: 2024-02-07 15:07:27


Folkwin Expert Recovery reduces the terrifying experience of losing access to your cryptocurrency accounts to a little inconvenience. You don't have to worry about forgetting any passwords or finding the answers to security questions because of its extensive account recovery procedure. Recovering an account is as simple as reciting a magic spell thanks to Folkwin Expert Recovery simplification of the procedure. In the world of cyberspace, malware infections resemble elusive creatures. With the intention of fooling gullible visitors into disclosing their personal information, they pose as trustworthy websites. However, do not panic! You can rely on Folkwin Expert Recovery . You don't have to worry about falling victim to cybercriminals' traps when navigating the internet's perilous seas thanks to its integrated defense against phishing assaults. Losing your keys is always a hassle. Car keys, house keys, and let's not even mention the countless times you've misplaced your phone. But losing your crypto keys? That's a whole new level of stress. Thankfully, Folkwin Expert Recovery  has a secure key recovery mechanism in place. This means that even if you misplace your keys, you can easily regain access to your crypto assets without breaking a sweat. It's like having a virtual locksmith at your service, ready to crack open the vault whenever you need. Traditional recovery methods, like relying on support teams or customer service hotlines, can sometimes feel like playing a never-ending game of telephone tag. Waiting for hours on hold or sending countless emails into the abyss can quickly become frustrating. Plus, these methods often fail to provide the level of security and efficiency that crypto investors need. That's why it's time to bid adieu to old-fashioned recovery methods and embrace the power of web recovery solutions like Folkwin Expert Recovery . 
Contact them via email: Folkwinexpertrecovery {AT} tech-center . com
Or WhatsApp +1(769)-280-0965  
Regards,
Mr James Winson.
Say Hello to Hassle-Free Website Building with CodeDesign.ai & WordPress
Published: 2024-02-07 14:56:00

---
title: Say Hello to Hassle-Free Website Building with CodeDesign.ai & WordPress
published: true
description: Build AI Websites & Sync them with WordPress
tags: 
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/325pax54ez64zn6gycyp.png
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-07 14:44 +0000
---


We noticed something: making websites was often more about battling code than expressing ideas. When we built CodeDesign.ai, one common feedback that we got was - how do I plug it to my existing WordPress site. That's why we're introducing a brand new plugin! It's all about turning your vision into a stunning website with just a few clicks, no coding drama.

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

## How It Works?

- **Describe Your Dream Site:** Just tell us what you need, like "a cozy blog for my baking adventures" or "a sleek portfolio to showcase my photography." Our AI does the rest.

- **Preview and Tweak:** In moments, you'll see your idea transformed into a website. Not quite right? Adjust it until it's perfect.

- **Go Live:** Love what you see? Get it live with our easy-to-install WordPress plugin. Or publish directly on our infrastructure. We take care of everything. That's it—you're online!

## Why You'll Love It

Our WordPress website builder is a breath of fresh air in the web design world. It's not just about saving time (though you'll save plenty). It's about the freedom to experiment and the power to bring any idea to life, no matter how unique or complex. And then manage it in your favorite platform. With AI at your service, the usual hurdles in website design become a thing of the past. Plus, you get to join a community eager to see what you create next, especially as we launch on Product Hunt.

### Seamless Integration

Imagine integrating your favorite tools and platforms without a single line of code. That's the reality with CodeDesign.ai. From e-commerce solutions to social media feeds, everything clicks into place effortlessly.

### Stay Ahead of the Curve

As digital trends evolve, so does your website. Our builder ensures your site stays modern, responsive, and optimized for search engines, keeping you one step ahead at all times.

### Ready for Everyone

Whether you're launching your first blog, setting up an online store, or just want a personal space on the internet, we've got you covered. Our builder is designed for all: no tech expertise required.

## Join Us on Product Hunt

We're launching on Product Hunt, and we'd love for you to be part of this journey. Use [this link to support us there](https://www.producthunt.com/posts/codedesign-ai-for-wordpress) It's a chance to see just how easy and fun building a website can be with the right tools.
Making of pdf chat tool ChatPDF.so
Tags: chatpdf, chatwithpdf
Published: 2024-02-07 14:52:06

We wanted to experiment building a new ask pdf ai so we created [chatpdf.so](https://chatpdf.so)
We didn't found the existing solutions perfect because most of them was based on vector search. So we built our own algorithm that is optimized for content generation and not just search. 

It is a hallucination free chat with pdf tool for students, professionals and researchers. You can chat with any pdf just upload your pdf and it will process it and you can use it.

We made [ChatPDF.so](https://chatpdf.so) tool using OpenAI api, Huggingface, LLaMaIndex, Render, Vercel and then Pinecone.

We will keep improving it over time. Hope you find ask pdf ai tool useful.
New guidelines for email senders? (action might be required)
Published: 2024-02-07 14:45:37

In an effort to protect users from too much spam, Gmail and Yahoo Mail have introduced some new guidelines that add some more checks and controls for providers sending bulk mails.

Gmail and Yahoo Mail have announced a set of stringent requirements for senders that send more than 5,000 emails per day or have a reported spam rate of more than 0,3%.

These requirements are applicable from the 1st of February 2024 and are geared towards enhancing the security of user inboxes and improving the overall user experience. In more detail, these guidelines include:

Email Authentication: Senders are required to authenticate their emails using established protocols like SPF, DKIM, and DMARC. This step is crucial to prevent phishing and ensure that emails are from a legitimate source.

Simplified Un-subscription Process: An easy, one-click un-subscription option must be provided, empowering recipients with the choice to opt out of unwanted communications.
Sending Wanted Emails: Ensuring that the emails sent are desired by the recipients, which involves maintaining updated mailing lists and respecting user preferences.

For more information around the new guidelines please read here: https://apyhub.com/blog/importance-of-email-validation-and-new-guidelines
What is CSRF Token & how to use this?
Published: 2024-02-07 14:44:16

CSRF stands for Cross-Site Request Forgery. It's a type of attack where a malicious website can potentially perform actions on another website where the victim is authenticated. To prevent CSRF attacks, one common technique is to use CSRF tokens.

A CSRF token is a unique, random value generated by the server and included in a form or in the HTTP headers of a request. The token is associated with the user's session and is verified by the server to ensure that the request originated from the same site and was not forged by a malicious attacker.

Here's how you can use CSRF tokens to protect your web application:

1. **Generate a Token**: When a user visits your website, generate a CSRF token and associate it with the user's session. This token should be unique for each user session and should have a sufficiently long and random value to make it difficult to guess.

2. **Include the Token in Forms**: When rendering forms that perform sensitive actions (such as changing user settings or making payments), include the CSRF token as a hidden field in the form.

   ```html
   <form action="/change-password" method="post">
       <input type="hidden" name="csrf_token" value="...">
       <!-- Other form fields -->
       <button type="submit">Change Password</button>
   </form>
   ```

3. **Verify the Token on the Server**: When the form is submitted, the server should verify that the CSRF token included in the request matches the one associated with the user's session. If the tokens don't match or if no token is provided, the server should reject the request with an error.

4. **Protect AJAX Requests**: If your application uses AJAX to make requests, ensure that the CSRF token is included in the headers of the request. You can either include the token in a custom header (e.g., `X-CSRF-Token`) or use a framework that automatically handles CSRF protection for AJAX requests.

   ```javascript
   $.ajax({
       url: '/change-password',
       type: 'POST',
       headers: {
           'X-CSRF-Token': '...'
       },
       data: { /* Request data */ },
       success: function(response) {
           // Handle success
       },
       error: function(xhr, status, error) {
           // Handle error
       }
   });
   ```

By including and verifying CSRF tokens in your web application, you can protect against CSRF attacks and ensure that sensitive actions can only be performed by authenticated users from your own site.
How Try Catch blocks work behind the scene in Javascript?
Published: 2024-02-07 14:41:01

In JavaScript, try-catch blocks work similarly to other languages, but there are some nuances specific to JavaScript's asynchronous and single-threaded nature. Here's how try-catch blocks work behind the scenes in JavaScript:

1. **Parsing and Compilation**: When JavaScript code is executed, it first undergoes parsing and compilation. During this process, the structure of try-catch blocks is recognized by the JavaScript engine.

2. **Execution Context**: JavaScript uses execution contexts to manage the execution of code. When a function is invoked, a new execution context is created and pushed onto the call stack.

3. **Try Block Execution**: When the JavaScript engine encounters a try block, it tries to execute the code within it. If an error occurs during the execution of this code, the engine throws an exception.

4. **Exception Handling**: When an exception is thrown within a try block, the JavaScript engine looks for a corresponding catch block. If a catch block is found, the code within the catch block is executed. If there is no catch block or the error is of a type not caught by the catch block, the exception propagates up the call stack to the next higher try-catch block or, if there are none, to the global error handler.

5. **Asynchronous Code**: In JavaScript, many operations are asynchronous, such as fetching data from a server or waiting for user input. Asynchronous operations often use callbacks, promises, or async/await syntax. Errors that occur in asynchronous code are not caught by surrounding try-catch blocks but are instead propagated through the event loop and handled by the global error handler (`window.onerror` or `process.on('uncaughtException')` in Node.js).

6. **Finally Block**: JavaScript also supports a finally block, which is executed regardless of whether an exception is thrown or caught. This block is typically used for cleanup tasks such as closing files or releasing resources.

7. **Global Error Handling**: If an exception is not caught by any try-catch block, it propagates to the global error handler. In web browsers, uncaught exceptions can be caught by listening for the `error` event on the `window` object. In Node.js, uncaught exceptions can be handled using the `process.on('uncaughtException')` event.

Overall, try-catch blocks in JavaScript provide a mechanism for handling synchronous errors, while asynchronous errors require additional techniques such as promises, async/await, or global error handling.
TODO FRONTEND PRECISA SABER FAZER UM DEPLOY SIMPLES
Tags: frontend, javascript, react, nginx
Published: 2024-02-07 14:22:00



Ei, frontend. Se alguém te pedir para fazer um site simples com HTML, CSS e JS e para isso te oferecesse uma Instância (VM) e um domínio. Você conseguiria fazer isso?. Ou apenas colocar seu site no ar usando o domínio passado, você acha que isso faz parte da sua competência? 

É muito comum ver vagas que pedem Frameworks, conhecimento em metodologias, e provavelmente nesses locais você não irá fazer nada a mais que interfaces gráficas mesmo, pois foi o que você foi contratado a fazer. Mas você não acha que chega o momento de abrir um pouco seus horizontes? 

Vamos supor, você sabe das mais atuais tecnologias de front end, como Angular e React, sabe Type Guards e Generic tyṕes do Typescript como ninguém, especializado em SEO, com integração com mil e uma coisas, e chega uma pessoa e te fala: 

Gostaria de uma Landing Page e que você comprasse um domínio para mim, e que essa landing page captasse leads para meu RDstation. 

Uma landing page simples, com um único botão, o que falta para você conseguir pegar esse bico? 

- Um backend? Não utilizaremos nenhuma api ou banco aqui
- Um devops? Por favor, nem testes vai ter nessa SPA 
- Um especialista em cloud ? Pulando a cronologia deste artigo, eu já afirmo que um github pages faz 50% do trabalho

*VOCÊ, FRONTEND, È CAPAZ DE FAZER ISSO.* 

Este texto não pretende ser acusatório, e sim gerar uma reflexão sobre as portas que são fechadas por você, frontend, não horizontar seus conhecimento um pouco.

Paulo SIqueira, CEO da ALURA, tem diversos vídeos sobre este conceito, apelidado de Dev em T, que debate o debate interno do Dev de horizontar e verficalizar seu conhecimento, e eu acredito que esse debate constane é sempre necessário 

_“Não deixe seus conhecimentos limitarem a sua criatividade”_ 

Você concorda com essa frase?