teleren/devto huggingface dataset:
dev
Published: 2024-02-25 11:28:00

to dev.io - i dont expect anyone browsing to see this

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



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


















2023 october - november (monogame) (procedural textures) ...no, the rooms are not generated :,(

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





2023 october (monogame) (procedural textures)

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




2023 summer-autumn unity procedural textures with working sloped collisions

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

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




all unity
1 - ~2021 (16x16 unity tilemap extras)
2 - ~2023 spring (4x4 unity tilemap extras)
3 - ~2023 summer (unity shader custom hlsl)

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





~2022 winter (end) (javascript canvas)

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





~2023 spring (javascript canvas)

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





~2021 (javascript canvas)

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






~2022 (javascript canvas)

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





~2023 spring (javascript canvas)

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





~2021 (javascript canvas)

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







~2020 (javascript canvas)

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



~2022 (javascript canvas)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ix64vb45iur22bhk7s2a.png)
When To Not Use Pointers in Golang?
Tags: go, webdev, javascript, opensource
Published: 2024-02-25 11:19:34

In Go, pointers are variables that store memory addresses, enabling indirect referencing and manipulation of data stored in memory. While pointers provide flexibility, they also introduce complexity and potential pitfalls such as memory leaks, null pointer dereferences, and debugging challenges if used imprudently.

### When to Utilize Pointers:

1. **Structs and User-Defined Types:**
   Pointers are commonly employed when working with custom data types or structs. By passing pointers to structs, developers can efficiently modify the original data without incurring the overhead of copying the entire struct.

   ```go
   type Person struct {
       Name string
       Age  int
   }

   func ModifyPerson(p *Person) {
       p.Name = "Alice"
   }
   ```

2. **Concurrency and Shared Data:**
   Pointers play a vital role in scenarios where multiple goroutines require access to and modification of shared data. Proper synchronization mechanisms such as mutexes or channels must be utilized to safeguard shared data integrity.

### When to Steer Clear of Pointers:

1. **Primitive Types:**
   For basic data types like integers, floating-point numbers, and booleans, pointer usage is typically unnecessary due to Go's pass-by-value semantics.

2. **Slices and Maps:**
   Slices and maps in Go function as reference types, alleviating the need for explicit pointers in many cases. Pass slices and maps directly to functions for efficient data referencing and modification.

3. **Function Arguments:**
   Unless a function explicitly requires the modification of the original value, prefer passing values directly rather than pointers to enhance code readability.

   ```go
   func PrintMessage(message string) {
       fmt.Println(message)
   }
   ```

4. **Avoid Premature Optimization:**
   Avoid premature optimization through pointer usage without conducting thorough profiling and benchmarking. Go's built-in optimizations often render pass-by-value efficient, and manual pointer usage may not yield significant performance gains.

### Benefits of Prudent Pointer Usage:

1. **Enhanced Code Clarity:**
   Prudent use of pointers enhances code readability and maintainability by reducing complexity and facilitating clearer reasoning about function and data behavior.

2. **Bug Mitigation:**
   Excessive pointer usage can lead to null pointer dereferences, memory leaks, and subtle bugs. Limiting pointer usage minimizes the likelihood of encountering such issues.

3. **Performance Considerations:**
   Go's compiler and runtime optimize code efficiently, even with pass-by-value semantics. Pointers should only be introduced for performance optimization when deemed necessary and after thorough profiling and analysis.
Collection of Custom Hooks For Your Nextjs-React Project
Tags: javascript
Published: 2024-02-25 11:16:03

In this article, we will delve into the world of custom hooks, exploring their significance and providing concrete examples of how they can be leveraged to streamline and enhance React development.

## What is a custom hook?
A custom hook in React is a JavaScript function that utilizes one or more built-in hooks (such as useState, useEffect, useContext, etc.).
pip Trends newsletter - 24-Feb-2024
Tags: webdev, beginners, programming, python
Published: 2024-02-25 11:13:42

This week's pip Trends newsletter is out. Interesting articles by Jason Roell, @martinheinz , Jacob Padilla, Imad Adrees, Alon Cohen & Simon Willison are covered this week

