The server provides the HLS (live streaming) link for a YouTube channel or video. Any video or IPTV player can play a YouTube live video using this link.
YouTube Live Channels on any IPTV Player
Many public broadcasts and free-to-air channels are now available on YouTube as live videos. Many smart TVs and streaming boxes support digital channels by adding a playlist. These stream over the internet rather than satellite or cable.
Setup Aria2 Download Utility on Debian
There may be other ways to install the Aria2 download utility on Debian, but this is what I follow on my almost 10 years old network hard disc device which runs on Debian 8 (Jessie).
PopOS on ASUS ROG Zephyrus G14 Laptop
Install the latest version of PopOS alongside Windows 10 in a multi-boot setup. Follow similar steps to install Ubuntu as well.
Setup DNS over HTTPS (DOH) on Firefox Android
Setup DNS over HTTPS (DOH) in a Firefox browser, on an Android device for privacy and security.
TradingView Advanced Charts with CryptoCompare APIs
Below is a functional demo of a financial chart using the Technical Advanced Charts library from TradingView and data from CryptoCompare. The chart plots historical OHLCV (Open High Low Close Volume) data for a crypto coin pair. The data on the chart updates automatically in real-time using a web socket connection. It uses the Datafeed API to integrate with the TradingView charting library.
Kodi channels on Android TV Home Screen
Create custom Kodi channels to be shown on the home screen of an Android TV
External Players in Kodi
Setup video players like Just Player and MX Player to use on Kodi
LeetCode - Rank Teams by Votes
Solution to LeetCode: Rank Teams by Votes
Solution
- Use a map of arrays (2 dimensional data structure) to accumulate the vote counts per position per team
- Sort the map based on the vote counts per position and team name
/* Solution to LeetCode: Rank Teams by Votes
* URL: https://leetcode.com/problems/rank-teams-by-votes/
*/
const rankTeams = (votes) => {
// map to hold vote count per team
const rankings = new Map()
// loop through each vote
for (const vote of votes) {
//console.log(vote)
// loop through each team position in a vote
for (let position = 0; position < vote.length; position++) {
const team = vote[position]
// update the vote count for the team at the position
let ranking = rankings.get(team)
// create an empty array, if not already
if (!ranking) ranking = new Array(vote.length).fill(0)
// record the vote
ranking[position]++
// console.log(team, ranking)
rankings.set(team, ranking)
}
}
// sort the teams based on the votes
const sorted = [...rankings].sort((a, b) => {
const rankingA = a[1]
const rankingB = b[1]
for (let position = 0; position < rankingA.length; position++) {
// if vote count is same, check for next position
if (rankingA[position] == rankingB[position]) continue
// return team with highest vote count
else return rankingB[position] - rankingA[position]
}
// break tie based on team name
return a[0] - b[0]
})
// join the sorted teams
const result = sorted.map((ranking) => ranking[0]).join('')
// console.log(result)
return result
}
// test case
console.assert(rankTeams(["ABC", "ACB", "ABC", "ACB", "ACB"]) === 'ACB')
// test case
console.assert(rankTeams(["WXYZ","XYZW"]) === 'XWYZ')
// test case
console.assert(rankTeams(["ZMNAGUEDSJYLBOPHRQICWFXTVK"]) === 'ZMNAGUEDSJYLBOPHRQICWFXTVK')
Sources List for Debian 8 (Jessie)
Debian 8 has been superseded by Debian 9 (stretch). Regular security support updates have been discontinued as of June 17th, 2018. Jessie also benefits from Long Term Support (LTS) until the end of June 2020. The LTS is limited to i386, amd64, armel and armhf.