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



Thread archived.
You cannot reply anymore.



File: 1496845010511.png (731 KB, 824x553)
731 KB
731 KB PNG
>Previous Thread
>>64229520

>Free resources to get started
Get a good understanding of HTML, CSS and JavaScript.
https://developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://www.freecodecamp.com/
https://www.codecademy.com/
https://bento.io/
https://google.com - It's amazing, you should try it anon

>Further resources
https://youtu.be/Zftx68K-1D4 - Web Development in 2018
https://github.com/kamranahmedse/developer-roadmap - Roadmap
https://stackoverflow.com/ - Developers asking questions and helping each other

>Tools
https://jsfiddle.net/ - Use this and post a link, if you need help with your code
https://caniuse.com/ - Check browser support for front-end web technologies
>>
I fucking love PHP!
>>
when you create a new promise, is the only thing you need to pass through it is a function that handles the resolve and reject? i thought there were more states to a promise like pending, etc
>>
>>64278267
Before its resolved/rejected its pending, but that's nothing you set manually.
So the function only either resolves or rejects.
>>64278187
I don't like it
>>
>>64278372

When it resolves or rejects, let's say
 resolve("derp");
, what happens to that string ? Why is it important?
>>
So I've learnt some basic HTML, CSS and JS. However I have used Python quite a lot whilst doing scientific computing at school. Should I continue learning Python and move into Django or should I learn Node/Express?
>>
>>64278862
learn Apache and then NGINX
>>
>>64278501
it's the result of the promise and gets passed to .then()
(or other promise related functions that wait for resolves)

similar to how the argument for reject() gets passed to the .catch() as an error

have a look at this
https://jsfiddle.net/ow3vqdzw/

>>64278862
It's only an advantage if you know both.
If you like one of them better or get things done faster, then focus on that?
Node has a good momentum in growth and popularity, but Python is so commonly used as well, that knowledge in neither would be wasted.
>>
so I decided I will drop JS for my shitsite, what am I in for?

starting with bootstrap, any decent CSS only framework that supports responsive navbars (via whatever hacks) and have modals which don't fuck up the browser history?
>>
>>64279167
also, best way to show updates to the user instead of websocket?
>>
>>64279167
>any decent CSS only framework
Bulma

Whats your motivation for not utilizing JS?
It's likely to make things unnecessarily hard to develop and use.
>>
What's a good front end JS framework? Will be using it with Spring MVC (company wants to switch from ExtJs).
>>
>>64279494
Vue.
>>
>>64279167
Not a framework, but use CSS grids.
It is really easy to make your site adapt to the device you display it on.
It also saves you 90% of all divs which makes your site small and responsive.
As for updates, I don't see why you wouldnt use websockets and have full page reload as a backup.
It means you use some JS, but at least you use it correctly.
>>
>>64279256
it's an exercise and it feels much more snappy to me. Will also try to keep everything as simple stupid as possible

>>64279640
are grids supported though? I was going to use flexbox
>>
>Try to learn basics of something
>Guy starts using some confusing shit that's advanced as fuck and doesn't explain any of it
>Starts diving into super advanced things like it's nothing and autistically thinks because he knows it everyone else will
"Well okay I guess it's not importa-"
>Then another
>And another
>And another
>Then adds 5 more things I've never even heard of without explaining a single one, maybe they'll explain what it's used for eventually but never explain why or how it even works
>End up with like a bunch of shit I don't even know how to use, what it does, how I go to that but it just works because I'm copy pasting someone else's work


Should I just give up and try make shit and learn by failing like crazy and eventually figuring it out instead? I'm getting nowhere with all of these tutorials aimed at people who just want to copy paste and not actually learn or get things taught properly to them
>>
>>64280636
Building your own thing and figuring things out along the way might actually be the best way to learn something.
You don't get bombarded with shit you don't need and when you actually do need it, you have a real case to apply it to and therefore memorize it better.

Copy&Paste or basically reproducing someones code from a tutorial will make you complete the course, but not necessarily improve someones problem solving capability.
>>
noob question: im doing some js programming (vue to be specific) and theres this line that drives me crazy because i have no idea what that syntax is
new Vue({
...
components: { App }
...
})

why is that App variable wrapped in curly braces? i googled about 20 minutes now but i didnt find anything explaining that syntax.
>>
>>64281388
Object destructuring.
>>
What's the grace period for expired domains and how do I get them? There's this domain that expired 8 days ago I want but I don't want to shell so much thousands for it
>>
>>64281486
but in the examples i found online on object destructuring it's always the other way round, like this:
{a, b} = someObj;

what happens in the above example?
>>
>mom married neckbeard, learn suse / computer builds / repairs at 12
>drop out, learn html/css/graphic design at library
>get ged, go to community college, learned basic computer engineering skills, dual majored with information systems security for an extra year.
>Work at electronics repair shop for a year while in school, learned c and javascript, stopped using windows
>Work on a data mining internship off craigslist scrapping government data w/ perl.
>Got into electronics repair for 3 years fixing phones, tablets, computers, consoles, other misc shit
>Now work as tier 1 for last year and a half. So many indians, have wrote tons of one liners, websites, and automation scripts with bash and php.

I hate being a tech support monkey teaching old ladies how to setup 365 dns (no), or running Syed's webdesign business for him because he pays my company $14.99 a month.

Its mostly the management though, they force me to use windows instead of optimized linux workflows and impose a requirement of issues I must fix, even when I've fixed everything.

I have a git I've been building up and I'm at like a dozen fairly complex bash scripts, a few html/css/js sites, some WordPress themes, a WordPress plugin, some Arduino scripts, and I have some perl/c stuff I've archived.

I'm also in another dev internship and have learnt scrum, how can I get closer to a career in development? Is it at least better than supporting endusers with configuring linux servers and websites/email?
>>
>>64281388
>>64281486
>>64281535
it's not destructuring

it's a shorthand property
http://es6-features.org/#PropertyShorthand
>>
>>64281586
You must have a solid CV by now, i would guess.

What do you want to do?

Front end? Back end? Dev ops? full stack?
>>
>>64281642
thank you very much my man!
>>
>>64281586
The impression I get is your smugness/attitude are holding you back in life. At least keep a pin in your pocket so you can stab yourself during the interview when you feel compelled to vomit up some garbage about OS-wars.
>>
>>64281683
I have two decent resumes but still look at requirements and it seems like bachelors are standard in development.

I would consider myself full stack (with the addition of some embedded) but I really don't use databases where they're not necessary. I like WordPress have optimized the installs to perform well with lots of security hardening, but it seems like companies tend not to value a well built html/css/js page as much. Have considered starting a web hosting service on a dedi but freelancing scares the hell out of me.

>>64281764
>The impression I get is your smugness/attitude are holding you back in life. At least keep a pin in your pocket so you can stab yourself during the interview when you feel compelled to vomit up some garbage about OS-wars.

>>64281764
You're probably right, I've been working on being more humble but its a work in progress. I did just decline a position tripling my pay in support because they wanted me to work on an imac.

Call it what you will, I just dont like windows/macos workstations.
>>
>>64281947
refuse to work on mac but work on PC because you want to work on linux. What?

Also, if you are telling the truth you have everything you need to have a career as a developer. If you can't get a job it is 100% due to personality. Might have to start lower on the ladder due to no degree, but definitely wouldn't be doing tech support stuff with that much dev experience.
>>
>>64282056
Mac =/= Gnu/Linux

I really like stable fast linux browsers and terminal varieties, I work with a browser and a terminal predominantly so I don't think it's that out of hand. Multitasking is also better with autokey and more hotkeyable workspaces.

It's kind of like if you're a draftsmen and jobs want you to use tinkercad instead of Solidworks.

Thank you for the encouragement though anon I'll honestly try to be less of a fag.
>>
> Web Development General
> actual thread consists of people struggling to grasp the basics of software development

The is like a car mechanic forum full of people unsure of how to hold an electric screwdriver.
>>
>>64283627
>actual thread consists of people struggling to grasp the basics of software development
what do you mean?
>>
>>64283627
/wdg/ is shit. It's because there's a gold rush on web development right now. So many kids coming out of or going into bootcamps. /wdg/ reflects that. It's a poor man's stackoverflow. Anybody who actually knows what they're talking about should abstain from helping any of these plebs because /g/ is not a support board.
>>
>>64284864
>/wdg/ reflects that
webdev is expanding a lot, but /wdg/ is still fairly slow and one of the less active threads on here.
Would be great if people wouldn't ask the most retarded shit, that you can literally google in less time, than it takes to write up that post.
But those who mostly know what they are doing and are just asking for some directions usually make for interesting posts, since there are so many tools out there, that it's also often an opportunity to check out something new yourself.
>>
>>64285071
>webdev is expanding a lot
not for good tho and having 50 tools to do the same shit that could be done without popping out 100 files in the server is just nuts

