teleren/devto huggingface dataset:
Unstyled PrimeVue Meets Bulma CSS
Tags: vue
Published: 2023-07-19 09:44:31

The new unstyled mode of PrimeVue allows integration with various CSS libraries. In this post, we'll try to use Bulma utilities to style the PrimeVue components.

##PrimeVue Setup

We'll be using Vite+Vue in our sample. PrimeVue needs to run in unstyled mode so that the default styles are not added. We don't want to override CSS, just work with a plain canvas. 

At **main.js**, begin with configuring PrimeVue;

```js
import { createApp } from "vue";
import PrimeVue from "primevue/config";
const app = createApp(App);

app.use(PrimeVue, { unstyled: true });
```

##Install Bulma

Bulma can be used with cdn or npm. Since we use Vite, let's go with npm and import it in our project at **main.js**.

```
npm install bulma
```

```js
import 'bulma/css/bulma.css';
```

##PrimeVue Components
Time to add some PrimeVue magic to the mix by adding a couple of components so final **main.js** becomes;

```js
import { createApp } from 'vue';
import App from './App.vue';
import PrimeVue from 'primevue/config';
import Button from 'primevue/button';
import InputText from 'primevue/inputtext';
import Textarea from 'primevue/textarea';
import DataTable from 'primevue/datatable';
import Column from 'primevue/column';
import Panel from 'primevue/panel';

import '@/assets/main.css';
import 'bulma/css/bulma.css';

const app = createApp(App);
app.use(PrimeVue, { unstyled: true });

app.component('Button', Button);
app.component('InputText', InputText);
app.component('Textarea', Textarea);
app.component('DataTable', DataTable);
app.component('Column', Column);
app.component('Panel', Panel);

app.mount('#app');

```

###Input Fields
A Primevue input is easy to style with Bulma by adding the **input** style class.

```html
<InputText class="input" placeholder="Text input" />
```

###Buttons
The **button** class with variations applies **class** property of a PrimeVue button.

```html
<div class="buttons">
   <Button class="button is-info">Info</Button>
   <Button class="button is-success">Success</Button>
   <Button class="button is-warning">Warning</Button>
   <Button class="button is-danger">Danger</Button>
</div>
```

###DataTable
For table, we'll need the mighty [Pass Through](https://primevue.org/passthrough/) props of PrimeVue to access the component internals to add any arbitrary props.

```html
<DataTable :value="products"
        :pt="{
          table: 'table is-fullwidth stripes',
        }"
>
    <Column field="code" header="Code"></Column>
    <Column field="name" header="Name"></Column>
    <Column field="category" header="Category"></Column>
    <Column field="quantity" header="Quantity"></Column>
</DataTable>
```

###Panel
Just like the table, with pass through props, we can pass the Bulma panel utilities to the PrimeVue panel easily.
```html
<Panel header="Header"
        :pt="{
          root: 'panel is-primary',
          header: 'panel-heading',
          content: 'panel-block',
        }"
 >
   <p>Content</p>
</Panel>
```

##Demo
The complete source code is available to StackBlitz.

