Wed Sep 26 2018 05:50:38 AM EDT from fleeb @ Uncensored
Well, your HTML there refers to a couple of files that clearly live on your C:\ on your Windows machine, so they probably won't be very useful.
That's true. I assume, though, that anyone using this menu will tailor it to meet their needs - to include the sites that they enjoy. (Uncensored Citadel comes to mind.)
SOME will want to open Word documents, so I've left those two files in the menu as an example of how to do it. If you notice, the protocol isn't the same for those two as it is for all the others.
I think it's worth noting that some of the html tutorial sites claim that it isn't possible for a browser to open local documents with their default applications (Word, Excel, etc.) They're wrong, though, since I've been able to get my menu to open both Word documents and Excel spreadsheets. Interestingly... I haven't been able to get it to open TEXT files with Notepad. I'm not sure why that is. The browser always opens them as browser pages even though Notepad is their default application. If any of you know a way to do it, please advise.
Wed Sep 26 2018 05:50:38 AM EDT from fleeb @ Uncensored
Well, your HTML there refers to a couple of files that clearly live on your C:\ on your Windows machine, so they probably won't be very useful.
True. However, I included them as examples since I assume anyone using the menu will want to tailor it to meet their own needs. Opening local documents is NOT the same as opening websites. If notice, the "file" protocol is needed to open them.
Interestingly, some html tutorials claim that it isn't possible for a browser to open local files with their default application. That's clearly wrong. I've had my menu open both Word documents and Excel spreadsheets. I have NOT been able to get text documents to open with Notepad, though. The browser always opens text as a browser tab even though Notepad is text's default application on my computer. If any of you know a way to invoke Notepad, please advise.
Hrm... I expect the file:// protocol would bring up the file in question within the browser if the browser knows how to process it, rather than bringing it up within the operating system's sense of how to handle that protocol.
So if you pulled up your HTML in a browser that isn't your default, and referred to a file that's HTML, it will likely render the HTML within the non-default browser than your default one.
Hence why it shows the text in the browser.
I doubt you can compel it to use whatever serves as your default text editor.
Unless there's some kind of setting in your browser to do just that.
I started building a middleware API to automate some provisioning tasks.
The web server is an "import" statement and two lines of code. If I wanted to make it encrypted it would be three lines of code. When I hand this program off to production, instead of telling them "install this web server and configure it this way and set up these variables to bind it etc etc etc" it will just be "here, run this."
I am catching up on threads, but am quite late to this one.
Another fun web server / api in python is:
I have used it to wrapper quite a few things that would have been time consuming otherwise. It makes it quite simple to provide REST ways to access other libraries that would have been difficult to access otherwise.
Fuck.
Who the fuck creates their own data replication tool instead of using
the native tools in the database?
Well, does the custom tool do any sort of validation, qualification, or other processing before it sends data to the other side?
Or does it just do a dumb copy that the database could have done on its own?
The only thing it can really tell you is whether the partner is down, as the queue builds up.
It can't tell you whether they're truly in sync.
I'm delving into some of the weird crevices of JavaScript & JSON lately, thanks to a need to use JSONPath to query into a JSON structure, and some peculiar code I'm writing to try and make things easier on the end user.
For example, did you know a JSON object can have null as a key? That is: {null: 5} is a perfectly valid statement.
So:
var test = {null: 5};
Neat? But that's not where the weird ends.
if (test.null == test['null']) console.log('WTF?');
Your console will log 'WTF?' with that statement. If you're using a browser, you can try this for yourself.
But... I'm not yet done...
var otherTest = {"null":5};
if (test.null == otherTest.null) console.log("WHAT!?");
Your console will log 'WHAT!?'.
Because when you index into a JSON object with 'null', or '"null"', it's all the same.
PHP... fuck... this... language...
<?php
$j = [null => 5];
$s = json_encode($j);
echo $s;
?>
{"":5}
JavaScript:
var j = { null: 5 };
var s = JSON.stringify(j);
console.log(s);
{"null":5}
Recall that JSON stands for 'JavaScript Object Notation', and you will see that PHP fucking sucks.
That having been said ... in PHP the reserved word NULL *should* work as you expect. For tests, however, the function is_null(x) might have more reliable results than a comparison.
It's just... so... argh...
I envision a future where people just kinda say something vague to the machine and it kinda does what they want and people just sorta go with it, rather than maintaining any sense of precision about what the fuck is going on... all in the name of making it 'easier' for people, when it has the opposite effect.
You're going to order a burger at a restaurant with mechanical waiters that advertises that you can have your burger any way you want. Maybe you like your burger where you have no bun, the burger resting on a paste of mayo, and two (2) pickles sliced so they're round sitting on top of the burger.
But you won't be able to order it with that kind of precision, so you'll get a burger with a bun, mayo on top of the burger, with two full pickles swimming in the mayo.
Toasted bun, mayonnaise and black pepper on the *bottom* part of the bun, then a freshly cooked burger on top of that. The juices from the burger combine with the mayo and pepper to build something close to steak au poivre.
It illustrated a point for me about terrible programming languages, but if it torments your sister as well, I guess we can consider it a bonus.