text:
import unittest
import os
import sys
from urlparse import urlparse

try:
    from config import *
except ImportError:
    message = "To run tests, create config.py file inside test folder and define following test variables: \n\n"
    message += "                 CLIENT_ID \n \
                CLIENT_SECRET \n \
                OAUTH_TOKEN \n \
                CODE \n \
                ACCOUNT_IDENTIFIER \n \
                ACCOUNT_NUMBER \n \
                ACCOUNT_TYPE \n \
                ROUTING_NUMBER \n \
                PIN"
    raise Exception(message)

sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
import dwolla

class DwollaTest(unittest.TestCase):

    def setUp(self):
        #: First thing first, initialize app credentials
        #: Note: OAUTH_TOKEN is optional
        dwolla.init(CLIENT_ID, CLIENT_SECRET, OAUTH_TOKEN)

    def test_request_token_url(self):
        """ Verifies pydwolla can create a request token url
        """

        url = urlparse(dwolla.request_token_url(scope='AccountInfoFull'))
        self.assertTrue('scope' in url.query)

    @unittest.skip('Requires dummy test data')
    def test_get_oauth_token(self):
        """ Verifies pydwolla can get oauth token
        """
        oauth_token = dwolla.get_oauth_token(
            code=CODE
        )

        self.assertTrue(dwolla.OAUTH_TOKEN is not None)

    @unittest.skip('Requires dummy test data')
    def test_register_user_success(self):
        """ Verifies pydwolla can register user successfully
        """
        resp = dwolla.User.create(**DUMMY_USER)

        self.assertTrue(resp.get('Success') == True)

    def test_retrieve_basic_acct_info(self):
        """ Verifies pydwolla can grab basic account info
        """

        resp = dwolla.User.retrieve(account_identifier=ACCOUNT_IDENTIFIER)
        self.assertTrue( resp.get('Success') == True )

    def test_retrieve_acct_info(self):
        """ Verifies pydwolla can grab account info
        """
        resp = dwolla.User.all()
        self.assertTrue( resp.get('Success') == True )

    @unittest.skip('Requires dummy test data')
    def test_create_funding_resource(self):
        """ Verifies pydwolla creates new funding source
        """

        resp = dwolla.FundingSource.create(
            account_number=ACCOUNT_NUMBER,
            routing_number=ROUTING_NUMBER,
            account_type=ACCOUNT_TYPE,
            name="test"
        )

        self.assertTrue(resp.get('Success') == True)

    def test_funding_sources(self):
        """ Verify pydwolla grabs all funding sources
        """

        resp = dwolla.FundingSource.all()
        self.assertTrue(resp.get('Success') == True)

    def test_retrieve_funding_source(self):
        """ Verify pydwolla can get a funding source
        """

        resp = dwolla.FundingSource.retrieve('5bca2927481c04e2e4d9917edd18de43')

        self.assertTrue(resp.get('Success') == True)

    @unittest.skip('')
    def test_create_transaction(self):
        """ Verifies pydwolla can send a transaction
        """

        resp = dwolla.Transaction.create(
            pin=PIN,
            destinationId='reflector@dwolla.com',
            amount='50'
        )

        self.assertTrue(resp.get('Success') == True)

    def test_retrieve_transaction_by_id(self):
        """ Verifies pydwolla retrieves transactions by id
        """

        resp = dwolla.Transaction.retrieve(TRANSACTION_ID)

        self.assertTrue(resp.get('Success') == True)

    def test_retrieve_transactions(self):
        """ Verifies pydwolla retrieves all transactions
        """
        resp = dwolla.Transaction.all()

        self.assertTrue(resp.get('Success') == True)

if __name__ == '__main__':
    unittest.main()


text:
Shell script that waits for new images in a folder to convert them to searchable PDFs (using tesseract-OCR). Tested on a Synology DS213 NAS only.

Find more details in my [blog post](http://www.dominikschmidt.net/2015/11/scan-and-automatically-ocr-receipts-bills-letters-etc-without-turning-on-your-computer).

## Installation
* copy shell script and python date parser to /usr/local/bin
* configure paths at top of ocrwatch.sh
* create a link to ocrwath.sh in /usr/local/etc/rc.d (to run on startup)

## Usage

` ./ocrwatch.sh start`

` ./ocrwatch.sh stop`

redpajama_set_name: RedPajamaGithub


text:
package com.bv.eidss;

import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import android.os.AsyncTask;
import android.support.v4.app.FragmentActivity;

import com.bv.eidss.data.EidssDatabase;
import com.bv.eidss.web.WebApiClient;

import org.apache.http.client.HttpResponseException;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.HttpHostConnectException;

import java.net.SocketTimeoutException;

public class AppVersionTask extends AsyncTask<Void, Void, Integer> {
    public final static int ASKFORDOWNLOAD_DIALOG_ID = 6;
    public final static int ERROR_DIALOG_ID = 7;
    public final static int NEWVERSION_DIALOG_ID = 9;

    private final OnComplete listener;
    private FragmentActivity context;
    private int mWorkMode;

    ProgressDialog progressDialog = null;
    int versionServer = 0;
    int versionLocal = 0;

    public AppVersionTask(FragmentActivity a, OnComplete listener, int workMode) {
        this.listener = listener;
        context = a;
        mWorkMode = workMode;
    }
    // Interface to be implemented by calling activity
    public interface OnComplete {
        public void asyncResponse(int response);
    }

    @Override
    protected void onPreExecute() {
        super.onPreExecute();

        progressDialog = EidssAndroidHelpers.ProgressDialog(context, R.string.CheckForUpdates, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                if (cancel(true)) {
                    progressDialog.dismiss();
                    EidssAndroidHelpers.AlertOkResultDialog.ShowWarning(context.getSupportFragmentManager(), NEWVERSION_DIALOG_ID, R.string.CheckingAborted);
                }
            }
        });
    }

    @Override
    protected Integer doInBackground(Void... params) {
        Integer iErr = 0;
        String errDetails;

        try {
            EidssDatabase db = new EidssDatabase(context);
            String url = db.Options().getServerUrl();
            int timeout = db.Options().getResponseTimeout();
            db.close();

            WebApiClient webClient = new WebApiClient(url, "", "", "", timeout);
            versionServer = Integer.parseInt(webClient.Version());
            PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
            versionLocal = pInfo.versionCode;
        }
        catch(HttpResponseException e){
            if (e.getStatusCode() == 401){
                iErr = R.string.LoginFailed;
                errDetails = e.getMessage();
            }
            else if (e.getStatusCode() == 403){
                iErr = R.string.AccessFailed;
            }
            else{
                iErr = R.string.ConnectionFailed;
            }
        }
        catch(HttpHostConnectException e){
            iErr = R.string.ConnectionErr;
        }
        catch(SocketTimeoutException e){
            iErr = R.string.NetworkTimeout;
        }
        catch(ConnectTimeoutException e){
            iErr = R.string.ConnectionFailed;
        }
        catch(Exception e){
            iErr = R.string.GeneralError;
        }

        return iErr;
    }

    @Override
    protected void onPostExecute(Integer result) {
        super.onPostExecute(result);

        if (progressDialog != null && progressDialog.isShowing()) {
            progressDialog.dismiss();
        }

        if (result == 0) {
            if (versionServer > versionLocal){
                EidssAndroidHelpers.AlertOkResultDialog.ShowQuestion(context.getSupportFragmentManager(), ASKFORDOWNLOAD_DIALOG_ID, R.string.NewVersionDownloadConfirm);
                result = 1;
            }
            else{
                if (mWorkMode == context.getResources().getInteger(R.integer.APP_DOWNLOAD_MODE_CHCK)){
                    EidssAndroidHelpers.AlertOkResultDialog.ShowOk(context.getSupportFragmentManager(), NEWVERSION_DIALOG_ID, R.string.NoNewVersion);
                }
            }
        } else {
            EidssAndroidHelpers.AlertOkResultDialog.ShowWarning(context.getSupportFragmentManager(), ERROR_DIALOG_ID, result);
        }

        listener.asyncResponse(result);
    }

    protected void onCancelled(Integer result) {
        if (progressDialog != null && progressDialog.isShowing()) {
            progressDialog.dismiss();
        }
    }}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>HttpsCall</title>
<meta name="date" content="2015-11-11">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.sap.integration.utils

Class HttpsCall

java.lang.Object

com.sap.integration.utils.HttpsCall

public class HttpsCall
extends java.lang.Object

Utility class used for HTTPS GET, POST and PATCH requests. For demo purpose all trusting managers are used.

Field Summary

Fields

Modifier and Type
Field and Description

private static org.apache.http.impl.client.HttpClientBuilder
httpClientBuilder

private static org.apache.log4j.Logger
LOG

Constructor Summary

Constructors

Constructor and Description

HttpsCall()

Method Summary

Methods

Modifier and Type
Method and Description

private static void
close(org.apache.http.impl.client.CloseableHttpClient httpClient)

Method, which close HttpClient.

static SimpleResponse
executeRequest(org.apache.http.client.methods.HttpUriRequest httpUriRequest)

Method, which executes request and returns response in SimpleResponse object.

static <T extends SimpleResponse>
T
executeRequest(org.apache.http.client.methods.HttpUriRequest httpUriRequest,
              T response)

Method, which executes request and saves it into response object.

static SimpleResponse
get(java.net.URI uri)

HTTP GET request, retrieving data by object URL.

static <T extends SimpleResponse>
T
get(java.net.URI uri,
   T response)

HTTP GET request, retrieving data by object URL.

private static org.apache.http.impl.client.CloseableHttpClient
getHttpClient()

Method, which returns instance of CloseableHttpClient.

static SimpleResponse
patch(java.net.URI url,
     java.lang.Object payload)

Update data witch PATCH request, by object URL and object payload.

