teleren/devto huggingface dataset:
.Net 6.0 da Entity Framework bila ishlash
Published: 2022-10-29 11:49:45


**Ef Core** bilan ishlash uchun quyidagi package lar kerak bo'ladi
-  ` Microsoft.EntityFrameworkCore`
-  `Microsoft.EntityFrameworkCore.Design`
-  `Microsoft.EntityFrameworkCore.Tools`
-  `Microsoft.EntityFrameworkCore.Sqlite` - buning o'riniga sql yoki postgersql va boshqa databaselardan foydalanish mumkin.
  
Buning uchun bizga 1 ta User classi va 1ta DbContext classi yetarli bo'ladi
1.  1 ta User classi yaratamiz 
```cs
 public class User
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Phone { get; set; }
    }
```
2.UserDbContext classi quyidagicha 
```cs
 public class UserDbContext : DbContext
    {
        DbSet<User> Users { get; set; }
        protected override void OnConfiguring(DbContextOptionsBuilder options)
        {
             options.UseSqlite("Data source = user.db");
        }
    }
```
program.cs da esa 
var context = new UserDbContext(); kabi 1 ta obyekt olamiz 

`dotnet ef migrations add name` - terminalga shu komandani yozsak EF Core orqali table ochib beradi. Bunda name sifatida ixtiyoriy nom tanalanadi.
Database ochilganiga ishonch hosil qilganimizdan so'ng uni saqlashimiz uchun `dotnet ef database update` comandasi yoziladi .

**Database**dagi tablega create qilayotgan payda obyekt qo'shish quyidagicha amalga oshiriladi .
**Eslatma** - Har doim `database` - ga o'zgartirish kiritgandan so'ng `dotnet ef migrations add name` va ishonch hosil qilgandan so'ng   `dotnet ef database update` comandalarini terminalga yozish zarur
```cs
  protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.Entity<User>().HasData(new User()
            {
                Id = 1,
                Name = "Jamoliddin",
                Phone = "937072078",
            });

        }
```
setTimeout(),setInterval() and clearTimeout() in JavaScript
Tags: javascript, webdev, programming, tutorial
Published: 2022-10-29 11:32:41

**setTimeout():** This method allows us to execute a piece of code after a certain amount of time.



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



In the above example, the myName function will be executed after 2 seconds (2000 milliseconds). For the setTimeout() function, the duration after which the code has to execute will be passed in milliseconds.



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




In the above example, we can see that we are passing a parameter to the myName function via the setTimeout() function.

**setInterval():** This method executes a piece of code repeatedly with the fixed time delay between each call




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




In the above example, the myName function will be executed repeatedly after every 2 seconds (2000 milliseconds).We can also pass parameters to the setInterval() method, similar to the setTimeout() method as discussed before.

**clearTimeout():** This method helps us to clear the timeout previously set by the setTimeout() method. The setTimeout() method returns an ID which must be passed to the corresponding clearTimeout() method


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

In the above example, the ID returned by the setTimeout() method is stored in the timeoutID and will be passed to the clearTimeout() method. In the above scenario, we have two buttons: one to show the alert and the other one to stop the alert. 
We have a function named showAlert() that will display the alert message. The clearTimeout() function is used by stopAlert() to clear all timeout settings. The alert window will not be displayed if the stopAlert button is clicked before the completion of 2 seconds from when you clicked the showAlert button.
Dear "developers" who insist they don't need HTTPS, or SSL certificates
Tags: security, https, webdev, rant
Published: 2022-10-29 11:29:26

Please invite me somewhere we can share the same network, you know, so you can showcase your brilliance and websites that don't use HTTPS while I steal every piece of personal data I can.

Seriously, security is not a fucking joke, stop dicking around...
Agent-based social segregation model
Published: 2022-10-29 09:33:38

In this post I will briefly present an agent-based simulation model that can be used for modeling e.g. social segregation. 

## Framework for agent-based models in Python

The framework for modeling agent-based models in Python the abm_framework. I made this framework available on Github. The repository is here: [abm_framework](https://github.com/LinnartSF/abm_framework)

The repository contains a directory with demo models. The directory is located [here](https://github.com/LinnartSF/abm_framework/tree/main/demos). At the time of this post the directory contains a segregation example and a disease spread SIR model example.
## Model logic and implementation

The code for the model is available [here](https://github.com/LinnartSF/abm_framework/blob/main/demos/segregation.py). The model essentially implements the following workflow:

1) For each iteration one random agent is selected
2) The agent's neighbourhood is collected
3) For every agent of same type the agent's utility increases
4) For every agent that is not of same type utility decreases
5) Up to 10 random empty cells in the grid are collected
6) If the agent's utility would be higher in one of the cells, the first cell with higher utility is assigned as the agent's location (relocation)

