teleren/devto huggingface dataset:
(2/n) Skill issues with event loop
Tags: rust, redis, learning, programming
Published: 2024-02-18 13:51:23

[Previously on Avatar....](https://dev.to/yusufpapurcu/1n-my-adventure-of-implementing-redis-in-rust-41i0)

## Move closure
Everything was going cool until the task "Handle concurrent clients" come along. My first intention was just spawning a thread for every request and calling it a day. But while writing I realised I was using this move closure but didn't dig deeper what it **exactly** means.
```rust
std::thread::spawn(move || handle_connection(&mut _stream));
```

[What I did was going directly to Holy Rust Book and searching for the usages of move closure and found it!](https://doc.rust-lang.org/book/ch16-01-threads.html?highlight=move#using-move-closures-with-threads)

(Yes it was my skill issue to realise we are passing the ownership into spawned thread)

## I want a different way of handling concurrent clients
Actually it was a different suggestion in the task, it was saying the original redis implementation uses "event loop" so maybe I can try that out too. Also spamming a new thread per request was not satisfying enough for my curiosity on the topic after hearing there is another way to do it.

I started searching videos, blogs and talks about the topic. Here is two that helped me understanding the concept.
- [What the heck is the event loop anyway? | Philip Roberts | JSConf EU](https://www.youtube.com/watch?v=8aGhZQkoFbQ)
- https://rohitpaulk.com/articles/redis-3

The problem was the ruby equivalent of `IO.Select` was not exists in the Rust std library. But luckily I found it under tokio!

https://github.com/tokio-rs/mio

It even had the simple example I needed! But wait a second, it's not working...

(after digging it for 30m I gave up and moved on)

(but one day in future I will get back and learn how to use mio's event loop implementation)
React Native Introduction for starters
Tags: reactnative, javascript, programming, beginners
Published: 2024-02-18 13:32:41

**Embarking on the React Native Journey: A Developer's Perspective**

As a seasoned React Native developer with two years of hands-on experience, I've witnessed the transformative power of this cross-platform framework in the realm of mobile application development. React Native has become more than just a technology; it's a game-changer for developers seeking efficiency, scalability, and a seamless user experience across various devices.

**Introduction to React Native: Unleashing the Power of Cross-Platform Development**

In the ever-evolving landscape of mobile app development, React Native stands out as a beacon of innovation. Born out of Facebook's desire to create a framework that merges the best of web and mobile development, React Native has rapidly gained popularity for its ability to build robust, high-performance applications for both iOS and Android platforms.

**How React Native Works: Bridging the Gap Between Web and Mobile**

At its core, React Native leverages the power of JavaScript and React to enable developers to build natively rendered mobile applications using familiar web development techniques. The framework employs a "learn once, write anywhere" philosophy, allowing developers to use a single codebase to create applications that run seamlessly on multiple platforms. React Native achieves this through its unique architecture, utilizing a bridge to communicate between JavaScript code and native modules.

**Why Choose React Native for Mobile Application Development**

The decision to adopt React Native goes beyond mere convenience; it's a strategic choice for developers and businesses alike. Offering a faster development cycle, cost-effectiveness, and the ability to maintain a single codebase, React Native significantly streamlines the mobile app development process. Moreover, its extensive library of pre-built components, along with a vibrant community and continuous updates, ensures that developers stay ahead in the ever-evolving mobile landscape.
Creating A Menu (Cosplore3D Pt:17)
Tags: go, gamedev, learning
Published: 2024-02-18 13:30:00

## Intro
This is a series following [Cosplore3D](https://github.com/Chig-Beef/Cosplore3D), a raycaster game to learn 3D graphics. This project is part of 12 Months 12 Projects, a challenge I set myself. There are not many games that can get away with throwing you straight in, they usually include some sort of menu system, which is exactly what we're going to be implementing.

## Menu Struct
Here's what I've created for a menu.
```golang
type Menu struct {
    buttons []*Button
}

func (m *Menu) update(g *Game) {
    for i := 0; i < len(m.buttons); i++ {
        if m.buttons[i].check_click(float64(g.curMousePos[0]), float64(g.curMousePos[1])) {
            m.buttons[i].onClick(g, m)
            break
        }
    }
}

func (m *Menu) draw(screen *ebiten.Image, g *Game) {
    text.Draw(screen, "Cosplore3D", g.fonts["title"], screenWidth/2.0-240, 80, color.RGBA{255, 255, 255, 255})

    for i := 0; i < len(m.buttons); i++ {
        m.buttons[i].draw(screen, g)
    }
}
```
All the menu really is right now is a container for a bunch of buttons, and also has the ability to draw whatever we want on the screen (in this case, text). This will now show a title and a play button, which will put us right into the game, just as we had before.

## Designing The Menu
We have a functional menu, but it honestly looks terrible. Cosplore3D is based off of a text based game I started (and never finished) making. Cosplore was going to be similar to idle games, making it very simple to implement. It would also run right in your console, so it would be very easy to play. When I created the starting screen for Cosplore, I had ASCII art of a planet with the title "Cosplore" over the top. I want to bring this feel into this design.

![The menu for Cosplore3D](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lh3610u137cg68bprgv1.png)

Honestly, better than I thought it would end up looking. I made the image of the planet slightly transparent so that it was darker, allowing the title to be more visible. And I also know that the play button looks terrible, but don't worry, I'm leaving it like that until I make more buttons, because if I make it look good but that doesn't look good when it says "settings", then I've messed up and wasted time.

![The menu, but now with a setting button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzbcbrh21vhd80rtwl5x.png)

I ended up wasting time anyway by adding the settings button. I think a design I would like to end up on would be a fading rectangle behind the text, but for now I'll leave it as is.

I'm not going to start putting stuff in the settings page without planning it first, I would like to write a list of things that I think would be helpful and _then_ create the page.

## Next
I've been putting it off but I think it's time to create our first boss. The boss fight of Enikoko needs art, general implementation (as all enemies), and extra abilities that make the boss fight interesting. We've been taking little steps lately to clean up the game (slightly), but now we're going to go back into adding a large feature.
1920. Build Array from Permutation (leetcode: easy)
Tags: java, leetcode, easy, dsa
Published: 2024-02-18 13:22:58

## INTRODUCTION
It's an leetcode easy type question and it is related to array in java.
**PROBLEM**

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

## Problem Details
Here they gave an array. I have to create an new array of same length. And the new array index values are, newArray[index] = nums[nums[index]]. That's it.

## Examples

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

**Example 2:**

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

## Steps
1. Create a new array of same size using (.length) 
2. Run a for loop from 0 to (lenght-1)
3. Store the value, temp[index] = nums[nums[index]].
4. return the new array.

## Code

```
class Solution {
    public int[] buildArray(int[] nums) {
        int temp[] = new int[nums.length];
        for(int i = 0; i<nums.length; i++){
            temp[i] = nums[nums[i]];
        }
        return temp;
    }
}
```

##OUTPUT


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1wmhjddrncdo6je0w56l.png)
How to test open graph meta tags locally ?
Tags: webdev, seo
Published: 2024-02-18 13:16:43

I have a created a chrome extension thats let you preview your meta tags. [Localhost Open Graph Tester](https://chromewebstore.google.com/detail/localhost-open-graph-test/nggoiohoonibebildpjhlaakfoccpfln) hosts your meta tags on a seperate website and gives you the link to preview test.

Just click the extension icon on the development site , it will open a new tab with the link for you to share.

> Local images won't share directly, upload the images in [postimages](https://postimages.org/) or [imgbb](https://imgbb.com/) first, use the url in the meta tags. Then click the extension again to create a new sharer link!

### How this extension works ?
When you click the extension we copy the meta tags of the active tab and host it in different domain, where it will be available for the internet.

It also helps you debug your tags easily. I have attached a sample `dev.to` where you can see the hosted tags in a table. Peep at the [Source code](https://github.com/ShrihariMohan/og-tester)

![Sample devto 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiymwq7wyrqd0lacrgic.png)



This extension saves the hassle of ngrok tunnels or public URLs. Simply click the extension icon to instantly test your OG tags on localhost. If this extension helps you [Rate us](https://chromewebstore.google.com/detail/nggoiohoonibebildpjhlaakfoccpfln) 


---

## Important Links 
1. [Source code](https://github.com/ShrihariMohan/og-tester) 
2. [Chrome Extension](https://chromewebstore.google.com/detail/nggoiohoonibebildpjhlaakfoccpfln)
3. [Localhost open graph tester - Home](https://localhost-og-checker.vercel.app/)


![Filler Image ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbzxuulweiwn479w5u4a.jpeg)
Task-2
Published: 2024-02-18 13:12:30

1)	Boundary Value Analysis
As the word “Boundary” denotes edge or corner. In testing the input values used for the testing purpose is taken from the boundary.
Example:1
If we have to check the value of mobile numbers in india, it should have ten digits.
So the number should be between, 1 and 9
Here the Boundary values are-1, 0, 1, 8,9,-9
To validate the phone numbers separate function should be implemented
The Boundary value testing should pass in as per the requirement.
Any failure in above case will be “Test Case Failure”

2)	Decision Table Testing
This type of technique is used to identify and observe how the system performs when a combined inputs are given to the system for processing.
This type of testing is performed during the black box design technique
A decision table is prepared with all the possible inputs
Example:2 Checking Indian Mobile Numbers
Conditions	1	2	3	4	Actions
Valid Mobile Number	Numbers length should be 10 digits 	Numbers ranging from 1 to 9			Pass
In Valid Mobile Number	Numbers start from 0	Numbers start from 1.0	Numbers with +, -  or ends +, -	Numbers having 000000000 at the end	Fail


3)	Use Case Testing
Use case testing is a black box testing technique
In Use Case Testing the user performs the test whether the system behaves in the intended way which is designed for the user.
The Use Case Testing will be performed by the user or the customer at the client place before its deployment.
It is performed on how well the system performs in the real time environment.
All the conditions are checked for the valid and the invalid inputs.
All the functionality will be checked based on the inputs provided by the user. 
Example:3 Performing the Indian Mobile number inputs
Condition	Input	Actual	Expected	Result
Input 10 digits number	4072863866	Accept	Accept	Pass
Input 9 digit numbers	543675324	Reject	Reject	Pass
Input numbers starting with 0	0235467421	Reject	Reject	Pass
Input numbers starting with 1 followed by 000000000	1000000000	Accept	Reject	Failure


4)	LCSAJ Testing
Linear Code Sequence and Jump is a white Box testing technique, which are being performed on the code of the product.
LCSAJ Testing is used to validate the coding of the program from the beginning to the end of the code which is being executed.
It is used to confirm that full statement of coverage is performed.
It is used to confirm that full branch coverage is performed.
It is used to confirm that full function coverage is performed.
It is used to confirm that full condition coverage is performed.
Example : 4 Performing the valid Indian Mobile number from the Inputs
Coverage	Statement	Branch	Function	Condition	Condition	Result
Executed	Yes	Yes	Yes	Yes	Yes	Pass
Not Executed	Yes	No	Yes	Yes	Yes	Failure
Not Executed	No	No	No	No	No	Failure
Not Executed	Yes	Yes	No	Yes	Yes	Failure
Not Executed	Yes	Yes	Yes	No	Yes	Failure
Not Executed	Yes	Yes	Yes	Yes	No	Failure
Unveiling Shreyas Kapale: A Journey Through Technology and Innovation
Tags: technology, innovation, programming, robotics
Published: 2024-02-18 12:51:47

In the realm of technology and innovation, Shreyas Kapale stands as a beacon of inspiration. His profound interests in programming, robots, space, physics, and math have shaped his remarkable journey in the tech world.

## Exploring the Depths of Image Processing and Programming

Shreyas Kapale's blog on image processing and programming serves as a treasure trove of knowledge and insights. Delving into the intricacies of image manipulation and coding, his blog showcases his expertise and passion for the subject.

## Illuminating Talks on Cutting-Edge Topics

From wireless network pentesting to programming for teens and delving into the realm of neural networks, Shreyas Kapale's talks have captivated audiences worldwide. His ability to simplify complex concepts and make them accessible to all is truly commendable.

## Nurturing Innovation Through Organizational Leadership

As a mentor at Science Hack Day Belgaum, President at PyGIT Belgaum, and Student Coordinator at PyData Belgaum, Shreyas Kapale plays a pivotal role in nurturing innovation and fostering a culture of learning and growth. His involvement in the Rotary Club GIT Belgaum further exemplifies his commitment to community service and leadership.

## Pioneering Research in Technology and Health

Shreyas Kapale's papers on image processing in nutrition and heart disease analysis using IoT showcase his dedication to leveraging technology for the betterment of society. His innovative research initiatives pave the way for groundbreaking advancements in the fields of healthcare and technology.

## #Technology #Innovation #Programming #Robotics #SpaceExploration #Physics #Mathematics #ImageProcessing #NeuralNetworks #CommunityService #Leadership #Research #HealthTech

In conclusion, Shreyas Kapale's journey is a testament to the power of passion, innovation, and dedication in shaping a brighter future. His contributions to the tech world and society at large are truly invaluable.
SQL Bootcamp: Beginner to Advanced Course
Tags: sql, database, bootcamp, sqlbootcamp
Published: 2024-02-18 12:49:03

the SQL Bootcamp course, created by  [AlexTheAnalyst](https://www.youtube.com/@AlexTheAnalyst) and This comprehensive course takes you from beginner to advanced levels in SQL, providing essential skills and techniques for data manipulation and analysis.
[SQL Bootcamp: Beginner to Advanced Course](https://youtu.be/L0Rc73nMPsk?si=bIR3pt5TID7WFMOS)
Whiteland Sector 103 and Whiteland Urban Resort: The Perfect Place to Live and Relax
Tags: discuss, news, web3, realestate
Published: 2024-02-18 12:40:41

If you're looking for a place to call home or a destination to unwind and relax, Whiteland Sector 103 and Whiteland Urban Resort are the perfect choices for you. Located in the heart of Gurgaon, these two developments are among the most sought-after residential and leisure destinations in the city.

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

**_[Whiteland Sector 103](https://whitelandsproject.net/whiteland-sector-103-gurgaon/)_** is a residential project that offers a range of apartments and villas to suit every lifestyle and budget. The project is spread over 14 acres of land and comprises of 650 units. It offers a range of amenities, including a clubhouse, swimming pool, gymnasium, and landscaped gardens. The project is strategically located and is easily accessible from all major parts of the city.

Whiteland Urban Resort, on the other hand, is a luxurious leisure destination that offers a range of facilities to help you relax and rejuvenate. The resort is spread over 5 acres of land and comprises of 50 rooms, each of which is designed to offer the utmost comfort and luxury. It offers a range of facilities, including a spa, swimming pool, restaurant, and conference hall.

Both Whiteland Sector 103 and Whiteland Urban Resort are built to the highest standards of quality and luxury. They are designed to offer residents and guests a comfortable and luxurious lifestyle. The projects are equipped with the latest amenities and facilities, which make them the perfect choice for those who want to live or spend time in luxury and comfort.

In conclusion, Whiteland Sector 103 and **_[Whiteland Urban Resort](https://whitelandsproject.net/whiteland-urban-resort-sector-103-gurgaon/)_** are two of the most sought-after residential and leisure destinations in Gurgaon. They offer residents and guests a range of amenities and facilities that ensure a comfortable and luxurious lifestyle. So, if you're looking for a place to call home or a destination to relax and unwind, look no further than Whiteland Sector 103 and Whiteland Urban Resort.
Harvard's CS50 Cybersecurity Bootcamp - Full Cybersecurity University Course
Tags: cybersecurity, cs50, harvardcs50, webdev
Published: 2024-02-18 12:38:52

An introduction to cybersecurity for technical and non-technical audiences alike. Learn how to secure your accounts, data, systems, and software against today’s threats and how to recognize and evaluate tomorrow’s as well, both at home and at work. Learn how to preserve your own privacy. Learn to view cybersecurity not in absolute terms but relative, a function of risks and rewards (for an adversary) and costs and benefits (for you). Learn to recognize cybersecurity as a trade-off with usability itself. Course presents both high-level and low-level examples of threats, providing students with all they need know technically to understand both. Assignments inspired by real-world events.

[Harvard's CS50 Cybersecurity Bootcamp - Full Cybersecurity University Course](https://youtu.be/oVEXLehlKxg?si=GBrvP5DOc6iXhjgx)
Net88 - Link Trang Chủ Nhận Code 188k
Published: 2024-02-18 12:35:03

Vuasanca khong chi la don vi cung cap tro choi ban ca doi thuong, ma con la san choi dang tin cay cua hang trieu nguoi ham mo tren khap Chau A.
Dia Chi: 290 Duong Vinh Vien, Phuong 4, Quan 10, Thanh pho Ho Chi Minh, 72500, Viet Nam
Email: vuasancaco@gmail.com
Website: https://vuasanca.co 
Dien Thoai: (+63) 9621314073
#vuasanca #vuaca #vuaca2023 #vuacavip
Social Links:


https://vuasanca.co/
https://vuasanca.co/dang-ky-vuasanca/
https://vuasanca.co/nap-tien-vuasanca/
https://vuasanca.co/rut-tien-vuasanca/
https://vuasanca.co/tai-app-vuasanca/
https://vuasanca.co/ceo-thuy-trang/
https://vuasancaco.blogspot.com/
https://vuasancaco.weebly.com/
https://www.facebook.com/vuasancaco/
https://twitter.com/vuasancaco
https://www.youtube.com/channel/UCo5v7ImSN4yOmTGo1sJcRQg
https://www.pinterest.com/vuasancaco/
https://social.msdn.microsoft.com/Profile/vuasancaco
https://social.technet.microsoft.com/Profile/vuasancaco
https://vimeo.com/vuasancaco
https://github.com/vuasancaco
https://www.blogger.com/profile/04637767564599903713
https://www.reddit.com/user/vuasancaco/
https://gravatar.com/vuasancaco
https://soundcloud.com/vuasancaco
https://medium.com/@vuasancaco/about
https://www.flickr.com/people/vuasancaco/
https://www.tumblr.com/vuasancaco
https://vuasancaco.wixsite.com/vuasancaco
https://sites.google.com/view/vuasancaco/trang-ch%E1%BB%A7
https://www.behance.net/vuasancaco
https://draft.blogger.com/profile/04637767564599903713
https://www.liveinternet.ru/users/vuasancaco/profile
https://linktr.ee/vuasancaco
https://www.twitch.tv/vuasancaco/about
http://tinyurl.com/vuasancaco
https://ok.ru/vuasancaco/statuses/155829874797988
https://profile.hatena.ne.jp/vuasancaco/profile
https://issuu.com/vuasancaco
https://dribbble.com/vuasancaco/about
Unveiling Shreyas Kapale: A Multifaceted Technophile
Tags: shreyaskapale, techenthusiast, innovationmaven, communityengagement
Published: 2024-02-18 12:32:14

In the realm of technology enthusiasts, Shreyas Kapale shines as a beacon of innovation and expertise. Delving into his world reveals a tapestry woven with a passion for programming, robotics, space exploration, physics, and mathematics. His interests extend beyond the confines of conventional boundaries, encompassing a love for building things and a penchant for computer games. Shreyas Kapale's intellectual prowess is not confined to personal pursuits; he actively engages with the community through insightful talks and mentorship roles. His speaking engagements span a diverse array of topics, ranging from pentesting wireless networks to delving into the realms of artificial intelligence for heart disease detection. As a mentor and organizational leader, Shreyas plays a pivotal role in fostering a culture of learning and collaboration. Fluency in multiple languages - English, Hindi, Kannada, and Marathi - underscores Shreyas's ability to connect with a wide audience, transcending linguistic barriers. His affiliations with esteemed organizations such as Science Hack Day Belgaum and PyGIT Beglaum exemplify his commitment to driving technological advancements and knowledge sharing. Academic contributions form another cornerstone of Shreyas's endeavors, with notable papers on image processing in nutrition and heart disease analysis using IoT. These research undertakings underscore his dedication to leveraging technology for societal betterment. In essence, Shreyas Kapale epitomizes a modern-day technophile, blending technical acumen with a passion for innovation and community engagement. His journey serves as an inspiration for aspiring technologists and underscores the transformative power of technology in shaping a better tomorrow.
butter lamb
Published: 2024-02-18 12:31:48

Indulge in the rich and savory flavors of our delectable [butter lamb](https://dunedinpunjabikitchen.co.nz/product/qeema-matar-butter-lamb-mince/) dish at our restaurant in Dunedin. Slow-cooked to perfection and simmered in a velvety butter sauce, our butter lamb is a culinary masterpiece that's sure to tantalize your taste buds. Each tender bite is infused with the aromatic spices of Indian cuisine, creating a symphony of flavors that will leave you craving more. Whether you're a fan of traditional Indian fare or simply looking to explore new culinary delights, our butter lamb is a must-try dish that promises to satisfy your cravings and leave you wanting seconds. Join us at our restaurant and treat yourself to an unforgettable dining experience featuring the exquisite taste of our butter lamb dish.
Data Science Bootcamp - Full Course for Beginners
Tags: datascience, bootcamp, python, fullcourse
Published: 2024-02-18 12:30:24

The ultimate free data science course created by Barton Poulson from datalab.cc! Whether you're a beginner or an experienced data enthusiast, this comprehensive course is designed to equip you with the foundational knowledge needed to thrive in the world of data science.
[Data Science Bootcamp - Full Course for Beginners](https://youtu.be/V8KuuM2Zl2g?si=phX-pDJy9fXuYjwE)