teleren/devto huggingface dataset:
"Squoosh" is an image compression application
Tags: image, design
Published: 2023-06-24 12:11:11

Introducing Squoosh, an online image compression application that reduces file size while maintaining visual quality. It is Free.

![Squoosh(https://squoosh.app/)](https://ayaco.gitlab.io/zerogravity/en/docs/tool/squoosh/feature.png)

## Operating environment

It works with browsers of various platforms.
This is just a guess since I can't find any description of the supported environment, but it is expected to work with Chrome/Firefox/Safari on the following platforms.。

| Windows | Mac | iPad | iPhone | Android |
| --- | --- | --- | --- | --- |
| ○ | ○?[^q] | ○ | ○?[^q] | ○ |

## Functionality and operability

It is a very high-performance application that can tune various parameters while comparing the image quality/file size before and after compression, and create a convincing one.
At the same time, it also performs format conversion, so for example, by converting a JPEG photo of several MB taken with a camera into a WebP/AVIF format with a high compression ratio, it is possible to significantly reduce the size to several hundred KB while maintaining the apparent image quality.

Below is a screen shot of a 252KB PNG illustration with the number of colours reduced and compressed down to 52.1KB.
If you zoom in, you can see that dither appears in the spectacle lenses and hair in the compressed image on the right.
Here, the colours have been deliberately reduced in an exaggerated manner so that the difference in image quality can be seen, but with appropriate tuning, the image quality can be maintained to such an extent that it cannot be seen even if you strain your eyes.

![Example of Squoosh compression screen](https://ayaco.gitlab.io/zerogravity/en/docs/tool/squoosh/sample.webp)

Other features include the fact that images are processed locally, without being sent to a server.
This can be used in cases where online tools are difficult to employ for information management reasons.
In fact, it worked even when Wifi was switched off.

However, it is not possible to specify and compress multiple files at once.
In cases where you want to upload a large number of images at once, this may be a drawback.

## Competitive comparison

### TynyPNG

This is a free online application that allows you to compress multiple images together.
Maximum of 20 images.
Parameter tuning is not available.

![TinyPng](https://ayaco.gitlab.io/zerogravity/en/docs/tool/squoosh/tinypng.webp)

### ILoveIMG

This is a free online application that allows you to compress multiple images together.
I didn't know what the maximum number of images was, but I were able to do at least 40.
Parameter tuning is not available.
Apart from compression, you can also resize and reformat.

![ILoveIMG](https://ayaco.gitlab.io/zerogravity/en/docs/tool/squoosh/iloveimg.webp)

## Difference in functionality between free and paid versions

There is no paid version.
All features are free.

## Official site

| Site | URL |
| ---| --- |
| Home | https://squoosh.app/ |
| Documentation | None |
| Tutorial | None |
{.gridfc30p}



[^q]: "?" are those I have not actually confirmed to work.
Carriage Return line feed: CRLF - Linux vs Windows
Published: 2023-06-24 11:55:20

CRLF?  Carriage return (CR) and line feed (LF) come from the days of typewriters.

# History
CR = '\r' = 0x0D (HEX) was used to move the cursor to the beginning of the line

LF = '\n' = 0x0A (HEX) was used to move the cursor down to the next line.

The combination of CRLF in type writers is what moved the cursor from the end of the current row to the start of the next row.

# Windows vs Linux file compatibility
As computers developed linux moved away from using both CRLF and just used LF to indicate a new line inside a file while windows continued to use both.

If a file has only '\n' (LF) for its line endings then it is linux compatible.
If a file has '\r\n' (CRLF) for its line endings then it is windows compatible.

To convert from linux to windows use the sed command in a linux terminal:
```bash
sed -i 's/$/\r/' fileLinux.txt
```

To convert from windows to linux, use the following command in a linux terminal:
```bash
tr -d '\r' <fileWindows.txt > fileLinux.txt
```

credit:  https://www.commandlinewizardry.com/post/removing-windows-line-breaks

# How do I know which line ending a file has?
Notepad ++ does it:

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

VsCode will show you what the line endings are for a given file at the bottom right of the screen.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo775ygd0vcg90yq41u5.png)
Roblox 🎮 How to set multiple augments in RemoteEvent
Tags: roblox, remoteevnet, lua, robux
Published: 2023-06-24 11:42:35

Be careful when setting multiple augments in RemoteEvent of Roblox.

Firing Side

```
demoRemoteEvent:FireClient(player, value1, value2, ...)

```

Event Side

```
demoRemoteEvent.OnClientEvent:Connect(function(value1, value2, ...)
	print("value1: "..value1)
    print("value2: "..value2)
end)

```

It's important that you shouldn't contain `player` in the Event function side.
Migration to .NET Core
Tags: news, dotnet, dotnetcore, csharp
Published: 2023-06-24 11:38:34

According to the previous content, i.e. migration from .NET, we will migrate to .NET Core in the near future and expand the serverside independence feature.

We have done many studies and by providing the infrastructure and conducting many tests, we announce that Elanat will have the highest amount of serverside independence after migrating to .NET Core.

We provided an infrastructure that provides **code-behind** (not the web form structure) in .NET Core and supports **aspx** pages. Soon we will provide migration from standard .NET to .NET Core for Elanat framework and add code-behind infrastructure with support for aspx pages separately from Elanat repository as a new repository in our [repository list](url).

This structure is also based on MVC and will provide code-optimized and MVC together and based on aspx pages.

## Example

**View**
```
<%@ Page CodeBehind="Default.aspx.Controller.cs" Inherits="YourProject.wwwroot.DefaultController" %><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title><%=model.PageTitle%></title>
</head>
<body>

</body>
</html>
```

**Controller**
```
namespace YourProject.wwwroot
{
    public partial class DefaultController : CodeBehindController
    {
        private DefaultModel model = new DefaultModel();

        public void PageLoad(HttpContext context)
        {
            model.PageTitle = "My Title";
            View(model);
        }
    }
}
```

**Model**
```
namespace YourProject.wwwroot
{
    public partial class DefaultModel : CodeBehindModel
    {
        public string PageTitle { get; set; }
    }
}
```

The standard .NET platform created great challenges for us to create a framework on this platform, and we planned to leave this platform completely; but the new versions of .NET Core changed our mind to some extent and we will migrate to this platform.

After that, we will decide whether to leave Microsoft platforms completely or not.
The Art of Code Design: Embracing the Power of the Open-Closed Principle
Tags: php, solid, openclose, webdev
Published: 2023-06-24 11:28:43

---
title: The Art of Code Design: Embracing the Power of the Open-Closed Principle

published: true
description: Discover the power of the Open-Closed Principle and learn how to build flexible and adaptable software.

tags: php, solid, openClose, webDevelopment
cover_image: https://anastasionico.uk/img/blog/the-art-of-code-design-the-open-closed-principle.jpg

---

As web developers, we know the importance of writing clean and maintainable code.

That's where the Open-Closed Principle (OCP) comes in.

It's all about creating code that is open for extension but closed for modification.

 

By following this principle, we can build software that is adaptable, scalable, and easier to maintain.

In this blog post, we'll explore the essence of the Open-Closed Principle, uncover its benefits, and learn how to apply it in real-world scenarios.

 

Let's dive into the world of the Open-Closed Principle and unlock the art of code design. 

[Happy coding and let's get started!](https://anastasionico.uk/blog/the-art-of-code-design-the-open-closed-principle)
Threading doubt in python
Tags: python
Published: 2023-06-24 11:25:57

Hi

I am facing a peculiar issue in my app while using threading module in python.
I have started one daemon thread in my code but when i run threading.enumerate() to see rthe active threads, i see 2 or sometimes 3 threads (all daemon) which are active. Question is, why is this happening when i have only initiated on thread?

Any help would be really helpful.
StaticDelivr: The Open-Source CDN for GitHub and NPM
Published: 2023-06-24 11:02:48



In today's fast-paced digital world, website performance is crucial. A slow-loading website can lead to a negative user experience and decreased engagement. That's where a content delivery network (CDN) comes in – it can help improve website performance by delivering website assets from servers closer to the user.

One open-source CDN that you should consider is StaticDelivr. Unlike traditional CDNs, StaticDelivr serves files directly from GitHub and NPM repositories. This means that it's a great option for small to medium-sized websites or personal projects that need a reliable, high-performance CDN without the added cost.


Here are some of the benefits of using StaticDelivr:

- **Unlimited bandwidth:** StaticDelivr offers unlimited 
     bandwidth, so you don't have to worry about your 
     website being throttled or slowed down by high traffic.

- **Global reach:** StaticDelivr has a global network of 
     servers, so your website assets will be delivered from 
     the server closest to the user, reducing latency and 
     improving overall website performance.

- **Easy to use:** StaticDelivr is easy to set up and use. 
     You can simply add a few lines of code to your website 
     or project to start using StaticDelivr.

- **Developer-friendly:** StaticDelivr is designed to be 
     developer-friendly. It offers support for many popular 
     libraries and frameworks, such as jQuery, Bootstrap, 
     and React. This means that you can easily integrate it 
     into your existing website or project without having to 
     make major changes.

If you're looking for a reliable, free, and easy-to-use CDN, StaticDelivr is a great option. To learn more, visit the StaticDelivr website at https://staticdelivr.com/.

I hope this post has helped you learn more about StaticDelivr. If you have any questions, please feel free to leave a comment below.
Pass Your Exam with Flying Colors: Best Exam Topics Free Available
Tags: webdev, javascript
Published: 2023-06-24 11:01:44

# How to Prepare for Exams the Smart Way: A Comprehensive Guide
Exam preparation can be a daunting task, especially if you are aiming for top grades. However, with the right mindset and strategies, you can achieve success by studying smarter, not harder. This comprehensive guide is designed to help you prepare for exams the smart way by outlining proven strategies and techniques. 
1. Develop a Study Plan:
The first step in preparing for exams is to devise a study plan that outlines when and how <a href="https://examtopicsfree.com/">Exam Topics Free</a> you will study. Begin by creating a timeline of when the exam is and how much time you have to prepare. Then, break down your study sessions into manageable chunks to make sure you cover all the material and don’t miss any important topics. 
2. Practice Exam Questions:
Familiarize yourself with the types of questions likely to appear on the exam by completing practice questions. This will help you to understand the structure of the exam, and to identify any areas that require additional study. 
3. Use Mnemonics: 
Mnemonics are a great way to remember facts and figures for exams. They are memory aids, typically made up of short acronyms or phrases that help to link information together. 
4. Take Notes: 
Taking notes is an essential part of exam preparation. Make sure to review your notes <a href="https://examtopicsfree.com/">Exam Topics</a> regularly and update them as you progress through your studies. This will help to ensure that you have a comprehensive understanding of the material. 
5. Get Enough Sleep: 
Getting enough sleep is essential to performing well on an exam. Make sure to balance your study sessions with adequate rest in order to avoid burnout. 
6. Take Breaks: 
Taking regular breaks from studying is important for maintaining focus and preventing fatigue. Short breaks can help to clear your mind and keep you from getting overwhelmed. 
7. Avoid Distractions: 
Minimize distractions during your study sessions by turning off your phone, putting away your laptop, and avoiding social media. This will help you to stay focused and maximize your productivity. By following these steps, you can effectively prepare for exams the smart way. With the right strategies and techniques, you can optimize your study sessions and achieve the best possible results.

Unlock Your Potential with Our Exclusive Offer! >>>> https://examtopicsfree.com/
Minimal dark/light theme toggle
Tags: css, theme
Published: 2023-06-24 11:00:43

---
title: Minimal dark/light theme toggle
published: true
description: Most minimal solution for theme toggler
tags: css, theme
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6khfh3q14xa78f60f0t.png
# Use a ratio of 100:42 for best results.
---
There are a lot of implementations for color scheme switch/toggle
My favorite one probably made be [Adam Argyle](
https://github.com/argyleink/gui-challenges/blob/main/theme-switch/public/theme-toggle.js)
{% youtube https://www.youtube.com/watch?v=kZiS1QStIWc&list=PLNYkxOF6rcIAaV1wwI9540OC_3XoIzMjQ&index=16&t=418s&ab_channel=GoogleChromeDevelopers %}

But I think I've found even *most minimal solution*.
Few prerequisites:
1. In general you might have more them 2 themes, but I think dark/light is enough, therefore I'll need only toggle button
2. User might have system preference for dark/light and I want to be able to use in my code
3. If user want to change theme he/she should be able to do it with one click/touch
4. For current implementation I don't want to store toggle state in any, I suppose that developer will decide where to store such info it could be anything like state manager, cookies, Local/Session Storage, user settings on backend. 

For design I've decided to use [MDI icon theme-light-dark](https://pictogrammers.com/library/mdi/icon/theme-light-dark/)
and button that invert background/foreground colors with help of [CSS system colors such as WindowText/Window](https://www.w3.org/TR/css-color-3/)

System preference I am getting with `window.matchMedia("(prefers-color-scheme: dark)")`


Example you might find in following codepen:
{% codepen https://codepen.io/gleb-svechnikov/pen/vYQyKPd %}
Demo of Mini PHP Framework (using Symfony routing and Blade template)
Tags: php, phpframework, symfony, blade
Published: 2023-06-24 10:59:36

In this quick demo we will create mini PHP framework by using vanilla PHP plus Symfony routing component (to handle routing) and Blade template engine (to handle templating). Why? Why not. I just want to mix and match.

See the skeleton demo here https://github.com/sonyarianto/mini-php-framework

Enjoy the PHP coding.
Simple GitHub Actions Demo (update README.md content if a file updated)
Tags: github, githubactions, git
Published: 2023-06-24 10:51:23

I just want to share quick demo about how to use GitHub Actions for fun.

The scenario is simple, I have a repo that contains `test.php` and `README.md` files. When I update the `test.php` (means git push happen) it will update part of content in `README.md` file with the content of `test.php`.

See the demo at https://github.com/sonyarianto/github-actions-push-and-display-it-on-readme

The workflow is on `.github/workflows/update-readme.yml`.

Enjoy the GitHub Actions.
Looking for UI UX Designer & Developers for my Open Source Project .
Tags: webdev, javascript, programming, opensource
Published: 2023-06-24 10:41:50

Looking for UI UX Designer for my Open Source Project . Look for projects in profile and if you are interested and wanna contribute feel free to DM me and if things work we can grow together with this project .
Animesh Raj
Full Stack Web Developer
https://competitivedeveloper.in.net/
https://github.com/itsarraj/competitivedeveloper
Would You like to collaborate
I am not good at UX so used bad designs and bad colors
I am full stack developer so I can build everything from scratch but need someone from UI UX to collaborate
Oshawa Hardwood, Vinyl, Laminate Floors
Tags: oshawa, flooring, sale
Published: 2023-06-24 10:12:01

Step into Ora Flooring & Stairs, your dedicated flooring store in Oshawa, to witness a revolution in home and office transformation.

Offering unmatched craftsmanship, premium quality, and sustainable solutions, we are your perfect partners in bringing elegance and comfort to your spaces.

One of our star products, the [engineered hardwood flooring in Oshawa](https://oraflooringandstairs.ca/oshawa/your-trusted-flooring-store-in-oshawa), is a testament to our commitment towards quality and durability.
5 Best and Trending Flooring Types and Options to Elevate Your Home Aesthetics in 2023
Tags: flooring, hardwood, sale, oshawa
Published: 2023-06-24 09:59:39

Imagine walking through your front door into a living space that not only embraces you with comfort and utility but also resonates with your personality and aesthetic taste. Well it all starts from the ground up – your flooring.

Often underestimated, flooring plays a crucial role in setting the tone and ambience of your home. Just like the perfect frame for a painting or the right rhythm for a melody, flooring breathes life into your home’s beauty.

It amplifies your décor, accentuating the strengths of your home’s interior design, and ties together different elements into a cohesive visual narrative. It’s the unsung hero of home design, laying the foundation for your home’s unique story.

In the fast-paced world of home design, trends are constantly changing. Today, in 2023, a multitude of flooring types and options are available that combine practicality with style.

In this post, we will present you with the 5 best and trending flooring options of 2023. These are choices that seamlessly blend functionality, aesthetic appeal, and the latest trends.

[Let’s dive into exploring these amazing flooring options!](https://oraflooringandstairs.ca/blog/5-best-and-trending-flooring-types-and-options-to-elevate-your-home-aesthetics-in-2023)
Solidity Inheritance
Published: 2023-06-24 09:38:01

**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utjwo2yc3ommih0wd2n0.png)**
Consider constructing a home with a different rooms and features. Each area has a distinct role and use, but they all work together to form a whole and useful living space.

Solidity inheritance works similarly. Inheritance allows you to create smart contracts that inherit properties and functionality from other contracts, just like rooms in a house inherit certain characteristics from the overall house design.

Let's say you have a base contract called House. This House contract defines some fundamental features that every house should have, such as a foundation, walls, and a roof. It serves as the blueprint for all the houses you will build.

Now, you want to create a specialized contract called SmartHouse that inherits from the House contract. The SmartHouse contract adds additional features like automated lighting, smart locks, and energy monitoring.

By using inheritance, you can easily create the SmartHouse contract by extending the House contract. It's like adding extra rooms and advanced technologies to your existing house design.

Solidity supports inheritance, which allows you to create new contracts based on existing ones. Inheritance is a way to reuse code and avoid duplicating functionality across multiple contracts.

To inherit from a parent contract, you can use the "is" keyword followed by the name of the parent contract.

#solidity #smartcontracts #blockchain #solidityinheritance
📢 Some New CSS Properties. 🎉
Tags: webdev, html, css, beginners
Published: 2023-06-24 09:34:56

Hello fellow developers! We are excited to announce some fantastic updates and new features in CSS that will enhance your web development experience. Let's dive right in! 💪

1️⃣ **Custom Properties (Variables)** 🎨
CSS now supports custom properties, allowing you to define your own variables and reuse them throughout your stylesheets. This helps in creating more flexible and maintainable code. Here's an example:
```
:root {
  --primary-color: #ff0000;
}

.button {
  background-color: var(--primary-color);
}
```

2️⃣ **Grid Layout** 📏
CSS Grid Layout provides a powerful two-dimensional grid system for creating complex layouts. It allows you to easily divide your page into regions and position elements with precision. Check out this snippet:
```
.container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
```

3️⃣ **Flexbox Enhancements** 🤩
Flexbox has received some exciting enhancements to make it even more versatile. Now, you can use gap property to add spacing between flex items and use gap and row-gap in flex containers. Take a look:
```
.container {
  display: flex;
  gap: 20px;
}
```

4️⃣ **Scroll Snapping** 📜
Scroll snapping enables smooth scrolling behavior, allowing you to control where the scroll position stops within a container. It's great for creating engaging scrolling experiences. Use the following code to enable scroll snapping:
```
.container {
  scroll-snap-type: y mandatory;
}
```

5️⃣ **Dark Mode Support** 🌙
CSS now has built-in support for dark mode with the prefers-color-scheme media query. You can easily adapt your styles based on the user's preferred color scheme. Check it out:
```
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111111;
    color: #ffffff;
  }
}
```

These are just a few highlights from the latest CSS updates and new features. We hope you find them useful in your web development projects. Let your creativity flow and enjoy building beautiful websites! 😊

Happy coding! 💻🎨🚀
~By Danish