Skip to content

Instantly share code, notes, and snippets.

' from https://vba-corner.livejournal.com/4623.html
'Before you can do anything with the Internet Explorer, of course you'll need one, and you'll need something to address it. The following function achieves exactly this by creating a new instance of the Internet Explorer and returning a pointer to it.
'returns new instance of Internet Explorer
Function GetNewIE() As SHDocVw.InternetExplorer
'create new IE instance
Set GetNewIE = New SHDocVw.InternetExplorer
'start with a blank page
GetNewIE.Navigate2 "about:Blank"
End Function
@chilismaug
chilismaug / vba-update-cookbook.md
Last active May 21, 2019 13:53
Subzero-win10-VBA-update-cookbook

Main Goals

Always add

Option Explicit

Make sure to use the May 8 version of SubZero with a GetCentralLogFilePath function that trims the extra quotes from the variant string value when fetching Central Log Path

 gstrLogPath
@chilismaug
chilismaug / frmReadXML.frm
Created May 24, 2019 18:36
vb easy steps p152 - Reading XML files - done in Excel VBA
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} frmReadXML
Caption = "Read XML Data"
ClientHeight = 4920
ClientLeft = 120
ClientTop = 465
ClientWidth = 9165
OleObjectBlob = "frmReadXML.frx":0000
StartUpPosition = 1 'CenterOwner
End
@chilismaug
chilismaug / Howmanycolumns.sql
Last active October 2, 2019 14:45
Horrible T-SQL hack to count columns without asking the system tables
-- how many columns in my table?
-- have to count null elements too
DECLARE @rowString AS VARCHAR(MAX)
DECLARE @StringToCount1 AS VARCHAR(100) = '</'
DECLARE @StringToCount2 AS VARCHAR(100) = '/>'
DECLARE @StringCount AS INT
DECLARE @ColCount AS INT
SELECT @rowString = (SELECT TOP 1 * FROM PE_CS_CUBE ORDER BY LASTUPDATED DESC FOR XML PATH, ELEMENTS XSINIL )
SET @StringCount = (LEN(@rowString) - LEN(REPLACE(@rowString, @StringToCount1,'')))/COALESCE(NULLIF(LEN(@StringToCount1), 0), 1)
+ (LEN(@rowString) - LEN(REPLACE(@rowString, @StringToCount2,'')))/COALESCE(NULLIF(LEN(@StringToCount2), 0), 1)
@chilismaug
chilismaug / predicates-terms-propositions.md
Last active November 4, 2019 17:01
Categorical Proposition Notes for SQL Study

Categorical Propositions for SQL Study

Name IS-A HAS-A CAN-BE-A WHADEY Heckin' Deal???
Proposition Assertion Predicate A proposition is the contents of an assertion which can be true or false. One of two propositions contains a term called a predicate that can be used to support the conclusion of a syllogism. Sep 9, 2016 https://philosophy.stackexchange.com If all of a predicate' s variables are bound, the resulting formula is a proposition. (WikiDiff) an instance of a ' predicate whose terms are all constant — e.g., P(2,3) — acts as a proposition.
Assertion Predicate True result; Affirmation Proposition assertion is (computing) a statement in a program asserting a condition expected to be true at a particular point. https://wikidiff.com/predicate/assertion
Predicate E
@chilismaug
chilismaug / StubServer-OpenWeather.py
Last active January 18, 2021 00:05 — forked from 0atman/static-json.py
Simple flask-restful GET json stub with a "current weather" OpenWeather response doc
from flask import Flask
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class SimpleRest(Resource):
def get(self):
return {

AZ-900 KRAMFEST TOPICS.

  • Contoso needs to protect their Internet-facing web apps from common attacks. Which Azure service(s) offers out-of-box implementation of Open Web Application Security Project (OWASP) vulnerability rule sets? Choose all that apply?

See "Azure Web Application Firewall (WAF) on Azure Application Gateway" at https://docs.microsoft.com/en-us/azure/web-application-firewall/ag/ag-overview and "Azure Front Door" at https://docs.microsoft.com/en-us/azure/frontdoor/front-door-application-security [Describe Security, Privacy, Compliance, and Trust]

MS docs: There are two options when applying WAF policies in Azure. WAF with Azure Front Door is a globally distributed, edge security solution. WAF with Application Gateway is a regional, dedicated solution. Uhhh.. ...does that mean Front Door is more expensive?


@chilismaug
chilismaug / Tableau DS Cert Topics Kramlist.md.md
Last active February 22, 2021 01:27
Tableau DS Cert Topics Kramlist.md
@chilismaug
chilismaug / JSONHierarchy_test.sql
Last active September 16, 2021 14:49
Phil Factor's Hiearchy Table function example - for making JSON via XML with T-SQL before MSSS2016
create TABLE #hierarchy
(
element_id INT IDENTITY(1, 1) NOT NULL, /* internal surrogate primary key gives the order of parsing and the list order */
parent_ID INT,/* if the element has a parent then it is in this column. The document is the ultimate parent, so you can get the structure from recursing from the document */
Object_ID INT,/* each list or object has an object id. This ties all elements to a parent. Lists are treated as objects here */
NAME NVARCHAR(2000),/* the name of the object */
StringValue NVARCHAR(MAX) NOT NULL,/*the string representation of the value of the element. */
ValueType VARCHAR(10) NOT null /* the declared type of the value represented as a string in StringValue*/
)