Java to implement TransformationDictionary PMML model - java

I know there is jpmml, but it seems the jpmml only supports evaluator part from PMML.
I have a PMML model file exported from KNIME Category to Number node, and I need it in Java. some of its content like below shown:
<TransformationDictionary>
<DerivedField displayName="LIVE_STS" name="LIVE_STS*" optype="continuous" dataType="integer">
<Extension name="summary" extender="KNIME" value="Generated by KNIME - Category2Number node"/>
<MapValues outputColumn="out" dataType="integer">
<FieldColumnPair field="LIVE_STS" column="in"/>
<InlineTable>
<row>
<pmml:in>N</pmml:in>
<pmml:out>0</pmml:out>
</row>
<row>
<pmml:in>L</pmml:in>
<pmml:out>1</pmml:out>
</row>
</InlineTable>
</MapValues>
</DerivedField>
Above is only a part of it.
Any package in java can implement the logic? or if jpmml could do, which package should I use please?

I already asked the member of jpmml as issue in github.
check out this link:
the_link
it gave an alternative for this issue, which solved the problem in another way.

Related

Zk framework 6.5.3 binding with composer using E.L

I am using this code. Which is working very good.
<window id="win" xmlns:w="http://www.zkoss.org/2005/zk/client" apply='MyComposer'>
<textbox value="#{$composer.student.name}"/>
But i want to use something like this
<cell width='$composer.fullWidth?"70%":"50%"'>
In my composer I have a boolean fullWidth with the proper getter but I cannot reference it with the composer. I have tried a lot but nothing seems to work.
I have try
<cell width='#{$composer.fullWidth}?"70%":"50%"'>
<cell width='{$composer.fullWidth}?"70%":"50%"'>
<cell width='#{composer.fullWidth}?"70%":"50%"'>
Another question: if I have a code like this:
<textbox id='test' if='expression'/>
How can I the or use the if using Java code? Is it not possible?
Something like:
test.setIf(boolean???????)
First of all, please use correct MVVM.
The #{} is a buggy version from zk6.0 to created MVVM.
You even can't find that back in the ZK documentation!
With real MVVM :
#load(vm.fullwidth?'70%':'50%')
Second question:
The if attribute a special one. Only static binding works here because if it's evaluated false, the component will not been rendered in the DOM.
So either use visible, or use in javacode an extra check if you may add this component to the DOM.

Android Softkeyboard Code list

is there a list of possible android codes out there?
I'm using the Android IME to create a custom softkeyboard.
My current XML file looks like this:
<Row>
<Key android:codes="52" android:keyLabel="4" />
<Key android:codes="53" android:keyLabel="5" />
<Key android:codes="54" android:keyLabel="6" />
</Row>
<Row>
Currently my keyboard works but I want to know what kind of keycodes I can use.
So my question is, where can I get a list of codes I can use for my softkeyboard. I only found some Keycodes from the android Documentation but they dont work.
I hope you guys can help me
Maybe you're looking for something like Generic.kl
You can also find it in "/system/usr/keylayout/", there are a loot of *.kl file.

Tool or schema that describes Adobe Premiere Pro

