teleren/devto huggingface dataset:
This week’s newsletter is out! (02-07-2022) - Bad help
Tags: javascript, tech, webdev, discuss
Published: 2022-07-02 06:40:39

---
title: This week’s newsletter is out! (02-07-2022) - Bad help
published: true
description: Another week of great javascript, tech and web development links.
tags: javascript, tech, webdev, discuss
---

Bad help

https://markjgsmith.substack.com/p/mark-smiths-newsletter-02-07-2022

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)
a classic watch , width HTML CSS JS
Tags: codepen, html, css, javascript
Published: 2022-07-02 06:32:03

<p>This is a simple project with HTML, CSS and Js
GitHub repository: <a href="https://github.com/kiumad/clock_m" target="_blank">https://github.com/kiumad/clock_m</a></p>

{% codepen https://codepen.io/kiumad/pen/YzaXpQr %}
1465 leetcode solution in JavaScript
Tags: javascript
Published: 2022-07-02 06:18:32

```
var maxArea = function(h, w, hc, vc) {
    hc.sort((a,b) => a - b)
    vc.sort((a,b) => a - b)
    let maxh = Math.max(hc[0], h - hc[hc.length-1]),
        maxv = Math.max(vc[0], w - vc[vc.length-1])
    for (let i = 1; i < hc.length; i++)
        maxh = Math.max(maxh, hc[i] - hc[i-1])
    for (let i = 1; i < vc.length; i++)
        maxv = Math.max(maxv, vc[i] - vc[i-1])
    return BigInt(maxh) * BigInt(maxv) % 1000000007n
};
```
Web3 terms you should know
Tags: programming, blockchain, productivity, web3
Published: 2022-07-02 05:55:35




CEX: Centralized Exchange
DEX: Decentralized Exchange
DEFI: Decentralized finance
CEFI: Centralized finance
DAOS: Decentralized Autonomous Organization
DApps: Decentralized Applications
TVL: Total Value Locked
PoW: Proof of Work
PoS: Proof of Stake
APY: Annual percentage yield
IR: Interest Rate

NFT: Non Fungible Token
DYOR: Do your own research
NFA: Not Financial Advice
BTFD: Buy the fucking dip
Wagmi: We are gonna make it
KYC: Know Your Customer
P2P: Peer To Peer
FUD: fear, uncertainly, doubt
FOMO: fear of missing out

ATH: all time High
ATL: all time Low
TF: Time Frame
HTF: higher time Frame
LTF: lower time Frame
ST: short term
LT: long term
IT: Intermediate Term
SL: Stop Loss
TL: Trend Line
WR: Win Rate

R/R: Risk/Reward
BE: Break Even
TP: Take Profit
TA: Technical Analysis (or AT)

FA: Fundamental Analysis (or AF)
EW: Elliott Waves 
SMC: Smart money concept
PA: Price Action

VSA: Volume Spread Analysis
PDH: Previous Day High 
PDL: Previous Day Low
PWH: Previous Week High 
PWL: Previous Week Low 
PMH: Previous Month High
PML: Previous Month Low 
EQH: Equal Highs 
EQL: Equal Lows 
HH: Higher High 
HL: Higher Low 
LH: Lower High
LL: Lower Low

HTF: Higher Time Frame
RN: Round Numbers 
OSOK: One Shot One Kill
BMS: Break in Market
OB: Order Block
BR: Breaker 
MB: Mitigation Block 
RB: Reclaimed Block-Rejection Block
PB: Propulsion Block
VB: Vacuum Block 
FVG: Fair Value Gap 
LV: Liquidity Void 
LP:Liquidity Pool 

CL: Candy Land 
CPR: Central Pivot Range
BISI: Buy Side Imbalance Sell Side Inefficiency 
SIBI: Sell Side Imbalance Buy Side Inefficiency 
OF: Order Flow
AD: Accumulation y/o Distribution
AMD: Accumulation, Manipulation and Distribution
OHLC: Open, High, Low and Close

IRL: Internal Range Liquidity 
ERL: External Range Liquidity 
Fib: Fibonacci
OTE: Optimal Trade Entry 
FV: Fair Value
SMT: Smart Money Tool / Technique
IOF: Institutional Order Flow 
TS: Trailing Stop
KZ: Kill Zone
AR: Automatic Rally
ST: Secondary Test
SC: Selling Climax

BC: Buying Climax
BUEC: Backup to the edge of the creek
LPS: Last Point of Support
TR: Trading Range
JAC: Cross or Jump the creek
SOS: Sign of Strength
E/R: Effort versus Result
PS: Preliminary Supply
SOW: Sign of Weakness
LPSY: Last Point Of Supply

C/E: Law of Cause and Effect
S/E: Law of Supply & Demand
UTAD: Upthrust After Distribution
UT: Upthrust



✨ Let's learn the terms mostly mentioned on the web3!


tw: [_luisald](https://twitter.com/_luisald)
website: [Luis Lucena](https://bio.link/luislucena)
contribution:
ETH address: luislucena.eth
100-95 ways to improve logical thinking🤐🔣
Tags: programming, productivity, webdev, devops
Published: 2022-07-02 05:34:44

1.	**🤔DIVIDE ➗ YOUR PROBLEM🤔**:  One of the proven 🧾 way to solve a problem ❓ is to divide ➗ the problem ❓  into several small 👶 tasks or problem and solve 1 by 1.

                                                                                                                                                                                    
2.	**🧮 DSA 🧮** : Data Structure Algorithm DSA is the key 🗝️ to improve 📈 your logical thinking 🤔 as a programmer. Programming is all 🌌 about Data Structure and algorithm.


3.	**🪨CONSISTENCY 🪨** : The most important ⚠️ point is consistency 🪨. You need to code in a consistency manner on a daily 🗓️ basis to make a habit out of it. There are no need to code an hour ⏳ and increase 🚀 your time as you feel comfortable 😃.


4.	**🙋 OTHER CODES 🙋** : In programming a problem ❓ can have different solutions, which means there are multiple 🔢 ways to solve any problem or to do a task 📝. When you read 📖 others code you get closure 📕 of other perspective problem.


5.	**🏗️ BUILD PROJECTS 🏗️**: One of the best 🔥 ways to learn programming is by doing by practically 🤹🏼‍♀️  applying your knowledge by building projects 🔨, as you build different projects you will face 🔨  different problems and solving those problem will eventually improve 📈 your logical thinking 💡.


**WtF = wow that fantastic 😁**
gRPC Client Toolkit with interceptors and React Hooks
Tags: grpc, grpcweb, react, protobuf
Published: 2022-07-02 05:00:17

# 🚀 gRPC Client Toolkit

gRPC Client Toolkit is the port of [gRPC-Web](#grpc-web) library.

## Features

- Typescript first-class support.
- Set default gRPC configs.
- Supports connect the gRPC Service Promise and Callbacks.
- Get all the methods in gRPC Service.
- Interceptors.
- Easy to install, update and support thanks to npm packages.

## Packages

This library is organized into small packages with few dependencies.

| Package                                          | Description                                                                           | npm                                                                                           |
| ------------------------------------------------ | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [GRPC Client Toolkit](./grpc-core/installing.md) | This library is intended for both JavaScript and TypeScript usage from a web browser. | [`@nixjs23n6/core`](https://github.com/nixjs/grpc-client-toolkit/tree/master/packages/core)   |
| [GRPC Client React](./grpc-react/installing.md)  | A react context which helps you to deal with gRPC web.                                | [`@nixjs23n6/react`](https://github.com/nixjs/grpc-client-toolkit/tree/master/packages/react) |

## Reference

1. Repository: <https://github.com/nixjs/grpc-client-toolkit>
2. gRPC: <https://grpc.io/>
3. gRPC-Web: <https://github.com/grpc/grpc-web>
Kroki - Diagrams from textual descriptions!
Tags: tools, kroki, diagram, productivity
Published: 2022-07-02 04:48:32

There are a lot of tools that enable rendering of diagrams using text descriptions. The popular ones include

- [Mermaid][1] - A diagramming and charting tool that uses Markdown-inspired text definitions. Supports drawing of Flowchart, Sequence Diagram, Graphs, Class Diagrams, ER Diagrams and much more
- [Graphviz][2] - A graph visualisation software to represent structural information as a diagram of abstract graphs and networks
- [Ditaa][3] - a small command-line utility written in Java, that can convert diagrams drawn using ascii art 
- [PlantUML][4] - A component that allows to write Sequence diagram, Usecase diagram, Class diagram, Object diagram, Activity diagram, Component diagram, Deployment diagram, State diagram, Timing diagram and more
- [BlockDiag][5] - A Group of projects that has other diagramming tools - BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag

The list goes on. Almost all of them are open source and free. Each of these tools are written in different programming languages like Mermaid is written in JavaScript, BlockDiag in Python, PlantUML in Java and so on.

Having all of them under a single roof does have its advantages, but setting them up and having the prerequisites can be a considerable task. That's where [Kroki][6] comes to the rescue. It is both an open source software that can be installed locally and a service that is free as well.

It is astonishing to see the support for various diagramming tools all at one place. Kroki provides support for BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag), BPMN, Bytefield, C4 (with PlantUML), Ditaa, Erd, Excalidraw, GraphViz, Mermaid, Nomnoml, Pikchr, PlantUML, Structurizr, SvgBob, UMLet, Vega, Vega-Lite, WaveDrom. It is constantly updated to add more tools as well.

The beauty of Kroki is that it also provides HTTP APIs to create diagrams that can be accessed using tools like cURL. In addition to the services, it also has a [CLI][7] - Command Line Interface - that uses [kroki.io][6] as the backend.

Try Kroki for a happy diagramming!

[1]: http://mermaid-js.github.io/mermaid/#/ "Mermaid"
[2]: https://graphviz.org/ "Graphviz"
[3]: http://ditaa.sourceforge.net/ "Ditaa"
[4]: https://plantuml.com "PlantUML"
[5]: http://blockdiag.com/ "BlockDiag"
[6]: https://kroki.io "Kroki"
[7]: https://docs.kroki.io/kroki/setup/kroki-cli/ "Kroki CLI"
Get MongoDB data 10x smaller & faster using lean function in NodeJs
Tags: node, angular, react, webdev
Published: 2022-07-02 04:36:21

sometimes, i am finding data in mongoose collection it give mongoose document but when we use lean function in find collection it gives response 10x smaller and faster as compare to simple finding collection. mongoose also say this its gives 10x smaller response.

## product.model.js

```
const mongoose = require("mongoose")

const ProductSchema = new mongoose.Schema({
	name:{
		type:String,
		required:true,
                index:true,
		trim:true
	},
        createdBy:{
                type:mongoose.Types.Schema.ObjectId,
                ref:'user',
                required:true
        },
	color:{
		type:String,
		required:true,
		trim:true
	},
	ram:{
		type:String,
		required:true
	},
	rom:{
		type:String,
		required:true
	},
	price:{
		type:String,
		required:true
	},
	qty:{
		type:String,
		required:true,
		default:1
	},
	displaySize:{
		type:String,
		required:true
	},
	frontCamera:{
		type:String,
		required:true
	},
	rearCamera:{
		type:String,
		required:true
	},
	battery:{
		type:String,
		required:true
	},
	processor:{
		type:String,
		required:true
	},
	imageUrl:{
		type:String,
		required:true
	},
	modelNumber:{
		type:String,
		required:true
	},
	modelName:{
		type:String,
		required:true
	},
	operatingSystem:{
		type:String,
		required:true
	},
	warrenty:{
		type:String,
                default:"6 months"
	},
	addDate:{
		type:Date,
                default:Date.now
	}
})

module.exports = mongoose.model('Product',ProductSchema)
```

## product.controller.js

without lean function
```
module.exports.listAllProducts =async (req,res,next)=>{
  try{
	let products=await Product.find()
                .populate("createdBy").sort({addDate:-1})
        res.send(products);
  }catch(err){
    next(err)
  }
}
```

with lean function

```
module.exports.listAllProducts =async (req,res,next)=>{
  try{
	let products=await Product.find().populate("createdBy")
               .lean().sort({addDate:-1})
        res.send(products);
  }catch(err){
    next(err)
  }
}
```

when we use lean function we cannot modify document value and save it.
Day 1 A gap between my goal and my skills
Tags: beginners
Published: 2022-07-02 04:13:16

Goal:
- To pull out a monthly operation review for our clients in a efficient way without having to do daunting job that could be left to machines. 

Gap:
- Pivot table is the most advanced skill I have right now in terms of data analysis. I envy data geeks who are able to switch between sql, python, BI tools fluently. 

Next step:
- figure out the skills / tools I need to learn first
- find a right mentor
Making a Basic C Calculator
Tags: c, beginners, programming, tutorial
Published: 2022-07-02 03:53:56

Here's how you can make a Basic C Calculator. 

Get more C Calculator Examples [here](https://xcattx.com/c-calculators/).

Ill first give you the code then ill explain how it works.

```
#include <stdio.h>
#include <stdlib.h>

int main()

{
  double number1, number2; // Creates two variables

  printf("Enter First Number: "); // Takes First Number
  scanf("%lf", &number1); // Stores first number in number1

  printf("Enter Second Number: "); // Takes Second Number
  scanf("%lf", &number2); // Stores second number in number2

  printf("The Addition of the two is: %f", number1 + number2); // Prints out the addition of the two numbers
  return 0;

}
```

Okay so here's how the program works. 

The program first makes two variables number1 and number2. Where we will be able to store our first and second number.

The program then asks the user for an input of the first number and second second number which are then stored in variable number1 and number2.

After the program got both the first number and second number it will add them together using operator '+' and print out the answer.

The program is using double instead of int so that it can calculate decimal numbers also.

You can change the '+' operator to anything else also like -, x etc.
Improving LCP in webpage with this extension
Tags: lcp, webdev, javascript, todayilearned
Published: 2022-07-02 02:36:23

Debugging LCP in webpage is very difficult especially when you don't know what to optimise next. Total LCP time can be broken down into 4 different slots and measuring that will help to find the bottleneck. 

I have recorded a video which will help to debug the LCP in your webpage with the chrome extension.

{% embed https://youtu.be/8fpnxv01MS8 %}
How to add opt-in compiler argument in build.gradle?
Tags: android, beginners, kotlin
Published: 2022-07-02 00:41:03

**Some APIs want you to specify @OptIn() annotation in order to use them, and you also need to add opt-in compiler argument in your build.gradle file.**

When I tried to use `androidx.compose.ui.platform.LocalSoftwareKeyboardController` in my [RSS Feed Reader](https://vtsen.hashnode.dev/simple-rss-feed-reader-jetpack-compose) app, it turned out it is an `@ExperimentalComposeUiApi` which has this `@RequiresOptIn()` annotation. 

```
@RequiresOptIn("This API is experimental and is likely to change in the future.")
annotation class ExperimentalComposeUiApi
```

That means, in order to use this `LocalSoftwareKeyboardController`, I need to add `@OptIn()` annotation in the class or else you will see a warning/error like below which is defined by the `RequiresOptIn()` annotation above.

> This API is experimental and is likely to change in the future.


So, I added this `@OptIn(ExperimentalComposeUiApi::class)`.

```kotlin
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun ArticlesTopBar(
    navHostController: NavHostController,
    viewModel: MainViewModel,
    onArticlesSearch: () -> Unit,
) {
    val keyboardController = 
    val keyboardController = LocalSoftwareKeyboardController.current
    /*...*/
}

```

After that, I got this warning. 

> Warning:(21, 6) This class can only be used with the compiler argument '-opt-in=kotlin.RequiresOptIn'


To fix this warning, I added this compiler argument in the `build.gradle` (module level) based on the official documentation [here](https://kotlinlang.org/docs/opt-in-requirements.html#module-wide-opt-in).

```
android {

    /*...*/

    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
        kotlinOptions {
            freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
        }
    }
}
```

> **[Updated: July 01, 2022]** - It looks like this `-Xopt-in=kotlin.RequiresOptIn` compiler argument is not needed anymore in Kotlin 1.7.0. See [here](https://kotlinlang.org/docs/whatsnew17.html#stable-opt-in-requirements).

While developing this [Simple REST API app](https://vtsen.hashnode.dev/simple-rest-api-android-app-in-kotlin-various-http-client-library-implementations), I also encountered the same issue because the APIs from `com.jakewharton.retrofit2.converter.kotlinx.serialization` packages are marked with `@ExperimentalSerializationApi` annotation, which requires me to specify the`@OptIn()` annotation.

```kotlin
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
public annotation class ExperimentalSerializationApi
```

So I did the same as above to get rid of the warnings.

---

*Originally published at [https://vtsen.hashnode.dev](https://vtsen.hashnode.dev/how-to-add-opt-in-compiler-argument-in-buildgradle)*.
Meet Software Developers
Tags: javascript, react, d3js, graphql
Published: 2022-07-02 00:23:44


Hi all, 

I've been searching for a place to meet like minded Software Engineers. But, what I want is a place to interact with someone that have similar projects or frameworks. To dive into a project not about asking questions or teaching. That's why I want to create this project and would like to find programmers who want to collaborate. I have zero intentions on selling this or making a profit. It's only about a place where Software Engineers like me can find similar people to collaborate with and even local people, no need to go to meet ups or discords. Let me walk you through the Idea.

Landing Page/explorer will have different programming languages 

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

Lets say you clicked on JavaScript. It will send you to the JavaScript Page, Where Users from the app will share their repo from Github and display the tech stack used. The size of the circles will be by how many stars they have or something. 

This is the coolest part of the App. It will be created with D3js (may be in 3D in the future) so while using the mouse the user can zoom out/in and move around the page regardless of how big it gets. 

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

So, Lets say you filter for repos that have "stock market" in the description and you are curious about Nichols Github and want to check it out so, you click on the circle that says Nichole.


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

It will take you to Nichol's profile where she describes more about her repo and what it does.

After looking at the description you want to collaborate with her. So the user sends her a message to link up with her, and how he/she can help.


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

Here is where it gets tricky. She has the option to send the user some sort of challenge. Why? you may ask. Well, one thing I want to avoid is to have people that are not serious about coding or not serious in general. One way to fix that is to give them a challenge. This will let the owner see how he/she codes and if the owner of the repo would want to collaborate with him/her. (I still don't have 100% clear how to make this feature, I think is something to discus) the point of the feature is to filter people that are not serious or lack the technical skills you are looking for. 

Let me know if anyone wants to collaborate in this project. I'm comfortable in the Frontend but, lack some skills in the backend. I would love to build this app using TypeScript, React, Redux, GraphQl, Apollo, MongoDb. 

I have some spaghetti code in my Github, where I'm trying to get the skeleton of the app up and running. I'll probably change the repo once the basics are done. 

https://github.com/kukovisuals/dashboard-tables
#JulyOT 02: IoT for beginners
Tags: julyot, iot, ai, beginners
Published: 2022-07-02 17:50:55

---
title: #JulyOT 02: IoT for beginners
published: true
date: 2022-07-02 00:00:00 UTC
tags: julyot,iot,ai,beginners
canonical_url: https://JulyOT.dev/blog/julyot-day2
cover_image: https://JulyOT.dev/assets/images/JulyOT-banner-2-iot-for-beginners-2dd6aaf37ee5f0846f4279f1e8c5ba55.png
series: JulyOT 2022
---

As we go into the first weekend of July, and a long weekend for some, there's no better time to brush up on your basics.

For day 2 of #JulyOT we are dipping into the archives to bring you [IoT for Beginners](https://aka.ms/iot-beginners), a 12-week, 24-lesson free and open source IoT curriculum to teach you IoT from the ground up.

## Course outline[​](#course-outline "Direct link to heading")

![A rodmap for IoT for beginners](https://github.com/microsoft/IoT-For-Beginners/raw/main/sketchnotes/Roadmap.jpg)

IoT for Beginners is split into 6 projects, each one teaching important IoT concepts and coupled with you actually building something. The projects follow the path from farm to table, showing how IoT can improve the journey food makes, and covering industrial IoT, digital agriculture, AI on the edge, retail IoT, and consumer IoT.

- Introduction - build an IoT nightlight
- Digital agriculture - build an automated watering system
- Logistics - build a vehicle tracker with a dashboard and location alerts
- Manufacturing - use AI on the edge to build a fruit monitor
- Retail - use AI on the edge to do stock monitoring
- Consumer - build a voice controlled smart timer

## Meet the team[​](#meet-the-team "Direct link to heading")

This course was put together as a collaboration between IoT experts at Microsoft, and students from all around the world. You can learn more from the following video:

[![Promo video](https://github.com/microsoft/IoT-For-Beginners/raw/main/images/IOT.gif)](https://youtu.be/-wippUJRi5k)

**Gif by** [Mohit Jaisal](https://linkedin.com/in/mohitjaisal)

## Get started[​](#get-started "Direct link to heading")

What are you waiting for? Head to the [IoT for Beginners repo on GitHub](https://aka.ms/iot-beginners) and get started!
Day 585 : You Don't Know
Tags: hiphop, code, coding, lifelongdev
Published: 2022-07-01 23:53:09

_liner notes_:
- Professional : Pretty chill day of no meetings. Got a lot done. Just a couple of more things.

- Personal : Went through Bandcamp and checked out some projects for the radio show. Worked some more on the videos for work. Did some research into buying land in different states. That's pretty much all that I remember.

![Looking into a valley surrounded by green mountains in The Coromandel, New Zealand at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8d0tk7vajwyi2luz64is.jpg)

Going to finish putting together the radio show and then continue on the videos for work. You don't know how much I want to get these videos done. haha It's a long weekend so no update on Monday.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube KS3OqvkKnTg %}