for (var {name: n, family: {father: f}} of people) { console.log('Name: ' + n + ', Father: ' + f); } // Name: Mike Smith, Father: Harry Smith // Name: Tom Jones, Father: Richard Jones
Jackson Nguyen
I'm learning Angular right now. And before that, I dabbled in React a little bit.
And comparing the two, Angular feels more professional already. React felt amateurish in the way the components were created and used for instance.
holy shit how the fuck do I find out what is causing my apache redirects aaaaaa this shit is driving me crazy the virtual hosts redirects conf are commented out the letsencrypt redirects are all commented out nothing in the httaccess file and yet my site makes 100 redirects before resolving
pls halp
Landon Ward
Heh, I posted the original of that. It's worth remembering.
>holy shit how the fuck do I find out what is causing my apache redirects You can set the log level to something much lower and see what gets spammed. Also, remember that Apache is a service, stop the service and run it manually with debug flags, then see what gets spit out into console. It's not something you need to do very often but it's a useful trick worth remembering.
You could always try disabling the rewrite module and seeing if that makes a difference, it would narrow down the type of redirect anyway.
Adam Brown
Oh yeah, also do a cURL call with maximum verbosity and pay attention to what it gets back. That will reveal a little bit too.
Evan Ward
>email services are more expensive than a vps Why is this allowed?
Jason Hall
What are some core soiboi js libraries for frontend? Looking to improve looks with the classics like parallax etc...
Leo Martinez
what do you guys think of using laravel and vue.js for a cms?
Jacob Campbell
Is there anything inherently wrong with still using DB + php -> json -> AJAX?
Adam Kelly
nothing
use a proper framework for the backend and maybe use Axios if you dont need jquery.
James Jenkins
Maybe not the best place to ask but how do you settle on a proper domain name for a website when everything is being squatted on. I spent like an hour looking for one that at least had the .net available (finding one with .com is almost impossible it seems).
I'm not actually a web designer or anything but i've got a question:
How do people make certain sites (lets take mangakakalot for example) automatically add links when they upload mango chapters). Say I uploaded chapter 1, it would automatically make a page that uses the mangakakalot template and add it into the chapter list
I'd love to read up on this if there are any chapters in books related to this, I sadly dont even know what to google search for regarding this
Levi Brooks
I'm not sure how you're imagination the process, but there are no new pages for each chapter. All chapters use the exact same page. When you request the server to fetch a chapter, it searches in your database for the images/links, and then it embeds them in the visualization page before returning it to you.
Jackson Roberts
I always thought that you uploaded the images to the site named x - y and then the website would automatically make it's own page automatically, kinda like this and store it on the server for accessing whenever; is that really incorrect?
Actually, better yet, lets use Jow Forums for an example, how does it automatically add a thread into all of it's threads when you start it, with the post text box being shaped correctly
Aiden Nguyen
when you are uploading something, it gets stored in the websites database (mysql or something) when you for example request the index page of a website, the website looks up in the database and generates the html dynamicly (with a scripting language, php or python for example) you are clicking on a link of a specific manga, the link has the id of the manga, and the server script again uses this id to look up the database to grab all the information of this specific manga from the database and inserts it into the html.
like says, there may be 1000 mangas on your website, but there is only one script that knows how to grab the data from the database and only one template that defines how it is shown in the browser.
Aha, so there's a template that you setup beforehand, then when you need it, it'll just insert say the image of the animu into the animu image field. Am I correct assuming that then?
Michael Mitchell
it's not really adding the thread to the website. it's inserting a new data row into the "threads" table of the database with the information like title, name, image, text
every time someone requests a page from Jow Forums, it looks up the database, grabs all relevant threads and generates the website
every time someone requests a page, may it be page 0 or page 10
- User requests page 3 of Jow Forums board - server script asks database for newest threads 30 to 40 - database responses with 10 threads and their data - script generates temporary html and inserts these 10 threads into this html - sends it to the visitor - website with 10 threads appears inside your browser window
yeah, there is something that kind of looks like a normal html file but it is used by the script, and the script inserts the right information into the "placeholder" places
John Powell
Which static site generator does wdg use
Connor Flores
But where does it store the actual image and text data, is it all inside the database?
Leo Perry
Some databases just store the path of the image in your server. Some databases store the whole image. It's up to the developer.
Michael Allen
Assuming proper development you would store it on a seperate image server though, right? would it use a seperate script to send the correct image through?
Hudson Anderson
what are some good JS libraries or JSON APIs out there I can play with
Joshua Nelson
storing binary objects (images) in the database allows you to scale everything at once and is easier. Scaling with a separate image server may save scaling costs at first but is more complex to manage. Both methods are "proper" and both methods have their own strengths and weaknesses
Joshua Stewart
I think the root issue here is that you're assuming a web server returns just raw pages. In other words, if I go to mysite.com/dank/memes.html, it's essentially the same as navigating to a /dank folder on my computer and clicking a 'memes.html' file. The actuality is that a server is basically a list of ways to "answer" incoming requests. Some of these may return html files directly, but you're still essentially contacting the server and saying "Hey, here's my request for file 'blarg.html'. Can you respond?".
So when you access this contents page, what it essentially may be doing (depending on the site structure) is sending out two requests. The first one simply gets the page itself (keeping in mind the explanation above). The second one says "okay, now, for this logged in user/credentials/etc., gimme the chapter list". This is part of the concept of AJAX, which allows us to rebuild PARTS of a page without having to rebuild the entire page.
When you actually load a chapter (I presume of a manga? so... an image?) it again may not actually be loading an individual PAGE per se, but rather saying "load the generic 'showOnePage.html' file", and then sending a request for the particular chapter you want. It then appends/replaces part of the page with that information.
So how do I go about making "templates" for my site? Forever ago I used php to make header and footer etc includes, but I want to move away from PHP. What's a suitable replacement for this? Is this what React/Vue/Angular do?
Liam White
JQuery Moment Lodash Axios
Connor Reed
I think he's boring. I bought his MongoDB course and regretted it. He spends more time on Mocha testing than actually explaining more important concepts in Mongo. Quite disappointed desu
Jason Lopez
php is on the server. react/vue/angular are javascript on the client. php makes your server generate pages, while the others are made for your browser to generate the page after being sent raw data from the server
Luis Price
You can use a backend template in whatever language you want to include header, footer, sidebar or whatever else you want and use the front end for to make the pages dynamic.
Christian Turner
How much do Udemy courses cost in your country? They are way too cheap where I live. I assume they charge that price because no one has money in this shithole, and it's better to just earn some cents than nothing at all. Are the courses arround $7~$10 in America too?
Gabriel Davis
They are $10 right now. They seem to be like $150 at full price but I think they're on discount most of the time.
David Foster
the only husbando that exists is wes bos he's the only one who isn't boring
Benjamin Parker
g a t s b y comfy as heck if you're already used to react, can be a kind of good way to learn react as well but if you go that route it can occasionally feel overwhelming
>They seem to be like $150 They are always on discount, the only difference is if they are $9.99, $10.99 or $14.99. One discount ends, another starts. May be worthwile to google the course name, i found multiple free coupons for the courses
Jack Rogers
what skills should someone "master" to be considered a really good senior programmer?
Noah Barnes
any Atom users here? Microsoft now owns Github so you can go ahead and switch to VSCode already
Adam Baker
>people unironically using atom I'll just continue using my sublime text 3, thanks
What do text editors have to do with code hosting websites?
sigh...
Luis Hernandez
Anyone who was using Atom already made the switch. At this point the Atom website will probably just redirect to VSC next week.
William Jones
And that's a good thing!
Justin Morales
Why would anybody do that when webstorm is the best
Austin Barnes
If they get their hands into electron and find ways to improve it across the board, I'll be happy as a clam. Until then I don't really care about the whole ordeal.
Bentley James
Webstorm looks nice but I'm poor
Dylan Brown
All jetbrains ides look nice but are mediocre.
Lincoln Bailey
>wrong. what did you mean by that? do you have some insider info?
>What do text editors have to do with code hosting websites? this particular text editor is maintained by the same company that owns this particular code hosting website
you could always try the EAP version which doesn't require license, although I think vscode is enough (and I do use IntelliJ and CLion for other stuff) jetbrains.com/webstorm/eap/
Chase Wood
>email services are more expensive than a vps a) It needs a domain name as well as a vps to do an email service b) what do you think the vps is run on? They need to add their expenses and profit margin to the cost of a vps
Obviously, anyone that CAN run their own, should.
Dominic Jones
Trying to learn React, but I can't think of anything cool to make using APIs. Does anyone have any ideas?
Jordan Gonzalez
a
Alright, why the hell is the background color showing up when I zoom to 110% in Chrome?
I'm planning to learn React just to learn React Native afterward. Chances are I'll probably not even use it though.
Camden Stewart
Is it still ok to use transparent gif these days? There's this one instance where I have to use an image with a transparent background. Png looks more smoother but the size is like 3x bigger than gif. Even when optimized
Evan Jenkins
i need to buy my first domain, who should i go with? i'm in the US if it matters.
Oliver Sullivan
Any kind of band website so you can just make 1 component and use that for every tour date, 1 component for album arts etc and you'll learn how to reuse components properly and use state/props etc etc
Isaac Roberts
any, goog domains, namecheap, mostly all the same
Robert Rodriguez
Sup, I'm looking for someone to join with me.
I need SEO mainly. React and react-native would be nice. I had a python dev that left for some reason before even starting on anything. I suspect he was working for one of my competitors trying to get info.
So what I need is a way to keep 1000s of client in sync with a timer. I need the backend to do some shit once every 10 minutes and update all of the clients instantly. I need the backend to do some more shit once every 60 minutes and update the clients instantly. Estimating 10k people that need to get stuff pushed to them every 10 minutes and 60 minutes. What can do it? I hear socketio can do 1k and I'm not sure how many simultaneous ajax calls my server can handle. What do you think?
I'll pay by project or equity per project. I intend to sell everything.
Owen Hughes
Except godaddy. Don't even use them to search for domains
Jeremiah Hall
I'm a retard trying to learn programming. Can someone help me out? I got stuck while trying to implement registration confirmation via email with php.
Keep in mind I know almost nothing about networks.
More information:
- I am using Windows 10 LTSB as OS. - I am not using XAMPP or any other package. I setted up Apache and PHP manually based on tutorials. - I am using MySQL as SGBD. - I am using PHPMailer. - I am trying to use Gmail SMTP server to send my messages. - I've tried setting the script that uses PHPMailer classes to use ports 25, 465, 587 with both tls and ssl. I've tested smtp.gmail.com with telnet (which was disabled in my computer) and apparently I can only use port 587.
set the inner width to be 100% and not based on pixels make the grid based on 12, so if you want gutter in between you can do 4 4 4 not 3 3 3 and just give them margin on each side to space it out
And just when I thought I understood promises functionWithCallBack(() => { thisReturnsAPromise().then(() => { return thisAlsoReturnsAPromise(); }).then(() => { //both promises resolved }).catch(err => { //error }); });
>.NET a software development platform with the CLR (a JVM clone) at the bottom and some libraries and languages that target it on top >ASP.NET a component-based web framework that is a part on .NET >ASP.NET MVC an action-based web framework that is a part of .NET
overall not recommended
Isaiah Foster
anyone has ide why return 1; return view(); return redirect();
are not working in laravel?
Dylan Cook
I don't work with PHP but usually once you returned a function it can't return again. Your function ended after return 1;
Ryan Hall
Hello /wdg/. I am a webdev-newbie and there's a problem I want to solve.
Let's say I need a site which serves images (with a simple interface having the data of the image, maybe tags... well, normal website things) Let's assume I am storing the images in the /images/ folder, within my public directory. What I don't know how to do is: when an user writes an url, with the image id (which could be simply the file name, or an id in a database), return a page corresponding to the image.
Example: example.com/479 Return -> html page corresponding to 479.jpg
Of course, I could write a static site generator in python, and have one html stored for each image, but that does not look like the way webdevs do things nowadays.
I am trying to work with Django right now, by the way. So if there is any specific solution... Thank you.
Thomas Robinson
Literally write an url to that image? Not sure i understand your question. A link is just a request sent to the server to "open that image in that specific place". If your image is on /images/folder/imagename.jpg then the url is a path to that file
>I could write a static site generator in python Are you this mental?
Liam Thomas
I am not talking about downloading the image, but about generating a page with the image embedded. The page can contain data about the picture (stored in a database), menus for navigating the site, comments for each picture even. You know, normal things.
The only thing that changes are the div where the image is going to be
Wyatt Reed
yes, the div and the data displayed. But my doubt is how to make it "dynamic" or whatever you call it. Make an url return the page of its corresponding image. Of course, the brute way would be to pre-make an html for each image.
Easton Foster
I just skimmed your question so if I misunderstood what you want to do I dont really care
You want to build an image viewer and pass the paramter in the url.
So for example my imageviewer is hosted at
example.com/imageviewer
You want to open a image 123.jpg from folder images if someone requests, example.com/imageviewer/123
In a frontend framework like angular you would have a component imageviewer and you would define that it accepts parameters and that route is imageviewer/:image_name or whatever.
That's how most webdevs would do it.
I don't know django specific solution but search for parameterized components or pages however it's called.
If you just want a solution that would work anywhere, you could just scrape the url by yourself and get the image url by yourself by taking everything after the last /.
William Torres
>udemy.com/share/100026/ I came up to JS, but i like it so far. Would you say i can already start asking small businesses to make them a simple website, or is it better to finish the whole course first? I know the rest focuses on backedn more or less, and i was gonna use WordPress for that anyways
Ethan Sanders
You could definitely do some basic websites for small businesses once you have HTML, CSS, and JS down. I would still recommend just spending the extra week or two to go through the rest of the course just to get more experience with all 3 of those even if you aren't as interested in the rest of the course.
Jaxson Bennett
Definitely finish the whole thing, if you plan to do wordpress then I guess when it comes to the back-end part just do a wordpress course instead, but having a basic understanding of how backend actually works will be very useful for you in general.
When you finish that course you'll still be an absolute noob so just keep that in mind, but sure you can probably make decent sites for small businesses right away, you'll probably learn more doing that than you would doing a udemy course anyway (if it pushes you to learn new things, at least)
Jason Harris
Thank you. I think I actually solved it, with Django.
What I did, in case someone else has a similar problem: 1. Write a views function with, at minimum, one variable for the urls (the id of the images, in my case). Let's call the variable "number", and the function "number_getter". def number_getter(request, number): return HttpResponse(number) 2. Write an url pattern that takes the variable we defined, which calls the function we wrote. For example: path('/', views.number_getter)