|
Heck, even into the early '90s you could "get by" with just a few good skills. I think retraining hell is companies' revenge for having to pay us so well. I have a Despair Inc coffee mug that says "Just because you're necessary, doesn't mean you're important." That sums it up nicely.
|
|
|
|
|
Jeremy Falcon wrote: Who cares if it's a 90% copy of Y... Z is so shin
Unfortunately the reality is that no one can figure out if new idioms are worthwhile until a lot of people use them.
In the 60 there were no options. Not to mention that programmers had to wear suits.
Not to mention you can still get a job programming Cobol if you want to.
|
|
|
|
|
I agree with you that there is a lot more to know now than in the 60s. More importantly, I think, things change a lot faster now.
But to be fair, there's a lot they had to know back then that most of us don't have to think about at all anymore. In particular, we don't usually need to think nearly as carefully about hardware issues (memory constraints, timing issues) or lower-level software issues (how to write a quicksort algorithm or a garbage collector). We don't need to cram 8 different boolean values into a single byte that we xor to read the value from. We don't need to write code that modifies itself or overlays itself to save memory. And we don't have to wait fifteen minutes or more for an edit/compile/run cycle.
|
|
|
|
|
|
|
First, I readily admit I should have known better.
So I'm populating a jqxTree control with items, and I set the ID to the record's ID. There are multiple parents, and they relate to different tables (therein sort of lies one of my design flaws but I wanted separate tables even though the items are all basically similar, because at some point their similarities will diverge.)
Anyways, so of course, the record ID's can be the same because they are from different tables. Which means of course that a child under one parent can have the same id='19' as a child under a different parent.
Which means that when you click on one of the children, jqxTree's click even gives you the item you clicked on, but because the ID's are the same, it gives you the last item with that ID, which is a node in a different branch of the tree!
OK, I consider that a bug in jqxTree, it should give me the damn element I clicked on, whether they have the same ID or not.
So now I have to refactor the Javascript code, probably appending a unique character for each of the parent types, and strip it out when I do the POST back the server (which are different URL's based on the parent) to get the record ID back that's being updated.
For sake, I wouldn't have to deal with this BS in a WinForm app.
I'll report it as a bug in jqxWidgets forum though. They tend to be good at either fixing things or responding with "it works as intended."
|
|
|
|
|
Well, you're having fun with that library it seems. Sounds like you got two data sources in one tree view though? If you're not keen on redoing anything database wise, you could always populate the control with IDs like "table-id" to namespace them in essence. Not sure how that library works, but if it's populated by a JSON object then you don't even have to parse the ID. You can just tack on another property with the ID. JavaScript won't care and neither will the lib since it'll know nothing about it.
To speak in code it would be something like this...
var dataSource = [
{ id: 'table1-1', desc: 'Table 1 Foo', realId: 1 },
{ id: 'table1-2', desc: 'Table 1 Bar', realId: 2 },
{ id: 'table2-1', desc: 'Table 2 Foo', realId: 1 },
{ id: 'table2-2', desc: 'Table 2 Bar', realId: 2 },
...
];
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: with IDs like "table-id" to namespace them in essence.
Exactly. So now I have id: "sx" + st.Id and similar for the different types (sx, rx, hx, etc.) and item.id.substring(2) to strip off the "namespace." My original rant took longer to write than the refactor the code.
|
|
|
|
|
Marc Clifton wrote: My original rant took longer to write than the refactor the code Maybe, but look at the fun and joy and all-around good cheer that rant gave us.
Jeremy Falcon
|
|
|
|
|
NNnnnooooooo - add it as another field otherwise you spend your life chopping strings up.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ok, I did some recon and found out it uses the DOM to populate the control. So, to do the something similar via the DOM it would be more like this with data attributes...
<div id="tree">
<ul>
<li id="table1-1" data-realid="1">Table 1 Foo</li>
<li id="table1-2" data-realid="2">Table 1 Bar</li>
<li id="table2-1" data-realid="1">Table 2 Foo</li>
<li id="table2-2" data-realid="2">Table 2 Bar</li>
</ul>
</div> And then with jQuery you can retrieve data attributes as such...
$(element).data('realid');
Jeremy Falcon
|
|
|
|
|
For a second, I thought maybe Argh was a new jQuery library. I could swear I've seen argh.js somewhere... (maybe in someone's sig here) (it's not pirate's day yet is it?
"Go forth into the source" - Neal Morse
|
|
|
|
|
|
It's from Sander Rossels sig.
He made a linq library for javascript. Commendable but futile.
|
|
|
|
|
Marc Clifton wrote: So now I have to refactor the Javascript code, probably appending a unique character for each of the parent types, and strip it out when I do the POST back the server (which are different URL's based on the parent) to get the record ID back that's being updated.
Sounds more like a band-aid then a proper solution. I could be wrong...I usually am.
All items in your tree should have separate and unique id's based on your schema. I would double check to make sure this isn't something you did, versus it being the control vendor's fault.
Anyhow, good luck.
|
|
|
|
|
Marc Clifton wrote: I'll report it as a bug in jqxWidgets Ha! Good one! It's been a while since we've had Joke of the day.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It hasn't been 3 fulls weeks since I've posted a message here in the lounge praising the current state of Linux. The short version of that post is that I have an old machine dedicated for watching media hooked up to a projector, and it's been sluggish with Windows 10, which had also been giving me trouble with updates, so I installed Lubuntu on it (a lightweight version of Ubuntu) and it's performing a lot better--at least in terms of always remaining responsive. Everything "just worked" and the machine served its (single) purpose again beautifully.
Cue to today. Now that I've had a few weeks of "real use" out of it, the review isn't so glowing anymore.
a) Video drivers. Even though the machine is old, it played back 1080p video just fine, so long as I had Nvidia's ION driver installed, which is trivial to install on Windows. Nvidia has a version for Linux, but it looks like it's a few kernel versions behind, so it doesn't install on the current Lubuntu (17.10). I'm no Linux kernel developer, which you apparently have to be in order to figure out how to get things working in this sort of situation. I had to give up on that, which is pretty much a showstopper as, without hardware acceleration, 1080p video stutters all over the place and is basically unwatchable. 720p, with just the basic video driver, "works", but it's definitely glitchy here and there.
b) LAN connections. Again, I'm no Linux expert, but I do know enough so that using "smb://machinename" in the file browser was all that was needed to access shares on other machines on my LAN. It worked well for about a week. Then it simply refused to access anything from the machine hosting my media files (some generic timeout error, even though it's clearly not spending any time waiting for a response, as the error is immediate). However, other machines on my LAN remained accessible to it. The consistent fix was to reboot the machine hosting my media files, even though other (Windows) machines could read everything with no issue. That machine is also hosting other files that are needed elsewhere, and rebooting all the time is going to upset some processes, so that's not a long-term solution.
c) The straw that broke the camel's back: One day the machine booted at 640x480 only, and refused to go back to whatever native resolution my projector is using (it's not a monitor+projector configuration - only the projector is hooked up to it). No amount of rebooting would change it back, and given the other two problems I already had, I knew that even if I managed to solve this by messing around with video configuration files (which I've done exactly once, years ago), this machine was destined anyway to get flattened/rebuilt from scratch.
I just so happened to have a recent version of CentOS on a bootable USB stick. I figured why not try another distribution altogether. The installation went fine, only, after the first reboot, I was looking at a blank screen (not even a blinking cursor). I've used the same image to set up VMs, so I know it works.
Now...I'm the guy who will spend hours, if not days, of his spare time digging into technical problems and keep looking long after others have given up. However, this is a machine I use when I simply want to kick back, turn off my brain, and watch something for an evening--in other words, this is the machine I use when I want to walk away from problems I'm trying to solve. So in this particular case, I simply have no patience for fiddling with OS settings.
So this week, back to Windows 10 I went. It's not without its own problems, but I can at least get it in a state where it's functional, it'll play 1080p flawlessly, and then I can leave it alone. Updates be damned if they start breaking - this machine isn't used to access the internet.
Linux...you're so close, yet still so far from actually being usable.
Rant over.
|
|
|
|
|
I rant a bit about MS, because they have a "don't care about the user" attitude.
But Linux? That actually hates the user!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I have a logitech audio server setup on a Ras Pi 3 which has been on constantly for nearly three years now running ( just upgraded it and didn't even take it down to do it ) Debian Stretch and it performs beautifuly, it also has Postgres and Samba installed. I wouldn't use Linux for the desktop but as a server I think it's fantastic.
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
That's about my position. Every 9 months or so I swap the sata cable on my primary desktop to a linux drive, boot it up, run updates and noodle around with it for a few days before getting furious and going back to windows.
I love developing FOR it and running it as a server OS. But the desktop drives me to drink.
|
|
|
|
|
Quote: keep looking long after others have given up. My gawd! I wish I had known you in the old days when I was hiring computer experts like you. But now I'm retired. Sorry!
By the way: I dumped Ubuntu years ago, when it did not have a driver for a plain Soundblaster card. I never tried it again.
Get me coffee and no one gets hurt!
|
|
|
|
|
Not surprising. It also missing drivers for all sort of graphic cards other than Intel, making gaming / video editing / photo editing a pain in the butt because of how sluggish it is.
|
|
|
|
|
win 7
Signature ready for installation. Please Reboot now.
|
|
|
|
|
The problem with 7 nowadays is that there's hundreds of updates waiting to be downloaded and installed even if you clean-install from the latest ISO you can get from Microsoft. Based on my own observations of doing clean installs of Windows 7 nowadays, there's a 50-50 chance you can't just start the update process and walk away for a few hours--something will be broken. Being lucky means being able to restart the update process a few times and it'll manage to complete cleanly.
|
|
|
|
|
Win 7 and hirens' boot CD
Install, update, image... new updates come? restore image, delta update, image.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|