teleren/devto huggingface dataset:
Perforce and Notepad++
Tags: gamedev, perforce
Published: 2023-05-04 19:33:58

---
title: Perforce and Notepad++
published: true
date: 2023-03-10 00:00:00 UTC
tags: gamedev, perforce
canonical_url: https://tinygame.dev/posts/Perforce-and-Notepad++/
---

## Increment Notepad

Some Perforce commands will require you to input some info. Operations like changing the permissions with `p4 protect` or creating a changelist with `p4 change` for example. An alternative is to the the p4v GUI of course, but occasionally you might want to run them from the command line. In these cases, perforce will launch a text editor for you to make the change in. By default this will be Notepad. If you're on Linux or Mac it will be vi (lucky you), but if you're making games chances are you'll be on Windows.

We can change the editor perforce uses with the P4EDITOR environment variable. Notepad++ is a good option and what I use. For this to behave well though, you'll need to add the `-multiInst` and `-nosession` arguments. The former to allow Notepad++ to launch a separate, temporary session exclusively for perforce, and the latter to avoid including all your currently open tabs in this temporary session.

The full command line looks like this: `p4 set P4EDITOR="C:\Program Files\Notepad++/Notepad++.exe -multiInst -nosession"`.
What is the best free background remover app?
Tags: image, productivity, machinelearning
Published: 2023-03-09 23:17:45

As an expert in image editing, I've tried and tested numerous background remover apps over the years. And while many of them were effective, there was always one drawback - they weren't free. As someone who believes that everyone should have access to high-quality image editing tools, I knew I had to do something about it.

That's why I built [imgaix.com](https://imgaix.com/). I wanted to create a tool that could remove backgrounds from images with the same level of accuracy as some of the more expensive apps on the market, but without the cost. And with advanced AI algorithms powering the background removal process, I was able to achieve just that.

![imgaix.com best free background remover app](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zine6vap40rpmhzkmhm7.PNG)

I know firsthand how frustrating it can be to have to shell out money for image editing software, especially if you're just starting out in the field. And while there are plenty of free tools available, they often come with limited functionality or lower accuracy rates. With [imgaix.com](https://imgaix.com/), I wanted to provide a solution that was both accessible and effective.

Creating imgaix.com was a labor of love for me. I poured my years of experience and expertise into building a tool that could help others achieve their image editing goals without breaking the bank. And seeing the positive feedback from users around the world has been incredibly rewarding.

If you're someone who has struggled to find a high-quality, free background remover AI app, I encourage you to give imgaix.com a try. I built it with people like you in mind, and I'm confident that it will exceed your expectations. So go ahead - upload an image, remove the background, and see for yourself what [imgaix.com](https://imgaix.com/) can do.
Weekly Challenge #2 - Dot Dash Decode
Tags: codenewbie, weeklychallenge, cnweekly
Published: 2023-03-09 23:13:54

---
title: Weekly Challenge #2 - Dot Dash Decode
series: Weekly Challenge
published: true
description: CodeNewbie's Weekly Challenge series hosted by Brian
tags: CodeNewbie, weeklychallenge, CNweekly
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-09 16:53 +0000
---
Morse code is a method of transmitting text information as a series of on-off tones, lights, or pulses. It uses a standardized sequence of short and long elements to represent individual letters, numbers, and some punctuation.

This week's programming challenge is to build an app that can either encode text into Morse code or decode Morse code into text. 

For this challenge, you must build an app that can take user input either through the spacebar on a keyboard or by clicking a mouse and convert it to Morse code. Alternatively, you could build an app that translates Morse code input into regular text. The app should be able to handle capital letters, numbers, and some punctuation.

Here's a hint! The typical way to program this app is to store the Morse code equivalents for each character in a dictionary or list. Then you'll need to write logic to convert the user's input into Morse code using those equivalents. For example, when the user enters a "T", the app would convert that to "- " representing the short and long Morse code tones for the letter T.

This is a great challenge for practicing your logic and dictionary skills in any programming language. Feel free to build the app using the language and tools of your choice. Share your GitHub repo or CodePen link in the comments below!

Good luck and happy coding!
Day 710 : Amazing
Tags: hiphop, code, coding, lifelongdev
Published: 2023-03-09 23:10:48

_liner notes_:
- Professional : Pretty good and productive day. Had a couple of meetings and got the chance to demo a project I just finished up. People said that it could be helpful for them, so that's good. Then I spent the rest of the day working on my proof of concept project. Got the dashboard laid out, added an event form, created an endpoint to get credentials and another to save the settings file to GitHub. Tomorrow, I want to read the settings file, display data and be able to edit/resave data and get some of the main functionality working. So far, everything has been to set up the application to be able to do its main purpose. Got alot accomplished considering how much other stuff popped up this week.

- Personal : Last night, I went through a bunch of tracks and got to a good stopping point with my work project that allowed me to get so much done today. I ran into this weird issue and couldn't figure it out, but after a few console.logs later, it made sense why I was getting the error. Will definitely remember the next time I'm using the template HTML element. If I'm using an event listener on an element in a template and I've already cloned it, the element is on the document and not on the clone anymore because it was already added to the DOM but the time the event listener is fired. Also, I think I may have come up with a way around the blocker I was having with my personal side project.

![Overhead aerial view of the coastline on Lake Brienz, Switzerland where on one side is a dense pine forest and the other side very blue water](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbwgp6swz70trf0mzpji.jpg)

Found out that my Chromebook is finally on its way back to me. It's been almost a month since I sent it in. Something about supply shortages. Kind of amazing how far I was able to get with my old Chromebook that I'm typing this on right now. Going to eat dinner, go through tracks for the radio show, figure out some financial stuff and work on my side project.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube iuqh4DXqYAM %}
Getting back to writing...
Tags: webdev, javascript, beginners, programming
Published: 2023-03-09 23:01:52

