Creating a Custom WorkItemHandler in jBPM for Eclipse

Assuming you have Eclipse and the jbpm dependencies installed correctly via maven you can create custom work items with the following steps:

#1 Under src/main/resources/ in your eclipse project create a file called "CustomWorkItem.wid" where you put your custom workitem definition:

import org.drools.process.core.datatype.impl.type.StringDataType;

[
[
"name" : "CustomWorkItem",
"parameters" : [
"keywords" : new StringDataType(),
"limit" : new StringDataType()
],
"displayName" : "CustomWorkItem"
]
]

Creating a Custom WorkItemHandler in jBPM for Eclipse

I had to create a custom WorkItemHandler for jBPM in Eclipse to execute my own code when reaching a specific node in a Business Process, since a ScriptTask (which allows to execute code) was not enough because it does not allow to manipulate Process variables. A custom WorkItemHandler would also allow for better maintainability of the Business Process because it does not depend on scripts hidden in the process definition, but is directly visible in its own java class.

Use latexdiff utility with "flatten" flag to see differences between two latex based documents

In order to see differences between two latex generated documents, one can use a program called latexdiff: https://www.sharelatex.com/blog/2013/02/16/using-latexdiff-for-marking-c...

latexdiff is a Perl script and requires an installation of Perl 5.8 or higher.

If you are a Windows user, you will have to go through the following setup to get latexdiff working on your machine:

1) Install Perl
2) Download latexdiff from CTAN (Comprehensive TeX Archive Network)

Manipulating machine learning datasets in VS .net

This article solves the following challenge: 

Manipulating machine learning datasets in VS .net

Manipulating machine learning datasets in VS .net

As a task for a Business Intelligence exercise I was looking for a simple C#-library to read/write/manipulate Weka attribute-relation file format (ARFF) files. The library should ideally already be pulished in the official NuGet Gallery repository to simply be used within Visual Studio 15 and the integrated NuGet-package manager.

Using the ngModel directive inside a 'banana' bracket

Simply put the code that is required on the html side:

< input [(ngModel)]="username">

The ngModule directive is inside an infamous 'banana' bracket

Code in i.e. Typescript:

username: string;

Read more about two-way bindings in angular2 here: http://blog.thoughtram.io/angular/2016/10/13/two-way-data-binding-in-angular-2.html

Use putExtra(...) function to pass values between Android activities

Intent class function putExtra(String name, char[] value) is able to add extended data to the intent. The first parameter (name) must include a package prefix. For example if we wanted to create a new email activity and pass the value some email address we would do the following (assume we call from activity class):
Intent email = new Intent(getActivity(), EmailActivity.class);
email.putExtra(MainActivity.CURRENT_EMAIL, "someemail@domain.com");

Disabling Fast Startup

On some Systems the fast startup feature is selected by default in Power Options /System Settings. Wake on LAN needs this Setting unchecked to work properly.
If the checkbox is not available under Shutdown settings, fast startup can be disabled in the registry editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power

HiberbootEnabled DWORD

0 = Turn off fast startup
1 = Turn on fast startup

Start spotify manually

The solution was fairly simple but tricky to find with experimenting.

At first I found out, that spotify has a option "Start Spotify on Login". I deactivated it and restarted Spotify manually. And suprisingly: Spotify started on the second screen as wished.

But the function that Spotify starts on Login is convenient. So I put a shortcut of Spotify.exe manually in the windows autostart folder:
C:\Users\[User]\AppData\Roaming\Spotify\Spotify.exe
in
C:\Users\[User]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Wake on LAN not working under Windows 10

After upgrading from Windows 7 to Windows 10, wake on LAN does not work anymore.

Pages

Subscribe to TechScreen Revised RSS