teleren/devto huggingface dataset:
36. 12 Essential Tips For Your Coding Project (Day 34)
Tags: tips, organized, productivity
Published: 2023-11-19 07:44:15

Sunday marked a moment of sheer relief – the day I finally submitted my assignment. What seemed like a small project demanded an immense amount of effort. The task? Crafting my very own portfolio. The catch? I hadn't the faintest clue about HTML or CSS coding a mere 33 days prior! Today, as I reviewed every line of code before submission, I was struck by disbelief – had I truly written all of this? It was a testament to how unfamiliar I once was with this realm. Now, I can't help but wonder: _**could I replicate this feat again?**_

I believe I can do it by applying the valuable lessons I've gathered this month, and I'm excited to share these insights with you too.

**1. Setting Timelines**
Creating a clear start and end date for your project sets the foundation for your work. It provides structure and helps manage your time effectively.

**2. Project Description**
Draft a concise yet comprehensive description of your project. Express your ideas, methods, and the overall structure you envision.

**3. Mapping Your Website**
Start with a rough sitemap on paper, outlining the pages and their connections. This visual aid helps in understanding the website's structure. Digitize it by using software like Draw.io.

**4. Wireframe Creation**
Sketch a rough wireframe on paper, incorporating basic layouts for various devices. Add some visual elements and later replicate this on platforms like Figma for a detailed representation.

**5. Seek Feedback**
If working solo, seek opinions from a team or friends. Get feedback on your wireframe and make necessary adjustments.

**6. Coding Routine**
Allocate specific daily hours for coding and take regular breaks to maintain productivity and physical health. Balancing work with exercise and healthy eating is crucial.

**7. Git Repository Updates**
Regularly update your Git repository with meaningful commits to keep track of your progress.

**8. Document Your Journey**
Journal your daily accomplishments, noting lessons learned and upcoming opportunities. Sharing these can reinforce your learning and inspire others.

**9. Creating `Readme.md`**
Maintain a `Readme.md` file throughout the project, listing key features and components. Update it regularly to ensure it remains comprehensive.

**10. Showcasing Your Work**
After deploying your site, create a brief video walkthrough showcasing your initial sketches, wireframes, and the finished product. Share this video link across platforms and in professional profiles.

**11. Taking a Break**
Following project completion, take a 24-hour break to unwind and detach from the finished project.

**12. Responding to Feedback**
Record feedback and make necessary adjustments to your project based on the received insights.

Establishing these habits not only organizes your work but also enhances productivity and success in web development. Embrace these steps to navigate your projects effectively and efficiently.
BakaLLM part 11.5. Moving away from (solely) WANDB
Published: 2023-11-19 07:39:13

Hello fairy dairy diary! 

![Cirno at blackboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrd9dz0ehz4r1xlja93f.png)

