[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/wdg/ - Web Development General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 318
Thread images: 24

File: wdg.png (248KB, 822x552px) Image search: [Google]
wdg.png
248KB, 822x552px
>Discord
https://discord.gg/wdg
OR
https://discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

>Useful tools
https://pastebin.com/q5nB1Npt/
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
http://www.programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/

>How to get started
http://pastebin.com/pDT82mQS
http://pastebin.com/AL6j7GEE

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
should i use php or node.js for databases and back end shit
>>
>>59377552
Node , easier, faster, more jobs are looking for node now at least in the east coast
>>
Reminder that backend > frontend

If you work frontend you're literally a shitty scripter and not a real programmer
>>
>>59377596

especially when women claim they are programmers but theyre doing just shitty html and css. Or wordpresss
>>
This is a (broken) draft of something I'm working on:
https://paste.ofcode.org/xTZrTWk79R4kjaDKNiGPD6

I haven't used javascript in like 4 years so I forgot a lot of things, is [-1] valid if I want to make the variable target last <div> or should I use lastChild instead? I'm treating it like an array (same for when I used [0] the second time, instead of firstChild).
>>
sup guys, on my way to greatness here. Started doing cs50x at edx.org, I'm fucking addicted now, all I do all day long is code (NEET as fuck right now). If I can keep this up for one or two months, I'll make huge progress. Give me your strength, /wdg/...
>>
>>59377596
You forget to mention that backend devs get paid like 3x what frontend devs do
>>
>>59377679 (cont)
This is another part of the project, but looks kinda FUBAR right now:
https://paste.ofcode.org/QQhmevvxTMEUpZeLZsXJ2M (it keeps saying it's spam when I submit here)

I don't remember how to use wildcards in js anymore. By the way, I made it so that the script searches for both hyperlinks/href and plain text URLs, am I going in the right direction with this draft?
I'm searching infos on how to use string-based wildcards now.
>>
File: atom.png (191KB, 512x512px) Image search: [Google]
atom.png
191KB, 512x512px
Why does atom suck ass so much?
>>
>>59377881
Just.... use..... VS Code.........
>>
any idea for a medium scaled project to build my portfolio a little?
>>
Can someone recommend me a javascript reference book about the modern standard ? Like Stroustroups The C++ Programming Language.
>>
>>59378293
this, literally the best text editor after notepad++
>>
>>59378722
Check out the series You Don't Know JS and the book Eloquent Javascript, both free online
>>
Interviewing with Hack Reactor tomorrow morning.
I've helped out / tutored multiple people that have been accepted (including after they were accepted) so technically speaking I'm ready, though I've choked badly in interviews.

Please wish me luck.


>>59377716
It's such a long journey bro, just learn to enjoy it without any time constraints.

Another easy thing to dedicate yourself to is doing algorithms on codewars and the like.
Udacity tutorials are also a relative ease motivation-wise to pump through. I suggest picking one thing at a time and sticking with it.
>>
How common is pair programming in web dev?

The idea of it does not appeal to me at all. I am an introvert and I like to work alone. The thought of someone looking over my shoulder the whole time and having to give a running commentary of what I'm doing would render me useless I'm sure
>>
>>59379363
>I am an introvert and I like to work alone
Be sure to say that in the interview, employers love to hear that
>>
>>59377881
Because it tries to reinvent Emacs using HTML/CSS/JS.

Meanwhile Emacs is C + a custom lisp interpreter written in C to be fast and smooth.
Adding to this, Emacs extensions have 30+ years of experience in how to write them properly and make them feel good. Atom came out what, 3 years ago?

That's why.
>>
How important is a picture of myself on my personal/professional site? I'm putting together a rather basic site that will have my contact information, a built-in means to email me, my resume and a way to download it, and a handful of projects to display technical skill with Javascript.
>>
>>59379673
People who are interested in hiring you want to see a good image of you. That way, when you get an interview, they know how you look.

Get a haircut, shave, and make sure you look really nice when you take the image. And wear a shirt!
>>
What do you guys say to the clients to win the freelancer rat race when making applications? I am planning to try something cocky like "pick me" and have the client hit me up and try to convince him from there
>>
>>59379705
Awesome thank you for the information.
>>
What do you guys think about FreeCodeCamp? I see it lacks in theory, but I do it anyway.
>>
>>59379574

Well of course I would be more outgoing and prepared for an interview. I didn't say shy/aspie, I said introverted. I work better without distractions is all.
>>
>>59377881
>>59378293
This desu. Unless you want a bloated Javascript Millenial meme, VS Code what Atom wanted to become.
>>
>>59377552
Depends on what you are more comfortable with,
>>
I'm using a Python backend. Say I upload to heroku how would I tell the server to run multiple Python files simultaneously?

Would I declare it in the procfile e.g. web: file1, web: file2 etc. or do I set up a 'main.py' that calls each file?
>>
>>59377596
Where would you start on backend work, when I just started on HTML/CSS and a bit of JavaScript/jquery a few months ago. Should I just stop with the front end and solely focus on JS, and start learning Ruby on Rails and node and react? Im still fairly new
>>
>>59381207
I ended up completing several frontend projects for local business here before moving to php and backend. Really helped to solidify learned skills in a "real world".
>>
>>59377552
node isn't perfect, but it's better than php
>>
>>59377724
not in my country. they're at parity. seniors get around 100k usd for either
>>
>>59377716
http://norvig.com/21-days.html
check this article by Peter Norvig - "Teach yourself Programming in Ten Years"

it's a marathon, not a sprint
>>
>>59378293
never thought I'd me using ms tech in 201, but it really is solid. and the pace of development is staggering.
>>
File: webstorm.png (19KB, 400x400px) Image search: [Google]
webstorm.png
19KB, 400x400px
why (not)?
>>
>>59381645
Because it's not vim or emacs
>>
I can't get my head around nested/multiple booleans

Does it get easier with practice?
>>
>>59381793
>Does it get easier with practice?

No
>>
>>59379137
>>59381566

thanks for the support, guys. I know it's not a sprint, I'd like to get a job from this in about a year's time from now, but it's not just the money that drives me, it's just the thrill of learning and being challenged intellectually. College was a long time ago, and even then, it was pretty much bullshit, but this is so much fun.
>>
>>59381525
>>59377552
A better comparison would be node.js and ReactPHP
>>
I need help, friendos.

I started the frontend meme html/css and i am trying to learn javascript. I saw some anons recommended both eloquent javascript and you dont know javascript- but i cant seem to grasp some of the seemingly easy concepts. Like using a function as a value to pass into another function as an argument- shit is confusing the hell out of me.

Also, when i began reading "eloquent javascript" everything was making sense and i could more or less do the practice problems at the end of the chapter- but when i hit chapter 5 its like i ran into a brick wall. I can kind of understand what is going on but i cannot write the code from scratch and get a write answer.

Is javascript just not for me? Am i too stupid? Have any of you guys ever ran into this? If so what did you do?
>>
>>59379977
You won't get through it if you're starting from scratch. You'll need to hit up YouTube and work through some tuts, with a w3 tab open for quick reference.

Don't go to camp until you have a firm grip on HTML5, CSS3, and JavaScript/ bootstrap/jquery
>>
>>59383001
>Is javascript just not for me? Am i too stupid?
No, you just faced "functions as first class objects" concept for the first time. It can be confusing while ironically being more natural in a sense.

It you have the time I'd suggest reading a bit of sicp (like first two chapters) and doing exercises, it certainly helps. Map, filter, all that shit. js is kinda "lisp-ish" anyway. And there was a sicp js version iirc
>>
>>59383237

Cool, ill try that.
>>
>>59383237
gotta agree with this anon here. SICP is /g/'s favorite meme for a reason. It does a great job at explaining the fundamental concepts, like the ones you're having trouble understanding just now. Spend a day or two on chaps 1 and 2 and you should be good to go.
>>
File: howtodo.png (2KB, 333x266px) Image search: [Google]
howtodo.png
2KB, 333x266px
How do I achieve this effect in bootstrap with CSS, IE getting the diagonal line while using columns.
>>
>>59383001

Sign up for pluralsight
Take their JS courses, make sure you code along and UNDERSTAND why you are doing what

By book is so .. dry

also in OP there is a good Youtuber, funfunfunction, check his JS series, he explains shit really good
>>
>>59383758
I don't really know about bootstrap, and there might be an easier way to do this even in plain CSS, but the way I would go about it would probably be using some CSS shapes and/or some matrix transforms.

Basically you would use a skew transform on each column, but then you might have to use its inverse transform on the contents so that the text/elements it contains don't get stretched. (You might also want to shift the text left so that it doesn't overflow into the next column's area.)

And then to contain the text inside the new column bounds you could use shape-inside/outside with a polygon, but that wouldn't be ideal, since only webkit supports CSS shapes, so you'd want to make sure it still looks ok without the text reflow.
>>
What's a decent and affordable CMS?
>>
HOW THE FUCK DO I ENCODE A STRING PROPERLY TO SEND TO MY QUERY VIA AJAX?
>>
>>59381793
Wtf is nested/multiple booleans?
De Morgan's laws?
>>
>>59381793
What exactly are you confused about?

You evaluate the thing inside the innermost parentheses, and then you replace the expression within the parentheses with the result, and repeat outward.
>>
Consultant web dev with 3 years of experience here, doing good work, earning well. I feel like work is getting fucking boring, like I'm just doing the same simple stuff over and over again with new frameworks every few months. I'm not even a dedicated frontender, I do backend stuff too, it's just that none of my colleagues have a clue or even want to touch JS or CSS so I end up taking all of that responsibility. Should I quit consulting and web dev and make a machine learning based startup? Or maybe learn more about graphic and UX design and work with the more human aspects?
>>
>>59384391
Check out https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent

MDN is fucking boss, use it
>>
>>59377579
> east coast
>>
>>59381121
I don't have any experience with Python web servers, but I would guess that you want a main.py that creates and manages the threads/procedures like you say, so you maintain control of all the execution.
>>
>>59377618
Just today.

Female coworker: I did some functional programming in JavaScript today and...
Me: Wow! You finally got this map and reduce thing?
FC: What? You don't understand. I passed a function in jQuery to get...
Me: Nevermind.
>>
>>59377552
I started with java and assembly in college. Experimented with PHP then Python and Ruby. Node is one language I just can't get my head around.
>>
>>59384993
And how old are you?
>>
Over the past few weeks I've starting learning frontend webdev but now I want to move on to backend.
Where should I start and what framework should I learn?
I have a basic understanding of normal programming, webserver setup and sql, but backend webdev is still a complete mystery to me.
How can I make something simple like a guestbook or an image hosting site?
>>
>>59385335
So much too choose from:

Python - Django, Flask
PHP - Laravel
Ruby - Rails, Sinatra
C# - ASP.NET
>>
>>59385393
>>59385335
Just like to add Flask and Sinatra are both micro frameworks so there's not that much boilerplate code you need to learn to get started.
>>
So when i search for job i check multiple languages and i have never seen someone asking for ruby developer.
Why are people learning ruby when it is useless?
>>
>>59385470
I see positions for rails devs all the time. Although I'm not really actively searching, just seeing ads when using random sites.
>>
>>59385470
There's still a lot of demand for ruby on rails developers.
>>
>>59385470
>>59385470
depends on where you're located, man. If your goal is to get a web dev job, study the most popular framework in your target job market.
>>
>>59385521
>Serbia

All i see here (for webdev) is php(laravel, drupal etc), c#.net, java Jersey
>>
<?php
class foo
{
function do_foo()
{
echo "Doing foo.";
}
}



when do you use
$bar = new foo;
$bar->do_foo();

and when
$bar = foo::do_foo();
>>
File: 1435626609712.png (362KB, 700x700px) Image search: [Google]
1435626609712.png
362KB, 700x700px
I've been searching guides on regex in javascript to learn how to use wildcards but none of the articles I see explains how to make this:

"firstword" + "I don't care what text is here between the first word and the second word" + "secondword"


Any ideas how to create a wildcard for this situation?
>>
File: shot.gif (3MB, 800x600px) Image search: [Google]
shot.gif
3MB, 800x600px
Are these types of animations hard to make? Specially how the item goes to the cart icon, everything else looks like it can be done with css but that one part has me puzzled.
>>
>>59386075
back to codeacademy you go
>>
>>59386118
https://stackoverflow.com/questions/4225577/javascript-replace-regex-wildcard
Is this what you're looking for?

I don't know about regex, but * is usually used for an unknown number of any possible characters
>>
>>59386131
Jquery has some functions for animations, I'm guessing it was done with those
>>
Anyone here been sent online tests to do for an interview?

I got given one and failed miserably. desu I found it quite funny.Since the questions i had to complete were writing some kind of math functions that required multiple different operations and stuff done with like 3 - 5 minutes to complete.

In the end I just skipped since i assumed i failed and cba doing this when i probably wouldn't get the interview.
>>
>>59386217
can you share the test?
>>
>>59386260
it was something they register you on, and send a link.
>>
>>59386118
I don't know anything about regexes, but I had a similar issue and just wrote a function using javascript's string indexOf()

function getSubstrings(searchStr, startStr, endStr, strCount = 1) {
var searchStartIndex = 0;
var results = [];
var startIndex;
var endIndex;
for (var i = 0; i < strCount; i++) {
startIndex = searchStr.indexOf(startStr, searchStartIndex);
endIndex = searchStr.indexOf(endStr, startIndex + startStr.length);
searchStartIndex = endIndex + endStr.length;
if (startIndex < 0 || endIndex <= startIndex + startStr.length) {
results[i] = "";
}
else {
results[i] = searchStr.substring(startIndex, endIndex + endStr.length);
}
}
return results;
}


It returns a list of all substrings of that pattern, and makes some assumptions about strings not overlapping, but it might be useful to you.
>>
>>59383047
why not? I got to jquery, don't see anything difficult. Though I have done some tutorials back in the day, I forgot most of it.
>>
>>59386118
0 or more characters between 1st and 2nd word:
/firstword.*secondword/


0 or more characters between 1st and 2nd word, non-greedy:
/firstword.*?secondword/


1 or more characters between 1st and 2nd word:
/firstword.+secondword/


1 or more characters between 1st and 2nd word, non-greedy:
/firstword.+?secondword/


Replace the dot with "(.|\n|\r)" (quotes not included) if the 1st and 2nd word are not necessarily on the same line
>>
>>59386217
i had and i didnt pass
everything worked btw
later when i checked that company i saw that they didnt hired 1 new developer.
fuck those faggots
>>
im getting this error when trying to access my network drive in my web app

GET http://url/here/ayy/lmao net::ERR_CONNECTION_TIMED_OUT


wat do?
>>
>>59386207
>>59386131

yup, jquery for sure. The resize image function, which is obviously used on that gif, is one of the first to be taught. Check out Udemy, you'll find something there for sure. The other half of that animation is a move image function, can't remember the exact name.
>>
>>59386131
You know you can view-source:?
>>
>>59386508
It's a gif posted in dribble you retard, it's not live yet.
>>
>>59386518
btw, things like that are never good for website

Designers are faggots and they dont consider low performance PCs, this shit would probably lag a log
>>
>>59386173
That solution though doesn't really fit in the script I'm making, I just want javascript to use that part of string between the 2 known words without modifying it, leaving it untouched but I can't find a way to tell it to do that.

>>59386314
I'm using indexOf() though in a different way:

https://paste.ofcode.org/FsG5BkWzhJb5TZZkfcEERX
I can't post here because it keeps saying it's spam for whatever reason, I wonder who came up with this stupid spam filter, it's destroying the purpose of [?code?] on this board.

The asterisks are a placeholder for the wildcard I'm searching, do you maybe know a different approach to this kind job? I wanted the script to recognize a domain name and add a prefix to the link ignoring the subdomain and the part after the domain name too.

I made a version with document.getElementsByTagName('a') too but there's still the same issue. I need to run the script for both hyperlinks and plain text links anyway.

>>59386337
The problem is, can I apply that to an output? maybe I shouldn't try the regex approach.
>>
>>59386131
Nah, not that hard in plain CSS transitions, with JS to change its position

https://codepen.io/kyle-rb/pen/qrjMbo
>>
Stupid question here. Got web dev class this semester and teacher is using java, servlets and jsp. Every book and tutorial i see around is about php and javascript. Should i keep studying it after this class or just forget it? Are there any jobs out there that use it?
>>
>>59386659
>I just want javascript to use that part of string between the 2 known words without modifying it
>can I apply that to an output?
You can use capture groups, but I don't understand what the hell you're trying to do
>>
>>59386418
start the web server on your network drive server.
>>
>>59386907
This is the code:
https://paste.ofcode.org/FsG5BkWzhJb5TZZkfcEERX

No idea why I can't post it here, it's recognized as spam for unknown reasons.

I wanted the script to recognize a domain name and add a prefix to the link ignoring the subdomain and the part after the domain name too.
>>
>>59386937

idk what you mean. The app just runs locall. I'm connected to the other server and can access the files via windows explorer but when i try to access it in the web browser it doesnt worrk
>>
>>59386958
First of all, stop trying to modify URLs directly when you can just use window.URL

Are you trying to do something like this?
const yourUrl = 'http://foo.bar.baz/wibble/wobble?wubble=wobbly';
const url = new URL(yourUrl);
url.host = url.host.replace(/[^.]+(\.bar\.baz)/, 'surprise$1');
const yourNewUrl = url.toString(); // http://surprise.bar.baz/wibble/wobble?wubble=wobbly

This replaces the "foo" in "foo.bar.baz" with "surprise"
>>
>>59386999
so you can access them using what? samba?
http implies getting the files over http, explorer does not use http.
>>
How do I get an absolutely positioned element to take up space?
>>
>>59387088

nvm i got it i needed to use UNC naming convention
>>
>>59387205
set left/right/top/bottom css style properties.

so if you position something left:0 and right:0 it'll stretch over the entire width.
>>
File: example.png (14KB, 1138x231px) Image search: [Google]
example.png
14KB, 1138x231px
>>59387065
I'm tyring to create an userscript to do this, but I want this script to do it only for certain domain names, not for all links. The problem with a constant is that it won't recognize variable subdomains I think, though I've never used that before so maybe there's a way?
>>
>>59387269

Sorry, I mean, how do I get it to move the shit thats around it, especially when resizing.

Currently absolute makes it so every other element acts like its not there, I want that to not happen.
>>
>>59387352
the point of absolute positioning is to not move any elements around it.

if you need it to move other elements then absolute is not for you.
>>
>>59387316
Generate a custom regex based on the domains you want to change? It's not pretty but it's quick to make and it works

const domains = [
'domain1\\.com',
'domain2\\.net',
'domain3\\.org'
];

const regex = new RegExp('[^.]+\.(' + domains.join('|') + ')');

'a.domain1.com'.replace(regex, 'nope.$1'); // a replaced with nope
'b.domain2.net'.replace(regex, 'nope.$1'); // b replaced with nope
'c.domain3.org'.replace(regex, 'nope.$1'); // c replaced with nope
'd.domain4.edu'.replace(regex, 'nope.$1'); // not replaced
'e.domain5.int'.replace(regex, 'nope.$1'); // not replaced
>>
>>59387401

But the positioning aspect is what I want, when the element containing it changes size, I want it to always stay in the same place.
>>
In Flask, is there any way to tell when the client closed the connection (e.g. stopped trying to load the page)?
I'm implementing long polling but I want the polling to be able to be stopped before a response is found.
>>
>>59387474
try using flexbox instead.
no idea what you're looking for to do, but absolute positioning is exactly that, absolute without interfering anything else.
>>
whats the best way to use JSON.stringify to change that into JSON so you can easily display it? i tried JSON.parsing it but it didnt look right
>>
>>59387656
let prettyJsonString = JSON.stringify(myObject, null, '    ');
>>
>>59387656
JSON.stringify({...}, null, 4);
>>
>>59387454
but I didn't want to replace the subdomain, I just wanted to add the archive prefix to the link, the problem was that the subdomains can change, that's why I'm trying to create a wildcard for subdomains of the known domain names.

Using your example, I wanted to do something like this:

var domains = [
'*.domain1\\.com',
'*.domain2\\.net',
'*.domain3\\.org'
];

const regex = new RegExp('[^.]+\.(' + domains.join('|') + ')');

'*.domain1.com'.replace(regex, "https://web.archive.org/*/" + domains[0]);
'*.domain2.net'.replace(regex, "https://web.archive.org/*/" + domains[1]);
'*.domain3.org'.replace(regex, "https://web.archive.org/*/" + domains[2]);


Though I doubt this is the correct syntax.
>>
>>59387694
>>59387702

heres what im getting still
>>
>>59387749
http://codepen.io/anon/pen/evRQzO
>>
>>59387732
Create a dynamic regex and match it against the end of the host. If it matches, return the prefixed url, if it doesn't, return the original url.

const domains = [
'\\.domain1\\.com',
'\\.domain2\\.net',
'\\.domain3\\.org'
];

const regex = new RegExp('(' + domains.join('|') + ')$');

const myWonderfulTransformationFunction = function(url) {
const domain = new URL(url).host;
if (!regex.test(domain)) return url;
else return 'yourWonderfulPrefix://' + url;
};

myWonderfulTransformationFunction('http://a.domain1.com/a');
myWonderfulTransformationFunction('http://b.domain2.net/b');
myWonderfulTransformationFunction('http://c.domain3.org/c');
myWonderfulTransformationFunction('http://d.domain4.edu/d');
myWonderfulTransformationFunction('http://e.domain5.int/e');
>>
>>59387792

thanks

another thing, this csv file im reading from doesnt have headers.....fek. wat do?
>>
>>59387933
why do you need them?
is the file always the same? if so, then you can just predefine them.

How you do that depends on how you read CSV files.
>>
>>59387839
>
myWonderfulTransformationFunction('http://a.domain1.com/a');
myWonderfulTransformationFunction('http://b.domain2.net/b');
myWonderfulTransformationFunction('http://c.domain3.org/c');
myWonderfulTransformationFunction('http://d.domain4.edu/d');
myWonderfulTransformationFunction('http://e.domain5.int/e');


I still have to find a way to locate the URLs and feed them to the function though, or not? I'm a bit confused with this part.
>>
>>59387839
>>59388000
Or can I use window.URL (that you mentioned in >>59387065) to locate URLs in a web page? I'm not doing this for the current page URL by the way, I'm trying to scrape the open page and search for all URLs in it, then apply the changes.
>>
>>59388240
>all URLs in it
all URLs in it that match the domain list* I meant.
>>
>>59387983

idk how to grab the data since i cant go like data.Name or data.itemNum, etc
>>
>>59388430
gotta write a CSV parser first.
>>
>>59381207
Front end skills are important to have, especially in a portfolio as that is the part that hr/non-coders see. But don't ever become a 'designer' unless you enjoy earning $20k less than the 'programmers'.
>>
Guys, I need help.

I have experience with Java and Python, but now I want to learn web development.
First I want to start with front-end things, I know HTML, CSS and JavaScript... do I need something more?

And for back-end... what do i need to learn? Python? PHP (Is it still alive?)?...
Can someone help me.
>>
>>59388264
>>59388240
>>59388000
const whitelist = ['google.com', 'example.com'];
const aElements = document.querySelectorAll('a[href]');

const transformUrl = (url) => {
return `https://web.archive.org/*/${url}`;
};

aElements.forEach((el) => {
let url = new URL(el.href);
if (!whitelist.includes(url.host)) {
return;
}
el.href = transformUrl(el.href);
});
>>
>>59386578
So much this. Low power pcs, tablets, phones, etc. It leads to a bad user experience. No one cares if the cart does that fancy shit, they just want to buy things.
>>
>>59388628
what if I want to code fancy but fast shit?
>>
Why are my images ignoring size restrictions, margins, and padding ;_;
I have a margin on the main body I want preserved.
I have padding on the div the img is in I want preserved.
I want the image to be as large as it can be without creating a horizontal scroll or changing these margins and paddings.
Setting max-width:100vw; on the img doesn't work as expected/desired.
>>
>>59388565
you can do back end with java and python so it seems you're already set f-a-m
>PHP (Is it still alive?)
right now is arguably the golden age of php to be quite honestly honest. frameworks are cool, libraries are cool and everyone follows the standards to the point developing in php is a lot better than the non-shit languages
>>
File: scrot.png (151KB, 1024x200px) Image search: [Google]
scrot.png
151KB, 1024x200px
>>59389093
Here, I did an exaggerated mockup.
I want to confine the image to the view width including the margins and padding, having those on the right match those on the left.
>>
File: scrot.png (130KB, 1024x200px) Image search: [Google]
scrot.png
130KB, 1024x200px
>>59389259
max-width:100vw; on the img gets close, but it's still pushed off the right side and ignores the body margin.
>>
>>59389148
>>59389259
>>59389397
Are you setting 100vw on the image, or on the div containing the image?

Also, which one of those images am I supposed to be looking at?
>>
I feel like I'm becoming a worse developer ever since I got a job.
>>
File: scrot.png (149KB, 1024x200px) Image search: [Google]
scrot.png
149KB, 1024x200px
>>59390403
On the image.
The bottom one.
Here's what I desire - But this was done manually with max-width:calc(...); and isn't abstractable.
>>
>>59390670
I've found something that works but I've no idea how or why...

img {
width:calc(100vw - (100vw - 100%));
height:auto;
}
>>
>>59390670
Yeah, you shouldn't be using vw at all probably. That's going to be length relative to the viewport, which won't take padding or margins into consideration.

You probably want to set the image width to 100%, which will be relative to the div that contains it.

Then just set the div's left and right each to 0px?

Let me know if that doesn't work for you, or if I'm incorrect.
>>
>>59391064
Like a charm, thank you
I feel dumb now having been way overcomplicating this.
>>
>>59391111
By the way, depending on whether you used absolute or relative for the div, there might be some automatically added left and right margin on the body, so you might want to set that to 0.
>>
>https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label#Using_a_labeled_block_with_break

no one told me js had goto
>>
File: context-menu.png (29KB, 1072x768px) Image search: [Google]
context-menu.png
29KB, 1072x768px
How do I add multiple context menu items to a menu without having a submenu?

I'm learning about webextensions (and JS as I go). I have completed a couple of tutorials on the mozilla dev site:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions

>Your first webextension
>Your second webextension

I'm now looking at Context Menus. Using the techniques presented in the tutorials, I can generate something similar to the attached pic. Here is my JS (I don't *think* the manifest.json is relevant):
var obj0 = {
id: "xx-id",
title: "MENU ITEM 0",
contexts: ["page"]
};

