teleren/devto huggingface dataset:
HTTP
Tags: webdev, beginners, programming, codenewbie
Published: 2022-08-15 09:20:00

**WHAT IS HTTP ?**
- Hyper Text Transfer Protocol
- Communication between web servers & clients
- HTTP Request/Responses
- Loading pages, form submit, Ajax calls

**HTTP IS STATELESS**
- Every request is completely **independent**
- Similar to transactions
- Programming,Local Storages,Cookies,Sessions are used to create enchanced user experiences.

**WHAT IS HTTPS?**
- Hyper Text Transfer Protocol Secure
- Data sent is encrypted 
- SSL/TLS 
- Install certificate on web host

> Protocol means "set of rules"

  **SSL : SSL Stands for Secure Sockets Layer.**
  **TLS : TLS Stands for Transport Layer Security.**

> SSL is a protocol used to send information securely through the network. Websites use SSL to secure user account pages and for online checkouts. It encrypts the data to avoid a third party accessing the transmitting data. On the other hand, TLS protocol is a successor to SSL. It provides privacy, integrity, and protection to the data. It allows communication across the network without interference by eavesdropping and tampering. In brief, the TLS is more secure and efficient than the SSL.

**HTTP METHODS** 
> when a request is made to a server it has some kind of methods attached to it.

- GET - Retrives data from the server.
- POST - Submit data to the server.
- PUT - Update data already on the server.
- DELETE - Delete data from the server.

**HTTP HEADER FIELDS**

1.General: Request URL , Request Method , status code , Remote Address,Referrer Policy.

2.Response: Server,Set Cookies ,Content-Type,Content-Length,Date.

3.Request: Cookies,Accept-XXX,Content-Type,Authorization,User Agent ,Referrer.

**General:**
1.Request URL - contains the URL request you are requesting. 
2.Request Method - GET,POST,PUT & DELETE request 
3.Status Code - 
4.Remote Address - Ip of the remote computer.
5.Referrer Policy - if you go from one page to another page

**Response:**
1.Server - The Server header describes the software used by the origin server that handled the request — that is, the server that generated the response.
2. Set-Cookies- used for servers to send small pieces of data called cookies from the server to the client
3. Content-Type- Every response has a content type If it's HTML = text/html , CSS = text/css, Images = image/png,image/jpeg ,JSON= Application/JSON
4.Content Length -  octets 8-bit bytes .
5.Date  

**Request:**
1. Cookies
2. Accept -xxx
3.Content-Type
4.Content-Length
5.Authorization
6.User-Agent
7.Referrer

**HTTP STATUS CODES**
1. Informational responses (100–199)
2. Successful responses (200–299)
3. Redirection messages (300–399)
4. Client error responses (400–499)
5. Server error responses (500–599)

**Some Commonly Used Status Codes are:**
> 200- OK
> 201 -Ok created
> 301-Moved to new URL
> 304-Not modified (Cached version)
> 400-Bad request 
> 401-Unauthorized 
> 404- Not found
> 500-Internal server error

**HTTP/2**

* Major revision of HTTP
* Under the hood changes
* Respond with more data
* Reduce latency by enabling full request and response multiplexing.
* Fast,efficient & secure.
What is Dockerfile ? (Docker Series - III)
Tags: webdev, docker, beginners, series
Published: 2022-08-15 09:17:00

**If anything missed kindly add in comment**

1. A sequential set of instruction for Docker engine , or a set of commands to assemble the an image
2. Primary way of interacting with Docker and migrating containers.
3. Each sequential instructions are processed individually and results are stored as stack of layers. This sequential layer managed by file system becomes a docker image.
4. Sequential layers helps to cache and helps to troubleshoot.This precreated layer are reused by docker daemon when we run two docker file that has same layer at some stage.

## Format:

```
ARG
FROM
RUN
ADD|COPY
ENV
CMD
ENTRYPOINT
EXPOSE
```

No extention required, can be created from any text editor, its good to start a docker file name with 'D' capital.

## EXAMPLE:

