teleren/devto huggingface dataset:
How to establish secure connection by SSH key authentication on Nginx server by uisng PuTTY
Published: 2023-12-21 19:49:25

Using PuTTY SSH key authentication to connect to a Nginx server is a secure and convenient option. Instead of passwords, this method makes use of two cryptographic keys: a private key and a public key. This improves remote server access security while simplifying the authentication process.

Also check [**how to manage SSH key on Raspberry pi by using PuTTY.**](http://puttygenguide.wikidot.com/)

Follow these procedures to connect to a Nginx server using SSH key authentication:


**PuTTY and PuTTYgen can be downloaded here:**

Install PuTTY and PuTTYgen on your local machine.

**Make SSH Key Pairs:**

On Windows, launch PuTTYgen.
To generate the new key pairs, click the "Generate" button.
Once generated, the public key will be presented under the public key area.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tefi5xx4xc1dwqmu5d2z.png)
**Save both the public and private keys:**

To save the public key, click "Save public key."
Save the private key by clicking "Save private key."

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

**Add Public Key to Nginx Server:**

Log in to your Nginx server.
Add the content of the public key to the ~/.ssh/authorized_keys file in the user directory.


**Start PuTTY:**


Start PuTTY on your Windows computer.


**Configuration of the Session:**

Enter the Nginx server hostname or IP address in the Hostname field of the PuTTY Configuration windows.
Set the connection type to SSH and the port number to 22.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fu5r56zx6vyt46171nku.png)
**Set up Authentication:**


Navigate to **Connection > SSH > Auth** on the left panel.
Select "Browse" and browse to the previously saved private key file.

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

Return to the Session category, give the session a name in "Saved Sessions," and click "Save" to save it.

**Start the Server:**

Click the "Open" button to begin the connection.
When asked, enter your username and password.
Community Hangout and Update - 2023-12-23
Tags: phalcon5, phalcon6, community, update
Published: 2024-02-08 18:03:33

---
title: Community Hangout and Update - 2023-12-23
published: true
date: 2023-12-21 19:20:11 UTC
tags: phalcon5,phalcon6,community,update
canonical_url: 
---

Join us this Saturday 23rd of December at 10:00 EST (15:00 UTC) for a community hangout and update.

- Where we are
- v5
- v6
- Issues/what is left

