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

/wdg/ - Web development general

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

Thread replies: 317
Thread images: 25

>This season's Advent of Code:
https://adventofcode.com/2016/

>Discord
https://discord.gg/wdg
OR
https://discord.gg/0qLTzz5potDFXfdT
(they're the same)

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

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

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
https://gist.github.com/dypsilon/5819528

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

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

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

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
How should I do the file/folder structure a multi-page react site? It's just a portfolio site where each "domain.com/xxxx" page is a separate front-end "app".
>>
These threads are dying really fast recently.
>>
Easiest way to scrape a website with dynamic content?
>>
Man, fuck HTML/CSS, I'm usually a 'fairly' bright person I'd say, but writing a static website for my mum's shop, this shit makes me want to kill myself
>>
>>58651831
PhantomJS should do the trick
>>
What is the best way to save a html table as pdf and xls ?
>>
>>58652130
https://datatables.net/
>>
>>58651922
>hasn't touched the cancer that is flavor of every five years js frameworks
>already complaining about basic HTML/CSS
pls stahp
>>
>>58651922

take a template and change it or build on a bare css layout
>>
>>58651933
Like this? Surely there must be a way that doesn't look like pure cancer.

var phantom = require('phantom');

phantom.create(function (ph) {
ph.createPage(function (page) {
var url = "http://www.bdtong.co.kr/index.php?c_category=C02";
page.open(url, function() {
page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() {
page.evaluate(function() {
$('.listMain > li').each(function () {
console.log($(this).find('a').attr('href'));
});
}, function(){
ph.exit()
});
});
});
});
});
>>
>>58652451
Yes it really does. I've used CheerioJS to scrape a large amount of pages before. It uses jQuery like syntax. Use request to fetch the page, then cheerio to grab data. It should work for that page
>>
File: images.jpg (6KB, 215x235px) Image search: [Google]
images.jpg
6KB, 215x235px
i am learning php. i decided to use an old laptop as server, so i watched some pajeet video on youtube and now i can access it from my main pc with filezilla and putty.

now the question is how can i access it as a "normal website" from the browser? i have all the LAMP installed.
>>
>>58652527
put html file in apache webroot
server.lan.ip/file.html in your browser
??
now you can start serving your php stuff instead
>>
>>58652879
will this allow me to view my website from anywhere?
>>
>>58652987

only from your internal network. You could set a port forward on your home router to point external requests to your laptop. Since you probably have a dynamic IP address given to you by your ISP you'll want to set up dynamic DNS
>>
File: JUST frog.jpg (44KB, 374x363px) Image search: [Google]
JUST frog.jpg
44KB, 374x363px
>Angular 2 barely released
>announcing Angular 4, that is completely different

Why can't web languages/frameworks stay more or less stable and consistent like Java.
>>
>>58653247

>angular 4

what the fuck are you talking about
>>
>>58653275

http://www.infoworld.com/article/3150716/application-development/forget-angular-3-google-skips-straight-to-angular-4.html

They can't keep getting away with it.
>>
>>58653425

>"Angular is on an aggressive schedule that would have Angular 5 arriving in September/October 2017, followed in six months by Angular 6, with Angular 7 coming six months later in September/October 2018."

Embarrassing. Gotta be a joke site. React is so much better.
>>
>>58652987
You can use ngrok for that although only use it for testing
>>
How to even start sucking some massive cock?

I already know PHP, React. ES6 and Babelify.

Should I just hit the local gay bar?
>>
>>58653477

Is it possible to make a react Website that could also immediately be ported as a mobile app with react native?
>>
>>58653247
That's what happens when developers call themselves "engineers"
>>
>>58653758

It just baffles me that the web dev community just keeps gobbling that shit up and lets them pull this kind of shit, hailing it as "progress".
>>
>>58654311
nobody is stoping you from using another framework, sticking with old version of angular2 or forking and maintaining it further
>>
where to start in web development to get into work quickly? tired of delivering pizzas
>>
>>58654526
if reading the op is too much for you then don't bother
>>
>>58654596
it's not, just busy atm and saw a wall of links
>>
Is there a lighter, faster alternative to Visual Studio 2015? Every time I hit Run I gotta go do something else for 5 min...
>>
>>58654626

http://www.jetbrains.com/

This is the industry standard, ANY other IDEs are meme IDEs.

Better have a university email to get the products for free, though.
>>
>>58654626
eclipse
>>
>>58654626

uninstall all shitty M$ layered frameworks, languages, and IDE's right now.
>>
>>58654620
I'll simplify it for you:

Choose one of these and stick with it as far as you can:
>Learning material
https://www.codecademy.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/

>Watch this to (maybe) get an idea of what's what:
https://youtu.be/sBzRwzY7G-k

Start with HTML>>>CSS>>>JAVASCRIPT and maybe SQL, then come back for more advice. Don't fret about "oooh, which backend language should I learn? Python, Ruby or Node.js?" Fuck that shit, just start and don't stop until you hit a wall
>>
>>58654666
>http://www.jetbrains.com/

so Rider would be the replacement to VS 2015, right? But is it faster/lighter? Because I've heard that ReSharper, though very good, actually slows down VS even more.
>>
>>58654959

The only slowdowns in Jetbrains products are from the compiler and code suggestions. It's the main reason to use Jetbrains products in the first place.

I use Webstorm and Idea and everything is very fast. Don't know about pajeet languages, though.
>>
Hey guys. Newbie web dev question.

So I've written a webpage and now I'd like to add a feature in which users can send real-time notifications to other users. e.g. something like "Anonymous has clicked button1!"

As far as I can tell, the WebSocket API seems to meet my needs and the client-side scripting would be simple, but I'm otherwise at a loss. I have no idea how to get started on the server-side programming or even how to set up a server to handle non-HTTP traffic.

Could any of you fine chaps point me in the right direction?
>>
File: launchcode.png (4KB, 278x90px) Image search: [Google]
launchcode.png
4KB, 278x90px
Great, thanks launchcode.

Bet I won't get it because I'm not lgbtqiasqlwtfbbq and don't meet your pro-anti-diversity quota.
>>
What's in the launchcode interview?

I have it in a week.

