phpmedo

From: Chris (CHRISSS)23 Feb 2016 01:00
To: Peter (BOUGHTONP) 11 of 23
Who puts dollar symbols in front of variable names? :(
From: CHYRON (DSMITHHFX)23 Feb 2016 02:07
To: Chris (CHRISSS) 12 of 23
jquery. Well, in front of selectors.
EDITED: 23 Feb 2016 02:07 by DSMITHHFX
From: ANT_THOMAS23 Feb 2016 10:40
To: Chris (CHRISSS) 13 of 23
That's the one.

I was originally just putting it in a spreadsheet and trawling through a load of readings every week or so (never got OCR working).

But now I've got it all in a MySQL database where I've got a little form that checks the last row in the database, then checks the date and displays the image for the next reading I need to enter, once entered it calculates the usage that day and the cost that day and adds them to the database. Data stored is - date, total meter reading, daily usage, cost. When it's up to date it tells me there's nothing more to add.

 
 
EDITED: 23 Feb 2016 10:54 by ANT_THOMAS
Attachments:
From: ANT_THOMAS23 Feb 2016 10:51
To: ANT_THOMAS 14 of 23
The last 12 Weeks

Attachments:
From: Peter (BOUGHTONP)23 Feb 2016 23:40
To: Chris (CHRISSS) 15 of 23
Idiots who blindly copy bits of shell script into a toy language without really knowing what they're doing, and then come up with lame justifications of why they shouldn't fix the nonsense when everyone uses the damned thing. Probably.
From: Peter (BOUGHTONP)23 Feb 2016 23:42
To: CHYRON (DSMITHHFX) 16 of 23
A perfect example!

...of an idiot who doesn't know what things are. :S

Hmm, bit harsh? Maybe just a dunce. (hug)

jQuery neither prefixes variable names not puts dollars in front of selectors. It aliases itself as $, and as a function it can have arguments, the first of which can be a selector, though it also can be other things, and also has various methods attached to the function's object itself.

Which is not to say it isn't a bit dumb, but it is at least more convenient than typing case sensitive jQuery, though even that isn't as $durbrained $as $bloody $_PHP.

From: Peter (BOUGHTONP)23 Feb 2016 23:50
To: ANT_THOMAS 17 of 23
It seems cost is just half of usage - or does that change?
From: ANT_THOMAS24 Feb 2016 10:36
To: Peter (BOUGHTONP) 18 of 23
Cost is calculated based on a standing daily rate + (units used * unit rate)
From: koswix24 Feb 2016 10:45
To: Peter (BOUGHTONP) 19 of 23
I've been wondering about that lately. Linux is, in theory, a much more secure OS than windows. But how many Linux users consist of people like me that spend days at a time running commands and scripts they find down the back of the internet trying to make bits of software work without any real clue of wtf they are actually doing? 
From: ANT_THOMAS24 Feb 2016 11:09
To: koswix 20 of 23
Depending on your level of knowledge, running a command is less of an issue because you can see what you're inputting (and hopefully have some idea what it does, but often not), running scripts though is a different issue since I doubt most people check every line.

Could have a format c: in there somewhere.
From: CHYRON (DSMITHHFX)24 Feb 2016 11:48
To: Peter (BOUGHTONP) 21 of 23
It does stuff. With dollar signs. I get dollars from it. Your fragile ego gets a wee boost. Win, win, win.
From: CHYRON (DSMITHHFX)24 Feb 2016 11:52
To: koswix 22 of 23
I generally avoid doing stuff like that on mission-critical (e.g. L4D) systems. Usually if there's much doubt or risk I'll test it out in a VM first.
From: koswix24 Feb 2016 12:53
To: ANT_THOMAS 23 of 23
Installing node.js (I think) the other day on a Pi and I curl'd a script to do all the installing. Didn't even look at the script first. Figured it'd be OK, cos after all I haven't even changed the default user/pass on the pi yet  :-O~~~  :-O~~~  :-O~~~  T_T