```
ARG VERSION=16.04
FROM Ubuntu:${VERSION}
RUN apt-get update -y
CMD ["bash"]
```
Comments in Dockerfile is represented using '#'. But all hash preceeded sentence is not comments. That also means parser directive.

**Parser directive**
  parser directive, one of the docker command indicates, how the docker file should be handled or read. It should be at the top of the file. 

  **Types of parser:**
  1. syntax:  Its only available in buildKit, but its used 
              to know the location of the dockerfile.

  2. escape: it available anywher, it used to specify the 
             character to escape. default is '\'.

**COMMANDS:**
1. **ARG** is the only instruction that may precede FROM
2. **FROM** can appear multiple times within a single Dockerfile to create multiple images or use one build stage as a dependency for another. 
3. **WORKDIR** This sets the working directory for Run, cmd, copy. By default the WORKDIR is created if not specified.
4. **RUN** to execute any command in new layer on top of current layer 
RUN  ["executable", "param1", "param2"]. (exec form) another way of executing command irrespective of the shell based. eg RUN ["/bin/bash", "-c", "echo hello"].
5. **ADD**  Add new files from src and copies to dest. used to copy to docker image. should be used with caution.
6.  **COPY** Copy new files from src to dest, used to copy to docker container.
7. **Env**  Provide value for environment variable
8. **CMD**  Used to execute command in shell
docker file can contain only on CMD , if more than one specified last final will be executed.
8. **Entry point** Used to execute command when container is initiated
9. **Expose** expose a particular port with specific protocols
Hur Googles Pros & Cons påverkar produktsidor
Published: 2022-08-15 09:08:17

