teleren/devto huggingface dataset:
Days_8 Affirmation Generator
Published: 2023-03-19 10:46:27

Today's focus is using all the skills you have learned so far:

input and output
concatenation
if statements
nested if statements
Build a custom affirmations generator to give the user a customized affirmation each day of the week.

```
#Nesting Dolls Code
#
#19 MARCH 2023

def exercise_1():
  activity=input("What are you doing in sunday? ")
  if activity.lower() == "joging":
    print(activity.capitalize(),"is healthy lifestyle!!!.")
    Where =input("Where do you joging? ")
    if Where == "Hi":
      print(activity.capitalize(),"in",Where,"a great place!!!")
    else:
      print("interesting place")
  elif activity.lower() == "sleep":
    print(activity.capitalize(),"bad habits!!!")
  else:
    print("have a nice day")
def call():
  exercise_1()
call()
```
The final challenge is to create if statements that do not care about the capitalization of the names entered by the user.
GitHub Actions and Workflows
Tags: github
Published: 2023-03-19 10:39:25

---
title: GitHub Actions and Workflows
published: true
description: GitHub Actions have two meanings and it has been confusing me for quite some time. 
tags: github
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-19 10:38 +0000
canonical_url: https://code-maven.com/github-actions-and-workflows
---

I feel a bit cheated. Maybe it is only I who misunderstood things, or maybe GitHub had a bit of a name-mess.


