teleren/devto huggingface dataset:
With the right tools, you can build anything
Published: 2023-10-13 15:32:50

16 years in the making, the story of my thesis, turned into action and the platforms built. This is the backstory to HAX; where it started, when, and what I hope it will accomplish with my time here.

{% embed https://www.youtube.com/watch?v=G5yEgFIxzl0&t=1s %}

# HAX
The authoring experience of HAX and the ability to make fast, static file backed websites rapidly.

HAX seeks to be the smallest possible back-end CMS to make HAX work and be able to build websites with it. Leveraging JSON Outline Schema, HAX is able to author multiple pages, which it then writes onto the file system. This way a slim server layer is just for basic authentication, knowing how to save files, and placing them in version control.

Watch and Read more about HAX here:
- Youtube channel - https://www.youtube.com/@haxtheweb
- HAXCellence https://oer.hax.psu.edu/bto108/sites/haxcellence/what-is-hax

# Issues / Support / Community
- Discord Channel - https://bit.ly/hax-discord
- Unified issue queue - https://github.com/elmsln/issues/issues
- Using Merlin directly in any HAX spaces and type "Issue" to jump start a report!
EntityManager is closed : Recovering from Doctrine exceptions
Tags: doctrine, symfony, php, orm
Published: 2023-10-13 15:31:25

**TD;LR** you can't use the doctrine entity manager after a rollback happened. To do that, use doctrine `managerRegistry` to reset the `entityManager`

Handling errors is an important part of engineering.
Working with Doctrine ORM usually make our life way simpler but when it comes to doing things after a database error, things tends to complicate.

Let's say we want to save something but keep a trace if we encounter and error :
```php
<?php

$something = new Something();

try {
    $this->entityManager->persist($something);
    $this->entityManager->flush();
} catch (\Throwable $exception) {
    $something->isErroneous();
    $something->setErrorMessage($exception->getMessage());

    $this->entityManager->flush();
}
```
If we encounter a SQL error raised by our database, the following exception will appear :
```
In EntityManagerClosed.php line 11:

  The EntityManager is closed.
```

You might think "_Why the F is my entity manager closed ?_". 
Well, doctrine automatically closes it on error :
```php
// Doctrine\ORM\UnitOfWork.php:
} catch (Throwable $e) {
    $this->em->close();

    if ($conn->isTransactionActive()) {
        $conn->rollBack();
    }

    $this->afterTransactionRolledBack();

    throw $e;
}
```

In order to properly do that, we will leverage the `Doctrine\Persistence\ManagerRegistry` with the transactional system :

```php
<?php

$something = new Something();

$this->entityManager->beginTransaction();

try {
    $this->entityManager->persist($something);
    $this->entityManager->flush();
    $this->entityManager->commit();
} catch (\Throwable $exception) {
    $this->entityManager->rollback();
    $this->managerRegistry->resetManager();

    $something->isErroneous();
    $something->setErrorMessage($exception->getMessage());

    $this->entityManager->flush();
    $this->entityManager->commit();
}

```

Problem solved ¯\_(ツ)_/¯
JavaScript - Understanding Closures and Lexical Scoping
Tags: javascript, programming, tutorial
Published: 2023-10-13 15:30:00

Closures and lexical scoping are advanced JavaScript concepts that provide powerful capabilities for managing state, encapsulating behavior, and creating elegant code structures. They are fundamental to understanding JavaScript deeply. Let's explore them:

- **Closures:**

   A closure is a function that has access to variables from its outer (enclosing) function even after the outer function has finished executing. Closures are created when inner functions are returned from outer functions or when they are passed as arguments.

   ```javascript
   function outer() {
     const message = 'Hello, ';

     function inner(name) {
       console.log(message + name);
     }

     return inner;
   }

   const greet = outer();
   greet('Alice'); // Outputs: 'Hello, Alice'
   ```

   In this example, `inner` still has access to the `message` variable even though `outer` has already been executed. Closures are useful for maintaining private data and creating functions with persistent state.

- **Lexical Scoping:**

   Lexical scoping, also known as static scoping, determines the scope of a variable based on its location within the source code, regardless of how or where the function is called. JavaScript uses lexical scoping, which means that a function can access variables from the outer function where it was defined.

   Lexical scoping helps maintain predictable variable access and is a key concept in JavaScript's scoping rules.

- **Use Cases:**

   Closures and lexical scoping are valuable for scenarios like creating private variables, implementing the module pattern, and managing encapsulation. They are often used when designing libraries or frameworks.

   ```javascript
   function createCounter() {
     let count = 0;

     return {
       increment: function () {
         count++;
       },
       decrement: function () {
         count--;
       },
       getCount: function () {
         return count;
       },
     };
   }

   const counter = createCounter();
   counter.increment();
   console.log(counter.getCount()); // 1
   ```

   In this example, `count` is encapsulated within the closure, and the returned object provides controlled access to it.

Understanding closures and lexical scoping is crucial for advanced JavaScript development. These concepts enable you to write more elegant and maintainable code by effectively managing scope, encapsulating data, and creating reusable functions with persistent state.
WTransport - WebTransport library in Rust 🦀
Tags: rust, webdev, opensource, github
Published: 2023-10-13 15:12:47

WebTransport is a modern update to Websockets, transmitting data between client and server using http3.

WTransport is an implementation http3 WebTransport written in Rust.

{% embed https://github.com/BiagioFesta/wtransport %}

Benefits of WebTransport:

- **🚀 Low latency:** WebTransport is designed to minimize latency, making it suitable for real-time applications such as gaming, video streaming, and collaborative editing.
- **🔄 Bidirectional communication:** WebTransport allows simultaneous data exchange between the client and server, enabling efficient back-and-forth communication without the need for multiple requests.
- **🔀 Multiplexing:** With WebTransport, multiple streams can be multiplexed over a single connection, reducing overhead and improving performance.
- **🔒 Security:** WebTransport benefits from the security features provided by the web platform, including transport encryption and same-origin policy.

## WTransport's simple API
WTransport comes with both _server_ and _client_ implementaton. Here is how it looks:
### Server

```rs
#[tokio::main]
async fn main() -> Result<()> {
    let config = ServerConfig::builder()
        .with_bind_default(4433)
        .with_certificate(certificate)
        .build();

    let connection = Endpoint::server(config)?
        .accept()
        .await     // Awaits connection
        .await?    // Awaits session request
        .accept()  // Accepts request
        .await?;   // Awaits ready session

    let stream = connection.accept_bi().await?;
    // ...
}
```
### Client
```rs
#[tokio::main]
async fn main() -> Result<()> {
    let config = ClientConfig::default();

    let connection = Endpoint::client(config)?
        .connect("https://[::1]:4433")
        .await?;

    let stream = connection.open_bi().await?.await?;
    // ...
}
```
## Get Started
The repo has a full example, where you launch a server and a chrome instance to communicate with each other over h3 WebTransport protocol. Here you can find it:
https://github.com/BiagioFesta/wtransport/blob/master/wtransport/examples/full.rs
Community Contributor Spotlight: @ktmouk
Tags: opensource, meta
Published: 2023-10-13 15:12:20

DEV is built on [Forem](https://github.com/forem/forem), our open-source community platform, that’s available for anyone to use to help create their own community. As an open-source project, we rely on and greatly appreciate all of our volunteer contributors who take the time to fix bugs, implement features, and improve the platform for everyone.

This week, we’d like to thank community member @ktmouk especially, who has recently helped fix bugs with code block rendering, fixed a flaky cypress test, and improved the embed options for Stackblitz, along with other changes and fixes.

Without contributors like @ktmouk, we wouldn’t be able to address issues with the site so quickly, so thank you, @ktmouk again from all of the DEV team!

Thinking about helping out and contributing to an issue? You can find all of the details (including our issues open to contribution) over on our [dev.to/contribute](https://dev.to/contribute)!
I have successfully completed 4 pull requests for this edition of Hacktoberfest
Tags: hacktoberfest23
Published: 2023-10-13 15:09:49

• https://github.com/Devesh1509/JavaScript-Slider/pull/3
• https://github.com/Devesh1509/JavaScript-Slider/pull/6
• https://github.com/SlicePoh/Unique-Codes-in-Javascript/pull/4
• https://github.com/NSCC-BPIT/NSCC-BPIT-Website/pull/238
Allbetter: Your Premier Maid Service in Houston
Published: 2023-10-13 15:04:23

Elevate your home's cleanliness and your quality of life with Allbetter, Houston's [premier maid service](https://allbetterapp.com/cleaning/houston/). Our expert team meticulously cleans, tidies, and revitalizes your space, leaving it immaculate and inviting. Experience the Allbetter difference – your key to a spotless, stress-free home in the heart of Houston. Read the blog: https://allbetterapp.blogspot.com/2023/10/10-tips-to-organize-your-bedroom.html


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mudlxy9ytqp89zy2n7hb.png)
Tool: Preview Markdown Document on Your Terminal
Tags: tooling, vim, productivity, markdown
Published: 2023-10-13 14:53:16

If you've recently been initiated into the Vim users cult and, like me,  you also don't like leaving your terminal that much anymore, you're probably being forced to do so whenever you want to do stuff like previewing your markdown documents. Sweat no more; `glow` got you covered.

## Installation

On Mac, `brew install glow`.

## Usage

Usage: `glow MyWonderfulDoc.md`

## Alternative: markdown + lynx

**Markdown**: This is a command line tool for converting your MD files to HTML
**Lynx**: A terminal-based web browser for rendering HTML pages.

### Installation
```bash
brew install lynx markdown
```

### Usage
Convert your MD file to HTML with markdown and pipe the output to Lynx

```bash
markdown MyWonderfulDoc.md | lynx -stdin
```
WxStreamSets - Integrate with StreamSets using webMethods
Tags: integration, webmethods, dataintegration, integrationandapis
Published: 2023-10-18 07:42:04

---
title: WxStreamSets - Integrate with StreamSets using webMethods
published: true
date: 2023-10-13 14:43:07 UTC
tags: integration, webMethods, dataintegration, integrationandapis
canonical_url: https://tech.forums.softwareag.com/t/wxstreamsets-integrate-with-streamsets-using-webmethods/284669
---

 

Typically, unlike application integration workflows, data integration pipelines have been configured to run on defined schedules (daily, weekly, monthly, etc.), and perform batch processing.  
However, in today’s dynamic and fast-evolving operating environment, data integration pipelines are expected to run in real-time. That is why techniques like CDC (Change Data Capture), webhooks, APIs, etc. are supported by data integration platforms like StreamSets.

WxStreamSets is a webMethods integration package that leverages StreamSets REST API and enables you to integrate with StreamSets pipeline jobs

![ss](https://global.discourse-cdn.com/techcommunity/original/3X/8/3/83ef67fe6effe2cd3a71e27a11c79de6bd8c5e3f.png)

WxStreamSets is a webMethods integration package that leverages StreamSets REST APIs and enables you to trigger data integration pipelines in real-time.

With WxStreamSets, you can

- Start a StreamSets job
- Check the status of a StreamSets job
- Stop a StreamSets job

## Useful links

For more information related to WxStreamSets and to download the package, visit:
{% embed https://github.com/SoftwareAG/WxStreamSets %}

[Read full topic](https://tech.forums.softwareag.com/t/wxstreamsets-integrate-with-streamsets-using-webmethods/284669)
畢業 論文 代 寫
Published: 2023-10-13 14:39:06

對高等教育的追求往往以完成畢業論文這項具有挑戰性的任務而告終。 這項學術努力需要大量的研究、批判性思考和寫作技巧，這對學生來說是一個重要的里程碑。 然而，隨著畢業論文的壓力和期望不斷增加，許多學生尋求畢業論文寫作服務的幫助。 本文旨在探索畢業論文寫作服務的世界，闡明它們的優點和缺點。

畢業論文寫作服務的作用

畢業論文寫作服務是為學生研究、發展和完成畢業論文提供一系列幫助的專業實體。 這些服務可以在論文過程的各個階段提供幫助，從主題選擇和提案撰寫到進行研究和起草最終文件。

畢業論文寫作服務的優勢

專家指導：利用畢業論文寫作服務的主要好處之一是他們提供的專家指導和支援。 經驗豐富的學術作家和研究人員可以提供寶貴的見解，幫助學生完善他們的研究問題，確定相關來源，並保持論文的邏輯流程。
**_[畢業 論文 代 寫](https://eliteduhk.com/)_**
時間效率：撰寫畢業論文是一項耗時的工作，許多學生發現平衡學術工作與其他責任具有挑戰性。 畢業論文寫作服務可以顯著加快寫作過程，讓學生在截止日期前完成任務，而不會感到不知所措。

品質保證：專業論文作者深諳各機構的學術標準與要求。 他們可以確保論文在結構、格式、引用和整體品質方面符合這些標準。

提升寫作技巧：與論文寫作服務合作可以作為教育體驗。 學生可以向專業人士學習專業知識，提升自己未來專案的研究和寫作技能。

減輕壓力：寫畢業論文所帶來的壓力可能是巨大的。 論文寫作服務可以透過在整個過程中提供支持和幫助來減輕這種壓力。

畢業論文寫作服務的缺點

道德問題：與使用論文寫作服務相關的最重要的道德問題是學術不誠實的可能性。 提交他人以自己名義撰寫的論文可能會破壞學術誠信原則。

學習不足：嚴重依賴寫作服務可能會導致學生錯過學習對其學術和職業成長至關重要的重要研究和寫作技能的機會。

成本：專業論文寫作服務通常不是免費提供的。 他們的費用可能相對較高，這可能會給一些學生帶來經濟負擔。

研究的真實性：在某些情況下，論文寫作服務可能會走捷徑或產生低品質的研究，可能導致論文不符合學術標準。

有限的個人化：雖然寫作服務可以提供指導，但最終的產品可能缺乏學生的個人風格和獨特的聲音，因為它通常是由其他人撰寫的。

引導決策

決定是否使用畢業論文寫作服務是個人選擇，應謹慎做出。 以下是一些注意事項：

道德誠信：考慮您所在機構使用此類服務的政策及其道德影響。 優先考慮學術誠信並尋求符合您所在機構指導方針的協助。

個人需求：評估您的個人狀況，包括時間限制、研究能力和寫作技巧。 確定使用寫作服務是否是適合您獨特情況的最佳選擇。

品質保證：徹底研究潛在的論文寫作服務。 閱讀評論，檢查保證，並確保您選擇的服務具有提供高品質工作的歷史。

合作：如果您決定使用寫作服務，請與相關專業人士密切合作。 保持開放的溝通，以確保論文反映您的想法和研究。

學習機會：只要有可能，利用論文寫作服務的幫助作為學習機會。 積極參與研究和寫作過程，這樣您可以獲得寶貴的見解和技能。

結論

畢業論文寫作服務對於尋求完成論文幫助的學生來說是寶貴的資源。 然而，使用此類服務的決定應仔細考慮道德問題、個人需求以及對學習的潛在影響。
Navigating the Healing Journey: The Art of Patient Experience Life Support
Published: 2023-10-13 14:36:48

"[Patient Experience Life Support](https://www.patientexperiencelifesupport.com/)" refers to a comprehensive approach aimed at improving the quality of care and overall experience for patients within the healthcare system. It involves **[patient-centered care, effective communication, emotional support, accessibility, empowerment](https://www.patientexperiencelifesupport.com/courses/Patient-Experience-Life-Support)**, continuous improvement, cultural sensitivity, patient advocacy, safety, and quality control. The ultimate goal is to ensure that patients receive compassionate, personalized, and high-quality healthcare services that meet their unique needs and expectations.
Notes on React Typescript
Tags: react, typescript
Published: 2023-10-13 14:31:16

Creating a simple component in a new file, **Component.tsx** being called from **App.tsx** with props passed to it:

###App.tsx

```javascript
//standard imports
import {Component} from "./Component"

// Some state example. Array of objects - most common.
const ArrayofObj = [
  {
    id: 1
    name: "Lovelace",
    age: 32,
    cool: true
}]

export function default App(){
return (
  <>
    <Component mystuff={ArrayofObj}/>
  </>
)}
```
##Component.tsx

```javascript
// Define type of props I get here.
// Any name that makes sense. Notice the [] at the end.
type propTypes = {
  ArrayofObj: { id: number; name: string; age: number; cool: bool }[];
// Specify it's an array using [] at the end!
};

// Accept prop with propTypes we defined above
export default function Component({ mystuff }: propTypes) {
// Create the lil pieces to put together later
  const mystuff_li = mystuff.map((item) => (
    <li key={item.id}/>{item.name} is {item.age} years old.</li>
  ));

// Return the stuffs
  return <ul>{friends_li}</ul>;
}
```

Some other common ones...
Callbacks with mouse events can be found by hovering over your own function.

For example, a button with `onClick={handleCancel}` received from parent, the prop type in this case will be:
`handleCancel: React.MouseEventHandler<HTMLButtonElement>;`


[Good resource for TypeScript cheatsheets.](https://github.com/typescript-cheatsheets/react)
Day 6: Learnt Box Model by Building a Rothko Painting
Tags: webdev, javascript, beginners
Published: 2023-10-13 14:28:25

Another Day to share my achievement.

Learning was never designed to be easy, but if you accept the process, the result is rewarding. Today, I learnt another important aspect of CSS i.e. box model, The CSS box model is a container that contains multiple properties including borders, margin, padding, and the content itself. It is used to create the design and layout of web pages.

It wasn't a difficult one, but I'm happy I was able to make out time to complete this task.

below is my app and git hub link: 

Github: https://github.com/Duke411/RothKo-painting
netlify: https://roktho1.netlify.app/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyhi88p9yvfrf7ls4psq.png)
image width for google discover
Tags: help
Published: 2023-10-13 14:21:20

Dear all,

 I got one question about the image size on my website. In order to get the post featured on Google discover, we have to put the image size 1200px.

> Include compelling, high-quality images in your content, especially large images that are more likely to generate visits from Discover. Large images need to be at least 1200 px wide and enabled by the max-image-preview:large setting, or by using AMP. Avoid using a site logo as your image.


Here is the html code for my website. The image width is 1024. But because of the layout of my website, The width has to meet this rule sizes="(max-width: 760px) calc(100vw - 40px), 720px"

so my question is that from Google discover perspective, is the image width 1024 or 760px?
```
<img decoding="async" fetchpriority="high" class="aligncenter wp-image-12324 size-full lazyload" src="https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux.webp" alt="Understanding Package Management: A Guide to Package Managers in Linux" width="1024" height="640" srcset="https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux.webp 1024w, https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux-300x188.webp 300w, https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux-768x480.webp 768w, https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux-960x600.webp 960w, https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux-150x94.webp 150w" sizes="(max-width: 760px) calc(100vw - 40px), 720px" data-pin-media="https://www.howtouselinux.com/wp-content/uploads/2023/10/A-Guide-to-Package-Managers-in-Linux.webp" id="mv-trellis-img-3" loading="lazy" data-trellis-processed="1">
```
Her is the link for above code   [https://www.howtouselinux.com/post/understanding-package-management-a-guide-to-package-managers-in-linux](https://www.howtouselinux.com/post/understanding-package-management-a-guide-to-package-managers-in-linux)

Thanks a lot.
My second hacktoberfest PR
Tags: hacktoberfest, hacktoberfest23, opensource
Published: 2023-10-13 14:07:12

This week I found another [issue](https://github.com/movesthatmatter/movex/issues/44), which is in the project [Movex](https://github.com/movesthatmatter/movex).
Movex is a revolutionary platform designed to transform the way we approach frontend development. With Movex, we step into a world where server-side complexities become a thing of the past, and the focus shifts entirely to crafting exceptional user experiences. In a nutshell, Movex is the key to building real-time, multiplayer applications without the headache of backend development. It empowers developers to cut development effort in half and ship faster by abstracting the backend logic, enabling complete control over app logic, UI/UX, and data management.

Last week, I leaved the comment that I wanna do the issue, but another guy asked to do it too and the author leaved the comment on Thanks giving day to ask if I still wanna do it. Fortunately, I saw the message in the evening and replied promptly, which allowed me to work on this issue. Hope this never happen on me again.

In this [PR](https://github.com/movesthatmatter/movex/pull/81), I found the file and search all the file using this file LocalStorageMovexStore.ts, I also installed and ran the program according to the README and run test passed. The whole issue is not hard, but after I created the PR, I found I have to [sign my commits](https://docs.github.com/articles/about-gpg/), I created GPG key and tried to solve it, but I couldn't change the old commit. At last, I had to create another new PR. I think I'll check my using email first next time.
Discover Our Exquisite Hanging Lamp Collection Today
Tags: hanginglamp, homedecor, illuminate
Published: 2023-10-13 14:03:16

Elevate your home decor game with our stunning hanging lamps that effortlessly blend style and functionality. Whether you're aiming for a cozy ambiance or a modern chic look, our diverse collection has the perfect hanging lamp to transform your space. Brighten up your evenings and add a touch of sophistication to any room. Hurry and explore our range now to find the ideal hanging lamp that complements your unique style. Light up your life with our captivating designs!
[https://thelitconcept.com](https://thelitconcept.com)
How to optimize Drupal sites for speed and performance, and how to troubleshoot performance problems
Published: 2023-10-13 13:58:54

**_[Drupal](https://www.drupallers.com/blog/optimise-drupal-sites-for-speed-and-performance/)_** is a powerful and flexible content management system, but it can also be quite demanding when it comes to resources. If you're running a Drupal site, it's important to optimize it for speed and performance to ensure that your visitors have a good user experience.

Here are some tips on how to optimize your Drupal site:

Use a caching module. Caching can significantly improve the performance of your Drupal site by storing frequently accessed data in memory so that it doesn't have to be retrieved from the database every time a page is loaded. There are a number of different caching modules available for Drupal, so choose one that meets your needs.
Optimize your images. Images are often the largest files on a web page, so it's important to optimize them for speed. You can do this by compressing them, resizing them, and using the appropriate file format. There are a number of different tools and plugins available to help you optimize your images.
Minify your CSS and JavaScript files. Minifying your CSS and JavaScript files can remove unnecessary whitespace and comments, which can make them load faster. There are a number of different tools and plugins available to help you minify your CSS and JavaScript files.
Use a content delivery network (CDN). A CDN can help to improve the performance of your Drupal site by delivering your static content, such as images, CSS, and JavaScript files, from servers that are located closer to your visitors. There are a number of different CDN providers available, so choose one that meets your needs.
Keep your Drupal core and modules up to date. Drupal releases regular updates that include security fixes and performance improvements. It's important to keep your Drupal core and modules up to date to ensure that your site is secure and performing at its best.