Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
What's the cutover for when an HTTP file upload should instead be using FTP? Or is there one? I noticed Amazon S3 supports big file uploads over HTTP, but they also have a Java applet thing (I don't want to go down that route...)

Adbot
ADBOT LOVES YOU

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
I don't think I've ever used FTP for anything client-facing. In terms of getting crap from A to B, HTTP should be just fine, no matter the size.
The only areas of difficulty are how you handle the stream on the client and server side, but the protocol itself should be perfectly adequate.

From a quick google, the arguments seem to be; if your client is using the browser, use HTTP, otherwise if you're genuinely uploading a file to a directory, use FTP (and an FTP client).

I am not an authority on this, here's a link. http://daniel.haxx.se/docs/ftp-vs-http.html

MrMoo
Sep 14, 2000

fletcher posted:

What's the cutover for when an HTTP file upload should instead be using FTP? Or is there one? I noticed Amazon S3 supports big file uploads over HTTP, but they also have a Java applet thing (I don't want to go down that route...)

Amazon has chunked HTTP uploads, I guess around 100MB chunks because TCP is supar reliable. I think you can pass a checksum in the POST and the server will verify it.

FTP has no joy at all.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
File resuming was the main thing I was looking to FTP for since these files could be ~100GB, but if HTTP supports that I'd be all for it. Where can I find out more info about that? Can I support resume both from command line (curl) and within the browser?

MrMoo
Sep 14, 2000

A browser yes, the command line, maybe something in Java, here's their original announcement:

http://aws.amazon.com/about-aws/whats-new/2010/11/10/Amazon-S3-Introducing-Multipart-Upload/

Another one with a picture and details of how to do it on the command line: basically split the file use curl with a few custom headers.

https://aws.amazon.com/blogs/aws/amazon-s3-multipart-upload/

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
From comments I've read on both Vivaldi and Spartan apparently there is no 'right' way to make a web browser.
Vivaldi: It's just the same engine as Chrome and Opera, what's the point? :rolleyes:
Spartan: Oh great! M$ made their own engine again instead of going with something like WebKit :argh:

caberham
Mar 18, 2009

by Smythe
Grimey Drawer
But least Vivaldi is open source right? Where's Richard Stallman

MrMoo
Sep 14, 2000

The Merkinman posted:

Spartan: Oh great! M$ made their own engine again instead of going with something like WebKit :argh:

Honestly I think the current state of three active participants (Edge, Gecko, Blink) is very good to maintain HTML standards and pull everyone out of the proprietary lock ins. Once the legacy Trident has died there will be minimal problems. The gigantic caveat is that Edge being WX only really is a problem for the next 10 years.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Still wish Opera had open sourced Presto when they abandoned it. I'm really curious how they managed to make it so drat memory efficient compared to everyone else's.

Munkeymon fucked around with this message at 19:42 on Jan 29, 2015

Xarthor
Nov 11, 2003

Need Ink or Toner for
Your Printer?

Check out my
Thread in SA-Mart!



Lipstick Apathy
Okay, so I have a newbie(ish) question and I wouldn't ask here but I've done a bunch of Googling and research and I can't quite seem to find anyone who has addressed this question.

I'm using WP to build a site for my buddy's band and I'm using the Moeisia theme. By default when the page loads it has a big picture that fills up the entire page and you have to scroll down to see the menu bar. It looks like this, currently:



I like the big picture, but I'd really like the menu bar to appear at least a little bit when the page loads initially, because I've currently shown it to a few people how it is and they're like, "Oh, I have to scroll down to see the menu bar. I thought it was just a static image" So basically I'd like for it to load more like this:



I've used the exact image size that the theme called for (1920x650) so it's not as though I've used an oversize image. Any ideas on how I can get the menu bar to appear when the user first loads the page? Here's the site for anyone who wants to see it live.

streetlamp
May 7, 2007

Danny likes his party hat
He does not like his banana hat
The size is being set via this bit of js in scripts.js

