teleren/devto huggingface dataset:
Object methods 🦜
Tags: javascript, object, methods
Published: 2024-06-12 17:29:26

```
let result;
const userProfile = {
        username: 'Khojiakbar',
        age: 26,
        job: 'programmer',
        city: 'Tashkent region',
}
```

```

// Object.keys()
result = Object.keys(userProfile);

// Object.values()
result = Object.values(userProfile);

// Object.entries()
result = Object.entries(userProfile) // returning nested array

// Object.fromEntries()
let fromEntries = Object.fromEntries(result)

console.log(result);
console.log(fromEntries);
```

```
// Object.freeze()
Object.freeze(userProfile);

// Add -
userProfile.weight = 80
// Modify -
userProfile.username = 'Bilol'
// Delete -
delete userProfile.city
// NO AMD
console.log(userProfile);
```

```
// Object.isFrozen()
result = Object.isFrozen(userProfile)
console.log(result);
```

```
// Object.seal()
result = Object.seal(userProfile);

// Add -
userProfile.weight = 80;
// Modify +
userProfile.age = 33;
// Delete -
delete userProfile.city;
// NO AD
console.log(userProfile);
```

```
// Object.isSealed()
result = Object.isSealed(userProfile)
console.log(result);
```
10 Essential Future Technology Books Every Developer Should Read
Tags: webdev, datascience, machinelearning, ai
Published: 2024-06-12 17:26:37

As the tech landscape evolves rapidly, developers must continuously enhance their skills and stay updated with future technologies. Whether you’re a seasoned developer or just starting, the following ten books provide invaluable insights into machine learning, artificial intelligence, and other cutting-edge technologies of tomorrow.

1. “**Deep Learning**” by Ian Goodfellow, Yoshua Bengio, and Aaron Courville
2. “**Pattern Recognition and Machine Learning**” by Christopher M. Bishop
3. “**Machine Learning: A Probabilistic Perspective**” by Kevin P. Murphy
4. “**Artificial Intelligence: A Modern Approach**” by Stuart Russell and Peter Norvig
5. “**Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow**” by Aurélien Géron


**Read the complete list of books with more details here:**
https://futuristicgeeks.com/10-essential-future-technology-books-every-developer-should-read/
MongoDB Query Operators: $and, $or, $exists, $type, $size
Published: 2024-06-12 17:22:54

When working with MongoDB, understanding various query operators is crucial for efficient data retrieval. This article will dive into the usage of some fundamental operators like `$and`, `$or`, `$exists`, `$type`, and `$size`.

## $and Operator

Let's say we have a database named `school` with a `students` collection. We want to retrieve students whose age is not 5 and less than 10. This can be done in two ways:

```javascript
db.students
  .find({ age: { $ne: 5, $lt: 10 } })
  .project({ age: 1 })
  .sort({ age: 1 });

db.students
  .find({ $and: [{ age: { $ne: 5, $lt: 10 } }] })
  .project({ age: 1 })
  .sort({ age: 1 });
```

In the first example, we implicitly combine conditions within a single field. In the second, we explicitly use the `$and` operator. Both queries search for documents where the age is not 5 and is less than 10, then project only the age field and sort the results in ascending order.

## $or Operator

The `$or` operator works oppositely to `$and`, meaning it returns documents that satisfy at least one of the conditions. While no new example is provided, it operates similarly to `$and`, combining conditions but returning results if any condition is true.

## $exists Operator

The `$exists` operator checks the presence or absence of a field. For instance, to find students who do not have an age property or an email property:

```javascript
db.students.find({ age: { $exists: true } });
db.students.find({ age: { $exists: false } });
```

- `$exists: true` returns documents with the `age` field present.
- `$exists: false` returns documents without the `age` field.

Note that `$exists` only checks for the presence of the field, not its value.

## $type Operator

The `$type` operator allows us to query documents based on the data type of a field's value. For example, to find students where the `age` field is stored as a string:

```javascript
db.students.find({ age: { $type: "string" } });
```

## $size Operator

The `$size` operator is used to query arrays by their size. For example, to find documents where the `friends` array is empty:

```javascript
db.test.find({ friends: { $size: 0 } });
```

**Note:** The `$size` operator only works with array fields.

## Conclusion

