teleren/devto huggingface dataset:
Thinking Back and Coding Forward
Tags: webdev, javascript, css, beginners
Published: 2023-03-09 01:58:37

I have been making web pages in some fashion since 1994. Yes, thats Internet Explorer 3. There is one thing I find crazy about that. I am just as enthusiastic about making great web pages now as I was then.

Going through all the changes and styles, that is the tough part. I feel like now that we have developed so much in terms of browsers and how they work. We now have a chance to start making a really great web that works well without the long term hassle.

I don't have a lot to go into here. However, the last couple weeks I have been diving back into the modern CSS tactics and dumping frameworks one by one. The frameworks were suspension to deal with browser differences. Now that the browsers have standardized, I find the frameworks adding more complexity than they solve. That goes for JavaScript and CSS. There is no real benefit to bringing tools you don't need to solve problems you don't have.

I am finding it easier and easier to work with mobile first design and still have a great display on desktop. Without draging in some 12 column grid or making a bunch of vanilla classes. It's not that bad to write the CSS and the JS from scratch and still end up with a stunning website. What I find really great, is that without a framework there is no need for framework knowledge or documentation.

I do want to offer up one thought. If using a framework because you can search solutions seems like a good idea, it might be a better idea to search for solutions in the native language. Typically, learning something in the native language is a one time task without the need for the manual in the future. Frameworks always feel like an anchor to me, meaning I have to read and memorize their documentation, in order to do what I already know how to do.

I didn't want this blog to turn into an anti-framework post because its not and I like frameworks. My point is that the internet is demanding faster loading, lighter sites. With the modern browser being on billions of devices, it's simply time to start trusting the browser as the framework. That way, you will be shipping a very light code set (No CDN, etc). Your site will be crazy fast.

Signing Off...
How to Send an HTML Form to Email Using PHP: A Step-by-Step Guide with Code Examples
Tags: html, php, beginners, webdev
Published: 2023-03-09 02:36:45

{% youtube IrRDlazqVfU  %}
If you have a website with an `HTML` form that collects user data and you want to receive this data via email, you can use `PHP` to achieve this. Here's how to do it:

1. Create an HTML `form` with input fields for the data you want to collect, such as name, email, phone, and message. Make sure to use the "method" attribute of the form tag to specify `"POST"` so that the form data is submitted via the HTTP POST method.

2. Create a PHP script that will receive the form data and send it to your email address. The PHP script should retrieve the form data from the `$_POST` superglobal array, set the email headers, and use the `mail()` function to send the email.

3. In the PHP script, use the $_POST superglobal array to retrieve the values of the input fields in the form. For example, to retrieve the value of the "name" field, use `$_POST['name']`.

4. Set the recipient email address, sender name and email address, email subject, and message body using variables. For example, you can set the recipient email address using $to = `'your_email@example.com'`;, and the sender name and email address using `$headers = 'From: ' . $name . ' <' . $email . '>'`;.

5. Use the `mail()` function to send the email. For example, you can use `mail($to, $subject, $message, $headers);` to send the email.

To display a confirmation message to the user after the email is sent, you can output a message using the echo statement. For example, you can use `echo 'Your message has been sent successfully!'`;.

That's it! With these steps, you can easily send an HTML form to email using PHP. Keep in mind that this is a basic example and you may need to modify the code to suit your specific requirements. Happy coding!
7 Basic Concepts you must master to excel as a DevOps Engineer
Tags: devops, devjournal, programming, basicconcepts
Published: 2023-03-09 02:31:00

The Global DevOps Market is expected to surpass $20 billion by 2026.

It is continuously evolving to meet the changing demands of the corporate environment.

Here are 7 basic concepts you must master to excel as a DevOps Engineer:


![7 Basic Concepts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnndyum587640tjtcbb7.png)

## 1. Intermediate to advanced Linux skills:

In DevOps, you’re not installing a server once and then logging in every now and then to perform a few admin tasks. You need to understand how to create highly customized Linux images from the ground up both for VM & container use cases.