static <T extends SimpleResponse>
T
patch(java.net.URI url,
     java.lang.Object payload,
     T response)

Update data witch PATCH request, by object URL and object payload.

static SimpleResponse
patch(java.net.URI url,
     java.lang.String json)

Update data witch PATCH request, by object URL and JSON string.

static <T extends SimpleResponse>
T
patch(java.net.URI url,
     java.lang.String json,
     T response)

Update data witch PATCH request, by object URL and JSON string and returns data in response object.

static SimpleResponse
post(java.net.URI url,
    java.lang.Object payload)

Create data witch POST request, by object URL and object payload.

static <T extends SimpleResponse>
T
post(java.net.URI url,
    java.lang.Object payload,
    T response)

Create data by POST request, by object URL and object payload.

static SimpleResponse
post(java.net.URI url,
    java.lang.String json)

Create data by POST request, by object URL and object payload.

static <T extends SimpleResponse>
T
post(java.net.URI url,
    java.lang.String json,
    T response)

Create data by POST request, by object URL and object payload.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

httpClientBuilder

private static org.apache.http.impl.client.HttpClientBuilder httpClientBuilder

Constructor Detail

HttpsCall

public HttpsCall()

Method Detail

get

public static SimpleResponse get(java.net.URI uri)
                          throws java.security.KeyManagementException,
                                 java.security.NoSuchAlgorithmException,
                                 java.io.IOException

HTTP GET request, retrieving data by object URL.

Parameters:

uri - - URL used for connection

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

java.io.IOException

get

public static <T extends SimpleResponse> T get(java.net.URI uri,
                               T response)
                                    throws java.security.KeyManagementException,
                                           java.security.NoSuchAlgorithmException,
                                           java.io.IOException

HTTP GET request, retrieving data by object URL.

Parameters:

uri - - URL used for connection

response - - response object, which stores information about content and HTTP code

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

java.io.IOException

post

public static SimpleResponse post(java.net.URI url,
                  java.lang.Object payload)
                           throws org.codehaus.jackson.JsonGenerationException,
                                  org.codehaus.jackson.map.JsonMappingException,
                                  java.io.IOException,
                                  java.security.KeyManagementException,
                                  java.security.NoSuchAlgorithmException

Create data witch POST request, by object URL and object payload.

Parameters:

url - - URL used for connection

payload - - data which will be send

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

org.codehaus.jackson.JsonGenerationException

org.codehaus.jackson.map.JsonMappingException

java.io.IOException

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

post

public static <T extends SimpleResponse> T post(java.net.URI url,
                                java.lang.Object payload,
                                T response)
                                     throws org.codehaus.jackson.JsonGenerationException,
                                            org.codehaus.jackson.map.JsonMappingException,
                                            java.io.IOException,
                                            java.security.KeyManagementException,
                                            java.security.NoSuchAlgorithmException

Create data by POST request, by object URL and object payload.

Parameters:

url - - URL used for connection

payload - - data which will be send

response - - object used for storing information about HTTP response

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

org.codehaus.jackson.JsonGenerationException

org.codehaus.jackson.map.JsonMappingException

java.io.IOException

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

post

public static SimpleResponse post(java.net.URI url,
                  java.lang.String json)
                           throws java.security.KeyManagementException,
                                  java.security.NoSuchAlgorithmException,
                                  java.io.IOException

Create data by POST request, by object URL and object payload.

Parameters:

url - - URL used for connection

json - - data which will be send

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

java.io.IOException

post

public static <T extends SimpleResponse> T post(java.net.URI url,
                                java.lang.String json,
                                T response)
                                     throws java.security.KeyManagementException,
                                            java.security.NoSuchAlgorithmException,
                                            java.io.IOException

Create data by POST request, by object URL and object payload.

Parameters:

url - - URL used for connection

json - - data which will be send

response - - object used for storing information about HTTP response

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

java.io.IOException

patch

public static SimpleResponse patch(java.net.URI url,
                   java.lang.Object payload)
                            throws org.codehaus.jackson.JsonGenerationException,
                                   org.codehaus.jackson.map.JsonMappingException,
                                   java.io.IOException,
                                   java.security.KeyManagementException,
                                   java.security.NoSuchAlgorithmException

Update data witch PATCH request, by object URL and object payload.

Parameters:

url - - URL used for connection

payload - - data which will be send

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

org.codehaus.jackson.JsonGenerationException

org.codehaus.jackson.map.JsonMappingException

java.io.IOException

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

patch

public static <T extends SimpleResponse> T patch(java.net.URI url,
                                 java.lang.Object payload,
                                 T response)
                                      throws org.codehaus.jackson.JsonGenerationException,
                                             org.codehaus.jackson.map.JsonMappingException,
                                             java.io.IOException,
                                             java.security.KeyManagementException,
                                             java.security.NoSuchAlgorithmException

Update data witch PATCH request, by object URL and object payload.

Parameters:

url - - URL used for connection

payload - - data which will be send

response - - object used for storing information about HTTP response

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

org.codehaus.jackson.JsonGenerationException

org.codehaus.jackson.map.JsonMappingException

java.io.IOException

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

patch

public static SimpleResponse patch(java.net.URI url,
                   java.lang.String json)
                            throws java.security.KeyManagementException,
                                   java.security.NoSuchAlgorithmException

Update data witch PATCH request, by object URL and JSON string.

Parameters:

url - - URL used for connection

json - - data which will be send

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

patch

public static <T extends SimpleResponse> T patch(java.net.URI url,
                                 java.lang.String json,
                                 T response)
                                      throws java.security.KeyManagementException,
                                             java.security.NoSuchAlgorithmException

Update data witch PATCH request, by object URL and JSON string and returns data in response object.

Parameters:

url - - URL used for connection

json - - data which will be send

SimpleResponse - - object represents HTTP response with HTTP code and content

Throws:

java.security.KeyManagementException

java.security.NoSuchAlgorithmException

executeRequest

public static SimpleResponse executeRequest(org.apache.http.client.methods.HttpUriRequest httpUriRequest)
                                     throws java.security.NoSuchAlgorithmException,
                                            java.security.KeyManagementException

Method, which executes request and returns response in SimpleResponse object.

Parameters:

httpUriRequest -

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.NoSuchAlgorithmException

java.security.KeyManagementException

executeRequest

public static <T extends SimpleResponse> T executeRequest(org.apache.http.client.methods.HttpUriRequest httpUriRequest,
                                          T response)
                                               throws java.security.NoSuchAlgorithmException,
                                                      java.security.KeyManagementException

Method, which executes request and saves it into response object.

Parameters:

httpUriRequest -

response -

Returns:

SimpleResponse - object represents HTTP response with HTTP code and content

Throws:

java.security.NoSuchAlgorithmException

java.security.KeyManagementException

getHttpClient

private static org.apache.http.impl.client.CloseableHttpClient getHttpClient()
                                                                      throws java.security.NoSuchAlgorithmException,
                                                                             java.security.KeyManagementException

Method, which returns instance of CloseableHttpClient.

Returns:

instance of CloseableHttpClient

Throws:

java.security.NoSuchAlgorithmException

java.security.KeyManagementException

close

private static void close(org.apache.http.impl.client.CloseableHttpClient httpClient)

Method, which close HttpClient.

Parameters:

