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
Hammerite
Mar 9, 2007

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

Hughlander posted:

Version 1.21 30th November 2003


What would you use for the web in 2003?

The web by 2003 surely wasn't as primitive as all that. Maybe PDF isn't doable, I don't know. HTML with embedded images of the equations would not be great, but it would be substantially better than what that document does.

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy
The web was actually way better when it was just documents

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Hammerite posted:

The web by 2003 surely wasn't as primitive as all that. Maybe PDF isn't doable, I don't know. HTML with embedded images of the equations would not be great, but it would be substantially better than what that document does.

The majority of internet users had dial-up connections in 2003.

Munkeymon
Aug 14, 2003

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



Also sticking equations in images is poo poo for accessibility, but so was almost everything in 03.

I think some form of https://en.wikipedia.org/wiki/MathML was (poorly) supported by a few vendors back then?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
anyone familiar with the windows device portal api (specifically for hololens) or why it would return 429 on any POST requests i make?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Jabor posted:

The majority of internet users had dial-up connections in 2003.

But a PNG of an equation would be like 4kb and you don't need very many of them. That's not going to break your bandwidth budget.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Hammerite posted:

The web by 2003 surely wasn't as primitive as all that. Maybe PDF isn't doable, I don't know. HTML with embedded images of the equations would not be great, but it would be substantially better than what that document does.

Well I was going to refrain from pointing out that the first version was in 1998 I think, and somebody probably did make a pdf of this by now, I just don't know where it is.

I mean, it serves its purpose :shrug: You can still understand it on a computer almost 20 years later.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Jabor posted:

The majority of internet users had dial-up connections in 2003.

2003 was actually the first year that over 50% of american internet users had a broadband connection.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'
Sounds like it existed pre 1997 (how many bets on usenet) and the last maintainers didn't give a drat about modernizing.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

TooMuchAbstraction posted:

But a PNG of an equation would be like 4kb and you don't need very many of them. That's not going to break your bandwidth budget.

Did IE support PNG in 2003?

mystes
May 31, 2006

Lumpy posted:

Did IE support PNG in 2003?
Yes but it had issues with transparency.

Thermopyle
Jul 1, 2003

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

I'm not even close to being a Windows programmer, but I've got an idea for a little utility that I want to make with Electron. The one problem I see with this is that I want to be able to do some TextExpander-esque things and I'm not sure how to go about that. I guess I'll need to write something in C# or something because I doubt Electron has any hooks or whatever that are low-level-enough to monitor keyboard activity system-wide like that? Anyone have any low-effort suggestions? Failing low-effort, just the lowest-effort...

I mean, I could just use TextExpander or something like that but I want to redistribute this utility.

UberJumper
May 20, 2007
woop
Does anyone know if there is some sort of service/api that would allow my company to track issues relating to health/status of IoT devices?

I already wrote a bunch of health checks that get executed by AWS IoT, right now they just notify slack. Unfortunately that isn't good enough and people want/need to be able to see a history of the various issues that occurred on the device.

This project has been stuck in development hell for loving ever, so it has been dumped on me. What has been done is a :wtc: cthulu of spaghetti that tries to twist Jira into an IoT issue tracker.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

UberJumper posted:

Does anyone know if there is some sort of service/api that would allow my company to track issues relating to health/status of IoT devices?

I already wrote a bunch of health checks that get executed by AWS IoT, right now they just notify slack. Unfortunately that isn't good enough and people want/need to be able to see a history of the various issues that occurred on the device.

This project has been stuck in development hell for loving ever, so it has been dumped on me. What has been done is a :wtc: cthulu of spaghetti that tries to twist Jira into an IoT issue tracker.

