/wdg/ - Web Development General

>Previous thread
>IRC
#Cred Forumswdg irc.rizon.net/6697
rizon.net/chat/

>Quick start
w3schools.com/
learn.shayhowe.com/html-css/

>Javascript
developer.mozilla.org/en-US/docs/Learn/JavaScript
beginnersbook.com/2015/04/json-tutorial/
nodejs.org/en/docs/

>JS frameworks
jquery.com/
vuejs.org/
emberjs.com/
backbonejs.org/
openui5.org/
expressjs.com/

>CSS
learnlayout.com/
cssguidelin.es/
sass-lang.com/

>CSS frameworks
getbootstrap.com/
w3schools.com/w3css/

>Video tutorials
laracasts.com/series/php7-up-and-running
blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

>Backend Frameworks
suave.io/
cutelyst.org/
learnbchs.org/
takes.org/
github.com/dom96/jester
adobe.com/products/coldfusion

>Databases
sqlite.org/
firebirdsql.org/
mariadb.org/
postgresql.org/
symas.com/lmdb/

>Web services
soapui.org/tutorials/web-service-example-projects.html
docs.jolie-lang.org/

>Security
owasp.org/index.php/Top_10-2017_Top_10
se-radio.net/tag/web-security/
opensecuritytraining.info/Training.html

>BONUS: F# + Suave practical guide
products.tamizhvendan.in/fsharp-applied/

Other urls found in this thread:

suave.io/
cutelyst.org/
learnbchs.org/
takes.org/
github.com/dom96/jester
adobe.com/products/coldfusion
impredicative.com/ur/
jaspervdj.be/hakyll/
docs.mathjax.org/en/latest/start.html
jsbin.com/zelogivoma/edit?html,js,output
jsbin.com/bodeciqofo/1/edit?html,js,output
news.ycombinator.com/login
nativescript.org/vue
developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
alpha.editor.p5js.org/pajeet/sketches/B1XJuk8wM
staticgen.com/
about.gitlab.com/team/
education.github.com/pack
chiselapp.com/
flexboxfroggy.com/
cssgridgarden.com/
davidwalsh.name/browser-camera
jsbin.com/puyujudulu/edit?js,console
jsfiddle.net/veo3747j/14/
kripken.github.io/emscripten-site/
hackdesign.org)
krautplausch.hopto.org/te/vote/index.php
krautplausch.hopto.org/te/vote/show.php?id=zmmhbypzrw
mockupworld.co/all-mockups/
risingstars.js.org/2017/en/#section-framework
stateofjs.com/2017/front-end/results/
reactkungfu.com/2015/07/why-and-how-to-bind-methods-in-your-react-component-classes/
www-test.embrisca.men
alexa.com/topsites/countries/AU
codeburst.io/i-bombed-my-first-technical-interview-and-im-glad-that-i-did-2d218b465298
jsfiddle.net/e76z6r2a/1/
jsfiddle.net/e76z6r2a/10/
en.wikipedia.org/wiki/Single-page_application
caniuse.com/#search=transform
codepen.io/user/pen/xYYQPq?editors=1100
twitter.com/NSFWRedditVideo

may just be me, but the OP lists way too much stuff

like what are all these literally-who frameworks
>Backend Frameworks
suave.io/
cutelyst.org/
learnbchs.org/
takes.org/
github.com/dom96/jester
adobe.com/products/coldfusion


same goes for other stuff
>listing w3schools instead of MDN,
>listing jQuery

the effort is appreciated, but this should absolutely be reconsidered
that list as it is, is not very useful

much prefer the previous shorter version, that gave the basics for beginners but didn't try to include lots of more obscure things.

The list is shit. It was peak last year when it had some great resources but the OPs are shit now.

ayo hol up
I can do webshit in haskell?

impredicative.com/ur/

nice op

there's a new thread every other day. imo different flavors are good but agree with w3schools

make a better one next threads

Go back to your containment thread:

Educate yourself

jaspervdj.be/hakyll/

>Hakyll is a Haskell library for generating static sites, mostly aimed at small-to-medium sites and personal blogs

The list seems to mainly be jokes, as far as I can tell. I saw a couple like BCHS, Takes, and Cutelyst mentioned in previous threads. Coldfusion is like a hundred years old. The logo for Suave is literally a hipster. And I feel like thread regulars know W3Schools is shit, but new people might be confused.

All in all it's pretty funny, but not great for people actually using the OP for resources. There should maybe be a "cool obscure stuff to check out" section, but it should be in addition to the standard backend:Rails,Flask,Django,Node,ASP/frontend:React,Angular,Vue/database:MySQL,Postgres,Mongo

To be fair though, not all of them seem to be jokes E.g. the OWASP link is interesting. I definitely need to read through more of their stuff and I recommend everyone do so.

lmao who even reads stickies. just go in the thread and ask your question

javascript newfag here, what is the point of putting your JS code in tags when they appear to not be needed?

this javascript code works just fine and it doesn't need any tags


What Can JavaScript Do?

JavaScript can change HTML content.

Click Me!

do people even use Java anymore?

Anyone have any resources to learn UX design they would recommend? I'd like to get better.

>haskell

Why the fuck would you use haskell for web dev? That's the definition of trying to fit a square peg-- reeks of brainlet trying to compromise for a simpleton practice (web development) with a perceived "smart" programming paradigm. Just go back to your MVC templates you absolute brainlet.

>Coldfusion is like a hundred years old

Can confirm, we have production Windows 203 servers running Cold Fusion on some ancient version of Java.

It's a cluster fuck in every possible way everyone is scared to death to touch it except "the coldfusion guy" who's like a walking shill for the product.

Redpill me on the ga script


window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');


- How do all these functions possibly work when they are run before the script is actually downloaded?
- Can I put that shitty inline script into my bundle and just serve it altogether?

It's not needed there because "onClick" is implicitly saying "there will be a script here".

If you want your app to just have a bunch of scripts outside of a particular element you'll need the tag.

I've been given the chance to get paid to update someone's business website in ten days. I've never done any web coding but I have been studying java for six months. I've already spent two days picking up the basics of HTML CSS bootstrap JS and today I got a template to make most of the website. It looks better than his current site and I have all week to keep polishing but I really want it to come together and not look amateur.
What are some must know things or pointers that can make my website professional.

>add feature to 20,000 loc open source codebase
did i unlock a new skill

Yes, the skill of working for free.

it's for my own website

I take it back, good sir.

Much cleaner and more organized, if you want to do the same thing in multiple places you can declare a function once and call it when each onclick event is triggered.

Nowadays people tend to avoid the onclick HTML attribute altogether, since keeping presentation (HTML) separate from logic (JS) is good. If you give your button an id "my-button", you can do something like
function changeDemoContent() {
document.getElementById("demo").innerHTML = "Hello JavaScript!";
}
document.getElementById("my-button").addEventListener("click", changeDemoContent);

Script and style are basically not needed, since the separation of concerns suggests that you should keep a separate JS and CSS file

hey guys, Ive been making stuff with javascript for a year now and i want to want to run my own website. anyone know of a new jew hosting site that is developer friendly. none of this like squarespace template shit

every dev that wants a free option runs their shit on github. you cant host images or backend stuff there though. if you want images you can use something like flickr or box.

im fine paying for hosting, just as long as its reasonable

If you use async and await, are you really supposed to put try/catch blocks around everything? Feels pretty autistic.

put everything in one giant try/catch