These operators—`$and`, `$or`, `$exists`, `$type`, and `$size`—are essential tools for querying MongoDB collections. Understanding their usage can significantly enhance your ability to retrieve and manipulate data efficiently. Whether you're filtering documents based on multiple conditions, checking for the presence of fields, or querying specific data types and array sizes, these operators provide powerful capabilities for precise data management.
American University Of Business And Social Sciences Confers Doctor Of Business Management (Honoris Causa) On Hiew Boon Thong
Tags: education, aubss, qahe, research
Published: 2024-06-12 17:21:06

The American University of Business and Social Sciences (AUBSS) is honored to announce the conferment of the prestigious Doctor of Business Management (Honoris Causa) degree on Mr. Hiew Boon Thong. This honorary doctorate is awarded in recognition of Mr. Hiew’s outstanding accomplishments and exemplary contributions to society.

Mr. Hiew Boon Thong is an exceptional individual whose illustrious career and dedication to service have left an indelible mark. With over 36 years of distinguished service in the Royal Malaysian Police Force, he rose to the rank of Assistant Superintendent of Police, earning numerous accolades and awards for his exceptional performance and leadership.

Following his retirement from the police force, Mr. Hiew transitioned into the corporate world, showcasing his business acumen as the Managing Director of two prominent local oil palm companies. Alongside his professional achievements, Mr. Hiew has been a driving force in religious and social activities, organizing large-scale Buddhist events and serving as the Founder and Chairman of several Buddhist associations in Malaysia.

Mr. Hiew’s commitment to lifelong learning is truly inspiring. He holds two prestigious doctorate degrees, a Doctorate in Business Administration (DBA) and a Professional Doctorate (PD) in Buddhist Studies, as well as two Master’s degrees in Business Administration and Buddhist Studies. Currently, he is pursuing his third Doctorate degree in Business Administration and a third Master’s degree in Buddhist Studies, demonstrating his unwavering dedication to personal and intellectual growth.

About the American University of Business and Social Sciences (AUBSS):

The American University of Business and Social Sciences (AUBSS) is a leading global institution dedicated to providing high-quality education in business, management, and social sciences. AUBSS is committed to fostering a dynamic learning environment that prepares students for success in the ever-evolving business landscape.
The Ultimate V-Bucks Code Generator for 2024"
Published: 2024-06-12 17:20:08

If you’re an avid Fortnite player, you’ve likely heard of V Bucks - the in-game currency that allows you to purchase new skins, emotes, and other items to customize your gaming experience. With the rise in popularity of Fortnite,

[CLICK HERE TO GET FREE NOW>> ](https://bnidigital.com/codes-v2)

Looking for free V Bucks through code generators in 2024? Learn about the risks and alternative methods for earning V Bucks in Fortnite in this comprehensive guide.

So next time you come across a V Bucks code generator promising free V Bucks, beware of the risks involved and opt for legitimate ways to earn V Bucks in Fortnite.
SPREAD VS REST OPERATORS
Tags: spread, rest, javascript
Published: 2024-06-12 15:45:41


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e15he0p51biua6od8f6.jpeg)

#**Spread Operator**

**Arrays**
> Imagine you have two lists of friends and you want to combine them into one list.

```
const schoolFriends = ['Ali', 'Bilol', 'Umar'];
const workFriends = ['Ubayda', 'Hamza', 'Abdulloh'];
const allFriends = [...schoolFriends, ...workFriends]

console.log(allFriends);
```

**Objects**
> Suppose you have two objects representing your personal and work contact information, and you want to combine them into one contact object.

```
const personalInfo = {
    name: 'Khojiakbar',
    phone: '90-024-10-98',
}
const workInfo = {
    email: 'hojiakbar7796@mail.ru',
    phone: '010-8210-4488',
}
const combinedInfo = {
    ...personalInfo,
    ...workInfo,
}
console.log(combinedInfo);
```

#**Rest Operator**

**Functions**
> You are organising a party and want to create a function that takes an indefinite number of guest names and prints them.

```
function inviteGuests(host, ...guests) {
    console.log(`Host: ${host}`);
    console.log(`Guests: ${guests.join(', ')}`);
}

inviteGuests('Khojiakbar', 'Umar', 'Uthman', 'Bilal');
```
**Arrays**
> You have a list of tasks for the day and want to separate the first task from the rest.

```

const firstTask = ['Wake up'];
const remainingTasks = ['Brush your teeth', 'Wash your face', 'Go to work']
console.log(`First task: ${firstTask}`);
console.log(`Remaining tasks: ${remainingTasks.join(', ')}`);
```
**Objects**
> You have a user profile object and you want to separate the username from the rest of the profile details.

