tag:blogger.com,1999:blog-280097032024-03-18T05:45:10.916-04:00Software Development, Programming, Technology : News and Extra InsightTechniques, How-To Guides, Bug-Fixes, Product Reviews, News and Trends — focused on Software Development, Programming, Technology with SQL Server, Delphi, Nvidia CUDA, VMware, Dart Language, JavaScript, SVG, and more. Plus, stimulating discussion — economy, stock market, investing, finance, politics, environment, energy, and other far flung ideas for improving the world.Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.comBlogger219125tag:blogger.com,1999:blog-28009703.post-74730148805793461052020-06-24T10:58:00.002-04:002022-12-24T17:45:59.491-05:00SVG JS/ES Asteroids Video Game for Modern Chrome BrowserBrowser-Based Asteroids-clone Video GameUsing 2020 JavaScript features available in Chrome browserEarlier this year, during the beginning of the major social-distancing requirements (due to COVID), I finally decided to spend a few weeks of my free time writing a video-game clone that would make use of some of the newest features of JS / ECMAScript. I ended up writing a clone of the Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-38287369134538091562019-11-15T07:08:00.001-05:002019-11-15T07:08:41.509-05:00SunPlower Wind / Solar Energy Device HYPE (from Web Summit 2019)
SunPlower Wind / Solar Energy Device
ABUNDANT CLAIMS of Supposed Energy-Harvest Market Disruption Tech
For any of my readers that have a decent background in mathematics, engineering, physics, and a general inclination towards science and the reality of how things work, as soon as you read the claims made on the SunPlower.de website (yes, that is how they spell it; apparently trying to gain Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-66372805219266404042017-03-04T11:48:00.000-05:002017-03-04T11:48:17.111-05:00How to Fix: Microsoft Print to PDF (or Microsoft XPS Document Writer) Printer Not Working
How to Fix: Microsoft Print to PDF and Microsoft XPS Document Writer Printer Not Producing Output File
Symptoms: Print to PDF or Print-to-XPS Fails Silently, with no PDF File Created or no XPS File Created, in Microsoft Windows or Microsoft Office
This Microsoft Windows and/or Microsoft Office bug (or Windows "Feature") drove me crazy for a bit of time — when I wanted to print a document or Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-35104855682546343952017-02-14T15:29:00.001-05:002017-02-16T07:28:45.624-05:00Forex : Currency Trading : Understanding Exchange-Rate Fluctuations and the Magnitude of Gain/Loss on your Positions
Currency Trading Basics : Understanding the Exposure Implications related to Exchange-Rate Fluctuations
NOTE: see below for my handy Visual Aid, the Quick-Reference Diagram: Currency-Move (Exchange-Rate Fluctuations) and the Implied Magnitude of potential Gain / Loss (impact on your portfolio) depending on Exchange-Rate Changes and your current Position Size. Also, if using Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-28867301137926010382017-01-22T13:14:00.001-05:002017-01-22T13:31:23.830-05:00ES2015 (modern JavaScript) Implementation of Delphi's TList VCL Class with Multi-Field Sort Algorigthm and more
ES2015 Source Code: Class — JavaScript implementation of Delphi VCL TList Class including flexible multi-property List-Sort algorithm and more
Just for fun, I created this ECMAScript 2015 (i.e., ES2015 or modern object-oriented JavaScript) version of a Borland / Embarcadero Delphi TList VCL Class equivalent (or, at least partial equivalent) to demonstrate one approach to Object Oriented Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-60846205209199442332017-01-22T06:19:00.001-05:002017-01-22T06:19:29.732-05:00Delphi VCL TMemo Class-Helper: Calculate SelStart when WordWrap is enabled
DELPHI Source Code — Class Enhancement: VCL TMemo Class Helper : Calculate SelStart in Memos where WordWrap is True (adjusts for "soft carriage returns")
The Delphi VCL TMemo controls are very useful for multi-line text input, as they support embedded "hard" carriage-returns / line-feeds (CR / LF), but they also support "soft" carriage returns via the WordWrap = True property value. When Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-77487164556628146002017-01-21T10:02:00.003-05:002017-01-21T10:02:50.351-05:00Delphi Source Code to Convert between TColor and RGB Color in String Format
DELPHI Source Code — Function:
Convert between TColor and RGB Color (as String representation)
Here is the code for a pair of useful Delphi functions for converting and moving color values between Delphi TColor (object / class) type and string representations of an RGB Color value (with or without leading # character).
If you use Delphi to output HTML code or CSS code that includes RGB color Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-16412145634807222482017-01-21T06:52:00.004-05:002017-01-21T06:52:47.193-05:00DELPHI Source Code Function: GetAlternateColor, alternating row color, Color-Shifting algorithm
DELPHI Source Code — Function:
GetAlternateColor Color-Shifting for alternating grid-row color
If you ever wanted to create a (Borland, CodeGear, Embarcadero) Delphi grid, or other control, with alternating row-colors / highlight-colors, the first thing you will need is a function with an algorithm that helps automate the determination of the alternate-row-color, based on a given TColor value, Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-75176863856598994542017-01-21T06:52:00.003-05:002017-01-21T06:52:41.948-05:00Delphi Source Code: DBGrids.pas enhancement for automatic alternating grid row colors / highlights
DELPHI Class Enhancement:
DBGrids.pas Delphi source-code modification to implement alternating grid row colors
NOTE: This Delphi DBGrids.pas source code modification makes use of my GetAlternateColor Delphi function (source code here) for alternating grid-row-colors calculations. See comments within this Delphi source code (below) for where to insert that function (search for "GetAlternateColor"Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-85377908364011008602017-01-20T07:18:00.002-05:002017-01-20T07:18:22.079-05:00SQL-Server Procedure for Parameterized GROUP BY Without Using Dynamic-SQL
SQL SERVER Procedure:
Parameterized GROUP BY Without Using Dynamic-SQL : the "impossible" is possible.
NOTE: This procedure and source code builds upon my previous parameterized ORDER BY without using Dynamic-SQL examples:
SQL SERVER Stored Procedure (SP): Parameterized ORDER BY without Dynamic-SQL - Example 1
SQL SERVER Stored Procedure (SP): Parameterized ORDER BY without Dynamic-SQL - Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-81703162232759428682017-01-20T06:45:00.000-05:002017-01-20T06:45:25.847-05:00Transact-SQL: Set-Based SQL Technique for Running-List of Accumulated Values (String/Number), with Break-Level Resets
MS SQL Server: Algorithm and Query for Set-Based Running Accumulators (i.e., Accumulate Row-Level Values across multiple Rows) into a String of Delimited-values, with Break-Level Resets
Have you ever wanted to perform a set-based running-subtotal operation or running-accumulation-of-values (across multiple rows) in SQL-Server — i.e., have row-level accumulators store a running total or running Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-64898241908019686802017-01-19T07:19:00.002-05:002017-01-19T07:19:45.202-05:00SQL-Server Set-Based Moving Averages with Break-Level Accumulator-Resets. No Cursors, Self-Joins, or Subselects used.
Microsoft SQL-Server Query / Procedure: Set-Based Moving Averages (without Cursors, self-joins, or sub-selects) — Example 2, with break-level average-resetting abilities
This blog builds on my prior entry where I provided the source code for a Microsoft SQL-Server Transact-SQL (T-SQL) query example (easily adapted to a stored procedure) that demonstrates an innovative way of efficiently Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-82681625036561074832017-01-19T07:00:00.000-05:002017-01-19T07:20:56.129-05:00SQL-Server Set-Based Moving Averages without Cursors, Self-Joins, or Subselects
Microsoft SQL-Server Query / Procedure: Set-Based Moving Averages (without Cursors, self-joins, or sub-selects) — Example 1, with comparison to APPLY and OVER
In this blog, I provide the source code for a Microsoft SQL-Server Transact-SQL (T-SQL) query example (easily adapted to a stored procedure) that demonstrates an innovative way of efficiently calculating moving-averages, with variable Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-38348609600022472542017-01-18T07:57:00.001-05:002017-01-18T07:57:35.114-05:00SQL-Server Function to get Sum of Integer / Money values in a String
SQL Server User Defined Function (UDF) — Get sum of Integer or Money values in a String
Here are two Microsoft SQL-Server Transact-SQL (T-SQL) user-defined functions (UDF) that scan a Varchar (String) that is composed of a sequence of fixed-length Integer (INT, SMALLINT, BIGINT) or MONEY values and sum up those values as the BIGINT or MONEY return-value of each function, respectively.
Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-45421456625287974692017-01-17T12:51:00.000-05:002017-01-17T12:51:31.886-05:00MS SQL-Server Function: Parse / Split string of delimited Strings into Table
SQL SERVER Source Code — User Defined Function (UDF): Parse / Split string of delimited Strings into Table (as Rows)
A Microsoft SQL-Server Transact-SQL (T-SQL) user-defined function (UDF) that is an incredibly useful function for splitting a single string that contains sub-strings of delimited string values into a table result (with each substring becoming a table row value in a returned table)Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-49782920601388981342017-01-16T07:02:00.000-05:002017-01-16T07:47:30.018-05:00Helpful DBA / Management Procedures / Queries for Microsoft SQL-Server
SQL Server Procedures to make DBA tasks easier and improve database quality
In this Microsoft SQL-Server related blog, I have included the source code for a few procedures that I have used to help make some common database administration / management a bit easier. Certain DBA tasks are simpler when you have these procedures that can produce a quick report to:
List all database tables Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-23671193221109471222017-01-15T12:23:00.001-05:002017-01-15T12:23:09.501-05:00SQL-Server T-SQL UDF: Encode / Decode Decimal Numbers to/from ANY Number Base (Hexadecimal, Binary, Alpha, etc)
SQL Server Source Code for UDF (User Defined Function) to
Convert From/To (Between) Decimal, Hexadecimal, Binary, Alphanumeric or ANY Number Base
Below, I have provided the source code for two Transact-SQL User Defined Functions that work together to convert (i.e., encode / decode) between base-10 (i.e., Decimal or radix-10) and any other radix, whether hexadecimal or binary or some random Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-5243681474916142902017-01-14T13:05:00.000-05:002017-01-14T13:05:02.012-05:00SQL SERVER Helpful Functions (UDF) for data conversion, padding, parsing, comparison, formatting, etc.
SQL Server User Defined Functions (UDF) for common data-conversion, parsing, comparing and formatting requirements
Throughout the much more substantial SQL-Server source-code examples that I have provided on this blog, you will see used, at various times, certain User Defined Functions (UDFs) and Stored Procedures (SPs) which make the code simpler than in-lining the same functionality. For Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-35517767383601924632017-01-14T09:03:00.001-05:002017-01-14T09:03:05.187-05:00SQL SERVER Stored Procedure (SP): Parameterized ORDER BY without Dynamic-SQL - Example 2 - with ASC/DESC by Column abilities
SQL Server Stored-Procedure performing a parameterized ORDER BY operation, including ASC/DESC Sort options, without using Dynamic-SQL
NOTE: This extends the previous parameterized ORDER BY without using Dynamic-SQL example. An extension of the previous technique, this version allows for column-level ascending/descending preferences for sort direction. A very common requirement, and GUI paradigm,Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-5206971187710868272017-01-14T09:03:00.000-05:002017-01-14T09:03:00.772-05:00SQL SERVER Stored Procedure (SP): Parameterized ORDER BY without Dynamic-SQL - Example 1
SQL Server Stored-Procedure performing a parameterized ORDER BY operation without using Dynamic-SQL
The Microsoft SQL-Server Transact-SQL (T-SQL) stored procedure (SP) or query presented here can accomplish an interesting task: performing a parameterized ORDER BY without using Dynamic-SQL to do so. This method builds on some other examples I have provided demonstrating various SET-BASED Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-64971244876930482122016-09-26T06:45:00.003-04:002016-09-26T06:45:56.249-04:00Tuning Very Large SQL-Server Databases - Part 3 (Index Optimization - Clustered / Non-Clustered)This is the third in a series of three SQL-Server best practice tuning guides to help you achieve optimal performance, speed, and efficiency from your Very Large SQL-Server Databases. Although these techniques will apply to Microsoft SQL Server, they will generally also apply to other relational database systems (RDMBS) like MySQL, Oracle, DB2, Postgres and others.
The series nowMike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-15219900320892333482016-09-25T07:20:00.001-04:002016-09-26T06:47:36.327-04:00Tuning Very Large SQL-Server Databases - Part 2 (Physical Storage Optimization - Continued)This is the second in a series of three SQL-Server best practice tuning guides to help you achieve optimal performance, speed, and efficiency from your Very Large SQL-Server Databases. Although these techniques will apply to Microsoft SQL Server, they will generally also apply to other relational database systems (RDMBS) like MySQL, Oracle, DB2, Postgres and others.
The series Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-11517945519866172932016-09-24T08:42:00.000-04:002016-09-25T07:20:54.761-04:00Tuning Very Large SQL-Server Databases - Part 1 (Physical Storage Optimization)This is the first in a series of three SQL-Server best practice tuning guides to help you achieve optimal performance, speed, and efficiency from your Very Large SQL-Server Databases. Although these techniques will apply to Microsoft SQL Server, they will generally also apply to other relational database systems (RDMBS) like MySQL, Oracle, DB2, Postgres and others.
The series begins Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-42888989296827148222016-09-23T07:29:00.000-04:002016-09-23T07:29:16.019-04:00SQL SERVER Function (UDF) to Parse / Split string of delimited Integers into Table
SQL Server UDF to Parse / Split string of delimited Integers into Table
Here is an incredibly useful Microsoft SQL-Server Transact-SQL (T-SQL) user-defined function (UDF) for splitting a string of delimited integer values into a table result.
This is very handy if you have a list of integer index or primary-key values that you want to retrieve results from a table for. Just pass a concatenated Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0tag:blogger.com,1999:blog-28009703.post-84246811165455060242016-09-21T06:55:00.000-04:002016-09-21T06:55:41.704-04:00SQL-Server Set-Based Running Subtotals (i.e., Row-Level Accumulators) Example 2 - Multiple Simultaneous Running-Totals
SET-BASED Multiple Simultaneous Running Subtotals in SQL
Have you ever wanted to perform a set-based running-subtotals and/or running-totals operation in SQL-Server (i.e., have row-level accumulators store a running total or running subtotal?) Want the solution to not use cursors? Don't have access to SQL-Server 2012 or newer yet?
Here I present a cursorless method of implementing such Mike Eberharthttp://www.blogger.com/profile/16410014970702142362noreply@blogger.com0