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
putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION
Build your own fonts from scratch and deliver them to each user in person on USB.

Adbot
ADBOT LOVES YOU

spiritual bypass
Feb 19, 2008

Grimey Drawer
Use system fonts

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

rt4 posted:

Use system fonts

Which system

spiritual bypass
Feb 19, 2008

Grimey Drawer
The operating system

Munkeymon
Aug 14, 2003

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



rt4 posted:

The operating system

I'm a big fan of the one called 'sans-serif,' myself.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Nobody reads anything anyway, who gives a poo poo what font it's in?

Variable 5
Apr 17, 2007
We do these things not because they are easy, but because we thought they would be easy.
Grimey Drawer
Build your sites in Photoshop and serve jaypigs in tables, font delivery problem solved.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Variable 5 posted:

Build your sites in Photoshop and serve jaypigs in tables, font delivery problem solved.

I'm waiting for the inevitable webGL text-replacement plugins.

spiritual bypass
Feb 19, 2008

Grimey Drawer
You could programmatically generate text as SVG

Munkeymon
Aug 14, 2003

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



rt4 posted:

You could programmatically generate text as SVG

Too readable - use CSS to position and color pixel-sized elements, instead

Tei
Feb 19, 2011

Can the guys on Page Speed Insights talk with the guys of Google Fonts and the guys on Google Analitys?

Sereri
Sep 30, 2008

awwwrigami

lol, just LOL, if your website isn't just a window filling canvas element that you draw everything in.

Tei
Feb 19, 2011

Sereri posted:

lol, just LOL, if your website isn't just a window filling canvas element that you draw everything in.

Sorry, but my website is a 0 bytes document that also execute something in the address line that create a canvas and load a js.

index.php content
code:
<?php


header("Location: javascript:write('<canvas/><script src=j.js/>')");

?>
Now more serius. How is that Google PGI sets a bunch of standards, and none of the Google services respect it? What a girl have to do when Google tell you "Optimize [fonts.google.com] with less moronic cache strategies"

Can't the system administrators of fonts.google.com or analitycs.google.com or other Google service educate the dudes of Google Page Speed Insight? , or maybe PGI educating the others. I dunno.

Tei fucked around with this message at 17:41 on Jun 7, 2018

MrMoo
Sep 14, 2000

Someone found before I think a WebGL renderer for HTML. For something crudy like a Kodi box they found a significant for them with Netflix type layouts, performance boost when rendering in a WebWorker or something ugly like that.

Tei
Feb 19, 2011

MrMoo posted:

Someone found before I think a WebGL renderer for HTML. For something crudy like a Kodi box they found a significant for them with Netflix type layouts, performance boost when rendering in a WebWorker or something ugly like that.

We have come full circle!.

Internet Explorer 4.0 could also do this with Direct-X. IE4 had integration of DirectX.

The idea was to make games with HTML, but I think the only use it had was to try to fix PNG rendering bugs, and support transparecy in places where IE don't support it nativelly.

Funking Giblet
Jun 28, 2004

Jiglightful!

Tei posted:

We have come full circle!.

Internet Explorer 4.0 could also do this with Direct-X. IE4 had integration of DirectX.

The idea was to make games with HTML, but I think the only use it had was to try to fix PNG rendering bugs, and support transparecy in places where IE don't support it nativelly.

Fun fact, back in the day if you had a transparent filter on an element, you could size it so it was larger than the supported video memory could handle, making it render the entire screen black!

Munkeymon
Aug 14, 2003

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



I hate whoever decided it was a good idea to put a web browser on a watch. That person and the people who dutifully implemented it should be barred from working with computers forever.

spiritual bypass
Feb 19, 2008

Grimey Drawer
I'm building a REST-backed web application. I have API endpoints that can provide all the data interactions I need to make it run, but on the first load of each page I'd prefer to load a whole set of data on a single request. For example, instead of making a request to /dealership to get the name of the dealership and /cars to get a list of cars, I'm thinking a single request to /page/cars could provide the data for both of those on initial pageload.

Does this idiom already exist? Is there a name for it?

spacebard
Jan 1, 2007

Football~

rt4 posted:

I'm building a REST-backed web application. I have API endpoints that can provide all the data interactions I need to make it run, but on the first load of each page I'd prefer to load a whole set of data on a single request. For example, instead of making a request to /dealership to get the name of the dealership and /cars to get a list of cars, I'm thinking a single request to /page/cars could provide the data for both of those on initial pageload.

