teleren/devto huggingface dataset:
CHALLENGE!!
Tags: webdev, java, springboot, microservices
Published: 2023-09-24 20:20:02

Hello Everyone,

I'm Bhabani Sankar, a senior software developer at Infosys, with over 3.5 years of experience in Java Spring Boot and Microservices. In addition to my full-time role, I also freelance and have a small startup idea in the works.

I'm excited to announce a personal challenge I've set for myself: I believe I can complete any assignment with a 2-day SLA in just 6 hours. It's a bold claim, I know! So, I'm reaching out to anyone who'd like to put me to the test. If you have a task, project, or assignment that you think would typically take 2 days, I'm willing to take it on and complete it within the next 6 hours.

Here's how it works: If you accept my challenge and I can't deliver within the promised 6 hours, I'll compensate you with a mutually agreed-upon amount. However, if I succeed, I'll charge you for the work and ensure you receive a top-notch deliverable.

This challenge is open to everyone—employees, small startups, and fellow Java professionals. If you're interested in putting me to the test, simply ping me or comment "Challenge accepted" on this post, and I'll reach out to you.

I'm looking forward to your quick response, and together, we can make this statement even better!

Let's embrace the challenge and achieve great results together.Hello Everyone,

I'm Bhabani Sankar, a senior software developer at Infosys, with over 3.5 years of experience in Java Spring Boot and Microservices. In addition to my full-time role, I also freelance and have a small startup idea in the works.

I'm excited to announce a personal challenge I've set for myself: I believe I can complete any assignment with a 2-day SLA in just 6 hours. It's a bold claim, I know! So, I'm reaching out to anyone who'd like to put me to the test. If you have a task, project, or assignment that you think would typically take 2 days, I'm willing to take it on and complete it within the next 6 hours.

Here's how it works: If you accept my challenge and I can't deliver within the promised 6 hours, I'll compensate you with a mutually agreed-upon amount. However, if I succeed, I'll charge you for the work and ensure you receive a top-notch deliverable.

This challenge is open to everyone—employees, small startups, and fellow Java professionals. If you're interested in putting me to the test, simply ping me or comment "Challenge accepted" on this post, and I'll reach out to you.

I'm looking forward to your quick response, and together, we can make this statement even better!

Let's embrace the challenge and achieve great results together.
TypeScript Documentary: the Web evolved with types!
Tags: typescript, javascript, webdev, programming
Published: 2023-09-24 20:04:02

Hey Devs!

I watched the TypeScript Documentary (rating 8/10)

I'm here to share my thoughts.

TypeScript currently helps a lot of people.

VS Code, React, Angular, Vue, Google, Airbnb, Meta, Yarn, Vercel, Deno, ES Lint, Slack, GitHub, Microsoft and several other companies (yours probably), frameworks and dev tools uses TypeScript.

It's a necessary evolution for the Web - it would happen one time or another - Flow failed, Dart followed other paths, and AtScript merged with TypeScript.

TypeScript benefited the entire Web.

## Why TypeScript?

Simple:

**1) Adds static typing to JavaScript language** and increases programming security, as we can identify errors before running the code;

**2) Transpiles code** (Converts TypeScript code into compatible JavaScript. That is, it uses the latest features of ECMAScript, such as classes, arrow functions, async/await and modules, which are not available in older versions of JavaScript. TypeScript transpiles .ts code into JavaScript compatible with older versions, such as ES5, to work in browsers and environments that do not support the latest ECMAScript features);

**3) Integrates into MANY tools** and IDEs;

**4) Helps the TC39 working group** specify and define new standards for JavaScript;

**5) It is built collaboratively** under the open source community.

## What motivated?

Many Software Engineers needed to scale JavaScript, but a few years ago it was impractical to work efficiently with multiple people on a team using pure JavaScript.

They found the best solutions, leaving aside the Meta x Google x Microsoft competition.

In a healthy (and intelligent) way, Satya Nadella management embraced open source in MS's business model and supported the TypeScript working group, which today is an open source project that benefits the entire Web platform.

