teleren/devto huggingface dataset:
Strange behaviour of Sheet
Published: 2022-06-21 07:54:23

Hi
I have created in the past a spreadsheet that go and fetch data from another website
This is a financial table where I get the current market price (in the exemple below it is about cryptocurrencies)

value(index(importhtml(concat("https://coinmarketcap.com/currencies/",B7),"table",1),1,2)))

The formula works very well.
My table list the different purchases or sales, calculate the average cost and calculate the profit and loss based on real time value with the formula above.

Until recently everything worked fine.

I am now adding new calculations which have nothing to do with the above formula nor do I refer to the cells used by the above formula or call for the results of the above formula.

The new calculations works fine. However, at random, the above formula shows #N/A instead.  Once it shows #N/A it never goes back to display the current price.
I first thought there was some problem with coinmarketcap. In that case once coinmarketcap is working again, the #N/A should be automatically replaced by the value of the coin. No once the cells display #N/A and stay at #N/A.

I thought I messed with the spreadsheet somehow. I restored a previous version (the last one before I started to add the new calculations) and the price of the coins are displayed again.
I started again with the new calculation (for info the new calculation are in a separate worksheet and as mentioned it does not refer to above formula).  It works fine for a little while and suddenly, some of the cells having the above formula start showing #N/A

This makes me crazy. No matter what I do, those cells somehow ends up (but not all) with #N/A. What I mean is that I have about 20 cells using the above formula and when the problem occurs, sometimes it occurs for all the cells using the above formula, sometimes not.
I seems random.
I am starting to wonder if there isn't a bug in Sheet (after all Excel is full of bugs, so why not Sheet :) )

Has anyone encountered such behaviour?
Thanks
kotlin data class 看下反编译的代码
Tags: kotlin
Published: 2022-06-21 07:36:01


kotlin


```kotlin
data class IdModel(val id: String)
```

对应的class文件反编译查看为



```java
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(mv = {1, 7, 1}, k = 1, xi = 48, d1 = {"\000\"\n\002\030\002\n\002\020\000\n\000\n\002\020\016\n\002\b\006\n\002\020\013\n\002\b\002\n\002\020\b\n\002\b\002\b\b\030\0002\0020\001B\r\022\006\020\002\032\0020\003\006\002\020\004J\t\020\007\032\0020\003H\003J\023\020\b\032\0020\0002\b\b\002\020\002\032\0020\003H\001J\023\020\t\032\0020\n2\b\020\013\032\004\030\0010\001H\003J\t\020\f\032\0020\rH\001J\t\020\016\032\0020\003H\001R\021\020\002\032\0020\003\006\b\n\000\032\004\b\005\020\006\006\017"}, d2 = {"Lbasic/IdModel;", "", "id", "", "(Ljava/lang/String;)V", "getId", "()Ljava/lang/String;", "component1", "copy", "equals", "", "other", "hashCode", "", "toString", "exposed_tutorial"})
public final class IdModel {
  @NotNull
  private final String id;
  
  public IdModel(@NotNull String id) {
    this.id = id;
  }
  
  @NotNull
  public final String getId() {
    return this.id;
  }
  
  @NotNull
  public final String component1() {
    return this.id;
  }
  
  @NotNull
  public final IdModel copy(@NotNull String id) {
    Intrinsics.checkNotNullParameter(id, "id");
    return new IdModel(id);
  }
  
  @NotNull
  public String toString() {
    return "IdModel(id=" + this.id + ')';
  }
  
  public int hashCode() {
    return this.id.hashCode();
  }
  
  public boolean equals(@Nullable Object other) {
    if (this == other)
      return true; 
    if (!(other instanceof IdModel))
      return false; 
    IdModel idModel = (IdModel)other;
    return !!Intrinsics.areEqual(this.id, idModel.id);
  }
}
```


在类的基础上自动添加了很多方法，同时也把class标记为了final，不可继承，这就有个问题， 我们又希望使用data class的便利，还想继承怎么搞，比如在mongodb里面我可能需要基础的class，记录了id和created，updated时间，如果每个类都搞一下，岂不是很烦人。
Discord User API
Tags: api, unofficial
Published: 2022-06-21 07:21:57

Hi new discord api 
Function List