{% embed https://stackblitz.com/edit/vitejs-vite-9snkbq?embed=1&file=src%2FApp.vue %}
Wednesday Links - Edition 2023-07-19
Tags: java, jvm, spring, loom
Published: 2023-07-19 09:59:53

jmethodIDs in Profiling: A Tale of Nightmares (9 min)🌃
https://mostlynerdless.de/blog/2023/07/17/jmethodids-in-profiling-a-tale-of-nightmares/

Breaking java.lang.String (6 min)🪅
https://wouter.coekaerts.be/2023/breaking-string

What is blocking in Loom? (13 min)🧵
https://softwaremill.com/what-is-blocking-in-loom/

Micronaut 4.0.0 Brings Java Virtual Threads, GraalVM Support and Experimental HTTP/3 Features (3 min)🧑‍🚀
https://www.infoq.com/news/2023/07/micronaut-brings-virtual-thread/

New in Spring 6.1: RestClient (2 min)🎉
https://spring.io/blog/2023/07/13/new-in-spring-6-1-restclient

Grouped version updates for Dependabot public beta (1 min)🏘️
https://github.blog/changelog/2023-06-30-grouped-version-updates-for-dependabot-public-beta/
Meet New Features and Fixes of ADO.NET Data Providers, Entity Developer, and LinqConnect
Tags: devart, adonet, dotconnect
Published: 2023-07-19 09:58:31

Devart announced new versions of ADO.NET Data Providers, Entity Developer, and LinqConnect. 

Devart, a recognized vendor of world-class data connectivity solutions for various data connection technologies and frameworks, rolled out new versions of [ADO.NET Data Providers](https://www.devart.com/dotconnect/?utm_source=devto&utm_medium=referral&utm_campaign=pr_adonet_19.07.2023), [Entity Developer](https://www.devart.com/entitydeveloper/?utm_source=devto&utm_medium=referral&utm_campaign=pr_adonet_19.07.2023), and [LinqConnect](https://www.devart.com/linqconnect/?utm_source=devto&utm_medium=referral&utm_campaign=pr_adonet_19.07.2023).
This release includes support for Visual Studio 2022 version 17.7 Preview, an expansion of Entity Framework Core support, various additional enhancements and fixes related to drivers. 

Entity Framework Core 7.0.5 and 6.0.16 support are implemented in dotConnects for Oracle, MySQL, PostgreSQL, and SQLite.

Visual Studio 2022 version 17.7 Preview is now available for DotConnects for Oracle, MySQL, PostgreSQL, SQLite, DB2, SQL Server, Universal, Salesforce, Entity Developer, and LinqConnect.

**The other improvements:**

- IOracleCommandAdapter interface to access OracleCommand in IDbCommandInterceptor in EF6 is implemented in Oracle. 
- Option config.QueryOptions.InitialLobFetchSize for EF4/EF5/EF6 and EF Core is available in Oracle. 
- The sqlite3.dll library is updated to version 3.41.1 in SQLite. 
- In EF Core 6 and higher models (Entity Developer – SQL Server), the class properties now include a Temporal configuration section.
- In EF Core 7 models (Entity Developer - SQL Server), the Triggers configuration option is implemented into the class properties.
- EF Core 7 models (Entity Developer - SQL Server) now support the retrieval of table trigger metadata through the Create Model Wizard and Update From Database Wizard.

To learn more about the recent release and download new products, visit: 
https://blog.devart.com/new-in-ado-net-data-providers-entity-developer-and-linqconnect-numerous-features-and-fixes.html

**dotConnect** is an enhanced data connectivity solution built over ADO.NET architecture and a development framework with a number of innovative technologies. dotConnect includes high-performance data providers for major databases and popular cloud applications and offers a complete solution for developing data-related applications and websites. dotConnect can be used in all areas of modern application development: web applications and services, windows forms applications, mobile and enterprise development.

**About Devart**
 
Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration, and backup solutions. The company also implements Web and Mobile development projects. 
For additional information about Devart, visit https://www.devart.com/.
Welcome Thread - v234
Tags: welcome
Published: 2023-07-19 09:30:00

---
title: Welcome Thread - v234
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9gl6twd8r59cvwqlllw7.jpg
published_at: 2023-07-19 09:30
---

![Hello flowing onto screen in green and red followed by ellipses](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bic8zyw8xgb9f7per8gw.gif)

---

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

3. If you are new to coding, want to help beginners in their programming journey, or just want another awesome place to connect with fellow developers, check out the [CodeNewbie Org](https://dev.to/codenewbieteam)!
How long do you think the NFT bear market will last?
Tags: nft, discuss, web3, cryptocurrency
Published: 2023-07-19 09:29:30

I've been observing the NFT market for quite some time and it's clear that we're currently in a bearish phase. As we all know, the value and demand for NFTs have seen significant downturns recently. However, markets are cyclical, and it's only a matter of time before we witness an upward swing.

I'm initiating this discussion with the title "How long do you think the NFT bear market will last?" to understand your perspectives on the current market conditions. I'm keen to hear your forecasts about the duration of this downturn and what indicators you believe will signal the start of a bull market.

Whether you're an NFT investor, digital artist, blockchain enthusiast, or simply interested in the phenomenon, your input is valuable. This is a speculative topic, so please, feel free to share your thoughts, reasoning, and any data or trends you think are relevant.

Looking forward to a lively and enlightening discussion. Please post your responses below!
Bump.sh included in the GitHub Student Developer Pack
Tags: github, api, mobile, documentation
Published: 2023-07-19 09:24:51

GitHub Education just announced that Bump.sh is included [in their latest Mobile Development Experience](https://education.github.com/experiences/mobile_app_development).

That brings back some memories...

## Our roots in Mobile Development

Five years ago, in a previous venture, we introduced a major issue in a mobile app. It brought the service down for all its users. The root cause? A breaking change in our API that we didn’t identify when releasing to production. That change was part of a much wider product evolution, including database migrations, making it virtually impossible to roll back and bring the service back up fast.

This story probably rings a bell to many. 

And that’s precisely the origin of Bump.sh. We realized the lack of actionable API documentation tools, that would assist in identifying changes, and let developers discover, build and consume APIs.

## Helping students not reproduce our issues

Today, we’re thrilled to open free access to [Bump.sh](https://bump.sh/students?utm_source=devto&utm_medium=social&utm_campaign=github_student) for all GitHub Students.

The [GitHub Student Developer Pack](https://education.github.com/pack) lets students worldwide access a wide variety of professional-grade tools that otherwise wouldn’t be affordable. While learning, they can directly benefit from what will be their day-to-day workspace once they start their career. They can complete student projects through a great developer experience. They can apply everything they learn about, hands-on.

A keystone of API development, whether for Mobile or web apps, is in the specifications such as OpenAPI (ex-Swagger) or AsyncAPI. They make it possible to define [a robust contract](https://bump.sh/blog/api-contracts-extended-introduction?utm_source=devto&utm_medium=social&utm_campaign=github_student) that tells how to work with an API. We’re fervent advocates of specifications and encourage student developers to discover and learn how to use them early on.

By offering [Bump.sh](http://bump.sh?utm_source=devto&utm_medium=social&utm_campaign=github_student) to students, we’re hoping it will assist them in those efforts. Bump.sh indeed generates stunning docs directly from OpenAPI and AsyncAPI contracts. It detects any change in those contracts and can warn a team whenever a breaking change occurs. More: through our [GitHub Action](https://github.com/marketplace/actions/bump-sh), get API docs automatically updated, and decide whether breaking changes should turn your commit status to red.

[Read more](https://bump.sh/students?utm_source=devto&utm_medium=social&utm_campaign=github_student) about what’s included in our offer.

Students, we’ll love to see what you’ll build. We’ll be there if you need any assistance on the road!
How does Terraform handle resource dependencies and provisioning order?
Tags: terraform, beginners
Published: 2023-07-19 09:20:12

Hi, this Akshay Rao. Lets us look how does Terraform handle resource dependencies and provisioning order.

Terraform uses an implicit and explicit dependency paradigm to manage resource dependencies and provisioning order. This model enables Terraform to comprehend the connections between resources and guarantees that they are provisioned in the proper sequence to meet these requirements.

- **Implicit Dependency Model**: Based on the configuration code, Terraform automatically ascertains the interdependence between resources. When one resource refers to the properties of another, Terraform creates an implicit dependency between them. For instance, Terraform will automatically recognize the dependency between an EC2 instance and a security group if you create an AWS EC2 instance and assign it to a certain security group. As a result, Terraform will make sure the security group is established first.
- **Explicit Dependency Model**: There are occasions when you must provide explicit dependencies that Terraform cannot deduce from the configuration on its own. The depends_on parameter can be used in this situation. Even if there are no direct references between two resources in the configuration, the **depends_on** parameter specifies that they are interdependent. When resources lack direct attribute references to one another yet are logically dependent on one another.

An illustration of how resource dependencies operate in a Terraform configuration is given below:

```
resource "aws_security_group" "sg" {
  name_prefix = "sg_"
}

resource "aws_instance" "instance" {
  ami           = "ami-400Odg3r354efd"
  instance_type = "t2.micro"
  security_groups = [
    aws_security_group.web_sg.id,
  ]
  
}

resource "aws_s3_bucket" "tf_bucket" {
  bucket = "my-tf-bucket"
  acl    = "private"
  
}
```
In this example, the aws_instance resource is dependent on the aws_security_group resource because the security group ID is referenced in the security_groups parameter. Terraform understands that the security group must be created before the EC2 instance.

However, because the aws_s3_bucket resource contains no references to other resources, it has no implicit dependencies. If you need to construct the S3 bucket after the EC2 instance and security group are created, you can use the depends_on argument:
```
resource "aws_s3_bucket" "tf_bucket" {
  bucket = "my-tf-bucket"
  acl    = "private"

  depends_on = [
    aws_instance.instance,
    aws_security_group.sg,
  ]
}
```
Using the **depends_on** parameter, you explicitly specify that the aws_s3_bucket resource is dependent on both the aws_instance.instance and the aws_security_group.sg resources, ensuring proper provisioning sequence.

Keep in mind that, while depends_on aids in ordering, it does not impose rigid resource sequencing. Terraform prioritizes creating resources concurrently and resolving dependencies over waiting for each resource to be built sequentially.
AWS Control Tower Landing Zone upgrade to 3.2 - fix account Enrollment
Published: 2023-07-19 09:15:46

AWS Control Tower allows us to set up and govern a secure, multi-account AWS environment. AWS Control Tower simplifies AWS experiences by orchestrating multiple AWS services on your behalf while maintaining your organization's security and compliance needs.
https://aws.amazon.com/controltower/

AWS Control Tower also establishes a Landing Zone based on best-practices blueprints. 

AWS Control Tower evolves and provides new releases of the Landing Zone and internal, incorporated into the service updates. Release notes: https://docs.aws.amazon.com/controltower/latest/userguide/release-notes.html


AWS Control Tower landing zone version 3.2 was released on June 16, 2023. With this update, there are multiple improvements - https://docs.aws.amazon.com/controltower/latest/userguide/2023-all.html#lz-3-2

Here is the process to update https://docs.aws.amazon.com/controltower/latest/userguide/update-controltower.html:
1. Navigate to AWS Control Tower in the web console -> Landing zone settings
2. Select the version number and choose Update
3. The update process takes about 30 minutes
4. The update changes the AWS Control Tower core accounts only - the Organization itself, Audit, and Log Archive accounts.
5. To upgrade the accounts in the rest of the Organization, choose OU (OUs with fewer than 300 AWS accounts) and then Actions -> Re-register organization unit. This will update all the accounts in the current OU.
6. Repeat for all the OUs

If you update a single account and then try to Re-register the OU which holds the account, an error might arise "Enrollment failed"
The error is related to AWS resources that are already existing - like IAM Roles.

To clean the account and have a clean Enrollment, these resources need to be deleted:
1. AWS IAM Roles aws-controltower-*
2. SNS topic aws-controltower-SecurityNotifications
3. Lambda Function aws-controltower-NotificationForwarder
4. CloudWatch Loggroup /aws/lambda/aws-controltower-NotificationForwarder
5. EventBridge Rule aws-controltower-ConfigComplianceChangeEventRule
6. Config configuration-recorder aws-controltower-BaselineConfigRecorder
`aws configservice delete-configuration-recorder --configuration-recorder-name aws-controltower-BaselineConfigRecorder`
7. Config delivery-channel aws-controltower-BaselineConfigDeliveryChannel
`aws configservice delete-delivery-channel --delivery-channel-name aws-controltower-BaselineConfigDeliveryChannel`
8. Config aggregation-authorization for the region - details can be obtained with this CLI
`aws configservice describe-aggregation-authorizations`
`aws configservice delete-aggregation-authorization --authorized-account-id ACCOUNT_ID --authorized-aws-region REGION`

All of these resources are protected by SCP, and you would need to "jump" to the particular AWS account from your Organizational using the AWSControlTowerExecution Role.

Have fun.
Thank you!
Typescript - Function Overloads
Tags: typescript, overloads, webdev, programming
Published: 2023-07-19 09:15:01

There are times we need to create a function that can be implemented multiple ways : accept multiple types of arguments and/or has multiple return types.

This can be achieved by declaring function overloads and then declaring the actual implementation of the function based on the overloads.

## What is Overload Signature?
A function overload only declares function's parameter and return type but doesn't include function body.

## What is Implementation Signature?
This is where we actually implement the overload signatures. Implementation signature contains generalized function parameters and return type followed by function body. 

## How to

Let's create a ‘findPerson’ function that can:
  1. accept person’s name & address and return an id, or
  2. accept the person’s id and return an object.

Here’s how we declare two overload signatures for our findPerson function.
```typescript
//  First overload signature
function findPerson(
  name: string, 
  address: string
): string;
//  Second overload signature
function findPerson(id: string): Person;
```
No matter how many overload signatures we have, we can only have one implementation signature. So we need to make sure that the implementation is general and relevant to both of the overload signatures. 

```typescript
const people = [
  {
    id: "person001",
    name: "Alicia",
    address: "Soedirman Street 120"
  },
  {
    id: "person002",
    name: "Firman",
    address: "Kuningan Raya 11A"
  }
];

function findPerson(
  nameOrId: string,
  address: string
): string | Person {
  let personFoundOrId = null
  if (address === undefined){
//  Implementation for first overload signature
    personFoundOrId = people.find((person:Person) => {
      person.id === nameOrId
    }
  } else {
//  Implementation for second overload signature
    const personFound = people.find((person:Person) => {
      person.name === nameOrId && person.address === address
    }
    personFoundOrId = personFound?.id
  }
  
  return personFoundOrId
  }
```

## Result
This is how you call the findPerson function using the firest overload : 
```typescript
findPerson('person001');
// this will return an object 
// {
//   id: "person001",
//   name: "Alicia",
//   address: "Soedirman Street 120"
// }
```
or using the second one : 
```typescript
findPerson('Firman', 'Kuningan Raya 11A');
// this will return string "person002" 
```

## Conclusion

- Function overload enables a function having more than one implementation.
- To make this works, implementation signature must be compatible with each of the overload signatures.

## Reference

- https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads
AWS Cognito how to bulk update phone number attribute for existing users in existing user pool
Published: 2023-07-19 09:04:50

In existing user pool and existing users there is no phone number information in user attributes

Through Admin CLI Console, I plan to update phone number for all existing users 
I know there is a command to update phone number indivudually in below
aws cognito-idp admin-update-user-attributes --user-pool-id eu-west-1_gDAhAUo4a --username test@example.com --user-attributes Name="phone_number",Value="+90312037000"

but since there are a lot of users, I would like to bulk update phone number

As an input I have phone number for all users as csv file that includes  username|phone number as two columns

I want to use these input csv to update phone number for these existing users
I want to combine AWS Cognito commands and csv input in one batch script

I mean, for example 
In input csv,  User: XXX   Phone Number: +9012345677
First I want to use list command in AWS Cognito CLI
- aws cognito-idp list-users --user-pool-id $POOL_ID | jq -r ".Users[].Username | select(contains(\"$QUERY\"))" |
After finding User:XXX I want to update phone number as +9012345677 by using aws cognito-idp admin-update-user-attributes

In script I will create the loop to update phone number for all existing users (> 1000)
Note: Phone Number are different for all users

I know according to script writing It is easy questions but I am only familiar with AWS Cognito CLI command if you can help how to build bulk update script I will appreciate

Since in AWS Cognito there is no easy way like export/import I want to use bulk script

Thanks
Anyone using Fiverr?
Tags: webdev, design, productivity
Published: 2023-07-19 09:03:06

Is there anyone working with Fiverr as a freelance developer or designer. I used to be a freelancer at Fiverrr before I ended up in a job. Only worked with a bunch of clients and hard some bad and good experiences. 

Share your experience with Fiverr or other freelancing platforms.