httpClient - - HTTP Client which will be closed

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
module Gzr
  module Plan
    def query_all_scheduled_plans(user_id,fields=nil)
      req = {}
      req[:all_users] = true if user_id == "all"
      req[:user_id] = user_id if user_id && !(user_id == "all")
      req[:fields] = fields if fields
      data = nil
      id = nil
      id = user_id unless user_id == "all"
      begin
        data = @sdk.all_scheduled_plans(req)
      rescue LookerSDK::ClientError => e
        say_error "Unable to get all_scheduled_plans(#{JSON.pretty_generate(req)})"
        say_error e.message
        raise
      end
      data
    end

    def query_scheduled_plans_for_look(look_id,user_id,fields=nil)
      req = {}
      req[:all_users] = true if user_id == "all"
      req[:user_id] = user_id if user_id && !(user_id == "all")
      req[:fields] = fields if fields
      data = nil
      begin
        data = @sdk.scheduled_plans_for_look(look_id,req)
        return nil if data.respond_to?(:message) && data.message == 'Not found'
      rescue LookerSDK::NotFound
        return nil
      rescue LookerSDK::ClientError => e
        say_error "Unable to get scheduled_plans_for_look(#{look_id},#{JSON.pretty_generate(req)})"
        say_error e.message
        raise
      end
      data
    end

    def query_scheduled_plans_for_dashboard(dashboard_id,user_id,fields=nil)
      req = {}
      req[:all_users] = true if user_id == "all"
      req[:user_id] = user_id if user_id && !(user_id == "all")
      req[:fields] = fields if fields
      data = nil
      begin
        data = @sdk.scheduled_plans_for_dashboard(dashboard_id,req)
        return nil if data.respond_to?(:message) && data.message == 'Not found'
      rescue LookerSDK::NotFound
        return nil
      rescue LookerSDK::ClientError => e
        say_error "Unable to get scheduled_plans_for_dashboard(#{dashboard_id},#{JSON.pretty_generate(req)})"
        say_error e.message
        raise
      end
      data.map! {|plan| plan.to_attrs}
      data
    end

    def query_scheduled_plan(plan_id,fields=nil)
      req = {}
      req[:fields] = fields if fields
      begin
        data = @sdk.scheduled_plan(plan_id,req)
      rescue LookerSDK::ClientError => e
        say_error "Unable to get scheduled_plan(#{plan_id},#{JSON.pretty_generate(req)})"
        say_error e.message
        raise
      end
      data
    end

    def delete_scheduled_plan(plan_id)
      begin
        data = @sdk.delete_scheduled_plan(plan_id)
      rescue LookerSDK::ClientError => e
        say_error "Unable to delete scheduled_plan(#{plan_id})"
        say_error e.message
        raise
      end
      data
    end

    def create_scheduled_plan(plan)
      begin
        data = @sdk.create_scheduled_plan(plan)
      rescue LookerSDK::Error => e
        say_error "Error creating scheduled_plan(#{JSON.pretty_generate(plan)})"
        say_error e.message
        raise
      end
      data
    end

    def update_scheduled_plan(plan_id,plan)
      begin
        data = @sdk.update_scheduled_plan(plan_id,plan)
      rescue LookerSDK::Error => e
        say_error "Error updating scheduled_plan(#{plan_id},#{JSON.pretty_generate(plan)})"
        say_error e.message
        raise
      end
      data
    end

    def run_scheduled_plan(plan)
      begin
        data = @sdk.scheduled_plan_run_once(plan)
      rescue LookerSDK::Error => e
        say_error "Error executing scheduled_plan_run_once(#{JSON.pretty_generate(plan)})"
        say_error e.message
        raise
      end
      data
    end

    def upsert_plans_for_look(look_id,user_id,source_plans)
      existing_plans = query_scheduled_plans_for_look(look_id,"all")
      upsert_plans_for_obj(user_id,source_plans,existing_plans) { |p| p[:look_id] = look_id }
    end

    def upsert_plans_for_dashboard(dashboard_id,user_id,source_plans)
      existing_plans = query_scheduled_plans_for_dashboard(dashboard_id,"all")
      upsert_plans_for_obj(user_id,source_plans,existing_plans) { |p| p[:dashboard_id] = dashboard_id }
    end

    def upsert_plan_for_look(look_id,user_id,source_plan)
      existing_plans = query_scheduled_plans_for_look(look_id,"all")
      upsert_plan_for_obj(user_id,source_plan,existing_plans) { |p| p[:look_id] = look_id }
    end

    def upsert_plan_for_dashboard(dashboard_id,user_id,source_plan)
      existing_plans = query_scheduled_plans_for_dashboard(dashboard_id,"all")
      upsert_plan_for_obj(user_id,source_plan,existing_plans) { |p| p[:dashboard_id] = dashboard_id }
    end

    def upsert_plans_for_obj(user_id,source_plans,existing_plans, &block)
      plans = nil
      source_plans.collect do |source_plan|
        plans = upsert_plan_for_obj(user_id, source_plan, existing_plans, &block)
      end
      return nil unless plans.length > 0
      plans.first
    end

    def upsert_plan_for_obj(user_id, source_plan, existing_plans)
      matches = existing_plans.select { |p| p.name == source_plan[:name] && user_id == p.user_id }
      if matches.length > 0 then
        say_ok "Modifying existing plan #{matches.first.id} #{matches.first.name}"
        plan = keys_to_keep('update_scheduled_plan').collect do |e|
          [e,nil]
        end.to_h

        plan.merge!( source_plan.select do |k,v|
          (keys_to_keep('update_scheduled_plan') - [:plan_id,:look_id,:dashboard_id,:user_id,:dashboard_filters,:lookml_dashboard_id,:scheduled_plan_destination]).include? k
        end)
        plan[:scheduled_plan_destination] = source_plan[:scheduled_plan_destination].collect do |p|
          p.reject do |k,v|
            [:id,:scheduled_plan_id,:looker_recipient,:can].include? k
          end
        end
        plan[:user_id] = user_id
        plan[:enabled] = true if @options[:enabled]
        plan[:enabled] = false if @options[:disabled]

        plan[:enabled] = false if plan[:enabled].nil?
        plan[:require_results] = false if plan[:require_results].nil?
        plan[:require_no_results] = false if plan[:require_no_results].nil?
        plan[:require_change] = false if plan[:require_change].nil?
        plan[:send_all_results] = false if plan[:send_all_results].nil?
        plan[:run_once] = false if plan[:run_once].nil?
        plan[:include_links] = false if plan[:include_links].nil?
        yield plan
        update_scheduled_plan(matches.first.id,plan)
      else
        plan = source_plan.select do |k,v|
          (keys_to_keep('create_scheduled_plan') - [:plan_id,:dashboard_id,:user_id,:dashboard_filters,:lookml_dashboard_id,:scheduled_plan_destination]).include? k
        end
        plan[:scheduled_plan_destination] = source_plan[:scheduled_plan_destination].collect do |p|
          p.reject do |k,v|
            [:id,:scheduled_plan_id,:looker_recipient,:can].include? k
          end
        end

        yield plan
        plan[:enabled] = true if @options[:enabled]
        plan[:enabled] = false if @options[:disabled]

        plan[:enabled] = false if plan[:enabled].nil?
        plan[:require_results] = false if plan[:require_results].nil?
        plan[:require_no_results] = false if plan[:require_no_results].nil?
        plan[:require_change] = false if plan[:require_change].nil?
        plan[:send_all_results] = false if plan[:send_all_results].nil?
        plan[:run_once] = false if plan[:run_once].nil?
        plan[:include_links] = false if plan[:include_links].nil?
        create_scheduled_plan(plan)
      end
    end
  end
end


text:
ActiveRecord::Schema.define(:version => 0) do
  create_table "authors", :force => true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "accounts", :force => true do |t|
    t.integer  "author_id"
    t.string   "password"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "addresses", :force => true do |t|
    t.integer  "author_id"
    t.string   "street"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "profiles", :force => true do |t|
    t.integer  "author_id"
    t.integer  "age"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "comments", :force => true do |t|
    t.text     "body"
    t.integer  "author_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "posts", :force => true do |t|
    t.text     "body"
    t.integer  "author_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "sessions", :force => true do |t|
    t.text     "description"
    t.integer  "author_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
end


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers
Imports Microsoft.CodeAnalysis.Diagnostics
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.Analyzers.MetaAnalyzers
    <DiagnosticAnalyzer(LanguageNames.VisualBasic)>
    Public Class BasicReportDiagnosticAnalyzer
        Inherits ReportDiagnosticAnalyzer(Of ClassBlockSyntax, StructureBlockSyntax, InvocationExpressionSyntax, IdentifierNameSyntax, VariableDeclaratorSyntax)

        Protected Overrides Function GetAnalyzer(contextTypes As ImmutableHashSet(Of INamedTypeSymbol),
                                                 diagnosticType As INamedTypeSymbol,
                                                 diagnosticDescriptorType As INamedTypeSymbol,
                                                 diagnosticAnalyzer As INamedTypeSymbol,
                                                 diagnosticAnalyzerAttribute As INamedTypeSymbol) As ReportDiagnosticCompilationAnalyzer
            Return New BasicReportDiagnosticCompilationAnalyzer(contextTypes, diagnosticType, diagnosticDescriptorType, diagnosticAnalyzer, diagnosticAnalyzerAttribute)
        End Function

        Private NotInheritable Class BasicReportDiagnosticCompilationAnalyzer
            Inherits ReportDiagnosticCompilationAnalyzer

            Public Sub New(contextTypes As ImmutableHashSet(Of INamedTypeSymbol),
                           diagnosticType As INamedTypeSymbol,
                           diagnosticDescriptorType As INamedTypeSymbol,
                           diagnosticAnalyzer As INamedTypeSymbol,
                           diagnosticAnalyzerAttribute As INamedTypeSymbol)
                MyBase.New(contextTypes, diagnosticType, diagnosticDescriptorType, diagnosticAnalyzer, diagnosticAnalyzerAttribute)
            End Sub

            Protected Overrides Function GetArgumentExpressions(invocation As InvocationExpressionSyntax) As IEnumerable(Of SyntaxNode)
                If invocation.ArgumentList IsNot Nothing Then
                    Return invocation.ArgumentList.Arguments.Select(Function(a) a.GetExpression)
                End If

                Return Nothing
            End Function

            Protected Overrides Function GetPropertyGetterBlockSyntax(declaringSyntaxRefNode As SyntaxNode) As SyntaxNode
                Select Case declaringSyntaxRefNode.Kind
                    Case SyntaxKind.GetAccessorBlock
                        Return declaringSyntaxRefNode

                    Case SyntaxKind.GetAccessorStatement
                        Return declaringSyntaxRefNode.Parent

                    Case Else
                        Return Nothing
                End Select
            End Function
        End Class
    End Class
End Namespace


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('icekit_plugins_image', '0001_initial'),
        ('eventlistingfordate', '0003_auto_20161019_1906'),
    ]

    operations = [
        migrations.AddField(
            model_name='eventlistingpage',
            name='boosted_search_terms',
            field=models.TextField(blank=True, help_text='Words (space-separated) added here are boosted in relevance for search results increasing the chance of this appearing higher in the search results.'),
        ),
        migrations.AddField(
            model_name='eventlistingpage',
            name='hero_image',
            field=models.ForeignKey(related_name='+', blank=True, null=True, help_text=b'The hero image for this content.', to='icekit_plugins_image.Image'),
        ),
        migrations.AddField(
            model_name='eventlistingpage',
            name='list_image',
            field=models.ImageField(blank=True, help_text=b"image to use in listings. Default image is used if this isn't given", upload_to=b'icekit/listable/list_image/'),
        ),
    ]


text:
using content::BrowserThread;

namespace {

// Install predicate used by AddFromExternalUpdateUrl().
bool AlwaysInstall(const extensions::Extension* extension) {
  return true;
}

std::string GetVersionString(const Version& version) {
  return version.IsValid() ? version.GetString() : "invalid";
}

}  // namespace

