teleren/devto huggingface dataset:
Editing Your Own Wikipedia Page - Understanding the Guidelines
Tags: education, wikipedia, editing, study
Published: 2023-05-25 18:14:30

One common question that arises is whether it's possible to edit your own Wikipedia page. The answer is a bit nuanced, so let's delve into it. In general, [Wikipedia discourages](https://www.wikipediathrive.com) individuals from directly editing their own pages to maintain a neutral and unbiased perspective. However, there are exceptions. If you have a conflict of interest (COI), it's best to request changes on the article's talk page or use the "Edit Request" feature.
Remember, transparency is key. Clearly disclose your relationship to the subject when making requests or suggestions. The Wikipedia community and experienced editors will review and assess the proposed changes based on Wikipedia's policies and guidelines.
If you're unsure or need guidance, feel free to ask for help or share your experiences here. Let's discuss the best practices and guidelines for editing personal Wikipedia pages!
100 Days Coding Challenge - Day 6: FreeCodeCamp Web Design
Tags: webdev, programming, css, 100daysofcode
Published: 2023-05-25 18:10:21

## Day 6

Today I finish a car wheel animation in CSS and HTML


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

And I'm starting with a penguin CSS animation, after this, I will start to work on the portfolio web certification. 


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

Note: It is suppose to be an animation, but sorry, I took a static screenshot, it will be annoying if I download a screen recorder at this moments
Building a Simple CRUD Application with Go: An Overview about the project PT/2
Tags: apacheag, go, internshi, swe
Published: 2023-05-25 18:07:19

**Introduction**
This is the part 2 of my overview about my golang project, in this project I did a CRUD application with golang, I will explain the UPDATE and the DELETE functions.
**Functions**
- **Update(U)**
The UpdateUser function serves as a handler for updating a user's information.
```golang
func UpdateUser(w http.ResponseWriter, r *http.Request) {

	w.Header().Set("Content-Type", "application/x-www-form-urlencoded")
	w.Header().Set("Access-Control-Allow-Origin", "*")
	w.Header().Set("Access-Control-Allow-Methods", "PUT")
	w.Header().Set("Access-Control-Allow-Headers", "Content-Type")

	params := mux.Vars(r)

	id, err := strconv.Atoi(params["id"])

	if err != nil {
		log.Fatalf("Cannot find the User by ID. %v", err)
	}

	var user models.User

	// decoding json request to user
	err = json.NewDecoder(r.Body).Decode(&user)

	if err != nil {
		log.Fatalf("Unable to decode the body. %v", err)
	}

	updatedRows := updateUser(int64(id), user)

	msg := fmt.Sprintf("User updated! Total rows/record affected %v", updatedRows)

	res := response{
		ID:      int64(id),
		Message: msg,
	}

	// send the response
	json.NewEncoder(w).Encode(res)
}
```
It extracts the necessary information from the request, updates the user's data, constructs a response message, and sends it back to the client.
- **Delete(D)**
The Delete function handles the deletion of a user. It extracts the necessary information from the request, deletes the user's data, constructs a response message, and sends it back to the client.

```golang
func DeleteUser(w http.ResponseWriter, r *http.Request) {

	w.Header().Set("Context-Type", "application/x-www-form-urlencoded")
	w.Header().Set("Access-Control-Allow-Origin", "*")
	w.Header().Set("Access-Control-Allow-Methods", "DELETE")
	w.Header().Set("Access-Control-Allow-Headers", "Content-Type")

	params := mux.Vars(r)

	id, err := strconv.Atoi(params["id"])

	if err != nil {
		log.Fatalf("Cannot convert the user ID. %v", err)
	}

	deletedRows := deleteUser(int64(id))

	msg := fmt.Sprintf("User deleted! Total rows/record affected %v", deletedRows)

	res := response{
		ID:      int64(id),
		Message: msg,
	}

	json.NewEncoder(w).Encode(res)
}

```
The objective is to delete the user's data, constructs a response message, and sends it back to the client.

**Conclusion**
The objective of this project is to provide a comprehensive explanation of the workings of the CRUD project. For the next article I will work in explain the ROUTES of this project.
- References:

[CRUD Project](https://github.com/M4rcxs/Golang-CRUD)

[Apache AGE](https://github.com/apache/age)
Optical Character Recognition (OCR)
Tags: python
Published: 2023-05-25 17:59:25

## What is OCR?
     
- Optical Character Recognition is a technology that allows text to be scanned from things like a document or image. An example of this is when you take a picture on your smartphone and you can pull the text straight out. OCR in Python is a helpful tool is pulling text out of an upload document such as a pdf. A commonly used library in Python is Pytesseract. 



## What is Pytesseract?
   Pytesseract is an open-source library used for OCR. It is a wrapper for the Tesseract-OCR engine. Lets look at an example of applying Pytesseract. 

First, we need to import the necessary libraries
```
from PIL import Image
import pyTesseract
import numpy as np
```

This will be the example image I will be using:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ec3wzn8s7w30azjueub.png)

Next, we will pull the text out of the image: 

```
file = './images-1.png'

img = Image.open(file)
txt = pytesseract.image_to_string(img)

print(txt)
```

The results is as follows: 

```
bash-3.2$ python3 example.py 

Arial
```

While this was just a simple example, pytesseract and other libraries used for OCR can make life so much simpler for programmers needing to pull text out of images.
Métodos de arreglos en JavaScript
Tags: javascript, beginners, spanish
Published: 2023-05-25 17:48:19

Métodos en arreglos en #JavaScript, hay varios métodos que son nativos y que estan a tu disposición para tener la posibilidad de modificar o obtener los datos con determinadas reglas.
Concat hace la unión de dos arreglos, genera un nuevo y lo devuelve como resultado del método.


![Método concat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mjkfwuwckmva3xkcws6.png)

Filter: método para filtrar los elementos pasando como argumento una función anonima o una arrow function. Obtiene los elementos que cumplan con la condición dada, la función devuelve un nuevo arreglo con los elementos encontrados.


![Método filter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gq7l4gejpo3009x4cyoy.png)

En el ejemplo anterior lo que se esta haciendo es ocupar el método filter, le pasamos un arrow function y dentro de la misma la condición de filtrado de los items dentro del arreglo, en este caso que el nombre sea menor o igual a 5 caracteres.
Find: es muy similar a filter pero en este caso solo nos va a devolver el primer elemento que cumla con la condición, en caso de que ningun elemento dentro del arreglo cumpla con la condición nos dará como resultado un undefined.


![Método find](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbbuilpyjj82rv3977n0.png)

Join: es un método bastante util ya que sirve para generar una cadena de caracteres a partir de una arreglo. Dado un separador de tipo cadena de caracteres, nos serviría para listar los nombre separados por comas de manera sencilla.


![Método join](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8le1xi1v4nkccoou2q8f.png)

Map: método que nos permite recorrer los elementos de un arreglo y realizar operaciones o cambios que se veran reflejados en un nuevo arreglo, en este ejemplo tenemos un arreglo de números que necesitamos que sean multiplicados por dos.


![Método map](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1j0s2hcgyf5iebmv6ptg.png)

Estos son algunos de los métodos de arreglos que son bastante utiles en JavaScript. Si este articulo te gusto o aprendiste algo nuevo te agradecería que me ayudarás siguiendome o compartiendo mi contenido. Gracias.
setInterval Gotchas with React Hooks
Tags: javascript, react, typescript, stinterval
Published: 2023-05-25 17:39:09

In this article we are going to understand Gotchas of using setInterval callback function to update state.

For example we have to build a react where we start timer when application loads.

Below the code that everyone who has basic knowledge react will write it. 

```
function WrongCountUpdate() {
  const [count, setCount] = useState(0);

  useEffect(() => {
    const timer = setInterval(() => {
      setCount(count + 1);
    }, 1000);

    return () => clearInterval(timer);
  }, []);

  return <div>Wrong count update: {count}</div>;
}
```
There is bug in the above code and this has nothing to do with react this is how javascript works.
let's have a look at this live.
Below is the Codesandbox link for this.

[Counter update](https://codesandbox.io/s/updating-state-with-hooks-ssm7qh)

Let's see why this code is not correct?

Below is the flow of this react component.

1. Component mounts/renders 
1. UseEffect will be called which sets setInterval with a callback function.
1. When setInterval is executed with callback function, it has closure with value of count=0.
1. When state updates setInterval callback function is not aware of change of count variable and its closure still has value of count=0 and when setCount is executed with 0+1 ==> 1 thus our count is always one.


To fix this issue we just have to make one change in our setCount instead of passing value to it, we pass a callback function whose input argument is previous count value and return new state.

React ensures that argument of this function has correct previous value.

Below is the correct code for this.

```
function CorrectCountUpdate() {
  const [count, setCount] = useState(0);

  useEffect(() => {
    const timer = setInterval(() => {
      setCount((prevCount) => prevCount + 1);
    }, 1000);

    return () => clearInterval(timer);
  }, []);

  return <div>Correct count update: {count}</div>;
}

```
A Rookie's Adventure at HIMSS 2023
Tags: techtalks, devrel, beginners, career
Published: 2023-05-25 17:30:07

Imagine walking into a giant hall that's buzzing with energy. You're surrounded by rows of booths stretching as far as you can see, each one more colorful than the last. Flashing screens and demos of the latest tech fill the room. Nope, this isn't a dream or a scene from a sci-fi book - it's my very first time at HIMSS 2023.

## The HIMSS Marathon: Networking, Advocacy, and Learning
Every single day at HIMSS was like running a marathon. It was a whirlwind of networking, learning, and standing up for solutions that could change the healthcare game. And just like a marathon, it took more stamina than I expected. After three days of talking to attendees for eight hours straight, my body felt like I'd been pumping out code non-stop. But the rush? Totally worth it.

These long days led to some really rewarding chats. Representing DataMotion, we dove into how secure solutions can transform healthcare. It was like a group debugging session, with all of us tossing out ideas and sharing our thoughts. And the best part? We were all working towards the same goal.

## Fun, Friends, and New Knowledge
But it wasn't all work and no play at HIMSS 2023. Between the fast-paced discussions and the brainstorming sessions, there was also room for fun and making friends. From partying at the House of Blues to grabbing cool swag, I was never bored. And hey, those new friends? They became a part of my network, and our conversations turned into learning opportunities.

It was like jumping into a real-life forum on healthcare tech. I picked up new industry lingo, got the lowdown on current tech trends, and even caught a glimpse of what the future could hold.

## Unity in Diversity
Amid all the hustle and bustle of HIMSS, there was a sense of unity that stood out. We came from different companies and backgrounds, but we all shared one goal - to make healthcare better through technology. Those shared smiles at the end of each exhausting day? Those were reminders of why we were there in the first place.

In a nutshell, my first time at HIMSS wasn't just about attending an event - it was an adventure into the future of healthcare tech. It was a sprint filled with networking, advocating, and learning. And it was proof that when you're passionate about something, you can jump over any hurdle. Here's to the journey, the experiences, and all of us working together to make a difference. Until next time, keep pushing boundaries and driving change.
A View Into Snowflake Tagging
Tags: technology, snowflake, data, datagovernance
Published: 2023-08-31 17:47:06

---
title: A View Into Snowflake Tagging
published: true
date: 2023-05-25 17:30:03 UTC
tags: technology,snowflake,data,datagovernance
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/1508/1*9WqKDhamv5NxroSmy-NAcQ.png)](https://blog.infostrux.com/a-view-into-snowflake-tagging-5762fee72996?source=rss-fab031e08990------2)

Enabling Data Governance Through Tagging

[Continue reading on Infostrux Engineering Blog »](https://blog.infostrux.com/a-view-into-snowflake-tagging-5762fee72996?source=rss-fab031e08990------2)
How Can We Integrate Accessibility Into Our Coding Toolkits?: CodeNewbie Podcast
Tags: podcast, codenewbie, discuss, a11y
Published: 2023-05-25 17:30:00

Yesterday on our podcast, we had on [Daniel Devesa Derksen-Staats](https://twitter.com/dadederk), Senior Accessibility iOS Engineer at Spotify to discuss how we can all add accessibility into our coding toolkits. 

Dani has previously loved working at Skyscanner or the BBC, where he learned a ton about how to make iOS apps more accessible. Sometimes he lets Xcode have a break and spreads the love for accessibility at conferences. Author of the “Developing Accessible iOS Apps” book, he keeps himself busy by writing a daily tweet about accessibility and iOS with the hashtag #365DaysIOSAccessibility.

If you didn't get a chance to listen already, find that episode below or wherever you get your podcasts:

{% embed https://dev.to/codenewbieteam/codenewbie-podcast-s24e3-building-products-for-everyone-4mao %}

---

**Upon listening to the podcast, we wanted to discuss some of the tips that Dani shared with us about creating accessible products.**

## So, What Is Accessibility?

Accessibility is making sure our products work for everyone, regardless of their ability. 


## How Can I Make My Own Products More Accessible?

1. When we can build accessibility tests and features into our processes of creating a product, we can create better solutions than adding in accessibility features at the end of a project.

2. There are many different entry points to making your product more accessible. Accessibility functions can range from optimizing for Screen Readers and Voice Overs to achieving optimal color contrast, grouping and ordering components, conveying information in different modes, and offering larger touch target sizes.

3. There are also plenty of accessibility features that benefit able-bodied individuals, such as dynamic type, dark mode, and subtitles.

4. Our products have to be capable to support both permanent and impermanent disabilities. People may go through shifts in their lives in which they sustain an injury or support an infant, in which their needs on an app can shift. Folks may experience degradation of motor function or eyesight as well, meaning that our accessibility functions must be able to be customized throughout their use.

5. When choosing which accessibility functions to prioritize first on a product, it can be helpful to run statistical data about your market’s demographic. However, make sure to conduct research outside of your data, because some of this data may not account for the full picture of what features could be needed.

---

If you listened— what did you learn?

Send us your thoughts below on how you have made your products accessible and don't forget to give this episode a listen here or wherever you listen to your podcasts! 💜
Employee Bonus | LeetCode | MSSQL
Tags: codenewbie, beginners, leetcode, mssql
Published: 2023-05-25 17:26:00

## The Problem

The challenge involves two tables, `Employee` and `Bonus`.

`Employee` table:

| empId (PK) | name   | supervisor | salary |
|------------|--------|------------|--------|
| int        | varchar| int        | int    |

`Bonus` table:

| empId (PK, FK) | bonus |
|----------------|-------|
| int            | int   |

The goal is to write an SQL query that reports the name and bonus amount of each employee who receives a bonus of less than 1000.

## Explanation

Here's an example for better understanding:

Input: 

`Employee` table:

| empId | name   | supervisor | salary |
|-------|--------|------------|--------|
| 3     | Brad   | null       | 4000   |
| 1     | John   | 3          | 1000   |
| 2     | Dan    | 3          | 2000   |
| 4     | Thomas | 3          | 4000   |

`Bonus` table:

| empId | bonus |
|-------|-------|
| 2     | 500   |
| 4     | 2000  |

Output:

| name | bonus |
|------|-------|
| Brad | null  |
| John | null  |
| Dan  | 500   |

Brad, John, and Dan either have no bonus or a bonus less than 1000.

## The Solution

We'll explore two SQL solutions that solve this problem with subtle differences. We'll discuss their differences, strengths, weaknesses, and structures.

### Source Code 1

The first solution employs a LEFT JOIN to combine the two tables. It then filters out employees with a bonus of 1000 or more.

```sql
SELECT
    e.name,
    b.bonus
FROM
    Employee e LEFT JOIN Bonus b ON e.empId = b.empId
WHERE
    b.bonus IS NULL
    OR
    b.bonus < 1000
```

This solution has a runtime of 1347ms, outperforming 27.70% of other submissions.

![solution1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uezv58him4di6jaxzkb7.png)

### Source Code 2

The second solution closely resembles the first. The only difference is the order of conditions in the WHERE clause. It first checks for bonuses less than 1000 before checking for NULL bonuses.

```sql
SELECT
    e.name,
    b.bonus
FROM
    Employee e LEFT JOIN Bonus b ON e.empId = b.empId
WHERE
    b.bonus < 1000
    OR
    b.bonus IS NULL
```

The runtime for this solution is 984ms, beating 88.51% of other submissions.

![solution2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxbjjffy37fuwx26sf4.png)

## Conclusion

Both solutions yield the desired outcome, but the second solution performs better. Consequently, the ranking of solutions based on overall performance, from best to worst, is as follows: Source Code 2 > Source Code 1.

Your choice should depend on your specific requirements and performance expectations.

You can find the original problem at [LeetCode](https://leetcode.com/problems/employee-bonus/description/).

For more insightful solutions and tech-related content, connect with me on my [Beacons page](https://beacons.ai/ranggakd).

{% embed https://beacons.ai/ranggakd %}
Pandas AI: Revolutionizing Data Analysis with Generative AI in Python
Tags: datascience, data, analyst, pandas
Published: 2023-05-25 17:11:48

Want to take your data analysis skills to the next level? 🚀 Learn how **Pandas AI** combines the power of generative AI and data analysis in Python. Explore real-world examples and unlock new possibilities in our latest blog post: 

**[Read Now](https://www.cygnismedia.com/blog/data-analysis-with-pandas-ai/)**
Calling a controller function from a function in Laravel
Tags: laravel, php, servicecontainer
Published: 2023-05-25 12:19:23

This article was originally Posted on [Medium](https://medium.com/@samalapsy/calling-a-controller-function-from-a-function-in-laravel-1d2fdada3a77)

While developing your application, there may be situations or use case where you need to call an existing controller’s function. Don’t worry, Laravel’s got you covered and there are different ways to achieve this result such as the following:-

Calling the desired controller from your function using dependency injection and passing all necessary parameters.
Creating a trait that can be utilised by controllers or functions.
Creating a Service class that can be called by the function or controller
Creating a custom helper function to perform the same task and then reference your helper where needed. etc
In this tutorial, we are focusing only on the first point (Calling the desired controller from your function using dependency injection and passing all necessary parameters).

Laravel has a powerful tool called Service container, which is used for managing class dependencies and performing dependency injection. It allows us inject the desired controller into the calling function or controller. This is an illustration of it’s usage below

```
app(ControllerName::class)->functionToBeReferenced($args);
```

Now let’s apply this little knowledge.

In the example below, using the Request Facade style, we called a AnotherController and passed a request holding some set of data, headers and a POST request method. When this request gets to your controller, it is executed and the $result variable holds the response sent from AnotherController.

![request facade implementation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqi7cummischmes5fgf7.png)

For those who enjoy using the request helper style or need to maintain a codebase where the request helper function is being used, here’s how you can achieve the same request.

![request helper implementation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rz9vmmfomjzol80u3fi2.png)

What do you think about this approach? Also If you want to learn more about the Laravel’s Service Container tools, you can check Laravel’s documentation.

Thank you for you time and please don’t forget to hit the Follow button.

[![Buy me coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75r0di6fu0x12qlho5ec.png)](https://www.buymeacoffee.com/samalapsy)