teleren/devto huggingface dataset:
CRPTOCURRENCY RECOVERY EXPEET: GRAYWARE TECH SERVICES
Published: 2024-05-18 18:52:56

Scams and fraudulent schemes lurk around every corner, ready to ensnare unsuspecting victims. I found myself entangled in such a web of deceit a few months ago, losing a staggering $123,000 worth of Bitcoins to a nefarious crypto investment scam. Despite my efforts to seek justice through legal channels, my hopes dimmed until a friend pointed me toward Grayware Tech Services. My interaction with Grayware Tech Services marked a turning point in my ordeal. Their team of recovery specialists exhibited an unparalleled level of professionalism and empathy as they delved into the intricacies of my case. Armed with all the pertinent information I could provide, they embarked on a mission to reclaim what was rightfully mine from the clutches of fraudsters. In a remarkable display of efficiency and expertise, Grayware Tech Services managed to achieve what seemed like the impossible: the restoration of my lost assets. Within a mere two days, they orchestrated the retrieval of my Bitcoins, guiding me through the process of refreshing my wallet and witnessing the miraculous return of my once-lost funds. What sets Grayware Tech Services apart is not only its ability to deliver tangible results but also its unwavering commitment to client satisfaction. Throughout the recovery process, they maintained open lines of communication, providing regular updates on their progress and addressing any concerns I had with clarity and patience. Their dedication to ensuring a positive outcome surpassed my expectations and set them apart as a resolute partner in cryptocurrency recovery. Grayware Tech Services transparency and integrity shine brightly amidst an industry rife with uncertainty. Unlike other recovery services, they operate with a level of honesty and professionalism that inspires trust and confidence in their abilities. Their genuine concern for their client’s well-being and determination to right the wrongs perpetrated by cybercriminals make them a standout player in the field of cryptocurrency recovery. Grayware Tech Services exceptional services transcend mere recovery efforts, offering clients a lifeline in times of distress and uncertainty. Their unmatched expertise, unwavering dedication, and commitment to integrity make them a formidable force in the fight against cryptocurrency scams.

Emil: contact@graywaretechservices.com

WEBSITE: https://graywaretechservices.com

Whatsapp: +16022977244
Nodejs axios certificate error
Tags: webdev, ssl, javascript, node
Published: 2024-05-18 17:54:13

TLDR - Solution for axios certificate error if you are using node 8.10.0 or an older node version.

I ran into a certificate error/CERT_HAS_EXPIRED error when running a simple axios get request in nodejs (calling pexels api).
Surprisingly I checked with a CURL call and the request went through fine.

