darkoshi: (Default)
I saved some screenshots to show how easy it can be (in some cases) to get Copilot to help you with simple coding tasks.

These were my prompts:
1. Hello, please suggest how to code a powershell script to convert values like "1724143246792" to a timestamp format of YYYYMMDD-hhmmss

2. The script should take the input value as a parameter

3. Thank you but it isn't giving the right date. 1724143246792 should convert to approximately 20240819-132248, but the above script gives 16010102-235334

4. Thank you, that works better. But the output time is in UTC and I would like it in Eastern US time

5. Thank you, that is good. If the input value is from the summer, will the output be in EDT, or will it always be in EST?

Screenshots of Copilot's answers behind the cut )
darkoshi: (Default)
Previously when I tried out dark mode for various applications on my laptop, it made text seem less coherent to me, so I didn't use it.

But recently the normal (light) mode started bothering my eyes (they've been getting very tired & dry & achy), so I switched both my work and personal laptops into dark mode in the Windows settings. I've been switching individual applications into dark mode too, where possible.

My spreadsheets have been giving me difficulty. They are LibreOffice Calc ODS files. For whatever reason, most of the text in them is set to black, not "automatic". So when I switch to the "LibreOffice Dark" color scheme, I end up with black text on a black background, impossible to read.

I have many spreadsheet files, with many tabs (sheets) in each file.
There ought to be an easy way, a script, to update multiple spreadsheet files at once to convert all text, current and future, to the "Automatic" color. But I haven't found such a script yet.

Doing it manually involves going it each tab in each file, selecting all the cells, and updating the text color. And then doing something else to change the default for new cells too. I did the first step for two spreadsheets. Then I noticed that text I enter in a row below the last existing row ends up black on black again. That's why I think the 2nd step is required too (and I don't even know how to do that step manually yet).

I asked Gpt4o-mini (via DuckDuckGo) for assistance. It suggested creating a macro, and gave me sample code for the macro. The sample code was giving me an error in the part for finding all ODS files in a specified folder. I worked through that error with Gpt4o-mini's assistance. Now the part for updating each file is giving me an error (probably the first of several). Sigh. I don't want to spend my vacation time trying to code and debug a spreadsheet macro. Debugging the macro isn't as easy as debugging Java code in Eclipse. You can't just select a variable in the code and see all the details for it.

Surely such a macro or script already exists somewhere. I can't be the first person facing this problem.

I get stuck in all these problems. How can i make progress. How can I ever get to sleep at a good time. How can I ever catch up.

UPDATED:
I tried asking Copilot. There were a few issues with the first code it suggested too, but we fixed them. This logic seems to work well to update the text color to "Automatic" in all ODS files in the specified folder:

Sub ChangeTextColorInFolder()
    Dim oDoc As Object
    Dim oSheet As Object
    Dim oCell As Object
    Dim oRange As Object
    Dim oCursor As Object
    Dim sFolderPath As String
    Dim sFileName As String
    Dim i As Integer
    Dim oSimpleFileAccess As Object
    Dim aFiles() As String
    Dim args(0) As New com.sun.star.beans.PropertyValue

    ' Set the folder path
    sFolderPath = "C:\path\to\your\folder\"

    ' Get the SimpleFileAccess service
    oSimpleFileAccess = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")

    ' Get the list of files in the folder
    aFiles = oSimpleFileAccess.getFolderContents(ConvertToURL(sFolderPath), False)

    ' Loop through all the files in the folder
    For i = LBound(aFiles) To UBound(aFiles)
        sFileName = aFiles(i)
        
        ' Check if the file is an ODS file
        If Right(sFileName, 4) = ".ods" Then
            ' Open the ODS file in hidden mode
            args(0).Name = "Hidden"
            args(0).Value = True
            oDoc = StarDesktop.loadComponentFromURL(sFileName, "_blank", 0, args)

            ' Loop through all the sheets in the document
            For Each oSheet In oDoc.Sheets
                ' Get the used range of the sheet
                oCursor = oSheet.createCursor()
                oCursor.gotoEndOfUsedArea(False)
                oRange = oSheet.getCellRangeByPosition(0, 0, oCursor.RangeAddress.EndColumn, oCursor.RangeAddress.EndRow)

                ' Loop through all the cells in the range
                For j = 0 To oRange.Rows.Count - 1
                    For k = 0 To oRange.Columns.Count - 1
                        oCell = oRange.getCellByPosition(k, j)
                        ' Set the text color to Automatic
                        oCell.CharColor = -1
                    Next k
                Next j
            Next oSheet

            ' Modify the default cell style to automatic color
            Dim oStyle As Object
            oStyle = oDoc.StyleFamilies.getByName("CellStyles").getByName("Default")
            oStyle.CharColor = -1

            ' Save and close the document
            oDoc.store()
            oDoc.close(True)
        End If
    Next i

    ' Show a message box to indicate completion
    MsgBox "Macro completed successfully!", 64, "Success"