var obj1 = {
type: "normal",
id: "xx-id-2",
title: "MENU ITEM 1",
contexts: ["page"],
};

browser.contextMenus.create(obj0);
browser.contextMenus.create(obj1);


It works. But items are added to a submenu. How would I add the items to the "main" context menu? I'm not sure if I am describing it correctly because all the Google searches seem to ignore "parent".

Thanks.
>>
I'm just starting with PHP 7.1 and I have no idea what to do for a project to learn, I'm used to non-web languages and I'm at a loss here, any suggestions?
>>
what is a good tutorial to learn html5?
>>
>>59377552
stick with the js stack
>>
>>59386118
(^\s?\w+\b|(\b\w+)[\.?!\s]*$)
>>
can anyone link me to a site that teaches me how to use integrate js into html

i went through like three and it was just stand alone js
>>
>>59386131
yep that is hard
>>
wtf is the difference between a web framework and api?
>>
>>59384993
node is javascript
>>
>>59384958
>female
>>
File: undefined.gif (355KB, 250x183px) Image search: [Google]
undefined.gif
355KB, 250x183px
I can't tell if I'm stupid, or disabled, or what. I'm a C#, Java, and Ruby developer who does fine in all three. I mostly create development tools for games, some low level some high level. The point is I'm a decent developer, I can into programming.