I finally moved away from wandb alone(due to [jumping](https://github.com/wandb/wandb/issues/3687) graphs) and now I'm storing losses right into SQLlite database as well. This feel so good. No longer I have to deal with jumping loss graph. To say how I don't see them reliable compare these two charts.

This is a chart from WANDB. 

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

`rmt-x-1` is current training session that it happening right nwo. It's basically cross attention with bunch of RMT from the past sequences.  According to wandb it's a breakthrough! Loss so much better! Optimism through the roof, let's dance in the snow!

But, but, but, here's a result from sqlite.

![SQLite database graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oczoh2dh0dmlym4sphzx.png)

losses of each run is split into buckets per 100 entries per bucket(last gets >100 in case division is non exact), then it shows three graphs: min of the bucket, max of bucket and average.

As you can see they are pretty much the same, it seems RMT cross attention learned to zero itself out for the most part.
Well, at least now I can stop training earlier. With wandb I have to zoom so it doesn't sample too randomly:


![Same graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnly5ph8u8p23cfvzael.png)

It's the same graph from wandb. Only zoomed in. As you can see no breakthrough. Bonkers!

Now, I'm back to my think tank, planning to fix the mess, chill!
Securing tomorrow: deep dive into proactive infrastructure security
Tags: aws, rds, kms, eks
Published: 2023-11-19 07:33:45

Managing infrastructure involves juggling various factors like application performance, reliability, and disaster recovery, but one often overlooked aspect is security. At ITSyndicate, an [AWS partner](https://partners.amazonaws.com/partners/0010L00001u6JLvQAM/), we prioritize security and let's delve into a case study to see how we handle it.

Start with the basics for VPC and IAM security by managing subnets, configuring IAM, and implementing minimal privileges. Ignoring these early on can lead to exponential problems as your project grows. For IAM, implement minimal privileges from the start and plan carefully to avoid future complications.

In our project, the EKS cluster's IAM Role is tailored to specific AWS services like Secrets Manager, KMS, RDS, and S3. VPC and subnet management involve asking key questions for each resource, ensuring necessary internet access, and making strategic decisions. For example, our EKS cluster uses private subnets for security, with specific resources like RDS in private subnets too.

## Strategies for robust defense and proactive measures
Enhance security with AWS WAF and CloudFront for protection against layer seven attacks and effective DDoS mitigation. Secrets Manager in Kubernetes stores sensitive data, while AWS KMS offers versatile encryption integrated with various AWS services. Security observability is crucial, and we use AWS Config with SNS and Lambda integrations to track and respond to incidents promptly.

What's great about our [security management](https://itsyndicate.org/services/monitoring-log-solution/) is its scalability and ease of improvement over time. Features like AWS Shield Advanced and GuardDuty are ready for activation when needed. Regular key rotation is a fundamental security practice, coupled with granting the least access required. In our other guide, we discuss how GCP service account key rotation enhances security using Kubernetes and Python. This proactive approach ensures your infrastructure stays secure and operations run smoothly.
Exploring the World of Online Stories: A Journey Through Each Page
Tags: entertaiment
Published: 2023-11-19 07:18:02

In today's digital age, reading stories is no longer confined to the pages of a physical book. With the launch of [CungDocTruyen.com](https://cungdoctruyen.com), we open up a new world where each web page is a page of a book, and every mouse click is a step into the world of captivating stories.

**The Journey Begins with Passion**
[CungDocTruyen.com](https://cungdoctruyen.com) was founded by book lovers, aiming to provide readers with a convenient and diverse online reading experience. We believe that every book, whether a comic, novel, or short story, can open up a new world, a new adventure in the reader's soul.

**Diversity in Every Page**
At[CungDocTruyen.com](https://cungdoctruyen.com), we offer a vast library of stories, from classic works to fresh creations by young authors. No matter what genre you prefer - romance, horror, science fiction, or fairy tales - you will find satisfying works.

**User-Friendly Interface, Smooth Experience**
We take pride in the user-friendly and easy-to-use interface of [CungDocTruyen.com](https://cungdoctruyen.com), which helps you easily search and select stories to read. Additionally, features like bookmarking, page marking, and font size adjustment provide a personalized reading experience, wherever you are.

**Connecting the Reader Community**
An important part of the reading journey is sharing and discussing with like-minded individuals. [CungDocTruyen.com](https://cungdoctruyen.com) is not just a platform for reading stories but also a community where you can meet, exchange ideas, and share feelings with other readers.

**Constantly Updating and Evolving**
We continually strive to update new works and improve the platform to provide the best experience for readers. Join [CungDocTruyen.com](https://cungdoctruyen.com) to explore the world of online stories, and start your journey through each page today!

This article is designed to provide a brief introduction to your website while highlighting the features and benefits of using your online storytelling service.
A use-case for CSS :has()
Tags: css
Published: 2023-11-19 07:17:38

---
title: A use-case for CSS :has()
published: true
description: I found an unexpected use case for the newly, fully supported :has() selector!
tags: css
cover_image: https://images.unsplash.com/photo-1465433045946-ba6506ce5a59?q=80&w=2400&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
canonical_url: https://blog.cassidoo.co/post/css-has/
---

In case you missed it, [the CSS `:has()` selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) is [now supported](https://caniuse.com/css-has) in all major browsers!

It's a very weird (but cool) selector that allows you to select elements that contain a specific thing, like for example `a:has(img)` selects all anchor `<a>` tags that have an `<img>` inside.

I've thought it was really interesting, but I've never actually had a good use-case to use it myself besides... adding captions to images or something. But, that changed today!

On [my personal website](https://cassidoo.co) (which I first made a solid 4 years ago with plain HTML, CSS, and JS, and I admit I haven't really updated since besides some words and links), I have a dark mode toggle. It's probably rarely if ever clicked (I should probably modernize it with some `prefers-color-scheme` stuff sometime), but when you do, it does what you expect, it turns on dark mode.

Under the hood, that toggle adds a `.dark-mode` class to the `<body>`, and in the CSS, we style nearly everything based on that:

```css
html,
body {
	/* ... */
	background: var(--white);
	color: var(--black);
}

body.dark-mode,
body.dark-mode a {
	background: var(--black);
	color: var(--white);
}

/* ... */
```

Now, here's the problem: the body doesn't always take up the entire height of the page. I was cleaning up and organizing some code, and when I put the `background` and `color` properties under `html, body`, that meant that the `html` was keeping its white background and black text color, even in dark mode.

![Gross white color framing the dark mode website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbtqp0adx5ir0bypfrrc.png)

BUT `:has()` came to my rescue! Because it kind of acts like a parent selector, I'm able to say "if the `<html>` has `.dark-mode` inside of it, that means it should have certain styles." One line change later we had this:

```css
html:has(.dark-mode),
body.dark-mode,
body.dark-mode a {
	background: var(--black);
	color: var(--white);
}
```

...and voilà, just like that, all of my problems I've ever had are solved!
🌟 배팅사이트추천, 토토사이트추천 - R-bet으로 신나는 게임과 특별한 혜택을 만나보세요! 🎲
Published: 2023-11-19 07:14:51


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

🎁 입플 이벤트 진행 중!

💰 매일 매충 10% 캐시백 이벤트로 여러분을 환영합니다!
🌈 매력 넘치는 게임과 다양한 혜택이 기다리는 이벤트!

🔄 매일 매충 10% 캐시백: 매 충전 시 10%의 캐시백으로 지갑을 채워보세요!
🎯 다채로운 게임 환경: 스포츠, 에볼루션카지노, 플레이텍 카지노, 라이브 배팅, 미니게임, 카지노슬롯머신 등 다양한 게임을 즐길 수 있습니다.
🎰 카지노 게임으로 현실감 있는 승부를 즐기세요!

🏀 스포츠 베팅: 다양한 스포츠에서 즐거운 베팅을 즐겨보세요.
🃏 에볼루션카지노 & 플레이텍 카지노: 생동감 넘치는 딜러와의 게임으로 현장감을 느껴보세요.
🎰 카지노슬롯머신: 다양한 테마와 높은 당첨률의 슬롯머신을 즐겨보세요.
🚀 R-bet으로 흥미진진한 게임과 혜택을 만나보세요!

🌐 찾아가기: [rbet-1.com](rbet-1.com)
🆔 코드: AT
📝 블로그 홍보글:
R-bet은 탁월한 입플 이벤트와 매충 10% 캐시백 이벤트로 게임을 더욱 흥미롭게 즐길 수 있는 사이트입니다. 다양한 게임 종목인 스포츠, 에볼루션카지노, 플레이텍 카지노, 라이브 배팅, 미니게임, 그리고 카지노슬롯머신까지 모두 이용 가능하며, 현장감 넘치는 게임과 다양한 이벤트로 여러분을 초대합니다.

🔗 참고 링크: R-bet 바로가기

💸 가입 코드 'AT'를 입력하여 R-bet의 다양한 혜택을 누려보세요! 여러분의 행운이 가득한 게임이 여기 있습니다. 지금 바로 참여하세요! 🌟

			
			
❤️ 더많은 사진, 영상 보러가기!			
☑️ 네이버 -> [https://cafe.naver.com/browncqpaq](https://cafe.naver.com/browncqpaq)			
☑️ 네이버카페 "AI DataBase" 검색			
☑️ 더 많은 입플 이벤트 진행사이트 확인 -> [http://입플사이트추천.com](http://입플사이트추천.com)			
❤️메이저 토.토사이트 -> [https://start.me/p/OmrOQ0](https://start.me/p/OmrOQ0)			
❤️메이저 안전놀이터 -> [https://start.me/p/lLg592](https://start.me/p/lLg592)
❤️먹튀검증사이트 -> [https://www.mtmt114.com](https://www.mtmt114.com)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azoczqbab1ycvl04g1aw.jpg)
Part 2.1 What Happens when you type kubectl command?- create namespace
Published: 2023-11-19 06:38:37

Entry point https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/create/create_namespace.go#L76

- `Complete` completes all the required options
- `Validate` validates required fields are set to support structured generation
- `Run` calls the CreateSubcommandOptions.Run in NamespaceOpts instance
- `createNamespace` outputs a namespace object using the configured fields
- Then ` o.Client.Namespaces().Create(context.TODO(), namespace, createOptions)` creates namespace

Next part `staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go`
5 Common CSS Mistakes: What to Avoid for Clean & Efficient Code | Part 1
Tags: css, scss, webdev, design
Published: 2023-11-19 06:17:55

Cascading Style Sheets (CSS) is the backbone of web design, allowing developers to transform a plain HTML document into an aesthetically pleasing and functional website. However, even seasoned developers can fall into certain traps that lead to messy, inefficient, or buggy CSS. Here are five common mistakes to avoid when working with CSS to ensure cleaner, more maintainable code.


Absolutely! Let's enhance each point with an example to illustrate these common CSS mistakes and how to avoid them.

### 1. Overusing !important

**❌ Bad:**
```css
.button {
  color: red !important;
}
```

**✔ Good:**
```css
/* Avoid !important by increasing specificity */
.container .button {
  color: red;
}
```

Using a more specific selector helps to avoid the need for `!important`. By adjusting the specificity of the selector, you can achieve the desired styling without resorting to overrides.


### 2. Not Utilizing CSS Resets or Normalization

**❌ Bad:**
```css
/* No CSS reset */
body {
  margin: 0;
  padding: 0;
}
```

**✔ Good:**
Utilize a CSS reset or normalization library like Normalize.css:
```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
```

By using a CSS reset or normalization library, you establish a consistent baseline across browsers, reducing unexpected differences in default styling.


### 3. Writing Inline Styles Extensively

**❌ Bad:**
```html
<p style="font-size: 16px; color: #333;">Lorem ipsum dolor sit amet</p>
```

**✔ Good:**
```css
/* External CSS file or style block */
p {
  font-size: 16px;
  color: #333;
}
```

Avoid inline styles and instead use external stylesheets or style blocks within your HTML document to keep styles centralized and easily maintainable.


### 4. Not Using Preprocessors Wisely

**❌ Bad:**
Overcomplicating Sass with excessive nesting:
```scss
.nav {
  ul {
    li {
      a {
        color: blue;
      }
    }
  }
}
```

**✔ Good:**
```scss
/* Use nesting judiciously for improved readability */
.nav {
  ul {
    li {
      a {
        color: blue;
      }
    }
  }
}
```

While preprocessors offer nesting capabilities, avoid excessive nesting to prevent overly specific selectors and bloated CSS output.


### 5. Neglecting Browser Compatibility and Performance

**❌ Bad:**
Not considering vendor prefixes for CSS properties:
```css
/* Missing vendor prefixes */
.example {
  display: flex;
}
```

**✔ Good:**
```css
/* Consider vendor prefixes for better browser support */
.example {
  display: -webkit-flex; /* Safari */
  display: flex; /* Standard */
}
```

Always test CSS across different browsers and devices, and consider vendor prefixes and optimization techniques to ensure compatibility and performance.

These examples highlight common mistakes in CSS and demonstrate better practices to improve code readability, maintainability, and overall website performance.

Thank you for Reading!
Part 2: What Happens when you type kubectl command? - create package
Published: 2023-11-19 06:10:33

Entry point of kubectl `create` package is https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/create/create.go

- `CreateOptions` is the commandline options for 'create' sub command
- `NewCreateOptions` returns an initialized CreateOptions instance
- `NewCmdCreate` returns new initialized instance of create sub command
- Under this following sub commands are available

```
Available Commands:
  clusterrole           Create a cluster role
  clusterrolebinding    Create a cluster role binding for a particular cluster role
  configmap             Create a config map from a local file, directory or literal value
  cronjob               Create a cron job with the specified name
  deployment            Create a deployment with the specified name
  ingress               Create an ingress with the specified name
  job                   Create a job with the specified name
  namespace             Create a namespace with the specified name
  poddisruptionbudget   Create a pod disruption budget with the specified name
  priorityclass         Create a priority class with the specified name
  quota                 Create a quota with the specified name
  role                  Create a role with single rule
  rolebinding           Create a role binding for a particular role or cluster role
  secret                Create a secret using a specified subcommand
  service               Create a service using a specified subcommand
  serviceaccount        Create a service account with the specified name
  token                 Request a service account token
```
next part `createNamespace`
Middleware in React
Tags: javascript
Published: 2023-11-19 06:06:36

In React, middleware is typically used to modify, intercept, or augment data or actions before they reach the reducers (in the case of state management libraries like Redux) or components.

Common Use Cases for Middleware in React

1. Logging and Debugging
Middleware is an excellent tool for logging useful information during application development. It can log the current state, actions, or any relevant data as the application runs. This provides developers with insights into how the application behaves and helps identify potential bugs or issues.

2. Asynchronous Operations
In React applications, asynchronous operations like making API calls or handling side effects can be managed effectively using middleware. Middleware allows developers to intercept certain actions, perform asynchronous tasks, and then dispatch new actions with the results once the tasks are complete.

3. Authentication and Authorization
Middleware is particularly useful for handling authentication and authorization tasks. For example, if a user attempts to access a protected route, the middleware can check if the user is authenticated and redirect them to the login page if necessary.

4. Caching
Middleware can be employed to implement caching mechanisms. It can intercept certain actions, check if the required data is available in the cache, and provide the cached data instead of making redundant API calls.

5. Performance Optimization
Middleware can help optimize performance by delaying certain actions, debouncing events, or batching multiple actions into a single update.

**Why do you need React Middleware?**

While Redux is synchronous you may wonder how does redux works with async operations. Redux Middleware is the answer. If you have the basic Redux store, it enables you to perform synchronous updates only. Middleware Redux is the right tool to extend the store’s capabilities. Redux middleware acts as a medium to interact with dispatched actions prior to the reducer.


## Middleware Setup

To use middleware in Redux, you need to apply it when creating the Redux store. React Redux provides a built-in **applyMiddleware** function that allows you to apply one or more middleware to the store.

```
import { createStore, applyMiddleware } from 'redux'; 
import thunkMiddleware from 'redux-thunk'; 
// Example middleware (for handling async actions) 
import loggerMiddleware from './middleware/loggerMiddleware'; 
// Custom middleware 
import rootReducer from './reducers'; 
const middleware = [thunkMiddleware, loggerMiddleware]; 
const store = createStore(rootReducer, applyMiddleware(...middleware)); 
```
Software testing, needs and relevance.
Published: 2023-11-19 06:02:02

Today i have started learning about software testing with basis.
How the applications will starts develop,


- Entrepreneur/Stakeholder who used to provide requirements to Business Analyst(BA) to make the application for their business need.

- BA will analyse the requirements, feasibility and start designing the applications with features, functionality, components along with documentation.

- Requirement Documentation which consists of all the features  with module sections, each sections will define how the application of the particular screen should look also it will have component list with Attribute name, type, size and description.

- Developers will get the KT from BA with requirement document then they analyse and start design screens along with components mentioned in the requirement after that they start writing the logic for the components of the screen and later they will integrate with next next screens, these things were done from front end.

- From Back end the will keep database and create number of tables depends on project need, each table will data(which will get from application as a input).Then Backend developers will co-ordinate with Frontend developers and make connectivity by writing logics and query.

- Once development done from development side then they do unit testing to ensure the functionalities working as per requirement.

- Testers will start testing once the application is done with development phase and deployed into test environment.

- In Testing phase if tester finds any defect then testers will report to developers once they fixed it then the defect back to tester, again tester has to test and confirm the whether raised issue is resolved or not. By that testers will determine the quality of the application.