[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ - Web Development General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 26
File: wdg.png (868 KB, 822x552) Image search: [Google]
wdg.png
868 KB, 822x552
OLD THREAD >>53827538

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>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/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

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

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks

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

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

> How to get started
http://www.youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

>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

>Challenge
http://pastebin.com/xshVcWjb
>>
First for any stack besides LEMP is a joke.
>>
>>53867284
>P
>php
>M
>mysql
>not a joke
>>
Friendly reminder PHP is shit.
>>
Friendly reminder there is an angry Javascript dev ITT that can't get a job because they all use PHP.
>>
>>53867269
>Crockford on Javascript
What's it about?
Is it like a series of lectures on Javascript?
>>
>>53867505
If such a developer exists, his biggest problem is that he is a bad developer. That's why he can't a job.
>>
Friendly reminder JS and PHP are the only two web programming languages.
>>
Job searching while not in the city/state kinda sucks.

Do you guys ever go to meetups?
>>
>>53867545
>>53867505
More like friendly b8s
>>
>>53867585
Yes. I go to all kind of meetups and conferences bro.
>>
guys I'm applying for job that makes $75 an hr. I hope it get it.
>>
Is there anyway to use jinja2 within a javascript file.

I've currently got it inside my html file so it obviously works there, but that's messy and I'd like to stick the javascript in its own file.

I realise this is most likely impossible.
>>
>>53867647
Good luck.

As a freelancer from a poo in loo country, I'm currently asking for $50 an hr.

Am I being ripped off?
>>
>>53867695
No I'm white and making $45 an hour. I'm being ripped off.
>>
>>53867650
>I realise this is most likely impossible.
https://mozilla.github.io/nunjucks/

Same syntax, 100% javascript.
>>
How come no one ever talks about Drupal or Joomla? They seem popular for dev jobs.
>>
>>53867505
>like Javascript
>reminds me of when I used to make Flash games, because Actionscript is kinda based on a proposal set for ECMAscript that never ended up being made a standard.
>decided to specialize in Node.js.
>nothing but PHP jobs within 1 hour of where I live
>recruiter found my resume on a job site and got me a Node.js job anyway.
>ended up getting paid more than any of the entry-level PHP listings were advertising for.

Friendly reminder that you should do what you like and find interesting, and someone will probably pay you to do it because you're enthusiastic and interested in it.

If you learn a language just because there are job listings and not because you actually like it, then you're literally Pajeet-tier.

I'm literally getting paid to do what I would have been doing as a hobby anyway.
>>
>>53867759
Yeah, but people with a few years of experience don't really want to work with CMSs, they like to build more complex apps using frameworks.
>>
>>53867759
Cause PHP is for niggers.
>>
>>53867759
Because, as hard as it is to believe, they're even worse than Wordpress.
>>
>>53867715
I'm using Flask though so passing a variable through a render_template. Nunjucks won't really work.
>>
>>53867531
Yes... The clue is in the title.

But yeah it's pretty good if you want to understand Javascript better and have it explained more from a computer science perspective rather than a "babby's first web page" step-by-step tutorial.
>>
Hey guys, I'm new to web dev. My favorite programming language right now is HTML, but I was thinking of learning PhP? What do you guys think?
>>
>>53867833
GUI interfaces for IP tracking are all the rage right now, you should try Visual Basic
>>
File: 1455855418812.jpg (8 KB, 190x200) Image search: [Google]
1455855418812.jpg
8 KB, 190x200
>>53867833
>My favorite programming language right now is HTML
>>
>>53867833
assembly is so hot right now
>>
>>53867759
im not a web dev but like to dabble around with it and just learning at my own pace, anyhow.. i look on job ads in my area (western sweden) and it seems like drupal and joomla are quite popular indeed
>>
>>53868093
Probably there are more job listings because of the high turnover rate of devs leaving after a few months when they decide that life is too short to have to spend it working with Drupal and Joomla
>>
>autist me want to make web
What's the way to go these days?
Never bothered learning php.. So node.js is the best meme for [current.year] right?
Html5.. Css.. Node.js something else i should consider, db? Sql?
Guide me senpai
>>
File: zFkOMxF.png (1 MB, 1622x935) Image search: [Google]
zFkOMxF.png
1 MB, 1622x935
Friendly reminder if you aren't using Go, or at the very least Scala you aren't a real web dev.

>https://jacobmartins.com/2016/04/04/practical-golang-event-multicastsubscription-service/
>>
Do you test your sites? As in write tests using something like selenium? And if so, how detailed do you tests?
>>
>>53868225
>using an obscure language while still having to use javascript on the client side
lmao. JS is everywhere and will soon because the one language to rule everything. with react native even native mobile is conquered. there is nothing left. V8's performance is already far superior to shit like python, won't be surprised if it gets faster than java in the coming years. not to mention the amazing ecosystem.
enjoy your aspie language, make sure to write about it on HN faggot
>>
>>53868194
Why don't you fucking look at all the shit in the OP that is there specifically to answer shit questions like this? You fucking double nigger.
>>
>>53868225
>not using an assertion library like gocheck
>>
File: 1382725754522.png (251 KB, 350x367) Image search: [Google]
1382725754522.png
251 KB, 350x367
>>53868225
Are Go developers actively trying to steal the annoying zealot faggot fanboy crown from Python developers?
>>
>>53868388
Go dev here. No, >>53868225 is just a faggot.
>>
>>53868319
>left-pad
>>53868383
I never really understood the point of assertion helpers in any language, the way I do it use use a recover() middleware in the HTTP router of choice so errors cause crashes in tests but don't take out deployed servers unless it's something critical like connecting to the database for the first time.
>>53868388
>>53868425
wew lads
>>
Should I be using Docker?
>>
>>53868351
Cause you wouldn't get triggered that way.
Also too much things to read, any link you recommend?
Checked the list, nothing seems to ask my question, I want to learn, but not gonna learn php node.js and then decide, so what I'm asking is what is a better overall pick for a doublenigger like this one.
Just want to know what is the starter pack(html5-css-node.js-sql????)
>>
>>53868388
That crown belongs to Node devs.
>>
>>53868225
sorry m8 i use elixir
>>
>>53868971
>Ruby syntax
defmodule ModuleName do
def hello do
IO.puts "Hello World"
end
end
>>
>>53867759
What about wix?
>>
I have an interview tomorrow and they wanna see css/js examples

All I've done is responsive templates with html/Css. What can I show them that will knock their socks off? Particularly JS stuff
>>
Is it just me, or is codeacademy pretty good? I feel like I'm learning something. I actually know what jQuery is and how to use it now.
>>
>>53869221
It's good for someone who has never programmed before to get a basic familiarity with the grammar and syntax of a language, but don't let it Dunning-Kruger you into thinking you're an expert just because you finished babby's first jQuery course.
>>
>>53869200
Make a web app that sorts and displays incriminating evidence about them being unfaithful to their significant others. Shouldn't have a problem after that.
>>
File: sorry.png (23 KB, 1197x927) Image search: [Google]
sorry.png
23 KB, 1197x927
/g/, I am being super retarded but I can't figure this shit out.

As you hopefully can decipher through this picture, I have a navbar with a dropdown menu, that is being called from somewhere else, aka, the dropdown is not a child of the parent button.

This makes it so that the dropdown doesn't stay below the button when I resize the window. Is there any possible way for me to fix this? Knowing I have to deal with this dropdown child:parent problem because of the project.
>>
>>53869993
If there is only one stylesheet (so you dont see a sudden jump in position when slowly resizing), then you probably assumed it's position is relative to something it's not. And you have to find out what the reference point is for the browser to place that div there. It might be in a fixed location or relative to the big nav bar. Or perhaps it's a bit off the center.
>>
>>53869993
are you setting the position with js? don't do that, make the drop down a child of the <li> with the overflow set to visible and the child drop down position as absolute/relative, it should then flow with the rest of the layout.
>>
>>53870106
To add. You might want to consider putting the button and dropdown menu in the same div if they arent already.
>>
>>53870106
Thanks, I see that it is relative to an element that is hidden until a certain resolution, which then becomes the mobile navbar. It's pretty terrible but I've been told to not change it.

Do you think there is a way to force this dropdown to be relative to this specific button, if that makes any sense?

>>53870128
Thanks, I am not setting with js, just css! And very nice idea but I tried and the dropdown menu now follows the button perfectly, but won't appear normally where it is usually called. (which is usually when clicking a similar button in the mobile navbar)
>>
File: PHP7-ELEPHANT.png (75 KB, 3042x1619) Image search: [Google]
PHP7-ELEPHANT.png
75 KB, 3042x1619
>>53867418
Why are you saying stupid things like this?
Modern frameworks like Lumen or Phalcon destroy any bloated java or python shits.
>>
>>53870368
>java or python
>>
>>53868388
You mean js developers?

Django users shut the fuck and enjoy their steamboat-tier framework. The Flask users are the annoying ones, but nothing is worse than a js developer.
>>
Before I started coming here I only knew basic PHP and 90's HTML and CSS and deved in Windows.

I am now completely comfortable in Linux setting up LAMP/LEMP stacks, bootstrap and modern HTML/CSS, js and I'm making my first app in Cordova.

It's pretty cool to level up.
>>
>>53870719
>LAMP/LEMP
>>
>>53869052
And?
>>
>>53870825
Nothing. Syntax is a matter of preference, apart from foo...end being excessively Bash levels of verbose. I find it a pain to look at.
>>
>>53870754
Shut up, faggot. Every job here is lamp and it pays more at entry level than the average entire family makes.
>>
In my final year at college.

Tomorrow is mock/exit interview day, going in as a web developer.

Wish me luck senpai, I'm gonna need it.
>>
>boss wants me to add a web page for comparing two items from our database to the user and highlight different parts of the tables green for greater than , yellow for equal to and red for less than the compared item

I already know how to do this but would this be more efficient to do this on the server side when I pull the two items from the SQL database?

or should I do the comparisons on the client side?
>>
Opera dev has these neat lines that help you line up stuff but they only to up and to the left, is there any way to get them to also go to the right and downward?
>>
File: webPageDiv.png (637 KB, 1865x619) Image search: [Google]
webPageDiv.png
637 KB, 1865x619
Why isn't my 'titles' div going to the top of the page? Here's what I mean (in the pic) and here's my CSS. It works fine in Chrome, but not in Firefox (the browser in which this is being marked).

(CSS part 1)
/*    
=== FONT IMPORTATION ===
Fonts used:
- Playfair Display (Titles)
- Raleway (General)
*/
@import "https://fonts.googleapis.com/css?family=Playfair+Display";
@import "https://fonts.googleapis.com/css?family=Raleway";

/* === BODY === */

html,body {
background-color: #000000;

font-family: 'Raleway',sans-serif;
background-image: url(./images/bg.jpg);
font-weight: 400;
color: #f0f0f0;
margin: 0;
padding: 0;
}


/*
=== CENTER DIV ===
Used to centre content on page.
*/
div.center {
text-align: center;
margin-top: 20px;
margin-left: 20%;
margin-right: 20%;
padding: 10px;
border-style: solid;
border-color: #333;
background-color: rgba(0,0,0,0.35);
}

/*
=== INLINE DIV ===
Used to align to the left, while in the centre div.
*/
div.inline {
display: inline-block;
text-align: left;
margin: 5px;
}

/*
=== TITLES DIV ===
Used to create slight blue colouration at the top of the page, and to contain the two titles.
*/
div.titles {
background-color: rgba(85,144,255,0.085);
margin-top: 0px;
}


/*
=== LINKBAR DIV ===
Contains the links to other pages.
*/
div.linkbar {
font-size: 24px;
text-align: left;
}

/*DELETE????*/
div.general {
font-size: 16px;
}

/*
=== STAFF DIV ===
Used to place staff images in.
*/
div.staff {
color: #333;
font-weight: 600;
background-color: #FFF;
border-style: solid;
border-color: #333;
float: left;
}

/*
=== STAFF LIST ===
The white linkbar at the top of the page.
*/
ul.whitebackground {
background-color: #FFF;
margin: 0;
padding: 14px 16px;
border-color: #333;
border-style: solid;
}
>>
>>53872617
(CSS Part 2)

/*
=== STAFF LIST ITEM ===
The items (links) in the linkbar.
*/
li.inline {
display: inline;
}

/*
=== LINKBAR LINKS 1.0 ===
The links to other pages.
*/
li a {
text-decoration: none;
padding: 14px 16px;
color: #333;
font-weight: 700;
}

/*
=== LINKBAR LINKS 1.1 ===
Changes the linkbar background when a link is hovered over.
*/
li a:hover {
background-color: #5590ff;
color: #000;
}

/*
=== LIST ITEM (SQUARE BULLET) ===
A list item with a square bullet.
*/
li.square {
list-style-type: square;
}

/*
=== FORM BUTTON 1.0 ===
The submit and reset buttons on the Student Feedback form.
*/
input.formbutton {
background-color: #FFF;
margin: 0;
padding: 14px 16px;
border-color: #333;
border-style: solid;
}

/*
=== FORM BUTTON 1.1 ===
Changes the form buttons when hovered over.
*/
input.formbutton:hover {
background-color: #5590ff;
color: #000;
}

/*
=== TITLE ===
Page title (KIT411).
*/
h1.title {
font-size: 72px;
font-family: 'Playfair Display',serif;
font-weight: 400;

margin-left: 35px;
}
>>
>>53872636
(CSS Part 3)

/*
=== TITLE ===
Page subtitle (name of current page).
*/
h2.subtitle {
font-size: 32px;
font-family: 'Playfair Display',serif;
font-weight: 400;
margin-bottom: 0;
margin-left: 35px;
}

/*
=== STAFF INFORMATION ===
Used to contain the information about staff members,
which allows JQuery to show/hide it.
*/
p.staffinfo {
width: 340px;
padding: 10px;
font-size: 16px;
font-weight: 400;
text-align: justify;
display: none;
}

/*
=== ACTIVITY IMAGE ===
Page title (KIT411)
*/
img.activityimg {
max-width: 500px;
max-height: 500px;
}

img.staffimage {
max-height: 360px;
}
>>
I lost my SSH key to DigitalOcean and all of my backup files.


Am I fucked or can I just make a new key?
>>
>>53872655
Well, I figured it out. If I added:
&zwnj;


Before my h1 title, the background extended to where it was supposed to.
>>
>>53872617
>>53872636
>>53872655
What is Pastebin, Codepen, JSFiddle, etc.?
>>
>>53872816
>what is google?
>>
>>53872895
What is life?
>>
What is love?
>>
>>53872998
baby dont hurt me?
>>
nodejs is kinda fucking with me, do functions return their values like every other language? What if I have something like

var shit = '';

function shitty() {
shit = 'very shitty';
}

console.log(shit)


This should work right?
>>
>>53873507
Yes, that will work. Depending on what you're actually trying to do, it might be better to explicitly return a value from your function and set the var to that.
>>
>>53872816
Fuck everything else, he better use JSFiddle so we don't have to run it locally. I'm even too lazy to go get water fuck you mean I'm gonna download this shit and runt it nah m8 jammy nutsack
>>
JavaScript interview tomorrow. What's something I can show to wow them? All I've done is slideshows and basic Dom manipulation. My past job was making e commerce sites
>>
how can i make it so search is to the right of "web technologies" and not to the upper right?

    <div class ="row-fluid">
<div class = "span6">
<h1>Web Technologies</h1>
</div>
<div class = "span6">
<input type="text" class="form-control" placeholder="Search">
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="container-fluid">
<div class="row-fluid">
<div class="dropdown">
<select style="width:50%" class="image-selection input-medium" id="siteDropDown">
...
</select>
</div>
</div>
<button id="searchSite" type="button" style="background-color:#2c3e50;color:#ffffff" class="btn btn-default">Search</button>
</div>
</div>
</div>
>>
Why the fuck hasn't Firefox adopted WebP yet?
>>
any decent place to look up html5?
basically i wanna learn more about what i can do with it.
all i really know is the video element and a bit of the canvas.
also the picture tag which is kinda neat.
dont know much else about html5 stuff.
>>
>>53874294
not yet widely used.
at the least when safari picks it up itll be in firefox.
for now its chrome/ium and opera and i think their mobile variants
>>
File: 5C4.jpg (220 KB, 500x500) Image search: [Google]
5C4.jpg
220 KB, 500x500
fellas what are the most required languages to apply for a programming job?
>>
>>53874518
You need expertise in at least C/C++, Java, some scripting language(Python, Ruby, etc) and a functional language (Haskell, Scala, Lisp) to get even a entry level job. Consider yourself lucky if you get the job after a period of unpaid internship (usually a year), there are Indians out there PAYING to be in an internship and will continue working for $2/hr.
>>
>>53874580
literally browsing this thread right now from my comfy paid internship lmao
>>
>>53874580
so basically all knowing languages to learn $2/h

what other careear well paid you recommend me?
>>
>>53873507
Global variables are antipattern, dont do it.
>>
>>53873867
by putting it in the same row.
>>
>>53874580
this is /wdg/
>>
How many times have you said "fuck it let's use a table".
>>
>>53875005
I do that whenever I want to display tabular data.

If you do it for layouts then consider drinking bleach
>>
>>53874518
Theres a video in the OP about this which is more informed than the memelords in this thread
>>
>>53873507
You're only declaring the function, not executing it.

Also you are changing the shit variable directly from inside the function, not returning a value from the function.
>>
>>53867585
How do I find meetups?
>>
>>53876381
Join Fetlife
>>
File: 1459180590764.jpg (53 KB, 800x800) Image search: [Google]
1459180590764.jpg
53 KB, 800x800
>>53867269
What's the best way to transfer and remember checkbox settings from one page to another?

So far I'm doing it with $_GET and variables in the URL, but there must be a better way!?
>>
>>53874518
assembly
>>
>>53867771
underrated
>>
>>53877762
POST
>>
>>53877925
yeah, but how can I make the form remember the settings?
>>
Is elixir the future of backend dev?
>>
File: Why.png (28 KB, 942x523) Image search: [Google]
Why.png
28 KB, 942x523
Can anyone help me solve this HTML/CSS retarded issue?
>>
>>53878099
cookies or store the value into a db tied to the user. or if it just for that session use $_SESSION
>>
Do I only need REST api on the backend if im going to use react on the frontend
>>
>>53878099
You put the value back into form if it's multipage form. Or put it into some storage like database or session if it's something global. Would be much easier to help if would know the context.
>>
>>53878321
What's the problem you're having? If it's the margin or padding, then set a margin or padding.
>>
>>53878369
>>53878655

ok, thanks. I will try $_SESSION.
>>
>>53878268
Maybe, but at the moment Go has a greater standing.
>>
>>53878736
The top one uses a different style to prevent is from displaying as bullet points, so I just deleted that and never bothered with it.

I managed to get it looking a bit better by

        <li class="horizontal">
<p class="horizontal">Filename</p>
<p class="horizontal">Modified</p>
<p class="horizontal">File Size</p>
<a id="@item" href="#" onclick="downloadFile('@item')">Download</a>
>>
File: evil.gif (389 KB, 500x362) Image search: [Google]
evil.gif
389 KB, 500x362
cursor: wait;

I'm tempted.
>>
>>53878763
What is go being used for in this context? Small backend services/CLI tools mostly? I'm interested in how people and companies have integrated it into their stack.
>>
>>53878854
On specific cases your googlefu is as good as mine, but from what I have read small microservices and CLI tools are definitely around. But as Google's pet server language, it shines most on big concurrent performant and maybe distributed servers, with large developerbases. This particularly is where fast compilation matters.
>>
Is there a way to customize the style of an iframe where I put a youtube video? At least I want to remove the title and controls, but parameters like "showinfo" and "showcontrol" doesn't work.

I don't use an api, I just put an embed link from the video in the iframe.
>>
>>53879096
Then use the API.
>>
>>53879279
No, it's for a news portal and I just want to upload a single link for the featured video on a front page.
>>
Sup
I need to interact with Html through C#.
For instance from:
 

<html>
<head><title>News</title></head>
<body>
//a bunch of tags I don't need//
<div class="article">
<b>Article </b>
Article text,
Article text,
Article text.
</div>
//a bunch of tags I don't need//
</body>
</html>

To get two strings, one with the Title(the <b> tag) and one with the text (the rest of the <div class="article">).

Question is, should I use Html agility pack, the .net webBrowser thingy, or approach it in a completely different way?
Thanks in advance
>>
Does anyone know of open source repos that show server management with Ansible? I don't need a tutorial on writing playbooks, I'm trying to figure out how to organise several of them etc. and I'd like to see how others do it.
>>
What is the difference in using ID or CLASS? Don't they literally do the same thing? Can I get an example showing the difference? Codecademy just made me use them both in the same way and I got the same results with 0 difference.

How do?
>>
>>53880106
id is unique class is for multiple objects
>>
>>53880148
Why use ID at all?
>>
>>53880106
You can apply a single class to many different tags but you can't do that by ID since each tag has a unique ID. So if you want
>multiple things to have the same style, use class
>you're making something which you're gonna use only once, use ID
>>
>>53880162
maybe you have manu with buttons of same class and put id to one of them to make it different color.
you can basically also leave space in the class like this class="class1 test1" so both class1 and test1 are binded to it
>>
>try to switch from Brackets
>VS Code has no auto-close element
>Sublime Text has no auto-indentation


Why is this so hard?
>>
>>53880209
Okay well here is my second retard question. Why does :first-child exist when :nth-child exists? Is there ever an instance when first-child would be the only answer over nth-child?

Does HTML have redundant stuff for fun?
>>
>>53880523
Get a mechanical keyboard. You'll want to do those things manually once you get addicted to hearing clickity clack.
>>
>>53880524

That's CSS and first-child is supported because it was CSS2, nth-child came with CSS3.
>>
>>53880523
Atom has both.
>>
I'm learning node.js at the moment

>inb4 web peasant

I've only ever done front-end work (AJAX and API interactions, etc). This is my first foray into back-end programming. What I don't get is this whole "server" stuff. "You can make a server in node, and it will serve up responses to user requests"! What is special about this? I've used FTP to throw html pages onto servers, and I've obviously never had to program any of that for it to work.

So, what is it that backend languages do, exactly? I know they interact with databases, but I have no idea what value that really holds. The idea of them serving up html in response to user requests doesn't strike me as particularly interesting either, considering when you buy a server that stuff is all pre-installed.
>>
>>53868225
>not doing all your web dev form scratch in Tcl/Tk
>[expr 0x7E0]
proc main argv {
set port 8080
set ::buffer ""
::safe::interpCreate slave
socket -server accept $port
puts "waiting on $port"
vwait forever
}
proc accept {socket adr port} {
fileevent $socket readable [list go $socket]
}
proc go sock {
global buffer
set now [clock format [clock sec] -format %H:%M:%S]
set query ""
while 1 {
gets $sock line
lappend query $line
if {$line eq ""} break
}
set cmd ""
regexp {GET /eval\?command=(.+) HTTP} [lindex $query 0] -> cmd
set cmd [unescape [string map {+ " "} $cmd]]
catch {interp eval slave $cmd} res
lappend ::buffer "$now % $cmd" $res
puts $sock "HTTP/1.0 200 OK"
puts $sock "Content-Type: text/html\n"
puts $sock "<html><head><h1>TclServe</h1>"
foreach line $::buffer {
puts $sock <br>$line
}
puts $sock "<hr/><form id='cpost' action='/eval' method='get'>
<input id='cmsg' name='command' size='80' value='' />
<input type='submit' value='Go' /></form>"
close $sock
}
proc unescape str {
regsub -all {%(..)} [string map {+ " "} $str] {\u00\1} str
subst $str
}
main $argv
>>
>>53881696
Learn about the MVC architecture
Backend serves great amount of data using little amount of code. It also makes your code way easier to manipulate.
>>
>>53881696
>So, what is it that backend languages do, exactly? I know they interact with databases, but I have no idea what value that really holds.

You know how you can see this post that I wrote, calling you a moron in response to a post that you wrote where you said you couldnt see the value of databases?

Well that, and all other functionality beyond a simple "Hello World" HTML page is thanks to server-side processing and databases.
>>
>>53879361
How about regex or even simple string processing?
>>
>>53880106
In addition to previous answers there are some other html specific uses for id while classes are basically only for styling.
>>
>>53881696

>The idea of them serving up html in response to user requests doesn't strike me as particularly interesting either, considering when you buy a server that stuff is all pre-installed.

6/10, made me chuckle out loud.
>>
>>53882068
I understood that regex is almost useless with Html(correct me if I'm wrong).
My plan was to get elements so I could display them in lists and get a whole bunch of interesting statistics, as the elements will include child elements with extra data(for example a "messege" class with a "user" and "postNumber" classes inside).
Right now I'm thinking getting the html as a string and using LINQ because I'm having some permission denied errors when trying to access some elements.
>>
I need a modern looking image gallery for an artists portfolio.

Suggestions?
>>
Can I get your opinion on a site?

http://www.iraqinationality.gov.iq/eForm/Default.aspx

What do you think of it?
>>
>>53882526
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider) at IraqEform.eFormApplication.ValidateApplicant(String previousErrorMessage) in E:\Working Projects\IraqEform\IraqEform\eFormApplication.aspx.cs:line 1913 at IraqEform.eFormApplication.ValidateFormData() in E:\Working Projects\IraqEform\IraqEform\eFormApplication.aspx.cs:line 1552 at IraqEform.eFormApplication.Print_Click(Object sender, EventArgs e) in E:\Working Projects\IraqEform\IraqEform\eFormApplication.aspx.cs:line 1409


well done
>>
>>53882298
Regex is fine for html. It's probably how all HTML parsers work. Regex back references are good for recognising tags. But I wouldn't reinvent the wheel, go with whatever html parser is already available for c#

Alternatively if you're building a web scraper, check that the site you're scraping doesn't have an API that you can consume. If it doesn't then consider using Selenium's C# bindings to emulate a headless browser to build an easily-traversed DOM tree, it will also allow you scrape sites that use JavaScript frameworks and AJAX to render their content.
>>
>>53882571
That bad?
>>
>>53882512
>Suggestions?
Pay me to make a portfolio site for you
>artist
Oh right you don't have any money.
>>
>>53882649
it's severely outdated technically and visually.
>>
>>53882668
Actually I'm being paid $1800 to do it :^))))))))
>>
>>53882619
>Selenium's C# bindings
Thanks, I'll check it out.
Also, is AngleSharp recommended? the alt is CsQuery or Html agility pack.
I am building a web scraper but right now just I need it to be able to get all the relevant information from one loaded page and categorize it right.
>>
While useful in modern day, does anyone actually find web development interesting and fun?

It seems like a huge portion of time is devoted to lining up elements and browsing the web to find the ideal css tag
>>
>>53882694
How it can be made better?
BTW, the page generate bar code to be printed, and then can be re-read to enter data into fields later.
This job was taken from me, by a guy with connection to some political party, and was paid handsomely.
>>
>>53882756
web design can be pretty annoying, but front end programming and especially back end can be quite interesting
>>
What pixel size should I assume phones have?
>>
>2.days.ago
>>
>>53874580

This guy clearly has no actual work experience lmfao.
>>
>>53879573
bump
>>
>>53882958
beautiful
>>
>>53882752
I dunno. I built a web scraper in Python using Selenium, but I was targetting multiple sites and some of them used Ajax. I've never touched C# so I don't know what options are available to you, other than the fact that Selenium does have C# bindings.

Selenium is probably overkill if you're just parsing a known page, try things out and see what works.
>>
>>53882925
It could be anything... That's why CSS media queries exist.
>>
>>53878780
What are you trying to do though?
>>
>>53882733
>there are people who pay Pajeets $1800 to slap a pre-made image gallery on a page.
>>
>>53882068
>>53882298
>>53882619

>Regex is fine for html.

No.

http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454
>>
How to sign up in discord?
It doesn't allow mailnator.
>>
>>53881226

How?
>>
>>53883924
Just use your actual email...
>>
>>53884121
>actual email
Who do that?
>>
File: 1440160805102.jpg (8 KB, 184x173) Image search: [Google]
1440160805102.jpg
8 KB, 184x173
>>53884137
Anyone that isn't a delusional tin-foiler or pedophile.
>>
>>53884173
>delusional tin-foiler or pedophile
You do know we're on /g/ right?
>>
>>53867505
I use JavaScript at work. I don't want to but i do
>>
>>53867269
<?php

$मल = [
'poo',
'in',
'the',
'loo'
];

foreach($मल as $शचलय) {
echo $शचलय . '<br/>';
}
>>
>tfw never ideas how my "test your html/css skills" website should look
Is there a room for unimaginative people in webdev?
>>
Why the fuck is V8 development so damn slow? Google has all the resources yet they can't add async/await to their engine and make developing with Node x100 better for everyone. Or at least give us fucking destructuring assignments and ES6 imports.
I fucking hate Babel REEEEEEEEEE
>>
>>53884484
Please. Atleast pretend not to be Indian like I do.
>>
>>53884701
I've spent like a month (okay, first week a couple of hours, after that like 30 minutes a day) tweaking my news portal style and structure and I want to kill myself. I'm never satisfied. I should really make a good PS design first, I kinda skipped that too fast.
>>
Doing CS50X through LaunchCode. on module 7. I read we have to do stuff with SQL in this pset so I'm doing Codecademy's SQL course while I'm at work

Almost done anons, once I finish my final project these fags will place me in a real job for adults
>>
>>53883932
How what?
>>
>>53885035
Yes
>>
>>53885035
No
>>
>>53884769
>why does this complicated performance-critical project not implement an unfinished standard?
Gee, I wonder.

>destructuring assignments
Has been there for 3 Chrome versions, but Node still has none :^)
>>
guys pls help I posted it twice before and no one replied
I have a chart from chart.js and I want to have a background image embedded in the same canvas without creating separate div or canvas but the image gets refreshed when you change the data on the chart how can exclude that object from the repeat? here is a fidd http://jsfiddle.net/bh346g29/
>>
>>53884769
>complaining about a library that gives you features early.