## 2. Intermediate networking skills:

Networks are part of infrastructure as code. At a bare minimum, you’ll need a solid grasp of the OSI model, IPV4, subnetting, static and stateful firewalling and DNS.

## 3. A commitment to at least one cloud:

Clouds aren’t merely managed data centers. In order for you to automate workloads in a given cloud (AWS, Azure, GCP, etc.), you need a firm grasp of their specific semantics.

## 4. Infrastructure automation:

Once you understand the resources (and their properties) applicable to a cloud, you’re ready to automate their creation using tools such as Terraform and Ansible.

## 5. SDLC, CI/CD pipelines, and scripting:

In DevOps, we deliver an infra layer similar to applications. So you’ll need to be acquainted with the fundamentals of the software development life cycle (SDLC). It includes versioning using Git and CI/CD pipelines.

## 6. Container technology:

For legacy workloads, you may automate the creation of a VM image. But for new applications, you’ll be working with containers. As such, you need to know how to build your own Docker images (Linux skills required!) and deploy them using Kubernetes.

## 7. Observability technology:

While all clouds have monitoring dashboards and standard “telemetry” hooks, most large employers use third party (both commercial and open source) monitoring tools such as Prometheus, DynaTrace, Datadog, or the ELK stack.

Comment below which topics you think DevOps engineers must learn.

Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more in DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
openGauss timed task
Published: 2023-03-09 02:29:51

It is necessary to frequently trigger an action at a fixed time point and at intervals of time. For the convenience of use, there is a timed task, which greatly reduces the repetition of work and improves efficiency.

The content of the timed task
Based on the background of the scheduled task, the content of the scheduled task includes: creation of the scheduled task, automatic execution of the task at the time point, deletion of the task, modification of the task content (task id, closing and opening of the task, trigger time of the task, trigger time interval, task content, etc.).

timed task
Create a table

```
CREATE TABLE tb_test(insert_date timestamp default null,id int default null);
Display information
CREATE TABLE
create table successfully
```
Create a scheduled task
The timing content is: insert into the table tb_test every one minute (current system time, 1)

```
SELECT pkg_service.job_submit(1,'insert into tb_test values(sysdate,1);',sysdate,'''1min''::interval');
job_submit
-------------
1
(1 row)
SELECT \* FROM tb_test;
 insert_date | id
2022-09-02 17:50:04 | 1
2022-09-02 17:51: 04 | 1
2022-09-02 17:52:04 | 1
(3 rows)

```

Timed task executed successfully

Timed task stop

```
SELECT pkg_service.job_finish(1，true);
job_finish
-------------
(1 row)
```


Scheduled task start

```
SELECT pkg_service.job_finish(1，false);
job_finish
-------------
(1 row)
```

Delete scheduled tasks

```
SELECT pkg_service.job_cancel(1);
job_cancel
-------------
(1 row)
```
openGauss 18 code warehouses
Published: 2023-03-09 02:19:17

openGauss mainly includes 18 code warehouses, which refer to open source software patch code warehouses, JDBC driver code warehouses, ODBC driver code warehouses, database server code warehouses, autonomous operation and maintenance platform DBMind code warehouses, database OM management tools, and database CM management tool code warehouses , database DMS code warehouse, database DSS code warehouse, database DCF code warehouse, database DCC code warehouse, database plug-in code warehouse, MySQL to openGauss full migration tool code warehouse, MySQL incremental migration code warehouse, data verification code warehouse, database prometheus -exporter code warehouse, monitoring plug-in generation tool code warehouse and document warehouse:

Open source software code warehouse: https://gitee.com/opengauss/openGauss-third_party

JDBC driver code warehouse: https://gitee.com/opengauss/openGauss-connector-jdbc

ODBC driver code warehouse: https://gitee.com/opengauss/openGauss-connector-odbc

Database server code warehouse: https://gitee.com/opengauss/openGauss-server

