teleren/devto huggingface dataset:
Microblogging site using MERN stack
Tags: javascript, react, mongodb, mern
Published: 2023-03-22 15:23:05

Hello everyone.
Real life projects is the one of the most effective method of learning programming and that is what I have doing since the earliest days of hello world, when I started to learn about programming and trust me it is very effective.

Through out my entire programming journey I have always wanted to create micro-blogging platform, some place where people would share their ideas and knowledge this has been a life time mission and  I have tried to accomplish it so many times using several technologies and final I can say this.

Welcome to oteleo.com
Noteleo is microblogging platform intended for anyone who has the passion of writing and reading ideas and bringing the into life. It does not have to be long essay  it can be anything from how to guide, experience sharing,  and even shot stories and long ones.
Our platform is  open for anyone to contribute and consume the content so I would like to take this opportunity to encourage you to write your ideas because we believe every ideas is worth sharing and it can open so many possibilities of making the world the better place or influence and motivate someone to be great and to achieve more in this life.

Noteleo is built using react.js on the front-end and the backend runs on node.js backed up with MongoDb (MERN Stack). It was fun and bit challenging to create microblogging site using this stack, throughout this entire quest  I have learned a lot about MongoDb.
Some parts were kind of challenging like follow and followed relationships and retrieving posts from people that I have followed but it was worth is and very entertaining.

I would like to take this opportunity to invite you to share your ideas in this platform.
Here is the link https://noteleo.com
How to take a look at compilation error in Python?
Published: 2023-03-22 15:18:43

At the time of compilation, the gadget exams the supply code. Now if there is any fault or violation of programming conference or you can say violation of language's guidelines [topic](https://survivalop.com/how-long-does-spam-last-in-the-fridge/	) then compilation stops and machine offers us compilation error.
My Coding Journey.
Tags: webdev, javascript, beginners, codenewbie
Published: 2023-03-22 14:59:14

Hello everyone, this is my first time writing a blog. So, excuse me for any mistakes that I may make while writing this blog post. I just wanted to write a blog just so that I could share my coding journey, my web development learning journey with the rush of the world. Because I believe that this will give me one more reason to learn and stick to a routine that I have made for myself. And because of this, I know I will be made accountable if I slack off in my journey.SO looking forward to all your support.
First of all, I just want to share about what I know already. So, I'm currently doing bachelors from FAST university Karachi in Electrical Engineering. And in my first semester, they taught us a little bit of C & C++. Now I'm in my second semester, and 
 learning OOP in JAVA. Which I have find relatively much easier than CNC plus. Maybe it's because the syntax, or maybe because I don't have to deal with pointers anymore. Ultimately, I believe the learning progress never stops and I will strive to learn more.
No OK coming to the reason why I'm writing a blog post. I actually took a semester project, which was to make a chatting app and silly me. I didn't know that chatting app wasn't that simple to make. I thought it would be just writing some simple lines of code here and there. And voila it will be made but turns out it's not so simple after all. As a result, for this, I started learning out Web development from a YouTube channel, called "freecodecam", and luckily, I found an introduction to HTML and CSS from Scrimba and they had an interactive version of the course as well, for which they gave a link below their YouTube video. I took interactive version of that course, and it completely hooked me on the teaching way, which was much similar to a real-life one on one teaching then a tutorial hell that I have read about so many beginners being a victim of. AS a result, I really love that course and continue to take another course of theirs's, which was JavaScript for beginners. After completing the course, in the end, the teacher, whose name is Perr recommended that the learners to write about their achievements, what they have learned in a blog post. Henceforth, here I am, writing about what I have learned in coding up till now. And I will continue to update you guys about my jounrey. And also, I will, in the next blog, will give you an review as to how I felt about taking these two courses. So, like John Wick says be seeing you.
Visualize Swift Package and Xcode Project with graph
Tags: showdev, ios, tooling, swift
Published: 2023-03-22 13:51:48

