[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: 313
Thread images: 36

File: wdg_432968.jpg (161KB, 824x553px) Image search: [Google]
wdg_432968.jpg
161KB, 824x553px
Weeb Dev general

>old thread
>>60918692

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

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
https://www.codecademy.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Further reading/viewing
https://www.youtube.com/watch?v=sBzRwzY7G-k
https://github.com/kamranahmedse/developer-roadmap
https://github.com/getify/You-Dont-Know-JS
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
https://www.codewars.com/
https://www.hackerrank.com/
https://codefights.com/

>Useful resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://libraries.io/ - Discover and keep track of open source libraries, modules and frameworks
https://stackoverflow.com/ - Developers asking questions and helping each other
http://www.programmableweb.com/ - List of public APIs
https://caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
https://www.youtube.com/derekbanas
https://www.youtube.com/learncodeacademy - codecademy
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
https://www.youtube.com/user/TechGuyWeb - Traversy Media
https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
https://www.youtube.com/user/shiffman - coding train

>cheap VPS hosting in most western locations
https://www.digitalocean.com/
https://www.vultr.com/
https://www.linode.com/
https://www.scaleway.com/
https://www.heroku.com/

an in-depth comparison of hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
second
>>
Third for I hope javascript meme ends soon.
>>
>>60948614
wasm
>>
First for Keep Your Hopes Up Boys, We're All Gonna Make It
>>
Work has a mostly static wordpress site. It's garbage - the company that did it didn't optimize anything. It's getting 60/100 for mile on PageSpeed Insights.
I've used WordPress before as part of a course.
So do I attempt to salvage the fuckery of broken links and whatnot on WP or just try learning coding from scratch to fix it?

I was hired for IT but I have a lot of spare time so it's not an urgent thing, hence me wondering what the best practive is.
>>
After a few days of studying and practicing, I have a basic understanding of html, css and javascript.

I just downloaded Adobe Muse and Animate CC 2017

what do
>>
File: no.png (2KB, 327x62px) Image search: [Google]
no.png
2KB, 327x62px
>>60948792
>Adobe Muse
why?
>>
>>60948792
If you're using anything more than a text editor, you're doing it wrong.
>>
Im liking the new op images.
>>
File: mock-up.png (26KB, 837x365px) Image search: [Google]
mock-up.png
26KB, 837x365px
Is building a forum system from scratch too big a project for a webdev beginner to start working on?
>>
>>60949092

That's a reasonable thing.
>>
>>60948480
Still looking for any insight on my >>60947328
post.
>>
Is it worth using <thead> and <tbody> or are they meaningless tags?
>>
>>60949772
Well course not. The more projects you have in your portfolio, the better.
>>
So i have form which is showed with jquery
$( "#reg-link" ).on('click', function() {
$("#professors").hide();
$( "#add-form" ).slideToggle("slow");
});



I would like to change name of the button while i toggle
when it is pressed, button value should be like "close form" and when it is not pressed "add"
>>
>>60949772
Udacity requires this of you so that you can stay enrolled in their Nanodegree Plus program (guaranteed job within six months of course completion) once you've graduated:
>Full Stack: Graduates are required to complete a minimum average of 6 GitHub commits per week resulting in at least 1 published application or website.

Might want to start at that pace and go from there?
>>
>>60950241
I'll do my best, it's hard to work on stuff with my wageslave job draining my will to live. I have some ideas so I guess I should get working asap.
>>
>>60950025
you're already using the jquery hammer and still cant figure that out?

pajeet!
>>
>>60948480
Any good quiz plugins?

I want to make a quiz that's essentially structured like MBTI tests with the varied results.

Can anyone point me in the right direction?
>>
>>60950241
>their Nanodegree Plus program

you can still do the whole program for free, right? You just don't get the certificate, am I right? Looks like they have some good stuff on there
>>
File: 1482892170037.jpg (20KB, 320x301px) Image search: [Google]
1482892170037.jpg
20KB, 320x301px
What's a good editor for coding front-end javascript (Vue.js framework if that matter)? I just need syntax checking and auto-suggestions if possible. I have been using notepad++ and it's getting too bare-bones.
>>
>>60951119
Sublime
>>
File: 19691231_190000_794677860.jpg (59KB, 350x480px) Image search: [Google]
19691231_190000_794677860.jpg
59KB, 350x480px
>>60948792

well, first uninstall muse.
>>
I'm having trobule getting my google analytics to show hits. I have no plans to include them on my webpages longer than 2 days, Ijust wanted to experience using it.

1.So first I registered at analytics.gogle.com

2. I provided the name of the project + url

3. They gave me a script tag to insert before the closing </head>

4. I clicked on "send test traffic" on their admin page

5. No hits? Why? I even send the link of my website to my buddies but still no hits getting tracked
>>
>>60951216
I think it takes up to 48 hours for google analytics to register. It doesn't take affect immediately.
>>
File: jank.png (131KB, 1001x935px) Image search: [Google]
jank.png
131KB, 1001x935px
What is happening here? I'm making a game that uses socket.io and webgl. It usually runs at 120hz, but sometimes frames take 16ms or 24ms. What's strange is the inspector seems to show nothing happening during that time. At the start of the frame it seems to be performing game logic and rendering, then towards the end, socket.io events are being handled.
>>
>>60948792
how much does muse cost?
>>
File: DA7Wk-JUwAU7zPQ.jpg large.jpg (162KB, 1084x1200px) Image search: [Google]
DA7Wk-JUwAU7zPQ.jpg large.jpg
162KB, 1084x1200px
>>60948480
>>60950090
I drop absolutely everything and start learning front-end web development? How long is it expected to take to go from nothing to a junior developer position? I just want to know what I'm up against.
>>
>tfw you can now customise the menubar in sublime text
the best text editor
>>
>tfw waiting for a callback after the interview.

They said they were thinking about hiring me, but haven't got back to me. It has only been 8 hours though.
>>
>>60951870
>>60951870
Let's say you have 5 hours per day of study/practice:

html: 2 weeks. Not just learning how to open and close tags but also the semantic-ness. Learn semantic/valid html by pasting your html code in w3validator.

css: 2 weeks. box model, display properties, floats, positions etc.

js: 4 months. 1 month for syntax, 1 month for arrays, 1 month for objects, 1 month for logic implementation. This also includes reading mozilla mdn, stackoverflow, filtering stupid random pajeet blogs with misleading bullshit

1 month for learning library of choice. Vue, react, etc...
1 month for review( review html css js)
1 month for misc stuff: js oo patterns, flexbox, sass/scss, webpack

TLDR: it would take a year.
If you're a fast learner you could inject other misc stuff in the timeframe.
Anything less and you'll just be a burden to your colleagues.
And we hate noobs bothering us with:
>Hey bro I can't seem to get this text aligned would you mind blabla...
>>
One year working with development.
I worked with Android for at least 6 months. Made three apps for company, one with sênior help.
Now i'm working with Laravel API, ReactJs and trying to implement Sass.

When does /g/ think you're Junior, Full Analyst or Senior?
>>
>>60951536
your cpu and/or gpu
>>
>>60952340
When you have the title.
>>
>>60952345
What? It's an i7 4790 and two gtx 980s if that's what you meant. I was simulating cpu slowdown in the image, but the same thing happens without it.
>>
File: 00819996.jpg (23KB, 251x231px) Image search: [Google]
00819996.jpg
23KB, 251x231px
So I can create a list with all the element objects of a certain class with javascript.

But I'm not sure how to interact with the objects?

Also, can you make js wait or pause?

I'm trying to get a list of every element with a certain class then go through and click on every one, waiting half a second before each.

This would be easier with python and it's not even web based.
>>
>>60952340
You're a senior dev/engineer when you can be handed a task; talk to the right people about the conceptual & business logic required, understand the SE documentation for said feature, and then code it with no help from others on the team (aka asking them to figure it out for you, bc it's super hard).
>>
>>60954031
You should really go research instead of asking for answers to such easy stuff.
>>
File: 2349836637.png (2KB, 152x76px) Image search: [Google]
2349836637.png
2KB, 152x76px
>>60954139
I don't know what words to research is the problem.

logging the elements to console returns pic related. What are they called?

var testItems = document.getElementsByClassName('test');

for (let i = 0; i<testItems.length; i++){
console.log(testItems[i]);
}
>>
>>60954031
>make js wait or pause
setTimeout for a one time delay
>waiting half a second before each
setInterval for repeating actions

But really, as >>60954139 said, these things are
just a google search away.

>>60954191
They're called elements?
>>
File: money.jpg (26KB, 300x300px) Image search: [Google]
money.jpg
26KB, 300x300px
What I like about /wdg/ is that it is the most work-oriented general on /g/. People here actually want to make things that are useful to others and earn money that way. Makes me wonder, is there an overlap with /biz/? Do you guys go there?
>>
>>60951971
chill, dude, could take a few days
>>
>>60951971
I sent a thank you card to the hr lady that interviewed me once and got the job. just told her that I appreciated that she took the time to interview me. it wasn't web dev and i can't say if it helped but she had told me during the interview that there were 30 other candidates and I was a complete autist during the interview so I can only imagine that it played a big role.
>>
I cant think of a Single Page Application to build with Node,Angular or react apart from a to-do list to add to my projects

Does anybody have any ideas? There was a medium article posted here ages ago with a big list of potential projects
>>
>>60954971
why do they even call it biz when every thread is about cryptocurrencies
>>
>>60955515
markdown editor, ms paint clone, a client to some service like twitter or dropbox, an browser based irc clone like slack, an app to auction crappy ms paint clone doodles for bitcoin
>>
>>60954971
>/biz/
Its r/cryptomarkets at this point
>>
Why is the server side rendering script for vue so damn hard to find? What the fuck is the meaning of this?

