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

>>59679034 >Discord https://discord.gg/wdg >IR

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: 320
Thread images: 27

File: 1490778753512.png (874KB, 824x553px) Image search: [Google]
1490778753512.png
874KB, 824x553px
>>59679034

>Discord
https://discord.gg/wdg

>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/ (embed)
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/ (embed)

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

>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
>>
>>59723406
This will give you your wished JSON. But it's a pleb tier solution that I just threw together.

$res = $stm->fetchAll(PDO::FETCH_ASSOC);
foreach($res as $data) {
$items[] = sprintf("%d", $data['ID_RequestItems']);
$id = $data['ID_ReplacementOrders'];
}
$json = '{"order_id": "'.$id.'", "item_num": '.json_encode($items).'}';
>>
I inherited the shittiest Ruby on Rails application ever.
The goal is to let users upload data and plot it.

They can upload the data in (x,y) pairs as follows:

[x1 y1; x2 y2; x3 y3; ... xn yn]

These points get stored in `@values` as shown:

`
@values = @data.split(";",-1)
@values.each do |value|
value.strip!
if !value.match(/\A\d+\.?\d*[eE]?[+-]?\d*\s+\d+\.?\d*[eE]?[+-]?\d*\z/)
add_data_values_error
end
`

That regular expression should accept numbers written in scientific notation or regular numbers, and reject other stuff. When I test that regex in online Ruby regex evaluators, it works exactly as expected.

However, in the actual application, it does not. In particular, the x values can NOT be written in scientific notation without causing an error (but the y values work just fine).

Can anyone help me figure out what the fuck is going wrong?
>>
File: 1x-11.jpg (655KB, 2200x1238px) Image search: [Google]
1x-11.jpg
655KB, 2200x1238px
Is your code tasty /wdg/?
>>
>>59725396
It tastes like linguine
>>
File: 1490628438104.gif (143KB, 545x524px) Image search: [Google]
1490628438104.gif
143KB, 545x524px
>>59725727
>linguine
>>
>>59724753

What does the \A and \z do?
>>
Is postgres a meme?
>>
>>59724753

Also try to use non greedy operators and grouping them if its possible in Ruby
>>
HELLO THIS RASHVI FROM ACCOMODATE HIRING COMPANY, WE HAVE AND URIGENT NEED FOR DEVELOP IN {$closecityamericanman} THAT PAY 190,0000 AMERICAN RUPEE PER YEAR. PLEASE SEND NEW RESUME, LINKEDIN, WORK SAMPLE. GOOD THANKS.
>>
>>59726029
Hi, I'm Postgres, you might remember me from "I don't allow LIMIT without some strange workaround subquery hack lol" or "Let's just call it a TEXT"
>>
>>59726224

Pajeet, you have to use double quotes
>>
File: 1490201410451.jpg (32KB, 620x400px) Image search: [Google]
1490201410451.jpg
32KB, 620x400px
>>59726240

Is MongoDB any better?
>>
>>59726308
Never used it because I heard it's not reliable.

So if you don't don't give a shit if things work or not then it might be good.

What do you have against mysql?
>>
We need to build a faraday cage covering all of india.
>>
>>59726362

Not OP, but i indeed was asking for MongoDB

I've seen some MEAN stack jobs in my area, that's why.

mysql is ok,
>>
>>59726308
https://www.postgresql.org/docs/8.1/static/queries-limit.html
>>
>>59726506
There are some. Expect mongo to go the way of rails and django. No harm in learning it though.
>>
How do I go from junior dev to mid-level?

Just apply everywhere?
>>
Do mobile applications need some kind of special server or something? Can I just get some normal shared or VPS from bluehost or whatever and use that?
>>
>>59727174

Yes, just be careful with the data limits
>>
>>59727097

network idk

good like climbing any ladders without a degree

you'll still be a jr. dev 5 years from now
>>
What's the consensus on using <br /> tags? I'm writing babby's first webpage for an intro class, and the professor said not to use <br /> tags too much if at all, but it seems like my assignment needs me to use them to match the formatting.

<blockquote>
Q: What do you call an ape who loves pie?<br />
A: A meringue-utan. <br /><br />
- Vickie K.
</blockquote>
>>
Has anyone had any fun with polymer?
>>
>>59728195
you can just wrap each line in p tags for the same effect
>>
is a think pad with i5 / 8gb ram plenty of power for doing web dev?
>>
File: comments.png (857B, 175x37px) Image search: [Google]
comments.png
857B, 175x37px
Quick question for /wdg/:

How would one establish which js function and therefore which file is associated with a certain onclick() or other event? I'm trying to debug my browsing experience. Pic related.
>>
>>59728118
>you'll still be a jr. dev 5 years from now
Bullshit.
>>
>>59728643

above the standard, actually
>>
>>59726029
Postgres is awesome. If you don't have money for a database, that's the go-to.

Kind of shit documentation though.

>>59726308
MongoDB is worse than nothing. I'd rather just not program anything.
>>
Is there any future for self taught nigs like me in this industry?
I have some college units but never finished.
>>
>>59728752
I've seen self taught people become senior devs in a year or two in rare circumstances

>>59730058
of course after your first job degree doesn't matter
>>
Node makes me want to shoot myself.

I've tried the barebones Express way, and I'm currently trying the relatively full stack way via stuff like Meteor/Sails and I just can't wrap my head around it outside of some tutorials. There's like fifty different and incompatible ways for doing the same exact thing and it's driving me up a wall. How do you Node devs actually do anything with this?

>>59726873
That's not a fair comparison. Django and Rails actually work like they should.
>>
i want to change the ui dinamically, when the user selects it: show different text, buttons and vieo windows in a particular div. i've looked into angular and apparently it does exactly that, but i'd like not to add another dependency if possible since i'm already using jquery and bootstrap and others. is there any best practice to change the ui manually? thanks for any help

tl;dr alternative to angular?
>>
> <div class="article">
> <article>
which should i use?
>>
>>59728195
<br/> are new lines
<p> are paragraphs

Paragraphs may or may not have margins, new lines are just new lines.
>>
>>59726240

you're such a giant fucking faggot
>>
>your password can only contain alpha numeric characters
explain yourselves web "developers"
>>
>>59731309

the article tag, obviously

>>59731663

never seen that before, maybe a shitty attempt at preventing sql injection / validation?
>>
>>59728691

pass 'this' to the function
>>
>>59728195

there's a <cite> tag specifically for that

don't use br tags, if you want to break the paragraph up use a new p tag; br is only used for styling these days
>>
>>59727174

that question makes no sense what do you mean mobile apps as in native ios / andriod apps? no the company hosts the app other than the api they might use

if you mean regular web app then yeah clearly, and you would be a cunt to use a regular host

you might as well use ftp and php while you're at it
>>
>>59731770
>native ios / andriod apps? no the company hosts the app other than the api they might use

Wrong
>>
What is some js tutorial that assumes I already know what are basic programming things like variables, loops arrays etc
>>
File: Untitled.jpg (29KB, 320x338px) Image search: [Google]
Untitled.jpg
29KB, 320x338px
Javascript newbie here. What do you think this is:
https://pastebin.com/s4T8m6Pe
https://pastebin.com/qzX6QtSy

The second link are just the referenced arrays I guess.
>>
many-to-many
return Course::where('id', $id)->tasks->get();

this doesn't work, nor tasks()->get();
how do?
this is laravel
>>
>>59732939
I think ..->tasks()->.. should work but I'm just fucking up somewhere else.
I'm trying to bring them to my vue thingy with
axios.get('/task/4').then(response => console.log(response.data)).catch(error=>console.log(error));

but I get error 500
>>
>>59723742
Can I really do most of web dev in Java or will I end up in Javascript eventually.
>>
>>59732939
return Course::find($id)->tasks()->get();