[SwiftDeps](https://swiftdeps.com) is a MacOS application created to help you visualize your Swift Package or Xcode project as an interactive graph. It is well suited for building projects with a modular architecture. With such a visual graph, you can see the interdependencies between objects in your project or in a Swift package.

![Visualize swift package with interactive graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/miaybdmeh1tc5o79gmic.png)

In addition, the application also helps you check for new updates for the Swift packages you are using. 


![check new update of swift package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhrcqdy2n4oo1kotzsmf.png)

Furthermore, Swiftdeps also identifies any issues in your 
project such as circular dependencies, orphaned packages, etc.


![detect issues in swift package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m92uq8x0cqp6j713rsel.png)

We'd really love to know if our product makes a good first impression on you. We highly value your input and would love to hear your thoughts on our application.

Check it out at [swiftdeps.com](https://swiftdeps.com)
Follow us on [twitter](https://twitter.com/swiftdeps)
Copy and Paste Between Virtual Machine and Host Machine
Tags: ubuntu, apacheage, linux
Published: 2023-03-22 13:22:31

Virtual machines have become increasingly popular in recent years as they provide an excellent way to run multiple operating systems on a single machine. This means that you can run different applications on different operating systems without needing multiple physical machines. However, one common challenge when working with virtual machines is transferring files and data between the virtual machine and the host machine. In this article, we will discuss how to copy and paste between a virtual machine and a host machine.

There are several ways to transfer files between a virtual machine and a host machine, such as using a shared folder, network transfer, or email. However, copying and pasting is the simplest and most convenient method for transferring small amounts of data between a virtual machine and a host machine.

Before we start, it is important to ensure that you have installed the necessary drivers and software for the virtual machine. These drivers enable you to use the clipboard feature to copy and paste between the virtual machine and the host machine. Here are the steps to copy and paste between a virtual machine and a host machine:

Step 1: Enable Copy and Paste

The first step is to enable the copy and paste feature in the virtual machine settings. To do this, follow these steps:

Open the virtual machine application and select the virtual machine you want to work with.


![Selecting your desired virtual machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzcrmk2vb6el67sxuxsh.png)


Click on the Settings option.

![Click on settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/id9sdf3roi0088lbg9l3.png)



Navigate to the Advance tab under the General Options.

![Advance tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/370b6h4htgute14dkoa3.png)



Now, enable the Shared Clipboard and Drag'n'Drop options to Bidirectional.

![Enabling the shared clipboard options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mvds4jxqjly9giwnomgc.png)



Click on OK to save the changes.

Step 2: Copy and Paste Between Virtual Machine and Host Machine

After enabling the copy and paste feature, you can easily copy and paste data between the virtual machine and the host machine. To copy and paste data, follow these steps:

Highlight the text or file that you want to copy in the virtual machine.

Press the Ctrl+C for copying the content.
Then Ctrl+V or use the command that you have specified in your virtual machine and data will be pasted.
Welcome Thread - v217
Tags: welcome
Published: 2023-03-22 13:18:13

---
title: Welcome Thread - v217
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![The word "HEY" in flashing colors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4kn0cqtgpc5h5uwiudrh.gif)
### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Handle varying DataType in Codable
Tags: swift, codable, datatype, ios
Published: 2023-03-22 13:17:41

`Codable` is a type alias for the `Encodable` and `Decodable` protocols. These protocols are used for encoding and decoding. 

While decoding we often face a situation where the data type may change in response coming from Backend. Let's see how we can handle the case - 

Scenario - We will be loading Employee data from a json file.

Step 1 - Let’s take a UILable for showing employees’ name and create an IBOutlet for it.

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

Step 2 - I have added an Employees’ json for demo purpose

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

Step 3 - Let’s create a file for Modal and create a codable struct for our Employees data

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

Step 4 - Our function `loadDataFromJson(handler:@escaping((Data)->()))` reads the json from Bundle and convert it’s content to Data. In the end it calls the handler with that data.

Step 5 - Now we parse the data into the Employees modal in the function `func parseDataToEmployee()`. After parsing to modal, we set Employees’ name and id on our label lblEmployee. 

Below is how the ViewController file looks in the end. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxfkygndrrx4jheh6ykd.png)

Now run the project. Here comes the main part.
You get and error which says - `"Expected to decode Int but found a string/data instead.", underlyingError: nil))”`

This is coming because our Employee modal is expecting the id to be an Int but in JSON it is getting String somewhere.
You can check in the Employee.json that first object has id as String whereas all the other objects have it as Int. 

Let’s check how to handle this case where the data type may vary.

The Codable protocol provides us an init function.  We need to use this to handle our error. So let’s go to our Modal file and add the init function as follow - 


```Swift
init(from decoder: Decoder) throws {
        
        let container = try decoder.container(keyedBy: CodingKeys.self)
        
        if let intId = try? container.decode(Int.self, forKey: .id){
            //if received as int then parse as is
            id = intId
        }else if let strId = try? container.decode(String.self, forKey: .id){
            //if received as String then convert to Int and set
            id = Int(strId) ?? 0
        }else{
            id = 0
        }
        employeeName = try container.decode(String.self, forKey: .employeeName) 
    }
```

In the above init function we are using if else condition based on the received data type.
Now run the project one more and see the employee data is parsed with no error. 
This is how it looks - 

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

Project Link - https://github.com/NalineeR/CodableInitDemo.git
Creating Versatile AI Responses with the GPT Prompt Generator
Tags: chatgpt, openai, promptengeneering, programming
Published: 2023-03-22 13:11:10

## Introduction:
Artificial intelligence has come a long way in recent years, and one of the most exciting advancements is the development of generative language models like OpenAI's GPT-4. These models are capable of generating human-like text based on a given prompt, and they have a wide range of applications. One such application is the GPT Prompt Generator, a Python script I developed that allows users to generate AI responses in a variety of scenarios and styles.

github: https://github.com/felipeOliveira-1/gpt_prompt_generator

## Features of the GPT Prompt Generator:
The GPT Prompt Generator comes with a range of features that make it a versatile and powerful tool. Here are some of the key features:

* Prompt Filter: The script includes a roleplay-based filter that refines the user's input to create a perfect prompt for the AI. This helps to generate more relevant and accurate responses from the AI.

* Simulate Expert: The AI can simulate an expert in a chosen field, providing responses that mimic the expertise and knowledge of a specialist in that area.

* Challenge Narrative: The AI can provide examples that contradict a given dominant narrative, offering alternative perspectives and viewpoints.

* Write in Different Styles: The AI can generate content in various writing styles and tones, allowing users to tailor the response to their specific needs.

* Accelerate Learning: The AI can explain complex topics in simple terms, as if the user were 11 years old. This feature is useful for breaking down difficult concepts and making them more accessible.

* Consult Celebrity: The AI can criticize an argument or opinion as if it were a specific person, adding a unique and entertaining twist to the generated response.

* Social Media Plan: The AI can generate a creative social media content calendar for a product or company, helping to streamline content creation and planning.

## Usage:
To use the GPT Prompt Generator, you'll need to have Python 3.x installed and the openai package installed using pip (pip install openai). You'll also need to replace the placeholder API key in the script with your own OpenAI API key. Once you've done that, you can run the script (python prompt_generator_v5.py) and follow the prompts to choose an option, provide the required information, and receive the AI-generated response.

## Conclusion:
The GPT Prompt Generator is a powerful and versatile tool that harnesses the capabilities of OpenAI's GPT-4 engine to generate AI responses in a variety of scenarios and styles. With its range of features and easy-to-use interface, it's a valuable addition to any developer's toolkit. Whether you're looking to simulate expert responses, challenge dominant narratives, or generate content in different styles, the GPT Prompt Generator has you covered. Give it a try and see how it can enhance your projects and workflows.
Building Better Web Applications with Laravel and Techine Solutions
Published: 2023-03-22 12:47:19

As developers, we're always looking for ways to improve our workflows and create better web applications. That's where Laravel, a popular PHP framework, comes in. And if you're looking for a reliable partner to help you build your Laravel app, look no further than Techine Solutions.

At Techine Solutions, we specialize in Laravel development and have helped countless businesses and organizations create custom web applications that are fast, scalable, and secure. Our team of experienced developers has a deep understanding of Laravel's architecture and can help you build a solution that meets your unique needs.

Here are just a few reasons why Laravel and Techine Solutions are a winning combination:

Rapid Development: Laravel's elegant syntax and built-in features make it easy to develop web applications quickly. Plus, with Techine Solutions' expertise in Laravel, we can help you optimize your workflow to speed up development even further.

Scalability: Laravel's modular architecture and robust ecosystem make it easy to scale your application as your needs grow. And with Techine Solutions' focus on best practices and performance optimization, you can be confident that your app will be able to handle increased traffic and demand.

Security: Laravel includes a number of built-in security features to protect your application from common threats. And with Techine Solutions' rigorous approach to security testing and vulnerability scanning, you can rest easy knowing that your app is safe and secure.

So if you're looking to build a better web application with Laravel, consider partnering with Techine Solutions. Contact us today to learn more about our Laravel development services and how we can help you achieve your goals.
Python IDE Online - Online Python Editor
Tags: python, community, beginners, programming
Published: 2023-03-22 12:40:35

**[Python Ide Online](https://www.pythonide.online/en/online-ide-and-desktop-ide/) - Online Python Editor**, Compiler, & Interpreter That Helps You to Write, Edit, Build, Compile, & Test Your Python Programs. [Pythonide.online](https://www.pythonide.online/) Also Supports Python3 latest versions.
No, AI won't replace you
Tags: ai, chatgpt, machinelearning, productivity
Published: 2023-03-22 12:38:36

Hype aside, recent developments in AI has caused a bit of mass hysteria and panic in the social sphere.

This month i've been asked things like "how long have I got left?" and "are we going to be like pets to them?"

While no doubt a lot of it is in jest, there is certainly an increasing level of tension between what the media reports AI can do, and what it can actually do.

Bricklayers, chefs, plumbers and hairdressers are unlikely to be automated in the next 30 years, so if you work in a highly manual field, you can relax for now.

The digital and intellectual domain is a little more fuzzy however, so I thought rather than making useless predictions about what's in and what's out, I wanted to share the key areas you can and should focus on to stay ahead:

- Creativity
- Higher level reasoning
- Soft Skills
- Leadership
- High fidelity/dexterity/intricate bespoke craftsmanship
- Technical Design & Architecture



## CREATIVE ENDEVOURS

Neural Networks don't just master things they have seen before, they fit to a curve - this means they learn trends well. Where you will excel is if you become a trend setter, focus on original content, finding personalised niches in whatever product you are interested in working on - demand will spike in the domain of hyper personalisation.

## HIGHER LEVEL REASONING

AI doesn't obliterate the 'things to do' pie, rather it expands the pie by opening up new capabilities, you need to expand your mind to 'what problems will we face once we have automated menial work?'
Spoiler alert: it requires being vision driven rather than feature driven.

If becoming a hyper 10x developer isn't for you, then look into cross functional IT be it leadership or solutionising, AI hasn't even begun to touch this area.

## MAKING THINGS WITH YOUR HANDS

Some things to consider, as the world ages (East and West are suffering from mass ageing, and collapsing demographics) - this means as consumption plummets, the demand for bespoke, tailored products will skyrocket. Think fashion, personality, trend setting, countries like Italy will pull ahead, so much is hand made there.

I'm stopping here for now, if you like what you see let me know and I will finish the second part.

P.S. ChatGPT did not write this.
Exploring the Power of Node.js for Real-time Communication and WebSockets
Tags: webdev, javascript, programming, node
Published: 2023-03-22 12:37:52

In recent years, real-time communication has become an integral part of modern web applications. From messaging apps to online gaming platforms, users expect to have a seamless, real-time experience. Node.js, an open-source, cross-platform runtime environment, has emerged as a powerful tool for building real-time applications that rely on WebSockets for communication.

WebSockets are a protocol that allows for bi-directional, real-time communication between a client and a server. They enable developers to create dynamic web applications that can push data to clients in real-time without the need for traditional HTTP requests. When combined with Node.js, WebSockets provide a robust and scalable solution for real-time communication.

One of the main advantages of using Node.js for real-time communication is its event-driven architecture. Unlike traditional server-side programming languages, which use a blocking I/O model, Node.js uses a non-blocking I/O model. This means that the server can handle multiple requests concurrently, making it highly scalable and efficient. As a result, Node.js can handle a large number of concurrent connections with ease, making it ideal for real-time communication applications.

Node.js also has a vast ecosystem of libraries and tools that make it easy to build real-time applications. One of the most popular libraries is Socket.IO, which provides a real-time, bi-directional communication layer on top of WebSockets. Socket.IO is easy to use and provides features such as broadcasting, name-spacing, and room management. It also has fallback mechanisms that enable it to work seamlessly on older browsers that do not support WebSockets.

Another powerful library for real-time communication with Node.js is Primus. Primus is a universal wrapper for real-time frameworks that provides a unified API for different real-time communication technologies, including WebSockets, Server-Sent Events (SSE), and more. Primus simplifies the process of working with multiple real-time technologies and makes it easy to switch between them.

Finally, SockJS is another popular library for real-time communication with Node.js. SockJS is a client-side JavaScript library that provides a WebSocket-like interface. It has fallback mechanisms that enable it to work seamlessly on older browsers and provides features such as multiplexing, heartbeats, and automatic reconnection.

In conclusion, Node.js is a powerful tool for building real-time applications that rely on WebSockets for communication. Its event-driven architecture and non-blocking I/O model make it highly scalable and efficient, while its ecosystem of libraries and tools makes it easy to build complex real-time applications. If you are building a real-time application, Node.js is definitely worth considering.

Thanks for reading...
**Happy Coding!**