it makes me laugh how every web dev wants to feel like a LAMP engineer now by using their JS frameworks just to not deal with JS directly, Web Devs are just over complicating everything every passing day its nuts
>>
Is it possible to make sticky div with absolute positioning? Or is there other way to make sticky div floating over other elements?
>>
Opinions on Arangodb, /wdg/?

https://arangodb.com/

Looking for a data store for my web application. I intend on using graph data in the future, and I'd end up tweaking a postgres relational database into storing nodes and edges, or rely on a different database.

It's not a relational database though, what do I lose out on here?
>>
>>64285279
>using their JS frameworks just to not deal with JS directly
Any framework still requires a proper knowledge of everyday JavaScript.
>Web Devs are just over complicating everything every passing day its nuts
Sometimes, but frameworks like React and Vue with declarative rendering and component structure also make things easier again and help to keep things organized.
Less complicated options are still there to use and if they are indeed better suited for a situation then nothing stops anyone to still utilize them.
>>
Maybe this is a stupid question but I used to do simple web dev as a hobby like 10 years ago, back then there was shit like Hostgator where you had CPanel web access to run everything. It seems like nowadays it's more popular to have a VPS and do your own dev ops with Linux? Or is that just for the "bigger" projects? Is there still some decent free web hosts that offer the CPanel style hosting for hobbyists?
>>
>>64286543

HostGator is a "middleman" charges an annual fee to keep your site online plus the cost of the domain

A VPS like AWS, can to host your shit, plus you need to pay the domain, unlyke the middleman, with a fixed price, here the price will depend on your traffic, so if you get DoSed or go "viral" you will pay a lot

If you just want a personal portfolio/website/blog with no databases behind you can follow Static site generator path, and self-host your site on GitHub or Netfly, you dont even have to pay for a domain if you dont want in this route and its totally free up to 1GB per repository
>>
>>64286758

Well back in the day I used Namecheap for domain names and not exactly Hostgator but something very similar (the same free/cheap plans with standard CPanel login).

I guess after doing some googling it seems that the main difference is that all the free/cheap CPanel hosting mostly supports PHP/MySQL, so I guess the people using the new shit like Node are the ones needing to do the dev ops themselves on things like AWS?

I do want to use a database and probably stuff like Wordpress (or similar), so I need something more than just literal static HTML pages, but I'm not doing some enterprise level Node projects. Anyways I was just wondering if the CPanel-type stuff was depreciated but after some searching it seems like it's still pretty typical.
>>
File: file.png (103 KB, 1180x795)
103 KB
103 KB PNG
The top is the download URL generated by clicking the download link in 4chan-X.
The bottom is the download URL when you go to the image URL and CTRL-S.
Why is there a difference between the two and what do I have to do to get actual URL instead of this blob shit?
Completely clueless with webdev btw. Currently trying to make changes to https://bitbucket.org/lfk/downloads-router-chrome-extension - the manager.js script.
>>
>>64287358
On a browser, when you download a file you download a blob (binary large object) that contains the data of the image.

A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.

So a java script program has to interpret a blob file and not an URL like the bottom case in your pic.
>>
>>64286543
Cpanel like stuff is for web hosting. Web hosting is usually optimized for certain requirements by being locked into one configuration. So it's fine if you want to host couple of WordPress sites in PHP web hosting but if your your requirements are more advanced or varying you probably want vps.
>>
>>64286856

Hosting providers are not really depreciated, its a service for people who dont know whats a VPS or a SSG or just want their own webpage deployed fast with no tinkering, they also handle most of the gears on the networking (DNS, IPs, etc...) so you don't have to (like pre-installing wordpress), and as i said it's more costly

They also charge you the fuck up if your traffic goes above a quota, just like a VPS, however you can host your site for as cheap as 1 USD monthly in a VPS (As long as only you use it), while NameCheap or hostgator will just charge you the fuck up in 1, 5 or even 10 years in advance, even if you have 0 visitors

i migrated most of my websites to SSG and i haven't paid a penny for hosting since 2015 so im good, (unless i need a database),

Whatever hosting provider you pick really depends on your need and what will you develop

Wordpress is based in PHP, and uses databases to work, but wordpress itself is bloated software, you should try some SSG, hugo or jekyll and see how they fit to you, you can still use JS, HTML, CSS to do anything you want, but nothing related to PHP or databases
>>
>>64287752
Thanks for the info man. What it sounds like to me is that this is something caused by 4chan-X, am I right? Like, could this be worked around by changing the download handling code in 4chan-X?
>>
>>64285355
>Site looks trash.
DROPPED.
>>
File: host.png (3 KB, 690x32)
3 KB
3 KB PNG
>>64287358
>>64288441
It's just the different hosts
>>
>Recruiter advertising for a "MEAN stack job"
>Mongodb, EmberJS, Angular.JS, NodeJS
Would... would someone really do this? Combine AngularJS and EmberJS and call it MEAN stack? Or is the recruiter just a moron who doesn't know what the 'E' in MEAN stands for?
>>
>>64289049
It has to the latter. E is always express.
>>
>>64288033

What's SSG? And which provider do you use that doesn't charge anything?
>>
Anyone else do gulp for task running but still use webpack for bundling?
>>
>>64289216
Static Site Generator

https://www.fullstackpython.com/static-site-generator.html
>>
Where do you guys download fonts? When I search for things I get a bunch of websites but some of them seem sketchy, and I'm never sure if it's the real font that I've downloaded or a knockoff.
>>
>>64291229
https://fonts.google.com/

kys
>>
>>64291244
A lot of fonts on there aren't freely available, they just link to where you can buy them.
>>
>>64291420
wut?


You literally just browse through the fonts available, pick one you like and click the plus sign and then import it into your HTML/CSS and that's it.

Nobody uses paid fonts in 2018 what's the point
>>
>>64291560
I had a specific font in mind, Bauhaus. I was able to find it elsewhere, so nevermind I guess.
>>
>>64278862
If it's Django vs Node/Express then definitely start with Django. Node is not ideal for every situation but just shines at the specific situations that it is good for, such as real-time apps.
>>
>>64290115
Fuck gulp, I just use the scripts directive in my package.json with bash scripts if necessary. webpack-dev-server does all the complicated parts of gulp anyway.
>>
I have a bootstrap example, but there is something in it I don't understand, it's to display a logo in the navbar.

<h1 class="pb-2 ml-lg-0 mx-3"><a href="#"><i class="fa fa-envelope-o fa-lg mt-2" aria-hidden="true"></i></a></h1>


Why is there a h1 there, I understand the classes attached are for spacing in bootstrap, so I am guessing that the h1 is being used as a container to position the link and the icon, but why an H1, isn't that bad semantically?
>>
File: yt_meme.png (33 KB, 1269x614)
33 KB
33 KB PNG
So how do we fight the plague that is youtube? All I want is to automactically load all videos, embedded or not, to start playing at 1080p or the highest settings if it's lower than 1080p.
The 2 only firefox addons that want to achieve this don't work because they call setPlaybackQuality() and according to the YT api that doesn't do shit because
>Calling this function does not guarantee that the playback quality will actually change.
https://developers.google.com/youtube/iframe_api_reference?hl=en#Playback_quality
I'm literally pressing buttons in my userscript to select the highest quality but it's whacky as fuck but works surprisingly well. I can't even see it open the menus it's so fast, but sometimes it stalls the video a bit.
var btn = document.getElementsByClassName("ytp-button ytp-settings-button")[0];
btn.click();
var menu = document.getElementsByClassName("ytp-panel-menu")[0];
var quali = menu.childNodes[menu.childElementCount - 1];
quali.click();
var qualimenu = document.getElementsByClassName("ytp-panel ytp-quality-menu");
var qualimenuchild = qualimenu[0].children[1];
for(var i = 0; i < levels.length; i++) {
if( levels[i] === 'hd1080' || levels[i] === 'hd720' || levels[i] === 'large' || levels[i] === 'small' || levels[i] === 'tiny') {
break;
}
}
var hd = qualimenuchild.children[i];
hd.click();

this is my hack that executes inside a part of the code of this addon https://addons.mozilla.org/en-US/firefox/addon/youtube-hd-1/?src=userprofile

What is the /g/ solution to this problem?
>>
I've been studying webdev on my free time for a couple of months now, got a couple of questions.