I'm going to be doing this right after I come back from PAX and I'm hungover.
>>
Is it a good idea to start learning Laravel now I'm fairly competent making applications with php?
>>
>>58655681
why don't you you come up with some bullshit sex orientation so you can help them meet quotas ?
>i identify myself as a thinkpadkin
> no laffin that's being ignorant >:(
>>
>>58655921
I think about doing this, but I'm afraid the guy will be normal and call me a fag before hanging up.
>>
>>58655681
Why not just take the third option to avoid any trouble?
>>
>>58656022
Because that means "Yeah I'm fucking sucking 12 kinds of dicks but can't be honest about it."
>>
>>58656022
this desu i can't ever imagine a recruiter asking me about my sexual activities i'm pretty sure that's illegal
>>
File: gimp.jpg (267KB, 1108x1108px) Image search: [Google]
gimp.jpg
267KB, 1108x1108px
I don't use photoshop much but it does come in handy every now and then. My laptop that has my trusty CS3 just took a dump on me and there is no way I am going to sign up for adobe's monthly service because I hardly use their programs. I tried downloading gimp for windows and my virus protection told me it was bad. Is gimp legitimately malware now? What can I do to get simple photo manipulation tasks taken care of nowadays?
>>
>>58656377
>simple photo manipulation

Try https://pixlr.com/editor/

It's actually pretty decent and since you said "simple" it should be plenty.
>>
>>58656471
This does work for my current situation thank you. Is Gimp now malware though? Is there any decent photoshop alternative? Is pixlr actually the best alternative available?
>>
>>58657028
make sure you get it from official site and not these dl sites for retards that want you to download download managers and bundle adware with everything
>>
is Symfony still the go-to php framework?
>>
>>58655885
they keep rolling out breaking changes in every +.1 version shit is getting annoying trying to keep up but yea its clean and very opinionated way of fucking around but most of the time i'll just default to wordpress when making client's site
>>
dreamweaver vs visual studio

which do you prefer and why
>>
>>58653247
Because JS is getting popular. Even as you eat your tendies, JS is deep throating functional programming concepts like classes. You're expected to learn the new fancy js standard every year. Try to keep up anon.
>>
File: 1451967641145357.png (297KB, 500x279px) Image search: [Google]
1451967641145357.png
297KB, 500x279px
>still lurking these threads for over a year
>still haven't started learning anything
>>
>>58659085
cmon senpai, step up
>>
>>58659112
I will eventually, man. being a minimum-wagecuck will result in my suicide if I don't learn something. My motivation dwindles quite quickly tho. I've only made 2 websites in html and css before giving up

end of blog post
>>
>>58659137
you're me, except I haven't made shit, only just learning now

you can make it senpai
>>
>>58653661
no. the concepts between react and react-native are the same but they use different building blocks at the jsx level. on react-native you use <View> and <Text> rather than <div> and say <h1>. lots of code would be reusable

if you went in the other direction its technically possible though. https://github.com/necolas/react-native-web#why not recommended
>>
What is the robots folder? I know what the css folder is, the js folder is, ect. but I don't know what the robots folder is for.
>>
You know how in some websites there are buttons for signing up and logging in in the right corner? How do you replace these buttons with a "My Profile" button and a "Log Out" button after the user has signed in?
>>
>>58660396
there is a check to see if a user is logged in. if yes display logout, etc. if no display login
>>
>>58651922
Just use Bootstrap and maybe some jQuery is you really need moge functionality.
>>
File: stackoverflow_poll.png (48KB, 798x814px) Image search: [Google]
stackoverflow_poll.png
48KB, 798x814px
>second most paying job
>you don't have to deal with memory leak autism. let the C++ neckbeards deal with it
>node.js is in JavaScript. you will be employable in both front-end and back-end jobs.

give me one reason not to learn node.js
>>
>>58662483
Why is Node.js even in that poll to begin with? It isn't a language AFAIK.
>>
how the hell do I make loop with two variables? I have this

for(var i=j=0; i<array1.length && j< array2.length; i++, j++){
}


but the i sequence is always stopping where j sequence stops
>>
>>58662749

Use a nested loop, that is fucking hideous and needless.
>>
>>58662760

Or just use two loops. Or put the loop logic in one function and pass in the array as a parameter.
>>
>>58662749
What are you trying to do here?
You're stepping through both arrays simultaneously, but the arrays are of different lengths. What is the expected behavior when you reach the end of one array and the other keeps going?
>>
>>58662715
it literally says in the title:
>COMPENSATION BY TECHNOLOGY

node.js is a technology, there are node.js experts, and those people make that much money on average
>>
>>58662483

>"we cross tabulated compensation with competency in specific technologies to see which tech pays best."

That's the explanation.

Node.js """developers""" generally have low competency, so if they extrapole their shitty income you get a (highly theoretical) competent node.js developer with high income.

Lying with statistics 101.
>>
>>58662821
>>58662760
I just wanted to use both variables in the same equation, I tried the nested loop and worked !
>>
Anyone experienced with angular here? I'm trying to create a popover when hovering over a specific element inside a directive html template.

I have a directive and template like
<div my-directive info="el" ng-repeat"el in elements"></div>

inside the template

<div>{{el.whatever}}</div>
<div>{{el.whatever2}}</div>
...


if I add ng-mouseenter and ng-mouseleave tags inside the template I don't know where to put a javascript function to create and destroy the popover since the scope is isolated to the element inside the directive.
>>
Really basic question, but where can I see some examples of basic JS in action?

Been running through CodeAcademy and Free Code Camp but I'm still not entirely sure how everything I'm learning can be applied to web pages.
>>
>>58662994
w3schools
>>
>>58659085
i started at codecademy. and then changed to freecodecamp. Freecodecamp is nice, not for the teaching, but because it gives you exercises that makes you learn stuff alone. There is a comunity too were you can ask stuff. its not that easy there are too much crazy info online mixed stuff. and im only using html,css and bootstrap. bootstrap is the one fucking my learning up too many mixed information online.
>>
>>58662749
i would do like that in c#:
for( int i = 0; i < array1.length;i++){
do stuff...
for( int j = 0; j < array2.length;j++){
do stuff..
}
}
>>
>>58663199
well i dont know if that is what you want.
that would do something like : for each array.1 item it would process all the array 2 stuff. so array 2 would be processed arra1.lenght * array.2 lenght.
>>
>>58663020
yeah thats my basic fount of knowledge now. im using it to finish the exercises in freecodecamp.
>>
>>58662921
Nested loops have O(n*m) complexity, whereas your previous loop just had O(n).
There no point introducing additional complexity if you can just change the looping conditions or increments.
>>
Guize, I need a cheap domain + hosting
No pretentions, just for it to be Wordpress-compatible and a custom domain mailbox
>>
How do you even use ES6 modules with Angular?
I guess controllers and services can be easily translated, but directives seem to be a pain in the ass, especially if you want to keep each of them in a separate file like any sane person would
>>
>>58664492
I do, but I use webpack + babel works bretty good
>>
>>58664492
Not using Angular but are you using Typescript? If not then maybe you should.
>>
I've been working on a messaging app geared at normies for a little while now and lately I've been drawn to Line as an inspiration for our business model and a couple of other things. One thing that I noticed about it unrelated to the business side of things is the fact that it only allows one "device" to be used at a time. What's strange is that the desktop client on a laptop doesn't seem to count as a "device". Whats the reasoning behind this? Does it have to do with their encryption model? I can't think of any other reason (if that one even counts in the first place) for that restriction. Any insight?
>>
>>58664584
The problem with directives is that you can't register them in angular in their own module if you really want to keep them modular, unless I'm missing something
So if I have 30 directives that I want to use across projects I'll always need at least one file that does all the boilerplate registration stuff like