I've tried several times, and I just can't into webdev. I've tried to pick up javascript several times, and each time I just hit a wall. If it's not the syntax confusing the shit out of me with anonymous functions every other line it's the ambiguous as fuck type system where nothing is predictable and any errors/fuckups you run into happen silently.

I heard that TypeScript is less shit, and I'm sure it is, but I don't want to be a fuckup who can't into basic javascript without handholding.

I've tried looking up guides and primers, but every single javascript tutorial is either for people who are just now learning what a computer is, a person who has already mastered js and is now learning about es6, or for an outdated version of the the language.

Is there a good resource for people who are already developers but just need to learn web frontend?
>>
>>59388565
java and python has web frameworks
>>
>>59378293
>>59380985
>>59377881
Or Sublime Text. It is faster and has better text rendering.
>>
>>59385393
Don't forget Elixir and Phoenix. It is rare that a new framework appears that is as complete as Rails/Django and pays as much attention to details. Phoenix is one of those.
>>
File: wake me up inside.png (75KB, 325x244px) Image search: [Google]
wake me up inside.png
75KB, 325x244px
currently reposting this because I'd like some more quick cents from more anons (and because the Stupid Questions Thread isn't up):

How long would it take for Asian botnets to shit up traffic on a self-hosted server? I'm currently getting a ~2012 Dell Inspiron, which I then plan on undervolting and underclocking to make it become a server.
This server would host a single static website that would link to other websites (ex. itch.io, Youtube, Twitter, Codeplex, Bandcamp), with some small links to other sites. If some botnet spammers were paid on Fiverr to spam my (theoretical as of now) website, could my underclocked Pentium bear the brunt of that stress?
The website below is almost what I've got in mind, albeit with several more links on the divider:
http://autofish.net/
>>
>>59393752
sublime is a nagware stop promoting it
>>
>>59394696
You can pay for it or crack it.
>>
>>59394706
there are better alternatives
>>
>>59393296
google "javascript tutorial" then click first result
>>
Does someone know some good resources on testing? E.g., what is testing, why is it necessary, what are good test practices etc.? You find mostly quizzes when googling that shit
>>
>>59377548
Was playing around with JS again today.

