teleren/devto huggingface dataset:
Backticks Parsing in Strings
Tags: backticks, codeblocks, typescript, markdown
Published: 2023-11-06 03:23:35

## The Challenge
Parsing Markdown backticks in a text can be complex. Many Markdown parsers are large and handle various functionalities beyond simple backtick parsing. This overcomplication can be an issue when you need a lightweight solution for parsing only inline and block code wrapped in backticks.

## The Solution: backticks-codeblocks

To address this, I developed `backticks-codeblocks`, a minimal JavaScript library focusing solely on parsing backticks in Markdown text. This library identifies and separates inline code (surrounded by single backticks) and block code (enclosed in triple backticks) from the rest of the text.

## How It Works

The library processes a text string and returns an array of segments. Each segment is either a string (regular text) or an object representing a code snippet. The object includes the code content and a boolean flag indicating if it's block code.

## Usage Example

```ts
import { processText } from 'backticks-codeblocks';

const markdown = 'Some `inline code` and a block:\n```\nconsole.log("Hello, world!");\n```';
const segments = processText(markdown);

// segments output:
// [
//   "Some ",
//   { code: "inline code", isBlock: false },
//   " and a block:\n",
//   { code: 'console.log("Hello, world!");', isBlock: true }
// ]
```

## Why backticks-codeblocks?

Lightweight: It focuses only on backticks parsing, making it much smaller than full-fledged Markdown parsers.
Simple: Easy to use with a straightforward approach.
Flexible: Useful when only backtick parsing is required without the overhead of full Markdown parsing.

## Open for Contributions

The library is open-source, and I welcome contributions. Whether it's suggesting features, reporting issues, or improving the code, your input is valuable.