```
const userProfile = {
    username: 'Khojiakbar',
    age: 26,
    job: 'programmer',
    city: 'Tashkent region',
}

const {username, ...otherDetails} = userProfile

console.log(`Username: ${username}`);
console.log(`Profile Details:`, otherDetails);
```
জিপিএফ ব্যালেন্স চেক করার উপায়
Tags: gpf
Published: 2024-06-12 17:17:21

অনলাইন পদ্ধতি:

ই-সেবা পোর্টাল ব্যবহার করে:

https://www.bangladesh.gov.bd/gpf/ এ যান।
"সার্ভিস" মেনু থেকে "পেনশন ও ফান্ড ম্যানেজমেন্ট" নির্বাচন করুন।
"জিপিএফ ব্যালেন্স ও স্টেটমেন্ট" ক্লিক করুন।
আপনার ভোটার আইডি এবং মোবাইল নম্বর প্রদান করুন।
OTP প্রদান করুন যা আপনার ফোনে পাঠানো হবে।
আপনার জিপিএফ ব্যালেন্স এবং স্টেটমেন্ট দেখতে পারবেন।
CAO পেনশন ও ফান্ড ম্যানেজমেন্ট ওয়েবসাইট ব্যবহার করে:

https://www.cafopfm.gov.bd/ এ যান।
"GPF" মেনু থেকে "GPF Information" নির্বাচন করুন।
আপনার ভোটার আইডি এবং মোবাইল নম্বর প্রদান করুন।
OTP প্রদান করুন যা আপনার ফোনে পাঠানো হবে।
আপনার জিপিএফ ব্যালেন্স এবং স্টেটমেন্ট দেখতে পারবেন।
মোবাইল অ্যাপ ব্যবহার করে:

GPF Balance Check নামে একটি অ্যাপ আছে যা আপনি Google Play Store থেকে ডাউনলোড করতে পারেন।
অ্যাপ্লিকেশনটিতে আপনার ভোটার আইডি এবং মোবাইল নম্বর প্রদান করুন।
OTP প্রদান করুন যা আপনার ফোনে পাঠানো হবে।
আপনার জিপিএফ ব্যালেন্স দেখতে পারবেন।
USSD কোড ব্যবহার করে:

222 এ 121# ডায়াল করুন।
আপনার ভোটার আইডি প্রদান করুন।
OTP প্রদান করুন যা আপনার ফোনে পাঠানো হবে।
আপনার জিপিএফ ব্যালেন্স দেখতে পারবেন।
অফলাইন পদ্ধতি:

আপনি আপনার দপ্তরের জিপিএফ শাখায় যেতে পারেন এবং আপনার ব্যালেন্স জানতে পারেন।
আপনার জিপিএফ স্লিপ প্রিন্ট করার জন্য অনুরোধ করতে পারেন।
কিছু গুরুত্বপূর্ণ বিষয় মনে রাখবেন:

