Collection findAllResults in Groovy 1.7.5 - collections

Groovy 1.7.5 claims to have both findResult and findAllResults. But when I try, it seems to have only findResult. findAllResults is not included in the groovy jdk documentation, either. Am I not reading it thoroughly?

If you read the comments in that issue, (Ted Naleid added a comment - 19/Jun/10 10:46 PM) says that findAllResults was removed as it can be easily achieved with an inject in it's place

As a follow up, this has been implemented as of Groovy 1.8.1 as findResults instead of findAllResults. It's cleaner than using inject in many situations.

Related

Failed to resolve: 'com.squareup.retrofit2.converter-gson:2.3.0'

I am trying to include 'com.squareup.retrofit2.converter-gson:2.3.0' using Android Studio 3.2 Canary 5
See image below
as you can search in google, putting this worked, I hope it helps you too
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.4'
Solution
implementation 'com.squareup.retrofit2:converter-gson:<latest-version>'
The latest version can be found here.
Simply paste this instead :
implementation 'com.google.code.gson:gson:2.8.5'
implementation'com.squareup.retrofit2:retrofit:2.6.1'
Use (where is possible) the latest version, I had the same error but it looks like the retrofit 'com.squareup.retrofit2.converter-gson:2.3.0' version 2.3.0 is deprecated.
This works for me:
//Retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
Source:
https://square.github.io/retrofit/
https://github.com/square/retrofit
it works perfectly well.
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
It gives/provides the latest repo you'll need.

What to replace for this using Microsoft.WindowsAzure.MobileServices.SQLiteStore.SQLiteStore

We follow this article and it's been running ok https://developer.xamarin.com/samples/xamarin-forms/WebServices%5CTodoAzure/
but then since yesterday we change the code to allow offline sync - #define OFFLINE_SYNC_ENABLED and after that we can't rebuild the solution due to "using Microsoft.WindowsAzure.MobileServices.SQLiteStore;" below missing assembly ? Now check this on Nuget and apparentlt it's beeing deprecated. So what to change on this then?
#if OFFLINE_SYNC_ENABLED
using Microsoft.WindowsAzure.MobileServices.SQLiteStore;
using Microsoft.WindowsAzure.MobileServices.Sync;
#endif
I'm appreciated your input.
Thanks
My bad. Didn't realise that we need to include package for Microsoft.Azure.Mobile.Client.SQLiteStore package from Nuget ...looks good now :)

Active Model Serializer not render my models

I am trying to integrate Active Model Serializer to render JSON elements with relations.
I follow the documentation on this address: http://rubydoc.info/gems/active_model_serializers
I am not sure if I am doing something wrong but it looks like serializers are not working. Do I need to make more steps?
I install the gem, generate the serializer and add relation.
Can you guide me, please??
My project is in this repo:
https://github.com/dwdsolutions/argo
Best Regards
You're using the 0.9.0 version. Try to change it to 0.8.0
Alex is right, I tried using v0.9.0 earlier and was unable to get it working per the existing documentation.
The main github repo does state to use v0.8.0 if you are familiar with the gem (https://github.com/rails-api/active_model_serializers/tree/master#maintenance-please-read). At any rate, once you get it working, you shouldn't need to manually specify your serializers since they're named properly compared to your models and controllers.
i.e. you can remove the trailing option of this line:
render json: #travel, serializer: TravelSerializer
And make it just:
render json: #travel

Custom dictionary is not working in endeca

I am trying to add a custom dictionary in stemming but found no luck.
Steps I tried:
1) I have added the following lines in /config/script/DataIngest.xml:
<dgidx id="Dgidx" host-id="ITLHost">
<args>
.....
<arg>--stemming-updates</arg>
<arg>C:/Endeca/Apps/CRS/config/script/stemmingExtension.en.xml</arg>
</args>
</dgidx>
And added following lines in stemmingExtension.en.xml:
<word_forms_collection_updates>
<WORD_FORMS>
<WORD_FORM>shuts</WORD_FORM>
<WORD_FORM>shirts</WORD_FORM>
</WORD_FORMS>
</word_forms_collection_updates>
Ran a baseline update and then tried to search for "shuts" and expected to get "shirts" results, but not.
What's the correct way of setting up custom dictionary words in stemming?
Thanks in advance for your help.
Basavaraj
What version of the etl salience component are you using? I remember of a similar bug in oeid 3.0 bundle, and unluckily the answer is that the component used in clover etl doesn't call the appropriate method from java's api to get the stemmed word. You can build a mockup, directly calling java api's, to see the different methods used
For Endeca 3.1.2 version, try adding it to /MDEX/<version>/conf/stemming/en_word_forms_collection.xml (for English)
Example:
<WORD_FORMS_COLLECTION>
...
<WORD_FORMS>
<WORD_FORM>shuts</WORD_FORM>
<WORD_FORM>shirts</WORD_FORM>
</WORD_FORMS>
<WORD_FORMS_COLLECTION>

FlexUnit4: [Test(expect="Error")] doesn't catch errors?

The following code produces a failed test, not a passing test (as I would expect):
[Test(expects="Error")]
public function someTest():void {
throw Error("this test doesn't pass");
}
In older versions it was [Test(expected='')]
In newer versions we support both expected and expects as this was confusing for many
Make sure you're linking against the release SWC of FlexUnit, or if you're compiling it yourself, make sure you're using --keep-as3-metadata+=Test in the "additional compiler options" box in project properties.
I think the problem may have been that I was using an older version of FlexUnit4. I just upgraded (to 4.0 RC1) and it seems to be working now.

Resources