Tail call optimization is a more important feature than syntactical sugar on top of promises that can be provided by libraries.
>>
First time I ask for help but I don't know what the fuck is going on.

I'm new to web development, and I just made one webpage where the images in 2 specific sections don't load until I scroll to where they are, and after that, they take like 1 second to show up.

In both sections, i'm adding css styles to them, like in one, im using this: https://github.com/karlhorky/gray.

Weird thing is, when I scroll up to where the section with the images are, they show up after 1 second, even after I have already scrolled trough there, and this happends some times not always.

Anyone know what is happening?
>>
Anyone know how I would scrape off the Filename and File Size for this code?

        [HttpPost]
public ActionResult Upload(HttpPostedFileBase file)
{
if (file.ContentLength > 0)
{
CloudBlobContainer blobContainer = _blobStorageService.GetCloudBlobContainer();
CloudBlockBlob blob = blobContainer.GetBlockBlobReference(file.FileName);
blob.UploadFromStream(file.InputStream);
}
return RedirectToAction("Upload");
}



to go into cshtml?

        <li>
<p class="horizontal">Filename</p>
<p class="horizontal">Modified</p>
<p class="horizontal">File Size</p>
<a id="@item" href="@item" onclick="downloadFile('@item')">Download</a>
<a id="@item" href="#" onclick="deleteFile('@item')">Delete</a>
</li>
>>
>>53886407
Is this asp?
>>
>>53886407
It is yeah
>>
>>53886668
It is Asp.net yeah
>>
>>53885311
>destructuring assignments
>Has been there for 3 Chrome versions, but Node still has none :^)
It has been available as a harmony flag since 4.1