I was trying to use prepared statements, but it always throws me an SQL syntax error at line 1. My goal is to use a $_GET in an SQL query.

The GET value is formatted as a string and originally dynamically generated, so there's no way to only allow specific values.

try {
$db = new PDO("mysql:dbname=somedb;host=localhost", "person", "mysupersecretpw" );

$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );//Error Handling

$sql = "SELECT * FROM $value";
$result = $db->prepare($sql);
$result->execute();
$daten = $result->fetchAll();
} catch(PDOException $e) {
echo $e->getMessage();//Remove or change message in production code
}

Thanks for help!

get a vps at amazon aws or similar provider.

post some great resources for next thread then

Currently trying to learn how to program in JS, specifically, how to include the MathJax (LaTeX math equations through Javascript).

I'm following their tutorial here:
docs.mathjax.org/en/latest/start.html
but I'm getting a really funky result (see pic related). Below is what I have so far. I don't really know what's going on, so any help is greatly appreciated!






MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});



....


This project will be focusing on making writing LaTeX much easier by adding a graphical component.
Let's consider a≠0

>$sql = "SELECT * FROM $value";

This opens you up to an injection vulnerability. Don't concatenate strings or use variables directly within strings when issuing SQL queries. Some will argue that it's okay to do if $value isn't user-mutable, but it's generally considered good practice to avoid it all the time.

That being said, you can't bind a table name to a parameter in a prepared statement. If you're attempting to dump the contents of the table name stored in $value, you'll need to ensure it's a valid table name and generate the query via str_replace or something similar.

>I was trying to use prepared statements, but it always throws me an SQL syntax error at line 1.

Make sure $value is in scope and has a non-empty value.

>echo $e->getMessage();//Remove or change message in production code

It's better to log the full exception ($e - it will be stringified and look presentable in the logs) and display a friendly error to the user.

nevermind. I was just being a dongus.
I needed to put the correct path to the files (with an acurate "?config=" parameter at the end. Woops

>add several domains on adsense
>all of them are approved
>add ads to them
>adsense only shows the first site I registered in the main menu sites widget
>only takes into account the views and impressions on the first site

What am I doing wrong?

I don't use GA scripts, but the first part there works completely independent of anything else.
It just creates the functions and pushes some strings onto an array in an object.

not sure what is or isn't developer friendly about a static host, but check out Netlify, if all you need is static.

felt the same initially, but realize, that if you have some nested async/await, then try/catch only needs to wrap that level, the error should 'rise' to. (at least the most outer one)
In the end try/catch it's nothing but a different way to do promise.catch()
It just feels weird, because it appears to be very different from normal JS syntax.

What is your opinion on ReasonML? What compile to JS languages have you used in production?

The event listener changes e.target.hidden to true but only hides the last element and not the selected element, why is this?

jsbin.com/zelogivoma/edit?html,js,output

it works fine, its just that if you click the middle one, it moves the last one up into the free space.

see this, done with opacity instead
jsbin.com/bodeciqofo/1/edit?html,js,output

Oh, see, I always make funny oversights like that. Thanks mate.

>yesod
>not spock

Enjoy your bloat

I was thinking of using Haskell for web dev, could you list a few reasons why you think it's not a good choice?

I am confused. If i user media query to target max width of 400px and oopen the page on my phone which has display resolution 1080 width, the media query is triggered, what the shit?

Any idea how to make this work?

*:not(.checkbox span)
{
box-sizing: border-box;
}

Thoughts on Hacker news login/create account css?

news.ycombinator.com/login

less is more

Most phones count as less than 400, just use chrome inspector and select different phones at the top.

iphone 8 is 375px wide for example

The problem is that the rule IS triggering if my phone resolution width is 1080 it should NOT trigger when the rule is set to max-width: 400px;

Just use the chrome inspector tool you'll see what I mean, your phone could be 4K and still count as 350px wide it doesn't matter

how does that shit work?

how did I miss this
nativescript.org/vue
post a jsfiddle
pixel density, DPI
Phones almost always have higher DPI than desktop screens, so when the pixel-width is checked, then it takes the resolution and DPI and calculates a normalized width from that... as far as I know it roughly goes like that.
So this way a phone with a 1080 resolution, wont display the page like a vertical desktop screen would. (so you can actually see shit)

Your phone browser will basically say "Hey i'm a phone please make the content scale down for small screens" and pretend the width is 400px. You can turn it off in the options usually

The inspector is pretty self explanatory

>pic
dpi / ppi
same thing kinda

What's so bad about W3Schools?

Used to be pretty subpar with their content in the past.
It's apparently better now, but generally not as good as MDN overall.

If you just want to look up a method or such, then both probably serve you equally well, but MDN also has sites with in-depth information and guides about certain concepts like:

developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
or
developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop

> nativescript.org/vue

This is awesome. Gonna give it a try

can anyone help me remove the lines around the squares so it looks more like tv static?

alpha.editor.p5js.org/pajeet/sketches/B1XJuk8wM

I have an aws amazon server, and I'm looking to host a minimalistic blog in it, something like bashblog but more friendlier for a non-webdev guy like me, also I want to use my own css preferably use markdown as well but how can I make my css for markdown instead of html? Thanks! I don't like the famous ones. they seem to complex and full of stuff that I won't use, I only need to put my posts and email/github in the footer plus a navigation page to my posts, I can even go without a search plug in, just html plus simple css I don't like js that much, old school kinda

read the docs and google things
alpha.editor.p5js.org/pajeet/sketches/B1XJuk8wM
I don't even know p5 and found this via google

guess you can look at static site generators and then see if you can use markdown with them
staticgen.com/
just google "hugo markdown" "hexo markdown" etc.

...

whoops
strokeWeight(0)

here, that'S what I meant

>no React in sticky
why?

here, i'll be honest, i have no experience with webdev but isn't there a way to do this that wouldn't kill the browser by rendering it constantly? like can you run it for a bit (3s) capture that as a gif, and play that? because trying to scale it up destroys the hell out of my performance, even by just a bit

to clarify, i was scrolling Cred Forums and wanted to give a hand, that's why i'm in this thread now

thanks man.

I think we can stich up individual frames or just record it and speed it up. whatever floats your boat.

>tfw your thumbnails in your portfolio go from a perfect 16:9 to 4:3 when scaling from desktop to tablet view

nobody will notice but this is fr*icking cool

I work with bot framework APIs at work. I make bots and such on Kik, Line, Skype, etc. what bot should I make and for what chat service?

Some Indians or something keep cloning my fucking projects, it's pissing me off. I uploaded the source code from my website the other day, just checked the "insights", and it says "2 unique cloners".

Fuck that shit. I'm done uploading my work to GitHub -> work that I plan to make money off of. Now whoever cloned it can publish my work before me. Fucking ridiculous, fuck GitHub.

Why not just make them private?

gitlab my dude

>paying money for a github account

link

That's literally part of why Github exists.
If you're doing projects you would like to share then get cheap hosting and upload it, then link to it in your portfolio. If anyone (like potential employers) would like to see the code then you grant them access to a private repo.

maybe you are the pajeet

>That's literally part of why Github exists.
Yeah, I know. I don't even know why I uploaded it to GitHub, I forget desu, but only had it up for like two days. Was not expecting someone to steal my code so fucking fast. It's not even with just that. My portfolio is hosted with GitHub, and that shit gets cloned at least once a day, which I don't mind, really. Plus all of my other shit. Brainlets stealing other people's code so they can get a job claiming it as their work, probably.

I'm going to inject some fucking malware into a repo next time. I'm sure they don't even look at any of the code.

>Hello, Sir. Yes I make it.
>What you mean Only 5 commit? I make self. Thank you for hire me, Very strong working and Full Time Developer. Low money. Very small cost. Big Proud!

When i try to copy paste a longer text into a textarea (36mb) the browser tab frozes, any idea how to fix it?

YOU DON'T NEED TO PAY TO MAKE THEM PRIVATE

Well, you must be doing something right since that many people are interested.

I made a full e-commerce platform including admin panel and its only been cloned twice i ~3 years. It's even made with PHP so you'd think the Pajeets would flock it.

GTFO, really....? I'm calling bullshit. I've used github for over 6 years, and always assumed you had to pay. If not, then I feel fucking retarded.

kek
>Well, you must be doing something right since that many people are interested.
I network a lot, and I join a lot of groups both online and off. Have quite the number of followers on there. It wouldn't even bother me so much if they at least forked it before cloning.

Yes you have.
7 $ per month.

What kind of dev environments do you do webdev in? I have a w10 laptop and a PC. while learning i just used local chrome and Cloud9/aws cloud9 when i took up learning node and mongodb.

i know enough unix shell that ubuntu+vscode+chrome feels comfy but running anything in a VM feels iffy.

should i just suck it up?

this. unlimited free private repos.

What's the catch though, they might just accidentally delete absolutely everything on their database again?

the catch is that code barely requires any space and modern cloud service providers are designed to support photos/videos. i bet people upload more data to instagram in one day than github hosts in its entirety.

didn't pay shite for this

get fucked

they fired that guy the next day. like with every centralized service only can hope for the best. good team though about.gitlab.com/team/

Small question:
Microsoft word has this really useful feature where you an input an equation and it shows the spots you need to type in variables/equations as text boxes (See Pic related).
If I'm using Javascript (and MathJax), how would I both a) draw the integral sign, and b) put the textboxes around the integral?

Django question:

I know I'm forced to use non-composite PKs on my models, but can I at least use composite FKs?

I have to connect to a legacy database btw.

Something to look at:

class Type(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=64, unique=True)

class Group(models.Model):
id = models.AutoField(primary_key=True)
type = models.ForeignKey(Type, on_delete=models.DO_NOTHING)
name = models.CharField(max_length=64)

class Meta:
unique_together = [['id', 'type'], ['type', 'name']] # compound unique indexes (alternate keys)

class Entry(models.Model):
id = models.AutoField(primary_key=True)

# HERE'S WHAT I WANT TO DO:
group = models.ForeignKey(Group, fields=('id', 'type'), on_delete=models.DO_NOTHING)

# HERE'S WHAT I'VE DONE (WRONG WRONG WRONG WRONG WRONG WRONG)
group = models.ForeignKey(Group, on_delete=models.DO_NOTHING)
type = models.ForeignKey(Type, on_delete=models.DO_NOTHING)

education.github.com/pack
if you are a student you don't need to pay

>about.gitlab.com/team/

holy shit why do they have so many people working for them

the fuck

Lol, I have the same fear with LastPass.

>People Operations Analyst
>People Operations Generalist
>People Operations Specialist

You're obviously paying $7/month. Fuck off faggot

Use Chisel, retard.
chiselapp.com/

I am educating myself on new trends in web design to not fall behind and apparently grid layout is the hot new shit
But all i see is floated divs and floated divs were used in design for years and years now, so what is the big hot shit here?

No i am not retard

Fo chisel my nizel

>But all i see is floated divs
where?

Flexbox is extremely useful to know, as it makes positioning so much easier.
Grid is good but still up and coming and not as commonly used yet.

If you are interested in a crash course for either check out
flexboxfroggy.com/
cssgridgarden.com/

>ever listing or recommending w3schools
I started there when I was 10. Complete shit, fucking HackThisSite told me to go there.

>chiselapp.com/
>not using HTTPS
>not secure
Fuck off with your personal project. Ain't no one gonna use dat shit

I haven't done any haskell since Uni, wanted to freshen up on it, any fun books to read that does something practical while teaching it? ( am a professional software engineer so doesn't need to a basic beginner book)

