teleren/devto huggingface dataset:
Case Study: Calendar and GregorianCalendar
Tags: java, programming, learning, beginners
Published: 2024-06-17 16:48:16

**GregorianCalendar** is a concrete subclass of the abstract class **Calendar**. An instance of **java.util.Date** represents a specific instant in time with millisecond precision. **java.util.Calendar** is an abstract base class for extracting detailed calendar information, such as the year, month, date, hour, minute, and second. Subclasses of **Calendar** can implement specific calendar systems, such as the Gregorian calendar, the lunar calendar, and the Jewish calendar. Currently, **java.util.GregorianCalendar** for the Gregorian calendar is supported in Java, as shown in Figure below. The **add** method is abstract in the **Calendar** class, because its implementation is dependent on a concrete calendar system.

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

You can use **new GregorianCalendar()** to construct a default **GregorianCalendar** with the current time and **new GregorianCalendar(year, month, date)** to construct a **GregorianCalendar** with the specified **year**, **month**, and **date**. The **month** parameter is **0** based—that is, **0** is for January.

The **get(int field)** method defined in the **Calendar** class is useful for extracting the date and time information from a **Calendar** object. The fields are defined as constants, as shown in Table below.

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

The program gives an example that displays the date and time information for the current time.

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

`Current time is Mon Jun 17 19:42:58 EAT 2024
YEAR: 2024
MONTH: 5
DATE: 17
HOUR: 7
HOUR_OF_DAY: 19
MINUTE: 42
SECOND: 58
DAY_OF_WEEK: 2
DAY_OF_MONTH 17
DAY_OF_YEAR 169
WEEK_OF_MONTH 4
WEEK_OF_YEAR 25
AM_PM 1
September 11, 2001 is a Tuesday`

The **set(int field, value)** method defined in the **Calendar** class can be used to set a field. For example, you can use **calendar.set(Calendar.DAY_OF_MONTH, 1)** to set the **calendar** to the first day of the month.

The **add(field, value)** method adds the specified amount to a given field. For example, **add(Calendar.DAY_OF_MONTH, 5)** adds five days to the current time of the calendar. **add(Calendar.DAY_OF_MONTH, -5)** subtracts five days from the current time of the calendar.

To obtain the number of days in a month, use **calendar.getActualMaximum(Calendar.DAY_OF_MONTH)**. For example, if the **calendar** were for March, this method would return **31**.

You can set a time represented in a **Date** object for the **calendar** by invoking **calendar.setTime(date)** and retrieve the time by invoking **calendar.getTime()**.
Nullish coalescing vs Logical || by aryan
Published: 2024-06-17 16:47:23

Correction from previous post with same name.❤

The difference between these two operators are, nullish(??) operator consider false, 0 and "" as a `true`.

Only null and undefined is considered as false.
```js
const obj = {
name:'aryan khandelwal'
age:26
}
obj?.['name'] //aryan khandelwal // only access 'name' when objest is defined.
obj||obj['name'] //aryan khandelwal
```
`note`: Even false is considered as `true`🤷‍♀️