Autonomous operation and maintenance platform DBMind code warehouse: https://gitee.com/opengauss/openGauss-DBMind

Database OM tool code warehouse: https://gitee.com/opengauss/openGauss-OM

Database CM (Cluster Manager) tool code warehouse: https://gitee.com/opengauss/CM

Database DMS (Distributed Memory Service) component code warehouse: https://gitee.com/opengauss/DMS

Database DSS (Distributed Storage Service) component code warehouse: https://gitee.com/opengauss/DSS

Database DCF (Distributed Consensus Framework) code warehouse: https://gitee.com/opengauss/DCF

Database DCC (Distributed Configuration Center) code warehouse: https://gitee.com/opengauss/DCC

Database plugin code warehouse: https://gitee.com/opengauss/Plugin

MySQL to openGauss full migration tool code warehouse: https://gitee.com/opengauss/openGauss-tools-chameleon

MySQL incremental migration tool code warehouse (including reverse migration): https://gitee.com/opengauss/openGauss-tools-onlineMigration-mysql

Data checker tool code warehouse: https://gitee.com/opengauss/openGauss-tools-datachecker-performance

Database prometheus-exporter code warehouse: https://gitee.com/opengauss/openGauss-prometheus-exporter

Database monitoring plug-in generation tool code warehouse: https://gitee.com/opengauss/openGauss-tools-monitor

Database Documentation Warehouse: https://gitee.com/opengauss/docs
openGauss 3.0--meta command Precautions
Published: 2023-03-09 02:16:39

Meta Command Reference
Introduces the meta-commands provided by gsql after using the openGauss database command line interactive tool to log in to the database. The so-called meta-command is any command entered in gsql that starts with a backslash without quotation marks.

Precautions
The format of a gsql metacommand is a backslash followed by a verb, followed by any arguments. Parameters Command verbs and other parameters are separated by any number of whitespace characters.
To include whitespace in an argument, it must be enclosed in single quotes. To include single quotes in such parameters, precede them with a backslash. Any content contained in single quotes will be further replaced by C-like language: \n (new line), \t (tab), \b (backspace), \r (carriage return), \f ( form feed), \digits (characters represented in octal), \xdigits (characters represented in hexadecimal).
The content surrounded by "" is passed to the shell as a command line. The output of the command (with trailing newlines removed) is taken as the argument value.
If an unquoted parameter starts with a colon (:), it is treated as a gsql variable, and the variable's value will eventually become the real parameter value.
Some commands take the name of an SQL identifier (such as a table) as an argument. These parameters follow the rules of SQL syntax regarding double quotes: identifiers without double quotes are coerced to lowercase, while double quotes protect letters from case conversion and allow blanks in identifiers. Within double quotes, a pair of double quotes is parsed as a single double quote in the resulting name. For example, FOO"BAR"BAZ resolves to fooBARbaz; and "Aweird" "name" resolves to A weird"name.
Parsing of the argument stops when it encounters another unquoted backslash. This is considered the start of a new meta-command. The special double backslash sequence (\\) marks the end of the parameter and will continue parsing the following SQL statement (if present). This way SQL and gsql commands can be freely mixed in one line. In any case, however, the arguments to a meta-command cannot continue past the end of the line.
Promoting Equality in the Tech Industry
Tags: wecoded
Published: 2023-03-09 02:08:04



The tech industry has been under scrutiny for its lack of diversity and inclusivity. Women, people of color, and other underrepresented groups have struggled to find equal footing in this industry, and it is important to recognize and address these challenges. In order to create a more equitable and inclusive tech industry, individuals must pledge to embrace equality in tech by taking proactive steps to support and uplift underrepresented groups.

<br>

## How Do I Pledge To Embrace Equality In Tech?

I pledge to embrace equality in tech by first recognizing the barriers that exist and actively working to break them down. This involves challenging biases, stereotypes, and microaggressions that are pervasive in tech culture. By being mindful of my own language and behavior, and holding others accountable, I can help create a more welcoming and inclusive environment for everyone.

