Categories
Mastering Development Software

Is it ok to Inject a whole object instead of only the dependencies

I’m working with the Dependency Injection Pattern in Unity3D (an engine which uses MonoBehavior, a class that doesn’t have a constructor, as the base class for all of its game components), and I ended up building my own solution for it. I don’t think that, aside from having to write some boilerplate, it’s an anti […]

Categories
User Help

File-based backup of encrypted Linux systems?

I learned that tools such as clonezilla cannot omit free blocks when the disk is encrypted, which is a huge problem, since the backup drive always needs to have at least the same size as the source drive – even if the latter contains mostly free space! This is impractical and not how backups should […]

Categories
Mastering Development

Yup – array with two elements deep elevation

I’m having an array, where I need to ensure that one element has property of somethings the other a property of something else. Somethings like: users: [ { name: ‘Some name’, role: ‘admin’, }, { name: ‘Some other other name’, role: ‘deputy’, } ] Now, I want to make sure that I always have a […]

Categories
Mastering Development

Json_Normalize, targeting nested columns within a specific column?

I’m working with an API trying to currently pull data out of it. The challenge I’m having is that the majority of the columns are straight forward and not nested, with the exception of a CustomFields column which has all the various custom fields used located in a list per record. Using json_normalize is there […]

Categories
Mastering Development

Python regex capture various url pattern groups

I have dataset containing the string like this and I want to remove the all the urls from the it http://google.com having trouble finding regex https://google.com for this case http // google com / test some gibberish https // google . com / test / test1 great http.//google.org Now, I am using this regex pattern […]

Categories
User Help

Set default browser window

I have a multi monitor set up on a MacBook. My typical setup is: Monitor 1: Slack Browser window open to email Monitor 2: IDE Terminal Monitor 3: Browser Now thing is – when I run commands in terminal or click links in the IDE that will open a browser tab, I want them to […]

Categories
Ask Games Video Games

To what extent is Tetris (on Game Boy) a game of luck?

I’ve been playing the original Tetris port for the original Game Boy, on the very same original Game Boy, on and off, for the last 30 years. Lately, I’ve been playing daily, in the bathroom, and have started to come to a disturbing realization: The game, while insanely addictive and challenging from a “finger dexterity” […]

Categories
Mastering Development Software

Multiple HttpClients in .NET Core Console Application

I’m building a .NET Core class library wrapper for a REST API that, ideally, could be used in both console applications and ASP.NET Core web applications. So far, I’ve based development on supporting dependency injection for the latter by creating a typed client for each group of REST API methods, i.e. one client for each […]

Categories
Game Creation Mastering Development

How do I render to a resizable window from a large fixed size back buffer in current graphics APIs?

I have some code that uses DirectX 9 with Windows native window management, that I would like to port to newer graphics APIs, but this code has a fairly unusual approach to window resizing, and it doesn’t seem obvious how to achieve the same things with newer graphics APIs. The code I want to port […]

Categories
Mastering Development

Upgrading PHP (<5.3.2) passwords generated using invalid CRYPT_STD_DES salt

Long story short, I’ve got some passwords that were improperly salted and hashed in a version of PHP that allowed the crypt() function to fall back to the CRYPT_STD_DES algorithm if the salt was invalid. However in PHP 5.3.2+: 5.3.2 Fixed Blowfish behaviour on invalid rounds to return “failure” string (“*0” or “*1”), instead of […]