In graphics applications, it is occasionally necessary to perform the same operation on a large number of files. Instead of performing the operations manually in Photoshop, the computer can often be used to automatically do the work through batch scripting. By leveraging a command-line program called ImageMagick, most batch photo operations can be scripted for automated processing.
Continue reading
All posts by Andrew Palczewski
How Correlated Subqueries Work
As the workhorse of data analytics and reporting, the SQL language enables both users and developers slice-and-dice a database for desired information. With a natural-language-based syntax, SQL is relatively easy for business analysts to learn for basic database analysis. As analysts become more comfortable with the language, however, they may require more advanced techniques, such as aggregates on subsets of data within a query. In these situations, correlated subqueries can bring new capability and virtually unlimited depth to a SQL statement.
Continue reading
An Overview of Augmented Reality
Augmented reality offers many exciting applications and the potential to change the way we interact with machines. Throughout industries as diverse as gaming, healthcare, education, search, and advertising, augmented reality is poised to create breakthroughs in human-computer interaction (HCI) over the next five to ten years.
Continue reading
jVectorMap – Creating Custom JavaScript Maps
Based on the jQuery framework, jVectorMap provides a convenient top-level map plugin for websites. Although the plugin doesn’t have the full flexibility of Google Maps, it does provide a way to link countries or states to user interface actions. With a wide suite of available maps, the ready-built package can suffice for most purposes. On more advanced websites, however, it is sometimes necessary to create custom maps for additional geographic regions.
Continue reading
C# DirectX – Capturing Frame Screenshots
Screen capture in DirectX is an inconspicuous element of the rendering pipeline that can provide many auxiliary benefits to 3D applications. Through creative use of the screen capture functionality, the operation can be extended to not just video creation, but also multi-stage graphics and post-processing. At its core is the code that enables capture of the current frame in the rendering process.
When programming screenshots, the most important element is placing the code at the correct point in the render loop. A poorly integrated screenshot function can cause instability and system crashes in the 3D application due to race conditions or memory overwrite.
Continue reading
Debugging .NET Memory Leaks with ANTS Memory Profiler
Memory leaks in .NET can be a challenging problem to both identify and solve. While C and C++ programs make memory management a constant concern during development, C# touts its garbage collector as the end to memory management and an easier way to program. Unfortunately, there are times when the C# garbage collector does not work as expected, resulting in applications that randomly crash after extended use.
Continue reading
Automatic Solution Packaging with the C# Preprocessor
The C# preprocessor, although much less powerful than the C or C++ preprocessors, still provides the ability to enable or disable lines of code based on project-level flags. In addition, when combined with external PowerShell scripts, the C# preprocessor can be used to automatically spin custom C# solutions with subsets of the target code. This can be particularly useful when providing two versions of the source code, for instance a 32-bit and 64-bit version, or when creating custom source code adaptations for different applications.
Continue reading
Multi-line Regular Expression Replace in Powershell
Windows Powershell offers advanced command-line scripting, bringing the .Net framework to traditional batch files. One of its primary drawbacks, however, is the scarcity of good documentation available for the language. The regular expression engine, while powerful, has a custom, often undocumented syntax for advanced operations such as multi-line search and replace.
Multi-line regular expressions are particularly useful when parsing HTML or XML documents. Since XML elements can contain multiple lines between their opening and closing tags, a more flexible engine is required when parsing and altering these documents.
Continue reading
Dynamically Installing .NET Prerequisites
While .NET ClickOnce applications offer simple tools for publishing applications and automatically handling dependencies, there are occasionally hiccups in the dependency management. Instead of automatically installing all dependencies in one run, for example, the program might require several attempted runs to install the prerequisites one-by-one. At other times, the prerequisites might not be properly packaged with the application, or require a custom installer to run. In these situations, manually handling the prerequisite management can offer ease-of-use and more control over deployment.
Continue reading
C# DirectX – Automatic Graphics Card Fallback
When developing 3D graphics applications, one of the recurrent challenges that plagues developers is balancing great graphics with end-user compatibility and reach. The more complex the graphics techniques utilized by the application, the fewer end-users will be able to actually run the software. With the explosion of mobile technology on slow and low-power hardware, 3D graphics are even further limited than they were years before.
In order to achieve a compromise between compatibility and graphics quality, a technique called Shader Fallback enables developers to switch to lower-quality graphics when necessary. This enables users with high-powered PCs to run the software at its maximum specifications, while simultaneously providing users on slim hardware with functional access the content and interface of the application.
Continue reading