PrettyFlyForAFatGuy

joined 11 months ago
[–] PrettyFlyForAFatGuy@feddit.uk 17 points 1 day ago (2 children)

it's up to whoever comes after trump to mend bridges with europe, it's a waste of diplomatic resources maintaining relations with trumps america

[–] PrettyFlyForAFatGuy@feddit.uk 2 points 1 day ago* (last edited 1 day ago)

Moving the CanvasJS.Chart class instantiation into the second loop appears to have worked. Kinda icky having two loops tho

window.onload = async function () {
    const distinctDays = [...new Set(parsedData.map( o => o.x.toISOString().split('T')[0]))]
    const body = document.querySelector('body')
    const charts = []

    for(const distinctDay of distinctDays){
        const chartName = `chartContainer${distinctDay.replace(/-/g, '')}`
        const data = [{
            type: 'line',
            dataPoints: parsedData.filter( o => o.x.toISOString().includes(distinctDay))
        }]

        body.innerHTML += `<div id="${chartName}" style="height: 370px; width: 100%;">`

        charts.push([chartName, distinctDay, data]);
    }


    charts.forEach(([chartName, distinctDay, data]) => {
        new CanvasJS.Chart(chartName, {
            animationEnabled: true,
            zoomEnabled: true,
            title:{
                text: `average ping times for ${distinctDay}`
            },
            data: data
        }).render()
    })
}

 

i'm not serving this anywhere. it's just in a html file i'm opening locally, and it uses ChartJS. I'm trying to create charts for each day of a given csv of data so i can complain to my ISP about their DOGSHIT service. for some reason only the last chart is rendering and i can't figure out why, there's nothing in the console. I'm not a frontend guy so could be something very obvious.

I have 4 days of data so there should be 4 charts. The actual amount of data is much much larger than the subset i have posted below; over 6000 datapoints per day

<!DOCTYPE HTML>
<html>
<head>  
<script>
const rawData = `2025-02-18 23:56:50,23.228
2025-02-18 23:57:03,23.076
2025-02-18 23:57:16,23.560
2025-02-18 23:57:29,23.492
2025-02-18 23:57:42,23.383
2025-02-18 23:57:55,23.189
2025-02-18 23:58:08,23.389
2025-02-18 23:58:21,23.202
2025-02-18 23:58:34,23.518
2025-02-18 23:58:47,23.678
2025-02-18 23:59:00,23.547
2025-02-18 23:59:13,23.515
2025-02-18 23:59:26,29.981
2025-02-18 23:59:39,23.165
2025-02-18 23:59:52,23.381
2025-02-19 23:58:29,22.427
2025-02-19 23:58:42,22.433
2025-02-19 23:58:55,22.744
2025-02-19 23:59:08,22.538
2025-02-19 23:59:21,22.073
2025-02-19 23:59:34,22.527
2025-02-19 23:59:47,22.563
2025-02-20 23:58:26,22.615
2025-02-20 23:58:39,22.954
2025-02-20 23:58:52,22.570
2025-02-20 23:59:05,60.804
2025-02-20 23:59:18,22.928
2025-02-20 23:59:31,24.429
2025-02-20 23:59:44,23.066
2025-02-20 23:59:58,22.273
2025-02-21 13:44:19,81.440
2025-02-21 13:44:32,48.237
2025-02-21 13:44:45,47.153
2025-02-21 13:44:58,70.316
2025-02-21 13:45:11,58.714
2025-02-21 13:45:24,57.107
2025-02-21 13:45:37,39.298`

function lineToXY(line){
    const lineArr = line.split(',')
    return {
        x: new Date(lineArr[0]),
        y: Number(lineArr[1])
    }
}
const parsedData = rawData.split('\n').map(line => lineToXY(line))

window.onload = async function () {
    const distinctDays = [...new Set(parsedData.map( o => o.x.toISOString().split('T')[0]))]
    const body = document.querySelector('body')
    const charts = []

    for(const distinctDay of distinctDays){
        const chartName = `chartContainer${distinctDay.replace(/-/g, '')}`
        const data = [{
            type: 'line',
            dataPoints: parsedData.filter( o => o.x.toISOString().includes(distinctDay))
        }]

        body.innerHTML += `<div id="${chartName}" style="height: 370px; width: 100%;">`

        charts.push(new CanvasJS.Chart(chartName, {
            animationEnabled: true,
            zoomEnabled: true,
            title:{
                text: `average ping times for ${distinctDay}`
            },
            data: data
        }));
    }


    charts.forEach(ch => ch.render())


}

</script>
<script type="text/javascript" src="https://cdn.canvasjs.com/canvasjs.min.js"></script></head>
<body>

