teleren/devto huggingface dataset:
Invalid pb parameter solution while embedding google maps.
Published: 2023-07-25 06:54:06

Invalid pb parameter solution while embedding google maps
Original Issue: When trying to embed a Google Maps location for "Hotel Yak & Yeti" using an iframe, the "pb" parameter in the embedded URL caused an error. The special character "&" in the hotel name was likely the cause of the issue.
Solution: To resolve the problem, I removed the special characters from the hotel name, resulting in "Hotel Yak Yeti." Then, I edited the "pb" parameter in the URL accordingly. This adjustment ensures that the URL is properly encoded and validated.
Original Google Embedded URL:  

```
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d14128.750188412732!2d85.3197981!3d27.7114951!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39eb19042204f6a1%3A0xa7af95e7f7d75e66!2sHotel%20Yak%20%26%20Yeti!5e0!3m2!1sen!2snp!4v1690259560583!5m2!1sen!2snp" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
```
```
Updated Embed URL:
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3532.187395792953!2d85.31518467397605!3d27.711499772684373!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39eb19042204f6a1%3A0xa7af95e7f7d75e66!2sHotel%20Yak%20Yeti!5e0!3m2!1sen!2snp!4v1689753786090!5m2!1sen!2snp" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
```    


When saving this updated URL to the database, I used "Hotel%20Yak%20Yeti" to ensure proper URL encoding for the hotel name. This way, the embedded Google Maps location for "Hotel Yak Yeti" works seamlessly on my website.
Enter the CEX·IO Giveaway to Win 4,000 USDT in BTC, ETH, and DOGE!
Tags: giveaways, freebies, cryptocurrency, bitcoin
Published: 2023-07-25 07:22:05

CEX·IO is rolling out the red carpet for an incredible celebration in honor of U.S. Independence Day, and guess what? You have a shot at winning a grand total of 4,000 USDT in the ever-popular cryptocurrencies BTC, ETH, and DOGE! It's time to buckle up and get ready for an exciting adventure!

