teleren/devto huggingface dataset:
Raspberry Pi as wireless audio receiver
Tags: raspberrypi
Published: 2022-04-26 09:01:14

How to turn old Hi-Fi tower into a modern audio speakers, with wireless connectivity? Use Raspberry Pi

---

> 🇨🇿 V češtině si lze článek přečíst na [kutac.cz](https://www.kutac.cz/pocitace-a-internety/raspberrypi-jako-bluetooth-audio-prehravac) 

My parents wanted to throw out old, but still functional, Hi-Fi tower. So I took it into office. However, only place where it fits is on the other side of room than tables are. I wanted to avoid laying cable on the ground and covering with duct tape. So I used Raspberry Pi, which was [streaming fish in aquarium](https://dev.to/arxeiss/story-of-automated-fish-feeder-with-raspberrypi-25i3) during Christmas time. And turned it into Bluetooth receiver.

## Bluetooth, AirPlay and Spotify Connect

I used nice prepared script, which guides you through the process and install all required. I tested it only with Bluetooth, but it supports different types of connectivity. Script can be found on [github.com/nicokaiser/rpi-audio-receiver](https://github.com/nicokaiser/rpi-audio-receiver).

After executing the script, I restarted Raspberry. Then I saw my Raspberry in the list of available Bluetooth devices on my laptot. The name of the device is the same as `hostname`, which might be changed during the script wizard as well.

## USB Bluetooth dongle is required

In the first step, I tried to use internal **onboard Bluetooth**. The Readme of the repo **discourage** from using internal one, and I do as well. It most likely will not work, or have issues. I was able to connect, but wasn't able to play music. And second time, I wasn't able to connect anymore.

Later, I connected old USB dongle with Bluetooth v2.0. It was working immediately, but I had to **manually pair devices**. And it was causing some issues with my laptop, when I connected also wireless mouse. So I bought new USB dongle with Bluetooth v4.2. Since then, I don't need to manually pair devices and it **works like a charm!**.

## Manually pairing devices

Sometimes you might be asked to **enter PIN** on the device, on the Raspberry. That is not easy, especially when you don't have monitor and keyboard connected. So I suggest to use SSH and connect remotely. Start Bluetooth interactive console with `sudo bluetoothctl` and do the steps below.

After starting console, you might see all MAC addresses that are trying to connect. Try to connect from your phone or laptop and you will see the address there. Copy it, you will need that.

```bash
# Type this after starting 'sudo bluetoothctl'
power on
agent on
pair 00:00:00:00:00:00 # Put here MAC address of your device
# Here you will be asked to enter PIN
trust 00:00:00:00:00:00 # Put here MAC address of your device as well
```
Emir Marlo Represents Ukraine at Djooky Awards
Tags: ukraine, europe, music
Published: 2022-04-26 08:41:22

The excitement of the Djooky Music Awards, held every year in the USA at Capitol Records, hosted by Madonna and Billie Eilish, has begun. 

The news that excited the Turkish followers of Djooky Awards came from Ukraine. This year, Ukraine will be represented by Emir Marlo of Turkish origin. Emir, who will compete with his song "Voices", has already become one of the Djooky favourites. Emir Marlo is at the top of Europe's "DJOOKY HITS" list, is also the youngest competitor in the history of Djooky Awards.

Due to the war launched by Russia against Ukraine, support continues from many parts of the world. The young singer draws attention to the end of the war and the inseparable territorial integrity of Ukraine with "Voices". The song, which will be released in partnership with Universal Music Group and Spinnup in July, has already managed to be a matter of curiosity. “Voices”, the singer's call to live to the fullest; fill your life with beautiful moments, be yourself and be conscious of every moment of your life. Time flies and life is the most important thing we have. That is why we must value our lives and live as we believe is right. See you in the USA!

**Who is Emir Marlo?**

 Emir Ataoğlu, born on January 16, 2005 in Istanbul, continues his education in an high school in Istanbul. His passion for music started with guitar training at an early age, and then the young singer, who made amateur songs at home, made his professional debut with Djooky. The young singer also enjoys playing Volleyball (which he started as a hobby at the start of the COVID-19 pandemic).
Fidelity Launches Multi-Level Learning Center in Metaverse
Tags: discuss
Published: 2022-04-26 08:38:14

Fidelity Investments, a major financial services firm with $11.3 trillion in assets under administration, has entered the metaverse with the opening of an eight-story learning center and the launch of a metaverse exchange-traded fund (ETF). The Fidelity Stack features “a multi-level design complete with a lobby, dance floor, and rooftop sky garden for users to explore on foot – or even through teleport.”

### Fidelity Enters the Metaverse
Fidelity Investments announced Thursday the grand opening of “The Fidelity Stack,” which the brokerage firm described as its “first immersive metaverse experience aimed at offering a new way to learn investing basics.” Fidelity is one of the largest financial services firms; it currently has $11.3 trillion in assets under administration.

The Fidelity Stack is an eight-story building in the metaverse where visitors can learn about different ways of investing. One whole floor is dedicated to providing information about Fidelity Metaverse ETF (FMET), the firm’s new exchange-traded fund focusing on metaverse investments. Fidelity explained:

> The Fidelity Stack, built in Decentraland, features a multi-level design complete with a lobby, dance floor, and rooftop sky garden for users to explore on foot – or even through teleport.

“In the Invest Quest at The Fidelity Stack, users are challenged to traverse the building learning the basics of ETF investing while gathering ‘orbs’ along the way,” the announcement continues.

Decentraland is an Ethereum-based metaverse opened to the public in January 2020. In February, global investment bank JPMorgan chose Decentraland as the metaverse platform to open its lounge.

Kathryn Condon, head of marketing channels and emerging platforms at Fidelity, commented:

> The way we engage with each other and with our money is rapidly changing, whether that’s through the rise of blockchain technology or development of a new digital universe. Our foray into the metaverse is designed with this in mind.

Last month, Citi predicted that the metaverse could be a $13 trillion opportunity with five billion users by the year 2030. Global investment banks Goldman Sachs and Morgan Stanley believe that the metaverse is an $8 trillion opportunity.

[Source](https://www.coinparative.com/news/fidelity-launches-multi-level-learning-center-in-metaverse/)
Upgrading to NRSDK 1.8.0 - MR Tutorial
Tags: mixedreality, unity3d, beginners, tutorial
Published: 2022-04-26 08:36:53

Until now, the tutorials have been based on NRSDK 1.7.0. Currently, the latest NRSDK version is 1.8.0. This section explains what you need to do to upgrade an old SDK. 

I also upgraded [HelloWorld tutorial](https://github.com/karad/mr-tutorials-for-nreal-light/tree/main/HelloWorld) while writing this explanation. I will be upgrading the other samples soon.

NRSDK version 1.8.0 and later have different documentation URLs. Check the following documents as well.

- [Learn Nreal Glasses - NRSDK](https://nreal.gitbook.io/nrsdk/discover/readme)

First, download NRSDK 1.8.0 from the following link.

[![Download NRSDK 1.8.0](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjkt4trel6kunmt3yojx.png)](https://developer.nreal.ai/download)
 

- [Download | Nreal](https://developer.nreal.ai/download)


## How to Upgrade

1. Display `Project` > `Assets`, right click on `NRSDK` to show the context menu.
2. Select `Delete` for deleting Old NRSDK.
3. Right-click on `Assets` to display the context menu, then select `Import Package` > `Custom Package...`.
4. Select the `NRSDKForUnityAndroid_1.8.0.unitypackage` you have downloaded from the file dialog.
5. Please follow the usual dialog instructions.

After performing this upgrade, you can build your project to build an executable `.apk` on Nreal Air.


If it does not work on your Nreal Air device, select `NRCameraRig`, open the `Inspector` panel and go to `NR Session Behaviour` > `Session Config`.

![Session Config Panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b38h6gja00ln6ppfcnaq.png)
 

Check that `Target Devices` is checked for both `Nreal Light` and `Nreal Air`.

Enjoy the new version of the NRSDK!
Javascript Linked List data structure
Tags: javascript, linkedlist, programming, datastructure
Published: 2022-04-26 03:22:55

**LinkedList**:

A linked list is a linear data structure similar to an array. However, unlike arrays, elements are not stored in a particular memory location or index. Rather each element is a separate object that contains a pointer or a link to the next object in that list.

**Advantages**:

- Nodes can easily be added or removed from a linked list without re-organizing the entire data structure.

**Disadvantages**:

- Search operations are slow in linked list over arrays, random access of data element is not allowed. Nodes are accessed sequentially from first node.
- It uses more memory than arrays because of storage of the pointer.

**Internal Design of linked list**
```
function LinkedList() {
    let length = 0;
    let head = null;
    const Node = function(element) {
        this.element = element;
        this.next = null;
    }
    this.size = function() {
        return length;
    }
    this.head = function() {
        return head;
    }
    this.add = function(element) {
        let node = new Node(element);
        if (head == null) {
            head = node;
        } else {
            let currentNode = head;
            while (currentNode.next) {
                currentNode = currentNode.next;
            }
            currentNode.next = node;
        }
        length++
    }

    this.remove = function(element) {
        let currentNode = head;
        let previousNode;
        if (currentNode.element == element) {
            head = currentNode.next;
        } else {
            while (currentNode.element !== element) {
                previousNode = currentNode;
                currentNode = currentNode.next;
            }
            previousNode.next = currentNode.next;
        }
        length--;
    }
    this.isEmpty = function() {
        return length == 0;
    }
    this.indexOf = function(element) {
        let currentNode = head;
        let index = -1;
        while (currentNode) {
            index++;
            if (currentNode.element == element) {
                return index;
            }
            currentNode = currentNode.next;
        }
        return -1;
    }
    this.elementAt = function(index) {
        let currentNode = head;
        let count = 0;
        while (count < index) {
            count++
            currentNode = currentNode.next;
        }
        return currentNode.element;
    }
}
var link = new LinkedList();
link.add("hello");
link.add("hello")
console.log(link)
console.log("elementAt", link.elementAt(0))
console.log("indexOf", link.indexOf("bye"))
link.remove("hello")
link.remove("hello")
console.log("isEmpty", link.isEmpty())
console.log("length", link.size())
```

> Any comments or suggestions are welcome.
Usage+Spend Forecasting on AWS with FinOps Foundation’s Best Practices
Tags: aws, finops, cloudcostmanagement
Published: 2022-04-26 08:05:37

Forecasting is the process of making predictions based on our assumptions about the factors driving the data of interest and its actual past and present values. The key value of having accurate forecasts is that they allow to be proactive, rather than reactive.

> In 2020, for one in three respondents, cloud spend was projected to be over budget by between 20 percent and 40 percent. One in 12 respondents said their cloud spend was expected to be over budget by more than 40 percent.
>     – Pepperdata

Making wrong or no forecasts has a high cost for your Company. Many have wondered if it’s a good idea to forecast at all. In our experience, the answer is yes. While nobody owns a crystal ball, a conversative forecasting model prevents the damage from wild guesses, that, if you don’t build a good model, your team will still implicitly make irrespective on their opinion that forecasts were a bad idea or look at someone else’s model. There is no discussion about this, we saw it happen in small and large Companies.

In the AWS context, we recommend forecasting both usage and spend

1. accurate usage forecasts allow, for example,
- to purchase the right number of reserved instances / savings plans
- to accurately decide the EC2 / RDS instance type and whether to use serverless instead
- to accurately set up AWS services parameters

2. accurate cost forecasts allow, for example,
- to create realistic budgets and thus better allocate resources – such as time, money, hiring etc.
- to help with the solution pricing
- to determine the cost-effective technology given the expected revenue.

Read the [rest of the article at jiripik.com](https://jiripik.com/2022/03/20/usage-and-spend-forecasting-on-aws-with-finops-foundations-best-practices/).
I made a twitter bot to take beautiful screenshots of a tweet
Tags: python, showdev
Published: 2022-04-26 08:00:31

Often times, after seeing a tweet, I go to https://poet.so to take a screenshot of it. However, this was kinda time consuming and stuff like that, but poet.so doesn't even have an API, so I create a selenium script that (very quickly) uses poet.so to take screenshots of a tweet.

To use the bot, simply reply to any tweet with @poet_this
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3v64asw68icnuw7qr12.png)
 

The project is shockingly simple, but super useful. It hardly took 20 minutes for me to make it (because I already had some experiences with the twitter API - [auto twitter banner changer](https://github.com/Dhravya/auto-twitter-banner) )

in fact, it's so simple that this is all I needed to write (with a little bit of reverse engineering of the website and some keyboard tricks)
```py
    def get_poem(self, link, savepath="tweet.png"):
        input_box = self.driver.find_element(by= "tag name", value="input")
        input_box.send_keys(link + u'\ue007')
        element = self.driver.find_element("xpath","//*[@data-export-hide]")

        # Waiting for the image to load
        time.sleep(5)
        element.screenshot(savepath)
```


Anyways, I hope you like my little project. If you have any suggestions or issues, feel free to post them on github.
The repository is public here:
Please ⭐ this!
{% github https://github.com/Dhravya/poet-this %}

I'm considering options to host the bot too, but hosting anything using selenium is quite the pain so i'll try my best. For now it's online on my own computer
A Quick 10-Second Programming Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-04-26 08:00:15

---
title: "A Quick 10-Second Programming Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12597d4e1c1.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What accommodations did the JavaScript developer request at the hotel?

___A:___ A room with a Vue.
 -->
Setup Seers GDPR Compliant Cookie Consent Banner on Blogger
Tags: javascript, php, gdpr, css
Published: 2022-04-26 07:50:47

To integrate Seers CMP properly on your website and manually markup cookie-setting scripts, follow the process below:

**Step 1:**
Login/Signup to [Seers](https://seersco.com/) & Go to [Seers Dashboard](https://seersco.com/business/dashboard)

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

**Step 2:**
Click on [Cookie Consent](https://seersco.com/cookie-consent-banner.html) and Add Domain for Scanning necessary and unnecessary cookies. It might take several minutes to scan your website.


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

**Step 3:**
After scanning, Click on Settings icon and Select:
1. One Standard: One Click Setup for Manual Integration
2. Customized: Advanced Settings


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

Select Manual Integration and Copy the Banner Script:
(Note: Script has a Unique ID) 

`<script data-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" data-name="CookieXray" src="https://cdn.seersco.com/banners/22768/17303/cb.js" type="text/javascript"></script>
`

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



**Step 4:**
Log in as administrator on your Blogger website.

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

**Step 5:**
1. Click "Theme" button in ribbon appearing on left side of website.
2. Click on three dots appearing in right corner of window.

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

New drop-down menu will open.
1. Click on "Edit HTML" option.

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

**Step 6:**
In next window, Paste your script Here:
1. Your key is highlighted.
2. Click on save button.

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

**Step 7:**
It will take you to next page
1. Click on "View blog".

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

[Seers GDPR Cookie Consent](https://seersco.com/cookie-consent-banner.html) will successfully be integrated on Blogger
How can I make the subdomain ?
Tags: domain, subdomain
Published: 2022-04-26 07:40:34

Hey,

How can I make the subdomain as app.exsample.com ? 

If I have had a domain as exsample.com


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

Thank you
jsonld in Nuxt 2, super simple, no plugins
Tags: nuxt, vue, jsonld, schema
Published: 2022-04-26 07:31:00

On a page in the head method you can add jsonld like this:
```javascript
  head() {
    return {
      script: [{
        type: 'application/ld+json',
        innerHTML: JSON.stringify(this.jsonld) // <- set jsonld object in data or wherever you want
      }],
      __dangerouslyDisableSanitizers: ['script'], // <- this is important
    };
  },
```

In your browser use a data sniffer extension to see the results:

Chrome: 
https://chrome.google.com/webstore/detail/openlink-structured-data/egdaiaihbdoiibopledjahjaihbmjhdj?hl=en

Firefox: 
https://addons.mozilla.org/en-US/firefox/addon/openlink-structured-data-sniff/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

More info on Nuxt Head:
https://nuxtjs.org/docs/components-glossary/head/
Remove Duplicates from Sorted Linked List
Tags: leetcode, datastructures, algortihms, interview
Published: 2022-04-26 07:17:27

<h2><a href="https://leetcode.com/problems/remove-duplicates-from-sorted-list/">83. Remove Duplicates from Sorted List</a></h2><h3>Easy</h3><hr><div><p>Given the <code>head</code> of a sorted linked list, <em>delete all duplicates such that each element appears only once</em>. Return <em>the linked list <strong>sorted</strong> as well</em>.</p>

<p>&nbsp;</p>
<p><strong>Example 1:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/01/04/list1.jpg" style="width: 302px; height: 242px;">
<pre><strong>Input:</strong> head = [1,1,2]
<strong>Output:</strong> [1,2]
</pre>

<p><strong>Example 2:</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/01/04/list2.jpg" style="width: 542px; height: 222px;">
<pre><strong>Input:</strong> head = [1,1,2,3,3]
<strong>Output:</strong> [1,2,3]
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li>The number of nodes in the list is in the range <code>[0, 300]</code>.</li>
	<li><code>-100 &lt;= Node.val &lt;= 100</code></li>
	<li>The list is guaranteed to be <strong>sorted</strong> in ascending order.</li>
</ul>
</div>

Python solution

```
# Definition for singly-linked list.
class ListNode:
     def __init__(self, val=0, next=None):
            self.val = val
            self.next = next
class Solution:
    def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListNode]:
        
        current = head
        
        if head is None:
            return None
        
        while current.next:
            if current.val == current.next.val:
                next_element = current.next.next
                current.next = next_element
            else:
                current = current.next
                
        return head
#end

```

The time complexity of the above solution is O(n), where n is the total number of nodes in the linked list.
Hotkeys to Success
Tags: programming, productivity, vscode, hotkeys
Published: 2022-04-26 07:14:10


![hotkeys.guru](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u95qs312acor1u2bajco.png)

Do you use your code editor efficiently?
Do you code fast and elegant?

As a code editor is the main tool of every developer, the crucial thing is to master it perfectly. This will allow you to boost your productivity and get real pleasure from coding. And that's where keyboard shortcuts can help!

Check out [Hotkeys.guru](https://hotkeys.guru) and take the survey! It includes 48 illustrated examples of what you can (and should!) do in your editor: quick navigation, effective modification, comprehensive exploration of your code, etc.

**Disclaimer**: 
1. It doesn't matter which editor you use. All popular editors have functionality mentioned in the survey or at least something equal. I have used **WebStorm** to prepare these examples.
2. Presumably, you already use arrows to move a caret and `Ctrl+X` (`Cmd+X`), `Ctrl+C` (`Cmd+C`), `Ctrl+V` (`Cmd+V`) to cut, copy and paste.

**Any feedback is highly appreciated!**