Figured out how to make a rudimentary stack-trace for use in debugging my future code.
https://jsfiddle.net/bk1we4h1/

JavaScript is fucking insane sometimes.
I love it.
>>
>>59394848
>have to learn all this to max out pay at $100k unless you start your own business or make money from personal projects
>>
I will soon be starting on an android app with text recognition for medicine. The purpose is to add them to a personal list and get notified when you need to take them. I'll be using Mobile Visions text API and Couchbase lite to store data. I have yet to find a database with information about medicines though.
>>
>>59394711
such as
>>
Okay, it's time to settle this https://jsperf.com/math-floor-vs-bitwise-ops
Run the test and watch how bitwise ops are superior
>>
>>59395013
notepad++, vscode for normies like you
>>
>>59392625
https://www.udemy.com/code-dynamic-websites/learn/v4/content

I finished this udemy course weeks ago and I think it is nice real project to learn PHP.

It is also free.
>>
>>59382636
>ReactPHP
Oh shit. Never heard of it. Any good?
>>
>>59396455
>N++

What is this, 2004? Cause that's what I used in 2004.
>>
Activating sublime is easy. Click Help->Add License

Past in the following

—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
200C25BE DBBC4855 C4CFB774 C5EC138C
0FEC1CEF D9DCECEC D3A5DAD1 01316C36
—— END LICENSE ——