import X from 'directiveX';
import Y from 'directiveY';
...
import Z from 'directiveZ';

(get the root angular module somehow)
.directive('X', X)
.directive('Y', Y)
...
.directive('Z', Z)


Which seems to be a pain in the ass

>>58664595
I took a look at Angular 2 a while back and I barfed a little in my mouth, TS doesn't seem too bad but right now I'm already kind of used to writing ES6 with Babel
>>
Can vue or React be used in Electron apps? Also, can Electron apps be distributed in Windows and macOS's app stores?
>>
Someone posted a site that ranked the popularity and posted descriptions, feature lists, advantages, shortcomings, etc. of different Javascript technologies (frameworks, build systems, libraries, and a couple of other things) in a previous thread. Anyone know what I'm talking about? I'd appreciate a link
>>
>>58653477
React is hot garbage.

Anyone who says otherwise is a complete beginner.
>>
>>58665234
What is YouTube's desktop website built with? I'm guessing its Angular or React. Which one it is is clearly the inferior product. Its a steaming pile of garbage
>>
>>58662994
literally 4chan
>>
>>58665453
This. I learned most of my beginner JS knowledge reimplimenting features of 4chan X and the native JS extension on my own imageboard.
>>
so
I'm completely new to self hosting
Currently I'm using nginx on an old laptop
the domain name works fine for directing towards the server, but I've ocme across a very perculiar issue
when I open up an image file in the browser (right click on image, click open in new tab)
it displays the servers ip address instead of the domain name.

Does anyone know what could be causing this?
>>
>>58665549
in the html, what is the url of the image?
>>
>>58665271

what are you talking about? Youtube desktop app is great. Runs well. Though I don't know what it was built with. I didn't see anything that looked like Angular in the source code
>>
>>58665563
<frame src="Images/1.gif" noresize="noresize">
is the code currently
"Images" is the folder containing "1.gif"

I'm guessing this is the issue?
>>
>>58665549

are you using word press?
>>
>>58665745
no
>>
>>58665759

hmm during your set up are you sure you didn't put in the ip instead of the domain name somewhere you shouldnt have?
>>
>>58665715

wait why are you putting a gif in a frame?
>>
>Company insist on hiring code monkey from code camp
>Portfolio is full of spaghetti angular code with fucking shit tons of unecessary scoping, functions, etc. at least half their files could be sized down about 70% with well wrote and concise code
>I have to teach this dimwitted fucker React

Why do companies think it's acceptable to hire these motherfuckers again?
>>
>>58665549
try accessing it from outside your lan maybe dns is now cached locally and router won't bother querying on www when it knows requested resource is already on lan
but i suck at networking so idk
>>
>>58665810
oh and you don't have dns record for your local ip
>>
>>58665784
to trst shit like exactly this problem
>>
>>58665805

to push anti-white male agenda
>>
>>58665770
yes
>>58665810
did this
no dice
>>
>>58665923

idk man something is probably fucked with your dns
>>
why do people say "business logic"? why not just "logic"?
>>
>>58665960
Because they're different.
>>
>>58665984
no literally dev i've met says business logic
>>
>>58665960
it's business logic as in logic related to what the application does and the domain you modelized, and not related to how this type application work ie not file serving logic or user authentication logic
>>
>>58665960

its just a term to describe applications written for businesses that help them do their logistics
>>
>>58651831
>>58651933
PhantomJS is kinda messy because of all those callbacks.
Try Scrapy
>>
Hello.
A client wants to make a mobile webapp that works like jibjab (personalized ecards with your face). is there any library that would help me with this?
>>
how can I keep two things together left and right of each other no matter what?
display:table-cell; mostly works, but it's not 100%
>>
File: Mild_Pain.jpg (24KB, 391x391px) Image search: [Google]
Mild_Pain.jpg
24KB, 391x391px
>two machines wired to the same network
>localhost works on one
>not the other
>>
I am going to make a web site with soft real-time features. I need a front end.

I think I want to go with react, because of the ability to pick and choose components and glue them together, reducing development time and providing sturdy solutions. I don't have all the time in the world any more unfortunately, so I don't really have a choice here.

What component framework / set for React works well with websockets, and looks great / works great? I had a look at materials-ui and semantic-react, which are good looking in my opinion. I'm leaning towards Semantic-react because it simply has far more components I can work with.

What's the /g/ approved advice?
>>
>>58666565
/etc/hosts
>>
>>58666609
?
>>
>>58666605
serve static pages. javascript should never be used.
>>
>>58666565
Are you attempting to be a retard? Or do you actually have no idea what you're doing?
>>
>>58666620
I already finished a template-based light version of the site, which uses ONLY css to get things done. Looks good without a stylesheet too. In addition, it's mobile friendly!

No tricky cheaty CSS used, unless you count display: table. Just vanilla CSS3 and HTML, really small HTML files, non-minified.

But for that great UX, we need javascript and we need a good front end JS library, and we want websockets.
>>
>>58666564

you sure you did it like this?

https://jsfiddle.net/t888rasq/
>>
>>58666605
If you have no need for creating a single page app, and you just want to showcase data, just use raw JS.

Specify a bit more though, what exactly do you want the front end and the data to do?
>>
>>58666688

it sounds like an SPA is what he wants....a real time asnyc app, right, OP?
>>
>>58666658
no more retarded than simply posting the place of a file
obviously you want me to check it but what for?
>>
>>58666688
Using raw JS will take me too much time. Like I said, I am in need of something more "plug and play". I am looking to create a real time SPA. The backend is ready for action, the front end is not.

I simply want to have something which handles the connection to the socket I have set up, and can receive/send messages they are subscribed to and so on, and then immediately enact those change on the UI.

Something similar to this: https://derpibooru.org/
insofar that it has a "grid" as a main work area surrounded by actions/navigations on the side. It is an application for doing work, managing things.