[backticks-codeblocks](https://www.npmjs.com/package/backticks-codeblocks) is a modest effort to simplify a specific aspect of Markdown parsing. I hope you find it useful for your projects.
The Evolution of ChatGPT Online
Tags: chatgpt
Published: 2023-11-06 03:14:47

**Introduction**
In the ever-expanding landscape of artificial intelligence, [ChatGPT](http://chatgptxonline.com/) has emerged as a revolutionary platform, transforming the way we interact and engage online. As an AI language model developed by OpenAI, ChatGPT has redefined the possibilities of conversational AI, offering a wide array of applications and services across various industries.


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

**Versatility and Functionality**
ChatGPT's versatility is a hallmark of its success. It excels in providing support, generating content, assisting with tasks, and even offering companionship. The AI model’s capability to understand and respond to human queries, adapting to various contexts and topics, underscores its functional brilliance.

**Seamless Integration**
One of the remarkable aspects of ChatGPT is its seamless integration across multiple platforms. Whether it’s integrated into messaging applications, customer service portals, or used for content generation, ChatGPT adapts effortlessly, enhancing user experiences without imposing technological barriers.

**Learning and Adaptability**
The AI's learning capacity is a testament to its adaptability. It constantly evolves through machine learning, continuously improving its language skills and understanding of human interaction. With each interaction, ChatGPT refines its responses, becoming more adept at understanding nuances and context.

**Ethical Considerations and Responsibility**
While ChatGPT’s capabilities are groundbreaking, ethical considerations remain paramount. OpenAI consistently emphasizes responsible AI use, focusing on preventing the misuse of the technology. Safeguards are implemented to ensure ChatGPT operates within ethical boundaries, avoiding potential harm or misinformation.

**Future Prospects**
The future of ChatGPT is incredibly promising. As technology advances, so does the AI model. The potential for ChatGPT to become more intuitive, empathetic, and context-aware is on the horizon. Its integration into various sectors and daily life is anticipated to further transform how we perceive and interact with AI.

**Conclusion**
ChatGPT stands at the forefront of AI innovation, reshaping online interactions and services. Its adaptability, seamless integration, and ethical responsibility position it as a cornerstone in the ever-evolving landscape of artificial intelligence. As we look ahead, the potential for ChatGPT’s growth and impact seems boundless, promising a future where AI augments human experiences in unprecedented ways.
Material UI : Overview, Installation, Customization, Responsive UI, Light/Dark Mode
Tags: tutorial, mui, react, frontend
Published: 2023-11-06 02:48:28

**Material UI : Overview, Installation, Customization, Responsive UI, Light/Dark Mode**

Video Link: [https://youtu.be/nSWVW0pCN2k](https://youtu.be/nSWVW0pCN2k
)
I'm excited to share my first video on Material UI React, a popular component library for building beautiful and user-friendly interfaces. In this video, I cover everything you need to know about Material UI, from installation and customization to creating responsive UIs and light/dark mode themes.
Understanding OAuth - Overview
Tags: oauth
Published: 2023-11-06 02:40:35

If you are reading this article, it's very likely that you have found yourself needing to understand the workings of OAuth. This is in some ways a very commendable task, because OAuth is one of the most used and important authorization frameworks used across the internet.

OAuth is in some ways quite simple and in other ways quite complex, but I will attempt to dispel at least some of the mysticism surrounding it. To do this, we will take a look at how OAuth corresponds to some real-world systems.

{% embed https://www.youtube.com/embed/ixaeWftZ03Q?si=3RuuMHHNvRoHGEdW %}

OAuth is the “authorization framework” used across the web. The technical name can make it seem somewhat mysterious, but in reality, it describes a pattern (a.k.a. framework) of access that is common even outside the realm of computers. The problem that OAuth is trying to solve is secure authentication by a third party, or you might say, allowing someone I trust to determine if my users are who they say they are. This is important because not every entity is built with authentication in mind, but almost every entity requires some level of authentication. Some examples might be a valet who needs to be sure they give keys to the right people, or a doctor who wants to be sure she has the right person’s medical history up when prescribing medication..

Let’s take a look at a real-world example to see how this pattern plays out. Imagine you’re getting ready to fly to your next vacation destination, somewhere beautiful, like Michigan. You’re going to purchase a ticket from an airline (the **relying party** or client) and provide some identifying information about yourself. The airline has no way of knowing if the information you have provided is real, because they are not built to handle identifying every person on earth, so they rely on an **authorization provider** which in this case is the government which issued your passport. Now, when the time comes for you to head to beautiful Michigan, you arrive at the airport and in order to sit in your seat on the plane (the **protected resource**) you are redirected by the airport to a security checkpoint first that allows your identity to be confirmed by agents of your **authorization provider**. You give them your boarding pass (which is sort of like an **authorization code**) and your passport and then you are granted access to the plane, assuming you didn’t steal someone’s identity.
In a nutshell, this is how OAuth works too. A user (**resource owner**) interacting with a client (**relying party**) is referred to a (possibly) third party **authorization provider** that validates the user and then returns an **authorization code** which the client can exchange for a **token** (or tokens) that grants them access to a protected resource.

Check out the next post for a detailed walkthrough of the terminology used above.
What next for me ?
Tags: datascience, python, analytics, career
Published: 2023-11-06 02:35:14

**What next...?**

After years moving around, working in academia and IT industry. Like everyone at some point in their career, share this question in a perspective of growth and changes: “What next?”

**Data Science?**

Inevitably, Data science has always been on my radar, persistently haunting me… I have worked on data science projects in the past, wearing the hat of a project manager. I have been captivated by the discussions within the teams and fascinated by the questions we were attempting to answer. It seems like a fun and highly creative field, so why not give it a try ?  

**Opportunities ?**

It’s universally acknowledged that we are living in the data era, with millions of terabytes of data generated daily. The data market is estimated to be worth hundreds of billions of dollars. Therefore, the opportunities are vast and are present in various domains. The creativity and innovations have surprised many in terms of what can be archived with data. The demand for Data scientist is at an all-time high.

**The vision !**

Becoming a Data Scientist Project Manager, contributing technically and leading a successful data related project that will shape the future and benefit everyone.
HOW TO USE USEIMPERATIVEHANDLE HOOK IN REACT ?
Tags: react, javascript, h
Published: 2023-11-06 01:47:47

I'm new in react recently i learn about useImperativeHandle hook, i know the purpose for this hook but i have a problem when i want to implement this hook below is the code example

```
import React from 'react'
import ReactDOM from 'react-dom/client'
import {forwardRef,useRef,useImperativeHandle} from 'react'

const ChildComponent = React.forwardRef((props, ref) => {
 useImperativeHandle(ref, () => ({
    sayhi(){
      console.log("hello world")
    }
  }));
  return (
    <div>
    </div>
  );
});

const ParentComponent = () => {
  const childRef = useRef();
  const a = () => {
    childRef.current.sayhi();
  };
  a();
  return (
    <div>
      <ChildComponent ref={childRef}/>
    </div>
  );
};
const div_root = ReactDOM.createRoot(document.getElementById("root1"));
div_root.render(<ParentComponent/>);
```
and i got an error where childRef.current is undefined
Placeholder Contributor
Tags: hack23contributor
Published: 2023-11-06 01:45:51

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
Vue vs Angular: A Front-End Battle Royale
Published: 2023-11-05 20:57:01

In the dynamic world of front-end development, the choice of frameworks often dictates the pace and success of a project. Today, we dive into a comparison that’s been a hot topic for a while: **Vue.js vs Angular**.



## Angular: The Full-Fledged MVC Titan

Angular, backed by Google, is an all-encompassing framework. It's an MVC (Model-View-Controller) powerhouse that’s opinionated and comes with a steep learning curve. Angular is TypeScript-based, which means it benefits from strong typing and object-oriented design patterns.

**Pros**:

**Robust Framework**: Offers a full development experience with strong conventions.

**TypeScript Core**: Appeals to developers who appreciate type safety and class-based object orientation.

**Enterprise-Level**: Equipped with tools and capabilities suited for large-scale projects.

**Community and Ecosystem**: Strong community support with a myriad of resources.

**Cons**:

**Complexity**: Its complexity can be daunting for newcomers.

**Boilerplate**: Requires more boilerplate code, which can slow down 
development.

**Performance**: While fast, it might be overkill for smaller projects, affecting performance.


## Vue.js: The Progressive JavaScript Framework

Vue.js, on the other hand, is a progressive framework for building user interfaces. Unlike Angular, Vue is designed from the ground up to be incrementally adoptable. Its core library focuses on the view layer only, and it’s easy to pick up and integrate with other libraries or existing projects.

**Pros**:

**Ease of Learning**: With its simplicity, developers can get up and running quickly.

**Flexibility**: Less opinionated than Angular, offering more freedom on how to structure your app.

**Performance**: Vue's slim nature makes it a nimble option, with a minimal impact on performance.

**Reactivity**: Vue’s reactivity system is simple and efficient, making state management a breeze.

**Cons**:

**Ecosystem Size**: Smaller than Angular's, which might limit resources for certain niche requirements.
**Enterprise Use**: Less prevalent in enterprise settings compared to Angular.
**Perception**: Sometimes unfairly labeled as only suitable for small to medium projects.

## Picking Your Champion

Choosing between Vue.js and Angular isn’t just about technical capabilities; it's also about considering the size and scope of your project, your team's expertise, and the long-term maintainability of your application.

**Go Angular if**:
You’re developing a large-scale enterprise application.
You need a full-fledged solution out of the box.
Your team is comfortable with TypeScript and OOP paradigms.

**Opt for Vue if**:
You appreciate simplicity and flexibility.
You’re working on a project where speed and performance are critical.
You prefer a gentle learning curve and progressive enhancement.

In the end, both Vue and Angular have their merits, and your specific needs will dictate your choice. It’s not about which framework is better overall, but which is better for your project.
Alpha v1.0.2 - Upcoming Changes
Tags: alpha, changelog, futureupdate, version
Published: 2023-11-06 00:50:07


**High Priority**

1. 3 new Greatsword attacks
   1. Right Click does a charging stab
   1. Shift attack after 1st basic attack rotates the player around the enemy
   2. Shift attack after the above shift attack makes the player jump in the air for an execution-style attack
1. 1 new Sword attack
   1. Right click make the player flip forward and attack
9. Implemented Auto Save
   1. Auto Save now happens every time the player leaves combat
9. Added "Load Auto Save" option to UI
10. Add Keybind documentation for Skin Writing Ability
11. Player will stop using potion when full health is reached
12. Player can no longer drink potions while interuptted
13. Added a death animation layer so that it will override all other animation layers and prevent the player from animating after death
2. ~~Health meter shows if it's hidden and you strike an enemy~~
2. ~~Skinwriting Meter drains at a more appropriate speed~~
3. Player's Head IK no longer looks at random spots on the ground
5. Update UI for Character panel
6. Update UI for Crafting to make it more intuitive
7. ~~Fixed Golem Abilities~~
   1. ~~Jumping in air and stomp ground~~
   2. ~~Running attack~~
8. ~~Mage Meteor Shower too oppresive~~
   1. ~~Make meteors not interupt player~~
   2. ~~Reduce frequency of Meteor attack~~
   3. ~~Slow down the instantiation of Meteors~~



**Medium-High Priority**

1. Consumable Toolbelt (ex: Potions) now shows a number of how many consumables are left
   1. The toolbelt UI will gray out when consumable count is 0
2. Unequipping an item that is active and equipped will unequip it from the player
3. Equipping a weapon will not affect the equip state of an unrelated active weapon
5.  Damage text is now more animated (although it still needs work)
6.  Greatsword is now utilizing colliders for collision detection instead of the old raycast web method


**Medium Priority**

3. (Prototyping) Add music when combat begins for Golem and Mage
4. Fix Shadows on Firepit
The story behind WebCrumbs
Tags: programming, react, opensource, productivity
Published: 2023-11-06 00:14:18

{% embed https://dev.to/opensourcee/what-is-webcrumbs-m58 %}

WebCrumbs was born out of [a simple insight](https://github.com/webcrumbs-community/webcrumbs/wiki/Motivation). 

Rewind to the early 2000s. The internet was a different place—everyone was on [dial-up](https://www.pewresearch.org/internet/chart/broadband-vs-dial-up-adoption-over-time/), and we all had a bit more patience. Pages loaded at their own pace, and the most interaction we expected was a click to a new page. PHP was the go-to language, setting the stage for dynamic web content.

That’s when WordPress was born. It's a giant that powers a whopping [42%](https://www.techradar.com/news/wordpress-now-powers-40-of-the-worlds-websites) of the web.This isn't just about blogs; it's about websites of all kinds, driving what's called the WordPress economy. We're talking about an open-source world where over [half a trillion dollars](https://illustrate.digital/wordpress/wordpress-economy-study-2021/) circulate every year, enriching everyone from coders to designers to educators and beyond.

Fast forward to today, and the web's got a [need for speed](https://www.forbes.com/advisor/business/software/website-statistics/). It's all about being instantaneous and interactive, with visitors wanting everything now, not a second later. That's where JavaScript and its family, including Node.js, React.js, and frameworks like Next.js, Svelte, Vite, and Vue.js, come into play. The new cool kids on the block have [outpaced PHP by far](https://www.statista.com/statistics/793628/worldwide-developer-survey-most-used-languages/), and React has even overtaken WordPress in [Google searches](https://trends.google.com.br/trends/explore?date=all&q=%2Fm%2F02vtpl,React).

But let's tip our hats to 'dad' here—WordPress nailed the user-friendly side of things with its admin panel and plug-and-play functionality. Yet, while React fits our fast-paced web like a glove, it's not always a walk in the park to learn, and too often developers find themselves crafting features from scratch that others are also puzzling over in their corners of the world.

That's where WebCrumbs comes in. We're taking the ease of WordPress and combining it with the might of React. We're carving out a space where sharing and using plugins is a breeze. Our goal? To make modern web development a piece of cake for everyone, everywhere.

{% cta webcrumbs-community/webcrumbs %} Star us on GitHub {% endcta %}

{% cta webcrumbs.org %} Join the WebCrumbs community {% endcta %}
How Do You Achieve Your Life Goals?
Tags: discuss
Published: 2023-11-06 00:00:00

---
published_at : 2023-11-06 00:00 +0000
---
What daily habits and routines have you found effective in achieving your life goals, whether they relate to work, relationships, or personal development? Could you share a few of the simple yet impactful daily habits that have contributed to your success?

Follow the DEVteam for more discussions and online camaraderie! 

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Building a tool to integrate Readwise.io highlights into my Zettelkasten via Perl
Tags: perl, readwise, cpan
Published: 2023-11-06 20:28:42

---
title: Building a tool to integrate Readwise.io highlights into my Zettelkasten via Perl
published: true
date: 2023-11-06 00:00:00 UTC
tags: perl,readwise, cpan
canonical_url: http://perl.kiwi/tales/2023/11/06/building-a-tool-to-integrate-readwise-io-highlights-into-my-zettelkasten-via-perl/
---

Recently I started using the [Readwise.io](https://readwise.io/i/lance631) as a replacement both for my RSS reader and my bookmarking app. I also use a [Zettelkasten](https://zettelkasten.de/posts/overview/) system of thinks I want to record; so decided to integrate via the API so that highlights I make in Readwise end up as markdown files on my local machine (and git repo).

The editor I use mostly for Zelltelkasten is the lovely [Zettlr](https://www.zettlr.com/) or vim; so I wanted to craft simple markdown files. Being me; I reached for Perl and have written a small CPAN module along the way called [WebService::Readwise](https://metacpan.org/pod/WebService::Readwise) which includes a [example script](https://metacpan.org/release/LANCEW/WebService-Readwise-0.002/source/examples/export_to_zettelkasten.pl) of the basics of what I cover in this tale.

[Continue reading...](http://perl.kiwi/tales/2023/11/06/building-a-tool-to-integrate-readwise-io-highlights-into-my-zettelkasten-via-perl/#section-2)
Navigating Disagreements with Power?
Tags: discuss, codenewbie, beginner
Published: 2023-11-06 00:00:00

---
published_at : 2023-11-06 00:00 +0000
---
What strategies have you found effective for handling disagreements with individuals in more powerful positions?

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
Exploring User Privacy in the Age of Language Models
Tags: uncategorized
Published: 2023-11-14 20:51:11

---
title: Exploring User Privacy in the Age of Language Models
published: true
date: 2023-11-05 23:57:30 UTC
tags: Uncategorized
canonical_url: https://www.faridfadaie.com/2023/11/05/exploring-user-privacy-in-the-age-of-language-models/
---

I’ve just dropped a fresh piece on Medium that’s pretty close to my tech-geek heart. It’s all about the double-edged sword of Large Language Models (LLMs) and the privacy puzzles they bring to the table.

**Here’s the techy scoop:**

So, I’ve been noodling over how these LLMs are genius at churning out human-like text, thanks to gobbling up ginormous data meals. But here’s the kicker – sometimes they snack on sensitive info, and that’s where things get dicey. In my article, I dive into this whole privacy brouhaha, talking about how these clever bots can accidentally spill the beans on personal deets.

I also chat about some brainy works that dig into this stuff, like the research by Carlini and his crew in 2019, and the deep dive into Differential Privacy by Abadi and pals in 2016. Plus, I get into the nitty-gritty of privacy-preserving algorithms and the trade-offs between keeping things hush-hush and making the models super useful.

**Why should you care?**

Well, if you’re slinging code for these LLMs or just curious about how your secrets are kept secret in the age of AI, this is for you. It’s not just about the “what” – it’s about the “how” and the “why” we need to keep user trust on lock in this wild west of tech.

Check out my full thoughts and let’s get into the weeds of AI and privacy together. [Catch the full article here](https://medium.com/p/8d28f2225b6d) and let’s get this convo going!

The post [Exploring User Privacy in the Age of Language Models](https://www.faridfadaie.com/2023/11/05/exploring-user-privacy-in-the-age-of-language-models/) first appeared on [Farid Fadaie - Engineering, Product and life](https://www.faridfadaie.com).