_Tip - For debugging api/network calls using [curl](https://www.geeksforgeeks.org/curl-command-in-linux-with-examples/) from the linux instance is very helpful_

**The Problem**
I happened to be using an archaic node version 8.10.0 on that particular software stack. 
Apparently some certificate in letsencrypt expired and that has led to this error when calling axios using node 8.10.0 versions.

Here is the link to the stackoverflow thread that helped me solve it - https://stackoverflow.com/questions/69414479/giving-axios-letsencrypts-new-root-certificate-on-old-version-of-node

**Diagnosis**
I had assumed there was an issue with the endpoint of the api, but the api owners confirmed there wasn't an error.
When I cleaned the npm cache sometimes the error went away.
The curl call from the same instance helped me isolate the issue to something on the instance.

**Solution**
Create a https agent with the SSL certificate and use it with the axios request.
I found the solution in the [stack overflow link](https://stackoverflow.com/questions/69414479/giving-axios-letsencrypts-new-root-certificate-on-old-version-of-node). 
The link has the code snippet.

**Explanation for the error**
With the letsencrypt certificate expiring, the openssl library bundled with the older nodejs installation was failing. 

Hope this helps someone.

Cover photo credits - Photo by Vie Studio from Pexels: https://www.pexels.com/photo/word-error-on-white-surface-4439425/
Steping-Up as a junior Dev
Tags: careerdevelopment, beginners, programming
Published: 2024-05-18 17:34:18

_Context: I worked as a team lead. I had technical and also disciplinary responsibility._

How do you get that next level in your career, how do you loose that "junior" title? And I **don't** mean how to get the next pay raise. 

In my own experience as a developer, and with junior devs in my team, its pretty easy as soon as you understand what to focus on.

To get to that next level, your learning target changes. At the beginning of your career your learning targets are all technical things. First you need to learn a programming language, control structures, what variables are and so on. All that basic stuff you need to get the job done at all. This is actually pretty easy and fast.

What now? You are working in a team, you get your tasks done. Hopefully your code gets reviewed and you learn from that. Also hopefully you can review the code of others and learn from that. what would you learn next? Maybe to gain more knowledge about your persistence framework or the database. Maybe it would be good to get some more details about the programming language or its base framework. Or what about that REST or SOAP or Protobuf? 

One step back. What was the last feature you implemented? Did you fully understood what you did and especially why you did it? What benefit did it bring? What users will gain benefit from it? Was there an alternative? And if so, why wasn't it chosen? 

Short: Learn to first fully understand what the feature at hand is for. Ask, ask, ask. Don't start work until you fully understand what value this feature brings and to whom. As soon as you know that, you can try to add even more value with making suggestions on how to improve that feature or try cut costs by discussing why this feature is implemented in the first place. If you reach that point and your code is on a decent level, your days as a junior are over.
My notes on Cyclic Shift hash codes in Kotlin
Tags: computerscience, kotlin, tristan
Published: 2024-05-18 17:16:00

### Table of contents
1. [Resources](#resources)
2. [TLDR](#prob)
3. [The problem I am trying to solve](#solve)
4. [Cyclic-shift hash code](#hash)
5. [Cant we just use the built in hashCode() function](#cant)

### My app on the Google play store
- [The app](https://play.google.com/store/apps/details?id=elliott.software.clicker)

### Resources <a name="resources"></a>
- `Chapter 10 of Data Structures and Algorithms in Java by Michael T. Goodrich and Roberto Tamassia`

### TLDR(too long didn't read) <a name="prob"></a>
- This function will create a reliable hash code for strings:
```kotlin
class SortedEmoteMap {

    fun hashCodeCyclicShift(s:String):Int{
        var h = 0
        for (i in s.indices) {
            h = (h shl 5) or (h ushr 27) // 5-bit cyclic shift of the running sum
            h += s[i].code // add in next character
        }
        return h
    }
}

```


### The problem I am trying to solve <a name="solve"></a>
- So recently I have ran into a problem where I need to keep track of the top 7 most recent emotes used by my user. I think the best solution is to create a custom map data structure. Particularly a sorted map data structure but that will be for another blog post.

### What is a hash code and why are we creating one ?
- A hash code is one part of a map's hash function. The goal of a hash code is to map a key(in my case a string representing an Emote's name) to an integer. Which is known as the `hash code`

### Cyclic-shift hash code <a name="hash"></a>
- technically speaking a `Cyclic-shift ` is just a variant of a [polynomial hash code](https://www.csl.mtu.edu/cs2321/www/newLectures/16_Hash_Table.html#:~:text=Cyclic%20shift%20hash%20codes%3A,Again%20mixes%20the%20components.) but it just replaces all the mathematics with direct bit manipulation. The actual method of this hash code looks like this, 
```kotlin
fun hashCodeCyclicShift(s:String):Int{
        var h = 0
        for (i in s.indices) {
            h = (h shl 5) or (h ushr 27) // 5-bit cyclic shift of the running sum
            h += s[i].code // add in next character
        }
        return h
    }

```
- So long story short we use the signed and unsigned bitwise operators, combined with the bitwise `or` operator to give us a consistent distribution of bits. If you are wondering why the numbers `5` and `27`. It is to achieve an effective cyclic shift for a 32-bit integer. This ensures that every bit in the 32-bit integer is shifted exactly once.


### Cant we just use the built in hashCode() function? <a name="cant"></a>
- Yes you 1000% could.... but then you wouldn't get to learn about bit shifts!!!!


### Conclusion 
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on [Twitter](https://twitter.com/AndroidTristan).
979. Distribute Coins in Binary Tree
Tags: php, leetcode, algorithms, programming
Published: 2024-05-18 17:05:27

979\. Distribute Coins in Binary Tree

Medium

You are given the `root` of a binary tree with `n` nodes where each `node` in the tree has `node.val` coins. There are `n` coins in total throughout the whole tree.

In one move, we may choose two adjacent nodes and move one coin from one node to another. A move may be from parent to child, or from child to parent.

Return _the **minimum** number of moves required to make every node have **exactly** one coin._

**Example 1:**

![tree1](https://assets.leetcode.com/uploads/2019/01/18/tree1.png)

- **Input:** root = [3,0,0]
- **Output:** 2
- **Explanation:** From the root of the tree, we move one coin to its left child, and one coin to its right child.

**Example 2:**

![tree2](https://assets.leetcode.com/uploads/2019/01/18/tree2.png)

- **Input:** oot = [0,3,0]
- **Output:** 3
- **Explanation:** From the left child of the root, we move two coins to the root `[taking two moves]`. Then, we move one coin from the root of the tree to the right child.

**Constraints:**

- The number of nodes in the tree is `n`.
- `1 <= n <= 100`
- `0 <= Node.val <= n`
- The sum of all `Node.val` is `n`.


**Solution:**

```
/**
 * Definition for a binary tree node.
 * class TreeNode {
 *     public $val = null;
 *     public $left = null;
 *     public $right = null;
 *     function __construct($val = 0, $left = null, $right = null) {
 *         $this->val = $val;
 *         $this->left = $left;
 *         $this->right = $right;
 *     }
 * }
 */
class Solution {

    /**
     * @param TreeNode $root
     * @return Integer
     */
    function distributeCoins($root) {
        $totalMoves = 0;
        $dfs = function($node) use (&$dfs, &$totalMoves) {
            if (!$node) {
                return 0;
            }
            $leftMoves = $dfs($node->left);
            $rightMoves = $dfs($node->right);
            $totalMoves += abs($leftMoves) + abs($rightMoves);            
            return $leftMoves + $rightMoves + $node->val - 1;
        };
        $dfs($root);
        return $totalMoves;
    }
}
```

**Contact Links**

- **[LinkedIn](https://www.linkedin.com/in/arifulhaque/)**
- **[GitHub](https://github.com/mah-shamim)**
Discover the Thrill of Motorcycle Racing with Traffic Rider Mod APK
Published: 2024-05-18 17:04:32


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

Hey everyone,

Are you a fan of adrenaline-pumping [motorcycle racing games](https://trafficriderapk.app/)? If so, you've got to check out Traffic Rider Mod APK. This modded version of the popular Traffic Rider game offers a whole new level of excitement and enjoyment. Here's why you should give it a try:

Unlimited Access: With Traffic Rider Mod APK, you'll have access to all bikes and unlimited money right from the start. Say goodbye to grinding for hours to unlock your favorite rides!

Enhanced Gameplay: The modded version often comes with improved gameplay mechanics, smoother performance, and additional features that enhance the overall gaming experience.

Immersive Graphics and Sound: Get ready to be blown away by the stunning graphics and realistic sound effects. From the roar of the engines to the rush of wind as you speed through traffic, every detail is designed to immerse you in the thrill of the race.

Challenging Missions: Test your skills with a variety of challenging missions and tracks. Whether you're weaving through city streets or tearing up the highway, there's always a new challenge waiting for you.

Community and Competition: Join the vibrant community of Traffic Rider players and compete with friends and fellow gamers to see who can achieve the highest scores and complete the most missions.

Ready to experience the excitement of motorcycle racing like never before? Download Traffic Rider Mod APK today and hit the road for an unforgettable ride!
ytfsdhkjhskjdhfksfd
Tags: webdev, javascript, github, beginners
Published: 2024-05-18 17:04:24

https://github.com/DevSamurai/discussions/discussions/2048
https://github.com/DevSamurai/discussions/discussions/2057
https://github.com/DevSamurai/discussions/discussions/2063
https://github.com/DevSamurai/discussions/discussions/2070
https://github.com/DevSamurai/discussions/discussions/2074
https://github.com/orgs/micropython/discussions/14529
https://github.com/orgs/micropython/discussions/14531
https://github.com/orgs/micropython/discussions/14532
https://forum.mush.com.br/topic/217211/https-github-com-devsamurai-discussions-discussions-2048
https://forum.mush.com.br/topic/217212/https-github-com-devsamurai-discussions-discussions-2057
https://forum.mush.com.br/topic/217213/https-github-com-devsamurai-discussions-discussions-2063
https://forum.mush.com.br/topic/217214/https-github-com-devsamurai-discussions-discussions-2070
https://forum.mush.com.br/topic/217216/https-github-com-devsamurai-discussions-discussions-2074
https://forum.mush.com.br/topic/217219/https-github-com-orgs-micropython-discussions-14529
https://forum.mush.com.br/topic/217221/https-github-com-orgs-micropython-discussions-14531
https://forum.mush.com.br/topic/217224/https-github-com-orgs-micropython-discussions-14532
https://community.soundcore.com/t/https-github-com-devsamurai-discussions-discussions-2048/9547827
https://kbin.social/m/infosec/t/1038569/https-github-com-DevSamurai-discussions-discussions-2048a
https://kbin.social/m/infosec/t/1038570/https-github-com-DevSamurai-discussions-discussions-2057
https://kbin.social/m/infosec/t/1038571/https-github-com-DevSamurai-discussions-discussions-2063
https://kbin.social/m/infosec/t/1038572/https-github-com-DevSamurai-discussions-discussions-2070
https://kbin.social/m/infosec/t/1038575/https-github-com-DevSamurai-discussions-discussions-2074
https://kbin.social/m/infosec/t/1038577/https-github-com-orgs-micropython-discussions-14529
https://kbin.social/m/infosec/t/1038578/https-github-com-orgs-micropython-discussions-14531
https://kbin.social/m/infosec/t/1038579/https-github-com-orgs-micropython-discussions-14532
https://www.lesswrong.com/posts/8Rjp9j7yeJn5aqy5o/ytyuftsfgskjdfshkfhjsfsdf
Audio play with buffer in React Native
Tags: reactnative, websocket, stream, twilio
Published: 2024-05-18 16:56:15

Good weekend, community!
I want to play audio in react native with raw audio buffer(base64 encoded). But I couldn't find any proper modules yet.
I tried with react-native-sound, @react-native-community/audio-toolkit... 

Please give me help on this.
Thanks!
Learning AWS Day by Day - Day 68 - Amazon Kinesis Data Firehose
Tags: aws, cloud, cloudcomputing, beginners
Published: 2024-05-18 16:53:25

Exploring AWS !!

Day 68

Amazon Kinesis Data Firehose

- Managed AWS service for delivering real-time streaming data.
- Delivery destinations include S3, Amazon Redshift, Amazon OpenSearch Service, Amazon OpenSearch Serverless, Splunk, and any custom HTTP endpoint.
- No need to write or manage applications, just need to configure data producers to send data using Firehose and your data will be delivered to the desired destination.
- You can also configure it to transform your data before delivering it.

Terms:
- Firehose stream: underlying entity of Data Firehose, Firehose stream needs to be created and data is been sent to stream in order to create a Data Firehose.
- record: data of interest that is been sent to the stream, and can be up-to 1000 kb.
- data producer: producers send records to Data Firehose, like let's say any web server that sends log data to streams is a producer. 
- buffer size and buffer interval: Firehose buffers incoming data for a certain time or size before delivering to destinations.

Data Flow
If the destination is S3, the streaming data is delivered to S3 buckets, if data transformation is enabled, then you can backup source data to another bucket.

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

Data Security
Data protection is the main motive and highest priority of AWS. 
- Data Firehose encrypts data in transit using TLS.
- Data stored in interim storage during processing, Firehose encrypts data using KMS and verifies integrity using checksum. 
- In case of sensitive data, enable server-side encryption
Avoid intermediate arrays (parsing strings) to make you Javascript fast
Tags: javascript, performance, webdev, ux
Published: 2024-05-18 16:42:30

In the previous post there was argued why we should [avoid intermediate arrays](https://dev.to/alexander-nenashev/avoid-intermediate-arrays-in-js-5bkg) for performance in cases like filter/map chains.

I'd say `String#split()` is heavily overused when parsing strings. A common scenario is to get the first word in a string. The first thought is to split a string into words and get the first one. Again, an intermediate array is created, worse, only the first element is used, the rest is just waste of space and time. Use `String#indexOf()` and `String#slice()` instead:
```js
let $length = 1;
const str = Array.from({length: $length + 1}, () => 'test').join(' ');

// @benchmark Array#split
str.split(' ')[0];

// @benchmark String#indexOf
str.slice(0, str.indexOf(' '));

// @benchmark regex
str.match(/^\S+/)[0];

` Chrome/125
-----------------------------------------------------------------------------------------------
>                       n=1        |       n=10        |       n=100       |       n=1000      
String#indexOf   ■ 1.00x x100m 972 | ■ 1.00x x100m 959 | ■ 1.00x  x10m  94 |  ■ 1.00x x100m 967
regex              2.99x  x10m 291 |   3.06x  x10m 293 |   3.07x  x10m 289 |    2.96x  x10m 286
Array#split        6.49x  x10m 631 |  22.52x   x1m 216 | 165.96x x100k 156 | 1509.82x  x10k 146
----------------------------------------------------------------------------------------------- `
` Firefox/126
------------------------------------------------------------------------------------------------
>                       n=1        |       n=10        |       n=100       |       n=1000       
String#indexOf   ■ 1.00x x100m 105 | ■ 1.00x x100m 120 | ■ 1.00x x100m 108 |   ■ 1.00x x100m 109
regex             35.90x  x10m 377 |  27.83x  x10m 334 |  33.15x  x10m 358 |    32.11x  x10m 350
Array#split       39.05x  x10m 410 | 105.00x   x1m 126 | 944.44x x100k 102 | 10000.00x  x10k 109
------------------------------------------------------------------------------------------------ `
```
[Open in the playground](https://silentmantra.github.io/benchmark#H4sIAAAAAAAACm2Oyw6CMBBFf2WCJpRAeGwxGP0CFyytJlgGqEIx7SwwhH8XC3HFbiZzzr0zOqIv0UmdFgn2LaqaGsggOXAlemUIDOl5P2tdfMJK9x0bFyj90z4kUwDMg%2BwILqEh1wufvVTMBdebc7iKIjg9UImmK%2FRrydqZdyuJzw06tKOlr%2FFtQ8hJS1XvpCpxuFSr00qBLA5%2B%2F4XrxUZsNWqscVi8riDRsOjOee5Hts%2BZvsWGsk8EAQAA)
Python Quiz Program: Building Blocks of My Portfolio
Tags: python, begginer, oop, cli
Published: 2024-05-18 16:35:00

I wanted to create a simple yet functional program to showcase the foundational skills I have acquired. This program, a quiz generator and taker, exemplifies my grasp of Python basics such as classes, file handling, and user input. The idea behind this project is to have an interactive way to create, save, and take quizzes, providing a practical demonstration of my programming abilities.


![Screenshot of quiz creator run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tw731v5zsdyzoh58qga7.png)


![Screenshot of quiz taker run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wmds4p8dptzs02pd5gwl.png)




The program revolves around two main classes: _User_ and _Question_. The User class stores the user's data, including their username, role (quiz creator or taker), and their quiz performance. The Question class defines each quiz question, supporting both multiple-choice and true/false formats. The program allows users to create and save quizzes, which are stored as JSON files for future use. Quiz takers can then load these questions and interactively answer them, with the program providing immediate feedback and tracking their performance.

Here's a breakdown of the key components:

- User Class: Initializes user data and tracks quiz performance.
- Question Class: Handles the creation of questions, including asking and evaluating responses. The multiple-choice options are shown in a random order each time.
- create_user(): Gathers user information and determines their role.
- create_questions(): Allows quiz creators to input and save questions.
- save_questions(): Saves created questions to a JSON file.
- use_saved_questions(): Loads questions from a JSON file for the quiz taker.
- main(): Integrates all functions, guiding the user through creating or taking a quiz based on their role.


This quiz program is a small yet significant step in my journey to mastering Python. By developing this project, I have reinforced my understanding of fundamental programming concepts and file handling in Python.

For those interested in exploring the code further or providing feedback, the full code is available on my GitHub repository: [GitHub - nice-try](https://github.com/GamezConZ/nice-try). Your suggestions and insights are highly appreciated as I continue to learn and grow as a developer.
How to Generate Link Previews in React and Nodejs?
Tags: webdev, tutorial, javascript, programming
Published: 2024-05-18 16:30:12

The quick spread of ideas, data, and other stuff throughout the internet is made possible by the availability of [URL link-sharing](https://www.codegirl0101.dev/2024/05/the-availability-of-link-sharing-online.html) systems. 

However the increase in link sharing has led to the development of harmful hyperlinks that encourage hacking attempts, spread malware, and steal data. 

Users are frequently tricked into clicking on phony links that try to access their account information. Tech businesses are using link preview services, which let users evaluate shared links before clicking on them, to combat this rising risk.

Read the full blog post here:

https://www.codegirl0101.dev/2024/05/the-availability-of-link-sharing-online.html