## My Validating Experience:

<br>

One validating experience I had in the workplace was when I witnessed a female colleague receive a promotion that she deserved. She had worked tirelessly for the company, and her hard work and dedication paid off. Seeing her succeed and be recognized for her accomplishments was a reminder that progress towards equality in tech is possible. It is important to continue to advocate for and uplift women and other underrepresented groups in order to make the tech industry more equitable.

## Biggest Obstacles:

<br>

One of the biggest obstacles to gender equality in the tech industry is the lack of representation in leadership positions. Women are often excluded from decision-making processes, which can perpetuate systemic biases and prevent progress towards greater equality. In order to address this issue, companies must actively seek out and hire diverse candidates, promote from within, and provide opportunities for leadership development and mentorship.

Diversity and inclusion initiatives have positively impacted my workplace by creating a more welcoming and inclusive environment for everyone. By valuing diversity and promoting inclusivity, employees are able to bring their whole selves to work and feel valued for their unique perspectives and experiences. This leads to increased collaboration, creativity, and productivity, as employees feel empowered to contribute to the company in meaningful ways.

## Conclusion

<br>

I will commit to educating myself about the experiences of underrepresented groups in the tech industry, and advocating for their inclusion and advancement. This includes listening to and amplifying their voices, as well as seeking out resources and training to better understand the issues they face. By educating myself, I can be a more effective ally and advocate for equality in tech.
How to get the latest updates, news & announcements regarding SharePoint Online
Tags: sharepoint, sharepointonline, m365
Published: 2023-03-09 01:49:55

As SharePoint Online is a SaaS, it is important for us (especially for SharePoint Administrators & IT Pros) to know what are the latest updates that are being released to the platform, rather than be randomly surprised or caught off guard.

Here are a couple of ways to stay updated.

---

## Official Microsoft 365 Roadmap

Microsoft has **Microsoft 365 Roadmap** page. Here you can filter the **Product** dropdown to only list SharePoint or any other M365 products.

URL:
https://www.microsoft.com/en-us/microsoft-365/roadmap?filters= 

![M365 Roadmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h40yytivpom3bvhc2kj6.png)

---

## SharePoint Admin Center Message Center

Only applicable for SharePoint Administrators, the latest release updates can be found under the **Message Center** in the **SharePoint Admin Center**.

