
Blog?

Mostly computer thought's and stuff I've done!
Seems unnecessary.
Don’t know a lot about AdGuard Home right now. Just that it competes with Pi-Hole. So it sounds like something I should know about.
I guess I’ll never have a chain Pizza again. The Pizza isn’t $10.69 its $12.61-$13.36. And when did a tip rise from 15%. Actually I know it’s been a thing for a while… but not for me. That’s what hardworking waitresses expected at one time. Oh, but things are more expensive now. Well that’s the whole idea behind a percentage, the tip is increased automatically related to the food increase. A waitress making 15% on a $20 meal today gets more than the waitress got on a $2 meal in the 1960s. So up front you expect me to pay more for a pizza made today verses one made 20 years ago, because of food price increases AND you expect a tip on top… for putting it in a box? What will the expected tip be in 50 years from now using the excuse that “things are more expensive now”? 75%? How kind of Pizza Hut to suggest a big tip for their staff… because they care so much for their employees. Or here’s another thought, they don’t want to pay there own employees a decent wage, so they try and shame the customer, because they want more profit for themselves.
And it won’t stop because people will do it.
Wait the tip is a guide… since I choose to pay in store (meaning I’m driving there to pick it up). However if you don’t tip expect some spit with your order. I don’t know how many times I’ve picked up an order after they said it would be ready, only to have them say it’s almost ready. In other words we’ll box it up AFTER you pay! Oh no tip? Well here’s a little something extra, before we box it up.
Here. Not based on any other browser. Currently in heavy development.
I ran into trouble describing a field as a string that contains NULL values. In googling, I saw various solutions, I tend to like the KISS method. And this snippet, from my take away, worked for me.
Field was defined as boolean in the SQLite database, but could contain NULLs. In my DB there was a 1 in field for true.
var Field sql.NullString
// ... later that day
if Field.Valid {
if Field.String == "true" {
...do stuff
}
}
My import looked like…
import (
"database/sql"
"fmt"
"log"
"os"
"strconv"
"time"
_ "github.com/mattn/go-sqlite3"
)
I watched a demo of Sandfly… what? How cool. After I left computer employment, for several years I felt, I could semi keep up. But now with 200 languages, AI and all the advancements, there are so many changes, I feel so much is passing me by. I really don’t even attempt to stay current. But occasionally I’ll stop and look at something that some podcast or article has caught my eye. Back when I started, to generalize you had a programmer and a Systems Programmer and maybe a DBA. A System Programmer (equivalent to a systems administrator today) was a mainframe term, because there were no small interconnected computers or the Internet. Today I think a System Programmer or systems administrator, has to be split up because there are so many specialties.
Described here. Turns out I already had solved this problem. The secret is to use time.Month(integerMonth). In that description I actually said… the function expected mm as a time.Month( ) object. I guess my brain had Go rust.
Using HTML is a relatively easy way to create cross platform interfaces. But I hate the kludge of HTML/CSS/JavaScript in order to do anything useful. I’m posting this because of my previous post about a creating a simple pop-up window. Well I’ll extend this rant about MP3 playlists. HTML makes it fairly easy to play a single MP3 file. But again if you want to play multiple songs one after another… a playlist, you need to use HTML/CSS/JavaScript. I hate looking at HTML with this stupid embedded crap
<script language='JavaScript' type='text/javascript'>
<!--
bla bla bla
}
//-->
</script>
Just my humble opinion!
I was working on a little HTML project, and I wanted to display some data related to the page I was on. So I googled HTML popup code. In web page after web page, I was shown a bunch of overly complicated examples. Lengthy JavaScript code and CSS crap. WTH? Give me a break. That’s way more effort than I want to use. So I dug through some old HTML code, and found a very simple example (only 2 lines of JavaScript) that works in Google Chrome and Opera. It doesn’t work in Firefox, no popup, but it does open in a new page. I have no problem telling the user, myself in this case, that this works best in Google Chrome. Compatibility… Shumpatibility. It’s not my code, I probably found/used it over 20 years ago. So I created this example that pop-ups a little HTML table. Here’s the code…
Popup.html
</<!DOCTYPE html>
<html lang='en' dir='ltr'>
<head>
<meta charset='utf-8'>
<script language='JavaScript' type='text/javascript'>
<!--
function openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<title>PopUp</title>
</head>
<body style='background:rgb(193, 193, 81);'>
<div align='center'>
<a style='font-size:130%' href='#.' onClick="openBrWindow('PopMe.html','','scrollbars=yes,width=1500,height=200')">Pop</a><br>
</div>
</body>
</html>
PopMe.html
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
</style>
</head>
<body>
<table style="width:90%">
<tr>
<th colspan="5" style='color:rgb(44, 194, 44);font-size:30px;'>A Pop-Up Table</th>
</tr>
<tr>
<td>Col 1</td>
<td>Col 2</td>
<td>Col 3</td>
<td><b style='color:red;font-size:20px;'>Col 4</b></td>
<td>Col 5</td>
</tr>
<tr>
<td>AAA</td>
<td>BBB</td>
<td>CCC</td>
<td>DDD</td>
<td>EEE</td>
</tr>
<tr>
<td colspan="1">Notes:</th>
<td colspan="4">Bla bla bla bla bla bla bla bla bla bla bla</td>
</tr>
</table>
</body>
</html>
So the pop-up looks like this…
I’m resurrecting a old project. All of it was written in Go, I would normally use Python. Anywho, everything was going fair after re-familiarizing myself with some quirks such as it wanting else written like “} else {“, all on the same line. But I needed a new program that did some date/time formatting. So I found time.Date() and created a test program where I hardcoded (yyyy, mm, dd…). OK that did what I wanted. So I plugged it into my new program and extracted from a date field, yyyy, mm, dd as integers from a SQL database. Except it didn’t work! Why? yyyy and dd were fine… but it expected mm as a time.Month( ) object (see below popup). WTH? Year is int, day is int, why isn’t month int? That would have made it easy. But we don’t want things easy… now do we? If I googled it would probably be a simple solution. But I’m not a Go expert and just decided to write this program in Python. Also, I’ll never be great in Go if I always just fall back on Python. Maybe I’ll revisit this Go issue in the future.
At least the SQL modules I used still worked fine. I hadn’t used Go in a few years and it was a concern. This is a huge gripe with my adventures with Julia. It may be a great language. But I’ve had several working programs, fail due to changes in the libraries I used. So I’ve lost all desire to program in Julia.