teleren/devto huggingface dataset:
Save some bytes when using multiple themes in angular material components
Tags: angular, angularmaterial, angularcomponents, angularmaterialcomponents
Published: 2023-09-17 09:18:55

---
title: Save some bytes when using multiple themes in angular material components
published: true
description: Want to save some bytes when using multiple themes in angular material components? Read on...
tags: angular,angularmaterial,angularcomponents,angularmaterialcomponents
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pj68nka6394bn2eoi3p8.jpg
---

Let's say you have a theme file called dark.scss like below.

```scss
// src/styles/themes/dark.scss

@use "sass:map";
@use "@angular/material" as mat;

@use "../typography/config" as typography;
@use "../components";

$my-app-dark-primary: mat.define-palette(mat.$blue-grey-palette);
$my-app-dark-accent: mat.define-palette(mat.$amber-palette, A200, A100, A400);
$my-app-dark-warn: mat.define-palette(mat.$deep-orange-palette);
$my-app-dark-theme: mat.define-dark-theme(
  (
    color: (
      primary: $my-app-dark-primary,
      accent: $my-app-dark-accent,
      warn: $my-app-dark-warn,
    ),
  )
);

.dark-theme {
  @include mat.core-color($my-app-dark-theme);
  @include mat.button-color($my-app-dark-theme);
}
```

}
Now, in your assets array in angular.json, just exclude the dark theme file, see below code for example. With below code, dark theme file will be bundled as dark-theme.css in final output.

```json
"styles": [
              "src/styles.scss",
              {
                "input": "src/styles/themes/dark.scss",
                "bundleName": "dark-theme",
                "inject": false
              }
            ],
```

Now, in your index.html, load dark-theme.css whenever required:

```html
<link rel="stylesheet" href="dark-theme.css">
```

That's all! To know more, visit and read the full article now:
https://angular-material.dev/articles/angular-material-theming-system-complete-guide#create-a-dark-theme
Liv Pure Reviews 2023
Tags: health, weight, loss, formula
Published: 2023-09-17 08:06:06


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ryfnz11d32um7gu3je9o.jpg)
https://sites.google.com/view/liv-pure-click-now/home
https://twitter.com/meta31209746260/status/1703314928613114155
https://www.pinterest.com/pin/878342733560652830/
https://livpure1.bravesites.com/entries/general/Liv-Pure-Reviews-2023-
https://metaceptine122.wordpress.com/2023/09/17/liv-pure-reviews-2023/
https://medium.com/@metaceptine122/liv-pure-reviews-2023-10d79e68f484
https://linktr.ee/metaceptine122
https://tropical-prawn-b69.notion.site/Liv-Pure-Reviews-2023-d4394bcb8f6a4f57834f49d06df48c83
https://www.deviantart.com/metaceptine122/journal/Liv-Pure-Reviews-2023-983023629
https://meta31209746260.gumroad.com/l/okbpsp?_gl=1*fift6o*_ga*MTk5NTI0MDQ0LjE2OTQ5MzY3NDE.*_ga_6LJN6D94N6*MTY5NDkzNzY4MS4xLjEuMTY5NDkzNzcxNi4wLjAuMA..
https://ewdndmczrgzel4a3-83132514615.shopifypreview.com/products_preview?preview_key=0926992204b1aa5d85704fe57e4203e4
https://dribbble.com/shots/22581497-Liv-Pure-Reviews-2023?added_first_shot=true
Penggunaan Chezmoi untuk dotfile
Tags: dotfile, terminal, learning, ubuntu
Published: 2023-09-17 07:32:10

Management file menggunakan chezmoi