use
>node --v8-options | grep harmony
to see all available harmony flags.

I wouldn't personally use harmony flag features in production tho.
>>
>>53886849
ASP looks like shit senpai. How does that not confuse you?
>>
>>53887248
It is shit mate, but I'm stuck with it
>>
I'm having trouble installing npms.

It does something different every time I try.

npm ERR! System Linux 4.2.0-34-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova"
npm ERR! cwd /home/devstation
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/cordova/node_modules/cordova-common/node_modules/glob
npm ERR! fstream_path /usr/local/lib/node_modules/cordova/node_modules/cordova-common/node_modules/glob/node_modules/minimatch
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! fstream_finish_call setupMadeDir
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack end (/usr/lib/nodejs/fstream/lib/writer.js:319:21)
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:336:20
npm ERR! fstream_stack next (/usr/lib/nodejs/fstream/lib/writer.js:366:20)
npm ERR! fstream_stack /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)


Never used npm. Any of this look familiar?
>>
>>53887699
>
errno 34

I just googled it.
http://stackoverflow.com/questions/21964874/yo-angular-gives-error-npm-err-code-enoent-npm-err-errno-34-yes-i-have-cle
>>
>>53886407
Scrape off?
>>
>>53887801
Yeah, I'm used to scraping off values from JSON data, so sorry for the wrong context. I just wanted to know how print the File Sizes and Filenames to the html.

