Slow results when using webkitSpeechRecognition vs x-webkit-speech? - webkit

I'm new to using this API and wasnt able to find an answer to what I'm running into.
When I use new webkitSpeechRecognition, and use the onresult event to find isFinal == true, it seems to take longer in finding the final result than using x-webkit-speech in an input tag.
Does anyone know if google is doing something specific to get a speedier result? Or do I need to set an attribute in the webkitSpeechRecognition object?
Thanks for any insight!

See my answer which explains how, in continuous mode results are triggered by new voice input, or otherwise will show up only after a timeout.
In non continuous mode, the result will show up much faster.

Related

SAP HCI: get more entities than page size

I don't actually know if this is the right place to ask and don't even know if I can phrase my question correctly, but I'll try:
My employer starts using SuccessFactors by SAP soon and I try to design some very basic Hana Cloud Integration Flows. I am really just a "end user" in this case, no insight to the technical background/implementation at all.
It seems to work all fine, despite in one case when I'd need to retrieve more result entities than the "page size". I heard that the page size cannot be very high, so I tried to go with 800 for now. But there are more entries. So from what I read, I need to use a looping process call together with "Process in Batches" feature in the Receiver Channel... This is my current iflow:
But still only the first 800 entities are returned. Do you see something obviously wrong here, or any idea where to find comprehensive documentation about this feature, because Google didn't give me much...
Thanks in advance!
SuccessFactors adapter in V2/V4 mode works well for any page size.
You don't actually need use only looping process therefore V2/V4 supports non-iterable output.
So, you could make simplest IFlow:
Https sender -> Start -> Content modifier -> Request/Reply -> XML to Json -> End
On SFSF adapter, clear "Process in Pages" checkbox.

Listing current Ignite jobs and cancelling them

I got a partial answer here but not exactly what I wanted.
The link describes how to get a list of task futures but what I'd really like to be able to do is list out and cancel individual jobs (that might be hung, long running etc etc). I've seen another post implying that this is not possible but I'd like to confirm (see second link)
Thanks
http://apache-ignite-users.70518.x6.nabble.com/How-can-I-obtain-a-list-of-executing-jobs-on-an-ignite-node-td8841.html
http://apache-ignite-users.70518.x6.nabble.com/Cancel-tasks-on-Ignite-compute-grid-worker-nodes-td5027.html
Yes, this is not possible and actually I'm not sure how this can be done in general case. Imagine there are 5 jobs running and you want to cancel one of them. How are you going to identify it? It seems to be very use case specific to me.
However, you can always implement your own mechanism to do this. One of the possible ways is to use ComputeTaskSession API and task attributes. E.g., set a special attribute that will act as signal for job cancellation and create attribute listener that will stop job execution accordingly.

Paging: Find Object-Position (Page) to Display

I'm using .take() and .skip() for paging with a table.
Now when I "insert" an entity into the database, I reload my table (new query). Now I would like to jump to this new object inside the table and highlight it.
Is there an elegant solution to find on what page the new object is and then use skip/take to jump to the correct page?
Edit:
Maybe Breeze/OData could natively support paging by allowing to specify a page-size in the query and which page to deliver (instead of using take and skip and calculating it on the client).
If this was the case, the parameter for "which page to deliver" could, instead of being an integer, also be a sub-query which would be executed on the resulting data before it gets "taked and skipped" to find out, on which page the object(s) are visible and use this as "page to deliver".
Edit 2:
Added the idea to Breeze UserVoice: https://breezejs.uservoice.com/forums/173093-1-breezejs-feature-suggestions/suggestions/6824937-support-paging-natively
It's an interesting idea, but I don't know of any really elegant solution to accomplish this. Conceptually, how would you expect this to work under the covers?

Lucene web paging

I am creating a web app with Lucene that I need to implement paging. I have seen here the different examples about using an offset on the collector. However, those seem to be old. Lucene 3.5 (or 3.6 can't remember which) added this I believe. I have seen the IndexSearcher method searchAfter. However, it requires you pass it the last ScoreDoc. Because this is a web app, I have no way to pass the last result (as a ScoreDoc object) to the next request. So, my question is how is this typically done?
The only way that I have really come up with is to add in a unique key into the index when building. Then, pass that key as a post parameter when trying to get the next page. Then, I would have to search for that key to get the document id and pull that document to use with searchAfter. I think I have to use my own unique key because I cannot rely on the document id to stay the same. Am I correct on this?
If there are better ways, please let me know. This is my first attempt at Lucene.
However, it requires you pass it the last ScoreDoc. Because this is a web app, I have no way to pass the last result (as a ScoreDoc object) to the next request. So, my question is how is this typically done?
I don't understand your problem, if you want to use searchAfter, just make a ScoreDoc to pass to it. your webapp can pass ints and floats right?
/** Constructs a ScoreDoc. */
public ScoreDoc(int doc, float score) {
As far as I'm aware, what you are doing at the moment is correct. A ScoreDoc which you construct yourself using ints and floats will not work. See my similar question:
Working Lucene SearchAfter Example

Item is not added into the list (from code)

We have some strange problem here. We have feature event receiver, where we are creating custom fields -> content type -> list. After that, one default item is added. On my VM it was working just fine, but after moving into pre-prod environment, we got this strange behavior with no exception or error in logs.
First thing, item was created only sometimes, with no trace what happened. Mostly it was not created. I even experienced this: when I activated feature, I went to the list and so item there, but after refresh it was gone!
We tried to put there some Thread.Sleep() cycle (while debugging, item was in Items collection, but ItemsCount property of the list was always showing 0).
Now I am out of ideas what is wrong. It's not about execution time (maybe). Looks like, for some reason, SP is killing SPItem.Update before it is created for real and we don't know why. Any help is really welcome!
When you try to access sharepoint items from code and not have admin permissions to update/ delete them then set website website.AllowUnsafeUpdates = true; property
//Set AllowUnsafeUpdates = true to update the database / sharepoint list from code.
FormWeb.AllowUnsafeUpdates = true;
NewItem.Update();
FormWeb.AllowUnsafeUpdates = false;
you code should be like this to make changes in the list.. when you adding item to list.
Use Update statement in same manner when you accessing list and updating its data.
Check whether you updating the list correctly.. There may be some SharePoint security issue.
Reference Link:
http://blogs.msdn.com/b/infopath/archive/2010/04/01/add-items-to-a-sharepoint-list-using-managed-code.aspx.
You can check this [SPSecurity.RunWithElevatedPrivileges][1]
[1]: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx , link, link
you can check that what is going over there by adding your events in sharepoint..
Check this post and debug it..
http://developmentsolutionsjunction.blogspot.com/2011/06/adding-events-and-eventhandlers-in.html
so I was finally able to find out where the problem was. After deeper study and trying that and this I found out that there was a third party feature. It was adding event to each created list and was deleting everything what wasn't consistent with CT defined by company. This is weird and I don't really understand why somebody wants this. But ok, they pay, their rules.
So if you encounter such problem, try also this possibility.
However, I also leard few things during this, e.g. if you are working with SP instances from web scope, use web scoped features, not site ones, also, SP has a nasty habit to silent som exceptions. Also, if you e.g. take instance of SPWeb from event properties, it doesn't necessarily means it is already created. It takes some time, also, Update() itself is a thing that DB has to perform. Sometimes it's better to alsways check if you really have instance and if not, threadsleep for a while.
Have you used .Update() method in your code??