teleren/devto huggingface dataset:
The fastest way to launch customer-facing analytics in your apps.
Published: 2024-04-29 20:12:31

---
title: The fastest way to launch customer-facing analytics in your apps. 
published: true
description: Build and launch data-intensive apps.
tags: 
# app developers 
# embedded analytics
# user-facing analytics
# interactive dashboards
# customizable dashboards
# cover_image: ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iasrk1qkjtkvmlr8yxju.png)
# Use a ratio of 100:42 for best results.
# published_at: 2024-04-29 18:20 +0000
---

You're cruising along, building your SaaS, and then BAM! Your customers hit you with a request for better visibility into the "thing" your software does. Whether it's processing payments, shipments, or refreshments, no matter what your business is, your customers want to know how they can get the most value out of your app.

You might think, "No sweat, let's throw in some charts and call it a win." But hold onto your hats because your users are about to throw you a curveball. They see a chart, they want a dashboard. You give them a dashboard, they demand filters. Next, they're itching for some custom views. Before you know it, you're spending more time on the analytics than the actual product itself.

That's where [Semaphor](https://semaphor.cloud/home) comes to the rescue. It's a fully-customizable analytics package that lets you whip up interactive dashboards in your product in days, not months, and it's as simple as one line of code.

{% embed https://www.youtube.com/embed/T-k3ppCRdOU?si=_l9CFK93LbIiaie_ %}.

## Show me the magic

You're probably wondering, "Alright, how does this magic happen?" It's as easy as 1-2-3.

**1)** Hook up your data source: Whether it's any SQL database or your preferred API, we've got you covered.

**2)** Speak naturally or go old school with your own SQL. And get this, we even support SQL over API – mind officially blown! 🤯 From there, turn that SQL into a visual.

**3)** Once you've crafted your masterpiece of a dashboard, commit it to Github, publish it, and voila! With just one line of code, this dashboard is ready to be woven into your app. Tailor it with your CSS so it looks like it was born and raised in your app. 

``` 
<div>
   <h2>My cool dashboard</h2>
   <Dashboard authToken={authToken} id={DASHBOARD_ID} />
</div>

```

What once took months, maybe even longer, is now a matter of hours, thanks to Semaphor. But hold up! What about security? Fear not! We've got you covered with row and column level security to ensure sure John see's John's business and not Janes!