code:
jQuery(function($) {
	if ( $(window).width() > 1024 ) {
		var height = $(window).height(); 
		$('.has-banner, .overlay').css('height', height);
		$(window).resize(function() {
			var height = $(window).height(); 
			$('.has-banner, .overlay').css('height', height);
		});
	}
	$(window).resize(function(){	
		if ($(".header-image").css("display") == "none" ){
			var height = $(window).height(); 
			$('.has-banner, .overlay').css('height', height);
		} else {
			$('.has-banner, .overlay').css('height', 'auto');
		}
	});
});
You just need to subtract some pixels from the height variable like for example 40px
code:
var height = $(window).height() - 40;
Make sure you do it for all the instances that height is being set

Xarthor
Nov 11, 2003

Need Ink or Toner for
Your Printer?

Check out my
Thread in SA-Mart!



Lipstick Apathy

streetlamp posted:

The size is being set via this bit of js in scripts.js

Make sure you do it for all the instances that height is being set

Success! Thank you streetlamp!

Raskolnikov2089
Nov 3, 2006

Schizzy to the matic
Anyone here ever go to a code bootcamp, or hire/have experience working with someone who did? I'm curious how it all worked out.

Sedro
Dec 31, 2008
What's the preferred way these days to dynamically load scripts? I'm not using RJS/AMD/etc.

I have a SPA which needs to load some rather large scripts if the user navigates to a particular place. I basically want a LoadScript('foobar.js') which returns a promise that downloads the script the first time I call it and is immediately fulfilled thereafter.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

Raskolnikov2089 posted:

Anyone here ever go to a code bootcamp, or hire/have experience working with someone who did? I'm curious how it all worked out.

I went to Wyncode in Miami. 9 Weeks, $9000. I wasn't aware that Wyncode was for absolute beginners, so my first few weeks were pretty boring, but once we got into rails it was pretty fun and they helped with job placement afterwords.

yoyomama
Dec 28, 2008

Raskolnikov2089 posted:

Anyone here ever go to a code bootcamp, or hire/have experience working with someone who did? I'm curious how it all worked out.

I'm interested in info on this as well (though more for ux as well as web dev). I've met a lot of people who've attended them and had it work out alright, but I'm still doing my research and trying to find low cost options. Is it really helpful career-wise, or could one be served just as well from self study and networking?

Raskolnikov2089
Nov 3, 2006

Schizzy to the matic

MasterSlowPoke posted:

I went to Wyncode in Miami. 9 Weeks, $9000. I wasn't aware that Wyncode was for absolute beginners, so my first few weeks were pretty boring, but once we got into rails it was pretty fun and they helped with job placement afterwords.

What was your background before going to Wyncode?

ZentraediElite
Oct 22, 2002

Asked this question in Creative Convention and got redirected here...

I'm trying to get a better understanding of what I would need for putting together a simple website for my father's business. He runs a small independent motel. I'm envisioning a simple landing page with contact information, a picture or two of the property, some simple driving directions, and maybe a description of local attractions.

I've looked at Squarespace, but it seems like it might be more than what we need. I haven't done any legitimate HTML work in ages, so I don't think building something from scratch makes sense.

What do you all think?

MrMoo
Sep 14, 2000

Facebook or Wix.com (advertised on TV a lot) could be principal candidates. But note a lot of the detail can be included on Google Local, Yelp, and many other services such as Expedia.

ZentraediElite
Oct 22, 2002

I've thought about Facebook. We have a TripAdvisor page, but the problem with that is we can't put all the information we want without upgrading. The other element with social network pages for a motel like this is moderating the content on it. To be honest, it's a budget motel, so people get on TripAdvisor and rag about the quality of the pillows and donuts.

Here's kind of what I'm envisioning... This is a Motel that caters to a similar market, though in another part of the state.

http://www.koolwinkmotel.com/

kedo
Nov 27, 2007

I said it in CC and I'll say it again here – you should really consider Square Space. ;) Their most basic plan is barely more than how much it would cost you to host a site you created yourself, and it's probably going to look 1000x better.

However if you really don't want to use them, you could download a premade template someplace like Template Monster (there are a million similar sites), and swap out the content for your own.

Don't use Wix, it is sooooooo terrible.

MrMoo
Sep 14, 2000

kedo posted:

Don't use Wix, it is sooooooo terrible.