## Simulation results

Below is an animation of the simulation run, showing the segregation process.


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

Another animation, shown below, shows agent utility density distribution.

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

## References to related agent-based simulation content

If you are interested in agent-based modeling and simulation you can also look at some other simple examples that I have published:

- [Agent-based SIR model in Python](https://www.supplychaindataanalytics.com/agent-based-sir-model-python-example/)

- [Agent-based segregation model in Python](https://www.supplychaindataanalytics.com/agent-based-segregation-model-python/)
What I've been reading (week 43, 2022)
Tags: watercooler, news, discuss
Published: 2022-10-29 09:32:48

Here's seven blog posts or other links that I liked this week…

## [How to (not) make a button](https://pustelto.com/blog/how-to-make-a-button)

This is why friends don't let friends use onClick on a div to emulate a button (and it's a similar story for emulating links)

## [Cloudflare Workers and micro-frontends: made for one another](https://blog.cloudflare.com/better-micro-frontends)

Qwik and edge workers 😍 I think this is the most responsible way of doing micro frontends (individual, separately maintained JS/CSS/HTML apps stitched into a single user-facing app) that I've seen so far. Duplicating client-side libs would still be an issue to solve though.

## [What “Work” Looks Like](https://blog.jim-nielsen.com/2022/what-work-looks-like)

This is something I'm struggling with at the moment, how to force time away from everything else to be alone with my thoughts about a problem, without simultaneously being on a call, Miro board, or worrying about blocking other team mates out from the process by not doing things together.

## [What is a developer experience team?](https://leaddev.com/productivity-eng-velocity/what-developer-experience-team?utm_term=Autofeed&utm_medium=Social&utm_source=Twitter#Echobox=1666673604)

DevEx teams have become increasingly common over the past five years. Here's everything you need to know about how they work.

## [What forces layout/reflow. The comprehensive list.](https://gist.github.com/paulirish/5d52fb081b3570c81e3a)

Looks useful for the future, a big list of the things that can cause a layout/reflow in a browser (calculations that can make a page feel janky or sluggish), and some info on what to do about it.

## [Debrief from Performance.now conference](https://stuart-mcmillan.com/blog/webperf/perfnow.html)

A nice roundup of #perfNow from @mcmillanstu. This looks like a great conference and one I'd love to go to in the future! 

## [DWP Accessibility Manual](https://accessibility-manual.dwp.gov.uk)

Lots of good stuff here, especially the 'Guidance for your job role' section!

---

I also [tweet these as I find them (@philw_)](https://twitter.com/philw_) and post them on my personal site at https://wolstenhol.me/#reading.

What were your favourites? Was there anything you found useful?

{% user philw_ %}
9 LITTLE KNOWN WAYS TO SALESFORCE SPECIALIST CERTIFICATION
Published: 2022-10-29 09:24:24

<b>salesforce marketing cloud email specialist certification practice test</b>:- You will get hold of excellent verified : Finance and Operations Apps Solution Architect AZ-500 Exam Dumps in pdf layout created with the aid of using professionals. Our professionals frequently replace the AZ-500 Exam Dumps examination content material in line with the marketplace trend, assisting you to  the Microsoft (AZ-500 Exam Dumps) examination effortlessly. Why Choose Exams Hero ? • Exams Hero affords AZ-500 Exam Dumps actual examination questions and validated solutions. • With the great AZ-500 Exam Dumps PDF dumps, you could get a rating of greater than 6%. • Exams Hero affords loose  months updates of AZ-500 Exam Dumps examination dumps. Therefore, you could replace it for brand new AZ-500 Exam Dumps examination questions. • We provide / customer service to our respectable customers • Comprehensive evaluation of the quantity of mind statistics makes it simpler to stumble on weaknesses with inside the : Finance and Operations Apps Solution Architect check. Expertly Designed Microsoft AZ-500 Exam Dumps to Pass Exam in First Try: Exams Hero creates specific Microsoft AZ-500 Exam Dumps examination dumps to help you clean the examination for your first try.

Click Here More Info >>>>> https://dumpsarena.com/salesforce-dumps/marketing-cloud-email-specialist/
How to Use CSS Selector in Elementor
Tags: wordpress, css, elementor
Published: 2022-10-29 08:39:52

Elementor is arguably the best plugin to create a website in WordPress. Especially for those putting design on the emphasis. Elementor is a page builder plugin for everyone. From novice users to advanced users with CSS knowledge.

Although Elementor already offers plenty of design options for its design elements (called widgets), you might want more. If you have CSS knowledge, you can apply certain styling (that is not available in Elementor by default) using custom CSS.

In Elementor, you can apply a certain styling via custom CSS to each widget (and elements of a widget) on your design. Each Elementor widget has a unique CSS class as the selector. To find out the Elementor widget selector, you can simply inspect the widget on your web browser (make sure to run the inspect on a live page).

## Acessing Custom CSS Feature in Elementor

The custom CSS feature of Elementor can be accessed on the **Advanced** tab on the settings panel. Simply go to **Advanced -> Custom CSS** to access it. You can place your CSS code on the **Custom CSS** block.

## How to Use CSS Selector in Elementor

As mentioned earlier, each Elementor widget (and its elements if it has ones) has a unique class selector. You can find out the class name by inspecting the associated widget on web browser. To inspect a widget, you can right-click on the on a widget and select **Inspect**.

For example, the selector name of the Heading widget is `.elementor-heading-title` as you can see on the screenshot below.

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

After finding the selector name belongs to a widget, you can type the following format on the **Custom CSS** field.

`selector [selector name] {}`

You can place your declaration inside the curly brackets. Example:

`selector .elementor-button{
    border: 4px solid red;
}`

The code above will result in the following output.

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

If a widget has child elements, you can also target a specific element to apply the custom CSS to. For instance, the text element of the Button widget has the selector name of `.elementor-button-text`. So, if you replace the selector on the code above with the selector of the text element as below,

`selector .elementor-button-text{
    border: 4px solid red;
}`

It will result in the following output.

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

Each Elementor widget has a parent element (wrapper). To target the wrapper, you can simply type `selector {}`. Example:

`selector {
    border: 4px solid red;
}`

The code above will result in the following outout.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4th78h43s4qul0z19cv.jpg)
Okinawa Flat Belly Tonic Reviews: Effective Supplement for Reduce Belly Fat!
Published: 2022-10-29 06:47:49

The resounding majority certainly do like using this. I've known many competitors who make assumptions. Many confidants believe that is unethical. This is how to get this prerogative without your doodad. They went into the danger zone on that one. I'll sense you say that to all the girls. That's your opportunity to try out using it. 

This was an unexpected change. I, in fact, cannot approve of cognoscenti using it. It is how to create your own [Okinawa Flat Belly Tonic](https://www.outlookindia.com/outlook-spotlight/okinawa-flat-belly-tonic-dark-truth-exposed-that-will-change-your-mind-news-224624
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ry10tq6x9j9gx83i5w6e.jpg)). This, we are told, was though of as a good thing. Allow me to get a little bit nostalgic. This is something all the top corporate lovers know. You may want to choose now. In a competitive war you don't hand an advantage like that to the enemy. 