Does this idiom already exist? Is there a name for it?

Yes, "relationships".

JSON API: http://jsonapi.org/format/#document-resource-object-relationships
JSON LD: https://json-ld.org/spec/latest/json-ld-api-best-practices/#resource-representation (Nested Relationships)

Probably something similar for HAL or JSON Schema or GraphQL.

I think there are advantages to either nesting the data as a duplicate (easier to pull out / model in the front end) or save space and set some collection of dealerships that are referenced by some id property for each car in a traditional Rest API endpoint.

mila kunis
Jun 10, 2011
I'm looking into using Elixir/Phoenix for a side project. I'm comfortable with FP, but the syntax similarity with Ruby and the similarity of the framework to Rails skeeves me off, because I really loathe rails (preferred to work with frameworks like Express and Flask).

How close is it to Rails? Are there a lot of random globals and annoying poo poo to memorize and things automagically happening and linking to the right view folder based on the controller classname and things in that vein?

Gmaz
Apr 3, 2011

New DLC for Aoe2 is out: Dynasties of India
The similarities are superficial, Elixir and in turn Phoenix is a lot more explicit and there's no 'magic'. That being said if you like micro frameworks like Flask then you don't need to use Phoenix you can just use Plug.

Gmaz fucked around with this message at 08:28 on Jun 11, 2018

Furism
Feb 21, 2006

Live long and headbang
Don't use Google CDN for providing fonts. They use this to track what people do. Please make your website privacy-friendly.

Poppyseed Poundcake
Feb 23, 2007

Furism posted:

Don't use Google CDN for providing fonts. They use this to track what people do. Please make your website privacy-friendly.

LOL

Furism
Feb 21, 2006

Live long and headbang

Are you laughing because you think privacy doesn't matter or because you think I'm being paranoid?

Tei
Feb 19, 2011

My favorite bug:

We accidentally enabled in production a placeholder mode that replace all photos with cute cats. The customer hot call "Theres cats everywhere in my website!!".

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Tei posted:

My favorite bug:

We accidentally enabled in production a placeholder mode that replace all photos with cute cats. The customer hot call "Theres cats everywhere in my website!!".

But were they happy or upset?

Tei
Feb 19, 2011

Lumpy posted:

But were they happy or upset?

I think more alarmed. But is hard to say in a email. It is a food site so I imagine some of the photos / titles would be unappropiate.

Analytic Engine
May 18, 2009

not the analytical engine
Anyone here used both D3 and either React/Vue in an application? I've done it with Angular but nobody seems to have a consensus on the "right" way to handle D3 visualizations and virtual DOM

kedo
Nov 27, 2007

Furism posted:

Are you laughing because you think privacy doesn't matter or because you think I'm being paranoid?

I'd imagine he's laughing because worrying about where your fonts load from when your average site site is loaded down with a half dozen tracking mechanisms including Google Analytics and half your users are already on Android phones running Chrome is a bit like telling someone to be careful where they stub their cigarette when you're standing in the middle of a forest fire.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

Analytic Engine posted:

Anyone here used both D3 and either React/Vue in an application? I've done it with Angular but nobody seems to have a consensus on the "right" way to handle D3 visualizations and virtual DOM
The way I've seen things like this done in Vue is to use this.$el to reference the DOM element that's bound to the current Vue instance. $el will be an instance of HTMLElement, and you can interact with and manipulate it just like you would an element returned by document.getElementById().

It's important you use $el and not do your own getElementById() within the component because otherwise you'll end up manipulating the wrong instance of the component if more than one show up on the page.

Analytic Engine
May 18, 2009

not the analytical engine

IAmKale posted:

The way I've seen things like this done in Vue is to use this.$el to reference the DOM element that's bound to the current Vue instance. $el will be an instance of HTMLElement, and you can interact with and manipulate it just like you would an element returned by document.getElementById().

It's important you use $el and not do your own getElementById() within the component because otherwise you'll end up manipulating the wrong instance of the component if more than one show up on the page.

Thanks :hfive:

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
To finish my thought, I'd highly recommend wrapping DOM libraries like D3 into their own React/Vue components to abstract away those rough edges from the rest of your Vue app.

And if you do go the VueJS route, you might be interested in the ref attribute as well. That attribute lets you maintain multiple references to HTMLElements within a component as named properties within this.$refs. This'll probably be more flexible when wrapping D3/etc... as you'll be able to wrap the actual element the library interacts within a parent element that gets bound to a Vue instance (and would thus hog the more convenient $el attribute).

