Posts

Showing posts with the label Installers

Using a Combo Box user control with autocomplete suggestions in WPF MVVM

Image
Create a new WPF project Install the Microsoft.Xaml.Behaviors.Wpf nuget package Download link: https://www.nuget.org/packages/Microsoft.Xaml.Behaviors.Wpf Copy the download link at the download page, open package manager console and enter the command: [code language="xml"] NuGet\Install-Package Microsoft.Xaml.Behaviors.Wpf -Version 1.1.39 [/code] Create the Command and event handling code BaseViewModel.cs [code language="csharp"] using System; using System.ComponentModel; using System.Diagnostics; namespace Autocomplete { public abstract class BaseViewModel : INotifyPropertyChanged { #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion protected void OnPropertyChanged(string propertyName) { VerifyPropertyName(propertyName); PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) ...

Configure and Verify Cisco ACI Using Acitoolkit

Image
Some instructions and code on how to use the Acitoolkit objects to perform configuration checks against the APIC running state and then create a new Tenant configuration from scratch. Instructions for setting up acitoolkit for the first time are given here: https://acitoolkit.readthedocs.io/en/latest/tutorialsetup.html When trying to use acitoolkit in python for the first time, I got quite a few 'ModuleNotFoundError' messages before succeeding. After overcoming this rabbit-hole after much StackOverflow-ing, I managed to get the acitoolkit working. Definitely ensure the Microsoft Visual C++ components have been installed: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 You may also get the same problems as I did in needing to do pip installs for acitoolkit, six, websocket, websocket-client and pyrsistent before being able to proceed. What this script does is to import the import the necessary modules for session, tenant, con...

Using Cobra SDK and Arya to create a Tenant

Image
Getting the python and virtual environment set up These instructions are for a Windows set up. Use these instructions for setting up your Python virtual environment and for obtaining and installing the Cobra SDK and model. https://cobra.readthedocs.io/en/latest/install.html But essentially, if you're doing this for the first time, then do the following: Download and install python 2.7 from here (yes, version 2.7) https://www.python.org/downloads/ Download this python script to a chosen location, and run it using python. This will install pip. https://bootstrap.pypa.io/get-pip.py Run these pip commands. I found that I needed to run the pip2 executable as opposed to version 3 pip that was already installed, in order to successfuly install the requirements and run using python2 etc. [code language="txt"] pip install virtualenv pip install virtualenv-clone pip install virtualenvwrapper-win [/code] Run this command to create your virtual environment (See how i...

Connecting to Cisco Webex Teams API using Paginated REST API Endpoint

Image
Download example Python project here: working_directory Step 1: Set up your Visual Studio Code environment Open a terminal window and enter the command pipenv install On attempting this install you may get the following error: [code language="language="txt"] Warning: Python 3.7 was not found on your system... Neither 'pyenv' nor 'asdf' could be found to install Python. You can specify specific versions of Python with:<code> $ pipenv --python path\to\python [/code] [caption id="attachment_9737" align="alignnone" width="448"] Python version not found[/caption] If this is the case first verify the version of Python you have by using the command py --version in a command prompt: [caption id="attachment_9738" align="alignnone" width="500"] Obtain Python version[/caption] Then open the PipFile and ensure the version of Python you have installed is consistent with the versi...

Google search engine cheat sheet

Image
Some tips and tricks for using the Google search engine effectively.  Instructions on how to make your internet searches more powerful by utilising various search techniques that Google provides. 1. Searching a single website only Prefix "site:" before the beginning of your chosen site plus any keywords you wish to add [code language="text"] site:technical-recipes.com google [/code] [caption id="attachment_9428" align="alignnone" width="763"] Google search engine cheat[/caption] 2. Excluding a website Add a minus sign right before the "site:" expression that represents the site you wish to exclude. For example, if you wish to search the term "GCHQ" while excluding results from the Guardian newspaper, just use: [code language="text"] gchq -site:theguardian.* [/code] 3. Including and excluding words Use the minus sign (-) to exclude search words; otherwise plus (+) or no sign to inc...