**Watch the TypeScript Docucmentary!**

_It's a class about the Web as a platform._

 *** Rating 8/10 because it only showed elite Devs, it failed to show the common Devs who help with the project.

## Video - TypeScript Documentary:

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

Link - TypeScript Website: https://www.typescriptlang.org/

I hope you enjoy it!
JavaScript Promises: The Scrolls of Asynchronous Magic
Tags: javascript, webdev, react, typescript
Published: 2023-09-24 19:45:05


Welcome back, young sorcerers! So far, we've explored the realms of variables, control structures, functions, objects, and arrays. Today, we venture into an area that even seasoned wizards often find daunting—Promises in JavaScript!

## **Introduction**

In the realm of programming, just like in any quest, sometimes you must wait for the right moment to strike. Promises offer a way to manage these waiting periods. Think of Promises as magic scrolls that contain the outcome of a future event.

## **Origin of Promises**

Promises have a storied past, emerging from the chaos that was "callback hell." Before Promises, mages and coders alike would nest magical spells (callbacks) within each other until their complexity spiraled out of control—aptly named "Pyramid of Doom." Promises came as a cleaner, more organized way to manage asynchronous tasks.

## **Crafting a Promise**

In the arcane language of JavaScript, crafting a Promise looks like this:

```jsx
javascriptCopy code
let magicalEvent = new Promise((resolve, reject) => {
  // Your magic code here
});

```

- **`resolve`**: What happens when the spell succeeds.
- **`reject`**: What happens if the spell fails.

## **Basic Examples**

### **Resolving a Promise**

```jsx
javascriptCopy code
let findTreasure = new Promise((resolve, reject) => {
  // After 3 seconds, we find a treasure
  setTimeout(() => {
    resolve('Treasure found!');
  }, 3000);
});

findTreasure.then(message => {
  console.log(message); // outputs: 'Treasure found!'
});

```

### **Rejecting a Promise**

```jsx
javascriptCopy code
let findTreasure = new Promise((resolve, reject) => {
  // After 3 seconds, the quest fails
  setTimeout(() => {
    reject('Quest failed!');
  }, 3000);
});

findTreasure.catch(reason => {
  console.log(reason); // outputs: 'Quest failed!'
});

```

## **Further Reading**