I have some data outside that i would like to use to create certain edit effects in Adobe Premiere Pro. Rather than editing by hand adding keyframes over time with my data i would like to automate this and write or use a tool to create an XML fragment and update the project file.
I have looked at the XML and some properties are evident. However most data is hidden away as comma separated values, which of course means theres no self documenting tag name. I am therefore after a schema or documentation that describes the format of some or all effects.
<VideoComponentParam ObjectID="48" ClassID="fe47129e-6c94-4fc0-95d5-c056a517aaf3" Version="8">
<Node Version="1">
<Properties Version="1">
<ECP.Angle.Expanded>false</ECP.Angle.Expanded>
<ECW.Parameter.VelocityHeight>54</ECW.Parameter.VelocityHeight>
</Properties>
</Node>
<RangeLocked>false</RangeLocked>
<ParameterID>5</ParameterID>
<CurrentValue>0.</CurrentValue>
<UnitsString></UnitsString>
<UpperBound>32767.</UpperBound>
<LowerBound>-32768.</LowerBound>
<Keyframes>913287043468800,270.,0,0,0,0.166667,-32.4615,0.166667;914685944772533,91.230003356934,0,0,-32.4615,0.166667,14.5418,0.166667;916236575654400,180.,0,0,14.5418,0.166667,-11.4292,0.166667;920237090572800,0.,0,0,-11.4292,0.166667,0,0.166667;</Keyframes>
<StartKeyframe>-91445760000000000,0.,0,0,0,0,0,0</StartKeyframe>
<ParameterControlType>3</ParameterControlType>
<DiscontinuousInterpolate>false</DiscontinuousInterpolate>
<IsLocked>false</IsLocked>
<IsTimeVarying>true</IsTimeVarying>
<Name>Rotation</Name>
</VideoComponentParam>
The interesting tag is of course the Keyframes, which appears to include the keyframe, rotation degrees and some other numbers. I havent yet decyphered the first value which is obviously the timestamp.
Any help in undetrstnding the XML is appreciated.
ADOBE FORUMS
http://forums.adobe.com/thread/962485
Todd_Kopriva, 14-Feb-2012 00:18 in reply to br4ime Report No, there is not any public documentation about the structure of the
Premiere Pro project file format. Was this helpful? Yes No
FINAL CUT PRO XML
I have exported a simple project to Final Cut Pro XML and it appears to be functional but in the above case about rotation over several keyframes, the FCP file has far fewer values.
<parameter authoringApp="PremierePro">
<parameterid>rotation</parameterid>
<name>Rotation</name>
<valuemin>-8640</valuemin>
<valuemax>8640</valuemax>
<value>0</value>
<keyframe>
<when>107634</when>
<value>123</value>
</keyframe>
<keyframe>
<when>107784</when>
<value>124</value>
</keyframe>
<keyframe>
<when>107934</when>
<value>126</value>
</keyframe>
</parameter>
Here is full description of Final Cut XML format. it is same as Premiere XML.
Go to developer.apple.com and find the document that describes FinalCutPro XML format, it's exact the same as Premiere pro XML. The structure is simple, for example this is sequence block format:
<?xml version="1.0" encoding="UTF-8"?>
<xmeml version="3">
<sequence>
<name>Sequence 1</name>
<duration></duration>
<rate>. . .</rate>
<timecode>. . .</timecode>
<media>
<video>
<format></format>
<track></track>
</video>
<audio>
<format></format>
<outputs></outputs>
<track></track>
<track></track>
</audio>
</media>
</sequence>
</xmeml>
direct link is:
https://developer.apple.com/appleapplications/download/FinalCutPro_XML.pdf
THe best solution is to make changes and study the file differences with your favourite diff'ing tool. Its not terribly difficult to understand small fragments and hand edit the XML. Naturally its a pain to make a change and reload the project file and observe the changes, buts its doable.

Google AdWords Java API: Help unmarshal Ad Hoc Report

I'm using google-api-adwords-java to download some Ad Hoc AdWords reports.
The library helps me to build the request xml through usage of:
com.google.api.adwords.lib.utils.v201109.ReportUtils.toXml(reportDefinition)
I am successfully able to obtain the response xml, but I see no way through the API to map that to java objects. Is there anything within the API to help me do so or is this something I am going to have to do on my own?
(I am currently using adwords-api-8.4.2)
You will have to parse the xml on your own, since report downloads don't have corresponding POJO objects in AdWords API. Though, it should be easy to do using some basic XML parsing code. All the reports (when downloaded in xml format) looks like this:
<report>
<report-name name="Report name here"/>
<date-range date="date-range-here"/>
<table>
<columns>
<column name="columnName" display="Display name of column"/>
....
</columns>
<row columnName="value" columnName="value" .../>
....
</table>
</report>
I also wanted to mention that our primary discussion forum is at http://groups.google.com/group/adwords-api?pli=1, and I frequently answer developer questions there, so if you have any followup questions, feel free to ask there and I'll be happy to answer your questions.
Cheers,
Anash

How would I make custom atom links using RESTEasy?

I'm wondering if (and if so, how) it's possible to make RESTEasy return an object with custom atom links, such as links to next/previous page when paginating, particularly what I want to get is something akin to the following:
<collection>
<start>4</start>
<values>4</values>
<total>20</total>
<item>...</item>
<item>...</item>
<item>...</item>
<item>...</item>
<atom:link rel="next" href="...?page=3"/>
<atom:link rel="previous" href="...?page=1"/>
<atom:link rel="first" href="...?page=1"/>
<atom:link rel="last" href="...?page=5"/>
</collection>
I've worked out how to give links for discovery, but making custom links like this appears to be more complicated, if at all possible.
In the end I've ended up using the <any/> element and creating my own Elements to insert in to the any field of the JAXB objects. That seems to have its own problems, but at least it's a step further.

Categories

Resources