johnk's blog

My Second Angular Directive - Menus

This was downright difficult. The good news is that the code got a little shorter, the HTML is a LOT shorter, the menu settings are in a shorter config file, and the direct manipulation of the DOM has reduced significantly.

When the user clicks on a menu item, here's what happened:

The original scanned the DOM to toggle off the current item. Then toggled the new item.

Now, the new version maintains a copy of the menu configuration, and alters this model. A loop scans the model and sets a "selected" bit, then triggers the animations.

My First AngularJS Directive: Stretchdown - stretches an element to the bottom of the window.

I've made may first directive! OK, not that special, but to me it is. This is one of the more difficult features I've come across in Angular, and I still don't really "get it".

I'm not even going to do a code walkthrough, because I can't really explain it well. The easy part is calculating the height the element should be. The tricky part is implementation.

Chrome Rendering Glitch with Label's Padding in Points (PT), Even Values

I have to learn the Chromium bug reporting system. Found an interesting rendering bug if, on a label, you specify a padding with an even number of points (pt), the rendering is shifted up a little bit, and the border can disappear if it's adjacent to another element.

Two examples are attached, differing only in the amount of padding.

Maybe it's a difference in how the values are calculated and either rounded off or truncated.

The problem goes away if you use pixels instead of points.

Why is Markdown Cool?

I went to the UseR conference, and R-Markdown was all the rage. My boss/coworker/?? asked me what was so cool about it. I've been using plain Markdown around a year, and think it's kind of cool, but my initial impression was that Markdown was kind of lame.

Chinese-American Cantonese Restaurants in Los Angeles

Personally, I prefer the Hong Kong style places in Monterey Park and Alhambra, and got used to them in the past 30 years or so, but it's not true that LA doesn't have old fashioned Chinese-American food anymore. People say it, but that's because they're eating at fusion restaurants or some chain or a fast food steam table place (which is, most likely, not even run by Chinese people).

Uncle John's Cafe

Improved Learning with Transcripts of Video Tutorials

I'm learning AngularJS and noticed a few things going on. First is that there's a great tutorial out there called Angular JS in 60 Minutes Ish by Dan Wahlin. It's really good, and it's a little different from most tutorials. It read like the script of a screencast - and I thought it *was* the script of a screencast.

It's actually the inverse. It's the transcript of the screencast, and the images were taken from the screencast.

Re: Why Most Developers Should Avoid Apple's New Swift Language

http://www.huffingtonpost.com/gabe-sumner/why-most-developers-shoul_b_54...

I don't agree with this article, at least on the points he made.

> Swift is irrelevant to the majority of mobile audiences

Yes, but so are iOS apps, and so are Android apps. These are all much smaller than the total smartphone market... but they are larger than other software markets.

> The best use case for Swift is iOS exclusive games

This is true, though "exclusive" doesn't need to be part of it.

Raspberry Pi NAS Backup

Last year, I got one of those little Raspberry PI (R-Pi) devices. It's pretty cool, but in the end it's a little PC. Since there's a big bad PC under the desk, the R-Pi didn't get much use. Also, I'm a chicken hardware hacker and so I never put anything onto the GPIO pins.

R Database Connection Class in RS (R5 S5)

I'm learning R, and it's been interesting. The weird part is that I don't know stats. Yes, I know standard deviation, mean deviation, and easy stuff, but those are one-liners in the R tutorials. What I know in stats amounts to around 1/4 to 1/2 a page of the R tutorial. So to compensate, I have a stats text from the thrift store, so I'll eventually be less than a total ignoramus about what I'm reading.

One of the twists of what I'm messing with is that all our data is in a database. The normal mode of operation for R users is to load the entire data table into memory and do awesome reporting on it. Where I'm at, for better or worse, is more like a traditional web application with a database back end.

A problem with this is that MySQL lets me have only 16 connections going at the same time. I'm not sure if it's the driver, but I'll assume that. Since RStudio holds the connections, coding a lot of changes eventually leads to a lot of lost database connection handles, and eventually running out of connections.

Weird Network Fault Due to Unknown thing on the End of the Wire

I was called in to help fix a network that had been discombobulated. I didn't end up fixing it, but one staffer there did the trick by disconnecting a switch with a bunch of wires plugged into it.

Using Muriatic Acid (Pool Acid) to Clean the Toilet

We're in full drought mode in LA, and that means we follow the eleventh comandment: if it's yellow, let it mellow, and if it's brown, flush it down.

PHP with Less Risk

An extremely short article about how to avoid pitfalls that will get you hacked. I've been hacked, so I kind of know this from experience.

Cisco Catalyst 2940 Series 8+1 WS-C2940-8TT-S 10/100 +1000 Port Managed Switch

I want to get one of these.

Cisco Catalyst 2940 Series 8+1 WS-C2940-8TT-S 10/100 +1000 Port Managed Switch

It's similar to the little Netgear GS108T managed switch, but with slower ports. For most things that involve the internet, that won't matter. It's main advantages would be the fact there's no power adapter cube - the power supply is in the case. IOS is also useful, sometimes. I find it's a pain in the butt, but you can record your configuration into a human-readable text file, which is important to some people.

2:13-cv-2326 Rodrick Rickert v. Kurt Francis (and John Kawakami, LA Indymedia et. al.)

If you happened to come across my name in a web search, and found this lawsuit, I'm putting this page up to explain a little bit about it. For more details, contact me via johnk@riceball.com. If you're interested in the IMC and this suit, in general, I'm preparing a listserv to send updates.

Printing Is Getting Worse... and Linux is Better than Windows

I just spent an hour trying to get a single page to print... after printing around 40 pages of tax returns. What the heck? The challenging task was to print something that was probably laid out using the old Win32 drawing system, in landscape. Partial pages came out with a large gray area where it should have been white. What was gonig on?

Syndicate content