teleren/devto huggingface dataset:
DTT | DTSE Tech Talk Schedule Plan: SEP 2023
Published: 2023-09-18 07:53:18


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

To register, click here: https://developer.huaweicloud.com/intl/en-us/forum/topic/0210129914251925306
Weekly Roundup 018 (Sep 11): 🔥Hot Topics🔥 in #workplace, #sharepoint, and #powerplatform
Tags: roundup, workplace, sharepoint, powerplatform
Published: 2023-09-18 07:46:25

Hey fellow developers! It's @jaloplo, here to give you the latest scoop on what's been happening in the [#workplace](https://dev.to/t/workplace), [#sharepoint](https://dev.to/t/sharepoint), and [#powerplatform](https://dev.to/t/powerplatform) communities. 😎

## [#workplace](https://dev.to/t/workplace)

- [12 Best HR Apps for 2024 — Comparison Guide](https://dev.to/anthonypelle/12-best-hr-apps-for-2024-comparison-guide-5583) by [anthonypelle](https://dev.to/anthonypelle)
- [Empathy: The Unseen Foundation of Effective Teams](https://dev.to/schusterbraun/how-to-build-empathetic-teams-4g43) by [Schuster Braun](https://dev.to/schusterbraun)
- [What is People Analytics? 2024 HR & Ops Guide](https://dev.to/anthonypelle/what-is-people-analytics-2024-hr-ops-guide-2mc1) by [anthonypelle](https://dev.to/anthonypelle)
- [Navigating Success: The Art of Following Instructions in the Tech Industry](https://dev.to/coderosion/navigating-success-the-art-of-following-instructions-in-the-tech-industry-5ef7) by [daniel ukuhor](https://dev.to/coderosion)
- [8 tips from the Engineers' Survival Guide](https://dev.to/s3an_0vert0n/8-tips-from-the-engineers-survival-guide-13d6) by [Sean Overton](https://dev.to/s3an_0vert0n)
- [On launching hackathon.camp](https://dev.to/igeligel/on-launching-hackathoncamp-1cb0) by [Kevin Peters](https://dev.to/igeligel)
- [The Top 5 Sites to Find Remote Work (from the Comfort of Your Pajamas)](https://dev.to/uncle_ben/the-top-5-sites-to-find-remote-work-from-the-comfort-of-your-pajamas-2m4i) by [Ben ltaif](https://dev.to/uncle_ben)

## [#sharepoint](https://dev.to/t/sharepoint)

- [Blood pressure tracker with Microsoft Lists and Power Automate](https://dev.to/jaloplo/blood-pressure-tracker-with-microsoft-lists-and-power-automate-45jp) by [Jaime López](https://dev.to/jaloplo)

## [#powerplatform ](https://dev.to/t/powerplatform)

- [Power Automate - Flow Logging in App Insights](https://dev.to/wyattdave/power-automate-flow-logging-in-app-insights-lp) by [david wyatt](https://dev.to/wyattdave)

That's all for this week's roundup! Thanks for tuning in, and remember to keep the discussions lively and informative in our tags. 💬 If you have any suggestions for future topics, feel free to drop them in the comments below. See you next week! 👋
Laravel sqlstate(hy000 error 1045) access denied for user
Tags: laravel, sqlstate, errors, denied
Published: 2023-09-18 07:41:11

## Laravel sqlstate(hy000 error 1045) access denied for user

The Laravel error SQLSTATE[HY000] Access denied for user can occur if you forgot to add the database name, username, and password to your Laravel app. You can fix this by opening the .env file in the Laravel app and adding the database name, username, and password.

## The error can also occur if:

- The password you are using doesn't match what MySQL thinks the password should be for the user you're connecting as.
- A matching MySQL user doesn't exist.
- The user “root” does not have the necessary permissions.
- If you are using the PHP's default web server, you need to restart your server after changing your .env file values.

Read More [Laravel sqlstate(hy000 error 1045) access denied for user](https://www.tutsmake.com/sqlstatehy000-error-1045-access-denied-for-user-laravel)
Replacing fastapi's default api docs with elements
Tags: fastapi, swagger, elements, openapi
Published: 2023-09-18 07:32:14

By default, fastapi comes with swagger for API testing and redoc for API documentation. Let's replace them with [elements](https://stoplight.io/open-source/elements), a pretty API documentation tool.

## Turn off the defaults

Turn off the default documentation by setting it to `None`

```python
app = FastAPI(
    docs_url=None, redoc_url=None
)
```

## Add the new docs view

```python
@app.get("/docs", include_in_schema=False)
async def api_documentation(request: Request):
    return HTMLResponse("""
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Elements in HTML</title>
  
    <script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
  </head>
  <body>

    <elements-api
      apiDescriptionUrl="openapi.json"
      router="hash"
    />

  </body>
</html>""")
```

Navigate to `/docs`You should see something like this

![demo](https://cdn.hashnode.com/res/hashnode/image/upload/v1694158884140/07f69705-3bfd-4da0-881d-52db3ee14886.png)

## References

* [https://fastapi.tiangolo.com/tutorial/metadata/?h=docs_url#docs-urls](https://fastapi.tiangolo.com/tutorial/metadata/?h=docs_url#docs-urls)
* [https://docs.stoplight.io/docs/elements/a71d7fcfefcd6-elements-in-html](https://docs.stoplight.io/docs/elements/a71d7fcfefcd6-elements-in-html)
Changing the default clickhouse server response format to JSON
Tags: clickhouse, json
Published: 2023-09-18 07:30:10

The clickhouse http interface uses [TSV(tab separated)](https://clickhouse.com/docs/en/interfaces/formats#tabseparated) as the default response format.

```sql
CREATE TABLE users (uid Int16, name String, age Int16) ENGINE=Memory;

INSERT INTO users VALUES (1231, 'John', 33);
INSERT INTO users VALUES (6666, 'Ksenia', 48);
INSERT INTO users VALUES (8888, 'Alice', 50);

SELECT * FROM users;
```

The server response:

```json
{
  "result": {
    "query_run_id": "0180af8f-c9c4-41c7-be52-011a96cc1768",
    "output": "1231\tJohn\t33\n8888\tAlice\t50\n6666\tKsenia\t48\n",
    "time_elapsed": "117ms"
  }
}
```

Changing the format allows the response to be easily parsed or loaded into js/python objects.

Change the query to

```sql
SELECT * FROM users FORMAT JSON;
```

This outputs:

```json
{
  "result": {
    "query_run_id": "26732a8a-aac9-4de7-b71a-4e1f35032c17",
    "output": "{\n\t\"meta\":\n\t[\n\t\t{\n\t\t\t\"name\": \"uid\",\n\t\t\t\"type\": \"Int16\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"name\",\n\t\t\t\"type\": \"String\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"age\",\n\t\t\t\"type\": \"Int16\"\n\t\t}\n\t],\n\n\t\"data\":\n\t[\n\t\t{\n\t\t\t\"uid\": 1231,\n\t\t\t\"name\": \"John\",\n\t\t\t\"age\": 33\n\t\t},\n\t\t{\n\t\t\t\"uid\": 6666,\n\t\t\t\"name\": \"Ksenia\",\n\t\t\t\"age\": 48\n\t\t},\n\t\t{\n\t\t\t\"uid\": 8888,\n\t\t\t\"name\": \"Alice\",\n\t\t\t\"age\": 50\n\t\t}\n\t],\n\n\t\"rows\": 3,\n\n\t\"statistics\":\n\t{\n\t\t\"elapsed\": 0.000923364,\n\t\t\"rows_read\": 3,\n\t\t\"bytes_read\": 54\n\t}\n}\n",
    "time_elapsed": "106ms"
  }
}
```

Now, you can parse the value of `output` and get the `data` key.

```javascript
JSON.parse(clickhouse_response["result"]["output"])["data"];
```

returns

```json
[
  {
    "uid": 1231,
    "name": "John",
    "age": 33
  },
  {
    "uid": 6666,
    "name": "Ksenia",
    "age": 48
  },
  {
    "uid": 8888,
    "name": "Alice",
    "age": 50
  }
]
```

Check out all the supported clickhouse formats [here](https://clickhouse.com/docs/en/interfaces/formats)

To set `JSON` as the default response format in the clickhouse HTTP interface, pass `default_format=JSON` as a query parameter. This should be handled automatically if you're using a clickhouse client library.

## References

* [https://clickhouse.com/docs/en/sql-reference/formats#json](https://clickhouse.com/docs/en/sql-reference/formats#json)
Huge DDoS attack
Tags: cybersecurity, ddos, sre, loadbalancing
Published: 2023-09-18 07:10:36

Huge #ddosattack against US #financial institution successfully #thwarted. 
It's all explained on the following post: 
https://www.relianoid.com/blog/huge-ddos-attack-against-us-financial-institution-successfully-thwarted/?fbclid=IwAR3z3zcLTssGlL1iSh2f2GkmEdZctoWGnGV-u-3SNmUvgh95U6UphaDlZgs


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69vwkgnsfr31gp2rw6dt.jpg)

#cybersecurity #cyberattack #ddos #sre #sreengineer #srexperts23 #loadbalancing #cybercrime #ransomware #financialinstitutions #botnets #onlinebanking #internetsecurity #dataprotection #networksecurity
What's Your Ideal Coding Environment?
Tags: discuss
Published: 2023-09-18 07:00:00

_Welcome to Code Chatter, your go-to series for conversational coding insights. What makes this series of questions different from all the others? Well, truth be told, not much, but they're still thought-provoking and fun. Join us as we explore the coding world, one witty question at a time._

> What physical environment do you find most conducive for coding, and how does it impact your productivity?

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Is Coding Sans Comments Always A Mistake?
Tags: discuss, codenewbie, beginners
Published: 2023-09-18 07:00:00

🎤🔊 _Hey all tech enthusiasts, it's time to rumble in the digital jungle! In one corner, we've got bold and controversial tech statements, ready to assert their dominance. And in the other corner, we've got you, the fearless challengers, set to prove 'em wrong! Get ready to rumble as we dive into debates, challenge the status quo, and wrestle with some of the biggest questions in tech!_


> Prove me wrong: Coding without comments is always a bad practice.

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
Resolving the Vercel 404 "Page Not Found" Error After Page Refresh.
Published: 2023-09-18 06:55:30

I recently completed a project(cinemaxtv.vercel.app), which is a movie application. After deploying the application on Vercel, I noticed an unusual issue. Whenever I navigate to a different page and refresh that specific route, I encounter a 404 Not Found Error, indicating that the specified route cannot be found. However, I achieve the desired result when I perform the same action on my local host. Consequently, I deduced that the error is likely due to a deployment glitch on Vercel.


![404 image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n0tpfwqgr9c1chmq6618.png)
A pictorial display of the 404 not found error above


After conducting some research, I discovered a solution for resolving this issue. To rectify the 404 Not Found Error, it is necessary to establish redirect and rewrite rules for your React Router application. These rules will assist your application in circumventing the "Page Not Found" error.

To begin, generate a vercel.json file in the root directory of your project. This file will enable Vercel to configure the routing accurately, and you should insert the following code snippet in the image below.


![vercel image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nztyjrsztnwwe4c0v0cf.png)
This image represents the structure of the vercel.json file and the code snippet.

```javascript
{
    "rewrites": [
        {"source": "/(.*)", "destination": "/"}
    ]
}

```
The provided code snippet instructs Vercel to rewrite any incoming URL path to the root path. This configuration ensures that when we initiate a redirect with a child path, Vercel will redirect it to the root path, effectively preventing the occurrence of the 404 Not Found Error.

If your project has already been deployed, push the changes to your GitHub repository and refresh the page, you will obtain your desired result seamlessly, without encountering any issues.


![working image ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/izc3jzhem2z8bfgwayaa.png)

_voila! It now works._

**Conclusion**
If you find this article interesting, please consider liking and sharing it. Additionally, I welcome your thoughts and feedback in the comment section below. Thank you for your engagement.

**Open to work**🙂
Did you enjoy this article or need an experienced Technical Writer / React Developer for a remote, full-time, or contract-based role? Feel free to contact me.
[Github](stanlisberg/github.com) || [Linkedin](https://www.linkedin.com/in/stanley-nnabugo-ba77b7260/) || [Twitter](https://twitter.com/bubuTheCoder)
Navigating Juniper: Your Ultimate Learning Destination
Published: 2023-09-18 06:38:47

Introduction: It is essential to keep up with the latest juniper learning portal knowledge and skills in today's fast-paced world. Having access to a dependable and comprehensive education platform is invaluable, whether you're a student aiming for exam success, a professional seeking career advancement through certifications, or a person who is passionate about continuous learning. Dumps Media, a dynamic and dedicated platform for professional juniper learning portal education, is here to help you achieve your educational goals.

Click Here For More Details>>>>>>>> [https://dumpsmedia.com/education/juniper-learning-portal-training/](https://dumpsmedia.com/education/juniper-learning-portal-training/)
i need help getting the doubleclick to work.i want it to make it so when u click it, it will increase your clickcount by 2.
Published: 2023-09-18 06:09:12

import tkinter
canvasWidth = 200
canvasHeight = 200
window = tkinter.Tk()
button1 = tkinter.Button(window, text='click the button', width=40)
button2 = tkinter.Button(window, text='buy double click', width=40)
button1.pack(padx=10, pady=10)
button2.pack(padx=10, pady=10)
clickCount = 0
doubleclickcount = 0


def onClick(event):
    global clickCount
    clickCount = clickCount + 1
    print(clickCount)
    if clickCount == 50:
        print('keep clicking')
    if clickCount == 100:
        print('keep going')

def doubleclick(event):
    global doubleclickcount
    doubleclickcount = doubleclickcount + 1
    print('u bot dobleclic')
    if doubleclick == 1:
        print(clickcount + 2)
    

button1.bind('<ButtonRelease-1>', onClick)
button2.bind('<ButtonRelease-1>', doubleclick)
window.mainloop()
Netgear Router setup
Tags: opensource, software, security, database
Published: 2023-09-18 06:02:51

[Netgear router setup](https://www.router-netgear.com/netgear-router-setup/) is the process of configuring and optimizing Netgear routers for wireless internet connectivity. This involves tasks such as connecting the router to a modem, customizing network settings, securing the network with passwords, and ensuring optimal performance for all connected devices.For more information, get in touch with our team.
JavaScript's Promise.race() for Efficient Asynchronous Operations
Tags: javascript, webdev, beginners, programming
Published: 2023-09-18 06:02:25

## Introduction
Asynchronous operations are a common occurrence in modern web development. Whether you're dealing with API calls, timeouts, or load balancing, it's often crucial to respond quickly to the first completed operation. JavaScript's `Promise.race()` method provides an elegant solution to this challenge. In this article, we'll explore what `Promise.race()` is, its syntax, and practical use cases with examples to help you grasp its power.

## Understanding `Promise.race()`
`Promise.race()` is a built-in JavaScript method designed to work with Promises. It takes an iterable, typically an array, containing multiple Promise objects and returns a new Promise. This new Promise resolves or rejects as soon as the first Promise within the iterable resolves or rejects. The value or reason for rejection of the first settled Promise becomes the settled value of the new Promise returned by `Promise.race()`.

### Syntax
```
Promise.race(iterable);
```

## Practical Use Cases
* Implementing Timeouts:
One common use case for `Promise.race()` is implementing timeouts for asynchronous operations. Consider a scenario where you need to make an API call, but you want to ensure it responds within a certain time frame. You can achieve this using `Promise.race()`:

```
const fetchWithTimeout = (url, timeout) => {
  const fetchPromise = fetch(url);
  const timeoutPromise = new Promise((_, reject) => {
    setTimeout(() => reject(new Error('Timeout')), timeout);
  });

  return Promise.race([fetchPromise, timeoutPromise]);
};

fetchWithTimeout('https://example.com/api/data', 5000)
  .then(response => console.log(response))
  .catch(error => console.error(error)); // Handles timeout or fetch errors.
```

In this example, the fetchWithTimeout function races the fetch operation with a timeout Promise. It resolves with the API response or rejects with a timeout error, allowing you to handle both scenarios.

* Handling Multiple API Requests:
When dealing with multiple API requests and you only care about the response from the fastest one, `Promise.race()` comes in handy:

```
const api1 = fetch('https://api1.example.com/data');
const api2 = fetch('https://api2.example.com/data');

Promise.race([api1, api2])
  .then(response => console.log(response)) // Resolves with the response of the first API to respond.
  .catch(error => console.error(error)); // Handles errors from both APIs.
```
In this case, the first resolved or rejected Promise among api1 and api2 will determine the fate of the race, allowing you to efficiently handle API responses.

## Conclusion
JavaScript's `Promise.race()` is a powerful tool for managing asynchronous operations. It allows you to respond promptly to the first completed Promise, making it essential for scenarios where time is of the essence.
How to: Deploy Angular Website to Github Pages
Tags: webdev, angular, githubpages, github
Published: 2023-09-18 06:00:50

With the following pages you can host an Angular website in github pages. I did this to host my personal website, which I created using Angular, in github pages:
* https://danielcaballero88.github.io/ 


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



**Step 1: Create GitHub Repository**
- If you haven't done this yet, create a GitHub repository for your Angular website project, it's a pre-requisite to deploy the website to github pages.
- Commit all your changes and push your project files to this repository.

**Step 2: Create gh-pages Branch**
- Create a `gh-pages` branch from your `master` or `main` branch.
  ```
  $ git branch gh-pages
  $ git checkout gh-pages
  ```

**Step 3: Build Your App**
- Build your Angular app in the `gh-pages` branch.
  ```
  $ ng build --configuration-production --base-href https://[username].github.io/[repo]/
  ```
  Note: Replace `[username]`, `[repo]`, and `[project-name]` with your GitHub username, repository name, and project name respectively. Make sure the project name matches what's in your `angular.json` file under `defaultProject`.
  Note 2: If this is your default github pages repo (`[username].github.io`) then you can skip `[repo]` in the `base-ref` above.

- Push the code and configure the repository to pick up the files from the build path (relative path to your local `/dist` directory in your repo, or whatever configuration you have in `angular.json`).

**Step 4: Visit the App Page**
- Visit your Angular app on GitHub Pages at the URL: `https://UserName.github.io/RepoName/`

Your application should now be live on GitHub Pages.
Calling all Auditors and Aspiring Auditors!
Tags: web3, security, auditor, developers
Published: 2023-09-18 05:37:24

Looking to level up your auditing skills or aspiring to become an auditor? Check out these must-read articles covering essential topics in the world of auditing and blockchain security. 📚

1️⃣ Common Vulnerabilities Part 1:
👉 Dive into the basics of common vulnerabilities that every auditor should know.
🔗 Read here: [Common Vulnerabilities Part 1](https://www.buildbear.io/resources/guides-and-tutorials/Common_Vulnerabilities_part_1)

2️⃣ Common Vulnerabilities Part 2:
🔍 Continue your journey into auditing with the second part of our guide on common vulnerabilities.
🔗 Read here: [Common Vulnerabilities Part 2](https://www.buildbear.io/resources/guides-and-tutorials/Common_Vulnerabilities_part_2)

3️⃣ Auditor Tools:
🛠️ Discover essential tools and resources to streamline your auditing process.
🔗 Read here: [Auditor Tools](https://www.buildbear.io/resources/guides-and-tutorials/Auditor_tools)

4️⃣ Web3 Attack Recreation:
🕵️‍♀️ Gain hands-on insights by recreating notable Web3 attacks and understanding the underlying issues.
🔗 Read here: [Web3 Attack Recreation](https://www.buildbear.io/resources/guides-and-tutorials/Recreating_Kubz_NFT_Hack_and_understanding_what_went_wrong)

5️⃣ Re-constructing the GDS Hack:
🧩 Learn the key aspects of coding safe protocols by dissecting the GDS Hack.
🔗 Read here: [Re-constructing the GDS Hack](https://www.buildbear.io/resources/guides-and-tutorials/Re-constructing_the_GDS_Hack_Things_that_you_should_actually_know_to_code_safe_protocols)

6️⃣ Euler Finances $196 Million Flash Loan Exploit:
🌐 Explore the world of flash loan exploits with a deep dive into the Euler Finances incident.

🔗 Read here: [Euler Finances Flash Loan Exploit](https://www.buildbear.io/resources/guides-and-tutorials/Euler_Finances_196_Million_Flash_Loan_Exploit)
data stream to an app
Tags: analytics, ga4, digitalworkplace, tutorial
Published: 2023-09-18 05:16:15

**In this lesson, we're going to learn how to set up a data stream for an app.**

 

- You can use Google Analytics to measure websites, apps, or both in the same property. 
- App data streams are powered by the Firebase software development kit.
-  If your app is already using Firebase, you can enable analytics from the Firebase console. 
- If your app does not use Firebase, Google Analytics can create a project for you. Go to admin, then click on data streams.
-  Now, add a new data stream for your app's platform, iOS or Android. If your app is on both platforms, you'll need to create a data stream for each platform.
-  For Android, you'll need your package name, and for iOS, you'll need your bundle ID. Enter the details about your app, and then click Next. 
- Google Analytics will begin to create your Firebase project and set up your app data stream. 
- Once complete, GA will provide you with additional details on how to configure Firebase for your apps platform.



- You or your app developer must implement the Firebase SDK in your app before you can measure user activity.
-  Once Firebase is configured for your app, a number of events are automatically collected for you, like first opens, in-app purchases and screen views. These are common across all apps. 
- You also have the option to collect any recommended and custom events that are relevant to your business.
-  You'll use the log event method in your app's code to define and collect up to 500 different event names with no limit on total volume.
-  While the method of data collection differs slightly between web and app, with Google Analytics, you're able to analyze all this data together in one property to understand how users navigate across different devices.
-  Interact with your web or app and perform actions that are important to you and your business, such as sign up, login and purchases.

With the Firebase SDK in place and your app data stream created, a number of events are collected automatically, like first opens, in-app purchases, and screen views. These are common across apps no matter what the app is.


**You also have the option to collect any recommended events that are relevant to your business. Use the logEvent method to define and collect up to 500 different event names, with no limit on total volume.**

that's for today tomorrow we will discuss further more on how to manage your data and account to accomplish your certain goals stay tuned.