and honestly, sort of pisses me off that fucking ponyfags have such a usable booru with no released source code. REEEE etc...
>>
>>58666772
React with Redux should help, make a separate file with the listeners and push it to the global state.
>>
File: 1481119050899.png (597KB, 1280x720px) Image search: [Google]
1481119050899.png
597KB, 1280x720px
Can someone spoonfeed a retard into converting the following jQuery into pure javascript? I want my header to have a box shadow as you scroll down but I only found a way to do it using jQuery
$(document).on("scroll", function() {

if($(document).scrollTop()>10) {
$("header").removeClass("normal").addClass("scrolled");
} else {
$("header").removeClass("scrolled").addClass("normal");
}

});
>>
>>58666772
Oh okay, yeah, then React is great for your situation. Especially if you want your UI to be very UX friendly.

You'll want to use Redux and React together. Redux is gonna be your data store that is gonna communicate with your backend. React itself is a fantastic state manager that will blend really well using Sockets.

If you have any questions, I've done similar projects and usually lurk these threads for React things.
>>
>>58666772

This isn't an SPA. And it sounds like youre trying to make a content management app that CRUDS a database. Right?
>>
>>58666826
can you explain how do use websockets with React/Redux, where am I supposed to put all the websocket related logic in the app? Should it be in the component or Redux store, idk
>>
>>58651922
Just wait till you try webservices
>>
>>58666685
wow, thank you
I've been boggled by that for a more than a week now
>>
>>58666791
Watching tutorials as we speak.

>tfw your workplace is only now starting to consider something more than JSF

im benefiting

>>58666826
Thank you. I'll hang around these threads, may post work in progress as well. I'm just getting into React, and it may just be the silver bullet I need for this.

I take it that there'd be no problem also using something like semantic-react as something more or less pluggable, right?

>>58666841
There will be CRUD, and I have an existing REST API for that. There is like mentioned earlier, a simple version of the site. There are also elements of chat/messaging involved, things like notifications I'd like to "push" rather than poll for.
>>
LaunchCode anon here?

I have my interview next week. What do I expect?


It says something about showing a project I made with screenshare...is this some remote connection shit or is it just a feature of Google Hangouts?
>>
>>58663199
>not using a foreach loop
It's like you enjoy agony
>>
>>58666890

ive nver used react/redux. What I would do is just make an async php app. But what the fuck do i know
>>
File: 1396398387611.gif (773KB, 260x221px) Image search: [Google]
1396398387611.gif
773KB, 260x221px
>>58666564
Use <li> inside a <ul> with the li style set to display:inline

Don't ask me how I know that. You're welcome
>>
>>58666968

except now you've created extra spacing and margins from the ul

why take a list that was designed to go vertically, and manipulate to go horizontally? just write a base horizontal way to begin with. Bad advice.
>>
File: 1398213478787.jpg (5KB, 161x251px) Image search: [Google]
1398213478787.jpg
5KB, 161x251px
>>58667034
It's a common and workable way to do things. I don't have to take shit from a virgin either
>>
File: ichijo.png (676KB, 853x480px) Image search: [Google]
ichijo.png
676KB, 853x480px
>max-width:100vw;
ok, works
awesome
>child nodes (images) are not confined to this and if bigger even the parent just ignores it
fucking
why
>>
>>58666860
What you're going to do, is have a seperate container that contains all of your socket logic and separates your UI. In that container, you're going to want to load the initial state of the chat by using the Redux store, and the data you get back from it. From there you want to use componentDidMount in order to set the state for when the data loads in. After that, then you will initialize the sockets. You track the state changes using Sockets in a seperate handle function. This handle function will set the state upon change at all times, which you could do some very informative stuff with. From there, sockets is then keeping real time track of the conversation by constantly submitting a new state with each key stroke and submission, and then only upon submission of the message, will it communicate with the back-end to save the message using Redux. Sockets should be incredibly minimal in this instance and does not have to have a lot of implementation at all.

>>58666890
There's no problem using something like semantic-react, but I would try your hardest to stay away from frameworks that make your project more opinionated. A framework within a library is only good for prototyping, it loses scalability quickly if you want this project to grow. If I were you, I would stick to make the components with your own interpretation of what you would like to see.
>>
Does anyone here have a view on ecommerce software?

Shopify vs Magento or something else

I can design all the front end shit.
>>
>>58667051

>reverts to butt hurt virgin name calling

lel

youre an idiot who writes idiotic code.
>>
File: X4agOaz.jpg (343KB, 1291x877px) Image search: [Google]
X4agOaz.jpg
343KB, 1291x877px
I started a new job - customizer - working with the consultants to fine tune the product (WebApp) for the customers needs. This relies mainly on JS and EXT JS, since I have had really limited experience with JS, what would be the path to extend my knowledge ? Haven't programmed for quite some time, since my studies went into networking direction, nor have I ever been a really good programmer, but I like the job and want to make it work.
>>
>>58667103
Go to github, search up awesome JavaScript, and it'll give you a list of amazing resources to use in order to learn JS fluently, without the bullshit of having to scatter everywhere for resources.
>>
>>58666826
<code>hsafhshaf</code>
>>
>>58667133
Sounds awesome, thanks !
>>
https://docs.google.com/spreadsheets/d/1CGgu-7aNxlZkjLl9l-OlL00fch06xp0Q7eCVDDakYEE/edit#gid=0

how THE FUCK do they waste 1281$ a month over at lichess.org servers? they have around 20k users at peak hours. is it because they store all the games?
>>
>>58667051

>it works
>it must be the best way

so i guess since bubble sort technically works despite being one of the slowest algorithms out there, it would be fine for you since it just werks

but i wouldn't expect an html monkey to know real programming anyway
>>
>>58666803

This is just off the tip of my cock:
document.body.onscroll = function() {
if(document.body.scrollTop > 10){
document.getElementById('headerId').className = "";
document.getElementById('headerId').className = "scrolled";

} else {
document.getElementById('headerId').className = "";
document.getElementById('headerId').className = "normal";
}
};


Is this what you want? or did you want to actually add and remove class elements like an array?
>>
Is anyone willing to take a look at my code and talk to me 1-on-1? I'm pretty desperate here (I'll suck your dick)
>>
>>58667250
sure i'm bored
>>
>>58667250
Ok, I'm bored also. What kind of code?
>>
>>58666565
Localhost ius specifically for the machine, not the network
>>
>>58667195
I wouldn't expect a basement dweller to know much about real world problems either. Perhaps when you get hired for something other than data entry you'll get it
>>
>>58667346
>>58667304

C+=