https://unpkg.com/vue-server-renderer@latest/build.js
>build.js
Thank you.
>>
File: ai-colours.jpg (36KB, 566x446px) Image search: [Google]
ai-colours.jpg
36KB, 566x446px
This feels like a newb problem that I've solved in the past but I can't remember how.

1. Need to take take multiline text input from users.
2. Need to store text in DB (MySQL for MVP).
3. Need to display in original format in textboxes for editing.
4. Need to display multiline text inside <p> tags.
5. User must not be able to enter any HTML.

No problem with 1-3, it's 4-5 that are giving me pause.

I'm using handlebars templating engine, so I (believe) I can use the {{plaintext mode}} to make sure no tags get parsed but the newline control chars are lost. I can't convert them to <br/> because they'll be rendered as text.

Any pointers?
>>
I have a specific question to ask /wdg/. I have a table where the entire space in the cells is hyperlinked with <a> tags so you can click anywhere in the cell and move to a new page. But now the words in the cells can't be highlighted by the cursor. How do I enable highlighting of words while maintaining the link property of the cellspace?
>>
>>60949092
>>60949216
It's reasonable, but I wouldn't put it online anywhere unless you're fairly certain it's secure. Also if it gets popular you'll spent a fair amount of time deleting spam.
>>
>>60955532
It didn't use to be this way.
>>
>>60956166
It was created because crypto threads were flooding /g/, though.
>>
File: sass-lang.png (38KB, 257x272px) Image search: [Google]
sass-lang.png
38KB, 257x272px
>>60948480
I'm new to front-end web development. When working with CSS, I find it insanely frustrating to have to save my work, alt-tab to Firefox, hit refresh to review changes, and then swap back to my editor. How do you live preview your CSS work? Surely there is a better way!
>>
>>60956141
Here is a jsfiddle to illustrate my issue:

https://jsfiddle.net/0y0v8euu/

I want it to be possible to left-click and highlight the text while the cursor is in pointer mode, i.e. when it is hovering on the table cell.
>>
Why do some site admins/owners get butthurt when people are linking their site/posting links to their site?

I you ask me I have no problems with it because I get visitors?
>>
>>60949092
It's a perfect project.

But think about how you design it and where you start, that will make it interesting..

..I ended up creating a whole web framework that includes rendering reactjs files and trying to do the same for vue just to replace jquery appends which doesn't do seo.

Surely it'll become popular if I've implemented reactjs, vue and a native javascript thing which doesn't require any libraries. I don't know why no one wants to use my shit.

>>60956153
It never gets popular. Ever. And it's great for a resume.

>>60956214
Get a tiling window manager, windows 7 and on wards should do this, just drag each window to either side of your screen.

The real magic is doing this for backend'ed stuff, hot loaded SEO is the end time web development, all I really need is an IDE that autocompletes javascript without involving typescript.

>>60956265
Dunno, negative exposure?

Someone reported all the youtube videos I had linked to on my website. I am not happy about that.
>>
>>60956265
The only way I would perceive site owners being annoyed by free advertising is if the site linking to their site is pulling in a specific type of audience that the site owner does not want.
>>
>>60956214
webpack-dev-server for live reload then combine it with dual monitor setup for more epic dev
>>
>>60956286
>webpack
Bloat

But not bad when you get it working, that, gulp and yarn I've heard horror stories getting these things set up. Project setups are becoming complicated, that's an issue in my honest opinion.
>>
>>60956140
Well, it's not the way I've solved it in the past (and I've a feeling I'll have to solve the problem properly later on) but applying this css to the containing element lets the text be displayed multi-line.

white-space:pre-wrap
>>
>>60956286
Can you please elaborate? Yes, I've Googled it. I'm new at this. Don't taze me bro.
>>
>>60952268
Thank you!
>>
>>60956127
never did SSR with Vue, only pre-rendering in some cases, but there is this:
https://vuejs.org/v2/guide/ssr.html
https://ssr.vuejs.org/en/
or with nuxt
https://nuxtjs.org/

>>60956141
>>60956239
I would ditch the tables and use some kind of flex grid instead.
Also look at the :hover selector

>>60956301
its annoying to set up, but the benefits are undeniable
>>
>>60956276
>>60956239
oh wait nevermind, got you wrong there.
>>
>>60956301
>Project setups are becoming complicated, that's an issue in my honest opinion

There are webpack ready-to-launch boilerplates available for simple, medium, and big projects. just search on github.

>gulp
yeah gulp is bullshit.
>>
>>60952268
>took him a month to learn arrays
fucking lol
>>
>>60956342
Thanks.

>https://vuejs.org/v2/guide/ssr.html
This just refers to...
>https://ssr.vuejs.org/en/
This, which just tells me to use npm and require('vue-server-renderer'), which I don't want to do because my v8 instance is barebones.

>or with nuxt
>https://nuxtjs.org/
Complicates things and is still very alpha.

My ideal API here is users include a path to their vue file and create a new C# Vue object which reflects most of the simple API of a Vue object, so I can serialise it straight into code for v8.

I just need:
https://unpkg.com/vue-server-renderer@latest/vue-server-renderer.min.js

To exist, and then I'll download it at runtime if the script doesn't exist on whoever downloaded my library's computer or direct them to a function that would download it.

>>60956371
If you want to help, do you know a good CDN that has vue-server-renderer?

>>60956383
I need it bare brother, I only load babel on instances that transform code and I only run react/react-server on instances that render html. I only want to load one file, although it requires "he.js" so it's two files.

Thanks vue.

The whole point here is to have something like this:
var p = new VuePage("file.html",new Vue(){ /*vue object */});
p.get = (a,b) => new Vue(){ /*vue object */};

That way you can serverside render vue in C# and do slow stuff like database lookups or database caching in C#, but do everything else in vue.

But I'm not confident releasing a project that relies on a link to:
>build.js
Thanks.
>>
>>60956371
Thanks for your advice anyway about the forum dude, just saw it earlier. This stuff excites me so I would love to add it to a resume and show it off when the project is finished.
>>
>>60956408
Dude arrays arent just slicing and popping. There are also index-substitution, carousel-making, list generating, complex multi-dimensionals, etc...

If you think you're already good at arrays try hitting up array Katas @ codewars.com.

That's why I stated 1 month for him to be really comfortable with it
>>
>>60956478
those are still at most 1 week learn, i guess its because i have a higher IQ than most of you
>>
>>60956501
>>60956501
>those are still at most 1 week learn
Its not about IQ

The dude I'm replying to explicitly stated he would start from nothing => to junior;

And not start from a slight experience => to junior

> i guess its because i have a higher IQ than most of you

If you have high IQ I don't have to explain that to you
>>
>>60956214
>>60956214
or just make two windows 50% width.
50% editor 50% browser

then put this in your html:

<meta http-equiv="refresh" content="2" >

:^)
>>
File: UYxw-HcD.png (12KB, 512x512px) Image search: [Google]
UYxw-HcD.png
12KB, 512x512px
>>60956276
>all I really need is an IDE that autocompletes javascript without involving typescript.

VS Code
>>
>>60956633
><meta http-equiv="refresh" content="2" >

Holy shit why didn't they tell me about this before?
>>
>>60956140
4. split string by '\n'?
5. regex?
>>
>>60951119
VS Code with vetur extension
>>
>>60956313
>install webpack-dev-server
>dev-server config in your webpack config. Something like:
devServer: {
contentBase: path.join(__dirname, "dist"),
compress: true,
host: "0.0.0.0",
port: 9000,
overlay: true
}

(adjust contentBase for your own structure)
>then run: NODE_ENV=development webpack-dev-server --compress --color

at least that is my own setup
>>
Hey vue users.

https://012.vuejs.org/api/options.html
Which of these are absolutely essential? Stuff like the lifestyle hooks obviously won't work until someone figures out how to convert CIL to javascript, but anything that's string or bool is easy. Object is tricky because each one will require its own class.
>>
>>60957013
what are you even asking?
also 0.12 is extremely outdated.
2.3.4 is the latest version.
>>
>>60957067
It's the only API reference I can find to ALL the vue options, it seems they're still relevant and that's still the main source. I noticed the old version too and concluded it's no where else.

I think it would be cool to be able to render vue from C# without asp, that's all.
>>
>>60949969
Technically you don't even need <table>. ... Personally I use <table> but skip <thead>, <tbody>, and while I'm at it I skip any closing </p>
>>
>>60951119
Atom. It's basically sublime, but open source, doesn't nag you, and you can write plugins for it without hating yourself
>>
>>60957087
huh, how did you even get to the 0.12 docs?
https://vuejs.org/v2/guide/
https://vuejs.org/v2/api/

>Which of these are absolutely essential?
Are you asking, what one should learn first?
Sorry, really haven't quite understood you yet.
Though maybe it's over my head. Some bindings to C# or something?
>>
How does one get gud at design? I want to make things that look pretty
>>
>>60957143
>Are you asking, what one should learn first?
At this stage I think I prefer reactjs, what it lacks in two way bindings it makes up for in project simplicity.

>Some bindings to C# or something?
I'm writing a C# library that does server side rendering, with lots of caches so most times instead of running javascript the program just checks if the inputs (the script file and props/data/object in most cases) have been run before, where if they have to instead return what was already rendered. This is good because C# loads from dictionary collections really fast. It means the average page load is under 2ms, sometimes under a millisecond, when props are relatively simple.

This worked fairly well for reactjs, I loaded babel to convert the jsx files to js and ran a few reactjs functions. With jQuery it does about all you want to do, but vue is fairly popular here so I wanted to do the same thing with vue.