namespace extensions {

PendingExtensionManager::PendingExtensionManager(
    content::BrowserContext* context)
    : context_(context) {}

PendingExtensionManager::~PendingExtensionManager() {}

const PendingExtensionInfo* PendingExtensionManager::GetById(
    const std::string& id) const {
  PendingExtensionList::const_iterator iter;
  for (iter = pending_extension_list_.begin();
       iter != pending_extension_list_.end();
       ++iter) {
    if (id == iter->id())
      return &(*iter);
  }

  return NULL;
}

bool PendingExtensionManager::Remove(const std::string& id) {
  PendingExtensionList::iterator iter;
  for (iter = pending_extension_list_.begin();
       iter != pending_extension_list_.end();
       ++iter) {
    if (id == iter->id()) {
      pending_extension_list_.erase(iter);
      return true;
    }
  }

  return false;
}

bool PendingExtensionManager::IsIdPending(const std::string& id) const {
  return GetById(id) != NULL;
}

bool PendingExtensionManager::HasPendingExtensions() const {
  return !pending_extension_list_.empty();
}

bool PendingExtensionManager::HasPendingExtensionFromSync() const {
  PendingExtensionList::const_iterator iter;
  for (iter = pending_extension_list_.begin();
       iter != pending_extension_list_.end();
       ++iter) {
    if (iter->is_from_sync())
      return true;
  }

  return false;
}

bool PendingExtensionManager::AddFromSync(
    const std::string& id,
    const GURL& update_url,
    PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
    bool install_silently,
    bool remote_install) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  if (ExtensionRegistry::Get(context_)->GetExtensionById(
          id, ExtensionRegistry::EVERYTHING)) {
    LOG(ERROR) << "Trying to add pending extension " << id
               << " which already exists";
    return false;
  }

  // Make sure we don't ever try to install the CWS app, because even though
  // it is listed as a syncable app (because its values need to be synced) it
  // should already be installed on every instance.
  if (id == extension_misc::kWebStoreAppId) {
    NOTREACHED();
    return false;
  }

  static const bool kIsFromSync = true;
  static const Manifest::Location kSyncLocation = Manifest::INTERNAL;
  static const bool kMarkAcknowledged = false;

  return AddExtensionImpl(id,
                          std::string(),
                          update_url,
                          Version(),
                          should_allow_install,
                          kIsFromSync,
                          install_silently,
                          kSyncLocation,
                          Extension::NO_FLAGS,
                          kMarkAcknowledged,
                          remote_install);
}

bool PendingExtensionManager::AddFromExtensionImport(
    const std::string& id,
    const GURL& update_url,
    PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  if (ExtensionRegistry::Get(context_)->GetExtensionById(
          id, ExtensionRegistry::EVERYTHING)) {
    LOG(ERROR) << "Trying to add pending extension " << id
               << " which already exists";
    return false;
  }

  static const bool kIsFromSync = false;
  static const bool kInstallSilently = true;
  static const Manifest::Location kManifestLocation = Manifest::INTERNAL;
  static const bool kMarkAcknowledged = false;
  static const bool kRemoteInstall = false;

  return AddExtensionImpl(id,
                          std::string(),
                          update_url,
                          Version(),
                          should_allow_install,
                          kIsFromSync,
                          kInstallSilently,
                          kManifestLocation,
                          Extension::NO_FLAGS,
                          kMarkAcknowledged,
                          kRemoteInstall);
}

bool PendingExtensionManager::AddFromExternalUpdateUrl(
    const std::string& id,
    const std::string& install_parameter,
    const GURL& update_url,
    Manifest::Location location,
    int creation_flags,
    bool mark_acknowledged) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  static const bool kIsFromSync = false;
  static const bool kInstallSilently = true;
  static const bool kRemoteInstall = false;

  const Extension* extension = ExtensionRegistry::Get(context_)
      ->GetExtensionById(id, ExtensionRegistry::EVERYTHING);
  if (extension && location == Manifest::GetHigherPriorityLocation(
                                   location, extension->location())) {
    // If the new location has higher priority than the location of an existing
    // extension, let the update process overwrite the existing extension.
  } else {
    if (ExtensionPrefs::Get(context_)->IsExternalExtensionUninstalled(id))
      return false;

    if (extension) {
      LOG(DFATAL) << "Trying to add extension " << id
                  << " by external update, but it is already installed.";
      return false;
    }
  }

  return AddExtensionImpl(id,
                          install_parameter,
                          update_url,
                          Version(),
                          &AlwaysInstall,
                          kIsFromSync,
                          kInstallSilently,
                          location,
                          creation_flags,
                          mark_acknowledged,
                          kRemoteInstall);
}

bool PendingExtensionManager::AddFromExternalFile(
    const std::string& id,
    Manifest::Location install_source,
    const Version& version,
    int creation_flags,
    bool mark_acknowledged) {
  // TODO(skerner): AddFromSync() checks to see if the extension is
  // installed, but this method assumes that the caller already
  // made sure it is not installed.  Make all AddFrom*() methods
  // consistent.
  const GURL& kUpdateUrl = GURL::EmptyGURL();
  static const bool kIsFromSync = false;
  static const bool kInstallSilently = true;
  static const bool kRemoteInstall = false;

  return AddExtensionImpl(id,
                          std::string(),
                          kUpdateUrl,
                          version,
                          &AlwaysInstall,
                          kIsFromSync,
                          kInstallSilently,
                          install_source,
                          creation_flags,
                          mark_acknowledged,
                          kRemoteInstall);
}

void PendingExtensionManager::GetPendingIdsForUpdateCheck(
    std::list<std::string>* out_ids_for_update_check) const {
  PendingExtensionList::const_iterator iter;
  for (iter = pending_extension_list_.begin();
       iter != pending_extension_list_.end();
       ++iter) {
    Manifest::Location install_source = iter->install_source();

    // Some install sources read a CRX from the filesystem.  They can
    // not be fetched from an update URL, so don't include them in the
    // set of ids.
    if (install_source == Manifest::EXTERNAL_PREF ||
        install_source == Manifest::EXTERNAL_REGISTRY)
      continue;

    out_ids_for_update_check->push_back(iter->id());
  }
}

bool PendingExtensionManager::AddExtensionImpl(
    const std::string& id,
    const std::string& install_parameter,
    const GURL& update_url,
    const Version& version,
    PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
    bool is_from_sync,
    bool install_silently,
    Manifest::Location install_source,
    int creation_flags,
    bool mark_acknowledged,
    bool remote_install) {
  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  PendingExtensionInfo info(id,
                            install_parameter,
                            update_url,
                            version,
                            should_allow_install,
                            is_from_sync,
                            install_silently,
                            install_source,
                            creation_flags,
                            mark_acknowledged,
                            remote_install);

  if (const PendingExtensionInfo* pending = GetById(id)) {
    // Bugs in this code will manifest as sporadic incorrect extension
    // locations in situations where multiple install sources run at the
    // same time. For example, on first login to a chrome os machine, an
    // extension may be requested by sync and the default extension set.
    // The following logging will help diagnose such issues.
    VLOG(1) << "Extension id " << id
            << " was entered for update more than once."
            << "  old location: " << pending->install_source()
            << "  new location: " << install_source
            << "  old version: " << GetVersionString(pending->version())
            << "  new version: " << GetVersionString(version);

    // Never override an existing extension with an older version. Only
    // extensions from local CRX files have a known version; extensions from an
    // update URL will get the latest version.

    // If |pending| has the same or higher precedence than |info| then don't
    // install |info| over |pending|.
    if (pending->CompareTo(info) >= 0)
      return false;

    VLOG(1) << "Overwrite existing record.";

    std::replace(pending_extension_list_.begin(),
                 pending_extension_list_.end(),
                 *pending,
                 info);
  } else {
    pending_extension_list_.push_back(info);
  }

  return true;
}

void PendingExtensionManager::AddForTesting(
    const PendingExtensionInfo& pending_extension_info) {
  pending_extension_list_.push_back(pending_extension_info);
}

}  // namespace extensions


text:
*[Back to resume](./kenbrubaker.md)*

# Complete Work History

![Profile Picture](../assets/AvatarSmall.jpeg)

> **Kenneth Brubaker**

> Enterprise Application Architect

## Kforce (Software Consultancy)

> San Antonio, TX

> <https://www.kforce.com/>

> February 2019 - Present

> Hands-on Architect (Contractor)

- __Capital Group: 2020-Present:__  Designed and lead team of platform
  developers that provide an AWS and OpenShift (Kubernetes)
  microservices development and delivery platform. Not only developed
  the application architecture, but also the delivery and 24x7 support
  model for the company's new Enterprise Client Data Services. This is
  a very large and strategic effort employing dozens of development
  staff and supporting enterprise critical workflows.

  System was part of a pilot to first use AWS-native services and GitHub
  Enterprise VCS within the enterprise. There are many technologies and
  practices that I employed as part of the design, including:

  - Terraform Infrastructure as Code (IaC) model that supports multiple
    concurrent software systems across several AWS accounts.
  - Application monitoring model that aggregates microservices into
    a handful manageable services.
  - OpenShift (Kubernetes) runtime environment and Docker development
    environment.
  - Continuous Integration using AWS CodeBuild
  - Enterprise log aggregation and monitoring system using AWS
    CloudWatch and Splunk Dashboards
  - The application architecture employs several unique technologies
    and techniques that I've evolved over the years such as
    - Enterprise registry of semantic application messages (errors, etc)
      that integrates with a semantic-rich structured logging
      architecture.
    - CLI and MSBuild integrated development tools.
    - Transport and language agnostic messaging development system that
      supports SQS, Kafka, etc. asynchronous messaging models in
      addition to HTTP. They system utilizes and integrates AVRO and
      Open API (OAS) for a complete API Discovery and Documentation
      model.
    - Developed an agile, trunk-based development and delivery model
      that supports multiple teams and many microservices.
  - Develop and manage a Continuous Deliver Release Management model and
    24x7 developer and operational support model.

