Jace now available for Xamarin.Android

February 26, 2014 3 comments

Most of you probably already heard of Xamarin. Their products allow to develop in C# for IOS and Android. The core of Xamarin is based on the Mono CLR, so although you will not have 100% compatibility with standard .NET code, must applications and frameworks should run with some minor modifications. If you want to know the effort needed to migrate your C# code to IOS or Android, you can try their .NET Mobility scanner (http://scan.xamarin.com).

I did the test by scanning Jace and discovered that a port to Android could be done with a limited amount of work. The release of Jace 0.8.5 is the result of this work. Due to limitations of Apple on IOS (no dynamic code), a port to IOS will take some additional time. But this is definitely on the roadmap for Jace.

2014-02-22 13_16_54-5554_MonoForAndroid_API_14

You can find the new release of Jace at the usual places:

Categories: Jace.NET

Book Review: The Silent Intelligence – The Internet of Things

February 18, 2014 Leave a comment

The Silent Intelligence - Book Cover

Recently, I stumbled upon the book “The Silent Intelligence”. The book is an introduction to the internet of things. It is one of these books that after reading 20 pages, you are just hooked and you want to continue to read it until it is completely finished.

The internet of things is a term you frequently hear about in regular and tech press, but it is a term that is rather vague for the general audience. Most people think it means stuff like fridges allowing you to check your mail, configuring your TV over the internet to record a certain TV show, etc. But this has nothing to do with the Internet of Things.

As the book also clearly explains, the internet of things is about smart sensors and devices that collect statistics for machine driven decisions and processes. It about systems that can measure and predict if you will have a heart attack before you will actually have it, connected cars to reduce car accidents, ERP systems that exactly track the location and condition of specific goods, …

The book follows a practical approach and explains many examples, both existing systems and new business models of which the authors believe they will appear in the (near) future. People with an entrepreneurship mindset, will find it a great source of inspiration to extend their current business vision or business model, or maybe for the next big innovation ;-)

A recommended read!

Categories: Book Review

Jace.NET 0.9: your input is appreciated!

February 12, 2014 15 comments

Most of the last previous releases were limited and only introduced bug fixes or new mathematical functions. Jace.NET has already a complete support for all the standard math, but for the next release I have decided to increase the scope: from version 0.9 forward Jace.NET will have full support for matrices!

The following syntax is planned:

  • Definition of a matrix: A = [1,2,3;4,5,6;7,8,9]
  • Scalar multiplication: 3*A
  • Matrix multiplication: A*B
  • Transpose: A’ or transpose(A)
  • Select a matrix element: A[2,3]
  • New functions: ones(3,3), zeros(3,3)

For the initial 0.9.x release(s), I have foreseen the following constraints to simplify the initial support for matrices:

  • It will not be supported to use variables in matrix elements: so the following syntax will initially not be allowed: [1,2,3;4,var,6;7,8,9]
  • All matrix elements will be interpreted as doubles in the engine (not as integers)

And now comes the part where you are involved as a reader: I would really like have your input.

  • Would this satisfy you (matrix) needs?
  • Is the proposal ok?
  • Are the constraints acceptable?
  • Besides matrix support, what else would you like to see in Jace.NET?

Hope to hear from you guys! Smile

Categories: C#, Jace.NET

Native tick sound on button click with PhoneGap

January 20, 2014 3 comments

PhoneGap is a good framework to build hybrid applications, but for a great usability the devil is in the detail. A difference with native buttons is that HTML5 rendered hyper-links don’t produce a click sound with PhoneGap. Such small difference gives directly a non standard user experience to your app. So I came up with a small PhoneGap plug-in to fix this small annoyance.

Java code:

public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException {
	if("click".equals(action)) {
		try {
			cordova.getActivity().runOnUiThread(new Runnable(){
				public void run(){
					try {
						View view = cordova.getActivity().getWindow().getDecorView();
						view.playSoundEffect(SoundEffectConstants.CLICK);
					}
					catch(Exception ex) {
						callbackContext.error(ex.getMessage());
					}
				}
			});
		}
		catch(Exception ex) {
			callbackContext.error(ex.getMessage());
		}

		return true;
	}

	return false;
}

JavaScript code:

$(function() {
	$(document).on("click", ".sound-click", function() {
		cordova.exec(function () { },
					function () { },
					"SoundEffects",
        			"click",
        			[]);
	});
});

In order to have the click sound, it it sufficient to add the “sound-click” class to your HTML5 buttons (and jQuery referenced in your page).

Categories: Cordova, Java, PhoneGap

Changing the supported media types of the default media formatters in the ASP.NET Web API client library

January 15, 2014 Leave a comment

A couple of days ago, I encountered an issue when calling a REST service. The REST service was returning JSON data, but the content type in the HTTP header was set to “text/javascript”. This caused the default JSON formatter of the ASP.NET Web API client not to recognize the data (he expects “application/json”). It took me a while to find this proper solution as I wanted to avoid creating a custom formatter, but the ASP.NET Web API client library allows to modify the supported content types for the default content formatters.

HttpClient client = new HttpClient();

MediaTypeFormatterCollection formatters = new MediaTypeFormatterCollection();
formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/javascript"));

HttpResponseMessage response = await client.GetAsync(url);
SearchResult result = await response.Content.ReadAsAsync(formatters);
Categories: ASP.NET Web API, C#, REST

Compiled Zip package for Jace 0.8.4

January 8, 2014 Leave a comment

Jace.NET is a mathematical calculation engine for .NET that can parse and execute strings containing mathematical formulas. More information on Jace can be found in previous articles published on this blog or in the following codeproject article: http://www.codeproject.com/Articles/682589/Jace-NET-Just-another-calculation-engine-for-NET.

Previously, the only way to obtain an already compiled version of Jace.Net was to use NuGet. Although I am still convinced that nowadays the recommended way to add frameworks to Visual Studio projects should be NuGet, I understand that this is not always possible. Especially in enterprise environments. For people in such situations, I have created a zip based version of Jace.NET. This zip package contains compiled versions of Jace for .NET 4.x, Windows Store, Windows Phone 7 and Windows Phone 8.

The zip version can be downloaded using the following link: https://github.com/pieterderycke/Jace/releases/download/0.8.4/Jace.0.8.4.zip.

All future zip packages will be published on the following GitHub page: https://github.com/pieterderycke/Jace/releases.

The assemblies in the zip package are currently not strongly signed. If you would rather prefer strongly singed assemblies, you can let me know by mail or by leaving a comment.

Categories: C#, Jace.NET

Release of Jace.NET 0.8.3

August 28, 2013 Leave a comment

A new version of Jace.NET has been released that includes fixes for two bugs that were identified by Mikael Palmblad. It is recommended for all users to upgrade. The latest version of Jace.NET can be found on GitHub and NuGet

https://github.com/pieterderycke/Jace

https://www.nuget.org/packages/Jace

Besides the bugfixes, two additional functions were added to Jace.NET: ifless and ifmore. Both functions accept four parameters:

ifless(a, b, c, d)
If a > b then return c else d

ifmore(a, b, c, d)
If a > b then returns c else d

Categories: Jace.NET
Follow

Get every new post delivered to your Inbox.

Join 28 other followers