I would prefer it if either of you was a woman of color, or at the very least not a cis white male.
>>
>>58667205
Well I am not 100% sure but the jquery one basically did the following:
my header is assigned the class "normal" from the start (html) and the jquery basically changes the class name from "normal" to "scrolled" as you scroll down the page and vice versa which obviously is also linked in the CSS.

The one you just made does nothing though I'll try to figure out how to make it work. Thanks fampai.
>>
>>58667400
is c+= repo still hosted somewhere ?
>>
>>58667409
Try
var doc = window.document

doc.onscroll = function() {
...
} else {
....
}
};
>>
>>58667409
try this
document.addEventListener('scroll', function(){
<crp from before>
});
>>
>>58666722
I wasn't that guy. Assuming you are trying to access a web server. Localhost will get you there on the server.
As the other machine has its own Localhost, it won't. You need the IP of the server.
>>
>>58667399

>reading this while i am currently at my dev job

lel
>>
>>58667482
Keep chipping away at it slugger ;)
>>
>>58667304
>>58667346
HTML/CSS

https://jsfiddle.net/b2uu5vfy/#&togetherjs=kGLmAPvL2A

the buttons on my nav don't hightlight properly, the pop up menu isn't centered underneth said buttons and I need to the nav responsive somehow without js preferably.
>>
>>58667409

For >>58667205

Remember to give your <header> an id of 'headerId' or nothing will happen.
>>
>>58667508