I know the filename is already there, and I know that content length means the file size, I just don't know how to display this.
>>
>>53887699
better off just switching to golang
>>
>>53887913
I presume that html is view of Upload action. Since redirecttoaction does browser redirect you can't pass data directly in background. You can put that data into session, pass it as route values (url parameters) or directly return view instead of redirect with data in viewdata. I would pass id of uploaded file through route values if that id exists.
>>
Stupid question: Can I record page views to a json file then have the values read from that every hour or so? Because that seems more efficient than querying the database every time a page is loaded.

PS: idk how json works, just had this thought pop into my head.
>>
>>53888283
Have fun maintaining lock so concurrent requests wouldn't corrupt your json.
>>
What is a good short front end exercise I can do to get back up to speed for my summer job
>>
>>53888283

You could store it in memory with something like APC or redis but its only marginally less expensive.
>>
>>53867796

can confirm this. wordpress is shit, drupal is more shit, joomla is the most shit
>>
>>53868155

kek
>>
>>53867269
What is the point of web dev if they have stuff like concrete 5 and all those other drag and drop website builders exist? Is front end dead? Only back end stuff matters?
>>
>>53888827
Who do you think builds those drag and drop sites?
>>
File: 480896019.jpg (97 KB, 478x359) Image search: [Google]
480896019.jpg
97 KB, 478x359
>>53887172
>he doesn't live on the bleeding edge
>he doesn't set babel to preset-staging-0
give up tbqh
>>
This might be a dumb question but I feel like I'm taking crazy pills.