- __Capital Group: 2019-2020:__ Migrated large (>100 APIs) .NET service
  to an Enterprise service that supported inner-source contributions
  by dozens of developers.

  Tasks included complete refactoring and rationalization of very large
  .NET code base developed by dozens of developers over 4 years to
  support a structured development model. Lead team of up to 10
  developers that provided software development, testing and operational
  support. Developed feature developer documentation, and the
  developer and 24x7 operational support model.

## Surge IT Services (Software Consultancy)

> Remote Contractor

> <https://www.surgeforward.com/>

> March 2017 - January 2019

> Senior Developer (Contractor)

Provided expert development services on many technologies for clients in
several fields including Healthcare and Investment Management.

- __Client 2018-2019:__ Helped a hedge fund migrate from a proprietary
  trading system to OrchesTrade, moving their business processes into
  the system.
- __Client 2018:__ Designed an Angular 4 application architecture for a
  construction measurement technology company's flagship product.
  Provided team management as part of the role.
- __Client 2017-2018:__ Helped a healthcare treatment placement non-profit
  migrate their proprietary clinical software to a new software platform.

## eLead (Automotive CRM)

> Destin, FL

> <http://www.elead-crm.com/>

> March 2015 – February 2017

> Enterprise Architect (Permanent)

Lead initiative to rearchitect large SaaS environment to a microservice
system. Highlights include:

- Developed Strategy, Principles, and Reference Architecture
  Requirements for the microservice-based rewrite of a large SaaS platform.
- Implemented core service technologies based on the requirements
- Implemented and oversaw deployment of several application services
  based on the core services in production.
- Prototyped Express/Redis based messaging system
- Shepherded several cross-functional initiatives including Internal
  Open Source React component library.

## AirWatch (Enterprise Mobility Management)

> Atlanta, GA

> <http://www.air-watch.com/>

> November 2014 – March 2015

> C# Architect (Permanent)

Provided developer guidance and product support in a very large scale
multi-tenant SaaS environment. Highlights include:

- Supported the AirWatch scheduler service in a SaaS environment.
  Successfully resolved stability issues with the service by
  implementing a self-healing service management framework. The
  framework provided thread lifetime management and supported fault
  discovery and recovery in a large-scale, clustered environment.
- Mentored staff on Unit Testing techniques and Single Page Application
  Web technologies.
- Researched continuous delivery and microservice technologies including
  Docker, Mesos, and Kubernetes.

## Voya Investment Management (Financial Services)

> Atlanta, GA

> <http://investments.voya.com>

> May 2009 – November 2014

> Application Architect (Permanent)

Provide strategy, assessments, guidance, and expertise for
custom application development company-wide. Provide Application
Lifecycle Management (ALM) guidance and mentoring. Develop enterprise
custom application software architecture, libraries and development
processes. Provide Software Configuration Management (SCM) guidance and
administration using Team Foundation Server (TFS). Provide development
machine template and administration.

Instrumental in maturing fragmented and obsolete development practice for
50+ person development organization as lead in distributed team of three
application architects. Demonstrated patient determination in navigating
multiple sites, teams, technologies and ambitions. Highlights include:

- Lead architect on team that provided architecture utilizing ASP.NET
  WebAPI, ASP.NET MVC 5, and TypeScript. Utilized CSS3 styling and RBAC
  libraries and Enterprise Library integration of previous architectures.
  Mentored technical leads across the application development teams in
  the Scrum process as part of effort.
- Lead architect on team of three to prototype an application
  architecture based on NodeJS, TypeScript, AngularJS, ExpressJS,
  BreezeJS, EdgeJS, and Enterprise Library. Architecture provides
  enterprise-compliant CSS3 styling themes that integrated with
  Bootstrap and Kendo using SCSS (SASS) and LESS. Built using NodeJS
  tooling such as Git, Npm, Bower, and Grunt. Key features were
  enterprise styling, ODATA support, and seamless and performant
  integration of SQL Server backend with a mobile ready front end and
  middleware. Source: <https://github.com/latticework/proto-ng-breeze-edge>
- Lead architect on team of three to create, document and mentor a
  strategic application architecture based on XAML (Silverlight), WCF
  RIA Services, ASP.NET, and Enterprise Library. Architecture provides
  standard libraries for asynchronous application initialization,
  enterprise-standard Fine-grained Role-Based Application Security (RBAC),
  core application services, MVVM-based UI view presentation,
  Blend-integrated XAML-styling, and automated build and deployment
  services. The architecture was use for development and successful
  production deployment of a client services support application.
- Under extremely tight deadlines, provided solution architecture for
  the ground-up development of a large strategic custom trading
  application. Created business requirements templates for over 1000
  pages of requirements. Piloted use of SCRUM Application Lifecycle
  Management (ALM) practices and customized TFS process. Developed
  testable MVP UI-presentation model for ASP.NET WinForms application
  model. Piloted use of Visual Studio Database Projects and use of
  Dependency Injection (DI) and the Repository pattern. Application was
  successfully brought into production.
- Greatly improved and standardized development practice by creating
  suite of application development document templates, instituting
  standardized TFS team project design and administration, overseeing
  conversion of all VSS repositories to TFS, and spearheading creation
  of a standardized virtual developer workstation VMWare image with
  managed tooling and licensing. All of these initiatives are in
  production and functioning smoothly.
- Provided strategic assessments of Software Configuration Management
  Strategy, of Custom Application Development Strategy, and for
  Strategies to Mitigate Use of Business Owned Access Databases.
- Developed strategy for Production Business Owned servers in the Data
  Center. Include technical guidelines, regulatory compliant processes,
  and governance model. Strategy was adopted company-wide, implemented,
  and is now in production.

## Axis Capital (Insurance)

> Atlanta, GA

> http://axiscapital.com/

> October 2008 – March 2009

> Solutions Architect (Contract)

Design, and Development of an enterprise application security framework. This framework, developed in .NET using WCF, provides both full Active Directory (AD) integration and SOA web-services compliance for integration with the client's Java and TIBCO services. Provides robust, drop-in, integration for .NET client applications. Implements fine-grained Role Based Access Control (RBAC) utilizing Novalys Visual Guard for delegated application security administration.
Provided leadership in defining and integrating security design, development, governance, and operations across the Development, Infrastructure, and Information Security teams. Highlights include:

- Designed and proposed a security model encompassing the enterprise directory security and application security. Provides clear and consistent security design, development, and management practices.
- Designed and implemented Application Security Services using WCF and the Web Services Software Factory. Provides consistent application security development and management across the Perimeter (i.e., DMZ) and Corporate Active Directory domains.
- Designed and implemented a .NET security client API that is fully integrated with the .NET framework for both Windows and Web Forms applications. Provides virtual turnkey integration of enterprise application security for application development teams.
- Designed an insurance policy application entry and policy management web application using ASP.NET MVC. The design fulfilled requirements for rapid deployment of new lines of business with minimal recoding. This application utilizes the Role Based Application Security Framework I developed.
- Designed and implemented an enterprise application diagnostic message
  framework that allows all enterprise applications to register
  standardized application messages for logging and exception handing.
  This library facilitates operations support by providing standardized,
  indexed messages for enterprise solutions delivery and product support
  personnel.
- Custom enterprise application blocks were delivered using a custom developed enterprise Dependency Injection (DI) façade I developed that can accommodate evolving or heterogonous DI Frameworks. Initial support for the Enterprise Library Unity Application Block.
- Standardized processes for specifying and requesting infrastructure, effectively integrating Development and Infrastructure teams.
- Proposed and designed an enterprise Team Foundation Server implementation. Carried the project through the hardware procurement phase.
- Created standardized processes for application change deployment.

## Kurt Salmon Associates (Labor Management)

> Atlanta, GA

> http://www.kurtsalmon.com/

> August 2007 – September 2008

> Application Designer (Contract)

Analysis, Design, and Development of the calculation engine for the rewrite of a performance management system, GoalPost, using .NET 3.0 and Windows Workflow Foundation (WF) from the current Java based system. Developing a high availability application server solution based on a provider model using Enterprise Library. Incorporates support for SQL Server 2005 and Oracle 10g. Project involved significant analysis, redesign, and formalization of the calculation logic.
Technologies I developed for this project include:

- High availability application service architecture using the database for configuration, messaging, and management. Provides application level hot-failover high availability and centralized management while maintaining very small IT footprint. This architecture greatly reduces implementation and maintenance costs for COTS applications.
- System monitoring and management is provided by Windows Workflow Foundation (WF) workflows. Fall back monitoring provided by database scripts.
- Provider-model based configuration database library. The configuration database is hierarchical and multi-typed. Configured values probe multiple paths so that specialized values can be introduced by administrators in the field.
- Work item (i.e., thread) management library that queues short running work items to the .NET ThreadPool and creates threads for long running work items. Provides a common interface for thread cancellation and termination.
- Thread-based connection configuration library that simplifies connection to multiple source databases. Data Access code can avoid tracking which database to connect to. Configuration is thread-agile so that work item threads benefit from the library.
- These libraries constitute an application server framework used by the firm for application server products.

## Cox Enterprises (Media)

> Atlanta, GA

> http://www.coxenterprises.com

> February 2006 – July 2007

> Enterprise Architect (Contract)

Created the custom software development practice for the Cox Enterprise Corporate and Information Systems (CIS) organization. Created processes, procedures, libraries, utilities, and customizations using Microsoft centric tools such as Visual Studio Team System, SharePoint, and Enterprise Library. Brought organization from an ASP development group with little SCM or SDLC processes to a professional SCM driven organization.

Established Software Configuration Management and Software Development Lifecycle process using Visual Studio Team System RC0. Tasks included:

