teleren/devto huggingface dataset:
🚀 Launching Custom ✉️ Newsletter Specially Built for the Developers👨‍💻.
Tags: webdev, discuss, news, developers
Published: 2023-06-06 08:18:07

**🔥📧 Welcome, Brilliant Developers! 🚀🔍**


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


✅ Cutting-edge tutorials and guides 📝💻
✅ Sneak peeks into emerging technologies 🚀🔍
✅ Tips for optimizing your coding skills 💪🔧
✅ Curated resources for personal growth 🌱📚
✅ Latest industry trends and insights 📈🔍
✅ News on upcoming developer conferences and events 🎉🌐
✅ Opportunities for beta testing new tech tools 🧪🔬
✅ Discounts on coding courses and tools 💰💻
✅ Community spotlights and success stories 🌟🌟
✅ Fun coding challenges and quizzes 🎯🧠






![1K Members](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxu2l7edgweryti6qkqh.png)

> 😎 Over 1000+ developers have already joined our tribe! 🌟

[⚡️ Subscribe & Join 😎 ](https://firstfinger.in/signup-for-devmaster-newsletter/)


DevMaster Newsletter ✉️ "Where Developers Become Masters"

Prepare to elevate your skills, unlock hidden potential, and embark on a journey of continuous learning. Join us on this epic quest, and together, let's conquer the realms of tech brilliance! 🌟👩‍💻👨‍💻

> 📚 Expand your knowledge horizons! 🌅🔭
JavaScript - Array toSorted() Method
Tags: javascript, programming, kristiyanvelkov, webdev
Published: 2023-06-06 08:04:55

### What it is? 

The **toSorted() method** of Array instances is the copying version of the sort() method. It returns a **new array** with the elements sorted in ascending order. 

**NB!**: **Sort() method modifies the original array.**


### Example of use:

Here’s an example to illustrate the difference between toSorted and sort:

```typescript
const numbers = [3, 4, 1, 5, 2];
const sortedNumbers = numbers.toSorted();

console.log(numbers); // Output: [3, 4, 1, 5, 2]
console.log(sortedNumbers); // Output: [1, 2, 3, 4, 5]
```

The sort method, on the other hand, modifies the original array in place. Here's an example:

```typescript
const numbers = [3, 4, 1, 5, 2];
numbers.sort();

console.log(numbers); // Output: [1, 2, 3, 4, 5]
```

---
Browser compatibility


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


---

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


[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kristiyan-velkov-763130b3/)

<a href="https://revolut.me/kristiyanvelkov" target="_blank">
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxmsw2d2ooukhdg8x5ar.png)
</a>

If you like my work and want to support me to work hard, please donate via:

<a href="https://revolut.me/kristiyanvelkov" title="Link to Revolut">Revolut website payment</a> or use the QR code above.                                                                                                                           


**Thanks a bunch for supporting me! It means a LOT 😍**
Boost Your Creativity with WordPress
Published: 2023-06-06 07:58:50

**1️⃣ Customize like an artist:** Paint your digital canvas with the power of WordPress. Utilize themes, plugins, and CSS magic to transform websites into stunning masterpieces that captivate users.

**2️⃣ Brush up on responsive design:** Ensure your creations shine on every device, big or small. Embrace the art of responsive design, crafting websites that adapt seamlessly to various screen sizes and resolutions.

**3️⃣ Empower clients with user-friendly admin panels:** Give your clients the tools to make their mark. Build intuitive admin panels, empowering them to manage content, update imagery, and shape their online presence with ease.

**4️⃣ Master the art of optimization:** Speed and performance are the brushes that paint success. Optimize WordPress sites by optimizing code, compressing images, and leveraging caching techniques to create blazing-fast experiences.

**5️⃣ Unleash the power of plugins:** Expand your toolkit with a myriad of plugins. From SEO optimization to e-commerce integration, choose wisely and enhance your websites with functionality that dazzles and delights.

**6️⃣ Stay ahead of the curve:** The digital landscape is ever-evolving, and so should your skills. Embrace lifelong learning, stay up-to-date with the latest WordPress updates, attend workshops, and join vibrant developer communities to grow your expertise.