</div>
</body>
</html>

[–] PrettyFlyForAFatGuy@feddit.uk 42 points 1 day ago (26 children)

It will have to get a lot worse domestically before this happens

History being written before our eyes

Imagine if the republicans get wiped out in both houses and the dems have enough seats to overcome filibusters and make constitutional amendments.

[–] PrettyFlyForAFatGuy@feddit.uk 29 points 2 days ago (1 children)

Just wait until he starts selling F35s to Russia

A Rapist?! Blaming the victim?!

"She was asking for it"

Colour me unsurprised

Steam is DRM but is invisible enough that i haven't pirated a game since i was a teenager.

As always Piracy is a service issue

I may be wrong but my understanding was 3 copies of the data, across two storage formats, with one offsite

Texas has been going purple for a while

[–] PrettyFlyForAFatGuy@feddit.uk 7 points 4 days ago (4 children)

Ferdinand was the straw that broke the camels back. tensions had been building for a while. if it wasn't that it would have been something else. A lot of the consensus at the time was that war was inevitable

[–] PrettyFlyForAFatGuy@feddit.uk 3 points 4 days ago* (last edited 4 days ago) (2 children)

You can mitigate against HDD failure with RAID and backups.

I have two 8TB HDDs in a RAID1 configuration. if one dies i can remove the dead one and add a new one to the array and the data will sync back across from the good drive. I also have two 10TB drives in rotation going to offsite storage. every now and again i backup my server to one of these drives, take it to the place i store them and swap them over.

Only thing i'm missing from the 321 rule is different mediums, considering the amount of data i'm dealing with though the cost of backing up to tape though was prohibitative

 

In b4 "You wont make a profit"... i know, i want to use my computer to heat my apartment. i figure that even if i'm making a "loss" each month on the mining it's still cheaper than running my apartments electric heaters when you account for the sold (or not) bitcoin.

I've been doing well keeping things warm by Folding at home on the CPU but apparently AMD GPUs aren't supported for that and i want to put my GPU to work too.

I briefly mined some litecoin in like 2013/14 when BTC was just about popping off. other than that i have no mining experience (and i would have been using windows back then)

Need to sort something soon, Jan and Feb are probs the coldest months in the UK and i have gotten this far this year without using the heaters

 

inb4 "if it's legal it's not a crime"

 
/mnt/myname/steam/SteamLibrary/steamapps/common/7 Days To Die/EasyAntiCheat/EasyAntiCheat_Setup.exe: Win.Malware.Generic-9828888-0 FOUND
/mnt/myname/steam/SteamLibrary/steamapps/common/Far Cry 3/bin/pb/pbcls.dll: Win.Virus.Ramnit-9837718-0 FOUND
/mnt/myname/steam/SteamLibrary/steamapps/common/Far Cry 3/bin/pb/dll/wc002312.dll: Win.Virus.Ramnit-9837718-0 FOUND
/mnt/myname/steam/SteamLibrary/steamapps/common/Far Cry 3/bin/pb/pbcl.dll: Win.Virus.Ramnit-9837718-0 FOUND
/mnt/myname/steam/SteamLibrary/steamapps/common/SteamVR/tools/bin/win32/Qt5WebKit.dll: Win.Trojan.Ramnit-5881 FOUND

These, as far as i'm aware, have come straight from steam. I've searched for these online but haven't found anyone else getting the same error.

results from clamscan

 

I currently own two canon cameras, an EOS M10 i bought around 2017/2018 new for around £150 and a secondhand EOS 1300d i bought last week from a second hand electronics shop for £110 (body only, i already had lenses from an old EOS 200d)

Spec wise they seem to be extremely similar cameras just with the 1300 being larger with better lenses and more manual features

My dad mentioned that he was thinking of buying a new camera as his one was bought way back in like 2010 and wasn't a particularly up to date model at the time so i am considering selling him my M10.

looking at ebay though they seem to be going for £200-400 which i find a bit strange for a camera that first hit the market back in 2015 and is way more than i paid new (although reduced to clear) from John Lewis.

Am i missing something? How much is the M10 worth? and is it really worth more than it's newer (2016) DSLR counterpart?

 

I want to display a symbol at the top right of one or both of my screens, similar to the lightning bolt symbol raspberry pi OS uses to indicate lack of power, when certain conditions are met.

I'm pretty sure i could cobble a bash script together to decide when to do it, but it's the actual displaying of the symbol i'm not sure where to start on. It would need to appear on top of anything else that may be on the screen at the time

Everything i have tried googling returns irrelevant results

view more: next ›