For each GitHub project you can set up something they call [GitHub Actions](https://docs.github.com/en/actions), even the link in every project is called "Actions".
So if you happen to visit the [source](https://github.com/szabgab/code-maven.com/) of the [Code Maven](https://code-maven.com/) web site then you'll have a link called [Actions](https://github.com/szabgab/code-maven.com/actions).

However what you see there is actually the output of the [GitHub Workflows](https://docs.github.com/en/actions/using-workflows), or as I see they put it <b>GitHub Actions workflows</a>.

Each such workflow is a combination of some code and some configuration of [GitHub Actions](https://github.com/actions/). However in this sentence the name "GitHub Actions" referred to the building blocks of the workflows.

In a nutshell `GitHub Actions` refer to two things. The workflows and the building blocks of the workflows.

Earlier, in most of my blog posts and training materials I used the name GitHub Actions to refer to the whole thing, but I'll need to reconsider this to make it easier for people to understand why the actions (workflows) are defined in a folder called workflows and why are they using building blocks that are also called "GitHub Actions" despite not being workflows.

## Workflows

A `GitHub Actions workflow` is something you define in a YAML file in the `.github/workflows/` folder of your git repository. It can be built from plain commands in Bash or basically any programming language, but it can also use a huge set of building blocks called `Actions`.


## Actions

The Actions provided by Github are all stored in the [action GitHub organization](https://github.com/actions/). Each action is a separate repository.

Everyone can create additional actions that can be private or can used by anyone. There is a whole [Marketplace of Actions](https://github.com/marketplace?category=&query=&type=actions&verification=) where you can locate more of these pre-built blocks.

As of this writing on 2023.03.19 there are 17,685 actions in the marketplace and probably there are lot more that were not published to the marketplace.
How to prevent objects from using the same resource and causing bugs in your program??
Tags: csharp, dispose
Published: 2023-03-19 10:26:28

Everyone;💁🏻‍♀️ meet the dispose method.
👉The purpose of the dispose method is to perform all tasks related to freeing resources held by an object. Even if you stop on the Dispose method in Visual Studio, it says “Release all resources used by the selected object.”
In cases where resources are being used, we use Dispose method to tell the object: “🥸Hey Bro!! You’re done using the resource, free it so somebody else can use it🚶‍♀️.”
If we don’t do this, it will cause bugs if something else is trying to use the same resource.
🤓So, we call the dispose method to free it up as soon as the object is done using that resource.

To find more info you can visit this link:
https://lnkd.in/eH-pGTGC
[Sass]: Font mixin
Published: 2023-03-19 10:26:17

Hi. Today I will show you my Sass mixin to generate a font and how to add it from the local assets folder.

[1]. For generate:

```
$ffBack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji","Segoe UI Symbol", "Noto Color Emoji"

=ft($fz, $lh: 16, $fw: inherit, $ff: null) 
  $lh: $lh/$fz
  $fz: $fz/16 + rem
  
  @if($ff) 
    $family: $ff, $ffBack
    font: $fw $fz/$lh $family
  
  @else 
    font-weight: $fw
    font-size: $fz
    line-height: $lh

```

And for usage, we just call it a mixin:

```   
h1
  +ft(32, 38, 700)
  
h2
  +ft(28, 32, 700, "Inter")  
```

Looks like this [CSS](https://codepen.io/anastasiiaxfr/pen/GRXBPdG).

[2]. Add font from local assets folder (compiled styles and font folders inside assets) [[code](https://codepen.io/anastasiiaxfr/pen/RwYBvov)]:

```
$fontSrc: '../fonts'

$fntName: (Montserrat-Black, 900), (Montserrat-Bold, 700), (Montserrat-SemiBold, 600), (Montserrat-Medium, 500), (Montserrat-Regular, 400), (Montserrat-Light, 300)

=font($fntName, $fntSrc)	
    @each $fnt, $fntw in $fntName
        @font-face 
            $fntFldr: 'Montserrat'
            font-family: '' + $fnt + ''
            font-style: normal
            font-weight: #{$fntw}
            font-display: swap
            src: local('' + $fnt + ''), local('' + $fnt + ''), url($fontSrc + '/' + $fntFldr + '/' +'#{$fnt}.woff') format('woff'), url($fontSrc + '/' + $fntFldr + '/' +'#{$fnt}.woff2') format('woff2'), url($fontSrc + '/' + $fntFldr + '/' +'#{$fnt}.ttf') format('ttf')

+font($fntName, $fontSrc)
```

It looks like this:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/372hsuni0mvgc2hytx0f.jpg)
Custom Software Development Service in the world
Tags: javascript, python, programming, react
Published: 2023-03-19 10:19:51

Custom software development services refer to the process of designing, creating, and maintaining software that is tailored to meet the specific needs and requirements of a particular organization or business.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otptmxh7v5mc68bej5cx.jpg)
Custom software is typically developed when off-the-shelf software solutions are not sufficient to address an organization's unique requirements. Custom software development can involve building a software system from scratch or modifying an existing system to meet specific needs.

Custom software development services can be provided by software development companies, freelancers, or in-house teams. The process usually involves several phases, including planning, design, development, testing, deployment, and ongoing maintenance.

The benefits of custom software development services include:

Tailored solutions: Custom software is designed to meet the specific needs and requirements of a particular organization, ensuring that it is a perfect fit for their business.

Greater flexibility: Custom software can be modified and updated as the organization's needs change, providing greater flexibility and agility.

Better integration: Custom software can be integrated with existing systems, ensuring that it works seamlessly with other applications and tools used by the organization.

Increased efficiency: [Custom software](https://www.bdtask.com/blog/custom-software-development-company) can automate repetitive tasks and streamline workflows, improving efficiency and productivity.

Competitive advantage: Custom software can provide organizations with a competitive advantage by enabling them to offer unique services or capabilities that are not available through off-the-shelf software solutions.

When choosing a custom software development service provider, it is essential to consider factors such as their experience, expertise, portfolio, and pricing. It is also important to establish clear communication channels and project goals to ensure that the end product meets the organization's needs and expectations.
You can do it
Published: 2023-03-19 10:16:06

Sometime is difficult to feel recognized by others but I bet that you have a good set of skills and you can do better learn more and be what you want to be it's always difficult for all of us we all have our inner problems but we push ourselves throw all the problem and situation in our life to be our better vision there is nothing guarantee in life but, we all looking for success and realization.

Keep moving!!!
Be happy!!

<!-- ✨This template is only meant to get your ideas going, so please change/add/remove these prompts as you wish! ✨ -->
Static members in C#
Published: 2023-03-19 10:14:43


**Static members in C#**
The main purpose of using static classes is to provide blueprints of their inherited classes. 

**Advantages of static classes**
1. Every member of a static class must be static or else you’ll get an error.
2. Static members can only be accessed by their class name.
3. Static class members are accessed by the class name followed by the member name.
4. The static keyword is used before the class keyword in a class definition to declare a static class.

credits:https://www.c-sharpcorner.com/UploadFile/74ce7b/static-class-in-C-Sharp/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g02a4jdz13z7lxs2e8ql.jpg)
Looking for advice..
Published: 2023-03-19 10:06:43

It's hard to be a self-learner in TI industry I think that there is too many information out there it's not dispose it in a manageable way but, if you try hard and you do the right over looking for the better way to learn ,which is from the easiest things to the toughest is probably a good way to learn and as everybody out there say's practice, practice, and more practice.
There is not a golden pill that will make you go faster than others and you should not look for that but I encourage you to keep looking and trying, I am a beginner too and there is always something to learn.

This is the first time that I write in here feel free to comment and give me some advice.
Weekly Challenge 208
Tags: perl, python, theweeklychallenge
Published: 2023-03-19 09:51:23

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-208/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-208/sgreen)

Last minute commit this week, so this blog will be briefer than usual.

## Task 1: Minimum Index Sum

### Task

You are given two arrays of strings.

Write a script to find out all common strings in the given two arrays with minimum index sum. If no common strings found returns an empty list.

### My solution

This is one of those tasks where optimisation of the solution probably isn't required. I'm sure some clever Team PWC people have a blog post on the most optimal solution.

For this task, I extract the word-like strings from the first two parameters, and call them `first_list` and `second_list` (yeah, really imaginative list names!)

I then set `index_sum` to one more than the length of the combined list. This ensures that if we do find a solution `index_sum` will be lower.

I then iterate over `first_list`, with `i1` as the index position and `w` being the word at that position. I then retrieve the position of that word in the `second_list`. If it appears, I calculate the sum of the positions, and take action if it is the same or less than the current `index_sum` value.

Python doesn't seem to have a built in command to get the index of an item in a list that matches a criteria (in this case the word), so I created a function called `find_index_in_list` to do this. To be fair, neither does Perl, but [first_index](https://metacpan.org/pod/List::MoreUtils#first_index-BLOCK-LIST) from List::MoreUtils does what we want.

### Examples

```bash
$ ./ch-1.py "Perl Raku Love" "Raku Perl Like"
("Perl", "Raku")

$ ./ch-1.py "A B C" "D E F"
()

$ ./ch-1.py "A B C" "C A B"
("A")
```

## Task 2: Duplicate and Missing

### Task

You are given an array of integers in sequence with one missing and one duplicate.

Write a script to find the duplicate and missing integer in the given array. Return -1 if none found.

For the sake of this task, let us assume the array contains no more than one duplicate and missing.

### My solution

The examples don't give us an indication on what the expected output is when there is no duplicate, but there is a missing number, as is the case with `[1, 2, 33, 4]`. In the case, the first value in the output is going to be blank.

For this task, I iterate from 1 to the length of the array, and count the number of items in the list that have that value. If there are none, I set the `missing` value. If there is more than 1, I set the `duplicate` value.

Finally I print the output as provided in the examples.

### Examples

```bash
$ ./ch-2.py 1 2 2 4
(2, 3)

$ ./ch-2.py 1 2 3 4
-1

$ ./ch-2.py 1 2 3 3
(3, 4)

$ ./ch-2.py 1 2 3 33
(, 4)
```
My CSS mistakes
Tags: css
Published: 2023-03-19 09:43:14

---
title: My CSS mistakes
published: true
date: 2023-03-19 09:41:50 UTC
tags: css
canonical_url: https://blog.nicm42.co.uk/my-css-mistakes
---

This is inspired by a [video Kevin Powell did](https://www.youtube.com/watch?v=GWkMYvoCXyQ), which was itself inspired by [Geoff Graham's CSS Tricks article](https://css-tricks.com/my-dumbest-css-mistakes/). Here are my stupid CSS mistakes.

## background-colour !== color

Sometimes, if I don't have text on an element, instead of writing `background-color: red` I'll instead write `color: red` and then spend ages wondering why the background colour hasn't changed.

It's obvious if there's text there because it'll be the colour I expected the background to be. But if not it can take me ages to work out what I've done. The IDE and browser will both tell me the CSS is fine. It just seems to be randomly not working for some inexplicable reason. Until I realise what I've done.

## colour

Most of the time when I write CSS it will auto-complete, so I only get a few letters into the word and it'll spell it the American way for me. But on the occasions I'm coding in something that doesn't have auto-complete (eg CodePen) I have to type the whole thing and naturally I spell it the same way I spell it outside of coding.

At least this mistake is easy to pick up because whatever I've written it in will complain about it. And since I do it quite often, I know what I've done.

## Media queries

Sometimes I write the media query and then assume it knows what I'm talking about. For example:

```
@media (min-width: 1250px) {
  color: red;
}

```

I know what element I want to make red once the browser width reaches 1250px. Unfortunately, the browser cannot read my mind.

## margin

It's a short word, very easy to type. Except that when coding I am incapable of putting all the letters in the right order. The first and last letters are generally right, but then rest could come out in any order.

Generally speaking auto-complete saves me on this one, again it's the occasions when I don't have it that I end up re-typing bits of the word.

## margin and padding order

If there are four properties I know they are North, East, South, West and that's fine. But if there are two, are they top/bottom then left/right or the other way round? I purposely don't write these because they confuse me. I'll write two separate lines, one for block and one for inline. But I often come across someone else's code where they have two properties and I have to modify one.

It doesn't matter how many times I do it, I always get it the wrong way round. No matter how many times I think "I know it now, I'll remember for the future", I've then forgotten the next time I come to it.

On the plus side, at least I can try it, discover that's wrong and then change it to the other one. I know I have a blind spot with it, I know it'll take me two goes to get it right; I don't have to spend ages trying to find the mistake.
CSS Min-Width & Max-Width Tutorial
Tags: html, css, beginners, webdev
Published: 2023-03-19 05:03:22

**Code**

``` html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    #first {
      border: 3px solid;
      min-width: 600px;
      max-width: 800px;
    }


    img {
      width: 100%;
    }
  </style>
</head>

<body>
  <h1> Yahoo Baba Css Min-Width and Max-Width</h1>

  <div id="first">

    <img src="/11/aksh.jpg" alt="">
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis soluta animi quisquam, quia quos voluptas perferendis labore, totam ipsum illo similique repellendus harum ipsam. Voluptas odio alias voluptatibus reprehenderit libero.
  </div>
</body>

</html>
```

**Output**
![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jzbo53h6rgsnvbk2xdp.png)

Thank You.
You can follow us on:
[Youtube ](https://www.youtube.com/c/ULTIMATEPROGRAMMING)
[Instagram](https://www.instagram.com/full_stack_web_developer1/)
How to install postgresql-server-dev-11 on ubuntu
Tags: postgres, apacheage, database
Published: 2023-03-19 09:40:46

to install postgresql-server-dev-11 on ubuntu

you need to run this command:

`sudo apt install postgresql-server-dev-11`

but it may give the following Error:

_Unable to locate package postgresql-server-dev-11_

This is probably happening because your version of Ubuntu does not have this package available. You could add the PostgreSQL package repository on your system, add the GPG key of it, and then update the package list. Just use these commands:


```
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

# Update the package lists:
sudo apt-get update
```


I hope this will help you.

[Reference](https://www.postgresql.org/download/linux/ubuntu/)

postgresql-server-dev-11 is recommended for the installation of apache Age and Age viewer

see more about Apache Age:

official website: [https://age.apache.org/](https://age.apache.org/)

Github: [https://github.com/apache/age](https://github.com/apache/age)
Legislating AI
Tags: ai, webdev, productivity, tutorial
Published: 2023-03-19 09:31:20

Every field including artificial intelligence calls for the development of public sector policies and laws for regulating them in every jurisdiction (all legal boundaries) globally,  Regulation is necessary to both encourage AI and manage associated risks. I liken the current state of AI regulation to kids playing and all of a sudden they come back crying with various injuries because no rules were laid down for how they should play.

There are still a lot of unanswered questions in many territories about simple things like copyright; do AI(s) have copyrights? if an AI is modeled on a person's data does the person have any ownership? are there forbidden AI algorithms or is it the wild west? these and many more are some of the things to consider deliberately.

It is important that there are legislative frameworks for judges and lawyers to follow on how to approach AI-related cases. If all the legal cases involving AI are brought to court without existing legal frameworks the AI companies will win most of the cases; they typically have more money and better lawyers. It will also continue to favour them in future because of the legal precedence established.

What do you think important components of AI law should be?
01 berufliches Vorwärtskommen: Was gehört für dich dazu
Tags: austausch, deutsch, job, career
Published: 2023-03-19 09:29:43

Moin Moin,

heute startet meine Serie des Austauschs mit folgendem Anliegen: Was gehört für dich zum beruflichen Vorwärtskommen dazu ?

Dabei sei angemerkt, dass berufliches Vorwärtskommen, in einem Wort gefasst, auch als _Karriere_ bezeichnet wird ( was wiederum auch den schnellsten Galopp eines Pferdes bezeichnet ) [ dwds.de ↗ ](https://www.dwds.de/wb/Karriere).

Meine Frage an dich lautet: „Wann kommst du beruflich vorwärts ?“ oder auch „Wann fühlst du dich beruflich aufgehalten ?“


Für mich ist Fortbildung wesentlich. Informatik ohne Fortbildung ergibt ( für mich ) keinen Sinn. Zur Zeit lerne ich OpenBSD. Ich habe vorher stets Debian GNU/Linux für meine Dienstrechner ( Server ) genutzt.
Aufgehalten komme ich mir vor, wenn ich nichts von dem was ich lerne in der Praxis anwenden kann ^^ .


Also, wann kommst du beruflich Vorwärts oder fühlst dich aufgehalten ?


Beste Grüße,
Mustafa