desu why not just use a css framework?
It saves so much time, I get that people meme learning it is SO IMPORTANT but in reality 90% of these people who demand you to learn it use those features themselves simply because it saves time

Doing shit inefficiently just to prove you can is nice and all but I don't get why people say that you HAVE to learn it as a mandatory thing when a 5 second install solves 15+ minutes of an annoyance to set it all up.

you are

;^)

Does anyone have the URL for that website about websites written in the standard of which its propagating ?

Black text on white background

Powershell with oh-my-posh inside Cmder + Sublime Text + Firefox Dev Edition, comfy

Flexbox comes in handy all the time, even while using a framework.
Often you may want to style sections, that don't fit into the provided 12 column model.

whats the point of shit like angular, react, and vue? to me it just seems like they are overcomplicating web dev.

>open second link
>grid-template-columns: 20% 20% 20% 20% 20%;
What the fuck is this sorcery and why haven't I discovered it before? I do UX every day and didn't know about this.

>go to website
>open console
>they kept the console.log stuff in after deploying

so cute wtf

grid template columns a shit

Haven't really tested it as yet, but it does in one line what Flexbox takes several lines to do.

I'm trying to associate thumbnails with database records displayed client side. Is there a better way to go about it than storing them as a byte array in the table?

Are Java web dev jobs really as unpleasant as everyone makes it out to be? How does it compare to C#, which I understand is similar or some of the newer languages like Node.js and Go? I have only used Java and C# for college class projects, and neither seemed that bad.

A layer of abstraction. Standard software engineering practice.

Sup, /wdg/?
I'm still stuck on the search feature of my website, but I'm getting closer.

>Website for uploading images
>User enters a title (required)
>Have input that searches DB based on title
>Fetches and displays results
>Don't know how to implement this

Can someone write the method out for me, or at least something similar to what I'd need?
// controllers/image.js
search: (req, res) => {
Models.Image.findOne(
{ filename: { $regex: req.params.title }},
function(err, image) {
if (err) throw err;
}
)
}

I have no idea what the fuck to do, but I feel like I'm getting closer. For instance, I can search the MongoDB repl exactly how I want for image titles:
// returns all images in the DB with title "apples"
db.images.find({ title: "apples"}).pretty();

I'm stuck on actually getting this into my code. Pls help.

>inb4 connection error -> Cred Forums is XSS paranoid

I don't include my package.json in my github repos. My updated package.json is hidden somewhere else.
So even if Durgasoftin' Pajeets leech my project they would still have trouble running/modifying it

Alright, I've got this:
search: function(req, res) {
var query = { $text: { $search: req.query.search, $language: 'en' } };

Posts.find(query).toArray(function(err, posts) {
if (err) return res.status(500).json({ error: 'Internal Server Error' });
res.status(200).json(posts);
});
}

I'm getting closer, fuckers.

I prefer java for backend development. Lots of libraries and great docs. Most of the big companies provide java SDKs. Sometimes I use python, if the task is small or otherwise lends itself to Python.

C# is very similar, but I don't like the library organization, the docs suck dick, fewer vendors provide native APIs, and I hate being handcuffed to Visual Studio (and Windows) to be productive.

Side note, Microsoft's new visual studio code editor is super legit.

what's the problem?

what's your response look like at this point?

Working on ajax call. in jQuery, don't have a response at all, I vaguely know what I'm doing right now, and don't have a response yet.