- Jointly developed design and development team processes with managers and Microsoft Partner Notion Solutions. Participated in configuring Team System and developing a customized Team System process template. Maintained and enhanced process template.
- Developed project build, promotion, and deployment models for application release into enterprise production environment.
- Developed custom development processes and design templates including Software Architecture Document, Security Design Document, User Guide, Recommendations, and Technical Glossary.
- Developed a service development process for enterprise web services using tools I created.
- Developed the organization's first enterprise shared libraries.

Shared libraries I developed include:

- Security client library that integrates with Cox's Global Identity Management infrastructure to provide identity information for the requesting user. Extends .NET 1.1, ASP.NET 1.1, and ASP.NET 2.0 security models by setting a few web.config settings and supports impersonation. Library also supports a task-based security model similar in concept to Windows Authorization Manager (AzMan). Co-designed the the conceptual model for implementing task-based security in the Cox's Web Access Management product.
- BCL Extension library. Included support to convert .NET 1.1 collections to .NET 2.0 Generic Collections. Also includes framework to access roles as enum fields.
- Library that provides access to enterprise environment shared services, such that the the application code accesses services in the same way in all environments without any application configuration.

Solution Architect for Rewrite of Salary Administration application from ASP to ASP.NET 2.0. Executed SCM and SLDC processes I developed. Incorporated Enterprise Library 2.0 and enterprise shared libraries I created. Selected and implemented .netTiers 2 for DAL code generation. Designed and maintained data model (SQL Server 2000).

Solution Architect for Dev/QA Virtualization project. Participated in team choosing virtualization technology. Developed project, solution, and environment business model. Created database to inventory existing projects. Implemented data entry and import processes to populate database using SQL Server 2005 and SSIS. Created analysis of current SCM and SLDC processes and recommended changes.

## Fiserv, Insurance Solutions Division (Financial Services)

> Cedar Rapids, IA
> http://www.fiservinsurance.com/
> July 2005 - January 2006
> Technical Team Lead (Contract)

Designed and led a six to nine person team to develop the calculation engine of an insurance regulatory filing product, eFreedom Annual Statement. Effort was a ground-up rewrite of the flagship product for the market leader. The system was developed in C#. Design is based on the prototype I developed for the customer over a year prior. It is the product of nearly 3000 man-hours of work over the last six months. The calculation engine is the most complex system I have developed to date.

It employs grammar-based parsing technology using Visual Parse++ and CodeDom code generation technique to develop a bottom-up, always in-sync, calculation engine. The system creates a value dependency graph at design time and immediately calculates all dependant values of customer entered data, and persists them to the database. This is implemented within the context of a Windows Forms-based smart-client and ASP.NET Web Services architecture. Client machines automatically calculate individual forms during editing while the web service maintains transactional integrity for value calculations in the multi user environment.

Key features include:

- Visual Parse++ context free grammars for both a legacy proprietary internal formula language and the validation formula language maintained by the National Association of Insurance Commissioners (NAIC).
- Use of the .NET Framework CodeDom code generation technology to define a core scripting engine technology. This technology permits the engine to execute fully compiled scripts at high speed from multiple formula languages.
- The formula language code generator produces formula details scripts that allows display and drill down into the intermediate values within the terms of the formula and permits hyperlinks to underlying values. This gives the accountant unprecedented visibility into formulas.
- The formula details are displayed in an Excel-like formula language that I designed that will replace the legacy formula language.
- The scripting technology enables both runtime execution of custom formulas and a managed automation library for the application.
- This is a significant effort employing many developers over an extremely compressed schedule supporting an extremely complex business model with metadata for thousands of forms and hundreds of thousands of formulas.

## Aon Corporation (Insurance/HR)

> Chicago, IL
> http://www.aon.com
> July 2004 - July 2005
> Senior Application Architect (Permanent)

Acting Enterprise Architect for Aon Consulting Worldwide business unit for the Technical Migration project. Aon has outsourced its infrastructure to CSC and needs to move all of its server software to the new data centers over the next year. Duties include:

- Understand the many facets of the new CSC infrastructure architecture. As a Fortune 250 company, Aon has a very extensive architecture.
- Aid the applications development team in mapping their applications to the new architecture. Hundreds of applications are involved.
- Explain how the new architecture will impact application architecture and the development process.
- Help define appropriate standard installations of middleware to speed the migration/application rationalization process.
- Define a comprehensive application infrastructure requirements document to be used as a basis for ordering and configuring an application's hardware infrastructure.
- Represent the business unit in infrastructure deployment progress meetings to convey business unit problems and needs.
- Help developers resolve issues that arise as they migrate their applications into the new environment.

My position was Aon's Enterprise .NET/Windows Architect. In this role I had these responsibilities:

- Establish best practices and provide technology direction. In this role I prepared and delivered a Web Portal Standards presentation to the development leadership of various Business Units.
- Create and maintain the internal SharePoint Services-based .NET technology web site, dotnetforum.aon.com.
- Convene and manage a monthly .NET technology forum meeting.
- Marshall Enterprise vendor contracts, such as Microsoft beta agreements and Enterprise Licensing agreements.
- Manage Aon's technology relationship with Microsoft. Maintain weekly meetings and track the effectiveness of Microsoft's consulting activities, Technical Account Manager, and Applications Development Consultant. Manage technology presentations given by Microsoft.
- Manage and participate in Microsoft events such as architecture review sessions and Executive Briefing Center event.
- Maintain excellence in technical knowledge though self-study, reviewing industry research, and participation in industry development conferences.
- In support of the Technical Migration effort, I have guided a US-wide presentation of the new Aon's new Active Directory architecture, gathered requirements and researched vendors for a new Secure File Transfer shared service, participated in the design of the Microsoft operating system configuration and middleware standard installations. I also lead the Microsoft Technical Account Manager's involvement in the infrastructure projects of the Technical Migration effort.

## Fiserv, Insurance Solutions Division (Financial Services)

> Cedar Rapids, IA
> http://www.fiservinsurance.com/
> May 2003 - June 2004
> Senior Software Consultant (Contract)

Defined development department architecture and design document standards and templates. Architecture includes my third generation metadata-driven development architecture. Components include:

- Implementation-neutral interface bound to Windows Forms controls and ErrorProvider functionality to provide initialization, validation, error-handling, and mapping to these components.
- Attribute driven implementation that provides initialization and validation constraints for business objects. Support for nine different data types.

Also designed calculation engine technology. Created extensive proof of concept of code transformation technology. The prototype demonstrates:

- Creation of parsers using commercial parser generator Visual Parse++ to translate from two proprietary languages to .NET assemblies.
- Creation of a library so that a new formula language and .NET scripting code can access application formula functions in a way similar to Excel spreadsheet formulas and macros.
- Transformation of the .NET code, using the .NET Framework Class Library CodeDom components to auto-generate evaluation details information so that the intermediary results of any formula can be inspected.

Designed an enterprise .NET product licensing technology. Points of interest include:

- Professional design document including use cases, product comparisons, data flow, deployment and functional design suitable for inter-division review.
- Clear and extensible object design.
- Integration with the .NET licensing model.
- Web Service based license server for 24/7 automated licensing support.

Other components/duties included:

- Developed an integrated multi-level Undo/Redo WinForms library similar to Microsoft Office functionality and integrates with both .NET and Infragistics components.
- Implemented a .NET Remoting architecture that includes encrypted communications and on-demand connection reconfiguration.
- Developed a WinForms context sensitive Nav Panel Action manager that integrates with the Infragistics menu bar.
- Designed and implemented an extensible pessimistic concurrency library.
- Added declarative RI to their SQL Server schema.
- Added various features to their application, working across all software layers.

## Administrative Management Group, Inc (Insurance)

> Arlington Heights, IL
> January 2003 - May 2003
> Application Architect/Designer (Contract)

Designer of core modules of a Defined Benefits administration system for a leading employee benefits firm. Development platform is ASP.NET, ADO.NET and Oracle 9i. Tasks include verifying requirements, determining workflow, designing user interface interaction, and logical database design in a highly competitive, results-driven environment. Modules designed to-date include:

- Reporting Subsystem including a graphical, modular report configuration layout tool.
- Modular Process Scheduling Subsystem.

## Metavante Corporation (Document Management)

> Milwaukee, WI
> https://en.wikipedia.org/wiki/Metavante
> November 2002 - December 2002
> Senior Consultant (Contract)

On this short-term project, was major contributor to the design and implementation of real time document generation services for the document solutions team. Goals included multiplatform support for client and server and rapid implementation. Successfully lobbied for a SOAP Web Service implementation utilizing the new DIME binary attachment specification. Tasks included:

- Designed and implemented a .NET client interface, a COM wrapper, and a sample ASP.NET sample application.
- Created end-user reference documentation.
- Aided in the Apache Axis SOAP web service implementation under JAVA.
- Selected and implemented ACE as the cross-platform network and synchronization library to use to convert the batch-mode document generation engine, written in portable C++, to support real time document generation.

## re:Member Data Services (Financial Services)

> Indianapolis, IN
> December 2001 - October 2002
> Chief Technical Architect, R&D (Contract)

Define, manage and validate the entire software technical design of a multitier web-enabled financial services system. The system is designed for a modular or integrated installation on-site or in an Application Services Provider (hosted) environment. Have brought the development from inception through alpha phase. The entire system is written in C#, fully utilizing .NET technologies, including:
- Visual Studio.NET
- ASP.NET User Controls
- ASP.NET Forms Authentication
- ASP.NET Validation Controls
- Serviced Components (COM+)
- ADO.NET
- .NET Reflection
- .NET Security Model
- Custom Attributes

Responsibilities include:

- Provide overall design strategy for all the database, application server and Web server tiers.
- Oversee the establishment and conformance to development standards and practices.
- Review and validate all functional and technical design documents.
- Resolve all technical issues identified.
- Oversee the selection of third party software products, such as Web controls and message logging software.
- Oversee the technical progress of the project; mentor and aid defect-resolution as needed.
- Personally document the technical design overview.
- Personally design and code the core of the architecture, the metadata XML document, model objects and SQL Server data service.