Well, as much as I intended to document my coding journey I quickly let the documenting part get away from me. Not too surprised by that. I had planned to end my days reviewing what I had done that day and using this blog as my outlet but that did not work out as I had intended. After getting home from work and putting in my time with The Odin Project's(TOP) lessons I had no energy left to give. Not that that has changed but I am going to make a more concerted effort to keep up the habit. I believe I will be able to get a lot out of these posts down the line and help me gain some perspective on how far I have come should perspective be needed(and I know it will!).

Anyways, I have now completed the Foundations portion of TOP and find myself breezing through the first portion of the full stack JS path. So far it has been a lot of reading, with introductions to new syntax and HTML/CSS concepts. I have been really enjoying the change of pace and the introduction to new material but also trying to get through this part as quickly as possible because I have never struggled that much with HTML/CSS(that's not entirely true as far as CSS is concerned). The same can not be said for JS though. I still don't feel too confident about my ability to code with JS and the lesson block following the one I am on is a deep dive into JS.

I know I will gain confidence with more practice so I am excited to get started again. However, I am unsure if TOP alone is enough to really get me to where I want and have been on the look out for some supplementary material. I was really hoping to go on this journey and reach my goal without having spent any money on courses but I have been finding some that seem interesting and targeted at some of the issues I have been facing. The main issue being my ability to problem solve. 

I don't feel confident in my ability to be given a problem that has a solution and be able to find it on my own. Take the information I have learned and figure out the best course of action. The argument could be made that at my current level I am expecting too much of myself, but either way I still recognize that as being a weak point in my education/coding ability. I think I have made too much of a leap, from learning how to write functions, loops and if statements, to coding whole projects(like calculators and etch-a-sketches). Not that those are big projects but I feel like I skipped a step and went from 'A to C' without stopping at 'B'.

I have seen some courses out there that have talked about how they address this feeling directly by connecting the dots a bit more before jumping to building projects. Still haven't pulled the trigger on anything yet, and will likely not do so until I get to the next JS section of TOP. If I still feel like I am missing something once I get there then I will look for some other material to help fill the gaps. In the end the investment will be worth it, I believe.
JavaScript Scope
Tags: javascript, webdev, programming
Published: 2023-03-09 17:59:37

## What is Scope?

- Scope determines the accessibility of variables

- JavaScript has 3 different types of scope
   1. Block 
   2. Function
   3. Global

## Types of Scopes

- Block Scope:
    A variable that is defined within a block of code will only be accessible within that block. It can not used outside the block even if the block is inside a function. 

- Function Scope:
    A variable that is defined in a function can only be used within that function. The variable can be used within a block that is inside that function, but cannot be used outside of the function itself. 

- Global Scope:
    A variable that is defined as a global variable is accessible to the entire program. Meaning that a function can access this function as well as the block inside that function. 

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

## Example of Scope

```
const name = "Holden"
const age = 22

function checkMyAge(name, age){
   const word = "You are"
   if(age < 21){
     const oldEnough = "old enough."
     console.log(`${name}, ${word}${age} and are ${oldEnough}`)
   }
   else{
     const notOldEnough = "not old enough."   
     console.log(`${name}, ${word} ${age} and are ${notOldEnough}`)
   }
}
checkMyAge(name, age)
```
   As you can see the variables name and age are global scope variables. The variable word is a function scope variable which means it can only be accessed inside the checkMyAge function. The variables oldEnough and notOldEnough are block variables which can only be accessed inside the if and else statements respectfully. Since the age variable is 22, the function's output should be "Holden, you are 22 and are enough."

## Recap
   Scope is an extremely used aspect in JavaScript. It manages the availability of variables within a program. It keeps those variables confined into separate parts of your code. You may use the name of these variables in multiple parts of your code and scope allows you to use them when needed. 

## Sources

- https://www.w3schools.com/js/js_scope.asp
Connect Redis with Node app
Published: 2023-03-09 22:40:26

I have Redis hosted on a remote ubuntu server.

There's some configuration that we have to modify. Follow this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04) to properly configure Redis so it can accept connections.

In order to connect my Node app to the remote Redis instance, we need to install `redis` and `redis-om` packages in our Node app. 
First, define the connection URL 

```
require("dotenv").config();

const URL = `redis://${process.env.REDIS_HOST}:${process.env.REDIS_PORT}`;

```
 
- **REDIS_HOST** : the public IP address of the server. 
- **REDIS_PORT** : the Port that Redis was exposed to on the server, by default it's `6379`. In my case, the Redis host is the public IP of the EC2 instance. But in order to open port `6379` of my remote ubuntu server, I have to add an inbound rule on the AWS dashboard. Click [here](https://dev.to/tttn13/host-a-postgresql-database-on-ubuntu-server-using-ec2-3dfi) to see how I did it. 

```
//index.js

const init = async () => {
  const redisClient = require("redis").createClient({
    url: URL,
  });
  await redisClient.on("error", (err) =>
    console.log("Redis Client Error", err)
  );

  await redisClient.connect();
  if (redisClient.isReady) {
    console.log("client is ready");
  }
  await redisClient.set("key", "testvalue");
  const value = await redisClient.get("key");
  console.log("value is", value);
  await redisClient.disconnect();
};

init();
```
If you're like me and you don't have a password enabled for your redis, you will probably see something like this

```
[ErrorReply: DENIED Redis is running in protected mode because protected mode is enabled and no password is set for the default user. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a an authentication password for the default user. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.]

```

Follow one of the suggested solutions mentioned above then rerun the redis server. 
```
sudo systemctl restart redis-server
```

Run your app again and it should be working. You are now connected to Redis !
guaranteed
Tags: reward
Published: 2023-03-09 22:38:16

[guaranteed reward](http://Shopic.unaux.com)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1g2lbl16diy6s26hgwuu.jpg)(Shopify.unaux.com)when you buy from this website 
You will gate definat reward depending upon the price for ex you buy the product of rs 100 you will gate 5 rs shopic.unaux.com url of the website 
[**Know more**](shopic.unaux.com)
Tech Equality Pledge: Educating, Mentoring, and Advocating for Change
Tags: wecoded
Published: 2023-03-09 22:34:09


## I pledge to embrace equality in tech by...

I pledge to embrace equality in tech by educating myself, mentoring, advocating for change, supporting diversity, and amplifying voices.

## Obstacles to gender equality in the tech industry are...

In the tech sector, there are various barriers to gender equality. Unconscious bias is a significant barrier. Women, transgender, nonbinary, gender nonconforming, and two-spirit people may find it harder to get hired, advance in their careers, or stay in tech professions as a result. An additional barrier is a lack of representation. However, they frequently work in unfavourable circumstances that include harassment and discrimination, which can hinder their ability to develop in their professions or even stay in the field. Ultimately, addressing gender imbalance in the tech sector is a difficult issue that calls for cooperation from individuals, groups, and society at large.

## Diversity and inclusion initiatives have positively impacted...

Initiatives for diversity and inclusion have had a positive effect on the tech sector in a number of ways. increased representation of underrepresented groups, such as women, people of colour, trans people, nonbinary persons, those who identify as gender non-conforming, and people from different backgrounds. As a result, the workforce is now more diverse and inclusive, which can encourage innovation, creativity, and a wider variety of viewpoints. Diversity and inclusion programs have improved the retention rates of underrepresented groups by fostering a more inclusive workplace. 

Initiatives for diversity and inclusion have assisted businesses in utilizing these differences to spur innovation and competitiveness. It can aid in fostering a more pleasant workplace culture by encouraging respect, empathetic behaviour, and teamwork. Higher staff morale, job satisfaction, and general well-being can result from this. Companies may attract a wider spectrum of clients by developing goods and services that represent the diversity of their customer base. This might give businesses a competitive advantage and expand their clientele.

The tech sector has benefited overall from diversity and inclusion initiatives, which have aided in building a workforce that is more inclusive, diverse, and creative.

## I will commit to educating myself about...

I am dedicated to educating myself about marginalized groups in technology, seeking diverse perspectives, supporting and mentoring underrepresented groups, learning about gender equality issues, being an ally and an equal opportunity advocate, and seeking resources to improve.
No Alexa, No Google: Custom Hotword Detection Arduino
Tags: 100daysofcode, challenge, arduino, ai
Published: 2023-03-09 22:04:21

Are you interested in calling your Arduino board with its own name? All you need is:
- Arduino IDE  (free)
- Arduino Nano 33 BLE 
- Picovoice Console  Account (free)

**1. Train a custom hotword**

- Sign up for [Picovoice Console] for free (https://console.picovoice.ai/)
- Go to the [Porcupine Page](https://console.picovoice.ai/ppn)
- Select the language for your model
- Type in the phrase, i.e. name you'd like to give and click on the `train`.
[PS: You can read [our tips](https://picovoice.ai/docs/tips/choosing-a-wake-word/) for selecting a hotword.]

- Pick Arm Cortex-M as the platform and Arduino Nano 33 BLE as the board type.
- Paste your board UUID.
1. Open Arduino IDE
2. Download `Porcupine_EN` library
3. Run the `GetUUID` example from `Porcupine_EN`. 
4. Check the Serial Monitor
5. Copy the UUID and paste it on Picovoice Console.
- Click on Download.
Congrats! You trained your hotword!

**Embed the Hotword**
- Open the file `pv_porcupine_params.h` with a text editor. `The KEYWORD_ARRAY[]` contains your newly-trained model!
- Run the `PorcupineExample` from the `Porcupine_EN` library.
- Replace KEYWORD_ARRAY in the params.h with yours.
- Copy your `AccessKey` from [Picovoice Console] (https://console.picovoice.ai/)
- Add your AccessKey in PorcupineExample.ino. Don't forget to wrap it in `"` and terminate the line with `;`!
- Upload and run the example

Voila!

Looking for more examples?
Check out [Picovoice Blog](https://picovoice.ai/blog/arduino-voice-recognition-in-ten-minutes-or-less/)
Hydration: What is it?
Tags: webdev, javascript, programming, react
Published: 2023-03-09 21:49:41

Besides the name, it has nothing to do with water. But still, hydrate yourself. Hydration is simply the process of attaching JavaScript behavior to HTML elements that have been generated on the server, it is necessary to make a web page interactive, allowing users to click buttons, fill out forms, and perform other actions. Without hydration, web pages would be static and unresponsive.

In SSR (Server-side Rendering), the HTML and JavaScript are generated on the server and sent to the client as a fully-formed document. However, this HTML is still just a static representation of the page. Hydration is still necessary to attach event listeners to the page and make it interactive and dynamic. Once the HTML and JavaScript bundles have been downloaded by the browser, the JavaScript takes over and attaches event listeners to the HTML, allowing for a fully interactive user experience.

Hydration isn't needed in client-side rendering (CSR) because the entire JavaScript bundle is loaded and executed on the client, which includes all the necessary event listeners and JavaScript behavior. This means that the JavaScript code can directly manipulate the HTML elements that it created, without the need for hydration. Unlike server-side rendering (SSR), where HTML is generated on the server and sent to the client as a fully-formed document.

## Conclusion

Hydration is a key concept in web development, allowing for dynamic and interactive user experiences on the server. By understanding how hydration works in SSR, developers can build web applications that are fast, responsive, and accessible to a wide range of users.