End Sub



That is for both the first and 2nd steps.
For how to do the 2nd part manually, this answer works:

To ensure that all cells, including those outside the used range, default to Automatic color, you can modify the default cell style in LibreOffice Calc. Here’s how you can do it manually:

Open LibreOffice Calc.
Go to Format > Styles and Formatting (or press F11).
In the Styles and Formatting window, click on the Cell Styles icon (second icon from the left).
Right-click on Default and select Modify.
In the Cell Style dialog, go to the Font Effects tab.
Set the Font Color to Automatic.
Click OK to apply the changes.

Unicode / UTF-8

Sunday, May 22nd, 2022 06:27 pm
darkoshi: (Default)
From what I have determined, the Wordle "Share" function saves these Unicode characters:

Black Square: (U+2B1B)
White Square: (U+2B1C)
Yellow Square: (U+1F7E8)
Green Square: (U+1F7E9)

But when I look at the saved text in a Hex Editor, why does it instead show these values?

Black Square: e2 ac 9b
White Square: e2 ac 9c
Yellow Square: f0 9f 9f a8
Green Square: f0 9f 9f a9

The Hex Editor does indeed recognize those values as the above Unicode equivalents as it shows them in the side panel.

So how does e2 ac 9c get converted to 2b 1b, etc?

Never mind, I figured it out. It uses UTF-8 encoding.

e2 ac 9b
-> (in binary) 1110 0010 . 1010 1100 . 1001 1011
-> (bracketing the parts that are constant) [1110] 0010 . [10]10 1100 . [10]01 1011
-> (stripping out the parts in brackets) 0010 1011 . 0001 1011
-> 2b 1b

f0 9f 9f a8
-> 1111 0000 . 1001 1111 . 1001 1111 . 1010 1000
-> [1111 0]000 . [10]01 1111 . [10]01 1111 . [10]10 1000
-> (go right to left and add zeros as necessary on the left end to make it a full byte) 0000 0001 . 1111 0111 . 1110 1000
-> 01 f7 e8
darkoshi: (Default)
The reason why I'm still debugging code at 12:52am is that

I've built a precarious sand castle in my mind
where each grain of sand is a method call or a variable value or some interaction
and if I stop now, the ocean waves will wash the sand castle away,
and I won't be able to get back to it again tomorrow
without having to build it up again from scratch

and anyway, I'm closer now than ever before
at having reached the top of the castle,
so maybe just maybe
the jewel in the upper tower
will be mine
if I reach
a little bit
further

.

achievement reached!
the view is the table
but the 700 table is not the 701 view.
of course, of course!

blankets of white

Thursday, January 14th, 2021 02:29 am
darkoshi: (Default)
A layer of fog persisted here past noon today. It felt quiet and muted and calm, like after a snowfall.

An Austrian radio station mentioned a "Schneeflockdown". Schneeflocke is German for 'snowflake'. So Schneeflockdown is a cute bilingual way of saying "snowed in".

.

While debugging, I came across this comment in angular.js:

// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!

(I didn't write down what version of the file we are using, so am not able to find it online right now.)

This is the code that followed the comment. After that comment, I didn't bother trying to make sense of it. It wasn't related to what I was debugging anyway:
   if (!(next = ((current.$$watchersCount && current.$$childHead) ||
         (current !== target && current.$$nextSibling)))) {
       while (current !== target && !(next = current.$$nextSibling)) {
         current = current.$parent;
       }
     }
   } while ((current = next));

lunar missions

Saturday, August 3rd, 2019 02:32 pm
darkoshi: (Default)
While scrolling through these old newspaper images from the time of the first manned moon landing...
These 50-year-old front pages show how Apollo 11 captivated the country

(There are some headlines about Ted Kennedy leaving the scene of a car crash on Chappaquiddick Island.)