[https://youtube.com/live/hMfiGJsbbEE](https://youtube.com/live/hMfiGJsbbEE)

Looking forward to seeing everyone there!
FR Legends Mod APK 2023 0.3.3.1 (Unlimited Money & Diamonds) Download
Published: 2023-12-21 19:14:02

[Fr Legends](https://www.frlegendsapp.com), a renowned drifting simulation game, has captured the hearts of gamers worldwide with its immersive gameplay and realistic mechanics. As the virtual drifting community continues to grow, so does the desire for an enhanced and personalized experience. Enter the [Fr Legends Mod APK](https://www.frlegendsapp.com) – a game-changer that not only amplifies the excitement but also introduces a host of modifications, transforming the virtual drifting landscape.
Web Development vs. Flutter: A Quick Comparison
Published: 2023-12-21 18:36:30

I have experience in web development, but my most recent project is a flutter mobile app. I want to talk about the differences in developing for web and mobile(flutter)

Initial Learning:

Web Development: Easier to start with basic HTML, CSS, and JavaScript.
Flutter: Steeper learning curve due to Dart, but worth the effort.

Developer Experience:
Flutter excels with features like hot reload and a comprehensive widget library, offering a smoother experience than traditional web development.

Cross-Platform Deployment:
Flutter's standout feature is its ability to deploy across iOS, Android, web, and desktop from a single codebase, unlike web development.

Library Ecosystem:
Flutter is newer with a growing library ecosystem, while web development has a more extensive range of resources.

Learning Curve and Styling:
Flutter simplifies learning with one framework (Dart) and makes UI styling easier and more intuitive compared to the complexities of CSS in web development.
In summary, Flutter, despite its initial learning curve, provides a better developer experience, easy styling, and impressive cross-platform deployment capabilities.

it's crucial to recognize that both web development and Flutter have their unique strengths, and neither can be deemed as the definitively "better" technology.
Offline Persistent Storage in iOS Applications
Tags: storage, swift, coredata, userdefaults
Published: 2023-12-21 18:50:42

---
title: Offline Persistent Storage in iOS Applications
published: true
date: 2023-12-21 18:35:18 UTC
tags: storage, Swift, CoreData, UserDefaults,
canonical_url: https://blog.shivammaggu.com/offline-persistent-storage-in-ios-applications
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dm14xdg63iq6p4omhoav.png
---

In this article, we will discuss the various kinds of persistent storage options provided by Apple for iOS applications.

## Table of Contents
- [What is offline storage?](#what-is-offline-storage)
- [Why do we need it?](#why-do-we-need-it)
- [When should we use it?](#when-should-we-use-it)
- [How should we use it?](#how-should-we-use-it)

## What is offline storage?

It is a kind of storage not on a network but on a physical device. In regards to an iOS application, it means that the data generated or displayed by an app is not stored on or retrieved from a network. Instead, it resides locally in the user's device.

## Why do we need it?

It makes the app more accessible to the users. They are not dependent on the internet to use the app's functionality.

## When should we use it?

Let's take examples of some popular apps that do not hinder user functionality when offline.

- Chat apps such as Telegram and WhatsApp can store your messages when offline and deliver them when the connection is restored.

- Automation apps like Automate store users flow offline.

- Offline dictionaries store the words and their definitions on the device.

- E-book reading apps store the books offline so users can read anytime and anywhere.

- Mail apps like Gmail and Outlook queue your recently sent emails in Outbox and send them once online.

- Contacts and SMS apps store phone numbers and text messages.

- OTT apps provide download features to store your favourite TV Shows and Movies locally and watch offline.

- Todo lists, reminders, calendars, sketching and fitness tracker apps store data offline.

- YouTube and Spotify can download our favourite songs to local storage.

We should use offline persistent storage when an app calls for such use cases. We can also use offline storage to cache data models fetched from the REST APIs.

## How should we use it?

If your app architecture calls for offline storage there are various ways to achieve this in iOS. Mentioned below are some examples provided directly by Apple.

- UserDefaults

- KeyChain

- Property List

- FileManager

- URLCache

- Core Data

I'll be adding a separate article discussing the features, implementation and use case for each storage technique.
Standard library functions in C programming.
Tags: functions, library, programming, beginners
Published: 2023-12-21 18:11:26

Standard library functions are predefined function which is already defined inside a file and we can directly use them in our program.

## Input / Output functions
**printf()**
`printf()` is a standard library function which is defined in the `stdio.h` header file. So that is why `<stdio.h>` is included in our program file.
```
#include <stdio.h>

int main() {

    printf("Hello world");

    return 0;
}
```

**Other I/O functions in C are:**
`scanf()`: Reads formatted input from the console.
`getchar()`: Reads a single character from the console.
`putchar()`: Writes a single character to the console.
`fopen()`: Opens a file.
`fclose()`: Closes a file.
`fread()`: Reads data from a file.
`fwrite()`: Writes data to a file.

## Mathematical functions
**sqrt()**
`sqrt()` is a standard library function which is defined in the `<math.h>` header file. It is used to calculate the square root of a number.
```
#include <stdio.h>
#include <math.h>

int main() {
    
    int num = 25;
    printf("Square root %lf", sqrt(num));

    return 0;
}
```

**cbrt()**
`cbrt()` is a standard library function which is defined in the `<math.h>` header file. It is used to calculate the cube root of a number.
```
#include <stdio.h>
#include <math.h>
int main() {
    
    int num = 27;
    printf("Cube root %lf", cbrt(num));

    return 0;
}
```

**pow(a, b)**
In C, `pow(a, b)` is used to calculate the a raised to the power of b. It's available in the `<math.h>` header file and takes two arguments.
a: The base value 
b: The exponent 
```
#include <stdio.h>
#include <math.h>
int main() {
    
    int a = 5;
    int b = 2;
    
    double result = pow(a, b);
    printf("Power: %lf", result);

    return 0;
} 
```

**Other mathematical functions in C are:**
`abs()`: Returns the absolute value of a number.
`sin()`: Calculates the sine of an angle.
`cos()`: Calculates the cosine of an angle.

## Character handling functions
**toupper()**
`toupper()` is a standard library function which is defined in the `<ctype.h>` header file. It is used to convert a lowercase letter to its uppercase equivalent.
```
#include <stdio.h>
#include <ctype.h>

int main() {
    char alpha = 'e';
    char upper = toupper(alpha);
    printf("%c", upper);
    return 0;
}
```

**Other character handling functions in C are:**
`isalpha()`: Checks if a character is an alphabet.
`isdigit()`: Checks if a character is a digit.
`isupper()`: Checks if a character is uppercase.
`islower()`: Checks if a character is lowercase.
`tolower()`: Converts a character to lowercase.

---
Apart from the standard library functions that are mentioned above, there are many other standard library functions in C programming which are used for important operations. The remaining functions will be discussed in the upcoming posts.
Expand Your Writing Creativity with a Free Sentence Expander Tool
Published: 2023-12-21 17:33:14

Simplified offers a powerful and user-friendly free sentence expander tool, allowing you to effortlessly enhance your writing skills and create engaging content. With this innovative tool, you can expand your sentences and unlock new creative possibilities, all without spending a dime.
https://simplified.com/ai-writer/sentence-expander-generator
Understanding Params and Query Params: A Simple Guide
Published: 2023-12-21 17:31:07

Have you ever looked at a web address and felt like what are these jumble of letters and symbols? These are nothing but the two friendly helpers called **"params"** and **"query params"**.

In the context of web development and APIs, "params" and "query params" generally refer to different aspects of passing information in a URL or web address, particularly in the context of HTTP requests. 
Understanding these terms is easier than you might think.

Let's take an example of a library website so that it will be easier to understand.

**Params** - They are the parameters that are part of the URL path itself. Let's imagine, if a website is like a library, the params are like telling it which book you want to read. 

**For example** - in below URL, "bookname" is a param in the path.
 
`https://library.com/book/bookname`

**Query Params** - They are included in the URL after a question mark (?) and are used to pass key-value pairs as part of the URL query string. 

**For example** - in below URL, the author and category parameters are part of the query string. It is like Hey, can you show me books about action by surbhi?"

`https://library.com/book?author=surbhi&category=action`

In summary, "params" generally refer to the parameters that are added in the path of the URL, while "query params" refer to the parameters in the query string. Both are different ways to pass data to a server or application, but they serve different purposes and are used in different parts of the URL.

Happy Reading!!
Houdini: Keep A Chaotic Character Vellum Cloth Under Control
Tags: houdini, vellum, vfx, 3d
Published: 2023-12-21 17:18:25

Does the cloth on your animated character look chaotic and out of your control?


![default chaos vs velocity blended calm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dlmx80kcskexc2cyhsn.gif)

Vellum has a "one toggle switch and a slider" solution for this problem. The slider allows you to control how chaotic/tamed the cloth can get. Let's get started!

Below is my setup. I basically used a cube as the main character in this case and transformed it with a trig function to make it oscillate on the y axis.  A point velocity node ends the cube's node chain.  Getting the character's velocity is very important for the setup and needed for the fix to work. The cloth is a grid with an initial vellum cloth setup to get an already draped cloth for as initial state. Simple network

![The entire network](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tysfhyymm9rnolf4h2e7.png)

First, the cloth is attached to the cube via a Vellum Constraint Attach To Geometry node. A primitive group I made on the cube and named "att" is fed into the group slot of the constraint. The point velocity node from the cube is piped into the collision geometry input of the constraint node. A vellum solver is then dropped to demo how it goes. Attached but definitely chaotic. This is where the solution comes in. 


![The first Attach Constraint is indicated in green and the second is indicated in blue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjgce6jx4wytz4rgbqbw.png)

A second Attach to Geo Constraint is added after the first one(mind you we are keeping both). This time all the group slot will be left empty and the stretch stiffness set to 0. The Velocity Blend property under the Stretch tab is then activated. The amount is now based on what feedback you get and what you are going after. In my case I settled with 0.3. Keep in mind that without the point velocity node from the cube, this will not work.


![the first Attach Constraint is on the left and the second is on the right. Take note of the differences in the marked areas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwbia51b4p9cb71a6g83.png)

That is it. The hip file is in a github repo [Houdini-Vellum-Blend-HipFile](https://github.com/kwesikwaa/Houdini-Vellum-blend)
Smallest Docker Image - 92B
Tags: docker, podman, devops, opensource
Published: 2023-12-21 16:45:38


## Worlds smallest Docker Image - aka WSDI

Hi everyone,

If you ever wondered what is the minimal Docker image in the world, then you are in right place.
Is it debian, is it alpine or busybox ? 

Our team at Dooqod did extensive research on to figure out this.

We come up with 2 approaches to figure this out.

### Approch 1:
At least there is finate amount of Docker images under DockerHub. 
So this task should not be impossible. To run all of them and compare.

But it'll take lots of time and resources. 

### Approach 2:
We decided to create the smallest one and publish under DockerHub. Sounds promising.

### Wow moment
Wow, we can create the smallest Docker image in the wold.
It can be the MVP and we can try to sell it :) 

So we started this project right away.

### Dockerfile of the 'worlds-smallest-docker-image'

d - is just an emptyfile we add into 'scratch'

```shell
FROM scratch
ADD d /d

```

### What is scratch ?

The scratch image is the most minimal image in DockerHub. This is the base ancestor for all other images. 
The scratch image is actually empty. It doesn't contain any folders/files.

You can use Docker’s reserved, minimal image, scratch, as a starting point for building containers. Using the scratch “image” signals to the build process that you want the next command in the Dockerfile to be the first filesystem layer in your image.

While scratch appears in Docker’s repository on the hub, you can’t pull it, run it, or tag any image with the name scratch. Instead, you can refer to it in your Dockerfile. For example, to create a minimal container using scratch:

https://hub.docker.com/_/scratch

### How to build 

```shell
# just clone the repo
# cd into repository and run 

docker build -t wsdi .

# or pull from DockerHub

docker pull docker.io/dooqod/wsdi:latest

# check 


```

### Support the project to not grow :)

Our goal is to make this image minimal.
We'll put all our efforts to keep it simple and small also in the feature.

 - Give a Github Star - https://github.com/dooqod/world-smallest-docker-image
 - Buy lambo :)
🚀 Learn JavaScript with Me! 💻✨
Tags: webdev, beginners, tutorial, javascript
Published: 2023-12-21 16:36:37

Hey everyone! Exciting news – I'm kicking off daily JavaScript tutorials that are super easy to follow!

Here's what you can expect:

🎓 Daily Tutorials: Bite-sized lessons every day!
🛠️ Project Fun: We'll build cool stuff together!
🤔 Why join in?

🚀 Easy Learning: No jargon, just simple explanations!
💡 Build Stuff: Projects to practice what you learn!
Learn everything from the basics to advanced JavaScript – all you need to know!

Get ready for the JavaScript fun!

👉 Spread the Word: Tag your pals, let's code together! 🚀💬
👣 Follow Me: So you don't miss any tutorials!

Ready to code? Let's do this! 💻🚀
Exploring Polymorphism: Understanding Flexibility in Object-Oriented Programming
Tags: programming, oop, polymorphism, dotnet
Published: 2023-12-21 16:32:13

Polymorphism, derived from the Greek terms "**poly**" (meaning **many**) and "**morphos**" (meaning **shapes**), stands as an expression of flexibility within the area of [Object-Oriented Programming (OOP)](https://dev.to/mzunairtariq/understanding-object-oriented-programming-concepts-a-comprehensive-guide-for-interviews-gjg). It empowers developers to create adaptive, reusable, and scalable code structures, supporting a dynamic approach to software design.

**Unveiling the Power of Polymorphism:** At the heart of polymorphism lies the ability of different objects to exhibit different behaviors based on their specific implementations of methods inherited from a common superclass or interface. It allows for methods to be invoked on objects that belong to different classes, providing a common interface for various object types.

**Leveraging Flexibility:** As we go into the depths of polymorphism, we embark on a journey where a single method call can perform different behaviors based on the actual type of the object. This feature enables code reuse, simplifies complex systems, and supports modular architectures.

In Object-Oriented Programming (OOP), polymorphism manifests in numerous forms. 
**<u>The main types of polymorphism are as follows:</u>**

- **Compile-time Polymorphism** (Static Binding or Early Binding):
     - **Method Overloading:** Method overloading lets you specify several methods in the same class with the same name but with different parameters. The compiler determines the method to invoke depending on the method signature or parameters at compile time.

- **Run-time Polymorphism** (Dynamic Binding or Late Binding):
  - **Method Overriding:** Method overriding occurs when a subclass provides a specific implementation of a method that is already specified in its superclass. The exact method to be invoked is determined at runtime based on the object's type.

  - **Interface Polymorphism:** Interface polymorphism occurs through interfaces, when multiple classes implement the same interface yet give their own implementations for the interface methods. Objects of these classes can be referred to by the interface, allowing for flexibility and interchangeability.

Such types of polymorphism enable objects to show different behaviors depending on particular types or the context in which they are used, enhancing flexibility, code reuse, and maintainability in the development of software.
OPENSOURCE & DEVREL
Tags: javascript, webdev, programming, beginners
Published: 2023-12-21 16:26:43

Open-source and DevRel As a Career ✨

- I recently talked with Haimantika Mitra She's part of the DevRel team appwrite 🚀

We discussed 
- DevRel 
- Opensource
- GitHub Octernship 
- Appwrite Contribution 
- Career Advice and lot more!

Complete Video Link👇
{% youtube https://youtu.be/PDP6iz7DuYw?si=fANXe6zvF7cIFFju %}
What are dist-tags in npm?
Tags: npm, node, publish, package
Published: 2023-12-21 16:18:30

Recently I had a need to use dist-tags tags when publishing a package with npm. It unfortunately took longer than I would have liked to fully understand it conceptually, so I thought I'd put this document together to provide all the information someone would need to get started.

## What are dist-tags?

dist-tags or distribution tags are an optional way to provide an alias for a package that you are publishing. They are not to be confused with [Git tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging). [Here](https://docs.npmjs.com/cli/v10/commands/npm-dist-tag) is npm's documentation on dist-tags.

## How do you add a dist-tag when publishing a package?
When you publish a package, you can add a dist-tag by including the `--tag` option followed by the dist-tag you'd like to use. If you do not include the `--tag` option, (meaning you just run `npm publish`), the dist-tag `latest` will be used by default. 

Here is an example where we publish a package with the `stable` dist-tag:
```
npm publish --tag stable
```
An important takeaway is that using the `stable` dist-tag (or any dist-tag other than `latest`) not only associates that alias with the version of that package, but it results in the package NOT being marked as `latest`:

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

As it turns out, this describes my original need for dist-tags. I had to publish a version of a package for a previous major version and needed to ensure the version of the package I was publishing was not going to be considered the latest.

## How do dist-tags come into play with installing a package?
We are all familiar with how to install a specific version of a package. We'd do something like this:
```
npm install some-package@3.2.0
```

Similarly, we can also target a specific Git tag when installing a package. Like this:
```
npm install some-package@v3.2.0
```

Just as we can target a specific package version or Git tag, we can also target a specific dist-tag like this:
```
npm install some-package@beta
```

This is why when you want to upgrade a package to the latest version, you run the following command:
```
npm install some-package@latest
```
You are simply telling npm: _"Install the package with the `latest` dist-tag."_

## What values can I use for a dist-tag?
There are certain dist-tags that it seems the industry has standardized on like `beta`, `canary`, and `next`, but you can use almost any value that makes sense for your project.  Other than `latest`, no tag has any special significance to npm itself.

The only restrictions are that dist-tags share a namespace with versions and Git tags so your dist-tag cannot match one of those. You will actually get an error if you try to publish a package that appears to be a semantic version (eg. `3.2.0`) or tag (`v3.2.0`).