Adobe AIR to execute program

With AIR 2.0 you now can: if(NativeProcess.isSupported) { var file:File = File.desktopDirectory; file = file.resolvePath(“StyleLookupold.exe”); var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var process:NativeProcess = new NativeProcess(); process.start(nativeProcessStartupInfo); } You also need to add this to your descriptor file. <supportedProfiles>extendedDesktop</supportedProfiles>

Can maven projects have multiple parents?

Even though maven projects have single parent, they can import any number of other pom’s like this: <dependencyManagement> <dependencies> <dependency> <groupId>org.example</groupId> <artifactId>my-shared-dependencies</artifactId> <version>0.0.1-SNAPSHOT</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> This has two important differences compared to a parent: Plugins defined in the imported pom won’t be imported Dependencies defined in the imported pom won’t be added … Read more

SQLite Parameters – Not allowing tablename as parameter

Generally one cannot use SQL parameters/placeholders for database identifiers (tables, columns, views, schemas, etc.) or database functions (e.g., CURRENT_DATE), but instead only for binding literal values. With server-side support for parameterized (a.k.a. prepared) statements, the DB engine parses your query once, remembering out the peculiars of any parameters — their types, max lengths, precisions, etc. … Read more

How to deal with Number precision in Actionscript?

This is my generic solution for the problem (I have blogged about this here): var toFixed:Function = function(number:Number, factor:int) { return Math.round(number * factor)/factor; } For example: trace(toFixed(0.12345678, 10)); //0.1 Multiply 0.12345678 by 10; that gives us 1.2345678. When we round 1.2345678, we get 1.0, and finally, 1.0 divided by 10 equals 0.1. Another example: … Read more

What is the best way to get the minimum or maximum value from an Array of numbers?

The theoretical answers from everyone else are all neat, but let’s be pragmatic. ActionScript provides the tools you need so that you don’t even have to write a loop in this case! First, note that Math.min() and Math.max() can take any number of arguments. Also, it’s important to understand the apply() method available to Function … Read more

Flex: Is it possible for a changewatcher to watch multiple variables?

From the Documentation, it is not possible: “A single ChangeWatcher instance can watch one property, or a property chain. A property chain is a sequence of properties accessible from a host object. For example, the expression obj.a.b.c contains the property chain (a, b, c).” In my case the properties are not part of the same … Read more

tech