One also sees headlines mentioning Luna 15. It was an unmanned Soviet craft designed to land on the moon and bring back lunar samples to Earth. It orbited the moon at the same time as Apollo 11 - I don't remember hearing about that before! (Space race, indeed.) After the American moonwalk had finished, it attempted a landing but crashed into the moon.

Interesting to read:
Luna 15 Accompanied Apollo 11 to the Moon
Luna-15: Russia’s secret moonshot designed to beat Apollo 11

The first article mentions 2 medals the Soviets gave to the Americans "to leave on the Moon honoring two lost cosmonauts, Yuri Gagarin and Vladimir Komarov," but doesn't say whether the Americans actually took the medals to the moon. According to this article, they did:
What Have We Left on the Moon? (answer: half a million pounds of equipment, trash, and other items).

Jodrell Bank Lovell Telescope records Luna 15 crash:
(there's not really much one can hear in the video, but it is still interesting.)
https://www.youtube.com/watch?v=MJthrJ5xpxk

[personal profile] gfish staged a Lego re-enactment of the Apollo 11 mission on Twitter:
https://gfish.dreamwidth.org/386990.html

This is an interesting video about the computer on the lunar landing module, and the 1202 alarm that happened:
https://www.youtube.com/watch?v=z4cn93H6sM0
darkoshi: (Default)
StackOverflow was down for a little while this afternoon.

https://twitter.com/StackStatus

One of the subsequent tweets had this charming song.



Video title: Something Went Terribly Wrong
Posted by: Mediocre
URL: https://www.youtube.com/watch?v=t3otBjVZzT0
Date posted: Dec 30, 2014

orange turpentine

Wednesday, July 3rd, 2019 04:51 pm
darkoshi: (Default)
Whew, is it hot outside. Upper 90s, but with the humidity and in the direct sun it feels like in the 100s.

Qiao hired tree cutters to take care of the fallen tree as well as another dead tree that hadn't fallen. They finished it all, including grinding the stumps and removing the debris, in under 5 hours. It's a good thing they started early when it was still overcast and not as hot.

I will need to do some more fence repair before I can let the dogs loose again. But it's too hot now; maybe this evening. Although the forecast says it will still be 90 degrees, feeling like 96, at 9pm.

My mom is going to a free outdoor concert this evening. Phew. Hot, hot, hot.

Apparently Fort Jackson doesn't do their annual 4th of July Torchlight Tattoo and Fireworks anymore*. I didn't go often... I'm not into patriotic stuff, but the cannon blasts and fireworks, and cheering for the states and territories in the union was fun. Except for the parts where I worried that the fireworks would misfire and hurt someone.

I am still doing my work-work for the day. Learning to write JUnit tests, using Mockito. I feel somewhat ambivalent about their usefulness. In my experience, they only test what you already know works, and when they break it's not usually because the code got broken, but rather because the test code or test data became outdated.

Qiao's back yard now smells like my mom's oil paints used to. Or rather, the turpentine she used to clean the paint off the brushes. I like the scent, knowing that it is only pine.

I had a small set of oil paints when I was younger. And a small bottle of orange-scented turpentine. The orange didn't mask the turpentine smell at all; it just morphed it into a different strong overpowering and astringent scent.

Oil paints didn't appeal to me much. Too long to dry. Too hard to clean. Too messy. Not very suited to my style of abstract art. Me, not talented enough to paint realistic images very well. Although one time I copy-painted a portrait of my mom and brother from two photographs, and it turned out fairly well.

Turpentine smell makes me think of the Mediterranean too.

Whaddya know: orange terpene is made from orange trees and can be used as a substitute for turpentine. But I still think that the one I had back then was orange-scented pine turpentine. One made from orange tree extracts would probably have smelled better, like one of those citrus-based cleaners.

..

*A web search shows that 2017's Torchlight Tattoo event was cancelled due to the year-long centennial celebration that finished up that year. 2018's event was cancelled due to the "Victory Week" celebration in June of that year. But nothing at all is mentioned anywhere about it this year, which seems odd to me, considering that per those pages, "The Torchlight Tattoo is typically one of the most popular July Fourth events in the Midlands. Before last year, Fort Jackson hosted July Fourth celebrations each year in recent memory".
Per a family friend, Fort Jackson is not doing the July event at all anymore, instead having fireworks as part of their annual June celebration, the aforementioned "Victory Week".

i am a teapot

Thursday, February 28th, 2019 01:10 am
darkoshi: (Default)
I was looking up an HTTP status code...
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpStatus.html

and as I scrolled down that page, "I_AM_A_TEAPOT" scrolled by... wait, what?

After finding the code I was looking for (NO_CONTENT or some such one), I went back to read what the Teapot status code was for.

418 I'm a teapot
The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is a teapot. This error is a reference of Hyper Text Coffee Pot Control Protocol which was an April Fools' joke in 1998.


Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.


Attempt To Remove Joke 'I'm A Teapot' Web Error Ends Up Making It Official Instead

exiting Vim

Tuesday, August 7th, 2018 11:22 pm
darkoshi: (Default)
I got stuck in a Vim window yesterday while doing a Git merge after pulling updates. Git wanted me to provide a reason for the merge, which it had never asked for before while doing a merge.
I didn't want to enter a reason; at that point I just wanted to cancel the merge to figure out what had gone wrong. But I had to close the whole window as I couldn't figure out how to quit Vim.

So today I happened to do a search on it, and was amused by these pages:

How to exit vim in 5 simple steps.
OR: Help! I was using git to commit some code and now the window has changed and I don’t know what’s going on!


Stack Overflow: Helping One Million Developers Exit Vim
darkoshi: (Default)
Trying to get the Android SDK to work, so I can root my phone. It requires Java, though it doesn't tell me what version.

On the following Oracle JDK 8 page, when I click the radio button to accept the license agreement, and click any of the download links, I get the error "We're sorry, the page you requested was not found."

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I even tried the pages for the Java 9 and Java 10 JDKs. All of the download links get the same error. I tried with different browsers. I even logged in to the site, as is sometimes required for downloading older versions of the files. What is going on? Are the links working for anyone else? Is it a temporary outage? How can the world go on, if the JDK can't be downloaded anymore? Did everyone switch over to using non-Oracle JDKs? AAAAAHHHHH.

Now I thought to search Twitter. It's not just me; other people are having the same problem:
https://twitter.com/search?q=oracle%20jdk&src=typd
Well, that's a relief, sort of. But is the world going to end?

So I decided to try downloading OpenJDK instead. Apparently that's made by Oracle too. But why does the main download page say that JDK 9 and 10 are "ready for use", while JDK 8 (Updates???) are "early access"? Eh? At least I found a working download link there.

Update, 2:21pm:
The Oracle downloads are working again now. An Oracle employee posted on this reddit thread that the temporary outage was resolved about an hour ago. That's the only semi-official notice I found about it. No mention of it on Oracle's twitter feed, even though I counted about 20 tweets directed at @Oracle about the problem. Based on the posts on twitter and elsewhere from people getting the 404s, the outage was from around midnight to 2pm (EDT).

other things

Sunday, June 4th, 2017 02:47 am
darkoshi: (Default)
Still tweaking other things on my new cell phone too.

I found out that one can remove the pages from these old family photo albums (and put them back together again). Which means that scanning the albums shouldn't be that difficult after all (as long as each page fits on the flatbed - one of the albums does just barely. The other one would require using my mom's larger scanner). Which means that's another thing I want to get done.

