teleren/devto huggingface dataset:
Holiday Hackathon
Tags: javascript, database, vectordatabase, hackathon
Published: 2023-12-08 20:09:09

In the past year, we've had a ton of fun hosting a [number of hackathons](https://xata.io/blog/tags/hackathon) and giving away cash prizes with premium swag to our community of Xataflies. That is why we're beyond excited to announce the second annual Xata Holiday Hackathon 🎉

![Holiday Hackathon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvux8co7qzok260uasp5.png)

It's the holiday season, and that means work is starting to wind down a bit. There's more time for family and friends. If you're fortunate (and brave) enough to travel during the holidays, maybe even a vacation. But with all that time on your hands, there's a nagging feeling in the back of your mind. You have had a million dollar idea that you've been wanting to build all year. Maybe you already bought the domain and have been sitting on it just waiting for the time to build.

We're here to tell you that now's your chance. With Xata Holiday Hackathon, you can turn that side project into a side hustle and win up to $500 for an app built on top of Xata. The best part? If it takes off, you can easily take that prototype to production scale with our [generous free tier](https://xata.io/pricing) in the new year. Take advantage of features like [file attachments](https://xata.io/docs/concepts/file-attachments), our [LangChain integrations](https://xata.io/docs/integrations/langchain) and [full-text search](https://xata.io/docs/sdk/search) to scratch that itch and build the next big thing.

## Rules
Excited? We are too! Here are the rules ✅

- Xata engineers will vote to select the winners of the Holiday Hackathon
- The top 5 entries will receive $500 each
- The top 10 entries will receive limited-edition swag
- All entries must be submitted by January 15, 2024
- You can submit more than one entry, however, only one app participant will be eligible for a prize
- Ensure your app's code is publicly available, to showcase your use of Xata
- Submissions for this hackathon must be original and unique to this challenge; entries used in previous hackathons are not permitted or eligible

## How to submit your entry
After you've built your app, submit your entry using the form [here](https://5i8caik7lja.typeform.com/to/LkVQJqvY).

We will need:

- Your name and email
- A link to the application URL
- A link to the application repository
- Any social profiles you'd like to receive shout outs in

Ready to join in on the fun? Pop into our [Discord](https://xata.io/discord) if you have any questions and follow us on [X | Twitter](https://twitter.com/xata) to stay up to date with the latest. [Sign up today](https://app.xata.io/signin?mode=signup), we can't wait to see what you build 🦋
Can I use Insta Gold In mi moblie Phone And Fearture In App
Tags: instapro, insta
Published: 2023-12-08 19:45:51


Whether you can use Insta Gold on your mobile phone and access its features depends on several factors:

1. Your Phone's Operating System:

Android: Insta Gold is primarily designed for Android devices. You can download the Apk file from various websites and install it manually. However, be cautious about the source and ensure it's trustworthy.
iOS: Unfortunately, Insta Gold isn't officially available for iOS devices.
2. Your Phone's Compatibility:

Even if you have an Android phone, its specific model and operating system version might not be compatible with Insta Gold. Check the app's compatibility requirements before downloading it.

3. App Version:

Different versions of Insta Gold might have varying functionality and compatibility. Ensure you download the latest version for optimal performance and feature availability.

4. Features:

As mentioned earlier, Insta Gold offers various features not available in the official Instagram app. However, the specific features might vary depending on the app version and your device's compatibility.

To determine if you can use Insta Gold on your phone and access its features, here's what you should do:

Identify your phone's model and operating system version.
Check the Insta Gold Apk's compatibility requirements.
Download the latest version of Insta Gold Apk from a trusted source.
Install the Apk file on your phone.
Open the Insta Gold app and try accessing the features you're interested in.
Here are some additional points to consider:

Using modified versions of apps like Insta Gold can be risky. They might contain malware or expose your personal information to unauthorized parties.
Instagram might ban your account for using unauthorized third-party apps.and get form https://instaproandroid.com/instagram-gold-apk/
These modified apps might be unstable and prone to crashes and bugs.
Therefore, it's crucial to weigh the risks and benefits before downloading and using Insta Gold on your phone. Consider using the official Instagram app for a safer and more secure experience.
what is API
Tags: programming, webdev, javascript, api
Published: 2023-12-08 19:36:52

**Introduction: The Backbone of Connectivity**

  Application Programming Interfaces (APIs) are the hidden heroes of seamless communication and connectivity in the rapidly changing world of digital technology. APIs are essential to the development of the digital ecosystem because they allow easy communication between applications and offer developers a consistent interface.

**Understanding APIs**

At its core, an API serves as a bridge between different software systems, allowing them to communicate and share data in a structured manner. It takes away the complexity of the underlying code by embedding a set of rules and protocols that specify how applications should communicate with one another. This helps to create software structures that are both scalable and adaptable, while also improving efficiency.


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

**The Types of APIs**

Different forms of APIs exist, each designed for a particular use case. HTTP protocols are used by RESTful APIs, also referred to as Web APIs, to facilitate web communication. System APIs communicate with operating systems to provide hardware interaction, while Library APIs expose the features of libraries and frameworks. Knowing these differences enables developers to select the best API for their application.

**Example of using Api: Slack**

Slack is a cloud-based communication and collaboration platform that enables teams to communicate effectively and work together remotely. The Slack API is quite similar to the Discord API as developers can use Slack API to build custom bots that can automate repetitive tasks or provide specific information to Slack users. For example, a team can build a bot that fetches weather information for a specific location or a bot that sends reminders for upcoming deadlines.

**Security Concerns: Safeguarding the Integrity of APIs**

Strong security measures are essential as APIs become more and more essential for data interchange and system integration. To ensure the security of interconnected systems, authentication procedures, encryption protocols, and access controls must be carefully designed to reduce the risk of unwanted access and data breaches.

**Conclusion: Navigating the Digital Landscape with Confidence**
 
APIs become crucial elements in the quickly changing digital age that promote innovation, networking, and system unity. A thorough understanding of APIs becomes essential as firms embrace digital transformation and continue to evolve. Organizations can confidently traverse the digital world by utilizing APIs responsibly and securely, paving the way for a seamless future of collaboration and communication.


**sources**

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Introduction'
https://www.postman.com/what-is-an-api/#:~:text=APIs%20work%20by%20sharing%20data,by%20interacting%20with%20an%20application.
https://en.wikipedia.org/wiki/API
Advent of Code 2023 - December 8th
Tags: advent, adventofcode, python, december
Published: 2023-12-08 19:35:52

---
title: Advent of Code 2023 - December 8th
published: true
description: My progress with the 2023 version of Advent of Code
tags: advent, adventofcode, python, december
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36qayk14ewje7rvykeg5.jpg
series: Advent of Code 2023
# published_at: 2023-12-01 17:41 +0000
---

In this series, I'll share my progress with the 2023 version of [Advent of Code](https://adventofcode.com/2023).

Check the first post for a short intro to this series.

You can also follow my progress [on GitHub](https://github.com/robvanderleek/adventofcode).

## December 8th

[The puzzle of day 8](https://adventofcode.com/2023/day/8) was not so hard. I like graph problems, although this was pretty basic.

__My pitfall for this puzzle:__ I have no clue how to find the number that's a common factor for all path lengths. Something similar to Greatest Common Divisor, but what :shrug:. In the end a brute force approach worked and doesn't take that long on my M1 laptop.

{% spoiler Solution here, do not click if you want to solve the puzzle first yourself %}

```python
#!/usr/bin/env python3
import math

with open('input.txt') as infile:
    lines = infile.readlines()
directions = [d for d in lines[0].strip()]

graph = {}
for line in lines[2:]:
    parts = line.strip().split(' = ')
    targets = parts[1][1:-1].split(', ')
    graph[parts[0]] = {'L': targets[0], 'R': targets[1]}

dir_idx = 0
steps = 0
nodes = [n for n in graph.keys() if n.endswith('A')]
finished = []
while len([n for n in nodes if not n.endswith('Z')]) > 0:
    steps += 1
    for idx, n in enumerate(nodes):
        if idx in [f[0] for f in finished]:
            continue
        nodes[idx] = graph[n][directions[dir_idx]]
        if nodes[idx].endswith('Z'):
            finished.append((idx, steps))
    if dir_idx < len(directions) - 1:
        dir_idx += 1
    else:
        dir_idx = 0
for f in finished:
    print(f'Finished node {f[0]} in {f[1]} steps')

highest = max([f[1] for f in finished])
total = highest
while True:
    all_divisors = True
    for f in finished:
        if total % f[1] != 0:
            all_divisors = False
    if all_divisors:
        break
    else:
        total += highest
print(total)
```

{% endspoiler %}

That's it! See you again tomorrow!
HTML vs XML
Published: 2023-12-08 19:32:24

## What is HTML and XML?

**HTML**
HTML is short for HyperText Markup Language and is the basis for website building. It defines the structure of a website. It is often assisted by technologies such as CSS and JavaScript.

> Here is an example of HTML
```
<!DOCTYPE html>
<html>
<head>
<title>HTML vs XML</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
```
HTML was Developed by: WHATWG and W3C (World Wide Web Consortium).

**XML**
XML is short for Extensible Markup Language and is a file format for storing, transmitting, and reconstructing arbitrary data. XML is a markup language much like HTML. It was designed to store and transport data.

> Here is an example of XML
```
<note>
  <to>HTML</to>
  <from>XML</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
```
XML was Developed by: W3C (World Wide Web Consortium).

## So what's the Difference?

XML was designed to carry data - with a focus on what data is, while HTML was designed to display data - with a focus on how data looks.
HTML works with predefined tags like `<p>`, `<h1>`, `<table>`, etc. With XML, the author must define both the tags and the document structure.


> Sources
[W3Schools](https://www.w3schools.com/xml/xml_whatis.asp)
Daily UI Day 1 - Sign up
Tags: codepen, webdev, dailyui, frontend
Published: 2023-12-08 19:10:38

I've joined a daily challenge by [DailyUI](https://www.dailyui.co/)

Check out my design on Dribbble here: [Daily UI Day 1 - Sign Up](https://dribbble.com/shots/23211175-Daily-UI-Day-1-Sign-up)

And the source code at Codepen: [Daily UI Day 1 - Sign Up]
(https://codepen.io/audricat/pen/abXMvGM?editors=1100)

{% codepen https://codepen.io/audricat/pen/abXMvGM %}
Release - Open Source Project(w. Movex )
Published: 2023-12-08 19:10:12

#### Intro

I got to know [Movex](https://github.com/movesthatmatter/movex) project during `Hacktoberfest` and kept contributing to the project. I planned to create the PR for `Codu` as I already posted my planning and progress, however, there was no luck and I wasn't able to create the PR. Thus, I found a smaller issue that I can deal with quickly before the semester is done. 

#### Issue

When I was working for `Movex`, I found there were a couple of `linting` issues and I wanted to fix the issue, and I think this is a good time to get back to that. First, I created the [issue](https://github.com/movesthatmatter/movex/issues/194) as nobody wrote it up, and I saw the linting issues on 4 different files when I run the command `npx nx lint movex --quiet `. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyoc4k3uropfj92sgg4a.png)

#### Solution
##### gameReducer.ts
Before
```ts
type ReconciledStateReturn<S extends any> = false | true | [true, S];
```
After
```ts
type ReconciledStateReturn<S> = false | true | [true, S];
```
The error was `Containing the generic type 'S' to 'any' does nothing is unnecessary` and I simply removed `extends any` and the issue is gone.

##### MockConnectionEmitter.ts
```ts

export class MockConnectionEmitter<
  // TState extends any = any,
  TState = any,
  TAction extends AnyAction = AnyAction,
  TResourceType extends string = string
> implements EventEmitter<IOEvents<TState, TAction, TResourceType>>```

The same issue happened and the commented line had `extends any` caused the issue and I removed it.

##### orchestrator.ts
```ts
  let unsubscribe = async () => {};
```
Also, there was the issue about `Unexpected empty async arrow function` and this function was reused in the component. When I removed the line it affected the remaining code and I didn't want to destroy the project and I simply put `@typescript-eslint/no-empty-function` above the code. 


#### Summary

During `OSD600` course, I learned a lot of practical things, which will be helpful when working with a team. It was a good recap of `Git` and I could contribute to a few open-source projects based on what I learned. I'm 100% satisfied with this journey, and I will keep an eye on open-source projects if there's anything that I can contribute to.
Unraveling the Java Tapestry:
Published: 2023-12-08 18:56:57

 
Welcome, fellow code voyagers! Today, we embark on a journey through the intricate tapestry of Java, unraveling its threads beyond the conventional syntax. Join me as we explore the heart of Java, from the rhythmic dance of the Java Virtual Machine to the vibrant colors of Object-Oriented Programming.

1. Java Symphony: A Dance with the Virtual Machine
Picture the Java Virtual Machine as the conductor of a grand symphony, orchestrating the seamless execution of our code. In this section, we'll don our musical hats and delve into the rhythmic beats of the JVM, understanding how it transforms our code into a harmonious bytecode melody. Let's explore the symphony of platform independence and the enchanting dance of the compilation process.

2. Types in Java: Casting a Palette of Possibilities
Java's palette of types is more than a canvas for variables; it's an artist's toolkit. Join me as we paint with the hues of primitive and non-primitive types. We'll blend the colors of data types, exploring how type declarations shape our code's personality. In this section, we'll appreciate the artistry behind choosing the right type for the right occasion, creating a masterpiece of code efficiency.

3. Primitive vs. Non-primitive: A Brushstroke of Memory
Dive into the canvas of memory allocation as we distinguish between the bold strokes of primitives and the intricate details of non-primitives. Discover how memory becomes a canvas for our code, and learn the delicate art of choosing the right brushstroke for the occasion. Through vivid examples, we'll showcase how memory allocation is not just a technicality but an expression of code craftsmanship.

4. Object-Oriented Poetry: Verses of Versatility
Enter the world of Object-Oriented Poetry, where classes and objects waltz in an elegant dance of abstraction and encapsulation. In this section, we'll appreciate the verses of versatility, unraveling the narrative of inheritance and encapsulation as they bring life to our code. Prepare to be enchanted by the lyrical beauty of Object-Oriented Programming.

5. The 4 Pillars: A Play in Four Acts
Imagine the 4 Pillars of OOP as characters in a play, each bringing its unique flavor to the stage. Join me as we witness the drama of Inheritance stealing the spotlight, Encapsulation guarding its secrets, Abstraction playing hide-and-seek, and Polymorphism dazzling the audience with its versatility. In this theatrical section, we'll explore OOP as a captivating performance that elevates our code to a story worth telling.

Conclusion: Java, a Tapestry of Endless Creativity
As we conclude our artistic exploration of Java, remember that beyond the syntax and technicalities, coding is an art form. Each line of code is a brushstroke on the canvas of creativity. So, fellow coders, embrace the artistry of Java, let your code be a masterpiece, and may your programming journey be a tapestry woven with passion, curiosity, and endless creativity.
Launching Python Course for Beginners 👾
Published: 2023-12-08 18:45:05

Hello everyone,

I'm excited to share with you a project that's been a significant part of my journey: the creation of "Python in 30 Days for Beginners." This course isn't just another addition to the myriad of learning resources out there; it's a culmination of my experiences and a reflection of my passion for teaching and programming.

## The Genesis of the Course

Having been involved in creating educational content for the past three years - from writing detailed blog posts to producing instructional YouTube videos - I realized the impact and importance of quality education in tech. Witnessing the growth and enthusiasm of learners on these platforms inspired me to create something more structured and comprehensive.

## Why Python?

Choosing Python as the focus of this course was a deliberate decision. Its versatility, readability, and wide application in various fields like web development, data analysis, AI, and automation make it an ideal language for beginners. My aim was to create a friendly gateway into the world of programming for those who might feel overwhelmed by it.

## What Does the Course Offer?

"Python in 30 Days for Beginners" is designed to take you from zero to hero. It’s structured to provide a solid foundation, covering everything from basic syntax to advanced features. But it's not just about theory; the course emphasizes hands-on learning with real-world projects, ensuring that you gain practical skills and confidence.

## Building a Community

A key aspect of this course is community building. Learning alongside peers, sharing experiences, and receiving guidance from experienced instructors enhances the learning process. The course is designed to foster this sense of community and support among learners.

## A Course for Everyone

This course is crafted for beginners with no prior experience in programming. It's structured to be flexible, accommodating different learning paces with a mix of video tutorials, interactive coding sessions, and comprehensive resources. Expert instructors with real-world experience bring valuable insights, making learning both effective and engaging.
## Conclusion

Creating this course has been a journey of learning, not just for the students, but for myself as well. Every hour spent on developing materials, recording lessons, and interacting with students has been a step forward in my own understanding of programming and teaching.

I'm thrilled to offer this course to anyone looking to step into the world of Python programming. If you have any questions or thoughts, feel free to reach out!

Link: https://grzegorzpiechnik.gumroad.com/l/python-course
JS - Functions
Published: 2023-12-08 18:44:32

```
//function declaration
function calcAge1(birthyear){
return 2037- birthyear;
}

//function expression 
const calcAge2 = function(birthyear){
return 2037- birthyear;
} 
```

**NOTE** -> When passing arguments to a function -> for a primitive type only the value is passed but for an object the reference itself that is the whole object itself is passed and so an object carries the changes what a function makes in it.


**Function**

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


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


**Call and Apply Methods**


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

Here after storing the book method of lufthansa object in book constant it behaves as a function outside that object and for the this method to access the object whose values are needed in that function we use the .call function.


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

**Higher Order Function:**
Higher-order function is a function that accepts another function as an argument or returns a
function as a return value or both.
const firstOrderFunc = () => console.log ('Hello, I am a First order function');
const higherOrder = ReturnFirstOrderFunc => ReturnFirstOrderFunc();
higherOrder(firstOrderFunc);

**First Order Function:**

First-order function is a function that doesn’t accept another function as an argument and
doesn’t return a function as its return value.
const firstOrder = () => console.log ('I am a first order function!');
Hooked Book #1 - The habit zone
Tags: design, books, resume, habit
Published: 2023-12-08 18:02:30

_Habit formation is good for business in several ways, but are good for our society?_

The author highlight 6 key points:

1. Not all business require a huge user engagement but for some forming habits is a critical component of success.

2. Former string user habits can have several business benefits like higher CLTV (Customer Lifetime Value), greater pricing flexibility, max growth and a sharper competitive edge.

3. Behavior occurs in the habit zone with high frequency and perceived utility.

4. Some of this products start like a nice to have and ends like a must have product.

5. Products alleviate users pains and problems.

6. Designing habit-forming products is a form of manipulation. Products builders must ensure that they are hooking users with healthy habits, not with unhealthy addictions.

The last point is the key one for me. Are these companies thinking on that, or are they just in it for the business? 

A crucial aspect here is the business model of that companies. A standard and vital metric for some of the most used apps is the time users spend on the app and the intervals between uses of that app.

So, if they are trying to maximize their gains by growing these key metrics, are they thinking about the health of their users?

The answer to this question takes us to a society where more and more people are hooked on a screen from a very early age.

_And now I go back to the beginning... Is this good for our society?_