teleren/devto huggingface dataset:
App Settings in .NET MAUI - Notifications
Tags: dotnet, dotnetmaui, ios, android
Published: 2023-04-11 12:55:50

In this article, I'm going to show you how to validate if the user enabled or disabled the app notifications in .NET MAUI for Android and iOS.

---
### Create a static class NotificationsHelper
```csharp
public static bool AreDeviceNotificationsEnabled()
    {
#if ANDROID
        return AndroidX.Core.App.NotificationManagerCompat.From(Platform.CurrentActivity).AreNotificationsEnabled();
#elif IOS
        var settings = UIKit.UIApplication.SharedApplication.CurrentUserNotificationSettings.Types;
        return settings != UIKit.UIUserNotificationType.None;
#endif
    }
```

### Validate
It is a good practice to help the users by asking them if they want to open the app settings, so they can enable the notifications.
```csharp

if (!AreDeviceNotificationsEnabled())
{
   if (showAlert)
   {
      var result = await Application.Current.MainPage.DisplayAlert("Enable Notifications", "Your notifications system are currently turned off", "Go to Settings", "Cancel");
      if (result)
      {
         AppInfo.ShowSettingsUI();
      }
   }
}    
```

### Conclusion
In .NET MAUI it is really cool how easy you can implement a static method that allows to execute code based on each platform. Of course if you prefer to avoid the declarative conditionals you can always use the _.ios.cs_ and _.android.cs_ file class naming convention.