Webb of Sweden är en webbyrå för företag som man kan lita på. Ni hittar hela artiklen [här](https://www.webbofsweden.se/hur-googles-pros-cons-paverkar-produktsidor/)

Kontakta oss om ni har fler frågor eller vill ha en [hemsida för ert företag](https://www.webbofsweden.se/hemsida-foretag)
How to get a job?
Tags: job, jobsearch, technology, technologyjobs
Published: 2022-08-15 09:06:12

Lately, many of my friends were looking for a new job. I summarized my advice for them in this article. What do you think? BTW do you know any good remote job boards that are good outside of software engineering?

[https://horosin.com/how-to-get-a-job](https://horosin.com/how-to-get-a-job
)
#2 Interviews - Content Creation with Tim Benniks
Tags: devrel, webdev, programming, community
Published: 2022-08-15 09:00:45

When looking at Developer Content creation, there are few creators that I always wanted to interview as they are the authors of many great videos and articles. Todays guest is Tim Benniks and I have followed him on Twitter/YouTube and finally had a chance to talk about his story, ideas, and future plans.

Tim is Principal Developer Advocate at Uniform where he works on developer relations, community building and content creation. Next to working at Uniform Tim, is also active in the developer community by speaking at conferences and creating YouTube videos. He collaborates with startups like Cloudinary, Prismic, Zeplin, NuxtJS and he is a part of the MACH Alliance Tech Council. It’s all about quality, community and building fancy websites. 

You can also reach Tim here:

* Twitter: https://twitter.com/timbenniks
* YouTube: https://youtube.com/timbenniks
* LinkedIn: https://linkedin.com/in/timbenniks
* Github: https://github.com/timbenniks
* Uniform: https://uniform.dev

During our talk, we have covered topics such as developer advocacy, dev rel, community creation, and many more.

{% youtube VJYLLDHX9C0 %}
Reflections: Take care when adding dependencies
Tags: javascript, programming
Published: 2022-08-15 08:43:52

Today we ran into a problem where an abandoned dependency was blocking our ability to update React.

The dependency was added nearly a year ago as our company quickly built and released features.

It fits a specific scenario perfectly, and I can definitely see how the developers working on it at the time saved a lot of time in the short-run to release according to spec.

However, the package has been long abandoned. In fact it hasn't been updated for 3 years. It was never an official package to begin with. While it was a shortcut a long time ago, now it has saddled us with technical debt that can only be addressed either through a significant rewrite or abandoning the feature in its current form.

What's worse is that this package is only used in one place. The code implementing this is also non-trivial meaning that we built a relatively complex bit of code on top of this now defunct third-party library.

## Self-reflection

While I didn't implement the code, I realised that this was a mistake that I could just have easily made.

When I was early on in my programming journey I used to love adding packages. It's best not to create something if it is already created right?

I've learned since then that this is not necessarily the case. There are good reasons and bad reasons to use packages. 

Packages that aren't updated die. And especially with UI based packages, they don't die a graceful death. Especially in the JavaScript ecosystem changes move so fast that being strategic is important.

**A couple of lessons:**

1. Avoid using packages for shortcuts. Yes, they may help now but will you come back and undo the shortcut?

2. All packages are not created equal. If you have to use packages pick well-maintained ones, unless the package does not need to be updated. For example the package that caused us problems was clearly abandoned before we decided to use it.

3. Especially avoid packages that themselves have a lot of dependencies that may conflict with your own eg. React.

4. Ask and ask your self again, do you really need that package? Eg. If the design you are seeking is so complex you need a package yet don't have the time to actually build it yourself, isn't it just better to build something simpler?

5. Maintaining dependencies take time and effort. Tech debt maintainence is important especially if you decide to rely on a package that is not well maintained.

That being said, the answer is not always to avoid dependencies. The key is to wary and make the decision with both eyes wide open.
Laravel applies Admin One dashboard template to CRUD
Tags: webdev, php, laravel, laravelframework
Published: 2022-08-21 13:07:27

---
title: Laravel applies Admin One dashboard template to CRUD
published: true
date: 2022-08-15 08:41:25 UTC
tags: webdevelopment,php,laravel,laravelframework
canonical_url: https://blog.devgenius.io/laravel-applies-admin-one-dashboard-template-to-crud-e187a6cce50
---

[![](https://cdn-images-1.medium.com/max/1355/1*REX-QbbCWKzRzXFSaKK8Bw.png)](https://blog.devgenius.io/laravel-applies-admin-one-dashboard-template-to-crud-e187a6cce50?source=rss-17217f29618a------2)

Laravel creates a Vue admin panel from scratch — Part 7

[Continue reading on Dev Genius »](https://blog.devgenius.io/laravel-applies-admin-one-dashboard-template-to-crud-e187a6cce50?source=rss-17217f29618a------2)
A Quick 10-Second Programming Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-08-15 08:00:11

---
title: "A Quick 10-Second Programming Joke For Today"
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/5e12591b4fccd.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:___ Why don't parents teach their kids about regular expressions?

___A:___ Because they don't want them playing with matches
 -->
Zipping in Software Development
Tags: devops, continuousdelivery, agile, automation
Published: 2022-08-15 07:53:00

In the Software Engineering, the Continuous Integration (CI) is the key factor to deliver a confident software. We can think of CI in terms of DevOps, we can think of it as two pillars: the feature code and it's many Tests.

The power lies in the Continuity - the practice - witch has to go on all the time every day for every piece of code/function. We know the improper functions of the Zipper, i.e. it may slide with only one side or slide with gaps relative to other side (less coverage). 

The zipper benefit comes when it has been blocked so bad unit has been detected. We have to do an Effective Pull Requests to ensure a right forward step/slide. 

This Zipper interpretation can be rolled out to the continuous alignment/sync between quality engineers and software engineers, between product owner and engineers. 

Keep it in your mind all the delivery time in all aspects.
This leads to the sustainability in the Software Development.

More details: https://lnkd.in/gnZtewh

Worthy reading researches about #zipper metaphor / model in #softwaredevelopment
https://lnkd.in/eFPMMnzn [2010]
https://lnkd.in/et66_GND [2014]
https://lnkd.in/eSrhrg_U [2017]
Range() Function in Python.
Tags: programming, python, beginners, range
Published: 2022-08-15 07:36:00

**1.Intoduction**
The range function is used to return the sequence in number.
**Syntax**
 range(start, stop, gap)
**2.Parameters**
-Start-It is a optional value. It specifies the range that where to start. Its default value is 0.

-Stop-It is a necessary step to specify the end point.

-Gap-it is a optional step to specify the incrementation. Its default increment value is 1. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ootctofdmqk33k1l3b9x.jpg)  
**For example-**![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdaqny04gvbf56uvtdp6.png)
The output for above example is-
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lxf39ttuu6k6gjmj55z.png)
the starting point was not specified so, it started from default value.   
**NOTE**
The float and String value cannot be accessed by range.
But an be accessed in sequence. 
for example-![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tb6wcuanrxvnzt7qa5m8.png)
output
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adkucsajira9hvrg2n9h.png)
 
**3.Examples**
  1.![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gm23ofgnio3s00arj5zi.png)
output
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yn4an6ptsi9sw9drdhxl.png)
 2. ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djmrmjp9esbr7m1r43e2.png)
