teleren/devto huggingface dataset:
Interesting Dart Syntax: mixin application class
Tags: flutter, dart, mixin, programming
Published: 2022-10-29 14:07:44

---
title: Interesting Dart Syntax: mixin application class
published: true
description: 
tags: #flutter #dart #mixin #programming
---

Recently I just got to know this dart syntax. You can define a class with a mixin like this:
```dart
class Foo = Bar with Baz;
```

Without the syntax, you would probably do this:
```dart
class Foo extends Bar with Baz {
  Foo(): super();
}
```

Currently, there is an issue in DDC with the syntax, so probably better not to use it for the flutter web project yet:
{% embed https://github.com/dart-lang/sdk/issues/50119  %}

But I pretty much like the syntax that makes the code cleaner.
Deploy AWS Network Firewall on Multi-VPC environment with open source tools (P2)
Tags: aws, devops, terraform, github
Published: 2022-10-29 14:03:55

## Open source tools integrated with Terraform and GitHub


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


#### [Atlantis](https://www.runatlantis.io/)

- Atlantis is an application for automating Terraform via pull requests. It is deployed as a standalone application into your infrastructure.

- Atlantis listens for GitHub, GitLab or Bitbucket webhooks about Terraform pull requests. It then runs `terraform plan` and comments with the output back on the pull request. When you want to apply, comment `atlantis apply` on the pull request and Atlantis will run `terraform apply` and comment back with the output.

_Without Atlantis_ :


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

_With Atlantis_ :


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

_As soon as there is a change, a Pull request is generated that will send a trigger to Atlantis to run the plan, or comment_ `atlantis plan` :


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

_After the code review is done and the pull request is approved, comment_ `atlantis apply` _to send a trigger to Atlantis_ :


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

- Check out the video below to see it in action:

{% embed https://www.youtube.com/watch?v=TmIPWda0IKg %}

#### [Checkov](https://www.checkov.io/)

- Checkov is a static code analysis tool for scanning infrastructure as code (IaC) files for misconfigurations that may lead to security or compliance problems.

- Checkov scans these IaC file types: Terraform, CloudFormation, Helm charts, Kubernetes, Docker, ...

- Checkov will check if the resources meet the security requirements, it will also give recommendations for developers to do :


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


#### [Infracost](https://www.infracost.io/)

- Infracost shows cloud cost estimates for Terraform. It lets DevOps, SRE and engineers see a cost breakdown and understand costs before making changes.


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


<code>to be continued...🐧</code>
Passkeys on Django
Tags: django, passkeys
Published: 2022-10-29 14:02:24

[Passkeys](https://fidoalliance.org/passkeys/) is the state of the art technology standardized by FIDO Alliance to allow users to use generated Web Authication API credentials on a device to be used on another device.

For Demo, please refer to this webinar {% embed https://www.youtube.com/watch?v=SWocv4BhCNg %}

The technology is now supported on Apple Ecosystem by the iOS 16 and iPadOS 16.1 and Mac OS X Ventura. Safari on these platforms can get credentials from Android or iOS based device. Android is currently in beta for passkey generation and Chromium based browsers (on PC and Laptop) allows picking up credentials from Android and iPhone/iPadOS.

Web Authencation API (and passkeys) is the only technology which is phishing resistant even during live Man-In-The-Middle attack, that is due to verification of the domain request to authenticate user on the authenticator to make sure it is the one registered credential before.

[django-passkeys](https://github.com/mkalioby/django-passkeys) is a Django app that extends Django ModelBackend to provide a passkey authentication.

The application is a slim-down version of [django-mfa2](https://github.com/mkalioby/django-mfa2) which has been 🌟 more 150 times and downloaded round 135k. As this application did only one thing, it is much easier to integrate within your current application.


The steps needed to install and use the is in the README on GitHub repo.
{% embed https://github.com/mkalioby/django-passkeys %}

Have fun :)
c 语言应用在eclipse上(in chines)
Published: 2022-10-29 13:14:16

已放弃在eclipse上使用c语言,并转战visual studio2022.
并已成功创建
并
因为:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uly8dvpi49nhp45bfyqa.png)
下面保存我的失败经历:
1.for what 将c 语言应用在eclipse上
2.how to do :1.https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v10.0.0.tar.bz2/download.      这个链接可以下载mingw(类似于java的jdk).
先下载这个
注:原网址是https://www.mingw-w64.org/,但是找了半天没有看到明显的位置,最后发现在这里

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pcfealpvhrxwqvgw5jg.png)
然后就可以使用windows版本了
注意!:mingw的windows版本下载要对,本人根据下面的保姆级教学没有下对(主要是mingw,可能中间的很多细节本人并没有注意到,下载mingw参考https://blog.csdn.net/weixin_44706594/article/details/124129980..引自珺妳的csdn博客).
总结保姆级教学:https://blog.51cto.com/u_12907475/5375414.引自匿名V5程序员的博客

可安裝mingw成功


3.安裝eclipse所需要的CDT
Carbon Program to swap digits
Tags: beginners, programming, tutorial, carbon
Published: 2022-10-29 13:11:41

In this we’re going to learn about two ways to swap two numbers in Carbon, and those are mentioned below:

1. Using a temp variable.
2. Without using a temp variable.

## 1. Using a temp variable
The idea is simple for this approach for swapping two numbers:

1. Assign x variable to a temp variable: temp = x
2. Assign y variable to x variable: x = y
3. Assign temp variable to y variable: y = temp

Below is the Carbon program to implement the Swapping with temp variable approach:

```
package sample api;

fn Main() -> i32 {

    // using temp variable
    var x: i32 = 1;
    var y: i32 = 2;
    var temp: i32 = x;
    x = y;
    y = temp;


    Print("SWAPPING");
    Print("x: {0}", x);
    Print("y: {0}", y);

    return 0;
}
```

Output:

```
SWAPPING
x: 2
y: 1
```

## 2. Without using temp variable
The idea is simple for this approach for swapping two numbers:

- Assign to y the sum of x and b i.e. y = x + y.
- Assign to x difference of y and x i.e. x = y – x.
- Assign to y the difference of y and x i.e. y = y – x.

Below is the Carbon program to implement the Swapping without temp variable approach:

```
package sample api;

fn Main() -> i32 {

    // without temporary variable
    var x: i32 = 10;
    var y: i32 = 2;

    y = x + y;
    x = y - x;
    y = y - x;

    Print("SWAPPING");
    Print("x: {0}", x);
    Print("y: {0}", y);

    return 0;
}
```
Output:

```
SWAPPING
x: 2
y: 10
```

[Learn More](https://programmingeeksclub.com/carbon-program-to-swap-two-numbers/)

You can find more content like this on [programmingeeksclub.com](https://programmingeeksclub.com)
How To Make a Food Delivery Website Using HTML CSS JavaScript
Tags: css, javascript, webdev, tutorial
Published: 2022-10-29 13:01:51

{% youtube P_yKqjx35J4 %}

How To Make a Food Delivery Website Using HTML CSS JavaScript

This video will show you how to build a food delivery website using html css javascript

---

🔗 Essential links
-----------------------------
[Download the starter file to practice](https://drive.google.com/file/d/17C_TyFJ7I6n38uyOCGJywV3ihkWc027j/view?usp=share_link)

---

⏱️ Timestamps
-----------------------------
0:00 - Demo
4:19 - File structure
5:26 - Project initial
12:03 - Preloading
17:49 - Header
32:03 - Hero section
42:37 - Instruction section
47:55 - Top restaurant section
55:59 - CTA section
59:12 - Stats section
1:02:12 - Testimonials section
1:06:12 - Partnership
1:12:03 - Newsletter
1:16:19 - Footer
1:31:40 - Media queries

---

[![Become a patreon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnjl14kdm5qf08hu5lop.png)](https://www.patreon.com/bePatron?u=62535867)
Shallow Copy Vs Deep Copy
Tags: python, deepcopy, beginners
Published: 2022-10-29 12:57:16

In our day to day development tasks, we come across the need to copy objects and perform various operations.

Python provides two important functions in the **copy** library - _copy_ and _deepcopy_.

Let us understand the difference between the two and their respective use cases.

### Shallow Copy - copy.copy(obj)
- It makes a copy of the obj at the surface level. 
- It copies all the contents of the obj.

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

- However, the point to be noted here is that, in case the contents of x are mutable, then, y has reference to the contents of x. Any modification to the contents of x would be reflected in y as well.

![shallow copy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67ef2wud6bu5y3rq9ve7.png)

In this example we see that modifying the contents of x[1], also modified the contents of y[1].


![shallow copy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3o45byvy1gst3yy8q5tw.png)

Similarly, we see that modifying the contents of y, also modified the contents of x.


### Deep Copy - copy.deepcopy(obj)
- Deepcopy copies the object recursively. Recursively means, it copies the contents of the object and not merely its reference.

- So we should use deep copy in case we need an independent copy of the contents of the obj.

![Deepcopy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/53buud6tqel6affms9k9.png)

- In deepcopy, any changes to the contents of x do not effect y, unlike shallow copy.


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


____________________________________________________________

Copying objects properly is a very important _basic python concepts_. This knowledge helps in building error free code wrt copying objects.

Thank you
Aniketh Deshpande
How To Run Cypress Tests In Azure DevOps Pipeline
Tags: cypress, testing, tutorial, career
Published: 2022-10-29 12:48:27

**How To Run Cypress Tests In Azure DevOps Pipeline**

https://qaautomationlabs.com/how-to-run-cypress-tests-in-azure-devops-pipeline/

When software developers took years to create and introduce new products to the market is long gone. Users (or consumers) today are more eager to use their favorite applications with the latest bells and whistles. However, users today don’t have the patience to work around bugs, errors, and design flaws. People have less self-control, and if your product or application doesn’t make life easier for users, they’ll leave for a better solution.

Before the advent of DevOps, software companies used the conventional ‘Waterfall’ model, which was effective for many projects like CRM and inventory management. However, it had several shortcomings. DevOps completely overpowered the traditional waterfall model.

Development teams in product organizations are constantly releasing updates, patches, bug fixes, and new features. Before rolling out the updates to all end users, operations teams have their hands full to ensure the new code functions properly. Users dislike downtime and additional errors, which can occur if the rollout process isn’t managed effectively.

In DevOps, code is reviewed and deployed much more quickly due to the collaboration between the development and operations teams. As a result, suggestions for new features and bug fixes based on user data get continuously incorporated into the development cycle. The journey each new piece of code takes, from planning to deployment to monitoring, is known as the DevOps pipeline. Every software development company needs a strong DevOps pipeline to meet customer demands and specifications.

Azure, AWS, GCP, Oracle Cloud Services, and many other cloud service providers have integrations with several open-source and enterprise automated testing tools. Cypress is the most commonly used framework that has integrations with all major cloud platforms. There are also testing platforms like LambdaTest, a cloud SaaS platform for Cypress testing that we can integrate with Azure DevOps.
Let’s build a SaaS together
Tags: sass, business, partnership, cofounder
Published: 2022-10-29 12:28:45

---
title: Let’s build a SaaS together
published: true
description: 
tags: sass, business, partnership, cofounder
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-10-29 12:26 +0000
---

Howdy 🤠 

I’ve had this idea for about a year now and I’ve started developing it but the project is fairly large, I will most definitely burn out if I try and do it all myself hence why I’m looking for a partner to contribute.

Obviously I don’t want to say too much but essentially it would target all sizes of businesses and help them deploy their applications easily including an all in one system to manage their infrastructure.

I’d be happy to give away 40% of the company to whoever wants to go on this journey with me.
3 Free Resources to Learn React in 2022
Tags: javascript, webdev, react, tutorial
Published: 2022-10-29 12:23:11


## 3 FREE Resources to Learn React in 2022

React is still one of the most popular JavaScript libraries used to build interactive frontend experiences. Here are 3 free resources to learn React in 2022 and make your way as a frontend developer.

![](https://cdn-images-1.medium.com/max/2160/1*FU-jT4VHCTLg0lYs675aXQ.jpeg)

## React Docs (Beta)

The new [React Docs (Beta)](https://beta.reactjs.org/) has interactive examples and visual diagrams and easier explanations to help you learn React by yourself. The official documentation will help you with all the basics including JSX , Hooks and more.

![](https://cdn-images-1.medium.com/max/2122/1*OYyZGxyIMPqz2CR8KuDy8A.png)

## Free React Course for 2022 by freeCodeCamp.org

In this 12 hour free course you will learn React by building eight real-world projects and solving 140+ coding challenges.

{% embed https://youtu.be/bMknfKXIFA8  %}
## React JS Full Crash Course 2022 by JavaScript Mastery

In this 1 hour crash course you will learn everything from the essential JSX syntax all the way to more advanced React topics, like state, hooks, data fetching, and more.

{% embed https://www.youtube.com/watch?v=b9eMGE7QtTk  %}

React might be a tough challenge for most people but with sheer will and consistent learning and coding, you can be a pro React Developer.

Follow me on [Instagram](https://www.instagram.com/sidhxrth.js/) and on [Twitter ](https://twitter.com/SidhxrthJS)to be updated with everything about Web Development.
Web Design Homework Help
Published: 2022-10-29 12:22:09

A website designer works on a website's structure, aesthetics, and occasionally content. Assignment world has launched a dedicated service for **[web design homework help](https://www.assignmentglobal.com/web-design-homework-help/)** in response to the students' increased demand for assistance with their website development homework. All of the programming languages used in web development are accessible to you because of the diverse programming backgrounds of our educators. In addition to many others, it has HTML, CSS, PHP, Python, and Ruby. The best place to go if you're looking for a dependable provider to complete your website development assignment is Assignmentglobal Here, all you have to do is let us know what you need, and we'll build you an amazing responsive website.

Our qualified web assignment professionals will provide you with a quality solution because they are knowledgeable about web development and HCI concepts. Our talented web designers and developers have several years of academic experience. You can contact our specialists for assistance with your website design homework. They can offer you assistance with your website development assignment in a way that best showcases their experience and creativity. You may now prepare excellent projects with the aid of our website design assignment help.
Embedded Systems Weekly #124
Tags: embeddedsystems
Published: 2022-10-29 12:13:05

I would like to start this week's issue with a tribute to Wolfgang Denk who[passed away last week](https://lists.denx.de/pipermail/u-boot/2022-October/497955.html). His contributions are numerous and one of the most used around the World is U-Boot.

**Thank you, Wolfgang Denk.**

## Articles 
[A Reverse Engineer’s Perspective on the Boeing 787 ‘51 days’ Airworthiness Directive](https://ioactive.com/reverse-engineers-perspective-on-the-boeing-787-51-days-airworthiness-directive/)
Do you remember this order for Boeing operators from 2020?
The author does fantastic work to understand the root reasons
of the 51-days limit.

[Comprehensive list of FPGA development boards](https://www.fpgadeveloper.com/comprehensive-list-of-fpga-development-boards/)
If you are in the process to find the best board for your application, check this list out. You'll probably find new candidates to evaluate.

[Designing Logic Systems Using State Machines](https://archive.org/details/designinglogicsystemsusingstatemachines/page/n1/mode/2up)
It's a 1973 book, but there are many interesting approaches in it still relevant to nowadays systems. My advice is to randomly skim through it, and you'll for sure, get caught.

[Cash, Canadians and CPUs : Intel's 'Lost' Early Microprocessor](https://thechipletter.substack.com/p/cash-canadians-and-cpus-intels-lost)
Interesting part of Intel history that I didn't know about. How Canada was involved in the success of Intel and what was the 4005?!

## Tools / Libraries
[Tracing Linux kernel with retsnoop](https://nakryiko.com/posts/retsnoop-intro/)
With the maturation of BPF technology, observability of the Linux kernel internal behavior is becoming easier and easier. retsnoop is based on BPF and its main goal is to make tracing accessible and actionable.

[OneRNG](https://onerng.info/index.html)
Random number generators subject is fascinating me. OneRNG is an open-hardware RNG implementation. The project is [OSHWA certified](https://certification.oshwa.org/nz000001.html).

## Jobs
[Zircon Software, Senior Embedded Software Engineer, Full-time, Trowbridge, England, United Kingdom (Partially remote)](https://jobs.embedsysweekly.com/job/Kw6j7E2m/senior-embedded-software-engineer)
We are an ambitious software engineering company based in Trowbridge, Wiltshire, where we have been operating for over 20 years. Zircon helps create software that drives the future in a wide range of industries and across embedded, application and enterprise systems. We might be small, but we work with giants!

## Misc
[The Z80's secret feature discovered after 40 years!](https://youtu.be/DLSUAVPKeYk)
It sounds like there will always be something to say about the Z80. Fan base is eternal.
Geo Location Search with SQL Server
Tags: sql, sqlserver
Published: 2022-10-29 12:10:43

Localizing your search query is important when you want to return local restaurants, your users want a restaurant in the area their area, not on the other side of the town or country 

SQL Server has great support for that and let's dive into it.

## The Challenge
We want to have a table with restaurants, and search for restaurants in the area of the user

## Create the Table
The main "secret" is to set the LatLng column to `geography`
```
CREATE TABLE [dbo].[LocalBusinesses](
	[ID] [bigint] IDENTITY(1,1) NOT NULL,
	[BusinessName] [nvarchar](50) NOT NULL,
	[LatLng] [geography] NULL,
	[Phone] [nvarchar](25) NULL,
	[BookingUrl] [nvarchar](100) NULL,
 CONSTRAINT [PK_LocalBusinesses] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
```

## Insert Local Business Data
The following code will insert 4 restaurants, in 2 different cities
```
CREATE PROCEDURE  [dbo].[LocalBusinessAdd]
	@BusinessName as nvarchar(50),
	@Latitude as float,
	@Longitude as float,
	@BusinessPhone as nvarchar(25),
	@BusinessBookingUrl as nvarchar(250)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	INSERT INTO LocalBusinesses (BusinessName,  latlng, Phone, BookingUrl)
	VALUES(@BusinessName, geography::Point(@Latitude,@Longitude, 4326), @BusinessPhone,@BusinessBookingUrl);

END

exec dbo.LocalBusinessAdd 'Fiskebar', 46.2079205,6.1485323, '+4122...','https://...';

exec dbo.LocalBusinessAdd 'Restaurant Les Armures', 46.2010473,6.147613, '+4122...','https://...';

exec dbo.LocalBusinessAdd 'Thach', 47.3787218, 8.5298173, '+4143...','https://...';

exec dbo.LocalBusinessAdd 'La Lup Brandschenke', 47.3696334,8.5334346, '+4143...','https://...';
```

## Return Latitude and Longitude
```
SELECT BusinessName, LatLng.Lat as 'Latitude', LatLng.Long as 'Longitude' 
FROM dbo.LocalBusinesses
WHERE ...
```

## Get The Restaurants Within a Certain Distance

```
ALTER PROCEDURE  [dbo].[LocalBusinessSearch]
	@Latitude as float,
	@Longitude as float,
	@MaxDistance as int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.

	DECLARE @DistanceFromPoint geography = geography::Point(@Latitude,@Longitude, 4326);

	SET NOCOUNT ON;
	SELECT BusinessName, Phone, BookingUrl, LatLng.STDistance(@DistanceFromPoint) as 'Distance'
	FROM dbo.LocalBusinesses
	WHERE LatLng.STDistance(@DistanceFromPoint) <= @MaxDistance
	ORDER BY LatLng.STDistance(@DistanceFromPoint) 
END
```

## Execute the Search Stored Procedure
When you have the location of the user (via browser or other techniques, you can return the restaurants in the users area.
```
-- Return Restaurants in Zurich in a 4km radius
exec  [dbo].[LocalBusinessSearch] 47.3744489,8.5410422,4000  

-- Return Restaurants in Geneva in a 2km radius
exec  [dbo].[LocalBusinessSearch] 46.2017559, 6.1466014, 2000  
```
7 Best VS Code Shortcuts You Should Use
Tags: beginners, programming, vscode, tutorial
Published: 2022-10-29 11:53:38

1.**Select text word by word.**

> Mac : cmd+shift+Left/Right Arrow

> Windows : Ctrl + Shift + Left/Right Arrow

2.**Add multiple cursors.**

> Mac : opt+cmd+up or opt+cmd+down

> Windows : Ctrl+Alt+Up/Down arrow

3.**Copy line up / down.**

> Mac : opt+shift+up or opt+shift+down

> Windows : shift+alt+down or shift+alt+up

4.**Open markdown preview.**

> Mac : shift+cmd+v

> Windows : ctrl+shift+v

5.**Side by side Markdown edit and preview.**

> Mac : cmd+k v

> Windows : ctrl+k v

6.**Comment lines.**

> Windows: Ctrl+K Ctrl+C

> Mac: Cmd+K Cmd+C

Remove Commenting

> Windows: Ctrl+K Ctrl+U

> Mac: cmd+K cmd+U

7.**open code with current directory.**

> Type `code .` On cmd