[https://www.chezmoi.io/](https://www.chezmoi.io/)

- Install chezmoi dengan langsung memilih dimana lokasi di install

```
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin
```
- Check versi dari chezmoi, ini digunakan untuk memastikan jika chezmoi sudah terpasang atau belum

```
$ chezmoi --version
chezmoi version v2.40.0, commit 6a8ca1634654734bb33a036ffb9c21e6b9f4d28d, built at 2023-09-19T09:56:08Z, built by goreleaser

$ which chezmoi
/home/xyz/.local/bin/chezmoi
```
- Menambahkan file yang akan di link ke chezmoi dan di push ke github

```
chezmoi add .zshrc .vimrc
```

file tersebut akan berada dalam folder `/home/xyz/.local/share/chezmoi` masuk kedalam folder tersebut lalu push ke dalam repo yang sudah dibuat

```
git remote set-url origin git@github.com:user/dotfiles.git
git add .
git commit -m "first"
git push origin main
```

- Jika ada perubahan atau update, jika ada perubahan dalam file .zshrc seumpama maka menggunakan update, maka file yang berada dalam folder `/home/xyz/.local/share/chezmoi` akan otomatis terupdate ke repo

```
chezmoi update
```

Belum lengkap nguliknya, jadi seperlunya aja dulu yang digunakan, komen aja nanti kita belajar bareng, terima kasih.
009🥇NHA CAI TRUC TUYEN UY TIN HANG DAU HIEN NAY🥇
Tags: 009009, 009, nhacai009, nhacai
Published: 2023-09-17 07:26:05

Nha cai 009 casino duoc cap phep hop phap boi tap doan PAGGOR boi chinh phu Philippines. Chung toi luon khong ngung phat trien ve cac dich vu va san pham ca cuoc cua nha cai nhu game bai, slot game, xo so, ca cuoc the thao. 
Email : nhacai009.com@gmail.com 
Website : https://nhacai009.com/ 
Dien Thoai : (+84) 0568280163 
#009 #nhacai009
Social:
https://www.facebook.com/nhacai009/
https://twitter.com/Nhacai009Com
https://www.youtube.com/@user-hg8mr9lf4s/about
https://www.pinterest.com/nhacai009com/
https://social.msdn.microsoft.com/profile/nhacai009/
https://social.technet.microsoft.com/profile/nhacai009
https://bbs.now.qq.com/home.php?mod=space&uid=5594501
https://www.blogger.com/profile/01379782070105525867
https://www.reddit.com/user/nhacai009
https://medium.com/@nhacai009.com
https://www.flickr.com/people/nhacai009/
https://www.tumblr.com/nhacai009
https://nhacai009com.wixsite.com/nhacai009
https://nhacai009.weebly.com/
https://nhacai009.livejournal.com/322.html
https://nhacai009.wordpress.com/
https://sites.google.com/view/nhaca009/trang-ch%E1%BB%A7
https://linktr.ee/nhaca009
https://www.twitch.tv/nhacai009/about
http://tinyurl.com/nhacai009
https://ok.ru/profile/589533180301/statuses/156528715796621
https://profile.hatena.ne.jp/tnhacai009/profile
https://issuu.com/nhaca009
https://dribbble.com/nhacai009com/about
https://nhacai009-s-exceptional-site.webflow.io/
https://nhacai-s-site-0d1f.thinkific.com/courses/your-first-course
https://500px.com/p/nhacai009com?view=photos
https://about.me/nhacai.009
https://tawk.to/nhacai009
https://www.deviantart.com/nhacai009
https://ko-fi.com/nhacai009com
https://www.provenexpert.com/nhacai009/
https://hub.docker.com/u/nhacai009
Best features of Spotify Premium
Tags: spotify, music
Published: 2023-09-17 07:21:58

Spotify is a digital music, podcast and video streaming service that provides users access to over 50 million songs. With Spotify, you can listen to the latest new releases from your favorite artists, discover new music genres, create and share playlists with friends and family, and find personalized recommendations for you based on what you’ve already listened to.
**Discover Weekly Playlist** - Spotify compiles a unique playlist of 30 songs every Monday, tailored to your music tastes and habits. This is the perfect way to find new music that you love!
**Create Your Own Playlists** - [Create your own playlists](https://spotifyauthority.com/how-to-create-a-playlist-on-spotify/) using any of the millions of available songs in Spotify's library. Personalize your listening experience by adding a unique touch to each playlist.
**Artist Radio** - Create an artist-specific radio station using Spotify's library. Get an endless stream of music from your favorite artists, as well as suggestions for similar artists and genres you may not have heard before.
**Song Lyrics Sync** - Listen to any song and follow along with the lyrics in real time, making it easy to learn new songs quickly.
**Browse Music** - Browse through Spotify's extensive library of music to find the perfect song for any mood or occasion. With millions of tracks available, you'll never run out of music to listen to.
**Crossfade Tracks** - Easily transition between tracks without any silence or gaps in the music. Perfect for creating party playlists or for transitioning between different kinds of songs without losing energy.
**Connect to Other Services** - With Spotify Connect, you can easily connect your favorite streaming services like Apple Music, TIDAL, and YouTube Music. Listen to music from any of these services while simultaneously browsing Spotify's library.
**Share Playlists** - Share your playlists with friends and family, or post them on social media to spread your musical tastes.
Explore Related Artists - Get personalized recommendations for new artists based on the music you like. Spotify will suggest similar genres and even connect you with emerging artists in those categories.
Offline Listening Options - Download songs to listen to offline, perfect for long commutes or traveling without access to a data connection. You can even save playlists for offline listening, so you never miss out on your favorite tunes!
How Do You Find Balance? 🍵🌊
Tags: discuss
Published: 2023-09-17 07:00:00

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

> Share a personal challenge you've faced in balancing your coding career with your mental health. How did you overcome it, and what advice would you give to others facing similar challenges?

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Cho thuê xe Sài gòn đi Mũi Né giá re
Published: 2023-09-17 06:46:47

Thuê xe có tài xế: Nếu bạn không muốn tự lái hoặc không thoải mái với giao thông ở Việt Nam, bạn có thể [thuê xe Sài gòn đi Mũi Né](https://www.xedulichvietnam.com/thue-xe-tu-sai-gon-di-mui-ne-gia-re-nhat/) ]có tài xế. Các dịch vụ này thường dễ dàng tìm kiếm và đặt trực tuyến. Bạn có thể tìm các dịch vụ này qua các trang web hoặc ứng dụng đặt xe như Grab, GoViet, hoặc liên hệ trực tiếp với các công ty thuê xe.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ph5ptzlfbzaufjvgozbz.jpg)
Thuê xe một chiều xe Sài gòn đi Mũi Né, xe Sài gòn đi Mũi Né, xe Sài gòn đi Mũi Né, xe Sài gòn đi Mũi Né hợp đồng, xe đời mới nhất, máy lạnh, xe đưa đón tận nơi xe Sài gòn đi Mũi Né, xe 4 - 45 chỗ đa dạng chuẩn loại đáp ứng các yêu cầu quý khách,
#thuexesaigonmuine
#thuexemuinesaigon
Tàu hoặc xe buýt: Nếu bạn muốn tiết kiệm chi phí và không cần sự thoải mái của việc tự lái hoặc thuê xe có tài xế, bạn có thể đi tàu hoặc xe buýt từ Sài Gòn đến Mũi Né. Các tùy chọn này có thể đòi hỏi thời gian và thăm khám kế hoạch của bạn, và bạn nên tra cứu lịch trình và giá vé trước khi đi.
Use n module from npm in order to upgrade node
Tags: node, ubuntu
Published: 2023-09-17 06:34:21

```
sudo npm cache clean -f
sudo npm install -g n
```

###To upgrade to latest version, you can use

```
sudo n stable
```

###To upgrade to latest version (and not current stable) version, you can use

```
sudo n latest
```

##Thanks to https://davidwalsh.name/upgrade-nodejs
The hassle of Frontend frameworks
Tags: webdev, beginners, newbie, hasanelsherbiny
Published: 2023-09-17 06:24:00

## What is framework?
there is a concept in programing called "DRY" which means don't repeat yourself and this makes sense why do i need to start everything from scratch if i already have my tools?
from this point the idea of frameworks came.

if we have a frequently used items why don't we add them into a toolbox and just extract this tools whenever we need it.
sounds familiar ? yes this is quiet familiar to [the concept of api](https://dev.to/hasanelsherbiny/what-is-api-21bc)

sure we can just use these items as is or use it as start point and then we add our customizations to it, this is called Framework.

## what is the problem?

since the appearance of the JavaScript in 1995 almost everyone have hated it and also fall in love with it as it's capabilities of adding interactions to the web pages ,tons of frameworks and libraries wear released either to facilitate it's usage or adding more capabilities.

but also this added much hassle to the developer comparing between different frameworks , which is better and what does every framework give me more than the other one.

and as usual every solution comes with its problems, these frameworks are evolving very quickly which is good but it also adds to the learning curve.
when new features are introduced new bugs are also introduced.

the good news here is that almost every framework uses the quiet same concepts and tries to adapt it by it's own way so you don't need to learn every framework released and only focus on the basics and higher concepts, then you will be able to move between the frameworks freely.
and as an advice don't follow frameworks trends as many promising frameworks are now dead, and only consider mature frameworks.
learning about GA4
Tags: googleanalytics, ga4, google, analytics
Published: 2023-09-17 06:21:48

**through this series I will cover all about GA4 to enhance and makes it easy for everyone to use this powerful tool from google to gain a detailed information about his customers and what are they doing inside the platform.**

GA4 refers to (google analytics) and it's the newer version of google analytics so let's dive into it and explore more about it.
we will start with digital analytics and what it is, this photo will facilitate on you to know the process for each stage 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jiw44a7ik8c2rvlmunua.png)
after knowing what is data analytics and what it's used for now we will go for the next stage which is simple marketing points  that shows the different stages of a customer journey :

1. Acquisition : involves building awareness of your product or service and acquiring user interest.​

2. Engagement : is when your users interact with your business. ​

3. Monetization and retention : is when a user becomes a customer 
   and makes a purchase.​


**after knowing this marketing points let's take a real example and show how we apply this points on a real example** 

Let's look at some real world examples. The Merchandise Store is an online retail store that sells branded products like T-shirts and coffee mugs. E-commerce sites like these use analytics to gain insights into customer behavior on the website to see how users find the Merchandise Store and that's called **acquisition**
, the products the users view and add to their shopping carts and that's called **engagement** , and which products users actually purchase and how many they bought and the last step it's called **monetization and retention**.​ 

**let's take another example to deeply inculcate the idea of marketing points :**

Another example is a mobile gaming app . Analytics can show how users find the app and download it and that's called **acquisition**, which screens within the app the user visits or gets stuck on and that's called **engagement**, and how many users make purchases in the app and the last step it's called **monetization and retention**.

so, we have talked today simply about digital analytics the definition and what they are used for in addition we have go through the steps of marketing points that every customers have it through his journey inside a website or an app and lastly we have taken two different examples to see how the marketing points apply.

**I hope this article was concise enough for anyone who is searching for this tool and stuck in additionally i hope it makes you recognize and perceive the information easily.**

see you on the next article to talk about handling data with GA4 stay tuned and see you soon.
Semplice – Multipage theme
Tags: astro, tailwindcss, webdev, design
Published: 2023-09-17 06:18:39

Semplice – Multipage theme
Built with Astro, Tailwind CSs & MDX

Includes:
- Pages 52
- Sections 100+
- Components 100+

Learn More: http://lexingtonthemes.com/info/semplice/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vye6x2o6glsusmldat6x.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39vnknh83kro4ku0g04w.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pc9zm822jb58500rglwh.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g9g0olfpm3eef2w8c2x8.png)
What is CQRS Pattern?
Tags: webdev, cqrs, designpatterns, programming
Published: 2023-09-17 05:51:05

CQRS, which stands for Command Query Responsibility Segregation, is a software architectural pattern used in software development, particularly in the context of designing and building complex applications. The CQRS pattern separates the responsibility for handling commands (requests that change the state of an application) from the responsibility for handling queries (requests that retrieve data from the application).

Key characteristics of the CQRS pattern include:

1. Separation of Commands and Queries: In a CQRS-based architecture, commands (e.g., creating, updating, or deleting data) are handled separately from queries (e.g., reading data). This separation allows each part of the application to be optimized for its specific task.

2. Command Handlers: Command handlers are responsible for processing commands. They update the application's state and can perform tasks such as validation, authorization, and triggering domain logic.

3. Query Handlers: Query handlers are responsible for retrieving data in response to queries. They are optimized for reading data efficiently and do not modify the application's state.

4. Event Sourcing: Often used in conjunction with CQRS, event sourcing is a pattern where the state of an application is determined by a sequence of events. Events are recorded when commands are executed, and the application's state is reconstructed by replaying these events.

5. Scalability: CQRS can improve the scalability of an application since commands and queries can be scaled independently. This is especially useful in scenarios where read and write workloads have different performance requirements.

6. Complex Domains: CQRS is particularly beneficial in applications with complex domain models where different operations have distinct requirements.

CQRS can provide benefits in terms of performance optimization, scalability, and flexibility in designing systems that need to handle a variety of data manipulation and retrieval operations. However, it can also introduce complexity and is best suited for situations where the separation of concerns between commands and queries is advantageous.
Inviting you to an "FREE" Exclusive AI MASTERY WORKSHOP 🤖
Published: 2023-09-17 05:01:49


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikmdauhrvu9f0rcvkogy.jpeg)✅ Want to release apps in days instead of weeks?
✅ Want to stand out and secure rapid promotions?

Inviting you to an Exclusive AI MASTERY WORKSHOP 🤖

By Revanth Konakanchi, Head of Engineering - NxtWave, IIT Guwahati Alumnus. ✨

Build your own enterprise apps using LLMs (Large Language Models) 💻

📅 September 23, 2023

⚠️ Limited Seats. 

Register Now For FREE! 👇
 [https://nxtwavegenai.page.link/fa6isJ5ZoWvSfQoZ8](https://nxtwavegenai.page.link/fa6isJ5ZoWvSfQoZ8)
Mastering ASP.NET Core Web API: A Comprehensive Guide to Building, Securing, and Deploying RESTful Services
Tags: aspnet, aspdotnet, dotnet, dotnetcore
Published: 2023-09-17 05:01:43

# ASP.NET Core Web API

ASP.NET Core Web API is a framework for building RESTful web services. It allows us to expose data and business logic to the web using HTTP. In this article, we will learn how to:

- Create a web API project
- Add model classes and a database context
- Scaffold a controller with CRUD methods
- Configure routing and URL paths
- Call the web API from a client
- Add authentication and authorization
- Deploy the API

## Creating the Project

We can create a Web API project in ASP.NET Core using any of these options:

- Visual Studio
- Visual Studio Code
- Visual Studio for Mac
- .NET CLI

For example, using the .NET CLI we can run:

```bash
dotnet new webapi -o TodoApi
cd TodoApi
```

This will create a new Web API project named `TodoApi`.

## Adding Model Classes

We define model classes to represent the data our API will manage. For example, a `TodoItem` class:

```csharp
public class TodoItem 
{
    public long Id { get; set; } 
    public string Name { get; set; }  
    public bool IsComplete { get; set; }
}
```

## Adding a Database Context

We create a database context class that derives from `DbContext`:

```csharp
public class TodoContext : DbContext
{
    public TodoContext(DbContextOptions<TodoContext> options)   
        : base(options) { }
        
    public DbSet<TodoItem> TodoItems { get; set; }
}
```

We then register the context with Dependency Injection in `Program.cs`:

```csharp
builder.Services.AddDbContext<TodoContext>(opt =>
    opt.UseInMemoryDatabase("TodoList"));
```

## Scaffolding a Controller

We can scaffold a controller with CRUD methods using:

```
dotnet aspnet-codegenerator controller ...
```

This will generate a controller class marked with the `[ApiController]` attribute and methods to `GET`, `POST`, `PUT` and `DELETE` todo items.

## Configuring Routing

We use attribute routing to define the URL paths for our API. For example:

```csharp
[Route("api/[controller]")]
[ApiController]
public class TodoItemsController : ControllerBase
{
    [HttpGet]
    public IActionResult Get() { ... }
    
    [HttpGet("{id}")]
    public IActionResult Get(int id) { ... }
}
```

This will map to the URLs:

- `/api/todoitems` 
- `/api/todoitems/{id}`

## Calling the API

We can call the API from:

- JavaScript
- Postman 
- cURL 
- Mobile clients

For example, using cURL:

```bash
curl -X GET "https://localhost:5001/api/todoitems"
```

## Authentication and Authorization

We can secure our API using:

- JWT Bearer Tokens 
- Azure Active Directory  
- OAuth2 / OpenID Connect (using IdentityServer4)

## Deploying the API

We can deploy our API to:

- Azure App Service
- AWS Elastic Beanstalk
- Heroku
- Docker

Hope this helps! Let me know if you have any other questions.

### These Books Will Help You Achieve Web API Excellence!

{% embed https://codemaze.gumroad.com/l/ultimateaspnetcorepremiumv2?a=320960723 %}
Binary Numbers
Tags: beginners, programming, productivity
Published: 2023-09-13 18:14:42

Binary number system, in mathematics, is a positional numeral system employing 2 as the base and so requiring only two different symbols for its digits, 0 and 1, instead of the usual 10 different symbols needed in the decimal system. The numbers from 0 to 10 are thus in binary 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, and 1010. The importance of the binary system to information theory and computer technology derives mainly from the compact and reliable manner in which 0s and 1s can be represented in electromechanical devices with two states.

Decimal system, also called the Hindu-Arabic number system or Arabic number system, in mathematics, is a positional numeral system employing 10 as the base and requiring 10 different numerals, the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. It also requires a dot (decimal point) to represent decimal fractions. In this scheme, the numerals used in denoting a number take different place values depending upon position. In a base-10 system the number 543.21 represents the sum (5 × 102) + (4 × 101) + (3 × 100) + (2 × 10−1) + (1 × 10−2).

This number system, with its associated arithmetic algorithms, has furnished the basis for the development of Western commerce and science since its introduction to the West in the 12th century CE.

Byte is the basic unit of information in computer storage and processing. A byte consists of 8 adjacent binary digits, each of which consists of a 0 or 1. There were four- or six-bit bytes, but eventually, the standard settled on eight bits. The string of bits making up a byte is processed as a unit by a computer; bytes are the smallest operable units of storage in computer technology. A byte can represent the equivalent of a single character, such as the letter B, a comma, or a percentage sign, or it can represent a number from 0 to 255. Because a byte contains so little information, the processing and storage capacities of computer hardware are usually given in gigabytes.