worked like this...
>>
I need some help.
Not good with SQL and very confused.
But I have a table which contains information as digits that I use as ids to other tables that hold their "names or meanings" along with that I have the need to get stuff from other tables and match it up by ids.
When I do my query, I get so many duplicates and odd combinations of the stuff I just wanted from start. What gives?
>>
If you want to keep a domain name forever. Is it safe to use a .one domain?

Because they have the three letters of my initials.
>>
>>59733410

Could you be clearer?
Can you post the definitions of your tables, your query, what you got, and what you expected?
>>
>>59732965
You can do most. You should still learn JavaScript, even if you just want to make some functions that validates input or similar.
>>
>>59729428
Personally I find the documentation to be rather good. What about it is it that you don't like?
>>
I have 5 tables.
History
Info
Genre
Watcher
Role

table History has the following columns
history_id(int), date(Date), text(varchar), genre(int),info(int),watcher(int),role(int),active(bool)

table Info has the following columns
info_id(int), text(varchar)

table Genre has the following columns
genre_id(int), genre_title(varchar)

table Watcher has the following columns
watcher_id(int), watcher_firstname(varchar),watcher_lastname(varchar), role(int)

table Role has the following columns
role_id(int), role_name(varchar), active(bool)


What I want to do is make a query where I grab
Everything from the history and link onto the other stuff that it holds to, as in if I wanted to know the genre, right now I see only a digit but that digit represents the same digit at the genre table which has the text.
>>
>>59733571
Give me a few minutes, and I'll set something up.
>>
Stupid question:
Is removing the theme copyright thing on a wordpress site a good idea? Bad? What's the standard norm on this?
>>
>>59734099
Copyright laws do not force you to credit anyone. You either have permission to use it or you don't, unless agreed upon on otherwise.

So in general, if they give people permission to use their theme and edit it, then you can just remove it. Unless it's licensed under a GPL or creative commons license, which is an agreement which requires attribution.
>>
>>59733410
I think you mean foreign keys and you might want to look into LEFT JOIN and GROUP BY.
>>
>>59734220
I know of foreign keys but I don't use them nor do I want to use them. It's a hassle to cascade
>>
>>59734230
Seriously post a screenshot or something because we need to see your table structure if you want help.
>>
>>59734253
I have stated the structure as above.
>>
>>59734099
What's the licence on the theme?
Some licences do not require attribution, some do.
>>
>>59734263
So you're this guy >>59733571?
>>
>>59733571
Let's start by just doing two tables first:
CREATE DATABASE
postgres=# \c gmovies; ^
gmovies=# create table history (id int constraint pk primary key, date date, text varchar(2048), genre int, info int, watcher int, role int, active boolean);
CREATE TABLE
gmovies=# insert into history(id, date, text, genre, info, watcher, role, active)
gmovies-# values(1, '2017-12-23', 'A nightmare before grav-mass', 1, 1, 1, 1, true);
INSERT 0 1
gmovies=# select * from history;
id | date | text | genre | info | watcher | role | active
----+------------+------------------------------+-------+------+---------+------+--------
1 | 2017-12-23 | A nightmare before grav-mass | 1 | 1 | 1 | 1 | t
(1 row)

So that takes care of our first table, with just one fictitious (but free as in freedom, and respectful of the viewers freedoms) movie.

Now we move on to the information:

