teleren/devto huggingface dataset:
Starchart: Milestone 0.9
Published: 2023-04-10 04:37:24

Last week, I worked on a bunch of bug fixes and features for starchart:  

- Splitting certificate public key from its chain. The certificate creation process returns the public key for the certificate, and a chain which contains the intermediate certificates. We were storing both of these in the same field, and displaying the data as is. Thus, users would be copying the public key + the chain instead of just the public key ([PR](https://github.com/DevelopingSpace/starchart/pull/532))

- Adding admin login setup for e2e tests. We have a util function that allows anyone writing tests to easily log in as a user. This needed to be extended to users with the admin role ([PR](https://github.com/DevelopingSpace/starchart/pull/531))  

- Improved landing page responsiveness. We had a couple of cards on the landing page that would shrink horizontally instead of moving to be vertically stacked on smaller screens ([PR](https://github.com/DevelopingSpace/starchart/pull/522))  

- Making links more obvious. We had a bunch of links that looked the exact same as rest of the text. This changed all links to have color red and an underline by default. Since we use Chakra UI, this was specified in the theme file, and thus could be overridden as you would for the base Chakra UI element ([PR](https://github.com/DevelopingSpace/starchart/pull/544)) :
```ts
const theme = extendTheme(
  {
    colors,
    breakpoints,
    components: {
      Link: defineStyleConfig({
        baseStyle: {
          color: 'brand.500',
          textDecor: 'underline',
        },
      }),
    },
  },
  withDefaultColorScheme({ colorScheme: 'brand' })
);
```

- Removed happy-dom. I looked at a dependabot PR to update this package and noticed that we were not using it at all ([PR](https://github.com/DevelopingSpace/starchart/pull/520))
About me
Published: 2023-04-10 04:35:26

As for the avatar, Mr. Clown has done a lot of work. I may like clowns, so I gave myself the image of clowns. I don't know if there is anyone like me who sympathizes with the life of clowns, but also loves the image of clowns.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vme6p6vbjwia30v9yw77.jpg)
My story
Published: 2023-04-10 04:34:48

I am a clown who loves football very much. I hope I can share football with you and enjoy football together on this platform. Most of my content will be comments on recent matches, and I will organize some football anecdotes regularly to share with you

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxv56ydic2zar83pnfk5.jpg)
Using gs_dump and gs_dumpall to Export Data -Overview
Tags: opengauss
Published: 2023-04-10 04:25:49

openGauss provides **gs_dump** and **gs_dumpall** to export required database objects and related information. You can use a tool to import the exported data to a target database for database migration. **gs_dump** exports a single database or its objects. **gs_dumpall** exports all databases or global objects in openGauss. For details, see Table 1.

Table 1 Scenarios

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

**gs_dump** and **gs_dumpall** use **-U** to specify the user that performs the export. If the specified user does not have the required permissions, data cannot be exported. In this case, you can set **–role** in the **gs_dump** or **gs_dumpall** command to the role that has the permissions. Then, **gs_dump** or **gs_dumpall** uses the specified role to export data. See Table 1 for application scenarios and Data Export By a User Without Required Permissions for operation details.

**gs_dump** and **gs_dumpall** encrypt the exported data files. These files are decrypted before being imported. In this way, data disclosure is prevented, protecting database security.

When **gs_dump** or **gs_dumpall** is used to export data from a cluster, other users can still access (read and write) databases in openGauss.

**gs_dump** and **gs_dumpall** can export complete, consistent data. For example, if **gs_dump** is executed to export database A or **gs_dumpall** is executed to export all databases from openGauss at T1, data of database A or all databases in openGauss at that time point will be exported, and modifications on the databases after that time point will not be exported.

**Precautions**

**·** Do not modify an exported file or its content. Otherwise, restoration may fail.

**·** If there are more than 500,000 objects (data tables, views, and indexes) in a database, you are advised to use **gs_guc** to set the following parameters for database nodes. This operation is not required if the parameter values are greater than the recommended ones.

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

For data consistency and integrity, **gs_dump** and **gs_dumpall** set a share lock for a table to dump. If a share lock has been set for the table in other transactions, **gs_dump** and **gs_dumpall** lock the table after it is released. If the table cannot be locked within the specified time, the dump fails. You can customize the timeout duration to wait for lock release by specifying the **–lock-wait-timeout** parameter.

During an export, **gs_dumpall** reads all tables in a database. Therefore, you need to connect to the database as an openGauss administrator to export a complete file. When you use **gsql** to execute SQL scripts, cluster administrator permissions are also required to add users and user groups, and create databases.
Concurrent Data Import and Queries
Tags: opengauss
Published: 2023-04-10 04:13:05

Transaction T1:

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

Transaction T2:

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

Scenario 1:

T1 is started but not committed. At this time, T2 is started. **COPY** of T1 and then **SELECT** of T2 starts, and both of them succeed. In this case, T2 cannot see the data added by **COPY** of T1.

Scenario 2:

**· READ COMMITTED** level

T1 is started but not committed. At this time, T2 is started. **COPY** of T1 is complete and T1 is committed. In this case, T2 can see the data added by **COPY** of T1.

**· REPEATABLE READ** level

T1 is started but not committed. At this time, T2 is started. **COPY** of T1 is complete and T1 is committed. In this case, T2 cannot see the data added by **COPY** of T1.
Project 2 Final Post
Published: 2023-04-10 03:53:26

**How many elements did you end up going with? Why did you break it up that way?** I ended up with 3, although it was recommended to use 4. The badge template itself needs an element, the list, and the search button. The optional one was the overarching "app" to make communication easier but I tried going the route without it.

**What was the hardest aspect of this?** Definitely the communication across the elements. Although we had similar challenges in the prior project, this seemed like a step up from that. For many reasons, communication between elements in the web is significantly harder than simply including a class and passing an instance of it like you would in an OOP language.

**What part of this project was easier than you expected?** Setting up the badge lists and getting that rendering, since this was our second time through, it was much faster and less troublesome this time around. 

GitHub: https://github.com/ethanxo/badges-list/
Vercel: https://badges-list-ethanxo.vercel.app/
How to Create a Declarative Schema in Magento 2
Tags: webdev, magento, magento2tutorials
Published: 2023-04-10 03:50:36

Magento 2 proposes a decisive pattern to characterize the construction of the data set tables and the connections between them. This approach permits engineers to portray the ideal condition of the data set, and Magento will consequently roll out the essential improvements to carry the information base into consistency with the composition. By utilizing a decisive construction, designers can work on information base administration and decrease the gamble of blunders while making changes to the data set structure. In this instructional exercise, we will direct you through the most common way of making a decisive pattern in Magento 2, including characterizing tables, sections, and connections.

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

Magento 2 is an open-source online business stage that involves the Magento System in PHP and gives designers the capacity to make custom modules with their own data set compositions. Additionally php structure helps designers to not make monotonous codes. One method for characterizing these constructions is by utilizing the decisive diagram, which is another element in Magento 2.3 and later. This article will give a bit by bit guide on **_how to create a declarative schema in Magento 2._**

For more info, visit **_https://webguru.dev/how-to-create-a-declarative-schema-in-magento-2/_**
Machine learning in Healthcare
Tags: machinelearning, ai
Published: 2023-04-10 03:49:16


![Machine learning in Healthcare](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9w1ycqv19x8npe0cn1w9.png)



Machine Learning is used across many domains around the world. One of the biggest benefits of ML is its ability to scan through massive amounts of data in record time. This helps researchers determine areas of focus for their own research.

Machine learning is causing a buzz in the healthcare industry. It can play an essential role in predicting presence/absence of Locomotors disorders, Heart diseases and more. Such information, if predicted well in advance, can provide important insights to doctors who can then adapt their diagnosis and treatment per-patient basis.

Cancer patients are often given the same drug and then monitored to see the effectiveness of that drug. ML could use data to predict which patients could benefit from using a particular drug, providing a highly personalized approach, and saving valuable time and money.

It won’t be long until machine learning is being used as standard practice throughout the healthcare industry, and that’s good news for all of us. After all, we’ll all become patients at some point in our lives, and ML has the potential to usher in a new era of health care in which we’re all treated with personalized health care plans based on data and not just the results of clinical trials and the good news is that we won’t even lose our doctors. ML won’t replace them, it will just help to make them more efficient. It’s a true case of man and machine working better together than either could in isolation, and it spells a bright future for all of us.
When i used Hooks useEffect with setInterval
Tags: react
Published: 2023-04-10 03:46:49

I'm based on the React Docs write a setInterval in the useEffect, 
i wants start a timer when app is mounted,
the recommended writing is:

```
const [a, setA] = useState(0);
useEffect(() => {
  const timer = setInterval(() => {
    setA(x => x + 1);
  }, 1000);
  return () => clearInterval(timer);
}, []);
```

When there is needs some dependency，i've been advised to use useState's callback function for avoid dependency, but when i needs another state b，it's the condition of a's self-increment.
like:

```
const [a, setA] = useState(0);
const [b, setB] = useState(0);
useEffect(() => {
  const timer = setInterval(() => {
    setA(x => {
      if (b > 5) {
        return x;
      }
      return x + 1;
    });
  }, 1000);
  return () => clearInterval(timer);
}, []); // dependency error, that required dependency b
```

To fix this problem, i combined state a and b，like:

```
const [c, setC] = useState({
  a: 0,
  b: 0,
});
useEffect(() => {
  const timer = setInterval(() => {
    setC(x => {
      if (x.b > 5) {
        return x;
      }
      return { a: x.a + 1, b: x.b };
    });
  }, 1000);
  return () => clearInterval(timer);
}, []);
```

Is this the right way to write it, or should I use useEffectEvent?
Concurrent UPDATE in the Same Table
Tags: opengauss
Published: 2023-04-10 03:46:22

Transaction T1:

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

Transaction T2:

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

Transaction T3:

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

Scenario 1:

T1 is started but not committed. At this time, T2 is started. **UPDATE** of T1 and then T2 starts, and both of them succeed. This is because the **UPDATE** operations use row-level locks and do not conflict when they update different rows.

Scenario 2:

T1 is started but not committed. At this time, T3 is started. **UPDATE** of T1 and then T3 starts, and UPDATE of T1 succeeds. **UPDATE** of T3 times out. This is because T1 and T3 update the same row and the lock is held by T1 at the time of the update.
MacOS Terminal and Alternatives
Tags: terminal, macos, cli, programming
Published: 2023-04-10 03:33:47

## Terminal and Alternatives

The first part of customization, involves the app you use to connect to your command line. Below I will list the default app, and how to open up its customization preferences, along with other alternatives that offer more features. 

### Terminal App (Default)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45b44f6oibg182mung8f.png)
*[link](https://support.apple.com/guide/terminal/welcome/mac)*

A lot of developer who use the default terminal window are unaware that there is a large amount of customization hidden in the preferences. By using the keyboard shortcut `command + ,` you can open up the preferences of your terminal app. This will allow you to change profiles, font styles and size, and much more. Now within the default app you are given some features including Multiple tabs and windows, a history of all commands, and keyboard shortcuts. 

### iTerm2 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ub8kpgxas9e7u2nd7bsg.png)
*[link](https://iterm2.com/)*
Commands to Install :
```bash
brew update
brew install --cask iterm2
```
Main features that iTerm2 includes are split pane terminals that can even run their own prompts, a mouse-less copy and paste, search functionality without terminal output, and multiple window and tab support for ease of use. 

### WARP 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zv58zk8irhtjwcqvm4b.png)
*[link](https://www.warp.dev/)*
Commands to Install :
```bash
brew update
brew install --cask warp
```
Although WARP does need a account to run, it does offer a lot of features including Multiple Shell Support *(bash, zsh, fish)*, integration with tools like git and homebrew, autocompletion for text within terminal, a built-in file browser to help you navigate to open files directly in WARP, and more.

### Hyper 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xynpzhbvmre59m5kqo00.png)
*[link](https://hyper.is/)*
Commands to Install :
```bash
brew update
brew install --cask hyper
```
Hyper is a cross-platform terminal emulator built using HTML, CSS and JS that is able to provide you with hyper customizable themes, shell support for most shells *(bash, zsh, fish)* and search functionality to help review your terminal output. 

## Thank You For Reading! 
If you took the time to try out any of these new terminal apps, please reply with your favorite of these! If I left a application off of this list, let me know in the comments! Cheers!
Project 2 Wrap Up
Tags: webdev, api, javascript, backend
Published: 2023-04-10 03:21:17

Code:   https://github.com/DynamicPunch/project-2cool4school
Demo:  https://project-2cool4school.vercel.app/

## How many elements did you end up going with? Why did you break it up that way?
We went with 3 elements.  We needed one for the search-bar one for the badges called project-list and project-2cool4school for the main.  The search bar and badges were the two elements of project we needed and then the project-2cool4school to put them together
## What was the hardest aspect of this?
The hardest aspect for us was implementing search. It took a while but the video for the search widget and some explaining from another group helped us figure it out. It had probably worked earlier than we thought but the address we were fetching was misspelled which made us think that our changedProperties in search-bar.js wasn't reading properly causing the badges to not show up.  The website being taken down was annoying but didn't make the project harder as there were screenshots.
## What part of this project was easier than you expected?
Making the collapsibles were easier than expected as the we had used collapsibles in our card for project 1.  We even used the same code to store if the collapsibles were opened or not.
We did it!!!! Project 2
Published: 2023-04-10 03:20:08

##Repo Link: 
https://github.com/NewJerkey/badge-dashboard.git
##Vercel:
https://badge-dashboard.vercel.app/

##How many elements did you end up going with?
For our final project, we ended up going with 3 elements when creating our badges. We broke it up to search-bar.js, badge-list.js, and badge-dashboard.js. 

##Why did you break it up that way?
We broke it up to three different ways so that we are able to differentiate which code goes to which element of the website. All the html and css for the actual badges went into that file. The badge list have the JavaScript code to connect to the api goes into the badge list file. Finally the search bar gets it own file to make the styling of the search bar and save the user input as a variable to do the search  against the api.    

##What was the hardest aspect of this?
The hardest aspect of this project is creating the filtering and search function of the website to query the badges we want. We had trouble finding a way to make connectivity between our elements in the src folders and our api. We had no idea where to start when it came to figuring out how to use the user input to connect to the api and query against all the current badges we have. We took the time to re watch the video and looked at other people's repo to reserves engineering it to learn how it works. The simple icons were not working for a while and we were able to modify the rollup config file. 
 
##What part of this project was easier than you expected?
The overall getting the design and the basic html layout was the easiest part of the project. Creating the basic CSS to design what the badge looks like and creating the basic divs to structure the page. Kicking off the start of the project of getting the basic layout down speed up the project a lot until we hit the roadblock of getting the search function to work.
project 2 Groups 9 + 10
Published: 2023-04-10 03:07:58

##Github and Vercel Links:
Vercel: https://badge-dashboard-nine.vercel.app/
Github: https://github.com/asbee03/badge-dashboard

##Thoughts on project and how we went about it.

When we started the project we originally came into a lot of roadblocks with vercel. Once we became comfortable with uploading to vercel, VSCode, and getting the three of us to actually work on one repository, we made steps to completing the project. Our first order of business was the search bar. We thought that doing this first would allow us to be able to frame the outline of our application and be able to gage where everything would be however, this turned into our first problem. Our issue was getting  too overcomplicated. We originally found a really cool search bar that we wanted to implement to our application to help improve how our app looks visually, however we decided against it due to being way too complicated and hurt our progress on more important things such as actually wiring up the search bar. Instead we went with a simple design and search bar and made more progress. Second, we created the badges and were able to implement them our API.  Originally all of our badges were grouped as one with different attributes so if you edited one they would all change. We were able to separate them by making big changes to our API that allowed us to make more progress and made things easier to work on. After successfully implementing the search bar, our last task was making each border a different color. We were unfortunately unable to make each badge color different after lots of trial and error we were not exactly sure of how to go about it. Overall we found this project challenging however, we learned a lot of valuable information of back-end and front-end coding and how to get the two to talk to each other and actually create an app. If you look at our homework check ins I believe at around check in 2 or 3 we quickly ditched trying to make it fancy and focused on wiring everything up as a working app is much better than a fancy app with multiple issues and problems.
Programming logic is not difficult!
Tags: beginners, programming, webdev, productivity
Published: 2023-04-10 03:07:54

In my first contact with web development, before starting a tech degree, I made the traditional beginner’s mistake of focusing on learning JavaScript and Python. I spent hours playing YouTube tutorials, I felt like a computing prodigy while I was there rewriting entire blocks of code, but at the end of the day I felt like I hadn’t learned anything.

I chose JavaScript because it’s a widely used language on both front-end and back-end, and Python because it’s relatively “easy” for beginners. It turns out that the easiest path is not always the most productive, and unfortunately it took me a few months to understand the meaning of developing programming logic.

Certainly, programming logic is the most basic skill that differentiates the programmer who solves real problems from someone who is trying to get a new job overnight.

Logic is improved with daily practice, it’s like a baby learning to walk, or an adult learning to swim. At first it is difficult and scary, but with time it becomes something natural.

There is no better feeling for the beginner than writing clean and well-structured code, it is pleasurable, motivating, and the process is to be enjoyed.

I believe that YouTube tutorials have the potential to help beginners or even more experienced developers to understand concepts or features. However, this pedagogical potential is limited and the beginner should not get attached to it.

So, if you are a beginner in tech, invest first in programming logic, data structure and algorithms, after that it is easy to master any programming language. Don’t forget to create your own projects, you can mirror yourself in projects you like, but it is essential to use creativity to write your own programs. This skill needs to be developed as well.

You’re also going to need the ability to choose the right language for the proposed problem based on the requirements survey, and most importantly, there will be days when nothing makes sense, but keep going anyway, remember to enjoy the process, practice gratitude.

Tip: Grateful developers get a job faster.