Keith

I was working on a cool project I am doing in Python and I needed a way to do this without recursion because this would limit the size it could be by limiting the amount of times the loop could go through it (max recursion depth) so the function could work on a nest dictionary of any size. How can I...

I'm creating a PDF file from XML using Apache FO. When I run an accessibility check on this file using Acrobat Reader Pro DC (version 2019.010.20098) the report indicates 'Title - Failed'.
When I look at the document's metadata in Acrobat (File --> Properties --> Description tab) I can see that the...

I store data in Azure Storage tables and blob storage. I would like to automatically backup my data to protect against accidental data corruption by users or by a software issue. There isn't a good solution for this from Microsoft and, while there are paid solutions for automatic backups, it seems...

I am trying to do something simple and trivial - or at least I thought.
I am trying to write a base class that can be inherited by each micro-service project I spin up. The point of this base class is to test connectivity from HTTP all the way through to SQL. It is NOT enabled in PROD.
This is one...

I have a table of data and want to count how many times a string shows in a range, so I'm doing =COUNTIF(C2:R100,'APPLE') and that counts how many times 'APPLE' shows up in the range C2 through R100. That works great.
However, I have another column X that has percentages for each row and I want to o...

I have a form with a hidden input in my MVC application whose value I want read by Knockout. Unfortunately the observable function in Knockout REPLACES the original value in the DOM with whatever value is specified within the parenthesis so that
self.title = ko.observable()
changes the value of th...

I have an IIS/MVC.Net application that has recorded thousands of action-not-found exceptions. When I investigated these it appears that they are all HTTP OPTIONS requests to an MVC action that only supports GET.
This action allows caching and returns minified CSS or JS content. Within the applicatio...

I'm trying to populate a checkbox ACF field with the various post types of a WP site. This is for a plugin, so the post types will vary based on the location of install.
By default, the plugin uses pages and posts as it's post types, but need to give user option to use checkboxes to select other CPT...

WPF-MVVM beginner here.
My problem: in a WPF-MVVM UI I am editing an entity. Some properties when changed, require automatic updates on other properties. These are done in Entity class, set methods, but not reflected in my View
More details:
1) I have the Model (a simple class with properties) in a...

I've made a powershell script which will take in a delimited batch of VM IP addresses and take snapshots of each VM.
My issue is I am calling Get-VM every time for every VM, which obviously is very slow. I'm wondering if anyone can see another way to perform the same action without having to call th...

Say I have this enum:
public enum MyEnum{
ValueOne = 1,
ValueTwo = 2,
ValueThree = 3
}
And then this field/variable:
public MyEnum myEnumInstance = MyEnum.ValueTwo;
I need to get the name of myEnumInstance via reflection from another class.
I tried:
myClassInstance.GetType().GetField('myEnumInstance...

I can't seem to get this to work. I started here how to use Linq to get a sitecore field but have stalled. I'm trying to exclude certain pages/templates. Here is what I have:
var query = PredicateBuilder.True();
query = query.And(i => i.Paths.Contains(homeItem.ID));
query = query.And(i => i.Content....

I configure my TeamCity build agents (Windows Server 2012 VMs) using Chef, and I have a need to install Xamarin for an Visual Studio/Android build. For other installers I usually play around with invoking it with /h, /help, /?, -?, -h and --help until I get a usage dialog that tells me the command-l...

I'm working out how to fix an issue with an Azure Worker Role.
Given
LogManager.GetCurrentClassLogger().Info('In index {0}', item); // in the source
Where am I likely to find that logged in a Azure Worker Role Cloud Service VM that I can log into with Remote Desktop?

This has happened to me on multiple occassions now and I was hoping someone could provide some insight into the the following error:
Errno::EEXIST at /
File exists @ dir_s_mkdir - tmp/cache/assets/sprockets/v3.0/Pd
Here's the associated stack trace:
Errno::EEXIST - File exists @ dir_s_mkdir - /home...

I have this div which includes an anchor tag that loads a php script that essentially adds information to a database and returns back to this page. I want to use this achor tag to run that php script update the database and refresh this div without reloading the page. The php script need those two...

So I was getting the error below because I was trying to access the :id key. No surprise here. However, my actual question is why is the user placed inside the :session key? Is this Plug specific? I don't remember setting user to the key :session as you can see in the view below.
Error:
** (KeyError...

The packages restore fine on the developer PC and using Visual Studio on the build server. When performing an automated build using TFS, however, many of the packages fail with a messages like these:
WARNING: Unable to find version '5.0.4' of package 'Newtonsoft.Json'.
WARNING: Unable to find versio...

Updated to macOS 10.12 and Xcode 8 and can not build to app store. No changes other then Xcode 8 and macOS update. I am using SDK 5.5.0.GA.
--
[ERROR] : Error details: Bundle identifier is missing. MySlomins doesn't have a bundle identifier for the Release build configuration. Add a value for PRO...

How can I find a string in my database if the database contains the needle?
For example I have the string:
'www.example.com/test'
My database column urlColumn contains:
'www.example.com'
If I do the following (pseudo):
SELECT * FROM db WHERE urlColumn LIKE '%www.example.com/test%'
I don't get a resu...

I've been asked to swap over from urllib2 to the requests library because the library is simpler to use and doesn't cause exceptions.
I can get the HTTP error code with response.status_code but I don't see a way to get the error message for that code. Normally, I wouldn't care, but I'm testing an AP...

Suppose I have the following markdown code, test.md:
This is a footnote mark.^[Which I would like to show up having brackets]
Using the following command, I then generate HTML:
$ pandoc --ascii test.md -o test.html
which gives me the following HTML:
This is a footnote mark.1
Which I would like to sh...

I have dumped a index.html file on my root folder (also on AWS S3 englify bucket) and am trying to load images onto the webpage from the images folder. My CORS configurations has been set to:
englify.s3-website-ap-southeast-1.amazonaws.com
GET
PUT
POST
DELETE
*
and my request headers are as such:...

I have number of results to pass back to a calling procedure
I'd like to pass back a named list where each result is numbered.
# the following works
# result is a valid result
results = list( '1' = result)
When I do the following I end up with results$resultCounter instead of results$'1'
resultCoun...

I've been trying to follow tutorials and other SO questions and have a modelformset_factory that's displaying a list of what looks like forms in the html, but it turns out they're not actual forms.
html that gets displayed:
Config key:
Config value:
Config key:
Config value:
notice there is no for...

I want to create a read-only property [NotMapped]Database {get;} on a POCO entity class to reflect the name of the database from which the entity was loaded at the time of creation so that I can read the value later when no DbContext instance is available. How do I tell EF to load this data at obje...

This is probably simple, but everything I find in a search is only vaguely related to my question.
I have this:
{
'user':'C03999',
'caseNumber':'011-1234567',
'documents':[
{
'file':[
{'name':'indem1','document':'xSFSF%%GSF','mimeType':'PDF'},
{'name':'indem2','document':'xSFSF%%GSF','mimeType':'PDF...

After searching for a few hours, I have to ask...
I want to be find a string of text on a page. Specifically, I'm looking to ensure the proper errors are displayed based on a user's form submission. Given that there could be several messages, and the web application I'm dealing with, if I could capt...

Let's suppose I'm writing a schema for an XML document wherein there's a document describing pieces on a linear game board:
where the attributes length and position are both non-negative integers greater than 0. Now, there's a clear relation between length and position that further restricts the set...

I am trying to understand why I am getting this error, as I am fairly new to lisp. I want to create a function that takes a number n from the user and creates a list of up to five numbers based on that number. The function then takes the first number in the list and sends it to the end of the list....