Weve got a go community in the site that you might get some answers from rather than the general community here !golang@programming.dev
top left of the site in the navbar, and for sites who collect all of the different instances such as join-lemmy and lemmyverse. Also shows up in things like error pages in the new frontend
Smaller in the navbar but in the cases of join-lemmy and the things like error pages its larger (you can see the size by going to https://join-lemmy.org/instances?topic=all_topics&language=all&scroll=true)
[JavaScript] Relatively easy one today
Part 1
function part1(input) {
const split = input.split("\n");
const times = split[0].match(/\d+/g).map((x) => parseInt(x));
const distances = split[1].match(/\d+/g).map((x) => parseInt(x));
let sum = 0;
for (let i = 0; i < times.length; i++) {
const time = times[i];
const recordDistance = distances[i];
let count = 0;
for (let j = 0; j < time; j++) {
const timePressed = j;
const remainingTime = time - j;
const travelledDistance = timePressed * remainingTime;
if (travelledDistance > recordDistance) {
count++;
}
}
if (sum == 0) {
sum = count;
} else {
sum = sum * count;
}
}
return sum;
}
Part 2
function part2(input) {
const split = input.split("\n");
const time = parseInt(split[0].split(":")[1].replace(/\s/g, ""));
const recordDistance = parseInt(split[1].split(":")[1].replace(/\s/g, ""));
let count = 0;
for (let j = 0; j < time; j++) {
const timePressed = j;
const remainingTime = time - j;
const travelledDistance = timePressed * remainingTime;
if (travelledDistance > recordDistance) {
count++;
}
}
return count;
}
Was a bit late with posting the solution thread and solving this since I ended up napping until 2am, if anyone notices theres no solution thread and its after the leaderboard has been filled (can check from the stats page if 100 people are done) feel free to start one up (I just copy paste the text in each of them)
To make it go smaller tick the ignore texture size box
That will make it so you can force it past the texture size

the keep aspect covered is similar but one side will clip out while the other is the right size, and keep aspect with no modifier (and centered) will fit but not take the full button (it will take as much as it can without destroying the texture)
if theres issues with it appearing and you have scale set it might be something to do with the border being too small or sizes being a bit wonky so that it tries to take up the full space but it goes out of the bounds of the parent
I would try it with just a texturebutton like I did there with nothing else as the parent (or a basic control) and just set stretch mode and normal texture and see what happens
Ive temporarily defederated programming.dev from blahaj until the spam wave is sorted and deleted all the comments so we shouldnt get any more of them
When the accounts are dealt with im refederating
list of ones in the top 180 instances we federate with that world doesnt:
- beehaw
- hexbear
- lemmy.comfysnug.space
- lemmygrad
- lemmy.studio
- alien.top
of those beehaw and hexbear are the main big ones
mainly created for redundancy though so we dont have to rely on world. Same reason we started out with !programmer_humor@programming.dev
It does add value, I just said what the value is. The bot isn't just something that points out the opensource community, it's for all communities and it just noticed here youre posting about open source which you are
But yeah open-source is one of the communities I've posted less to recently cause I tend to not get things I can post to it from what I normally browse but I can add some more activity there. Been mainly focusing on building up the language communities and communities that don't even get posts in a week normally
Source is up at https://github.com/PangoraWeb/link-bot
Throw the suggestion over in the suggestion community linked in the post here
If its suggested here its less findable in the future once this gets unpinned
Ategon
0 post score0 comment score
Programming.dev one is currently stuck on the last version we can upgrade to (and looks like lemmings and reddthat as well) since any upgrades just makes photon a white screen due to the tooling upgrade