This suggests so. Wait, wait! scrolling="no" inline might be the better way to go. I just reread what I was broadcasting. Groan!
Saturday, July 21, 2018
VK is the Russian Facebook.
Sign up for VKontakte here. Odnoklassniki is I guess the mySpace that this Facebook beat. Kontakte just means "contacts" so I suppose VKontakte would mean "virtual contacts" eh? I found out about this by messing with Coub which is more Russian stuff. I found a better translation online that suggests the V stands for "In" so the whole thing means "In Contact" I guess.
Thursday, July 19, 2018
The ADO in ADO.NET stands for ActiveX Data Object.
Wednesday, July 18, 2018
I've seen some tweets this morning about the bridge pattern so I guess that merits a blog posting.
It's an old Gang of Four thought put to paper in published book form. It has to do with attempts to untie external dependencies from interfaces in the whole Inversion of Control subset of maintainability in the bigger picture. We all have gotten pretty good at IoC, eh? We don't really need to geek out on this now. You no longer need StructureMap in .NET Core and if you are using the .NET Framework, well, you can probably just use StructureMap. I have blog postings on using StructureMap with web forms while not using the old ObjectFactory approach which has been disallowed in modern StructureMap. The hacks there may be overkill however. Guys, if you do IoC without .NET Core and without a tool like StructureMap to help you, you are basically just upcasting external dependencies to interfaces that are implemented by them and then passing the interfaces in to method signatures where they will get used instead of the external dependencies themselves. It's really all that simple. It can be more complicated to be more elegant, but when you take away all of the whistles and bells we are talking about using interfaces for the one use case wherein interfaces are most important and cannot be skipped.
Tuesday, July 17, 2018
lifecycle hooks for directives in Angular 5
Page 128 of "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis suggests that the directives in Angular 5 do not have the ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, and ngAfterViewChecked lifecycle hooks, but otherwise have the hooks for components as listed here. The same page of the book points out that you need to make sense of Inputs at the ngOnInit lifecycle hook of a component when tempted to otherwise do so at the constructor where the Inputs can't yet be read. This isn't new for me, but I also cannot remember if I explicitly mentioned it at this blog so I am bringing it up now.
yet more notes
- IBM FileNet Content Manager is an old tool for managing files in directories.
- You may create a backlog in Visual Studio Team Services (VSTS) into which you may put things and have backlog groomings to stack up work to be done. In this paradigm a story is referred to as a PBI or product backlog item.
- Power BI is a business intelligence service/tool from Microsoft kinda like SSRS only more modern, better, etc.
- The Activator Class in regards to C#'s reflection will create a new class via reflection at runtime. This is how you do it from your code.
- In the SharePoint API there is a distinction between the server-side object model and the client-side object model. Office 365 must mesh with the client-side object model.
- W3WP (w3wp.exe) is the Windows workers' process often attached to when debugging through IIS. The W3 part should just mean www and of the web. Think World Wide Web Consortium and their W3C standards.
- Referential Integrity at the database high level as a concept is the whole notion that if I have a reference to a primary key of one table in a secondary column in a different table (for example addresses are joined to or references to people in a classic dummy Rolodex application) that when I try to reach out to a referenced record that it will be there. (You cannot just delete an address from SQL if a person "has" the address. Expect an error coming back to you when you try. You would need to either do away with the reference or delete the person first.)
- Table-valued variables in T-SQL are just what they sound like. These are the TABLE type variables with the leading at symbol notation. When you execute a stored procedure that takes one of these as an input you need to make such a variable outside of your stored procedure, do your inserts, and then call the sproc like so:
EXEC dbo.myStoredProcedure @MyTable
Saturday, July 14, 2018
putting a class on a selector tag for a component in an Angular 5 application to both style the tag and pass the value on as an Input
Alright, this trick from "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis surprised me. It's both novel and ghetto. If you have a class named something like redStop or greenGo and you put that in the class attribute of a selector tag, not only can you style the whole of the component as if a div wrapping the template markup were being styled, but you may also hand the redStop or greenGo magic string on as an Input that you may catch inside of the component and then perhaps react to in a case/switch statement. That's pretty nasty. Why not have a second property for the Input independent of the class? Doesn't that make for more readable code? Another surprise in all of this is that class doesn’t have to be wrapped in square brackets inline in the selector tag as is normally the situation with Inputs. Wacky!
Friday, July 13, 2018
random notes from the most recent round of job hunting
- Per Diem is a concept in which if one is constantly traveling for work some of the costs get a tax break. You have to have two residences for this to be applicable.
- Spine.js is some sort of JavaScript MVC pattern.
- Prolog is supposedly an old project control software offering. In Googling against the term I honestly see a couple things with the same name that could be the thing mentioned to me.
- In the Box Model all CSS elements can be considered boxes.
- There are a couple of other examples on this blog about using the prototype keyword in JavaScript and it is possible to walk up a prototype chain (inheritance chain) with Object.getPrototypeOf() and this has some notes on such.
- Oracle WebLogic Server is another web server for Java stuff.
- Ping Identity's PingFederate is some sort of security-conscious identity management tool.
photos from lunch outings whilst working at Wells Fargo Advisors in St. Louis
What: Cafe Natasha's
Where: 3200 S Grand Blvd, St. Louis, MO 63118
When: 4/6/2018
Why: lunch!
What: Corner 17 noodles and bubble tea
Where: 6623 Delmar Blvd, St. Louis, MO 63130
When: 5/3/2018
Why: lunch!
What: Blues City Deli
Where: 2438 McNair Ave, St. Louis, MO 63104
When: 5/18/2018
Why: lunch!
What: Aya Sofia Restaurant
Where: 6671 Chippewa St, St. Louis, MO 63109
When: 6/8/2018
Why: lunch!
What: Taste of Lebanon
Where: 331 N Euclid Ave, St. Louis, MO 63108
When: 6/15/2018
Why: lunch!
Monday, July 9, 2018
Mass Assignment Attacks
These attacks send tags to set flags to raise permissions for a user account. Imagine scenarios in which a "User" database table has a bunch of bit type columns for things like isApprover and isPublisher and then imagine a SQL-based attack in which a lot of the false values are flipped to true.
WinInit
wininit.exe is some sort of critical system process in Windows. It is as cornerstone as the command.com was to DOS. It is possible for some spyware or other virus to mess with this thing and make it sick. Honestly, I have only ever heard of it within the context of it misbehaving.
Coub
...is the new Vine!
Addendum 7/16/2018: I have finished moving all of my Vines to Coub. See: https://coub.com/e617299ed5c4b172a15da9114f3de104
I learned how to add a pagination control to an Angular Materials data table in an Angular 6 application today.
I cleaned up the component I first offered here using this as a guide. The revamp looks like so:
import { Component, OnInit } from '@angular/core';
import { President } from '../models/president.model';
import { PresidentialContract } from '../contracts/presidential.contract';
import { MatTableDataSource, MatPaginator } from '@angular/material';
import { ViewChild } from '@angular/core';
@Component({
selector: 'materials-list',
templateUrl: './materialsList.component.html',
styleUrls: ['./materialsList.component.css']
})
export class MaterialsListComponent implements OnInit {
public presidents:Array<President>;
private displayedColumns = ["Name", "Party", "HasNonconsecutiveTerms"];
dataSource: MatTableDataSource<President>;
@ViewChild(MatPaginator) paginator: MatPaginator;
ngOnInit(): void{
this.presidentialContract.getPresidents().toPromise().then(
function(data) {
this.presidents = data;
this.dataSource = new MatTableDataSource<President>(this.presidents);
this.dataSource.paginator = this.paginator;
}.bind(this),
function(error){
console.log(error);
});
}
constructor(public presidentialContract : PresidentialContract) {
}
}
I had to change up the template too and inadvertently I discovered that a lot of the tags could be reworked. The mat-table tag could become just a table tag with mat-table designation jammed inline within the tag. Other nested tags within the table tag could similarly be revisited and reworked.
<div id="wrapper">
<table mat-table class="lessons-table mat-elevation-z8" [dataSource]="dataSource">
<ng-container matColumnDef="Name">
<th mat-header-cell *matHeaderCellDef>Name</th>
<td mat-cell *matCellDef="let president">{{president.Name}}</td>
</ng-container>
<ng-container matColumnDef="Party">
<th mat-header-cell *matHeaderCellDef>Party</th>
<td mat-cell class="description-cell" *matCellDef="let president">{{president.Party}}
</td>
</ng-container>
<ng-container matColumnDef="HasNonconsecutiveTerms">
<th mat-header-cell *matHeaderCellDef>HasNonconsecutiveTerms</th>
<td mat-cell class="duration-cell" *matCellDef="let president">
{{president.HasNonconsecutiveTerms}}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10]" showFirstLastButtons></mat-paginator>
</div>
BrowserAnimationsModule and NoopAnimationsModule had to be looped in at a module to make this all work as seen below.
import { BrowserAnimationsModule, NoopAnimationsModule } from
'@angular/platform-browser/animations';
@NgModule({
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule,
HttpModule,
HttpClientModule,
routing,
MatInputModule,
MatPaginatorModule,
MatProgressSpinnerModule,
MatSortModule,
MatTableModule,
BrowserAnimationsModule,
NoopAnimationsModule
],
If you put more than one number in the array at the mat-paginator tag you will get a little dropdown list of options. That said, I could not get the dropdown list to work. That is a challenge for another day I suppose.
Sunday, July 8, 2018
Hyperledger
It is a collection of tooling around open source blockchains which are ledgers of always growing sets of records, such as in the accounting space. Blockchains are secured with cryptography.
FHSS of Hedy Lamarr
Frequency Hopping Spread Spectrum has to do with transmission of radio signals. It is cornerstone to Wi-Fi.
Complex???
https://twitter.com/eventstore describes Event Store, advertised on Twitter by Greg Young himself, as: The open-source, functional database with Complex Event Processing in JavaScript.
Saturday, July 7, 2018
Save a photo texted to you to your photos at an iPhone X so that you may turn around and text it to someone else.
Go into the text message and touch the photo so that the rest of the message drops away. Click on the icon at the upper right that looks like an arrow going upward from a square. Options will appear and at the lower left press the icon that looks like an arrow going down back into a square with the copy reading "Save Image" to save the image to your photos.
target properties
A field decorated with @Input in an Angular 5 component is an example of a target property. "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis offers up this terminology.
MR versus VR versus AR
This explains the distinction between Virtual Reality and Augmented Reality. MR stands of mixed reality and is some halfway hodgepodge between/of the two. This offers as an explanation that, 3D objects that are believable will be placed into your real life visuals and you should be able to walk around the vaporwave statue that isn't really in the room with you while its perspective changes, etc.
Friday, July 6, 2018
Nix+PureScript
There is a Nix package manager and NixOS is a Linux "distribution" built with Nix package manager. Hydra is a Nix-based CI tool. PureScript is another language like CoffeScript or TypeScript which compiles to JavaScript, and I think there is a way to tie it into the Nix stuff though I don't understand it.
no more Sybase
Wikipedia says: Sybase was an enterprise software and services company that produced software to manage and analyze information in relational databases. Sybase was acquired by SAP in 2010; SAP ceased using the Sybase name in 2014.
Thursday, July 5, 2018
Both pen drive and memory stick are other, alternative terms for a USB drive.
Pick your poison.
Addendum 7/18/2018: Flash drive is another term.
Tube TV
A different way to watch cable television, it allows for you to pay for individual cable shows. Wait! A coworker who told me about this also pointed out to me that I have the wrong link here. He meant to tell me about Tubi TV which is akin to Netflix but free.
git remote rm yournamehere
This GIT command line command should remove a remote source out of your collection of accessible remote sources. Run it in a Git Bash shell.
the new food stamps
- Electronic Benefit Transfer
- Women, Infants, and Children
...are pseudocreditcard, modern electronic solutions. EBT is scam proof, but WIC has corruption issues with cards falling into the wrong hands, etc.
Wednesday, July 4, 2018
Could not complete your request because a SOFn, DQT, or DHT JPEG marker is missing before a JPEG SOS marker.
If you get this error trying to open a .jpg image in Adobe Photoshop CS6, try to open the image in GIMP 2.10 and resave it! I ran into this problem with the image below which I took on my iPhone X and then emailed to myself so that I might work on it on my Windows 10 laptop. Everyone have a happy 4th of July!
Double asterisk for a wildcard in Angular 5 routing!
If you don't want to have a separate routing module for your outermost God module you may just jam that routing stuff into the outermost God module itself by first importing RouterModule like so...
import { RouterModule } from '@angular/router';
...and then, at the imports metadata property in the module, having an item/entry as seen below. Do note the double asterisk for a wildcard catchall. Cool stuff. This is something more I learned from "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis.
RouterModule.forRoot([
{ path: '', redirectTo: 'start', pathMatch: 'full' },
{ path: 'start', component: DefaultComponent },
{ path: '**', redirectTo: 'start' }
])
DEF CON rope line
After I attended this talk at DEF CON 23, I had had enough of Las Vegas and wanted only to go back to my hotel and take a nap deciding that I would have no more of DEF CON. Everyone who left the room ended up trapped in a giant crowd of people that seemed not to move just outside. Eventually one of the attendants for the event came by and yelled at us in frustration as we were all in the wrong place. We were waiting in the line to get into some other talk where the doors must have been closed instead of having been truly vomited into the vomitorium from which we could leave the auditorium. I pointed out that the line out of the other room led to where we were and this other, angry person said "Yeah, right" in retort prompting my "I'm not making it up." and then a "He's right." from another backing me up. I'm just realizing now, years later, that we had all been a victim of a prank. Some "hacker" just moved the rope lines around while the keynote talk was going on and we all became his victims. I wouldn't have written of it before, but now it deserves a nod.
Tuesday, July 3, 2018
Style classes specific to the elements where they might sit with CSS.
Given this...
<h1 class="foo">bar</h1>
<ul class="foo">
<li>baz</li>
<li>qux</li>
</ul>
If we want to make the h1 tag red and the copy at the unordered list green we may do so like so:
h1.foo {
color: #FF0000;
}
ul.foo {
color: #00FF00;
}
This is another something I learned from "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis. I thought it was strange that there was no space between the dot and the element tag beforehand at the CSS.
Ctrl-F does not behave as expected in the midst of an Outlook email.
This does a find most of the time in Windowsland, but if you want to search the contents of one of your emails and you try this Microsoft Outlook will treat it as an attempt to forward the email. A message will pop up with the "FW: " in the subject line, etc. Use F4 instead of Ctrl-F to do a search. Outside of a particular email when you are just looking at rows and rows of emails, Ctrl-F will forward whichever email is immediately in focus (highlighted) and F4 just does nothing. There is a search bar to use at the top of the list in these scenarios. Also note: The F4 trick works in an email you are reading not an email you are composing.
Monday, July 2, 2018
Angie's List
Find people who will work at your home doing Plumbing, Roofing, Heating & A/C, Electrical, Landscaping, Housecleaning, Remodeling, and Painting at Angie's List an online forum for as much with crowdsourced reviews for the sense of community thing.
Make a data table in an Angular 6 application with Angular Materials.
Today, following these instructions, I finally got my feet wet with Angular materials making a component's template look like so:
<div id="wrapper">
<mat-table class="lessons-table mat-elevation-z8" [dataSource]="presidents">
<ng-container matColumnDef="Name">
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
<mat-cell *matCellDef="let president">{{president.Name}}</mat-cell>
</ng-container>
<ng-container matColumnDef="Party">
<mat-header-cell *matHeaderCellDef>Party</mat-header-cell>
<mat-cell class="description-cell" *matCellDef="let president">{{president.Party}}
</mat-cell>
</ng-container>
<ng-container matColumnDef="HasNonconsecutiveTerms">
<mat-header-cell *matHeaderCellDef>HasNonconsecutiveTerms
</mat-header-cell>
<mat-cell class="duration-cell" *matCellDef="let president">
{{president.HasNonconsecutiveTerms}}</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
</div>
Back in the component's TypeScript. I had to have a variable like so:
displayedColumns = ["Name", "Party", "HasNonconsecutiveTerms"];
If you put a variable in a component in between the methods and you do not mark it as either public or private it will be public. However, in this case we could also make the variable explicitly private and private variables may be "seen" by the templates breaking in convention with for instance web forms where only a public variable may be accessed in the web form markup. Speaking of web forms the problem that Angular Materials tries to solve is a lot like the problem addressed by all of those canned controls for web forms. Why reinvent the wheel? Here are some simple controls for common to-dos. We need an import like this at our module and all of the types imported here also need to end up in the "imports" metadata property for the module.
import { MatInputModule, MatPaginatorModule, MatProgressSpinnerModule,
MatSortModule, MatTableModule } from "@angular/material";
I'm probably using the description-cell and duration-cell classes the wrong way in the markup. Ha!
The node_modules folder might as well be magick.
My superior at work told me a story of an author who penned an npm package who years later found himself facing some sort of naming conflict with another party. Maybe another was threatening a lawsuit or something. Anyhow, this author just decided to take his package offline and that ended up sabotaging numerous other (thousands) JavaScript applications with other npm packages now dependent on his miserable missing package even though the JavaScript applications themselves had no such immediate ties. (There was a degree of separation, but a dependency nonetheless.) Horrible! npm itself eventually started reoffering the removed thing in order to solve the problem. Roleplaying geeks may recall that in the first edition of White Wolf's "Mage: The Ascension" book back in the 1990s there is some emphasis on the distinction between magic and magick wherein magic implies stage magic and illusion while magick is actually reality shaking. SoundHound's ability to tell me what song is playing in the room I am in and Facebook's facial recognition software seem like magic to me. I don't know how the trick is done and therefore I am dazzled. However, another human being could just explain it to me in a whiteboarding session. I do my job without really understanding how RAM works too because I don't really have to. Somethings can just stay unexplored... like calculus dammit. Anyhow, it's a bit of a fudging to say that the node_modules folder's machinery is magick but it is quite different from something I just don't understand. If I were the richest man on Earth I still couldn't find a teacher that knows what is in the ever-changing ball of yarn and what is in there does actually have something to do with my job and my day-to-day. When Jennifer Granick referenced Frank Pasquale's book "The Black Box Society" here, I think I now know what she was talking about. What to do about the problem? Nothing. If you go back in time to when Microsoft had control of everything and you wondered if Bill Gates could just turn the world off in retaliation if the government attempted to invade his Redmond, Washington headquarters, you will recall how everyone badmouthed Microsoft. Now Microsoft isn't what it was and our own government is spying on us instead of Microsoft and there are other switcheroos too like the rise of the ironically opaque Google which is all about helping you find stuff (don't expect to speak to a human in tech support and expect a bit of a wait while they try to get rid of a dead body at the maps) and the rise of open source orchestrations that can be so very, very bad. Even as Microsoft collaborates with Google and the community on Angular it unfortunately has to collaborate with Google and the community and its old "we are doing things our way dammit" sledgehammer is gone. We all wanted this, and now we have it. It's magick!
SAFe
The Scaled Agile Framework with the mantra of "You can't scale crappy code." is another way to do Agile in our modern wishy-washy ways now that there are no Agile or eXtreme programming purists anymore.
Sunday, July 1, 2018
If you want to help the poor don't give to a charity. Eat your meals in restaurants and tip well.
Charities are notorious for the amount of waste. It can be that for every dollar you give to a charity that only a penny goes to the people in need after your dollar filters through all of the overhead costs for the charity's infrastructure. You only feel good about yourself for giving to a charity because you don't feel bad about yourself for being a sucker because you can't see it. The waste that happens after your throw a wad of cash over the wall is out of sight. In contrast you have probably worked in a restaurant at some point when you were down on your luck and you know that there is no waste there. Restaurants run notoriously lean ships, heavily completing on price, without room for slack and extravagance given that it is a low margin business. They don't even pay their employees properly and instead rely on the societal convention of tipping to fill in the difference. They can't just add a dollar to the prices of everything on the menu and introduce a fat factor as they have to complete with all of the other restaurants in an unsparing slugfest of capitalism that has no counterpart in the world of charities. The service worker is the face of the modern poor in America. Everyone who is working in a restaurant has the challenge upon them to somehow get out. Some of us make peace with it and stay because we don't see a way out. Others amongst us stay without making any peace at all. We are just stuck there. More common is an all too long five year stint in the restaurant life while you are trying to get through college or something. You will find that years on end in limbo on your feet everyday as a fate befalling quite a few of us. The people in restaurants may likely have addiction issues to keep them sane (and unfortunately keep them where they are in life) but these individuals should not be seen as akin to the stereotype of the drunk homeless bum who just doesn’t want to work. These individuals are working their asses off. Everyone knows it. Give your spare money to them, not the drunk homeless bum who just doesn't want to work or some parasitic charity. Tip five dollars on top of a seventeen dollar meal at the Olive Garden. This is how you can help average Joe. The money you give won't be wasted frivolously. Restaurant workers don't have some extra cash to just blow on manicures and massages. Maybe they'll own a dog and you'll end up paying for some dog food. That's the extent of the waste. It could be that a single mom has a child instead of the dog. Then there is no waste at all.