teleren/devto huggingface dataset:
Swift - Inheritance
Published: 2022-04-04 10:17:14

- Inheritance  is a mechanism in which one object (base Class) acquires all the properties and behaviors of a parent object(sub Class).

-  Methods, Properties, and Subscripts can be inherited and can be overrided by subclass if needed.

example :

``` swift
class Vehicle {
    var currentSpeed = 0.0
    var description: String {
        return "traveling at \(currentSpeed) miles per hour"
    }
    func makeNoise() {
        //make a noise
    }
}
```

``` swift
class Bicycle: Vehicle {
    var hasBasket = false
}

bicycle.currentSpeed = 15.0
print("Bicycle: \(bicycle.description)")
```

### Overriding

- Custom implementation can be provided by subclass for an instance method, type method, instance property, type property, or subscript if needed using **override** keyword.. This is known as overriding.
- While overriding a method, property, or subscript, existing superclass implementation can be included as part of your override using **super** keyword.

example :

``` swift
class Train: Vehicle {
    override func makeNoise() {
        print("Choo Choo")
    }
}
let train = Train()
train.makeNoise()
```
- Any custom Getters and Setters can be overrided, regardless of whether the inherited property is implemented as a stored or computed property at source. Both the name and the type of the property should be provided by overriding class.

- Inherited read-only property can be overrrided as a read-write property. But inherited read-write property can't be overrrided as a read-only property.

-  To override a setter property, you must also provide a getter for that override. If you don’t want to modify the inherited property’s value within the overriding getter, you can simply pass through the inherited value by returning super.someProperty from the getter.

- You can’t add property observers to inherited constant stored properties or inherited read-only computed properties. The value of these properties can’t be set, and so it isn’t appropriate to provide a willSet or didSet.

- Both an overriding setter and an overriding property observer can’t be provided for the same property. If you want to observe changes to a property’s value, and you are already providing a custom setter for that property.

### Preventing Overrides

1. To prevent a method, property, or subscript from being overridden use **final** keyword. 
2. To prevent any attempt to subclass a class, use final keyword before the class.
Login to the server without password
Tags: devops, linux, ssh
Published: 2022-04-04 10:03:19

That is a very nice way if you want to dont write your password for every login to the server :)
```
cd ~/.ssh
ls
```
If you have "id_rsa.pub" you dont need to generate it but if you dont have it lets make it
```
ssh-keygen -o -t rsa -C "azibom@gmail.com"
```
Now you should see it in ~/.ssh
Lets copy it
```
cat ~/.ssh/id_rsa.pub
```
Then you need to login to the server and add this key to the remote server
Run this command
```
nano .ssh/authorized_keys
```
And paste what you copied at the end of this file
And now you have login to the server without password :)
Qu’est-ce qu’un ORM ?
Tags: javascript, database, oop, programming
Published: 2022-04-04 10:03:13

ORM signifie Object-Relational Mapping. Un ORM est un ensemble de classes permettant de manipuler les tables d’une base de données relationnelle comme s’il s’agissait d’objets.

Un ORM est une couche d’abstraction d’accès à la base de données qui donne l’illusion de ne plus travailler avec des requêtes mais de manipuler des objets.

L’avantage de cette couche d’abstraction est qu’il n’y a plus besoin de se soucier du système de base de données utilisé, c’est l’ORM qui a la charge de transformer les requêtes pour les rendre compatibles avec la base de données.

L’ORM va s’appuyer sur des modèles. Un modèle représente une table de la base de données.

source : https://www.linkedin.com/posts/honorablecon_sundayword-activity-6878386656462823424-5jGs?utm_source=linkedin_share&utm_medium=member_desktop_web
Looking for a CTO to join a grant-winning project
Published: 2022-04-04 09:49:03

Hello everyone,

I'm the co-founder of a blockchain project called Blueprint, a crowdfunding dapp that tackles the issues with traditional crowdfunding.

We are an award-winning project, having secured grant funding from an Incubator Program sponsored by one of the top 50 blockchains, and we want to expand our team with the addition of a CTO.

I'm sending this message here because I believe there is a huge pool of technical talent. If this idea sparks your interest and you are a full-stack and smart contract developer, I'd be more than happy to talk with you, please reach out to me (teodoro@blueprintlabs.co).