Done.
>>
whats the best way to do two independantly scrollable sections on a site?
preferably without the need for iframes.
>>
>>59398357
use css and the div tag
>>
>start as a codecademy pleb
>spend some months as a web designer
>hipster designers around me rally around node
>decide my endgame is node
>realize my endgame will have to be node + react/redux/angular/vue/xyz + mongo
>continuously secondguess my final framework decision
>every node project has you learn yet another thing as if it's a fucking joke
>PHP keeps taunting me with its relative stable ecosystem
>don't want to use PHP because there's no hipster cred in it
>settle on Django since Python actually has use outside of the web meme world
>actually get some work done instead of sipping coffee and installing packages at Starbucks with """developers"""
WHEW
>>
>>59393798
If youre planning on doing this for search engine optimization I feel bad for you, son. I've got 99 problems but Pajeet ain't one.
>>
>>59398548
>hates learning
there no way you didnt just settle on php
>>
File: dg.gif (1MB, 300x166px) Image search: [Google]
dg.gif
1MB, 300x166px
>>59398557
Nah, I just plan on hosting a small-scale website along the lines of "VISIT 'WWW.MEME.ZONE' FOR MORE MEMES", like a watermark but less obnoxious. Optimization is currently the least of my problems right now, as I've already got the knowledge of my 'target audience'.
>>
>>59398548

>>realize my endgame will have to be node + react/redux/angular/vue/xyz + mongo

you realize these are the biggest memes in devving right?
>>
>>59392625

download a random db file or make your own and write to it, read it, etc

or maybe read through a directory and grab only the first 5 characters of each file and print them out. That's a good first exercise
>>
>>59398593
I don't mind learning once I know where I'm going. Going the Node route feels like having a map that's 90% empty, with paths that keep branching off and changing. Maybe I'll go back to it after everyone plays catch up to ES6 and survival of the fittest kills off a couple frameworks.
>>
>>59398357
>whats the best way to do two independantly scrollable sections on a site?

Before you ask how, have you asked if you should?
>>
>>59398357
I was bored and this was fun to do:
http://codepen.io/anon/pen/dvzvmg
>>
>>59394914
I currently make $28,000 before taxes.

I wouldn't complain if I were suddenly making 100,000.
>>
whats faster/better? doing a nested if or using the && operator in one if?
>>
>>59399488
They both have the same short-circuit logic. From that point it's just about readability
>>
>>59399392
thanks!
>>
>>59393798
Why would anybody pay to bring down your website?

> protip: they wont unless it makes $$$
>>
What is your stance on webpack?
>>
Papa parse is amazing
>>
how to Workers work if js is single threaded?
>>
Is there some other active website/forum/chat other than /wdg/ where you can get help with web development?
>>
>>59400003
new Worker('secondaryCode.js') = new Thread('secondaryCode.js');
>>
>>59400222
/r/webdev :) :) :P :P xD xD
>>
>>59400226

so js isnt single threaded then.....?
>>
>>59400222
Yes.
>>
>>59400240
JS is based on a non-preemptive scheduling model which effectively makes your application look and (for the most part) behave like a single-threaded application (of course there are fringe/edge cases because it's JS we're talking about, after all) . Virtually all JS engines are internally multi-threaded, though
>>
>>59400338

damn so node.js must be shit then since its single threaded. Glad I stuck to just raw js/jquery because without this Worker I would have about a 5 second pause in my app on load
>>
>>59400418
>damn so node.js must be shit then since its single threaded. Glad I stuck to just raw js/jquery because without this Worker I would have about a 5 second pause in my app on load
you have no idea what you're talking about
>>
>>59400418
>node
>sht
Yea man just learn php n ruby forgot bout reavt, ull be swimming in big bucks soon
>>
>>59400489
>>59400489
>you have no idea what you're talking about

https://www.youtube.com/watch?v=bzkRVzciAZg
>>
Is django a meme or not?

Why would anybody put up with js when they can use python?
>>
>>59400531
Why would anyone put up with Python when they can use literally anything else that's not Python?
>>
>>59400489