I wondered, due to all the money on advertising they must be burning through.

kedo
Nov 27, 2007

MrMoo posted:

I wondered, due to all the money on advertising they must be burning through.

Yeah, it's maybe a half step better than Geocities was. I see designers apply for jobs with Wix portfolios on occasion and they're painful to look at and use.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

kedo posted:

Yeah, it's maybe a half step better than Geocities was. I see designers apply for jobs with Wix portfolios on occasion and they're painful to look at and use.
I can confirm this. I recently had to fix up our startup's homepage and my boss made me continue to use Wix because he renewed for a year back in November. You can't imagine how long it took me to make a multilingual, single-page homepage while keeping everything synced up design-wise when I needed to move something around :suicide:

lunar detritus
May 6, 2009


Do you guys pay for Creative Cloud? Is it worth it to pay for the entire suite (which includes Typekit) instead of only Photoshop?

kedo
Nov 27, 2007

gmq posted:

Do you guys pay for Creative Cloud? Is it worth it to pay for the entire suite (which includes Typekit) instead of only Photoshop?

Imo yes. I've always had access to the full suite in past jobs so I'm used to having them at my disposal, but it's SUPER nice to have things like Illustrator and InDesign. Especially for things like svgs. Typekit doesn't hurt either.

And all told it's cheaper than buying each new version was. I used to be pretty negative about it, but now I'm a convert.

ambushsabre
Sep 1, 2009

It's...it's not shutting down!

Raskolnikov2089 posted:

Anyone here ever go to a code bootcamp, or hire/have experience working with someone who did? I'm curious how it all worked out.

I've been a coder my whole life and went to startup institute boston to learn some of the soft skills and polish up my code skills and I would recommend it in a heartbeat to anyone interested in breaking into the typical startup web / RoR scene.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through

Raskolnikov2089 posted:

What was your background before going to Wyncode?

Most of a CS degree, about 10 years of on/off hobby programming.

prom candy
Dec 16, 2005

Only I may dance

ZentraediElite posted:

Asked this question in Creative Convention and got redirected here...

I'm trying to get a better understanding of what I would need for putting together a simple website for my father's business. He runs a small independent motel. I'm envisioning a simple landing page with contact information, a picture or two of the property, some simple driving directions, and maybe a description of local attractions.

I've looked at Squarespace, but it seems like it might be more than what we need. I haven't done any legitimate HTML work in ages, so I don't think building something from scratch makes sense.

What do you all think?

If you're technically proficient enough to set up shared hosting and use FTP and you've got some outdated experience with HTML and CSS you might be able to buy a theme from somewhere like ThemeForest and then tweak it to your liking. Otherwise I would just go with Squarespace.

Asshole Masonanie
Oct 27, 2009

by vyelkin
SquareSpace is just fine and probably even better for a novice than even something like WordPress. Unless that involves a shopping cart althought you can always make the nav direct to another site with cart software like Shopify or BigCartel.

prom candy
Dec 16, 2005

Only I may dance

Power Ambient posted:

SquareSpace is just fine and probably even better for a novice than even something like WordPress. Unless that involves a shopping cart althought you can always make the nav direct to another site with cart software like Shopify or BigCartel.

Doesn't Squarespace have some cart stuff now?

Asshole Masonanie
Oct 27, 2009

by vyelkin

prom candy posted:

Doesn't Squarespace have some cart stuff now?

Not sure I haven't looked at it in a while but that would make a ton of sense, and would be very good.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
I have an odd question about hrefs to CSS files with respect to AngularJS, .htaccess, and a bookmarked route.

While trying to figure out how to get rid of index.html in Angular URLs I discovered Angular's html5mode. After enabling this I discovered that going directly to a route (i.e. http://myapp.com/event/1) returns a 404 because the server doesn't know to return index.html for all requests. This led me to the following .htaccess file:

code:
RewriteEngine on
#let angular do its thing
RewriteCond %{REQUEST_FILENAME} !-f      
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.html [NC,L]
With this in place I'm now able to go directly to http://myapp.com/event/1 and it loads up fine.

