(focus) will work when tabbing in and (blur) and (focusout) when tabbing out, but both of those events will run in a loop as long as you sit on the control. (keydown.Tab) will run just once when leaving, but I do not know how to run an event just once upon entry.
Tuesday, April 2, 2019
Empty out the selection in a file type input in an Angular 7 application.
It's as easy as you think it is to zero this out. Assuming...
@ViewChild('uploadControl') uploadControl: ElementRef<HTMLInputElement>;
...then:
this.uploadControl.nativeElement.value = '';
I thought today of old models of how much more time (and thus money) it takes to deal with a bug the longer the bug is left undiscovered.
This came up at Paymetric. It's better for the developer to just catch a bug in his/her work than it is for the tester to find it in testing and have the developer fix it, and both of those scenarios are better than having the bug make it into production and have users find it. At Paymetric, I think once or twice they found a bug in some of the old cartridges (a cartridge was a process to integrate with one variety of payment gateway and each payment gateway supported had a cartridge) that were written a decade ago in C++ and had to deal with them. The scenario in which the magic black box stops working and someone has to reverse engineer that thing no one wants to think about has to be the worst scenario. Consider if you will this song by Databoy which takes the lyrics of both the Miley Cyrus song "We Can't Stop" and the Lana Del Rey song "Summertime Sadness" and jams them together into a new song called "We Can't Stop Summertime Sadness" ...if you heard this in 2126 would you be able to tell what parts made up the whole?
Monday, April 1, 2019
1024 is the maximum number of columns a table may have in SQL Server.
You may use a feature called "sparse column" to get this number up to 3000.
When setting the innerHTML property on a div to inject HTML into a component in an Angular 7 application, you will have to utilize the ::ng-deep trick to actually CSS style the injected HTML.
...assuming you want to perhaps nest the HTML for a table inside of a div like so:
this.yin.nativeElement.innerHTML = this.yang;
How do I get the Floating Selection to stop floating in GIMP?
At: Windows > Dockable Dialogs > Layers ...or by way of just pressing Ctrl-L, open the "Layers" dockable dialog. Therein right-click on the "Floating Selection" and pick "Anchor Layer" to flatten it down. Maybe you don't need to this, but it drives me crazy. In Googling against this stuff, I learned that the usual way to flatten layers is to right-click in any one layer and pick "Flatten Image" from the menu that appears. This trick will not work with the Floating Selection however and you have to take this other route.
Who remembers the old way to FTP through the URL line at Internet Explorer fifteen years ago?
This would open a file explorer window in Windows XP into the heart of the webserver wherever it was.
ftp://username:password@ipaddress/
While we are going back in time, here is how you have at a GET variable in PHP fifteen years ago:
WelcomeLabel.Text = Request.QueryString["FirstName"];
...a POST variable:
WelcomeLabel.Text = Request.Form["FirstName"];
...either way:
WelcomeLabel.Text = $_REQUEST["FirstName"];