**7️⃣ Share your art with the world:** Showcase your WordPress masterpieces through an online portfolio. Display your creativity, demonstrate your expertise, and attract new clients who are eager to experience the magic you create.

So, grab your keyboard and unleash your artistic prowess with [WordPress](https://f60host.com/wordpress-website-design.php). Let your imagination run wild, and watch as your digital creations bring joy and success to your clients and users alike! 🚀🌟🎉
Influencer Marketing – The Rise of Influencer Marketing and Its Impact on Consumer Behavior
Published: 2023-06-06 07:51:03

Today's advanced marketing world has witnessed a seismic shift with the advent of influencer marketing. This innovative approach has taken the digital land by storm, reshaping consumer behavior and redefining the rules of advertising.

Due to the platforms' credibility and recognition, these influencers can cultivate strong connections with their audience, leading to increased trust and brand loyalty. As a result, consumers are increasingly turning to influencers for product recommendations and reviews, making influencer marketing a game-changer in shaping consumer preferences and purchase decisions.

Let's explore the rise of influencer marketing and its profound impact on consumer behavior.

•  **The Age of the Influencer – Redefining Authority and Trust** 

Since the power of social media continues to grow, influencers have risen to prominence as new-age trendsetters. With authentic content, they have collected a range of followers who eagerly consume their recommendations and advice. This has transformed the dynamics of trust, as consumers and [Wikipedia Consultant](https://www.wikicouncil.com/) increasingly ask influencers for guidance in their purchasing decisions. 

•  **The Blending of Promotion and Authenticity** 

Another thing that sets influencer marketing apart is its ability to seamlessly promote brands with authentic content. Influencers skillfully incorporate sponsored products or services into their posts, stories, and videos, ensuring a natural integration that resonates with their audience. 

By maintaining their unique voice and style, influencers create a sense of authenticity that traditional advertisements often lack. This approach not only captures attention but also fosters a genuine connection between the influencer, the brand, and the consumer.

•  **The Power of Connection – Building Stronger Relationships**

Influencers have already have established deep connections with their followers. Through continuous interaction, engagement, and personal sharing, they create a virtual community built on trust, loyalty, and shared interests. 

As a result, when influencers approve a product or share a positive experience, their audience is more inclined to search for the brand, considering it a trusted recommendation from a valued source. This profoundly impacts consumer behavior, influencing purchase decisions and brand preferences.

**Sum Up** 

By harnessing the power of digital influence, brands can authentically connect with their target audience, foster trust, and drive consumer decisions.
The Impact of AI on the Future of Work
Tags: ai
Published: 2023-06-06 07:49:48

How AI is Changing Work


Artificial intelligence (AI) is undoubtedly changing the way we work today. From automation of tasks, to decision making and customer service, AI is transforming the way businesses operate. One of the major benefits of AI is that it helps to save time and resources, allowing human workers to focus on higher value tasks that require creative thinking and problem solving. In this section, we’ll explore some of the ways that AI is changing work for the better.



Automation of Tasks
One of the most significant impacts of AI on work is the automation of routine tasks. For example, in manufacturing, robots are increasingly being used to assemble products, package goods, and transport raw materials. In the services sector, chatbots are replacing humans in customer service roles. These technologies are being used to automate tasks that are repetitive, predictable, and often dull for human workers. This helps to free up time for workers to focus on more complex tasks that require human skills.



Decision Making
AI is also being used to assist with decision making. With access to vast amounts of data, AI can quickly analyze information and provide actionable insights. In finance, for example, trading decisions can be made with the help of AI algorithms that can quickly and accurately predict market trends. Similarly, in healthcare, AI is being used to diagnose diseases and develop personalized treatment plans. By assisting with decision making, AI can help businesses to make better and more informed decisions.



Customer Service
Customer service is another area where AI is making a big impact. Chatbots are becoming increasingly common in customer service roles, allowing businesses to provide round-the-clock support to their customers. These chatbots use natural language processing (NLP) to understand customer queries and provide accurate responses. This helps to reduce waiting times for customers and improves the overall customer experience.

[Read More](https://www.blogsposter.com/2023/06/the-impact-of-ai-on-future-of-work.html?m=1)
Windows - Auto Login via the Registry
Tags: windows, registry, regedit, tutorial
Published: 2023-06-06 07:41:48

In the Windows registry editor (regedit), browse to the following key:

```
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
```

Set string key **'AutoAdminLogon'** to 1.

Set string key **'DefaultUserName'** to the username you wish to use.

Set string key **'DefaultPassword'** to the password of the account.

If on a domain, set string key **'DefaultDomainName'** to the short name of the domain.

You can also set string **'DontDisplayLastUserName'** to 0 if you don't wish to show the last logged on user at all.

> If any of the above keys are missing, you may need to add them as new string keys.
Elasticsearch Indices and Documents
Tags: elasticsearch, sigmie, php
Published: 2023-06-06 07:35:53

To use Elasticsearch effectively, it's essential to understand key concepts like indexes and documents. In this blog post, we'll explore what indexes and documents are in the context of Elasticsearch.

## What is an Index?

Imagine a kid's room with a drawer full of toys. In Elasticsearch, an index serves a similar purpose—it acts as a repository for related data. Think of it as a collection of documents that are grouped together for easy searching and retrieval.

To visualize this, let's consider a simple representation of a movies index:

```plaintext
movies
├─ Document 1
├─ Document 2
├─ Document 3
├─ ...
```

Each individual piece of data within an index is called a **Document**.

You can create an Index using [Sigmie](https://sigmie.com) like this:

```php
$index = $sigmie->newIndex('movies')->create();
```

## What is a Document?

A Document is just a JSON stored in an Index.

```
Document = JSON
```

In Elasticsearch, a **Document** is represented as a JSON object and stored within an **Index**. It contains the actual data that you want to search, analyze, or retrieve.

Here's an example of what a document might look like:

```json
{
   "title": "The Shawshank Redemption"
}
```

The document contains a single field, `title`, with the value `The Shawshank Redemption`. 

The JSON structure is allowing us to represent various data types and structures. The Document structure is the most important part of achieving what you want using Elasticsearch.

Here’s how you can create an Instance of an Elasticsearch Document in [Sigmie](https://sigmie.com):

```php
use Sigmie\Document\Document;
 
$document = new Document(['name' => 'The Shawshank Redemption']),
```

## What is Indexing

Indexing is the simple act of adding **Documents** into an **Index**. It doesn’t matter what are using Elasticsearch for, indexing is important simply because you can’t do anything without Documents in your index.

And this is the way to index a **Document** with [Sigmie](https://sigmie.com):

```php
$index->collect()->add($document);
```

## An Example

Here's an example demonstrating how to add three movie documents to our "movies" index:

```php
$documents = [
    new Document(['title' => 'The Shawshank Redemption']),
    new Document(['title' => 'Inception']),
    new Document(['title' => 'Pulp Fiction']),
];
 
$index->collect()->merge($documents);
```

In the above code, we create an array of `Document` objects, each representing a movie. By invoking the `merge` method on the collected index and passing the documents, we add them to the index

Here is what the Index looks like once we merge the Documents.

```plaintext
movies
├─ "The Shawshank Redemption"
├─ "Inception"
├─ "Pulp Fiction"
```
Tool for dashboard wireframing
Tags: data, analytics, datascience
Published: 2023-06-06 07:40:09

Hi all,
Building a dashboard wireframe tool to streamline dashboard design process. The tool is in it's early stage and we are seeing a good early adoption rate.
[mokkup.ai](https://mokkup.ai/)
what are the challenges you usually face when it comes to creating a dashboard, and getting it approved from stakeholders?
PSEXEC - Run EXE's on the Windows Login Screen
Tags: psexec, cmd, commandprompt, exe
Published: 2023-06-06 07:37:25

> This tutorial assumes that you have [PSEXEC](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec) installed on your machine at the location of C:\psexec.

• Open a CMD Prompt window.

• Navigate to the PSEXEC folder on your machine.

• Run the following command - where cmd.exe is the path to the exe you wish to run (may need to use the full folder path if it isn't one of the standard Windows apps like notepad.exe, calc.exe or cmd.exe):

```
psexec -sx notepad.exe
```

• Now Lock the machine (or log out) and the exe file you chose above will be present.
2 short key you will need & love as a developer
Published: 2023-06-06 07:27:36

---
title: 2 short key you will need & love as a developer
published: true
description: 
tags: 
---

Every developer should and must know this 2 short keys to boost your productivity or even make your code better.

Note: Replace `Ctrl` to `Command` if you are using Mac OS.

---

1. Ctrl - C

2. Ctrl - V

You are welcome
How To Add Loading Spinner In JavaScript?
Published: 2023-06-06 07:26:09

Hello Coder,Welcome to the Codewithrandom blog. In Today's Blog We are going to see How to Create and **[Add To Loading Spinner](https://www.codewithrandom.com/2022/10/05/loading-spinner-using-javascript/)** Using JavaScript. this is Infinity Loading Spinner so you Can Adjust Yourself and Add Using JavaScript. 

Now The Project is going to create and for that, we are first adding an HTML Code for loading spinner.

## HTML Code:
```
<div id="spinner"></div>
```
Here a single line of HTML code is enough to add an spin loader. Simply a div class with name on it.

Now we are adding background using CSS.

## CSS CODE:
```
html,body {
  margin:0;
  background:rgba(0,0,0,0.9)
}
```
Calling out HTML and BODY we are fixing the margin value to zero and background using RGBA Property. Now for adding loading spin to explore load animation we are using Java Script.

## Loading Spinner Javascript Code:-

but 1st add this cdn link to your project as in the script tag of javascript
```
https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js
```
Now add this js code to your js file
```
let opts = {
 lines: 13,
 length: 28,
 width: 14,
 radius: 42,
 scale: 1,
 corners: 1,
 color: '#FFF',
 opacity: 0.25,
 rotate: 0,
 direction: 1,
 speed: 1,
 trail: 60,
 fps: 20,
 zIndex: 2e9,
 className: 'spinner',
 top: '50%',
 left: '50%',
 shadow: false,
 hwaccel: false,
 position: 'absolute',
},
 target = document.getElementById('spinner'),
 spinner = new Spinner(opts).spin(target);
```
In this JavaScript code , First we are creating an variable with target and getting the ID using get element by id property. Then again we creating an variable spinner and adding new spinner object and passing a OPTS variable that contains values for making load spin and the spin(target) is called out.

The values like length , width , height , color, rotate etc... is added to complete the load spin.

Now We have completed our Project successfully By adding source codes. So we can move for project preview in the given Output section.

Now We have Successfully **[Add Loading Spinner](https://www.codewithrandom.com/2022/10/05/loading-spinner-using-javascript/)** Using JavaScript. You can use this project for your personnel needs and the respective lines of code are given with the code pen link mentioned below.

If you find out this Blog helpful, then make sure to search Codewithrandom on google for Front End Projects with Source codes and make sure to Follow the Code with Random Instagram page.

REFER CODE - Hexr

WRITTEN BY - Ragunathan
Exporting Vue Gantt Chart with Complete Customization
Tags: vue, webdev
Published: 2023-06-06 07:23:02

Learn how easily you can export a Syncfusion Gantt Chart as PDF and Excel files in a Vue application. This video also explains how to customize the file name, footer, theme, predecessor in the documents, and export them. Syncfusion’s Vue Gantt chart is a project planning and management tool used to display and manage tasks hierarchically with a timeline. 

It helps assess how long a project should take, determine the resources needed, manage the dependencies between tasks, and plan the order in which tasks should be completed. 

_Product overview_: https://www.syncfusion.com/vue-components/vue-gantt-chart

_Download an example from GitHub_: https://github.com/SyncfusionExamples/exporting-vue-gantt-chart-with-complete-customization

_Refer to the link to know about exporting Gantt chart as PDF_: https://ej2.syncfusion.com/vue/documentation/gantt/pdf-export/pdf-export

{% youtube UOx3TGsL48c %}
Using ChatGPT to migrate from PHP annotations to attributes
Tags: chatgpt, php, attributes, annotation
Published: 2023-06-06 07:13:00

If you are migrating php projects from php 7.x to 8.x, you possibly have encountered the situation of having to change all the models that use annotations to use attributes.
It can be a long and heavy task, specially when your project have many classes which use annotations such as entities, domain models etc.

In this short post I would like to share with you a [chatgpt](https://openai.com/blog/chatgpt) prompt which has saved me a lot of time in doing so repetitive task.

Let's see the prompt:

```
The following piece of php code use doctrine annotations to define fields metadata:
    ```
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     * @Groups({"list"})
     */
    private ?int $id = null;

    /**
     * @ORM\Column(type="string", length=100)
     * @Groups({"list"})
     */
    private string $username;

    /**
     * @ORM\Column(type="string", length=100)
     */
    private string $password;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     * @Groups({"list"})
     */
    private ?string $name = null;

    /**
     * @ORM\Column(type="datetime")
     * @Gedmo\Timestampable(on="create")
     */
    private ?DateTimeInterface $createdAt = null;

    /**
     * @ORM\Column(type="json", nullable=true)
     * @Groups({"list"})
     */
    private array $roles = [];

    /**
     * @ORM\Column(type="boolean")
     * @Groups({"list"})
     */
    private bool $enabled;

    ```

Your task is to transform it to use attributes instead using the following rules: 
    - Avoid writing "use" statements
    - Avoid class name and curly braces
```

Let's review the prompt step by step:

```
The following piece of php code use doctrine annotations to define fields metadata:
```
I start the prompt by telling chatGPT what the bellow piece of code represents. Then, I wrap the piece of code between three quotes so that chatGPT can distinguish where the code starts and ends.

```
Your task is to transform it to use attributes instead using the following rules: 
    - Avoid writing "use" statements
    - Avoid class name and curly braces
```

Finally, we tell chatgpt what it has to do (*transform it to use attributes instead*) and then we instruct it with some rules: *Avoid writing "use" statements* and *Avoid class name and curly braces*. This rules are useful since they remove all elements I do not need to copy and, when chatgpt returns the result, I directly copy the content from the "*Copy code*" button.

The following image shows the result for the last prompt:

![ChatGPT prompt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1dd1o03g2wj8j2urhkr8.png)

As shown in the above image, I only have to press copy code button and replace my annotated class properties with the ones returned by chatgpt.

And that's all :), I hope it can serve others to save time in their repetitive tasks.
Personal Projects I am most proud of
Tags: javascript, programming, ai, webdev
Published: 2023-06-06 07:07:46

These are my GitHub repos I recently contributed to that I am most proud of
1. https://github.com/likhaCMS/likhaCMS - LikhaCMS is a Web App Builder with Built-in UI Building Blocks,
Drag and Drop Page Builder, Component Code Editor, Dev and Staging Environment
2. https://github.com/trinly01/sequel.ai - Natural Language to Database Query Result! Say goodbye to the frustration of writing complex SQL queries
3. https://www.npmjs.com/package/micro-local-store - provides a shared local storage solution across different origins. It creates an isolated local storage for each instance, allowing you to store and retrieve data seamlessly. It's perfect for micro-frontend architectures, enabling different micro-apps to communicate and share state without conflicts.
4. https://github.com/trinly01/remap.js - simplifies data transformation, making it suitable for a wide range of use cases like complex data, including nested data, arrays, and objects
5. https://github.com/trinly01/TrinDB - A fast RESTful persistent or in memory NoSQL database (18 KiB only!)
6. https://github.com/trinly01/real-share - Directly call a function or method of a remote object from a Node.js App thru websocket that can be shared to any web frontend frameworks or mobile apps.
7. https://github.com/trinly01/puzzy-search - google-like search and auto suggest (did you mean...) misspelled words, fuzzy search, suggest similar words
8. https://www.npmjs.com/package/ink-html - Prints a specific area/element of your html page for any frontend framework
9. https://trinly01.github.io/sentimiento - Sentimiento: Feedback Analysis: Natural language processing in determining whether the writer's attitude is positive, negative, or neutral.
10. https://trinly01.github.io/CodeWar/#/ - Code Cracking Game
11. https://trinly01.github.io/tanim.bala/ - Flappy-Bird-like game 
12. https://m.apkpure.com/developer/Trinmar%20Boado - Cross platform apps using Phonegap / Cordova

## Vue / Nuxt / Vite / Typescript Projects

- https://github.com/trinly01/CouponWallet
- https://github.com/trinly01/VoxelStore
- https://github.com/trinly01/perch-frontend-test
- https://github.com/trinly01/iona-cat