Incorrectly showing total number of documents in MongoHQ Collection on cloudbees - cloudbees

On Cloudbees MongoHQ , one collection is showing incorrect number as total number of documents , while other collections are showing correctly .
When I go inside to that collection and set the limit , it is showing different number as total number of documents .
On the main screen , it is showing 201 documents and getting increased in number , but inside the collection , it is showing only 101 documents , even after set the limit to 201 .
Is there any reason why MongoHQ is showing incorrect total number of documents ?

Mongo's default batch size is 101. When you query the database via MongoHQ, the first 101 results are shown, and the rest are hidden. Unfortunately they don't allow you to run the getNext() command.
More here (specific to PHP Mongo drivers): http://derickrethans.nl/cursors-in-mongodb.html

Related

Laravel method to call api every 1 min and load 80,000+ products?

I have an API for my e-commerce website which loads (80,000+ ) products along with category and brands ,, i want to call this api ( after every 1 or 2 min or maybe less ) and compare with my DB to keep my DB up to date and if any changes in any product in the API i have to update that in my DB ,,,
Currently I m loading all the data from api and using foreach loop and adding it to my DB , but it is taking too much time still i am not comparing the products after doing that the time to fetch data then compare and the save in DB will be too much.
what will be the best way to do this .

SSRS Page Break after custom # of group

I am working on a SSRS report. It is a Tablix with 1 group by city. I would like to have 4-5 records per printer page in PDF. Currently, it is printing 1 record per printed page. This is because I have set a hard page break after each group. I can remove that hard page break but I'm unsure how to get 4-5 on each printed page. I'm not that good with SSRS expressions. Any help is appreciated.
I would handle this by creating another column in your dataset which groups 4 or 5 cities. say the first 5 as 1, then the next 5 as 2 etc.. and then add a parent group to your city group using this column.. then set your page break on that group..

Sharepoint list item count

I have a list which is having items greater that 5000, now i have a requirement to show the number of items in that list on a web page.Can anybody help me on getting the total items count . The normal list view threshold is set as 5000. I need only the count.
Thanks
You need to get your SP admins to increase the size of a return query to greater than 5000 rows in Central Admin.
If you are using the SP object model in Visual Studio, just loop through the list in increments of the limit until you run out to get the total rows.
There's also a total rows/items property in the SPList object.

Dealing with gaps in timeline

I'm looking for some assistance to sort out the logic for how I am going to deal with gaps in a feed timeline, pretty much like what you would see in various Twitter clients. I am not creating a Twitter client, however, so it won't be specific to that API. I'm using our own API, so I can possibly make some changes to the API as well to accomodate for this.
I'm saving each feed item in Core Data. For persistance, I'd like to keep the feed items around. Let's say I fetch 50 feed items from my server. The next time the user launches the app, I do a request for the latest feed items and I am returned with 50 feed items and do a fetch to display the feed items in a table view.
Enough time may have passed between the two server requests that a time gap exists between the two sets of feed items.
50 new feed items (request 2)
----- gap ------
50 older feed items (request 1)
* end of items in core data - just load more *
I keep track of whether a gap exists by comparing the oldest timestamp for the feed items in request 2 with the newest timestamp in set of feed items from request 1. If the oldest timestamp from request 2 is greater then the newest timestamp from request 1 I can assume that a gap exists and I should display a cell with a button to load 50 more. If the oldest timestamp from request 2 is less than or equal to the newest timestamp from request 1 the gap has been filled and there's no need to display the loader.
My first issue is the entire logic surrounding keeping track of whether or not to display the "Load more" cell. How would I know where to display this gap? Do I store it as the same NSManagedObject entity as my feed items with an extra bool + a timestamp that lies in between the two above and then change the UI accordingly? Would there be another, better solution here?
My second issue is related to multiple gaps:
50 new feed items
----- gap ------
174 older feed items
----- gap ------
53 older feed items
* end of items in core data - just load more *
I suppose it would help in this case to go with an NSManagedObject entity so I can just do regular fetches in my Core Data and if they show up amongst the objects, then display them as loading cells and remove them accordingly (if gaps no longer exist between any sets of gaps).
I'd ultimately want to wipe the objects after a certain time has passed as the user probably wouldn't go back in time that long and if they do I can always fetch them from my server if needed.
Any experiences and advice anybody has with this subject is be greatly appreciated!

SharePoint 2010 CAML Query fails when indexed columns used

I have an SPQuery that has been working fine until my list hit 500 items.
q.Query = "" + DefectID + "";
This was successfully returning 1 item where DefectID matched my provided value.
Once the list hits 500 items, the query returns 0 items, no error message, no exception. If I delete 1 item and take the list down to 499 items, it works again.
The list had individual item permissions, but as part of my debugging I have reset the role inheritance of the list and also every item in the list.
I have tried providing a row limit of 2, and 2000, same result
Have tried Query override throttling, same result. Changed the web app throttle limits to way above my lists number of items, and change the large query window to 24hrs, same result
The column I am querying has an index on it (I am expecting about 30k+ items per year in this list). If I delete the index the query then works when items in the list are > 500. If I create the index again, the query then returns 0
Thanks