Liferay : saxReaderUtil Results - liferay-6

While fetching results from Liferay web content articles, using SAX reader and Velocity , the number of results is limited to 5!
$saxReaderUtil.readURL("http://$request.theme-display.url-portal/c/journal/get_articles?groupId=10157&type=typeOne&approved=true&orderBy=display-date
How can I fetch all the elements?
I'm Using Liferay 6.0.6
Thanks in advance.

By Adding delta parameter.
$saxReaderUtil.readURL("http://$request.theme-display.url-portal/c/journal/get_articles?groupId=10157&type=typeOne&approved=true&orderBy=display-date&delta=100");
Here, the request will bring 100 results.

Related

Azure DevOps REST API call retrieving only 100 records

I am using the below url for retrieving all the CouldTests, but it is returning only top 100 records. Is it possible to retrieve all the records?.
http://{instance}/{collection}/{project}/_apis/test/runs?api-version=5.0
Any help is appreciated. Thanks in advance
For more about the above Link please refer.:https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/list?view=azure-devops-server-rest-5.0
it is returning only top 100 records.
This is because
On large collections, performance degrades when retrieving the later pages.
To avoid stress on the server, 100 is the default page size of REST api response which you can refer to REST API Result limit.
Is it possible to retrieve all the records?
Yes, as #Shayki Abramczyk said, the solution is to add a top parameter to select the top n records, make sure the n is bigger than the total amount of your all records.
For this solution, you can also check Limited to 100 result TFS api and Azure DevOps REST API: project count returned limited to 100.
You can use the $top parameter in the URL:
http://{instance:/{collection}/{projects}/_apis/test/runs?api-versopn=5.0&$top=500
Accepted answer was not working for me. Probably they have changed the parameter name from $top, to searchCriteria.$top.
If that is not working, try this instead:
https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?searchCriteria.$top=1000&api-version=6.0
Documentation:
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/commits/get-commits?view=azure-devops-rest-6.0

How to download stock data from Matlab

I have downloaded the last version I found (18/04/2017) of hist_stock_data.
It does not get the data from Yahoo (returning zero status).
Any way to fix this?
Any alternative for downloading stock data from Matlab?
Have you tried to use the fetch function?
d = fetch(c,s) returns data for all fields from the Yahoo! website for the indicated security.
Note: This function does not support retrieving multiple securities at once. You must fetch a single security at a time.

Meteor.JS Datatable Server Side Processing

What I have tried till now
I am writing this because I have been trying with lot of things in Datatable for Meteor, I have use Reactive as well as non reactive packages for Data table including:
aldeed:tabular https://github.com/aldeed/meteor-tabular
ephemer:reactive-datatables https://github.com/ephemer/meteor-reactive-datatables
I have to use fetch and display records from multiple collections in a data table, I have also tried reywood:publish-composite in aldeed:tabular , it has an issue that we cannot search or sort data of child collection even it is displayed in the data table
Plus I have some custom requirements like inline edit ect (Tried Jeditable for Datatable).
Non Reactive Meteor Datatable Packages are causing issues related to reactivity and I have to refresh the page them to show them correctly which I don't want.
My Question
Does anyone knows how to do a Server Side Processing of Datatable with Meteor?
https://datatables.net/examples/server_side/
I am using iron router so in order to fetch some data and pass to ajax call do I need to create a server side route in iron router?
Anyone if you can give some hint, that would be very helpful, I will then try to write some server side code and try and If I am successful then I will post solution here.
Any other recommendations other than Datatable are also welcome if that are closer to the solution.
Thanks
In order to do a Server Side Processing of Datatable with Meteor, you can user sipmle bootstrap datatable and along with that you can create your own server side pagination system. You can use projection along with the {sort:sort, skip:skip, limit: perPage}

SharePoint SOAP service GetListItem with respect to updated date?

Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman

Pagination in the event search API

I am performing a rest call to facebooks search API using type=event
e.x.
search?fields=id,name,picture,owner,description,start_time,end_time,location,venue,updated_time,ticket_uri&q=concert&type=event
I have looked through the documentation and still have a few questions about specific pagination behavior of the event search API.
If I used a broad search term like "ma" and keep querying the pagination ['next'] URL would I cycle through all facebook events starting with "ma"? Does the pagination array give any indication when there are no more results to return?.
Do these searches include past events? If so is it possible to eliminate past events using the "since" parameter?
What is the maximum for the limit parameter?
Update:
As far as I can tell the number of pages you can get from a facebook search is limited to 500. This includes pages that can be accessed via pagination. In other words a query with limit >=500 will not return a pagination url, likewise a query with limit 250 will only return one pages worth of pagination.
You will "next page" until the count of results comes less then the limit
I'm not sure if that is possible using a simple Graph Request. Maybe using FQL
I don't know exactly. But i used a 2000 limit one day. And it worked.
Other doubts you can get answers testing your resquests with this tool
https://developers.facebook.com/tools/explorer/
I am also doing the same thing like you. I am collecting public post using graph search api.
When there are no results available or you reach max limit pagination section will not be there in response. So you can always check for paging is there in json response or not something like this.
NextResult = DeserJsonFBResponce.paging != null ? DeserJsonFBResponce.paging.next : string.Empty;
I am not so sure about this with events but for public post i am able to eliminate post using science and until parameters.
Maximum for the limit parameter is 2000 per get request.