[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: 325
Thread images: 28

File: wdginanutshell.jpg (207KB, 890x593px) Image search: [Google]
wdginanutshell.jpg
207KB, 890x593px
Previous >>55685119

> 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/
[YouTube] Crockford on JavaScript - Volume 1: The Early Years lecture series.

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

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
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
[YouTube] WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
[YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.


>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
https://www.openshift.com/
https://scaleway.com/
>>
Get to work you lazy cunts.
>>
>>55740531
rpg character gen anon here.

Seems like a neat idea, but it's a bit beyond my ability at the moment. Basically the thing I'm making picks a D&D inspired class, race, alignment, gender, and age, and constructs a character description based on that, dwarf-fortress style. It's not much, but it's something I've been wanting to make for a while.
>>
File: 1453927116094.png (60KB, 500x371px) Image search: [Google]
1453927116094.png
60KB, 500x371px
2am. I have work in the morning
>>
>https://programming-motherfucker.com/
>This site can’t be reached
>>
>>55740894
the site works fine, drop the https
>>
File: 3 and a half fans.jpg (347KB, 1024x648px) Image search: [Google]
3 and a half fans.jpg
347KB, 1024x648px
>>>55738596
>>>55738569

thanks for the suggestions but this worked exactly how i wanted:


<button onclick="test()">Press Me</button>

<script>
function test(){
var audio = new Audio('C1a.wav');
audio.play();
}
</script>

>>
How about this:

A dynamic dashboard that automatically refreshes and updates content from a database table that you can define individually.

You have tables in a DB. You can go to the console and create a new widget that'll be shown on the home page of your control panel. You point it to a table by entering the name of it, give it a name and a custom logo, and it automatically creates a widget that watches that table for updates in real time.
>>
>>55741677
best practice is to avoid using onclick, add an event listener instead.
>>
File: likethis.png (40KB, 802x313px) Image search: [Google]
likethis.png
40KB, 802x313px
The person who had a problem with the error message thing: use file.form-field-name.errors instead of your own error message.

pic related
>>
>>55741951
Why would you want to watch a table in real time? Usually it's the aggregates you care about, not the raw table data. It's not particularly interesting to see random users updating their profile pictures, but it is interesting if the rate of user profile picture updating suddenly drops, for example.
>>
What do you guys think about the MERN stack?
>>
>>55741951
literally websockets lel
>>
>>55742129
Mongo can fuck right off. Other than that, it's solid.
>>
>>55742129

Personally i prefer the MDAEN stack when it comes to deploying something quick n dirty.
>>
>>55742236
D for Docker presumably?
>>
>>55742048
>Usually it's the aggregates you care about

Makes sense, thanks for the suggestion. I'll adjust my idea to take this into account rather than just showing raw data from the DB.

>>55742142
Yes, in essence, but this would be a fronted representation of the data.
>>
>>55741951
rethinkdb + horizonjs
>>
>>55742142
>websockets

So... you're expecting a DB to send WS events to a server somewhere? Do you know what a DB does?

"lel"
>>
>>55743164
Thanks, I've been looking for something new to try. Will check these out.
>>
How do I clear a form and stay on the same page after submitting a post request in Node.js / Koa? Where do I start?
>>
color: darkgoldenrod;
color: blanchedalmond;
color: mediumspringgreen;
color: rebeccapurple;

The guy who created CSS was probably high as fuck when he came up with this naming scheme.
>>
>>55743597
Loop the form fields and clear all values. Intercept and preventDefault() the submit event.
>>
>>55743665
>rebeccapurple
> probably high as fuck

He was sad as fuck. Learn the difference. It might save your life someday, anon.
>>
What exactly is cli in npm? I've seen this babel-cli, gulp-cli, etc.
>>
>>55744008
Boilerplate generators and other useful stuff
>>
File: bird-with-hat.jpg (33KB, 366x321px) Image search: [Google]
bird-with-hat.jpg
33KB, 366x321px
>>55740866
feel you senpai
>>
>>55743665
>>55743886

>http://meyerweb.com/eric/thoughts/2014/06/19/rebeccapurple/
Not him, but i didn't know this story. Yeah, sad as fuck
>>
>>55740568
Nobody uses suave here?
>>
fuck guys, got a problem. When I AJAX load a div with new content, the handlers don't work on the new things.

Worse yet, I need to bind EVERY major event to EVERY possible tag.

so... can someone give me the quickest way to do
jq("div").on([all handlers], [all possible elements], function(e){
[I don't even know what should be in here. It just needs to rebind everything to all the new content]
});
>>
>>55744720
Bind the event listeners to a parent container and use event.target to filter/identify/handle/etc.
>>
>>55744766
ok, I'm not sure what exactly you mean.

s, would I do something like
jq("#CONTENT").on(event, event.target, function(){[I'm still not sure what this function should be]})

ok, um, maybe an example?
one of the new content in #CONTENT will be #UPDATE_CONTACT_INFO, which is a form.
The form submit function will need to be load AJAX another module, which will then load over the form with the posted data.
After which, a button called, maybe #CLOSE_EDITOR will be there and need to trigger the click event.
On which, the profile page reloads in #CONTENT, which goes back to step 1, so another form needs to be bound again to submit, so the editor can be opened.
>>
hey guys im stuck and could use some help please.

im making a site with flask and added user registration to it, but the users i add trough it wont login, while previous users created with a postman like program work just fine.

any idea what could be the problem?
>>
>>55744904
You will need to bind for each type of event separately.
document.querySelector("#content").addEventListener("click", event => {
if (event.target.matches.("#close_editor")) {
// Do shit
}
// etc ...
})

document.querySelector("#content").addEventListener("submit", event => {
event.preventDefault()
if (event.target.matches.("#update_contact_info")) {
// Do shit
}
// etc ...
})
>>
>>55743597
submit the form via ajax
>>
>>55744720
use event delegation
>>
File: backbone.png (12KB, 899x160px) Image search: [Google]
backbone.png
12KB, 899x160px
thoughts on backbone?
>>
>>55745129
Hmmm, this is actually what I was hoping to avoid.

I was willing to be a bit more obfuscated to avoid having to list every function...

So, there's no way to simply make the script act on the new elements?
That really makes this more annoying.

Thanks, though

>>55745145
I'll also look this up
>>
>>55745238
It's deprecated
>>
>>55745238
Well built, but ultimately slow, unless heavily modded. Relies heavily on >jQuery
>>55745427
Best practice would be creating a basic view class for each type of interactive element you want and extending those as needed. You don't usually need event delegation, unless you have a fucking lot of views.
>>
>>55745450
>Best practice would be creating a basic view class for each type of interactive element
What do you mean by 'basic view class'?

Like, I have a couple classes already such as "JAXABLE_LINK" and "JAXABLE_FORM".
Is that what you meant?

for instance, here's the code for jaxable_links:
jq(".JAXABLE_LINK").click(function(event){
event.preventDefault();
var paramStr = jq(this).attr("href");
jaxMyMod(jq(this).attr("name"), paramStr, replacePage);
//this is the AJAX function I'm using. I'm not a fan of the particular implementation of jQuery's AJAX
})
>>
>>55745129
document.querySelector("#content").addEventListener("click", event => {


Holy shit that looks better than

>>55745531
jq(".JAXABLE_LINK").click(function(event){
>>
File: 2016-07-25-12:54_1366x768.png (147KB, 1366x768px) Image search: [Google]
2016-07-25-12:54_1366x768.png
147KB, 1366x768px
>>55745531
I mean JavaScript classes. Something generic enough to be reusable.
>>
>>55745564
Eh, it's easier to work with. There's not a lot I DON'T like about jQuery.

>>55745566
Oh, hmmm, I'll have to look into that, but I don't use JavaScript as the basis of my display. I just call in PHP scripts, since I'm trying to support both JS AND non-JS users.

DESU, the only languages I've ever heavily used classes in were C++ and Java. The syntax for PHP and JS classes has always been weird for me, so I kinda avoid them.
>>
>>55745607
>>55745566
also, what's a ".ts" file?
>>
>>55745621
TypeScript - basically Microsoft's take on statically typed JS. Makes large projects a lot more manageable.
>>
>>55745642
oh, hmmm.
never even heard of it before.
>>
>>55745607
>Eh, it's easier to work with
Dat ES6 do
>>
>>55745566
>>55745564
>>55745450
I actually just got it.

This seems to work regardless of if it's new or not:
jq(document).on("click", function(event){
event.preventDefault();
var T = event.target.className;
var ELEM = event.target;
//alert(T);
switch(T){
case "JAXABLE_LINK":
var paramStr = jq(ELEM).attr("href");
jaxMyMod(jq(ELEM).attr("name"), paramStr, replacePage);
break;
case "JAXABLE_BUTTON":
//alert(ELEM.parentNode.className);
if(ELEM.parentNode.className == "JAXABLE_FORM"){
//alert("Is part of form");
jaxMyMod(jq(ELEM.parentNode).attr("action"),
"?"+jq(ELEM.parentNode).serialize(), formPage)
}else{
alert("Not a submit button");
}
break;
default:
alert("Default: Item is of type '"+T+"'.");
}
})

(obviously, the alerts are temporary and for testing)
>>
>>55745744
ES6? I'll have to look into that
>>
File: JAXABLE_FORM_Success.png (18KB, 1039x297px) Image search: [Google]
JAXABLE_FORM_Success.png
18KB, 1039x297px
>>55745889
sweet, it works. Just gotta adjust some other parameters now, b/c the link is a bit weird in PHP mode
>>
>>55744929
encoding
>>
Webpack or Gulp?
>>
>>55740568
>CSS
>HTML
>programming languages

wew
>>
>>55747759
>>>/dpt/
>>
>>55746019
>don\'t
>\r\n\r\n
wow, you sure suck at php
>>
>>55747759
Who are you quoting?
>>
Looking to go into freelance web dev, I know I could pick up jobs from freelance websites such as oDesk, and Freelancer, but I was wondering if anyone had any tips on how to find clients to do work for besides going through freelance sites?
>>
How exactly do I use react and express at the same time? They both have their own pseudo languages.
>>
>>55747744
SystemJS
>>
http://gatekeeper-grooves-60380.bitballoon.com/

any suggestion? its unfinished but what should i change in your opinion?
>>
>>55749120

You need to sort that nav out, the links are too close together.
Use nicer fonts.
Even with the video in the background it still looks pretty dull.
>>
>>55749120
>Converted with https://clipchamp.com - online video converter, video compressor, and webcam recorder

gross.
where's the webm vp9/vp8
>>
Where do I register a cheap domain name?
>>
>>55749875
I'm with gandi for a few years now.

just avoid godaddy and you're fine.
>>
>>55749793
how do you found that out
>>
>>55749899
it's in the files metadata.
>>
>>55749891
Thanks! Will give it a try.
>>
>>55749875
namecheap
>>
>>55745238
Still used with prevalence in the .NET community.

If you're looking to get a job, learn Angular 1.X, React, or Angular 2.0 instead.
>>
>>55747744
They do different things. Webpack is a bundler and gulp is a task runner. You can use both.
>>
>>55750571
Can't gulp also bundle code? And webpack run tasks?
>>
$('#useAlias').on('change', function() {
if ($(this).val() == 'Yes') {
$('#otherName').show(500);
} else {
$('#otherName').hide(500);
}
});


Can someone tell me why this doesn't hide the div when I click no please

https://jsfiddle.net/asm48w1L/
>>
>>55750627
ids have to be unique, you can't have both elements use the same ID, only one will work.
so the event only gets added to your yes radio button.

besides, that's a shit way to do it.
>>
>>55740568
>https://github.com/facebookincubator/create-react-app

Will I finally be able to start doing actual coding with react without having to mess around with tons of tooling?
>>
>>55750623
Yes, but Webpack's purpose is in bundling. I mean, you can do most of what one does with the other, but Webpack was never intended to be a task runner.

Here's Webpack's guidelines for using both:
https://webpack.github.io/docs/usage-with-gulp.html
>>
>>55750653
$('input[type="radio"][name="useAlias"]').on('change', function() {


This works, is this better?
>>
File: 7b2.jpg (12KB, 320x337px) Image search: [Google]
7b2.jpg
12KB, 320x337px
>>55750677
>Decide to learn a meme stack
>Need to download a bunch of garbage
>Follow guide that uses dozens of dependencies and frameworks within frameworks
>Some have their own meme pseudo languages
>Need to set up task runners to transpile jsx, ejs, es2015 code, scss
>It all boils down to compiling all this shit to an HTML, CSS and JS file

What happened to web development?
>>
>>55750627
>>55750854
yes, though name should suffice, have a look at this on how to do it more efficient.
first with and second without jquery.
https://jsfiddle.net/wjg4f8wL/


you shouldn't do animations like this anyway, use css for that.
>>
>NEET guide to web dev employment
Have ny NEETs here actually followed this guide? Did it work?
>>
>>55750880
Thanks alot man, I appreciate it.
>>
>>55750627
Cleaner way would be to attach the event handler to a parent element. Also jQuery has a .fadeToggle() method that does what you're trying to do in a cleaner way.

example:
https://jsfiddle.net/vq5wg2r9/
>>
File: noteEditor.gif (685KB, 1137x584px) Image search: [Google]
noteEditor.gif
685KB, 1137x584px
Working on a note editor with React and Local Storage
>>
>>55750986
Neat, thanks for this too.
>>
need some help on this if anyone is willing(contact form to email on node using sendgrid)

the issue is that "if(data=='sent')" isn't getting tripped, so it appears to be sending the payload multiple times, resulting in me receiving multiple duplicate emails from the server, and the "Email is been sent at "+name+" . Please check inbox !" line is never updated

script.js
$("#send_email").click(function(){     
name=$("#name").val();
email=$("#email").val();
message=$("#message").val();
$("#feedback").text("Sending E-mail...Please wait");
$.get("http://MYDOMAIN.com:3000/send",{name:name,email:email,message:message},function(data){
if(data=="sent") {
$("#feedback").empty().html("Email is been sent at "+name+" . Please check inbox !");
}
});
});


app.js
app.get('/send',function(req,res){
var request = sg.emptyRequest()
request.body = {
"personalizations": [
{
"to": [
{
"email": "DESTINATION EMAIL"
}
],
"subject": "New message received"
}
],
"from": {
"email": req.query.email
},
"content": [
{
"type": "text/plain",
"value": "From: "+req.query.name+"\n Message: "+req.query.message
}
]
};
request.method = 'POST'
request.path = '/v3/mail/send'
sg.API(request, function (response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
})
});
>>
>>55751073
>localStorage
>not IndexedDB
>>
>>55751146
you're checking if the response is "sent" but there's nothing in app.js that actually responds with "sent"
>>
>>55751146
so does your server get the request?
you don't seem to send anything back to the client.
>>
>>55751214

shoot, thanks m9
>>
I haven't been into webdev at all since 2009 when I was in highschool. How much has changed? It seems like on websites CSS is more prominent now and static images aren't used as much. Like I remember making buttons in photoshop or gimp but I've noticed most websites just use pure CSS and html now for buttons.
>>
>>55751146
Shouldn't you be using POST instead of GET?
>>
>>55751282
you can't POST to different ports and I guess he didn't want to setup a transparent proxy for that.
>>
>>55751278
Pretty much everything has changed since 2009, that was ages ago in internet time. You should pretty much throw out everything you know and start fresh.
>>
>>55751310
Best place to start?
>>
>>55751381

>>55740568
>>
File: 1467049363821.gif (774KB, 500x281px) Image search: [Google]
1467049363821.gif
774KB, 500x281px
I wanna make an interactive *WEB APPLICATION*, not a WEB SITE. I wanna have sort of live editing or at least autorefresh, but I want it to be LIGHT so I can't use Meteor.

Whats the best workflow for that? I'm willing to learn anything as long as it's not meteor and doesn't require me to keep refreshing the webpage like a faggot.
>>
>>55751525
What do you mean by live editing?
>>
>>55751542
Things changing as I edit them.
>>
>>55751525
Websockets probably, with two-way data binding.
>>
>>55751214
>>55751224

the server does get the request

I tried adding "res.end('sent') to the sg.API line in app.js which isn't helping. Where should it go?
>>
>app.js

Do retards realize how stupid this naming sounds?
>>
>>55751628
use res.send you retard
how hard is it to read the documentation for the shit you're using before you ask why it doesn't work
>>
>>55751525
I use websockets and vanilla JS/Go for that. Fuck memeworks.
>>
>>55751741
Can we see some code? I'm trying to do some shit with Go and Typescript (or vanilla, whatever) and I'd like to see some actual project using them.
>>
>>55751799
https://github.com/
>>
>>55751826
Nice one, fucker.
>>
>>55751799
Knock yourself out. Should be documented well enough to read, but still in early development.
https://github.com/bakape/meguca
>>
>>55751845
Oh it's you anon. I already have that one star'd, but thanks anyway
>>
File: im a dev nao.png (28KB, 893x400px) Image search: [Google]
im a dev nao.png
28KB, 893x400px
so, who's hiring?
>>
>>55752232
No one.

Not unless you're a black female with a dick.
>>
>>55751175
It's a technical interview assignment.
>>
>>55751741
Thanks, I'll look into that.
>>
>>55751845
How is Typescript?
>>
>>55752232
now learn SASS and Javascript next
>>
>>55752699
It started out really fucking shit, like a shitty attempt at JS#. Then around version 1.5 or so they decided to aim for full ES6/7+ compatibility. As a result the language has some things that you are never supposed to use. But, if you write it like statically typed ES7, it's pretty damn good and I'd recommend it for any project with more than 1K loc of JS. Saves me a lot of time in debugging and refactoring.
>>
File: noteEditor3.gif (229KB, 1137x583px) Image search: [Google]
noteEditor3.gif
229KB, 1137x583px
Just wrote the NoteView component, rudimentary.

I'm thinking of just using EditorView and simply hiding the toolbar and disabling inputs, for obvious reasons, but the clean separation of concerns between components would be a big tradeoff.
>>
Is it a bad idea to host a website at home? I'm completely new to this. I have a 1GB RAM computer and expect less than 70 visitors per day.
>>
>>55753125
It's not terrible, but not ideal if you don't have something to dedicate as a server.
>>
>>55753125
It can be a hassle. In addition to all the normal server config stuff, you need to worry about power consumption, uptime, and your ISP shutting you down.

If you're just hosting a static site with no backend, you can use github pages for free. Otherwise there are tons of cheap shared hosting and VPS options available depending on what you want to do.

If you want to do it for fun or to learn, there are plenty of guides out there. Just be prepared to run into a million small problems at the beginning.
>>
>>55753125
You can get a VPS for less than $10/mo - that's less than the price of two Big Macs.
>>
I'm not gonna lie, Angular is comfy to work with for SPAs. It kinda sucks that MongoDB is part of the MEAN stack since NoSQL is a meme

Django+knockout.js is still best combo though
>>
>>55753347
>that's less than the price of two Big Macs
You'd know, fatass.
>>
>>55753283
I'm going to dedicate the computer I said with Linux on it. It's not a powerful machine at all but I was wondering if 1GB of ram and a dated processor would be enough for a plain website with low traffic.

>>55753289
Yeah I kinda want to try it myself, as a new experience. I just don't want to be hacked because of bad security, which I fear as a newbie.

>>55753347
Maybe that would just be the best course of action. I'll have to research services.
>>
Is ember.js the least popular framework, outside the valley?
>>
>>55753390
>Angular is comfy to work with for SPAs
AND BLEACH IS COMFY TO WORK WITH AS A DRINK, FOR YOU! STOP MAKNG SPA CANCER SHIT SITES

>It kinda sucks that MongoDB is part of the MEAN stack since NoSQL is a meme

You're retarded. MEME stack was a product of the MongoDB marketting department. CouchDB and RethinkDB are far superior NoSQL database systems because (lel) they actually store your data.
>>
>>55753479
>Taking the b8

>>55753465
If it was the least popular framework, you wouldn't have heard of it ;^)
>>
File: lolno.gif (1019KB, 240x182px) Image search: [Google]
lolno.gif
1019KB, 240x182px
>>55753390
Ha. Django+React >>>>>> getwit the times.
>>
>>55753479
>because (lel) they actually store your data.
And they also actually returns data when you query them

>https://engineering.meteor.com/mongodb-queries-dont-always-return-all-matching-documents-654b6594a827#.xp02yy4i3

>Specifically, if a document is updated while the query is running, MongoDB may not return it from the query—even if it matches both before and after the update! If you use MongoDB, you should be aware of this subtle edge case and make sure your queries don’t fall victim to it.
>subtle edge case
EDGE
D
G
E
>>
Let me rephrase that: Least common of the non-trivial frameworks (Backbone, Angular 1, Angular 2, React, etc).
>>
so I got this on the server side

app.get('/send',function(req,res){
var request = sg.emptyRequest()
request.body = {
"personalizations": [
{
"to": [
{
"email": "EMAILADDRESS"
}
],
"subject": "New message received"
}
],
"from": {
"email": "EMAILADDRESS"
},
"content": [
{
"type": "text/plain",
"value": "From: "+req.query.name+"\n Email: "+req.query.email+"\n Message: "+req.query.message
}
]
};
request.method = 'POST'
request.path = '/v3/mail/send'
sg.API(request, function (response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
})
res.send('sent');
});


and I'm not seeing any traffic from the res.send on the network browser tool on the client side. any ideas?
>>
>>55753479
It's fun to experiment with at least, I'm not actually going through with a SPA site

And NoSQL is still a meme, no matter which implementation you bring up. Postgresql will always perform NoSQL functionality faster than them

>>55753520
I'll try React
>>
>>55753416
>I'm going to dedicate the computer I said with Linux on it. It's not a powerful machine at all but I was wondering if 1GB of ram and a dated processor would be enough for a plain website with low traffic.

That should be plenty for a small site, but if it's an old desktop or something it's going to be slurping down power like your mom on meat popsicles. Might want to get a Pi or something that uses like $5/year in power running 24/7

>I just don't want to be hacked because of bad security

Make sure you know what you're doing when you configure your router to port forward and look into fail2ban and generally don't do anything stupid and you should be fine.
>>
>>55753548
>Least common of the non-trivial frameworks
What does that even mean? There are thousands of frontend JS frameworks out there. Ember is easily in the top ten, probably even top 5.
>>
>>55753601
Okay, thanks. I didn't think a Pi would be viable, but for the price of one, I'd rather just make the site and then pay for hosting.
>>
>>55753465
that would be aurelia
>>
File: shitdropdown.png (12KB, 642x285px) Image search: [Google]
shitdropdown.png
12KB, 642x285px
Why do drop-downs on bootstrap 3 look so bad when you get to mobile screen sizes.

Is there an easy way to fix pic related so they look more like how bootstrap 2 did it?
>>
>>55753811

Something like this is what I want
>>
>>55753569
Last I heard Postgresql couldn't even do basic operations like plucking or indexing on JSON.
>>
>>55753825
you probably fucked up your mobile first somewhere
>>
Question: Would I be able to be a good web dev with only knowing PHP OO?

I see lots of you guys using Java and C++, while I never really needed more than PHP
>>
>>55751381
w3c school
>>
>>55753991

I am sure its because I am using nav-justified instead of nav-navbar

Not sure how to get the best of both
>>
>>55740568
Hi /wdg/, I want to learn PHP, but I don't know how to install, i use windows 10
>>
>>55753569
>And NoSQL is still a meme, no matter which implementation you bring up. Postgresql will always perform NoSQL functionality faster than them

It really depends what kind of data you have.

At work we use CouchDB to map/reduce over transaction records to give us certain numbers. But if your data is highly relational then you're better off with a relational DB.
>>
>>55754097
install XAMPP, open it, click on buttons to start apache and phpmyadmin
then put your project into the htdocs folder which is inside the XAMPP folder

type in localhost into your browser, and you can click through to your project folder which is inside htdocs

from browser, type in localhost
>>
>>55754016
No.
>>
Hi, guys, I'm new at Javascript and I want to know how to create a random number generator
>>
>>55754451
>>55754097
>>55754016

Fucking learn how to google, all of you.
>>
>>55753811
Where can I purchase your services?
>>
>>55754451
Just use:
document.getElementById("AnyId").innerHTML = Math.floor(Math.random() * x);
If you want to make a generator of random numbers between 0 and x-1
>>
Simple I/O on webpage JavaScript w/Ajax ? Or node.js? Or something else? Outputting from csv or Json or something. Back end web code noob. Database like MySQL ?

What about if I parse? What for web I/O? E.g. Display something I scraped live

JavaScript doesn't seem well suited to this so I figure I'm probably going about it wrong
>>
>>55754451
var getRandomNumber = function (min, max) {
return (Math.floor(Math.random() * (max - min + 1)) + min);
};
>>
>>55753825
Can't you just use a bootstrap accordian? I haven't looked at bootstrap 3 at all though.
>>
>>55751278
Plenty of sites use images but they're vector (svg) not JPEG for logos and banners and stuff. Responsive (stretches or shrinks for desktop or mobile) design
>>
>>55753825
You know the 2nd has glyphicons or related right?
>>
File: sshot-4029.png (1MB, 890x593px) Image search: [Google]
sshot-4029.png
1MB, 890x593px
>>55740568
>Meme me up

I'll just show my way out
>>
>>55754538
giving me flashbacks to my game and the base modifiers.

I never want to touch a random number again.
>>
I have a project I'm working on that requires the use of Mongo. I'd rather use something else, but whatever. The thing is, I'd prefer not to go through the headache of installing it on my laptop. I've been down that road before and for some reason it was a massive headache last time.

I've never used Docker before, but in theory I could just make a MongoDB container and interact with it the same as a normal db, right? And then when I'm done I can just kill the container without any irritating leftovers?
>>
>>55755267
In theory, but last time I tried Docker on my laptop, it was a huge pain.
>>
What are React routes and can they replace Express routing?
>>
>>55754479

What as in Shotblasting?
>>
>>55755404
How so?
>>
>>55755521
no the sonic cleaning.
>>
>>55755513
React is a frontend view framework, express is a backend framework. They're totally different.

React routes refer to the different "pages" in a single page app. Express routes refer to the API endpoints for your backend. The two could potentially be a one-to-one mapping but usually not.
>>
>>55755618
>express is a backend framework

Well, color me surprised. I thought Expess was also view oriented only.
>>
React or Angular? My wife's boyfriend said to look into react because it is Facebook and Facebook runs the Internet.

Which to pick /wdg/
>>
>>55755686
Fuck off back to /dpt/ cunt.
>>
>>55755545

We are in England, you?

What is it you need cleaning?
>>
>>55755686
When I tried angular I didn't like it very much. I'd say react.
>>
>>55755723
>>55755759
>taking the b8
>>
Are there any other stacks like MEAN? Really don't want to use MongoDB. Google ain't helping either.
>>
>>55755805
I was actually being serious I just added the bullshit about my wife for fun. I'm really forever alone.

>>55755759
I was eyeballing angular because the Google is so stronk. But I'm really not sure.
>>
>>55755880
You can make a stack out of anything.
M - MongoDB: Replace with PostgreSQL, RethinbkDB, CouchDB, MariaDB, MySQL...
E/N - Express/NodeJS: Replace with Koa.js (NodeJS), Flask (Python), Laravel (PHP), ASP.NET Core/MVC (C#/.NET), Gin (Golang)...
A - AngularJS: Replace with React, Vue, Ember, Mithril, None (really, no frontend framework is alright too, with plain Javascript).
>>
>>55755880
Stacks aren't a thing, just use whatever you want to use.
>>
>>55755889
Google likes Polymer more.
>>
>>55755979
Cheers
>>
I've bee working on my band's website and I want to finally upload it. What hosting site is the best for me. It's a wordpress site. It has a responsive navbar, 5 pages, a header image, a few photos and some embedded youtube videos and that's it. I've been looking through the cheap hosting options in the OP and I have no idea which one is best for me.
>>
I've never touched Angular but knowing Google they'll change it entirely in Angular 3 and make what you learned in 2 obsolete. They like completely overhauling shit with their apps and services and it seems their tools are no exception.
>>
>>55755880
Nancy + Mongo
>>
>>55755686
Angular2
>>
>>55756072
Namecheap is pretty good. Their cheapest shared hosting plan should be fine. If you've never set up a website before, consider watching some youtube tutorials or something first. It's pretty simple overall, but there are a few gotchas where you could potentially fuck up if you don't know what you're doing. And make sure you have a strong password on the wordpress admin.
>>
Redpill me on MongoDB.
>>
>>55756075
knowing google, they'll continue to develop ng2 until it's a great mature framework, and then kill it with no warning and try to bury the fact that it ever even existed.

>>55756219
It's a document-oriented database that uses something similar to JSON. It's kind of shit and there are several other DBs like couch and rethink that do pretty much the same thing but better. Relational DBs are almost always way better for most purposes anyway. It's just popular because of marketing to noobs.
>>
>>55755725
Nah im in the US, I have all manner of stuff I run into that needs cleaning, but if you are UK then I can't afford it.
>>
Is there an easy mode GUI program to create a website? I just want to make a user-uploaded auto service manual hosting website and you can search for manuals via car model.
>>
>>55756645
Forgot to mention I've already got my own web server and stuff I've just never bothered learning web languages.
>>
>>55756713
If you don't want to learn just watch a quick Wordpress tutorial on YouTube and buy a template that fits your needs.

https://themeforest.net/
>>
>>55748173
attend meetups and look like you know what you're doing. If you're not in a big city just call some local businesses and sell yourself. Worst case scenario is they say no.
>>
File: jsframeworks2016.png (140KB, 1060x834px) Image search: [Google]
jsframeworks2016.png
140KB, 1060x834px
Prove me wrong.

*(Mid-tier is Angular 1.X)
>>
File: emilia-laffin.gif (987KB, 245x370px) Image search: [Google]
emilia-laffin.gif
987KB, 245x370px
>>55756781
>He switched Angular2 and Angular1!
>>
Can websockets replace what we do on ajax?
>>
>>55756961
You could, but that would be pretty stupid and inefficient.
>>
thinking about getting a cloud at cost box to fuck around with, are they alright or should i just put my money elsewhere? I'm mostly worried about the sustainability of their business model, wouldn't want to buy a box and have them shut down a month later.
>>
>>55757535
If you're worried about sustainability then how about buying a physical "box".
>>
File: CiALv0rUgAA5J1T.jpg (21KB, 600x328px) Image search: [Google]
CiALv0rUgAA5J1T.jpg
21KB, 600x328px
>>55757579
>>
Hey guys, how would you a specific portion of a string on ruby? I'm building an rss reader that reads off discourse.

Assumming I have a post that says this:
title of da post 10/10/2015
http://url.com/folder/username

post content

How can I get ruby to get the username off this string?
>>
>>55757535
Judging from various reviews, you pretty much get what you pay for. It's a super cheap VPS service. Don't expect to have any kind of support and keep your shit backed up somewhere else in case they disappear one day and you're probably fine.

>>55757743
regular expressions
>>
File: a real cat.jpg (53KB, 320x240px) Image search: [Google]
a real cat.jpg
53KB, 320x240px
Yo /wdg/ I really need help on this.

I have a project that I need to figure out some SQL stuff for.
So there's a table that has
somedate date,
sometime time,
somestring varchar

somedate and sometime are already inserted. Why I need to do is update somestring when the combination of somedate and sometime is less than the current time, ie, the time is passed.
How do I accomplish this? The database is running on MySQL.

Really appreciate the help, thanks.
>>
can't think of a project to do for my portfolio with django while i look for jobs
any quick ideas?
>>
>>55758300
build a simple CMS

within rails i built an application that has ticket tracking, employee timeclock management, company/customer management, and a mock payment system, got me hired.
>>
>>55758311
that's a good one actually, cheers man
>>
>>55758053
Do you need it to happen automatically? If yes, use the event scheduler built into MySQL https://www.sitepoint.com/working-with-mysql-events/
>>
File: test.png (28KB, 1714x1195px) Image search: [Google]
test.png
28KB, 1714x1195px
I wanted to test half-scroll half-fixed page layout.
I created a container and placed 2 divs in it with float: left/right, then gave both of these a width: 50%, height: 500px.

The left div is fixed in place and the right div has the content. The Content is bigger then the right div.

Since this 50/50 setup isn't the only thing on this page I can't use position:fixed. So I was thinking of using position: absolute on the right div and overflow:hidden to hide the content that goes over the right div, the problem then of course is, that I can't scroll my content down anymore inside the right div, how do I fix this?
>>
>>55758545
Yeah, I think this will work for me. Thanks man.
>>
>>55758300
Currency converter that pulls data from an API.

Web-based social bookmarking system. Allows multiple users to store, share and tag their favourite links online.
>>
Everytime I come up with a good idea I load up all the necessary files and dependencies, formulate a plan of action from the conceptual phase right up to deployment/testing, then I start coding and get bored after a few days then stop coding for a few weeks. Rinse and repeat.

Maybe that's why I can't find a fucking job. My portfolio needs more meat.
>>
>>55758660
these would be nice and quick, thank you
>>
>>55758611
fixed it, the mistake was given the right container a high, I had to create another child-div first and give this one the height. Still don't know 'why' but I'm happy since it works now
>>
is Node.js distinct enough from vanilla, browser JS that it warrants being called a different language?
>>
>>55759858
no, and your questions is so stupid I'm surprised I even responded to it.
>>
>>55756781
what's the V?

also ember is pretty good but sadly it is slow as fuck
>>
>>55759858

Node isn't a language.
>>
>>55759937
Vue.js

It's component based, pretty fast (beats React in most benchmarks), and very easy to learn. The sad thing is that it will never take off like React or Angular b/c there isn't a big company behind it.
>>
>>55760171
>24kb min+gzip, no dependency
wew that's webdev in 2016
>>
angular2.min.js 586kb

people litteraly loading this when they only need drag & drop
>>
>>55760604
What do you mean?
>>
I hate doing frontend. It's for monkeys.
>>
Can somebody explain what an ORM is?
I can't find any recent info on it other than shitty blogs on how ORMs are shit without actually explaining what it really is.
Object-Relational-Mapping
Ok so does this mean if I'm using C# or C++ and make a class containing fields which will store fields from a DB row that this is an ORM?
For instance:
//db row - [int id] [string name] [int count]
class a_row
{
public int id { get; set; }
public string name { get; set; }
public int count { get; set; }

public a_row()
{
//given a db connection, and a cursor to a document or iterator to table row:
this.id = some_cursor["id"] as int;
this.name = some_cursor["name"] as string;
this.count = some_cursor["count"] as int;
}
}


I'm using the C# MongoDB driver and it requires some sort of type for working with collections. This type can be a plain clr object or a BsonDocument.... from what I can tell if you use a plain clr object it creates a bson document from the available properties in said object.
Is this ORM?
>>
>>55760827
I spent some time doing some network profiling on my website the other day and found out it weighted 10kb, so I spent some time to add gzip here, spliced uneeded resources there and got it down to 4kb
just my perspective
>>
Every mean stack guide or tutorial i see uses angular1, even newer ones. Why the fuck?
>>
>>55760856
Same.
>>55761668
MEAN is a stale meme.
>>
>>55745428
>Deprectated
>Last commit 5 days ago

K then
>>
What is the fastest and easiest certification to learn that will get me a job in the air conditioning? I'm about to check out all the neet guide to web dev employment links but I was wondering if anyone could offer me some advice on this. Assume I'm good at math, bad at creative problem solving, and have never written a line of code.
>>
I'm trying to get the header for my contact section to fade out then fade back in with new "thank you" text

$("#contacttext").fadeOut("fast").empty().delay(1000).text("Thanks! I'll respond ASAP.").fadeIn("slow");


the text changes right away though and overall the calls aren't executed sequentially. any ideas?
>>
>>55763782
ccent
>>
>>55764504
Use CSS animations senpai.
>>
>>55764530
thanks m8
>>
Ok, what is the actual EVENT that occurs when I replace an element during AJAX?

I did some wicked workarounds to get some specific elements working even after an AJAX load, but the problem is that I have elements that are supposed to be hidden as soon as they load.

I tried the jQuery .on() for jq(document).on(*, function(){})
* being "ready", "focus", and "load"
But what event is actually occurring when, say, my #CONTENT_PAGE div is replaced?

It needs to automatically hide several elements without any interaction. As soon as the AJAX request completes, items are supposed to disappear again until a button is clicked.

When this happens, I do NOT expect any of the following events to occur:
>click or dblclick
>hover
>mousing in or out
>focusing (as I mentioned, tried this. doesn't seem to do it)

literally, after AJAXing the new content, I expect the user to not touch anything at all, and the #initial_hide elements will just hide.
>>
>>55765485
uhhh, hide them with javascript after you replace the content?
I don't get what your problerm is at all
>>
>>55765485
$.ajax({
url: "target.html",
beforeSend: function( xhr ) {
example=xhr;
}
})
.done(function( data ) {
callMyFuction();
});
>>
>>55765565
I honestly can't even judge if this will work or not, because the one major jQ function I have never really understood was .ajax().

I'm using jquery for literally everything on the site EXCEPT AJAX.
Can you explain what that line means and how I'd implement it using a regular AJAX call?
what exactly is beforeSend doing, and how does .done() apply to it?
>>
File: asdsdfds.png (19KB, 515x599px) Image search: [Google]
asdsdfds.png
19KB, 515x599px
why inline block doesn't work on the list?
>>
>>55765667
I have no idea what the fuck that anon was trying to do with beforeSend, it makes no sense.

Also post the code for the ajax now and I'll make you a jquery version.
>>
>>55765667
First you need to know that AJAX means a script that communicates to and from a server/database without refreshing the page.

Nothing more and nothing less.

Secondly, if you are not using jquery then your AJAX call probably resembles:
xhttp.open("GET", "ajax_info.txt", true);
xhttp.send();

then you are using pure jacascript (i think. who can follow all these flavor of the week vanilla javascript standards? not me)

if your AJAX function begins with
$.ajax({

then you are using jquery


So if you want to use jquery for AJAX then the way it would work is before send executes prior to the actual AJAX firing and communicating with the server. When it received data back from the server with no errors it executes the .done()

When you talk about what event object for jquery you need to read this: https://api.jquery.com/Ajax_Events/
>>
>>55765938
it was just an example of syntax nobody is "trying to do" anything. literally.
>>
>>55765938
Do you know what the fuck example.html is and what the fuck callMyFunction is?

Why would only one part of that not make sense to you and not all of it?
>>
>>55766014
>>55766035
Let's look at anon's post.

[code}beforeSend: function( xhr ) {
example=xhr;
}[/code]

this runs before the request is sent, and stores a reference to the jqXHR object in a variable called "example" that is not even declared and is local to that function.

Why would you ever do this? As I said, it makes no sense.
>>
>>55765929
try putting it block
>>
>>55765938
Ok, so how would this look?
params and div are both sent to the callback function, because I parse them
function jaxMyMod(module, params, div, cb){
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if(xhttp.readyState == 4 && xhttp.status == 200){
cb(xhttp, div, params);
}
}
xhttp.open("POST", "modules/" + module, true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send(params);
}


>>55765997
>before send executes prior to the actual AJAX firing and communicating with the
server. When it received data back from the server with no errors it executes the .done()
Hmmm.
Well, my concern is to just automatically bind my current script and function back to the responseText
The responseText CONTAINS items that should not require interaction to hide them. By default, they show, and JavaScript is supposed to hide them as soon as they appear.
>>
>>55766264
>and JavaScript is supposed to hide them as soon as they appear.
For example, a failed user login. The login form and signup form don't rehide when the page loads back up.
>>
>>55766264
Here's the correct way to use $.ajax, it's actually much simpler than normal XHR:

$.ajax({
url: "/example.html", // request url
method: "get", // request method
dataType: "text", // expected response type, can be "text", "html", "json" etc

data: {
// get/post parameters to send
"someParam": "someValue"
},

success: function (data, textStatus, jqXHR) {
// this will execute if the request succeeds
},

error: function (jqXHR, textStatus, errorThrown) {
// this will execute if the request fails
}

complete: function (jqXHR, textStatus) {
// this will always execute after one of the above two, regardless of success or failure
}
});


So, in your case, assuming the server sends back HTML and you want to put it into #content and hide some of the elements inside it afterwards, you'd use something like this:

$.ajax({
url: ("modules/" + module),
method: "post",
dataType: "html",
data: params,
success: function (data, textStatus, jqXHR) {
// put html into div
div.innerHTML = data;

// hide elements you don't want to see
div.querySelector("#something1").style.display = "none";
div.querySelector("#something2").style.display = "none";
}
});
>>
>>55766408
I'll try this.
>>
>>55766584
>>55766408
ok, the actual method works.
But, the call to querySelector or querySelectorAll (looked this up) crashes the script afterwards and doesn't select anything.
Here's what I did:
function JQJAX(module, params, div, cb){
jq.ajax({
url: ("modules/" + module),
method: "post",
dataType: "html",
data: params,
success: function(data, textStatus, jqXHR){
jq(div).html(data);
alert("success");
document.querySelectorAll(".INITIALHIDE").style.display = "none";
alert("calling cb");
cb(div, params);
}
});
}

tried that as both div.querySelectorAll()
and document.querySelectorAll()
It doesn't reach the second alert (callback) unless I comment out the selector.. =/

Am I doing something wrong?
>>
>>55766981
>change querySelector to querySelector all
>wtf why doesnt it work

also you clearly didn't look it up, otherwise you'd know that querySelectorAll returns an array of elements.
>>
>>55767057
neither one of them work. I tried them both.
I even tried adding an index to the querySelectorAll
>>
Why is Rails used so much more than Django? I looked in most major cities and Rails tends to have at least 5 times the number of jobs. It gets a lot worse in Seattle and SF too.
>>
>>55767141
Have you looked at your javascript console? Maybe it says something about it. Is ".INITIALHIDE" the correct classname?
>>
>>55767194
Django doesn't have a trendy logo sticker to put on the lid of your macbook so hipster startups don't use it.
>>
>>55761060
anybody?
>>
>>55767238
Well, I'm not using a console. I'm using Notepad++

But that IS the correct classname.
On initial load of the page, I have this function:
function MAINLOAD(){
jq(".INITIALHIDE").hide();
}

That hides them.
It WON'T hide when it's AJAXed, though, and that's a problem
>>
>>55767317
I mean the console from the devtools in your browser, that appears when you press F12.
>>
>>55767141
>>55767317
Do you have multiple elements with the same INITIALHIDE class?
If you do just replace the querySelector line with that one (
jq(".INITIALHIDE").hide();
)
>>
React question: Can I define an "instance spread" in my constructor based on props somehow, so that I can use it in my render function? Something like
this...spread
but actually working.
>>
>>55767357
I'm not really sure what to look for.
It just shows me the whole html of the page.

>>55767453
I'm trying this too.


OK, new problem, though:
It works...
If I left it load BEFORE hitting OK on the alert box, assuming I have the alert box activated...
in other words, it seems to be loading the unhidden modules and then hiding them after I press ok...

I'm not sure if this would mean anything specific to anyone here
>>
>>55767532
That's how it's meant to work. alert() pauses the entire page until you close it, including javascript.
>>
What version of Azure do I need for websites?
>>
>>55767540
so, how do I make it hide the elements when I disable alert messages?

it seems to be a timing thing at this point. like, it's firing the hide BEFORE everything is loaded
>>
>>55767194
Rails is just better. Django's default project layout, default template language and ORM are all awful. The first two can be fixed but it's annoying and third party packages complicate the issue. You tend to also have to waste time splitting up the settings file for development, production, testing and doing the same for requirements files. Rigging together some kind of asset pipeline with ManifestStaticFilesStorage or a third party packaging is also a time sink.

Rails gets all of this right out of the box and Devise is far better than Django's authentication system.

The "reusable apps" idea is also just unnecessary complexity in most cases and most things that are actually reusable can be spun off into standard Python libraries.

If you have to use Python I'd recommend Flask, SQLAlchemy and webassets. Django gets too many things wrong to save a lot of time.
>>
>>55767584
you know what... I'll just make those buttons forms themselves and have them AJAX post to one of 2 files or something...

that should solve it, because neither form will even exist on the page until something is pressed.

right?

I'll try that later.
I've been working on this site for several days already. I'm on vacation. I'm going to the pool for a while.
>>
>>55767659
It has to work. I'm testing it myself with

$.ajax({
url: location.href,
method: "post",
dataType: "html",
data: {"test": "1"},
success: function (data, textStatus, jqXHR) {
$(div).html(data);
$(".hide").hide();
}
});


and it works fine, you're probably doing something else wrong, but I can't know what it is unless you post all of the code.
>>
How can I merge cells from the same column if they show the same data? Also I'm using angular but idk if it has some solution of it's own.

Also, the data is given by the rest backend but the problem is that data shows up in a table faster than the html is loaded, so I can't select all table cells because they are still undefined. I used a timeout for it, it works but that's stupid. Tried with document ready, load and whatnot, but nothing works.
>>
I am making a small business website, on the home page should I have a news box and a testimonial bit?

Nowadays doesn't social media and Yelp/Google reviews make them redundant?
>>
>>55767569
If you have to ask, you don't need azure. It's for cloud computing, not web hosting.
>>
>>55767599
>If you have to use Python I'd recommend Flask, SQLAlchemy and webassets
It's one thing to dislike Django, but to recommend this.. m8
>>
>>55768122
News is good if it's going to be updated regularly, otherwise leave it off. Prominently displaying your "Latest blog post" from 2014 doesn't look good.

Testimonials are tricky. Featuring them too prominently is a dark pattern and makes you look sleazy. Most likely near the bottom of the page, and definitely below the fold.

You don't want to include any that mention anything that could be considered negative in any way whatsoever (obviously) or that seem too good to be true, even if they are true.

Try to attach them to a real person in some way. Put a name and photo of someone next to the quote. It should be obvious, but if you're going to fake it, at least try to get some good, realistic looking stock photos.
>>
>>55768936
SQLAlchemy and webassets are objectively very well written. The only legitimate complaint against Flask is the abuse of thread locals and that was a subjective design decision that honestly doesn't matter much.
>>
>>55767859
Bump. Anybody knows at least the answer to the second part? I don't understand why is a selected html tag undefined while the data in that tag is already loaded. What can I do so I don't have to use timeouts?
>>
>>55769178
How is it for test-driven dev? I've seen webtest floating about, but haven't tried either flask or webtest. Considering it since Django has given me some headaches at work with all the magic it goes through. desu I like its ORM and security protection features
>>
>>55769276
There's a tiny bit of boilerplate setting up the test environment but it's very straightforward and well documented.

http://flask.pocoo.org/docs/0.11/testing/
>>
>>55764504
Put it in callbacks instead of chaining it.
$('#stuff').fadeOut(function() {
//do more stuff
});


But as someone else said, you should really be using CSS animations. Trigger them with toggleClass or something similar.
>>
>>55765929
You have to set inline block on the <li> elements
>>
>>55740568
Are we at limit?
What the hell am I doing wrong?
>>
>>55770017
You're using codeacademy
>>
>>55770036
Fair enough.
>>
>>55770017
Try removing the spaces after the opening p tags
>>
>>55770099
Turns out to be the <h1> tags. Thanks anyway.
>>
>>55755686
>Wife's boyfriend
Wait what
>>
>>55755686
Anybody that says "use X because big_company uses it" is an inexperienced twat.
Big_Company uses X because it meets the needs for their problem space. You should be choosing solutions to fit YOUR problem space based on your own needs, not because it's new hotness at some name.
The real question is do you even need either of those fat bloated sacks of steaming garbage?
Stop shitting on my mobile data, anon.
>>
>>55770171
>>55770264

It's almost as if he wasn't even serious.

Oh boy, it sure is summer in here.
>>
>>55770264

We use so much shit frameworks, source control etc... at the company I work for (in top 100 visited sites in the world),
>>
>>55770295
>summer
that's a pretty summer phrase desu.
You sure you belong here?
>>
>>55770356
We went from Django and Angular backed by a postgres db to using C# to talk to mongodb and I dont even know what's even going on anymore. They chose C# because one guy insists on strong typing which has literally done nothing but produce issues when working with mongodb is easier than falling out of bed if we were using some form of javascript (typescript, coffeescript, clojurescript, vanilla javascript ,whatever) but no I gotta deal with these pants-on-head retarded builder objects and create classes to represent a document in a collection to serialize.
>>
>>55770359
I'm OP bitch.
>>
>>55770427
>Django+angular
How do you make it work? Do you use all components of the usual angular workflow, or do you only use whichever your django project doesn't use? Or a middle-ground?
>>
>>55770439
>OP is cancer
Nothing new.
>>
>>55770523
What would you know, you're so new you fell for obvious bait.
>>
>>55770427
>using C# + mongo
jesus christ how horrifying.
>>
why do so many people still use depreciated shit like mysqil? Astounding the number of people who still use it to insert into databases WTF
>>
File: dumb cunts.jpg (70KB, 790x790px) Image search: [Google]
dumb cunts.jpg
70KB, 790x790px
How technical does my portfolio have to be?

Looking for an entry level Front End Dev position, just really trying to get my foot in the door of a company ASAP.

To be 100% honest I fucked up with one position because it feel in my lap so quick after school that I sent my resume to him and didn't even have a portfolio online, unsurprisingly he never responded. So I fucked that one up.

So I wanted to ask /wdg/ about portfolios. Is the point of the portfolilo merely to showcase design or code? Obviously the answer is both, but should I be bending over to throw a bunch of bullshit javascript in there? I honestly enjoy seeing what I can do with just HTML/CSS and that has a lot to with me being pretty weak with JS. Can I be minimal with JS now, while I work on applying for jobs and learning as much JS as possible or should I be trying to cram complex JS into the portfolio?

Sorry for the blog. Any other portfolio advice is appreciated.

TL;DR: My javascript is weak, need job. Need portfolio for job, does portfolio need JS? What do?
>>
>>55770805
Got paired with another guy to build a website for a client. Despite me insisting on him taking 2 hours to learn PDO before we begin, the cunt actually did his share of the coding using mysqli. So now we have a site with half myqli and half PDO and I'm waiting for it to get hacked so I can throw him under the bus with the swiftness.
>>
>>55769262
Rowspan/colspan for first span. For second part- you are doing something wrong if your data can loaded faster than html. Show us your code.
>>
>>55770427
Your problem is mongo not C#.
>>
>>55770805
Because PHP devs love using depreciated shit. If they didn't, they wouldn't be using PHP.

>>55770842
>Is the point of the portfolilo merely to showcase design or code?
The point is to showcase your skills. Focus on what you're good at, and show that you're willing to learn new things. You should be reasonably competent with JS though, or you're going to be looking for a while.
>>
>>55741970
Onclick is technically an event listener. Just because it's inline doesn't make it bad.
>>
>>55750878
Hipsters tried to improve it with some framework, wrote a blog about it, it got popular. Rinse and repeat.
>>
>>55771315
No, it's wrong for the same reason that inlining css is wrong.
>>
>>55770803
I know. Kill me.
>>55771150
They're both problems.
>>
>>55771477
Web dev isn't always black and white, depending on the context
>>
why does my material-ui drop down button work when i click on desktop (FF, chromium) but not when i touch on mobile(Chrome, Dolphin)?

<li><a onclick="itJustWorks()"></a></li>
>>
>>55772489
btw

theres text in between the anchor tags it says the names of users.
>>
>>55767569
App Service>Web Apps
>>
>>55772489
Try adding
href="#"
to it
>>
>>55772769
that didnt help but ive noticed sometimes it takes a lot of refreshes to really refresh everything with material-ui

when i click on my desktop it calls the function

when i touch on my phone it closes and then reopens the "drop-down"
why do these memesters hate my drop-down menus i just want to present a small list of clickable options
>>
>>55772810
Try using events instead of onclick then.
>>
>>55773023
what like
$("#example").on("click ", function(event {
// do stuff
});


i want to create these drop down options dynimically

$("#dropDownDest").append('<li><a href="#" onclick=' + '"' + "selectUser('" + value.user + "')" + '">' + value.user + '</a></li>');
>>
Never done any serious webdev before, so bear with me for a bit. Trying to set up a site where you click a button and it generates a new HTML file (thats just an identical copy of another page) with a random filename then sends you to that page. What'd be the best way to do that? I think I've got it with a little PHP fwrite and so on, but the server is taking a while to install so I cant test it.
>>
>>55770842
>javascript is weak
you're dead in web dev without it unless you're a qt female
literally get to it, it's not even difficult
>>
using bootstrap, is there any way to get my containers (stacked on each other) to each set to window height? Right now I'm using {height: calc(100vh)} but shits still not looking right on phones
>>
File: hackers_powerbook_duo_280c_2.jpg (26KB, 400x260px) Image search: [Google]
hackers_powerbook_duo_280c_2.jpg
26KB, 400x260px
>>55770842
This morning did you put your pants on and then stretch your tightey whitey underpants over the outside of them on accident, humiliating yourself? No? Congratulations, you can script.
>>
>>55767732
Ok, so I got this, and it works.... until I make the html(data) call.
It does that and NEVER reaches
alert("Success")
success: function(data, textStatus, jqXHR){
alert(params);
alert(data);
alert("AJAXing div");
jq(div).html(data);
alert("success");
[...]


Why does it not reach the alert?
>>
>>55773847
...check your console?
>>
>>55773847
what is location.href?
>>
>>55773856
alright, it shows a few "unexpected character" warnings, nothing else, but I found out WHAT is going on, but not WHY
It DOES actually reach the alert and everything after it, but it HANGS for like 30 seconds for some reason...
if I have it do like
jq(div).html("test");

it runs immediately.

Why might it be doing that?
>>
>>55773984
>{"test": "1"}
because you set datatype to html but youre sending json?
>>
>>55774002
mine's not {"test" : "1"}
that was someone's example.

mine is a processed php script.
someone told me to use html. should I use something else?
>>
>>55771150
It sounds like his problem is just incompetence or incompetent team mates.
>>
Day 178: Still no job. Still no job. My gun is loaded and ready. I fear the end is near.
>>
>>55774042
same happens when I set the datatype to "text"

but, um..... I might have figured it out...
the script in total has a couple THOUSAND lines of form options... maybe that's... the reason?

is there a way to speed it up?
>>
>>55774002
read the $.ajax docs
dataType is the expected response type, not the type of data sent
>>
>>55774152
I figured it out. the form loads every year as a dropdown list option from 0 to now. can I speed up the html() function? or should I replace year with a numeric text box?
>>
File: 1431899825420.jpg (38KB, 500x375px) Image search: [Google]
1431899825420.jpg
38KB, 500x375px
I am currently looking into using web development and design as a means of eventually working for myself and want to know what I am in for.

I have a solid knowledge of CSS / HTML but no SASS or Javascript (well maybe a little)

have websites like Squarespace made it more difficult for freelancers to get jobs or is this a myth?

Is anyone here a freelancer? If so, how long did you have to spend learning before you were able to make a steady income from it?

Thanks,
>>
>>55774170
>>55774121
yup. fuck lol. I was losing my shit all day over this.
changed it to an input type='number'. loads in like a second.

I'll just add an extra level of validation to it.

god damn. That was a fucking waste of my time...
>>
>>55774280

Been freelancing since January. I have a website up, portfolio, and Git with 2 projects and a loosely related Information Science bachelor's degree that I completed in May. In the past 7 months I've had 1 client - a freelance job that eventually paid $600.

If you're looking to freelance to expect to hit the ground running right away. You could end up being way more fortunate than I was and land major clients right off the bat though. If I had a choice between freelancing and finding a job in a development firm I'd take the job, freelancing isn't paying my bills right now. It just sucks that nobody anywhere near to me is hiring so this is my only option.

Good luck.
>>
File: 1468634027793.jpg (49KB, 480x480px) Image search: [Google]
1468634027793.jpg
49KB, 480x480px
If I take classes to gain a certificate in web design, would I be able to build a full website?

From the things I've read, it seems like I will only be able to make the site look nice but basically not function at all.

My goal is to make good looking and fully working websites for clients. Much of the site functionality will be focused on presentation more than functions though.

Questions thread is down btw.
>>
This thread is gonna die in a few minutes. You should have waited for a fresh one to ask your incredibly repetitive question.
Thread posts: 325
Thread images: 28


[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.