{% embed https://newsletter.piptrends.com/p/ultimate-python-cheat-sheet-practical %}
A Beginner’s Guide to JavaScript’s Prototype
Published: 2024-02-25 10:46:34

[JavaScript's prototype](https://askyt.info/a-beginners-guide-to-javascripts-prototype/) is a fundamental concept to understand when working with the language. It plays a crucial role in how objects inherit properties and methods from one another. Here's a beginner's guide to [JavaScript](https://askyt.info/category/javascript/)'s prototype system:

### What is a Prototype?

In JavaScript, every object has a prototype. A prototype is essentially a blueprint for the object, defining its properties and methods. When you create an object in JavaScript, it inherits properties and methods from its prototype.

### Object Prototypes

1. **`Object.prototype`**: At the top of the prototype chain is `Object.prototype`, which is the base prototype for all objects in JavaScript.

2. **`__proto__`**: Each object in JavaScript has a special property called `__proto__`, which points to its prototype.

### Prototype Chain

Objects in JavaScript are linked to a prototype object through the `__proto__` property. This forms a chain known as the prototype chain. If a property or method is not found on an object, JavaScript will look for it in its prototype, and if not found there, it will continue up the prototype chain until it reaches `Object.prototype`.

### Constructor Functions and Prototypes

1. **Constructor Functions**: You can create objects using constructor functions. When you create an object using a constructor function, you can add properties and methods to its prototype using the `prototype` property of the constructor function.

   ```javascript
   function Person(name) {
       this.name = name;
   }

   Person.prototype.sayHello = function() {
       console.log('Hello, my name is ' + this.name);
   };

   const john = new Person('John');
   john.sayHello(); // Output: Hello, my name is John
   ```

2. **`Object.create()`**: Another way to create objects with a specific prototype is by using the `Object.create()` method.

   ```javascript
   const personPrototype = {
       sayHello: function() {
           console.log('Hello, my name is ' + this.name);
       }
   };

   const john = Object.create(personPrototype);
   john.name = 'John';
   john.sayHello(); // Output: Hello, my name is John
   ```

### Inheritance

JavaScript uses prototypal inheritance. This means that objects can inherit properties and methods from other objects through their prototype chain.

### Conclusion

Understanding JavaScript's prototype system is crucial for effectively working with the language, especially when dealing with object-oriented programming concepts. By grasping how prototypes work, you can better leverage inheritance and create efficient and maintainable JavaScript code.
Check if Number is not Greater than 0 in JavaScript
Published: 2024-02-25 10:42:17

Here's a [JavaScript](https://askyt.info/category/javascript/) code snippet to [check if a number is not greater than 0](https://askyt.info/check-if-number-is-not-greater-than-0-in-javascript/), along with 5 examples, explanations, and their outputs:

```javascript
// Function to check if a number is not greater than 0
function isNotGreaterThanZero(number) {
    // Checking if the number is not greater than 0
    return !(number > 0);
}

// Example 1: Number is not greater than 0
const example1 = 0;
console.log("Example 1:", example1, "is not greater than 0:", isNotGreaterThanZero(example1)); // Output: true

// Example 2: Number is greater than 0
const example2 = 5;
console.log("Example 2:", example2, "is not greater than 0:", isNotGreaterThanZero(example2)); // Output: false

// Example 3: Number is negative
const example3 = -3;
console.log("Example 3:", example3, "is not greater than 0:", isNotGreaterThanZero(example3)); // Output: true

// Example 4: Number is a floating point
const example4 = 0.001;
console.log("Example 4:", example4, "is not greater than 0:", isNotGreaterThanZero(example4)); // Output: false

// Example 5: Number is NaN (Not a Number)
const example5 = NaN;
console.log("Example 5:", example5, "is not greater than 0:", isNotGreaterThanZero(example5)); // Output: true
```

Explanation:

1. The function `isNotGreaterThanZero` takes one parameter: `number` (the number to be checked).
2. Inside the function, it uses a comparison `number > 0` to check if the number is greater than 0.
3. The `!` operator is used to negate the result of the comparison, effectively checking if the number is not greater than 0.
4. If the number is not greater than 0, the function returns `true`, indicating that the condition is met. Otherwise, it returns `false`.
5. Examples demonstrate different scenarios including numbers equal to 0, positive numbers, negative numbers, floating-point numbers, and NaN (Not a Number).
6. Outputs show whether each example number is not greater than 0 (`true`) or not (`false`).
what is software testing ?
Published: 2024-02-25 10:40:00

software testing:
          software testing is a process of checking a program or application to make sure it works properly, doesn't have any errors or bugs, and ensures that it functions as expected. Testing is essential to ensure the quality, reliability, and performance of software products before they are released to users.
	

1. Software testing is crucial for ensuring that programs function correctly.
2. It helps identify and fix errors or bugs in the software.
3. Testing ensures that the software meets user expectations and requirements.
4. Without testing, the software may have undetected issues that could impact its performance.
5. Thorough testing enhances the reliability and quality of software products.
6. It is essential to conduct testing before releasing software to users to prevent problems.
7. Different types of testing, such as functional and performance testing, address various aspects of software quality.
8. Automated tools help streamline the testing process.
9. Regular testing throughout the development lifecycle helps catch issues early on, reducing costs and time.
10. Continuous improvement in testing practices leads to more robust and dependable software systems.
Blockchain Property Gate (BPGT)
Tags: ico, presale, cryptocurrency
Published: 2024-02-25 10:39:50

Blockchain Property Gate introduces a unique circular economy for the real estate sector focused on selection, acquisition, renovation and renting out or reselling of existing properties.


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

Blockchain Property Gate is paving the future of the real estate sector by solving some of its most pressing issues – diminishing housing affordability and lack of access to profitable and low-risk real estate investments.

## TOKEN DETAIL

Token Name: Blockchain Property Gate (BPGT)

Total Suppy: 148705100

Official Website: https://blockchain-property-gate.com/

Whitepaper: https://blockchain-property-gate.com/uploads/WP-en.pdf

Smart Contract : https://etherscan.io/token/0x80a2ed4deabe4772370387c5d4f120678bbbacd0

## PRESALE DETAIL

Private sale: 01.04.2024 – 31.05.2024 | Token Price: 0.90 €

Pre-sale: 01.06.2024 – 31.07.2024 | Token Price: 0.95 €

Main sale: 01.08.2024 – 30.09.2024 | Token Price: 1,00 €

FUNDRAISING GOAL
Hard Cap: (in usd and eth): 08992400 USD or 49432.35005986399 ETH

Fundraising goal: 108.992.400 USD

Acceptable Payment Methods: BTC, ETH, USDT, USDC

## CONNECT ON SOCIAL MEDIA

https://blockchain-property-gate.com/
https://blockchain-property-gate.com/uploads/WP-en.pdf
https://blockchain-property-gate.com/en/sign-up
https://www.facebook.com/people/Blockchain-Property-Gate/61553549484496/
https://t.me/bpgt_token
https://twitter.com/blockchainpgt
https://www.linkedin.com/company/blockchain-property-gate/
https://www.youtube.com/@BlockchainPropertyGate
https://www.instagram.com/blockchain_pgt/
Count the Words or Spaces in a String in JavaScript
Published: 2024-02-25 10:39:27

Here is a [JavaScript code snippet that counts either the words or spaces in a given string](https://askyt.info/count-the-words-or-spaces-in-a-string-in-javascript/). Below are 5 examples along with explanations and outputs for each.

```javascript
// Function to count words or spaces in a string
function countWordsOrSpaces(input, countType) {
    if (countType === 'words') {
        // Counting words
        const words = input.trim().split(/\s+/);
        return words.length;
    } else if (countType === 'spaces') {
        // Counting spaces
        const spaces = input.trim().split(/\S/).length - 1;
        return spaces;
    } else {
        return 'Invalid count type';
    }
}

// Example 1: Counting words
const example1 = "Hello world";
console.log("Example 1 - Counting words:", countWordsOrSpaces(example1, 'words')); // Output: 2

// Example 2: Counting spaces
const example2 = "Hello world";
console.log("Example 2 - Counting spaces:", countWordsOrSpaces(example2, 'spaces')); // Output: 1

// Example 3: Counting words
const example3 = "   Hello     world    ";
console.log("Example 3 - Counting words:", countWordsOrSpaces(example3, 'words')); // Output: 2

// Example 4: Counting spaces
const example4 = "   Hello     world    ";
console.log("Example 4 - Counting spaces:", countWordsOrSpaces(example4, 'spaces')); // Output: 5

// Example 5: Invalid count type
const example5 = "Hello world";
console.log("Example 5 - Invalid count type:", countWordsOrSpaces(example5, 'letters')); // Output: Invalid count type
```

Explanation:

1. The function `countWordsOrSpaces` takes two parameters: `input` (the string to be counted) and `countType` (specifying whether to count words or spaces).
2. Inside the function, it checks the value of `countType` using an if-else statement.
3. If `countType` is `'words'`, it trims the input string to remove leading and trailing spaces, then splits the string using a regular expression (`/\s+/`) which matches one or more whitespace characters. The resulting array's length is returned as the count of words.
4. If `countType` is `'spaces'`, it trims the input string and splits it using a regular expression (`/\S/`) which matches any non-whitespace character. By subtracting 1 from the length of the resulting array, we get the count of spaces.
5. If `countType` is neither `'words'` nor `'spaces'`, it returns an error message `'Invalid count type'`.
6. Examples demonstrate both word counting and space counting scenarios along with an example of an invalid count type.
DynamoDB client for Go
Tags: aws, dynamodb, go
Published: 2024-02-25 10:31:11

Hey all!

I'm building a [simple DynamoDB client for Go](https://github.com/juricaKenda/dynamodb.client/). I've always felt that AWS-provided client lacks simplicity, and offers functionalities seldom used. I've created some abstractions around DDB concepts and decided to maintain it as public lib. 

Let me know your thoughts, opinions, etc. Also, always open for pull requests and issues. I'll be continuing to build this lib in my free time. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8u3xijupa4mfzgust1q1.png)
F8bet.com - Game Cá Cược Casino Tặng Tiền Miễn Phí
Published: 2024-02-25 10:10:03

F8Bet.com mang den the gioi thuong casino voi cac giai thuong doc dao va giai jackpot hap dan. Nhan ngay uu dai khung khi dang ky tai khoan F8Bet.
Dia Chi: 9 Duong Phan Long, Cum 5, Dan Phuong, Ha Noi, Vietnam
Email: f8bet0moe@gmail.com
Website: https://f8bet0.moe/
Dien Thoai: (+63)9062961581
#f8bet #f8bet_casino #F8bet_com
Social Links:


https://f8bet0.moe/
https://f8bet0.moe/lien-he/
https://f8bet0.moe/game-bai/
https://f8bet0.moe/no-hu/
https://f8bet0.moe/ban-ca/
https://f8bet0.moe/casino/
https://f8bet0.moe/da-ga/
https://f8bet0.moe/the-thao/
https://f8bet0.moe/xo-so/
https://f8bet0.moe/cach-tai-app/
https://f8bet0.moe/cach-gui-tien/
https://f8bet0.moe/cach-rut-tien/
https://f8bet0.moe/thinh-phat/
https://www.facebook.com/f8bet0moe
https://twitter.com/f8bet0moe
https://www.youtube.com/channel/UCZg_677GEfK3siZ2iLAqzwQ
https://www.pinterest.com/f8bet0moe/
https://social.msdn.microsoft.com/Profile/f8bet0moe
https://social.technet.microsoft.com/Profile/f8bet0moe
https://vimeo.com/f8bet0moe
https://github.com/f8bet0moe
https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/672216
https://www.blogger.com/profile/14719457096022052903
https://www.reddit.com/user/f8bet0moe
https://gravatar.com/f8bet0moe
https://talk.plesk.com/members/f8bet0moe.318124/#about
https://soundcloud.com/f8bet0moe
https://medium.com/@f8bet0moe/about
https://www.flickr.com/people/f8bet0moe/
https://www.tumblr.com/f8bet0moe
https://f8bet0moe.wixsite.com/f8bet0moe
https://sites.google.com/view/f8bet0moe/trang-ch%E1%BB%A7
https://www.behance.net/f8bet0moe
https://www.openstreetmap.org/user/f8bet0moe
https://draft.blogger.com/profile/14719457096022052903
https://www.liveinternet.ru/users/f8bet0moe/profile
Integrating Google Drive Image/Vedios into Your React App
Published: 2024-02-25 10:02:45

## Step 1: Uploading a File/Image to Google Drive

The first step in integrating Google Drive into your React app is uploading a file or image to your Google Drive. To do this, follow these simple instructions:

_**Log in to your Google Drive account.**_

Click the "+ New" button and select "File upload" or "Folder upload" to upload your file or image.

Once the upload is complete, your file will be available in your Google Drive.

## Step 2: Making a Public URL/Shareable Link

To make the uploaded file or image accessible via a public URL, you'll need to generate a shareable link:

Right-click on the uploaded file in Google Drive.

Select "Get shareable link."

In the sharing settings, set the link sharing to "Anyone with the link" or "Public."

Copy the generated shareable link.

**Step 3: Copy the Image ID**

The shareable link you copied in Step 2 contains the file's unique ID, which you'll need to extract. Here's how:

Examine the copied link; it will look something like: 

> "https://drive.google.com/file/d/
> 1BE-WrnRJGeXzDSHQuGVIO7d6Xw3dz1Wq/view."

The file ID is the long string between /d/ and /view, in this case, 1BEWrnRJGeXzDSHQuGVIO7d6Xw3dz1Wq.

Copy this file ID as you'll use it in the next step.

Step 4: Embed the File/Image in Your React App

Now that you have the file ID, you can embed the file or image into your React application. Here's the syntax to use in this case i use image same step follows for videos also :

`  <img src="https://drive.google.com/thumbnail?id={Enter Your ID}&sz=w1000" alt=""/>`

Replace YOUR_FILE_ID with the file ID you copied in Step 3.

Remove the Curly Brackets also so Final url something look like :-

Step 5: Using the Embedded File in React (2024 Updated )

You can now use the provided syntax to display the file or image in your React application. Simply insert the code wherever you want the file or image to appear in your app:

`  <img src="https://drive.google.com/thumbnail?id=1BE-WrnRJGeXzDSQuGVIO7d6Xw3dz1Wq&sz=w1000" alt="None"/>`

Make sure to replace YOUR_FILE_ID with the actual file ID you obtained in Step 3.

## Conclusion

By following these six steps, you can seamlessly integrate Google Drive into your React app. This allows you to upload, share, and display files and images from your Google Drive in your application, enhancing its functionality and user experience. Enjoy the benefits of cloud-based file management within your React app!
TrabzonBilgi.Com.Tr Trabzon İline ait Bilgi Bankası
Tags: trabzon, trabzonspor, bilgi
Published: 2024-02-25 09:54:50

TrabzonBilgi.Com.Tr Trabzon İline ait Bilgi Bankası
Trabzon, Trabzon Bilgileri, Spor Haberleri ve Trabzon iline ait tüm bilgilendirici makaleler, resim ve videolar aracılığıyla sunulan bilgi bankasıdır.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2lmu8egi0r5bv2h8s4vb.jpg)
TrabzonBilgi.Com.Tr, Trabzon şehrine ve çevresine dair kapsamlı bir bilgi kaynağıdır. Trabzon’un zengin tarihini, kültürünü, coğrafyasını ve güncel gelişmelerini tanıtmayı amaçlayan bu platform, Trabzon’a ilgi duyan herkes için bir kaynak noktasıdır.
Misyonumuz
Misyonumuz, Trabzon Haberleri ve çevresinin zenginliklerini geniş kitlelere tanıtmak, şehir halkını güncel olaylar hakkında bilgilendirmek ve yerel kültürü ve mirası koruma konusunda bilinç oluşturmaktır. Ayrıca, spor ve bilgi rehberi konularında güncel haberler sunarak haber meraklılarını bilgilendirmeyi hedefliyoruz.
Haberler ve Bilgiler
TrabzonBilgi.Com.Tr’de genel haberler, spor haberleri ve teknoloji haberleri gibi çeşitli konularda güncel içeriklere ulaşabilirsiniz. Ayrıca, “Trabzon Bilgi Bankası” bölümümüzde Trabzon ile ilgili tarihi, coğrafi ve kültürel bilgilere erişebilirsiniz.
Reklam ve İş Birlikleri
Web sitemizde reklam verme ve iş birliği fırsatları hakkında daha fazla bilgi almak için lütfen bizimle iletişime geçin. Trabzon ve çevresindeki işletmeler için reklam seçenekleri sunuyoruz.
Reklam işbirliği için: trabzonbilgi28@gmail.com
İletişim
TrabzonBilgi.Com.Tr hakkında daha fazla bilgi almak veya iletişime geçmek için lütfen İletişim Sayfamızı ziyaret edin.
TrabzonBilgi.Com.Tr ailesi olarak, Trabzon’a ilgi duyan herkesi web sitemizi keşfetmeye ve bize katılmaya davet ediyoruz. Teşekkür ederiz!
[](https://trabzonbilgi.com.tr)
Weekly reading digest #28
Tags: php, symfony, backend, softwareengineering
Published: 2024-02-25 09:00:00

[A guide to exception handling in PHP](https://dev.to/honeybadger/a-guide-to-exception-handling-in-php-4cah)

[My PHP Problems](https://www.dantleech.com/blog/2024/02/18/my-php-problems/)

[Comment écrire une règle Rector](https://jolicode.com/blog/comment-ecrire-une-regle-rector)

[I'm Done with Unit and Integration Tests](https://ted.dev/articles/2023/04/02/i-m-done-with-unit-and-integration-tests/)

[Statements Vs. Expressions](https://www.joshwcomeau.com/javascript/statements-vs-expressions/)

[(Almost) Every infrastructure decision I endorse or regret after 4 years running infrastructure at a startup](https://cep.dev/posts/every-infrastructure-decision-i-endorse-or-regret-after-4-years-running-infrastructure-at-a-startup/)

[Data Center Water Usage: A Comprehensive Guide](https://dgtlinfra.com/data-center-water-usage/)

[Do literally anything](https://aaronfrancis.com/2024/do-literally-anything)

[Reggaeton Be Gone](https://bandini.medium.com/reggaeton-be-gone-6fa55f46a9d7)