There will come a day when all my labors here is finished. Masters are passionate as that regards to Okinawa Flat Belly Tonic. The resounding majority certainly do like using this. I've known many competitors who make assumptions. Many confidants believe that is unethical. This is how to get this prerogative without your doodad. They went into the danger zone on that one. I'll sense you say that to all the girls. 

That's your opportunity to try out using it. This was an unexpected change. I, in fact, cannot approve of cognoscenti using it. It is how to create your own Okinawa Flat Belly Tonic. This, we are told, was though of as a good thing. Allow me to get a little bit nostalgic. 

This is something all the top corporate lovers know. You may want to choose now. In a competitive war you don't hand an advantage like that to the enemy. There will come a day when all my labors here is finished. Masters are passionate as that regards to Okinawa Flat Belly Tonic. 

Okinawa Flat Belly Tonic
https://www.outlookindia.com/outlook-spotlight/okinawa-flat-belly-tonic-dark-truth-exposed-that-will-change-your-mind-news-224624

https://okinawaflatbellytonicbuys.wordpress.com/ 
https://okinawaflatbellytonicbuys.tumblr.com/ 
https://okinawaflatbellytonic-2.jimdosite.com/ 
http://okinawaflatbellytonicbuy.website2.me/ 
https://ntjuuierwqsch.wixsite.com/okinawaflatbellytoni 
https://twitter.com/okinawaflatbel 
https://okinawaflatbellytonicbuys.company.site/ 
https://qbpwvirmla.itch.io/okinawa-flat-belly-tonic-reviews-effective-supplement-for-reduce-belly-fat 
https://public.flourish.studio/story/1727372/ 
https://caramellaapp.com/qbpwvirmla/bqJigwWE5/okinawa-flat-belly-tonic 
https://www.bonfire.com/store/okinawa-flat-belly-tonic-5/ 
https://promosimple.com/ps/230f0/okinawa-flat-belly-tonic 
https://techplanet.today/post/okinawa-flat-belly-tonic-reviews-effective-supplement-for-reduce-belly-fat 
https://qbpwvirmla.gumroad.com/l/gkqrg?_gl 
https://works.bepress.com/okinawaflatbellyton/1/ 
https://www.vingle.net/posts/4906564 
https://startupmatcher.com/p/qbpwvirmla
Selectable bar chart - amCharts4
Tags: codepen, amcharts4, javascript
Published: 2022-10-29 08:29:58