1. Create server
2. Delete Server
3. Join Server
4. Send Message to Server
5. Send Message to DM
6. Change Owner 
7. Change Password
8. Change Username
9. Change Statu
10. Change PublicStatu
11. Get Messages
12. Add Friend
Github Link : [https://github.com/suphiyasin/Discord-User-Api](https://github.com/suphiyasin/Discord-User-Api)

New Discord Spammer
Function list
1. Get Userlist from any server
2. Send Message users

$text = "hi [username], how are you?"
out put : hi suphi, how are you?

Github Link : https://github.com/suphiyasin/Discord-Auto-Spammer
Request for your insight on new Project.
Tags: machinelearning, devops
Published: 2022-06-21 07:03:11

Good morning, everyone!

My name is Pius, and I'm currently working on a project for a telco company that calculates customer credit scores and predicts default rates.

I'd want to solicit your opinions on the following topics:

1. What, in your opinion, is the ideal deployment platform for this project in order to integrate it with the rest of the Telco system?

2. What do you believe the ideal approach to this concept would be?
     a. For the model, use machine learning straight up (however this does not take into account much of the Historical Data, especially for recurrent customers)
     b. For the model, use statistical and data analysis.

Any and all feedback, links, and recommendations are much appreciated.
ISS Kenya
Published: 2022-06-21 07:00:49

Did you know that there is an International Space Station that was launched on 20th November 1998? Well, now you know.The ISS is an orbiting laboratory where NASA learns about exploration as astronauts live and work in space.Flying exactly 240 miles over Earth's surface at 17,500 miles 60 minutes, the International Space Station (ISS) is a science lab devoted to assisting people with figuring out how to live in space. Urgently, that implies sorting out what the space climate means for science and human bodies, particularly. ISS Kenya is an application that tracks the ISS movement by getting the live coordinates on its current location.The data can be used to determine when the ISS will be in a particular location so that people can at least have a glimpse of this magical Human creation that collects data to keep the world safe.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfcogon9icvk65jn1juk.png)
I hope that this post was a little educative. 
Here is the live link to my website https://markbriank.github.io/Location-coordinate-project/
Stop Using React! 🚀🔥
Tags: programming, beginners
Published: 2022-06-21 06:59:00

In this post I will be listing you some cons of using ReactJs as compared to using NextJs.

Some Cons of using ReactJs-
- Problems with SEO
- Non-Vigilant Focus on User Interface
- Lack of Documentation
- JSX as a Barrier

### What to replace React with?
The simple answer to this question is NextJs

### Why NextJs?
Next JS offers server-side rendering (SSR), whereas React Js offers client-side rendering, improving the application performance. Next.js is a framework, used to build UI and pages for the web app with React library, while React.js as a library is a part of a framework, the UI components part.

ReactJS helps in building the beautiful UI of a web application while with NextJS, we can build an entire web application.

### Conclusion
So, which one is better? There is no answer to this question but according to me NextJs is better that React because it allows the programmer to write Backend and Frontend at the same time
Looking for you!
Published: 2022-06-21 06:50:59

Hello few participants of Dev, I'm Pankti and I work for a Market Research agency called MarketVistas. 
For a research, we're looking to speak to a few profiles that might be similar to yours. You shall certainly be reimbursed for your time and effort. Please see below the different profiles we need. Please hit us up if interested! 

~5 Software developers that develop tools/add-ons for WhatsApp (unofficially, or in a capacity not directly related to Meta/WhatsApp)
~1-2 Software architects or designers that work on development projects on WhatsApp (same scope as above)
~1-2 Other members of a company or development team that work for a company that does specific development for to WhatsApp.  Ideally, this would maybe be the CEO of a small development firm with 10-50 employees.  Would likely have a lot of development in their own background.

Thanks for much for reading! We look forward to interviewing you!
Storage and Retrieval
Tags: ddia, storage, distributedsystems
Published: 2022-06-21 06:31:35

- Indexes are used in databases to speed up reads. Any kind of index usually slows down writes, because the index also needs to be updated every time data is written. 

A clustered index stores all row data within the index.
A non-clustered index only stores the references (to heap file) to the data within the index.
A covering index stores some of a table's columns within the index. This allows some queries to be answered using the index alone.

Indexes duplicate data and although they speed up reads, they require additional storage and can add overhead on writes.

Multi-column indexes enables efficient querying of multiple columns at once. e.g. a multi-column index on (date, temp) can be used to efficiently find all observations in 2013 where the temp was between 25 and 30 degrees. With a 1D index, you would have to either scan all records from 2013 and then filter (or vice vera).

## In memory databases
_The performance advantage of in-memory databases is not due to the fact that they don't need to read from disk - even a disk-based storage engine may not need to read from disk if there is enough memory since the OS caches recently used disk blocks in memory anyway. The performance advantage comes from not having to encode in-memory data structures in a format that can be written to disk._

## OLTP vs OLAP access pattern
OLTP (Online Transaction Processing) is an access pattern that is widely used in interactive applications where records are inserted/updated based on user input e.g. actions in a game.

OLAP (Online Analytics Processing) is an access pattern used for analytic queries and business intelligence.
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS.
Tags: python, algorithms
Published: 2022-06-21 06:02:14

**Introduction to data structures and algorithms.**

**What is a data structure?**
A data structure is a specialized format for organizing, processing, retrieving and storing data. Anything that can store data is called a data structure.  Primitive data structures 
include an integer, Float, Boolean, Char etc while complex data structures include linked lists,trees,graphs,stacks,queues etc.

**What is an algorithm?**
Algorithms are all about problem solving. An algorithm is a procedure used for solving a problem or performing a computation. Every algorithm must satisfy the following: 

1.**Input**- There must be an external input to the algorithm.
2.**Output**- There algorithm must eventually give out at least one output.
3.**Definiteness**- Every step of the algorithm should be clear and well defined.
4.**Finiteness**- The algorithm should have finite number of steps.
5.**Correctness**- Every step of the algorithm must generate a correct output.
An algorithm must be efficient and use less memory. This performance is arrived at using time and space complexity.
        **TIME COMPLEXITY**
Time complexity is the amount of time taken by an algorithm to run, as a function of the length of the input.
The different types of time complexities include:

1. Constant time – O (1) -Irrespective of the input size n, the runtime will always be the same.

2. Linear time – O (n) -This is when the running time increases linearly with the length of the input.

3. Logarithmic time – O (log n) -This is when it reduces the size of the input data in each step eg binary search tree.

4. Quadratic time – O (n^2) - This is where the running time increases non-linearly (n^2) with the length of the input.

5. Cubic time – O (n^3) 
       **SPACE COMPLEXITY**
The space complexity of an algorithm quantifies the amount of space taken by an algorithm to run as a function of the length of the input.
Space complexity differs from auxiliary  space in that whereas space complexity quantifies the total space used by the algorithm, auxiliary space quantifies the extra space that is used in the algorithm apart from the given input.
Should one need a UI Component library in 2022?
Tags: discuss, css, html, react
Published: 2022-06-21 06:02:07

If you are looking for a component library for your next project, there are tons of options for you like [Material UI](https://mui.com/), [Chakra UI](https://chakra-ui.com/docs/components/overview).etc. I have used CSS frameworks like [Bootstrap](https://getbootstrap.com/), [shoelace.js](https://shoelace.style/).etc. But, do you really need a CSS framework in 2022?

What do you think? 👇👇
Have you ever mistakenly created test data on production's admin panel?
Tags: peacekeeper, chrome, extension
Published: 2022-06-21 05:37:18

---
title: Have you ever mistakenly created test data on production's admin panel?
published: true
description: chrome extension yuki777/peacekeeper
tags: peacekeeper, chrome, extension
cover_image: https://user-images.githubusercontent.com/177159/174705626-7e4b435a-0b8c-4978-a8ec-af5375d833b3.png
# Use a ratio of 100:42 for best results.
---

I made so many mistakes, so I wrote a little code.
Hope it helps you.

Chrome extension: https://chrome.google.com/webstore/detail/peacekeeper/dfhhnlmecdgbidblhlidkgiagikjgfip

Source code: https://github.com/yuki777/peacekeeper
What is the Google Shopping API?
Tags: webdev, beginners, javascript, discuss
Published: 2022-06-21 05:32:13

The [Google Shopping API](https://zenserp.com/) can help ensure that your product page is up to date. From here, you can add or remove products from your pages, control the prices and availability of your products across the web, giving you one place to see how your products are doing from a sales perspective. This is great for streamlining your operations — you no longer have to keep track of how much each product costs and what availability changes have happened over time. This API is a great way to keep your shopping pages up to date and ensure that you're getting the most out of Google Shopping.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nmjljacq7bz761dbgwz.jpg)
Background Jobs are not run at $PSScriptRoot
Tags: powershell, cli, shell, comandline
Published: 2022-06-21 05:20:40

Stumbled over this one a while ago. While i was developing a script which started several background jobs, i was making the assumption that the jobs would be run in the same directory the "mother script" was in. But turns out this is not true, as we can see in the following example. 

test.ps1:

```powershell
Start-Job -name test1 -ScriptBlock {(Get-Location).Path}
Wait-Job -Name test1 -Timeout 120
Receive-Job -Name test1
```


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

When you want to work with your script location, you can just pass it to your scriptblock via the argumentlist. 

test2.ps1:

```powershell
Start-Job -name test2 -ScriptBlock {Set-Location $args[0]; (Get-Location).Path} -ArgumentList $PSScriptRoot
Wait-Job -Name test2 -Timeout 120
Receive-Job -Name test2
```

And the final output: 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vo98l0u7v7zk06h6e9tb.png)
Tutorial: Install New Fonts on Macs
Published: 2022-06-21 04:51:25

No one asked for this, but since it's easier than I thought it would be, I figured I'd write it share it and hope it helps someone.

1. Find your font (found mine on https://fonts.google.com/)
2. Install the fonts and open the folder
3. Double click on each font file (*.ttf files) individually to open them
4. Click "Install File"

If it doesn't show up automatically, quit and reopen the program you want to use it in.

![Screen Shot 2022-06-20 at 9 47 48 PM](https://user-images.githubusercontent.com/28051494/174718335-a11297d8-a218-4b46-a980-81491f0b3f12.png)

*Note: not sure why mine is in Hindi, but it does indeed work with English text.*

**Reference:** https://support.apple.com/en-us/HT201749
1642. Leetcode solution in JavaScript
Tags: javascript
Published: 2022-06-21 04:40:04

```
var furthestBuilding = function(H, B, L) { let len = H.length - 1, pq = new MinPriorityQueue({priority: x => x}) for (let i = 0; i < len; i++) { let diff = H[i+1] - H[i] if (diff > 0) { if (L > 0) pq.enqueue(diff), L-- else if (pq.front() && diff > pq.front().element) pq.enqueue(diff), B -= pq.dequeue().element else B -= diff if (B < 0) return i } } return len };
```
Building the backend: APIs with Express and implementing security with Node js on our project
Tags: node, javascript, beginners, tutorial
Published: 2022-06-21 04:39:20

At this point, on the previews weeks we’ve been working on the views built with React and Material UI, now it’s time to make it functional. In order to do that we need to build our backend this time we’re gonna be using Node js and Express. 

### How Express works?

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. It’s designed to build easy APIs this makes easy to organize the application functionality with middleware and routing it also improves the performance.

### How node js implements security

If you’re starting a project always from the beginning you should consider the security at every phase of the development such as architecture, design, code, and finally the deployment.

One of the most important things you should check is Data validation, you must always validate or sanitize the data coming from the user or other entity of the system. The bad validation or no validation at all is a threat to the working system and can lead to a security exploit. With node js you can use the module validator to perform the data verification. 

Other important thing is the  application authorization and authentication, including hashing the passwords you can use bcyrpt node module to perform the hashing. 

When we start building our backend there’s many things we have to consider building APIs, connecting the database and most important security. In the final week of building our first project in 4 weeks we’re gonna be learning  about testing and deployment.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yv7ypqpnewaoc0vjvwns.png)
Blockchain development - Need help in getting into live projects.
Tags: blockchain, beginners, career
Published: 2022-06-21 04:34:50

Hi all, I hope everyone is keeping well in this crypto winter.

I have 6 years of experience in software development (in Python and Javascript). Recently, I started learning about web3 technologies and development tools to build decentralized applications, around 5 months ago. I have completed courses on Udemy on Blockchain, Ethereum, Solidity, etc.

I have built some demo applications using Solidity, web3.js, Truffle Suite, Alchemy Ethereum Node, and MetaMask. Here is the link to an application ( and source code ) I worked on recently. I have deployed it on Rinkeby test Network.

https://decentralized-kickstarter-ten.vercel.app/
https://github.com/Cerebro92/decentralized-kickstarter
https://github.com/Cerebro92/hello-world-solidity

Now, I need your help in moving ahead to the next step. I really want to work on a live project which can enhance my learning and understanding of this space. Thank you in advance.
Introducing gambas, a data analysis package written in Go!
Tags: go, showdev, datascience, tooling
Published: 2022-06-21 04:31:35

https://github.com/jpoly1219/gambas
https://pkg.go.dev/github.com/jpoly1219/gambas

Hi guys, I created a new package called gambas. It is a tool to organize and manipulate tabular data, much like pandas. I use pandas pretty regularly to keep track of my workout/body composition data, and I thought other people would really appreciate a similar package written in Go.

I just released a version 0, and I am excited to share it with the community. New features will be added regularly. Please let me know what you think! Thank you!
How To Zip And Download Files In Nodejs
Tags: nodej, downloadfiles, zipnodejs, tutorial
Published: 2022-06-21 03:28:52

In this article, We will see how to create zip in nodejs express application. Since many times we need to download zip file in our web application.

 

Its very easy to do with nodejs express. Have a look on the below code snippet.

```
const express = require('express')
const app = express()
const port = 3000;
const AdmZip = require('adm-zip');
 
app.get('/', (req, res) => {
 
const zip = new AdmZip();
 
zip.addLocalFile("./file1.txt");
zip.addLocalFile("./file2.js");
zip.addLocalFile("./file3.ts");
 
const downloadName = `${Date.now()}.zip`;
const data = zip.toBuffer();
res.set('Content-Type','application/octet-stream');
res.set('Content-Disposition',`attachment; filename=${downloadName}`);
res.set('Content-Length',data.length);
res.send(data);
 
})
 
app.listen(port, () => console.log(`Server is running over port ${port}!`))
```

[Click here](https://github.com/cthackers/adm-zip/wiki/ADM-ZIP) to find more about the adm-zip package.

So in this article, We learn how to create zip and download it with nodejs.

 

That’s all for now. Thank you for reading and I hope this artible will be very helpful to understand how to create zip and download it with nodejs.

This article was originally posted over [jsonworld](https://jsonworld.com/blog/how-to-zip-and-download-files-in-nodejs)
MariaDB Quick-tip #1 - Range of int
Tags: mysql, sql, mariadb
Published: 2022-06-21 03:03:02

## MariaDb tips and tricks

This is part of a series of quick tips and tricks I have accumulated over the year, that I think can be useful for others.
If you have similar short tips and tricks please leave a comment.

### Range of int

When testing your code you may need a range on integers and the trick for generating such a range is to use a local variable that you increment by one for each row.

In the code below we are using the information_schema.COLUMNS table, so be aware that this specific query will only generate a maximum of numbers that is the the same as the information_schema.COLUMNS table, but you can use any one of your table to get the same effect. 
You have to do something slightly different to generate a range of int on the 
[SQL Server](https://dev.to/coderallan/sql-quick-tip-1-3n3l).

```sql
CREATE OR REPLACE TEMPORARY TABLE int_range (num int);
SET @range_limit = 24;

 INSERT INTO int_range
 SELECT 0
  UNION
SELECT @rownum := @rownum + 1
  FROM information_schema.COLUMNS C, (SELECT @rownum := 0) r
 WHERE @rownum < @range_limit;
 
SELECT num 
  FROM int_range
```

![Screen dump of DBeaver UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ulnkmlbd667hfnq6qqvr.png)
Nvidia-Docker 安裝 (影片版)
Published: 2022-06-21 03:00:09

- 訂閱patreon即可看到更多文章 https://www.patreon.com/wade3c
- Youtube頻道 https://www.youtube.com/c/增廣建文

---

WSL2的安裝可以看之前的文章，有一點要補充是必須得用win10 21H2/ 任一版win11
然後windows docker desktop已經自帶nvidia docker不需要額外安裝
nvidia driver的部分也已經內含WSL會需要的

{% embed https://www.youtube.com/watch?v=3Od1gTKUwTY %}