Unfortunately, vue isn't as simple as this script and these props. It involves a whole web of options.

When you go:
new Vue({
/*Stuff here*/
});

Those are the options.

Ideally, I'd like them to come from C# so I can cache and hotload and do other fun things.

This is meant to be single file: https://vuejs.org/v2/guide/single-file-components.html
But how it defines the objects/data whatever doesn't even look like something my v8 engine can validate and run.
>>
Maybe someone has a CodeCource account and is willing to share it?
>>
Is it worth it to learn wordpress? I've done a little with it in the past but nothing too extensive. Is it worth getting really good with it?
>>
>>60957499
Depends what you're doing.

Freelance journalism? Go ahead.

If you want to get a job in STEM, I highly recommend you do not and I highly recommend you avoid PHP as well. Think about your website as an obvious indication of your skill.
>>
>>60957561
If I use wordpress just for the CMS and develop the website styles and scripts, etc myself, would that not be showing off my skill?

I'm not really looking to turn web development into a fulltime job at this point. I'm just doing it for fun and it looks like it could be worth it.

Is there much of a reason to set up my own DB and etc when I can just use a Wordpress one, especially if the site isn't that complicated?

I personally don't really like PHP but I don't really have a choice if I use Wordpress.

I'm undecided
>>
if anybody's interested in learning Linux and some command line, check out this free course on udacity:
>https://www.udacity.com/course/configuring-linux-web-servers--ud299

The course says about 80% of the servers worldwide run on Linux, so it's a good idea to know a bit about the system, if you're a back-end guy. Also, you don't have to install Linux or anything, you just run everything from a remote machine. Give it a shot!
>>
How can I set div width as quotient of division of container width and number of divs in container which fluctuates without js?
>>
>>60957591
Do you intent to profit off wordpress?
If no, I doubt there's much point in learning it in-depth. You can make a lot of stuff with it, but it will be very hacky, and you'll learn more and show more skill using appropriate shit or building your own.
>>
>>60957762
flexbox
with flex-grow, flex-shrink, etc.
>>
>>60957819
Oh right, thanks.
>>
>>60957591
If it's just for fun, as a suggestion, I like C#.

I'm working on this: https://github.com/MichaelFroelich/FAP.React/
Which is a C# library, you can get it in VisualStudio or Monodevelop by adding it as a nuget package. You don't actually have to extend ReactivePage or Page, but it's generally a good idea.

It basically loads JSX files (reactjs stuff) and expects some props. Reactjs is generally pretty fun and is "impressive."

Another thing I'm working on that'll be released in the same library is javascript escaped html such that you give it props like:
var page = new ScriptedPage("Main", new { name: "Trayquando Johnson" });


Where inside a file of main.html you could have something like:
<div>Hey {{props.name}}</div>

Will show: Hey Trayquando Johnson when you connect to the page 127.0.0.1:1024/main

This is actually quite abhorrent because it's mixing two languages together, but is essentially what people mostly do with PHP.

I've finished this and it probably works without any bugs (simple code), but I want to finish some Vue stuff I'm working on before releasing it. Vue is even better because it has two way binding, that means the props come from the server and then can be manipulated on the front end to show changes to the ui as they happen.
>>
>>60957224

Learn about the fundamentals of design; colour theory, proportion, the golden rule etc. I'm by no means an expert but learning these things gave me a better base to work on. Also finding sites you like on, say, behance or dribbble and 'taking inspiration' (copying) from them really helps
>>
>>60957831
Same guy. The Vue options i've implemented so far are as follows:
            public Vue(string Path = null)
{
if (Path != null)
Template = File.ReadAllText(Path);
else {
Template = "<div id='" + El + "'></div>";
}
}

public string Name { get; set; }
public string Template { get; }
public string El { get; set; } = "rootComponent";
public object Data { get; set; }
public object Directives { get; set; }
public object Filters { get; set; }
public bool Functional { get; set; }
public List<object> Props { get; set; }
public List<object> Delimiters { get; set; }
public Dictionary<string,object> PropsData { get; set; }
public VueModel Model { get; set; }
public class VueModel
{
string prop { get; set; }
string @event { get;set; }
}

There's also a to string method that serialises it with JSON.net and makes the first letter of every prop lowercase so it can go straight into the javascript render code.
>>
>>60957785
If I stay away from wordpress, then what do you suggest? My knowledge isn't that extensive. I am mainly just proficient in the basics + bootstrap and I wouldn't be intimidated by Javascript even though I haven't used it a whole lot.

What would be the logical next step? Making cool shit in Javascript? I'm not sure
>>
Anyone know anything about SEO? Where do I start? Just launched a new site.
>>
>>60958163
https://weblaunchchecklist.com/
>>
>>60952268
Javascript basics for total beginner shouldn't be more than month. Somebody who knows programming can pick it up in couple of days. Also quite sure you are underestimating html and css.
>>
>>60956140
Escape input for html before storing. Afterwards you can convert newlines to <br> and safely show it as html. Also there are ways in html to show newlines-<pre> tag and some css thing.
>>
how do i make sure there's no open ports on my server, and only open the ones i want open? i'm developing on a server that was hacked about a year ago and i'm supposed to remake the website where it's not able to be hacked
>>
>>60958305
ufw rules not enough?
>>
Is Eloquent Javascript a good book?

What about if Hemingway wrote Javascript?

Also what's a good javascript book for UI stuff?
>>
>>60958329
ufw + fail2ban + ssh key login is plenty if you only allow 80/443 and 22. That is unless you use some garbage like wordpress which is full of vulns
>>
>>60958163
My realisation of SEO is simple, anything that comes directly to the client side on the first connection can contribute to SEO. Everything, including most things from most web libraries including those promising SEO, are not. This is why ASP MVC was popular, because Razor could template html with serverside data allowing dynamic pages to have SEO, but is otherwise a good reason people these days are interested in server side rendering. Serverside rendering does this too.

This is why: >>60957940
>>60957831
That way data generated from C#, maybe from a mongodb or redis db or whatever, can contribute to SEO and people can google things in your database to find your webpage. It's a good idea to do that in C# because it's usually taxing code, so node.js users might suffer trying to do everything in JavaScript, that being said most serverside rendering libraries people want to use are javascript. Usually reactjs, angular or vue.

>>60958305
>only open the ones i want open?
Yes.

Port 80 and whatever you usually connect with SSH to.
>>
>>60958305
the second module of this right here goes through that. Just finished it, quite fun.
>https://www.udacity.com/course/configuring-linux-web-servers--ud299
>>
Someone give me an idea for a website to build
>>
File: memories.jpg (70KB, 600x960px) Image search: [Google]
memories.jpg
70KB, 600x960px
>>
>>60958693
literally this
>>
>>60958651
click bait title generator
>>
>>60958693
this except jquery is kicking and vanilla js saves you
>>
>>60958750
lol i would love this
>>
>>60958693
jQuery simply doesn't do the same things as reactjs, angular or vue. It's still a fantastic library that annoys me when people feel they're too good for it, I recommend using it alongside reactjs or vue. Not only doesn't jquery do serverside rendering, trying to run it on my v8 breaks.

Vue and react are for components, that's a project design thing. With serverside rendering it's just about finding neater ways to get data from the backend to the client before the client asks for it. jQuery also doesn't do this, jQuery does ajax requests after the page is loaded so there's no SEO.

>angular
Not my thing.

I'd actually say jQuery is the only library you really actually need. If you write a website and you're not using it for ajax requests, I'll probably hate you.
>>
>>60958380
>>60958305
what's the worst that could happen If Im running a server on a virtual machine that's not ssh-keygen secured?
>>
>>60958811
Someone finds out your SSH password, logs in and changes your site to redirect to some shit and you end up in prison?
>>
>>60958811
somone hacks your site. puts up cheese pizza. fbi raids your house and you get life in prison
>>
>>60958829
in prison I'll be fed regularly and would probably get more sex than I do right now. That's an improvement from my point of view.
>>
>>60958850
>>60958829
lol isn't there a way to prove it actually wasn't me? A way to trace the real culprit?
>>
>>60958850
>>60958863
>>60958881
Nope, no one believes the neetboy with 4chan in his internet history, to prison to you.
>>
>>60958806
>I'd actually say jQuery is the only library you really actually need. If you write a website and you're not using it for ajax requests, I'll probably hate you.
I'm using window.fetch()
>>
>>60958881
do you think the fbi wants to let off an easy arrest?
do you have enough money to pay for a decent lawyer?
would anyone believe you when you post on 4chan?
>>
>>60956214
A reminder that Sass is being rewritten in Dart. The Dart version has entered beta and is thus worth trying: http://sass.logdown.com/posts/1909151. If successful, it will replace the Ruby version as the one where the cutting-edge development happens. (Though the Ruby version will still be maintained, as will libsass.)
>>
>>60958955
Which is whatever for fetch...

How about post and put requests?
>>
>>60958972
still window.fetch()
>>
>>60958693
>>60958731
>>60958786
>>60958955
Umbrella.js is enough.
https://umbrellajs.com/documentation#ajax
https://umbrellajs.com/documentation#find
>>
>>60948792
> Using Adobe products
/out/
>>
using bootstrap, I have a navbar, then a carousel, the navbar overlays the top of the carousel. I want the carousel to appear directly below the navbar, not underneath, I can fix by adding margin-top: 60px; to the carousel css, is there away to do this without using margin top, so that it just appears directly under navbar, no matter the height of the navbar,

