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
Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.

Sebbe posted:

It's a range excluding its endpoints.

Also written as

( x ; y )

by some. (As opposed to [ x ; y ], where x and y are included.)

(x,y) is the standard way of expressing this in mathematics. (which obviously invites confusion with tuples)

Adbot
ADBOT LOVES YOU

Sebbe
Feb 29, 2004

Jeb Bush 2012 posted:

(x,y) is the standard way of expressing this in mathematics. (which obviously invites confusion with tuples)

Either notation is used, it all depends on where you look.

Where I studied math (Denmark), the ]x,y[ notation was more common, but I've encountered both.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Jeb Bush 2012 posted:

(x,y) is the standard way of expressing this in mathematics. (which obviously invites confusion with tuples)

Not that much confusion. In general it will be abundantly clear from context whether an interval or an ordered pair is meant.

Jeb Bush 2012
Apr 4, 2007

A mathematician, like a painter or poet, is a maker of patterns. If his patterns are more permanent than theirs, it is because they are made with ideas.
Usually, yes.

Corla Plankun
May 8, 2007

improve the lives of everyone

Hammerite posted:

Not that much confusion. In general it will be abundantly clear from context whether an interval or an ordered pair is meant.

I wish I lived in your world. So much optimism. So much faith in the goodness of all coderkind.

shrughes
Oct 11, 2008

(call/cc call/cc)
(x,y) is obviously a complex number.

Flobbster
Feb 17, 2005

"Cadet Kirk, after the way you cheated on the Kobayashi Maru test I oughta punch you in tha face!"
Not a huge horror, but my alma mater making me proud:



Makes me remember the good ol' days when marquees like this were special purpose hardware/software... now it's probably just being powered by a Windows machine somewhere and for some reason someone just had to use XML. Like the time I was driving down the freeway and saw the LED sign outside a shopping center was clearly just being treated as a huge monitor for an XP machine because an alert dialog had somehow popped up over it.

kitten smoothie
Dec 29, 2001

A few weeks ago I saw a freeway billboard that had a BIOS screen on it, or at least the upper left quadrant of a BIOS screen. The computer feeding the display was set up to PXE boot and couldn't get a network connection. I wondered how those billboards had realtime info to display. I for some reason assumed it was more specialized hardware rather than probably just some PC rendering some crap in Flash and only using the top left corner of the screen.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

kitten smoothie posted:

A few weeks ago I saw a freeway billboard that had a BIOS screen on it, or at least the upper left quadrant of a BIOS screen. The computer feeding the display was set up to PXE boot and couldn't get a network connection. I wondered how those billboards had realtime info to display. I for some reason assumed it was more specialized hardware rather than probably just some PC rendering some crap in Flash and only using the top left corner of the screen.
If it makes you feel better, I've also seen billboards running off Mac or Linux-based desktop systems :v: (usually tipped by some boot error or hanging on the login screen).

I think the days of specialized hardware/software for stuff like this pretty much ended the minute it became much cheaper to just find someone to develop a startup fullscreen app running on a desktop machine camouflaged by some plastic. Probably where the majority of XP machines live on.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

OS/2 error messages on ATMs are basically reassuring at this point.

Deus Rex
Mar 5, 2005

The day I see a Javascript backtrace on an ATM screen is the day my money leaves the bank system.

fritz
Jul 26, 2003

Deus Rex posted:

The day I see a Javascript backtrace on an ATM screen is the day my money leaves the bank system.

Day after your money's already left, more like.

necrotic
Aug 2, 2005
I owe my brother big time for this!

SupSuper posted:

If it makes you feel better, I've also seen billboards running off Mac or Linux-based desktop systems :v: (usually tipped by some boot error or hanging on the login screen).

Our public transportation uses macs. I know this because I often see an "Update available" window for random applications.

Skiant
Mar 10, 2013
From the artist who brought you the previous gem

Skiant posted:

code:
if (dates) {
  if (dates.length > 0) {
   $scope.madForm.datePicker.$setValidity('valid', true);
  } else {
   $scope.madForm.datePicker.$setValidity('valid', false);
  }
}

I present to you the "Captain Obvious"

code:
</form><!-- END OF FORM -->
Code reviews with this guy are amazing. :smithicide:

canis minor
May 4, 2011

Skiant posted:

From the artist who brought you the previous gem


I present to you the "Captain Obvious"

code:
</form><!-- END OF FORM -->
Code reviews with this guy are amazing. :smithicide:

Wait until he starts putting forms inside forms

:allears:

Skiant
Mar 10, 2013

eithedog posted:

Wait until he starts putting forms inside forms

:allears:

We already do that to some extend with the magic of Angular's ng-form. I always have this picture in mind.

I should also mention his style of comments:

code:
// some comment //
That's in Javascript, btw.

qntm
Jun 17, 2009

Skiant posted:

I should also mention his style of comments:

code:
// some comment //
That's in Javascript, btw.

I've seen people use the // kind of comment in XML.

Westie
May 30, 2013



Baboon Simulator

qntm posted:

I've seen people use the // kind of comment in XML.

is it followed by <![CDATA[ ?

nielsm
Jun 1, 2009



How does anyone manage to reach the conclusion that running a major public-facing site on Sharepoint is a great idea?

Soricidus
Oct 21, 2010
freedom-hating statist shill

nielsm posted:

How does anyone manage to reach the conclusion that running a major public-facing site on Sharepoint is a great idea?
listening to too many microsoft sales pitches?

qntm
Jun 17, 2009

Westie posted:

is it followed by <![CDATA[ ?

Very possibly. That particular XML snippet was being constructed using string operations from data input by the user.

Reality
Sep 26, 2010

SupSuper posted:

I think the days of specialized hardware/software for stuff like this pretty much ended the minute it became much cheaper to just find someone to develop a startup fullscreen app running on a desktop machine camouflaged by some plastic. Probably where the majority of XP machines live on.

Yes, XP running Flash content, but we are moving to Windows 7, Ubuntu and Android now. Tons of our clients still use XP but we are trying to migrate them to... Android media stick things, whose quality is hilariously inconsistent so far.

EssOEss
Oct 23, 2006
128-bit approved
Microsoft itself uses SharePoint for most of its partner-facing portals. It causes no end of problems such as different people with ostensibly the same roles and rights having access to completely different content in reality. Tech support tickets disappear for months into some 3rd world country's call center and come back with some boilerplate nonsense.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Code that I wrote today and then puzzled for a long while over why my method wasn't working how I want it to

code:
MyClass firstItem = firstList[i];
MyClass secondItem = firstList[j];

fritz
Jul 26, 2003

edit: gently caress. n/m.

HFX
Nov 29, 2004

Flobbster posted:

Not a huge horror, but my alma mater making me proud:



Makes me remember the good ol' days when marquees like this were special purpose hardware/software... now it's probably just being powered by a Windows machine somewhere and for some reason someone just had to use XML. Like the time I was driving down the freeway and saw the LED sign outside a shopping center was clearly just being treated as a huge monitor for an XP machine because an alert dialog had somehow popped up over it.

There is nothing wrong with using XML. There is plenty of not using an XML parser to marshall and unmarshall the data.

I guess this does confirm I need to add all the XML escape sequences to the web service integration guide. This is do to a request by a business manager who couldn't figure out why the XML he was seeing contained & and demanded we fix it. We had to explain it is an XML escape sequence for text. He then demanded we add it to the integration guide. I would personally tell anyone who is consuming our service and is not using an XML parser or can't understand why he is getting an & in the document to get hosed, but that's me.

HFX fucked around with this message at 17:18 on Sep 2, 2014

Thermopyle
Jul 1, 2003

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

HFX posted:

There is nothing wrong with using XML.

Lies.

return0
Apr 11, 2007

HFX posted:

There is nothing wrong with using XML.

Hmm.

PrBacterio
Jul 19, 2000
I liked XML better back when it used to be called "Lisp SEXPRs."

Knyteguy
Jul 6, 2005

YES to love
NO to shirts


Toilet Rascal

Skiant posted:

code:
if (dates) {
  if (dates.length > 0) {
   $scope.madForm.datePicker.$setValidity('valid', true);
  } else {
   $scope.madForm.datePicker.$setValidity('valid', false);
  }
}

Can't tell if this is php or javascript, but what would be the proper form here?

code:
$scope.madForm.datePicker.$setValidity('valid', dates && dates.length > 0);
?

Is that the horror?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Knyteguy posted:

Can't tell if this is php or javascript, but what would be the proper form here?

code:
$scope.madForm.datePicker.$setValidity('valid', dates && dates.length > 0);
?

Is that the horror?

$scope makes me think it's JavaScript, using AngularJS.

necrotic
Aug 2, 2005
I owe my brother big time for this!

Ithaqua posted:

$scope makes me think it's JavaScript, using AngularJS.

Also that dates is not a valid PHP variable. And object methods/attributes are called with -> in PHP.

Soricidus
Oct 21, 2010
freedom-hating statist shill
Today I discovered that the SAX XML parser bundled with the Oracle JVM sometimes returns junk values for attributes if someone gives you a large XML 1.1 document, and probably always has done. The solution is to use a third-party XML parser instead of the default one. Or just to pray nobody ever sends you a large XML 1.1 document.

I love XML, Java, and having feces rammed down my throat with a rusty iron pole.

xtal
Jan 9, 2011

by Fluffdaddy
nm

xtal fucked around with this message at 00:56 on Jun 20, 2018

ToxicFrog
Apr 26, 2008


HFX posted:

There is nothing wrong with using XML.

As a general-purpose markup language with validation, sure.

Tragically, no-one ever uses it for that. They use their own bastard ad-hoc version of Markdown instead, and use XML for data serialization. What's that? All you wanted was a Map[String, String] with a few dozen entries? TOO BAD, PREPARE TO PARSE A HUNDRED KILOBYTES OF USELESSLY OVER-ENGINEERED XML WITH A VARIETY OF UNFORGIVABLY lovely LIBRARIES!

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Knyteguy posted:

Can't tell if this is php or javascript, but what would be the proper form here?

code:
$scope.madForm.datePicker.$setValidity('valid', dates && dates.length > 0);
?

Is that the horror?

That's not quite the same. You'd need to do:

code:
if (dates) {
   $scope.madForm.datePicker.$setValidity('valid', dates.length > 0);
}

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Bognar posted:

That's not quite the same. You'd need to do:

code:
if (dates) {
   $scope.madForm.datePicker.$setValidity('valid', dates.length > 0);
}

I don't see any difference...

Edit: Ah I guess if you don't want to set it to anything if date is undefined.

Strong Sauce fucked around with this message at 05:14 on Sep 3, 2014

HFX
Nov 29, 2004

ToxicFrog posted:

As a general-purpose markup language with validation, sure.

Tragically, no-one ever uses it for that. They use their own bastard ad-hoc version of Markdown instead, and use XML for data serialization. What's that? All you wanted was a Map[String, String] with a few dozen entries? TOO BAD, PREPARE TO PARSE A HUNDRED KILOBYTES OF USELESSLY OVER-ENGINEERED XML WITH A VARIETY OF UNFORGIVABLY lovely LIBRARIES!

I deal with a lot of data exchanges between companies where the relationship is more than just x->y. The interactions usually have to go through some sort of web proxy at some point. XML works great for it.

Json would work great if their was a way to provide a machine enforceable schema. In fact, one of my biggest complaints with XML is the in ability to take a very large schema, and provide a restriction through a schema update to only what tags and attributes we will use.

Soricidus posted:

Today I discovered that the SAX XML parser bundled with the Oracle JVM sometimes returns junk values for attributes if someone gives you a large XML 1.1 document, and probably always has done. The solution is to use a third-party XML parser instead of the default one. Or just to pray nobody ever sends you a large XML 1.1 document.

I love XML, Java, and having feces rammed down my throat with a rusty iron pole.

I think that has been a more recent problem. On the plus note, the 3rd party parsers are usually quite a bit quicker then the default implementation. The bad part is trying to get them past company standards people who I think create paperwork to keep themselves employed.

PrBacterio posted:

I liked XML better back when it used to be called "Lisp SEXPRs."

That's dangerous. That could lead to actual Lisp being adopted. That would lead to business people managing technical items head exploding, and we couldn't have that now could we?

HFX fucked around with this message at 14:26 on Sep 3, 2014

canis minor
May 4, 2011

HFX posted:

Json would work great if their was a way to provide a machine enforceable schema. In fact, one of my biggest complaints with XML is the in ability to take a very large schema, and provide a restriction through a schema update to only what tags and attributes we will use.

There's this: http://json-schema.org/, but as far as the W3C drafts go, I think this is the only mention: http://www.w3.org/community/odrl/work/json/ (http://tools.ietf.org/html/draft-zyp-json-schema-04)

There're also YAML-related schemas - http://www.kuwata-lab.com/kwalify/ / http://rx.codesimply.com/, but again - nothing official.

Adbot
ADBOT LOVES YOU

Zamujasa
Oct 27, 2010



Bread Liar
XML is nothing compared to the billion "I saw something using XML so I copied what it looked like" pseudo-XML files out there.

Just because you wrap values in angle brackets does not mean you are using XML :argh:

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