keep telling posters who recommend doing side by side elements with ul and li tags that they're idiots? ok i will
>>
>>58667174
AWS perhaps?
>>
>>58667054
I didn't mean to just complain, if anyone can help me with this it would be greatly appreciated.
I'm trying to do something like 4chan image expand.
The `post' div has padding and a margin and max-width:100vw;.
But if you put a larger image in it, it ignores these.
Putting max-width:100vw; on the images makes the image exactly 100vw, but it still pushes off the right because of the margins and padding on the left.
You can force the image to be smaller to prevent this, but then the margin on the right is sort of arbitrary and doesn't match and looks bad.
Obviously, my schema as to how this should work is not inline with the reality of how it does - I have not been able to make sense of this at all.
>>
File: django django.jpg (36KB, 642x373px) Image search: [Google]
django django.jpg
36KB, 642x373px
Django core dev considers not accepting contributions from trump supporters.
>>
>>58667571
I did that and it's still not doing anything. I'm so stupid I don't even deserve the (You)s. I'll try to find another way.
>>
>>58667682

let him do it and go through what mozilla is going through. Please please please. So glad I don't use Django now.
>>
File: django django 2.jpg (46KB, 638x392px) Image search: [Google]
django django 2.jpg
46KB, 638x392px
>>58667682
but wait there's more!
>>
>>58667695
Tbh anon, I'm not sure why you want to deviate away from jQuery. It's perfectly light weight and sustainable. As long you're not using something retarded like react, I don't think there's anything wrong with what you have lad.
>>
>>58667768
My lecturer told me I should try my best to use pure JS so that's why I was trying to change it. Also, I link to the jquery files by using the cdn thing where you link it in
<script>
tags. Is that the correct way of doing it or is it more efficient to download the files to my machine?
>>
>>58667839
put js in separate file it's cleaner
>>
>>58667735
>>58667682
Can we just move California into the arctic or something and make them their own nation so they can have their safe zones on their own.
>>
>>58667893
I hate so much how they think immigrant = illegal immigrant.

I hope a giant quake breaks them off into the ocean.
>>
What do I use for my backend /g/, requirements in order of importance:

- Able to deal with ~100k+ reqs/sec on a single cheap server (SSR, nothing fancy)
- Reasonably sized development community: no obscure languages
- Not a monolithic framework
- Quick development


Is there something that satisfies all these?

Is Go really my only option if I am willing to forgo quick development (and the fact that the language is retarded)?
>>
>>58668112
>100k r/s
>single cheap server
lol
>>
>>58667735
Why would he get deported? Is this guy an illegal or something?
>>
>>58668141
I'd settle for half that. Point is latency and throughput matters.
>>
>>58668229
Only way you'll ever manage that is with varnish or something in front.
>>
okay so I have a server with an index page set up to serve an image inside a frame
this image is one of any number of images all names "1.gif, 2.gif" etc
I want to build an array from these gifs and then serve them as the frame source.
How do I do this without Javascript?
>>
File: code.png (97KB, 1248x671px) Image search: [Google]
code.png
97KB, 1248x671px
hey guys i took on web development as a hobby and i dont know a whole lot and im stuck at this problem. i'm trying to convert a standard quadratic to a vertex form and i have all that i need to make the equation, but i dont know how i would out it on the html document and also it would be awesome if i could use Mathml while im at it, but that parts optional
>>
>>58668322
output*, fuck
>>
>>58651922
>static site
>for a business
Have you heard of templating, and/or static site generators? You should probably be using WordPress to take advantage of SEO for her shop. If you don't have access to WP, give a SSG a shot. They have premade templates that you can customize, etc.
>>
>>58668225
pretty sure the dude has a greencard and is just retarded
>>
>>58668290
this or caching a lot of stuff depending on what you serve
>>
>>58667695
That is ok buddy, put it on jsfiddle and i will see what i can do.
>>
this >>58662483 is me... i am so sorry for even trying to learn node.js ....
every tutorial is written by an autist, and every example app i try to look online doesn't work because even the examples need shitty things like babel register and i have no idea how to install it. i am using webstorm.
>>
>>58668501
that's a lot of depressing statments in one comment
>>
>>58668322
rule 1 of /g/
source code as plain text
>>
>>58662483

these kind of surveys are distorted by ny, bay area, and seattle being the hubs for app and web development

its not the language making you money its the area. if you wrote C in SF youd make similar money
>>
>>58665183

i wrote a twitch chat/dashboard client in electron+react a few months ago:


https://github.com/2c2c/node-twitch-irc

anything goes in electron, frontend or node js will work
>>
>>58669001

>tfw live in seattle

i see more php job postings than anything else
>>
>>58666826

teaching people to learn react+redux concurrently is such a bad idea

there was a huge burnout phase in 2016 as a result of people encouraging this
>>
<b>A:</b> B

or
<b>A</b>: B
>>
>>58669247

>2017
>not bolding your colons

git gud
>>
File: 1485327173489.jpg (113KB, 630x768px) Image search: [Google]
1485327173489.jpg
113KB, 630x768px
I want to implement a simple chat in my web app that when you go to the messages url it just displays all the users you've had conversations with and when you click a user it loads the messages at the same page. What are my options? Ajax? What about new messages page auto update?
>>
>>58669388
>chat without ajax

how
>>
>>58669454
flash or java?
yeah im trolling, but you can do it
>>
>>58665156
You should definitely switch to components
The only difference is use get scope using $ctrl
>>
>>58669047
So I wouldn't have to write much Electron specific code? My end goal is to have a frontend that functions nearly natively everywhere. Mobile included. I think that web technologies are at a point where that can happen utilizing only them
>>
Anyone here familiar with mongoose?

say I have an array like
var array = [{
id: 1,
name: 'wew'
}, {
id: 2,
name: 'lel'
}, {
id: 3,
name: 'no'
}];


how do I query my model to see if there's anything in the DB with any of the id's in the array? is there any way to do it without using a loop and having multiple "Model.finds" inside the loop?
>>
>>58669247
Use
<strong>
>>
>>58669388
socket.io
>>
>>58669610
I don't Javascript too often since I'm a backend guy and I work in Perl mostly but I think what you want to do is use map to pull the id's out of your array object into an array of just id's and then pass that to Mongoose however it expects it.

var ids = array.map(function(i, v) {
return v['id']
});

var newStuff = Mongoose.whatever(ids, otherArgs, iDontKnowWhatImDoing)
>>
File: cozy winter.png (2MB, 2048x1319px) Image search: [Google]
cozy winter.png
2MB, 2048x1319px
>hosting with namecheap because my uni required us to put our portfolios on a hosted site
>get namecheap because they're not ultra jews with their prices
>1 year later
>namecheap wants me to pay $60 for a year for two domains (.me and a .design)

What the fuck is this shit? I understand there are introductory rates and all that but do you guys pay $30 a year for a single domain???

Who do you guys use??
>>
>>58669598
i basically avoided working with electron at all by using a boilerplate desu

a few things:

electron gives you a node instance to work with. if you use this then those pieces of code are incompatible everywhere else. otherwise a desktop web and electron deployment can use nearly the exact same code

react and react-native do not share identical code. you can reuse chunks of code if you think about things correctly, but at the lowest level they use different "dom" elements. the attractive part of react-native is that the development process shares the same fundamentals as react (so you can get by only knowing js to write web, android, and iphone apps rather than needing to learn objc swift and java)
>>
>>58669692
.ga
free domains requiring renewal every month, as long as you can beat the bots trying to steal your domain, it's awesome
>>
>>58669917
For real? That's cool as hell. Thanks anon.
>>
>>58668141
I found what I needed
https://github.com/ipkn/crow

/wdg/ BTFO
>>
>>58665805

hey, the least you can do is teach that code monkey how to do this and that your way or the more efficient path.
>>
File: Untitled.png (892KB, 1080x814px) Image search: [Google]
Untitled.png
892KB, 1080x814px
Is bootstrap worth learning?
>>
File: what the hell.png (19KB, 1032x285px) Image search: [Google]
what the hell.png
19KB, 1032x285px
What the fuck why is saying 28 instead of 26
>>
>>58670715
Any particular reason why you chose the most cryptic and possibly slowest answer of the bunch?
>>
How much do I need to know in order to succeed in an entry level job interview? Like all of the languages (html, css, sql implementations, the backend language, js, etc.) all have a lot of features and I'm bound to not use all of them in my own personal projects. At the same time, I've tried reading all of the APIs to know all of the features, but I usually end up forgetting the specifics after a month. Should I not worry about that?
>>
>>58670563
pure is way better and much lighter
>>
>>58667658
anyone?
>>
>>58670852
I'm going to let you in on my secret, which I wish I knew months ago.

First, look at the requirements of the job.

For example:

// beginning job description
Desired Skills:
Solid understanding of HTML/CSS
3 years experience with JavaScript/jQuery
Version control software experience preferred
...
Excellent communication skills


// end

Now, simply do a google search for html/css interview questions, and study them. Try to understand them though.

Same for JavaScript. But it wont really do you any good if you're not familiar with the language at all, as you'll probably be required to solve some basic problems in the language. But if you do understand, then continue.

So, to sum it up, you don't need to be an encyclopedia in X. Just get the fundamentals down, do some studying, and you'll be good.
>>
>>58670563
Fucking hate bootstrap. Foundation is so much better but it doesn't have the twitter meme.

I'm sure pure or skeleton is better. No idea.
>>
>>58670715
wew,
filteredAuthorIds
had duplicated IDs
>>
>>58665234
false. React is pretty comfy anon.
>>
>>58668306
does php not have an array rand?
All you'd need to do is set the frame source to be the variable that the php array rand script spits out, no?
>>
This may seem like a dumb question but I'm going to ask it anyways. I'm just beginning to learn JS so bear with me. I don't really understand the difference between the front-end and the back-end.

>How does a front-end framework like React differ from a back-end framework like Django or Laravel.

>Is Javascript on the front-end mainly for interactivity like buttons and ajax? It seems like there's a new JS front-end framework every week but I'm not sure what the difference between them at all.

>Why does a frontend framework like EmberJS or Angular have routing, does'nt the backend take care of routing?

>Is there any learning resource which can give me an overview of what each of these things like routing, and templates are?
>>
>>58662749
Disgust.
>>
>>58671617
Frontend runs in the browser, backend runs on the server. Frontend handles more and more of what the backend used to so there are a lot of emerging technologies for it. Routing is just a fancy way of saying pretty URLs and templating is the preferred way to interpolate data with markup. Hope that helps
>>
i installed php7, mysql, and apache on windows. trying to use phpstorm but the damn thing won't run because it needs php.ini or some shit. it doesn't exist though. what should i do?
>>
>>58653477
React is nearing version 16?
>>
>>58666803
my god these jquery tards literally no nothing.
>>
I'm a software dev who wants to learn web design and the ideas behind web development's programming are very alien to me.

Here's one issue I have that I would like to be addressed.

I'm trying to make a slideshow of images for a banner on my web page. Its completely functional at the moment. HOWEVER, I hardcoded the images into my html file.

<div id="slider">

<img src="images/entertainment.jpg" class="mySlides">
<img src="images/restaurants.jpg" class="mySlides">
<img src="images/themeparks.jpg" class="mySlides">

</div>


Do I need to hardcode in these images into my actual program files? Or can I assign images I upload on my web page to have the class "mySlides"?

I mainly work in c# / java, so I'll just show you in code what my intent is in pseudocode that resembles those languages.

//Images are all the images I uploaded in a folder called "mySlides"
foreach (Image image in Images) {
image.class += "mySlides"
}

foreach (image with class "mySlides") {
//add these images to the div with the id "slider"
}
>>
>>58672758
are you programatically writing html pages you serve ?
>>
>>58672888
Yes, I have base html classes. Like, I got an html class for the front page and an html class for articles. These classes only have structure and no images or text.

I'm trying to avoid hardcoding content into the website.

I think I got it figured out. I'll post back with my code if I'm successful.
>>
>>58672758
I'm no webdev expert here, actually I'm a c# dev too.

From your psudocode, you need to realize that you are trying to *dynamically* load images at load time. This isn't possible without having some backend code *generate* the additional HTML that adds in your images.

The solution is to use some kind of server side code (like php) to insert the html programatically. You could also look at using JQuery, but I'm not sure if that is possible since my experience is limited, but it should be. The main difference between the two is that JQuery is able to modify the Dom at load time (ie add I'm tags) where the server side code will generate the html for you. JQuery is nice if you don't have or want to include a backend language like php.
>>
>>58672949
you could try a templating engine like thymeleaf or old jsp for java
also current trend is to serve static files then load dynamic content with client side script
but if you really need to generate everything using your custom html classes then i don't see what's stoping you from adding whatever images with whatever class anywhere in it, should work as long as file paths are ok
>>
>>58667133
not him, but that should be it, right ?

https://github.com/sorrycc/awesome-javascript
>>
Okay, so >>58672758 here

The upload-slideshow-images.js script works kinda.

$(document).ready( function() {
$("div").each( function(i) {
$(this).append("<img src='images/banners/banner"+i+".jpg'/>");
});
});


The only issue is that this affects all divs. I only want it to affect divs with the "mySlides" class. As in:

$(document).ready( function() {
$("div class='mySlide").each( function(i) {
$(this).append("<img src='images/banners/banner"+i+".jpg'/>");
});
});


This isn't working. What do I change
class='mySlide
to?
>>
>>58673143
use jquery selector to select dom elements based on criterias

$(".mySlide").each(function(){ ... });
>>
Looking at various websites, it seems like a lot of people store their css into one file, which looks like bad practice to me. Is having multiple css attached to one html file bad or something?
>>
>>58673031
>https://github.com/sorrycc/awesome-javascript
Yep that's it lad.
>>
>>58650859
Because they're shit. It's all just trivial questions from green plebs.
>>
>>58673491
HTTP negotiation is the heaviest part of general page loads, meaning the best way to optimize time to load is almost always reducing network requests. For a long time web projects have had build steps which concatenate all js and css into layer files before distribution.
>>
Considering these two arrays

var array_1 = [{
id: 1,
pages: 3
}, {
id: 2,
pages: 2
}];

var db_result = [{
id: 1,
last_page: 1
}, {
id: 3,
pages: 10
}];


How could I create an array with the following?

var outdated = [{
id: 1,
cur_page: 1,
end_page: 3
}];
>>
>>58651922
bruh just use squarespace
>>
Got a job after one month of studying web dev, why did i even bother going to uni for 4 years?
>>
>>58650825
Has anyone deployed a java web application behind IIS before?

I was thinking of just deploying the java on a different port, and then just use IIS's AAR functionality to make IIS act as a proxy.
It's a standalone JAR with embedded webserver. I only have to edit a .property file to make it listen on another port.
>>
So I have a c# file that retrieves a list of images in an image folder. I'm using the ASP.NET framework.

I want this c# file to send this list of images to a jquery script which will utilize these images. Anyone got a good tutorial on how to do this?
>>
>>58662749
for (f = 0; f < max(a1.length, a2.length); f++) {
//do stuff
//f takes the place of i and j from your code
}
>>
>>58667174

Tell me wtf fishnet is and we'll know.

Three databases and one application server is an unusual combination.
>>
>>58674540
>why did I bother getting an education when I can make money without one

knowledge > money
time will teach you this lesson, anon.
>>
>>58674669
The point is that i didn't need to go to uni to learn, can just self study
>>
>>58674721
That's the huge con being perpetrated upon western youth. Most people not only don't need to but definitely should not go to college, especially not right after graduating high school. It rarely makes job prospects better and in some scenarios makes them worse. Trade schools and training programs are the correct course if you want money.
>>
hey fellas, background-blend-mode isn't being recognized as a known CSS property name. please help.
>>
>>58674960
http://caniuse.com/#feat=css-backgroundblendmode
>>
>Spent three hours porting application to Webpack2 because this fancy new tree shaking is supposed to reduce code size
>JS build goes up by 1k
>>
>>58674968
My chrome is up to date. My visual studio is saying that it doesn't recognize that CSS property name.
>>
>>58674986
>visual studio
>>
>>58668306
an interesting problem but you're going about it wrong
you make a php page that serves a random mage every tie it's refreshed
then you use that php page as the frame source
>>
>>58651922
use this

http://launchaco.com/build/
>>
>>58652527
use this

https://ngrok.com/
>>
>>58653554
go full js stack
>>
So what's the consensus on rails?

I really don't want to sort trough the javascript trashcan for a full stack. And I like Ruby.
Any reason not to use Rails?
>>
>>58675236
It's kind of becoming less popular. It's a little two years ago, but still a strong tool to have in your belt. Most full backend framework type things are rails clones now, but full backend framework type things are less in vogue.
>>
>>58666803
refer to this

http://youmightnotneedjquery.com/
>>
>>58668322
you can start with this
<form id="myForm"></form>
<div id="result></div>
document.getElementById('myForm').addEventListenter('submit', getResult)

function getResult(){
//your code here
var result = document.getElementById('result')
result.innerHTML = "" //pass the result here
}
>>
>>58672018
just install xampp
>>
>>58670563
yes and it is easy and it won't take a lot of your precious time
>>
>>58657928
Yes, definitely.
>>
>>58669610
in mongoose there is a model property find/findOne
>>
>>58675721
he wants an in query.
>>
>>58669388
you can start with this one

https://github.com/hkhaira/chatRoom
>>
>>58674574

Guys, anyone done this kinda thing before?
Anyone knows what sort of thing I have to look out for with SSL etc.?
>>
Where do you buy your domain names guys?
>>
>>58676164
https://www.nuageapp.com
>>
Hey /g/tards, i normally chill in the dpt, but recent developments means i have to write a webapp to track gps locations, so i was just wondering how you'd get url parameters to use in a callback
>>
Friends, tell me all about static site generators that can make nice, minimal/simple pages from markdown.

It should support generating hyperlinks to other processed markdown documents, and it should ideally not have a bunch of asinine dependencies so I can run it easily on centos 7.
>>
>>58676243
Depends on framework.
>>
>>58676243
in express you can do this
app.get('/location/:whatever', function(req, res){
var whatever = req.params.whatever;
//you code here
});
>>
File: 1469208998277.jpg (73KB, 334x587px) Image search: [Google]
1469208998277.jpg
73KB, 334x587px
html helpers: good practice or preference?
>>
>>58675587
i solved it already. php directory had php.ini-development and php.ini-production
all i had to do is change the first's file extension to .ini
>>
>>58676164
namecheap
>>
got a job as an "intern" doing full stack on production code for $15/hr
>>
>>58677784
I wish I was you. I'm too autistic to interview
>>
>>58677840
Getting a job by applying online is impossible. If you want a job find your local university and go to their career fairs. My university didn't require an ID or anything. If you're really ballsy, drive to the engineering college in your state (mine is Virginia Tech) and go to THEIR career fairs.

I got my interviews (3 actual, plus 2 more interview invitations that I turned down) from my projects. I chose my 3 best projects and put them on my resume.
>>
Hey. I don't usually work with IE, but I have a site where they want it IE compatible. I only have one thing that's out of place and I'm trying to move it back with javascript, but, I'm not having any luck.
Here's my code:
if (navigator.appName == 'Microsoft Internet Explorer' ||  !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv 11/)) || (typeof $.browser !== "undefined" && $.browser.msie == 1))
{
document.getElementsByClassName("logo-text").style.marginLeft = "18%";


Any help or pointers would be appreciated.
>>
>>58678065
>but I have a site where they want it IE compatible

tell them, what would you rather have: 20 bucks or a better world
>>
Is it normal for Webpack to take 10-15 seconds to build a small project (~300 modules including external dependencies)?
>>
>>58677898
what were your projects?
>>
Anyone know any good resources on how to clone websites?
>>
File: crap.png (521KB, 1716x1020px) Image search: [Google]
crap.png
521KB, 1716x1020px
why do web developers insist on adding this stupid garbage to their sites which sticks to the screen when you scroll up and down?
>>
>>58678933
I just use no-script and disable all that shit.

The worst is when you get this little mini-popup when selecting text.
>>
Is freecodecamp worth a shit? Obviously if I put their certifications on my resume the real adults in the room will laugh at you.

But does it teach practical stuff? Are the projects on there worth a damn? Could I out those in my resume?
>>
>>58678933
Top bar for convenience.
Left bar for money.
>>
>>58674456
I dunno, how can you get the current page from array_1? It doesnt seem any correlation
>>
>>58679000
I did some ghetto thing like this

        for (let i = 0; i < _array1results_array.length; i++) {
let array1result = _array1results_array[i];
for (let y = 0; y < db.length; y++) {
let db_result = db[y];
if (array1result.id === db_result.id) {
if (array1result.pages > db_result.last_page_crawled) {
outdated.push({
id: db_result.id,
page_start: db_result.last_page_crawled,
page_end: array1result.pages
});
}
}
}
}
>>
>>58678933
>web developers
That kind of shit comes from UI/UX gurus, conversion optimization rockstars and other useless cunts.
>>
>>58670146
And what database will you use?
>>
>>58679049

what the hell is this
>>
>>58679071

ya thats some annoying front end UX faggot who did that.
>>
How do you remove expired cookies from a database on the sever? Do you run a job to delete expired ones every ten minutes, or is there a nicer solution?
My server uses yaws as the webserver, mnesia as the db and code is written in erlang.
>>
>>58679329
it looks like C. it might be a db language, tho.
>>
>>58678065
If that's all you need to fix, just
<!--[if IE]>
<style ....
<![endif]-->
>>
>>58679355

http://stackoverflow.com/questions/5285940/correct-way-to-delete-cookies-server-side
>>
>>58679423
No, I don't mean the best way to get the browser to delete a cookie, I mean something like this: say you have a "remember me" checkbox, it should work by creating a token on the server that is then stored in a cookie in the browser, and the hash of this token is stored on the server so that autologin cookies sent by the browser can be validated against the hash on the server. Obviously this hash should not be stored forever on the server, only for a set amount of time, and I'm looking for a way to remove hashes that have "expired". The obvious way to do it would be to store the time of creation, and to run a job every x minutes that compares the time of creation with the current date and removes the expired ones. I'd just like to know if there's a better way to do it.
>>
>>58679570

uhhh set it to blank?
>>
File: living the dream.png (1MB, 927x960px) Image search: [Google]
living the dream.png
1MB, 927x960px
I regularly have to override an ext js config/elements, i find it really usefull to open it in notepad++ in JSON Viewer, and then I can copy the path to my desired level. The result is something like ROOT.config.rows[0].items[2].panelConfig.whateva{}. Is there any way to automate this and use the path to create/extend the path to a structure:
config: {
rows: {[
items: {[
....
]}
]}
}
>>
>>58679570
Why do you need to run a job that removes expired ones? Just check the time and if it is expired, ignore it or delete it.
>>
File: meme.png (151KB, 600x600px) Image search: [Google]
meme.png
151KB, 600x600px
>>58678964
>convenience
get the fuck out, if I'm scrolling down a news page and accidentally scroll too far and need to go up, I don't want some large fucking bar to cover half my screen so I need to go up 2 more scrolls to see anything.
>>
>>58679900
I was basically afraid of dead data accumulating, like if data is checked for being outdated when it is accessed, and it is deleted if it is outdated, but it is never accessed, then it is never deleted. Since then I realised that the yaws api has built in shit for handling sessions and automatically getting rid of expired ones, and I decided to store the remember me hashes in the database with the user and check for expired ones every time the user logs in.
>>
>>58679418
I'm on IE 10 and that's not working. It looks like that isn't supported pas 10.
>>
>>58678065
Found this solution:
<!--[if !IE]><!--><script>
if (/*@cc_on!@*/false) {
document.documentElement.className+=' ie10';
}
</script><!--<![endif]-->


It adds a class the the <html> tag and then you can add styles through that.

FUCK IE
>>
>>58670563
It doesn't really take long to learn, but learning flexbox and basic CSS will get you further ahead in the long run.
>>
How am I supposed to store variables in Node? Should I have a little script that stores them in environment variables? Not sure how I get that script to run before everything else though so the variables are actually assigned.
>>
>>58681661
with variables I mean constants, like port number and other things that aren't likely to change and that I might need in different files.
>>
>How to get started
http://pastebin.com/pDT82mQS
http://pastebin.com/AL6j7GEE

Is the second one supposed to contain only "Come 2 daddy"?
>>
>>58678954
bump
Thread posts: 317
Thread images: 25


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