Note: SharePoint Admin Center can be accessed via [Office Admin](https://admin.microsoft.com/) or directly via _https://{yoursitename}-admin.sharepoint.com/_ 

![Message Center](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gsdpqtuo4drwhwahe9gw.png)

![Message Center 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fumubjli26h10nfdtc8k.png)

---

## Blogs

There are a couple of blogs that do also post on the latest updates regarding M365 platforms.

Here are some:
- https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/bg-p/SPBlog . Check out the posts from [Mark Kashman](https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/sharepoint-roadmap-pitstop-february-2023/ba-p/3755315) which usually gives a monthly summary on SharePoint updates.
- https://sharepointstuff.com/
- https://petri.com/category/microsoft-365-changelog/ 

Please let me if there any more useful links & resources in the comments.
html img, blob, base64
Published: 2023-03-09 01:30:54

### problem

1. upload image via `<input>`
2. inject that file into `<img src="">`
3. `src` url is blob url
4. when i try to copy this `src: blobUrl` into another `<img src="">` tag, it throws `file not found error` bc the image is not saved in server.

### solution

1. when upload the image, use `FileReader()` API
2. convert the uploading-image into base64 string with `readAsDataURL()`
3. inject that base64string into `<img src="">`
4. now you can take that `src` to any other `<img src="">` tags

https://refine.dev/blog/how-to-base64-upload/
A Git Branch and Release Strategy for Product Teams
Tags: git, softwareengineering
Published: 2023-03-09 01:28:55

This post presents a git branch/release strategy intended for use by a team providing long-term development and support for a software product. 

The goal is to provide dedicated branches for QA and customer releases while isolating those branches from bleeding-edge development changes.

## The Strategy 

In this model the repository consists of three types of branches:

- `dev` for all development. 
- `qa` to create pre-production builds for the test team.
- `release` to create production builds for release to customers.

All code is merged from `dev` to `qa` to `release` by a  team lead or other responsible party, as development and testing progresses.

The `dev` branch could just as well be `main` or whatever the repository's default branch is called.

There will typically be several pairs of QA and Release branches, each with their own version string appended. For example `qa-1.0`, `release-1.1`, etc. 

The `dev` branch could be versioned as well if there is a need for long-term support of an older version of the software. For example `dev-2`. Its best if that can be avoided but for mature products there may be a need to support multiple major versions at the same time.

In summary, here is the graph of a set of branches to handle the 1.0 and 1.1 releases of an example project:

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

In each case there is more than one merge from `dev` to `qa` before we identify the final release build.

## Code Reviews

An optional approach to lock down `dev` and only allow changes into it via merge request. That gives the team an opportunity to perform a code review prior to code landing in `dev`. 

Such a policy would be team-dependent. It probably makes more sense on a larger team and/or for an established product where it is important to control code quality and limit risk.

In this model the actual development would take place on feature branches. For example `dev-feature-1`.

## Continuous Integration and Deployment

Automated building and deployment is convenient to have for `dev` in almost all cases.

QA and Release merges are going to happen much less frequently than pushes to `dev` but when they do we are going to want a build ASAP. So continuous integration is going to be essential for these branches to ensure builds happen automatically. 

Automated deployment may be useful as well depending on your product.

## Tagging of Builds

Most teams are going to want their continuous integration script to apply a tag to QA and Release builds. That way there is full traceability into what went into each build as well as the ability to branch directly from the tag in case a hotfix or emergency patch is required.

Development builds are expected to be created frequently and tagging of them is probably not desirable.

## Conclusion

This strategy is not a one-size-fits-all solution. But it can work well in practice for products requiring a formal development and release process.

How do you handle branches and releases for your products?
Switch and Sort
Tags: javascript, beginners, react, webdev
Published: 2023-03-09 01:21:26

In a recent react exercise from the Flatiron school, I was required to sort some adorable pigs by either name or weight. Sorting was an entirely new concept for me, in this post, I will discuss how I used to switch method to sort some pigs.

The objective said to sort pigs based on name and weight depending on user selection. There are a few things we need to understand about sorting in Javascript beforehand. The parameters of the sort will always be two comparators. These two comparators must be pure, meaning that  the comparators cannot mutate the objects being compared. The must be stable, meaning the comparator returns the same result with the same pair of input.

Additionally, as the values assigned to the comparators will be 1, 0, or -1, the comparators must be reflexive, anti-symmetric , and transitive. So if (A > B) and (B > C), then (A > C). Now on to the sort itself.


```
const byNameOrWeight = (hogA, hogB) => {
switch( sort ) {
	case 'name':
		if (hogA.name < hogB.name ){
			return -1
		} else {
			return 1
		}
	case 'weight':
		return hogA.weight - hogB.weight
		default:
		return 0
}
}
```

As seen above, the comparators are hogA and B from the array of pigs. In the first comparison inside the switch, an if statement checks whether hogB is greater (alphabetically) than hog A and if so, assigns a value of -1. This moves the hog to an earlier position in the array. Otherwise the value is 1, returning to a lower position. Using the .name key in the object allows us to  utilize the hogs names as the comparators. As comparisons between the hogs are made, names will be sorted alphabetically.

In the second case, we simply return a subtraction of hogB weight from hog A. If hogA weight is negative from being less than B, it will be moved to a lower position in the array. This powerful yet simple tool allows us to sort arrays of objects across a vast number of criteria. Hopefully in my coding career, pigs will just be the beginning.