Can AWS IoT publish to CloudTrail? If so, you could use that and consume those logs (I can't remember how long CloudTrail persists logs but probably not long enough for what you want) and store them somewhere. If not, what about SNS or SQS?

QuarkJets
Sep 8, 2008

UberJumper posted:

Does anyone know if there is some sort of service/api that would allow my company to track issues relating to health/status of IoT devices?

I already wrote a bunch of health checks that get executed by AWS IoT, right now they just notify slack. Unfortunately that isn't good enough and people want/need to be able to see a history of the various issues that occurred on the device.

This project has been stuck in development hell for loving ever, so it has been dumped on me. What has been done is a :wtc: cthulu of spaghetti that tries to twist Jira into an IoT issue tracker.

Python code:
def is_this_iot_device_unsecure(obj):
  return True

Munkeymon
Aug 14, 2003

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



Thermopyle posted:

I'm not even close to being a Windows programmer, but I've got an idea for a little utility that I want to make with Electron. The one problem I see with this is that I want to be able to do some TextExpander-esque things and I'm not sure how to go about that. I guess I'll need to write something in C# or something because I doubt Electron has any hooks or whatever that are low-level-enough to monitor keyboard activity system-wide like that? Anyone have any low-effort suggestions? Failing low-effort, just the lowest-effort...

I mean, I could just use TextExpander or something like that but I want to redistribute this utility.

Off the top of my head, what you're describing sounds like a complicated AutoHotKey script.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
With C# (or C whatever) on Windows you can do a few things. You can hook it using SetWindowsHookEx but I'm pretty sure that there are better ways now. I've used the raw input api and it works as advertised. Another option would be to use DirectX, but I couldn't tell you how.

Doghouse
Oct 22, 2004

I was playing Harvest Moon 64 with this kid who lived on my street and my cows were not doing well and I got so raged up and frustrated that my eyes welled up with tears and my friend was like are you crying dude. Are you crying because of the cows. I didn't understand the feeding mechanic.
This is probably a dumb question, but it's for a personal project where I'm trying to learn stuff:

The little project I'm working on has to do with college programs. I'm interested in using some data about each school (current tuition rates, list of majors, etc). It's all available on their websites, obviously, but I'm looking for some way to hook into that data and have it all available to use. I did find that there is official federal documentation with lists of all accredited schools in the US, which is really cool, but it doesn't have the type of detailed informative I'm looking for. Any tips on where to start with something like that? It's a c# application if that matters.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
What you probably want is called "scraping". For C# you might try using some HTTP download class to get the web page in raw data format, then feed it to HtmlAgilityPack to turn it into HTML, then find the particular data you need by rummaging around in the document. The rummaging part can be easier if you open the web page in your browser and right click the element and choose the "inspect" menu item, then see if you can come up with a CSS selector that matches the element you want.

Hopefully that gives you some terms to search for and places to start.

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


Scraping is the alternative if the data service you're trying to rummage through doesn't provide a public API, service or what have you for developers to connect to. Guessing the pages you're talking about don't have a public interface for that, so yeah, scraper :v:

Fergus Mac Roich
Nov 5, 2008

Soiled Meat
Well, here's a data source:
http://nces.ed.gov/ipeds/datacenter/Default.aspx

Automating retrieval of this data seems like a huge pain in the rear end, but you could download a huge ream of it on your own in CSV format from multiple institutions.

edit: Actually: https://github.com/DataUSA/datausa-api I didn't look too closely at it but looks like someone did the work.

Hammerite
Mar 9, 2007

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

Munkeymon posted:

Also sticking equations in images is poo poo for accessibility, but so was almost everything in 03.

I think some form of https://en.wikipedia.org/wiki/MathML was (poorly) supported by a few vendors back then?

You can add alternative text to an image, which is something you can't do for the document we were discussing, aside from adding more text describing the equations (which would be redundant and annoying to non-visually-impaired readers). How accessible is the presentation in the text document under discussion? I'm not an expert in this but I'm guessing not very.

Munkeymon
Aug 14, 2003

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



Hammerite posted:

You can add alternative text to an image, which is something you can't do for the document we were discussing, aside from adding more text describing the equations (which would be redundant and annoying to non-visually-impaired readers). How accessible is the presentation in the text document under discussion? I'm not an expert in this but I'm guessing not very.

If you're totally blind, I'd guess it'd be almost worthless just considering he's representing powers as a character on the line above offset by a space which is :effort: as gently caress. Also there's no structure to speak of for a screen reader to follow.

For a visually impaired user who can see the well enough to get a sense of the structure but needs a screen reader to figure out what characters are on display, I think it'd be more useful than an image without an alt attribute.

Disclaimer: this is guesswork based on usability testing I, a person with better than average eyesight for my age, have done occasionally because it's part of my job and it's possible that actual blind people are way better at coping with this poo poo.

It's worth pointing out that when you look up anything math-related on Wikipedia that there's usually a formal description of the equation and an image (possibly generated from MathML?) because IIRC that's what their guideline says to do to make the articles accessible.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Thermopyle posted:

I'm not even close to being a Windows programmer, but I've got an idea for a little utility that I want to make with Electron. The one problem I see with this is that I want to be able to do some TextExpander-esque things and I'm not sure how to go about that. I guess I'll need to write something in C# or something because I doubt Electron has any hooks or whatever that are low-level-enough to monitor keyboard activity system-wide like that? Anyone have any low-effort suggestions? Failing low-effort, just the lowest-effort...

I mean, I could just use TextExpander or something like that but I want to redistribute this utility.

Having not heard of TextExpander and just looking it up, I'll second Munkeymon and suggest that you look into autohotkey for low pain windows implementation of this sort of keyboard hijacking. The language itself is painful to use, but simple stuff is simple enough, and the compilation / execution is straightforward. If you decide to use it, there's a pretty good autohotkey package for SublimeText2 (syntax, compile, run, etc). I imagine that you'd end up generating AHK code with your electron app?

What are you planning to use on the linux / osx side? I've had a repetative-stress-injury-prevention keyboard-remapping project in mind for a while, but my limited research didn't turn up much, maybe because I don't know what any linux words mean.

e: someone did start into a C# implementation of AHK, called IronAHK I think, but it was abandoned prematurely I think.

Thermopyle
Jul 1, 2003

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

I'm very familiar with AutoIT. For some reason I didn't even think about using it!

(if you're not familiar with AutoIT, generally speaking it's quite a bit better than AHK if only because of it's BASIC-like syntax, so give it a try!)

Munkeymon
Aug 14, 2003

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



Thermopyle posted:

I'm very familiar with AutoIT. For some reason I didn't even think about using it!

(if you're not familiar with AutoIT, generally speaking it's quite a bit better than AHK if only because of it's BASIC-like syntax, so give it a try!)

Oh right that's the other one. It's got some PHP-isms in it, too, from the looks of it.

I'm a little surprised nobody chimed in with a .Net library that nicely wraps all of the things AHK and AutoIT do.

Doghouse
Oct 22, 2004

I was playing Harvest Moon 64 with this kid who lived on my street and my cows were not doing well and I got so raged up and frustrated that my eyes welled up with tears and my friend was like are you crying dude. Are you crying because of the cows. I didn't understand the feeding mechanic.

Fergus Mac Roich posted:

Well, here's a data source:
http://nces.ed.gov/ipeds/datacenter/Default.aspx

Automating retrieval of this data seems like a huge pain in the rear end, but you could download a huge ream of it on your own in CSV format from multiple institutions.

edit: Actually: https://github.com/DataUSA/datausa-api I didn't look too closely at it but looks like someone did the work.

This looks super useful. Thanks!!

Gnumonic
Dec 11, 2005

Maybe you thought I was the Packard Goose?
I've been learning Prolog (as a hobby - I know formal logic at a pretty high level so it seemed like a fun diversion), and I'm stumped on how to do something.

I'm trying to use Prolog to parse a list (it's a list of Pokemon followed by all the moves they have - I'm trying to make an expert system) of the form [pokemon_name,move,move,move,pokemon_name,move,move (etc)]. I understand perfectly well how to do this if the number of moves were the same for every pokemon, it'd be something like:

code:
has_moves(pokemon,Move1,Move2,[pokemon|[Move1|[Move2|_]]]).
has_moves(pokemon,Move1,Move2,[_|Tail]) :- has_moves(pokemon,Move1,Move2,Tail).
But the number of moves varies. I'm just completely lost on where to even start. (Although I can think of a few ways to do it in Python.) Everything I can find from googling seems to indicate I need to use a Definite Clause Grammar, but every example I can find that I understand generates some list rather than parses one. I know how to do the generator thing with a DCG but not how to parse with it. Anyone want to help me with this arcane dead language?

Linear Zoetrope
Nov 28, 2011

A hero must cook
There are a lot of difficulties here in any language. Your options are basically:

1. Maintain a database of Pokemon names and disambiguate when you hit a Pokemon name
2. Encode the number of moves in the field after the Pokemon and switch parsing based on that
3. Pad the fields to 4, with a flag like NoMove

Based on my recollections of Prolog, 1 is rather difficult, but 2 and 3 should both be fairly straightforward.

Kuule hain nussivan
Nov 27, 2008

Does anyone have any experience with voice recognition libraries? I'm starting a small project and Google suggests CMUSphinx is the way to go, but I don't know if there are any alternatives. Language isn't a big issue, I could easily do this in Java, C# or Python.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Kuule hain nussivan posted:

Does anyone have any experience with voice recognition libraries? I'm starting a small project and Google suggests CMUSphinx is the way to go, but I don't know if there are any alternatives. Language isn't a big issue, I could easily do this in Java, C# or Python.

Windows.Speech or whatever the import path is works fairly well.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I've used cmusphinx for a small voice-command project and it worked very well. It'll run on the the raspberry pi 3, and they've already collected all of the extra data you need. On Windows though, the Microsoft speech system is super good, accurate, and way easy to use.

Dominoes
Sep 20, 2007

Hey dudes. I noticed that there aren't any proper epub3 readers in existance. There are some that claim to have epub3 support, but only include a subset of the features. So I was thinking about trying to make one. The basics of rendering text from an epub is similar to HTML; could I use electron (a NPM/chromium platform for desktop apps) to do the heavy-lifting of the rendering?

nielsm
Jun 1, 2009



Dominoes posted:

Hey dudes. I noticed that there aren't any proper epub3 readers in existance. There are some that claim to have epub3 support, but only include a subset of the features. So I was thinking about trying to make one. The basics of rendering text from an epub is similar to HTML; could I use electron (a NPM/chromium platform for desktop apps) to do the heavy-lifting of the rendering?

Yes you can probably make that render most paged and continuous flow content in a reasonable way. You may have to transform the data in a non-trivial way to make everything work. As long as you don't assume you can just feed it in, apply a simple stylesheet, and be done, you should be okay.

When making a document reader, also be extremely wary of the potential for exploits. Full-privilege code execution, affecting the application UI in unintended way possibly tricking the user into doing something they wouldn't, content that could render differently depending on context (e.g. screen/print, or depending on device resolution), and lots of other classes I don't know about/can't recall.
Assume that users will expect your program to be secure and well-behaved, and expect to receive data intended to break your code.

Hughlander
May 11, 2005

Looking for the term for this kind of packing problem or the name of the algorithm to solve it.

Given X sinks and Y Faucets where each faucet can flow into 3 specific sinks. Fill each sink up to a certain amount using the least amount from each faucet. (Or maybe minimum total, I'd want to play with both)

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Hughlander posted:

Looking for the term for this kind of packing problem or the name of the algorithm to solve it.

Given X sinks and Y Faucets where each faucet can flow into 3 specific sinks. Fill each sink up to a certain amount using the least amount from each faucet. (Or maybe minimum total, I'd want to play with both)

https://en.m.wikipedia.org/wiki/Convex_optimization
https://en.m.wikipedia.org/wiki/Multivariable_calculus
?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Hughlander posted:

Looking for the term for this kind of packing problem or the name of the algorithm to solve it.

Given X sinks and Y Faucets where each faucet can flow into 3 specific sinks. Fill each sink up to a certain amount using the least amount from each faucet. (Or maybe minimum total, I'd want to play with both)

What about this problem is under your control?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

ultrafilter posted:

What about this problem is under your control?

Presumably how much each faucet is used. So like if faucet A sends 10% of its output to sink 1, 50% to sink 2, 40% to sink 3, you can dump 1L of water from faucet 1 and have 100ml/500ml/400ml in the three sinks.

This sounds kind of like a packing problem to me.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
In a sense, I guess, but it's a continuous packing problem and so very different in practice. You have coefficients Flow_{f,s} for faucet f and sink s, the constraints \sum_{f \in F} Flow_{f,s} Time_f >= Capacity_s, and want to minimize... something about Time_f. Sounds like textbook linear programming.

Adbot
ADBOT LOVES YOU

Hughlander
May 11, 2005

rjmccall posted:

In a sense, I guess, but it's a continuous packing problem and so very different in practice. You have coefficients Flow_{f,s} for faucet f and sink s, the constraints \sum_{f \in F} Flow_{f,s} Time_f >= Capacity_s, and want to minimize... something about Time_f. Sounds like textbook linear programming.

I figured it was related to some kind of packing problem and even said so in my first line but was looking for something more specific to research.

Yep Linear Programming it is. https://msdn.microsoft.com/en-us/library/ff628587(v=vs.93).aspx Looks like .NET even has a constraints library that will let me set it up really easily. Too bad, was hoping it'd be a bit more code to bite into for the break but rather have it done then reinvent the wheel.

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