Robospice - SpiceList UI 1.4.4 usage samples? - robospice

I'm using Robospice with SpringForAndroid frameworks and I have to implement a twitter-like wall with tweets containing either a profile image and a tweet image (eg. a photo) and this should be supported through SpiceList UI Robospice's extension. The problem is that the sample about this extension refers to an older version of the framework, and the current implementation looks different. Does anyone know the usage of SpiceList UI in 1.4.4 version of Robospice?
Especially I want to know how to implement the SpiceArrayAdapter to support objects with more than one image to be downloaded. The problem is that the SpiceArrayAdapter's createRequest() method supports only one BitmapRequest to be returned. What if a single object contains two image to be downloaded?!?

The robospice-sample-ui-spicelist was updated to latest version and the new APIs now support more than one image per cell view!

Related

FilePond A11Y questions

I know that FilePond advertises itself as accessible, and I see some aria attributes on the underlying that is created...but I can't see quite how to add any additional a11y-related props (e.g., aria-invalid), nor how to control what is added automatically (e.g., having aria-labelledby reference any label or error information that might be a part of my implementation of a file upload field).
I have tried passing additional props to the existing React adapter, as well as making a copy of the existing React adapter locally in my project and trying to set additional properties on the rendered input (which I assume means that somewhere in the bowels of the more generic FilePond project, it really just uses that input field as a reference, and then creates its own instead?).
I would love to learn that I am just missing something existing in the API - but alternately I have also filed an issue on the project github in case this is just an issue with the existing implementation (or possibly even morphs into a feature request).
From the project owner:
"Hi, Yes all internals are managed by FilePond and there's currently no way to dynamically add custom attributes to internal fields (apart from id / class)."

Vizrt API JSON Data integration with Graphics

I want to integrate JSON response from API on VIZRT software. Can anyone help me so as how to read the JSON response and display on the graphics or transition...
Thank you on advance.
The best and easiest way would be to use the DataPool plugins already provided in most Vizrt installations. These plugins don't require licensing and are supported in most versions of the software. There is a plugin titled DataReader which allows you to specify a file or web address to pull Excel, SQL, XML, or JSON information from and it can do this on a regular frequency (every 10 seconds, etc).
You can get a lot of info about these plugins on the documentation site.
Also, when installing make sure to do a Complete installation instead of Typical. That will make sure that all the DataPool plugins are installed.
Firstly, I would suggest for you to read the necessary sections Vizrt Documentation (It will point you to where you can find example projects etc).
There are many different ways of getting Json Feed to Viz GFX, but it all comes down to your requirements.
If you would like to use Viz Trio you could talk to the Media Sequence Engine of default port 6100 preview and 6800 program.
Or you could also communicate directly to the Viz engine using external Application using preferably .Net?
private void SetValueToDocumentByXPath(XmlDocument doc, string xpath, string value)
{
var nav = doc.CreateNavigator();
var it = nav.Select(xpath, nameSpaceManager_);
if (it.MoveNext())
{
it.Current.SetValue(value);
}
}
SetValueToDocumentByXPath(elementDoc,"//vdf:payload/vdf:field[#name='01']/vdf:value", "My new headline");
The line Above Target Tabfield 01, Setting its value to My new headline.
XMlDocument can be fetch from the MSE.

Does the JIRA REST API support querying a list of labels?

I see the is the ability to get all components of a project by doing
/project/[projectkey]/components
but I don't see any capability or documentation on how to get the list of labels that are available for a project (something like:
/project/[projectkey]/labels
Does the JIRA REST API support querying the list of labels available on a project?
Just to clarify, labels (at least the built-in JIRA ones) are global entities so they can be attached to any Issue in any Project.
As to your question - no, there's no public REST endpoint to get/change/add labels to JIRA.
Jira Cloud has /rest/api/3/label.
Jira Server provides /rest/api/2/jql/autocompletedata/suggestions?fieldName=labels which is however not paginated and only returns the first few labels (label values can be queried using &fieldValue=X).
However, as hacky workaround you can misuse the API endpoints some Atlassian Jira Gadgets are communicating with. Though this has the following disadvantages:
Are internal APIs
Atlassian apparently plans to replace Gadgets with Dashboard Items eventually
Might change behavior, see e.g. JRASERVER-67446
No pagination (?), responses can be huge
Responses are designed for Gadgets, therefore contain irrelevant data
Labels Gadget
/rest/gadget/1.0/labels/gadget/project-<PROJECT_ID>/labels
Where <PROJECT_ID> is the numeric ID of the project.
Heat Map Gadget
/rest/gadget/1.0/heatmap/generate?projectOrFilterId=<PROJECT_OR_FILTER>&statType=labels
Where <PROJECT_OR_FILTER> can be either:
project-<PROJECT_ID>
filter-<FILTER_ID>

Streaming json in nativescript

