teleren/devto huggingface dataset:
How to convert a single-player game to Multiplayer in Unity?
Tags: gamedev, unity3d, tutorial, csharp
Published: 2023-02-02 13:24:42

This post describes steps to converting a single player game to a multiplayer game, using the new Unity Multiplayer networking system. The process described here is a simplified, higher level version of the actual process for a real game; it doesn’t always work exactly like this, but it provides a basic recipe for the process.

**NetworkManager set-up**

- Add a new GameObject to the Scene and rename it “NetworkManager”.
- Add the NetworkManager component to the “NetworkManager” GameObject.
- Add the NetworkManagerHUD component to the GameObject. This provides the default UI for managing the network game state.

**Player Prefab set-up**

- Find the Prefab for the player GameObject in the game, or create a Prefab from the player GameObject
- Add the NetworkIdentity component to the player Prefab
- Check the LocalPlayerAuthority box on the NetworkIdentity
- Set the playerPrefab in the NetworkManager’s Spawn Info section to the player Prefab
- Remove the player GameObject instance from the Scene if it exists in the Scene

**Player movement**

- Add a NetworkTransform component to the player Prefab
- Update input and control scripts to respect isLocalPlayer
- Fix Camera to use spawned player and isLocalPlayer

For example, this script only processes input for the local player:

```
using UnityEngine;
using UnityEngine.Networking;

public class Controls : NetworkBehaviour
{
    void Update()
    {
        if (!isLocalPlayer)
        {
            // exit from update if this is not the local player
            return;
        }

        // handle player input for movement
    }
}
```


**Basic player game state**

- Make scripts that contain important data into NetworkBehaviours instead of MonoBehaviours
- Make important member variables into SyncVars

**Networked actions**

- Make scripts that perform important actions into NetworkBehaviours instead of MonoBehaviours
- Update functions that perform important player actions to be commands 

**Non-player GameObjects **

Fix non-player prefabs such as enemies:

- Add the NetworkIdentify component
- Add the NetworkTransform component
- Register spawnable Prefabs with the NetworkManager
- Update scripts with game state and actions

**Spawners**

- Potentially change spawner scripts to be NetworkBehaviours
- Modify spawners to only run on the server (use isServer property or the OnStartServer() function)
- Call NetworkServer.Spawn() for created GameObjects

**Spawn positions for players**

- Add a new GameObject and place it at player’s start location
- Add the NetworkStartPosition component to the new GameObject

**Lobby**
- Create Lobby Scene
- Add a new GameObject to the Scene and rename it to “NetworkLobbyManager”.
- Add the NetworkLobbyManager component to the new GameObject.
- Configure the Manager:
   Scenes
   Prefabs
   Spawners
Random Face Generator
Tags: flutter, android, ios, linux
Published: 2023-02-02 13:11:04