gmovies=# create table info (id int constraint pk_info primary key, text varchar(2048));
CREATE TABLE
gmovies=# insert into info(1, 'A terrible tale of the Non-Free spirit of user enslavement, as told by acclaimed director Richard "Maestro" Stallman');
ERROR: syntax error at or near "1"
LINE 1: insert into info(1, 'A terrible tale of the Non-Free spirit ...
^
gmovies=# insert into info(id, text) values (1, 'A terrible tale of the Non-Free spirit of user enslavement, as told by acclaimed director Richard "Maestro" Stallman');
INSERT 0 1
gmovies=#


What we want to do, is to grab movie #1, and join any row from info, where history.info matches info.id.

gmovies=# select * from
gmovies-# history inner join info on (history.info = info.id);
gmovies=#

I have omitted the output, because it's massive.

Next we'll do the other tables.
>>
>>59734308
Yeah.
>>
>>59734219
>>59734282
GPL V3
>>
What's with all these people asking for help on SQL queries lately ?
Why not use an orm and not break a sweat
>>
>>59727097
Learn more shit that senior devs know

t. junior to senior to lead in 3 years
>>
>>59734440
>Why not use an orm and not break a sweat
I am dealing with some old stuff and the place doesn't want to phase out it to new stuff. So basically I am stuck "relearning" stuff I should have paid attention to before...
>>
>>59734440
Complex queries in ORM can be even worse unless they support raw SQL which is weak shit
>>
Alright guys, great looking general landing page, but for the noobs that show up: What does /wdg/ stand for? Are they supposed to guess it's "web development general"?
>>
>>59734440
Because people are learning the underlying technologies to deal with this shit.
>>
>>59734522
They're supposed to git gud.
>>
Is golang great for webdev or just a meme
>>
>>59734498
well shit good luck homie

>>59734517
are there performance advantages to express complexity on the db rather than on the application lvl ie in doing complex queries rather than fetching lots of tuples you'd filter out in the application ?
>>
>>59734589
meme
java is the king
>>
>>59734577
Spitballing, but instead of building people up we should tear them down so they don't compete for our jobs right? Plus we need bad developers out there to make meme fuel. You've convinced me.
>>
>>59734316
Let's just create the rest of the tables:
CREATE TABLE
gmovies=# insert into genre (id, title)
gmovies-# values(1, 'Abject Horror');
INSERT 0 1
gmovies=# create table watcher(id int constraint pk_watcher primary key, firstname varchar(127), lastname varchar(127), role int);
CREATE TABLE
gmovies=# insert into watcher(id, firstname, lastname)
gmovies-# values(1, 'Terry', 'Davis');
INSERT 0 1
gmovies=# create table role(id int constraint pk_role primary key, name varchar(127), active boolean);
CREATE TABLE
gmovies=# insert into role(id, name, active)
gmovies-# values(1, 'Teaching kids about freedom', true);
INSERT 0 1
gmovies=# select * from history inner join info on (history.info = info.id) inner join genre on (history.genre = genre.id) inner join watcher on (history.watcher = watcher.id) inner join role on (history.role = role.id);
gmovies=# select * from
history inner join info on (history.info = info.id) inner join genre on (history.genre = genre.id) inner join watcher on (history.watcher = watcher.id) inner join role on (history.role = role.id);

Of course, the last select is a terrible fucking mess.
It's full of 1, 1,1, ... and we don't want that.
So let's just query out the specific things we want:

SELECT history.text as 'text', 
history.date as 'date',
genre.title as 'title',
info.text as 'info',
watcher.firstname || ' ' || watcher.lastname as name,
role.name as role
FROM history inner join info on (history.info = info.id)
inner join genre on (history.genre = genre.id)
inner join watcher on (history.watcher = watcher.id)
inner join role on (history.role = role.id);


And you get all the information you want.
Note that the command to concatenate (or stick strings together) varies from database to database.
>>
front end is cancer.
enjoy your dead end, dorks
>>
>>59734673
I'm the same guy that's helping our friend out with his SQL queries.
I'm all for helping people, but they have to be thought initiative and independence, and not just spoonfeeding. It's a balancing act, and you know it.
>>
>>59734702
Oh fuck me, remove the single quotes from the as clauses, they shouldn't be there.

My bad.
Anyway, >>59733571

see >>59734316 and >>59734702 for help with your troubles.
>>
>>59726308
the advantage of mongo has to do with scalability

the drawback of mongo is you have to batch your transactions it cant magically take simultaneous inputs from a billion concurrent users which is literally the only valid criticism of mongo.
>>
>>59734710

What did he mean by this
>>
>>59735179
means he's shit at design, nothing new.
>>
>>59734440
If you can't use SQL you shouldn't work with databases. ORM should not be a reason to not know SQL.
>>
>>59735772
don't worry i studied it, i just can't see a reason to directly use it except to define schemas or do maintenance
>>
<input v-model="answer" placeholder="answer" />
<button v-on:click="checkAnswer(answer)">Submit</button>

how do I clear the input field on button click?
vuejs
>>
>>59736147
got it myself..
value="answer" />

and changed the value in checkAswer
>>
>>59728118

if someone gets a job as a jr dev and 5 years later they are still a jr dev then thats on them. How you wouldnt learn and gain good experience is beyond me. Unless youre just a front end babby or just update the content of wordpress sites or something.
>>
>>59732084

what are you talking about, apple hosts the application for you
>>
>>59734440

uh, because SQL is one of the most important things to know. It's easy to get, hard to master.
>>
>>59735142
At what point do you have too large a dataset to comfortably store it in an SQL database?

Google's moneymaker, its adsense stuff, runs on MariaDB. If it can handle google's scale, it can handle your reactive webscale fizzbuzz 2.0 webapp.
>>
I am building a curriculum for web dev and want to knock out foundational stuff before I start fucking with projects.

I want to prove to myself I am at least capable of the basic theory/math behind what I'm doing. Can anyone recommend resources for a solid background? Currently I'm looking at

https://www.edx.org/course/introduction-computer-science-harvardx-cs50x

https://www.coursera.org/learn/algorithms-part1

https://www.coursera.org/specializations/algorithms

What shit do I need to make sure I have covered so I'm not backtracking too much in the future? Just want a solid foundation for anything that may come my way in the full stack
>>
Would anyone be interested in a learning livestream?
>>
>>59734440
>orm
you could start with that yes, but once you get a big enough DB schema and data, performance will suffer
besides, most of the times, you can accomplish stuff much faster with a connection pool and basic statements, its just a matter of knowing what your doing
>>
is webdev a bad career for creative people?

microsoft excel makes me sick but I love design and shit. Is there a place for me in full stack dev?
>>
>>59736969

>microsoft
>excel
>design

no idea how you got to full stack from that list. I dont think you know what real development is
>>
>>59736969
Web dev is a great career for creative people.

You get to go home and build cool things.
>>
>>59737005

tell me in five or more words what "real development" is
>>
>>59737252

not much to do with microsoft or excel that i know
>>
>>59737005

pretty much he means the "lower" you go the more "real" programming youre doing. If you get caught up in meme frameworks and "high" level stuff then youre somewhat polluting the industry. Can you fizz buzz? Could you write a CRUD app with a vanilla language? Do some research on this because full stack development isn't necessarily for "designers".
>>
>>59737342

are there any real advantages to developing for web on linux over windows?
>>
>>59737873

i wasnt talking about OS's, dude, just dont get caught up in M$ related stuff like their shitty .net frameworks
>>
>>59737926

my friend is a .net babby who still programs in web forms. its all he does and knows

he'll be using that shit until hes 80
>>
>>59737926
you haven't used them for quite a few years, right.
they a far better than any shitty php framework.

>>59738311
two of my older coworkers insist on reusing their shitty copy and paste web form sites from .net 1 times because they don't get the concept of MVC.
It's painful.
>>
Hello, I have a question about an HTML/CSS issue I'm running into.

So I'm fairly new to the web design game, but I'm using DW and doing some simple text stuff on a page. Everything has been fine and dandy up until now. I've been keeping the live page up on one screen with the dev tool, inspecting the CSS and altering it how I see fit, then copying it into DW and putting it. Now, for whatever reason, the last CSS class that I made isn't being applied to the live site. The HTML is there, but the CSS isn't popping up on the Dev tool. It's written correctly, and I've even deleted it and rewritten it a couple times just to make sure.

Any reason for this to happen? Like I said, I'm fairly new to this stuff, but I've had no problems up until now.
>>
>>59738706
post code.
>>
Hey guys need some help. Started learning HTML/CSS a few days ago and thought
I had a good grip on it so I started learning Javascript today. But while testing a JS script
I encountered a problem with CSS regarding the hover interaction between classes. For some reason the class ="wtf" when hovered
doesn't want to display the image and text which are hidden. On it's own all the classes when hovered work (ex: background color).
Shit's confusing me.

Here's the code: https://jsfiddle.net/95qjyg9L/
>>
>>59738876
your .help element isn't inside your .wtf element, so the .wtf:hover doesn't affect it.
>>
>>59738907
yeah now i see. Thx mate, so this is where JS comes in handy, for unrelated elements.
>>
>>59739016
css has a + operator for elements next to it, have a look at that.
>>
File: sorry for being noob.png (190KB, 1740x935px) Image search: [Google]
sorry for being noob.png
190KB, 1740x935px
>>59738813
Alright.

Sorry if posting it in an image is gay as fuck, but it seemed cleaner than posting all the lines in a reply. (Again, new to this and this board).

So I styled the first 3 blocks of text just fine. But the CSS apparently isn't reaching the next 2. Any ideas? Sorry if the HTML/CSS is super inefficient or something.
>>
File: reply.png (10KB, 398x326px) Image search: [Google]
reply.png
10KB, 398x326px
What would be a good background color for this? Looks okayish transparent but I can't find a bgcolor that wont make it look ugly as fuck.
>>
how the FUCK is this so hard to grasp?
[App\Course::first()->teacher()->associate(App\User::find(5));
[/code]
works ok
$course = new \App\Course([
'body' => $this->body,
'title' => $this->title,
'answer' => $this->answer, //it's empty if the calling thing is Course so nbd
]);
$course->teacher()->associate(5);

does not work
complains about the 'teacher()' part like a bitch
does not work if I $course->save(); in between either
does not work if I change '5' for \App\User::find(5) either
I had to
\App\User::find($this->teacher)->teacher()->save($course);

to make it work
but why does the first thing work no problem?
laravel
>>
>>59739150
Put a small border on it and make it slightly darker than the background
>>
>>59739150
you need to go flatter
>>
>>59739138
press ctrl-f5 or disable caching in your browser.
manually browse to the css file and check if your new stuff is actually in there, if not then you either cache very aggressively or you didn't copy it there correctly.
>>
>>59739438
Thanks.

I thought I had tried a hard refresh earlier, but nothing changed.

It finally updated, though. Someday I might not be such a moron.
>>
>>59739243
What's the precise error?
>>
>>59739243
Also post your code (models, relationships, migrations, etc) in a pastebin. It looks like something's wrong with it.
>>
>>59739150
you need box-sizing border box on your inputs
new reply being centered is weird
eye immediately goes to the red, taking away from the rest of the actual reply
>>
>>59739698
I think I've narrowed the problem down to my table being like this
Schema::create('courses', function (Blueprint $table) {
$table->increments('id');
$table->string('body');
$table->string('title');
$table->unsignedInteger('teacher');
$table->timestamps();

$table->foreign('teacher')->references('id')->on('users');
});

It's not the usual 'user_id'. I can either get an error for "Unknown column 'teacher_id'"
or "Undefined property: App\Course::$teacher"

like so (course.php)
public function teacher()
{
return $this->belongsTo(User::class /* , 'teacher' */);
}
>>
LaunchCode fag here.

On my second week at the PHP job I got without LaunchCode's help. Had impostor syndrome for a couple days but just killed a decent little project and got some verbal back pats and now I think I might make it.
Never told LaunchCode I got a job. Haven't heard anything from them in three weeks. I have been a LaunchCode candidate since early December.

They seem to be pushing diversity placement. If you're a white male it won't hurt to apply but don't expect much.
>>
>>59740014
>Had impostor syndrome for a couple days
imposter syndrome lasts a lifetime desu neko chan what you experienced sounds more like the typical first week job jitters
>>
>>59740040
I guess I've never really had a skilled job before. There's a lot of actual learning to do. This is a nice way to kill a work shift
>>
>>59740014
>>59740040
>imposter syndrome

Wow. I've never actually heard about that before.

I feel that way about everything, although it may admittedly just be low self confidence. But yeah, school, work...I always feel like someone's going to call me out.
>>
>>59739288
>>59739899
Dubs of truth I guess. The red thingy is just for closing the form, its a gadgat for JS users but you can also post without it.
>>
File: final.png (14KB, 324x352px) Image search: [Google]
final.png
14KB, 324x352px
>>59740142
Is it too clumsy? The damn captcha is so big.
>>
>>59740420
Give some life to the action button, it's looking like a regular text input.
>>
File: 1485889119752.gif (8KB, 645x773px) Image search: [Google]
1485889119752.gif
8KB, 645x773px
>he doesn't program asynchronously
>>
>>59740014

im for coding schools over community colleges and 2 year degrees, but yeah youre right they push hard for diversity theyre all ran by insane leftists

good luck tho
>>
>>59739938
$table renamed teacher to teacher_id
and it werks
ehh...
pretty puzzled
$course->teacher()->associate(\App\User::find($this->teacher_id));
>>
>>59740420
Here's how the 4chan-X styled quick reply looks like. There's no margins.
>>
File: file.png (16KB, 319x281px) Image search: [Google]
file.png
16KB, 319x281px
>>59741855
>>
fetch('http://site.com, {
method: 'get',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json'
},
body: JSON.stringify({a: 7, str: 'Some string: &=&'})
}).then(res=>res.json())
.then(res => console.log(res));