Firefox addons; learn how to update them to use these new WebExtensions APIs.
Which also shows me that my JavaScript knowledge is woefully out of date. It's changed a lot in 20 years.

I've just installed 2 and a half years worth of Windows updates on one of Qiao's old Windows 7 desktop computers, which we haven't used in that long. Because it has iTunes on it, and I don't want to install iTunes on my laptop. But there are a couple of items I want to get, which are only available to download from iTunes. And of course, that meant I needed to install Windows updates too, right? I dunno. It seemed the thing to do even though it took all day. Makes me think I might even be able to get updates working again on my old laptop too, if I wanted to.
Simplifying updates for Windows 7 and 8.1 - a rollup for all updates through April 2016, with only one prerequisite that must be installed first.

Researching family tree stuff. Old census records. Found out my great-great-grandmother had at least 10 children, and possibly 5 more that didn't survive.
Need to determine what kind of open-source program I should use for doing a family tree, so that the data can be exported/imported in a widely compatible format.

Want to replace all the screws for the door lock strike-plates and hinges with 3-inch long screws. And replace some of the strike-plates with ones that take 4 screws instead of 2.

I finally took down the rest of the xmas decorations and put the boxes away. My mom helped me take down the xmas tree a few weeks ago. She and Qiao are as bad as me - once I made my mind up to take them down, they both said "I think you should just leave them up", making me debate it internally all over again.
darkoshi: (Default)
I got my taxes done.

