Posts

Configuring Microsoft SQL Server to perform full text searches in documents

Image
This post describes the steps needed to install and configure Microsoft SQL Server to perform full text searches within documents like Word, pdf, rich text format etc. These instructions require no prior knowledge of using or installing SQL Server - all steps from installation to implementation are included. 1. Install SQL Server. Go to MSDN Subscriber downloads: https://msdn.microsoft.com/en-us/subscriptions/downloads/ If you have not yet done so create an account with them. Check the boxes that apply to you – 32/64 bit architecture, language etc. I chose the free version of SQL Server Express 2014 with Advanced Services. Advanced Series is what you will need if you wish to install full text searches. The ordinary installers not appear to include this. Once downloaded, run the installer. Just click OK when prompted to choose the destination folder: And let it run Then choose to run a new installation of SQL Server 2014: And continue through the inst...

Switching between WPF XAML views using MVVM DataTriggers

Image
Related post: https://www.technical-recipes.com/2016/switching-between-wpf-xaml-views-using-mvvm-datatemplate/ This post addresses the problem of being able to switch between different views based on the property of a ViewModel class. To get started in Visual Studio, create a new WPF Application: So that when we build and run the application we have a blank window like this: To demonstrate how WPF windows can be made to switch between different views, create two new XAML views, View1.xaml and View2.xaml, each consisting of a simple TextBlock containing different texts to demonstrate that the views are different. In your Visual Studio project, right-click your project folder and select Add > New Item. Select User Control (WPF) and name your file as View1.xaml: In the xaml portion of the file, insert the code to display the Text in the view as follows: [code language="xml"] <UserControl x:Class="XamlSwitching.View1" xmlns=...

Getting started with Java in Eclipse

Image
1. Download Eclipse Obtain the installer from the following site: https://eclipse.org/downloads/ and complete the installation: 2. Create a new Eclipse project Open Eclipse and select File > New > Java Project. Give the project a name ('HelloWorld'): Click Next. And then click Finish. 3. Add your Java class Select File > New > Class: Set the Name field to 'HelloWorld' and check the box labelled 'public static void main(String[] args)': Click Finish. So that your project looks like this: 4. Write your code In this example, the proverbial "Hello World" example: [code language="java"] public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } } [/code] 5. Build and run your Java project: Select the down arrow next to the Run icon and select Run As > Java Application: Giving the desired "Hello World" console output: ...

Getting started with Mono in Linux

Image
Some instructions on how to get started with using Mono in Linux environments: from installation to running your first "Hello World!" example. Open up your terminal and issue the following commands: [code language="text"] sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF [/code] [code language="text"] echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list [/code] [code language="text"] sudo apt-get update [/code] [code language="text"] sudo apt-get install Mono-Complete [/code] Check that your Mono has installed by using the 'version' command: [code language="text"] mono --version [/code] We can now test our installation of Mono by writing some code, in this case the proverbial "Hello World!" example. Open a text editor of your choice and enter ...

Using POSIX threads in Microsoft Visual Studio

Image
Threads can be used to implement parallelism. For UNIX-based systems, a standardized C language threads programming interface has been specified by the IEEE POSIX 1003.1c standard. Implementations that adhere to this standard are referred to as POSIX threads, or Pthreads. Windows does not support pthreads directly, instead the Pthreads-w32 project seeks to provide a portable and open-source wrapper implementation. The first step is to obtain the pthread project from the following ftp site: ftp://sourceware.org/pub/pthreads-win32/ And extract it to a location of your choice: This will be the location of where your project dependencies and additional library files will be located. To demonstrate an example pthreads usage in a Microsoft Visual Studio environment, first create a new Empty Project: Add the main.cpp source file to your empty project and use the following code sample: [code language="cpp"] #include <pthread.h> #include <stdio.h>...