thanks I'm new dad.
>>
>>60959672
http://shouldiuseacarousel.com
>>
What folder structure do you use to store components, actions, containers, reducers in React+Redux. Function base, Feature based, duck, re-duck.
>>
>>60959734
not what I asked thanks Mom, where's dad with the awnser? the content is irrelevant, need help with postioning.
>>
>>60959760
>thanks Mom, where's dad with the awnser?
wat
>>
>>60948480
Is mongo db worth it? Is django worth it? I have set up a django 1.5 implementation using mongodb as the db because the most recent version of django no rel is 1.5 now Im just wondering if I should be a cheap bastard and just use angular?
>>
>>60959672
>>60959760
post a jsfiddle/codepen.
don't rely on getting spoonfed, provide an example.
no one will spend time to set up what you might have set up without knowing exactly.
https://stackoverflow.com/help/how-to-ask
>>
>>60959786
Django's for niggers by niggers
>>
>>60948694
See if you can fix it, but learn coding just in case it isn't salvageable before you offer to fix it, else it will hurt your credibility
>>
File: CjcQBE6.jpg (36KB, 362x346px) Image search: [Google]
CjcQBE6.jpg
36KB, 362x346px
what do you use to send emails from your web-applications?
Not bulk newsletter, more like an email to the site-admin, informing him about a certain event, that got triggered by some user interaction for example or some regular updates about site activity.
>>
>>60959786
>Is mongo db worth it?
is your data unstructured?
>>
>>60959786
>Is mongo db worth it?
No. Not at all.
>Is django worth it?
Django is fine.
>should be a cheap bastard and just use angular?
How does that relate to your choice of DB or framework?
>>
>>60959853
the SMTP class/methods of the language
>>
>>60948480
Will CSS grid kill Bootstrap and Foundation?
>>
>>60959894
sry, think I need another hint.
I am using Node and installed nodemailer now. Just not sure what the correct path from here on is.

>authenticate with GMail and send mails through that?
>install some local SMTP server and use that?
>use an external mail service like mailgun?
>pipe to sendmail?
>>
>>60959889
The only thing that makes Django a better idea than PHP is that Python looks better. The only thing that makes Django arguably better than any C# or Java framework is that it arguably looks better (muh FOIC).

>>60959796
That's harsh.

>>60959853
Mail gun
http://mailgun-documentation.readthedocs.io/en/latest/libraries.html#libraries

Look at all those languages.
>>
>>60960842
all are valid options.
I use my own mail server.
>>
>>60960857
>Java framework
What Java frameworks really compare to Django for rapid development? Play 1 is dead and Spring Boot is a whole lot more complicated.
>>
I posted in a previous thread about using Socket.IO/Flask and was told to look into data acknowledgement.
My current problem is that I have a list of clients that I want to send a message to. The problem is that I want to emit to a client and wait for its response before emitting to the next.

So the server sends a question to the client -> the client sends the answer back -> server does some stuff based off the answer -> server sends question to the next client.

I'm not sure if data acknowledgements is what I want for this or not. The main issue is I'm not sure how to make the function wait to make sure client A responded before talking to client B.
>>
>>60960894
Spark

http://sparkjava.com/

Regardless, the fact that Python is yet another slow language in a place where performance actually kind of matters makes it a dumb idea. PHP is a little better nowadays, because FPM and HHVM, but it's still an ugly language that still runs slower than even Javascript. You'd sooner run everything in node.

Guys, it looks so much nicer when your websites respond fast. People will think you're good at what you're doing to the point if you're using a website to apply for jobs pay more to buy a host within your own country.

>>60960928
Why does client A need to respond before client B? The idea behind using threading code throughout backends is that so, rarely, client B actually responds before client A because the server might have more work for client A.

Unless there's a point? You realise when you have clients reliant on responses from other clients, like a game, you'll have a sort of (not really) problem that things will seem to hang.

Regardless, make a queue and if the client isn't on the top of the queue:
https://stackoverflow.com/questions/11552320/correct-way-to-pause-python-program

Do whatever those guys tell you for about 500ms, the poll client A and if the cunt still hasn't answered go back to pausing.
>>
Anyone else trying wasm?
>>
I fucking hate css.

Nothing does what you tell it to do.

left div with width of 20% and right div with width of 60%? Bam now your divs are ontop of each other but with 50% vertical height added to the right div.

CSS needs a complete rewrite.
>>
>>60961009
post a codepen
>>
>>60960978
Thanks for the response. Yeah it's for a small turn based card game so I need to get all the info from A before moving to what B wants to do. That's why I'm running into this async problem. Maybe socketio isn't the way to go? Because in this case I need the server to do all the work for A before moving onto B.
>>
>>60961009
You gotta check the browsers default added styles

Use a "normalize.css" file before you begin writing
>>
>>60960978
Spark is a microframework (i.e., little more than a routing DSL) like Flask, except that it lacks Flask's vast plugin ecosystem. It is not like Django.
>>
>>60960987
Compiled my sdl2/c++ game to wasm a while ago, it just works. What are you doing?
>>
hey guys, I'm running a website from a vagrant virtual machine, running on 0.0.0.0:5000

Can I access that with localhost:5000 from my real computer, not the virtual one? Probably not, since that's not working. So how do I access a site in a vm from my real machine?
>>
>>60961196
use the ip address of the VM
>>
>>60961196
Learn how to write a Vagrantfile.
>>
>>60961206
of course, idiot me. But would it be the public or the private VM ip? Gonna guess the public one, but correct me if I'm wrong
>>
>>60961196
depends on the network configuration of your vm
>>
>>60961223
lol that's what I'm trying to do, mate. Learning vagrant and all that shit. Any pointers?
>>
>>60961184

Nothing yet, I'm still compiling emscripten.
Currently at 32%.

How do ya like it?
>>
>>60961009
Google things and start relying on vh/vw or use bootstrap. CSS is a solved problem so far as sass and less are a little too much.

>>60961040
No, your problem is a real time problem. Pausing at the backend like I suggested might not be a good idea.

Research a state machine and give each player a state, moving, waiting to move and moved. Next, if they're in the waiting stages, that's moved or waiting to move, make the clients do a get request every 500ms to check if it's time yet. It's a little less suss if the clients are doing the polling especially since blank responses are fine for http servers.

Most of these problems are most easily solved with polling. Otherwise, a library like signalr also works but I'm pretty sure that's just polling too.

>>60961168
Plugins don't mean much when jars are easy to find, there's a similar argument for nuget packages. With a jar that does v8 you could even start loading JavaScript libraries, that's something languages like java are expected to be able to do.

Then, all you really need to do is return strings from a route and because it's java it'll happen very quickly.
>>
>>60959672
You are probably using fixed navbar. It's normal for it to cover part of content and you should add margin or padding to content to compensate for it.
>>
>>60961278
It's not like I got anything to "like", I just fiddled around with my makefile, mainly replacing gcc with emcc and using some special flags for it. Game works in browsers like it is supposed to, no performance overhead whatsoever. Except maybe for sdl_mixer or some shit because it's not ported. I used it to woo a boss to get myself a job, noticed that some guys in charge get hardons about wasm, but they don't exactly know what to do with yet lol. Been thinking for a while about doing something cool with it, but idk

>Nothing yet, I'm still compiling emscripten.
Wait, why? I recall just downloading the whole package


Also, some links:

http://www.rossis.red/wasm.html
https://github.com/sessamekesh/wasm-3d-animation-demo
>>
>>60958288
That has been my thought in the past but I went to an OWASP meet up the other day and the speaker made a compelling argument for just storing what the user enters verbatim, then handling the escaping/replacing etc when you pull data from the dB. His case was that you don't know how you're going to use the data later, and you can make life hard for yourself later. His example was basics l native apps, if you converted to HTML you'd have to replace with cr/lr anyway.

I'm planning to use the data in a variety of ways including apps so it made sense to me.
>>
>>60961388

>Why
Doing it according to this
http://webassembly.org/getting-started/developers-guide/


> Been thinking for a while about doing something cool with it, but idk

When I first heard about it, I though it was as much as an java/flash plugin replacer. However, wasm has more power to be used to such end.
I thought of using to speed up form processing, but shit, I could use it to make control panel for my server.
>>
>>60961279
Ah, switching to poling could actually work. Once I hit a certain point where I need to wait for each client to wait on the one before it I could switch from pushing state changes from the server to polling while still pushing big changes.
>>
>>60961560
>http://webassembly.org/getting-started/developers-guide/
Oh, will have a look at it

I remember downloading from here:
http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

>I thought of using to speed up form processing, but shit, I could use it to make control panel for my server.
Is control panel a performance heavy task, though? Or do you want to do it just for the sake

I had an idea to make a nifty image editor, js editors seem to be meh in terms of performance
>>
>>60961279
I have been trying to properly learn CSS since the 90's.

The display types always get me, as well as widths don't mean the width of the child element in the parent element sometimes for some reason.

like 50% width and 50% width will stack vertically instead of horizontal. That makes no sense to me.
>>
>>60961796
I know some things that shape elements within a percentage of the screen size, like 80%, to allow for a dynamic track. Beyond that I Google for most the css things, it and regex which is so vomit inducing I'm especially grateful.

About the two 50% thing, maybe try 49%? Just saying... if not then do the usual, like mess with position and float.
>>
>>60961796
>like 50% width and 50% width will stack vertically instead of horizontal. That makes no sense to me.
That is because you are not taking into account margin or padding. If you knock it down to say 49% each and your padding is set to 1%, it will be horizontal. If it's still vertical, keep adjusting and eventually you'll get it. If the padding/margin/elements add up to over 100%, it will be vertical.
>>
>>60961992
Padding should be included with the width.

The fact that a 1% padding changes the total width to 98% is stupid.


Also CSS needs a proper layering system like every other sort of graphic design on the planet. z-index sucks and rarely works.