basically, I have images stored in MongoDB, like I've said above with the titles. I just implemented And added routes(though I don't know if they're alright),

app.get('/search', search.index);
app.post('/search:query', image.search);

jQuery so far is:
Working on ajax call. in jQuery, don't have a response at all, I vaguely know what I'm doing right now, and don't have a response yet.

basically, I have images stored in MongoDB, like I've said above with the titles. I just implemented And added routes(though I don't know if they're alright),

app.get('/search', search.index);
app.post('/search:query', image.search);

jQuery so far is:
>pic related


I'm kind of pissed, bc I had that worked out not long ago, and it was actually trying to find shit.

I'm kind of pissed, bc I had that worked out not long ago, and it was actually trying to find shit. Am I fucking something up? I also changed Posts.find(query) to Images.find(query) Fucking connection error. There's code blocks for a fucking reason, damn. jQuery is in pic

wow, i fucked that up pretty bad, sorry, man.

Figure out if your routes are right first.

Just use

search: function(req, res) {
res.status(200).send("hi");
}

Also, use the data attribute of the ajax object.


const query = $('#search-bar').val();

$.ajax({
...
url: 'search',
data: { query },
...
}

Odd WP question here

I have a site selling a single product. I change the product title when the monthly quantity is sold out so it may read "My Product - January" and then change to "My Product - February". I do this rather than creating a new product for each batch.

I want to export all orders based on the product title used at the time of order. There is a workaround I'm using, which includes exporting all orders and then running a macro to sort through and build the quantity sold for each product title, but this is a pain in the ass.

Is there an easy way to generate a report based on the product title at the time of sale? Output should be something like:

Product Title ----- Total Quantity Sold
Product Title Next Month ----- Total Quantity Sold

I've tried many of the reporting plugins but none solve this. I suppose for reporting purposes I'll need to set up a new product for each month?

should end up with something like

app.get('/search', (req, res) => {
const query = { $text: { $search: req.query.query, $language: 'en' } };
Posts.find(query).toArray( (err, posts) => err ? res.status(500).json({ error: 'Internal Server Error' }) : res.json(posts) );
});


never done node.js, so I'm not sure about the es6 syntax. 200 is default status, so you don't need to specify.

I'd probably just use mysql workbench.

Hello WDG
Is there a simple way to capture a users webcam and send that information to a a node backend using sockets and then broadcast that information back to every client?

anyone got opinions about koa?

I've been trying to promisify everything I do lately and I found koa.

it looks like utter shit.

it takes all of like what, 10 minutes max to hack together a decent login page style? what lazy bullshit is this?

>to every client

WebRTC bro. don't even.

That's fine for one person becoming a server but what about a page with multiple 'streamers'

davidwalsh.name/browser-camera
is neat little sample demonstrating the javascript camera api. This has decent support across newer browsers, but it's not great (no support for IE or older versions of Safari).

And you might want webRTC, but I'm not sure if that's the best solution, since for video I think you would want to encode it, and you would have to do it in the client browser, which wouldn't be fast in JS (maybe ok in wasm).

All in all, you could definitely send the raw video data to your server in websockets, and then encode it there and provide it as a livestream to the other clients.

>java
>great docs
is this a joke

>mfw 3 pooinloos cloned my portfolio before I even fucking did anything to it

what are u doing pajeet

I've redone my online website a million times. Why is web design so hard?

Does anyone have any tips for engineering-based website portfolios?

>Does anyone have any tips for engineering-based website portfolios?
Give me $1000, and I'll have a kick-ass site up for you in a day.

Lets see your portfolio

Dumbpill me on htaccess, please.
RewriteEngine on
RewriteRule ^profile/(.+)$ profile.php?user=$1 [NC,L] // some rule
RewriteRule ^(.*)$ index.php [NC,L,QSA] # all other request should be to index.php


How do I pull it off?

Holy shit is ti true?
I have been designing my shit only for desktop all this time because i thought the phone market was so small that it wasn't worth it to design for it and it's actually bigger?
shit

ignore mobile. just focus on desktop. only idiot millenial soyboys use mobile.

>ignore mobile
m8

Who do you think will buy anything you are offering or click on your ads?

Thirsty virgin unemployed neckbards on their big tower desktops who only spend their welfare on furry commissions and real dolls?
Or the soyboys who have normalfag families and jobs and crave the new iphones and skins for their online avatars?

And soyboys use exclusively phones to browse the internet.

I'm sorry but you will never make it in the cutthroat webdev biz.

What does webpack do? Is it only for front-end js ?

What do web frameworks like react , vue do? So they already have pretty templates and buttons ? Could I use pretty templates, transitions and buttons without any frameworks ?

Any idea why this isn't working?

body > div:nth-child(2) > *:not(:first-child)
{
display: none;
}

it should find the second div in the body and then in that div hide every direct child of that div except the first one

Damn, ColdFusion... It was the first backend I learned, used to be somewhat common back in the day, but now I only see it in outdated sites. Don't remember shit, though, and thought it was pretty much dead, nowadays.

webpack minifies, packs, and hashes js libraries, so you get a smaller payload and it's guaranteed to update client side when changed.

React provides stateful components that are easy to create/update/reuse

>child of body

why

Why the fuck can't I into deployment? I've configured DB correctly this time, I can see shit happening on compose MongoDB, but I'm getting application error on heroku.

first thing to do with heroku is check status for incidents

second, is your DB working locally?

third, can you connect via command line?

body > div:nth-child(2) > *:not(:first-child)
{
display: none !important;
}

I want an easy way to make my site look better, should I use frameworks ? If so which one?

React is more about speed and encapsulation, not styling. You'll be able to structure your site easier. You still need to style it. Look into bootstrap and sass. They make it easier, but easy is very relative with styling.

>first thing to do with heroku is check status for incidents
How so? I've looked at logs "heroku logs --tail", but I don't know what the fuck it's talking about.
>second, is your DB working locally?
Yes.

>third, can you connect via command line?
Yes.

I'm a fucking brainlet, user. :/

Should I be pushing my package-lock/package.json? Yes, right?

2018-02-18T10:05:00.102064+00:00 app[web.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name

2018-02-18T10:05:00.102166+00:00 app[web.1]: (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Is it possible to absolutely position an element which is placed inside of a relatively positioned element? But the catch is it has to be absolutely position relative to the page, not to the relatively positioned parent

2018-02-18T10:05:00.102064+00:00 app[web.1]:
(node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name

2018-02-18T10:05:00.102166+00:00 app[web.1]:
(node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated.
In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Make that more readable.

nvm fml

>How so?
status.heroku.com

Make sure your environment variables are properly named and set. What are you using for replicaSet?

Do you have specific errors? Are you using anyone like papertrail or airbrake?

I do, but I've seen other anons say they don't. I'm not sure why.

You fix it?

How do I access the rate property in setInterval() / setTimeout() through JavaScript?

jsbin.com/puyujudulu/edit?js,console

I want to be able to change the interval time from 1000ms to a different number dynamically...

I think you'd have to use clearInterval and reregister callback.

if it's just one message or two, that's not really a big deal.
If it's continuously writing debug messages to the console the whole time, then that's different.
css frameworks like bulma or bootstrap give you easy building-blocks for your styling.
>webpack
lots of stuff, like the other user said, it bundles your JS, minification, transpile ES6/7/8 to ES5, remove unused rules from your CSS, provides dev-server with auto-reload, inline assets based on filesize, and so on.
>What do web frameworks like react , vue do? So they already have pretty templates and buttons ?
no that would be a css framework.
React and Vue are used for "declarative rendering" and their component structure.
Declarative rendering kinda means, that you have your data (your 'state') and then define your templates, methods, hooks, etc.
When any part of the state changes, Vue or React know how the rendered view should adapt in turn.
If you do it right it ends up very well structured, even for larger applications.
Building single-page-applications is also a major feature of those. May want to look that up in case you aren't familiar with it yet.
Either use setInterval(), that calls itself again at the end with the new delay or a conditional at the start of a setInterval(), that checks if the delay has changed and recreates the timer like said

without clearing the interval, setInterval would just create a new callback, not replace the old one.

callbacks have to be explicitly cleared, and they are immutable.

oh sry, meant setTimeout() there.

Unless you want to change the delay, while the timeout is still running. Then you would have to clear it anyway.

>he doesn't use Vaadin

yeah, you'd be right if that's the case.

I was assuming user wanted to change the interval after registration, not dynamically set it at instantiation, which would be a fairly retarded question.

So things like react, vue are there to let you build web "apps". Instead of using plain HTML and CSS and js, it gives you a framework to build a application , like you would on Android or iOS ?

No you still use HTML,CSS,JS.

Have a look at this
jsfiddle.net/veo3747j/14/

It's not necessarily real-world like, but just some examples of the declarative-rendering feature.
Does this clear things up a bit?

I think I see where you were going now,like

var changingDelay = 1000;

const changingTimeout = () => {
setTimeout(() => {
alert('woo');
changingTimeout();
},changingDelay);
};

changingDelay = 9000;


I'd prefer clearing it over recursion.

It's a framework for easily creating fast, responsive sites.You still use html, css, js (and jsx), it just makes it easier.

I sort of get it now. Thanks!

I am writing an extension for VSCode, which is basically a node app.

In 3 different files, I need to use 'fs'.

Should I;
const fs = require('fs');
In each of the files, or just in the main file and pass the const through? I lose the code hints and function docs when I pass the FS through.

What is more efficient/smaller footprint?

A couple thoughts. You need it in three files, not all files. Having access to that extension in files that have no business interacting with it smells bad.

Putting it in the main code is a smaller footprint (by two whole lines), but it's not worth the obfuscation of referencing that extension in those three files without an adjacent declaration.

>a smaller footprint (by two whole lines)
not even that really, when you then have to pass the reference to the module again as well.
are you worried about the whole 'fs' code being included 3 times?
If so, that's not the case.

how do you work freelance/contract gigs onto your resume? i've never had an actual 9-5 dev job

Yea the worry was more it being included as a whole into the constant 3 different times, so 3* whole FS being loaded. Thus the bigger footprint in my mind.

Good to know, thank you both.

Remember, you're talking about the footprint of a pointer.

I just put something like:

may2009 - aug2009 - freelancer...
sep2009 - dec2009 - frontend dev
jan2010 - dec2010 - freelancer...

and so on...

Learning ReasonML, pretty comfy. Also first-class React support is neat.

That's not very efficient, especially if you have several projects in a short period of time. List it as:

May 2009 - December 2010: Freelance - Several Clients
- Client 1: UX/UI Design [some general information about the project]
- Client 2: Front-end development [some general information about the project]
- Client 3: Backend-development [some general information about the project]

How do I run a C++ function using Javascript/HTML+CSS?
I've been told I need to run a server of sorts, but I haven't the faintest as to how to actually do this.

>How do I run a C++ function using Javascript/HTML+CSS?
>HTML+CSS
why even mention that


>I've been told I need to run a server of sorts
read the Node.js docs

in the browser? kripken.github.io/emscripten-site/

> ctrl+f
> no elm, no elixir
Why are you doing this to yourself?
Treat yourself, choose the elixir + elm stack.

I'm following this (hackdesign.org) curse/collection.
It's a bit too 'designery' for me, but it taught me a few things

I've coded a little poll server.
krautplausch.hopto.org/te/vote/index.php

Example poll:
krautplausch.hopto.org/te/vote/show.php?id=zmmhbypzrw

what would i need to know to qualify as a junior front end dev?
I can html/css, did a bunch of bootstrap website, all responsive for mobile, and currently learning javascript (properly). what else should I line up after that?
additionally i already have a pretty good background in graphic design, designing the websites aesthetics is no problem.

Is there a free to use asset pack for stuff like this? Like phones and computers to display your website/app in?

mockupworld.co/all-mockups/ - You can get the devices from there then photoshop your site/app onto them. Either that or use an emulator to run your site/app then screenshot it (like BrowserStack probably)

Frontend JS frameworks are in demand. (Angular, React, Vue)

You can sell your soul to Angular, if all you care about is getting hired.
React you will more often see in start-ups and more techie hotspots I think.
Vue is great and what I personally like, but don't count on finding a job for it.

why code it in nazispeak? everyone wants their tools in english hanz

After couple of years i decided to a web project and i looked up the new hot trends in web dev to make sure my skillset is up to date and what the fuck is with all this css framework autism?

Why the fuck would anyone use that? CSS is so fucking simple already. Literally 5 minutes of work and you can crank out any style for anything you want. Why would i use some autism 3rd party framework? this is jquery all over again

Then why are you bothered, if you can do it better than the rest?
Good for you.

because retarded trends determine the development of the industry in the long term leaving the non autistic people ultimately stuck with only shitty autistic choices in the end pajeetkun

I am considering using one of vue or react for a site. How should I go about choosing one?

If you have such a strong reaction to CSS frameworks, then wait till you read about progressive single-page-apps with React or Vue and Webpack build setup

Vue is great for personal projects imo.
Easy to start with and great documentation.

But if you ultimately want to go for a normal frontend position, then React will be the more economically valuable skill to have of those 2.

Vue is big in asia (china mainly)
Among others it's used by companies like Alibaba, Nintendo, GitLab...
but 'over here' in the west it's more niche, even though it's gaining popularity at a fast rate if you compare things like github stars (if that means anything)

Check this out, really interesting in my opinion

risingstars.js.org/2017/en/#section-framework
stateofjs.com/2017/front-end/results/

>Vue is big in asia
ok maybe not quite correct, but certainly has a stronger presence there, since the main dev is also chinese and the biggest chinese online retailer (alibaba) picked it up some time ago, so people are more confident in it is what I assume.

why? WHY are they gayass soyboy frameworks for everything?? It's a waste of time on learning pointless shit when you already know the shit it is built on like js and can make anything there already

Is there a command or anything to find out what node dependencies i have when packaging a dev build to a production build?

I want to package an extension, without node_modules it does not run, but npm install on the directory installs 331 modules, these are not all dependencies.

>X is built with Y, so why not use Y instead?
Because there are cases where X is easier and more efficient.
Frontend frameworks are such a case.
Stop being so assblasted.
You think you alone are so superior, that you have clearly figured it out that those libraries are actually totally unnecessary, but the lowly masses are unable to see?
If only they had your intellect and would always use vanilla JS instead.

>packaging a dev build to a production build?
can you explain?
It's either a dev build or a production build.
>these are not all dependencies.
They may not be dependencies for your app/library/extension, but part of the tooling and used somewhere during the build step.

But what exactly do you want to find out, when you say
>find out what node dependencies i have
It's what you have in your package.json or more precisely, what you require()/import in your extension.

I found out what my exact issue was...

But anyway, so my dev build has node_modules with 331 dev modules.

When I package the extension, node_modules gets ignored other than those specified in a 'dependencies' json obeject.

I packaged my extension and installed it on a different client build and it wasn't working at all, but its because I have 1 dependency that the package needs to have bundled with it for the extension to work. (iconv-lite).

sorry can't really follow you.
>node_modules gets ignored
I don't know what your build-setup is like, but any require() or import statement should be handled by your bundler, so that the output includes all code of the dependencies, that your own sources requires for execution.

Though I also know very little about extension development.
Was just my take on this from a frontend project view.

Yea that does make sense.

I think the difference in my case is, it is an extension for VSCode, which has an accessible API, so you don't need to include any modules for VSCode nor its dependencies, but if its not a dependency of vscode, you need to bundle it yourself with your extension.

Because VSCode supports reading and encoding of Win-1252 but does have an extension-api function for writing files as Win-1252 (which is weird) I had to bring in a different npm module.

I'm making my portfolio but I don't have any solo projects I feel proud of

Will it be autistic if I review my portfolio inside my portfolio

hmmst

How can I jquery based on multiple criteria?

Sample


id
name
time
condition


None of the td's have a class name

I want to change css based on time value, and if second condition is a particular string value


Came up with
$("td:nth-of-type(5):contains('Dog')").parent ().css("background","red");


But I dont know dates in javascript too well and I imagine since it's printed as 00:10:00 it'll be interpreted as a string.

So I got accepted for a free bootcamp to get into prog and turn myself into a .net pajeet.
Shit includes:
HTML ( DOM), CSS3, semantic markup, Bootstrap (or Materialize), Javascript + Jquery
Control flow, Events, Validator(Bootstrap), Dynamic components, SQL, MVC, ORM (modelling, OOP intro), Layers, IDE, Debugging, Deployment.
6hs a week from the upcoming Monday to mid May.

What am I in for? Any supplementary resource that you guys can recommend?
I really want/need a job ;_;
btw this is in Argentina so I doubt I can help anyone here to get into this course.
thanks.

pd: already tried with /dpt/ but it seems they don't care about this kind of stuff, or they're more compsci oriented, idk.

look up the documentation of the Data object on MDN

for element selection I would select the and then work with the array of children.
You don't need jQuery for selecting elements either.

I can't honestly say since, to me, this seems like basic shit but then my perspective may be all out of wack. It'll all click for you user, do not worry

6hours in a week is literally nothing. That's half a day if you're somewhat even actually dedicated.

Do freecodecamp in your spare time, finish all the lessons, skip the tasks if you want,skip anything past intermediate algorithm scripting as you probably won't need it for specifically website creation, especially front end. Go back to it if you ever need it in a site and try again later on if you must

Then do "colt steel's web developer bootcamp", skip backend stuff at the end if you don't want to do it.

Then do "Git a web developer job" and you'll learn a lot about more advanced things like BEM, SASS and how important it is to use things like webpack etc.

After all that you should be able to make solid websites people would pay you for because they will be better than squarespace/wix.

After that pick a framework like react/angular and look for courses for those. Once you start doing this you can make "full" websites with things like firebase that don't need backend knowledge or a router.

Work smarter and aim your goals towards specifically WEBSITE creation and you can cut a whole lot of the fat out and just get down to the basics and nail them to a very hireable state in a few months, if you actually work at it that is.

Thank you.
8 hours, sorry, but yes I get its still nothing. However I'm an EE freshmen so this works for me, I'll put more hours to it if possible though.
Thanks for the advice, much appreciated.
My goal, after one year or two of doing this is:
Being able to do freelance jobs, or work for a place that isn't like accenture.
(or getting a job more EE related, lol)

Thanks again.

Daily reminder: JQuery + PHP + SQLite is all you need to create a million dollar product!

An axe is all I'd need to make a log cabin, but I'd rather have a chainsaw.

For strings like this;

//abc_defg_hij_klmn
//_abc_def_gh_ijkl

Basically, two slashes, followed by maybe or maybe not an underscore, then repeated. Each letter grouping can be alphanumeric, with some symbols.

Would this be the best way to do it?

/((\/\/|_)([a-zA-Z0-9=!#]{1,4}))+/

What specifically do you want your matches to be for those strings?

Thats the thing, I am not after specific matches at this point, I later split them on the undrscore in a foreach and process each individual section.

I simply need to make sure the entire string passed in matches. It seems to be working pretty solidly but I was wandering if there was any other.

p.s. I had to add ^ and $ into the match for it to work 100%

/^((\/\/|_)([a-zA-Z0-9=!#]{1,4}))+$/

Hello. how to create web server? I want to make website so i can add all my notes from colornote, evernote, google keep to one local website. Is there an open source one ready? With less bugs if possible. I want it for using it locally..

and how do you plan to do that, once you have a webserver running?

Why not just use one note service that lets you save locally instead of using 6 different ones???

I'm pretty sure you can just use OneNote and it saves locally and you just sync when you add or remove stuff.

I'm an aspiring web developer, and I'm trying to come up with profitable ideas that can help me a bit financially. Help me do a reality check:

I plan to make a (native language) - English dictionary that scrapes other 2 popular dictionary websites and builds its database by doing that. Just add some advertisements, hosting more or less will be free since it's all text, easy money, right?

I want to know why my idea sucks. First I was thinking about doing the scraping process client-side with js but then I learned about same-origin policy and how that wasn't possible. Okay, that's not nice to hear but I can still do server-side scraping. What else do I not know?

t-thanks EU

they will now you scraped them.
From the beginning on, dictionaries included some random fake words, that are there to identify copycats.
Plus when you have a DB and enough traffic that any income could be generated, then free isn't going to cut it.
Why would anyone go to your dictionary anyway? You first have to compete with the established ones for popularity.

Come up with a novel service, that doesn't have to compete with existing ones if you can.

give a quick rundown please

>I plan to make a (native language) - English dictionary that scrapes other 2 popular dictionary websites and builds its database by doing that
There are already tools that do this but dozens of sources .

They add machine learning on top of that

They put humans in the loop (e.g. voting for the best translations)

sorry user. think about something else

I don't know.
Better go get your lawyer or read through all the new regulations, if you have a business, that deals with user data and you don't want to get fined.

...

Fixing your english skills should be your first priority.

someone post something about webdev

var a = {
x: 1
};

var b = a;
a.x = 3;
console.log(b.x); //what is the output?

b = 10;
console.log(a) //what is the output?


typeof null; //what is the result?

>undefined since variables are defined first and b has been redefined as an integer
>object, as defned above, with x being 3
>object

Any guides to MVC? I just need a 'For retards' introduction to MVC.

Bonus points if you can also throw in a REST one.

React noob here, having trouble figuring out binding.

function answer() {
var myObject = {
x: 8,
y: 3
};

function addXtoY() {
return this.x + this.y;
}

try {
return addXtoY();
} catch(e) {
return String(e);
}
}


How do i bind the addXtoY function to accept the object?

sry if this goes counter to other recommendations, but I would not care about the accurate concept of what 'MVC' is one bit. (afaik there are actually different interpretations over time now)
>you click a button on the frontend, it possibly sends some info somewhere, some state updates, new view is generated and presented
wtf, really now

Just start using React or Vue, follow the docs and utilize its parts.

Noone is reading W3 standards to learn HTML either.

well I just started a backend project with Elixir/Phoenix and feel kinda lost when I want to start something from scratch(e.g. not googling every single thing).

Guess I can only learn by doing:). Thank you

Just make it a parameter.

function addXtoY(obj) {
return obj.x + obj.y
}
try {
return addXtoY(myObject);
}


Otherwise "this" refers to the function that calls addXtoY, so you can just make x and y properties of answer.

function answer() {
var x = 8;
var y = 3;
return addXtoY();
}

Im more so using this as an example to learn binding. I was given these examples by a co-worker to try and use the .bind() function to make them work...

I, for one, am confused by what you're asking. Do you want the addXtoY function to take an argument?

using the original code that I provided, how would I be able to bind the addXtoY function to the myObject object using the .bind() function, so that the addXtoY function works?

Or sorry, maybe it has to be:

function answer() {
this.x = 8;
this.y = 8;
}


Function constructors are confusing.

function answer() {
var myObject = {
x: 8,
y: 3
};

function addXtoY() {
return this.x + this.y;
}

var boundFunc = addXtoY.bind(myObject);
return boundFunc();
}


Should be right.

Yeah, something like that. It's a retarded way of doing this.

Can someone give me an update on the entry level jobs situation in London?
I remember searching months ago on indeed for "node.js" "python junior" "junior web/javascript developer" etc and getting way more results than i am now

What are the in demand meme languages and frameworks now

Thanks alot, that works! helps me understand binding just a little bit better

Yeah it's dumb. You would just use call() or apply(), or structure the function differently. Then again, contrived examples given by coworkers tend to always be dumb.

Jump into the deep end
reactkungfu.com/2015/07/why-and-how-to-bind-methods-in-your-react-component-classes/

I'm not sure what the full list of requirements are, but I know for sure one of them includes a rule that says any websites that collect data of any kind should display a "cookie consent warning" telling the user that cookies will be collected.

>learning a language based on who's hiring now so you can be fluent in it in a year's time when they're no longer hiring

For what purpose

Full Stack javascript: is it a MEEN or not?

>reactkungfu.com/2015/07/why-and-how-to-bind-methods-in-your-react-component-classes/
Blog disregarded. Misleading bs. I'd rather the official docs

So if I fork a github repo (I'm not a pajeet, btw),
how do I sync it with the main repo if my fork is 6 commits behind?

fetch and pull

I'm browsing web developer companies near me and their sites are so fucking shit
Like they don't even work on mobile any they've been running for 5+ years

What the fuck is this, I seriously can't tell if everyone sucks or if my standards are too high or what but I can NOT understand how half these companies stay in business

Their content is so fucking bad, almost all of them only even make wordpress themes and then charge you $50 a month for them to host your site. Literally what is this sorcery, how can people SELL this and for bad prices too.

How can I determine site hits from a human actually viewing the page? At the moment I've only got access logs to work with (hits by IP).
My hit counter is by php in the page.

>operating in EU
I run an Australian service that Euros can utilize at their own choice, with an agreement specced out by my lawyer to avoid an EU crap. Anyway it's not like EU will go after any of you lol, 30% fine of nothing is still nothing LMAo

tech is easy to scam for because 90% of the population is too retarded to google things they don't understand. It's the same as paying a wizard to do some impossible task to them.
People literally hear the words computer science and assume you are a genius

So I requested people to post their pet sites for inspiration, and someone posted:
www-test.embrisca.men

I never got back to responding to them, but I encountered an error while mucking around with it today:
>Unhandled Rejection (Error): Given action "GAME_ERROR", reducer "error" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.

Well I'm posting here in case they see.

True, scamming old people is really easy.
Most people can't even figure out THE FACEBOOKS and would have a heart attack if you opened cmd in front of them and started doing some #kodingwithklossy type shit cding in and out of the same folder

>alexa.com/topsites/countries/AU
>Cred Forums is in the top 50 sites Australians browse
Dominating as usual, burgers please step aside

How do I catch errors with nested data like this?

this.props.book.volumeInfo.imageLinks.smallThumbnail || noImageCover

If imageLinks doesn't exist , for example, it crashes!

I'm thinking of making a site for a guy who trades on things like ebay/offerup etc etc as a job and I am wondering how I can make a better site for him using React to put on my portfolio

What kind of shit would be good, I'm already thinking some kind of "recently listed" from APIs so he doesn't have to update anything, any other ideas I can leech off you?

if imageLinks exist, does smallThumbnail always exist?
Might be a bit ugly but could work with a ternary
let imageLinks = this.props.book.volumeInfo.imageLinks
let img = imageLinks ? imageLinks.smallThumbnail : noImageCover

What is with all the javascript memes like react? everyone i know including me uses noscript to keep that js filth away, yet you soyboys seem to use nothing else than these amateur level "frameworks"

Should I use table or grid to display a list of products? Are tables deprecated?

you and 'everyone you know' are the absolute minuscule minority.
Some devs implement server-side-rendering with React or other frameworks, so you may still get normal looking content either way.

Tables for styling your whole site are deprecated.
But tables for the sake of displaying tabular data is fine, if that'S the most fitting way.

>me and my 3 friends all ruin our web experience to solve a problem adblock/ublock already does!

epic one dude, I'm sure having to turn it on and off all the time really outweighs that one time you go on a shit site and it has an annoying popup

If adblock is so good then why it fails to prevent that trick that websites do where when you click on a link it first opens and ad popup and only then the link works

I'm not sure what sites you are visiting that do that but you probably shouldn't visit those sites

pretty much every torrent site ever

you should definitely do it just to have a project and learn stuff, but I doubt you can compete with google translate

I don't know how to do it that's why im asking. I don't want to use onenote because its saved on Microsoft server

>The most important piece of advice I can ever give you is to make sure you spend more than half your time studying basic, platform agnostic things. Knowledge of data structures, concurrency, or the http protocol will remain relevant for 20+ years. Knowledge of React may be useless 3 years from now (or in 3 months if they completely overhaul some of their standards). Deep knowledge of Firebase may be short lived as well, and doesn’t transfer to other platforms. Knowledge of relational database performance/normalization tradeoffs, web server scaling, relational database scaling, and caching will serve you well in almost every project.

source: codeburst.io/i-bombed-my-first-technical-interview-and-im-glad-that-i-did-2d218b465298

The article itself is the standard clickbait, millenial drivel, but this bit is actually spot on.

well you can't just take your onenote content and put it on a 'local website'.
Really think this through, what you want to do.
How to get the data, how to store it, how to display it.
From what you are writing right now, you might as well store it in a .txt file and have the same result.

There are dozens of dictionaries and everyone will just use google translate anyway

Is there any css rule i can use if i have content i only want to display to eyelets?

trying to get into python web dev. how do i change the source code without restarting the application.

Hot swapping is possible in JS and Elixir, but not in Python IIRC.

...

i heard reddit is build in python, so how do they update their code. or do they actually do it?

How do I fake a javascript FormData object on old jquery? I want to get file input stuff.

What are my options for Android emulation?
I'm using W10 Home - So no Hyper-V (no visual studio emulator)
I have an AMD processor - no android studio emulator

The OP looks pretty neat now, haven't browsed in weeks.

Also, I'm about 75% on Colt Steel course at Udemy, so far so good. But working full time, studying english and working out I'm advancing like a snail.

Also I haven't touched it since last week because doing JS katas on Codewars is so fun for me. Is this autism? I hope so.

Goodspeed bros.

Why isn't this stupid shit working?

jsfiddle.net/e76z6r2a/1/

I have set both elements to clear: both but they just ignore it

I need the div to display below the form
the div must remain set as floated though

Do people here actually do shit in PHP?

I'm actually debating if paying 1600 bucks for a PHP course in September, just because it's by a company a friend work for and I have the crazy idea that it could land me a job there.

I am an employed PHP dev
people shit on PHP as meme, but it is a great language for web dev and almost a half of all website on the planet run on php

float is pretty much deprecated and bad practice, when better things like flexbox exist.

This would be no issue with flex, why does it have to remain floated?

Well it has to look like this:

----FORM----(inline-block)
---inputs----
----/FORM----
--floatedshit----floatedshit1----floatedshit2--

PHP is still valid but fading fast in favor of single page webapp-style frontends hitting JSON API backends.

PHP is mostly useful in a server-rendered HTML context. You can certainly built a backend in it, but I would argue there are much better languages for that.

If you want to future proof yourself out the gate, learn a solid back-end technology like nodejs, Java, C#, Go for building out APIs, and then vanilla JS/HTML/CSS for front-end development.

Front-end is honestly a clusterfuck to truly grok so my only recommendation is to find the framework that makes the most sense to you today, and then quickly find your way to an equivalent vanillajs implementation if you want to really understand the technology. Things like angular, react, riotjs are really good places to start.

not what you meant, just an example.
jsfiddle.net/e76z6r2a/10/

read this and do flexboxfroggy

Not related directly to web dev, but we are learning sml for a class. Talking with a few people about it and they've been saying that Haskell is a better functional language. Should I bother learning it?

For professional use, very likely no. If the concepts of functional programming interest you though, I would highly recommend taking it up as a hobby language. Being able to think of problems in a functional context can help make us stronger developers, even if we have to implement solutions in an imperative language.

>single page webapp-style
a what?

a
>en.wikipedia.org/wiki/Single-page_application

But that is completely client side related.
php can handle the requests from the client side js framework just fine

why use websockets over ajax?

>realtime 2-way communication
>less overhead for continuous data transmissions
>more accurate fit for real-world situation, instead of simulating server-sent data with ajax long-polling.
Use either where appropriate.

If there were no Aussies Reddit would have taken over by now.
Let that sink in poofta cunt.

Why is Firefox so shit /wdg/?

I'm trying to do x/y transforms using CSS on inline SVG text but Firefox just doesn't support it. Is my only alternative to position via JS?

Welcome to the non-technical part of the interview user.

Why don't you begin with telling us something about yourself, so we can see, if you would be a good cultural fit for out company.

huh, can't you just transform the outer element?

and what's the feature that isn't working?
support when searching for both 'transform' and 'svg' look pretty good for FF
caniuse.com/#search=transform

I'm moving around the element in the SVG viewbox using CSS transforms based on media queries.

This:
@media screen and (min-width: 250px) {font-size: 42px;transform: translate(-188px,-100px);}
@media screen and (min-width: 350px) {font-size: 60px;transform: translate(-159px,-150px);}

Behaves normally in every other browser but Firefox just ignores the translate entirely.

This isn't really a webdev question but it's close enough.

I go to blockadblock.com/.
I have uMatrix set to block scripts from their domain, as in the pic.
Then 5-10 seconds later their "Please disable adblock to view the site" page still appears.

So I have a question: why does this happen?
Is it because uMatrix doesn't block inline js?

do you have an example, that you can put into a jsfiddle?

codepen.io/user/pen/xYYQPq?editors=1100

Open that codepen in Firefox and Chrome, resize the browser to mobile resolutions and you'll see what I mean. Translates are ignore entirely.

I am a transgender gay black woman.
>Welcome aboard.
Thank you.

Stop stealing money from hard working devs you fucking parasite.

I was unironically asked what my friends would say about me...
mfw I have no friends

>stealing money

get a load of this goy

If I make a site for someone else should I host it myself and make them pay for it?

Like buy the domain name and then just use github pages (typical react SPA)
Or is there any reason to host it on like digital ocean or something? I can't think of any real reason.

Plus like how do I make it legit legally or is it sort of a gentleman's agreement they'll keep paying every month and I won't turn it off.

Got a job offer for $90k with no degree. If I can do it, you can do it too! You're gonna make it /wdg/

hm ok, an inconsistency.
Does it work with any other browsers?
Tried it with Edge and that just displayed a large colored rectangle.

what stack and where?

Maybe their scripts are what populates the page

Java with all proprietary frameworks (the frameworks are the product). Not even spring on the backend.

Northern Virginia. 90k is great in Nova, I can expect to pay between like $1600-$1800 for a 1br in a decent neighborhood, or up to $2500 for a luxury apartment in an upscale city like Tyson's Corner.

Job gives me $90k in salary, 10% performance-based bonus, $3k signing bonus, healthcare, etc.

tell us more, dude, that's pretty good

see:
Disclaimer: I do go to college, but I'm very far behind and have almost no hope of actually graduating at this point. Company came to a local career fair and I gave them my resume, looking for a summer internship.

Fast forward to this past january: they call me and say "Are you still looking for an internship". I tell them "No, I'm looking for full time work now". They say that I can come in for an interview.

I tell them very explicitly that I'm not focusing on school anymore, I'm looking for full time work so don't count on the degree. They say okay, and then I go through the interview and kill it with the questions and a few personal projects. I tell them that I've got a couple other offers lined up in a different city (one for 54k and another for 65k in a low COL area, so they're not actually bad).

Couple days pass, I get a call from lead engineer, and he offers me 90k. I accept the same day

You're kind of missing the point, the scripts should be blocked regardless of whether they load the entire page or only make the adblock blocked page appear. (the page isn't loaded from a script anyway)
I'm pretty sure uMatrix just doesn't block inline js, which makes a lot of sense, and sucks.

I'm currently making an extension to block blockadblock.

>$1600-$1800 for a 1br
god damn

>no college degree....but my entire life leading up to this point has been aimed at this specific job
Why do people do this meme, if you spent the last X years learning a language then you obviously aren't a junior or anything so relax with this bullshit.
I hate as a junior with a few months experience, when I compare myself to others and people meme "I'VE ONLY BEEN LEARNING 1 YEAR!" except they forget to mention that's after an entire adulthood of CS, graphic design etc.

Literally a walking buzzfeed clickbait article

Is that "god damn that's cheap" or "god damn that's expensive"? In San Francisco, 1600-1800 for a 1br is cheap, from what I hear, and in my current city, $1600-1800 for a 1br means that you're living in a 2000 sq ft penthouse, probably

I'm not sure if I understand you... I didn't say my life has been leading up to this job? Could you explain more what you mean by this?

he's saying you can't call yourself a miracle wonderchild who went from NEET to making $90K if you have a background in CS (even as you said, without a degree) and spent years studying webdev. I kinda get his point, but still, he's just butthurt that you've made it. Congrats, bro

I really don't think of myself that way, and that's not what I meant. Sorry if I came off that way. The point I was trying to make was that you don't need the actual degree to get a good job, which is something I was always told. The point is that having actual skills goes a long way still.

I'm saying you have years of experience but pretend you don't have much at all to play yourself down.

Imagine you have 2 people and one guy says he's only been coding for 6 months but the other guy says 5 years, but they both know the exact same amount of knowledge. Obviously the guy with 6 months is more appealing, but in reality the guy with "6 months" took the same classes and is just pretending he started 6 months ago.

I've got half a degree and an internship; the point I'm trying to make is that you don't need an actual degree to get a good job, experience and personal projects, etc. still matter to employers

...