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.
 
  • Locked thread
oh no blimp issue
Feb 23, 2011

how can i call a website api from some jquery?

Adbot
ADBOT LOVES YOU

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
echopenis use shopify

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
but definitely dont use wysiwyg web page editors i hate them with a passion

Valeyard
Mar 30, 2012


Grimey Drawer

Awia posted:

how can i call a website api from some jquery?

just a regular old restful api? like doing GETs to endpoints?

oh no blimp issue
Feb 23, 2011

Valeyard posted:

just a regular old restful api? like doing GETs to endpoints?

yeah, i wanna do a get at the steamapi and get a load of json back, but the console shits "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." at me

Valeyard
Mar 30, 2012


Grimey Drawer

Awia posted:

yeah, i wanna do a get at the steamapi and get a load of json back, but the console shits "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." at me

oh right yeah that is the javascript sandboxing security kicking in

the easiest way around it is for steam to change the header (which wont happen) or a really hacky way is to use something like http://crossorigin.me/ (or your own server) to bounce all the requests off of. which should be fine if its a personal project

Valeyard fucked around with this message at 00:02 on Aug 7, 2015

oh no blimp issue
Feb 23, 2011

Valeyard posted:

oh right yeah that is the javascript sandboxing security kicking in

the easiest way around it is for steam to change the header (which wont happen) or a really hacky way is to use something like http://crossorigin.me/ (or your own server) to bounce all the requests off of. which should be fine if its a personal project

ah, sweet, thanks!

Corla Plankun
May 8, 2007

improve the lives of everyone

ShimaTetsuo posted:

hope you enjoy reading 10 papers to code up a tiny algorithm yourself every single day

implementing sick algos from papes is literally my favorite thing in life

ShimaTetsuo
Sep 9, 2001

Maximus Quietus

Corla Plankun posted:

implementing sick algos from papes is literally my favorite thing in life

well me too but if youre the kind of clown who uses python you probably cant even read so

Soricidus
Oct 21, 2010
freedom-hating statist shill

ShimaTetsuo posted:

well me too but if youre the kind of clown who uses python you probably cant even read so

actually i use python and i'll have you know i have a degree in literature

wait

that's not a good thing in this context is it

Papes
Apr 13, 2010

There's always something at the bottom of the bag.

Corla Plankun posted:

implementing sick algos from papes is literally my favorite thing in life

glad I could bring some enjoyment into your otherwise miserable life :mrgw:

Corla Plankun
May 8, 2007

improve the lives of everyone

Papes posted:

glad I could bring some enjoyment into your otherwise miserable life :mrgw:

:shobon: :o:

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
if you're a statistician and you're like "I don't care about stuff like data structures or strings" then sure R is better than python

other than that then lol

also maybe it's just me but R is noticeably slower compared to matlab and python. like I'm pretty sure trivial examples you'd get the same speed, but if it's like more than 100 lines it gets abysmal slow

r doesn't scale or some poo poo

echinopsis
Apr 13, 2004

by Fluffdaddy

bobbilljim posted:

echopenis use shopify

I'll look into it, but it's a website for resuscitation training there is no product to buy online, just info and contact details

Vanadium
Jan 8, 2005

ConanTheLibrarian posted:

I wrote my first python script in a professional context today


the indentation was 5 spaces :unsmigghh:

what the gently caress is it with Professional Contexts and odd-number-sized indentation

I don't think I've seen an open source project where people do that poo poo

Soricidus
Oct 21, 2010
freedom-hating statist shill
if your indents aren't prime then you bring shame upon your ancestors and your village

Vanadium
Jan 8, 2005

2 is prime, so just use that if 4 is too much of a commitment

compuserved
Mar 20, 2006

Nap Ghost

Symbolic Butt posted:

if you're a statistician and you're like "I don't care about stuff like data structures or strings" then sure R is better than python

other than that then lol

also maybe it's just me but R is noticeably slower compared to matlab and python. like I'm pretty sure trivial examples you'd get the same speed, but if it's like more than 100 lines it gets abysmal slow