Made a Flutter app which generates random faces (these people don't actually exist). You could also select a gender and a age range. The app also has dark theme support and has a neumorphic design.

The [website](https://adityar224.github.io/Random-Face-Generator/) is deployed on Github Pages. You could also download the [Android app](https://github.com/adityar224/Random-Face-Generator/releases). Please checkout my github repo :)

[https://github.com/adityar224/Random-Face-Generator](https://github.com/adityar224/Random-Face-Generator)
Canvas API on Javascript
Tags: dynamicbitmap
Published: 2023-02-02 12:49:44

<html>

<body>
<canvas id="rect" width="150" height="150"> </canvas>
<script type="text/javascript">

var c = document.getElementById('rect');

var context = c.getContext('2d');

context.fillStyle= '#C0C0C0';
context.fillRect(10,20,180,100);
</script>
</body>

</html>
Avoid These Mistakes to Reduce Your SaaS Customer Churn
Tags: startup
Published: 2023-02-02 12:38:26

SaaS companies face the challenge of retaining customers and preventing churn, which can significantly impact revenue and growth. To minimize churn, companies must understand its causes and take action to mitigate them. Here are some common causes of churn and solutions to address them:

**Poor customer experience **- Improving user experience through product updates, accessible customer support and listening to feedback.

**Pricing** - Determine a competitive price point through market research, flexible pricing options and regularly reviewing pricing.

**Inadequate product-market fit** - Understand customer needs and pain points through research, seek feedback, and continuously improve the product.

**Poor onboarding and training** - Invest in robust onboarding and training programs, including tutorials, resources and live support, and regularly review and update materials.

**Lack of engagement** - Regular communication with customers through email newsletters, in-app notifications and product updates, and actively seeking feedback.

By addressing these causes, SaaS companies can minimize churn and maintain a loyal customer base.

[Read more](https://churnfree.com/blog/what-can-saas-companies-learn-from-churn/)
Blockchain
Tags: programming, blockchain, solidity, productivity
Published: 2023-02-02 12:28:27

Blockchain is a decentralized digital ledger that records transactions in a secure and transparent manner. It operates on a distributed network of computers, making it resistant to tampering, modification, and hacking.

The technology behind blockchain was initially developed to support the first cryptocurrency, Bitcoin. However, since then, blockchain has found applications in many industries, such as finance, supply chain management, voting systems, and more.

Blockchain works through the use of blocks, which contain transactions and other data. Each block is linked to the previous one through cryptography, forming a chain of blocks that are stored on multiple computers in the network. This decentralized approach provides security, transparency, and immutability.

One of the key benefits of blockchain is that it allows for trustless transactions. Instead of relying on a central authority, transactions are validated by the consensus of the network participants, eliminating the need for intermediaries. This can result in lower costs, faster transactions, and increased security.

Another advantage of blockchain is its ability to store data in a secure and tamper-proof manner. The decentralized nature of the technology makes it difficult for any single party to modify or delete data, ensuring its integrity and authenticity.

Despite its benefits, blockchain is not without its challenges. Scalability remains a major issue, as the number of transactions that can be processed per second is limited. Additionally, the energy consumption required for mining or validating transactions is significant and has raised concerns about the environmental impact of blockchain.

In conclusion, blockchain is a rapidly evolving technology that has the potential to revolutionize various industries. While there are still challenges to be addressed, the benefits offered by blockchain make it a promising technology for the future.`****`
How to Send Emails with JavaScript using Sendchamp Email API
Published: 2023-02-02 12:22:09

Sendchamp [Email API](https://sendchamp.readme.io/reference/send-email-api) allows you to programmatically send emails to your customers. 

Let’s walk through how to Send Emails with JavaScript using Sendchamp Email API step by step so you can get on to the important steps like sending Emails to your customers.

## **Prerequisite**

Before getting started, ensure you have:

- JavaScript knowledge and familiarity with Nodejs.
- Nodejs installed on your machine
- Sendchamp account [sign up on Sendchamp](https://my.sendchamp.com/?utm_campaign=sendchamp_developers_website&utm_medium=webl&utm_source=sendchamp_developers_website).
- A subscription plan. 

Sending emails using Sendchamp Email API is a simple process that requires a subscription plan. To subscribe to a plan, follow these steps:

* Go to your Sendchamp [Dashboard](https://my.sendchamp.com/) and navigate to the email section.
* Click on the subscription option and select a plan that suits your needs.
* The subscription fee will be charged from your wallet balance on Sendchamp.

Once you have an active subscription plan, you can start sending emails to your customers using the Sendchamp Email API. 

## Setting up your Nodejs Application

Create a `.js` file, let’s call it `email.js`, and in the file, initialize an instance with your credentials:

```javascript
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    Authorization: 'Bearer ACCESS_KEY’
  },

```

Make sure to replace `ACCESS_KEY` with your correct public access key on your Sendchamp dashboard.

## Sending an Email Message

The Email API takes the following parameters:

Subject: The heading of the email.
To: The email and name of the recipient.
From: The email and name of the sender.
Message body: Message format and value of the message. 

The type can be either "html" or "text" and the value should be the content of the message.

Let’s try to hard-code the following parameters to test out the Email API.

For example, if you want to send an email to a recipient with the subject "Test Email" and the message 'This is the content of the message', the body of the request would look like this.

```javascript
  body: JSON.stringify({
    to: [{email: 'recipient@example.com', name: 'Sender'}],
    from: {email: 'sender@example.com', name: 'Receiver'},
    message_body: {type: 'text/html', value: 'This is the content of the message'},
    subject: 'Hello world'
  })
};

fetch('https://api.sendchamp.com/api/v1/email/send', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

The email has been sent successfully. Thanks for following.

Join our Slack [developer community] (https://community.sendchamp.com) for questions you might have and valuable resources.

For quicker testing, you can import our [Postman collection] (https://www.getpostman.com/collections/263a6ef74ae1cf4131ef) and test APIs on Postman
Solution to common Apex issue - ApexCRUDViolation.
Tags: salesforce, salesforcedeveloper, apex, soql
Published: 2023-02-02 12:16:00

The simple answer is to put an if statements that ensures we have access at runtime, and instruct our SOQL Queries to respect the rules set by Admin.

> Eg:
> ```
> if (Schema.sObjectType.Contact.fields.Email.isCreateable()) {
>   // Create new contact
> }
> ```

Or for SOQL Queries, you can add `WITH SECURITY_ENFORCED` to tell apex that while fetching records do respect the policies set by the Org Admin.

> Eg:
> ```
> List<Account> act1 = [SELECT Id, (SELECT LastName FROM Contacts)
>   FROM Account WHERE Name like 'Acme' WITH SECURITY_ENFORCED]
> ```



Pretty Common to forget, but can save hours of Fixing PMD Issues Later on!

Have a good day :)

For Details check:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_perms_enforcing.htm
Take Your Web Development Skills to Next Level with Web API's
Tags: webdev, javascript, beginners, programming
Published: 2023-02-02 12:13:12

Web API's is one of the most kept open secret in Web development. You hardly see it in text or any forum post. If you have used document.querySelector() or document.getElementById to interact with HTML element, you have made use of Web API's. Web API's are used typically with  JavaScript but it can be used with any programming Language. There are many many Web APIs available and it can be daunting going through each one. From media streaming to HTML drag and drop, Web API's are available. One thing is sure, Web API's will take your web development skills to another level.


In this post and subsequent ones, I will demonstrate Web API's fuctionality. I will start with Web Share API for sharing text,links, files and  any content to any selected target.

**Prerequisite: HTML, Javascript**
**Objective: To famailarise readers with Web Share API**

The Web share API has two methods
    1. navigator.canShare() method to validate data is shareble.
    2. navigator.share() method invokes the native sharing mechanism of the underlying operating system.

I will use the HTML skeleton below to demonstrate Web share API at work.

```
<html>
<head>
<title>Share page </title>
</head>
<body>
        <div class="share">

            <h1 class="groupH">SHARE DONATION LINK</h1>
            <p class="groupP">Share a link to family and friends to make DONATION to your alma mata</p>

            <button class="btn-secondary share-link" type="submit" onclick="shareLink()">SHARE DONATION LINK</button>
        </div>
 <script type="text/javascript">
        const shareData = {
            title: 'Donation',
            text: 'Donation for my Alma matter',
            url: 'http://localhost:3080/share'
        }
        const shareLink = async (event) => {
        
            try {
                await navigator.share(shareData)
                console.log('Donation shared successfully')
            } catch (err) {
                console.log(err)
            }
        }


    </script>
</body>
<html>
```
In the script tag, I created a javascript object shareData that has the web page link I want to share. I called navigator.share() with the shareData as parameter inside the shareLink function. When a user clicks the Share Donation Button, the operating system sharing mechanism will be triggered.

## Finally
As demonstrated above, Web API's makes  web development easy. In my next post, I will demonstrate how to use Web Share API to share files. 

**Like and comment**, if you find this post educative.
Conclusiones, El libro negro del programador 😎
Tags: productivity, books, programming, spanish
Published: 2023-02-02 12:00:00

## **Conclusiones, El libro negro del programador**

¿Qué distingue a un profesional desarrollador de software de otro cuya carrera está llena de tropiezos, frustraciones y trabajos de mala calidad?

En toda esta saga de capítulos que compartí, se recalcan temas que no solo son propios del desarrollo de software, sino que se pueden aplicar a montón de otras áreas: motivación, entrega, disciplina, organización, uso correcto de herramientas, trabajo en equipo, pasión y vocación por lo que nos gusta hacer.

Escribir un buen proyecto de software es como correr una maratón, donde necesitamos tener más o menos la misma intensidad, ritmo y esfuerzo a lo largo de la misma.

Los mejores desarrolladores de software muestran gusto por lo que hacen, lo disfrutan, entregan soluciones elegantes y finas que dan valor al producto y satisfacen a los clientes.

Una vez concluida nuestra carrera formal, empieza la verdadera maratón, formación continua a lo largo de los años, mantener esa humildad aprendiendo nuevas tecnologías.

En una era donde la globalización está a la orden del día, donde competimos no sólo con profesionales de nuestro país, sino del mundo entero, ¿podemos llegar a ser desarrolladores profesionales sin conocer otras tecnologías, sin leer un libro al mes, sin asistir a meetups y aprender de aquellos que exponen su trabajo? La respuesta es un rotundo NO.

TODO LO MENCIONADO EN EL LIBRO NEGRO DEL PROGRAMADOR SON HABITOS QUE SE PUEDEN APRENDER.

ESCRIBIR CÓDIGO DE CALIDAD, ES TENER UNA CARRERA TECNOLÓGICA EXITOSA.

---

Te dejo el link gratuito de [*El libro negro de programador*](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf) por si te intesa leerlo, o dale click a la imagen:


[![libro](https://www.digitalskillsinstitute.com/assets/media/books/5541eba31b4b42b5bb021dc77c70d658-480.jpg)](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf)
Softaken Zimbra to Outlook PST Converter Tool
Published: 2023-02-02 11:57:13

The **Softaken Zimbra to Outlook PST Converter Tool** is efficient to convert all Zimbra files to Outlook file format. Some users can convert their single and multiple Zimbra files to Outlook file format without any data loss. There is no need for other apps or technical knowledge to convert Zimbra to Outlook. The tool migrates single or multiple Zimbra files, including emails, contacts, notes, calendars, and briefcase, into PST, MBOX, EML, HTML, MSG, VCF, ICS, and other formats. Users can preserve their converted data in a selective location on the desktop. There are some simple steps to follow to convert Zimbra files to Outlook file format:

**Following are the steps for using this advanced tool to convert Zimbra files to Outlook format:**

1. First, install the Zimbra to Outlook Converter Tool.
2. Now start the tool and select Zimbra files.
3. Preview your selected Zimbra database before the procedure.
4- Select the format in which you want to convert Zimbra TGZ to Outlook PST.
5- Add location to save the converted TGZ files.
6: Finally, hit the convert button.
AWS 5G: Powering Next-Generation Applications
Published: 2023-02-02 11:36:59

The arrival of 5G networks is revolutionizing the way we interact with technology, bringing faster speeds, lower latency, and greater connectivity to a wide range of use cases, from video and audio streaming to gaming and the Internet of Things (IoT). To support the growing demand for 5G services, AWS has introduced AWS Wavelength, a fully managed service that enables developers to build and deploy 5G applications with low latency and high throughput.


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

**Key Features of AWS 5G**

Low Latency: AWS Wavelength provides a high-speed, low-latency connection to the AWS cloud, enabling real-time data processing for use cases that require fast and responsive connections.

Integration with AWS Services: AWS Wavelength integrates with other AWS services, such as Amazon EC2 and Amazon S3, to provide a complete solution for 5G application development. This enables developers to build and deploy 5G applications with the benefits of the AWS cloud, including security, scalability, and reliability.

Support for 5G Use Cases: AWS Wavelength is designed to support a wide range of 5G use cases, including augmented and virtual reality, gaming, and autonomous vehicles.

**Benefits of AWS 5G**

Fast and Responsive Applications: With its low latency and high throughput, AWS 5G enables the development of fast and responsive applications that can deliver a seamless user experience.

Cost-Effective: AWS Wavelength is a fully managed service that runs on AWS infrastructure, providing a cost-effective solution for 5G application development.

Scalable and Reliable: AWS 5G is designed to be scalable and reliable, making it possible to build and deploy applications that can grow and change with the needs of the business.

**In conclusion**, AWS 5G is a powerful tool for developers and organizations looking to take advantage of the benefits of 5G networks and the cloud. With its low latency, high throughput, and integration with other AWS services, AWS Wavelength provides a complete solution for 5G application development, enabling organizations to quickly and easily build and deploy 5G applications.
Unlock the future of data protection with Web 3.0!
Tags: career, webdev, programming, github
Published: 2023-02-02 11:32:27

Are you ready to discover the groundbreaking ways of Web 3.0 is taking privacy and security to the next level?
Keep reading to find out>>> 

1. - **Decentralization** - By moving away from centralized infrastructure reduces the attack surface and improves data protection.

2. - **Blockchain Technology** - It enables tamper-proof data storage and secure, transparent transactions, making it almost impossible for hackers to tamper with data.

3. - **Cryptography** - It allows for secure communication and data sharing by using strong encryption methods.

4. - **Identity and Access management** - It allows for more secure and transparent identity and access management, reducing the risk of data breaches.

5. - **AI and ML** - It enables more secure, personalized and efficient interactions between businesses and consumers, keeping sensitive data safe.

6. - **GDPR and other regulations** - It makes it easy to comply with data protection regulations such as GDPR, protecting users' rights.

Web 3.0 is bringing significant changes to the way we approach data privacy and security in the technology industry. From decentralization to the use of blockchain, AI and ML, the impact of these technologies on the industry is undeniable.

But we want to hear from you! What do you think will be the most significant impact of Web 3.0 on the industry? 
[Follow For More Technology Update 
](https://www.hypeteq.com/)Share your thoughts in the comments below.
Bash: Compare files and copy them to another folder if they don't exist
Tags: bash, linux
Published: 2023-02-02 11:29:32

You can compare files in bash and copy them to another folder if they don't exist in the destination folder using the following script:

```bash
#!/bin/bash

# Set the source and destination directories
source_dir=<path_to_source_folder>
destination_dir=<path_to_destination_folder>

# Get a list of files in the source directory
files=$(ls "$source_dir")

# Loop through the list of files
for file in $files
do
  # Check if the file exists in the destination directory
  if [ ! -f "$destination_dir/$file" ]; then
    # If the file does not exist, copy it to the destination directory
    cp "$source_dir/$file" "$destination_dir/$file"
    echo "Copied $file to $destination_dir"
  else
    echo "$file already exists in $destination_dir"
  fi
done
```

This script sets the source and destination directories, then gets a list of files in the source directory using the `ls` command. It then loops through the list of files, checking if each file exists in the destination directory using the `if` statement and the `-f` option of the `[` command. If the file does not exist in the destination directory, it is copied using the `cp` command. A message is printed indicating whether the file was copied or if it already exists in the destination folder.
tic tak toe as a project in a course
Tags: python, tictactoe, beginners, miniproject
Published: 2023-02-02 11:28:55


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eq4qg86hcaa1e1yd731k.gif)this small code is a task that i had to do for a course that i am taking, it is the first time that i have made a funcional game, i saw it from a youtube tutorial but it has helped me to continue advancing in my course and understand the lenguage more.

Description of the code: in this code, the board has been written,some global variables such a current player, winner and running game, then we have printed each part of the board assingning it a value to later be able to change the appearance of the board by a strikethrough or a cicle, they were created entry declarations to win horizontally, vertically and diagonally, tie declarations were also considereted and when winning and a text is printed as the case may be, in addition to a declaration to change the player and to be able to play with the machine.
this is the link to the site in github for check the code https://github.com/zivoxcrooc/ticktactoe