can I include body in gets? users of my site will type in a sentence, submit it, and a get will be sent to the server with that sentence in the body, then the body will respond with information based off that sentence
>>
>>59730058
Senior dev here. I'm a highschool dropout. Got an AA, but nothing beyond that other than certs. After your first job it won't matter much. Have gotten interviews at Big 4 companies. Occasionally the degree comes into play, but only for oldschool style companies (Northrop Grumman, GE, etc)
>>
>>59741980
>http://stackoverflow.com/questions/29571284/for-restful-api-can-get-method-use-json-data
>>
>>59742075
thank you, suspected that
>>
File: Screenshot_20170404_154942.png (24KB, 934x284px) Image search: [Google]
Screenshot_20170404_154942.png
24KB, 934x284px
>>59728234
>>59731552
>>59731743
Would this be better then?
<blockquote>
<p>Q: What do you call an ape who loves pie?<br />
A: A meringue-utan.</p>
<p>- Vickie K.</p>
</blockquote>
>>
I've read so much shit on Reddit and elsewhere that leaves me feeling like I would never be anything more than a hack web dev without a standard cs background.

Is it worth it to try and get into this field without a degree or should I just take out loans for a comp sci bs?

Should I just fucking teach myself Haskell and take some MOOC comp sci courses? I don't want to be a fucking hack but shit how much of a math wizard do you really need to be to become a competent full stack dev?
>>
>>59742674
How old are you? If you're under like late 20s I'd say go for the degree

Do you already have a bachelors in something else?
>>
>>59743085

I'm 26 and have an associates in an unrelated field
>>
>>59743304
It's your call
I'm self taught and don't consider myself a hack. But I kind of wish I had a degree for advancement purposes.
>>
>>59728691
>>59731705
This doesn't make much sense. In the context of a web browser. How could I pass the string "this" to the function and then locate it if it's in a clickable part of the UI?
>>
>>59742580
If your prof wants no br tags, then dont use them

You might as well style the Q & A while you're at it.

>>59740420
New Reply/Browse buttons needs to stand out more and look like a button on quick glance (just like you know the captcha checkbox is a button immediately).

>>59742674
>I don't want to be a fucking hack
You're going to be a hack regardless of whether you get a degree or not until you start understanding that you must create. That is all.
>>
>>59743423
>You're going to be a hack regardless of whether you get a degree or not until you start understanding that you must create. That is all.

This desu. No matter what you study you're not really going to be ready for the job until you're on it.
>>
>>59736376
aka
<button v-on:click="checkAnswer(answer);checkAnswer()">Submit</button>

?

Sorry, I don't work in the meme.js, so probably a syntax error.
>>
Hey guys, ran into a situation at work today that required checking all the keys of a JS object to make sure they weren't null or empty.

There were answers on line but I managed to get the function slimmer than the rest, wanted to pass on in case anyone needs to do something similar in the future

function allKeysValid(obj) {
return !Object.keys(obj).some(key => null == obj[key] || "" === obj[key])
}
>>
File: 1476458621301.png (316KB, 567x445px) Image search: [Google]
1476458621301.png
316KB, 567x445px
>>59723742
Django 1.11 released
>>
redpill me on google amp senpaitachi
>>
>tfw slowly being able to understand all this shit

It was like learning to read for the first time. This is a nice feel.
>>
>>59744371
Learn React native, Ionic 2, Nativescript, weex, Flutter,... while you wait for Google AMP to become popular.
>>
>>59744674
Nativescript looks nice desu
>>
Making an AJAX request in a userscript to download an image on a thread and coming up with the following:

XMLHttpRequest cannot load https://i.4cdn.org/g/image.png. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://boards.4chan.org' is therefore not allowed access.


Apparently my XHR code is spam.
>>
>>59745194
Try to emulate the headers of the actual XHR requests a thread makes.
>>
If the anon that mentioned that web development bootcamp course by Colt Steele is lurking, could you tell me how long it took you to go through the course?
>>
>>59745674
>Colt Steele
what a pornstar name goddamn
>>
>>59745798
kek I thought the same thing

he's just a nerd tho
>>
File: file.png (20KB, 385x274px) Image search: [Google]
file.png
20KB, 385x274px
>>59745194
Digging through 4chan-x code. This is their implementation. Would it be possible to do it in a userscript?
>>
>>59743378

you're a fucking retard, I literally gave you the answer and you were too fucking stupid to even google it to understand how exactly it worked

so not only do you need someone to provide you with the answer but you also need them to convince your fucking dumb ass to actually apply it
>>
My CSS is super rusty and I need to set a sidebar with a fixed position to a percentage of its non-fixed parent. The only way I can think to do this is through Javascript. How terrible of an idea is that? If it is, what other ways can I accomplish making a sidebar that takes up 100% of a viewport's height without setting its position to fixed?

If it matters, I'm using Bootstrap, and my sidebar and the adjacent content are both columns in a row. Their grid system uses percentage widths, which is why I'm having this issue to begin with
>>
How do you guys load variables from router urls?

For example the url:

/plant/:category/:id

My method is check first if plants are loaded:
if (!plant === '')


Then check if :category variable exists:
if (!:category === undefined)


Then finally look for the id:
if (id exists in :category) {
load :id} else {
nothing found
}


Is this the proper way of doing it? Is it reasonable or noob-tier laughable? I spent the entire day thinking about nothing but this scenario. Maybe im just overthinking too much
>>
>>59746674
You can either set the position to absolute or fixed to get 100% of the browser height.

Otherwise it's bad practice to do it through JS.

https://jsfiddle.net/6604dsye/1/
>>
>>59747285
Is this react?
On your componentDidMount method you can access parameters.

let category = this.props.params.category;
let id= this.props.params.id;
>>
How can I make a selected box unselectable if a radio button isn't checked ?
I have several radio button with one that allow the user to chose himself a couple of options.
Thing is when the other radio button are selected, the user can still chose in the options. I don't want that.
>>
>>59748373
Or at least make the radio button automatically checked when the user clicks on one of the options.
Like in this page: http://crontab-generator.org/
>>
>>59739150
1. Remove border-radius.
2. Add border box.
3. Ensure everything lines up properly i.e. 'reply to post' is larger than it's underlying inputs.
4. Why not make Browse / New reply inline by increasing the overall width, it looks awkward having one left orientated then one middle aligned.

That's just my opinion tho bby xoxo.
>>
File: takbir brothers.png (343KB, 750x400px) Image search: [Google]
takbir brothers.png
343KB, 750x400px
QUESTION ABOUT
DEPLOYMENT

Building from a lampstack.
Got a digital ocean droplet

When I finally DEPLOY, what do I need to do?