I made a pie with a chocolate filling. It's somewhat gooey, not what I was expecting from the photo on the box. But it's actually good, even though it also tastes oddly like it contains grape syrup mixed in with the chocolate. Based on the ingredients list, I can't imagine why. It contains alkalized cocoa, and the link I posted before indicates that the non-alkalized sort is the kind that's more likely to taste "fruity".

I also made some Waldmeister Goetterspeise which is a German jello with a unique flavor not found in the U.S. My aunt used to make it for me as a kid (with vanilla sauce on top!), and I still like it. The flavor isn't as intense as I remembered though.

I trimmed my hair a bit. It was tickling the back of my neck too much a few days ago. My torso gets itchy sometimes. When I scratch, the skin gets pinkish red, and small itchy bumps, widely scattered, appear. When I stop scratching, it goes away. I haven't figured out a cause. It's been happening for a few years now. (Of course, having written "torso" there, now a few spots on my arms and legs started itching.)

I'm over my cold, but still have a lot of phlegm. That always used to be the one of the worst parts of a cold, the weeks and weeks of snot that would only slowly diminish back to normal levels. So I did neti today for the first time in possibly 5 years. I stopped using neti around then, after reading warnings against doing neti with unsterile tap water. Well, I used tap water today, like I used to. Anything else is too much trouble. But after reading the warnings again, I may forgo the whole thing for another 5 years.

I used LJSec to delete my old protected posts from LJ, as that was something that had been on my to-do list for a while. There may not be much point in having done it, but at least it is off my list now. First, I did another import of all entries & comments from LJ over to DW, as well as a few backups of both my LJ and DW (with LJArchive), to make sure I wouldn't lose anything. The only problem with LJArchive is that imported comments don't show up with the user's LJ name like it does on the Dreamwidth pages, but rather with a generic ext_#### ID. If I have time someday, I'd like to see if I can update the utility to fix that.

A few weeks ago, I cancelled my Netflix subscription, as I was using it so rarely. Qiao has another Netflix account anyway, which I can use when I want to. He also has an Amazon Prime account for watching videos.

Last week at work, I was able to find the cause of another problem, and fix it. Well, I probably fixed more than one problem, but the last one is the one I remember. It gives me such a rush, a good feeling, being able to discover what obscure thing is making the code not work right and how to fix it, when I still don't even understand what half of the rest of the code is meant to do. I was thinking, I've been working on this same general code base, though it has undergone many transfigurations, for the past 22 years. I could spend my whole *life* working on it, and I still wouldn't understand it all, especially because it is constantly being changed. That made me think for a moment that maybe I should leave this job, just so that *whole life* part wouldn't come true. Eh. But whatever, this code or some other code, what difference. Hmm. Coming up on the end of the quarter. Wonder if they will have layoffs.

lovely goose chase

Monday, March 13th, 2017 11:22 pm
darkoshi: (Default)
I finally figured out that the problem I've been debugging for the last 2 days, was only happening due to me having set a breakpoint in a certain place. One module was writing data to a cache. When another module tried to read the data, it wasn't found. The cache is configured with a "timeToLive" value of 180 seconds (which was unbeknownst to me before, but NOW I KNOW). My breakpoint was causing the data to expire before it could be read, which then caused other errors.

It makes perfect sense now. Back when this problem started happening, it didn't make any sense at all. What I was testing had been working fine before, and then it started getting these strange unexpected errors for no discernible reason.

The ironic part is that I had set the breakpoint in order to change some data on a database row, in order to force an error, as I was trying to test the module's error handling. But then, instead of getting the expected error, I started getting unexpected errors, even when I didn't change the row. At least all this did allow me to find and fix some other problems with the error handling.

optimism

Tuesday, February 28th, 2017 06:33 pm
darkoshi: (Default)
Apparently I'm much more of an optimist than I realize.

I can't say how many times I find a problem in the code, fix it, and expect the fix to work fine, and there not to be any more major issues. Or at least, not until after I've verified the first fix.