A vertical bar chart where bars are selectable.<br>
Implemented using [amCharts 4](https://www.amcharts.com/docs/v4/) column chart.

{% codepen https://codepen.io/dima000/pen/JjZdVNv %}
Thông cống | Hút hầm cầu Gia Lai
Published: 2022-10-29 08:21:17

https://duchaiphat.com/ Đức Hải Phát✔️Hút hầm cầu ở Gia Lai, Kon Tum✔️Thông tắc cống giá rẻ, không đục phá✔️✔️✔️
0355847779
Làng Nhao, Xã Ia Kênh, Thành phố Pleiku, Tỉnh Gia Lai
https://ameblo.jp/duchaiphat
https://peatix.com/user/14243418
https://dev.to/duchaiphat
Day35 of #100DaysOfCode
Tags: 100daysofcode, webdev, css, beginners
Published: 2022-10-29 08:20:20

I’m amazed with myself! I have finished the company section (list-detail pattern) faster than I expected! I’m a lot more familiar with Tailwind so it’s a lot faster now.

I now only have a few bugs left to fix for the frontend to be done.  I believe I should be able to fix it by tomorrow.

I will then move on to the data fetching part.  My only concern is that if I continue to use Notion as the CMS, I will exceed the API call limit of the platform.  So I will have to decide what headless CMS I’m gonna use if I am to scale this website.

But first let me wrap up the frontend first and then we can worry about that later! Looking forward to see the company section live in production! 😍
Today's Daily Humor For Devs - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-10-29 08:00:05

---
title: "Today's Daily Humor For Devs - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12594523a5e.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What did the process say after working in an infinite loop all day?

___A:___ I need a break.
 -->
Programming Burnout, how to handle it.
Published: 2022-10-29 07:48:01

That moment when you feel an overwhelming sense of exhaustion, stress, and tiredness as well as a lack of motivation to code or even touch a computer. Yeah, we've all been there, but how does one cope with this?

**Coping with burnout**.
The first step when coping with burn is to recognize when you're burnt out, which isn't hard cause you'll rarely feel the need to code, and sometimes only to need to pay the bills is the motivation and you find no joy in it anymore, it may seem like a chore. I've faced burnout a couple of times and felt like I could share what I learned from how I coped with it and the research I made. Here are some ways to cope with it and handle it.

- **Rest:**
 A reason you might experience burnout is due to stress and lack of enough rest, you might need to take a step back and relax, and give your time off, it may seem like a risk due to deadlines and all but after that long rest, nap, relaxation or 8 hours sleep, you'll be able to move on in no time.

- **Quit overthinking:**
 This is quite difficult, cause as we all know programming is about 90% thinking and 10% computing, trying to find an easier and more efficient way for programs to run but maybe it's ok that way, believe me, it might be better, I know, not encouraging laziness though, but once you solved and think it's good, it's good, it doesn't hurt taking a break from debugging when you get a different bug, it's progress.

- **Reward yourself:**
 Go out once in a while, enjoy yourself, meet with long friends, and travel places. Do what you love when you've completed certain programs once in a while. Programmers sometimes don't get the rewards and benefits they deserve, it doesn't hurt to take care of yourself once in a while. 

- **You don't like the job? Quit it:**
 This might seem like bad advice but if it's affecting your mental and physical health, leaving the job might be the best option, but that's after taking in a lot of consideration and factors it'll influence before you get a better one.


Overall, burnout can be unexpected and I
It can even affect those to whom we relate. We might end up complaining all the time, lazing out at dire moments, and not putting our best into the work. Follow these steps and you'll get yourself out of burnout, hope this article helps, read, like, comment, and share.

Also, I'll use this opportunity to make this short announcement that I'll be making posts on python for data science and machine learning on my new medium page:

https://medium.com/@michael.c.ezeana

You can also follow and connect with me on my LinkedIn page:
https://www.linkedin.com/in/michael-ezeana-205366229