• Breaking News

    Sunday, February 20, 2022

    I’ve built a fully themeable and accessible heart-shaped toggle switch component for React. [Details in the comments] web developers

    I’ve built a fully themeable and accessible heart-shaped toggle switch component for React. [Details in the comments] web developers


    I’ve built a fully themeable and accessible heart-shaped toggle switch component for React. [Details in the comments]

    Posted: 19 Feb 2022 02:35 AM PST

    It's my first time making a mock up webpage for a future project and i wasn't sure where to post this to ask for advice. What do you guys think about the colors and does everything work alright together?

    Posted: 19 Feb 2022 11:23 PM PST

    I crunched super hard to make this URL shortener for an interview process only to get ghosted lol. The source will be in the comments and I'd love it if you'd take a look and leave some feedback!

    Posted: 20 Feb 2022 01:01 AM PST

    I made a daily maths challenge game - my first finished side project!

    Posted: 19 Feb 2022 09:34 AM PST

    Noob question. Are images on most websites stored on a separate “image server”?

    Posted: 19 Feb 2022 05:15 PM PST

    Let me try and explain my meaning -

    So I was looking at source code for a couple of popular websites and noticed all the images were being called from their own server (something like src=cdn.nfl.com or something is what I'd see). Like a specific image server since it seemed every image came from it. It was source code for old websites circa 2009 as well, maybe it's different now.

    I was wondering if all websites typically kept images in some image database and why it's done that way. Is there any reason not to store all the images on its own servers dedicate for images specifically ?

    submitted by /u/Pubh12
    [link] [comments]

    [HTML] [CSS] How would you overlay text on this nested <div> "background" I made?

    Posted: 19 Feb 2022 05:29 PM PST

    I built a site to showcase freely (and legally) available movies and series on YouTube in a Netflix-like interface

    Posted: 19 Feb 2022 04:55 AM PST

    Return 404 or 403 when a user tries to perform an operation on a resource to which he does not have access?

    Posted: 19 Feb 2022 11:10 PM PST

    Assume you have a User resource which is 1:M with a Task resource. You only want users to be able to perform any operation on a Task if the user is authorized on that task. What do you do when a requesting user attempts to perform an operation on task that does not exist, or that does exist but for which the user does not have access?

    Do you distinguish between these two and raise 404 and 403? Do you instead always return one or the other?

    I've read people say that you should return 404 in order to prevent hackers from learning whether a primary key exists in the database. I think this sounds smart at face value, but upon closer inspection I don't buy it. A hacker cannot cause any harm if he knows a primary key exists unless you have some massive security flaw in your application. And if you have a massive security flaw in your application, it will be exploited whether or not a hacker knows a particular primary key exists in your database.

    I think it is much easier to debug problems if you return the correct 404 vs 403. If you are always raising a 404 even though the error was due to authorization, it is confusing to debug this error and causes more work to resolve it.

    What do you think?


    If the resource exists in the database but the user doesn't have access, the obvious decision is to raise a 403 Unauthorized, but you could also chose to raise a 404 Resource Not Found.

    If the resource doesn't exist at all in the database, the obvious choice is a 404, but you could also chose to raise a 403.

    To make it more interesting, it's also possible to query the row with both the primary key (task_id) and the foreign key (user_id) at the same time, such that if you get no result, you don't know if it was due to the row not existing or due to the user not having access. In this case it is ambiguous and you could chose to raise 404 or 403.


    For example, say you query by primary key (task_id) alone:

    task = Task.get(id=task_id) if task is None: raise Rest404() # or raise Rest403() if task.user_id != get_requesting_user_id(): raise Rest403() # or raise Rest404() 

    But you can also query by primary key (task_id) and foreign key (user_id), in which case it is ambiguous:

    task = Task.get(id=task_id, user_id = get_requesting_user_id()) if task is None: raise Rest403() # or raise Rest404() 
    submitted by /u/chinawcswing
    [link] [comments]

    Need a brief for a website I'll be making for Year 12(Grade 11)

    Posted: 19 Feb 2022 09:21 PM PST

    I have a simple understanding of front end coding (html, css, tiny bit of javascript), and I need to build a website for an assessment over the course of a few weeks. What kind of a website should I build? I have control over the purpose of the site, and I just want it to be simple, but not overly dumb-ified. I mainly want to show off design aesthetics of the site rather than loads of functionality. Any suggestions would help. Any tips/tricks/guides would help too.

    submitted by /u/iatemykeycaps
    [link] [comments]

    Do people actually like back-end dev or just doing cause it pays better than front-end?

    Posted: 20 Feb 2022 02:09 AM PST

    Backend:

    • Pros:
      • It seems that it relatively pays better
      • more positions available
    • cons:
      • It's very raw, no visual joy in it
      • it can get stressful when you seriously get stuck

    Frontend:

    • Pros:
      • You can get creative and it can make you get into the flow state
      • -> thus it might be less stressful in general
    • cons:
      • Pays less ( you need to be relatively more skilled in order to have the same value at a company but since youre enjoying it more you can get more ahead )
      • less job openings

    Front End Dev market is kind of overloaded right now, you can still find a job if you are skilled but no one employs people with less than 2 years of experience, so one way to get there is getting lucky/powering through

    Whereas you still need to be good as a backend developer but companies might be fine with employing you with less experience to start with

    Maybe Im biased but looking at the market in general currently its fairly clear

    submitted by /u/lajos93
    [link] [comments]

    I have problem with overflowing. Code on body {overflow-x:hidden} any ideas?

    Posted: 19 Feb 2022 01:42 PM PST

    Why do media companies build websites and pay for reviews on google maps when they’re not even in business?

    Posted: 19 Feb 2022 06:23 PM PST

    So recently this new website popped up and is ranking on the first page of google next to me and sometimes twice on the first page

    Also they blew me out of the water with reviews. I worked really hard over the last year or so to get all my honest reviews and I had the most. this company shows up one day on Google Maps and gets exactly 100 reviews in 10 days, all from India

    can someone explain this to me because I called them to request their service and I got voicemail and they never called back -so I don't even think they're in business, why are they doing this?

    submitted by /u/MagicAlberta
    [link] [comments]

    Recently redid my portfolio and would love your feedback!

    Posted: 20 Feb 2022 02:36 AM PST

    To take notes or not to take notes, that is the question!

    Posted: 20 Feb 2022 02:23 AM PST

    I'm studying on Udemy and watching videos compared to reading books seems to work better for my brain. I think I feel much more engaged with the videos, and I can see finally some progress.

    After I ended a video of almost forty-five minutes which was explaining a difficult topic, I noticed that most of the things said in the beginning, which I was sure to have understood and memorized, just disappeared from my mind, completely, erased from my brain. 🤯

    Now of course, after rewatching the video a couple of times it all stayed there, sealed inside my head. It was at that moment that I thought about this dilemma. Should I start to take notes? Yes I know usually this is what one is supposed to do, and I was even doing it in the first place but video after video I noticed myself taking always fewer notes. Some programming concepts are absolutely a nightmare to write down, like code snippets which can't be explained if not by writing them as they are. Yes, one can create a summary of a specific topic but still at that time, it seemed so useless. I also have to say that I don't remember the last time I have looked back at my notes.

    So I ended up thinking of notes taking while studying programming ( especially programming ) as a waste of time. Now I ask you guys, what do you do? Do you take notes? If not why? If yes why? And How?

    submitted by /u/RavenJe94
    [link] [comments]

    How to force https requests to http while developing with only an IP address (no domain, and this no SSL)?

    Posted: 19 Feb 2022 10:20 PM PST

    *(and THUS no SSL)
    So I am setting up a backend with nginx, but we dont have a domain yet, and since we are using the bare IP address, I cannot get ssl certs. I already have a folder full of sites I have moved in for testing. The problem is that many sites are using https requests to fetch its assets and stuff from its folders, which fails because there is no https server. Is there a way to tell nginx to redirect all requests to http? My guess is that because we dont have a domain, nor ssl certificates, I cant even create a 443 server block that would receive anything in order to redirect in it. Or can nginx 443 blocks still receive traffic, but just not have certs in this case? If nginx cant receive the requests at all, is there a browser extension, or some other way to say "on this website ip address, convert all requests to http"? I work at a billion dollar company, but they are hesitant to just FUCKING BUY a domain for testing.

    submitted by /u/ManWithThe105IQ
    [link] [comments]

    How do you keep track of all the work you've done at your company ? Specially when you don't use GitHub for commits ?

    Posted: 20 Feb 2022 02:02 AM PST

    My friends pointed out to me how the graph under their GitHub is green almost throughout the year because of all the commits they do there during their work. My company doesn't use GitHub, they use bitbucket and everything is under lock. I'm pretty new to this and this is my first job. Any trace of the work I've done can be seen in the sourcetree or jira which is private. How do I show all the work I've done to someone outside the company ?

    submitted by /u/LiquidSwords-_-
    [link] [comments]

    .sql files, jsons, or any other data for the Olympics?

    Posted: 19 Feb 2022 09:49 PM PST

    Does anyone where know where I could find data on the olympics to build a database? Data can cover many years or just one olympic event, not really picky about the data.

    submitted by /u/Grahf0085
    [link] [comments]

    Has anyone ever created a web synthesizer using React + Tone.js + React NexusUI?

    Posted: 20 Feb 2022 01:12 AM PST

    Hello, finishing my coding bootcamp I chose as a project to create a web app of a synthesizer using these technologies:

    React, Tone.js and the React wrappers of NexusUI https://www.npmjs.com/package/react-nexusui

    https://nexus-js.github.io/ui/api/#intro

    https://tonejs.github.io/

    I have found major obstacles in connecting the React NexusUI elements with the sound engine of Tone.js and I feel there is no help at all online, as probably I am the first person ever to do so. There are no examples to follow from others who have done the exact same thing, no tutorials, to guides nothing.

    So my question is, has anyone ever done this? Is there any working code I could have a look at and undrstand how could I implement a combination of these technologies myself? Thanks a lot.

    I feel so alone.

    submitted by /u/mickkb
    [link] [comments]

    Can one visitor crash my Heroku server for everyone?

    Posted: 20 Feb 2022 12:59 AM PST

    I know my localhost node server can crash and I have to restart it (due to logic errors that I have since fixed), but I'm wondering how this would work if I deploy it on heroku and there's an error I missed. Will a user that encounters it crash my site for everyone? And, would Heroku restart it automatically for me?

    submitted by /u/competetowin
    [link] [comments]

    [Noob Question] Is it considered cheating to use external libraries for css animations?

    Posted: 20 Feb 2022 12:59 AM PST

    Hello everyone! I'm just getting started learning CSS animations. I was trying to recreate an on scroll transition and was recommended an external library to make it easier (since I don't know JS yet).

    My question is, is this considered cheating or bad practice? If future employers see that I used an external library in my projects - instead of doing it completely from scratch - does it make me look incompetent? Thanks in advance!

    submitted by /u/blissful_chaos44
    [link] [comments]

    How to create custom Bootstrap JS bundle with Gulp?

    Posted: 20 Feb 2022 12:51 AM PST

    Before I used Gulp task to grab only the stuff I needed, if I don't need a component then I would just comment out that file. Now I am not sure how to do it properly in Bootstrap 5.

    I believe that files inside "dom" folder are necessary? What do they do? Also what does button.js do?

    In the docs (https://getbootstrap.com/docs/5.1/getting-started/javascript/) it says "Plugins can be included individually (using Bootstrap's individual js/dist/*.js)"

    Anyway, bundle gets created but Bootstrap JavaScript is not working at all (for example Accordion).

    gulp.task('js', function() { const jsFiles = [ nodeFolder + '/bootstrap/js/dist/dom/data.js', nodeFolder + '/bootstrap/js/dist/dom/event-handler.js', nodeFolder + '/bootstrap/js/dist/dom/manipulator.js', nodeFolder + '/bootstrap/js/dist/dom/selector-engine.js', nodeFolder + '/bootstrap/js/dist/base-component.js', nodeFolder + '/bootstrap/js/dist/button.js', nodeFolder + '/bootstrap/js/dist/carousel.js', nodeFolder + '/bootstrap/js/dist/collapse.js', nodeFolder + '/bootstrap/js/dist/dropdown.js', nodeFolder + '/bootstrap/js/dist/modal.js', nodeFolder + '/bootstrap/js/dist/dropdown.js', nodeFolder + '/bootstrap/js/dist/offcanvas.js', nodeFolder + '/bootstrap/js/dist/popover.js', nodeFolder + '/bootstrap/js/dist/scrollspy.js', nodeFolder + '/bootstrap/js/dist/tab.js', nodeFolder + '/bootstrap/js/dist/toast.js', nodeFolder + '/bootstrap/js/dist/tooltip.js', ]; return gulp.src(jsFiles) .pipe(prettyError()) .pipe(plumber({ errorHandler: onError })) .pipe(babel({ presets: ['env'] })) .pipe(sourcemaps.init()) .pipe(concat('bundle.min.js')) .pipe(uglify({ compress: true })) .pipe(sourcemaps.write('./', {includeContent: true})) .pipe(gulp.dest('./assets/js/')); }); 

    Maybe Babel doesn't work as it should? I have tried a few other stuff like removing presets in Gulp task and placing the following in .babelrc

    { "presets": [ ["@babel/preset-env"] ] } 
    submitted by /u/shkico
    [link] [comments]

    What part / stage of being a Full stack Web developer requires the most learning in the initial stages?

    Posted: 20 Feb 2022 12:41 AM PST

    There's full stack, Back end; and then a bunch of stuff inbetween equally important to learn for the parts to fit together.

    Assuming that you joined the JavaScript train; excluding markup languages with the exception of some important frameworks (I'm new so I don't really know what exactly exists yet) & and other things.

    Where will the majority of learning take place? Is there some other language on the back end of things that is equal to the investment required to learn JavaScript. Or is all the emphasis skewed towards JavaScript meaning that it is primarily the main focus?

    I'm not at the end yet, but wanted to know how I should structure my expectations so that I'm prepared.

    submitted by /u/SmoothYado
    [link] [comments]

    Open-source flow/node editor alternatives

    Posted: 20 Feb 2022 12:08 AM PST

    Are there any alternatives to GoJS (or yFiles) that supports creating flows, nodes and most importantly multiple connections per in/output and the routing aspect (not only connecting two nodes with a spline but with a routed line that can be dragged and modified).

    It seems like all frameworks that I found do not support all of that. Litegraph can't be easily modified for multiple connections on a single input. Rete only has sprites.

    (I haven't tested mxGraph, since it seems to risky to start with a non continued library for a bigger project, but maybe that's a mistake?)

    submitted by /u/kchnkrml
    [link] [comments]

    I created online multiplayer real time bingo game with django channels and websocket (source code in comment)

    Posted: 19 Feb 2022 03:21 AM PST

    CSS Selectors vs XPath

    Posted: 19 Feb 2022 11:58 PM PST

    If I have HTML like <div class="a b c">...</div> how can I get this element by class c?

    Two options:

    1. CSS Selectors: div.c
    2. XPath: //div[contains(concat(" ", normalize-space(@class), " "), " c ")]

    Decision what to use is obvious.

    submitted by /u/LongLiveGOSR
    [link] [comments]

    No comments:

    Post a Comment