To be a part of this thrilling event, all you need to do is head over to the **_[CEX·IO 4,000 USDT Giveaway page](https://t.ly/G13U8)_** and make sure you're verified on the platform. Once you're all set, feel free to submit multiple entries to boost your chances of coming out on top. Who knows, you could be one of the lucky ones!

Oh, and let's talk about those amazing prizes! We've got a stunning lineup just for you:

First prize goes to one fortunate winner, who will walk away with an astounding $1,000 worth of crypto. And it gets even better – you can choose between BTC, ETH, or DOGE, all in equal portions. Now that's what we call a prize worth celebrating!

But wait, there's more! Five winners will be dancing their way to the bank with $200 worth of crypto each, with the freedom to pick from BTC, ETH, or DOGE. Ten more winners will grab $100 worth of crypto, having a blast with BTC and ETH in their digital wallets. And to top it off, twenty lucky participants will seize $50 worth of BTC, making their independence day extra special!

Before you jump in, take a moment to check if your country is on the restricted list. We wouldn't want anything to dampen your excitement!

Remember, the more entries you submit, the higher your chances of grabbing one of these fantastic prizes. So, why wait? Don't miss out on this incredible opportunity to celebrate with CEX·IO and win big! Join the party and let the festivities begin!
Amazon EventBridge - How to manage Bus to Bus recursive message passing
Tags: aws, serverless, eventdriven, eventbus
Published: 2023-07-25 07:16:26

It is possible for an EventBridge bus to have a rule that sends messages to another EventBridge bus. But, what happens if the second EB bus has a rule that sends any message it receives back to the first EB bus? As expected, there will be a recursive data transfer between two EB buses.

In this article, let’s discuss how to address such recursive messages passing between two EB buses.

First, let's look at the architecture.

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

You can find the CDK project that includes the source code to set up this system in your AWS environment using AWS CDK and Python here: https://github.com/pubudusj/eb-to-eb

## How it works

Once the project is set up, this will create 2 EB buses. Each bus will have two rules.

One rule has the other EB bus as the target. The other rule will have a CloudWatch group as a target which will log each message received into the bus. Also each bus will have a Dead Letter Queue setup to preserve any messages that cannot be processed.

To test, you can send any message into EB bus A.

The expected behaviour is that the message is being sent between the EB buses as a loop, so that there will be a record in CloudWatch Log group for each receipt.

The actual behaviour is that, the message is sent from bus A to bus B. CloudWatch groups A has the message logged. Also, CloudWatch group B has logged the message which means the message was received to bus B.

However, those are the only available CloudWatch log records, which means the message was not sent back to bus A.

Instead, if you check the bus B’s dead letter queue, you can see the message is available there. Also, if you check the message attributes, you can see the error code as “_THIRD_ACCOUNT_HOP_DETECTED_”. And the error message says — “_Event ingestion rejected for event [event id] because an event can be sent to an event bus target only once. This event was previously delivered to an event bus target._”

![Attributes of Failed Message in SQS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rnl4rjfrf505rzoj08br.png)

Which means, at bus B, it failed to process the message when try to send it back to bus A.

## Explanation

Well, this is the default behaviour of Amazon EventBridge Event Buses. EventBridge Bus has a mechanism to not send the same message to another event bus target more than once. In such a scenario, it will simply reject the message, and in this case, since we have DLQ set up, the message was sent there.

Because of this feature of Amazon EventBridge, recursion loop is prevented. So, you don’t need to take any additional steps to prevent the recursion here.
Retry loading an iframe until reachable in React
Tags: react, javascript, webdev, html
Published: 2023-07-25 07:13:44

Hello everyone, 

I am trying to implement an Iframe custom component which is loading a web page inside. Sometimes, the web page is not available and I want to implement a retry mechanism which continues until the page is available.

Here's the small piece of code I Implemented so far, without success.

App.js

```jsx
import "./App.css";
import { CustomIFrame } from "./components/CustomIFrame.js";

function App() {
  return <CustomIFrame url="http://localhost/" />;
}

export default App;
```

CustomIFrame.js
```jsx
import React, { useRef, useState } from "react";

export const CustomIFrame = (props) => {
  const [isMounted, setIsMounted] = useState(false);
  const [iframeRef, setIframeRef] = useState();

  const handleIframeLoad = () => {
    console.log(iframeRef);
    // const anchors = iframeRef.contentWindow?.document.body.getElementsByTagName("a");
    // if(iframeRef.querySelector("...")){
      //     console.log('iFrame Loaded!');
      setIsMounted(true);
      // }
      // setTimeout(handleIframeLoad, 1000);
      console.log("iframe loaded!");
  };

//   console.log(iframeRef.current.children[0]);

  return (
    <div>
      <iframe
        title="my iframe"
        height="800"
        width="600"
        src={props.url}
        ref={setIframeRef}
        onLoad={handleIframeLoad}
      />
      {isMounted ? <div>The iframe content is mounted.</div> : ""}
    </div>
  );
};
```

Of course there is no retry mechanism yet in this code since I am not sure where to implement it. I was trying to add some retry logic inside the `handleIframeLoad()` where I would like to check if one of the component inside the iframe is rendered or not, and in case of failure, do a retry.

Could you please give some advice?
How to Have Multiple Branches Checked Out at the Same Time?
Tags: git, programming, beginners
Published: 2023-07-25 07:12:43

**Find out how to use Git worktree to have multiple branches checked out at a time.**

## What is a Git worktree?
﻿
A `git` `worktree` is a linked copy of your Git repository, allowing you to have multiple branches checked out at a time. A `worktree` has a separate path from your main working copy, but it can be in a different state and on a different branch.
﻿
`Git worktree `is an alternative to `git stash`. Both of these mechanisms help you to manage multiple streams of work at once. The basic approach is to git-stash your changes and check out the other branch.
﻿
## Why you should use worktree to simultaneously check your branches?
﻿
The specifics of `worktree` approach is that it operates within a single `worktree`. Stashing the changes, and checking out the branch can cause performance mayhem within your IDE, which needs to reindex the files and that can take time in bigger projects.
﻿
It is a great way to switch to a different branch for a brief moment but is unsuitable in more complex situations.
﻿
As opposed to `git stash`, `git` `worktree` parallelizes your work by creating dedicated work trees and placing them in separate folders. 
﻿
Each tree/folder is separately managed by a dedicated IDE window.
﻿
I hope you enjoyed this bright dev tip!

---
By Piotr Mionskowski, Partner, Team Leader, Technology Evangelist @ [Bright Inventions](https://brightinventions.pl)
Everything You Must Know About TS EAMCET 2024
Tags: emacet, jee, emacetfees
Published: 2023-07-25 07:11:41

TS EAMCET 2024 is a state-level entrance exam conducted by the Telangana State Council of Higher Education (TSCHE) for admission to various undergraduate courses in engineering, agriculture and medical fields. The exam is expected to be held in May 2024 in online mode across various test centers in Telangana and Andhra Pradesh. Read to find out everything you must know about [**TS EAMCET 2024**](https://testprepkart.com/jee/blog-single.php?id=2535/ts-eamcet-examination-2024)
What is intelligent test automation
Published: 2023-07-25 07:09:47

Intelligent test automation, as the name suggests, refers to the use of advanced technologies to automate the testing of software applications. Unlike traditional testing methods that rely on manual efforts, intelligent test automation leverages AI and ML algorithms to mimic human-like interactions with the software under test. This not only saves time but also improves the accuracy and reliability of the testing process.

Tenjin Online is a leading provider of intelligent test automation solutions that cater to the diverse needs of software development teams. Their platform offers a wide range of features and functionalities that enable organizations to achieve faster time-to-market, higher product quality, and reduced testing costs. With Tenjin Online, businesses can automate repetitive testing tasks, perform complex test scenarios, and generate comprehensive test reports effortlessly.

One of the key advantages of intelligent test automation is its ability to adapt and learn from previous test runs. By analyzing test results and identifying patterns, AI-powered algorithms can optimize test cases, prioritize critical areas, and suggest improvements in the software's functionality. This iterative process not only enhances the overall testing efficiency but also helps in identifying potential bugs and vulnerabilities before they impact end-users.

Furthermore, intelligent test automation offers unparalleled scalability, allowing organizations to test their software across multiple platforms, devices, and environments. With Tenjin Online, developers can seamlessly test their applications on different operating systems, browsers, and mobile devices, ensuring a consistent user experience across the board. This broad coverage significantly reduces the risk of compatibility issues and ensures the software's reliability in real-world scenarios.

Integrating intelligent test automation into the software development lifecycle can yield numerous benefits. It accelerates time-to-market by reducing the time spent on manual testing, thus allowing developers to focus on innovation and feature enhancements. Moreover, it enhances the overall product quality by eliminating human errors and ensuring comprehensive test coverage. This, in turn, boosts customer satisfaction and loyalty, leading to increased revenue and market share.

In conclusion, intelligent test automation, powered by platforms like Tenjin Online, is revolutionizing the way software testing is conducted. By harnessing the power of AI and ML, organizations can achieve faster, more accurate, and cost-effective testing processes. With its ability to adapt, learn, and scale, intelligent [test automation](https://tenjinonline.com/) is becoming an indispensable tool for software development teams worldwide. Embracing this technology will undoubtedly pave the way for a future where software applications are thoroughly tested, reliable, and user-friendly.
My Journey in Open Source - set-timeout-by-id
Tags: javascript, typescript, github, opensource
Published: 2023-07-25 07:00:00

## What is this?

This is a timeout implementation that allows you to set a timeout and then clear it using keys instead of the timeout variable reference.  
This is useful when you have to clear a timeout from a different scope than the one where it was set.

### How To Install?

```bash
npm install set-timeout-by-id
```

### How To Use?

```javascript
import { setTimeoutById, clearTimeoutById } from 'set-timeout-by-id';

const timeoutId = setTimeoutById(() => {
  console.log('Hello World!');
}, 1000, 'myTimeout'); // This will set a timeout with the id 'myTimeout'

// Meanwhile, in another file...
clearTimeoutById('myTimeout'); // This will clear the timeout
```

### How does it work under the hood?

This library uses a Map to store the timeout references, leveraging the `singleton` pattern.  
When you set a timeout, it will be stored in the Map with the given id as key.  
When you clear a timeout, it will be removed from the Map and cleared using the reference stored in the Map.

## How to run tests?

```bash
npm test
```

## Contributing

If you want to contribute to this project, please open an issue or a pull request.  
I will be happy to review it and merge it if it's useful.  
Please, remember to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.
Eyeing a Cybersecurity Career? Which Skills and Certifications Unlock the Best Opportunities?
Tags: discuss
Published: 2023-07-25 07:00:00

Cybersecurity is a fast-paced and ever-evolving field, and having the right skills and certifications can open up exciting opportunities. So, let's dive in and explore: What are the essential skills you should acquire, and which certifications can give your cybersecurity aspirations a serious boost? Let's discuss what's needed to navigate this exciting field!

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 *%}*
Join us for an exhilarating Python Singula Meetup Online! 🌐🎉
Tags: python, webdev, machinelearning, django
Published: 2023-07-25 06:46:52

This online event is designed to bring together Python enthusiasts, developers, and learners from around the world. Prepare yourself for an evening of knowledge sharing, insightful presentations, and networking opportunities, all from the comfort of your own space.

📺 This meetup will be broadcasted via YouTube! 🎥🌐 You can tune in to the live stream by clicking on the following link: [YouTube Broadcast Link](https://www.youtube.com/watch?v=WHIUrYhjHnw&ab_channel=Singulateam). Get ready to immerse yourself in the Python community as we delve into the exciting world of Python programming.

📅 Secure your spot today by registering for the Python Singula Meetup Online. Stay tuned for further updates on our website and social media channels, where we will share the registration details and provide additional information about the event.

🔗 **[Claim your spot](https://www.eventbrite.com/e/singula-python-meetup-online-tickets-680030749277?aff=DevToPost1)**
Interactive Application Security Testing (IAST) combines the virtues of DAST
Tags: iast, dast
Published: 2023-07-25 06:37:21

By using instrumentation technique, Interactive Application Security Testing (IAST) combines the virtues of DAST – low false positive rate – and SAST – code level visibility, representing one of the most promising and fast-growing technologies in application security space, according to Gartner.

Home page:
https://www.zeroday.co.uk/#/
Login site:
https://aiast.zeroday.co.uk/#/login
Demo site:
https://zeroday.co.uk/#/demo
Deepclone polyfill javascript
Tags: javascript, programming, beginners, interview
Published: 2023-07-25 06:35:51

## Write polyfill for deepclone

```
const obj = { a: 1, b: [2, 3, { c: 4}]};
const clonedObj = deepClone(obj);
// clonedObj is a deep clone of obj
```

```
function deepClone(obj) {
  if (typeof obj !== "object" || obj === null) {
    return obj;
  }

  let result;
  if (obj instanceof Date) {
    return new Date(obj);
  }
  if (Array.isArray(obj)) {
    result = [];
    for (let i = 0; i < obj.length; i++) {
      result.push(deepClone(obj[i]));
    }
  } else {
    result = {};
    for (const i in obj) {
      result[i] = deepClone(obj[i]);
    }
  }

  return result;
}

```

**Explanation**

- This function recursively clones objects and arrays. It works as follows:
- It checks if the input is a primitive value or null, and if so just returns the value.
- For arrays:
- It creates an empty array.
- It loops through the input array and calls deepClone() on each element, adding the result to the new array.
- For objects:
- It creates an empty object.
- It loops through the object's properties and calls deepClone() on each property value, assigning the result to the new object.
- It returns the cloned result.
🦆 Effortless Data Quality w/duckdb on GitHub ♾️
Tags: duckdb, githubactions, data, automation
Published: 2023-07-25 06:33:44

## 🪝 Teaser (for the impatients)

Do you have a repository that relies on `csv` files... and want to operate:

- 🛡️ **Protect your data** with quality intergrity checks before to _corrupt your data_
- 🔬 **Check data quality** as part of your project lifecycle
- 📊 Get operational **KPIs reporting**
- ♾️ **Automate release process to explain** your contributors what has been achieved
- 📦 **Deliver** data
- 🤯 **Endless** usages

🫵 Don't look further, this sort post will cover all these aspects with a practical and highly understandable workflow.

## 🍿 Demo

Enough talks, let's jump'in:

{% youtube 90RhOdxWNqo %}

## 🦆💻🔁🔧♾️🦆 `opt-nc/setup-duckdb-action`

{% github opt-nc/setup-duckdb-action %}

## 🔭 Further 🎀

Once **CI (Continuous Integration) has been done**... you can also think (without a lot of efforts) **to Deliver that data to third party services, as part of your DEVOPS pipeline.**

A this point I see two easy options:

- Upload to _minio_ [`S3 API` w/ `HTTPS`](https://duckdb.org/docs/extensions/httpfs.html)
- Use [MotherDuck](https://motherduck.com/)

... which make your data available for new usecases, at no additional effort:

{% youtube NQgHrszyQWY %}
SQL for low code applications: SQLPage
Tags: yugabytedb, postgres, lowcode, sql
Published: 2023-07-25 06:13:58

I love SQL to process data. You can do a lot, especially with PostgreSQL features and extensions. To build a presentation layer on top of it, here is an interesting Web Server where you declare the UI component with SQL queries. 

Here is an example of code for a page. I've put the following in an `index.sql` in my `www` current directory:
```sql
-- 'hero' component displays a large title and description

select 'hero' AS component,
 'SQLPage on Distributed SQL'                           as title,
 'this is all built in SQL 🤓'                          as description_md,
 'https://docs.yugabyte.com/images/yugabytedb-logo.svg' as image,
 'https://github.com/lovasoa/SQLpage'                   as link,
 'SQLpage github project'                               as link_text
;

-- 'text' displays a paragraph that can be built from SQL data

select 'text' as component,
 format(
  'You are connected to YugabyteDB version %s, here are the database nodes:'
  , current_setting('server_version')
 ) as contents
;

-- 'table' displays a grid from the following  querie(s)

select 'table' as component, 1 as sort, 1 as search;
select * from yb_servers();

```
I started `sqlpage` (downloaded from https://github.com/lovasoa/SQLpage/releases or run from the Docker image) with the `DATABASE_URL` environement variable set to my PostgreSQL-compatible database (`postgres://user:password@yb-node1:5433/yugabyte`)
```
0a7ba07905f27af3f3efbca96b6865a73c40114d35ab3e9b7db243045ff8b907
[2023-07-24T21:18:30Z INFO  sqlpage::webserver::database] Connecting to database: postgres://user:password@yb-node1:5433/yugabyte`
```
The default port is 8080 and here is my `http://localhost:8080`:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhtr356f1xoomdnegwcj.png)

Here I have displayed static text, and queried the version from `current_setting('server_version')`. The table reads `yb_servers()` which shows all nodes of the YugabyteDB cluster I'm connected to. YugabyteDB is an Open Source Distributed SQL using PostgreSQL as the query layer on top of distributed storage and transactions to provide cloud-native elasticity and high availability. You can use it as distributed Postgres: same features but no downtime for failures, upgrades or scaling.

You can build a full application with SQLPage, with user entry in 'form' component that sets variable which can be used with all the power of PostgreSQL: SQL DML or PL/pgSQL. All components are [documented](https://sql.ophir.dev/documentation.sql?component=form#component) - the documentation is built with SQLPage of course. You can also return a CSV to download, or JSON, that you build with SQL.
Creating a Storage Link on Shared Hosting
Published: 2023-07-25 06:07:40


ln -s /home/u111xxxx/companyprofile/storage/app/public /home/u111xxxx/public_html/storage


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

thx to 
https://codelapan.com/post/easy-ways-to-upload-or-deploy-laravel-project-to-shared-hosting