If I have two divs next to each other both aligned left with different z-indexs, they should be ontop of each other.
>>
>>60962115
z-index works just fine, just only on elements that have their position attribute set.

sounds to me like you're refusing to learn how to use CSS and instead just call it stupid, removing the blame from yourself.
>>
>>60961796
>>60961992
>>60962115
box-sizing: border-box

width now includes content, border and padding.
If you have 50% width and no margin, it will fit 2 divs horizontally.

In any case, use normalize.css, unless you already include some other framework.
>>
>>60962115
>If I have two divs next to each other both aligned left with different z-indexs, they should be ontop of each other.
position: absolute;
>>
where the fuck do you host your websites for free?
>>
>>60962846
static or dynamic?
>>
>>60962860
static
>>
File: 1497677776939.gif (40KB, 405x626px) Image search: [Google]
1497677776939.gif
40KB, 405x626px
So I've been coding for like 3 years now and I've got a job working with a lot of JS. When I got introduced to it I was told run through the Code Academy tutorials and get to work. After working with it for five months or so I've decided I need a better foundation.

What's a good resource for someone who knows what a string and a loop are but doesn't really know why console.log() sometimes spits things out at screwy times. I want to know all the technical shit.
>>
>>60962938
github.io, bitballoon
>>
>>60962846
>>60962938
GitHub/GitLab pages, Netlify
>>
>>60963023
>>60963083
thanks a million
>>
>>60963003
Bruh if you can't understand what the code is that is on the page then how do you know how to code

You should be able to follow it like an actual language and understand what every letter and symbol means
>>
Any suggestions to improve my site?
random-pr0n.bitballoon.com/
>>
>>60963337
Great job! You could remove the white background behind the video, maybe make the video a bit bigger and reduce the gap between the video and refresh button a bit
>>
>>60963003
you got hired for a JS job without knowing JS?
>>
>>60963475
social skill > programming skill
>>
File: 1497815465282.gif (488KB, 284x210px) Image search: [Google]
1497815465282.gif
488KB, 284x210px
>learning how to program
>variables, functions, arrays etc.
>ez shit
>for/while/do/foreach loops
>mfw

Shit's hard senpai.
Interested in networking and shit. Which language should I study?
>>
>>60963586
bash
>>
>>60963586
>Loops are hard
Seriously?
>networking
What do you think this means?
>>
>>60963608
Eh, just exagerating. I'll keep on learning.

How the whole internet stuff works. Too broad of an explanation I know.
>>
>>60963662
again, what do you mean? TCP/IP? Do you just want to know how to use sockets? Or are you talking about the web, and want to build shit on HTTP?
>>
>>60963475
Pretty much >>60963517
Good referrals will land you awesome shit as long as you aren't looking in major cities.

>>60963311
I think I misrepresented the problem. I want to know the inner workings of JS.
Given whatever thing of psuedo code I could translate it to JS without any real problems.
I want to be taking advantage of things Javascript does well and be aware of the odd shit that'll tell the JS engine running through my code to drop it's optimizations. I want to go from a JS monkey to a JS wizard.
>>
>>60963889
this is regularly recommended
https://github.com/getify/You-Dont-Know-JS
>>
>>60963586
>Interested in networking and shit

200% Linux and bash, then maybe Python or one of the statically typed langs, Go is pretty good
>>
as a personal side project I'm working on a chatroom, but to play on hard mode I'm not implementing user accounts or authentication, like 4chan. so the goal is to filter out posts that have a 100% probability of being a shitpost or spam and any flooding, attempts at dos, etc. I've been studying up on naive bayes and also looking into 'proof of work', does anyone have any other ideas on areas of study or algorithms to look into?
>>
>>60963662
https://www.udacity.com/course/networking-for-web-developers--ud256

