Using CSS to affect div style inside iframe

You need JavaScript. It is the same as doing it in the parent page, except you must prefix your JavaScript command with the name of the iframe. Remember, the same origin policy applies, so you can only do this to an iframe element which is coming from your own server. I use the Prototype framework … Read more

What is InputStream & Output Stream? Why and when do we use them?

The goal of InputStream and OutputStream is to abstract different ways to input and output: whether the stream is a file, a web page, or the screen shouldn’t matter. All that matters is that you receive information from the stream (or send information into that stream.) InputStream is used for many things that you read … Read more

.NET Core vs Mono

Necromancing. Providing an actual answer. What is the difference between .Net Core and Mono? .NET Core now officially is the future of .NET. It started for most part with a re-write of the ASP.NET MVC framework and console applications, which of course includes server applications. (Since it’s Turing-complete and supports interop with C dlls, you … Read more

What does the constant 0.0039215689 represent?

0.0039215689 is approximately equal to 1/255. Seeing that this is OpenGL, performance is probably important. So it’s probably safe to guess that this was done for performance reasons. Multiplying by the reciprocal is faster than repeatedly dividing by 255. Side Note: If you’re wondering why such a micro-optimization isn’t left to the compiler, it’s because … Read more

What are all the user accounts for IIS/ASP.NET and how do they differ?

This is a very good question and sadly many developers don’t ask enough questions about IIS/ASP.NET security in the context of being a web developer and setting up IIS. So here goes…. To cover the identities listed: IIS_IUSRS: This is analogous to the old IIS6 IIS_WPG group. It’s a built-in group with it’s security configured … Read more

SELECT DISTINCT on one column

Assuming that you’re on SQL Server 2005 or greater, you can use a CTE with ROW_NUMBER(): SELECT * FROM (SELECT ID, SKU, Product, ROW_NUMBER() OVER (PARTITION BY PRODUCT ORDER BY ID) AS RowNumber FROM MyTable WHERE SKU LIKE ‘FOO%’) AS a WHERE a.RowNumber = 1

How do you reference a capture group with regex find and replace in Visual Studio 2012, 2013, 2015, and VS Code

To find and replace in VS 2012 and VS 2015 you do the following: Surround with (), display capture with $1, $2, $n Example (thanks to syonip) In the find options, make sure ‘use regular expressions’ is checked, and put the following as the text to find: _platformActions.InstallApp\((.+)\) And the following as the text to … Read more

Block employee access to public cloud

You basically have three options here. 1. Disconnect your office/users from the internet If they can’t get to “the public cloud,” they can’t upload anything to it. 2. Compile a blacklist of specific services you’re worried about users accessing. This is going to be absolutely massive if it’s meant to be even remotely effective. Tech-savvy … Read more