If I can convince you of the value of this project, it's an exciting opportunity for you to bring a dapp to life and make life better for people and projects who are looking to fund innovative projects. There's also a huge opportunity for rewards if our solution becomes successful.

Take care everyone!
Take our expert digital portfolio assignment help to deliver the qualifying solutions
Tags: assignmenthelp
Published: 2022-04-04 09:45:54

Our digital media experts contain a variety of candidates who come from different media platforms. They are capable of writing and developing every type of assignment concerning subjects. They take up the issues and start building up convincing solutions from the scratches. They use every possible way of process to locate the real problems of the questions mentioned in the topic queries. Hence take our expert [digital portfolio assignment help](https://www.greatassignmenthelp.com/digital-portfolio-assignment-help/) to deliver the qualifying solutions to achieve top grades.

Not only the perfect solutions but the expert guidance and content material are also a special quality of our help agency. To tackle the challenge that students face our professionals also provide them with expert advice that clarifies all the doubts regarding concepts. To avail of our [digital media assignment help](https://www.greatassignmenthelp.com/digital-media-assignment-help/) services, you have no need to go through any formal process of acknowledgments. Just visit our website, fill out a small form, drop the queries, and make partial payments and that’s it.
Top 3 JavaScript tips I wish someone had told me
Tags: javascript, webdev, codenewbie
Published: 2022-04-04 09:33:24

Hello World!

After my dev.to tip post got popular, I thought you guys might also enjoy some of my best JavaScript tips. I promise these tips are unique(and not copied from Wikipedia). :joy:

Please comment below if you got some tips for me! Learning with you here! :+1: Okay, let's get to the juicy bit. Because I don't want to waist your time, I won't get too detailed, but each tip would get it's unique post in the future!

## Tip 1 (OOP- Object Oriented Programming)

This is a tip for people planning to have any kind of graphics on their website/application. If you don't fit into that description, consider skipping to the next tip.

Okay, now that 75% of you left this paragraph, let's talk about objects! Basically, to get started, let's make a class.

```
class reallyadvancedthing{
   constructor(x, y){

   }
   draw(){

   }
}
```

Good, now you know some stuff you might not understand. I promise I'll try my best to write a post about JavaScript objects tomorrow. But for today, just stay tuned!

## Tip number 2(Comments)

I know, you've probably seen this tip somewhere else, but I am going to get more detailed! :smile: Comments help you organise your code, not just for you, but for your fellow developers looking at your code.

You must realise that your code is made to serve the community you're in. You need to help others understand your code's purpose. As Albert Camus once said:

> A man without ethics is a wild beast loosed upon this world.

Now let's talk about you. You probably already forgot 90% of what your code does after a few days, and that's not something you want. You don't want to waist those countless hours you spent, at least, add a few basic comments so you know how to use your product!

## Tip number 3(Functions)

What's the use of repeating yourself over and over again when you can just use a JavaScript function? JavaScript functions speed up your code and development process. 

Trust me, one function can save you an hour, twenty four can save you a whole day of coding, give it a shot!

## Conclusion

Hope you enjoy it, as usual, I promise I'll reply to all your questions in the comment section! It'll make my day if you gave this post a like?
Convert your normal Laravel Application in to SPA
Tags: laravel, turbolinks, javascript
Published: 2022-04-04 09:07:19

I have recently published my first laravel package named laravel-spa, which is developed using javascript library turbolinks.

You can use this package in any normal laravel application, the installation & configuration process is very easy, you just have to run below artisan command on the root of your project.

`composer require rajentrivedi/laravel-spa`

After successful installation, you need to use below blade directive in your master blade, normally where we load all the assets.

`@spa`

Your javascript code or jQuery code should be between these blade directives.

`@spascrit` & `@endspascript`

If you want to disable this package for certain route, you can use 

`@disablespa`

Example
`<a href="{{route('excel.download')}}" class="btn btn-primary btn-md m-5" @disablespa>Excel</a>`

Now, page load speed of your application is faster compare to normal application.

[Github link](https://github.com/rajentrivedi/laravel-spa)
GitLive Now Works With Any Git Repository in IntelliJ!
Tags: programming, webdev, git, devops
Published: 2022-04-04 08:54:29

We are happy to announce GitLive now works, out-of-the-box in offline mode, with any Git repository in IntelliJ!

Previously we only supported repositories from the big four hosting services (GitHub, GitLab, Bitbucket, Azure DevOps) and required you to authorize access to the service before you could start using GitLive. 

Now when you install GitLive it will start in **offline mode**. The offline mode uses the data from your local Git repository only and nothing is sent outside your network. Your repository should have a remote but it can be hosted anywhere.
 


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

In the GitLive tool window you'll see all the authors of branches currently ahead of your default branch, the last commit to a branch determines who it will appear under. 

Drill down into an individual author’s branches to see the files changed and inspect diffs plus view the associated issue or pull request. 


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

The changes from the branches shown in the GitLive tool window also appear for your current file in the gutter of your editor. The [gutter indicators](https://blog.git.live/gitlive-15.0-offline-merge-conflict-detection-across-all-branches-for-any-git-repository#get-notified-of-merge-conflicts-across-all-branches) show the differences in the file from other branches compared to your local version. It even shows you when the changes conflict with your own - a kind of early warning system for merge conflicts!

Click on the author's avatar to inspect a change and see the diff, what branch they're from and even [cherry-pick](https://blog.git.live/gitlive-8-0-Cherry-picking-your-teammates-changes#cherry-picking) changes straight into your local file.



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

---

And you can still sign in to go **real-time** and see your teammate's [unpushed changes](https://blog.git.live/gitlive-15.0-offline-merge-conflict-detection-across-all-branches-for-any-git-repository#enhanced-team-window-filters) in the team window, get notified in the gutter [the moment you make a conflicting change](https://blog.git.live/gitlive-11.0-Real-time-merge-conflict-detection#gutter-indicators-for-teammates-changes), plus make calls and [codeshare](https://blog.git.live/gitlive-12.0-voice-and-video-calling-with-screen-code-share#codeshare) to edit together simultaneously. 

Signing in still requires a repository from the big four hosting services for now but we'll be adding support for other services, including self-hosted, soon!

---

Don't have the GitLive plugin installed yet? You can find it [here](https://plugins.jetbrains.com/plugin/11955-gitlive), and if want to learn more about the latest release, check out [this blog post](https://blog.git.live/gitlive-15.0-offline-merge-conflict-detection-across-all-branches-for-any-git-repository).
Portfolio review
Tags: html, css, javascript, react
Published: 2022-04-04 08:54:19

## Hello fellow devs

I am new to front-end development. Till now I have learnt HTML, CSS, JavaScript and Bootstrap. Using the skills which I acquired I have created a portfolio/resume.

It would be very helpful if you guys can review it and give me some advice as to how can I make it better
Here is the link [Portfolio](https://prem-jeet.github.io/portfolio1.0/)

Also, I need some advice as to what should I learn in react, to land job as a fresher?


waiting for your helpful comments☺️
German Perl & Rakulang Workshop gpw2022 in Leipzig
Tags: perl, programming
Published: 2022-04-04 08:49:20

German Perl & Rakulang Workshop gpw2022 in Leipzig(From <a href="https://twitter.com/DanielBhmer4/status/1509479236557582347">Twitter</a>)

<img src="https://pbs.twimg.com/media/FPK_LPaXEAEiAKY?format=jpg&name=small">
Sneat - Open-Source Bootstrap 5 Template
Tags: bootstrap5, webdev, opensource
Published: 2022-04-04 08:41:35

---
title: Sneat - Open-Source Bootstrap 5 Template
published: true
description: Free Bootstrap 5 Template crafted by ThemeSelection - Sneat Dashboard can be used in commercial projects.
tags: bootstrap5, webdev, opensource 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chn685dedqbwtwi24nbr.jpg
canonical_url: https://www.admin-dashboards.com/sneat-free-bootstrap-5-template-3nz9/
---
Hello Coders!

This article presents an open-source [Bootstrap 5](https://www.admin-dashboards.com/bootstrap-5-templates/) template crafted and released for free by `ThemeSelection`. **Sneat Dashboard Template** is a colorful design that comes with pre-built pages for (almost) anything: SASS projects, CRM, Analytics. For newcomers, **Bootstrap** is a leading JS/CSS framework used to code interactive user interfaces actively supported and versioned by programming experts. 

---

> `Thanks for reading!` Content provided by [Admin Dashboards](https://www.admin-dashboards.com)

- 👉 [Sneat Dashboard Template](https://themeselection.com/products/sneat-free-bootstrap-html-admin-template/) - Product page
- 👉 [Sneat Dashboard Template](https://demos.themeselection.com/sneat-bootstrap-html-admin-template-free/html/) - LIVE Demo

---

![Sneat Bootstrap 5 (Open-Source) - Charts Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3tsvs84raplbth36xznz.png)

---

If you’re a developer looking for the latest Free Bootstrap 5 dashboard that is developer-friendly, rich with features, and highly customizable look no further than Sneat.

The product offers the ultimate convenience and flexibility, you’ll be able to build whatever application you want with very little hassle.

---

## ✨ Product Features

`Sneat` is also equipped with invaluable features designed to help you create premium quality apps exactly as you imagine them.

- 👉 Based on Bootstrap 5
- 👉 Vertical layout
- 👉 Dashboard Page
- 👉 Authentication Pages
- 👉 Organized Folder Structure
- 👉 Clean & Commented Code

---

**Sample Pages** - If you want to get inspiration or just show something directly to your clients, you can jump-start your development with our pre-built example pages.

![Sneat Bootstrap 5 (Open-Source) - Box Icons](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lyvielyi13umcxkrdmwg.png)

---

![Sneat Bootstrap 5 (Open-Source) - Colorful Cards](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99w813fs8ylf5vme4jca.png)

---

![Sneat Bootstrap 5 (Open-Source) - UI Tables](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2ddi69s84nxk99wnjrv.png)
 
---

> `Thanks for reading!` For more resources, feel free to access:

- ✨ More [Free Dashboards](https://appseed.us/admin-dashboards/open-source) crafted in Django, Flask, and [React](https://appseed.us/apps/react)
- ✨ More [Admin Dashboards](https://www.admin-dashboards.com/) - a huge index with products
Node.js Nedir ?
Tags: node, javascript, webdev, programming
Published: 2022-04-04 08:07:37


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

Arkadaşlar bu yazımda sizlere patika.dev üzerindeki Node.js eğitimlerini tamamlarken öğrendiklerimi sizler ile paylaşarak hem kendi bilgilerimi tekrar ederek daha iyi öğrenmeyi , hem de bu konu hakkında bilgi almak isteyen arkadaşlara yardımcı olmayı hedefliyorum. 

## **O zaman hemen başlayalım nedir bu Node.js  ?**

Javascript programlama dili bildiğiniz üzere eskiden sadece istemci tarafında (client-side) çalışan bir dildi. Tarayıcıda çalıştırdığımız Chrome V8 Engine kullanıma sunuldu ve artık sunucu tarafında da (server-side) Javascript dilini kullanabiliyoruz. İşte Javascript dilini sunucu tarafında kullanmamıza olanak sağlayan Chrome V8 Engine, Node.js olarak adlandırılmaktadır.

V8 Javascript motoru hakkında daha detaylı bilgi almak için aşağıdaki linki tıklayabilirsiniz.

[V8.dev](https://v8.dev)

Node.js temel olarak sunucu tarafında çalışan javascripttir. Javascript temelli olması sebebiyle çok dinamik ve hızlı yapısı vardır.

Javascript dilinin Node.js vasıtasıyla Back-end’e taşınmasıyla artık sadece bir dil bilerek full-stack uygulama geliştirebilirsiniz.

## **Peki Javascript ve Node.js Neden bu kadar son dönemde popüler oldu?** 

Node.js’in en önemli özelliği asenkron yapıda çalışması ve non-blocking olması. Peki nedir bu asenkron çalışma ve non-blocking?

Node.js tarafına bir işlem için istek gönderildiğinde node.js onu alıp hemen işleme koyuyor ama diğer işlemi almak için bu işlemin bitmesini beklemiyor. Sırayla istekleri alıyor ve sonuçları beklemeden devam ediyor. Sonuçlar geldikçe iletiyor.

Bu durumda bir istek diğer isteğin bitmesini beklemediği için diğer isteği engellememiş oluyor. Hangisi önce biterse o isteğin cevabı geliyor. İşte bu mantığa asenkron çalışma mantığı deniyor ve bir işlem diğer işlemi engellemediği içinde non-blocking oluyor.

Aynı zamanda birden çok kullanıcıya hızlı cevap verebildiği için ölçeklenebilirlik sorununa çözüm sunuyor. Bu da aslında onun popüler olmasının temel nedenlerinde biri. Aynı anda binlerce insanın kullandığı bir sistem geliştiriyorsak node.js çok iyi bir tercih olacaktır.

Nodejs’in en büyük avantajlarından bir tanesi de modüler yapısı ve bu yapıyı destekleyen paket yönetim sistemi olan npm (nodejs package manager). Npm’i Node.js projelerinde kullanılmak üzere içerisinde bir çok modül barındıran bir depo gibi düşünebiliriz.

Bu modüller open-source geliştiricileri tarafından yazılarak [npmjs.com](https://www.npmjs.com) üzerine yüklenmektedir. Npm içerisinde şu an 1 milyondan fazla paket, modül eklenmiş durumda. Bu da aslında popülaritesini gerçekten net olarak gösteriyor.


**Node.js Kullanan Bazı Teknoloji Şirketleri**

- Apple
- Google
- IBM
- Linkedin
- Pinterest
- Paypal
- Netfilix

Bu yazımda araştırmalarım ve patika.dev üzerinde aldığım Node.js dersleri ile öğrendiklerimi ve araştırmalarımı sizlerle paylaşmaya çalıştım. 

Zaman ayırıp okuduğunuz için teşekkürler. Bir sonraki yazımda görüşmek üzere...
Today's Daily Humor For Devs - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-04-04 08:00:07

---
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/5e1258e86d537.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:___ How does a developer make a cheer?

___A:___ ["hip","hip"] // (hip hip array!)
 -->
Swift - Subscripts
Published: 2022-04-04 07:59:59

- Subscripts  shortcut for accessing the member elements in a collection, list, or sequence. Implement subscripts in the most appropriate way for your particular class or structure’s functionality.

- Subscripts to set and retrieve values by index without needing separate methods for setting and retrieval.

- subscripts can be read-write or read-only.

- implement subscript using subscript keyword.

syntax :

```
subscript(index: Int) -> Int {
    get {
        // Return an appropriate subscript value here.
    }
    set(newValue) {
        // Perform a suitable setting action here.
    }
}
```

example :

``` swift
struct TimesTable {
    let multiplier: Int
    subscript(index: Int) -> Int {
        return multiplier * index
    }
}
let threeTimesTable = TimesTable(multiplier: 3)
print("six times three is \(threeTimesTable[6])")
```

- subscripts can’t use in-out parameters.

- Multiple subscripts can be defined for a single type and subscripts can have multiple input parameters.

example :

``` swift
struct Matrix {
    let rows: Int, columns: Int
    var grid: [Double]
    init(rows: Int, columns: Int) {
        self.rows = rows
        self.columns = columns
        grid = Array(repeating: 0.0, count: rows * columns)
    }
    func indexIsValid(row: Int, column: Int) -> Bool {
        return row >= 0 && row < rows && column >= 0 && column < columns
    }
    subscript(row: Int, column: Int) -> Double {
        get {
            assert(indexIsValid(row: row, column: column), "Index out of range")
            return grid[(row * columns) + column]
        }
        set {
            assert(indexIsValid(row: row, column: column), "Index out of range")
            grid[(row * columns) + column] = newValue
        }
    }
}
```
- **Type Subscripts** - subscripts defined on the type itself. Use **static** for struct and enum, and **class** for class to enable overriding.

example :

``` swift
enum Planet: Int {
    case mercury = 1, venus, earth, mars, jupiter, saturn, uranus, neptune
    static subscript(n: Int) -> Planet {
        return Planet(rawValue: n)!
    }
}
let mars = Planet[4]
print(mars)
```