teleren/devto huggingface dataset:
Javascript Objects
Tags: javascript, webdev, beginners
Published: 2022-02-11 22:51:53

Javascript works on the basis of object oriented programming. This article describes how to use objects, properties and methods, and how to create your own objects.

**What is an object?**
In JavaScript, an object is a standalone entity, with properties and type. They include: string, number, boolean, null and undefined. For example a user object can have the following properties: username, email and gender.

**Objects and properties**
A JavaScript object has properties associated with it. A property of an object is a variable that is attached to the object. The properties of an object define the characteristics of the object. You access the properties of an object with a simple dot-notation:
`objectName.propertyName`
Like all JavaScript variables, both the object name and property name are case sensitive.
You can define a property by assigning it a value. To demonstrate this, here’s a sample object `myDog`
 
```
const myDog = {
“name”: “Joe”,
“legs”: 4,
“tails”: 1,
“friends”:[“everyone”]
};

```
“Name”, “legs”, “tails” and “friends” are properties while “Joe” “4” “1” and “everyone” are values.

**Object Methods**
Methods are actions that can be performed on objects.

```
const person = {
  firstName: "John",
  lastName: "Doe",
  id: 5566,
  fullName: function() {
    return this.firstName + " " + this.lastName;
  }
};

```
**Creating a JavaScript Object Using an Object Literal**
This is the easiest way to create a JavaScript Object.
Using an object literal, you both define and create an object in one statement.
`const person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"};`

**Conclusion**
Objects in JavaScript can be compared to objects in real life. The concept of objects in JavaScript can be understood with real life, tangible objects. In JavaScript, an object is a standalone entity, with properties and type. Compare it with a chair, for example. A chair is an object, with properties. A chair has a color, a design, weight, a material it is made of. The same way, JavaScript objects can have properties, which define their characteristics.
Graph Databases vs NoSQL
Published: 2023-04-12 11:25:34

**NoSQL Databases:**
NoSQL databases (aka "not only SQL") are non-tabular databases and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model. The main types are document, key-value, wide-column, and graph. They provide flexible schemas and scale easily with large amounts of data and high user loads.

Most NoSQL systems are aggregate-oriented, grouping the data based on a particular criterion and the database type (such as document store, key-value pair, etc). This model provides only simple, limited operations and only forms one dedicated view of your data. Focusing on one aggregate at a time allows users to easily spread many chunks of data across a network of machines along the aggregate dimension (for instance, the Document in document databases), but that means that other projections and perspectives have to be computed by crunching or duplicating your data.


**Graph Databases:**
A graph in a graph database can be traversed along specific edge types or across the entire graph. In graph databases, traversing the joins or relationships is very fast because the relationships between nodes are not calculated at query times but are persisted in the database. Graph databases have advantages for use cases such as social networking, recommendation engines, and fraud detection, when you need to create relationships between data and quickly query these relationships.

Graph databases are purpose-built to store and navigate relationships. Relationships are first-class citizens in graph databases, and most of the value of graph databases is derived from these relationships. Graph databases use nodes to store data entities, and edges to store relationships between entities. An edge always has a start node, end node, type, and direction, and an edge can describe parent-child relationships, actions, ownership, and the like. There is no limit to the number and kind of relationships a node can have.

Graph databases, on the other hand, handle fine-grained networks of information, providing any perspective on your data that fits your use case. The well-known and trusted transactional guarantees from relational systems also protect updates of the graph data in Neo4j, conforming to ACID standards.


