CrowdFlower: if-ony logic - mechanicalturk

I am trying to set up a task in CrowdFlower using their CML language. I keep getting the following error with the only-if logic.
contains only-if logic that references a missing field
This is the code.
<cml:radios label="Is there any spoken text in the first audio or is the audio file empty?" class="" validates="required" instructions="Press the play button to play the audio in the above audio file. If you can't hear any audio please select the second option.">
<cml:radios label="Which option do you believe best answers the question" class="unmodified" only-if="is_there_any_spoken_text_in_the_first_audio_or_is_the_audio_file_empty?:[0]" validates="required"><cml:radio label="First option"/><cml:radio label="Second option"/><cml:radio label="Third option"/><cml:radio label="I would like to hear more options"/></cml:radios>
I've looked everywhere in their documentation but nothing seems helpful.

It turns out that the CML doesn't like quesionmarks ("?"). I used it in my label
<cml:radios label="Is there any spoken text in the first audio or is the audio file empty?" class="" validates="required" instructions="Press the play button to play the audio in the above audio file. If you can't hear any audio please select the second option.">
Once I removed it, there was no error.
Hope this helps someone.

Related

Jwplayer 6.10 subtitle first line not appearing

The closed captions lines that should display after a line that was empty aren't being rendered. For instance,
9
00:00:32,000 --> 00:00:36,833
10
00:00:36,833 --> 00:00:38,700
Good afternoon, Sir, how can I help you? -> not displaying
11
00:00:38,700 --> 00:00:43,633
Hello. -> displays OK
12
00:00:43,633 --> 00:00:45,766
13
00:00:45,766 --> 00:00:46,500
Oh, yeah, OK. -> not displaying
I tested this on Windows Media Player and it's working correctly, so it does seem to be a jwplayer related issue.
I found that if I add a space in the first empty line, the script works correctly, however this workaround isn't currently an option. This can be reproduced in all videos we're using, the captions are .srt files and use UTF-8. This is not a playlist. The code is just standard, and the .srt files are being retrieved from the URL.
Is there a way to get jwplayer to retrieve the first line of a subtitle/closed caption file? Thanks.
As subtitles can span multiple lines (and in accordance with the SRT file spec - https://en.wikipedia.org/wiki/SubRip#SubRip_text_file_format) each subtitle is delimited by a blank line containing no text.
The fact Windows Media Player understands your file format doesn't make it a JW Player related issue - it just means WMP is more tolerant of badly formatted files.

What Framework and Header file contain the constant for kAudioUnitSubType_RemoteIO

I keep seeing samples that use kAudioUnitSubType_RemoteIO for the Apple audio unit api. I am wondering however what framework/header file contains this constant.
The kAudioUnitSubType_RemoteIO file is in the header AUComponent.h. It is in the AudioUnit.framework.
As the comment says, open Xcode and click Help menu in the top bar, select Documentation and API Reference, search kAudioUnitSubType_RemoteIO and you'll see the results.
That's the way to find the sample usage and document for official resource.

ePub navMap element error

I have been trying to convert my docx file to epub but having a problem in the validation of epub in the itunes producer and also on online epub validations,
the error is
"A.epub: OPS/toc.ncx(2): element "navMap" not allowed here; expected the element end-tag or element "navList" or "pageList"
i dont have any idea to solve this problem, please help!
Well, you need to show us the ncx file, or at least more of it. First boil it down to the smallest case that produces the error. By the way, in doing that, you'll find the problem yourself. That's called "debugging".

How to get Pose matrix from matched points of Open SURF

I want to use open SURF for recognition in AR in iPhone.After matching the source and destination images,I don't know how to get pose matrix from matched points of source image and destination image in camera frames.Like this blog http://computer-vision-talks.com/2011/02/markerless-augmented-reality-on-iphone/#comment-993 But he has not explained this point.Please any tutorial, code or book so that I could get the concept. Please guide me. Thanks a lot in advance.
(^.^)"Hi sorry for my English is not good if someone like correct my redaction I would appreciate this"
Hi #Rehman I'm working with AR right now and I'm using one open source his name is Aurasma aurasma is very easy you don`t have to create an additional line of code just create one UIButton and launch the AR viewController is very easy to use. Take a look

Saving a user edited text field to a .js file in iOS

I'm creating an iOS5 app (programmed in Objective-C) which provides a couple of functions. One of them is to allow a user to fill out a text field with JavaScript. When the user presses a "Test" button, I want it to save to a specific JS file and move to a new view, displaying an HTML page that will display the results of that JavaScript on a canvas element.
Unfortunately for me, I have no idea how to save to a JS file for a text field. Nor do I know if this is actually the best way to achieve the results I'm after.
So can anyone tell me the code I'd need to place in the IBAction of my test button to save the file, or if there is a better way to get the user's script into the HTML file with the canvas element?
You have some options to do that.
Add a callback in WebView is possible only in desktop apps, but you can make a workaround.
1- Set a handler to click in javascript;
2- This handler parse the value via windows.location (trying to change the current url);
3- In UIWebviewDelegate set webView:shouldStartLoadWithRequest:navigationType: to recognize this values parsed by javascript and returning NO (canceling the url change).
After you have the code typed by user, is easier pass to the new one UIWebView. You can save the file via NSData or other class and load in by the path, or you can parse directly the code to be showed via NSString.
EDIT
I, still, belive what I said is what you want, but with a little more info. Yes, 3 NSString probably solve your problem. You even can call eval in javascript, via objective-c and parse user code too. Those logic ideas are a good approaching. You can choose the easier for you.
There are more info in this another Q&A
You can use html 5 local storage for that.