What's a good website to look for somewhat simple jobs just to test my skills?

Also, when I get to the point of making actually good websites or apps, should I just pay for hosting or I can get it down myself on the cheap with a raspberry pi?
>>
I run this small video "hosting" website,

What should I do to make it look/handle files better,
I am also looking into https://webtorrent.io/ to help keep the site alive during a video release, traffic isn't a issue, but the surge in hits is for the server.

I heard all the cool kids are using bootstrap these days, should I use that too or something else.

I was considering using a CMS, but I think the site would break when it gets a surge in numbers.
Also site security is a meme.

Site is: cheekyvideos.net ,


<3
>>
>>64293537
that's one cheeky website

>>64280636
what tutorial was that specifically? I feel like there should be enough basic tutorials that don't go overboard.
>>
>>64293388
weird, I am using yt high definition and videos still default to 1080p for me on FF nightly.
wtf is up with those letters in the pic.
>>64293455
you can, if you have a static IP.
Though speed and response times will always be better from a VPS. It's not expensive either.
>>64293537
you mean the traffic from streaming videos isn't an issue, but people just loading the site itself?
>I heard all the cool kids are using bootstrap these days
Bootstrap, Foundation, Bulma or something else is all fine imo.
You may prefer the 'class syntax' if you can call it that, of one over the other maybe, but they all get the job done.
>>
File: risingstars[1].png (162 KB, 1200x1183)
162 KB
162 KB PNG
https://risingstars.js.org/2017/en/

pretty interesting as an overview regarding what has gotten more common and popular in 2017
>>
Should you use git GUI clients? If so, which are recommended? I am on The Linux.
>>
File: 1505582792713.jpg (61 KB, 1000x800)
61 KB
61 KB JPG
I finally understood how to use vue-cli properly
>>
File: not1080p.png (84 KB, 534x170)
84 KB
84 KB PNG
>>64293997
Does your player quality stay on "auto" though? And does it stay at 1080p even when the video viewport size is kinda small (when you open the dev console for example to squish the video size down) like pic related?
Even with the addons active, my quality never goes away from the "auto" setting. Meaning youtube always adjusts the video res to the viewport size, which I dont want. Youtube on its own, without addons, gives me high res sometimes, but it depends on the viewport size and is not fixed, making it annoying.
Even on a clean nightly profile. When I fullscreen the video youtube changes to higher resolutions, but for me it's like you can't force youtube to give you a certain res, as the api doc says, unless you click on it manually, which fixes it.

>wtf is up with those letters in the pic.
I fucked 'em up with the liquid rescale plugin in gimp.
>>
>>64294487
>Should you use git GUI clients?
No.
>>
>>64293997
How's "not expensive" in numbers?

I'm not exactly a wealthy person.
>>
File: 1511625035673.png (11 KB, 455x340)
11 KB
11 KB PNG
>>64294487
>>64294574
I use GitKraken

>>64294600
~ 5$ + sales tax depending on your country will get you a VPS that is more than enough for small personal projects.
https://www.digitalocean.com/pricing/
https://www.vultr.com/pricing/

Or Scaleway for 3€ + tax.
You miss some extra features like automatic backups and the likes, but for price/performance they are unbeatable imo. (Their ARMv8 servers perform insanely well VPS. The cloud ones, not the baremetals)
Only have servers in western europe though.
https://www.scaleway.com/pricing/

this one isn't 100% up to date anymore but gives you a good overview
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
>>64293388
I think that one working solution was fucking around with embed code.
>>
If I want to implement a kind of BBCode parser, when do I parse it out, server side or client side? and I presume I parse it out after I escape HTML/XSS
>>
Is PHPstorm as good as people say?
>>
where can i find someone that finishes my end of degree project for me? i tried upwork and freelance.com sites but didn't find any non-pajeet to do it, are there any other good freelance sites out there? or ones that specialize in doing homework
>>
File: 1491513895276.jpg (65 KB, 800x748)
65 KB
65 KB JPG
>>64294496
how?
>>
>>64295808
Good day sir,
I can do the needful.
>>
File: 1491386042883.jpg (195 KB, 798x770)
195 KB
195 KB JPG
>>64295808
more joke
>>
>>64295666
Do you mean the code in the iframes on embedded videos or also on youtube.com itself?
>>
File: prettybox.png (3 KB, 204x131)
3 KB
3 KB PNG
>noob question
>how do i make those pretty boxes?

first time o /wdg/
>>
>>64296503
same, i'm here for ages and idk how to make those
>>
>>64278187
What do you love about PHP? I can't think a single thing that love about PHP, and I write PHP every day at work. It's an okay language to write, and it works, but I can't love it or like it.
>>
>>64296503
>>64296592

code

/code

but in []
>>
>>64296606
oh

for(i = 0; i < 100; i++)
printf("thx anon");
>>
I just want to make my navbar go from transparent when you open the page to a solid colour when you scroll down a bit

Why is this so hard in react I have to do a million things and in jquery it's like insanely easy

This sux wtf do I do
>>
File: 1512328835147.jpg (18 KB, 270x320)
18 KB
18 KB JPG
>>64295500
GitKraken looks cool and works, but at time when i was using it, it was taking too much resources.
>>64295714
It doesn't suck and does it's job at being ide.
>>64296606
like this?
[code
var f = function() { return function() {
console.log("test");}; };
/code]
>>
>>64296819
I just used jquery to do that.
>>
I have a question about MobX.
Can anyone show me an example of store-to-store interaction? I.e. when FooStore.x depends on BarStore.y.
>>
>>64281586
Hey dude, here's what I've been doing now, as a self-taught 29-year old aspiring web dev.

Write a full CV, putting every language and technology you kinda know on there. Write a nice cover letter, saying straight out that you have no real work exp as a dev, but you have lots of enthusiasm etc.

Start applying to any junior job where you kinda meet the requirements (at least 30% of the requirements). Even if they ask for a degree and X years of experience, forget that. As long as the ad is for a language you want to work with, just apply. I don't know where you live, but apply ALL ACROSS THE COUNTRY, everywhere, just apply, even if you would never consider actually relocating.

Within a few days you will start getting replies: tons of phone interviews. Even if your CV was full of shit, on the real interview DO NOT LIE, maybe fudge the timelines a bit if you've been unemployed, whatever. The results from these interviews will give you an idea of where you actually stand in terms of employability. Hopefully you'll make it through a few of these interviews, and they'll arrange for you to have a technical interview, be it live or from home. This is what you want. You want to take as many of these technical interviews as possible. AGAIN, take them even if you would never actually consider working for that company. You just want to see what skills real companies are looking for, what level of expertise they demand.

You will most likely fail most of these technical interviews, but no sweat. Just study what you don't know, and eventually, after 2 to 3 months of doing at least one interview a week, you'll be in much better shape. Then you start applying to the real jobs you want, confident with your interviewing skills.
>>
>>64281947
>I did just decline a position tripling my pay in support because they wanted me to work on an imac.

Um, you do know you can install linux on a mac, right?
>>
>>64296853
just ignore the *'s:

*[*code*] your code goes here *[*/code*]*
>>
>>64296997
    let tit: serde_json::Value = serde_json::from_str(&String::from_utf8(ffprobe_cmd.stdout).unwrap()).unwrap();
let title_name = tit["format"]["tags"]["title"].as_str().unwrap();
let pp = config.name.to_owned();
let p = Path::new(&pp);
if p.is_file() && !title_name.is_empty() {
let mut newname = PathBuf::from(config.name);
newname.set_file_name(title_name);
newname.set_extension(p.extension().unwrap());
fs::rename(config.name,newname);
}
>>
>>64296056
There is some html code for actual embedding and it can have parameters.
>>
Guys, is >>64250910
a good site? That is, chiru.no? Because holy fuck look at that index.php
>>
>>64295500
Thanks for the input.

I considered the Pi option also to gain some knowledge on how to set up a server, but I think my current ISP won't give you a static IP unless you pay extra.
>>
>>64296997
Testing.

if (anon) {
alert("thanks");
} else {
alert("faggot");
};
>>
>>64297634
>gain some knowledge on how to set up a server
May be even better with a VPS since you can easily make and restore snapshots or just reinstall it in 1-2 minutes, in case you ever need to, while experimenting with things.
>>
any1 else had this problem with? Im using Xamp and vscode.

When running my site directly via chrome (file), it works correctly. But when i do the same via localhost, then it suddenly errors out for some reason. It says uncaught ref exception, referring to a global function (which makes no sense, unless its reading an older file or something). When debugging it's going all over the place as if its reading an older version of the js file.