For those brave souls eager to venture deeper into the magical world of Promises, the **[MDN Documentation on Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** offers more advanced incantations and spells.

## **Sorcerer’s Assignments: Test Your Magic**

1. Create a Promise that simulates fetching data from a magical oracle. Make it resolve successfully.
2. Create another Promise but this time make it fail. Capture the failure using **`.catch()`**.
3. Combine your knowledge of functions and Promises to create an async spell (function) that utilizes Promises.

Remember, your previous journey with objects still holds value. Try creating a Promise around an object operation and share your incantations (code) in the comments below!

## **Conclusion**

Promises may seem complex at first, but they are invaluable scrolls in your JavaScript spellbook. Mastery over Promises can make your journey in both magical realms and real-world projects much smoother. So practice these spells and until next time, may your code run error-free!
Quick Guide to Mouse Clicking in C#
Tags: csharp, dotnet, automation, beginners
Published: 2023-09-24 19:41:17

## Clicking the mouse
Clicking mouse in Windows is done using "[Windows API](https://learn.microsoft.com/en-us/dotnet/framework/interop/)". We will require some methods from Microsoft Windows `user32.dll`. Also we need to remember that click is a two stage process: first you click the mouse button down, which generate one event, followed by releasing button (second event). Having said that, here's the steps:
1. Add `using System.Runtime.InteropServices;` to your `*.cs` file
2. Add two methods from `user32.dll` that we will be using:
    ```       
    [DllImport("user32.dll")]
    public static extern bool SetCursorPos(int X, int Y);
    [System.Runtime.InteropServices.DllImport("user32.dll")]
    public static extern void mouse_event(int dwFlags, int dx, int 
    dy, int cButtons, int dwExtraInfo);
    ```
3. `mouse_event`[(?)](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event) is method responsible for clicking, while `SetCursorPos` [(?)](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursorpos) sets mouse cursor where we want on the screen
4. We define human readable variables of earlier mentioned two events - LMB_Down and LMB_Up. Its not necessary as we can just provide hex numbers to the `mouse_event` function, as well.
    ```
   public const int LMBDown = 0x02;
   public const int LMBUp = 0x04;
   ```
5. Now we make a click at screen position x=128 and y=256
    ```
    SetCursorPos(128,256);
    mouse_event(LMBDown, 128, 256, 0, 0);
    mouse_event(LMBUp, 128, 256, 0, 0);
    ```

and thats it! 
Working example: https://gitlab.com/-/snippets/3602168

## Where's my cursor at?
As only few of us have superhuman ability of telling exact x,y  position of the cursor, we can use this piece of code (for example running in separate console app) to tell where the cursor is now at. We still have to use "WinAPI" function `GetCursorPos` [(?)](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcursorpos) which returns position result using `out` parameter modifier [(?)](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier) to a `struct` that we will have to create on our own as well.

Full code of getting the position of the cursor looks like this:
```
using System;
using System.Runtime.InteropServices;
class Program
{
    [DllImport("user32.dll")]
    public static extern bool GetCursorPos(out CursorPos lpPoint);
    public struct CursorPos { public int X; public int Y; }
    static void Main(string[] args)
    {
        CursorPos position;

        do
        {
            if (GetCursorPos(out position))
                Console.Write($"{position.X},{position.Y}\r");
        } while (!Console.KeyAvailable);
    }
}
```
[gitlab](https://gitlab.com/-/snippets/3602169)
The Kernel module in Ruby
Published: 2023-09-24 19:30:55

When hearing the word **Kernel** someone from system administration world like me may think it is referring to the famous Operating System kernel Linux. That is exactly what I though when I read about it for the first time. The fact is it is just a ruby convention, not directly related to the operating system kernel. Let’s see what it means in Ruby

As the word _‘kernel’_ , or Linux itself in an Operating System, refers to the central component of the operating system that provides core services and functionalities, the Kernel module in ruby can be seen as a core component that provides essential methods for Ruby Objects.

```ruby
class Movie; end
print Movie.ancestors
# Output
# [Movie, Object, Kernel, BasicObject]
```

As you can see in the example above the Kernel is part of the ancestor chain of the Movie class. Does that mean the Kernel is the super class of the Object class? No, the ancestor chain not only shows classes and super classes but also modules. In this case the Object class included the Kernel module and that’s why it is listed in the ancestor chain.

Methods defined in the Kernel module often provide low-level functionality, such as interacting with the operating system, handling exceptions, or perform common utility operations. print, puts, and gets are few of the common utility methods provided by the Kernel module.

Since the Kernel module is included in the Object class, all methods from the kernel module are accessible to all Ruby objects. This feature allows you to leverage **[Monkey Patching](https://wuletawwonte.com/2023/09/21/open-class/)**, where adding methods to the Kernel module automatically makes them available to all Ruby objects.

Here is an example of a Ruby library leveraging Monkey Patching the Kernel module. The [awesome\_print](https://github.com/awesome-print/awesome_print) gem prints Ruby objects on the screen with indentation, color and other variations.

```ruby
require "awesome_print"

my_object = {name: "Wuletaw Wonte", country: "Ethiopia"}
ap my_object

# Output
{
    name: "Wuletaw Wonte",
    country: "Ethiopia"
}
```

You can call _ap_ from anywhere because it is added to the Kernel module in the gems source code.

```ruby
# gems/awesome_print-1.1.0/lib/awesome_print/core_ext/kernel.rb
module Kernel
  def ap(object, options = {})
    # method code ...
  end
end
```

The post [The Kernel module in Ruby](https://wuletawwonte.com/2023/09/24/the-kernel-module-in-ruby/) appeared first on [Wuletaw Wonte](https://wuletawwonte.com).
How Chainlink VRF Works
Published: 2023-09-24 18:36:58

# Introduction

Chainlink VRF (Verified Random Function) was developed to provide a source of randomness that is resistant to manipulation. It is a provably fair and verifiable random number generator (RNG) that enables smart contracts to access random values without compromising security or usability.

The importance of using Chainlink VRF is to prevent bad randomness. Because random numbers generated from Chainlink VRF cannot be manipulated by nodes or attackers unlike generating random numbers from on-chain values like **block-hash** and **block-timestamp**. 

# How does Chainlink VRF Work

Chainlink VRF is a verifiable random function (VRF) that provides smart contracts with access to tamper-proof randomness. It works by using a combination of on-chain and off-chain components to generate and verify random numbers.


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

The process begins with a consumer contract requesting randomness from the VRF coordinator. The VRF coordinator then triggers an event that is picked up by the Chainlink VRF off-chain service.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zbp6yyhrxzpkwktnnv4.jpeg)

The off-chain service generates a random number using a combination of block data and its own private key. The private key is committed to on-chain by publishing the corresponding public key. This ensures that the randomness cannot be manipulated by the off-chain service.

The off-chain service then sends the random number and a cryptographic proof of its generation to the VRF coordinator. The VRF coordinator verifies the proof and, if valid, sends the random number to the consumer contract.

This process is self-auditing, meaning that it does not require external verification. The VRF coordinator verifies the random number proof, and the consumer contract can verify that the random number was generated by the VRF coordinator.

# Conclusion

Chainlink VRF is a powerful tool that is especially useful for applications that require a high degree of randomness, such as gaming, gambling, and lotteries. Chainlink VRF is also becoming popular in the web3 space. Chainlink VRF can be used to create blockchain applications that are resistant to front-running, bad randomness and other forms of manipulation.
The Best Way to Know What is React Js
Tags: webdev, javascript, programming, react
Published: 2023-09-24 18:31:16

in this post i'll give you The Best Way to Know What is React Js :
click here => [**The Best Way to Know What is React Js**](https://thebestcoding.com/the-best-way-to-know-what-is-react-2023/)
visit our Website => [**The Best Coding**](https://thebestcoding.com/)
Prediksi Angka HK 25 September 2023
Tags: javascript, programming, beginners, tutorial
Published: 2023-09-24 18:31:01

**[Prediksi HK 25 September 2023](https://pangkalanprediksi.info/)** - Syair Togel HK 25 September 2023, Bocoran angka hk terjitu hari ini, syair hongkong wajib keluar, semoga prediksi dan forum kode syair yang kami berikan bisa membantu anda untuk mendapat JP.

**Bocoran Syair HK 25/09/2023**, Hampir setiap hari, banyak sekali orang yang bermain togel hongkong dan mencari angka jitu dari berbagai sumber seperti, syair hk hari ini untuk di pasang.

Terutama untuk prediksi angka hk 4D, yang sampai saat ini paling di cari oleh para pemain togel mania di seluruh belahan dunia.

Namun, seperti yang kita tahu, bahwa setiap pasaran togel bersifat acak, tidak dengan mudah untuk kita menebak atau meramal prediksi hk.
student subject marks are lowest marks (C#)
Published: 2023-09-24 10:51:07

**Statement :-**
Given a list of N students, every student is marked for M subjects. Each student is denoted by an index value. Their teacher Ms. Margaret must ignore the marks of any 1 subject for every student. For this she decides to ignore the subject which has the lowest class average.
Your task is to help her find that subject, calculate the total marks of each student in all the other subjects and then finally return the array of the total marks scored by each student.

**Input Specification:**
input1:
An integer value N denoting number of students

**input2:**
An integer value M denoting number of subjects

**input3:**
A 2-D integer array of size N'M containing the marks of all students in each subject.

**Output Specification:**

Return an integer array of size N containing the total marks of each student after deducting the score for that one subject.

**Answer: **

```
static void Main(string[] args)
        {
            Program program = new Program();
            int totalStudent = 3;
            int totalSubject = 5;
            int[,] marks = {{75,76,65,87,87},
                            {78,76,68,56,89},
                            {67,87,78,77,65}};

            var totalValueArray = program.avgValue(totalStudent, totalSubject, marks);
            foreach (var i in totalValueArray)
            {
                Console.WriteLine(i);
            }
        }
        public int[] avgValue(int input1, int input2, int[,] input3)
        {
            double[] avgSubjectMarks = new double[input2];
            for (int j = 0; j < input2; j++)
            {
                avgSubjectMarks[j] = 0;
                for (int i = 0; i < input1; i++)
                {
                    avgSubjectMarks[j] += input3[i, j];
                }
                avgSubjectMarks[j] = avgSubjectMarks[j] / input1;
            }
            double[] avgSubjectMarksSorted = new double[input2];
            for (int i = 0; i < input2; i++)
            {
                avgSubjectMarksSorted[i] = avgSubjectMarks[i];
            }
            Array.Sort(avgSubjectMarksSorted);
            int shortestSubjectArrayIndex = Array.IndexOf(avgSubjectMarks, avgSubjectMarksSorted[0]);
            int[] result = new int[input1];
            for (int i = 0; i < input1; i++)
            {
                result[i] = 0;
                for (int j = 0; j < input2; j++)
                {
                    if (j != shortestSubjectArrayIndex)
                    {
                        result[i] += input3[i, j];
                    }
                }
            }
            return result;
        }
```
TensorFlow Sports Image Classification : Building a Custom Model with TensorFlow and Keras
Tags: python, tensorflow, computervision
Published: 2023-09-24 17:52:50

🎥 In this video tutorial, we will dive deep into the world of sports image classification! 🏀📸

🔍 What's Covered in this Video:

📦 Dataset Download: We'll start by obtaining a large sports image dataset from Kaggle, carefully curated with 21 unique sports categories. 
🏋️‍♂️ Model Building: Using TensorFlow and Keras, we'll dive into the architecture of MobileNet, a pre-trained model. We'll then customize it for our specific classification task. 
🖼️ Data Preparation: Learn how to preprocess and organize your data into train, validation, and test sets, ensuring your model has a solid foundation to learn from. 
🧠 Model Training: We'll guide you through the process of training your model, fine-tuning it to achieve impressive accuracy. 
📊 Model Evaluation: Discover how to assess the performance of your sports image classifier and understand the results. 
📸 Real-World Predictions: Watch as we make predictions on new sports images, overlaying the predicted class for a real-world demonstration of our model in action.

If you are interested in learning modern Computer Vision course with deep dive with TensorFlow , Keras and Pytorch , you can find it here  : http://bit.ly/3HeDy1V
Perfect course for every computer vision enthusiastic

Actually recommend this book for deep learning based on Tensorflow and Keras : https://amzn.to/3STWZ2N

Check out our tutorial here : https://youtu.be/xORACIVRNd4

Enjoy
Eran

#Python #openCV #TensorFlow #Deeplearning #DeepLearningTutorial #mobilenet #ImageClassificationTutorial #SportsImageClassification
Building Webhook As A Feature
Published: 2023-09-24 17:34:30

Are you a technical architect focused on building a new integration method for your product? Webhook is on the mind? If yes, let's dive on. 

### Minimum requirements

**HTTP status codes** play a crucial role in webhook communication. A 200 status code for success, anything else is a failure delivery.

**Idempotency**: As an architect, add unique ID in the payload to indicate source system's identifier. The consumers will use this to check for duplicates

** Timeouts**: Add a strict 30 seconds timeout for your consumers. 

**Out-of-Order Events** Always have a timestamp to your consumers can know out of order events and optimize to ignore stale events.

**Documentation** is always needed and the best experience for developers. Never miss on this.

### References

Check out below articles for further reading.

1. A comprehensive guide on facts - what to consider as technical design for webhooks. https://beeceptor.com/docs/webhook-feature-design/
2. A philosophical and detailed essay on webhook design consideration: https://hookdeck.com/webhooks/guides/webhook-infrastructure-requirements-and-architecture#system-requirements-must-haves