/wdg/ -web development general

retarded babby edition
Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap (don't be overwhelmed, ignore the later parts and go step-by-step)
youtube.com/watch?v=UnTQVlqmDQ0

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages
pastebin.com/gfBPg24A - Collection of PHP links.

>Need help with some HTML, CSS or JS?
jsfiddle.net - create an example here and post the link
codesandbox.io - or here if you're using React/Angular/Vue

Attached: ItsAllSoTiresome.png (1500x1167, 1.4M)

Other urls found in this thread:

twitter.com/mjackson/status/1165719662652313601?s=19
github.com/gaearon
twitter.com/heydonworks/status/1164506235518910464
daveceddia.com/watch-out-for-undefined-state/
atom.io/packages/language-cshtml
videojser.x10host.com
nyaa.si/view/1169520
easytechguides.com/remove-hardcoded-subtitles-from-mkv-video-files.html
twitter.com/SFWRedditGifs

why the fuck is this inline-block expanding to the height of the text
am i a retard

Attached: BULLSHIT.png (352x181, 13K)

Oh cool wdg is finally up.
What's the largest datatype in nodejs? I want to store about 256 mb of base64 data with a single variable, what could possibly pull this off? If it's necessary, I use mongodb with mongoose to access it.

Bros how do I get a remote job,, I live in a meme country and devalued money made me 50%poorer overnight I wanna get paid in real currency but all those remote job postings ask for a shit load of xp, I have less than a year of webdev stuff. Any help? I apply but get rejected by the bots like five minutes after

docker is dead, install podman.io

docker has the cutest mascot

looks like a grid thing to me rather than the block itself

>few years from now
>podman is dead, install fagtron.io

use indeed

that's the beauty of it, with podman you're using standardized tech and can easily use any replacement that shows up interchangeably
docker is dead, containers are alive and blossoming

You can do that with a Buffer.
But you definitely ~don't~ want to do that. There's just no point in storing 256M of data in a single variable. Just use Streams, that is literally their purpose.

there's no grid or flex on this part of the page

>Unfortunately, some fellow speakers pointed out that their speaker selections for this year included zero women. There were numerous speakers with 2 sessions (myself included) or a workshop and a session, but no women at all.

KEK

why does identity politics always have to ruin everything?

Oh, in other news, a bunch of guys that worked on react js disabled their accounts. Not sure why though

twitter.com/mjackson/status/1165719662652313601?s=19

Attached: Screenshot_2019-08-26-12-54-44-667_com.twitter.android.png (1080x1920, 271K)

and as a result: another woman left the STEM field lmao

Attached: Screenshot_2019-08-26-12-56-46-485_com.twitter.android.png (1080x1920, 295K)

I just did a coding challenge for a company. They want me to submit it as a git patch. I've never done this, but I just generated my git patch file. Do I now zip it up and send it to them? It looks like this patch file is just created locally.

Most likely, yes.

A patch file is just a file that contains the diff of all the changes of tracked files in the current branch. I'm assuming they'd download the patch file and look at the diff.

If they do already have a repository that you have access to, you may need to branch out and push to their repository but it doesn't sound like that because it specifically stated "patch"

I think you're right. They just stated to checkout a branch, commit before and submit through a patch file. The only reason I was hesitant is because the challenge is a public repo, but there is no instructions to push any changes.

Does everyone in here use the Apple Macbook Pro with Retina Display?

>Enjoy an industry without me.
Oh I will. Please convince your koder girl friends to do the same.

>a bunch of guys that worked on react js disabled their accounts.

github.com/gaearon
>On a short Twitter break — I’ll be back soon!

there you go

but why? something happened or just taking a break from social media?

Probably because social media is cancer and they know it, but have to use it for career growth.

Any typescript chad around? I have this overloaded function, and I wonder if I can make it prettier with conditional typing. Any ideas?

enum MyEnum {
A, B, C
}
function foo(event: MyEnum.A): void;
function foo(event: MyEnum.B, options: { bOption: number }): void;
function foo(event: MyEnum.C, options: { bar?: string; xar?: number }): void;
function foo(event: MyEnum, options?: any) {
//DO work
}
foo(MyEnum.A);
foo(MyEnum.B, {bOption: 0});
foo(MyEnum.C, {});


I have a feeling I could write something like this and make it better, but I'm missing something

type MyType =
T extends MyEnum.B ? { bOption: number } :
T extends MyEnum.C ? { bar?: string; xar?: number } :
{};

function bar(event: MyEnum, options: MyType) {
if (event == MyEnum.B) {
// TS infers options is { bOption: number }
}
if (event == MyEnum.C) {
// TS infers options is { bar?: string; xar?: number }
}
}


This doesn't work because "typeof event" is MyEnum, so MyType can't be inferred. This might be more of a SO kind a question but I wanna see if Jow Forums has something for me

seems to have started with this
twitter.com/heydonworks/status/1164506235518910464

UHMM SWEATY WHERE ARE THE POC AND MINORITIES AND WAHMEN?!!?!??!?!?

How much to charge for maintenance for a site if the client is a smallbusiness like a restaurant ?

think of a number, then multiply it by 2, then divide it by two

decide your hourly rate, guess how many hours a month, multiply, charge that
or decide how gullible your client is and charge that
up to you

Found the solution here
daveceddia.com/watch-out-for-undefined-state/

my portfolio/personal site is all plain php7. no js, no db.
posts are just enumerated from a folder outside web root
the post files have meta tags that the site uses to categorize and sort posts, and optionally hide them completely like this example post
thinking of adding a 'follow' button that basically just subscribes visitors to a mailing list for new post notifications.
r8?

Attached: Screenshot_2019-08-25_19-42-19.png (925x782, 107K)

>tfw a secular satanist that teachs CSS calls you toxic neocon bigot

holy shit! I love React now, MAGA

What do you guys use for hosting? I am developing a shopping cart and don't really know what to use.

i've used digital ocean for years
not the cheapest but very reliable

vultr or ovh for cheap options, and linode/heroku/openshift
fuck digital*cean

ya but streams are promise based

OVH is the best one

>fuck digital*cean
why?

>an ugly gook and possible tranny who did nothing but post about race left the STEM field

Oh no how will it survive?

Font name?

Arrow Functions would make them look prettier I guess if that's what you care about.

website layout general.

Do you guys generally write out different design templates for mobile, table and desktop ?

I have a lot of frustration writing a website and trying it to fit various px breakpoints with bootstrap. I'm writing for desktop and when i try to scale down everything messes up. At this point i would reckon it would be easier to write the designs separably all together. What the general practice ?

This is one of my first projects so i'm pretty bad at architecture and planing.

I just use Bulma desu. I enjoy it a lot more than Bootstrap.

What's breaking for you?

Give me a sample student portfolio website for junior position interview.

Maybe i'm trying to hard to put proper site and wasting time :/

Newbie to web dev here. I want to pass a function into an ejs template using express. When I try to use the function in my ejs template I get "myFunc is not a function" error and I don't know how to fix it.

I have a javascript file with my function like this
module.exports = function smoothScroll(target, duration){
//function code
};


Then in my main express file I do

var scripts = require("./public/scripts/index.js");

app.get("/", (req, res) => {
res.render("index", {scripts: scripts});
});


And then, in my ejs template I'm trying to use the function like this


Does any of this make sense? What am I doing wrong?

> Do you guys generally write out different design templates
rarely, but sometimes it's needed
> trying it to fit various px breakpoints with bootstrap
just match bootstraps breakspoints 768/992/1200 whatever, what's the issue?
> I'm writing for desktop and when i try to scale down
Bootstrap breakpoints are mobile first, and you should be working mobile first. Your breakpoints should be min-width not max-width for general layout that needs to flow with bootstrap.

Also if I console.log(scripts) in the ejs template I get "function smoothScroll". So I guess I'm just not accessing the function properly or something?

For starters, I don't see myFunc in there?

Do you have myFunc in a page that isn't what you're noding (index.js)?

If so remember to export myFunc, and remember to require it in index.js

I'm sorry myFunc should be smoothScroll. I was just saying myFunc to describe a generic function name. The actual error I'm getting is "scripts.smoothScroll is not a function".

If it's not being brought in from where ever you have it, you may be forgetting to export it or require it somewhere. For example I have furniture.js and index.js

In furniture.js I have this
const furniture = [
{
name: "chair",
inventory: 5,
unit_price: 45.99
},
{
name: "table",
inventory: 10,
unit_price: 123.75
},
{
name: "sofa",
inventory: 2,
unit_price: 399.50
}
]

module.exports = furniture; [/code

That exports furniture anywhere where you require it.

So in index.js I bring it in with
const furniture = require('./furniture');

Are you doing that?

Fuck I messed that up. Looks like I hit enter instead of shift on the closing bracket.


const furniture = [
{
name: "chair",
inventory: 5,
unit_price: 45.99
},
{
name: "table",
inventory: 10,
unit_price: 123.75
},
{
name: "sofa",
inventory: 2,
unit_price: 399.50
}
]

module.exports = furniture;

That exports furniture anywhere where you require it.

So in index.js I bring it in with
const furniture = require('./furniture');

Try doing it that way instead of
module.exports = function smoothScroll(target, duration){
//function code
};


See if that works

Hi /wdg/ I am in the process of finishing my portfolio site using vue but am hitting a snag

I just signed up for AWS to use their free year trial but before I put my portfolio on there I want to make my contact form actually send a message. I have vue-resource installed which I am able to send data because I know vue is just a front end and is not able to do back end things like that. my question is should i use vue-resource to send the data when submitted to AWS or should i also implement laravel/php to do this task? I just need direction on what is the easiest/best way to approach this and from there I can figure it out.

Thanks for the reply but I actually figured out the problem. I was calling scripts.smoothscroll() when I should've just been calling scripts(). I was just exporting a function rather than an object that contained a function so I didn't have to access it with scripts.smoothScroll().

>please give me a free laptop or i'll leave
Topest of jej

The actual reason is way stupider. Some guy called the react community full of Trump supporting rednecks and vue full of normal people or some shit. Another prominent coder defended the community. Then the original reactor called out another guy because he did the finger game thing where he made the okay sign below his waist, but he called it "the white supremacy logo" and used it as proof react coders were racist. For whatever reason that started a shitstorm and this dumb gook you linked to whined and left because all she does is post about race and whining about white people. If it's a she even, the shoulders are pretty broad.

good OP pic

thanks

What if I just use FCC for the projects only? Because I'm getting really tired of its format, I enjoyed "internetingishard" and javascript dot info waaaaay more.

Are you responding to someone or just asking a vague question?

The latter, I'm just seeking for confirmation regarding going through the grind that is FCC. Sure, I want to learn the stuff it offers, but I very much dislike their website.

Just realized you meant Free Code Camp and not the FCC that censors people. I suggest W3Schools. Unironically the most informative.

Oh, should've clarified. I'll check your rec, thanks.

Consolas, the default vscode font

What's a good text editor for ASP.NET Core on Linux? VSCode's razor support is ass.

Have you checked out Atom? I enjoy it for node/js/ts. It might have what you want.

Only reason I mention Atom is because it's open source and people usually have plugins for fucking everything.

atom.io/packages/language-cshtml

the proest at my school uses netbeans

In what way is it bad? I thought those are all microsoftshit and they're supposed to work well together?

see pic

Attached: ass.png (499x40, 7K)

>newbie here
how come the files that I download from nyaa i.e mkv files display subtiles when played through mpv, while the same file when played through html5 player doesn't show subtiles?

Which file? Link me that shit I wanna see.

RESPOND NOW YOU FUCKING NIGGER

I'm taking about subtitles that is embedded like a quick ffmpeg -i shows me it has eng subtitles ass which is embedded.
Do I've to extract these to vtt format to use in html5 or is there any other way?

There is another way. In HTML5 you have to include the track format. I actually made something a while back from PHP with video.js that will let you enter a video source and subtitles to put them together on HTML5 if you want to try it out.

Even added local storage to the subtitle editor so you could customize subtitles and save what you did with them.

Keep in mind this uses a thing emulation type thing Mozilla created to let you add the subtitle tracks from outside sources and get around CORs

videojser.x10host.com

BUT I'd have to see WHICH file you're talking about in particular to answer your specific question. Not every file on Nyaa is the same I noticed. Some are hardcoded, some are softcoded.

I see, thank you!

Here you go:
nyaa.si/view/1169520

Gonna download it to help better answer your question. I swear to god though if this is loli shit I'll end you.

>swear to god though if this is loli shit I'll end you
it's just a childhood fetish of mine to get teased by cute girls that never happened.

What the fuck, where do they store the subtitle files even? Don't tell me MKV stores it in the file itself?

I really don't know the exact answer, but do check out subtitles merging using libraries and other external tools.

I'm looking at something now for it. I'll see if I can remove the sub files. If you want it on HTML5 video you'd have to convert it to MP4 of course too, what with browsers not supporting MKV. Though I heard once in a Jow Forums thread that someone got MKV's to work with FFMPEG and Firefox.

easytechguides.com/remove-hardcoded-subtitles-from-mkv-video-files.html

For now I've extracted subtitles and converted it to vtt, going to test it later though.

Why the fuck doesn't this shit work?

```
this.httpObs.pipe(map(data => console.log(data)));
```

I'm following the pipe + map examples EXACTLY and I'm getting nothing in the console. httpObs is an HttpClient Observable, and using ```.subscribe()``` on it works fine. I just want to shorten the process by removing this subscription and transforming the data in the map function before passing it on but I'm just getting nothing at all. No error either, it's all compiled successfully. What the hell am I doing wrong?

If you have the raw as .mp4 already try the thing I sent you earlier and it'll auto output it with a track tag in videojs with a custom CSS I made for the player, and you can change subtitle preferences :^)

Oh shit, I forgot code embedding doesn't work like it does on SO. Whatever, it's a pretty simple snippet anyway.

Please tell me, what could you possibly be storing in a database that's a monolithic 256mb block of data?

>fagtron.io
Kek.

please don't kill me for being retarded, but a video

woah

Can someone please recommend a basic digital marketing topic to write an essay on?

Why would you store video in your db user? Use youtube or upload the videos to your host or something.

is there any way to store a video in mongodb? I remember at my old job people would have 1mb profile photos that were stored in a database as a base64 string, and it seemed to work pretty well

store stuff like that on the file system and keep a table with the file names in the db

it's actually IBM Plex Mono

>He can't tell apart consolas and IBM Plex Mono
Just look at the t or f, the inner "Bend" ist a 90 degree angle

I exported like a hundred wordpress pages into a xml file using the default tool. Trying to import into a local Joomla site using J2XML with its wordpress plugin but im getting the error message 'Class J2XMLVersion not found'

anyone ever experienced this? Anyone know another method of doing importing wordpress pages into joomla? Ples respond and pls no bully for cms

>wdg is finally up
If you want a thread to be up, you can just post one. There is no official thread poster.

Attached: psa.jpg (124x124, 4K)

Any purists out there?
What techniques for creating websites with html5 and css only do you use?
> border-box vs content-box?
> flexbox vs css grid? Or combined?
> frameworks?
> templates? Your own? Something
like barebones?
> anything you don't use at all/avoid?

What's the simplest yet secure way to manage a web session like this?
1. Client connects to server
2. Server doesn't know client's IP address, new session starts
3. Client fills a form in
4. Session is kept until client sends the form
5. If same IP connects again, server knows and client is asked if they want to edit their form
Is it all serverside? Or are there cookies to make?