main event loop is single thread, I/O does stuff on different threads. Node is fine for average stuff. No way could it run something like facebook or instagram tho
>>
>>59400507
>>59400514


>damn so node.js must be shit then since its single threaded
javascript is nonblocking asynchronous. it is for operations that have wait times (io on a web server)
nodejs compiles javascript at runtime and runs multithreaded. it performs faster than c++ because google fucking optimized the shit out of it
if you have high cpu intensive loads on a web server idk wtf youre doing.

>Glad I stuck to just raw js/jquery because without this Worker I would have about a 5 second pause in my app on load
nodejs isnt a replacement to webworkers
nodejs has nothing to do with webworkers
nodejs doesnt run in the browser


you resort to shitty youtube videos and talking like an idiot when faced with someone who disagrees with you

you are a retard
>>
I've done a lot of back end web dev with ruby & php and different sql servers. But I'd like to get into freelancing. Am I fucked without knowing any front end technologies? What is the bare minimum I need to know to get work? I'm a part time sys admin for a (very) small tech company and want to do something on the side
>>
>>59400647

>nodejs is faster than c++
>calling people retards

just go ahead and have a seat right here Jimmy youre on time out
>>
>>59400243
Programmers really are autistic aren't they?
>>
>>59399392
how did you become a css god?
>>
Hey guys, what's the best way to get timezone information from a user who may not know their timezone?

Specifically, this is for a call center: the agent (person working at the call center) calls someone and needs to get their timezone.

Well, the agent is in Qatar, and the Customer is in USA, and the agent doesn't know what time zone Kansas is and neither does the retard in Kansas.

Also keep in mind that the call center worker probably has a 3rd grade education and can barely use a computer. What's the most intuitive way to get timezone information from someone over the phone?
>>
How would I go about comparing two different implementations of a function?
Ideally I'd like to see how much memory is being used by each as well as time taken to complete.
>>
>>59401045
https://whatismytimezone.com/
>>
>>59400935
this is pretty simple CSS

but the way to become a god at anything is to practice
>>
>>59401045
are you sure this belongs to /wdg/?
how is that web related?
>>
>>59401071
how do i learn css programmen? is it harder than languages like c#?
>>
>>59399669
This isn't true.
>>
>>59401063
No, getting the timezone of the agent is easy. Getting the timezone of the customer is not so easy. You can't just ask them to go to this website over the phone (well, you can, but the point is you want a more intuitive system).

I figured you can just ask the customer what time it is where they are and figure out their time zone by doing some math with YOUR time zone. This is how I plan to do it but my boss wants me to explore a few other options before we decide on anything. of course "dropdown" is in the list, and I'm considering something with google maps, where you just ask the user for their address/city/state and google maps can tell you the timezone, but there's licensing issues with that.
>>
>>59401097
No. CSS is piss easy
>>
>>59401045
Customer: Hi, I'm fucking retarded?
Agent :"What time is it where you are currently?"
Customer: 3PM

TA-DA, I'm a fucking genius.
>>
>>59401121
it harder than c#i stoopid to lern
>>
>>59401137
Yeah that's what I was planning too, but my boss is making me enumerate every possible option because we're an aGiLe WoRkPlAcE cErTiFiEd and every 5 lines of code we need to have a meeting with the CTO to approve it
>>
>>59401089
It's a matter of web design?
>>
>trained in web design
>absolutely hate the "design" aspect
>when I front end I'd rather just block things out in code rather than dick around making mockups because I can already see the shit clear as day in my head
>clients can't see what I'm thinking so I have to mock up for them anyway.
Neural uplinks when?
>>
>>59401054
jsperf.com
>>
react.js

is there anything wrong with this inline css?
render() {
let { animation } = `
.commentWrap {
animation-name: animation;
animation-duration: .5s;
}
@keyframes animation {
0% {background-color:rgba(${this.state.bgcolor[0]}, ${this.state.bgcolor[1]}, ${this.state.bgcolor[2]}, 1);}
100% {background-color:white;}
}
`;
console.log("animation render should have happened");
console.log(animation);

return (
<div className='commentWrap' style={ animation }>
<div className='commentHeader'>
<CommentForm submitComment={ this.submitComment }/>
<h2 className='title'>color comments.</h2>
</div>
<CommentList
deleteComment={ this.deleteComment }
updateComment={ this.updateComment }
data={ this.state.data }/>
<div className='footer'></div>
</div>
)
}


it's returning undefined when this.state.bgcolor is updated. it's supposed to trigger a css animation but nothing's firing obviously
>>
im not making any of my javascript variables private or static or whatever the that is im just var varName. No floating globals tho

is this ok?
>>
>>59401359
no
>>
>>59401365

fek
>>
How can I make an HTTP post request using pure CSS + HTML??
>>
>>59401439
you can't unless someone presses a submit button.
>>
>>59401439

become full stack or die trying
>>
>>59401102
dumb idea maybe, but you can see their IP, right? so just use an IP locator to find out their geographical location, and from there get the time zone.

Unless you're worried about people on proxies/vpn's, but that's a minority...
>>
>>59401650
No, I can't. The customer is over the phone, not internet.
>>
>>59401588
pure HTML + CSS websites are top tier though anon

they're the latest meme
>>
I have zero ideas for what I want to build in my spare time and my portfolio is shit. Give me your ideas anons.
>>
>>59401188
Just use something like Sketch or Pencil.
http://pencil.evolus.vn/Next.html

Alternatively be fancy with a pencil sketch like pic-related. It makes you look like you know what you're doing.
>>
>>59401784
build a website that claims to have an AI that can judge art

when a user uploads an image assign a random score out of 10

store the md5 with the score so if they upload again it will get the same score

have some kind of zany caption for each score
>>
>>59398994
This. Jesus fuck, trying to learn node is like what you said, except everyone goes through the basic hello world tutorial, picks express or some other framework from a dartboard and then leaves you out to hang with gaps in between. And since everyone has a different way of doing things, you can't just up and look at something else while you're doing it for another reference, since they're likely doing it in a radically different way than the first guy. I just want a simple, brain dead tutorial like Laravel, Django, Rails and just about every other framework has to get started.

>>59401140
A lot of learning CSS to a competent level is memorizing edgecases for certain browsers, knowing how the box-model and positioning works, and having some basic design chops.
>>
If I hear one more person saying CSS is a programming language I will start shivving people
>>
>>59402282
put in an array and implode
http://php.net/manual/en/function.implode.php
>>
>>59402282

learn how to print an array
>>
>>59402203
>I just want a simple, brain dead tutorial like Laravel, Django, Rails and just about every other framework has to get started.
node.js is not a framework though, it's a runtime that includes some basic modules.

If you want something in node that's similar to Rails, check out Sails.js.
>>
is it possible to GET javascript variables from a page and bring them into a new window?
>>
>>59402275
Isn't it turing complete
>>
>>59402282
$str=$val1.",".$val2.",".$val3.",".$val4;

:^)
>>
How do I make an img src equal to a variable's name?

in pseudocode:

<img src="<php? echo '$image'?>" />
>>
>>59402275

Then why can I FizzBuzz in it?

@import "compass/css3";