output
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1ryzplo73iz64akq0qw.png)
Typescript Series - Pick Utility Type
Tags: typescript, javascript, webdev, beginners
Published: 2022-08-15 07:00:00

I'd like to start by saying that I am doing this series to learn and understand better Typescript, so feel free to correct me or contact me.

## What is the Pick Utility Type?
`Pick <Type, Keys>` Constructs a type by picking the set of properties Keys (string literal or union of string literals) from Type. In other words, the new type is a subgroup of properties that are extracted from Type properties [Docs](https://www.typescriptlang.org/docs/handbook/utility-types.html#picktype-keys).

This is how it works:
```
interface Todo {
  title: string;
  description: string;
  completed: boolean;
}
 
type TodoPreview = Pick<Todo, "title" | "completed">;
 
const todo: TodoPreview = {
  title: "Clean room",
  completed: false,
};
```
So as you can see, we picked only the 2 keys we wanted from the Todo Type [Preview](https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgCoHsAm7kG8BQyyYwYANhAFzIDOYUoA5gNyHKYQ0IMAOJ6IanQYgWbBOgC2PCpEzUARunQU4IVgF98+MAE8eKDNgAKUCADdgEAO7IAvMmPAEAawA8R9ABpkAIhLkEL7IAD5+EtKyEJi+AHys+BIgdMRY6NSephZWtg4ERAEU1L4AwqogyFDKkr5e4lIyEHLU8GQ0EHUaCWBprAD0fcgAegD8QA).

But how does it work under the hood?

```
type Pick<Type, Key extends keyof Type> = {
    [k in Key]: Type[k];
};
```

So let's **break down** the tricky parts.

`Key extends keyof Type` The keyword **_extends_** in this case means Key should exist in its parent, wherein keyof Type is the parent. If we were to take the Todo interface from above as an example, the keys would be "title" | "description" | "completed"


`[k in Key]` The keyword **_in_** means that K has to be one of the keys extracted from Key ("title" | "description" | "completed")

`Type[k]` Finally, here we are simply accessing the type of a property. Same as how we access values in an object, let's look at the following example.

```
interface Person {
   name: string;
   age: number;
}

// Access the type of name
Person['name'] // string

// Like saying Type[K] where Type is Person and name is K
```
Well, there you have it, now you know how the  Pick utility type works!


### Conclusion

The Pick utility type it's very handy since it allows us to dynamically construct new types from existing ones,




Thank you!

you can find me here [My Twitter] (https://twitter.com/sarmunbustillo?t=pztqXmT7DH2pa9lDLjfrdQ&s=09)
How to create a Dynamic NFT Minter bot using Solidity and Python? — Pt 3.
Tags: dynamicnft, nft, nftbot, solidity
Published: 2022-08-15 06:53:13

> See the last series of building a dynamic NFT minter bot using Python and Solidity: **[Link](https://medium.com/@sajadsolidity/how-to-create-a-dynamic-nft-minter-bot-using-solidity-and-python-pt-3-e3865e54607a)**
Lexicographical Rank of String- Efficient Approach
Tags: javascript
Published: 2022-08-15 06:38:00

```
// Max count is 256
let MAX_CHAR = 256;

// Calculating factorial of n
function fact(n) {
  return n <= 1 ? 1 : n * fact(n - 1);
}

// Updating count table with count & clumative count


// example = "ABCK"
// for A = 1
// for B = 2 ( as before B we have A already appeared)
// for C = 3 ( as before C we have B & A (2+1) already appeared)
// For D = 3 
// ...

// For K = 4 ( as before K we have A to J  out of which till C we have match in string & after 3 till J keeping count same.)


function populateAndIncreaseCount(count, str) {
  let i;

  for (i = 0; i < str.length; ++i) ++count[str[i].charCodeAt(0)];

  for (i = 1; i < MAX_CHAR; ++i) count[i] += count[i - 1];

  console.log(count);
}
// reducing as that Alphabet is now considered hence rest all // should run by -1;
function updatecount(count, ch) {
  let i;
  for (i = ch.charCodeAt(0); i < MAX_CHAR; ++i) --count[i];
}
function findRank(str) {
  let len = str.length;
  let mul = fact(len);
  let rank = 1,
    i;

  let count = new Array(MAX_CHAR);
  for (let i = 0; i < count.length; i++) {
    count[i] = 0;
  }

  populateAndIncreaseCount(count, str);

  for (i = 0; i < len; ++i) {
    mul = Math.floor(mul / (len - i));
    rank += count[str[i].charCodeAt(0) - 1] * mul;
    updatecount(count, str[i]);
  }

  return rank;
}

console.log(findRank("DCCBA"));

```
Python basics!
Tags: python, beginners, programming, productivity
Published: 2022-08-15 06:37:23

**Getting started with python?**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fddoag5y7o1ppaw4p0d.jpg)
As I was going through the toughest time where my logical skills were at the most vulnerable state I came to know that I need to practice my logical buildings as soon as possible.
As a developer I was running out of time to compete with the best in the game. However, I had that tendency to move out of the box and struggle hard enough to get industry ready.
If you are the one, lets get you a list of python 100 question solution to make you a easy go industry ready.

Lets get you some of the example of it-

_Program to find the greatest number asking users for number._

`a = int(input("enter the first age: "))
b = int(input("enter second age: "))
c = int(input("enter 3rd age: "))

if a>b and a>c:
  print("a is greatest")
elif b>a and b>c:
  print("b is greatest")
else:
  print("c is greatest")`

_Program to convert cencius to farhenheit_
`celcius = int(input("enter the celcius"))

farhenheit = (celcius * 9/5) + 32
print("farenheit of the celcuis is : ",farhenheit)`

_logic to swap number_
`a = int(input("enter first number: "))
b = int(input("enter second number: "))

print("the initial number is: ",a,b)

temp = a
a = b
b = temp

print("the final number after swap is: ", a,b)`

These are some of the basic example of python code.
For making you more sound in this career go through W3 school and try reading out all the python basic tools and libraries. Don't forget to learn concept on Object Oriented Programming (OOP) and also building an API from it.

Follow along my github - [github](https://github.com/RahulParajuli)

Good luck, Folks! Happy coding.
How to respond to input changes reactively in the child component
Tags: angular, javascript, webdev
Published: 2022-08-15 06:15:59

Component interaction can work in one of the following three ways:
 - `ngOnChanges()` lifecycle hooks
 - Setters on the `@Input()` property
 - Services

If your component is a presentational component and interacts only with the `@Input()` and `@Output()` properties, then using ***setters is the most reactive way* **of interacting with the child component

Let's understand how!

## Parent Child Component Interaction

Parent component passes value to the child component with the following syntax where userValue is an [@Input()](https://angular.io/api/core/Input) property in the child component
```
<child-component [userValue]="userValue"></child-component>
```
```
export class ChildComponent {
  @Input() userValue;
}
```

## Setters on the `@Input()` property

Setters on the [@Input()](https://angular.io/api/core/Input) property runs some additional logic whenever the input changes.
So, instead of defining userValue, we define a function on the userValue property which executes whenever input changes.
```
export class ChildComponent {
  status = false;
  @Input() set userValue(value: string) {
      this.status = true;
  }
}
```
These are called property accessor methods which executes on setting/getting values. Add a `set` keyword before a property to make a setter.

----

## Thanks for reading!

Please feel free to reach out on [Twitter](https://twitter.com/devminibhati) or [LinkedIn](https://www.linkedin.com/in/minibhati93/)