Want to extract all the benefits of PostgreSQL along with Graph features look at:
[Apache AGE](https://age.apache.org/)
[Apache AGE Github](https://github.com/apache/age)
TRUE WAY OF LEARNING TO CODE
Published: 2022-02-12 08:22:13

Many Beginner programmers learn code in the wrong way. They learn to code like this:

- Write all the information they learn in a notebook.
- Learn all the syntax.
- Learn some theories.
- Learn all definitions.
- etc. (You may know some other points if you are like this)

But, after all these, if someone told them to code a project, the can't. They tell so many definition, theories etc. but they can't code. They don't know how to. 

So, we can understand this is not the true way of learning code. The true way of learning code is.... is... by **_Googling_**. Yah!! You read that right. Googling is the key. If you forget a syntax, just google it. If you caught an error, just google, if you forget something else, just google. So, when there is google you don't need to learn all things thoroughly. Just understand the concept. But the thing is if you forget some syntax, you can google. But you need to know where to put that in code. That is the key. No matter you copy & pasted from stack overflow or from somewhere else, you need to know where to paste it. So, Just understand the concept.

I hope you understood my message. Also Share this message to beginner programmers. This might help them.

Thank You For Reading. Have a Nice day. And comment is open for you valuable replies.
Set MacOS finder folder icon with Python
Tags: python, cocoa, macos
Published: 2022-02-12 09:27:34

##Problem

I want to use Python script to replace MacOS finder folder icon with an image.

##Steps

1\. Install packages

```shell
pip3 install pyobjc-core pyobjc-framework-Cocoa
```

2\. Create a python script file `set-icon.py` with the following code.

```python
import sys, Cocoa

folder_path = sys.argv[1]
print(f"Folder path: {folder_path}")

image_path = sys.argv[2]
print(f"Image path: {image_path}")

result = Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(Cocoa.NSImage.alloc().initWithContentsOfFile_(image_path), folder_path, 0)
if result:
    print("Succeed")
else:
    print("Failed")
```

3\. Run the script to change the icon.

```shell
python3 set-icon.py <folder path> <image path>
```
Transcription Services | Audio & Video Transcriptions - Vanan Services
Tags: transcriptionservices, transcriptionservicesonline
Published: 2022-02-14 07:07:37

Accurate transcription - online transcription services
An exceptional human transcriber could cater to an accurate and clear account of all facts and the non-linguistic conversation sounds, also known as interjections such as “um,” and the non-verbal cues. 


Therefore, professional human transcribers enable you to achieve top-notch standards specially with legal **[Transcription Services](https://vananservices.com/Transcription-Services.php)** and will surely convert your files into exact transcripts without any additional charges. 

Understanding dialects and accents 
When the audio files include several speakers with overlapping conversations, human transcription is the best option.  
Furthermore, human transcription imparts an alternative to referring to a supporting or glossary document whilst transcribing. Humans are also quite capable of deciphering and handling technical & industry-specific terminology masterfully. Hence, humans are the best choice for quick transcription services.

**Provide reliable and accurate data**
Human transcription services are the go-to option with moderate transcription services cost when accuracy and clarity are essential. It has been considered the stroke of benefit, especially for the insurance industry, having trained and specialized individuals who perfectly transcribe conversations, data, and interviews to trustworthy documents. 
In insurance documents, with a legally binding system, great accuracy and care are taken to ensure an exceptional standard of work.

**Ability to deal with background noise**
The biggest reason why human transcribers are chosen over AI mechanisms or automated transcription software is the natural ability to filter out the background noise. For example, when a claimant delivers a statement or makes a claim over call, there is a high chance that the conversation will have terrible background noise. In such cases, human transcribers at language transcription services can filter out the background noise and could deliver a transcript with total accuracy in 
How do you choose the best human transcriber?
Are you an insurance provider or a medical practice? When it comes to excellent and advanced transcription services in the industry today, a skilled team of transcribers can serve you with the best work. Always look for trusted transcription services near me among many of the leading organizations across the US. 

If you’re looking for renowned transcription services in Spanish or any other language to upgrade your investigation claims and processes, get in touch with the prime transcription consultants such as Quick Transcription Service and obtain your transcripts without any delay.

**For Details Visit:** [https://vananservices.com/Transcription-Services.php](https://vananservices.com/Transcription-Services.php)
Why String is Immutable in JAVA? What exactly does it mean?
Tags: java, beginners, discuss, programming
Published: 2022-02-14 20:32:14

So recently I came across the question, why are Strings Immutable in java?
Before discussing on this, I would first like to tell **What are Immutable strings?**

> Immutable simply means unmodifiable or unchangeable. Once String object is created its data or state can't be changed but a new String object is created.

Before going through this article, I recommend to first know about [String Constant Pool](https://dev.to/tishaag098/string-constant-pool-storage-of-strings-1784)


**This is how String works:**
```
String str = new String("Tisha");
```
This, as usual, creates a string containing "Tisha" and assigns it a reference str.
```
  str = str.concat(" Agarwal");
```

![immutable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/338m4oskhv5z49l5gklo.jpeg)

This appends a string " Agarwal" to `str`. But wait, how is this possible, since **String objects are immutable**? Well to your surprise, it is.
When the above statement is executed, the VM takes the value of String `str`, i.e. "Tisha" and appends " Agarwal", giving us the value `"Tisha Agarwal"`. Now, since Strings are immutable, the VM can’t assign this value to `str`, so it creates a **new String object**, gives it a value `"Tisha Agarwal"`, and gives it a reference str.


_Why are strings Immutable?_

_Let's understand this with the help of an example:_

`String chocolate1="KitKat";
 String chocolate2="KitKat";
 String chocolate3="KitKat"; 
`

![image2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/epy8d45r59yokly3zcfb.jpeg)

So what's happening?
In this a object of `KitKat` is created inside String Constant pool and all three variables `chocolate1` , `chocolate2` , `chocolate3` are pointing to it. 

Now if we change cholocate3 to MilkyBar
`chocolate3=MilkyBar;`

Suppose if the string were mutable then without creating a new object the value of `chocolate3` would have changed from `KitKat` to `MilkyBar`.But don't you think this would also change the value of `chocolate1` and `chocolate2 `from `KitKat` to `MilkyBar` as shown in the above diagram, these 3 were pointing to the same object. 

So, that's why Strings are Immutable,
from the above example, now the chocolate3 will create a different object and will point to it.


![Image3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nawikstltzbws2tv2fl.jpeg)



**Point to Remember**

- Strings are Immutable in Java because String objects are cached in String pool. Since cached String literals are shared between multiple persons there is always a risk, where one person's action would affect all other persons.
PWNKit - "I'm root now" - Less than a second
Published: 2022-02-14 17:25:07

---
title: PWNKit - "I'm root now" - Less than a second
published: true
description: We look into the PWNKit vulnrability and how it works. PWNKit is a linux exploit that have been in linux environments for over 12 years. We look at how it works and what is required to be vulnrable and different approaches to secure your system.
tags:
cover_image: https://i.ytimg.com/vi/TcZft7eWO4U/maxresdefault.jpg
---

{% youtube TcZft7eWO4U %}

We look into the PWNKit vulnrability and how it works. PWNKit is a linux exploit that have been in linux environments for over 12 years. We look at how it works and what is required to be vulnrable and different approaches to secure your system.
Find/Extract Features by largest size (aggregate) 🌎
Tags: qgis, gis
Published: 2022-02-14 15:01:20


Say you have multiple shapes within parent shapes; in this case, buildings that belong on parcels of land. We can use the `maximum()` expression in QGIS to find the largest building on each parcel.

##Prerequisites:

- **Keys**: Each building shape needs a unique ID and a foreign key that associates it with the parcel (its parent). In this case I found the `Pole Of Inaccessibility` for each building and used that point in a `Join by Location` against the parcel to create a foreign key to create a relationship between the buildings and parcels.

- **Size**: Each buildings needs a field that defines its area

##The Expression:
###### *We use `Extract by Expression` tool with the parcels layer selected as the input layer.
```"SHAPE_AREA" = maximum("SHAPE_AREA",group_by:="PARCEL_ID")```

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

##Notes:

- **Expression Breakdown**: All that needs to be replaced is `SHAPE_AREA` and `PARCEL_ID`. Keep the remaining syntax the same. I was not familiar with the `group_by:=` syntax and thought this was a memo in documentation I read but this is literally part of the function. Image showing the function below.

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

- **Processing Time**: In my tests I found that the processing time was not linear. What I mean by this is comparing 1000 features does not always take 10 times as long as 100 features. I believe the calculation is ~exponential meaning that the more features you add to compare, the longer the processing time by a factor of x (not sure exactly). If you have a large dataset that you are running this expression against (>50,000 features), I would recommend splitting up the layer you are processing into chunks, run the expression on each, and then merge. You should be able to split the layer without duplicates but if you want to be sure you can always run a `Remove Duplicates` expression after the merge at the end.

> ~56,000 features took about 110 minutes to process.
Difference Between DMM and Oscilloscope
Tags: electrical
Published: 2022-03-15 05:13:59

**DMM vs Oscilloscope**

When dealing with electricity, it is essential that you have the right tools in order to get the right information. Two tools that you can use to deal with electricity are the oscilloscope and DMM, which stands for Digital Multimeter. The main difference between the DMM and oscilloscope is what they can do. The DMM is very versatile tool the can measure voltages, currents, resistances, and some can even check if diodes and transistors work. In contrast, an oscilloscope only measures voltage but with a lot more detail.

The thing that the oscilloscope can do that the DMM cannot do is to actually inspect how the voltage changes over time. This is very useful when it comes to electronics when you are inspecting signals. You can easily tell the waveform of the voltage; whether it’s a sine wave, a square wave, sawtooth wave, and the like. The DMM can only show the average voltage level, so you cannot really inspect it in detail. Another feature of the oscilloscope is the ability to plot two voltages together, thus providing the ability to compare. So if you have an input and an output, you can have them both on-screen so that you can see the changes that your circuit has done in real time.

Lastly, there is the matter of cost. The price may vary from place to place, but the price of an oscilloscope would always be a lot more than the price of a DMM. The difference can reach 10 times or even more.

The oscilloscope and the DMM are specialized tools that have their own uses. The DMM is more common as it is used in a lot more areas, like checking for shorts, voltages, measuring currents, and a lot more. The DMM is essentially a basic and necessary tool for any electrician or electronics enthusiast. The oscilloscope is a more advanced tool that should only be used by more experienced practioners.

Summary:

1. A DMM measures a lot of things while an oscilloscope just measures voltage
2. An oscilloscope is able to show waveforms while a DMM cannot
3. An oscilloscope is used mostly for electronics while a DMM is used for a lot of things
4. An oscilloscope is able to measure to voltages at the same time while a DMM can only show one
5. An oscilloscope costs a lot more than a DMM
Working As A Professional Developer - 10 Ways Developers Make Money Coding Course - E08
Tags: career, programming, leadership, tutorial
Published: 2022-02-14 14:39:42

Many companies hire people remotely to create websites and applications for them. If your skill is good, then you can earn up to $500K/year by working full-time in these companies. Traveling and working remotely part-time is another way of living.

In this video series, I share the best ways and how to increase your money income as a web developer while working from home.

📽️ Video here - https://youtu.be/uJKVk7cv3Dw

👉 Subscribe to Dan Later - https://bit.ly/31SdiZv

💻 Personal website post - https://danfleser.com/posts/20220204025040-working-as-a-professional-developer-10-ways-developers-make-money-coding-course-e08
100 días de código: 69, numero gracioso y san valentín
Tags: spanish, 100daysofcode, webdev
Published: 2022-02-14 23:34:17

¡Hey hey hey!

¡Feliz San Valentin!

Es curioso que San Valentín y el día 69 del reto coincidieran y casi parece que lo haya hecho a propósito como una referencia.   

He vuelto despues de unos cuantos días debido a una fatiga mental que llevaba por culpa de varias razones personales. Se que no soy la mejor persona para decirlo pero no olviden tomarse algo de descanso de vez en cuando para evitar este tipo de situaciones en las que tendrán que descansar si o si.

Hoy he retomado el reto y he comenzado a avanzar con mi proyecto de prueba de typescript y me enfrente a un problema que jamas había contemplado en React.

Tuve un problema donde React no reconocía un cambio en el estado y por lo tanto no re renderizaba este a pesar de que si se realizara el cambio. 

La razón es que cree un estado con el hook useState que tenia demasiada profundidad, es decir, cree un objeto con objetos dentro que al hacer cambio en ellos, react por si solo no reconocía el nuevo estado y por tanto no realizaba el renderizado nuevamente. Para solucionarlo separe este estado en varios para que React no perdiera la capacidad de ver cambios.

### Hoy
- Mejore algunos estilos de los componentes de mi prueba de typescript.
- Comencé un curso de Redux.
- Agregue la opcion de eliminar un elemento de la lista de mi aplicación web de prueba.
- Practique Touch Typing.

Espero que pasen un día agradable con sus seres queridos.

Hasta pronto!

Foto cover de [Kelly Sikkema](https://unsplash.com/@kellysikkema?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) en [Unsplash](https://unsplash.com/s/photos/valentine-day?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
Paracetamol.js💊| #67: Explica este código JavaScript
Tags: javascript, spanish, beginners, webdev
Published: 2022-03-02 02:57:50

## **Explica este código JavaScript**

```js
const persona = {
  id: 1,
  nombre:"Fernando",
};
persona.nombre = "Pedro";
console.log(persona.nombre);
```

- A. `Pedro`
- B. `Fernando`
- C. `null`
- D. `TypeError`

Respuesta en el primer comentario.

---
Azure Functions University - HTTP Lesson (TypeScript)
Tags: azure, serverless, programming
Published: 2022-03-16 20:11:06

---
title: Azure Functions University - HTTP Lesson (TypeScript)
published: true
date: 2021-04-15 00:00:00 UTC
tags: azure, serverless, programming
canonical_url: https://blog.marcduiker.nl/2021/04/15/azfuncuni-http-lesson-typescript.html
series: Azure Functions University
---

![Http Lesson TypeScript](https://blog.marcduiker.nl/assets/2021/04/15/AzureFunctionsUniversity_HTTP_Lesson_typescript.png)

Hi serverless friends, we have a new Azure Functions University lesson for you! In this lesson we will learn how to use the HTTP trigger in Azure Functions written in TypeScript.

<!--more-->
## Lesson

You can find the lesson on GitHub: [HTTP Trigger (TypeScript)](https://github.com/marcduiker/azure-functions-university/blob/main/lessons/typescript/http/README.md).

And you can watch the video on YouTube:
{% youtube zYb5sVQgUN4 %}

The lesson consists of the following exercises:

| Nr | Exercise |
| --- | --- |
| 0 | Prerequisites |
| 1 | Creating a Function App |
| 2 | Changing the template for GET requests |
| 3 | Changing the template for POST requests |
| 4 | Adding a new function for POST requests |
| 5 | Homework |
Email Account Verification In Node JS & React JS | MERN Stack Project
Tags: javascript, node, react, webdev
Published: 2022-03-13 05:46:15

What's up guys!

Today we gonna implement how to verify user email after signup in MERN stack. we gonna use nodemailer package to send email with node.js. we also gonna learn how to implement this on frontend with react framework. 

{% youtube T6rElSLldyc %}