teleren/devto huggingface dataset:
Hello, world!
Tags: python, programming, beginners, tutorial
Published: 2024-06-04 05:27:57

_Programming is fun!_
Isn't it?
Anyone interested in logic with some creativity will fall in love with coding.

Alright then, if you are interested to start the journey with me in learning a programming language: let's start our first step in learning to code.

OK, but there so many coding languages in the world, right?
Which one to choose?
Now, calm down. I am here to help you with providing some top choices by any beginner in this field:

- C++

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

- Java

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

- Python

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

OK, which one did you find easy?
I bet that it's Python!
Well then, welcome to the Python community!

Let's start this journey of programming with gaining some knowledge on Python programming language.

Python is a powerful general-purpose programming language.
It is created by Guido van Rossum.
Python is easy to learn and easy to code.

**Python Installation**
Check out the following guidelines for getting python installed in your computer
[W3Schools](https://www.w3schools.com/python/python_getstarted.asp)
[Youtube](https://www.youtube.com/watch?v=mbryl4MZJms)

## Best Resources

- [Learn more about Python Programming Language](https://dev.to/afraazahmed/python-programming-a-beginners-guide-1hig)

- [Python Blog Series](https://dev.to/afraazahmed/series/27589) : A Blog series where I will be learning and sharing my knowledge on each of the above topics.

- [Learn Python for Free, Get Hired, and (maybe) Change the World!](https://zerotomastery.io/blog/best-way-to-learn-python-for-free) : A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.

- **Zero To Mastery Course** - [Complete Python Developer](https://zerotomastery.io/courses/learn-python/) : A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.

**Who Am I?**

I’m Afraaz Ahmed, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through Blogging during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/afraazahmed

**Thank you** so much for reading my blog🙂.
PSR-4 autoloading in Laravel
Published: 2024-05-29 11:01:19

##What is Autoloading?
Autoloading in PHP is a mechanism that automatically loads the classes, interfaces, or traits you need when you use them, without the need to manually include or require their files. This helps keep your code clean and organized, especially in large projects.

##Example Without Autoloading

**1.Define Classes**
Let's say you have two classes in different files:

```
// File: app/Services/ExampleService.php
namespace App\Services;

class ExampleService {
    public function sayHello() {
        return 'Hello, World!';
    }
}

// File: app/Helpers/Helper.php
namespace App\Helpers;

class Helper {
    public function greet() {
        return 'Greetings!';
    }
}
```

**2.Include Classes Manually**
In your main script, you need to manually include these files:

```
// File: index.php

require 'app/Services/ExampleService.php';
require 'app/Helpers/Helper.php';

use App\Services\ExampleService;
use App\Helpers\Helper;

$exampleService = new ExampleService();
echo $exampleService->sayHello(); // Outputs: Hello, World!

$helper = new Helper();
echo $helper->greet(); // Outputs: Greetings!
```

##Errors on this approach

- You need to write a require statement for every single class file you use.
- It’s easy to forget to include a file, leading to errors.
- If we add require statement multiple places for same file it can lead to errors.

For this last error we can use 'require_once' but it is slower and first issue still exists. 

##PSR-4 Autoloading with Composer
To avoid those issues laravel uses PSR-4 autoloading with composer. It is really simple.

**1.Define Classes**
The class definitions remain the same as above:

```
// File: app/Services/ExampleService.php
namespace App\Services;

class ExampleService {
    public function sayHello() {
        return 'Hello, World!';
    }
}

// File: app/Helpers/Helper.php
namespace App\Helpers;

class Helper {
    public function greet() {
        return 'Greetings!';
    }
}
```

**2.Configure Composer**
Add the autoload section in your composer.json file:

```
{
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        }
    }
}

```

**3.Run the command to generate the autoload files:**

```
composer dump-autoload
```

**4.Use Classes Without Manual Includes**
Now, in your main script, you can use the classes without manually including their files:

```
// File: index.php

require 'vendor/autoload.php'; // Composer's autoload file

use App\Services\ExampleService;
use App\Helpers\Helper;

$exampleService = new ExampleService();
echo $exampleService->sayHello(); // Outputs: Hello, World!

$helper = new Helper();
echo $helper->greet(); // Outputs: Greetings!

```

That is it. Composer does the rest. Cool right?
Ride the Waves of Success: Marine Rope Solutions by Shanghai Jinli Special Rope Co., Ltd
Published: 2024-06-04 05:16:07

Ride the Waves of Triumph: Marine Rope Systems
Are you searching for a reliable and rope strong your boating requirements? Search no further than Shanghai Jinli Special line Co., Ltd. Making use of their marine rope solutions, it is possible to drive the waves of success. Here are some for the reasons why. So let's dive right into it as we discussed it further all the information about it.  

Advantages
Shanghai Jinli Special Rope Co., Ltd's marine rope solutions give you a array of benefits. Firstly, the ropes are manufactured from high-quality materials, which guarantees their durability and strength. Also, the ropes are created to be resistant to water and other harsh factors which can be environmental helping to make them extremely suitable for marine applications. 

Innovation
Shanghai Jinli Special Rope Co., Ltd is a pioneer in the marine rope industry with regards to innovation. Their focus on developing new items and incorporating brand new technologies enables them to stay in front of the curve and offer their customers unique solutions that meet their needs being certain. 

Safety
One of the primary issues in marine applications is safety. Shanghai Jinli Special Rope Co., Ltd takes safety seriously and it has developed their winch rope solutions being mindful of this. They use high-grade materials with properties that allow for an even high of. In addition, their ropes undergo rigorous evaluating to make certain they meet security standards. 

Use
Marine rope solutions from Shanghai Jinli Special line Co., Ltd can be utilized for the selection of applications beyond just boating. Be it fishing, towing, or just about any application marine their synthetic winch rope offer the strength, quality, and durability that are needed for these tasks. 

How to Use
Making use of marine ropes from Shanghai Jinli Special line Co., Ltd is not hard. Before use, it is critical to inspect the rope to make sure there are not any noticeable signs of use or damage. The braided winch rope should be precisely guaranteed to your vessel or other gear it's getting used with. During usage, it is vital to monitor the rope for signs of degradation or wear. 

Application
Shanghai Jinli Special Rope Co., Ltd's marine rope solutions can be utilized in many different marine applications. They have been suited to use within fishing, sailing, towing, and more. Along with their consider innovation and quality, they have been constantly developing items that are brand new solutions to meet the evolving needs of the clients. 

Source: https://www.cneema.com/application/winch-rope
Crafting Powerful Identities: How a Logo Can Elevate Your Brand
Tags: logodesign, graphicdesign, branding, logo
Published: 2024-06-04 05:15:50

In today's crowded marketplace, a strong first impression is essential. Your [logo](https://greenpixelscreations.com/logo-design) is often the very first touchpoint a potential customer has with your brand. It serves as a visual shorthand, instantly conveying your essence and values. But a logo is more than just aesthetics; it's a powerful tool that can elevate your brand and fuel its growth.

![Logo Design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5it7nppvvl7uph87pwha.jpg)

Here's how a well-crafted logo can work wonders for your brand:

**Instant Recognition:** 
A memorable logo becomes instantly recognizable, building brand awareness and setting you apart from competitors. Think of the iconic swoosh of Nike or the bitten apple of Apple – these logos are instantly associated with their respective brands.

**Emotional Connection: **
A well-designed logo can evoke positive emotions and build trust with your audience. Consider the warm and inviting colors of a children's toy store logo or the sleek lines of a tech company logo – these elements subconsciously create associations with the brand's personality.

**Storytelling Power: **
A logo can be a powerful storytelling tool, encapsulating your brand's essence in a single image. Think of the hidden arrow in the FedEx logo, symbolizing speed and efficiency. A great logo sparks curiosity and invites viewers to learn more about your brand story.

**Brand Advocacy: **
A logo becomes a symbol your customers can proudly wear or display. Think of the iconic Harley-Davidson logo or the ubiquitous Starbucks mermaid – these logos are embraced by fans and become a badge of loyalty.

Investing in a professional logo design is an investment in your brand's future. A powerful logo is a cornerstone of a successful brand identity, attracting customers, fostering loyalty, and propelling your business forward.
What's with the Weird Elixir Function Names
Tags: elixir, webdev, beginners
Published: 2024-06-04 05:08:28

Have you ever noticed that in all of the documentation related to Elixir, functions are referenced like `function_name/2`? This is by design- Elixir itself identifies functions by [its name and the number of arguments it takes](https://hexdocs.pm/elixir/basic-types.html#identifying-functions-and-documentation). The documentation, in turn, follows suite.

So, whenever you see Elixir docs (or, ahem, error pages) referencing `function_name/2`, you will know that it's referencing `function_name` that accepts 2 arguments.
Quick tip: Type of tokio spawn return
Tags: rust, tokio, programming
Published: 2024-06-04 05:07:27

When I was implementing the metrics task using tokio, I wanted to save the result `JoinHandle` in a struct and I saw the type being displayed by the IDE: `JoinHandle<?>`

What does it mean?

When I looked the definition of the function spawn, that's the code:

```rust
pub fn spawn<F>(future: F) -> JoinHandle<F::Output>  
where  
    F: Future + Send + 'static,  
    F::Output: Send + 'static,  
{
// ...
```

In the Future trait, `F::Output` refers to the return value of the input function.

Now, the piece of code I have is a long running task. That is the piece of code.

```rust
let receiver_task = tokio::spawn(async move {  
    println!("Starting metrics receiver");  
    while let Some(event) = rx.recv().await {  
        if let Err(e) = metrics.add(&event.post_name, &event.origin) {  
            error!("Error writing access metric for {}: {}", &event.post_name, e);  
        } else {  
            debug!("Metric event written for {}", &event.post_name);  
        }  
    }  
});
```

As this function returns nothing, the type is [Unit](https://doc.rust-lang.org/std/primitive.unit.html), hence for this lambda I can declare my struct as:

```rust
pub struct MetricHandler {  
    receiver_task: JoinHandle<()>,  
    //...
}
```

And now you can do:

```rust
let receiver_task = tokio::spawn(async move {
// ...
MetricHandler {
	receiver_task,
	// ...
}
```
Rust vs Typescript Variables
Tags: rust, typescript, webdev, beginners
Published: 2024-06-04 04:58:35


Jumping into Rust from Typescript requires that you change the way you think about code.

## A Simple Log Statement

It is trivial to log a variable Typescript. Simply declare the variable and then pass it `console.log`. This is totally fine:

```ts
let value = 'string';
console.log(value);
```

It doesn't really matter what happens between the variable declaration and the log statement. The output will be logged as expect. For example, this is _also_ perfectly fine:

```ts
let value = 'string';
let otherValue = value;
console.log(value);
```

In both of these examples, `value` is declared and then logged. There is nothing surprising here. In order to get this same functionality in Rust, we have to change our approach and the way we are thinking about the code.

## Ownership

What happens if you do this in Rust?

```rust
let value = String::from("string");
let otherValue = value;
println!("{}", value);
```

It certainly looks like `value` will be logged, but what you actually get is a super fun compiler error:

```
move occurs because `value` has type `std::string::String`, which does not implement the `Copy` trait
```

When it comes to variable assignments, Rust and Typescript come from completely different planets. In Typescript, it's perfectly fine to create variables, reassign them, and, in most cases, mutate them. You don't need to think about heaps, stacks, or how memory is cleaned up after the fact. The runtime handles all of that for you.

Rust, on the other hand, _requires_ you to think about memory allocation, how you are accessing that memory, and how that memory gets cleaned up (sort of).

In the Rust code above, we create a `String` and assign it to the variable `value`. `value` now "owns" that string and, in Rust, values are only allowed to have one owner.

When we assign `value` to `otherValue`, we aren't just copying the value or creating a reference to it like we would be doing in Typescript. Instead, we are transfering ownership or moving the `String` to `otherValue`. After the value is moved, we are no longer allowed to reference `value`, and how could we? It no longer owns anything!

## Borrowing

Fortunately, changing "ownership" isn't the only way to assign values in Rust. Instead of changing ownership, we can have `otherValue` "borrow" `value`. All we need to do is add a `&` to the assignment:

```rust
let value = String::from("string");
let otherValue = &value; // Borrowing!
println!("{}", value);
```

Instead of taking full ownership of `value`, `otherValue` creates a pointer that points to the value of `value`, which in this case is `String::from("string")`. Because `otherValue` is simply borrowing `value`, we are free to continue referencing `value` further along in our code.
Shanghai Jinli Special Rope Co., Ltd: Your Off-Road Towing Expertise
Tags: design, product
Published: 2024-06-04 04:57:39

f67df0f5ad778137f7ecd27964fb8965eda6b17a6ffb46fff75e39e2c015e24d.jpg
Shanghai Jinli Special Rope Co., Ltd: Your Off-Road Towing Expertise

Areyou looking for a safe and way reliable tow your off-road vehicle?  Look no further than Shanghai Jinli Special Rope Co., Ltd. We are your go-to experts for all things towing off-road.

Advantages:
Our ropes are made with high-quality materials and designed to handle recovery rope even the toughest conditions off-road. Durability is you need whether you are towing through sand, mud, or rocky terrain, our ropes will provide the strength and.

Innovation:
At Shanghai Jinli Special Rope Co., Ltd, we are always looking for ways to improve our products and stay on the edge cutting of. We use the manufacturing techniques latest and materials to create the best product possible our customers.

Safety:
Safety is our number one priority. That's why all of our ropes rigorously tested to ensure the safety met by them standards highest. You can rest assured you use one of our ropes to tow your off-road vehicle you using a product has been designed with your safety in mind when.

Use:
Our ropes are perfect for off-road enthusiasts who need a real way reliable tow their vehicles. We have a rope that will work for you whether you towing a heavy-duty truck or a small ATV. Our ropes are also great for use in industrial settings, such as towing equipment heavy.

How to use:
Using one of our ropes couldn't be easier. Simply attach the spectra winch rope to your vehicle using the included hardware, and you're ready to go. Be sure to follow our safety guidelines and use the rope appropriate sized your vehicle.

Service:
At Shanghai Jinli Special Rope Co., Ltd, we pride ourselves on our customer exceptional service. We are always available to answer any questions you may have about our ropes, and we are committed to providing you with the experience best possible.

Quality:
We believe quality is the most factor important creating a product our customers can trust. That's why we use only the best materials and processes manufacturing create our heavy ropes. We stand behind our products and confident you shall be satisfied with your purchase.

Application:
Our ropes are versatile and can be used in a variety of different settings. We have a product will work for you whether you towing a vehicle off-road or using our ropes in an industrial setting. Our ropes are also great for use in rescue operations, such as pulling vehicles out of ditches or off of cliffs.
LWC Batch Class Progress Indicator, Data Cloud Tips, Account Teams Best Practices
Tags: salesforce, salesforcedevelopment, salesforceadministration, salesforceadmin
Published: 2024-06-04 04:57:22

#  This is a weekly newsletter of interesting Salesforce content

See the most interesting #Salesforce content of the last days 👇

✅ **[5 Tips for Getting Started with Data Cloud](https://admin.salesforce.com/blog/2024/5-tips-for-getting-started-with-data-cloud)**
As an admin, you've probably heard of Data Cloud, but maybe you haven't prioritized it right away because you have other company challenges to address. Well, now's the time to move Data Cloud to the top and dig in. If you're thinking, "What is Data Cloud? Can you break it down for me?", you're in the right place.

✅ **[Best Practices for Using Salesforce Account Teams](https://www.salesforceben.com/best-practices-for-using-salesforce-account-teams/)**
In the past, the writer had reservations about the limitations of the "Account Teams" feature. However, recent upgrades have transformed it into a versatile tool applicable to Sales Cloud and Service Cloud. This article explores the new functionalities and best practices associated with Account Teams.

✅ **[Batch Class Progress Indicator In LWC](https://salesforcediaries.com/2023/01/09/batch-class-progress-indicator-in-lwc/)**
A batch class can be invoked dynamically from LWC. A progress indicator for the batch class is being built. Users can monitor or stop batch Apex job execution by accessing Apex Jobs in Setup. However, some users may not have view setup permission, so a way to view the progress indicator directly in LWC is being provided.

✅ **[Salesforce Fact #528 | Find out permission set assignments](https://sfactsabhishek.blogspot.com/2022/10/salesforce-fact-528-find-out-permission.html)**
Do you know there is an Sobject in Salesforce called 'PermissionSetGroupComponent' which keeps track of the permission set assignments in permission set groups. Suppose, we need to find out a particular permission set is assigned to which permission set groups. To get this, we can query on this object. 

✅ **[Understanding JWT-Based Access Tokens in Salesforce](https://sfdclesson.com/2023/08/30/understanding-jwt-based-access-tokens-in-salesforce/)**
In Salesforce org integration, access tokens are crucial for granting application access to Salesforce resources. This blog post explores the advantages, structure, and enabling of JSON Web Token (JWT)-based access tokens. Salesforce offers opaque tokens and JWT-based access tokens, with the latter being in the form of a JSON object for easy authorization. This transparency allows for efficient authorization processes.



Check these and other manually selected links at https://news.skaruz.com

Click a Like button if you find it useful. 
Thanks.
Creating a Windows Server Virtual Machine and deploying a Windows Server.
Tags: windows, azure, virtualmachine
Published: 2024-06-04 04:20:23

**In Azure Portal, select Virtual Machine**

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

**Select Create Azure Virtual machine**

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

**Select Resource Group**

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

**Enter Virtual machine name**

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

**Select Image**

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

**Enter Username & Password**

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

**Select Inbound ports**

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


**Select Licensing and confirm**

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

**In the Monitoring Tab, disable Diagnostics**

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

**Select Review + Create, then select create**

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


**Go to Resource**

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

**Connect to Virtual machine**

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

**Select Local machine**

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

**Ensure it's configured**

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

**Download RDP**

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

**Click downloads and enter password**
You should have access into the Virtual machine

**Search for Power Shell in the VM and run as Administrator**

**Use the below Install windows command to Install windows in the Virtual Machine**

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

**Copy the Public IP address and paste it in a browser to confirm you have successfully deployed a windows server.**

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