Sab669
Sep 24, 2009

Not sure where best to post this question.

I have a Windows Server 2016 machine running WAMP 3.1.3 to host a PHP application.

When I'm on that server, I can navigate to localhost/myWebsite and it loads.

If I try to access it from another machine by going to [ip address]/myWebsite I get the following error:

quote:

403 Forbidden

You don't have access to /myWebsite on this server.

Apache/2.4.33 (Win32) PHP/7.2.4 Server [ip address] Port 80

I've googled around and most stuff I can find says "Cannot access site locally" which is not the issue I'm having, but in any case most solutions say to update the httpd-vhosts.conf file like so:

code:
 
# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>


#
<VirtualHost *:80>
	ServerName udsmr
	DocumentRoot "d:/wamp/www/udsmr"
	<Directory  "d:/wamp/www/udsmr/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require all granted
	</Directory>
</VirtualHost>
I have virtually no experience with WAMP or any of the included technology (Microsoft / IIS guy :() and can't figure this out. Any ideas? Sorry for formatting, posting on mobile

Edit; Added more from the vhosts file. If I change the Require local to Require all granted, I can access my site externally. But it sounds like this is a really bad idea?

Sab669 fucked around with this message at 18:47 on Jun 14, 2018

The Fool
Oct 16, 2003


It's behaving as designed?


If you want to limit access to a subnet or limited IP addresses, you can do
code:
require local
require ip 192.168.1.0
https://httpd.apache.org/docs/2.4/howto/access.html has more info

Sab669
Sep 24, 2009

I don't want to limit it to anything, I want it to be accessible by any machine. Trying to make it open to the public.

The Fool
Oct 16, 2003


Then the change you already discovered is the correct solution.

Sab669
Sep 24, 2009

Ok, thanks. I wasn't sure if it was a security concern mostly :shrug:

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Anyone here use Foundation?
If so, any idea what happened to them?

The roadmap is inaccurate
6.5 was delayed/merged into 6.6 which is also delayed, and who knows what is going on with 7, and there hasn't even been so much as a point release in 10 months.

ConanThe3rd
Mar 27, 2009
OK, I'm hitting a wall with this and I'm slowly but surely going do-wally with it.

So, I'm about intermediate with my web development skills, I'm quick to learn any given framework and can comfortably get things going or, in failure of that, read up on how to do so.

The project I'm doing is a test for a company to basically work with their API and for it I'm using jQuery with Bootstrap for setting up the skeleton of the document before I style it later.
I am also using a WAMP Setup (WampServer Version 3.1.0 64bit) which has served my developing needs perfectly fine up to this point with a small armada of WordPress sites, web apps and other such projects.

I'm also using WebStorm but I imagine that's largely academic.

They have provided me with the API link and the key and, having done so before with AirTable's API I have things set up to run an ajax method like so;
(URL Omitted because duh)
code:
$.ajax({
    url: `<url>`,
    type: 'GET',
    dataType: 'json',
    contentType: 'application/json',
    processData: true,
    success: function (result) {
        console.log(result);
    },
    error: function(){
        $('#error').show();
        $('#error').append(`<p class='col-12'><i class="far fa-exclamation-triangle"></i> Can not connect to API</p>`);
}
});
This code, which has worked with other APIs before returns the following error to me;
code:
 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <url> (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cue a small eternity of me thralling every google thing I can think off to get this going and OH BOY what a trek it was. So I get the large consensus answer of shoving "Header add Access-Control-Allow-Origin "*" into apache's config, the Vhost setting for my project and the project's .htaccess file.

Still nothing.

Then I try to swap the dataType to jsonp and see if I couldn't sidestep this whole stupid mess that way and lick my wounds on the matter. It sorta works in that I can get the reply but then I get the next error and I can't actually use the items in the returned object.
code:
 SyntaxError: unexpected token: ':'<name of object>:1:18

Which after digging into that seems to return a shrug and "sucks to be you" on SO and me here about ready to lose it.

So, to repeat, I have already;
Enabled the headers_modules in apache
Added "Header set Access-Control-Allow-Origin "*"" to httpd-vhosts.conf (in the setup for the project), httpd.conf and the project's .htaccess file
set the data type to jsonp.

So is there anything from the peanut gallery I can use or am I SOL?

Adbot
ADBOT LOVES YOU

bigmandan
Sep 11, 2001

lol internet
College Slice
You could consume the API through PHP then make your ajax calls to your own routes and bypass the whole cross origin thing entirely.

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