I'm implementing SSO on a website (Django app) for a client, and the ID provider sent over a javascript library that handles OpenID Connect authorization, grabs the access token, and has a function for grabbing user info with that token. They're telling me I should then just have the browser give the user info (identity info and permissions) to my server and trust the identity and authorization information it contains. But this is easily exploitable right? I don't know of a way to secure this beyond a CSRF token, which doesn't prevent a user from just opening up the dev console and lying to my user info endpoint.

My understanding is that, for this type of thing, at some point my server needs to talk to their server (with an access token retrieved from the user's browser) to get trustworthy user info. Is there another type of flow that's all frontend? Am I retarded?
>>
is there some sort of tool which can allow me to visually see where each div/every other tag is located on my page?
>>
>>53867269
Don't you think jquery and naming the event property some super vague "e" shit is a horrible example to use for your webdev image?

Not that Jquery is really bad, and really sizzle is actually great, but the "this is a jquery boilerplate example" is pretty gross.
>>
>>53889639
ctrl + shift + i
>>
>>53889648
no not inspect the source of the page somethnig like what firefox had with the 3d viewer but it'll show me where my divs are visually
>>
>>53889074
You mean to tell me people pay others to use these websites for them? holy shit lol. But all you have to do is drag and drop and type.

Can anyone back this up
>>
>>53889658
Yeah, ctrl + shift + i and then either mouse over the html in the inspector tab or click on the 'pick an element from the page' and then click on an element on the page. In chrome it's the same thing. FF's 3d view still exists, too. You just have to enable it in the dev tool options.
>>
>>53889726
ah right thanks mate
>>
How can I completely reset a js slider? I managed to refresh the values and label but it doesn't trigger the change to update the data. I tried .trigger('change') and wont work

here is test
 $('#refresh').click(function() {
$("#prc_slider").slider("values", 0, 1);
$("#prc_slider").slider("values", 1, 1500);
});
>>
>>53889914
Welp based on the time it took me to complete this I'm going to estimate It'll take me like another 4 months before I can do full stack. Does that sound reasonable?

;_;
>>
File: DtE1fkx[1].png (13 KB, 672x193) Image search: [Google]
DtE1fkx[1].png
13 KB, 672x193
>>53889963
Forgot image and wrong post link
>>
Why development is just a fucking mess on linux?
It's way more easy to create real thing on windows and even on osx.
>>
how can i make nav bars look pretty?
>>
>>53890329
lists**
>>
>>53889672
Yes.
>>
whats the BEST javascript web development tutorial/book out there? and i mean the BEST
>>
>>53890652
JavaScript: The Good Parts
>>
Any one here that does web dev shit on Linux? Planning on changing from Win7 to Linux but I want to be sure that things will run smoothly there too. I don't play games anymore so I'd only need this system for development/browsing purposes.
>>
>>53891682
yeah i do

dont know how you can do web developing on windows desu senpai everyone i know who does it either uses a mac or a linux machine
>>
>>53867771
Goddam refreshing post.
>>
>>53891704
Cool. Been wanting to make the switch for a while but now I'm finally ready.
>>
>>53891682
I do. Basically, same as >>53891704
>>
>>53891682
Can also confirm I have no idea how people can dev on windows either. Rails, for example, I'm not even sure if they have instructions on how to install on windows.
>>
Node and NPM is a pile of horseshit.

Nothing but error code install with no solving documentation

SELECT THE ~/.profile and add this line!

There is no fucking profile and that's the only fucking solution is that shit. Fucking ubuntu it's a local fucking rig and when I say sudo I mean fucking sudo.

NO PERMISSION TO MAKE DIRECTORY WHERE YOU TOLD ME NOT TO MAKE DIRECTORY, LOL
>>
>>53892011
The only way I've gotten it to work is with MSYS2, which is basically rigging Linux on Windows. But then you have to compile all your dependencies and I sure hope no single filepath in your dependency tree is longer than 260 chars. Fucking Windows. There is a reason most cross-platform projects, that run on it, simply cross-compile from a sane *nix environment.

>>53892138
If you are trying to install a package with -g, don't. It's a macfag thing. Installing node modules globally on Linux is retarded and potentially insecure.
>>
>>53892138
if you populated ~/.profile from your user profile and then run sudo, the .profile it picks up is /root/.profile

but you're right, JS outside of a web browser is for shit eaters, join the golang master race my friend
>>
>>53892184
Tbh senpai I am a macfag myself and I don't ever globally install js from npm. Npm scripts are the way to go.
>>
>>53892184
Is it at least acceptable to install express and the generator globally? That's all I tend to install that way.
>>
>>53892204
I was referring to how every retarded tool in existance advocates installing it globally.
>>
>>53892184
I don't give a flying fuck if it's not secure. It's local.

Another fix probably fucked up my permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

>>53892192
My backend is half finished in LEMP. All I need is this package to shit out a bootstrap theme and some AJAX and 3 apps will be finished in 2 hours.

This NPM shit is taking way too long to figure out. Apparently I'm the only person using npm that isn't a linux god with supreme permissions knowledge because there are no fixes. Also fuck goland and stop telling me to use it.
>>
File: 1459615702901.png (60 KB, 1200x1200) Image search: [Google]
1459615702901.png
60 KB, 1200x1200
>>53892275
>drags himself over coals and broken glass to generate CSS
>"fuck golang"
literally the worst kind of meme master
>>
>>53892230
Do you really want to run something a webdev wrote as root? There is no reason to. If you want to run a tool, all local executables are symlinked to ./node_modules/.bin/
>>53892275
-g stands for global m8

P.S.: Use golang.
>>
>>53892325
Oh boy! I better go learn this language for 3 months so I can write these apps that I could put into javascript in 2 hours!

Is Go the only thing you know? I know it's just you posting about it in every single post you make.
>>
File: 1457496114315.jpg (581 KB, 2203x2937) Image search: [Google]
1457496114315.jpg
581 KB, 2203x2937
>>53892363
I've used JS, D, C#, Fortran, C/C++, C on uC, Go, PHP and Lua
Of those I currently maintain an understanding of Go, JS and C++ since these are my 3 fav languages. JS is the only one of those I don't enjoy using day to day, it's only out of necessity that I use it.

But you're right, I am the one who posts all the golang propaganda, but only because it's a fun and useful language.
>>
>>53892430
Don't take all the blame. I shill Go here too, from time to time.
>>
just used nvm and everything just works now.

Screw you macfags with all the support webpages.
>>
>>53889640
e for event, it's not vague at all
>>
how come the following piece of code sends the user to projectName/controller/view/url, instead of just directly to the url?

                                    <td><a href="<?php echo $site->website; ?>"><?php echo $site->website; ?></a></td>


e.g. if the website was www.google.com it would send you to myWebsite/someController/someView/www.google.com as opposed to just www.google.com
>>
test
>>
>>53867714
>>53867695
$20/hour
freelancing in the US
beat that
>>
>>53867771
recruiter?
>>
>>53867771
I love php and vanilla javascript.

I like to code procedural. It flows so naturally and even though I have no idea what the fuck the code does 30 lines up I still love it.
>>
>>53892854
I'm guessing because your url is relative. Try adding
"// . " 

in between your echo and $site object.
>>
>>53886407
file.FileName
file.ContentLength
>>
>>53893061
Actually, in your situation it should be
'//' .
>>
>>53893062
sorry misread your post. Return them in a model or stick them in the ViewBag
>>
>>53893073
yeah you were right all i had to do was concatenate the //

                                    <td><a href="<?php echo '//'.$site->website; ?>"><?php echo $site->website; ?></a></td>
>>
File: 1458539239892.jpg (56 KB, 464x464) Image search: [Google]
1458539239892.jpg
56 KB, 464x464
>>53892854
>>53893061
>>53893073
>>53893084
>PHP
>>
>>53893114
I don't care for it myself, but my shop uses PHP. But I'll be quitting in a month and a half.
>>
>install cordova through npm
>restart because sudo apt-get update hung up
>update and upgrade
>cordova
>cordova: command not found

wut? It works on 2 of my other computers and I installed it on all of them at the same time. Yet it doesn't work on this one computer. What shit.
>>
What's this?
netbook@netbook:~$ npm install cordova
/home/netbook
└── [email protected]

npm WARN enoent ENOENT: no such file or directory, open '/home/netbook/package.json'
npm WARN netbook No description
npm WARN netbook No repository field.
npm WARN netbook No README data
npm WARN netbook No license field.
>>
>>53888283
You've just described a cache. You should be able to get Apache, Nginx or whatever webserver you're using to serve back cached pages without having to touch the database if you set it all up right.
>>
>>53892430
Why don't you like JS? It's a fun and useful language.
>>
>>53894372
backend dev. i measure my response times in uS, sites that download a 4MB source blob just to function is too weird for me. Besides that it's ok.
>>
>>53894372
Any dynamically typed language automatically can't be good. In addition to that javascript is riddled with inconsistencies and bad design decisions. Yeah, there is some fun in writing in such a freeform language but experienced developers tend to look for something else.
>>
>>53894181
No, he described file database and that is quite a bad idea in multiuser scenarios.
>>
why would you need to "program" for web dev? i thought that shit was just html/css and then js for simple dom manipulation and animations
Thread replies: 255
Thread images: 26

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.