[🔗linkedin](https://www.linkedin.com/in/aryan-khandelwal-779b5723a/)

## learning resources
[🧡Scaler - India's Leading software E-learning](www.scaler.com)
[🧡w3schools - for web developers](www.w3school.com)
Top 8 Gaming open-source projects
Tags: opensource, javascript, discuss, beginners
Published: 2024-06-17 16:45:31

## Ehy Everybody 👋

It’s **Antonio**, CEO & Founder at [Litlyx](https://litlyx.com).


I come back to you with a curated **Awesome List of resources** that you can find interesting.

Today Subject is... 
```bash
Awesome TOP 8 Open-Source Gaming Projects
```

We are looking for collaborators! Share some **love** & leave a **star** on our open-source [repo](https://github.com/Litlyx/litlyx) on git if you like it!

## Let’s Dive in!

[![Awesome](https://awesome.re/badge.svg)](https://awesome.re)
---

## Awesome Open-Source Gaming Projects

A curated list of awesome open-source gaming projects on GitHub.

## 1. [Godot Engine](https://github.com/godotengine/godot)
![GitHub stars](https://img.shields.io/github/stars/godotengine/godot?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C%2B%2B-blue)

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface.

## 2. [osu!](https://github.com/ppy/osu)
![GitHub stars](https://img.shields.io/github/stars/ppy/osu?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C%23-blue)

osu! is a rhythm game primarily developed, published, and created by Dean "peppy" Herbert.

## 3. [Mineclone2](https://github.com/minetest/minetest_game)
![GitHub stars](https://img.shields.io/github/stars/minetest/minetest_game?style=social)
![Tech Stack](https://img.shields.io/badge/tech-Lua-blue)

A free and open-source infinite-world block sandbox game inspired by Minecraft.

## 4. [SuperTuxKart](https://github.com/supertuxkart/stk-code)
![GitHub stars](https://img.shields.io/github/stars/supertuxkart/stk-code?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C%2B%2B-blue)

SuperTuxKart is a 3D open-source arcade racer with a variety of characters, tracks, and modes to play.

## 5. [OpenRCT2](https://github.com/OpenRCT2/OpenRCT2)
![GitHub stars](https://img.shields.io/github/stars/OpenRCT2/OpenRCT2?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C-blue)

An open-source re-implementation of RollerCoaster Tycoon 2.

## 6. [Unvanquished](https://github.com/Unvanquished/Unvanquished)
![GitHub stars](https://img.shields.io/github/stars/Unvanquished/Unvanquished?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C%2B%2B-blue)

A fast-paced, futuristic first-person strategy shooter.

## 7. [FlightGear](https://github.com/FlightGear/flightgear)
![GitHub stars](https://img.shields.io/github/stars/FlightGear/flightgear?style=social)
![Tech Stack](https://img.shields.io/badge/tech-C%2B%2B-blue)

An open-source flight simulator for a wide variety of platforms.

## 8. [jMonkeyEngine](https://github.com/jMonkeyEngine/jmonkeyengine)
![GitHub stars](https://img.shields.io/github/stars/jMonkeyEngine/jmonkeyengine?style=social)
![Tech Stack](https://img.shields.io/badge/tech-Java-blue)

A complete 3D game development suite written in Java.


---

*I hope you like it!!*

Share some love in the comments below.

Author: Antonio, CEO & Founder at [Litlyx.com](https://litlyx.com)
Hooks - One Byte Explainer
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-17 16:33:43

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

**Hooks**: Special functions in React that let you use state and lifecycle features in functional components. useState manages local state, while useEffect handles side effects. Hooks simplify code, improve readability, and promote reusable logic without changing component hierarchy.

## Additional Context

Introduced in React 16.8, Hooks address limitations in class components, allowing developers to write more modular and cleaner code. They are pivotal in modern React development, enabling better separation of concerns and code reuse across different components.
Case Study: the Abstract Number Class
Tags: java, programming, learning, beginners
Published: 2024-06-17 16:33:29

**Number** is an abstract superclass for numeric wrapper classes, **BigInteger**, and **BigDecimal**. Numeric wrapper classes, the **BigInteger** and **BigDecimal** classes have common methods **byteValue()**, **shortValue()**, **intValue()**, **longValue()**, **floatValue()**, and **doubleValue()** for returning a **byte**, **short**, **int**, **long**, **float**, and **double** value from an object of these classes. These common methods are actually defined in the **Number** class, which is a superclass for the numeric wrapper classes, **BigInteger**, and **BigDecimal**, as shown in below.

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

Since the **intValue()**, **longValue()**, **floatValue()**, and **doubleValue()** methods cannot be implemented in the **Number** class, they are defined as abstract methods in the **Number** class. The **Number** class is therefore an abstract class. The **byteValue()** and **shortValue()** method are implemented from the **intValue()** method as follows:

`public byte byteValue() {
return (byte)intValue();
 }
public short shortValue() {
return (short)intValue();
 }`

With **Number** defined as the superclass for the numeric classes, we can define methods to perform common operations for numbers. The program below gives a program that finds the largest number in a list of **Number** objects.

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

The program creates an **ArrayList** of **Number** objects (line 8). It adds an **Integer** object, a **Double** object, a **BigInteger** object, and a **BigDecimal** object to the list (lines 9–14). Note that **45** is automatically converted into an **Integer** object and added to the list in line 9 and that **3445.53** is automatically converted into a **Double** object and added to the list in line 10 using autoboxing.

Invoking the **getLargestNumber** method returns the largest number in the list (line 16). The **getLargestNumber** method returns **null** if the list is **null** or the list size is **0** (lines 20–21). To find the largest number in the list, the numbers are compared by invoking their **doubleValue()** method (line 25). The **doubleValue()** method is defined in the **Number** class and implemented in the concrete subclass of **Number**. If a number is an **Integer** object, the **Integer**’s **doubleValue()** is invoked. If a number is a **BigDecimal** object, the **BigDecimal**’s **doubleValue()** is invoked.

If the **doubleValue()** method were not defined in the **Number** class, you will not be able to find the largest number among different types of numbers using the **Number** class.
Day 14 - 90DaysofDevOps
Tags: python, cloudcomputing, 90daysofdevops, awschallenge
Published: 2024-06-17 16:15:50

**Python Data Types and Data Structures for DevOps**

**Data Types in Python**
In the Python universe, data types act as the classification system for our data items, representing the kind of value that dictates the operations we can perform on them. It’s crucial to understand that in Python, everything is an object, with data types serving as classes and variables as instances of these classes.

**Here are some of the essential built-in data types in Python:**
Numeric Types: Python supports integers, complex numbers, and floating-point numbers.

**Sequential Types:** This includes strings, lists, and tuples, providing versatile ways to handle collections of data.
**Boolean Type:** For logical operations and decision-making.
Set Type: Unordered collections of unique elements.
**Dictionary Type:** A powerhouse resembling hash tables in other languages, optimized for key-value pairs with an impressive time complexity of O(1).
To ascertain the data type of a variable, a simple call to type(your_variable) will reveal its true nature.

**Data Structures in Python**
Moving on to data structures — the organizational backbone of efficient data handling in any programming language. Python simplifies the understanding of these fundamental structures, making it an ideal starting point for those venturing into the world of DevOps.

**Let’s briefly explore a few key data structures:**
**Lists:** Ordered collections similar to arrays, offering flexibility with elements not requiring uniformity in type.
**Tuples:** Immutable collections akin to lists but with elements that cannot be added or removed once created.
**Dictionaries:** Resembling hash tables, these unordered collections excel in storing key-value pairs, enhancing data optimization.
Distinguishing List, Tuple, and Set
**To gain a clearer perspective, let’s highlight the differences between these three:**

**Lists:** Ordered, mutable, and can contain elements of different types.
**Tuples:** Ordered, immutable, and, like lists, can house elements of various types.
**Set:** Unordered, mutable, and contains only unique elements.

Now, let’s get hands-on and solidify our understanding through practical examples.
**Hands-On Activities**

**Activity 1: List, Tuple, and Set**

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

**Activity 2: Dictionary Manipulation**


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

**Activity 3: Cloud Service Providers**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f99raeyavv817qebuv1k.png)
Learning Programming for Beginners: How to Get Started
Tags: programmingforbeginners, learnprogramming, learntocode, coderbeginner
Published: 2024-06-17 16:15:12

Hello everyone! Today, I want to share some key tips on learning programming for those just starting their coding journey.

## Why Learn Programming?
Programming is not just a skill; it's a gateway to development in today's digital world. It allows you to create applications, websites, games, and automate everyday tasks.

## Getting Started with Learning Programming

1. **Choose the Right Programming Language:** To begin with, choose a programming language that best fits your goals. Popular choices include Python, JavaScript, and Java – each has its own applications and advantages.

2. **Build a Solid Foundation:** Before diving into coding, it's essential to build a solid foundation. Understanding concepts like variables, functions, and loops is crucial.

3. **Practice Regularly:** Programming skills develop through practice. Don't be afraid to make mistakes – they're part of the learning process.

4. **Experiment and Stay Curious:** Programming is about experimenting with different technologies and projects. Stay open to new challenges and possibilities.

## Share Your Learning Journey
I'd love to hear about your experiences with learning programming. Do you have any questions or topics you'd like me to cover in future posts? Let me know in the comments!

Join me on this journey through the world of programming. In upcoming posts, we'll delve into various aspects of this fascinating field. Thanks for reading!
Schönhage–Strassen algorithm in 256 chars or less (hopefully)
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-17 16:14:28

*This is a submission for [DEV Computer Science Challenge v24.06.12: One Byte Explainer](https://dev.to/challenges/cs).*

## Explainer

You have two huge LEGO towers and want to combine them. First, break each tower into chunks. Then, rearrange the pieces to snap easier (FFT). Snap the pieces, unscramble them (inverse FFT), and finally put all the small chunks together into a single tower.

## Additional Context

Well, it took me about 128 hours to understand the math behind the Schönhage–Strassen algorithm, and then another 128 hours to come up with a beginner-friendly explanation. Dear reader, heed my warning: don't try this at home, unless you have a spare 256 hours and a love for mathematical adventures!

_edit: Also, my eyes played a trick on me! Instead of 265 characters, I read 256. Maybe I need an eye algorithm upgrade next!_
How does Nostra's innovative approach to gameplay enhance the mobile gaming experience?
Tags: gamedev, gamedevelopers, bestmobilegame, freemobilegame
Published: 2024-06-17 16:13:47

[**Nostra's**](https://medium.com/@adreeshelk/nostra-world-of-free-online-games-where-fun-meets-convenience-48aa37d3ffc2?utm_source=referral&utm_medium=Medium&utm_campaign=Nostra) innovative approach to gameplay revolutionizes the mobile gaming experience by seamlessly integrating games into the lock screen of Android devices. This unique gameplay feature allows players to instantly access their favorite titles without the need for separate downloads or installations, making gaming more convenient and accessible than ever before. [Nostra's gameplay ](https://nostra.gg/articles/lock-screen-new-opportunity.html?utm_source=referral&utm_medium=article&utm_campaign=Nostra)is further enhanced by its commitment to delivering high-quality, visually stunning, and immersive games that captivate players from the first moment. With intuitive controls, smooth performance, and engaging gameplay mechanics, Nostra's titles offer a level of depth and enjoyment that sets them apart from other [**mobile games**](https://medium.com/@adreeshelk/nostra-brings-games-to-life-with-the-game-hosting-revolution-017dd8bfb0c8?utm_source=referral&utm_medium=Medium&utm_campaign=Nostra). Moreover, Nostra's gameplay is designed to cater to various skill levels and preferences, ensuring that there's something for everyone, whether they're casual players or hardcore gamers. By combining the convenience of lock screen gaming with the quality and variety of its titles, Nostra's innovative gameplay approach transforms the way people experience and enjoy mobile games.
$Unset, $Pop, $Pull, $PullAll in MongoDB
Tags: webdev, mongodb, programming, kawsarkabir
Published: 2024-06-17 16:12:29

### $unset

If we want to remove a field from a document in a MongoDB collection, we can use the `$unset` operator. First, let's add some data to the database, then we'll remove a field from that data.

```javascript
db.persons.insertMany([
  { name: "Kawsar", age: 19, profession: "Frontend Developer" },
  { name: "Emanul", age: 19, profession: "Frontend Developer" },
]);

db.persons.updateOne({ name: "Kawsar" }, { $unset: { age: "" } });
```

- In the code above, the `age` field is removed from the document where `name` is `Kawsar`.

### $pop

To remove the first or last element of an array in a document, we use the `$pop` operator. First, let's insert a document into the database:

```javascript
db.products.insertOne({
  _id: 100,
  quantity: 250,
  instock: true,
  details: { model: "14QQ", make: "Clothes Corp" },
  ratings: [{ by: "Customer007", rating: 4 }],
  tags: ["apparel", "clothing"],
});
```

- Here, we have added a document to the `products` collection.

For example, if we want to remove the first or last item from the `ratings` array, we can use `$pop`:

```javascript
db.products.updateOne(
  { _id: 100 },
  { $pop: { ratings: 1 } } // Use 1 to remove the last element
);

db.products.updateOne(
  { _id: 100 },
  { $pop: { ratings: -1 } } // Use -1 to remove the first element
);
```

### $pull

The `$pull` operator is used to remove all instances of a specific value from an array in a document.

For example, if we want to remove the `clothing` tag from the `tags` array, we can use `$pull`:

```javascript
db.products.updateOne({ _id: 100 }, { $pull: { tags: "clothing" } });
```

### $pullAll

The `$pullAll` operator is used to remove multiple specific values from an array in a document.

For example, if we want to remove multiple tags from the `tags` array, we can use `$pullAll`:

```javascript
db.products.updateOne(
  { _id: 100 },
  { $pullAll: { tags: ["clothing", "apparel"] } }
);
```

- In the code above, the tags `"clothing"` and `"apparel"` are removed from the `tags` array in the document with `_id: 100`.
Day 21 of my progress as a vue dev
Tags: webdev, vue, typescript, tailwindcss
Published: 2024-06-17 16:11:07

**About today**
Today I started on my new thing which I planned on doing after abandoning my last project. So basically I wanted to start on something that I can feel good to work on, that can help me grow as a developer(essentially a frontend developer), and through which I can see my progress overtime. Hence, I decided to dive into developing landing pages with unique and complex designs. I was fascinated with how a landing page works, how its design effects user's senses to engage with it and sort of marketing science goes on behind it. 

**What's next?**
I will be working few of my original but inspired landing pages and see if I get the feel and enjoy working on them, and also if those are good and if that's what I'm good at. If I end up getting positive responses on most if not all ends I will try to target businesses who are in need of landing pages to promote their products or business and take my skill to market to monetize it because that way I will be turning other peoples' ideas into reality and not stuck working on same old boring ideas from my head. Also, it will help me grow and work on different designs and stuff overtime.

**Improvements required**
I still need to figure out the complete science of a landing page and what are the factors that make it effective. Also, I need to work on my design skills and equip myself with tools and skills like figma, SEO, color theory, and basic HCI concepts to get a better sense of design and how it plays a role in marketing.

Wish me luck!
AES: The Power of Advanced Encryption Standard for Data Security
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-17 15:58:43


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


**## Advanced Encryption Standard**

"AES (Advanced Encryption Standard) is a symmetric key encryption method crucial for secure data transmission. It uses 128, 192, or 256-bit keys to encrypt and decrypt data, ensuring robust protection against unauthorized access and cyber threats. "
Cryptographic Security: Safeguarding Data
Tags: devchallenge, cschallenge, computerscience, beginners
Published: 2024-06-17 15:52:29

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


**## Cryptographic Security**

"Cryptographic security ensures data confidentiality, integrity, and authenticity through encryption, hashing, and digital signatures, safeguarding against unauthorized access and tampering."
What are your goals for week 25?
Published: 2024-06-17 15:48:39

 It's week 25 of 2024.  It's June, at Virtual Coffee we are doing mid year check-ins. Are you on track to meet your goals for the year?

## What are your goals for the week? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening this week? 
  * any suggestions for in person or virtual events?
- Any special goals for the quarter?

{% embed https://dev.to/virtualcoffee/monthly-challenge-mid-year-check-in-recharge-and-refocus-for-an-amazing-second-half-2k4c %}


### Last Week's Goals
 
- [:white_check_mark:] Continue Job Search. Networked. Collected Nos but at least I'm hearing back.
- [:x:] Project work.
- [:x:] Blog. Used the template for DEV's one Byte Challenge but I rejected my subjects.
- Events.
  * [:x:] 3JS talk.
- [:white_check_mark:] Run a goal setting thread on Virtual Coffee Slack.
- Assess my mid year progress. I am not where I want to be.
- [:white_check_mark:] Yard Work * Cleared brush took it to street fro brush pick up this week. Had planned for more but it was 96F this weekend.
 

 
### This Week's Goals


- Continue Job Search. 
- Project work.
- Blog.
- DEV Has new Challenges need to work on the one Byte explainer.
- Events.
  * React Native stream.
- Run a goal setting thread on Virtual Coffee Slack.
- Assess my mid year progress.


### Your Goals for the week 

Your turn what do you plan to do this week? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening any week? 
  * in person or virtual?
- Got any Summer Plans?



```html
-$JarvisScript  git commit -m "Summer!"
```