teleren/devto huggingface dataset:
How to query remote InfluxDB via cURL
Tags: influxdb, curl, query
Published: 2022-11-07 11:00:00

---
title: How to query remote InfluxDB via cURL
published: true
date: 2022-11-07 11:00:00 UTC
tags: influxDB, cURL, query
canonical_url: https://ftisiot.net/posts/query_influxb_curl/
---


![Terminal showing the cURL code to query InfluxDB](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hysczf52zte8jaof90ms.png)

Sometimes you want to query a remote InfluxDB server to understand the data in it. This can be done via cURL as explained in the [InfluxDB docs](https://docs.influxdata.com/influxdb/v1.8/guides/query_data/)

## Parameters

* `HOSTNAME`: Database hostname
* `PORT`: Database port
* `PROTOCOL`: Protocol to connect to the database `HTTPS`, `HTTP`
* `USERNAME`: Username to connect to the database
* `PASSWORD`: Password to connect to the database
* `DB_NAME`: Database name
* `QUERY_STR`: Query string to be exectuted. The query string needs to be properly escaped, e.g. `SELECT \"ts_ms\" FROM \"test_measurement\"`


## cURL Query Code

Execute the following by replacing the parameters above

```
curl -G 'https://<USERNAME>:<PASSWORD>@<HOSTNAME>:<PORT>/query?pretty=true' \
    --data-urlencode "db=<DB_NAME>" \
    --data-urlencode "q=<QUERY_STR>"
```

As example to get the `SELECT \"ts_ms\" FROM \"test_measurement\"` you can run:

```
curl -G 'https://<USERNAME>:<PASSWORD>@<HOSTNAME>:<PORT>/query?pretty=true' \
    --data-urlencode "db=<DB_NAME>" \
    --data-urlencode "q=SELECT \"ts_ms\" FROM \"test_measurement\""
```

Results:

```
{
    "results": [
        {
            "statement_id": 0,
            "series": [
                {
                    "name": "TEST",
                    "columns": [
                        "time",
                        "ts_ms"
                    ],
                    "values": [
                        [
                            "2022-11-07T08:50:20.772317361Z",
                            1667809412536
                        ],
                        [
                            "2022-11-07T08:50:20.789690226Z",
                            1667809412547
                        ],
                        [
                            "2022-11-07T08:50:20.79052872Z",
                            1667809412548
                        ],
                        [
                            "2022-11-07T08:51:53.165095297Z",
                            1667811112824
                        ],
                        ]
                }
            ]
        }
    ]
}
```
React Native RTMP Publisher
Tags: react, reactnative, live, streaming
Published: 2022-11-07 11:53:26

Hi everyone!

I've improved and re-write my React Native RTMP Publisher package that I shared before! 

It is a package that you can broadcast live over RTMP with built-in camera support, bluetooth, wired etc. microphone options and more. 

I wrote it with Java & Swift.

Here is the link if you want to take a look. If you like it you can support with 'star' ⭐️ and share!✌🏻

If you want to contribute, I'll wait for your PRs 👍🏻

(PS: I made logo on the readme and I'm amateur, feedback me if you have any advice 😁)

https://github.com/ezranbayantemur/react-native-rtmp-publisher
useExitIntent - A React Hook to handle exit intent strategies
Tags: react, nextjs, typescript, javascript
Published: 2022-11-07 11:49:05

The Exit Intent strategy is a great way to increase your conversion rate. That strategy is commonly used to show a modal/popup when the user is about to leave your website.

[useExitIntent](https://daltonmenezes.github.io/use-exit-intent) hook is simple to use and you can customize it to your needs. Here are the main features:

- 🚀 Multiple handlers can be registred
- 🔥 Highly configurable
- 🧠 Different strategies for Desktop and Mobile
- ⛔️ Unsubscription support with cookies
- 🎉 Built with TypeScript

## Installation

#### yarn

```bash
yarn add use-exit-intent
```

#### npm
```bash
npm i use-exit-intent
```

<br/><br/>

## Importing
```tsx
import { useExitIntent } from 'use-exit-intent'
```

## Using

In your React component:

<br />

```tsx
export function App() {
  const { registerHandler } = useExitIntent()

  registerHandler({
    id: 'openModal',
    handler: () => console.log('Hello from handler!')
  })

  // ...
}
```
**To get more knowledge about this hook**:
- [Docs](https://daltonmenezes.github.io/use-exit-intent/docs/getting-started/overview)
- [Playground](https://daltonmenezes.github.io/use-exit-intent/#playground)
- [GitHub Repository](https://github.com/daltonmenezes/use-exit-intent)
Tick Tock migration pattern
Tags: database, architecture, migration
Published: 2022-11-07 11:40:28

Tick Tock is when you do a migration in two steps to avoid breaking.

## Tick

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

Imagine we have 2 different models/collections/tables to store transactions (TransactionModel) and refund transactions (TransactionRefundModel)
However, you figure it out that this 2 models should be the same collection.
What is the best approach to convert all TransactionRefundModel to TransactionModel?

The best approach is to start writing the refund transaction for both old and new model.
After this is done, you can compare if you are not losing information in this migration.
Then, you write a migration to migrate the old data to the new data.

This is the `Tick` part of the migration. You have 2 models working together.

## Tock


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

The `Tock` part is modifying the code to read from the new data only.
After the reading new data is done and correct.
You can stop writing data to the old data.
Do not forget to cleanup the old data and code.

---

[Woovi](https://www.woovi.com) is a Startup that enables shoppers to pay as they like. To make this possible, Woovi provides instant payment solutions for merchants to accept orders.

If you want to work with us, we are [hiring](https://woovi.com/jobs/)!

---
Photo by <a href="https://unsplash.com/@andallthings?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Ethan M.</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Getting Started on Elixir and Ecto Part 6
Tags: webdev, elixir, database, phoenix
Published: 2022-11-07 11:40:22

## Updating Data 

Updating records in Ecto requires us to first **get a record from the database** then **create a changeset from that record** and **pass the new changes we want to make** to that record, and finally, call the _Ecto.Repo.update_ function.

{% embed https://gist.github.com/itskenzylimon/8f94ab1e4f2209f58042de680047f8b9 %}
Tezos的加德滿都協定將打開與以太坊虛擬機(EVM)相容的大門
Tags: opensource, blockchain, web3, c2x3
Published: 2022-11-07 11:33:34

Oct 19 (edited)隨著「加德滿都（Kathmandu）」於上個月（9/24）成功升級，Tezos 已經成完成 11次的升級，距離上次「雅加達」（Jarkata）升級也不過相隔不到三個月。加德滿都為尼泊爾首都，延續了一直以來 Tezos 用古城名來命名協定的傳統，積極的更新並釋出新的協定階段，也向來是 Tezos 的特色。這裡幫大家整理一下，加德滿都協定的五個重要更新方向。
 取自 https://news.coincu.com/
隨著「加德滿都（Kathmandu）」於上個月（2022/09/24）成功升級，Tezos 已經完成 11次的升級，距離上次「雅加達」（Jarkata）升級也相隔不到三個月。加德滿都為尼泊爾首都，延續了一直以來 Tezos 用古城名來命名協定的傳統；積極地更新並釋出新的協定階段，也向來是 Tezos 的特色。
而此次升級，最重要的是引入了對 WASM（WebAssembly）的直接支援，並且對 EVM（Ethereum Virtual Machine）智能合約虛擬機的相容打開了可能性。這讓人期待在未來，Tezos 的虛擬機 Michelson 將擁有一個可以運行所有程式的作業環境。（可以簡單的想像，未來在 Tezos 可以直接跑 ETH 上面的智能合約）
這裡也幫大家整理一下，加德滿都協定的五個重要更新方向：
1.	新一代的 optimistic rollups
optimistic rollups 是 Tezos 鏈上一種快速將交易以及計算簡化打包上傳到區塊鏈上的方式，避免了所有動作或是無謂的資訊都強迫在鏈上執行的不便。而這次升級，在於可以更大量的來執行 rollup 的動作，主要就是針對開發者可以更好、更方便地來使用，也為打開與其他智能合約虛擬機器（例如 EVM）的相容，做了一個不錯的開端。
2.	新增智能合約的事件日誌機制 Event logging
這次更新，新增了一個 Michelson 指令：EMIT。藉由這個指令，合約可以在執行期間送出一筆可以作為紀錄的資訊，被稱為「合約事件」 (contract event) ，記錄合約動作的摘要。此種新的資料使用形式不會儲存在合約空間中，而是儲存在合約運算結果的收據（receipt）上。由於不會進入合約空間，可以節省掉不必要的合約空間費用（storage fee）。
3.	管線化區塊驗證（pipelined block validation）的第一步
這個更新的重點是簡化區塊驗證的過程，減少在鏈上完全執行合約的需求，可以省錢也可以省時，也可以增加 Tezos 的吞吐量，並同時保有區塊鏈的安全性。
加德滿都中實踐了管線化區塊驗證的第一步：將鏈上交易的執行與驗證更好地獨立開來。基於這個更新，未來可以進一步加速區塊驗證。
4.	永久測試網
過往 Tezos 的測試網不會隨著不同階段更新，對於開發者來說其實有著一定的不便，需要常常切換最新的測試網（像是Hangzhou testnet已經停用）。但現在，Ghost net is live!! 開發團隊原地將 Ithaca testnet 改為 ghost tesnet，作為開發者的長期使用。此外，ghostnet 會自動更新至最新的協定，如此一來開發者就不需要手動在不同測試網路中切換。
5.	協定上隨機演算法的改善
Tezos 原先使用類似 RANDAO 的機制來作為亂數產生機制。此更新中加入了對於 VDFs（Verifiable Delay Functions）的支援。 不同於 RANDAO 的類亂數產生機制，VDFs 是一種可驗證的延遲函數，這個改善主要加強了 Tezos 協議的分散式隨機性生成機制。聽起來有點複雜，但主要用意就是增加了區塊鏈的安全性。
總之，更新的目的就是要讓這條鏈，處理速度更快、操作手續更省錢、開發者更方便使用、相容度更高，但使用性更安全，也讓我們可以期待 Tezos 接下來的發展 :)
 
註1：Tezos 升級由 全球開發者團隊、Tezos 社群、烘焙師 以及 Nomadic Labs、Marigold、TriliTech、Oxhead Alpha、Tarides、DaiLambda、Functori & Tweag 的關鍵協定團隊支持。
註2：主要更新資訊內容感謝 [Marigold](https://www.marigold.dev/) 提供協助。

c2x3除了會在Matters上分享台灣NFT項目，也致力將台灣項目推向國際！如果喜歡我們的內容，誠摯邀請大家分享我們的文章，讓更多人看見！我們也會出現在 Facebook，還有英文版的Twitter 跟 Medium，請記得幫我們按讚訂閱加分享。
c2x3下次再見！

[Source](https://matters.news/@23designinfo/339706-tezos%E7%9A%84%E5%8A%A0%E5%BE%B7%E6%BB%BF%E9%83%BD%E5%8D%94%E5%AE%9A%E5%B0%87%E6%89%93%E9%96%8B%E8%88%87%E4%BB%A5%E5%A4%AA%E5%9D%8A%E8%99%9B%E6%93%AC%E6%A9%9F-evm-%E7%9B%B8%E5%AE%B9%E7%9A%84%E5%A4%A7%E9%96%80-bafyreifyqdvhwt3ewpotl3ms7eawbwhbupbeffka5oz56wrqu24a7lfn6q)
3-dars
Tags: beginners, programming, tutorial, cpp
Published: 2022-11-07 11:20:22

BUgungi darsimizning mavzusi "cin".Buning vazifasi consolega biron bir narsa yozsak shuni asosiy ishlayotgan joytimizga chqarip beradi.bunga bir misol qiladigan bolsak

````
#include <iostream>
#include <iomanip>

using namespace std;
int main(){

int yil= 2005;
string tekst =" Turdiqulov ";
string tekst1 = "Jamshid " ;

cout << "Men" << tekst << tekst1 << yil << " yilda tugulganmn"<<endl;
  
return 0;
}
````
Huddi shu tarzda ishlanadi.etibor qilgan bolsangiz "iomanip" degan so'z qoshildi, bu sozning manosi "int output stream" agar biz shu sozni kirgazmask bizda cin sozi oqimaydi .
What is Alternative Data - Complete Guide 📊
Tags: startup, monitoring, news
Published: 2022-11-07 11:19:20

#The Leverage
The data give you power and the more data you have, the more leverage you have. Many investors already see that alternative data have been just as essential as fundamental data for their financial analysis and insights.

Alternative data have been used in many different industries to improve customer experience, increase revenue and reduce costs. One example would be a large retail chain that uses alternative data to help customers find the best deals on products they want to buy. Another example would be an online retailer that uses alternative data to determine which product categories are selling the most and what type of offers are most effective at attracting new customers.

---

## 1. What are Alternative data?
Alternative data are non-traditional data that can give a lot of indications and insight's. Examples of alternative data sets include credit card transaction data, product reviews, Social media, Web traffic etc.

## 2. How it can be used?
Nowadays, more the 50 percent of hedge funds and investment firms are using alternative data to gain some competitive edge, with consumer patterns, expert networks and web-crawled data being the most commonly used methods. the analysis with these alternative data is getting better day by day by the use of modern technologies like AI-ML.

## 3. Types of Alternative data.
- Social Media Data
- Web/ Mobile Data
- Credit Card data
- Geolocation data
- Public data


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


To Learn and know more about alternate data please refer to this great article by Proxycurl [Read This](https://nubela.co/blog/the-ultimate-guide-to-alternative-data-what-is-it-really/)

## 4. How can you use Proxycurl for getting alternative data?
Proxycurl is a strong data company with a demonstrable capacity for handling unstructured data. Its core strength in data enrichment capabilities of people and companies - offering insights into people, profiles, company profiles, work & personal email addresses and contact, jobs info, and more sets it apart.
Proxycurl provides a wide variety of API's through which you can fetch a lot of available endpoints to access data of companies, peoples, companies etc. 


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

You can learn more on their documentation [Read Here](https://nubela.co/proxycurl/docs#jobs-api)

## Conclusion 

Alternative data can be used in a lot of fields and the insights it provides can be useful for a lot of companies. With the technologies available today getting these data would have never been easier.
Logging your error message of your Flutter App directly into Slack Channel?
Tags: flutter, web3, mobile, programming
Published: 2022-11-07 11:15:56

Wanna know how to log your error message in #flutter to your slack channel ?

1. Create new App in Slack

Go to [https://api.slack.com/apps](https://api.slack.com/apps) and create a new app.

Select from scratch option and in next option
Pick your appname and pick your workspace to send messages.

2. Enable Incoming Webhooks
After that, you need to enable incoming webhooks. and you will get the webhook url.

3. Now create your flutter project or in your exisiting project
In your terminal add this package slack_logger: 

```
flutter pub add slack_logger
```
now in your main.dart file

```
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {

    SlackLogger(webhookUrl: "[Add Your Web Hook Url]");

    return MaterialApp(
      ...
    );
  }
}
```
now in your class:

```
final SlackLogger _slack = SlackLogger.instance;
```
and in your try catch:

```
try {
  ...
} catch (e) {
  _slack.send(e.toString());
}
```
Now when you get your error, you'll recieve the slack message in your selected channel.
Package Url : [https://pub.dev/packages/slack_logger/](https://pub.dev/packages/slack_logger/)
Github Url: [https://github.com/slimpotatoboy/slack_logger](https://github.com/slimpotatoboy/slack_logger)
Feel Free to request any missing features or report issues [here](https://github.com/slimpotatoboy/slack_logger/issues).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmmty9etl0s02o5waqwv.png)
Abraçar mudanças (IV)
Published: 2022-11-07 11:11:53

Este é o quarto artigo de uma série sobre [Git](https://www.git-scm.com). Veja os outros artigos: 

[I - Controle de versão](https://dev.to/hilam/abracar-as-mudancas-i-295i)
[II - Configuração](https://dev.to/hilam/abracar-as-mudancas-ii-246b)
[III - O que há por baixo dos panos](https://dev.to/hilam/abracar-as-mudancas-iii-5f7h)
IV - Comandos mais usados
V - Fluxo de trabalho
VI - Serviços Git na web
VII - Contribuindo com código aberto

### Comandos mais usados

Há muito material disponível na rede, sobre comandos do git. Vou apenas colocar os que achei mais interessantes na última pesquisa que fiz.

#### Git fichas

Um ótimo projeto, para um conhecimento granular dos comandos git é o [Git Fichas](https://gitfichas.com/), criado e mantido por [Jessica Temporal](https://dev.to/jesstemporal).

Posts da Jéssica sobre git, na plataforma dev.to:

* https://dev.to/jesstemporal/5-dicas-para-fazer-o-seu-pull-request-brilhar-k7a

* https://dev.to/jesstemporal/resolvendo-conflitos-4jen

* https://dev.to/jesstemporal/corrigindo-a-origem-de-um-branch-com-git-rebase-4a1n

* https://dev.to/jesstemporal/atualizando-um-branch-com-git-rebase-3605

* https://dev.to/jesstemporal/criando-um-novo-branch-e-mudando-pra-ele-com-apenas-um-comando-3c7n

* https://dev.to/jesstemporal/desfazendo-os-ultimos-commits-usando-git-reset-4ink

* https://dev.to/jesstemporal/desfazendo-o-ultimo-commit-e-mantendo-as-alteracoes-para-um-proximo-commit-568j

* https://dev.to/jesstemporal/usando-git-stash-e-git-stash-pop-5dlf

* https://dev.to/jesstemporal/entenda-a-diferenca-entre-git-stash-pop-e-git-stash-apply-9k0

#### Outras referências

* https://www.freecodecamp.org/portuguese/news/10-comandos-do-git-que-todo-desenvolvedor-deveria-conhecer/

* https://training.github.com/downloads/pt_BR/github-git-cheat-sheet/

* https://comandosgit.github.io/

* https://www.codigofonte.com.br/artigos/top-25-comandos-do-git


São algumas recomendações para o aprendizado dos comandos mais usados no git.
20+ Best SaaS Black Friday Deals For 2022
Tags: blackfriday, cybermonda, saas, saasdeals
Published: 2022-11-07 11:10:43

Black Friday deals are known to be customer’s fiestas, one of the busiest and most profitable times of year for SaaS buyers. Given its exciting deals and offers, Black Friday is undoubtedly the best time to consider if you’re willing to try or purchase any SaaS application at the most exciting prices.

Here is a curated list of Black Friday SaaS deals 2022 for you to get an idea of what Black Friday offers this season. All you have to do is choose the application, service, or product you seek and take advantage of these best SaaS deals to make great cost savings.

Here is a list of some Black Friday SaaS deals curated by MojoAuth for 2022. Make sure to check them out and grab best offers.

[Read here to get the full list](https://mojoauth.com/blog/best-black-friday-saas-deals/).
Announcing free SSO (Single Sign On) for GraphQL Hive
Tags: graphql, graphqlhive
Published: 2022-11-07 11:06:49

> This article was published on Monday, November 7, 2022 by [Laurin Quast](https://twitter.com/n1rual) @ [The Guild Blog](https://the-guild.dev/)

Today we are excited to announce that due to popular demand we now support connecting a GraphQL Hive
Organization to an OAuth Open ID Connect Provider (OIDC) for Single Sign On (SSO).

> [GraphQL Hive](https://graphql-hive.com/) is our schema registry solution for continuously
> evolving your GraphQL schema backed by performance insights and usage statistics. Whether you are
> working in a small company with a single GraphQL service or a big multi-team company with multiple
> (federated or composed) GraphQL services, GraphQL Hive is the perfect tool to help you manage your
> GraphQL schema.

GraphQL Hive gives you the flexibility of choosing your existing identity provider of choice for
authenticating users, such as Google Workspaces, Okta, Auth0, and many more.

Users logging into GraphQL Hive via an OIDC provider will be automatically added and limited to
interacting within your organization.

You can start using OIDC SSO on the GraphQL Hive Cloud version for any type of organization at no
additional cost starting today.

Offering this feature for free is a big deal for us. We at The Guild believe that Single Sign On is
a core security requirement and not a luxury feature that you have to buy in.

You can learn more about the broken relationship between SaaS vendors and SSO on the
[SSO Wall of Shame](https://sso.tax/).

In addition, OAuth Open ID Connect login is not only limited to the GraphQL Hive Cloud version, but
is also available on self-hosted GraphQL Hive
[which we announced Last month](/blog/announcing-self-hosted-graphql-hive).

Huge thanks go out to the incredible helpful team at [SuperTokens](https://supertokens.com/) that
helped us a lot with questions and feedback on shipping this feature. GraphQL Hive is
[fully open source](http://github.com/kamilkisiela/graphql-hive) and also uses the SuperTokens Open
Source project for user authentication.

*   [Get started with adding OAuth OIDC SSO to your GraphQL Hive organization](https://docs.graphql-hive.com/features/sso-oidc-provider)
*   [Get started with with custom OIDC providers for self-hosted Hive](https://docs.graphql-hive.com/self-hosting/oidc-login)
Very Large Delay Value In setTimeout
Tags: webdev, javascript, react, node
Published: 2022-11-07 11:00:14

Hello Dev,

In this article, I will explain you 1 very important limitation of setTimeout in JavaScript.

Browsers including Internet Explorer, Chrome, Safari, and Firefox store the delay as a 32-bit signed integer internally. This causes an integer overflow when using delays larger than **2,147,483,647 ms (about 24.8 days)**, resulting in the timeout being executed immediately.


```js
function func(){
    setTimeout(()=>{
        console.log('Print hello after 2,147,483,648 milliseconds')
    }, 2147483648)
}

func() 

```

Expected output/ behavior for the above code should be the callback function of setTimeout will execute after **2,147,483,648 milliseconds**.

But the callback function will get executed immediately because the maximum delay value in `setTimeout` is **2,147,483,647 milliseconds** and we have provided **2,147,483,648 milliseconds** as delay.


Thank you for reading this so far. This is a brief introduction on **How Large Delay Value In `setTimeout` Acts in JavaScript**.

Hope it's a nice and informative read for you.
If you find this article useful, like and share this article. Someone could find it useful too.

If you find anything technically inaccurate, please feel free to reach out to us.

VISIT https://www.capscode.in/blog TO LEARN MORE.

See you in my next Blog article, Take care!!

Thanks,
CapsCode
Get Enterprise App Development Services in Canada
Tags: enterprise, app, enterpriseapp
Published: 2022-11-07 10:14:41

Appstudio is a company that offers **[enterprise app development services](https://www.appstudio.ca/enterprise-app-development.html)**. This means that they can help you develop an app for your business, no matter what size or type of business you have. They have a team of experienced developers who are familiar with the latest technologies and trends, so you can be sure that your app will be up-to-date and innovative. In addition, they offer a free consultation to help you determine what kind of app would be best for your business. So if you're looking for help developing an app for your business, Appstudio is a great option.
Need ideas to build? I will get you some based on product reviews
Tags: ideas, building
Published: 2022-11-07 10:12:20

Hi all, my first post ever here! You will usually find me on IndieHackers, but I needed to share this here too!

I've been playing around with GPT3, and now I can generate pretty neat stuff by letting it analyze online product reviews.

Like these ideas analyzing Canny.io:

1. The search function should be improved to allow for partial word searches: This would make it easier to find specific feedback items and would make the tool more user-friendly.

2. The tool should be more customizable to allow for different types of feedback forms: This would allow the tool to be used for more specific purposes and would make it more beneficial for organizations needing an idea board.

I also analyzed why people wrote their reviews:

- The tool is easy to use and has a clean interface
- The tool is beneficial for organizing feedback
- The tool has some drawbacks with its search function

As this is my first time posting here, I will generate some ideas for free. (Yeah, it will cost me GPT3 tokens)

So comment on what product you want me to analyze for you and how I can send you the feature lis below.