Git clone again or something? its very weird (and that function with the ref exception was made with the last git push).
>>
>>64298442
nvm fixed it. Chrome cached the old files. fixed itr with a cacheclearing extension
>>
Brainlet here, how would I be able to replicate something like this with JS and libraries?
http://devan.blaze.com.au/blog/2017/10/28/racing-along-building-a-telemetry-system-using-crystal-rethinkdb

(Not the website, His web app to plot real time data, how do I extract that data from a UDP stream, etc)

I'm learning JS, and I know html/css and Bootstrap.
>>
File: cache.png (3 KB, 219x107)
3 KB
3 KB PNG
>>64298667

>>64298744
Charting library of your choice and either sockets or WebRTC is my guess.
>>
>>64299056
>sockets or WebRTC is my guess.
Can you please follow up on that? Would something like these help?
https://github.com/websockets/ws#sending-and-receiving-text-data

https://developer.mozilla.org/en-US/docs/Web/API/WebSocket

Please point me to any resources or topics you think I should study for this. Thanks anon!
>>
I'm getting really tired of needing to import and learn new things over and over and over, especially now I'm trying to learn react I feel like I'm taking 2 steps backward then 3 forward if I'm lucky, everything just feels so backwards all the time while learning

Is Ruby a more all in one type deal? Like can I just learn things and use them forever or is it the same, just lots of new importing things and it just keeps adding on and on?

I just want to be able to open my text editor and be able to think of something I want to do and have the ability to do it without having to jump through 10 different installs and unpopular things so I can do an incredibly basic task. Fuck me.
>>
>>64299192
PHP. Thank me later.
>>
>>64299142
Yeah kinda.
There are many tools built around and ontop of the native socket capabilities of browsers.

The simplest and most popular would be something like socket.io
https://socket.io/
Their documentation isn't the best, but on the other hand there isn't much complexity in the first place.

Do you intend to interact with some 3rd party program and capture its output or are you creating both the server that sends out the data and just want to receive and display it in the browser?
Don't think there is a way, where you can just capture arbitrary UDP streams in the browser coming from other 3rd party apps.

Or rather what's the backend or app, where the data is coming from?
>>
>>64299363
Please read this if you can spare a few minutes, thanks.
http://devan.blaze.com.au/blog/2017/10/28/racing-along-building-a-telemetry-system-using-crystal-rethinkdb
Tldr: game dumps aa UDP packet structure at 20-60hz on an IP of my choice/localhost on port 20777. ( more on that here: http://forums.codemasters.com/discussion/46726/d-box-and-udp-telemetry-information ).
I don't know how to approach this actually. I need the data to update in (almost) realtime and also have a log.
So I'm guessing I'll have to learn node for a DB.
So what should the process be and what tools do I need, that's my question. Sorry I'm new and started studying DOM recently. What would your approach be?
Thanks again.
>>
File: 1506698250013.png (44 KB, 657x527)
44 KB
44 KB PNG
I am understanding Vue more and more
good feeling
>>
>>64300081
should I start with vue instead of hopping onto react straight after vanilla JS?
>>
Free learning resources and web-dev discussions.

https://discord.gg/wdg
>>
eww
>>
>>64299795
ah ok,

well you only need a DB if you want to store the data long term and keep it for future game session.
If you only ever care about the current data, then it should be fine to keep it in memory only.

You could use any kind of language you want for the backend here.
I haven't done it before, but looking at the Node docs, I think you would use the dgram module to listen on that specific port and receive the data from the game.
https://nodejs.org/api/dgram.html#dgram_udp_datagram_sockets

In the same app you would also have another server, that the browser can establish a socket connection to (socket.io server).

Every time you receive a packet on the UDP listener, you hand it over to the socket server and forward it to any connected clients, which will receive the data in the browser.
In the browser you can then display it in any way you see fit.

Ideally the server would also store the recent history as mentioned above, so you could connect mid-game and send the browser any data that was collected so far.

I would get a simple forwarder done if I were you, that just takes the UDP packages and forwards them to connected socket clients.
Make sure you receive the data in the browser and then worry about any long term storage and UI features.
>>
>>64300441
That gives me something to begin with. Thanks a ton dude/dudette!
>>
>>64300143
you should definitely start doing something
vue is easy and quick to start
>>
Does anyone know if there is any info on what types of landing page get what types of bounce rates for different website purposes.

For example, if you were making a website for a service, is it better to do one of those sites that has a big image with just a title and a "Find out more" type landing, or having more info.
>>
page 10
>>
What is a responsive alternative to html tables?
>>
>>64303297
Usually flexbox based grid/columns
https://bulma.io/documentation/columns/responsiveness/
https://getbootstrap.com/docs/4.0/layout/grid/
>>
>>64292191
But what if I have a more complex build process or really do need a task runner? Webpack is shit for those things, and on a significantly large team I can't expect everyone to know Bash
>>
>>64295703
Well, you're probably going to want a library of related functions that you end up using on both ends.
>>
>>64303297
Flex is the only way.
>>
>>64299192
>Need to learn new things
>React

React is all JavaScript. There's nothing new to learn.
>>
>>64278146
What firewall do you guys use on your servers?
>>
I see a lot of front end jobs want people who can layouts in Photoshop. Do people still make layouts in Photoshop with that splicing template shit? Or do they just use it for an image/mockup to pass off to the coders?
>>
>>64303704
I believe there's a program (only available on Mac) that can translate mockups into css/html quite easily. I don't remember the name but there no real need to hard code everything while designing
>>
Can anyone recommend me a great laptop (preferably 17 inch) for developing under $500? My current cuntflap of a laptop can't even run visual studio without shitting the bed.
>>
>>64303979
I've got a great 17 incher for your cuntflap, baby. ;]
>>
>>64278146
Is there an imageboard software anywhere that isnt fucking dead?
>>
>>64304248
17 inches huh, well you can literally go fuck yourself. :^)
>>
>>64303653
I use Windows firewall and use only ports I need for services open in my router. plus Security Essentials. Works for me.
>>
>>64303979
>visual studio

for fucking what? web dev?

