teleren/devto huggingface dataset:
How Dogecoin Works?
Tags: bitcoin, dogecoin, asic, cryptocurrency
Published: 2024-05-06 10:39:23

Dogecoin, a blockchain-based digital coin, has a rich history. Dogecoin was created as a fork from Luckycoin. Luckycoin had split from Litecoin (a modified version Bitcoin), which itself was a fork. **[Dogecoin ](https://asicmarketplace.com/blog/what-is-dogecoin/)**is a fork of Luckycoin.

Dogecoin is based on a "supplementary proof of work" technique, which allows miners the opportunity to mine Dogecoin free while simultaneously working on other crypto currencies that use proof-of work. This includes Litecoin.

The transaction request from the owner is the first step in the working process. All Dogecoin miner are informed to continue the process after the request has been sent. The miners compete to solve mathematical puzzles and validate transactions as quickly as possible to earn DOGE coins.

The network validates the block after the miners have used all of their computational resources. The block rewards are given to the miners after the validation. The miners get 10,000 Dogecoins per block that they successfully mine.
HttpInterceptor, Observable weirdness
Published: 2024-05-06 16:35:39

Why does the following code work (tap.. next callback):

`
intercept(req: HttpRequest, next: HttpHandler): Observable<HttpEvent> {

let ok: string;
let started = Date.now();

let observable = next.handle(req).pipe(
  tap({
    // Succeeds when there is a response; ignore other events
    next: (event) => {

      if (event instanceof HttpResponse) {
        ok = event.statusText;
      }
    },
    // Operation failed; error is an HttpErrorResponse
    error: (_error) => {
      ok = 'failed'
    }
  }),
  // Log when response observable either completes or errors
  finalize(() => {
    const elapsed = Date.now() - started;
    const msg = `${req.method} "${req.urlWithParams}"
      ${ok} in ${elapsed} ms.`;
  })
);

return observable;
}
`

But this does not:

`
intercept(req: HttpRequest, next: HttpHandler): Observable<HttpEvent> {

let ok: string;
let started = Date.now();
let observable = next.handle(req);

observable.pipe(
  tap({
    // Succeeds when there is a response; ignore other events
    next: (event) => {

      if (event instanceof HttpResponse) {
        ok = event.statusText;
      }
    },
    // Operation failed; error is an HttpErrorResponse
    error: (_error) => {
      ok = 'failed'
    }
  }),
  // Log when response observable either completes or errors
  finalize(() => {
    const elapsed = Date.now() - started;
    const msg = `${req.method} "${req.urlWithParams}"
      ${ok} in ${elapsed} ms.`;
  })
);

return observable;
}
`
Stay Updated with PHP/Laravel: Weekly News Summary (29/04/2024-05/05/2024)
Tags: laravel, php
Published: 2024-05-06 16:01:47

Hey everyone, I recently published a blog post summarising the latest news and updates in the PHP/Laravel community from April 29th to May 5th, 2024. Check out the key points below for a quick overview:

- Laravel News introduced a new video series by Christoph Rumpel focusing on Laravel's first-party tools.
- The April 2024 Laravel Worldwide Meetup featured Matt Machuga and Mateus Guimarães.
- The Replicate Laravel package, a PHP client for the Replicate API, was highlighted.
- Windows support for NativePHP was announced, enabling the building of applications for the Windows platform.
- Moonshine, an open-source admin panel for Laravel, was introduced.
- Articles covered topics like optimal PHP-FPM settings, working with DynamoDB in Laravel, and event sourcing packages like Verbs.
- Other highlights include Laravel Console Menu for CLI menus, Laravel Request Forwarder for redirecting requests, and discussions on Composer dependency issues and local history.
- Tutorials on various topics such as session handling, database schema management, and Laravel features were also featured.
- The summary includes insights on architecture testing in Laravel, PHP 8.4 updates, and integrating Laravel Breeze API scaffolding with React applications.

This summary offers a concise overview of recent advancements in the PHP/Laravel framework, providing valuable insights for developers and enthusiasts alike. Explore the full post for more in-depth coverage and stay updated on the latest in PHP/Laravel development.

Check out the complete article here https://poovarasu.dev/php-laravel-weekly-news-summary-29-04-2024-to-05-05-2024
Help! Our React Routes are more confusing than a maze 😵
Tags: webdev, javascript, react, discuss
Published: 2024-05-06 15:51:43

Hello there, friends!

I hope you are doing great! Over here, we’re trying to sort out our React routing and, frankly, it feels like we’re trying to solve a Rubik’s Cube blindfolded.

We’ve seen everything from React Router, which seems to have more versions than I have socks, to old-school server-side routing. And then there's stuff like Reach Router and hooks that sound cool but are as mysterious to us as the dark side of the moon.

**Why we ask? There are about 20 million projects using React and only 40% of these use React Router. 👀 Before you ask, about 15% are using Nextjs. So... what are the other 45% doing?? We're curious!**

How do you all handle this in your projects? Got a favorite method, or do you just throw darts at a board and pick one? 😄

Any funny fails or genius hacks you've got up your sleeve would be awesome to hear. We could use a few pointers.

Thanks a million!

Cheers.
Webcrumbs Team
KNN with PHP ML & Rubix ML
Tags: machinelearning, knn, php
Published: 2024-05-06 15:45:42

This post is for anybody who has tried to migrate to [Rubix ML](https://rubixml.com) from [PHP ML](https://php-ml.readthedocs.io/en/latest/) and more specifically anybody who is experimenting with K-Nearest Neighbors.  

As probably anybody who gets familiar with the capabilities of regression does, I decided to use it to try to win the lottery. The basis of the argument is that on occasion regression gets surprisingly close to generating winning number combinations. 

You can check my blog and data tables here on my [lottery predictions](https://lottery-predictions.online) website. I am currently mapping some data to graphs in some ongoing trend analysis. 

Anyway, I discovered when revisiting Rubix ML after starting with PHP ML that there were large differences in how the libraries handle data and its labels.  

The process is simple I generate a simple multi-dimensional array, each item containing an integer for a month and a lottery number, and another array of labels simply 1 for a winning number or 0 for a losing number. After training with this data, I ask the program what numbers are likely to appear in a draw for every month of the year. 

Anyway, to cut a long story short to use PHP ML I coded the following 

```
public function knntest( $array, $distance ) {
$classifier = new KNearestNeighbors( $k = $distance, new Minkowski( 4 ) );
$classifier->train( $this->tensor[0], $this->tensor[1] );
$predictions = array();
foreach ( $array as $key => $check ) {
	foreach ( $check as $k => $_check ) {
	$input  = array( $_check[0], $_check[1] );
	$nkpred = $classifier->predict( $input );
	if ( $nkpred == '1' ) {
$month     = $key + 1;
$predictions[] = array(
'Month'   => $month,
'Numbers' => $_check[1],
);
}
}
}
return $predictions;
}
```

To process the same data with Rubix ML I had to write the following.

```
public function knntest( $array, $distance ) {
$classifier = new KNearestNeighbors( $distance, true, new Minkowski(4.0));
$dataset = new Labeled( $this->tensor[0], $this->tensor[1]);
$dataset->apply(new OneHotEncoder());
$classifier->train( $dataset );
$predictions = array();
foreach ( $array as $key => $check ) {
$input  = new Unlabeled( $check );
$input->apply(new OneHotEncoder());
$nkpred = $classifier->predict( $input );
$i = 0;
$length = count($nkpred);
while($i < $length) {
if ( (string) $nkpred[$i] == '1' ) {
$month = $key + 1;
$predictions[] = array(
'Month'   => $month,
'Numbers' => $check[$i][1],
);
}
$i++;
}		
}
return $predictions;
}
```

As you can see the contrast is huge. I found the way  I was working with Rubix was the only way I could get it to process the same data sets and labels.

I figure this might help anybody who wants to start with KNN and Rubix after migrating from PHP ML.

Personally speaking for the circumstance I am working with KNN in I am staying with PHP ML.

Rubix seems to be group similar datasets together which is interesting itself.
open-graph intro
Tags: opengraph
Published: 2024-05-06 15:42:39


## Scenario

When we use Twitter, we notice that some links display preview cards while others do not.

![Pasted image 20240409203435](https://pictures.kazoottt.top/2024/04/2024049-bc909874e20bb629c839253d3943d659.png)

![Pasted image 20240409204440](https://pictures.kazoottt.top/2024/04/2024049-4a9e81697a9703fe745e3052d4cbd1cd.png)

This is because some websites have set up Open Graph, while others have not.

![Pasted image 20240409103122](https://pictures.kazoottt.top/2024/04/2024049-087f0fbb7b7c5f497748c7fb9a12cdda.png)

## What is Open Graph?

Open Graph is a protocol introduced by Facebook in 2010, used for displaying preview cards when sharing links on social networks.

![Pasted image 20240409204654](https://pictures.kazoottt.top/2024/04/2024049-3dd20b82e78f86d49d9b7994a75ecb5c.png)

From its name and purpose, it's evident that Open Graph signifies the openness of Facebook and other platforms supporting this protocol, especially amidst certain platforms that block external links or throttle those containing external links.

![Pasted image 20240409205145](https://pictures.kazoottt.top/2024/04/2024049-df5e5b3488dffbd26760c4e44ee0914a.png)

Similar to Open Graph, Twitter has its own card system. If both Twitter Card and Open Graph coexist, Twitter Card takes precedence. Only if Twitter Card is not defined, Open Graph is displayed.

![Pasted image 20240409213244](https://pictures.kazoottt.top/2024/04/2024049-4621b20b74ec8f5aed0a133d5f38d28e.png)

![Pasted image 20240408163056](https://pictures.kazoottt.top/2024/04/2024049-ab3a3a2fdeb0b839edc4ad6b2b226515.png)

## Preview and Inspection Tools

[OpenGraph - Preview Social Media Share and Generate Metatags - OpenGraph](https://www.opengraph.xyz/)

![Pasted image 20240409201933](https://pictures.kazoottt.top/2024/04/2024049-ef4f78169782a186e08463a76ff65f1f.png)

[OpenGraph - Preview Images and Generate Open Graph Meta Tags](https://opengraph.dev/)

![Pasted image 20240409195616](https://pictures.kazoottt.top/2024/04/2024049-6901afe74ffbf8affe03e69a0ffecfa4.png)

![Pasted image 20240409131420](https://pictures.kazoottt.top/2024/04/2024049-c92de25d68dbdfbd37639c11df5bb091.png)

## Some Examples

[Open Graph Examples](https://opengraphexamples.com/)

![Pasted image 20240409131603](https://pictures.kazoottt.top/2024/04/2024049-188a013e0965f2e4b004de4a915b07b7.png)
Cloudflare Turnstile in Flutter News 2024 #18 ʚїɞ
Tags: flutter, news, dart, discuss
Published: 2024-05-06 15:42:28

Hey Flutter enthusiasts!

Ever worry about missing key Flutter updates? Well, worry no more!
Starting 2024, I'm here to keep you informed with a weekly Monday report. Let's stay ahead in the world of Flutter!

## Table of Contents

<!-- {% cta #mayor-flutter-updates %} Mayor Flutter updates {% endcta %} -->

 * [Mayor Flutter updates](#mayor-flutter-updates)
 * [New Flutter Videos](#new-flutter-videos)
 * [New Flutter Packages](#new-flutterpackages)
 * [New Dev Posts](#new-devposts)
 * [New Medium Posts](#new-mediumposts)

---

## Mayor Flutter updates:

> There are no mayor flutter updates this week!
-> Currently [Flutter Version Valentine’s-Day-adjacent 3.19](https://docs.flutter.dev/release/whats-new)

## New Flutter Videos:

> The [Flutter YouTube Channel](https://youtube.com/@flutterdev?si=RZyl1nLVnSt373Vu) did not post any new Videos this week!

---

## New Flutter-Packages

{% embed https://pub.dev/packages/cloudflare_turnstile %}

{% embed https://pub.dev/packages/mastodon_entities %}

{% embed https://pub.dev/packages/bind3 %}

{% embed https://pub.dev/packages/coo_extensions %}

{% embed https://pub.dev/packages/bloc_advanced_tools %}

<!-- [Cloudflare Turnstile](https://pub.dev/packages/cloudflare_turnstile)
The Cloudflare Turnstile Widget is an unofficial Flutter package designed to seamlessly integrate Cloudflare's Turnstile functionality into your Flutter applications. -->

<!-- {% details [Cloudflare Turnstile](https://pub.dev/packages/cloudflare_turnstile) %} The Cloudflare Turnstile Widget is an unofficial Flutter package designed to seamlessly integrate Cloudflare's Turnstile functionality into your Flutter applications. {% enddetails %} -->


---

### New Dev-Posts

{% embed https://dev.to/vigneshwar0311/integrate-a-real-time-chat-solution-using-firebase-48h7 %}

{% embed https://dev.to/codetradeindia/riverpod-state-management-package-in-flutter-319-nkk %}

{% embed https://dev.to/terekhin/my-first-mobile-game-with-flutter-4k32 %}

{% embed https://dev.to/adryannekelly/entendendo-state-pattern-flutter-3anp %}

{% embed https://dev.to/odevio/what-is-odevio-exploring-ios-deployment-on-windows-linux-44oe %}


---

### New Medium-Posts

{% embed https://medium.com/@wijayanto1320/tulisan-pertamaku-32f55fbb2ea4 %}

{% embed https://medium.com/@flutterwtf/how-to-successfully-convert-existing-app-to-flutter-96f8783b4405 %}

{% embed https://medium.com/canopas/canopas-newsletter-67-797f2e9631f7 %}

{% embed https://medium.com/@chris-scoot/dart%E8%AF%AD%E8%A8%80%E5%AD%A6%E4%B9%A0-532087757b73 %}

{% embed https://medium.com/@ambeego/struggling-with-layout-errors-simplify-debugging-with-this-golden-rule-b3ab95f21f8c %}


---

Last Flutter News: [Flutter News 2024 #17 ʚїɞ](https://dev.to/lucianojung/series/26008)
_Did I miss any recent updates? Feel free to share any important news I might have overlooked!_
how to find the repeated number of an array?
Tags: javascript, typescript
Published: 2024-05-06 15:41:20


```typescript
const findTheNumber = (array: number[]) => {
  const dict = new Map()
  return array.find((item) => {
    if (dict.has(item)) {
      return item
    } else {
      dict.set(item, true)
    }
  })
}
```

## 1. what is the difference between map and object?

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#objects_vs._maps>

1. the key of the map can be any type, but the key of the object only can be **string** or **symbol**.
2. the map has order.

  >The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value.

## 2. how to get the target item from a array?

use the `find` api of the Array 

`Array.prototype.find()`

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find>

> The find() method of Array instances returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.

how to use:

``` typescript
// find the first item that can be divided by 2（even）
const array = [1,2,3,4]
const target = array.find(item=>{
  return item/2===0
})
```
how to check if a key is in the Object
Tags: javascript
Published: 2024-05-06 15:39:24

there are many methods.

## `in` operator

[in - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in)

> The **`in`** operator returns `true` if the specified property is in the specified object or its prototype chain.

how to use?

for example:

```javascript
const dict = { a: "a", b: "b" }
console.log("a" in dict)
```

attention: the attribute name should be string.

that is to say:

- a in dict ❎
- "a" in dict ✅

## Object API: hasOwnProperty

[Object.prototype.hasOwnProperty() - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)

The complete expression is `Object.prototype.hasOwnProperty()`.

how to use it ?

```javascript
const dict = {
  a: "a",
  b: "b",
}
console.log(dict.hasOwnProperty("a"))
```

the same is the attribute key should be a string.

- a in dict ❎
- "a" in dict ✅
SAP Basis snippets #4
Tags: sap, sapbasis, database, sybase
Published: 2024-05-06 15:21:00

## Sybase DB start/stop commands

First switch to the `syb<sid>` user

```
su - syb<sid>
```
Logon to the isql interface

```
isql -U <username> -P <password -S <SID>
```
To stop the sybase db, use the below command

```
shutdown
```
Execute ‘go’ after ‘shutdown’ command, which completes the execution of the latter.

```
go
```
To start the Sybase DB, we run **startserver -f RUN_SID**.

For this we need to go to the location of the **RUN_SID** file, which is generally present in `/sybase/<SID>/ASE*/install/` path.

Once inside this directory, run the below commands as `syb<SID>` user

```
startserver -f RUN_SID

startserver -f RUN_SID_BS
```
2487. Remove Nodes From Linked List
Tags: php, leetcode, algorithms, programming
Published: 2024-05-06 15:19:27

2487\. Remove Nodes From Linked List

Medium

You are given the `head` of a linked list.

Remove every node which has a node with a greater value anywhere to the right side of it.

Return _the `head` of the modified linked list._

**Example 1:**

![](https://assets.leetcode.com/uploads/2022/10/02/drawio.png)

- **Input:** head = [5,2,13,3,8]
- **Output:** [13,8]
- **Explanation:** The nodes that should be removed are 5, 2 and 3.
  - Node 13 is to the right of node 5.
  - Node 13 is to the right of node 2.
  - Node 8 is to the right of node 3.

**Example 2:**

- **Input:** head = [1,1,1,1]
- **Output:** [1,1,1,1]
- **Explanation:** Every node has value 1, so no nodes are removed.

**Constraints:**

- The number of the nodes in the given list is in the range <code>[1, 10<sup>5</sup>]</code>.
- <code>1 <= Node.val <= 10<sup>5</sup></code>

**Solution:**

```
/**
 * Definition for a singly-linked list.
 * class ListNode {
 *     public $val = 0;
 *     public $next = null;
 *     function __construct($val = 0, $next = null) {
 *         $this->val = $val;
 *         $this->next = $next;
 *     }
 * }
 */
class Solution {

    /**
     * @param ListNode $head
     * @return ListNode
     */
    function removeNodes($head) {
        if ($head == null) {
            return null;
        }
        $head->next = $this->removeNodes($head->next);
        return $head->next != null && $head->val < $head->next->val ? $head->next : $head;
    }
}
```


**Contact Links**

- **[LinkedIn](https://www.linkedin.com/in/arifulhaque/)**
- **[GitHub](https://github.com/mah-shamim)**
Penalty Driving On Suspended License New Jersey
Tags: law, legalservice
Published: 2024-05-06 15:11:27

Driving on a suspended license in New Jersey carries severe penalties, including fines, license suspension extension, and potential imprisonment. The penalties vary depending on the circumstances, such as prior offenses and the reason for the license suspension. In some cases, offenders may face additional charges, such as driving without insurance or registration. It's essential to address the suspension issue promptly and seek legal counsel to navigate the legal process effectively. Ignoring a suspended license can lead to further consequences and complicate the reinstatement process.
**[Penalty Driving On Suspended License New Jersey](https://srislaw.com/penalty-driving-on-suspended-license-new-jersey/)**
Music Monday — What are you listening to? (Best Interpolation Edition)
Tags: watercooler, discuss, music
Published: 2024-05-06 15:00:25

_cover image source: [MakeAGIF.com](https://makeagif.com/gif/the-verve-bitter-sweet-symphony-official-music-video-AFw0LZ)_

**Interpolation! That's a word you don't hear every day... [According to Wikipedia](https://en.wikipedia.org/wiki/Interpolation_(popular_music)):** 

> **In popular music, interpolation (also called a replayed sample) refers to using a melody—or portions of a melody (often with modified lyrics)—from a previously recorded song but re-recording the melody instead of directly sampling it. Interpolation is often used when the artist or label who owns the recording of the music declines to license the sample, or if licensing the piece of music is considered too costly.**

**If you're like me, you're probs thinking what?! No sampling?! Don't worry, I'm not gonna be a stickler about it... as far as I'm concerned samples are allowed here. I'm just looking for music that references other pre-existing music in some way that is fresh or interesting. It can be an interpolation, a sample... even a cover or an answer song will do! And for all those that are struggling to think up interpolations, I got a list for ya [here](https://en.wikipedia.org/wiki/List_of_interpolated_songs). Of course, feel free to color outside the lines and suggest any music you've been into recently.**

![Q Tip rapping on the music video "Can I Kick It" which famously interpolated Lou Reed's "Walk on the Wild Side"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iekkce9frav1jo36o6x9.gif)

***

## How we do 

In this weekly series, folks can chime in and drop links to whatever it is they've been listening to recently + browse others' suggestions. You can follow the suggested genre if you'd like, but don't feel confined to it; you're free to suggest whatever you wanna. 🙌  

If you're interested in having other discussions about music, consider following the aptly named [#music discussions](https://dev.to/music-discussions) organization.

{% embed https://dev.to/music-discussions %}  

***

Now, lemme hear your favorite interpolations! 👂

_Note: you can embed a link to your song using the following syntax `{% embed https://... %}`. This should work for most common platforms!_

Looking forward to listening to y'all's suggestions! 🎶

***

**🚨_p.s. Check out @rachelfazio's sister series to Music Monday, called [Podcast Palooza](https://dev.to/rachelfazio/series/26422)!_🚨**
What are your goals for week 19 of 2024?
Tags: discuss, motivation
Published: 2024-05-06 14:54:31

 It's week 19 of 2024. 

## What are your goals for this week? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening this week? 
  * any suggestions for in person or virtual events?
- Any special goals for the quarter?


### Last Week's Goals
 
- [:white_check_mark:] Continue Job Search. 
- [:white_check_mark:] Project work. * Some content update, worked on code exercise for a React Native project.
- [:x:] Blog. Star Wars Theme? Comic Book Theme?
- Events.
  * [:x:] Thursday Virtual Coffee. 
- [:white_check_mark:] Run a goal setting thread on Virtual Coffee Slack.


 
### This Week's Goals


- Continue Job Search. 
- Project work.
- Blog.
- Events.
  * Thursday Virtual Coffee. 
- Run a goal setting thread on Virtual Coffee Slack.
- Went to the ren faire need to edit my photos.



### Your Goals for the week 

Your turn what do you plan to do this week? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening any week? 
  * in person or virtual?


```html
-$JarvisScript  git commit -m "Hip Hip, Huzzah!"
```