Thanks for reading! Follow me on Twitter **[@ivictorhugo](https://twitter.com/ivictorhugo)**
#TestCulture 🦅 Episode 31 – #T_Shape
Tags: webdev, beginners, testing, agile
Published: 2023-04-11 12:54:02

The term "T-Shape" visually describes the competences expected on a T-Shape profile:
The vertical bar of the T represents the expertise of the person who has a level of competence that allows him or her to get to the bottom of the issue. 😎
The horizontal bar of the T represents all the other competences that a team needs to function, which is expressed by the width of this bar.
At the same time, this bar also indicates that all these other competences have a low level. 🔋
Learn more about T-Shape: [https://agilitest.com/cards/t-sha](https://agilitest.com/cards/t-shape)

A thread [on Twitter.](https://twitter.com/agilitest/status/1633863711999012864?s=20)
Change computer name displayed in Terminal (Mac)
Tags: scutil, mac, terminal, macos
Published: 2023-04-11 12:53:29

---
title: Change computer name displayed in Terminal (Mac)
published: true
description: 
tags: scutil, mac, terminal, macos
---

As a macOS user, you may have noticed that your computer's name appears in the Terminal prompt. This name, also known as the hostname, is set by default when you first set up your computer, but it can easily be changed using a simple command in Terminal. In this blog post, we will show you how to change the computer name displayed in Terminal on macOS using the scutil command.

## Step 1: Open Terminal

The first step to changing the computer name is to open the Terminal application. You can do this by searching for Terminal in Spotlight or by navigating to `Applications > Utilities > Terminal`.

## Step 2: Determine the Current Computer Name

Once you have Terminal open, you can determine the current computer name by running the following command:

```bash
scutil --get HostName
```

## Step 3: Change the hostname

```bash
scutil --set HostName My-New-HostName
```

After running this command, your computer's name will be changed immediately, and the new name will be displayed in Terminal.

## Step 4: Verify the Computer Name Change

To verify that the computer name has been changed, run the same command you used to determine the current computer name in Step 2:

```bash
scutil --get HostName
```

This command will display the new computer name that you just set.

## Step 5: Reboot Your Computer (Optional)

In most cases, the computer name change will take effect immediately, and there is no need to reboot your computer. However, in some cases, you may need to reboot your computer for the changes to take effect.

Changing the computer name displayed in Terminal on macOS is a quick and easy process that can be done with just a few simple commands in Terminal. By following the steps outlined in this blog post, you can easily change your computer name to something that better suits your needs. Remember to note down the current computer name before making any changes, so that you can revert to it later if needed.
CPP Introductory Guide
Tags: cpp, computerscience
Published: 2023-04-11 12:44:09

# CPP Introductory Guide

1. 
The CPP Introductory Guide provides an overview of the basics of the C++ programming language for beginners.
It covers topics such as object-oriented programming, data types, control structures, functions and more in a clear and concise manner. Whether you're a student looking to start programming in C++, or an experienced programmer who needs a refresher on the basics, this guide is the perfect resource to get started with. Additionally, the CPP Introductory Guide includes example code and exercises to help reinforce what you've learned, as well as tips and best practices for writing clean and efficient code in C++.
It is essential to note that this guide assumes no prior programming knowledge is required; however, a fundamental understanding of computer science concepts will be beneficial.
How to use Mod apk files on Android devices?
Published: 2023-04-11 12:35:53

You can use any mod apk file on your android device when you enable the permission for unknown resources. 
Choose the best action game [redcon mod apk](https://apkdrug.com/redcon-mod-apk/)
you can also check [inotia 4 mod apk](https://apkdrug.com/inotia-4-apk-mod/) aswell
make browser keep cross-site cookie
Published: 2023-04-11 12:31:31

Preconditions:
1. request with credentials
  - if use fetch, should contain `credentials: 'include'`
  - if use XMR, should with `withCredentials: true`
2. if the request is cross-origin, such as requesting `api.xxx.dev` from `site.xxx.dev`, the response header should pass the browser's CORS
 check.

then, the response header should like this:
```text
set-cookie: Authorization=xxx; Path=/; Domain=.xxx.dev; Max-Age=<time>; Expires=<time stamp>; Secure; HttpOnly; SameSite=None
```
WordPress and WooCommerce: Trends for 2023
Tags: wordpress, woocommerce, developer, development
Published: 2023-04-11 12:20:05

In the modern digitally driven environment, businesses can manage their operations better with a CMS platform. Given the functionality it provides, WordPress is without a doubt the most popular option out of those on the market. In actuality, WordPress powers about 65% of all active CMS-based websites right now.

WordPress itself, of course, is a more advanced content management system with features like plugins that you may use. WooCommerce is one of the solutions offered and is frequently utilized in eCommerce platforms. Statistically, the WooCommerce platform powers 20.4% of all WordPress websites.

**Popularity of WordPress in E-commerce – What are the Reasons?**

Compared to other solutions, WordPress is the top content management system that now powers a variety of e-commerce websites. There are several reasons for this, not the least of which is the user-friendly experience customers get with this CMS. Additionally, this CMS is less expensive to utilize for website development than other platforms.

WordPress plugins can be used by skilled developers as well as even novice-level business owners or website managers to administer their websites with ease. On WordPress websites, it is simple to post material, configure standard updates, etc.

Additionally, you will have a complete library of more than 60,000 plugins from which to pick to personalize your website. Even with the free versions of these powerful plugins, performance can be improved.

**List of Top Trends in 2023 for WordPress**
1. WordPress 6.1
2. Micro Interactions 
3. Page Speed Optimization 
4. Dark Mode Design 
5. Drag-and-drop type page builders 
6. Parallax scrolling 
7. Minimalism  
8. Adopting WordPress into eCommerce Practises 

**WooCommerce- Why Use It?**

It's important to bring up WooCommerce while talking about WordPress plugins. With WordPress websites, this e-commerce-based solution integrates seamlessly. Additionally, it is open-source, which makes it easy for developers to use and modify.

According to statistics, WooCommerce was the leading software platform in 2022 with a 36.68% market share. Due to WooCommerce's exceptional versatility in allowing the creation of a unique delivery method, many leading businesses use this plugin for their online stores.

**List of Top Trends for WooCommerce in 2023** 
1. Improved shopping experience via mobile-intuitive platforms 
2. Enhanced customer service interfaces
3. High-quality product pages
4. Improvements in security protocols
5. WooCommerce Extra Product 
6. Multilingual Press

Overall, [WooCommerce and WordPress](https://wpmanageninja.com/wordpress-woocommerce-trends-2023/) are excellent options for business owners to concentrate on when it comes to eCommerce. WordPress and WooCommerce-related ideas, methods, and products are already popular and will keep growing in 2023.
Read Vertices (Nodes) in Apache AGE
Tags: apacheage, graphdatabase, database, postgres
Published: 2023-04-11 12:17:52

We can retrieve the Nodes from our Graph in Apache AGE by different ways depending on our need.

**Here is the General form of the Query:**

`SELECT * FROM cypher('graph_name', $$
MATCH (v)
RETURN v
$$) as (v agtype);`

**Explanation:**
Firstly, we select the Graph from which we want to get Nodes/ Vertices by `SELECT * FROM cypher('graph_name'`. Secondly, we match the vertices `MATCH (v)`. Lastly, we return `RETURN v`. We return result as `$$) as (v agtype);`.

**Match with Label:**
We can pass any condition in the `MATCH()` function. For instance, we can get all nodes of particular `Label`.

`SELECT * FROM cypher('graph_name', $$
MATCH (v:LabelName)
RETURN v
$$) as (title agtype);`

**Match with Properties:**
We can pass any condition in the `MATCH()` function for property of `Node` as well. For instance, we can get all nodes of particular `Label` having `propertyName = AnyValue`.

`SELECT * FROM cypher('graph_name', $$
MATCH (v:LabelName{propertyName = AnyValue})
RETURN v
$$) as (title agtype);`

For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
A little codecademy noob project :
Published: 2023-04-11 12:04:33

My first actual project from the scratch. 

It's for my ADHD, where it asks user's name, then it will ask me to type all the tasks I want to do, once everything is done, program will compliment me hahaha.


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


```

def things_to_do():
    todo_list = []

    while True:
        todo = input("Enter things to do for today (or type 'done' to exit): ")
        if todo.lower() == "done":
            break
        todo_list.append(todo)

    print("Your todo list is:", todo_list)
    return todo_list

def done_list(todo_list):
    done_list = []

    while todo_list:
        tasks = input(f"Enter item to move to done list ({todo_list}): ")
        if tasks.lower() == "done":
            break
        elif tasks not in todo_list:
            print("Task is not in todo list, try again")
        else:
            todo_list.remove(tasks)
            done_list.append(tasks)
            print(f"You've finished a task : {tasks} ")

        if not todo_list:
            break
        
    print("""

    Good job, you've become a step closer to be a better human being!


    """)
    
from datetime import date
print("""  
###    ###    ##########  ##    ##      ###
###    ###    ###          ##  ##     ##  ##
###    ###    ###           ####     ##    ##
##########    ##########     ##     ## #### ##
###    ###    ###            ##    ##        ##    
###    ###    ###            ##   ##          ##
###    ###    ##########     ##  ##            ## 
""")
today = date.today()
print("Hello, today's date is:", today.strftime("%d %B, %Y"))
name = input("Hello, What's your name? ")
print("Heya,", name )

todo_list = things_to_do()
done_list(todo_list)

```
SASS with React.JS
Tags: webdev, javascript, react, beginners
Published: 2023-04-11 11:38:16

To use SCSS in React, you'll need to install a few dependencies and set up your development environment.

Here are the steps to get started with SCSS in React:

Install node-sass: Start by installing node-sass, a library that allows you to use SCSS in your React project. You can install it using npm by running the following command in your project directory:
Copy code
npm install node-sass
Create a SCSS file: Create a new SCSS file in your project's src directory, for example, styles.scss. This file should contain your SCSS code.

Import the SCSS file: In your React component, you can import the SCSS file using the following syntax:

js
Copy code
import './styles.scss';
Use the styles in your components: Once you've imported the SCSS file, you can use the styles in your React components just like you would with regular CSS.
For example, you could define a class in your SCSS file:

scss
Copy code
.my-class {
  color: red;
}
And then use that class in your React component:

js
Copy code
import React from 'react';
import './styles.scss';

function MyComponent() {
  return <div className="my-class">Hello, world!</div>;
}
That's it! You should now be able to use SCSS in your React project. Note that you may need to configure your build system to compile SCSS files into CSS, depending on your setup.
CSS in React.JS
Tags: javascript, react, css, webdev
Published: 2023-04-11 11:35:46

When it comes to using CSS in React, there are several different ways to do it. The best way to use CSS in React will depend on the specific needs of your project and your personal preferences. Here are some of the most common methods:

1. **<u>Inline styles</u>**: With inline styles, you can add CSS directly to your React components using the style attribute. This can be a quick and easy way to add simple styles to your components, but it can become cumbersome to maintain as your application grows.

2. **<u>CSS Modules</u>**: CSS Modules is a technique for modularizing CSS by automatically generating unique class names and scoping styles to a specific component. This can help prevent naming collisions and make it easier to manage your styles.

3. **<u>Styled Components</u>**: Styled Components is a library that allows you to write CSS directly in your JavaScript code using a CSS-in-JS approach. This can help keep your styles and your components together in one place and can make it easier to create reusable styles.

4. **<u>CSS-in-JS</u>**: There are several other libraries that allow you to write CSS in your JavaScript code, such as Emotion and JSS. These libraries offer a lot of flexibility and can help you create dynamic styles based on the state of your components.

Ultimately, the best way to use CSS in React will depend on your project's requirements, your team's preferences, and your personal experience with each approach. It's always a good idea to experiment with different methods and see what works best for your specific use case.
APACHE AGE 1.3.0 Release For PostgreSQL 13
Tags: apacheage, postgres
Published: 2023-04-11 10:36:36

Welcome back Guys!

Today we will discuss the newest update of Apache AGE. Apache AGE 1.3.0 is about to be released for PostgreSQL 13.

Let's start from the setup.

Since this is the first release for PostgreSQL 13, there is no upgrade path from other versions.

For setting up, we will follow the similar steps as stated in the previous blogs for setting up postgres and AGE. I have attached the link for the respective blog below.

Installation Process:
https://dev.to/jawadaliabbasi6/apache-age-installation-process-part-1-k6l

Just a couple of different steps that should be noted are that, previously we used postgreql version 12 for installation of AGE branch ALPHA that works with postgres 12.

But for this new version, instead of setting up postgres 12, we will use postgresql 13 and the new branch for AGE 1.3.0. Links for both are attached.

**PostgreSQL 13.10 : 
https://www.postgresql.org/ftp/source/v13.10/**

**Apache AGE 1.3.0 : 
https://github.com/apache/age/tree/release/PG13/1.3.0**

The further installation process is similar to the previous versions and can be used as a guide to install AGE 1.3.0.

Thats all for now. We will discuss the features in the next one.

https://age.apache.org/
https://github.com/apache/age

Stay Tuned!
MVP DEVELOPMENT
Tags: mvp, devops, it
Published: 2023-04-11 11:06:32

Businesses of any size and complexity can benefit from an MVP strategy.
Why? Building a product that no one wants to buy can be less risky thanks to the MVP strategy.
Businessmen with common sense avoid investing several years in creating a fully functional product. Instead, they introduce a minimal, working product with important features to test their theories and determine the next course of action.

Faster and greater ROI rates are achieved with MVP development.
Really beneficial for you.

[https://itechcraft.com/services/mvp-development-services/](https://itechcraft.com/services/mvp-development-services/)
var vs dynamic in C#
Tags: csharp, programming, dotnet
Published: 2023-04-11 11:01:41

## Declaration

- _var_ must be initialized at the time of declaration.
- It is not mandatory to initialize _dynamic_ while declaration.

`var v = "Hello World"; //(work)
var v1; //(throw error).
dynamic d; //(work)
dynamic d1 = "hello world"; //(work)
`
![var vs dynamic in c#](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l08mt1o53r863wxw4zgj.png)


![var vs dynamic in c#](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r21icyuz63i0yvb20kbu.png)

## Static vs. Dynamic Typing
- _var_ is a statically typed variable. The type of the variable is determined at compile-time. Once the type is determined, it cannot be changed.
- _dynamic_ is a dynamically typed variable. The type of the variable is determined at runtime when the code is executed.

![var vs dynamic in c#](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sl02uo522zsis2mtbw8i.png)



## Compile-time vs. Runtime Type Checking

- _var_ variables are subject to compile-time type checking. The compiler enforces type checking at compile-time based on the assignment.
- _dynamic_ variables are subject to runtime checking. This means that any type-related errors may not be caught until runtime, which can lead to potential runtime errors if not handled carefully.

## IntelliSense and Compile-time Error Checking
- _var_ variables provide IntelliSense support in IDEs as the actual type of the variable is known at compile-time.  
- _dynamic_ variables do not provide IntelliSense support, as the type is not known until runtime.

## Performance
- _var_ has better performance as it is resolved at compile-time.
- _dynamic_ has a performance cost due to the runtime type checking and late binding.

In summary, _var_ and _dynamic_ in C# are both used for runtime type determination, but 'var' is a statically typed variable with compile-time type checking and type inference, while 'dynamic' is a dynamically typed variable with runtime type checking. Care should be taken while using 'dynamic' due to its potential runtime errors and performance implications, and it should be used only when truly needed for dynamic scenarios where static typing is not suitable.
APACHE AGE 1.3.0 Release For PostgreSQL 13 | Features
Tags: apacheage, postgres
Published: 2023-04-11 10:56:23

Hello!

So let's get on with the exciting new features in the newest release of Apache AGE which is AGE 1.3.0 for PostgreSQL 13.

This release adds additional functionality to the previous versions along with many bug fixes. Some of them are: 

**Graph names with the empty string '' are no more allowed.**

**Fix typos at multiple locations.**

**Fix Bug with CALL... [YIELD], clause ignores WHERE.**

**Invalid labels now return NULL.**

These are just a few of the many new features in this release. A complete list of new features and bug fixes will be provided in the next blog. Be on the Lookout for that!

Okay so after spending some time with the new release, I checked some features and the results are as follows:

**All tests Pass 24/24.**

**CALL ...[YIELD] works fine for cypher functions as described.**

**Graph names with empty strings are no more allowed. NEAT!**

**Many typos have been fixed as described.**

Reviewed many other changes:

**Signature and Hash |  Checked!**

**Tags and Links |  Checked!**

**LICENCE and NOTICE |  Checked!**

**No unexpected binary files |  Checked!**

Overall, the release 1.3.0 looks good and is ready to take on the world.

Learn more here:

https://age.apache.org/
https://github.com/apache/age

Thank You!
Tips for Effective 1:1s with Your Manager
Tags: careerdevelopment, management, softskills, tips
Published: 2023-04-11 10:38:49

For fair share of my career I never thought that 1:1s with manager were ever useful to me, 99% of the time they were just a status update and everything was fine. They look redundant to me as they were like the status update meetings which team already had and I considered them a sheer waste of my time and they seemed to be a checkbox to tick for my manager and nothing else. 

But then I met a manager who stopped me from sharing status updates and instead asked me to bring agendas that I would want to discuss, like things that were bothering me, career progressions, process difficulties, 2-way feedbacks between me and my manager etc. Then I slowly started preparing agendas and realised that 1:1s are for me and not for my manager and I should be deriving them to get my concerns addressed, work on my career progression, get feedback from manager etc. 

Here are few things I learned which can also help one in having an effective 1:1 with their manager and get the most value out of it:

- **Understand why you do 1:1s**: Realise that 1:1s are your time to take most out of your manager's experience and get support/guidance from him and you should be deriving it, not your manager and avoid them falling into status update pitfall. 
- **Prepare an Agenda**: Just showing up won't make 1:1s effective, having an agenda to discuss would help you get most out of them. Share agenda before meeting with your manager if it needs a preparation from them.
- **Have Regular 1:1s**: Having regular weekly/biweekly 1:1s prevent disconnect and keep the discussion in flow without loosing context on the ongoing discussion topics.
- **Take Notes & Track Follow ups**: Use one document for all the 1:1s so that you have continuous trail of the progress and discussion you had or if you want to continue from previous 1:1. Share it with your manager so that you two can collaborate on one doc and follow up on any action items post the meeting.
- **Focus on your career goals**: Discuss about your career goals, how are you doing, what you should be doing more to help you move in the right direction towards achieving those goals.
- **Discuss Your concerns/blocker**: Discuss things that are bothering you / blocking you, seek manager's help on resolving them.
- **Seek & Give Feedback**: Feedback can help you realise how you are doing with regards to expectations for your level and what could you do to fill in the gaps if any. Managers can also help you get feedback that he might have from others in the team. Also, provide feedback to your manager and about the team overall if you have any.

Hopefully, these tips would help you have an effective 1:1 with your manager and grow in your career with your manager's help.