Technologies I have designed include:

- Metadata driven persistence and validation. Because the data is stored in the database but made available to every tier, this design provides virtually code-free validation at every tier: from web forms and client business objects to serviced components and the database itself. Tight integration with the .NET Reflection library permits virtually code-free persistence across all three tiers.
- WebTask library for ASP.NET. Provides loose coupling between Web pages so that page access is as simple as a function call.
- Heavily factored pages using ASP.NET User Controls. Provides a very high degree of reuse of data editors, search facilities and other components.
- Data exchange library for ASP.NET pages. Provides two-way binding to client-tier business objects via virtually code-free integration with the metadata.
- Data driven multilingual support. Includes AccessKey support.
- Comprehensive .NET role-based security subsystem. Roles can be
  required and granted at the organization, facility, user, machine and
  application levels. Graded rights to resources can be granted to every
  level. Integrates with .NET Forms Authentication for the Web
  application and NT Authentication for Windows and console applications
  and NT Services. Provides seamless integration with middle-tier
  components by utilizing the logical thread call context.
- Data driven navigation for menus and navigation trees. Integrates with security subsystem to provide tiered access to pages.
- Generic Data Services library. Provides metadata driven invocation of Sql Server stored procedures.
- Stored procedure error handling architecture that provides meaningful, object specific error and warning messages.
- Application diagnostics library. Includes exception specification based exception handling and xml driven localized, encoded administrative message logging.
- Custom attribute enabled unit test engine and harness.

## Click Commerce, Inc. (Supply Chain Management)

> Chicago, IL
> https://en.wikipedia.org/wiki/Click_Commerce
> March 2001 - November 2001
> Senior Software Engineer, Infrastructure Team (Permanent)

Senior fulltime member of software infrastructure team for major extranet development company. Created core technology for use by applications development teams.

A principal member in major effort to move to the .NET platform in one of a handful of companies participating in Microsoft's early adopters program. Responsibilities include:

- Designed a comprehensive exception handling library including an exception specification architecture for .NET employing custom attributes.
- Designed an extensible, localized system-level logging library for .NET.
- Primary designer of a .NET persistent object library for Click's proprietary XML/COM based persistence library, CMDB.
- Participated in design and development of .NET unit test engine.

Developed various COM objects and utilities using VC++/ATL/STL:

- Developed a configuration database COM object.
- Developed COM objects and methods for importing data into the CMBD batching, surrogate key lookup, and foreign key fixups.
- Designed and developed the command line utility that interfaced with the various import methods I developed.

## Fluid, Inc. (Software Development Consulting)

> San Francisco, CA
> http://www.fluid.com
> March 2000 - February 2001
> Senior Server Applications Engineer (Permanent)

As a fulltime member of a web site development consulting company. I gained proficiency in Java for web server applications programming on both the Dynamo and Weblogic platforms. Tasks included developing architectural Java code using UML, creating Oracle upgrade script using PL/SQL and developing an MS SQL Server replication scheme.

- Created several administrative and maintenance pages for Coursemetric, an online curriculum survey company, using JDBC, ATG Dynamo and Oracle PL/SQL
- Created load test data for LevelEdge, an online high school sports statistics company, also using JDBC, ATG Dynamo and Oracle PL/SQL
- Designed and developed generic logging technology for J2EE development
- Investigated J2EE security integration for Caucho Resin, a low-end J2EE application server, and Weblogic
- Investigated container managed persistence performance of Weblogic/TOPLink by comparing to direct JDBC calls in a test environment
- Developed a TCP/IP database replication scheme on SQL Server 7.0 for Comdisco
- Investigated and presented Microsoft's .NET technology to the Engineering team.

Sole developer of web catalog working demo for Nasco Technologies, a manufacturing services firm. Developed extensive MS SQL Server database and ASP code. In this effort I developed several TSQL stored procedures for dynamic data import and processing.

Designed and developed code for interfacing with financial exchanges for a client in the financial industry, Enterprise Logic Systems, using VC++/ATL/STL. Exchange interfaces wrapped include the CBOE Hand Held interface and the ISE interface. Also investigated the LIFFE and OM exchange interfaces.

## Arial Systems Corporation (Location Management)

> Vernon Hills, IL
> June 1998 - March 2000
> Senior Analyst/Programmer (Permanent)

Developed client and server software for real-time locating system.

Sole designer/developer for Windows 98 client program and Windows NT 4.0 service for communicating location status from USB locating sensors. System was based on DCOM for communication. Project was brought through Alpha phase. Both programs were heavily multi-threaded using a powerful synchronization library that I developed; COM classes were ATL-derived MTA classes and I developed complex data structures and algorithms for locating utilizing STL.

Designed and developed a Winsock-based messaging library to replace DCOM so the system can interact with embedded systems. This full featured library creates message objects that can be marshaled cross-platform using a binary standard, can be attached to arbitrary communications transports (not just sockets) and employs message parameters of data fields and records of data fields (struct-like), maintains in, out, and in-out parameters and supports version negotiation and optimized data transfer between parties. This library was primarily of my design, implemented by a co-worker, and based on a powerful library wrapping Win32 I/O and Socket APIs that I developed.

I wrote and stabilized several client and NT service components for the locating system over the course of a year and a half. Along the way I developed a very comprehensive system software library that wraps many Win32 Api's such as: Event Logging, Registry, Synchronization objects, thread-safe data structures such as thread pools, I/O, IOCP, Winsock, Locale, Time, Debug Output, Exception Handling, COM, Console Api's, etc. These C++ libraries ease the transition to 100% MFC-free system code and demonstrate a mastery of the language, including templates and STL. In fact, I published the debug output library in the May '99 issue of C++ Report.

## HBOC (Medical Services)

> Wheeling, IL
> June 1997 - June 1998
> Systems Architect (Permanent)

Fulltime architect/developer for multi-million-dollar division of health care software company. Member of the infrastructure group that designed core technology, chose development tools, and specified software development practices.

Systems designer/developer for Periop medical application.

With a co-worker designed a data service COM object protocol that was implemented by VB and C++ COM objects.

Designer and developer of data and interface C++-to-COM adapter classes called Persistent Objects. These are C++ data objects that implement member functions such as Insert, Update, and Delete on single and multiple objects. Very complex templated base classes handled adapting C++ object interfaces to the above data service COM objects. Plumbing for updating only modified fields was also implemented. After I left, a Visual C++ wizard was developed to automate the simple boilerplate code needed to implement a specific Persistent Object class. This multi-developer application is in production.

Architect/developer of a comprehensive, generic Windows NT database loader application that loads large ASCII data files into SQL Server database using ODBC. Developed control file language that allows complex logic, surrogate key lookup, and stored procedure calls to populate database tables. The application, written in C++ under the VC++ 5.0 is highly optimized for throughput and is in production.

## GroupWorks Technologies, Inc. (Software Development Consulting)

> Evanston, IL
> January 1994 - June 1997
> Senior Software Engineer (Permanent)

Fulltime senior consultant for development and consulting firm. Have effectively utilized expertise in project management, project administration, object oriented development, and database and communications software design.

Development manager of multi-million dollar high growth startup telecommunications firm, Plextel. Gaining experience in project management and other managerial skills, I professionalized the development department for a highly profitable mission-critical expert system based computer dating service developed using OS/2 and Oracle.

- Established extensive software development infrastructure while managing a team of four developers and four quality assurance staff having released more than eight maintenance releases in under a year.
- Was instrumental in the creation of a software patent application and in the successful sale of the firm.

Member of team developing highly successful United Connection travel
reservation retail software for United Airlines. The product was a joint
effort between United Airlines, Microsoft Consulting Services, and
GroupWorks. Project targeted the Windows 3.1 and Windows 95 platforms
and was developed using Visual C++ 2.0 on the Windows NT platform. It
was a two year effort employing 9 developers and 5 QA staff.

- Exercised project administration and testing expertise to train QA staff on development environment setup, version control software and procedures, build administration and automation, and regression test development and procedures.
- Employed communications software expertise to implement packet data transfer protocol object and general communications subsystem design.
- Developed the application's application printing/reporting subsystem.
- Developed robust installation software on three platforms.

Developed data interchange and database functionality for major financial trading firm, Swiss Bank. Software was developed under the NextStep operating system.

- Utilized data-model object expertise to develop external data import/export mechanism. Library features include concise, user readable file format; clear language grammar; object identity determination; forward, backward, and nested reference resolution; and parsing error reporting and recovery.
- Developed object-key technology for client's internally developed versionable, object oriented, client-server DBMS (OODBMS) built on Sybase.

## Dynatec Systems Corp (Sales Force Automation)

> Buffalo Grove, IL
> January 1993 - January 1994
> Software Engineer (Permanent)

As a fulltime employee, I developed software for sales force automation firm in the MS C 7.0/DOS environment.

Gained experience in communications software development and further experience in object based design.

Designed communications subsystem. Developed strategic client-server communications software.

Key technology researcher. Selected server hardware platform and communications peripherals.

Co-designed communications messaging and file transfer protocol and multitasking server software.

Developed e-mail post office. Designed and implemented store and forward server library. Functionality includes remote login and password verification, user and group address resolution, mail routing and database management functionality.

## First National Bank of Chicago (Banking)

> Chicago, IL
> https://en.wikipedia.org/wiki/First_Chicago_Bank
> July 1992 - January 1993
> Software Development Consultant (Contract)

Continued consulting activities at First National Bank of Chicago (FNBC) begun at Whitewater.

Consulted on final debug/test phase of MS-Windows based global funds transfer application (FW2000). Key member on performance tuning team.