ul{
list-style-type:none;
}
li:nth-child(3n), li:nth-child(5n){
font-size:0px;
}

li:nth-child(3n):before{
font-size:16px;
content:"Fizz";
}
li:nth-child(5n):after{
font-size:16px;
content:"Buzz";
}
>>
>>59402352
So is Magic: The Gathering.
Look it up.
>>
>>59400935
Practice and assume that you can do anything with CSS3. The hardest part is just phrasing what you want to do in such a way that Google will pull up the answer for you, then go read up on the property at w3schools.

No one knows every CSS3 property by heart and you don't need to. Just learn the basics and have a few tricks up your sleeve to wow people. If you see something cool on a site, right click and select inspect element to figure out how they did it.

>>59402275
How long till variables in CSS?
>>
>>59402511

brb adding "CSS programmer" on my resume
>>
>>59402541
https://developer.mozilla.org/en-US/docs/Web/CSS/var
>>
>>59402506
disregard this post, I discovered how to. for some reason, my IDE wasn't registering php, but everything is working now
>>
>>59402349

nvm i found how

window.opener

holy shit this awesome. JS is god tier
>>
>>59402556
Nice. There just needs to be a darken and lighten function now.

>It’s defined as any valid identifier that starts with two dashes.

I could live without the two dashes but I guess it's better than scss.
>>
>>59402721
https://drafts.csswg.org/css-color/#funcdef-color
>>
What do css gods use? Sass?
>>
for global variables is it better to just put them i script tags or use

(function() {
//globals here
});
>>
>>59403058
If they're wrapped in a function by definition they're not global
Anyway yes, wrap whenever possible
>>
File: file.png (22KB, 345x181px) Image search: [Google]
file.png
22KB, 345x181px
I have this table here, how would I go about selecting all rows where there's a 10 in the dog_id column?
>>
>>59403317

this is very very basic SQL which you should be learning on the million other resources out there

SELECT * FROM table_name WHERE dog_id = 10;
>>
>>59403351
He's done the stupid thing and turned it into a comma-separated string, though.

>>59403317
Make a new table with "id" and "dog_id" fields instead if you want multiple values.
>>
>>59403409
>>59403317
Which RDBMS is it?
>>
>>59403439
Judging by the UI, MySQL.

He could use LIKE with wildcards '10,%' OR '%, 10' OR '%, 10, %' etc. but that's terrible.
>>
>>59403317
The easiest way (without rearranging your DB) would be to do something like

SELECT * FROM table_name WHERE dog_id="%10%";
>>
>>59403489

ya he would have to use a LIKE query

ID columns should be unique. OP should redo his tables ASAP
>>
>>59403518
Would match dog_id 100 or 110
>>
>>59403489
If it's MySQL he can use a regexp query

SELECT * FROM test;
+--------+
| value |
+--------+
| 2 |
| 1 |
| 10 |
| 10 |
| 1,9,10 |
+--------+


SELECT * FROM test WHERE value REGEXP '\\b10\\b';
+--------+
| value |
+--------+
| 10 |
| 10 |
| 1,9,10 |
+--------+
>>
>>59403439
MySQL

>>59403409
>>59403531
Yeah I figured that was a bad idea, I think I've fucked myself here.
It's for a school assignment, and the basic idea is that there's an activity which people can attend with their dogs for the activities that allow it.
I have used multiple tables like that before, but I'm not used to it so feel like it's gonna make it harder when I have say a dog with ID 5 and a human with id 5 attending the same activity and shit.

>>59403518
That would also get values like 100 though
>>
>>59403559
Fair point, modify to add the comma then
>>
>>59403559

make a humans and dogs table and join them on id=5
>>
File: file.png (10KB, 523x95px) Image search: [Google]
file.png
10KB, 523x95px
>>59403574
Can you elaborate? Like add a comma at the end of every dog_id thing? But then what? I removed the comma on purpose because, I don't know I figured it was a good idea.

>>59403541
Huh never heard about this, but it doesn't seem to do the job. Or am I doing it wrong?
>>
>>59403651
Dunno, the regex should work, assuming the column contains string values and their contents are the same as the ones shown above
Try running the query directly with the mysql client to see if it works there
>>
>>59403771
Hmm, maybe I'm too tired, but I think I'm just gonna bite the sour cock and do what I think >>59403592 is saying, thanks for the help though lads.
>>
Dear /wdg/,

I am happy to report my safe return from the Joomla mines. I have suffered, but am alive and now in reasonably good health and mood.

I am writing to you because I have been informed that you can provide me with a piece of information I sorely require. I am in need of a new CMS but I never again, if I can help it, do I want to touch Drupal, WordPress or the accused Joomla. Could you be so kind as to suggest an open source, modern CMS built on sound foundations of code? The language it is written in matters not to me. I will be much obliged.

Sincerely,
Anon
>>
>>59403996
make your own.
>>
>>59403996
P.S.: That was meant to say "accursed", not "accused". I can assure you I am not overindulging in the whiskey.
>>
File: file.png (5KB, 395x112px) Image search: [Google]
file.png
5KB, 395x112px
when inserting a row into SQL with PHP, is there a quick way to make it skip a row if it's a duplicate entry based on say, a name, without having to select the table first, and then doing some "if num_rows > 0" type shit?

like if this is my table, and I'm trying to insert another row where the name is James Holmes, it would just skip it?

also, for future reference, how to I create a neat ASCII table thing like >>59403541 instead of this mess?
>>
>>59404176
>into SQL
what sql server?
In MSSQL there's MERGE
https://msdn.microsoft.com/en-us/library/bb510625.aspx
and MySQL has ON DUPLICATE
https://dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate.html
>>
>>59404176
>is there a quick way to make it skip a row if it's a duplicate entry
http://stackoverflow.com/questions/14534972/mysql-insert-if-doesnt-exist-yet
>>
Ok, so I have a concern here.

Most of us that learn web dev <em>look</em> for jobs, or want a job in the field. Nothing wrong with this.

A tiny fraction want to start their own company. Does anyone have any experience with this? I'm thinking about diving in, being my own boss, contacting local businesses and making their sites/doing general IT work, etc.

If anyone has experience, can you please give some advice?

Thanks, Anons.
>>
>>59404280
>If anyone has experience, can you please give some advice?
Read some quality business books. Go to >>>/biz/ and ask a few questions, but don't drink that board's Kool-Aid.
>>
>>59404280
learn wordpress

this doesn't really have anything to do with webdev it's basically just businessess/shilling but if you are a good shill you can make tons fo money

just learn basic wordpress
>>
React question

im trying to render a list of events from ticketmaster api

the request goes fine but rendering is whre im stuck

the json comes back as