Is using filezilla to put my
/opt/lampstack-5.6.30-1/apps/wordpress/htdocs/wp-content/themes/accesspress-store
to the server's /www/html/ spot

all I need to do?

Any help and advice greatly appreciated.
>>
File: 1347678506157.jpg (210KB, 600x574px) Image search: [Google]
1347678506157.jpg
210KB, 600x574px
>tfw the honeypots on my website catch and ban a bad crawler
>>
>>59748540
I never used WordPress but it looks like you developed a theme. Wouldn't you need to install WordPress first?
>>
MEAN vs LAMP?
>>
>>59748758
>MEAN
more like MEME
>>
>>59748373
>>59748381
bump
>>
File: Screenshot_20170405-110925~01.png (333KB, 1080x1703px) Image search: [Google]
Screenshot_20170405-110925~01.png
333KB, 1080x1703px
>>59748900
>visit their site on my phone
>this happens

So much Javascript and they can't even use CSS kek
>>
>>59743643
<input v-model="answer" placeholder="answer" value="answer" />

and then
this.answer = '';
in the checkAnswer method
>>
is bootstrap good or are there better alternatives nowadays?
>>
>>59736754
i'm interested in learning by watching people develop things that interest me and talking about it, if you use a livestream upload the videos too so i can watch them later.
>>
I have a question regarding performance. Right now I'm caching all my results from the database in the memory and it's crazy fast. I have a function that builds the sites html with the cached objects.

In development that's pretty useful because I see changes immediately but once I plan to release my stuff would it be a better practice to store the generated HTML than rebuilding it everytime?
>>
>>59734440
ORMs suck, I've never seen one that isn't a leaky abstraction
>>
how do I do this without the retarded foreach loop?
foreach ($user1->courses as $course) {
return $course->teacher->id == $user->id;
}

I tried
$user1->courses()->first(); etc etc but it just didn't work.
laravel things..
>>
>>59749604
You need to understand what each element is.

$user1->courses()
is your relation (HasMany, belongsTo, etc).

$user1->courses
is your collection of courses for that user.

Collections do have a
first()
method indeed.

So
$user1->courses->first()
should work if everything's setup correctly.
>>
>>59749321
You don't really need to worry about that to be honest.

There's two options
1. Use a front end JavaScript framework (i.e. React, Vue or Angular) and implement an API on your server side and have the client do all the rendering work by requesting and rendering data from the API
2. Use a templating engine like PHP (with Laravel), or Node.js Express framework with either EJS, Handlebars or Jade (I'm pretty sure that you're already using this)
3. Use a combination of both
>>
>>59749816
return $user1->courses->first()->teacher->id == $user->id;

"Trying to get property of non-object"
course-user is many-to-many
user-teacher is one-to-many
what am I missing here?
>>
>>59749884
I need to "find()" the course before I ->teacher->id? is that is?
>>
>>59749884
I tried it in one of my Laravel projects and it works fine.
Your non-object error occurs for which part of your code? That's the non-object?

Also, if user has no course, you'll get null with first(), so you might want to check it beforehand, or you'll get the same error.
>>
>>59749944
Just figured it was that.
So if I use the foreach it skips the nulls and that's why it works?
I think I'll settle with that
>>
>>59749953
or actually I'll just turn the foreach into if after all huh
>>
>>59749944
if ($user1->courses->first() != null) {
return $user1->courses->first()->teacher->id == $user->id;
}

works
nice
>>
>>59749953
It works, but it's terrible code, in my opinion, anon.
Laravel provides you a way to write clean code, you should keep a clean logic as well.
>>
>>59738342
The comparison isn't against shitty php frameworks.
The comparison is against modern Java frameworks, Node.js, Ruby on Rails, or Ruby w/Sinatra, Python, etc.
Comparing .Net with the worst of its competition is a retarded concept and it convinces nobody.
>>
>>59726029
No, it's pretty solid for common webdev scenarios. Most likely the best free DBMS. With some good extensions.
That said:
- the documentation isn't that bad, but not perfect either; it's often lacking direct examples
- there is no such well supported web interface as phpmyadmin for it
>>
>>59726873
>Expect mongo to go the way of rails and django.
You mean, it will be used until forever, preventing the usage of better solution?
A scary thought.
>>
File: zzzz.jpg (26KB, 348x387px) Image search: [Google]
zzzz.jpg
26KB, 348x387px
How can I make both custom buttons and the selection list align ?
I really suck at everything related to this.

ps: If anyone might know any guide, tutorial or anything that can teach me how I can put something on a ^page exactly how I want it to be, feel free to share. I really disregarded anything related to containers and general structures of a web page.
>>
>>59750079
looks like you're using a css grid framework, just use it and put both buttons one the same row on different columns, then use paddings and vertical-align to make them exactly where you want them to be
>>
>>59750079
Bootstrap?
>>
>>59748540
Yeah, you can use either CLI to copy over stuff, or git push.

If you don't have that then you can just use filezilla with your ssh key file.
>>
>>59750130
>>59750150
Yep Boostrap.
Thing is I never used bootstrap in my life, I'm not working on a personal project. I never really designed anything either to be honest.
>>
>>59750056
Why would you want one?
The CLi is positively god-tier.
If you want a GUI, then pgAdmin is okay, and there are other options like DBVisualizer that are multiplatform that are pretty good.
>>
>>59750079
post your HTML code
>>
>>59750204
>The CLi is positively god-tier.
the ootb cli is fucking trash tier
pgcli is ok but thisfeatureisntimplementedyet tier
>>
>>59750215
Part 1:

    <div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Generate a Cron Expression</h4>
</div><br/>
<div class="form-vertical row">
<form class="form-group col-md-10 col-md-offset-1">
<div>
<label>Hours</label>
<select v-model="hour">
<option v-for="hour in 23">{{hour}}</option>
</select>
<label>Minutes</label>
<select v-model="minute">
<option v-for="minute in 59">{{minute}}</option>
</select>
<label>Seconds</label>
<select v-model="second">
<option v-for="second in 59">{{second}}</option>
</select>
</div>
<div>
<label><input name="selectDay" type="radio" v-model="radioDay" value="*"> Every Day</label>
<label><input name="selectDay" type="radio" v-model="radioDay"> Custom</label>
<select name="selectDay" v-model="checkedDay" multiple>
<option value="MON"> Monday </option>
<option value="TUE"> Tuesday </option>
<option value="WED"> Wednesday </option>
<option value="THU"> Thursday </option>
<option value="FRI"> Friday </option>
<option value="SAT"> Saturday </option>
<option value="SUN"> Sunday </option>
</select>
</div>
>>
>>59750295
Part 2