We are inviting trailblazers and early adopters. If you think your app needs some analytics facelift, join our [waitlist](https://semaphor.cloud/home) by requesting access, and don't forget to explain your use case.
Maxsus belgilar | C++ boshlang'ich
Tags: beginners, uzbek, programming, cpp
Published: 2024-04-29 20:10:42

`string` **va maxsus belgilar**

Avvalgi postimizda yozganimizdek, C++ tilida tekstlar string deb ataladi va qo'shtirnoq ichida `" "` orasida yoziladi.

```
cout << "Salom Dunyo" << endl;
```

1.` \` **- escape character**

- ushbu belgi **string**/tekst ichida maxsus komandalar/belgilar yozish uchun ishlatiladi.

**string** ichida yozish mumkin bo'lmagan ba'zi belgilar mavjud. Masalan: `U "zo'r" bola.` deb chop etish uchun C++ da `"U "zo'r" bola."` deb yozish xatolik beradi. BUnga sabab **string** ichida **"** belgisi ishlatsa, **string** tugaganini anglatadi.

**string** ichida shunga o'xshash ta'qiqlangan belgilarni yozish uchun `\` ishlatiladi.

```
cout << "U \"zo'r\" bola." << endl;
```

`\` belgisini o'zini chop etish uchun nima qilamiz ?

`\\` qilib yoziladi

```
cout << "Bugun \\ belgisini asl kuchini ko'rdik!" << endl;

----------natija-----------
Bugun \ belgisini asl kuchini ko'rdik!
```

2.`\n` **- yangi qator**

- ushbu maxsus belgi **string** register ichiga yozilsa, shu `string` ni chop etishda **\n** bor joydan boshlab keyingi qator o'tib ketadi.

```
cout << "Salom\nDunyo" << endl;

--------------natija-------------
Salom
Dunyo
```

3. `\t` **- Tab (tabulation)**

- `string` ichiga yozilganda tekst ichiga TAB bo'sh joy chop etadi

```
cout << "olma\tanor\tbexi" << endl;

------------natija-----------
olma   anor   bexi
```

4. `\r` **- carriage return**

- chop etilayotgan qatorda kursorni qator boshiga olib keladi. Yana chop etishda davom etilsa avval yozilgan tekstlarni o'chirib ustiga yozib yuboradi.

```
cout << "Github 'vashshe' malades  \rIlmhub" << endl;

----------natija--------
Ilmhub 'vashshe' malades
```
Goodbye Internet... For Now
Tags: watercooler, softwareengineering
Published: 2024-04-29 20:00:00

If you couldn't tell already, I haven't been posting a lot of articles lately. This is because I haven't really gotten the time to do so.

##The Problem
As you saw from my last article, I started a new podcast called AI With Alex on Spotify and YouTube. The show is basically about me discussing with various of guest about all things AI.

It was fun having conversations with AI experts about pretty much my favorite part of the whole thing.

Then… there was the editing part.

Even though I was using Riverside's editor (which made my editing time cut in half), I still spent hours on editing one episode. Then, I won't have time to even code.

Even if I had time, I would lose motivation to do pretty much anything after editing.

I want to write articles, but I just don't have the motivation and/or time.

##The Solution…?
I decided to officially take a break from writing.

I normally code and write articles, but adding a whole weekly podcast to the mix is not feasible for me.

On **_May 20, 2024_**, I will start posting articles more frequently (hopefully).

##Conclusion
To sum things up, I need a break. I will hopefully gain more time in the future. I will probably write about what I normally write about - AI, coding, tech news, etc.

Thanks for reading this article, I appreciate it.
Bookmakers and the corrupt Natalia Malyarchuk are not afraid of either the law or the President. German
Tags: german
Published: 2024-04-29 19:39:59

It is no secret that throughout the world the gambling business is in the zone of interests of organized crime. The world-famous US city of Las Vegas was built with mafia funding. But the more civilized the state, the stronger the control it exercises in the gambling business. It cannot be otherwise, as this directly affects national security.

Gambling addiction has swept across Kazakhstan: the authorities are sounding the alarm, recognizing gambling addiction as one of the main social problems, along with drug addiction and violence. 440 thousand people are in the abyss of excitement: they are losing their entire fortune, committing all kinds of crimes, taking their own lives. These people are in dire need of treatment. 40% of divorces occur due to gambling addiction of one of the spouses. It is not surprising that the President of Kazakhstan, Kasym-Jomart Tokayev, calls on the country’s Parliament to limit by law the influence of bookmakers in the involvement of the population in gambling (including a ban on gambling advertising).

Let's be honest, the Public Council under the Mazhilis is currently an expert structure that is bribed by the bookmaker mafia, that is, they directly promote and protect the interests of the gambling business tycoons and receive a lot of money from them for this. The main lobbyists for the interests of the gambling business are Marat Shibutov and Natalia Malyarchuk, who oppose the presidential initiative. Moreover, Natalya Malyarchuk, who was recently caught receiving money for her services from the PayDala payment system, the beneficiaries of which are members of the family of ex-President Nazarbayev, clearly heads a group of lobbyists for the interests of the gambling business.

Who is in charge in the country: the current president or his predecessor? The portal “Kompromat of Kazakhstan” talks about the confrontation between good and evil, common sense and the gambling business. Passions are heating up, the confrontation is intensifying, but the question remains: why don’t the authorities use all levers (including force) to moderate the ardor of bookmakers?
Apk does not establish connection with Back-end
Tags: reactnative, expo, backend, mobile
Published: 2024-04-29 19:27:29

I have a mobile application developed in react native with expo, I already have the back-end and the database uploaded to a VPS server which works perfectly when I try it from expo go, however when generating the apk with .eas my application doesn't establishes connection with the back-end
Active Liveness Detection vs Passive Liveness Detection
Tags: programming, machinelearning, datascience, computerscience
Published: 2024-04-29 19:17:01

In a world increasingly reliant on digital verification, the concept of active liveness detection vs passive liveness detection emerges as an important security safeguard.

Consider the convenience of unlocking your phone with a quick glance or accessing sensitive data with a single touch. But what if someone could simply fool these systems with a static image or a duplicate of your fingerprint?

This is where liveness detection comes in, providing an important precaution against fake attempts.

Read full article here.
https://faceplugin.com/active-liveness-detection-vs-passive-liveness-detection-faceplugin/
Learn Android Basics with Compose & Kotlin!
Tags: android, androiddev, kotlin, mobile
Published: 2024-04-29 19:14:35

Calling all aspiring Android app developers! Do you have groundbreaking app ideas but lack the coding experience to bring them to life? Worry no more! This series, “Android Basics with Compose & Kotlin,” is your roadmap to building those dream apps, brick by brick.

We’ll be taking inspiration from the fantastic “Android Basics with Compose” course offered by Google Developers. However, we’ll be tailoring it for an even smoother learning experience, especially for those who are entirely new to coding.

For more check out our Article on medium

https://medium.com/p/a396b5457f48
How “If __name__ == ‘__main__' ’” Works?
Tags: python
Published: 2024-04-29 18:48:20

<b>Solving the mystery of If \_\_name\_\_ == '\_\_main\_\_'.</b>


Let's assume you have a python script <mark>first.py</mark>

```Python
# first.py

print('Hola from first.py')

if __name__ == '__main__':
    print('Hola first module __name__:' __name__')

# output
# Hola from first.py
# Hola first module __name__: __main__
```

If we run <mark>first.py</mark> using the command Python 
<mark>python first.py</mark>, the \_\_name\_\_ variable for <mark>first.py </mark> will automatically become \_\_main\_\_.

```Python
# second.py

print('Hola from second.py')

if __name__ == '__main__':
    print('Hola second module __name__:' __name__')

# output
# Hola from second.py
# Hola second module __name__: __main__
```

Similarly, if we run <mark>second.py</mark> using the command <mark>python second.py</mark>, the \_\_name\_\_ variable for <mark>second.py</mark>  will automatically become \_\_main\_\_

**What if we have 2.py files**

```Python
#second.py

def hola_second():
    print('hola_second__name__:',__name__)
```

```Python
# first.py

from second import hola_second
hola_second()

def hola_first():
    print('hola_first__name__:',__name__)

# python first.py
# hola_second__name__: second
# hola_first__name__: __main__
```
And in <mark>first.py</mark>, we import a function from <mark>second.py</mark>. And in this function in second.py, we print \_\_name\_\_. And we run <mark>first.py</mark> directly using python <mark>first.py</mark> (note that <mark>second.py</mark> is not run directly)
Since we run first.py directly, only \_\_name\_\_ in first.py will be '\_\_main\_\_'. The \_\_name\_\_ imported from second.py will be 'second' instead of '\_\_main\_\_'.

**Now what does adding if \_\_name__ == ‘\_\_main\_\_’ do**

```Python
# second.py

def hola_second():
  print('from second.py:', __name__)

if __name__ == '__main__':
  print('I am second')
```

```Python

# first.py

from second import hola_second
hola_second() 

```
Notice that <mark>I am second</mark> is no longer printed.
And this is because of the if <mark>\_\_name\_\_ == '\_\_main\_\_'</mark> statement we’ve put in <mark>second.py</mark>. Whatever is inside this if block will only run if we run the Python script directly.

In this case, print('I am second') will only run if we run <mark>second.py</mark> directly, meaning that we use the command python <mark>second.py</mark>.

**Conclusion**
if <mark>\_\_name\_\_ == ‘\_\_main\_\_’</mark> is used as conditional statement to  allow only run code that we want to run.

**Some Final Words**
_If this blog was helpful and you wish to show a little support, you could:_

_1. :thumbsup: 300 times for this story_
_2. Follow me on LinkedIn: https://www.linkedin.com/in/raju-n-203b2115/_


_These actions really really really help me out, and are much appreciated!_
How I Learned Spanish through Reading Articles with English Tooltip
Published: 2024-04-29 18:39:15

This is my first post, and I want to share with you folks my journey on how I learned Spanish.

I know that learning a new language can be a daunting task, but it's also incredibly rewarding. For me, embarking on the journey to learn Spanish was both exciting and challenging. I wanted to share my experience of how I approached language learning in a unique and effective way: by reading articles with English tooltip translations.

When I decided to learn Spanish, I knew that immersion was key to mastering the language. However, I also needed a method that would provide support and guidance. That's when I stumbled upon the idea of using articles with tooltip translations.

The concept was simple yet practical for me. I would read articles written in Spanish, and whenever I encountered a word or phrase that I didn't understand, I could hover over it to instantly see the English translation. This real-time translation feature was like having a personal language tutor at my fingertips.

This approach offered several advantages. Firstly, it allowed me to immerse myself in authentic Spanish content, ranging from news articles to transcripts, without feeling overwhelmed by the language barrier. Secondly, the instant translation feature provided context and clarity, helping me grasp the meaning of unfamiliar words and sentences in their proper context. Lastly, the interactive nature of the tool made learning fun and engaging, motivating me to read more and expand my vocabulary.

Armed with this newfound approach, I delved into the world of Spanish literature, starting with short articles and gradually progressing to more complex texts. With each article I read, I gained confidence in my ability to understand and communicate in Spanish. I also noticed a significant improvement in my reading comprehension skills and vocabulary retention.

Over time, I found myself consuming Spanish content not just out of necessity but out of genuine interest. I discovered a wealth of fascinating articles, stories, and insights that I wouldn't have been able to access otherwise. From current affairs to cultural anecdotes, each piece of content enriched my understanding of the Spanish language and its nuances.

Today, I can proudly say that I've achieved a level of fluency in Spanish that I once thought was beyond my reach. Thanks to this approach, I've unlocked a new world of possibilities and opportunities. Whether it's traveling to Spanish-speaking countries, connecting with native speakers, or pursuing career prospects, knowing Spanish has opened doors that I never imagined possible.

So Here's my personal journey, and if you're in need of assistance, feel free to check out my service on Fiverr at https://www.fiverr.com/s/rYem90
Recreating a GIF with CSS: Earth Day Edition
Tags: devchallenge, frontendchallenge, css, javascript
Published: 2024-04-29 18:34:15

_This is a submission for [Frontend Challenge v24.04.17](https://dev.to/devteam/join-us-for-the-next-frontend-challenge-earth-day-edition-52e4), Glam Up My Markup: Earth Day Celebration Landing Page_

Mainly I am not a participant of this Challenge, just did it for fun. The Credit for initial effort goes to @arndom 

## **Inspiration**
When I saw the challenge I wanted to participate to improve my skills, and when I saw the GIF in the announcement post I knew what to attempt. I haven't done any "complex" animations with CSS alone, so this was the right time to try.


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

## What I Built
Keeping in mind The above GIF, I created an animation of EARTH as in the GIF You can see the demo below

## Demo
{% codepen https://codepen.io/BhalliBhai/pen/ZEZZqqd %}
> It's doesn't loop, so click rerun↗️ to replay

## Journey
Upon reading the announcement and seeing the GIF, I got the idea of an animation like this. I had to attempt a CSS recreation. It was unique, outside my comfort zone, and something worth doing and sharing.

Working on it was both challenging and inspiring.
Happy coding :)
Request Safe to get data from request safely in Laravel
Tags: laravel
Published: 2024-04-29 18:30:54

Sometimes we need specific attributes only from requests or exclude some attributes from requests...

**▶ Here's the solution:**

➡️ To get all data validated, we call:

> $request->validated()

👉 To get only specific data (validated), you can use:

```php
$request->safe()->only(['name', 'email']);
```

👉 To get data excluding specific data (validated), you can use:
```php
$request->safe()->except(['name', 'email']);
```

Keep in your mind there is major different between ( `$request->only()` & `$request->except()` ) and `($request()->safe()->only()` & `$request->safe()->except()` ) 

Request safe return inputs data after validation, on the other hand, `request->except()` will retrieve any data sent from the input if it isn't inside the validation.

So make sure you take all data validated to prevent your model from infected mass assignment.

That's all, Happy coding 🥳
Fixed XOR
Tags: 100daystooffload, cryptopals, challenge, beginners
Published: 2024-04-29 18:21:44

This is the second crypto challenge in set 1 from [cryptopals](cryptopals.com), which is the qualifying set. 

The difficulty level is relatively easy, to solve this problem I have used the programming language Go.

# Problem description

Write a function that takes two equal-length buffers and produces their XOR combination.

The input string is,

`1c0111001f010100061a024b53535009181c`

and should be XOR'd (after hex decoding) against,

`686974207468652062756c6c277320657965`

which then should produce the following result,

`746865206b696420646f6e277420706c6179`

# Solution

We can reuse ideas from the previous [challenge](https://dev.to/stefanalfbo/convert-hex-to-base64-5gbe) when working with the hexadecimal strings.

```golang
	input1 := "1c0111001f010100061a024b53535009181c"
	buffer1, err := hex.DecodeString(input1)
	if err != nil {
		fmt.Println("Error decoding input 1:", err)
		return
	}

	input2 := "686974207468652062756c6c277320657965"
	buffer2, err := hex.DecodeString(input2)
	if err != nil {
		fmt.Println("Error decoding input 2:", err)
		return
	}
```

The Go programming language has a XOR [arithmetic operator](https://tip.golang.org/doc/go1.17_spec#Arithmetic_operators), `^`, that should work great in this case. The bitwise logical and shift operators apply to integers only which will work nicely with our byte buffers created above.

To do this we will create a function where we can loop through our buffers and xor them together.

```golang
func xor(buffer1, buffer2 []byte) ([]byte, error) {
	if len(buffer1) != len(buffer2) {
		return nil, fmt.Errorf("buffers must have equal length")
	}

	result := make([]byte, len(buffer1))
	for i := 0; i < len(buffer1); i++ {
		result[i] = buffer1[i] ^ buffer2[i]
	}

	return result, nil
}
```

Now we only need to print the output and see if the result equals the expected value. This is how we could put all the pieces together.

```golang
package main

import (
	"encoding/hex"
	"fmt"
)

func xor(buffer1, buffer2 []byte) ([]byte, error) {
	if len(buffer1) != len(buffer2) {
		return nil, fmt.Errorf("buffers must have equal length")
	}

	result := make([]byte, len(buffer1))
	for i := 0; i < len(buffer1); i++ {
		result[i] = buffer1[i] ^ buffer2[i]
	}

	return result, nil
}

func main() {
	input1 := "1c0111001f010100061a024b53535009181c"
	buffer1, err := hex.DecodeString(input1)
	if err != nil {
		fmt.Println("Error decoding input 1:", err)
		return
	}

	input2 := "686974207468652062756c6c277320657965"
	buffer2, err := hex.DecodeString(input2)
	if err != nil {
		fmt.Println("Error decoding input 2:", err)
		return
	}

	result, err := xor(buffer1, buffer2)
	if err != nil {
		fmt.Println("Error:", err)
		return
	}

	fmt.Printf("%x\n", result)
}
```

# Conclusion

This is all about knowing what tools your programming languages has to offer, and in this case all we needed was a `for` loop and the bitwise XOR operator, `^`.

 
# References

* [Set 1 - Challenge 2](https://cryptopals.com/sets/1/challenges/2)
* [Arithmetic operators](https://tip.golang.org/doc/go1.17_spec#Arithmetic_operators)
How to start work with HTML and CSS experience on hand??
Tags: html, css, beginners, learning
Published: 2024-04-29 18:20:34

I have learned HTML and CSS recently, and I have been practicing them for a month now. I want to earn some money working with someone and continue learning JavaScript and all the other languages. I want to become a full-stakes developer and develop my own team in the future so I can deal with larger projects, but for now, I want to earn some money with my HTML and CSS experience.
Demystifying JWT Tokens: Everything You Need to Know
Tags: java
Published: 2024-04-29 18:02:36

Hey Dev.to community! Today, I dove into the intricacies of JWT (JSON Web Tokens) and wanted to share my learnings with you all:

Introduction to JWT: Explored the basics of JWT tokens, understanding their purpose in authentication and authorization workflows, and their advantages over traditional session-based authentication.
Anatomy of JWT Tokens: Discussed the structure of JWT tokens, including their header, payload, and signature. Explored how each component contributes to the security and integrity of the token.
Practical Implementation: Explored how JWT tokens are generated, validated, and used in real-world scenarios, such as implementing stateless authentication in web applications and securing APIs.
Overall, my journey into JWT tokens has equipped me with valuable insights into modern authentication mechanisms and their applications in building secure and scalable systems. Excited to implement JWT authentication in my projects! #JWT #Authentication #LearningJourney