teleren/devto huggingface dataset:
Go: Around The World - London, UK - An Introduction
Tags: go, writing
Published: 2022-11-25 09:09:47

---
title: Go: Around The World - London, UK - An Introduction
published: true
date: 2022-11-25 08:30:33 UTC
tags: go, writing
canonical_url: https://www.jaminologist.com/go-around-the-world-london-uk-an-introduction/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3i477apjg1apf8y2ddc.png
---

Hello! Today I’d like to introduce an idea for a series of articles I’m going to be working on for the next few months. Go: Around The World. Starting in London, because well, I live there.

Last week, I went to [Imperial Lates: Tiny Science](https://www.imperial.ac.uk/events/152709/imperial-lates-tiny-science/). It was a showcase of some of the research the PHD students had been conducting at Imperial College London.

To be honest, I didn’t stay too long, nothing against the event, I just felt quite tired. However, I had time to catch a talk about stick insects.

_“Explore the micro-scale science of how stick insects clamber up walls, and how this could inspire tomorrow’s medical plasters and wall-climbing robots.” - A quote from the website_

A bit of the talk went over my head, but I had a small opportunity to talk to the researcher afterwards, as I wanted to figure out how they gathered their data. Did they use coding, or microscopes or… coding? Were they working with live insects? (Yes, and now I know more about stick insects than I originally would’ve liked).

This is the part where astute readers may guess that this person was using Go to do their research. Alas, no. They were using Python. But it made me wonder, what if they were using Go? Or to put it another way, even though I know researchers use Python for Data Analysis, I never would’ve guessed it was being used for research into how stick-insects selectively ‘stick’ to things.

So, what about Go? What Go projects are people working on that I wouldn’t even think of? And what inspired those projects?

When I pitched the idea to myself it sounded fun to write about. How the idea will take shape is a different ballgame entirely. I haven’t yet decided if interviewing or picking out interesting projects I find around the web is the better approach. Porque no los dos?

According to [The State of Go](https://blog.jetbrains.com/go/2021/02/03/the-state-of-go/) (written in 2021), in terms of Go Developers around the world there are 180k in North America, 63k in South America, 243k in Europe, 38k in Africa, 570k in Asia and 132k in Oceania. Makes you wonder what wonders could be out there.

Well, I’m going to see if I can find out! This series of articles will unfortunately not be a weekly occurrence as life is going to be getting busier and busier, and with Christmas around the corner I’ll probably be ramping down a bit for the holidays.

Anywho, thanks for reading and see you at the next one!

P.S: If there’s anyone who you think I should try to get in touch with, or a project I could take a look into please do let me know!

Also, you can follow me on Mastodon: [@Jaminologist@mstdn.social](https://mstdn.social/@Jaminologist)
Build an API in less than 3 minutes
Tags: node, npm, javascript, programming
Published: 2022-11-25 08:25:10

Hey folks! In this script I'm going to give you simple steps to build your own API. So without further ado, let's get started!

## **Download Node.js**
We need to set up a Node.js for this purpose, download and install it if you haven't already.
You can download it from it's official website: https://nodejs.org/en/download/

## **Setup Project**

- Create a directory.
- Open it in your preferred code editor.
- Run the following command in the project terminal to create a package.json:

    `npm init -y`

##**Adding scripts**
Please update the scripts inside the package.json with the following: 

```
"scripts": {
    "start": "node index.js"
},
```

##**Install Express package**
Run the following command in your project terminal to install Express in the project:

`npm install express`

##**Creating a route**
Create an index.js file. Here we will write an example book route.

```
//importing packages
const express = require('express');
const app = express();

//adding routes
app.get('/book', (req. res) => {
  res.send([
    {name: 'Jane Doe', id: 1},
    {name: 'Smith Rowe', id: 2},
  ]);
});

//port
const port = process.env.PORT || 5588;
app.listen(port, () => console.log('Listening on port: ${port}')): '
```

##**Code explanation**
- First, we have imported Express into our file.
- We create an express app by calling express().
- we created a route /book and attached a function to it. The function will execute when a user makes a GET request to the route.
- Lastly, we run the Express app on a port, in this case, it is port 5500.

##**Run the API**
Run the following command in your project terminal to run the app:

`npm start`

##**Test the API**
We can use RapidAPI Client, a VS Code extension to make a GET request to the API at the endpoint: https://localhost:5500/book


Just like that! #HappyCoding
![Cheers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/up9e3j3pe47n7ld00pnq.jpeg)
Engine 3D visualization written in JavaScript
Tags: webdev, 3d, javascript, webgl
Published: 2022-11-25 08:24:26

![3D engine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s85fakqful7wo1byfphw.gif)

[Watch it on YouTube](https://youtu.be/2Pv_fyRKgBY)

[[Click here to see more demonstrations including Digital Twins, GIS, VR, BIM, etc.]](https://www.hightopo.com/demos/en-index.html)

Most industrial machinery products are bulky and have high transportation costs. When participating in industry exhibitions or selling to overseas customers, if there is no physical display, only static and simple picture manuals cannot be used to give customers a comprehensive understanding of the product, not only the staff making troubles, Customers also look hard. If the 3D device can be displayed on the web, the sales staff can introduce the demo to the customer at any time, regardless of the platform. It can also demonstrate the process of equipment disassembly and assembly without restricting the actual conditions, show the internal structure of the product and the effect of dynamic operation, so that customers can more intuitively understand the components of the product, and more accurately and comprehensively understand the functions and characteristics of the product. Greatly reduced communication costs. In order to solve these industry pain points, this article uses Hightopo’s HT for Web product to implement a 3D visualization case of engine equipment.

For more inspiration and amazing projects we have done, please visit our portfolios: https://www.hightopo.com/demos/en-index.html
Today's Daily Humor For Devs - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes, watercooler
Published: 2022-11-25 08:00:13

---
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, #watercooler
---

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/5e12598c9c711.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 are machine learning models so fit?

___A:___ Because they do weight training.
 -->
Data Streaming in Go Lang
Tags: go, programming, productivity, tutorial
Published: 2022-11-25 07:50:35

we may need to do streaming for  few things while working with large scale systems like calling multiple API's whenever required and store it in cache if it is frequently used data etc... for these kind of things we may not need to create functions and call them  whenever it is needed.Especially when you want to deal data asynchronously.In this case we can simply create a stream and read data from stream whenever it is required.
For readers code will be simple & clean 👍.

updated basic stream... please go thru the code below with explanation and let me know if any doubts / suggestions / mistakes in my code .

```
package main

import (
	"fmt"
	"math/rand"
)

func main() {
	streamingDataUsingChannelAndGoRoutines()
}
func streamingDataUsingChannelAndGoRoutines() {
	// send signal to stop channel once you are done with streaming the data (optional)(have to handled by stream owner)
	stop := make(chan bool)

	// it will return read only channel for readers
	publisher := stream(stop)

	read(publisher)

}


// it will return read only channel so it will not block the execution / it will not wait to write something into channel/avoids dead lock
func stream(stop <-chan bool) <-chan int {

	// unbuffered channel to stream data
	// this will useful when you want stream live data when ever required
	//ch := make(chan int)


	// buffered channel to stream data
	// this will be useful when you want to store some data in advance  in buffer or cache
	// ans use whenever it is required directly from buffer
	ch := make(chan int,2)

	// this go func will run in background and push data consistently to the channel
	go func() {

		// closing the channel once streaming  gets stop request
		defer close(ch)

		for {
			select {
			case <-stop:
				return
			case ch <- rand.Int(): // eg use case:- we do an api call and store the data here
			}
		}

	}()

	return ch
}
// reader
func read(value <-chan int) {
    // iterating/reading the data for 5 times
	for i := 1; i <= 5; i++ {

		// we can read from channel stream any number of times
		fmt.Println(<-value, <-value, i)

	}

}

```

please follow medium for interesting things {% embed https://medium.com/@tejasai651 %}
Merge a branch and create a merge commit
Tags: javascript, git, webdev, beginners
Published: 2022-11-25 07:26:34

Merges a branch into the current branch, creating a merge commit.

* Use `git checkout <target-branch>` to switch to the branch into which you want to merge.

* Use `git merge --no-ff -m <message> <source-branch>` to merge a branch into the current branch, creating a merge commit with the specified `<message>`.

```git
git checkout <target-branch>
git merge --no-ff -m <message> <source-branch>

git checkout master
git merge --no-ff -m "Merge patch-1" patch-1
# Merges the `patch-1` branch into `master` and creates a commit
# with the message "Merge patch-1"

```
should we scan yarn.lock files inside node_modules for CVEs?
Tags: yarnlock, nodemodules, javascript, webdev
Published: 2022-11-25 07:06:25

[](https://stackoverflow.com/q/74569134/20596655)

**AIM:** we are trying to fix CVEs reported in an angular project (scanned using trivy scanner).

**Problem:** None of the packages mentioned as vulnerable(as per trivy report) are direct dependent packages (not present in package.json) and is already used as their latest version not able to fix these issues.

so, should we really scan yarn.lock files for CVEs (all the issues reported are from yarn.lock file).

PS: if there are any alternatives to fix CVEs (for 2nd-degree dependent packages), suggestions would be helpful

. tried updating the package mentioned, but most of them are already in their latest versions

Any suggestions for fix would be helpful
VMware Backup Guide for Hyper-V Administrators
Published: 2022-11-25 06:40:18

Creating a [VMware backup](https://devops.com/vmware-backup-guide-for-hyper-v-admins/) plan is essential for any Hyper-V administrator. VMware provides excellent tools to protect virtual machines and their data, ensuring continuity in the event of an unexpected disaster or outage. 

The VMware Backup Guide helps Hyper-V administrators set up VMware backups with ease. This guide includes detailed steps for configuring VMware backups, as well as best practices for scheduling and running successful backups. It also covers topics such as choosing a data protection plan, understanding VMware licensing models, using scripting to automate VMware backup tasks, and more. 

In addition to providing an overview of how to configure VMware backups, the VMware Backup Guide also offers practical tips on how Hyper-V administrators can ensure the success of their VMware backup plans. For example, it discusses the benefits of using VMware-specific backup products, such as VMware vSphere Data Protection, VMware vCloud Backup, and VMware Site Recovery Manager. It also provides advice on how to optimize VMware backups for performance and reliability. 

Furthermore, the VMware Backup Guide walks Hyper-V administrators through setting up VMware replication and disaster recovery plans. This includes creating automated failover strategies that can rapidly recover from disasters or outages with minimal disruption. Additionally, the guide covers advanced topics such as hybrid cloud backups, cloud bursting for rapid scaling during peak usage periods, and integrating VMware backups with other enterprise data protection solutions. 

By leveraging the VMware Backup Guide, Hyper-V administrators can quickly set up secure and reliable VMware backups, ensuring their organization’s data is well protected. With the VMware Backup Guide, VMware users can confidently take advantage of the many benefits VMware tools have to offer. 

Ultimately, the VMware Backup Guide helps Hyper-V administrators set up foolproof VMware backup plans and optimize their VMware environment for success. With this guide in hand, Hyper-V administrators can make sure their VMware backups are reliable and secure so they can focus on other important tasks. As a result, organizations will benefit from increased uptime, improved efficiency, and higher levels of data protection.
Когда нужен React.memo?
Tags: react, reactmemo, optimization
Published: 2022-11-25 06:33:14

_Когда нужен React.memo?_

Компонент обновляется (перерисовывается), когда меняется его состояние. Когда обновляется компонент, обновляются все его дочерние компоненты и рекурсивно дочерние компоненты дочерних компонентов.

Компонент может иметь глубокую вложенность дочерних компонентов:

```jsx
const C = () => <div />;
const B = () => <C />
const A = () => <B />;

const App = () => {
	return <A />;
}
```

В примере выше, при обновлении компонента `App` произойдет обновление всех вложенных компонентов: `A`, `B` и `C`. 

Обновление всех дочерних компонентов может быть нежелательно - если у компонента не меняется состояние и пропсы, то и обновлять его не надо. Обновление компонента можно остановить с помощью `React.memo` (мемо). Мемо создает элемент, который ссылается на мемоизируемый компонент и содержит функцию сравнения пропсов для этого компонента:

```jsx
export function memo(type, compare) {
  const elementType = {
    $$typeof: REACT_MEMO_TYPE,
    type,
    compare: compare === undefined ? null : compare,
  };

  return elementType;
}
```

При обновлении компонентов, React распознает мемо и вызывает функцию `compare` чтобы определить изменились ли пропсы, если нет &mdash; можно [пропустить обновление](https://github.com/facebook/react/blob/f284d9fafac3af79c6901b6b63305cbd161304cd/packages/react-reconciler/src/ReactFiberBeginWork.new.js#L561):

```jsx
const prevProps = currentChild.memoizedProps;
// Default to shallow comparison
let compare = Component.compare;
compare = compare !== null ? compare : shallowEqual;
if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
  return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
```

Возвращаясь к первому примеру, обернем компонент `A` в мемо:

```jsx
const C = () => <div />;
const B = () => <C />
const A = React.memo(() => <B />);

const App = () => {
	return <A />;
}
```

Теперь, при обновлении `App`, компонент `A` и его вложенные компоненты обновляться не будут, так как их пропсы не изменяются.

Использование мемо даст результат, если:

- компонент перерисовывается (обновляется) часто с одними и теми же пропсами.
- обновление компонента дорогое, например, когда у компонента большая вложенность дочерних компонентов.

----

_Credits: foto by Oskar Yildiz https://unsplash.com/photos/gy08FXeM2L4_
Ecommerce Website Development
Tags: webdev, javascript, beginners
Published: 2022-11-25 06:28:19

An e-commerce site is not just a website that sells goods and services, it is a complicated system that handles orders, payments, shipping, resources, inventory, taxes, offers, reports, coupons and much more.

 We use industry best open source solutions and web-based platforms to build sites that look great and convert well. If you need a tool to take your business into this market, then you will need someone with the experience and professionalism to make it possible.

Read more:- [Ecommerce Website Development](https://www.accoretechnologies.com/ecommerce-website-development/)
Memory Cache in .NET
Tags: redis, cache, distributed, uzbek
Published: 2022-11-25 05:55:55


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


### Cache nima?

Dastur ma'lumotni bir necha usulda saqlaydi. Hajmi katta va kamdan-kam chaqiriladigan ma'lumotlar fizik diskda fayl sifatida saqlanadi. 

Tez o'zgaruvchan, uzoq vaqt saqlanadigan va ko'p murojat qilinadigan ma'lumotlar databazalarda saqlanadi. Ma'lumotni turi va chaqirilish shakliga qarab turli databaza dizaynlari mavjud. Bir-biriga chuqur bog'liqligi ko'p bo'lgan ma'lumotlar SQL databazalarda, dokument ko'rinishida bo'lgan va boshqa ma'lumotlarga ko'p bog'lanmaganlari esa dokument databazalar (Mongo, Cosmos)larda saqlanadi.

Bundan tashqari 3-xil ma'lumotni saqlash usuli ham bor. Ma'lumot hajmi juda kichik, saqlash muddati o'zgaruvchan (odatda juda qisqa) va ma'lumotga murojat juda ko'p bo'lsa, dastur tezligini oshirish maqsadida bunday ma'lumotlar vaqtinchalik "omborlar"da ya'ni cache'larda saqlanadi. 

.NET dasturchilar uchun ma'lumotni cache'da saqlash uchun juda qulay API `IMemoryCache` interfeysi mavjud. 

`MemoryCache` ma'lumotni vaqtincha `key/value` juftlik sifatida **RAM**da (tezkor xotirada) saqlaydi. Bu xotiraga `expiration time` ya'ni o'chib ketish vaqtini belgilasa bo'ladi. Masalan, 10 sekundda o'chib ketishini yoki aniq bir vaqtda o'chib ketishini yoki 10 sekund ishlatilmasa o'chib ketishini belgilab qo'ysa bo'ladi.


**MemoryCache** juda ham qulay va **easy-to-use** yechim. Lekin u **RAM**da saqlangani bois, dastur o'chib yonsa vaqtincha saqlanga ma'lumotlar ham o'chib ketadi. Masalan, siz foydalanuvchilarni **session**larini **MemoryCache**da saqlayotgan bo'lsangiz dastur nimadir sababga ko'ra o'chib yonsa, foydalanuvchilar **session**larini yo'qotishadi.

{% youtube fjPbZh2UbSY %}

**MemoryCache** bilan yana bir muammo bor. Agar dastur **microservice** arxitektura bilan qurilgan bo'lsa va bir vaqtda dasturni bir necha nusxasi ishlab tursa bitta nusxaning RAM xotirasida saqlanayotga **Cache** boshqa bir nusxada mavjud bo'lmaydi.

Ya'ni MemoryCache **Distributed** sistemalarda ishlamaydi.

Bunga yechim `Distributed Caching` sistema ya'ni Redis. Redisning ishlash prinsipi MemoryCache bilan deyarli bir xil. Lekin uning afzalligi Redisda saqlangan Cache ishlab turgan dasturning holatiga (o'chib/yonishiga) bog'liq emas. Bundan tashqari dasturning bir nechta nusxasi bir vaqtda bitta Redis markaziy Cache'ga ulanadi va hammasi bir xil ma'lumot saqlaydi va o'qiydi. 


_Keyingi postda video darslik sifatida MemoryCache va Redisdan qanday foydalanish haqida gaplashamiz._
SAFe 5 Agilist Exam Study Guide (5.1) | PDF
Tags: javascript, beginners
Published: 2022-11-25 05:54:41

<b>Safe Agilist-5.1 Dumps</b> All the very superb together collectively together along with your examination instruction. Scrum SAFe-Agilist Exam Dumps PDF – Best Preparation Source When it consists of the instruction of the Scrum SAFe-Agilist certification examination questions one must be ready with the entire package deal deal for the instruction. Because the Leading SAFe five.1 Agilist examination questions <b>Safe 5.1 Exam Questions And Answers PDF</b>aren't everyday certification examination inquiries to have up to your resume. To maintain near the Scrum SAFe-Agilist new questions we at New Exam Dumps make certain which you get all of the required Scrum SAFe-Agilist instruction cloth a terrific manner to ease your instruction for the Leading SAFe five.1 Agilist test questions. <b>Safe-agilest 5.1 Certification Exam Questions And Answers PDF Free</b>Our enterprise of agency-certified professionals works hard day and night time time time a terrific manner to compose the legitimate SAFe-Agilist examination dumps. 

Click Here More Info >>>>> https://braindumps4certification.com/safe-agilist-5-1-dumps/
How to use Vuelidate forEach helper to validate collections in Vue Js
Published: 2022-11-25 05:43:11

Using the forEach helper from **@vuelidate/validators** , you can easily validate all properties inside a collection, without any extra components.

```
<template>
  <div
    v-for="(input, index) in state.collection"
    :key="index"
    :class="{
        error: v$.collection.$each.$response.$errors[index].name.length,
      }"
  >
    <input v-model="input.name" type="text" />
    <div
      v-for="error in v$.collection.$each.$response.$errors[index].name"
      :key="error"
    >
      {{ error.$message }}
    </div>
  </div>
</template>

<script>
// setup in a component
import { helpers, required } from '@vuelidate/validators'
import { useVuelidate } from '@vuelidate/core'
import { reactive } from 'vue'

export default {
  setup () {
    const rules = {
      collection: {
        $each: helpers.forEach({
          name: {
            required
          }
        })
      }
    }
    const state = reactive({
      collection: [
        { name: '' }, { name: 'bar' }
      ]
    })
    const v = useVuelidate(rules, state)
    return { v, state }
  }
}

</script>
```
The $response for the validator follows the schema below, so you can use it as you wish:

```
const result = {
  $data: [
    {
      propertyToValidate: {
        validator: boolean,
      }
    },
  ],
  $errors: [
    {
      propertyToValidate: [
        {
          $message: string, // the validator error
          $model: '', // the model that was validated
          $params: {}, // params, if validator has any
          $pending: false, // always false, no async support.
          $property: string, // the property to validate
          $response: boolean, // response
          $validator: string // validator name
        },
      ]
    },
    {
      name: []
    }
  ],
  $valid: boolean
}
```