[code[
<div>
<label><input name="selectMonth" type="radio" v-model="radioMonth" value="*"> Every Month</label>
<label><input name="selectMonth" type="radio" v-model="radioMonth"> Custom</label>
<select name="selectMonth" v-model="checkedMonth" multiple>
<option value="JAN"> January </option>
<option value="FEB"> February </option>
<option value="MAR"> March </option>
<option value="APR"> April </option>
<option value="MAY"> May </option>
<option value="JUN"> June </option>
<option value="JUL"> July </option>
<option value="AUG"> August </option>
<option value="SEP"> September </option>
<option value="OCT"> October </option>
<option value="NOV"> November </option>
<option value="DEC"> December </option>
</select>
</div>
</form>
</div>
<div class="text-center">
<button @click="sendCron" type="button" data-dismiss="modal" class="btn btn-primary btn-lg">Generate</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
>>
>>59750305
Fuck...

<div>
<label><input name="selectMonth" type="radio" v-model="radioMonth" value="*"> Every Month</label>
<label><input name="selectMonth" type="radio" v-model="radioMonth"> Custom</label>
<select name="selectMonth" v-model="checkedMonth" multiple>
<option value="JAN"> January </option>
<option value="FEB"> February </option>
<option value="MAR"> March </option>
<option value="APR"> April </option>
<option value="MAY"> May </option>
<option value="JUN"> June </option>
<option value="JUL"> July </option>
<option value="AUG"> August </option>
<option value="SEP"> September </option>
<option value="OCT"> October </option>
<option value="NOV"> November </option>
<option value="DEC"> December </option>
</select>
</div>
</form>
</div>
<div class="text-center">
<button @click="sendCron" type="button" data-dismiss="modal" class="btn btn-primary btn-lg">Generate</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
>>
>>59750305
Apply this style to your selects:

style="vertical-align: text-top;"

<select .. .. .. style="vertical-align: text-top;">
>>
>>59750388
Thanks, it worked.
But what about the two customs not being aligned vertically (because of the word month being longer than the word day), how can I fix that?

How can one become better at this?
>>
People who self taught

Did you find having a dedicated machine for learning helped you?

Thinking of buying a cheap laptop so I can take myself away from my PC and any potential distractions so I can get back into learning webdev
>>
Take a look at the css grid system, you can build your layout like a table
getbootstrap com/css/
>>
>>59750482
No. Actually funny thing, I wiped my PC just to install some linux distros in hopes I would not get distracted by games. That didn't work. Instead of gaming I was spending all this time fucking around, ricing, fixing basic problems, closing error alerts. What a mess.
So back to windows I went. Games are back on. But I'm more productive than ever now because I stopped taking people's bullshit advice of "learn the language first". It just doesn't work. What I do is I start learning the basics, you know get a feel for syntax and what to expect. Then I think of some small project, whatever, and work on building that thing. I learn along the way/through trial and error, and now I barely have any time to play games. Distractions can only distract you when you are bored, but when you're actually excited about a project distractions have zero effect. You can download a million programs and extensions/plugins to block any distractions, but you'll get around them because your mind is bored. Fix that and your problem is solved.

So no, you don't need a dedicated machine unless you're sharing your home PC with the rest of your family, in that case yes.
>>
>>59747285
Here's my method. Its also prepared just in case user modifies the url:

loadCheck: function () {
if (!this.$route.plant.category) {
console.log("no category. load all plants");
} else if (!this.$route.params.id) {
console.log("no id. just load category");
} else {
console.log("load category then find id");
}
}, // end loadcheck
>>
>>59750936
Is there a shorter version of that code?
I remember seeing something like:
params: "rerere" ? id : "rereerer"

Your code works. Just wondering if anybody could shorthand it?
>>
>>59750761
Mate this is wisdom, I can't believe I never thought about it like this.

I have a workspace on my PC that I like to use for development, now I just need to make sure I keep it interesting and I'll be good.

Thanks, man. Your words have helped me immensely.

[spoiler]Do still kinda wanna be that cunt sitting in a Starbucks with a MacBook, mind you[/spoiler]
>>
File: heh.png (50KB, 200x216px) Image search: [Google]
heh.png
50KB, 200x216px
>he's not an asynchronous programmer
>>
>>59747331
Did you even read my post? I've already figured that part out. What I'd like to do is set the width to be a certain percentage of its parent element, not the viewport
>>
>>59751494
Good luck, you'll make it bruv.
By all means though if you want to be that dude in a coffee shop with their mac, then go for it. Just understand you don't have to be that dude to be productive, but it's still a nice small thing to work towards.
>>
Dear /wdg/, recently i started to learn CSS and javascript. In the meantime i've got few ideas about sites with using databases and i was just wondering - should i take break from javascript and deep dive into PHP + MYSQL for example? I s there any popular alternatives to that combo? Database is not that complicated or big, just basic relationships.

;tldr - should i learn PHP + MYSQL or there are some better paths?
>>
>>59751660

why not all 3? in fact they go well together. My current project im working on im using js, php, sqlite.
>>
>>59751660
Well, now that you can use JavaScript in backend, you don't need to go with PHP. You can keep learning Javascript and use it with Node or whatever later.
>>
is Free Code Camp any good?
can you actually become a web dev by going through the course?
>>
>>59751689
>>59751699
Thanks for answer, I'll go with basic PHP to do some databases operation i think, just thought there can be better (or modern) option.
>>
>>59751528
>he's not a multithreaded programmer
>>
File: 1447886654848.jpg (341KB, 716x586px) Image search: [Google]
1447886654848.jpg
341KB, 716x586px
>>59751861
>he's not a parallel programmer
>>
Can anyone with a nginx instance give me a quick TLS performance sample?
I'm getting only ~40 requests/s compared to the 3k/s for plain HTTP, which seems awfully slow and a missconfiguration of some kind.
>>
>>59751699
PHP is not that old rusty elephant anymore. With PHP 7.1 you have a solid basis. It's just that the standard libary has a weird naming scheme sometimes.

If you want to do advanced things Laraval has you covered too. Go for it anon!
>>
>>59752264
I know, I'm not hating on PHP, I'm using it.
But I was just replying to his question: he's learning JS and now he can use it in backend, he does not HAVE to learn PHP or whatever.

+1 for Laravel for intermediate/advanced learning in PHP.
>>
SQL question, how would i update multiple records based on a common field they have? example would be order has 3 items, user hits save and order in orders table gets saved and the 3 items are saved in the items table based on the order id
>>
>>59723742
Learning node. Anyone got dank links?
>>
why is this not working

//index.php
<?php

if(isset($_POST['START_UPLOADING'])){
echo "yes";
}
else{
echo "no";
}
include_once("includes/Autoload.class.php");
include_once("includes/Form.php");


?>




<form action="/video2webm/?upload=1" method="POST" enctype="multipart/form-data"> 
<div class="form-group">
..
..
..
<input type="submit" class="btn name="START_UPLOADING" btn-primary" value="Upload and compress">


>>
What are your opinions on free hostings like Openshift or Wordpress for personal blogs/portfolios? At least as a temporary solution which is free?

I actually have one portal on Openshift and I didn't notice any problems with it, but not asking for me now. Don't know if I should recommend those free options to someone.
>>
>>59753372

youre not closing your quotes properly in your input element, look closely
>>
>>59753394
oh, i always fuck up the ' or "
lol
now i added name inside class kek
>>
>>59753178
UPDATE items SET x = @y WHERE order_id = @order_id
>>
>>59753439

i tried this but all the columns got entered with the same data. Each row has its unique data, they are matched with the same id
>>
>>59753493
multiple options.
give items a unique id or drop all of them from the same order and just reinsert with the new values.
>>
>>59753511

i gave each item their own id yeah, i still dont see how that helps, sorry. i dont want to insert based off the unique id, need to do the order num. Works fine if we are just talking about 1 row that needs to be inserted
>>
>>59753635
you have items with different values, but don't want to insert or update them based on their unique id but on their shared id instead.

you can't do that. maybe I don't understand your question.
post a sqslfiddle.
>>
hello guys, i'm trying to build up an app to interchange filters names betwen different companies' s filters. The thing is that i have no communication with the IT part of the companies, and i only can access to their plataform (that performs the whole operation of interchange given a filter name) in their websites. The problem is i know very little web programming/ Networking i and have no idea how to start this thing out. would appreciate any help you guys could give me (good java tutorials, etc). Thanks.
>>
>>59753945

ya im probably not explaining this right my bad

so i have a form that sends data to the server. some order data and data for each item

on save button, i save just the general order data in the orders table, then in the items table i want to save those items even if theres multiple items. Each item in the items table has a unique id, a column that matches the unique id in the orders table, and some other stuff unique to an item

on the "add item" button it inserts an item into the items table and gets assigned the correct order number that matches with that particular order. But now when they fill out the data for each item and hit save, how should all those items get saved?
>>
any good Laravel free courses online?
>>
>>59754991
when your items already have an id then you update them, otherwise it's a fresh insert.
>>
>>59755102

so insert each item when they add an item? then have the save button save all the data? i think id run into the same problem. I need to UPDATE based on the order number but how would i do that if theres multiple rows that have the same order number? I think i fucked up my tables
>>
>>59755183
>>59754991
>Each item in the items table has a unique id
you already have unique ids, update by those.
UPDATE items SET x = @y WHERE id = @id

and those which don't have an ID
INSERT INTO items (order_id, x) VALUES (@order_id, @y)
>>
>>59755243

right but how do i know what the correct id in the items table? obviously it has to change too. Thats fine. I cant bind a variable. But how do i get the correct id
>>
>>59755054
this.

Youtube has some ok ones. Some American and a polish(i think) guy, are the best that I've come across.

https://www.youtube.com/channel/UC6kwT7-jjZHHF1s7vCfg2CA

https://www.youtube.com/channel/UCSJbGtTlrDami-tDGPUV9-w
>>
File: app-inventor.jpg (21KB, 530x345px) Image search: [Google]
app-inventor.jpg
21KB, 530x345px
Anyone familiar with App Inventor 2 ?

I'm so close to finishing my app but I'm stuck on a few issues
Arggh it eats me from the inside that I can't finish this.
I know you'll probably laugh and recommend learning to code the old fashioned way.

I don't think I'll be creating more than this app...
>>
>>59755295
Not the guy giving SQL.

But, relational database. The clue is in the name.
>make a relationship
>use key to link tables

Having an order and an item table seems odd. Surely the order table would have items and details in it.
>>
>>59755446

they have to be seperate. ORder table is just general data about the person, item tables has all the items added for every order
>>
>>59755295
If you're updating items, you should be passing the item ID anyway. When you're populating a drop down or whatever, the value should be the id.
>>
So, what does web assembly being finalized mean for web dev? Is everything I learned now outdated?
>>
>>59755506
So order data is user data. Items is actually orders?
>your tables seem messed up

User.
>user details. registered or not
Order.
> has user, has items and item variable details like size
items
>shit that shouldn't be changed when ordering. Static as fuck. A pair of shoes is always the same. If the person orders 'black' shoes then it's stored in the order.

UsedID, OrderID, ItemID.
>all can auto increment and work together.
>>
>>59755570

im not using the item id anywhere tho why would i need to pass it
>>
>>59755654

i dont see the need for both user and order.

user info is in the order table and im not using any of the other data to match up with the items table. Like:

orders = order_id(PK): 1, name: bob, zip: 12345, etc
items = id(PK), item_num: 536, weight: 12, etc
>>
>>59755295
no , the items id does not change.
you do not change that.
when the user saves, you post back the item id, then you know which item got updated
>>
>>59755820

so after i insert i need to grab the unique item id it auto incremented? then post that back? same for 2nd and 3rd items, etc then use those unique id's to do the update?
>>
>>59755902
no.
at this point I'm considering you a troll, no one can be this stupid.
>>
>>59755918

lel

i r teh sux0rz :/
>>
>>59755806
Use a table for each collection of data.

Storing order details like weight in the item details is way too complicated unless that weight is static or a variable.

Shoes example. Each shoe is size 10, has two colours and a stock level of 100.

Userid 001 = user 001's address n' shit

Itemid 033 = nike shoes, stock level 100 red, stock level 100 black, (extra shit like links to pics and a product description etc...)

OrderID 001 = Userid 001, Itemid 033, colour choice.


When the order is placed. All you have to do is update the stock level in the itemID 033.Call OrderID 001 and all the details will be there.
>>
>>59755902
so your website has some information about an order with some form elements.
in there you have a list of items with more form elements.
each item has an id, if it's a new item, the id is 0.
the user now adds a few items, all with id 0 and then clicks save.

you receive the post data.
you check the order id, if it's 0 then you insert a new order and get the id it inserted.
if it's not then you check if the user has the rights to update it.
if he does, you update the order fields with a query based on the orders id.

then you loop through the posted items.
for each item, you check if the id is 0.
if it is, then you insert a new item using a query.
if it isn't then you update it based on the id it gave you with a query.

after everything is updated, you redirect the user to the details page, return the newly created data or just return 204.


though I personally would not give each item an id, but would use order_id and number as id instead. it reduces the amount of ids created and I wouldn't need to check if a user has rights to access it. but do whatever floats your boat.
>>
Hi,
I'm trying to make a custom css that makes browsing 4chan from mobile bearable.
How do I make it so that the quick reply dialog always stays on screen even if I scroll the thread?
>>
>>59757168
Hello, there is no way to make browsing from a phone bearable.

Use a desktop.
>>
>>59757204
I use a desktop 90% of the time, I just want to ease my on-the-go shitposting
>>
>>59757282
Buy a laptop, or try doing something productive on your lunch breaks.
>>
>>59757204
I give this guy 5 years
>>
File: h.png (11KB, 657x527px) Image search: [Google]
h.png
11KB, 657x527px
im retarded
>>
>>59757359
Five years of what?
>>
>>59757383
We've got FIIIIIIVR YEARS
>>
>>59757168
>>59757204
Did it on my own, thanks anyway!
>>
>finally get web dev job
>it's boring

What do?

I figure I should start corporate web apps on the weekends and try to get out of this grind. Any guides on freelancing?
>>
>>59753379
free openshift gears go idle
>>
Besides referrer headers how do I, the developer of website A, know if someone has ever visited website B so I can ban them?
>>
Justify the existence of these packages, /wdg/.

https://www.npmjs.com/package/is-zero
https://www.npmjs.com/package/is-negative-zero
>>
Watching Silicon Valley.

The incubator house is exactly what I've been looking for. Do they exist? Where can I find them?
>>
>>59723742
Why don't you guys put the /wdg/ in the Subject line of the OP?

Anyways, reposting this from different thread

>how do I change line height without changing the height of the <br>eak?

I've currently got it where I need a <br>eak to have the line completely underneath it, but I have to add a lot more <br>eaks than are necessary, but if I change the line height to 10px I don't need the <br>eaks, but then all my <br>eaks look like this...

Bla Bla Bla <br></br>

Bla Bla Bla

whereas I want this.

Bla Bla Bla<br></br>
BAL BLA BOA

Help, I'm stupid
>>
>>59761346
Make a codepen and explain better.
>>
>>59761776
>codepen
How do I do that?
>>
So I completed my site using XAMPP. All the functionality works, it is very secured as far as I know, ect.

I've been trying to understand how to launch my website and I'm very confused. Is there a good guide out there for the next step?

I imagine I need to buy a domain. If I'm planning to turn my website into a large business, do I also need to buy a trademark? I basically want to have a "copyright mycompanyname all rights reserved" at the bottom of my page legally.

Also, how to host my website? I would like to work with a database and structure than is as easy as XAMPP and myphpadmin.

Thirdly, can anyone provide me with some links to help me estimate how much it would cost me to operate my website? I'm hearing so many different ranges of price.
>>
>>59761308
They do exist
Palo Alto
>>
>>59761897
Codepen.io -> create button in upper right -> new pen
It's like jsFiddle. Copy-paste in your HTML/CSS.
>>
<ul class="nav navbar-nav">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" name="search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</ul>


So this search only works on my index.php page. The URL becomes index.php?search=foo if I enter foo into the text field and hit submit.

But let's say I'm on an article with a URL like this:

website.com/article/how-to

The same search bar is on this page, but if I search foo, it instead only searches the how-to article, as in:

website.com/article/how-to?search=foo

I want it to instead search index.php again like

website.com/index.php?search=foo

Please help.
>>
>>59763691
form tag action attribute
>>
>>59763769
Thanks babe, it worked. If I were a girl, I'd suck your dick.
>>
Is it bad to EDIT wordpress on a digital ocean - as opposed to running it locally?
>>
>>59760995
There is no other way unless you run your own botnet that sneaks in every other site via ads.
>>
/wdg/ babbies edition lmao:


>>59748635
>>
>>59764375
Editing on a live site is a bad practice, but with Wordpress and it's live updates it can make your life a lot easier.

Just make sure to make backups before and after you make an edit.
>>
yo guys , cant figure out what's interfering my JS script at the end (the var $bank_account, on it's own without the rest of the previous script it works fine
but when i add it to the rest of the original learning/testing script it doesn't wanna work). Seems weird since nothing else in the HTML is id= demo.
https://jsfiddle.net/3atuuz2w/

The previous script is from a video from codeacademy btw, still trying to fully understand it on how it works
>>
Is freelancing a meme?
>>
>>59765646
hell no, but dont expect clients to be of trust
>>
File: samuel hydel.png (383KB, 512x336px) Image search: [Google]
samuel hydel.png
383KB, 512x336px
Someone explain this like I'm a moron.
I don't grok deployment -- how it works.

I got a LAMP stack running on my PC. It has wordpress -- where I'm working from.

I bought a domain.
I bought a digital ocean droplet.

When my site is complete - HOW do I transfer it from my localhost to the server I'm paying for?


Do I use FILEZILLA and transfer the html, js stuff from somewhere in my lampstack folder to the server?

Is that it?

Someone explain this like I'm a moron.
>>
>>59764919
got help on /wdg/ discord with the problem so its all good now
such a stupid mistake tho
>>
>>59766025
Troops are deployed. Software is installed.
>>
>>59766025
After installing your system, transfer your files manually using any FTP client (Filezilla, etc) and transfer your database with MySQL dump or from phpmyadmin.

If your site is complex and will change over time, you might want to use git instead.
>>
>>59766025
>samuel hydel
where tf did you find that image
what >>59766117 said. Just put everything onto your server and it will run like magic
>>
File: wTN1lWJ.jpg (325KB, 1000x1029px) Image search: [Google]
wTN1lWJ.jpg
325KB, 1000x1029px
How do you deal with botnet spergs. If I create a website where users can upload content I need to log IPs just to make sure pedos are banned. If I don't the feds fuck me in the ass.

Why are spergs so retarded? Do they even know how networks operate? If they're so scared of devices logging a publicly available information they should go back in their cave and stay on localhost. Fucking spergs man.
>>
>>59766698
Everything a user does should be IP logged. How are you going to ban otherwise? Just by account name?
>>
>>59766711
Exactly it also starts on login level. Brute forces won't have fun with a failban system + recaptcha.
>>
>>59753422

just get used to escape them within quotes
>>
>>59762391
Well you probably don't want to host from home so you need a hosting service. OP has a list of them.
Since you're doing basic php stuff anyways you might not even need a vps and could buy shared hosting, so hosting provider will manage mysql, php versions and various os stuff for you while you get access to db and file hosting.
Other option is get a vps and manage everything yourself, including firewall rules etc
Buy domain from whatever registrar and follow instructions from your hosting provider on how to use domain with your site. Some host providers even sell you domains.
Operating costs depend on traffic and site. Since your site doesn't seem like it'd need TB of storage, to do machine learning or whatever, cost really depends on traffic. You should be able to pick one of the lower tier offers from hosting provider (should be around 2-5€/month + domain name fee) and then upgrade your plan as you need it wihout having to reinstall everything.
You could get into details and ddos yourself to find out bottlenecks in your application and know how many requests you can handle before having to upgrde something, then programatically use host provider api to launch new db or site instances and whatnot

no idea on the trademark part, you should find a lawfag and ask him
>>
How do I start to actually CONTRIBUTE to projects.


My goal is getting a job as web dev.

And I use most my time making small apps and webpages -- but it's always just me.

I want to get into working on projects w/ people.

Any advice?
>>
>>59766025
>Sam "the third columbine kid they don't talk about who lived" Hyde is technology
>the technology of getting away with it
>>
>>59766815
check out mozilla stuff
memes aside, they have lots of projects and internal tools you can contribute too and they tag some of their issues as "easy first bug" for people wanting to get into contributing

otherwise just try to improve whatever small free project you are using (tt-rss, caldav server, self hosted trello clone ...) either by bugfixing, adding features or writing plugins if applicable
>>
>>59766815
Just find an open-source project you like and often use, and slowly learn the code.

It takes some time with big and complex applications. You'll probably start with small fixes like typos, vulnerabilities, etc. But if you keep doing it, it will really give you experience for real life projects.
>>
>>59765646
freelancing for me is a fun way to get paid while learning but i dont make a fortune at it and the only way i get work is through personal relationships. i had to sell myself, kind of like a job interview but in less than 10 seconds you look them in the eye and say you can do what they need like its easy.

$50/hr, $60/hr for SEO
>>
>>59766872
pls give pointers on how to seo
i thought it was a meme and you just needed to make valid html, a sitemap and link your own site on reddit to get ok positionning but it seems more complicated since you get paid 60$/h for it
>>
>>59766815
>>59766025
Seek mental help

>>59765646
Everything is a meme. Use your big boy words now.
>>
>>59766911
You seem to grasp the basics. SEO is basically inbound marketing. if youre being sincere which you sound kinda sarcastic the difficulty lies in fulfilling more than just the few simple aspects (see periodic table of SEO for the many facets). The $60/hr is actually extremely cheap considering you are potentially penetrating the top results on valuable keywords in your client's given industry. An industry where the competition has a 30-60K per month marketing budget.
>>
>>59767345
i thought it was only about technical concrete stuff to do to maximize google search ranking for a set of keywords, looking at the periodic table of seo and your explanation i understand it covers a broader scope and is more about marketing and editing content to get more traffic
thanks senpai
>>
Also interested in SEO. Would like to get into this -- seems fascinating.

At any rate, how exactly do you start doing this?
>>
I really need to get gud with regexps fuck
>>
/wdg/
what is the fist stack I should learn?
mean?

I really only know HTML/CSS and a little javascript.
>>
File: 1416390841479.jpg (56KB, 800x400px) Image search: [Google]
1416390841479.jpg
56KB, 800x400px
>>59724753
man i dont understand that much but check for flag
>>
>>59767518
It's never just about concrete stuff because a lot of what Google preaches isn't what actually happens. Simultaneously, you can't pull off obvious tricks because Google over the years has gotten pretty good at detecting them.

>>59767603
Start by actually proving yourself. If you can't even get your own site/project to the first page, you have zero grounds to convince others you can work on their shit.

>>59767732
>a little javascript
Get better at that first. MEAN would benefit tremendously from you getting proficient in JS. Otherwise it just comes down to which tech you prefer working with. Like if you hate JS then a MEAN stack would be agonizing.
>>
File: 1431695275730.jpg (116KB, 639x697px) Image search: [Google]
1431695275730.jpg
116KB, 639x697px
>>59726308
dont do this never mongo sucks dick very big project i knew dumped to garbage because of mongo and rewritten from scratch. there were some politics included but mongo was one of the big reasons for that
>>
Why do "real" programmers hate javascript so much?

Can anyone recommend a project for me to do in Haskell that is related to web dev?
>>
>>59748540
use git and a post-receive hook on your server that does your build and runs your tests
>>
>>59768070
Probably because it's not strongly typed and it's flexible to a fault
>>
>>59768192
this
weakly typed things make my tummy hurt
really need to dive into typescript andor elm soon
>>
>>59724753

Way to complicated.

You're underestimating Ruby, it can easily deal with numbers in scientific notation.

So screw that costly and complicated RegEx and try to cast it:

a = "1 3; 7 3.14e-12; 3.34634E+4 22 "
a = a.split(';').map {|x| x.split}

begin
a.each do |x|
x[0],x[1] = Float(x[0]),Float(x[1])
end
rescue Exception => e
puts "Oh noes!! Malformed Data..!!1!!"

raise $!, "Throwing an Error because '#{e}'. \n" +
"Stacktrace is: \n #{$!}",
$!.backtrace
ensure
puts "This message appears always. Have a nice day sir."
end
>>
>>59723742

New thread:
>>59769967
>>59769967
>>59769967
>>
>>59767732
>>59767898

Thanks for your input anon
Thread posts: 320
Thread images: 27


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