Not that I don't know that there might still be other problems, but just that early in the day, I seem to have unbounded *optimism*. The kind of feeling that makes me think, I can test this fix, and then go on to test that other fix my co-worker put in, and then successfully retest the scenario the BA was having problems with, and then maybe even have time to debug the other outstanding issue. Like, I seriously expected I might be able to do all of that today!

It's not supposed to happen that in testing the first fix, I get totally unexpected results, and upon research determine that those results are due to stranded data from yesterday's failed tests, plus additional problems in the error handling logic, plus maybe the cursors needing extra conditions in them, plus who knows what else.

Please, not another can of worms. I've got enough cans of worms already!

*Optimism*, because this code was extensively tested in the past and was working pretty good back then. Even though I should be pessimistic due to all the issues we've already found, which have mainly been due to a large code refactoring project that was done last year.

bless

Saturday, July 16th, 2016 08:18 pm
darkoshi: (Default)
I've been updating scripts for setting up a local debug/testing environment for work.

I worked late on it last night. If I don't take extra time in my off hours to get it done, I'll never finish it, even though it is something that will make the rest of my tasks easier to finish, as well as helping out co-workers.

This morning, after getting only 5 hours sleep because I woke up early, I just wanted to tweak a few things and test it out. I should be able to kick it off and let it run while I'm doing other things, then kick off a few more things, etc. It started out well. Except that Eclipse wasn't picking up the right default JRE, which for our environment isn't the same as the JDK version that we need to use for running Eclipse itself.

It was unclear how to configure Eclipse's prefs and configuration files so that it would use my dynamically inserted JDK path. That took what, 5 hours to get working? Because of fascinating details about how all that works, which I'm too tired to describe now but maybe later elsewhere.

Then I had to do more tweaking because some files need single backward slashes in the paths, and some files need double backward slashes... and good heavens it didn't like having a combination of forward and backward slashes either...

Then I had to tweak it more, because in changing all those slashes in the paths, I accidentally also changed slashes that weren't in the paths. So I had to add logic to swap those back. At this point, even though that may seem convoluted, it's the simplest way to do it.

REM ... undo the slash changes that weren't in the paths. Change the double slashes back to single slashes.
powershell -Command "(Get-Content '%EclipseDir%\org.eclipse.jdt.launching.prefs') -replace '<\\\\', '</' | Out-File -encoding ASCII '%EclipseDir%\org.eclipse.jdt.launching.prefs'

I already inserted a "Sheesh!" to the end of the comment, and was debating adding "Please Lord let it work right this time" or perhaps, "Please Lord, bless this code..."
because you know, even if I don't believe in a Lord, it would probably amuse the next person who looks at the file.

.

and also thunderstorm and yapping dog and vegan grilled cheese sandwiches - Follow Your Heart has a new Smoked Gouda cheese which combines/melts well together with the Tofutti American cheese slices.

and also being partly upset with myself for having wasted more than half my weekend on work work. and yet still wanting to continue on it.

Dampfnudelwetter

Friday, October 2nd, 2015 11:18 pm
darkoshi: (Default)
I could have made brownies. I could have watched a movie. I could have washed the dishes.

Instead I wanted to get this task I was working on for work, working. Because it was one of those coding/testing/figuring out/tweaking/trying again/failing/getting a little further/thinking of a new way of trying again/etc tasks that's hard to walk away from.
Now it's 11:30pm and is it working? NO!!!! The zipped files aren't working; the gzipped files aren't working; the compiled stylesheets don't seem to be making any difference; waaaaahhh! phooey!

It keeps raining and raining and raining. It was a fine mist most of today.

At the Little Oktoberfest in Munich, when I was a kid in weather like this, they sold Dampfnudeln (steamed dumplings) with a plum filling and vanilla sauce. I remember them as being so big. But they can't have been that big; I must have been small.

And then I do a websearch and find out that the Little Oktoberfest was in July, not October, so the weather couldn't have been all that cold and damp. Though it was Germany, so yes it could.

My aunt made green Wackelsalat with vanilla sauce.

Now it's 12:30am, and at least one of the 3 things I wanted to verify were working, seems to be working, maybe. Yes! It does! Woo-ha!

Fife tings

Thursday, November 6th, 2014 07:56 pm
darkoshi: (Default)
When you see this, take a minute and share five good things of your day with the world, uncut.