has anyone used the streaming json in nativescript? I found this http://oboejs.com/why but it seems not to work. I'm using nativescript 1.6, any suggestion would be appreciated really much. Thank you.
There is no library to my knowledge currently built for NativeScript that allows streaming JSON. Just for clarification sake you can easily pull JSON from a server and parse it using the built in fetch/http api's, right now -- but their is no way to have it start parsing the json as it downloads in chunks built in.
You can attempt to modify the npm node module to build for NativeScript.
Or thinking outside the box a bit; you can also use the web based version of that module inside the nativescript-webworkers and have it pull and process your JSON and communicate the json messages back to the NS environment. The WebWorkers module actually wraps the native platform's web browser module so it can run all browser based JS code.
Disclaimer: I'm the author of the open source NativeScript-WebWorkers.

Angular2 i18n at this point?

We decided to give it a spin and we started fresh project using Angular2. So far so good, but at this point we're facing an issue. At this point, what is the proper approach to i18n for Angular2? We've researched a little and found this:
https://github.com/angular/i18n
However last commit is more than 5 months old... Doesn't look like active development.
Anyone tried using angular-translate or angular-gettext? Or maybe with Angular2 it's better to wrap something JS like i18next? Anyone could share their thoughts? Maybe you faced the same problem?
Plunk was updated to Angular 2 Final: https://plnkr.co/edit/4euRQQ. Things seem to work the same as in RC7.
New i18n section has been added to Angular 2 official docs. Basically, it explains in details what happens in the plunkr above.
XLIFF is the only format for translations, no json support.
A translation source file (xliff, xlf) should be created using ng-xi18n tool:
package.json:
"scripts": {
"i18n": "ng-xi18n",
...
}
and
npm run i18n
See the Merge translation section for details about merging a translation into a component template. It's done using SystemJS Text plug-in.
Another example using Gulp http://www.savethecode.com/angular2-i18n-native-support/
Older staff:
Update based on RC7 and links provided by Herman Fransen:
I've made a minimal Plunkr example: https://plnkr.co/edit/4W3LqZYAJWdHjb4Q5EbM
Comments to plunkr:
bootstrap should provide TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID with values -> setup translations
translatable items in html-templates should use directive i18n
translations are stored in .xlf file. Ties between languages is done through Id, ties with html by a value of <source> tag in xlf
currently xlf files are not used directly; a .ts file is manually created to wrap the content of xlf in an exportable variable. I guess, this should be working automagically in final release (maybe even now).
This is the first officially documented approach I found.
However, it's still barely usable. I see the following issues in the current implementation:
Language is set at bootstrap, unable to change it in run-time. This should be changed in Final.
Id of a translatable item in xlf is generated SHA. Current way to get this id is a bit messy: you create a new translatable item, use it, copy SHA id from error and paste into your i18n.lang.xlf file.
There is a big documentation pull request concerning i18n
Older staff:
Release notes https://github.com/angular/angular/blob/master/CHANGELOG.md have a record
i18n: merge translations 7a8ef1e
A big chunk of i18n was introduced in Angular 2 RC5
Unfortunately, still no documentation available.
Everyone's eager for the official implementation, but this one worked for my use case:
https://github.com/ocombe/ng2-translate
README is fairly thorough, and if you need something real particular (for me it was code-splitting) the code itself isn't too long or hard to read.
Support for i18n is now official in Angular 2 RC6
Official release blog:
https://angularjs.blogspot.nl/2016/09/angular-2-rc6_1.html
A sample of internationalization with Angular 2 RC6
https://github.com/StephenFluin/i18n-sample
More info how the new concept of i18n works in angular2:
https://lingohub.com/blog/2015/03/angular-2-i18n-update-ng-conf-2015
I found another way to implement this using pipe and service
HTML
<!-- should display 'hola mundo' when translate to Spanish -->
<p>{{ 'hello world' | translate }}</p>
TYPESCRIPT
...
// "this.translate" is our translate service
this.translate.use('es'); // use spanish
...
// should display 'hola mundo' when translated to Spanish
this.translatedText = this.translate.instant('hello world');
...
https://scotch.io/tutorials/simple-language-translation-in-angular-2-part-1
https://scotch.io/tutorials/simple-language-translation-in-angular-2-part-2
There is an official support for i18n in Angular.io here:
https://angular.io/docs/ts/latest/cookbook/i18n.html
But! As mentioned in docs:
You need to build and deploy a separate version of the application for
each supported language!
That makes this feature useless in most cases ...
Unless you will use it without CLI as described here:
https://devblog.dymel.pl/2016/11/03/angular2-and-i18n-translate-your-app/
I am putting together a POC and the official documentation is cumbersome to say the least, so I tried ngx-translate http://www.ngx-translate.com/ and I literally had the hello world working in a few minutes, there are few caveats:
I've read of people complaining about performance, because of the pipes, but reading the github issues, it seems that it is getting resolved
It is only for i18n or Translations it does not deal with i10n or Localization
There are few warning errors with Angular4 but it works anyways
long story short I liked ngx-translate if you have a small app and only need translation
I personally wanted Localization, so I am looking at
https://github.com/robisim74/angular-l10n
. It looks pretty good, but I haven't tested, so I'll let you know later, or you guys can go and we all try

Resources