However! Something strange happens with these direct links: namely, my index.html's stylesheet won't load if don't include a forward slash at the beginning of the href:

HTML code:
<!-- CSS won't load when directly linking to an event -->
<link href="css/main.css" rel="stylesheet" />
But if I throw in a preceding forward slash, it loads fine:

HTML code:
<!-- This loads fine -->
<link href="/css/main.css" rel="stylesheet" />
Even stranger, if I load up index.html like normal and then click the link that takes me to /event/1 everything looks fine even if I don't have the preceding forward slash. It's only when I directly link to /event/1 that the stylesheet fails to load. AND I didn't have to edit any of my other href's or src's, just the one CSS declaration in the head. Is something wrong with my .htaccess file?

You can see the weird behavior here (I've taken out the preceding forward slash in the code):

https://calendar-angularjs-masterkale1.c9.io/ > click an event, everything looks fine

vs

https://calendar-angularjs-masterkale1.c9.io/event/1

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS
So what's the problem with adding the forward slash?

I believe your stylesheet is attempting to load

http://myapp.com/event/1/css/yourcssfile.css

and isn't finding it.

if you know your css folder is in the root directory no reason not to add the /

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
What down with slavery said, and you've already discovered; add the prefix slash to the paths of your stylesheets.

When you use "css/myfile.css" this is a relative link. This means if you're in "/yams" then the browser is expecting to find the file at "/yams/css/myfile.css".
When you use "/css/myfile.css" this is an absolute link. Your file will always be looked for at "[domain]/css/myfile.css".

Before you added the .htaccess rules, you could only ever access your application by going to "/". All your relative CSS links ("css/myfile.css") worked because they were being looked for relative to what just so happened to be the root of your domain, "/".
When AngularJS modifies the URL in the address bar, this is actually only modifying the history of the browser, and NOT the paths used in the HTML. As a result, even when Angular tells the browser you're in "/derp/a/herp" it's still looking for and loading CSS from the original location you joined the page, "/".

Now you've added .htaccess rules, you can get to your Angular application by going to "/happy/fun/time". But what you're seeing is those relative CSS links resolving to "/happy/fun/time/css/myfile.css", because they're relative to the location the browser loaded, not your domain root, because you didn't specify them as absolute paths.

You would have probably seen this if you checked dev-tools while still using the relative paths - namely a 404 for the CSS files at "/youre/doing/it/wrong/css/main.css".

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Alright, so it's just a matter of relative versus absolute paths. I probably would have experienced similar issues with JavaScript files not using absolute paths if I had anything on /event/ that Angular needed to respond to. I guess that's one of the benefits of single page apps - everything can be linked from an absolute path since index.html powers everything.

an skeleton
Apr 23, 2012

scowls @ u
Have a PHP question. Trying to upload a pdf file to Adobe Echosign using their API and when I try to put a fopen() function in the body of the params, the API complains (error 415) that they dont accept that format. I can't tell if I'm attaching the file wrong/partially or if it needs to be attached a different way (I'm using Guzzle).

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

v1nce posted:

You would have probably seen this if you checked dev-tools while still using the relative paths - namely a 404 for the CSS files at "/youre/doing/it/wrong/css/main.css".
Actually I took a look again this morning and there's still one confusing bit about all of this: the header calendar image uses a relative link but loads up fine when you directly access /event/1. Why does that link work but the CSS one has issues? It's not a problem at all to change all of these into absolute links but the fact that some resources load fine with relative links while others need to be changed to absolute links. Maybe it's a distinction between what's in the <head> and what's in the <body>...

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Aghahalskjslk. 20 minutes trying to figure out why this css file wasn't loading.

Turns out that "stylehseet" is not the same as "stylesheet", but it sure as hell looks like the same word.

Adbot
ADBOT LOVES YOU

Raskolnikov2089
Nov 3, 2006

Schizzy to the matic

Thermopyle posted:

Aghahalskjslk. 20 minutes trying to figure out why this css file wasn't loading.

Turns out that "stylehseet" is not the same as "stylesheet", but it sure as hell looks like the same word.

It's a lesson that kicks me in the teeth over and over but I still haven't fully learned it. If something isn't working, check the simplest things first.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply