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
an skeleton
Apr 23, 2012

scowls @ u

Skandranon posted:

You know the M in MEAN can be MySQL, right?

Right but in this case it doesn't

Adbot
ADBOT LOVES YOU

Funking Giblet
Jun 28, 2004

Jiglightful!
I use Mongo for aggregated / denormalized reads and SQL for relational source of truth. Most of my writes happen in SQL which is then aggregated and replicated to Mongo which is then used to fetch a document. Schemaless works fine when what you want is actually schemaless ie: An entity with one-to-many anything. I tend to think of Mongo documents as all the data I need to render say, a product details page without having to fetch it from SQL directly. I update the Mongo from SQL using a replication job so the Mongo documents are eventually consistent. Obviously this doesn't work when you want real time consistency, but I don't use it for that. I can do things like faceting quite easily too, but there are other tools which do that better as well, and I can use them also!

kloa
Feb 14, 2007


If I wanted to add tooltips to a webapp, what's the best way to keep track of them acknowledging or closing each tooltip? Local storage, cookies, database backend, etc?

Munkeymon
Aug 14, 2003

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



Do you expect users to come back to the site from multiple machines (eg. laptop, tablet and phone)? If so, store it server side to avoid annoying them. Otherwise local storage (with cookie fallback) is probably the way to go.

kloa
Feb 14, 2007


We originally built it for standardized laptops (internal webapp), but will probably make it work with iPads in the future.

I guess I could detect if they're on mobile and just not display tooltips, and leave them as local storage on the laptops? I can add a "Dismiss All" if they happen to login from somewhere else too.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
Do you need to keep track of which users have dismissed which tooltips (metrics, persistence, multi machine)? You'll need the DB.

Is this just a convenience thing and don't care if it occasionally behaves a little wonkey and people have to dismiss tooltips more than once in their lifetime? Local storage.

Either way, stick the storage mechanism behind an interface (in a single service), so if you choose to change it you don't have to rewrite the code that calls it, only the code that makes the storage call. Hell, you might end up using both.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
What's the easiest way to create a collapsible, responsive navbar?

At this point, mine is full responsive, but I'd like to know how to turn it into a collapsible dropdown for mobile.

teen phone cutie fucked around with this message at 10:03 on Jan 10, 2016

IronDoge
Nov 6, 2008

Grump posted:

What's the easiest way to create a collapsible, responsive navbar?

At this point, mine is full responsive, but I'd like to know how to turn it into a collapsible dropdown for mobile.

So it's responsive but not collapsed? Do you have it in a one big stack or something? You can set some media queries so that your menu element is hidden by default on smaller screen sizes. Have a menu button somewhere on your top nav (that only appears on mobile screens). Attach an event to that button that toggles the menu state.

kloa
Feb 14, 2007


v1nce posted:

Do you need to keep track of which users have dismissed which tooltips (metrics, persistence, multi machine)? You'll need the DB.

Is this just a convenience thing and don't care if it occasionally behaves a little wonkey and people have to dismiss tooltips more than once in their lifetime? Local storage.


Either way, stick the storage mechanism behind an interface (in a single service), so if you choose to change it you don't have to rewrite the code that calls it, only the code that makes the storage call. Hell, you might end up using both.

Basically a convenience, yeah. We're done with the core functionality, and I'm just adding "nice to haves" or extra features to help polish it up. My coworker wrote up a guide to use this, but it's pretty painless to add tool tips to the page.

Thanks for the info!

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
Yeah. Gotta bunch of list elements that flex. I figured media queries were the way to go but didn't know if there was some simple way to do it with flexbox

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
The company I work at is having a hell of a time hiring good UI/UX people. It seems like if you are a good UI/UX in the Bay Area you are golden, and you'll get a nice fat salary.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fletcher posted:

The company I work at is having a hell of a time hiring good UI/UX people. It seems like if you are a good UI/UX in the Bay Area you are golden, and you'll get a nice fat salary.

Do they let people work remotely??? :D

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Lumpy posted:

Do they let people work remotely??? :D

Most of the time, yes. For this particular case, however, they want the person at HQ.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fletcher posted:

Most of the time, yes. For this particular case, however, they want the person at HQ.

Well then :smith:

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
I've been playing around in Angular2 lately and came across an interesting situation brought about (most likely) by its relative newness. Could there be any downsides to storing a component's CSS style in a separate SASS files within the component's folder?

The development guides I read prior to adopting an Angular2 starter pack used inline styles in the Component definition. The starter pack I use, though, has styles in external scss files so that they can be compiled and bundled into CSS for deployment. The pack assigns styles to a component by setting a host: { class: 'app' } property in the Component definition that corresponds with the name of the CSS class that contains all of the component's styles:

app.ts
code:
import { Component } from 'angular2/core';

@Component({
  selector: 'app',
  host: { class: 'app' },
  templateUrl: './dist/components/app/app.html'
})

export class App {

}
app.scss
code:
@import '../../assets/css/variables';

.app {
  display: block;
  max-width: 1280px;
  margin: 20px auto;
  text-align: center;
  h1 {
    color: $favorite;
  }
  h2 {
    margin-top: 20px;
    color: $dark;
  }
}
Now I get why this is all being done, and it seems fine to me. But is using in-line styles a goal of Angular2? Of Web Components in general? I know it makes it easy to reuse components since you just drop a single ts file into place and boom, component reuse. But I'm curious all the same.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

IronDoge posted:

So it's responsive but not collapsed? Do you have it in a one big stack or something? You can set some media queries so that your menu element is hidden by default on smaller screen sizes. Have a menu button somewhere on your top nav (that only appears on mobile screens). Attach an event to that button that toggles the menu state.

Yeah. Media Queries did the trick. I found some neat tutorial and I got a pretty nice looking navbar with a collapsible button.

I'm just putting the finishing touches on my personal site, and my last pressing issue seems to be the mobile look of the site. I thought everything would look a lot bigger on mobile, as I've been using flexbox and percentages for all my divs, but everything looks really small. Not unreadable, but the buttons and links are not great for people with fat fingers.

I want my site to have a bigger look on mobile, and I'm really not sure where to start, other than making the header and body divs like 100% of the screen.

Everything on my site is responsive, and it looks great in a condensed window on my desktop, but it's not giving me the look I want on mobile devices. I don't really understand why. I know there's more pixels on the phone vs a small window, but still.

on a smaller browser window:



on iPhone 5s

nexus6
Sep 2, 2011

If only you could see what I've seen with your eyes

Dr. Arbitrary posted:

I have to learn Drupal really quick. Any advice on how to get started?

http://buildamodule.com/
https://drupalize.me/
https://www.ostraining.com/
http://codekarate.com/

kedo
Nov 27, 2007

Opera mobile spotted in the wild.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Grump posted:

Yeah. Media Queries did the trick. I found some neat tutorial and I got a pretty nice looking navbar with a collapsible button.

I'm just putting the finishing touches on my personal site, and my last pressing issue seems to be the mobile look of the site. I thought everything would look a lot bigger on mobile, as I've been using flexbox and percentages for all my divs, but everything looks really small. Not unreadable, but the buttons and links are not great for people with fat fingers.

I want my site to have a bigger look on mobile, and I'm really not sure where to start, other than making the header and body divs like 100% of the screen.

Everything on my site is responsive, and it looks great in a condensed window on my desktop, but it's not giving me the look I want on mobile devices. I don't really understand why. I know there's more pixels on the phone vs a small window, but still.

on a smaller browser window:



on iPhone 5s


Are you missing <meta name="viewport" content="width=device-width"/>?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

Opera mobile spotted in the wild.

Hahaha... that's exactly what I thought. "Wow, someone actually uses that thing?!"

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

The Merkinman posted:

Are you missing <meta name="viewport" content="width=device-width"/>?

Nope. Need to do some research on that. Thanks!

e; wow. That was a super easy fix. omg.

Lumpy posted:

Hahaha... that's exactly what I thought. "Wow, someone actually uses that thing?!"

idk. I like using it on my desktop because it doesn't use much ram, relatively, and I can sync bookmarks easily.

teen phone cutie fucked around with this message at 23:35 on Jan 14, 2016

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Use code from StackOverflow? Know someone who does? You may have to provide attribution .

Impotence
Nov 8, 2010
Lipstick Apathy
have to steal as much code as possible before the licence change, if i have it saved already they can't get me!!

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Biowarfare posted:

have to steal as much code as possible before the licence change, if i have it saved already they can't get me!!

I bet you could find some good scraper code on that site.

Sedro
Dec 31, 2008

The Merkinman posted:

Use code from StackOverflow? Know someone who does? You may have to provide attribution .
I think you always had to give attribution though. Everyone will continue not to do that.

Edit: nevermind. the poster had to request attribution before

Sedro fucked around with this message at 22:16 on Jan 15, 2016

kedo
Nov 27, 2007

If I were SO I would immediately start injecting the following into people's clipboard when they copy something off the site.

JavaScript code:
// "FOR LOOP"
// 
// Copyright (c) 2016 StackOverflow user PHPussyDestroyer
// http://stackoverflow.com/questions/34820332/bro-how-do-you-loop
// 
// Permission is hereby granted, free of charge, to any person 
// obtaining a copy of this software and associated documentation 
// files (the "Software"), to deal in the Software without restriction, 
// including without limitation the rights to use, copy, modify, merge, 
// publish, distribute, sublicense, and/or sell copies of the Software, 
// and to permit persons to whom the Software is furnished to do so, 
// subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be 
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 
// ANY CLAIM, DAMAGES 

for(i=0; i<10; i++) {  ....

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

kedo posted:

If I were SO I would immediately start injecting the following into people's clipboard when they copy something off the site.

JavaScript code:
// "FOR LOOP"
// 
// Copyright (c) 2016 StackOverflow user PHPussyDestroyer
// [url]http://stackoverflow.com/questions/34820332/bro-how-do-you-loop[/url]
// 
// Permission is hereby granted, free of charge, to any person 
// obtaining a copy of this software and associated documentation 
// files (the "Software"), to deal in the Software without restriction, 
// including without limitation the rights to use, copy, modify, merge, 
// publish, distribute, sublicense, and/or sell copies of the Software, 
// and to permit persons to whom the Software is furnished to do so, 
// subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be 
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 
// ANY CLAIM, DAMAGES 

for(i=0; i<10; i++) {  ....

Do I have to include that for all my for-loops from now on, or just the first?

kedo
Nov 27, 2007

Skandranon posted:

Do I have to include that for all my for-loops from now on, or just the first?

Um bro did you even read the license?

JavaScript code:
// The above copyright notice and this permission notice shall be 
// included in all copies or substantial portions of the Software.
Some people. :colbert:

Impotence
Nov 8, 2010
Lipstick Apathy

kedo posted:

If I were SO I would immediately start injecting the following into people's clipboard when they copy something off the site.

1 minute hackjob, use it as a bookmarklet or greasemonkey or something

Impotence fucked around with this message at 01:41 on Jan 16, 2016

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid
I'm trying to update my site's podcast, and now the feed isn't loading properly.

If I run it through feedburner (http://feeds.feedburner.com/TheMetalBlastPodcast), I get this error:

quote:

XML Parsing Error: undefined entity
Location: http://feeds.feedburner.com/TheMetalBlastPodcast
Line Number 32, Column 2: <link rel="alternate" type="application/rss+xml" title="Metal Blast! » Feed" href="http://www.metalblast.net/feed/" />
--------^


Keeping in mind that everything on the site has been done pretty much via google-ing things, and that I have very little understanding of coding, etc.... does anyone know what the hell is going on here?
The feed used to work without trouble, but now it just won't load at all.

Thanks!

EDIT:
Via my wordpress control panel I get further info:

quote:

error on line 32 at column 78: Entity 'raquo' not defined

Data Graham
Dec 28, 2009

📈📊🍪😋



"raquo" is coming from the HTML entity "&raquo;", which is what creates the "»" character. That's what's screwing you up.

E: it means "right angle quote"

You'll want to look at how you're handling encoding of non-ASCII characters.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

Data Graham posted:

"raquo" is coming from the HTML entity "&raquo;", which is what creates the "»" character. That's what's screwing you up.

E: it means "right angle quote"

You'll want to look at how you're handling encoding of non-ASCII characters.

Thank you very much for your answer.

Could you point me in the right direction here? I don't mind telling me exactly how to fix the problem, but rather how to find out the way I'm encoding the non-ascii characters.

Thanks you so much! :)

Data Graham
Dec 28, 2009

📈📊🍪😋



Could you post a sample of your XML, particularly the headers? I'm suspecting something like you're not specifying an encoding type that supports extended or multibyte characters (i.e. Unicode or UTF-8).

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

Data Graham posted:

Could you post a sample of your XML, particularly the headers? I'm suspecting something like you're not specifying an encoding type that supports extended or multibyte characters (i.e. Unicode or UTF-8).

https://www.dropbox.com/s/07fy5083koyhrw2/podcast.xml?dl=0

I put a copy on Dropbox

Data Graham
Dec 28, 2009

📈📊🍪😋



Erm, that's an HTML document, not XML. And its <title> tag makes it sound like a 404 page.

You're sure this was working before? What have you changed since it last worked?

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

Data Graham posted:

Erm, that's an HTML document, not XML. And its <title> tag makes it sound like a 404 page.

You're sure this was working before? What have you changed since it last worked?

Yeah, that's definitely an XML file.

I also noted that Title Tag, but I don't know why it could be happening. It used to work normally, and I did no changes to the file since then. My server provider did move me between servers, so I'm not sure if that should have any effect.

I do see in the file that the latest updates are indeed there, but no idea why it's not, according to you, a real XML.

Only registered members can see post attachments!

Odette
Mar 19, 2011

Non Serviam posted:

Yeah, that's definitely an XML file.

I also noted that Title Tag, but I don't know why it could be happening. It used to work normally, and I did no changes to the file since then. My server provider did move me between servers, so I'm not sure if that should have any effect.

I do see in the file that the latest updates are indeed there, but no idea why it's not, according to you, a real XML.



That's a HTML file. Try putting that through a XML validator, it'll fail.

Diabolik900
Mar 28, 2007

Are you sure you linked to the right thing? Because I'm also definitely seeing an HTML file.

Impotence
Nov 8, 2010
Lipstick Apathy

Non Serviam posted:

I'm trying to update my site's podcast, and now the feed isn't loading properly.

You don't HAVE a podcast feed there. You need to get one before you can add it.

The URL you probably want to add is http://www.metalblast.net/category/podcast/feed/

Adbot
ADBOT LOVES YOU

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

Biowarfare posted:

You don't HAVE a podcast feed there. You need to get one before you can add it.

The URL you probably want to add is http://www.metalblast.net/category/podcast/feed/

I changed my feedburner to direct it to that, and now feedburner works (and iTunes loaded the new episode as well)

But this is the weirdest thing though, because it WAS working before. I definitely didn't change the xml file and turned it into an html file (since I don't even know how to do that) so I'm absolutely puzzled by this.

How can I generate an XML from this new feed?

THank you all so much!!

Redrum and Coke fucked around with this message at 23:41 on Jan 17, 2016

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