আপনার ভোটার আইডি এবং মোবাইল নম্বর সঠিকভাবে প্রদান করুন।
আপনার ফোনটিতে OTP পাওয়ার জন্য একটি সক্রিয় মোবাইল নম্বর ব্যবহার করুন।
আপনার জিপিএফ ব্যালেন্স এবং স্টেটমেন্ট গোপনীয় রাখুন।
আশা করি এই তথ্য আপনাকে সাহায্য করবে!
[জিপিএফ ব্যালেন্স চেক](https://infoblogbn.com/%e0%a6%9c%e0%a6%bf%e0%a6%aa%e0%a6%bf%e0%a6%8f%e0%a6%ab-%e0%a6%ac%e0%a7%8d%e0%a6%af%e0%a6%be%e0%a6%b2%e0%a7%87%e0%a6%a8%e0%a7%8d%e0%a6%b8-%e0%a6%9a%e0%a7%87%e0%a6%95/) করার পদ্ধতি গুলো আপনি সঠিকভাবে অনুসরণ করলে আপনার ব্যালেন্স সহজে দেখতে পারবেন।
Installing Docker On Windows
Tags: docker, linux, microsoft, devops
Published: 2024-06-12 17:16:06

It was a little finicky for me to use Docker from the Windows Command Line. 

This tutorial will ensure you have no such problems.

There are three main steps:

1. Install the Windows Subystem (WSL) 2 Linux distribution
2. Download and Install Docker Desktop for Windows
3. Configure Docker Desktop to access Docker from WSL

#### Installing WSL 2


Note: For a general tutorial see the WSL documentation [here](https://learn.microsoft.com/en-us/windows/wsl/install)

Open the command prompt in administrator mode by right clicking and selecting run as administrator.

Run the following command `wsl --install `

Check which version is installed with `wsl -l -v`

If it is not already version 2, set WSL to the correct distribution with `wsl --set-default-version 2` 

#### Download and Install Docker Desktop


Download and install Docker Desktop for Windows from [here](https://docs.docker.com/desktop/install/windows-install/)

Once installation is finished, you should be able to open the Docker Desktop application.

#### Configure Docker Desktop


In Docker Desktop, go to Settings, then select the resources tab. Set the terminal to be integrated with the WSL distribution. 


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



Docker should now work from the command line.

Thank you for reading my first post!
AI Injects Creativity: How Artificial Intelligence is Transforming Manga Creation
Tags: ai, manga, art
Published: 2024-06-12 17:15:29

This article explores the exciting ways Artificial Intelligence (AI) is assisting manga artists, from sparking inspiration to refining artwork.


![The power of AI in manga creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pd9g72958vjayl34mi8s.jpg)

## **AI-Powered Inspiration: A Spark for New Ideas**
For artists facing creative block, AI art generation tools are a game-changer. These tools, like [Nightcafe Creator](https://creator.nightcafe.studio/),  can generate unique visuals based on keywords or prompts. Imagine struggling to envision a futuristic cityscape?  Simply feed "neon cyberpunk city" into the tool and get a variety of creative outputs to spark your imagination! These AI-generated images are a springboard, allowing you to refine and personalize them to fit your vision.
 Platforms like [Aiconvert](https://aiconvert.online/) offer user-friendly interfaces and various art generation styles for a more artist-friendly approach.



## Beyond the Initial Sketch: Refining Artwork with AI

AI's capabilities extend beyond inspiration. Photo editing tools powered by AI are revolutionizing how artists refine their artwork. These tools offer features like:

Noise Reduction: AI tools like [Topaz DeNoise](https://www.topazlabs.com/denoise-ai) effectively remove unwanted grain or digital noise from scans or digital artwork.
Color Correction: Fine-tuning color palettes and correcting inconsistencies is a breeze with AI tools like [Imagen AI](https://imagen-ai.com/).
Special Effects: Adding flourishes like glowing effects, motion blur, or specific textures is effortless with tools like [PhotoWorks](https://photo-works.net/).


## A Powerful Collaboration: AI as an Artist's Ally

AI is not here to replace artists. It's here to empower them! These tools are assistants, allowing artists to work faster and explore new creative possibilities. The artistic vision and storytelling remain firmly in the hands of the manga creator.


## **Exploring the Potential: Where to Learn More**
The world of AI-assisted manga creation is young, with new tools and techniques emerging all the time. Here are some resources for artists who want to delve deeper:

[Midjourney](https://www.midjourney.com/home): A platform that allows users to generate images using text descriptions.
[Artbreeder](https://www.artbreeder.com/create): An AI-powered tool for creating and manipulating portraits.
[Manga Studio Tips](https://tips.clip-studio.com/en-us): Provides tutorials and resources for manga artists, including discussions on new technologies like AI

By embracing AI as a creative partner, manga artists can unlock new levels of efficiency and artistic expression. This technology holds immense potential to shape the future of manga creation.
Professional photographer in Manchester | Jonathan Cohen Photography
Published: 2024-06-12 16:56:13

Jonathan Cohen Photography, based in Manchester, specializes in capturing high-quality, imaginative, and creative photographs. The website showcases various services as [professional photographer manchester](https://jonathancohenphotography.co.uk), including wedding, corporate event, festival, and portrait photography. Jonathan Cohen emphasizes a unique and personalized approach, ensuring each photoshoot is a memorable experience. The gallery displays diverse examples of his work, highlighting his ability to capture genuine emotions and candid moments. Testimonials from satisfied clients praise the professional and friendly service. For more information or to book a session.
TypeScript strictly typed
Tags: typescript, javascript, productivity, webdev
Published: 2024-06-12 16:45:52


## The problem

Over the last decade, as a JavaScript expert, I helped companies of all kinds and sizes. Over time, I detected a series of some recurring major problems in nearly all projects.

One of them is **a lack of typing, resulting in a lack of reliability and an exponential decline in productivity**.

Yet, all these projects were coded in [TypeScript](https://www.typescriptlang.org). Should not it guarantee typing like in Java, C# or Rust?

Short answer: no, because by default TypeScript:
- **only partially enforces typing**
- **does not handle nullability**
- **retains some JavaScript's dynamic typing**

These problems can be solved with adequate configuration and the resulting good practices. But for that, **even strict mode**, if one knows about it, **is not enough**.

This posts series claims to be **a reference about a strong, static and complete typing in TypeScript**, and I will try to keep it up to date.

### Target audience

This posts series is intended for developers who already know TypeScript and who:

- do not know about strict mode
- do know about strict mode but think it is enough to guarantee sufficient typing
- know languages like Java, C# or Rust and want a similar typing level in TypeScript
- **want to increase reliability of their code** and reduce the risk of bugs
- **want to increase productivity**

This posts series is not intended for people who:

- do not like TypeScript and already have a definitive opinion about it

### Contact

If you want a direct discussion with me:
- **preferably via [LinkedIn](https://www.linkedin.com/in/cyrilletuzi/)** (if you cannot send me a message directly, please add a note to your contact request)
- direct message on [X (Twitter)](https://x.com/cyrilletuzi)

### Ongoing series

Not all posts are published yet. You can follow my account (button  on top right of this page) to know when next parts are published.

### French version

[A French version is available on LinkedIn.](https://www.linkedin.com/pulse/typescript-strictement-typ%25C3%25A9-cyrille-tuzi-k5ide/)

### Next part

Before going into the topic's technical core, we will start this posts series with an [introduction](https://dev.to/cyrilletuzi/typescript-strictly-typed-intro-reliability-and-productivity-32aj) about why solving the 3 problems above is important for **reliability and  productivity**.
VM cannot access internet via NAT VirtualBox
Tags: virtualbox
Published: 2024-06-12 16:44:30

## My Problem
My Ubuntu Virtual Machine can`t access internet using NAT interface

## My Solution
check IP address configuration

```bash
sudo nano /etc/netplan/00-installer-config.yaml
```

![netplan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztnu8ad70x3oi28s9b6g.png)

remove gateway and save

![remove gateway](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nf41ekv8qov6if78kwoe.png)


finally apply the configuration

```bash
sudo netplan apply
```

![ping](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnwmtc3lz52qxohvjlra.png)
125. Valid Palindrome
Published: 2024-06-12 16:43:54

Topic: Arrays & Hashing

Soln 1 (isalnum):

 A not so efficient solution:
1. create a new list to store the palindrome
2. loop through the characters in the string:
- check if it is alphanumeric, if it is then append to list
3. assign a variable, then convert palindrome list to string
4. assign another variable, then reverse palindrome
5. return and compare both variables 
```
def isPalindrome(self, s: str) -> bool:
    palin = []

    for c in s:
        if c.isalnum():
            palin.append(c.lower())
    x = ''.join(palin)
    y = x[::-1]
    
    return x == y
```

Soln 2 (isalnum):

1. Filter and Normalize: Create palindrome by joining all alphanumeric characters from s and converting them to lowercase.

2. Check Palindrome: Return True if palindrome is equal to its reverse, otherwise return False.

```
def isPalindrome(self, s: str) -> bool:
        palindrome = ''.join(filter(str.isalnum, s)).lower()
        return palindrome == palindrome[::-1]
```
Notes: Attempt to understand 2 pointer solution.
Day 16 of my progress as a vue dev
Tags: webdev, vue, typescript, tailwindcss
Published: 2024-06-12 16:35:41

**About today**
Today took my time to think about the next project I wanna take and continue with. Did my research and because I didn't wanna dive right into a project without considering a few factors. I don't want to take on a project that doesn't add on to me learning and I also don't wanna dive into something that ends up being dull and boring for me as a developer. 

**What's next?**
So, I have a project in mind but I think I need to do a little bit more research because the project I wanna take on is of nature and includes processes I'm not much familiar with. Basically I wanna work on a version of an online audio editor and this is something I think is going to be challenging and fun. 

**Improvements required**
I need to polish my concepts on file handling and audio management. Also, I need to create a structural approach with which I will be diving into this project and a timeline that I will follow to work on this project and conclude it timely.

Wish me luck!