r doesn't scale or some poo poo

this has been my experience as well

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
back to the discussion of code styles someone should invent an ide that you can flip the style formatter one for yourself and one for the goobers who dont understand that your style is so much better than theirs so you can commit the ugly poo poo but read e/thing in the best style ie yours. give me a milion dollars

Vanadium posted:

2 is prime, so just use that if 4 is too much of a commitment

but 4 is double prime i dont see the problem???

Shaggar
Apr 26, 2006

Awia posted:

how can i call a website api from some jquery?

VERY CAREFULLY!

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

echinopsis posted:

I'll look into it, but it's a website for resuscitation training there is no product to buy online, just info and contact details

oh I have misunderstanded your post. mayb do what those other posters said. also bootstrap is good

oh no blimp issue
Feb 23, 2011

Shaggar posted:

VERY CAREFULLY!

javascript and jquery is bad so it seems much harder than it should be

Shaggar
Apr 26, 2006
welcome to web development

Shaggar
Apr 26, 2006
these problems were solved in real development decades ago and web developers rejected those solutions in favor of no solutions

Luigi Thirty
Apr 30, 2006

Emergency confection port.

we need a final solution to the JavaScript problem imo

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Luigi Thirty posted:

we need a final solution to the JavaScript problem imo

unacceptable keyword

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Luigi Thirty posted:

we need a final solution to the JavaScript problem imo

Schindler's array

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

MALE SHOEGAZE posted:

Schindler's array

ayy lmao

triple sulk
Sep 17, 2014



MALE SHOEGAZE posted:

Schindler's array

:chanpop:

Soricidus
Oct 21, 2010
freedom-hating statist shill
client side, server side, genocide

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Soricidus posted:

client side, server side, genocide

:captainpop:

Luigi Thirty
Apr 30, 2006

Emergency confection port.

what was the last line of This Ain't Schindler's List

I could have got more out

echinopsis
Apr 13, 2004

by Fluffdaddy

bobbilljim posted:

oh I have misunderstanded your post. mayb do what those other posters said. also bootstrap is good

no one else really gave any serious recomendations. ill look at bootstrap

Space Whale
Nov 6, 2014

Awia posted:

javascript and jquery is bad so it seems much harder than it should be

I thought that too then I got a gig loving with Kentico.

:mrwhite:

Jerry Bindle
May 16, 2003
re: web dev

how can you mock out a get/post API? is there something like java's mockito

JavaScript code:
when("thing/stuff?blerp=hello").thenReturn("<h1>HELLO</h1>"); //mockito pseudocode
when("thing/stuff?blerp=byebye").thenReturn("<h1>BYEBYE</h1>");
$("#bleh").load("thing/stuff?blerp=hello") // loads <div id='bleh'/> with <h1>HELLO</h1>

Shaggar
Apr 26, 2006
testing javascript? can you even do that?

Notorious b.s.d.
Jan 25, 2003

by Reene

Barnyard Protein posted:

re: web dev

how can you mock out a get/post API? is there something like java's mockito

JavaScript code:
when("thing/stuff?blerp=hello").thenReturn("<h1>HELLO</h1>"); //mockito pseudocode
when("thing/stuff?blerp=byebye").thenReturn("<h1>BYEBYE</h1>");
$("#bleh").load("thing/stuff?blerp=hello") // loads <div id='bleh'/> with <h1>HELLO</h1>

rewrite your app in java

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Shaggar posted:

testing javascript? can you even do that?

I remember trying a few javascript testing libraries for a couple hours and then I decided that node.js's assert was good enough for me.

Papes
Apr 13, 2010

There's always something at the bottom of the bag.

Symbolic Butt posted:

I decided that node.js was good enough for me.

:captainpop:

Adbot
ADBOT LOVES YOU

Jerry Bindle
May 16, 2003

Notorious b.s.d. posted:

rewrite your app in java

as much as possible of the app will be in java with spring mvc, but i would like to have some ~dynamic web interfaces~. i'm starting to think that having content update without a page reload isn't worth loving around with javascript and jquery

  • Locked thread