1. I saw that raccoon again*!
2. It was mild, overcast, and breezy at lunchtime**, with that ambiance of being surrounded by familiar/benevolent forces of nature. The colors were pretty too.
3. I got to use De Morgan's laws on an actual*** practical problem!
4. I made it home from work before Qiao for a change, though only by a few minutes.
5. Tomorrow is Friday!


* Again, while leaving work after dusk. It was crossing the street from the other side, nearly to the center. I could see headlights coming up behind me, so I silently begged it to either finish crossing the street in front of me, or to run back to the other side. But it just stood there as if telling me to go on and get out of its way. So I drove on. I hope the other car didn't run it over.

** I purposely walked by the area where the turkeys were yesterday, but then was so lost in thought that I forgot to even look up to see if they were still around.

*** As in the negation of something like ((aaa >= bbb and aaa < ccc) or (ddd <= bbb and ddd > ccc)). But then I found a way to also simplify the original condition.

bah bah batch file

Saturday, March 22nd, 2014 04:45 pm
darkoshi: (Default)
Trying to figure out how to get the logic in a big Windows batch file to work right is about driving me crazy.

I keep running up against walls for the things that ought to be *simple*.
Like echoing a variable value.
Like comparing a variable to another value.

Sheeesh!

Consider the following.
-----------------------

for /f "tokens=1,2*" %%a in (tmp.txt) do (

SET var1=%%a
SET var2=%%b
SET var3=%%c

echo %%c xxx

setlocal enableDelayedExpansion

echo !var3!
echo "!var3!"
)
------------------------

Why does the 1st ECHO statement display an output with the 'xxx' *before* and partially *overlaying* the value that was read from the file, like this???
xxxIYUIYOIYI

The 2nd ECHO statement displays the correct value.

The 3rd ECHO statement displays the first double-quote character, then the correct variable value. But it doesn't display the 2nd double-quote character. WHY NOT??? How can I figure out if there are spaces on the end, if it doesn't let me display anything after it??

Heaven forbid what I really want to do is like this:
IF "!var3:~19!" == " " call :someOtherFunction
or like this:
IF "!var3:~-2!" == " " call :someOtherFunction


How can I figure out why the If statements aren't working, if I can't even get a simple ECHO to work right?

If I replace the double quote chars in the ECHO statement with some other chars, it still has the same problem.

It doesn't help that I was up til 2am working on this batch file last night, and was only able to get 5.5 hours sleep. Due to waking up early and not being able to fall back asleep.
On top of having woken up 1.5 hours early yesterday morning.
darkoshi: (Default)
Yesterday I had to download ActiveMQ for work.

I'm somewhat familiar with verifying the hashes of downloaded files, and have used a few different tools for doing that. The ActiveMQ page indicates that MD5 signatures can be used to verify the downloaded files. That sounded like the hashes that my tool could verify. But nowhere on the page did I see the actual MD5 values that one would compare against.

The ActiveMQ page also indicates that PGP or GPG signatures could be used for verifying the files. Ok... I figured that maybe this was a good reason for me to finally try out PGP and see how it works.

I read about the differences between PGP and GPG, and decided to try GPG. So I went to the GnuPG download page. But found that it only has the source code. Apparently the binary packages are only available on the mirrors. There's no mirror in the U.S. The Canada mirror site wasn't responding. So I looked at a few of the other mirrors.

It seems the latest GnuPG 2.0 version is not available in a Windows version. Why not? I don't know, but after reading a bit, it sounded like the 1.4.* version should suffice for my needs.

Versions 1.4.0 and older are available as zip files, while new versions up to 1.4.9 are exe files. Why no zips for the later versions? I'd prefer not having to install anything... And how would I verify these downloads? Where are the checksums for them?

It was at this point that I decided to forgo verifying the downloaded ActiveMq files.
I had a fuzzy head type head-ache, by the way. Makes it harder to think.

Based on this experience, I'm not surprised that the use of PGP encryption hasn't caught on all that much. It seems you have to be a developer to even figure out how to get it. Heck, the first answer on this page to the question "Where can I find a command-line version of GPG for Windows?" is "You could download it and compile it yourself".

I subsequently found this Gpg4win download page which has a small 4MB version and also lists the SHA1 checksums. Whenever I feel up to it, I may try that one out.

May 2025

S M T W T F S
    123
45678910
11121314151617
1819 2021222324
25262728293031

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, May 22nd, 2025 10:04 am
Powered by Dreamwidth Studios