Lel
>>
>>64304257
Well, in actuality, I only have a 5 incher, but the guy was asking for 17. :(((
>>
>>64304336
I use Sublime, that's all. Tried VS as an alternative.
I can't even use Atom on this laptop because it's so old and slow.
>>
Hey to you guys that work in an office and have a cs degree, is there a disproportionate amount of Indians? I'm in Canada but if you're from the states I would like to hear from you too
>>
File: 1514147394593.png (24 KB, 543x443)
24 KB
24 KB PNG
I was trying to use the 'fs' library for nodejs to open files and make changes to the lines between the tags '[foo]' and '[bar]'.
How can I manipulate the lines of text? I need to install 3rd party packages?
I don't want to use string functions but if you have a solution involving that, is welcome.
thanks~
>>
>>64304474
Let me guess, you work with a lot of immigrants? I swear Canada extends an open invitation to anyone (except not in Quebec).
>>
>>64305255
Nah I fortunately live in Quebec I just wonder if cs is a pajeet metup

Btw how many of you have a cs degree and are software engineers
>>
I have a problem. I'm using vue but I guess this could happen on any framework with reactive dom. I have a quite long(2s out of sight) slide out slide in animation when you change a selected X. The problem is that when I change the selected X the reactive values change instantly to the new ones while it's sliding out. I'd like the values to stay on the old ones while it slides out and then have changed when it slides back in.

I feel like I cornered myself by the way I built this thing, not sure how to implement it right now. Any ideas?
>>
>>64305724
I'm retarded nvm. It works if I just have a separate X for the ui that gets updated when I know it is time to slide back in.
>>
>>64303297
Just to cover the basics: media queries, dimension= x%, vh, vw, popular grid systems, and flexbox
>>
How can I get jquery/js to get the only text at a certain page and print it to a <div> on a page?

I'm using sinatra and say i got something like this:

get '/status/ram' do
"#{currentfreeram}"
end


I been trying this two things but it's obviously wrong (Idk js)

function getram() {
$.ajax({
url: 'http://127.0.0.1:4567/status/ram',
success: function(data) {
$('#ram').html(data);
}
});
setTimeout(executeQuery, 500);
}


function moreram() {
$.get("/status/ram", function(data){
$(#ram).html(data);
});
}


Could anyone pinpoint me on the right way or show an example? I been trying to google but I haven't found my answer for now
>>
so i guess theres no point in using promises anymore now that we have async/await?
>>
>>64303979
My Acer Aspire F15 does great.
>>
>>64307808
There are valid cases like looping through an array of URLs and making multiple AJAX requests.
You wouldn't await every single response, instead you add the requests promise to an array and then
await Promise.all(multiplePromises)
after the for loop.
After all async/await are still promises under the hood, just syntactic sugar.
>>
>>64306471

The second one is pretty much bang on, you just forgot the quotes around #ram
>>
>>64306471
Also, you should be able to just call currentfreeram without interpolating it, at worst just call .to_s on it.

And rename that function to current_free_ram to make it more rubyesque
>>
need some help implementing a cash register to deal with discounts and promotions. Here's my problem:

Promotions:
If someone buys 1 soda, they get another one for free.
If someone buys a sandwich and a chocolate, they get a soda for free.

Both promotions can be applied simultaneously. How do I keep my code from counting both promotions one on top of the other, if lets say, someone buys 2 sandwiches, 2 chocolates and 2 sodas?
>>
What's your opinion on this

Browser is the common platform to develop for, but instead of a public facing website, apps could be bundled as extensions
>>
>>64308434
This is called a "Business rule engine" and gets very complicated very quickly.

I'd look into libraries if you're doing this for a business but if it's for fun the theory can be very interesting and with implementing
>>
File: ayo.png (1 KB, 245x34)
1 KB
1 KB PNG
remember ayo ?
>>
>>64308434

What discount would the person end up wanting to use only? Do they get a choice? If so just make a conditional that meets both discounts and prompt the user to choose, once they choose, then apply just that discount
>>
>>64308780
Yeah, we all knew it will end like this.
>>
File: niabane.png (755 KB, 682x696)
755 KB
755 KB PNG
>mixing vanilla JS and JQuery
Please talk me out of this
>>
>>64309006
Jquery's former killer-feature is now a part of JS standard. No point in using it.
>>
>>64304383
Eh I hope you meant Visual Studio Code* instead of Visual Studio. VSC is a text editor, VS is a full fledged IDE.
VSC is actually pretty good and a solid Open source alternative to Sublime, it's also faster than Atom. All 3 of these are pretty popular for web dev though, pick whatever you like.
>>
>>64309017
What is that killer-feature?

All the tutorials on how to get to an array of values from different divs and append returned AJAX data were in jQuery
>>
>>64309017

looks like promises are way easier to do than with vanilla js (es6)
>>
>>64309059
>Visual Studio Code

technically you are right, the code is open and MIT licensed, however the product is not

consider the following

>https://en.wikipedia.org/wiki/Visual_Studio_Code
>It is free and open-source, although the official download is under a proprietary license
>https://code.visualstudio.com/license

>https://en.wikipedia.org/wiki/Visual_Studio_Code#Data_collection
>https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx
>>
Full retard here. My underline on visited link won't go away.

academics pls respond.

a:visited {
text-decoration: none;
color: red;
}
>>
File: visited.png (15 KB, 684x154)
15 KB
15 KB PNG
not that anon
>>64309064
JS does all the element selection without problems.
If are used to jQuery's '$' you could just set that variable to the browsers document.querySelectorAll
>>64309076
didn't even know jQuery also dealt with promises, but how is that any easier than await or Promise.all() ?

>>64309491
>>
WeakMap or node dataset for storing some data?
Is it worth going with WeakMaps when I already have a system for datasets where css also relies on dataset properites?
Any perf advantage of not using datasets?
>>
File: red.jpg (13 KB, 404x95)
13 KB
13 KB JPG
page 10
>>
>>64311481
people are busy working on projects instead of posting here
>>
>try to learn literally anything
>outdated
>>
>>64311990
some meme libraries yes, but everyone knows that there are certain things, that will be relevant for a long time.

Knowledge in things like Node, Python, PHP, React, Vue, Angular, Typescript, Electron, etc. will not become obsolete in the near future.
>>
>>64311705
Yeah, because what the world needs is more imageboards. Keep working guys!
>>
I'm trying to create a coming soon page and I have it all setup with a form for emails. But now I'm not sure how to actually handle the emailing part. Should I be using mailgun? Basically want to be able to send a user a confirmation/thanks email for signing up as well as be able to send out mass emails later for when the site actually goes live.

Is there not just some simple javascript I can add to my form and have it submit to an list?
>>
>>64312553
If you're not using a framework then you'll need to use SQL as well to save the email addresses.

Are you using any languages besides JS?
>>
I played a little with IIS with ASP.NET MVC5 and now when I access my project on localhost in the address bar i see the local path for the view instead of the router. How can I revert to display the route ?
>>
>>64312916
The IIS version is 6.2
>>
>>64312915
Flask, python and sqlite
>>
>>64312915
>>64313030
So I can store the emails submitted in a db. That's just a normal form -> db. I'm less sure of how to handle the emails and not look like a complete amateur.
>>
So i just read the MDN page on promises, and i still dont really understand them.

Am i just retarded? Like i "get" that they are for async stuff, but i cant even imagine me needing to write them- are they only for the functions that allowed people to make node and express?
>>
>>64312314
I know the library itself isn't outdated and useless but I mean the content I can find to help me learn it always is, trying to find half decent free content that isn't just "read the docs again lol" is hard

Once you get out of basic html/css/js and into react/vue/whatever the amount of decent free content for learning seriously dwindles down a lot.
>>
>>64313177
sleep function using promises
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
>>
>>64313030
>>64313174
Not familiar with Flask myself but most likely there are built-in functionalities that will allow you to dispatch emails. It should be really simple; when the form is submitted you grab the data, send a response via email, and store their email in the db.

Be careful with html emails, shits tricky yo. Getting them to display correctly in every mail client is hard. Use a framework for that too.
>>
>>64313467
Yeah when playing around with flask/python there definitely is away and they even have a mailgun api. I'm just not sure how to handle unsubs and getting nice pictures in the email.

Guess I'll just have to play around with it. Just use email formatters and then copy the html directly into a string?
>>
>>64313177
they're like a better replacement for (most) callbacks

- standard way to handle errors, no guessing what the arguments to the callback are
- easier to avoid callback hell, a promise of a promise gets "flattened" into just one
- they can be used with async functions which can be even even better for async stuff
>>
>>64313484
>I'm just not sure how to handle unsubs

In each email that you send you will need to add a link to unsubscribe. For example:

<a href="https://my-domain.com/unsubscribe/user-token-from-db">Unsubscribe from mailing list.</a>


You'll need to have token for every email address you save in the db. That way when a user navigates to the unsubscribe page you grab the token from the URL then delete the associated row from the db.

>Just use email formatters and then copy the html directly into a string?
basically, yeah.
>>
>>64313177
>Like i "get" that they are for async stuff
yes that's all it is in the end.
You query another server, a database or wait for any other event, but don't want to block execution of other JS code in the meantime.
You put it all in a promise and send it off and whenever a reply comes in, the JS engine can pick up the code from that point again and continue with the response.

The JavaScript event-loop is at the core of that pretty much.
Not sure if you have read up on it yet, but if you haven't then you 100% should, as it will let anyone understand how callback/promises/async work in JS much better.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
https://www.youtube.com/watch?v=8aGhZQkoFbQ
>>
>>64313597
Okay, actually that's not near as hard as I thought.
Is mailchimp for filithy casuals and devlets then?
>>
>>64313177
They're mostly used when fetching remote data; you don't want your program waiting on that request (that could end up timing out)
Make a program that fetches a random image from a booru, given some set of tags. That helped me get a better grasp on promises/async.
>>
File: Capture.png (504 KB, 1267x920)
504 KB
504 KB PNG
Someone please recommend nice fonts
>>
>>64313177
>i cant even imagine me needing to write them- are they only for the functions that allowed people to make node and express?
if you have a function that can't get its return value instantly (like if it needs to request something from a server or read a file or just wait for something), you can return a promise instead and then resolve the promise with the result when you get it (or reject with an error if something went wrong, and it can be handled by whatever code called your function)
>>
>>64313739
font-family: "SF Pro Display",
"SF Pro Icons",
"Helvetica Neue",
"Helvetica",
"Arial",sans-serif
>>
>>64313739

Comic Sans.

Wingdings.
>>
>>64313784
Nice. Really like the SF Pro (too bad I can't get this) and the Helvetica Neue
>>
Why are there so few Elixir/Phoenix jobs, and why are they all senior dev positions?
>>
>>64314030
>Why are there so few Elixir/Phoenix jobs
almost no one programs in those languages

> why are they all senior dev positions?
because for those who do, they want someone with experience and not some fizz buzz type of people.
>>
>>64313739
Just go to google fonts and choose one serif font you like for headings and one sans serif for paragraphs, works for me.
>>
File: 1515962647622s.jpg (5 KB, 209x241)
5 KB
5 KB JPG
How can your website listen for HTTP POST requests if it's a static hosted website and not running a server( listening for connections) ?
>>
>>64314569
it can't
>>
>>64285355
You're probably better off with postgres in all but the most niche use cases. Your edges can be join tables on other tables (nodes).
>>
>>64315888
anyone?
>>
File: Capture.png (14 KB, 465x372)
14 KB
14 KB PNG
>>64314530
Just tried this combo. Quicksand for the body, Amarnth for the titles. I like it
>>
>>64316141
here you go laddy
https://github.com/kennell/imageboards
>>
Finally got my site up on linode. However one of the images in my img/ folder is 403ing.

I think it's because the image got corrupted in transfer. So I've been using filezilla to reupload but it's still 403ing. I've restarted apache. Weird thing is I can access all other images in that folder.

Any advice would be awesome.
>>
>>64316536
whats the name or path of the image?
Anything that's different form the others? Tried renaming it?
>>
>>64316593
Thanks for that. For some reason the permissions on that one file were different from all the others. After changing it to read only it works.

Thanks man.
>>
(wordpress question)
Hello everybody, I have a city situation here(like city wok)
I want to do the exact same thing that slashdot did several years ago with https://slashdot.org/ and https://beta.slashdot.org/ .
They had a different design and different platform on the beta subdomain but it shared the article and user db from the main website.
Both main and subdomain sites will be on wordpress, but I don't know if that functionality is offered but the so called "multisite" feature.
I want all the article+user db to remain intact and I want it to be visible from the sub-domain.
Later on, ofc I want to move the sub-domain into the main top domain and then park the old site...ofc while keeping the db intact.
Any help's welcomed.
>>
>>64316518
nice, thanks m8, sad that none of those uses sqlite, but at least some of them are written in Go.
>>
how do i hax websites like furaffinity?

timothy from school keeps BOTHERING ME and i want to get him back for all the pain he has done to me...i wanna hax his account so he'll NEVER bother me again

tl;dr - What should I look into for website security? Know HTML/XML/some JS web dev wise.
>>
>>64317050
Forgot to add MySQL/Oracle too.
>>
>>64317066
ask >>>/g/sec
>>
File: CDA7o.png (127 KB, 600x857)
127 KB
127 KB PNG
I don't know if programming is making my life better or worse.

On one hand creating some cool thing out of nothing is so insanely captivating, that it becomes better than any hobby I ever had, but while doing so I keep neglecting important real-life tasks.
>>
>>64316770
clone the whole thing you already have, move it to the subdomain and make changes there?
be careful though, I'd guess some changes may affect your main website and fuck it up

>>64317281
leave IT if you can
>>
>>64317275
>no thread up

I'll keep looking then. With all these breeches going on it's hard to keep track of all security.
>>
>>64317319
>leave IT if you can
I wanted to become a Buddhist monk for a while.
In a sense I still find it interesting, but the times I went for long meditation practice away from everything never turned out well.

It's a problem with moderation.
I am rarely interested in doing something only half-way and when there is something interesting I dive into it 200%, even if everything else suffers as a consequence.
>>
Currently learning go. What's the best frameworks for building rest API with go?
>>
const myFunc = function() {..}; 

or
function myFunc() {...}; 
>>
>>64317777
myFunc = () => {...};
>>
>>64317812
Personally, I like seeing the 'function' reserved word in a function definition (that isn't a callback or something)
Easier to read, imo
>>
>>64313571
>a promise of a promise gets "flattened" into just one
thank you for mentioning this, I had a sneaking suspicion I was using them incorrectly
>>
bampu
>>
>>64317777
>const myFunc = function() {..};
This is retarded.
>>
>>64317050
Is this pasta?
>>
>>64316770
If you want to have a setup this complicated then you shouldn't be using wordpress.
>>
>>64317281
>important real-life tasks

Like what? Keep learning, get a comfy web dev job, make money, spend it on your "important real-life tasks".
>>
>>64278146
im thinking of making a full stack web application just for myself. cant decide whether to use a java based stack or c# based stack. i have experience with both. planning on using sql db, bootstrap and angular front end, and either java or c#, with either aws or azure cloud depending on which i choose for the language. any reason to choose on over the other? i have experience with both languages, little more with java.
>>
>>64320261
There are more C# jobs in general I think, so if you want to show off your work in the future while looking for a job, then go with it. Otherwise just flip a coin or something, both Java and C# are fine for back-end.
>>
>>64278146
I recently wrote a chat application that relies on PHP and MySQL. I recently read a comment somewhere that this is a bad choice for a chat application and it isn't scalable. I doubt more than a dozen people will ever use what I've built, but if I were to write a chat program for thousands of simultaneous users, what should I use?
>>
>>64320744
To expand on this, I'm thinking that instead of having users query the database directly to retrieve messages, they could instead be served a text file that is generated server side and incorporates new messages as they come in.
>>
>>64320261
>aws or azure cloud
I have only ever hosted my own sites, can someone describe to me how these services work?
Are they similar to DigitalOcean?

>>64320187
why
>>
>>64320820
>azure or aws

Also asking this. How do i learn these things, is there any free package for mw to learn? Can i fuck up those free packages if i "overdo" it so i have to pay something in the end?
>>
>>64320872
both services are allow you to set caps on usage, so you cant really over do it. my company paid for an msdn acct for me so i get 75$/month on azure, with the $1.5k subscription. and aws had 6 months free for students (or possibly new users) for some of there services, again limited. for the most part, unless your user base is over a few hundred people hitting you api or backend several thousand times a day, i doubt youd owe more than 30$ a month for either.
>>
>>64320948
Excellent answer, thanks.

So, for example, i can set limit to 1k monthly requests to my api?
>>
File: 1515905523066.jpg (1.39 MB, 1280x720)
1.39 MB
1.39 MB JPG
hello, im building a chrome extension and want to readin text from the webpage im currently on once my button is clicked.

I have the button clicking calling a function in my javascript class, is there anyway I can read in the html contents of the website I am currently on? Or via the site url? I have the website url stored as a variable.

Baisically I want to read the text html contents of a webpage in as a variable. So that then I can do parsing etc...


thank u
>>
>>64321098
elem.texContent may be what you are looking for
>>
File: nts1.png (235 KB, 601x653)
235 KB
235 KB PNG
>>64321174
ive gotton some success with XMLHttpRequest, although might not be printing out all the info I need
>>
>>64321194
Why are you sending HTTP requests to fetch content of a page you are already on? I don't think I understand what you're trying to achieve here.
>>
>>64321269
its for on online radio station https://www.nts.live , they upload mixes afterwards on their mixcloud. Im trying to make something so that if you hear something you like being played live you can hit a button on the extension and it will gather the data from the html site like the name of the mix and when it was played. and then somehow check the nts mixcloud if that mix has been uploaded yet
>>
File: code2.png (167 KB, 1920x1080)
167 KB
167 KB PNG
>>64321194
okay I followed part of this guide:

https://stackoverflow.com/questions/11684454/getting-the-source-html-of-the-current-page-from-chrome-extension


which saves the target_website_html_contents as a div on the html page which is displayed in the extension. But I need to pass this target_website_html_contents as a string variable back into my main javascript function which is called when a button is pressed, any ideas?
>>
>>64321958

Just use the fetch API and return the response as a string.

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
>>
How to build a p2p/distributed forum?

Really simple, people can post comments (not even need to be threaded) others can looks at. I don't even know what I need to search for. Is blockchain a suitable buzzword for this?

The main motivation here is I don't want to maintain a dedicated server/db.
>>
>look up random famous people
>some of them have incredibly basic/bad sites that even I could make after a few months of learning, probably in my first week to be honest
>always made by some company who just make the same site and then put different images/colors and resell it as a new product
>they probably got paid mad money for it too

example: http://www.craigdavid.com/

(the enter site button is at the bottom lol)

How do they get away with it
>>
>>64322588
>http
>Copyright 2014-2016. All Rights Reserved. Site by Nephew Media

jealous af
>>
>>64322588
I was expecting to see a different person when I entered this site.
>>
>>64320744
sockets would be the logical choice.
Is it one room, multiple rooms, private messages, etc?


But I would say normally, when a user connects you check the DB once and send anything they might have missed and from that point on just forward new messages to their sockets.
>>64322286
>How to build a p2p/distributed forum?
WebRTC can do direct client2client I think.
>I don't want to maintain a dedicated server/db.
I mean a new client needs at least know where to connect initially.
Some server that's guaranteed to be available, where it can get more info about other connected users.
>>
>>64322652
I am jealous but it kinda brought me down to earth, I don't need to make everything perfect for people to actually pay for it eh, damn.
>>
>>64323359
if anything, that underlines connections are more important than the actual service or product. Good luck competing in a nepotistic market
>>
>>64323700
Is Bootstrap 4 ever going to be finished or did Twitter just give up on it? All major browser vendors have fully implemented native CSS grid months ago and BS4 is still in beta (and broken as fuck).
>>
are there any addons or tools to get CSS for only one element? I.e i want to get the css for the navigation bar .
>>
>>64325227
Browser dev tools.
>>
In Vue
I made a Loader component that wraps another component, that will in the future (not rn) have a lot of shit to be loaded
And I want the Loader component to display a loading animation while the child components are loading
How would I go about achieving this?
Also I would wanna test this putting setTimeout somewhere, cause now there's barely anything to load so I wouldn't see the loading screen
>>
File: driving_me_backwards.jpg (123 KB, 920x920)
123 KB
123 KB JPG
>tfw you got a job as a webdev
>tfw your only experience was browing /wdg/
>tfw 6 months later you're not even koding anymore you're just telling someone else what to do and how to do it
>tfw that guy has been working there longer than I have
thanks lads, I couldn't have done it without you guys
>>
Hi,

I am new to CSS and I am learning the Box Model right now.

I made a web page with several images and have actually only one question pic related.

The size of the whole element is apparently 240x288. But when I count the box element-sizes of the Box Model separately I come up with 250x298.
Am I not supposed to count the border (if so, why?) or what am I missing?

Thx!
>>
>>64325563
I would probably do it the other way around.
Have the loader-animation-component inside the component that's loading stuff (call it content-component here).
Inside the content-component you can overlay/show the loader-animation-component by default and then flip a Boolean once everything is ready and hide the loader-animation and show the content instead.
>>64325651
https://css-tricks.com/international-box-sizing-awareness-day/
allowing different values for box-sizing was a mistake.
Set it to border-box on all elements.
Normalize/Reset css files will usually have that included as well.
>>
>>64325793
>https://css-tricks.com/international-box-sizing-awareness-day/
I know the box-sizing property. Nevertheless I would like to know why there is a difference.
>>
>>64325870
Because it goes outside to the margin, that's why your element is larger
>>
>>64278146
>need to use phpmailer for a project
>failed to instantiate smtp server

dude. really? i've been at this for an hour now and have seen countless others encountering the same shitty issue with this faggot class.

edit: >new gook nigger moot thinks my post is spam
fucking hell
nothing is going my way today
>>
It took me a month just to research all the technologies to use before I started my first node project and then within that month everything changed so had to research again for a few weeks and got ready to start my project and then I looked at the github rising stars and well there was this new hot frontend framework and so I had to read through all its docs and....
>>
>>64278146

I know SPAs are all the rage today but what is the modern maintainable and testable approach to HTML5+CSS3 that is only subtly enhanced by JavaScript?
>>
>>64325870
where do you see the 250?
>>64325911
>within that month everything changed
what changed?
>>64325925
Some static site generator probably like jekyll, hugo, hexo, gatsby, etc. for managing more more than just basic site structures, but no reason you couldn'T get away with a simple HTML+CSS size from scratch.
>>
thoughts on this?

http://www.indofolio.com/
>>
>>64325964
180+20+10+40=250

>>64325903
I really don't think that this is the reason.
I just increased the 'width' and the difference is still 10, although all numbers are bigger.
>>
>>64325966
ok, that's really impressive.
Not just from a technical standpoint, but also the whole presentation.
Especially that it's not loading in 10MB of useless resources that dev portfolios normally do, yet still manages to show off more.

>>64326039
isn't it
10+20+180+20+10
?
>>
>>64326066
>>64325903

Yeah I am an idiot, sry. I see it now!
>>
>>64321074
at MS last RedShirt dev conference they said this, yea. i'm sure aws has the same but i haven't used it in over 2 years. but no way they would leave that out if their biggest competitor has it
>>
ruby on rails worth getting into now?
>>
some IT ventures develops website with rails, rails facilitate a speedy development. but its server cost is high, so when website get on the right track, recommend to change to java server.
>>
Would someone be willing to help me with a database thing? I need to select an item from a table with a certain ID, and then use that ID to identify another item in another table, but I don't know how to do it
>>
>>64322035
hi, so I used the fetch API following a couple examples but im still a little confused, I want the html contents returned as a string, but doing something like:

var stuff = fetch('https://www.nts.live/schedule')
alert(stuff)

gives me an alert that just says [object promise] '


am i missing parameters here or something?
>>
>>64327429
Actually nevermind I figured that out myself

But could someone please tell me how to use PHP within PHPMailer's Body? I'm trying to use a foreach loop but it keeps telling me that the arrow was unexpected!
>>
>>64327429
>>64327429
subquery
SELECT * FROM table_one
WHERE id = (SELECT id FROM table_two WHERE id = 01);


or inner join
SELECT * FROM table_two
INNER JOIN table_one.id ON table_two.id
WHERE id = 01;


Someone please correct me on my syntax I'm not sure I got it right.
>>
>>64327449
fetch returns a Promise object
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
>>
>>64327522
so I guess I have to wait until the promise is fufilled? I've tried handling it so that it goes to a function onFufilled when the promise is fufilled and i get the html website info but that function is never called, is it supposed to take a long time?

var stuff = fetch('https://www.nts.live/schedule')
alert(stuff) //prints out [object promise]
promise.stuff.then(onFulfilled(), onRejected())

function onFulfilled(){
alert("fufilled")
}
>>
>>64327180
lurking4dis
>>
>>64327643
fetch('your url')
.then((response) => {
alert(response);
})
.catch((err) => {
alert(err);
});


something like that
>>
>>64327837

I did this function, but
  var stuff = fetch('https://www.nts.live/schedule')
.then((response) => {
alert(response);
})
.catch((err) => {
alert(err);
});
alert(stuff)


I still just keep getting [object Promise] as an alert, am I missing something? Do I need some permission to use fetch on a website? Is there anything I'm forgetting to import for fetch to work? Thank you for helping me
>>
How can I successfully grab an expired and expiring domains without resorting to auctions?
>>
>>64327837
To clarify, the onFulfilled and onRejected functions are invoked when the request is completed or fails respectively. With
.then((response)...
we tell the Promise's onFullfilled function what to do with the response when and only when the request has completed.
.catch((err)...
specifies what to do if there is a connection error, and hands you the err object, just as we get the
response
object from .then on a successful completion.

Note that fetch will return a response object even if the request fails with 404 of 500 status codes.

>>64327905
Fetch is an asynchronous function and will not return a value to be stored in
var stuff
. Any data from the request will be returned in the response object in the .then callback (onFulfilled).

stuff should remain undefined I thnk
>>
>>64327982
is it possible to use fetch and get the html contents of a webpage as a string? how do i get the response object from .then callback?

        stuff = fetch('https://www.nts.live/schedule')
.then((response) => {
alert(response);
})
.catch((err) => {
alert(err);
});
alert(stuff)
promise.stuff.then(onFulfilled(), onRejected())


}

function onFulfilled(){
alert("fufilled")

}


would it be something included in the onFufilled function? do I need to pass the promise into that function and then do something like promise.thenCallback to get the html contents as a string?
>>
File: 1513320323140.jpg (41 KB, 500x375)
41 KB
41 KB JPG
>>64328072
>promise.stuff.then(onFulfilled(), onRejected())
fucking hell anon, what are you doing
just read the docs about promises on MDN and try it out on a simple example, where you resolve it async via setTimeout or something
>>
>>64328072
Forget about onFulfilled and onRejected for now.
When you make a request with fetch it takes some time to get a server response back. Until that happens any other code will run. When we DO get a response the anonymous function we are passing to .then:
(response) => {...}
defines what we do with the data returned. The response object should have your requested data somewhere in it, sometimes on the .body property. You'll have to refer to the API documentation of the URL you're requesting from to know where to look.

You need to know about callback functions and asynchronous code to really understand this.
https://developer.mozilla.org/en-US/docs/Glossary/Callback_function
>>
>>64328164
I dont know if this method Is right for me, I previously tried this which was described in this post:

https://stackoverflow.com/questions/37336057/how-retrieve-html-content-of-active-tab

using methods like this which got the page html and assed it to a div element in the html body of the extension. I tested it out and it worked fine, so i was trying to change the code so instead of inserting the html_contents string into the div contents, i could hold it as a string variable to do any manipulation / parsing needed
>>
>>64327180
If you have the spare time, it never hurts to broaden your skillsets. For fun/personal projects? Hell no. I have a massive soft spot for Ruby, but Rails is a bit garbage.
>>
>>64327180
>>64328794
ruby is worth it if youre into CI/CD pipelines. pretty sure Jenkin scripts are written in Groovy, which is like Ruby
>>
>tfw it clicks after 3 days and you feel like a retard for not getting it
>>
File: how_do.png (18 KB, 975x508)
18 KB
18 KB PNG
How can i achieve pic related with CSS/JS?

basically i want to implement a way to show the rest of the buttons
>>
Could someone write me a simple PHP-SQL line to subtract a value from a table?

The general syntax is
UPDATE products
SET inventory = inventory - 1 (this isnt working fucking hell)
WHERE productID = productID

I have no idea how to get this to work inside of a PHP function (I dont know SQL).
>>
>>64329550
>WHERE productID = productID
Lol
>>
Does anyone know how to fix this so both layers of the navbar act as if they are in a container, but the background color stays at 100%?

Everything I try fucks something new up.

https://www.bootply.com/jbUgfxKBRF
>>
>>64329824
put it inside another div, that's always fullwidth with the bg color
>>
I'm trying to learn react and it's killing my brain

why do people use es6 and then not es6 and then the next guy is using the wrong fucking version and then the next dude isn't using create-react-app and sets up his entire shit differently and the dude after that is using 50 different packages out of nowhere to do basic shit nobody else is aaaaaaahhhhhhhhh

why are people so autistic just do the same thing as everyone else fuccccccccccckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
>>
>>64329938

The problem with that is when I go into mobile size, the menu toggle only includes the top navbar.
>>
Is Treehouse a good place to start learning?

I have a bit of background in basics with HTML, CSS, JavaScript, C#, and Java. Although, I haven't touched code in over two years and I'd like to get back into it, I'm just not sure where I wanna start.

I'm not even sure if I wanna do back end or frotn end, I just know that Java and JavaScript are both popular in the city near me and I did enjoy them both. I just didn't like HTML and hated CSS, and struggled with Java, but enjoyed when I worked exclusively with JavaScript while learning.

Is it even possible to be a front end developer that almost exclusively works with JavaScript?
>>
>>64330127
I used them for one month in the beginning and don't regret it.
You can simply speed through the videos on 1.5x and get a lot out of it. Just don't get stuck on those sites forever, since working on your own projects is always much more productive and better for learning things in the end, but it's good if you need a kickstart.
>>64330124
>navbar-nav
sometimes those css classes just have horrible names. i guess in this case they also depend on being direct children?
For something simple as a nav-bar you should be able to come up with your own solution and just forget about those classes, if they make things harder than necessary.
CSS frameworks are always a tradeoff. They are not bad and allow you to get things done quickly, but you can lose control if you rely on it too much.
>>
Should I start with HTML, CSS, or JavaScript first?
>>
>>
>>64330638
>>
>>64330646
>>
File: web dev path 2018 dev ops.png (465 KB, 1360x1717)
465 KB
465 KB PNG
>>64330659
>>
What's the difference between website development and web design?

HTML and CSS seem more design related, to me, but it's what web devs use.
>>
what about https://www.theodinproject.com ?
>>
>>64330611
Maybe HTML+CSS for the very start, but really no reason to learn them all together.
>>64330674
Webdev covers pretty much the whole thing. Check the images above that the other anon just posted.
Web design makes me think more of someone concerned with UI/UX, accessibility, color harmony, layout, mockups photoshop etc.
>>64330681
They are heavy in Ruby afaik.
Don't know much about the language to say whether it's good or bad, but for webdev it lost popularity over time and might not be a good time investment, when you could learn other things.
>>
>>64329527
BUMPERINO
>>
File: 1494746189714.png (1.5 MB, 1400x1400)
1.5 MB
1.5 MB PNG
>tfw you finish all of your projects for the semester in just one week
>no tests and no final
>funbucks will arrive soon
time to get c o m f y
>>
>>64330918
>bare minimum effort
this niqqa lmao
>>
>>64330727
Is Ruby on rails different? I mean, is it worth the effort?
>>
Does someone have insights on using 'ufw' on the server vs creating a firewall policy in a VPS providers interface?
Are there specific advantages to either method?

>>64330978
It's the de-facto web framework for ruby as far as i know.

Only a very rough selection of backend-tech, but you can see the trend there.
It's still used widely, but expect the ecosystem to shrink.
>>
>>64331131
thanks anon
>>
>>64330918
Honestly, >>64330951 .
What this says to me is "I'm happy I just finished the project! Thank Pepe I don't have to code anymore!". Not "I enjoy coding, so I made it my own!".
>>
>>64330674
Web dev makes things work and is more focused on the hooking up the 'mechanics' of the website. It's slightly less directly artistic.
Web design is focused on, to be as unnecessarily simple as possible, making things pretty. A good web designer will be able to attract audiences by focusing on attractiveness, usability, etc., and it's often tied pretty closely with UI/UX design.

Keep in mind that the fields often blend together, but there ARE distinctions. For example, you're rarely ever gonna hear about a 'fullstack web designer', since web design is usually exclusively front-end, user-facing stuff. And if a web developer job asks you to convert photoshop designs, or something clearly design-oriented, be concerned.
>>
>>64330611
The usual pattern seems to be HTML, then CSS, then JS, and here's why:
Imagine we're building a house. HTML, CSS, and JS are all gonna be parts of our building process as follows:
HTML is the overall 'shape' of the house. It'll generally be stuff like how many windows there are, whether it has a s[spoiler]css[/spoiler] dungeon, etc. Without the HTML, your house doesn't really exist, and the other two bits really build on the HTML/CSS
CSS is the 'design' of the house, and refers to things like the positions of the windows (somewhat), the colors of the curtains, and other stuff. It makes the house look pretty, but it isn't STRICTLY necessary to make the house 'work'.
Finally, the JS is the wiring in the house. It makes it so that if you flip a switch in the entrance, the light goes on. Or pressing a button in the kitchen opens the garage. It's generally the most complex (and not-really-necessary) of the 3, so should be learned last.

In addition, the output of CSS requires there to be HTML to already exist on which to act, and the output of JS requires CSS and HTML on which to act.
>>
File: 1514635114515.png (350 KB, 1280x1534)
350 KB
350 KB PNG
>>64330951
>>64331325
>bare min effort
>implying
I spent eight hours today debugging one of my projects to make sure there were no bugs or errors left behind.
Kiss my ass tbqh.
>>
File: 1512965232336.jpg (52 KB, 570x630)
52 KB
52 KB JPG
Can someone explain redux/ngrx to me? Every video I've watched just confuses me even more.
>>
>>64331131
>that steady climb of nodejs
comfy
>>
Can anyone recomend the best way to retrieve all the html DOM content of a url in javascript? I'd like to have this info saved in a string I can parse
>>
How does one authenticate a request from one web service to another?

I have a website where the user logs into his account, and that website has to make an ajax call to another webservice.

I figured the user would have to have some kind of API secret in his session data which is sent to the web service. Should this key expire? How would the website go about getting a new key from the backend service?
>>
>>64278146
Ember is the best Javascript framework. Prove me wrong.
>>
File: prpE0Mt.jpg (387 KB, 1195x1593)
387 KB
387 KB JPG
>>64333649
You're still trying to do this radio extension thing? Contact them and ask if they have some kind of API you could use to fetch JSON data with currently playing track and go from there, scraping this info directly from HTML is not a good way to do this.
>>
>>64333738
Ember is deprecated, React and Angular are only framework that matter right now.
>>
Yo, weblords.
How do you normally go about implementing swipe gestures?
Video related.
I've got a ``working'' demo in Chrome (doesn't work on my phone)

I also want to allow the user to be able to use the entire page area for their swipe gestures, but that means I need them to be able to swipe through the buttons.
Not sure how to go about doing that.

I use React and bind onTouchStart, onTouchMove, and onTouchEnd to the background.
I think I can just bind the same functions to the same listeners on the left/right arrow. Seems ghetto to me, but effective.
>>
>>64334456
ok i might tr contacting them, the way I was going to go about doing this was to get the html info and then look for the current playing mix. If you do inspect element on the page and view the html dom file there are tags for {liveOn1:} and {liveOn2:} that tell you exactly the name of what is live. I was just going to get the page html data and then look for {liveOn1} to get the mix name. Seemed logical in my mind, anmd I know it cant be that hard ot get the html contents form a webpage




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.