This course is pretty short (don't believe the estimated timeline, you can do the whole thing in a day or two) and it gives you a pretty broad view of everything.

>>60963337
are you just serving random pron? Because I got all kinds of stuff, from gay to scat to tranny shit.
>>
>>60964056
define shitpost or spam in the context of the site you are building
>>
>>60964056
I can't remember the correct theoretical name, maybe it was context-free grammars or one of those, but maybe you could apply a CFG (or whatever the right one is) filter to sort out whether a sentences is grammatical.
>>
>>60963586

If you want to know about the web, learn client-server architecture, web design patterns (MVC, REST and what not) and read a few RFCs.

Honestly: read some RFCs, it's worth it..

>https://tools.ietf.org/html/rfc7230


Also:
>Which language should I study?

For the web: JavaScript, obviously.
>>
>>60964108
anything that makes the service unusable for the overall majority. so like spam bots and the people that are indecipherable from spam bots, coordinated botnet attacks to flood, all the stuff you'd expect to face by having a public accessible chatroom or and without having real life moderators/janitors.
>>
>>60964056

>filter out posts that have a 100% probability of being a shitpost or spam

Not possible.
What definition could you probably use? It's often not clear wether someone did shitpost or just made a stupid comment, even for humans.

I'd try something like an elaborated counting of bad words (maybe with weights) from a blacklist.

Or you take a huge Dataset where you can find a lot of shitposts (logging /b/ ?) and train a neural network.


Flooding and DOS should be more easy (you only need to count post from an IP range - or make it like 4chan and make a 1 minute timeout after each post for a given IP).
>>
No matter what I do, ui-router for angular won't work. I'm using Angular 1.x.

app.js
'use strict';


angular.module('catlogApp', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

// route for the home page
.state('app', {
url:'/',
views: {
'header': {
templateUrl : 'views/header.html',
},
'content': {
templateUrl : 'views/home.html',
},
'footer': {
templateUrl : 'views/footer.html',
}
}

})

// route for the Quote page
.state('app.summary', {
url:'summary',
views:{
'content@': {
templateUrl:'views/cart.html',
controller:'CartController'
}
}
})

// route for the Anchoring page
.state('app.anchoring', {
url:'anchoring',
views:{
'content@': {
templateUrl:'views/anchoring.html',
controller:'anchoringController'
}
}
})


What the fuck am I doing wrong?
>>
there we go I added some improvements
>www.drkaj.ga
and a dns server
need to figure out adds next
any tips?
>>
>>60964343
The templates are in the correct folder. Here's the index.html. No matter what, it shows no errors, but it also never loads any of the templates.

index.html
<!DOCTYPE html>
<html lang="en">

<head>

<title>Cat-Log</title>


</head>

<body ng-app="catlogApp">


<div ui-view="header"></div>
<div ui-view="content"></div>
<div ui-view="footer"></div>


<!-- build:js scripts/main.js -->
<script src="../bower_components/angular/angular.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="../bower_components/angular-resource/angular-resource.min.js"></script>
<script src="../bower_components/angular-ui-router/release/angular-ui-router.min.js"></script>
<!-- endbuild -->

</body>

</html>
>>
>>60963460
forgot to reply to you
see:
>>60964366
removed the background and reduced the gap but I think I'll leave this size
also added a domain - drkaj.ga which in my native tongue means fap.it
I'm gonna go for my countries demographic later (because no one in croatia uses ad blockers)
Any other suggestions?

>>60964090
nah I'm not serving anything
for now I'm just using red tube
but if this kicks off I'll host my own shit
i'll be back then asking for moar from you anons
>>
>>60964909
made a HN submission for the lulz
https://news.ycombinator.com/item?id=14583165
they flagged it immediately because it's porn I guess
even though there are no fucking rules about adult content
>>
>>60964932
is HN a good place to showcase our newbie projects? or is that for more serious stuff?
>>
File: 1486782618836.jpg (55KB, 640x480px) Image search: [Google]
1486782618836.jpg
55KB, 640x480px
>FREELANCERS
How do you usually charge a customer? Im currently working for a company doing labor and building a landing page for them on the side. I want to move into freelancing and doing this on my own while I am in school. Do you usually charge by the hour or have the customer tell you what they want and bill them on a project basis?
>>
>>60965082
I always see some advanced shit there so I guess it's not really for noobs but idgaf
nothing to lose if you try?
>>
Give me the quick 101 lads, when did external Javascript / PHP / etc libraries come into popular use? Last time I touched webdev was in 2003 when people were using <center> tags and didn't end their <p> tags. Now there is a whole collection of stuff in the field.
>>
I know its a noob question, but whats the point of js frameworks like react, vue and angular?

Why not simply write plain html, css and javascript? What useful features do these frameworks offer besides easier DOM editing?
>>
>>60965336
they're just libraries with features already coded up. Instead of coding everything from scratch, you import shit done by others before you. Why not?
>>
File: 2.jpg (27KB, 289x728px) Image search: [Google]
2.jpg
27KB, 289x728px
>>60948480
anons
when i resize the windows the image dont resize with good height or width ,i'am using wordpress theme twenty seven and i use the follow code to reduce height of header image in twenty seventeen theme
.has-header-image .custom-header-media img, 
.has-header-video .custom-header-media video,
.has-header-video .custom-header-media iframe,
.has-header-image:not(.twentyseventeen-front-page):not(.home)
.custom-header-media img {
height: 66% !important;
object-fit: fill !important;
width: 100%;
max-height: 100% !important;
display: block !important;
position: relative !important;
}

#wp-custom-header {
height: 100% !important;
}


pic related
>>
>>60965336
people use them because they don't know any better and they're trendy. Its like the old saying "no one was ever fired for picking php", no one is ever fired for picking react, vue, angular. If you can get by without them do it. The only thing they provide that thats worth while is 2 way data binding, but that can be implemented easily in plain js considering its an event based language.
>>
>>60964056
Why not just do your own?

If more than 50% of words arent in the dictionary then it's probably a shitpost.

If certain words have been included in numerous banned shitposts then it is probably a shitpost.

If something was banned as a shitpost I would save each for in a column with a shitpost column of 1. If anither post eith that word is banned then the word shitpost level goes to 2. Then once if 60% of words are words with shitpost level or higher than you ban.

So if half the words arent in the dictionary it's a shitpost. If the posted words are tied to previously related shitposts then it's probably a shitpost.

Would need a lot of tweaking since it would be a learning system.
>>
>>60966223
And fuck spelling. On a phone.
>>
>>60965221
~2007-2009

>>60965336
I use react+mobx because they allow me to declaratively express my UI as a function of the application state and take care of efficiently updating the UI whenever the state changes
>>
>>60965336
Abstract away from DOM. Also bring logic to client side which is good for building SPAs. But frankly it's mostly because it's latest trend.
>>
File: greatfirewallofchina-2.png (13KB, 580x360px) Image search: [Google]
greatfirewallofchina-2.png
13KB, 580x360px
>>60948480
Can one learn JavaScript as their first programming language without permanently gimping themselves?
>>
>>60967129
Javascript is not bad. People just hate it because it isn't what they are used to.
>>
>>60964056
lmao. dis nigga trying to solve probelsm he doesnt have. spam bots are a good problem. it means you have something worth spamming on.
>>
>>60967423
he's not trying to solve any problem. He's just trying to learn by coding something that's not a straightforward copy-paste of something done a thousand times over.
>>
>>60967398
Is there anything specific to avoid?
>>
>>60965519
>the image dont resize with good height or width

So your issue is with the image not maintaining aspect ratio? Set width to auto and set the image's container to overflow: hidden.
>>
File: b.png (98KB, 851x896px) Image search: [Google]
b.png
98KB, 851x896px
What does /wdg/ think of antics like CSS drawings?
>>
Is there anyway to grab a style value of an item without using JS? I'm using background-size:cover, and I need to place a div under where the background ends. What's the easiest way to grab the current value of the height?
>>
>>60968743
They're a pretty good alternative to canvas/webgl
>>
>>60961992
>the 49% thing was right
Hahaha

Okay, css is a little broken. Only a little.

>>60962860
Dynamic.

>>60962846
>>60962938
What do people do with static websites? Anything that's static content has a place somewhere, put code in a code place and use imgr for pictures.

>>60963003
>but doesn't really know why console.log() sometimes spits things out at screwy times. I want to know all the technical shit.
If the timing of a function is wrong, it's because something is running asynchronously. Lots of things in javascript do, especially web requests, causing lots of fringe errors.

If you want the good technical shit, you're going to need to do a bachelor degree and try to mentally block out the not good technical shit. Something like computer engineering will teach you to write a circuit that performs division out of transistors.

>>60963475
>>60963517
>social skill
>>60963889
Trolling?

Where I am people with actual degrees, experience and FOSS projects can struggle to get jobs. There's a range of factors, in most places youth unemployment is high and many places combat that with hiring quotas.

There are people who've done a 3 months "code camp" who are gainfully employed. There are people who had "god referrals" and could have never seen a computer before to get the job.

>>60963586
If you're new to programming you shouldn't be into webdev. I've gone front and back in this thing and neither seems particularly friendly to newbies regardless of how easy they try so desperately hard to make them.

>>60963662
Either study the OSI model, TCP/IP protocols, REST and start spying on your neighbours with wireshark. Or do a degree. I recommend the degree.

>>60964400
>The templates are in the correct folder.
>but it also never loads any of the templates.
This is what scares me about web projects, it sounds like a project file issue. Do you have node.js running?
>>
>>60965336
>react,
Began as a way for facebook to fix their real time problems, ended with facebook developing an entire web environment, this is mostly used so you can combine HTML and javascript together in a sane fashion as a single script, like:
class Hello extends React.Component {
render(i) {
if(props.name != OP)
return <div>Hello {props.name} !</div>;
else
return <div>fuck off</div>;
}

Basically letting your UI's be completely scripted out of components made with (you got it) reactjs. The "props" are another epic thing if you're server side rendering, in this case they can come directly from the back end.

>vue and
Vue also has serverside rendering, can also take props (with variations of data and propsName, Vue why do you need three?), also has a component creation style, can do that stuff above even better like
<div>{{
if(name == OP)
"fuck off";
else
"Oh, hello " + name;
}}</div>

And requires you pray to an archaic god who harkens from an unseen star in order for it's bazillion features to work in alignment.

>angular?
I'm not amazingly familiar here, although I know it does data binding and can be serverside rendered, that obviously wasn't the original intent as was in reactjs or most early versions of vue.

>Why not simply write plain html, css and javascript?
If I want to set up my site so I can change it from the website itself and have those changes be visible to a web crawler bot so my changes contribute to web traffic, I can't have changes made after deploying the website applied only by javascript, because a web crawler will never run my javascript.

So it all needs to come from server. This means something with access to the HTML files needs to inject inside of it the data from the server BEFORE returning to the client so a web crawler can see it. This means libraries that either do server side rendering or do it well.

Vue, Angular, ReactJS are all designed to do this.
>>
>>60948694
Same anon here.
I know that WordPress is bad - but why is it bad?
It's literally just a static site they have. They don't even have ads on it or anything.
Maybe once every two months they'll make a new page.

Is there any reason I shouldn't just stick to WP for it?
>>
>>60969202
>but why is it bad?
Hey there.

PHP is ugly
PHP is relatively slower, giving longer load times
PHP was invented as a solution to SEO, there are better solutions now
Because of the above, customization is a hassle

WordPress isn't for web developers and this is a web developers thread where it's assumed web developers post here. WordPress is absolutely fantastic for journalists, media people, bloggers and even small salesmen who do not want to have web skills.

With just a little more skill, there are solutions available today that make implementing a relatively complete CMS with only a few lines of code. In fact, if you don't do this and instead choose to use WordPress as a web developer, people hiring would think you're not a very good web developer.

Is WordPress bad? Depends who's talking to who, I am talking to web developers so yes. To almost anyone else it would be no, there is absolutely nothing wrong with WordPress.

(although Mezzanine and Umbraco are both better and neither use PHP)
>>
>>60969286
See that's the problem I'm having.
On one hand, they'll have no problem if I go "WP is fine but it won't ever be well optimized. I can just build a proper site" since it's literally just a static site with a donation button. Maybe a new page every month or so.

On the other hand, I'm wondering how difficult it would be. We already have most, if not all of the media on a file server.
So in theory it should be easy since it's mostly just HTML/CSS.
>>
How is this for a template security minded nginx config? Not sure what I'm missing, as I'm swapping from apache after all of these years.

https://ghostbin.com/paste/jy2zh
>>
>>60969357
With donations and media, what are you doing with it? Ask yourself this, if your site doesn't seem well designed, exactly what are the consequences? If it's nothing, because the site works and your career isn't web development, then again I can't see why WordPress is a bad idea. It's already there. Otherwise, if you're doing something like managing pro bono donations for charity web development and have media of your work, you might want to look into installing node.js or finding some sort of server rendered solution.

>I'm wondering how difficult it would be.
It depends how you choose to make it.

>all of the media on a file server.
Have you ever used nginx or Apache? Most backends are mostly data.

The way I like designing sites is either nginx or apache for files/static stuff and dynamic pages are mostly built with some framework that can run on my front end and back end so I can reuse client code for rendering so I also have SEO. Some of these frameworks are really easy to the point it could be easier than the vanilla javascript/html paradigm. Some of these, like vue, will kick you and continue kicking you until you submit that it has over a million legs to which to continue kicking and you submit to the kicks.

Last question, do you get much traffic and many donations? If not and, if again your business isn't web development, I'm really failing to see the harm in WordPress for you, using just nginx or apache could work but then you'll have to edit html and javascript, are you comfortable doing that? Anyone else must use either Node or C# or Java and some framework that handles the actual difficulties of web development.

>>60969456
You've got SSL set up and some form of ACL, what are you worried about? People can't snoop your traffic and people can't access anything besides port 80.

>if ($host !~ ^(abc.com|www.abc.com|images.abc.com)$ ) {return 444;}
Uh, haha, what?
>>
>>60969498
>what are you worried about
Paranoid is all, I suppose. Really not wanting to fuck up a deployment of a new personal site and other immediate-future sites.

And the URLs are from an example I copypasted it from:

https://www.owasp.org/index.php/SCG_WS_nginx#Allow_Access_To_Specified_Domain_Only
>>
>>60969498
It's mainly links to 404 pages and test pages that are available. That needs to be fixed

I'm more than happy to sick with WordPress or learn to code from scratch - I plan on doing the latter here anyway.
I'm IT and the major issues are wi-fi related. So I figured it might be nice to do as a side project and if I like it, pursue it since I'm only part time.

SEO never comes into it - it's literally a static site. The site was done by someone else who cannot optimize at all. We get little traffic. i don't think people even donate.

All I know about the methods the digital marketing guy uses is: filezilla nad adwords - he has no responsibility for the site since it was done by someone else.

I think I'll try using WP and if I get stuck, see if I can do it manually since it's just killing some downtime really
>>
so i have a webpage with about 30 buttons. Each button causes a div to appear and the div contains a youtube video. the webpage loads really slowly because it has 30 youtube videos loading at once. How I load a youtube video only if a user clicks the button it corresponds to? in other words, i don't want any of the 30 videos to load and only want one to load whenever a user clicks a certain button.
>>
>>60969546
Use whatever CMS, I wouldn't use one because I'd sooner use a db, backend and link anything truly static with apache/nginx. Alll I know are WordPress, Umbraco and Mezzanine, which I only know because it's python and python is an admittedly very pretty language. Ostensibly. C# libraries usually have the nearest api.
>>
>>60969576
Paste the element in with jQuery with a function that's run within each of the divs onclick methods. Clicking on another video should close or remove any other videos.
>>
i've got my first interview tomorrow and a bit anxious...i used a recruited to get it and the recruited said dont forget about tests..has anyone ever written tests for interviews? the interview is at there office, but we'll be screen sharing...please help me anons
>>
So I've got quite a bit of database tables ranging between 100MB to 20GB in size and it's getting quite unmanageable and slow. So I'm looking in to integrating a NoSQL solution.

In the long term I want to move most of my relationship data to an unormalized table.

So what are the easiest/best solutions for moving from a RDBMS? Scylla/Cassandra, MongoDB, DynamoDB?
>>
>>60969546
look at using Grav CMS. doesnt use a DB, flat file. open source. free. has plugins.
>>
>>60969498
not him. why not apache with nginx as a reverse proxy? maybe throw in redis for caching but thats overkill for that anon
>>
idk if this is the right thread or if I should go to /dpt/ but I figured you guys would probably know better.

I'm building an automated chicken coop and a few of my functions are based on sunrise / sunset operations. I'm pulling the data from Wunderground's API. This is far out of my comfort zone and I don't know anything about how JSON works in an arduino based environment (or anywhere).

I found an example that is similar to my needs, it pulls data from the "current_observation" object:

DynamicJsonBuffer jBuffer;
JsonObject& root = jBuffer.parseObject(json);
JsonObject& current = root["current_observation"];
String temp_c = current["temp_c"];
String weather = current["weather"];


I need the info from the "moon_phase" object (see bottom of post), specifically sunrise, sunset and current time. All of which are nested inside the moon_observation object. Problem is, I'm dumb and have no clue how to parse those times.

I get that I need to change my root, to the moon_phase object and I can pull everything outside of the nested object out just fine:

DynamicJsonBuffer jBuffer;
JsonObject& root = jBuffer.parseObject(json);
JsonObject& moon = root["moon_phase"];
String perc_Illum = moon["[percentIlluminated"];
String age = moon["ageOfMoon"];


but I run into issues trying to pull things out of the nested objects. for instance, changing

 JsonObject& moon = root["current_time"];

and pulling hour and minute doesn't work. I'm stumped and have no idea where to look for more info. What do.


        ,"moon_phase": {
"percentIlluminated":"31",
"ageOfMoon":"24",
"phaseofMoon":"Waning Crescent",
"hemisphere":"North",
"current_time": {
"hour":"0",
"minute":"24"
},
"sunrise": {
"hour":"6",
"minute":"23"
},
"sunset": {
"hour":"20",
"minute":"28"
},
"moonrise": {
"hour":"2",
"minute":"49"
},
"moonset": {
"hour":"15",
"minute":"41"
}

}
>>
File: 60607526_p63_master1200.jpg (152KB, 1024x768px) Image search: [Google]
60607526_p63_master1200.jpg
152KB, 1024x768px
>>60948480
I'm trying to do something fancy in Javascript.
I have got this N-dimensional object/map of lists, something like:
var input = {
R1: [100, 200, 300],
R2: [150, 200, 330],
R3: [10, 20, 30],
[...More keys]
}


And I would like to transform this into a list of all the possible combinations of this list, in this fashion:
var output = [
{R1: 100, R2: 150, R3: 10, [...]},
{R1: 100, R2: 150, R3: 20, [...]},
{R1: 100, R2: 150, R3: 30, [...]},
{R1: 100, R2: 200, R3: 10, [...]},
{R1: 100, R2: 200, R3: 20, [...]}
[...]
]


But every solution I've tried myself has their issues, because lists can't decide if to copy as reference or as data; and recursion works strangely. So, I tried to artificially hide columns and perform a recursive function like this.
https://pastebin.com/N4xvwu6J

But whenever I try a console.log there are duplicate results and whenever I put a "return" in my recursion it throws me only one result.

Is there a fix or an already made solution for this problem?

Thanks in advance.
>>
>>60969631
Recruited?

I'm not sure if you mean you're the interviewee and that's some agency dude, those guys have never helped me for some reason. I've done a few with tests, but they were big places shifting candidates out and in. Most decent places are just an interview and a phone call, sometimes on the phone call they'll ask for code so they can see your style and an estimate of your skill. These places won't test you because they won't interview you unless they like what they see.

That should cover if from every angle.

>>60969812
Yeah I'd use nginx regardless, just it and a backend that's routed by a path. You can route your front page into this too if you're designing your own CMS.

Nginx is cosy. If someone tries to ddos your site they'll either bump into nginx, which has mechanisms to stop that, or into a relatively fast backend (in my case) that responds fast when requesting unchanging data. Ddosing a good threaded server in a fast language would be interesting.

>>60969750
If you have tables with over a billion entries please leave now. You were dumb and now you must understand the consequences, you will lose data trying to fix this shit or you'll end up doing a complete rewrite.

>GB
That's enough to store information on an entire population of a country.

>>60969989
For real or as a project? What IC are you using at the actual gate?
>>
>>60969989
Can you not do something like this?
root["moon_phase"]["current_time"]["hour"]
>>
File: 71GUeTwFn5L._SL1088_[1].jpg (144KB, 1088x1000px) Image search: [Google]
71GUeTwFn5L._SL1088_[1].jpg
144KB, 1088x1000px
>>60970061
>For real or as a project?

I'm just trying to make my life easier. I have a batch of Brahmas that are too stupid to roost at night. I have a catch me /fuck me situation where I can't train train them to go up because if I go out before dusk all the smarter chickens leave the roost and if I wait long enough for them to bed down they become unresponsive or a local predator will pick a few off.

>What IC are you using
I'm using an ESP8266 with an arduino based boot loader (because I don't have the patience to learn LUA right now). (pic related)


>>60970086
That worked perfectly, thank you so much.
>>
Doing freecodecamp and on LEsson 91. I've been doing ~10-11 lessons a day, and I'm on css. I'm having fun and I think its neat to code in, but I don't feel like I'm retaining well. I'm trying not to get too excited by the idea of possibly finding something I might be really hyped to do, am I set for a hard crash when the Javascript comes in, or is this a good thing?
>>
>>60970117
ICs are either really great and come with everything you want and are even under 10$, or are expensive, easily brickable things that sometimes occasionally do what you bought the thing for.

That's why I ask.

Networking protocols are tricky, that's why I'd do what you're doing with a raspberry pi and load Linux. After Linux you can implement socket communications however you like. But if all you're doing is setting a time on the IC, why not implement everything on the IC and find a time keeping thing if the IC doesn't do that?

And yeah, chickens are distressingly stupid. Remember to take them to the vets if they mysteriously stop laying eggs after a good run, eggs get stuck and they'll die without any warning or change in behaviour at all.

>>60970086
Not him obviously, but I'd be curious about why JObject can't become something more general.

Use a language that handles random objects better, C# has this wonderful thing called anonymous objects.
>>
>>60970061
I meant to say "i used a recruited and he got my an interview and this agency". in his email he mentioned "dont forget tests" but Ive heard of anyone writing tests for DS/A questions...
>>
>>60970061
I guess, but should always install ddos-deflate and fail2ban anyways
>>
Guys I'm starting flask but I want to categorize my receiver functions. Is there anyway to setup URL.py like django or do I need to add all page functions in a single monolithic script?
>>
>>60970360
This IC is quickly becoming my new favorite IC. It's incredibly capable for something so small and cheap.

There are a few reasons why I chose this IC. Mainly for the capability/cost of it. Web connectivity opens a lot of doors for me with what I can implement. I really want to add rules to keep the coop closed if there is severe weather. I'd end up spending significantly more than the $5 I paid for the board if I bought weather sensors and would spend more development time when I could just pull it all from Wunderground.


The actual acquisition of the data has been incredibly easy so far. Thankfully Arduino has libraries for everything I want to do. I just was completely unfamiliar with javascript object notation so I panicked when I got empty strings.
>>
>>60970487
Separate by the components used by them or by the page that they're used on.

>>60970430
"I used a recruited" isn't a valid English statement, recruited is a verb and only nouns can be "used" in the physical sense.

I see you are not in an English speaking country, where I live recruitment agency types probably wouldn't help the common people who post here.

>>60970632
Good. Good luck!
>>
>>60970117
ESP8266s are magic.
I bought myself a couple of these a while ago. Did nothing with them yet but this week surely I'll experiment with these.
>>
>>60954971
/biz/ makes me anxious because everyone there claims to make thousands trading coins
>>
is it bad practice to name function is php like
public function selectAllUsersFromTable($tableName)
public function addAdminPermissionsToProfessor($id)
>>
>>60971258
it's not. camelCase is the standard convention for naming methods in PHP
source: http://www.php-fig.org/psr/psr-2/#methods
>>
>>60969190
wtf of an example is that?
with Vue you would write it like this
<div v-if="name == 'OP'">Oh, hello {{name}}</div>
<div v-else>fuck off</div>
>>
>>60969750
>100MB to 20GB in size and it's getting quite unmanageable and slow


This is barely a blip for any major SQL database. If it's unmanageable and slow, you're either on a Raspberry Pi or have terribly written SQL and indexes.
>>
>>60971258
Camelcase id standard and expressive names are very good. But maybe you should look more into oop and general architecture. Like that first one could be method getAll of model class Users and second one makeAdmin of users or permissions class.
>>
>>60971719
I named them this was so i can know what are they doing, query is select so i used select in naming.
what would you say about this part of code
class Partials
{
private $pageTitle;
private $buttonName;
private $tableTitle;

//Function for setting webpage tittle
public function setTitle($title)
{
$this->pageTitle=$title;
}

//Function for adding header part of html page
public function getHeaderPart(){
echo "<head>";
echo "<title>".$this->pageTitle."</title>";
include_once "includes/Professor/partials/_Head.php";
echo "</head>";

}

//Function for adding footer part of html page
public function getFooter()
{
include_once "includes/Professor/partials/_Footer.php";
}

>>
File: 1494278403434.png (313KB, 452x444px) Image search: [Google]
1494278403434.png
313KB, 452x444px
>TIL Godaddy India actually has a customer support chat page
JESUS CHRIST! THIS COULD HAVE SAVED LIVES
>>
File: 1497357707756.jpg (21KB, 402x480px) Image search: [Google]
1497357707756.jpg
21KB, 402x480px
recommended domain registrars?

Namecheap doesn't like letsencrypt
Gandi looks old as fuck
Google Domains is not available outside NA/UK/India
>>
File: flat,800x800,075,t[1].jpg (72KB, 800x800px) Image search: [Google]
flat,800x800,075,t[1].jpg
72KB, 800x800px
>>60972146
>Namecheap doesn't like letsencrypt

you what
>>
>>60948792
pretty sure muse is just for designers to make their site look the way they want, you're supposed to hand the muse site off to a real coder afterwards
>>
>>60972146
>Gandi looks old as fuck
>looks old as fuck
are you basic? What does that even mean?
>>
How to increase pagespeed? Google says it has 56/100 but it's as fast as google.com
>>
File: whoisguard-protected-example.jpg (33KB, 402x127px) Image search: [Google]
whoisguard-protected-example.jpg
33KB, 402x127px
what are your opinions about whois privacy

my website will be for a business but i won't be doing anything that requires me to publicly list my name and physical address any time soon. i'll probably have a dedicated business address by then

i've read that it helps avoid being targeted by spam, but with whois privacy there's still a way to contact you through email, so i'm not sure how much it helps against spam?

the main concern for me is if it looks cringy/dodgy if someone does a whois and they sees that my website is registered through some anonymity service located in panama or something. but other than that i guess i may as well do a private registration?
>>
>>60972335
get better at webdev
>>
>>60972343
but i guess WhoisGuard isn't that cringy? and i don't think the average customer would do whois lookups on random websites
>>
Really new beginner here, just wondering about media queries. Do you guys put in your own manual break points by scaling the browser down and seeing where one is needed? Or do you just use standard break points?

I'm a designer (print mostly, but I'm learning web design now since you kinda have to to work as a designer these days) and the firm I used to work at, one of my co-workers said to scale your browser to see where your layout should break yourself.

To me, it'd make more sense and be quicker to just use standard break points you know are sizes for different devices and work from there, i.e. one for mobile, one for tablet one for desktop maybe one for television/hiDPI display.

Am I even making sense with my question here? Like, shouldn't it in theory always require a break at the same pixel widths? If your layouts are fluid and based on relative units, shouldn't they always work within those standard widths? Just seems like unnecessary time to actually stretch your browser and mark each individual time you feel the need to add a break point.
>>
>>60972335
mod_pagespeed
>>
>>60972584
Also, I've read in tutorials/books that it's good practice to never use more than ~3 stylesheets for a site, but I haven't actually heard that from real people I've talked to. Is this still accurate? Say, one for webfonts, one main.css and a normalize or something? Not sure why you might need more than 3 stylesheets, just seemed odd to me that 3 would be the limit.
>>
>>60971775
It works but i just think that oop approach is better with encapsulation and stuff. Like $users->getAll() is simply nicer. And about that partials class - I would remove it and instead use some sort template engine. Also I would use master layout template instead of including header and footer everywhere.
>>
>>60972632
most of my code looks like this
class Action
{
private $conn;

public function __construct()
{
$db = new DatabaseConfig();
$this->conn=$db->getConn();
}

public function isDeleteProfessor()
{
if(isset($_GET['delete_professor_id'])){
$id=htmlentities(strip_tags($_GET['delete_professor_id']));
$stmt = $this->conn->prepare("DELETE FROM professors WHERE id = ?");
$stmt->execute([$id]);
header('Location: Professor.php?professors');
}
}
.
.
.
>>
javascript seems intimidating to me. is it difficult?
i guess css and to a lesser extent html did at first as well though until you learn it
>>
>>60972741
No programming background?
>>
How outdated would a course from 2015 be by now in terms of features? Have there been many significant leaps in HTML or CSS since 2015?
>>
>>60972300
https://community.letsencrypt.org/t/what-namecheap-is-saying-about-letsencrypt-from-a-support-blog/29415

>>60972612
each stylesheet has to be fetched separately by the serve, which increases load times.
Today it's common that something like webpack bundles your CSS and spits out one single file.

>>60972741
just start and take it one step after another
>>
>>60972759
Very, very little. I made a calculator and a coin flip simulator in c# once but that's about it. Would it be better to learn php before js? Or does it really matter?
>>
>>60972771
>a coin flip simulator in c#

lol so minus all the boilerplate, you wrote 3 lines of code?
>>
>>60972771
Get a grasp of JS first, then afterwards decide which language to choose for the server-side
>>
>>60972767

most of the points they make are valid though, and that is about hosting services namecheap provides and not the domain registrar.
>>
>>60962938
Hostinger/000webhost if you have a domain.
GitHub Pages if you don't.

freedns.afraid.org if you have an old spare computer you don't know what to do with.
>>
>>60972999
000webhost is a giant piece of shit.

Never use them.

They deleted my domain because I didnt log in for a week. They didn't even bother to back up my DB and I lost 40 pages of user generated content. They don't inject ads, they straight up redirect your users, and it's 100% on a timed cookie. As in 100% of people going to youre domain will be redirected to a different website several times. Fuck that host.
>>
>>60972890
Basically. That's why I said javascript looks intimidating.
>>
How are you meant to scale elements based on the client's window? vh/w, inner/outerHeight/Width, clientHeight/Width all seem inaccurate.
>>
>>60972723
Have you heard about MVC? This class is trying to do both controller and model logic that goes against single responsibility principle.
Also your html escaping is made unnecessary by prepared statement and if id is integer then intval would be better.
>>
File: interview400.jpg (49KB, 400x266px) Image search: [Google]
interview400.jpg
49KB, 400x266px
>become graphic designer
>can't get hired anywhere without knowing how to make websites
fuck's sake
>>
should i use flexboxes or floats for responsive design
>>
File: ss.png (54KB, 1371x278px) Image search: [Google]
ss.png
54KB, 1371x278px
>>60973247
is something like this better?
im learning while coding desu
>>
So, I've been on-again off-again working on a synced streaming service where you put in up to 5 video urls in your "room" queue and you watch those with people. Rooms can be public, private, etc. On a scale of 1-10, how bad is it that I've made it with ajax/jquery, php and sql?
>>
>>60973719
isnt that just rabbit/plug.dj?
>>
>>60973569
Better but still some things. Controller and model are separate things. One controller may use several models. And you should have class per concern which for example means model per database table. So you would have professor model and student model. Redirection should not be in delete method because it's not part of deleting. Put it into controller. Also you should have controller per concern like ProfessorController which would handle all actions related to professor. Little hint - the bigger your classes and methods get the bigger is chance it should be separated into different parts.
>>
File: ss.png (57KB, 1395x332px) Image search: [Google]
ss.png
57KB, 1395x332px
>>60974160
>>60974160
student and professor tables have same columns, only table name is different
thats why i did this
>pic
i created one function for both of them, also set header in controller
>>
>>60974328
If columns are same then there should be only one table with type column to differentiate between student and professor rows. If that is not possible for some reason you should have separate model classes that define table and extend some base model class where is actual logic.
>>
>>60973256

>design
>>
File: Really makes you think.gif (178KB, 600x441px) Image search: [Google]
Really makes you think.gif
178KB, 600x441px
Hey anons, I'm trying to do a visualization with React and what I'd like to add is that when you hover over the bar in the charts the bar will change color and at the same time a table highlights the specific row / column related to the data that the bar is using.

For visualization I'm using Victory, and it has shared events like gif related that allow you to do something similar, I'd like to do the same but instead of highlighting the pie chart, highlight the data on the table.

>http://formidable.com/open-source/victory/docs/victory-shared-events

If you have any ideas / links / tutorials or anything similar it is going to be greatly appreciate it, at this moment I've been doing some research and nothing shows up, I don't even know what to Google any more.
>>
>>60972584
Here are my media queries for a fairly simple, single page application. I query the device width in inches to detect smartphones, and add some styles specifically for that. The others just increase the size of a box for aesthetic purposes. I could have used percentages instead, but that's just personal preference.

Tablets can be basically the same size as laptop screens, so I don't differentiate there. I'm not even sure how to select tablets specifically, in order to replace hover events; you might have to use a bit of JS for that.
>>
New when
>>
>>60976009
not even at the limit
>>
I'm having difficulties using the Django ORM, is there any reason why I sholudn't just use straight-up SQL for my queries? Or should I try SQLAlchemy?
>>
>>60976573
manual mapping between sql results and domain objects gets tiring and repetitive very quickly
>>
>>60976597
yeah, I guess. So what about SQLAlchemy? Is it any good?
>>
new
>>60976759
>new
>>
>>60970708
Jeez, I mean recruiter, I'm not sure why I kept using a 'd', but seriously, do people write code tests during an interview over screen share??
>>
File: daijoubukana.jpg (33KB, 620x255px) Image search: [Google]
daijoubukana.jpg
33KB, 620x255px
>>60959563
Even Brackets?
The Live Edit mode is bretty neat
Thread posts: 313
Thread images: 36


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