_embedded: {
events: [array]

i know i can acess this with

List.propTypes = {
items: React.PropTypes.array,
}

if it wasnt embedded, so far im let to believe i have to use something like this
React.PropTypes.shape({
color: React.PropTypes.string,
fontSize: React.PropTypes.number
}),

but how would i do that?
>>
>>59405077

why do you need react to display a list from an api?
>>
anyone familiar with Opencart? I'm trying to replace the default storefront with a page that I created locally a while ago. Do I just copy the code and paste it in one of the modules? I don't want to fuck anything up
>>
>>59405231
Im using redux saga and its a small project just using the json n going render concerts n stuff
>>
>>59377548
RedbeanPHP is the shit. I love it.
>>
>>59403574
What if the "value" is: "1, 10"
>>
>>59405373
I know crap about Open Cart, but I bet they have themes, child themes and custom templates for pages (just like Wordpress). Read the documentation.
>>
>>59405801
Looks good
>>
redpill me on asp.net mvc /w active directory integration. I want to fuk shit up at werk where do I start?
>>
>>59404280
Every customer I have I got through personal relationships. Knowing people and talking to them about what I can do and promising them I can improve their SEO. In the end, I put in a lot of time learning how to do it efficiently but Id like to think I got a lot better at webshit in the course of making my own CMS which you will if you dont use a premade one.
>>
>>59404346
Can you elaborate pls senpai? How do people make money from wordpress? Designing themes/plugins?
>>
>>59406805
>asp.net mvc
It's pretty good stuff. Look at a few books at http://www.allitebooks.com/page/1/?s=asp.net and pick one you like.
>/w active directory integration
2enterprise4me
>>
Hey, what is the best stack for a websocket application. I plan to have clients connect to my backend application, which will have to do some heavy lifting, so ideally I might have several processes, or several servers to distribute the load. I was thinking of doing something in go, but is there anything good out there already?
>>
>>59407586
Socketio
>>
I haven't worked on anything since a few months due depression. Can you give me any example of something easy to get started again?
>>
>>59407626
How well does that handle blocking stuff on the backend? Ideally I wouldn't want my service to die if a bunch of people were trying to use it at once, and they all were running blocking cpu heavy code.
>>
>>59407669
Make it first then optimize.

You should be worrying about scalability and loadbalancing when choosing your servers, not language.
>>
>want to finally start learning MS stack
>there are now asp.net and .net core
>confused
what should I choose senpai
>>
>>59407986
>Pajeet stack
Why? Learn php or node and get a job.
>>
>>59408760
there are a lot of .net jobs around me and C# is nicer
>>
>>59408760
I'm not sure if this is a joke or what. I'm in the NE corridor and half the jobs are .NET.
>>
<button onclick="myFunction()">Try it</button>

<div id="myDIV">
<p>First p element</p>
<p>Second p element</p>
</div>

<p id="hey">.</p>

<script>
function myFunction() {
var c = document.getElementById("myDIV").childNodes[1].nodeValue;
document.getElementById("hey").innerHTML = c;
}

Can someone tell me why I can't get the value of the first div element and change my hey paragraph to it?
>>
Hey /wdg/ i've been building this website with jekyll and now i want to add a panel that allows people how can't code to post like blog posts with pictures and text, only if they are admin thou. Whats the best way to do this?
>>
>>59406112
Then the database is fucked up
>>
So is Node.js a complete backend?
I only know HTML/CSS and some vanilla JS right now. If I learn Node.js will that cover the backend or will I have to learn some other language and framework?
>>
>>59409206
Nah, you got it right. You can use all node.js on your backend fine if that you prefer.
>>
>>59401661
>No, I can't. The customer is over the phone, not internet.

then use their area code you giga-mong
>>
>>59408814
>Note: Whitespace inside elements is considered as text, and text is considered as nodes. Comments are also considered as nodes

check childNodes length in console
var c = document.getElementById("myDIV").getElementsByTagName("P")[1].innerHTML;
>>
>>59409390
I miswrote it, I was trying to get the text of my first <p> which is child[1]. How come my version didn't work? nodeValue returns the text inside the element and childNode[1] is the first <p>. Do I need to use the getElementsByTagName to get values?
>>
File: hierarchy.png (10KB, 558x292px) Image search: [Google]
hierarchy.png
10KB, 558x292px
>>59409636
>nodeValue returns the text inside the element
No, it return text only for text and comment nodes (first whitespaces node for example), but <p> is Element node.

https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue
>>
>>59409781
<div>ababa<p>rerer</p>gagaga</div>

I think I understand now, so basically if there's a element imbedded I need to do a innerHTML to fish it out.
>>
What is the best way to add an application to a webpage?
>>
>>59390539
Fucking kek. I live in fear of this. I am a neet and just work on my own projects all the livelong day. I could get a job, but I know it would crush my soul and suck the fun out of it.
>>
>>59393477
What about js confuses you? It's so much like c# you can basically copy/paste c# code into your js ide and use the highlights to help translate it. Just look up a good js library for gui's n shit. The resource you need is google.
>>
Jr developer here
Where can I host a portfolio with my work and curriculum shit?
What should a dev portfolio contain?
>>
>>59410940
wherever you can host a website

I'd recommend using a VPS like digital ocean so you can learn some more skills but obviously won't be the easiest thing for you.

For portfolio put projects you'vde made which show your skills
remake a twitter/reddit is said pretty often thats more if your full stack though

generally make sites you are able to make with your skills
it's better if i'ts not just tutorials but if thats all you ahve thats better then nothing.
>>
This whitespace being counted really throwing me off for using .length
>>
File: 2.jpg (7KB, 153x218px) Image search: [Google]
2.jpg
7KB, 153x218px
>>59407986
.NET core is the newest thing and MS is trying to push it hard. Whether it will catch on or not, I have no idea.

ASP.NET has been around for a while and it is pretty established, but MS has changed directions so some things like web forms will no longer be supported.

I'm going along with pic related, pretty good so far.
>>
Being a backend developer sounds fun, but what is actually involved in being one? What are typical tasks, repsonsibilites and what languages would you need to know to be a successful one?
>>
>>59411806
languages depends on whatever the company you work for chooses: PHP, Java, C#, Python or any of the JS-based memes. Also any SQL-based lang.

You'll be working a lot with databases, and then doing whatever your employer's main business is. If you do Amazon's backend, you'll be doing inventory management, credit card management, client registries, etc.

I saw a job ad from an ebook company where you would work on developing all ebook-related software: reader, editor, converter, etc.

Just my guess, neet as fuck here.
>>
A question for professional web designers, do you guys memorize most functions and tools. Like, you're able to memorize a lot of what html, css, php, sql, js, ect. all have to offer? I can barely remember something as easy as how to implement while loops. I always have either three books full of coding tips near me or a bunch of tabs open. But what I am good at is implementation and design. I showed my boss the other day what I'm capable of (just showed him a website I slapped together) and he was very amazed. He's getting a job at a pretty high tier website company and he said he probably couldn't do some of the things I did. Made me happy and made me want to apply to some higher tier companies myself, but I feel like the memorization aspect is greatly holding me back.
>>
>>59410940
github pages are free for basics websites.
>>
Not sure if this is the right thread, but I have a problem related to websites.

I have a web server at home. I also have a DNS name pointed at my router (port 80 and 443 are mapped to my local web server).

I'm able to reach the website, using both HTTP and HTTPS, from internet. However, when I type in www.example.org from within my LAN, I reach the login page of my router (the same page as if I've typed 192.168.0.1).

Is there a way to fix this? Wouldn't really be a problem if I hadn't used virtual hosts, but I must reach multiple websites.
Thread posts: 318
Thread images: 24


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.