teleren/devto huggingface dataset:
Updating PowerShell and Installing PSReadLine on Windows 8.1
Tags: powershell, commandline, windows, windows81
Published: 2023-03-15 08:41:53

## Why?
With Windows 8.1 reaching the end of LTS I was faced with multiple challenges on my VM. I cannot depend on windows updates anymore to update a newly installed VM.

One of the major problems was getting Golang binaries to work properly on the terminal.
```powershell
Exception : System.IO.IOException: The parameter is incorrect
```

I found out that it was actually caused cause of a Outdated Powershell version (Windows 8.1 comes with v4). So I thought of manually updating it rather than using windows updates.

Here's a write up for anyone who is trying to achieve the same.

## How?
We need to first decide on the version we want. There are two options here:
- 5.1
- 7 (latest)

This guide covers both the cases. You can check the installation requirements [here](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/windows-powershell/install/Windows-PowerShell-System-Requirements.md).

### Check PowerShell Version
Check if you're running an outdated version of PowerShell by typing:


### Installing PowerShell Version 5.1
We need to first download Windows Management Framework 5.1 from [here](https://aka.ms/wmf5download).

Once you head to the website you click the "Download" button. You will find two options for Win8.1, a "x86" and a "x64" msi file.

![Last Two Files](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzj793adkngoyyuwlcqq.png)

We need to select the version appropriate to our system. For me I have a 64 bit CPU (which is mostly the case for modern cpu). For VM it can be "x86" depending on the configurations.

Download the File and run it. It should install and reboot your PC.

After reboot run `powershell` again and check `$PSVersionTable`. It should now show v5.1.

![Updated to 5.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u7ykt0rv3bsjrgznfv8.png)

### Installing PowerShell 7
To install PowerShell 7 is pretty easy as well. We need to head to the poweshell [github](https://github.com/PowerShell/PowerShell).

Then select a installer according to your CPU

![Get PowerShell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b04k2m75lgxosa589b43.png)

Go though the installation

![PowerShell 7 Installer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tp2adqn9ief48gq718t7.png)

and that should install PowerShell 7 on your Windows 8.1 installation :)

## Installing PSReadLine
PSReadLine allows a lot of commandline utilities to work properly, thus we will be installing it as well.

If we head to the PSReadLine [Github](https://github.com/PowerShell/PSReadLine), we can find installation instructions.

We need to install PowerShellGet beforehand (press `A` when asked):
```powershell
Install-Module -Name PowerShellGet -Force
```

Then install `PSReadLine` (press `A` when asked):
```powershell
Install-Module PSReadLine
```
Great we installed `PSReadLine` successfully!


## Conclusion
We Learnt to install/update PowerShell on a Windows 8.1 Installation
Trang dự đoán kèo thơm chuẩn xác nhất.
Published: 2023-03-15 08:35:53

Trang dự đoán kèo thơm chuẩn xác nhất. Phân tích dự đoán kèo thơm ngon ăn các trận đấu HOT tối đêm nay CHÍNH XÁC NHẤT
Website: https://keothom365.com/
Social: https://twitter.com/keothom365
https://www.instagram.com/keothom365/
https://www.youtube.com/channel/UC9aQ3UTAR-04mNSKLItBjwQ
https://www.pinterest.com/keothom365com/
https://www.linkedin.com/in/keothom365/
https://keothom365.tumblr.com/
https://new.reddit.com/user/Altruistic-Dirt-2412
https://vimeo.com/keothom365com
https://www.flickr.com/people/keothom365/
https://dribbble.com/keothom365/about
https://www.deviantart.com/keothom365com
https://medium.com/@keothom365com1
https://soundcloud.com/keothom365com
https://orcid.org/0009-0004-6198-2316
https://unsplash.com/fr/@keothom365com
https://www.imdb.com/user/ur162665779/
https://www.indiegogo.com/individuals/32760725
https://www.kickstarter.com/profile/240946728/about
https://www.twitch.tv/keothom365/
https://500px.com/p/keothom365com
https://angel.co/u/keothom-365-1
https://www.last.fm/user/keothom365
https://github.com/keothom365com
https://myspace.com/keothom365com
https://keothom365.blogspot.com/
Get correct theme colors in SPFx workbench
Tags: spfx, node, webdev, react
Published: 2023-03-15 08:33:59

If you are building a SPFx extension and try to use [theme colors](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-theme-colors-in-your-customizations), you probably already noticed that **when debugging**, the `getTheme().palette` will always return default, blue, palette (when deployed, the result is correct).
This results in rather hilarious and questionable design:
```ts
const stackStyles: Partial<IStackStyles> = {
    root: {
        borderColor: theme.palette.themePrimary,
        backgroundColor: theme.palette.themeLight,
        ...
    },
}
```

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

The trick is to get the theme from the `window.__themeState__.theme` as mentioned in [here](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-theme-colors-in-your-customizations#available-theme-tokens-and-their-occurrences) (scroll down to find Note section).

However... I never trust objects or methods whose names start with `_` and since `getTheme()` works just fine in production, I also see no reason for this workaround to be used permanently.

## The solution

I'm defining all the component styles in a separate file, `ComponentStyles.ts`. In here, I access the `__themeState__` only if debugging

### ComponentStyles.ts
```ts
let siteTheme: ITheme = null;

if (process.env.NODE_ENV !== 'production') {
    siteTheme = createTheme({
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        palette: (window as any).__themeState__.theme
    });
}
//if siteTheme is undefined, use the default theme
const theme = siteTheme ?? getTheme();

const stackStyles: Partial<IStackStyles> = {
    root: {
        borderColor: theme.palette.themePrimary,
        backgroundColor: theme.palette.themeLight,
        ...
    },
}

export { stackStyles };
```

The solution components will only import the required styles, and the colors are correct in both, workbench and production environments.

### DatePickerMenu.tsx
```ts
import { stackStyles } from "../../common/ComponentStyles";

const DatePickerMenu: React.FunctionComponent<IDatePickerMenuProps> = (props) => {
    ...
    return (
        <Stack
            horizontal={true}
            styles={stackStyles}
        >
        </Stack>
    );
};
}
```

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

Much better, isn't it? Now I can style my components seeing the correct result. 
And at the same time I don't have to remember to remove the `__themeState__` before releasing the solution.
CSS 3D art: a 3D translucent rainbow-colored donut
Published: 2023-03-15 07:37:12

---
title: CSS 3D art: a 3D translucent rainbow-colored donut
series: 3D solids in CSS
published: true
date: 2023-03-15 07:19:28 UTC
tags: 
canonical_url: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eb72x12y16rzpby24wpd.png
---

3D geometries were always THE thing that I loved CSS for - regardless of its performance and practicality of it. But to really make the best of it, I needed trigonometry - for which I originally used PHP and then switched to Sass/SCSS (a CSS preprocessor).

But now it's here - in CSS calcs!

sin(), cos(), tan(), asin(), acos() and atan() have been under consideration for the longest time. I remember them being old news when I first looked into it in 2019, and then no news for a couple of years. Thought they'd never happen.

Then one day last year, Safari quietly rolled out the whole lot - and then also sqrt(), pow() and hypot(). Last December Firefox picked up. But it seemed like that was it. The usual outliers, who usually lagged behind, did something weird - and the cool kids couldn't be bothered.

But finally, Chrome 111 was released and it too supports trigonometry in calcs.

So I went to town with it! Here's a [live demo on Codepen](https://codepen.io/MackFitz/full/BaOdeOB)

{% codepen https://codepen.io/MackFitz/pen/BaOdeOB %}

You can have some fun with it, too!

- you click on the numbers on the left and the fractions on the right (the currently selected option is the one glowing white). The input labels might be slow/stubborn, so you might need to click again for them to react.

- you can modify the shape of the ring and the cross-section - the numbers denote how many sides the basic polygonal shape has. By default it's at 16, approximating a circle - and 32 is even closer. But you can go lower: you've got an octagon, a hexagon, a pentagon, a square and a triangle

- you can change the girth, too: it's 1/4 by default - meaning the girth is a quarter of the ring's diameter. 1/10 will look like a bracelet. 1/3 is like a real beefy donut. 1/2 gives you a torus with no visible gap inside, and at 2/3 the ring intersects itself. And in case you were wondering, 1/1 would simply be a sphere.

- Depending on your device, the performance might be slow at higher segment numbers. On mine it runs smoothly up to 16 segments, and starts stuttering at 32.

- Performance depends on the browsers, too. The demo seems to run faster on Firefox than Chrome.

- it should run on mobile, too - but I haven't actually checked. I still only use my 13-year-old Nokia 1616.

The math behind it all is fascinating ;) I'm doing a series of 3D CSS tutorials, but it's going slow, and I haven't even gone over the cube entirely - and haven't even touched on trigonometry yet - so getting all the way to the torus might take a while.

Speaking of which, here are the tutorials:

[CSS 3D: The Cube - Part I](https://dev.to/mackfitz/css-3d-the-cube-part-1-393j)
[CSS 3D: The Cube - Part II](https://dev.to/mackfitz/css-3d-the-cube-part-2-5132)
Hidden Screen Geniuses: The IT Artists aka Front-End, Back-End, and Full-Stack Developers
Tags: webdev, beginners, devjournal
Published: 2023-03-15 07:30:00

In the world of software development, different types of developers play a crucial role in creating software and websites. Understanding the type of developer you need for your project depends on your needs in terms of functionality and performance. In this article, we'll provide an overview of the roles and responsibilities of each type of developer, including front-end, back-end, and full-stack developers.

Front-end Developer: Front-end developers are responsible for designing and creating the user interface (UI) for applications and websites. They use programming languages such as HTML, CSS, and JavaScript to develop interactive and responsive designs that provide a smooth user experience. For example, a front-end developer could work for an e-commerce company to develop a user-friendly interface for customers, using HTML, CSS, and JavaScript to create an attractive and easy-to-use presentation.

Back-end Developer: Back-end developers are responsible for designing and building the invisible part of an application, such as data management and algorithms. They use programming languages such as NodeJs, PHP, Ruby on Rails, Python, and Java to develop functional and secure applications. For example, a back-end developer could work for a wealth management company to design a secure database management system, using a programming language such as NodeJs or Python to ensure data security and reliability.

Full-stack Developer: Full-stack developers are developers who have skills in both front-end and back-end development. They are responsible for the design, construction, and complete implementation of an application. For example, a full-stack developer could work for a financial services company to develop a personal finance management application, using HTML, CSS, JavaScript, and a server-side programming language such as NodeJs to design a functional and user-friendly application.

That's it ! See U next level Doobs !
physical memory, virtual address space, size of the page table
Published: 2023-03-15 07:29:48

https://gateoverflow.in/739/gate-cse-2001-question-2-21?show=739#q739

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

To solve this question, you need to have a basic understanding of the following concepts of memory management:

    Memory management: Memory management refers to the process of managing the memory resources of a computer system, including physical memory and virtual memory. In a virtual memory system, the memory addresses used by a program are virtual addresses, which are mapped to physical addresses by the operating system.

    Paging: Paging is a memory management technique used in virtual memory systems to divide the virtual address space into fixed-size blocks called pages. Each page is mapped to a corresponding page frame in physical memory.

    Page tables: A page table is a data structure used by the operating system to keep track of the mapping between virtual addresses and physical addresses. It contains information about which pages are mapped to which page frames, and it is used by the memory management unit (MMU) to translate virtual addresses to physical addresses.

    Page size: The page size is the size of each page in a paging system. It is typically a power of two, and it determines the granularity of memory allocation in the system.
Relation between Docker and Kubernetes?
Published: 2023-03-15 07:23:00

Docker and Kubernetes are two complementary technologies that are often used together in modern software development and deployment.

Docker is a platform for creating and managing containers, which are a lightweight and portable way to package and distribute applications, along with their dependencies and configurations, as a single unit that can run consistently across different environments.

Kubernetes, on the other hand, is a container [orchestration platform](https://dev.to/sarveshkesharwani/what-is-container-orchestration-platform-3h2o) that automates the deployment, scaling, and management of containerized applications across clusters of hosts. Kubernetes provides a declarative API for managing containers, and it can run on a wide range of platforms, from local development environments to public clouds.

Docker and Kubernetes work together in the following way:

Developers use Docker to create container images that contain their applications and dependencies.

These container images are then pushed to a Docker registry, where they can be easily shared and deployed.

Operators use Kubernetes to deploy and manage these container images on a cluster of hosts, using Kubernetes' declarative API and its built-in features for scaling, load balancing, and self-healing.

Kubernetes can also manage the configuration, secrets, and networking of the containers, as well as monitor their health and performance.

In summary, Docker and Kubernetes are two complementary technologies that work together to enable modern software development and deployment. Docker provides a way to create and manage containers, while Kubernetes provides a way to automate the deployment and management of containerized applications across clusters of hosts.
What is container orchestration platform?
Published: 2023-03-15 07:22:00

A container orchestration platform is a tool or framework that automates the deployment, scaling, and management of containerized applications across a cluster of hosts. Container orchestration platforms provide a set of APIs, tools, and services that enable developers and operators to manage containers at scale, while ensuring high availability, scalability, and reliability.

Container orchestration platforms are designed to address the challenges of managing large and complex container deployments, which can involve thousands or even tens of thousands of containers running on multiple hosts or cloud instances. Container orchestration platforms provide features such as:

Container deployment and scaling: The ability to deploy containers across multiple hosts or cloud instances, and to scale containers up or down based on demand.

Load balancing: The ability to distribute traffic across containers, and to automatically route traffic to healthy containers.

Service discovery: The ability to automatically discover and manage the network addresses of containers, and to route traffic to the appropriate container based on service name or label.

Container health monitoring and self-healing: The ability to monitor the health and performance of containers, and to automatically restart or replace containers that are unhealthy or failing.

Configuration and secret management: The ability to manage the configuration and secrets of containers, and to update them automatically when needed.

Some popular container orchestration platforms include Kubernetes, Docker Swarm, Mesos, and Nomad. These platforms provide a powerful set of tools and services for managing containers at scale, and are widely used in modern software development and deployment.
We Coded 2023
Tags: wecoded
Published: 2023-03-15 06:20:04

Many obstacles to gender equality exist in the technology industry. A major obstacle is unconscious bias. As a result, it might be more difficult for women, transgender, nonbinary, gender nonconforming, and two-spirit persons to acquire employment, advance in their careers, or stay in tech professions. Lack of representation is another obstacle. They regularly work in unfavorable conditions, such as harassment and discrimination, which can limit their capacity to advance in their careers or even continue working in them. In the end, combating gender inequality in the computer industry is a challenging issue that necessitates collaboration from individuals, groups, and society at large.

Businesses have benefited from using these disparities to foster innovation and competitiveness thanks to initiatives for diversity and inclusion. By promoting respect, empathy, and teamwork, it can help create a more positive workplace atmosphere. This could lead to improved employee morale, work satisfaction, and general wellbeing. By creating products and services that reflect the diversity of their consumer base, businesses can draw in a wider range of customers. Businesses may get a competitive edge and increase their customer base as a result.

I am committed to searching out various viewpoints, supporting underrepresented groups, learning about gender equality issues, being an ally and an equal opportunity champion, as well as seeking out resources to help me get better.
openGauss
Published: 2023-03-15 07:10:48

## Availability
This feature is available since openGauss 1.0.0.

## Introduction
Certain errors that occur during the copy process are imported to a specified error table without interrupting the process.

## Benefits
Refine the copy function and improve the tolerance and robustness to common errors such as invalid formats.

## Description
openGauss provides the encapsulated copy error tables for creating functions and allows users to specify error tolerance options when using the Copy From statement. In this way, errors related to parsing, data format, and character set during the execution of the Copy From statement are recorded in the error table instead of being reported and interrupted. Even if a small amount of data in the target file of Copy From is incorrect, the data can be imported to the database. You can locate and rectify the fault in the error table later.

## Enhancements
None

## Constraints
For details, see “Importing Data > Running the COPY FROM STDIN Statement to Import Data > Handling Import Errors” in the Developer Guide.

## Dependencies
None
openGauss Full-Text Indexing
Published: 2023-03-15 07:08:09

## Availability
This feature is available since openGauss 1.1.0.

## Introduction
openGauss full-text indexing allows documents to be preprocessed and facilitates subsequent search.

## Benefits
openGauss full-text indexing provides the capability to identify natural-language documents that satisfy a query and sort them by relevance.

## Description
The preprocessing process of creating a full-text index includes:

Parsing documents into tokens

It is useful to identify various classes of tokens, for example, numbers, words, compound words, and email addresses, so that they can be processed differently. In principle, token classes depend on the specific application, but for most purposes it is adequate to use a predefined set of classes.

Converting tokens into lexemes

A lexeme is a string, just like a token, but it has been normalized so that different forms of the same word are made alike. For example, normalization almost always includes folding upper-case letters to lower-case, and often involves removal of suffixes (such as s or es in English). This allows searches to find variant forms of the same word, without entering all the possible variants. Also, this step typically eliminates stop words, which are so common and usually useless for searching. (In short, tokens are raw fragments of the document text, while lexemes are words that are believed useful for indexing and searching.) openGauss uses dictionaries to perform this step and provides various standard dictionaries.

Storing preprocessed documents optimized for searching

For example, each document can be represented as a sorted array of normalized lexemes. Along with the lexemes, it is often desirable to store positional information for proximity ranking. Therefore, a document that contains a more “dense” area of query words is assigned with a higher rank than the one with scattered query words. Dictionaries allow fine-grained control over how tokens are normalized. With appropriate dictionaries, you can define stop words that should not be indexed.

## Enhancements
None

## Constraints
The current limitations of openGauss's text search features are:

The length of each lexeme must be less than 2 KB.
The length of a tsvector (lexemes + positions) must be less than 1 MB.
Position values in tsvector must be greater than 0 and less than or equal to 16383.
No more than 256 positions per lexeme. Excessive positions, if any, will be discarded.

## Dependencies
None
openGauss SQL Hints
Published: 2023-03-15 07:07:03

## Availability
This feature is available as of openGauss 1.1.0.

## Introduction
SQL hints can be used to override execution plans.

## Benefits
Improves SQL query performance.

## Description
In plan hints, you can specify a join order; join, stream, and scan operations, the number of rows in a result, and redistribution skew information to tune an execution plan, improving query performance.

## Enhancements
None

## Constraints
None

Dependencies
None