Participated in analysis and implementation of several important performance optimizations that allowed FW2000 to meet performance goals on low-end 386 machines.

Responsible for debugging several key areas of FW2000 including database, user-interface components, printing, and forms.

The FW2000 application was a two year development effort requiring approximately 10 man years of design and implementation time alone and utilizing a development team consisting of 7 to 10 members.

## Whitewater Group (Software Development)

> Evanston, IL
> https://en.wikipedia.org/wiki/Whitewater_Group
> October 1991 - July 1992
> Software Development Consultant (Contract)

Member of two project teams. Gained expertise in object-oriented design of database, printing, and user-interface facilities.

Consulted on FW2000 project for FNBC--Whitewater and FNBC worked jointly to develop FW2000. The FW2000 application was developed in Actor, a Smalltalk-like object-oriented programming environment for MS-Windows. Co-developed two major subsystems of the application, a database framework for Paradox database engine and a specialized printer and report document framework, as well as other key user-interface components.

The database framework, ADBQuery Database Framework (QFX), is a class library that provides an object-oriented interface to the Paradox database engine. QFX is a comprehensive class library that supports high-level database modeling, management, access, and manipulation operations. Key design features of the framework include the ability to perform mapping between business-model objects in memory and tables in the database. They also include the capability to carry out simplified record-oriented operations.

The printing and reporting class framework implements all printing and reporting functionality in FW2000. The framework consists of a comprehensive set of classes that support formatted reports of object details, files, and summary information.

The MS-Windows user-interface controls support virtualized viewing of database tables and large data lists. These controls solved major memory limitation problems inherent in MS-Windows list- and combo-boxes.

Member of development team that built an MS-Windows based quality assurance tracking and planning application designed for the health-care industry. Designed and implemented database access and business-model infrastructure of the system. The application was written in Actor.

## The Whitewater Group (Software Development)

> Evanston, IL
> https://en.wikipedia.org/wiki/Whitewater_Group
> May 1990 - September 1991
> Member Technical Staff (Permanent)

Participated in three development efforts. Gained expertise in testing procedures and in the MS-Windows architecture.

Member of development team that developed the ObjectWindows application framework (OWL), a user-interface class library for MS-Windows. Whitewater developed OWL for Borland International, which included OWL as a significant part of its products Borland C++ with Application Frameworks and Turbo Pascal For Windows.

Developed test suite for testing ObjectWindows for C++ and Turbo Pascal. The test suite required development for both language platforms (i.e., written in C++ and Turbo Pascal). This was a major piece of work which tested all public interfaces to the class libraries.

Member of team that designed and implemented a more limited database class library for Paradox database engine. The class library was written in C++.

Produced test plan for public interface and trained personnel in the testing procedures I developed.

Member of team that ported ObjectGraphics class library to Borland C++. ObjectGraphics is an object-oriented graphics class library for MS-Windows.

## Center for the Computer Analysis of Texts, University of Pennsylvania (Non-Profit)

> Philadelphia, PA
> http://ccat.sas.upenn.edu/gopher/
> August 1987 - April 1990
> Programmer

Member of team that developed a comprehensive application for the analysis of ancient texts for the IBM PC.


text:
<link rel="stylesheet" type="text/css" href="/devwidgets/footer/css/footer.css" />

        <button type="button" class="s3d-link-button" id="footer_logo_button" title="__MSG__SHOW_DEBUG_INFO__">

</button>

<button type="button" class="back-top s3d-link-button"style="display:none;">__MSG__TOP__</button>

__MSG__OAE__

__MSG__COPYRIGHT_SYMBOL__ __MSG__UC_REGENTS__ and __MSG__THE_SAKAI_FOUNDATION__  __MSG__ALL_RIGHTS_RESERVED__

__MSG__LANGUAGE__: <button id="footer_language" class="s3d-link-button" title="__MSG__CHANGE_LANGUAGE__"></button>

__MSG__LOCATION__: <button id="footer_location" class="s3d-link-button" title="__MSG__CHANGE_LOCATION__"></button>


text:
	local suite =  test.declare("vstudio_vs2010_files")
	local vc2010 = premake.vstudio.vc2010

--
-- Setup
--

	local sln, prj

	function suite.setup()
		sln = test.createsolution()
	end

	local function prepare()
		prj = premake.solution.getproject(sln, 1)
		vc2010.files(prj)
	end

--
-- Test filtering of source files into the correct categories.
--

	function suite.clInclude_onHFile()
		files { "include/hello.h" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ClInclude Include="include\hello.h" />
	</ItemGroup>
		]]
	end

	function suite.clCompile_onCFile()
		files { "hello.c" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="hello.c" />
	</ItemGroup>
		]]
	end

	function suite.resourceCompile_onRCFile()
		files { "resources/hello.rc" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ResourceCompile Include="resources\hello.rc" />
	</ItemGroup>
		]]
	end

	function suite.none_onTxtFile()
		files { "docs/hello.txt" }
		prepare()
		test.capture [[
	<ItemGroup>
		<None Include="docs\hello.txt" />
	</ItemGroup>
		]]
	end

	function suite.customBuild_onBuildRule()
		files { "hello.cg" }
		configuration "**.cg"
			buildcommands { "cgc $(InputFile)" }
			buildoutputs { "$(InputName).obj" }
		prepare()
		test.capture [[
	<ItemGroup>
		<CustomBuild Include="hello.cg">
			<FileType>Document</FileType>
			<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cgc $(InputFile)</Command>
			<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InputName).obj</Outputs>
			<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cgc $(InputFile)</Command>
			<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InputName).obj</Outputs>
		</CustomBuild>
	</ItemGroup>
		]]
	end

	function suite.customBuild_onBuildRuleWithMessage()
		files { "hello.cg" }
		configuration "**.cg"
			buildmessage "Compiling shader $(InputFile)"
			buildcommands { "cgc $(InputFile)" }
			buildoutputs { "$(InputName).obj" }
		prepare()
		test.capture [[
	<ItemGroup>
		<CustomBuild Include="hello.cg">
			<FileType>Document</FileType>
			<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cgc $(InputFile)</Command>
			<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InputName).obj</Outputs>
			<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling shader $(InputFile)</Message>
			<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cgc $(InputFile)</Command>
			<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InputName).obj</Outputs>
			<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling shader $(InputFile)</Message>
		</CustomBuild>
	</ItemGroup>
		]]
	end

--
-- If a PCH source is specified, ensure it is included in the file configuration.
--

	function suite.precompiledHeader_onPchSource()
		files { "afxwin.cpp" }
		pchheader "afxwin.h"
		pchsource "afxwin.cpp"
		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="afxwin.cpp">
			<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
			<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
		</ClCompile>
	</ItemGroup>
		]]
	end

--
-- If a file is excluded from a configuration, make sure it is marked as such.
--

	function suite.excludedFromBuild_onExcludedFile()
		files { "hello.cpp" }
		configuration "Debug"
		removefiles { "hello.cpp" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="hello.cpp">
			<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
		</ClCompile>
	</ItemGroup>
		]]
	end

	function suite.excludedFromBuild_onExcludeFlag()
		files { "hello.cpp" }
		configuration "hello.cpp"
		flags { "ExcludeFromBuild" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="hello.cpp">
			<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
			<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
		</ClCompile>
	</ItemGroup>
		]]
	end

--
-- If two files at different folder levels have the same name, a different
-- object file name should be used for each.
--

	function suite.uniqueObjectNames_onSourceNameCollision()
		files { "hello.cpp", "greetings/hello.cpp" }
		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="greetings\hello.cpp" />
		<ClCompile Include="hello.cpp">
			<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\hello1.obj</ObjectFileName>
			<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\hello1.obj</ObjectFileName>
		</ClCompile>
	</ItemGroup>
		]]
	end

--
-- Check handling of per-file forced includes.
--

	function suite.forcedIncludeFiles()
		language "C++"
		files { "hello.cpp" }
		configuration "**.cpp"
			forceincludes { "../include/force1.h", "../include/force2.h" }

		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="hello.cpp">
			<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\include\force1.h;..\include\force2.h</ForcedIncludeFiles>
			<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\include\force1.h;..\include\force2.h</ForcedIncludeFiles>
		</ClCompile>
	</ItemGroup>
		]]
	end

--
-- Check handling of per-file command line build options.
--

	function suite.additionalOptions()
		language "C++"
		files { "hello.cpp" }
		configuration "**.cpp"
			buildoptions { "/Xc" }

		prepare()
		test.capture [[
	<ItemGroup>
		<ClCompile Include="hello.cpp">
			<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/Xc %(AdditionalOptions)</AdditionalOptions>
			<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/Xc %(AdditionalOptions)</AdditionalOptions>
		</ClCompile>
	</ItemGroup>
		]]
	end


text:
/**
 *
 */
package it.polimi.hegira.utils;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;

import org.apache.log4j.Logger;

/**
 * @author Marco Scavuzzo
 *
 */
public class PropertiesManager {
	private static Logger log = Logger.getLogger(PropertiesManager.class);

	private static String getPropertyFromFile(String file, String propertyKey){

		Properties props = new Properties();
		URL resource = Thread.currentThread().getContextClassLoader().getResource(file);

		try {
			InputStream isr = new FileInputStream(resource.getFile());
			props.load(isr);
			return props.getProperty(propertyKey);
		} catch (FileNotFoundException | NullPointerException e) {
			log.error(file+" file must exist!");
		} catch (IOException e) {
			log.error("Unable to read file "+file+"!");
		} finally {
			props=null;
		}

		return null;
	}

	public static String getQueueProperty(String propertyKey){
		return getPropertyFromFile(Constants.QUEUE_PATH, propertyKey);
	}

	public static String getZkProperty(String propertyKey){
		return getPropertyFromFile(Constants.ZK_PATH, propertyKey);
	}
}