[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: firefox waifur.jpg (912 KB, 1600x1200)
912 KB JPG
firefox waifur edition

>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your best friend for fundamentals
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flukeout.github.io/ - Learn CSS selectors in no time
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.js
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go
https://quii.gitbook.io/learn-go-with-tests - Learn Go with Tests

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

/wdg/ may or may not welcome app development discussion. You can post and see what the response is. Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.

We have our own website: https://wdg-one.github.io

Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, PostgreSQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet

Previous:
https://desuarchive.org/g/thread/109674252
>>
asp.net core razor pages are comfy af
>>
Is https://1984.hosting a good place to buy a server for my website or no? Thanks in advance /wdg/.
>>
The penpot mcp is bretty good. And its completely self hostable too
>>
>>109736653
It begins
>>
p.10 no
>>
>>109780550
interdasting
>>
>>109780550
can you briefly explain he data? I see some IPs? why are there 2 pairs?
>>
>>109782350
So, the way I do it I litter my page with `display: none` links to a hidden page. These links include a base64 payload that contains the requester IP and a unique id 'salt' (react's useId()) so every link is unique. If you follow the link, you end up at a nofollow,noindex(meta robots/X-Robot-Tag) page disallowed by robots.txt, with even more hidden links. If you follow them deeper, the final requester gets ip banned on the firewall level. The links store whole ip chain and that's what you are seeing. Right now the bots only went one level deep, but that's to be expected. It looks like they hold a fairly long queue of links to go through visit and it took them about 30h to start quering first honeypot links. There is way more these trap links than normal links right now so I expect the poisoned links to propagate through that queue in the following days and they should start getting banned one after another. The fact that one IP generated these links but another entered it hints that this is in fact a botnet, quite big too. Well behaved bots like google also entered that first honeypot page, but they use same IP and should just back off as soon they realize this isn't a page for them.
I will post the live ban list csv if this method turns out to be effective.
>>
>>109782585
botnets with infinite IPs, my tinfoil is now glowing, could this be coloudflare big net of extortion?
>>
>>109782648
Nah, it looks way more like an aggressive scrapper than intentional DDoS. All the ips are from random datacenters. I think it's just a really dumb scrapper for AI training getting confused by my no-js friendly searching UI.
>>
>>109782674
whatever it is ur doing some cool shit pham
>>
mainenance bump, keep it bumped guys
>>
>>109782648
it's ai scrapers
facebook is especially guilty of this, but of course the usual suspects as well
i wouldn't be surprised if cloudflare is in on it as well, obviously
>>
>>109782585
Clever shit.
>>
>>109785093
>facebook is especially guilty of this
elaborate pls
>cloudflare is in on it as well, obviously
wouldn't they be ddosing though?
>>
>>109779268
uhh bros? how the fuck am i able to compete with this? https://x.com/supabase/status/2097999894632149229
>>
furfix
>>
in sweden it is forbidden by law to be a criminal
imagine if privacy nerds were in charge of running the internet, no amazon, no spy cookies, privacy enforced by law
>>
bupn
>>
Shoe me ur mlg 420 noscpe regex
>>
>>109788186
>elaborate pls
not much to elaborate, they are well known for having scrapers that ignore robots.txt and being unnecessarily disruptive and heavy, as in ddos-tier
>>
>>109792104
>as in ddos-tier
that is key, I guess they're trying to disguise it then... it's affraid
>>
>>109789718
about that
>>
:: Fuze Mediaboard ::
dev:: onionschan
tools:: C++, Boost
link:: https://fuze.page/software/mediaboard
repo:: https://github.com/Liteb0t/Mediaboard
progress:: 0.2 - 9/11 remembrance release:
- Added "Live" page, where users can create a "Room" to share video or audio, like a Discord voice channel.
- Server can now have multiple "boards", and like existing Threads, they have customizable permissions.
- Split into two separate projects. The new splinter, FuzeHttp, is the C++ web framework on which Mediaboard stands.
- Refactored C++ code to use modules.
- Implemented cache control.
- Moved all configuration from `tokens.m4` to runtime at `config.ini`.
- Replaced boost::filesystem with std::filesystem
- Started work on adding thread-safety. Multi-threading is still experimental.
- Improved input validation.
- Changed license from MIT to Fuze Human-oriented License v1
>>
>>109793530
tell us about the architecgure choices and why, briefly, yes this is a job interview
>>
>>109793634
You're telling me the graybeards saying I should be making ADR's weren't just being annoying?
>>
>>109795601
I'm drunk, about the gaybeards I'm glad I didn't know them, but kiss is indeed king
>>
bupn
>>
>>109793634
I wanted a C++ backend because it's my favourite programming language. I specifically looked for a library which had websocket support, and settled on Boost::Beast.
For frontend I want an SPA but am avoiding framework/webpack bloat.
>>
>>109797022
hired
>>
>>109797026
I don't feel hired
>>
>>109797054
yes, this was a simulation, go get the irl deal
>>
So I have the basic layout for my site down but it looks ugly as fuck and I don't know how to fix it. Any suggestions?
>>
>>109797199
Show me your code
>>
>>109797208
I got tired of running into bugs so I decided to work on the UI. I'm not really a programmer (I'm an artist) but I want to make a textboard with live posting.

https://pastebin.com/KGxf1pGq
>>
>>109797240
Thanks.
I think the easiest fix is to add padding to some classes, so text is not grazing the edge. Also, limiting the width of the main content container makes it easier to read, but navbar can remain fill width.

I don't agree with the gray text on gray background.
I don't agree with such a bright colour for the board header; it draws attention away from the threads.
I don't agree with having a grid for threads rather than a list.
>>
bupn
>>
>>109797297
I changed the text color to be a bit lighter. I want the threads to be in a grid because I don't like the index view. I want it to be more like a catalog. I am not sure what to change the board header's color to.
>>
File: 1789214894359184_edit2.png (83 KB, 1906x474)
83 KB PNG
>>109797793
here's how I would do it
>>
File: 1789214894359184_edit2.png (85 KB, 1906x474)
85 KB PNG
>>109798262
Actually to align padding better
>>
>>109798302
I'm not sure how to fix the padding. I also like the bottom progress bar being seamless.

What do you think about this theme? I wanted it to be the light theme.
>>
>>109798324
Looks too busy, and text contrast is off in places.
Learn CSS - it's easy and it's fun.
>>
>>109780550
>>109782585
And now they are properly falling for it.

Banlist live: https://funmaker.moe/badbots.csv

>>109785093
Facebook scrapper appear to use proper user agent and respect robots.txt so far. So far no well named bot triggered ban, some just entered the first honeypot layer and left when they realized it's not for them.
>>
File: brrrt.jpg (73 KB, 583x827)
73 KB JPG
>>109798747
>>
>>109793530
Interesting.
>Changed license from MIT to Fuze Human-oriented License v1
I've sometimes thought that if I were to open source something, I might use the AGPL, so that blood-sucking corporations can't benefit from my work for free. Or I could just not open source anything, and retain all the source code for myself.
>>
page 10 no
>>
>>109797199
the squareness of the page in contrast with the rounded corners of the input box trigger my autism hard
>>
>>109799149
If you're going to AGPL it, you're throwing the baby out with the bathwater. No sane indie developer will use your code, while Google may happily have a team of jeets reimplement it in 2 weeks, and it will be used to train AI either way. You might as well put all rights reserved, no modification allowed on your code. Not open-sourcing is also legit and understandable. AGPL is snake oil for people who want to LARP as "open source" without actually giving people freedom to use their code and wanting to actually releasing it as "freeware" without calling it as such.
>>
>>109801005
That's not autism, that's called taste
>>
>>109801604
kind of agree, would be cool if you dropped your namefagging in this general honestly
>>
>>109801604
is not taste if not shared by some people
>>
bupn
>>
>>109804710
a design rule broken without any sense of purpose looks like faulty taste
>>
>>109805761
no
>>
Why has every VPS provider increased their prices significantly this year

At the beginning of this year I could easily get a VPS with just 1 GB of RAM, but now the cheapest ones have 2 GB or 4 GB of RAM, which raises the price

Yes of course the AI hype bubble means computer parts are being bought up, raising the price of all computer parts, but VPS providers could still offer a VPS option with 1 GB of RAM for less money than a VPS with 2 GB of RAM, and they choose not to, because they're bastards
>>
>>109806131
I heard here that the first price hike was due to competence with AWS, but the price rise due to hardware costs sounds just logical
>>
>>109807458
Yeah I guess it's because of hardware costs, but it's annoying that they no longer offer VPSes with 1 GB or 2 GB of RAM. I'm pretty sure Ionos had both of those back in January, but now their cheapest one comes with 4 GB of RAM, so you have to spend more money.
>>
>>109807504
that's fucked up really
>>
>>109779268
https://github.com/ran-sama/firefox-preferences#useful-addons--extensions

only these
>>
>>109808353
ignore, was supposed for the firefox extensions thread
>>
lels how much are company laptops going to cost from now on?
>>
You ARE using LLMs to write code, right /wdg/?

One thing that annoys me though is how rich people can easily pay for access to the strongest LLMs, and therefore they have an advantage in programming

In the past the only limit on your programming ability was your own mind, but now your wallet is a factor too
>>
File: hz86oh77ivnh1.png (380 KB, 828x856)
380 KB PNG
Gonna use Deno for my production app. The security model is excellent (looks a lot like OpenBSD pledge) and the Web API adherence is great for fullstack.
Using actual File, Request, and Response objects from MDN on the server side is great.
>>
>>109810214
No
>>
>>109810214
I was forced to use Claude Code at work. I was unimpressed by the performance of Opus, but after switching to Fable I rarely find bad code. The main problem of skill erosion remains, so for my personal projects, I only use AI for documentation and review, not code generation. I am in the process of giving Astra read-only access to my project for security and performance review, and to get faster feedback on what the official doc of various tools say.
>>
>>109797793
i ditched this color scheme
>>
>>109810698
wow thats pretty good, im gonna steal it
>>
>>109810698
What's the gimmick and do >> work
>>
>>109813045
gimmick is a secret until im finished with it only because it is novel but stupid simple to implement. if i told you now someone experienced could build the whole site within a weekend lol. > works but you reference posts with @
>>
>>109813138
Nothing wrong with keeping secrets btw, I was just curious
>reference posts with @
Yikes... although I'm pretty sure tinychan does that too
>>
>>109810698
I like this one
>>
>>109815520
could be worse
>>
I'm two tired and mentally unwell to do code challenges lmao, luckily I'm on vacations just this week... time to grind that cert
>>
Does account-less posting, like imageboards, have a future or are accounts the future to curbstomp abuse like spam
>>
>>109817107
there are some chans that barely show u captchas, so I guess it depends on the amount of users and kind of users
I don't know if I'm speaking nonsense, but MAC address whitelisting, to compensate for dybamic IPs sounds like a plan. guess the question really is, can JS and/or BE read MAC addresses?
reading mouse input to determine if a user is an humand sounds dope too
idk, the fuck do I know
>>
>>109818299
>I don't know if I'm speaking nonsense
>MAC address whitelisting
A MAC address changes on every hop the packet takes. Open up wireshark and you will see they all have the same MAC address, namely your router (I'm making some assumptions about your net).
>>
>>109818468
>A MAC address changes on every hop the packet takes
there should be a sender address somehow maybe? I remember not for web but for software (quiet the difference, but I wonder) people were going with MAC spoofing, I wonder if sender/client address is something that can be obtained in a web context
>>
File: 1779831997687420.gif (753 KB, 220x347)
753 KB GIF
2 month unemployed, things seems to be really grim. already considering going back to college for another degree.
>>
>>109820643
yeah, thatll do it. if you get another degree you definitely cant be replaced by chatgdpoo
>>
>>109820643
>2 months
kek amateur
>>
>>109820643
job market looks fucky, did u just graduate or have u got job experience
>>
how's the job market looking from where u are?
I get ok offers, but I'm not sacrificing 4 days a week remote for a maybe and in office role
>>
>>109822613
8 years of experience
>>
>>109823986
shit, now that's fucked up
>>
>>109823966
I have 1 office day/month, and my salary is kinda meh but I'm the same as you. There's no way I'm giving away my life for more money. Every position advertised has 3 in-office days.
>>
>>109824053
I have some cards to play, but I have to first get this god damned cert, and I'm slacking too much on my table
>>
>>109810698
dark mode and i am finally working on thread creation. surprisingly easy with ssr. i am probably going to launch a mvp by the end of the week and just add qol updates over the coming months
>>
>>109820643
I was 1 year unemployed but got lucky this year and got a frontend dev job.
stay strong bruv
>>
>>109824985
you probably want to add mod tools before that
>>
>>109825721
how can i create mod tools before creating the things that need moderation? im planning on having a global site settings, a mod action log, a user info page, a report queue, and an appeal page. anything else you would suggest?
>>
>>109826127
>how can i create mod tools before creating the things that need moderation?
i meant adding mod tools after you're done with post functions and what not.
>anything else you would suggest?
im guessing you're already planning on adding post deletion and banning, (if you havent already) maybe add thread locking and pinning?
for future stuff, if you plan on adding file support, you probably want to hash the files so they can get blacklisted, also scrub their metadata.
flooding prevention would also be good, alongside link filtering (or just general word filtering).
make sure to add a content policy to the page to prevent xss attacks, its not hard to do, its like 2 extra lines of code on a server config, im pretty sure they can be added to the meta tags of a page aswell.
on that same note, you might want to setup fail2ban if you havent already
>>
idk how you guys do this for a living programming is annoying as hell
>>109826920
thanks for the advice, the content policy thing fucks up my css because i have some inline css. i want the site to be secure so ill have to change it
>>
>>109827402
i feel your pain, cors is a bitch to deal with, for now id just recommend leaving the policy header to disable all href javascript.
inline css probably isnt all that dangerous (if you're handling your data properly anyways).
>>
>>109827402
Skill issue
>>
Page 10

Let's talk about web dev some more. I'll start:

Modern browsers are so much fucking better than the shit we used to have, like IE
>>
>>109830320
>like IE
a bit unfair, it was the niggest browser, nowdays we have safari fighting for the shitness crown
>>
>>109827726
>/v/ideogoomer meme
enjoing the unemployment brub?
>>
File: 1409901609892.jpg (43 KB, 372x372)
43 KB JPG
>>109831552
>>
>do a js challenge that ai gave me for me to solve
>comes with a set of test inputs and expected outputs
>ai tells me that it fails at one set
>it doesn't
>ah ok the usual ai brainrot
>try with paid ai my work provides
>same shit
they need to spend just like treefiddy more billions into this
>>
File: file.png (86 KB, 765x904)
86 KB PNG
>>109779268
I recently learnt that you can get the depth of an element using alternating variables in pure css: https://kizu.dev/self-modifying-variables/
>>
>>109831546
Yeah Safari probably is the worst these days, but I don't think it's as bad as IE was. If I remember correctly, Microsoft just refused to implement proper web standards and just did their own thing, so if you made a website according to the standards, it wouldn't work in IE. Chrome was a gigantic improvement when it came out. Safari sometimes lags behind these days but I don't think it's too bad. E.g. iOS and Safari support PWAs, even if Apple doesn't seem thrilled about supporting them.
>>
>>109832526
>but I don't think it's too bad
the fact that ff behaves better than safari IN MAC speaks volumes
>>
>>109832526
>>109832576
https://caniuse.com/
>>
>>109832788
I knew this from long ago, but good resource for the newbies
>>
File: what_the_dog_doin'.jpg (14 KB, 286x277)
14 KB JPG
>>109832206
In soviet russia web developers solve the js challenges that gpt gives them

console.log(findMissing([1, 2, 4, 5, 6])) //  3 console.log(findMissing([2, 3, 1, 5])) //  4


here it is for all you to give it a try, I solved it with traditional for loop, wonder if there's a more elegant way to solve it without it, I did it like this because of the index, and the limitations of forEach, etc.

I'll share my solution later on
>>
File: 1699824211642500.jpg (63 KB, 720x716)
63 KB JPG
>>109832206
In soviet russia web developers solve the js challenges that gpt gives them
console.log(findMissing([1, 2, 4, 5, 6])) 
// 3
console.log(findMissing([2, 3, 1, 5]))
// 4


here it is for all you to give it a try, I solved it with traditional for loop, wonder if there's a more elegant way to solve it without it, I did it like this because of the index, and the limitations of forEach, etc.

I'll share my solution later on
>>109833168
re-try without fucking up the formatting
>>
>use Claude code to shit out CRUD apps aimed at extremely specific markets with technically inept people
>retire
Is it really that easy?
>>
File: 1782810003549502.png (399 KB, 975x990)
399 KB PNG
So, what are your guys plans for the future? I know I won't retire from working as a software developer, shit I might not even be working with it in the next five or six years.
>>
>>109833633
>So, what are your guys plans for the future?
get into a sector that needs humans 100%, and I'm not talking construction worker, also, wtf do I know
>>
>>109833633
Do this >>109833574 to save just enough to go back to school and become an actual engineer. Tons of nuclear and niche material manufacturing jobs in my area.
>>
>>109833697
I can't bring myself to do it. I know I should but I couldn't live with myself increasing the amount of AI slop in the world.
>>
>>109833697
>just work in nuclear and have a cancer baby lmao
future looks so bright my eyes just melted from the radiation
>>
>>109833725
I could also roll up in the fetal position and do nothing. Sounds gay though
>>
>>109833747
how about non radioactive jobs?
>>
>>109833810
Every job is radioactive in its own way
>>
>>109833114
I remember checking weekly for the has() relational selector to finally drop across al major browsers. Not fun times.
>>
>>109833863
silly thing to say about nuclear jobs
>>
>>109834296
>has()
what was the time-range for that, was it a CSS selector not that long ago which was "new" then?
>>
>>109834370
2-3 years ago? Before that, you used JS.
>>
>>109834493
I remember seeing that and thinking
>I don't need that
css selectors are OP as fuck
>>
File: 1789147984992516.jpg (67 KB, 680x511)
67 KB JPG
>>109833168
>>109833525
Fully immutable FP version, I return a Set instead of a single number because sets encode belonging: the missing value(s) belong to the logical set of missing numbers in the sequence from min to max of the array.
const findBoundsReducer = ({min, max}, num) => ({min: Math.min(min, num), max: Math.max(max, num)});

const findMissing = (nums) => {
const {min, max} = nums.reduce(findBoundsReducer, {min: Number.MAX_SAFE_INTEGER, max: Number.MIN_SAFE_INTEGER});
const allNums = new Set(Array.from({length: 1 + max - min}, (_, index) => min + index));
return allNums.difference(new Set(nums));
};
>>
>>109834766
it doesn't seem to work with the sample set pham, returns {}
>>
File: js-repl-result.png (30 KB, 790x189)
30 KB PNG
>>109834912
Maybe a copy-paste error on your part, or you're using an old browser without the Set difference method.
>>
>>109834941
you're right tried it on the console and worked. I used jsfiddle previously
your example confuses the fuck out of me, why the mins and the max? this is way simpler with a traditional for loop and an if
>>
>>109834983
post your solution so anons can check it out
>>
>>109834991
I will, tomorrow ;^) or maybe today if we get more examples
I'll say why I chose a traditional for loop, because I needed "prev" "next" approach, and for that, to do it in a clean way you need the index and a trick or two more
>>
>>
>>109826127
let me post nigger before you rule stuck your site
>>
bupn
>>
>>109834983
>why the mins and the max?
Does your solution work for the following case: [4, 5, 6, 8, 9]
Logically it should return 7 right?
>>
>>109837560
yes it should, I'll try later, but I don'tthink mine fails
>>
as a backend guy, what's the easiest way to get into frontend (with AI) so that I can call myself fullstack? Lots of jobs in my area demand fullstack and pay better than backend.
>>
>>109837646
I'll post it in a few hours, sad hoped to get more people trying
clankerGPT managed to teach me a thing or two ironically
think I should bite the bullet and go leetcode or some shit
>>
>>109838199
Just put react on your resume and learn very basic shit about it. Since you have backend skills already it’s way easier to get fullstack jobs than if you were front end only
>>
What if web dev really is over and I have to get a real job like working as a bin man (or garbage collector as I imagine Americans probably say)
>>
>>109839598
We usually say garbage man or trash man.
>is webdev over?
COBOL was invented with the explicit goal of eliminating the need for full time programmers, because it allegedly made it easy enough for business-minded people to do programmers’ jobs.
>>
File: 1716628637170367.jpg (11 KB, 248x199)
11 KB JPG
>>109833525
>>109833168
>>109834766
>>109837560
const findMissing = nums => {
for (let i = 1; i < nums.length; i++) {
const prevNum = nums[i -1]
const currNum = nums[i]
if(currNum !== prevNum + 1) return prevNum + 1
}
}
console.log(findMissing([1, 2, 4, 5, 6]))
// 3
console.log(findMissing([2, 3, 1, 5]))
// 4
>>
>>109833525
def find(xs)
xs.size.succ * xs.size.succ.succ / 2 - xs.sum
end
>>
>>109839847
>find
smart this could work in js too
>>
Best back-end language: Go
Best front-end language: TypeScript

Prove me wrong

You can't
>>
>>109841338
Typescript for all. Shared codebase, SSR React, universal hot module replacement.
No need to overcomplicate things.
>>
>>109841442
>browser scripting language running anywhere but the browser
>>
>>109839187
where were you 24hs ago? I just missed out on a $200k job offer because I said "I'm only backend but I could learn frontend too!". $200k in EU mind you, I'd be living like a king.
>>
>>109841442
>Wanting the single greatest vector for supply chain attacks on your BE.
Not even if Typescript made it's typing stick around at runtime.
>>
>>109841803
>Wanting the single greatest vector for supply chain attacks on your BE
I'm taking about TS, not Go.
>>
>>109841808
TSshart.. your compiler is written in go
>>
ah the good ol' lang/fw flamewars, pure cancer but keeps the general bumped
>>
>>109842233
>your compiler
Mine? The only compiler I ever wrote was made in C with bison+flex.
>>
LLMs are truly are AGI!
import { useMemo, useState } from "react";

/*
Saar, with very humble respect, this component is making Fizz Buzz
from number 1 until the number which you are entering.
Please accept this small programming offering.
*/
export default function FizzBuzz() {
/*
Saar, this state is remembering the ending number.
It is beginning with 100, because this number is nice and respectful.
*/
const [limit, setLimit] = useState(100);

/*
Saar, this function is deciding what word each number shall receive.
Number divisible by both 3 and 5 is getting FizzBuzz.
Divisible by only 3 is getting Fizz.
Divisible by only 5 is getting Buzz.
Other number is staying as number.
*/
const fizzBuzz = (number) => {
if (number % 15 === 0) {
return "FizzBuzz";
}

if (number % 3 === 0) {
return "Fizz";
}

if (number % 5 === 0) {
return "Buzz";
}

return number;
};

/*
Saar, useMemo is politely preventing the list from being remade
when React is rendering for unrelated reasons.
*/
const sequence = useMemo(() => {
const safeLimit = Math.max(1, Math.min(Number(limit) || 1, 1000));

return Array.from({ length: safeLimit }, (_, index) =>
fizzBuzz(index + 1)
);
}, [limit]);

/*
Saar, here is the visible part for the honorable reader.
*/
return (
<section
aria-labelledby="fizz-buzz-title"
style={{
fontFamily: "system-ui",
}}
>
<h2 id="fizz-buzz-title">Fizz Buzz</h2>

<label htmlFor="fizz-buzz-limit">
Saar, please enter the ending number:
</label>

<input
id="fizz-buzz-limit"
type="number"
min="1"
max="1000"
value={limit}
onChange={(event) => setLimit(event.target.value)}
/>

<ol>
{sequence.map((value, index) => (
<li key={index}>{value}</li>
))}
</ol>
</section>
);
}
>>
>>
>>109824985
Dunno how you structure your css but I do have a suggestions for themeing: use Variables
example of css:
@import url("colorsheets/blue.css");

html,
body {
background: var(--bg);
color: var(--text);
}

example color file:
:root {
--bg: #060913;
--surface: #0f1626;
--subtle: #17223b;
--hover: #203052;
--border: #1d2b49;
--text: #e2f1ff;
--muted: #627799;
--blue: #00f2fe;
--blue-hover: #4facfe;
}

Makes themeing faster and you don't have to destroy old color schemes
>>
>need to do a report on 3rd party saas
>i tell the ai to do it
>it compares the pricing and puts them in a markdown table
>mfw the nobody visits websites anymore guy was right
Bros..
>>
File: chuds.jpg (122 KB, 1200x900)
122 KB JPG
Choose your fighter
>>
>>109798747
What are the three IPs? Is it:
1: home page
2: the nofollow,noindex page (even though this page is itself disallowed by robots.txt?)
3: the pages referenced in above
Clever idea.
>>
>>109848596
1. any legit page that contains generated honeypot links(rel="nofollow")
2. honeypot page that contains 2nd order links(page denied in robots.txt, meta robots/X-Robots-Tag "nofollow,noindex", links rel="nofollow")
3. the requester pursued any of the links above
I require 3 hops because crawlers refresh robots.txt rarely and so facebook and google went there pretty quickly.
I also underestimated just how many ips these crawlers have. They were getting banned all the time but requests kept going. I eventually parsed 70G of access logs(just from last few weeks) into postgresql, did some heuristics and banned over 600'000 malicious IPs. The ban list is on 623'058 entries now, I had to swap ipset in firewall because it maxed out on default settings.
>>
>>109848837
>that last section
Insane. Thanks for the added information.
>>
fuck them
>Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different nodeLinker mode or to a different package manager.
>>
File: 1788732909360622.jpg (59 KB, 415x571)
59 KB JPG
>>109839730
Your code stops at the first spot where there isn't a simple +1 increment from left to right and returns the left hand side plus one. It assumes the array is always sorted and only has a single missing spot. It only returns the correct output for the second case by coincidence: it just so happens that the first non simple increment has its left hand side equal to the missing number minus one. Here's some inputs where it breaks:
[10, 9, 8, 6, 5]
[1, 3, 2, 5]



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.