Questions tagged [paging]

1

votes
1

answer
485

Views

Asp Core, How to use PagingList<T>.CreateAsync() with a viewModel?

I am working on a asp.net core 1.1 project and i want to create paging in my some views. I studied microsoft documents about paging in asp core but it is very simple mode with 1 table. In my view i use multi table and use a viewmodel to initialize it. I want to use PagingList.CreateAsync() method to...
saeed
1

votes
0

answer
887

Views

Paging Library - DataSource didn't invalidate itself after BoundaryCallback called

In the given PagingWithNetworkSample ,: @Query('SELECT * FROM posts WHERE subreddit = :subreddit ORDER BY indexInResponse ASC') fun postsBySubreddit(subreddit : String) : DataSource.Factory Here they use LimitOffsetDataSource extends TiledDataSource as provider, it will invalidate when the specific...
Sinyuk
1

votes
0

answer
397

Views

Android paging library retry loadRange() or loadAfter()

I am trying to implement the new paging library from android architecture components. Basic functions are working fine but I need to add a retry function for loadRange() or loadAfter(). I need to retry these in case a network error occurs or if the device is offline. I already tried dataSource.inval...
1

votes
1

answer
472

Views

Force Paging Library to make Api Request

I have successfully implemented a PagedList.BoundaryCallback, which loads a list of upcoming movies from 'themoviedb' database, and saves the response into the database. But it does not work the way I want it. Since the request return a list of upcoming movies, the response changes frequently. But i...
Andras Sanislo
1

votes
1

answer
38

Views

Cassandra db PHP driver, cannot page queries with both ORDER BY and a IN restriction on the partition key

I cant get results for the following query using datastax PHP driver, select * from track where id='35209' and day in (20180314,20180315,20180316) and datetime < '2018-03-15 11:00:00' order by datetime desc limit 1; error message : 'Cannot page queries with both ORDER BY and a IN restriction on the...
badr bo
1

votes
0

answer
80

Views

Paging Library for those which don't have any numeric Id

I am actually consuming Triposo's API to show the list of countries. https://www.triposo.com/api/ However, in responses, there is no numeric Id and I am struggling while incrementing page size. What should I perform on such responses to overcome? For instance, Github API is fully suitable for Paging...
nuhkoca
1

votes
0

answer
23

Views

Couch DB running on Windows OS is paging while it has ample RAM available

I have three node CouchDB cluster. It is running on windows. Each node has 16vcpu and 64GB RAM. I am fairly new to CouchDB and to nonrelational databases in general. The cluster is running on windows. What I am struggling with is one of the nodes (which I am assuming is the coordinator) is using the...
DBA_ST
1

votes
0

answer
43

Views

Classic Asp Pagination through JavaScript

Clicking 'Next' current page crossed total pages. JavaScript below: function paging(x){ var x; var myAjax = new Ajax.Updater('dvReport','process.asp',{method:'get',parameters:{mode:'search_pabx_report',x:x}}); } Sample output is attached x=request.QueryString('x') Const NumPerPage = 500 If Request....
Hijbul
1

votes
0

answer
178

Views

Report Network errors in PagedList.BoundaryCallback

I have a working paging mechanism with Database (room) as single source of truth. I also have retrofit as network library and I use RxPagedListBulder to keep all the stuffs bound and running. However, I cannot find a way to pass back my response to the View, since network stuffs ends with inserting...
Stefano Mtangoo
1

votes
1

answer
193

Views

Network Paging With pagedList in arch library

Android add Paging Library as part of Architecture Component for using the pagination of the resource. I use this example for do it. I write these codes but in my DataSource.Factory I can't return my received DataSource from network. let's see my codes: PostDataSource: public class PostDataSourc...
Sadeq Shajary
1

votes
1

answer
153

Views

How to create memory region/section with following properties (checked by QueryWorkingSetEx and VirtualQuery)?

I need to make memory region/section with following properties: VirtualQuery function checked on such region should return: AllocationProtect: 0x20 [PAGE_EXECUTE_READ] Protect: 0x20 [PAGE_EXECUTE_READ] State: 0x1000 [MEM_COMMIT] Type: 0x40000 [MAPPED] QueryWorkingSetEx function checked on such regio...
Vuklan
1

votes
1

answer
395

Views

How to use PagedListAdapter with multiple LiveData(s)

I have a recycler view with a PagedListAdapter. In onCreate I have this code: viewModel.recentPhotos.observe(this, Observer { photoAdapter.submitList(it) }) recentPhotos is initialized in this way: val recentPhotosDataSource = RecentPhotosDataSourceFactory(ApiClient.INSTANCE.photosClient) val pagedL...
xskit
1

votes
0

answer
113

Views

Problems in linux kernel porting, stuck in paging_init function

reference board : i.mx6q sabresd, kernel version : 4.9.17 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.9.17-04736-ga88711e-dirty ([email protected]) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #6 SMP PREEMPT Sun Jul 8 12:13:44 IST...
mrigendra
1

votes
0

answer
42

Views

Need AndroidArchitecture Paging Library to continue fetching pages after sending it an empty list

I'm using AndroidArchitecture Paging Library 1.0.0 successfully with a PageKeyedDataSource. But, my service will sometimes return an empty list even though subsequent pages will have items. In loadInitial method, I call: callback.onResult(emptyList, nextPageToLoad) Because, I pass it an empty list,...
user225405
1

votes
0

answer
208

Views

My onItemAtEndLoaded is getting triggered after the onZeroItemsLoaded

I have this strange behavior where the onItemAtEndLoaded is getting triggered after the onZeroItemsLoaded so the recycler view keeps loading and does not stop. I have the project in the GitHub can someone please help me, I spent days in this. Can someone please take a look? https://github.com/JosePe...
José Nobre
1

votes
0

answer
27

Views

Vertical and horizontal paging with dynamic content

Is it possible to do vertical and horizontal paging in iOS with dynamic content? That is, the number of pages in any of the 4 directions and content data would be fetched at run-time from a web-service.
user3429824
1

votes
0

answer
210

Views

Handling error using Android paging library

I am trying to make a simple list fragment by using paging library. The document said if I want to refresh the entire list, I should use invalidate method in DataSource. When I call this method, a new DataSource will be created and method loadInitial will be called, but if I encounter an error in lo...
Namek Master
1

votes
1

answer
654

Views

Android Room Database Data is not getting inserted?

I am inserting data into room database receiving from network. It doesn't show any errors and neither the app is crashing but the screen is empty and table is empty All works fine but when i use Stetho Debug Tool and look into feed table nothing is inserted ,Can anyone figure it out and help me. And...
Dilip Krishna
1

votes
0

answer
83

Views

Android cache with CRUD

I am working on a social-networking-type app where the user sees a list of 'posts' and can interact with them, notably they can 'like' them. The list of posts is in the 10,000s and so we paginate it using Android's paging library (DB + Network), but this is applicable to any situation where there ar...
d370urn3ur
1

votes
0

answer
140

Views

PagedList.BoundaryCallback is not triggered again

I am trying to implement Paging with room and network call as shown in android sample onItemAtEndLoaded is called when I move to the bottom of list. In that case I insert data into room by getting result from network call. If network call fails, and user again move to bottom of list after sometime,...
Prashant Gupta
1

votes
1

answer
135

Views

Inifinite Scroll Recycleview's imageview flickering when scroll

I'm showing images from server with Google Paging Library. When I show images from Localhost, it work perfect but with live server it's image is flickering. I tried to sleep Localhost for 2s to delay response but localhost's images were not flickering. My problem is same as image-flickering-while-sc...
mukeshsoni
1

votes
1

answer
30

Views

Tell RecycerView to fetch more items programmatically?

I'm using a RecyclerView in conjunction with PagedListAdapter to fetch images from a rest API. The RecyclerView fetches more images as needed when I scroll through it. I would like to simulate scrolling very fast through the RecyclerView but still have onBindViewHolder() get called for each item sin...
Isaac Perez
1

votes
0

answer
186

Views

Android: how to add more data when list reached bottom when using PageKeyedDataSource with PagedList?

I have a RecyclerView with a PagedListAdapter which is used to show a list of text(such as 0,1,2,...,99), and there is a button to add 20 more items to database such that the list of text becomes (0,1,2,...,99,...,119). With page size equals to 20, the list can load 20 items page to page (where data...
Season
1

votes
0

answer
117

Views

Android paging library with sqlite database

Can I use android paging library using sqlite database directly with pojo instead of using Room but by using LiveData. I don't want to use Room for that. Purpose is to solve the lag between data loading event after using simple pagination technique while fetching the large amount of data. I am refe...
tejraj
1

votes
1

answer
81

Views

Paging Library: skip loadInitial in PageKeyedDataSource

According to the docs loadInitial is called during creation PagedList in UI thread to provide some placeholders until real data fetched to avoid show empty list to user. Are there any way to skip loadInitial or return empty list? If I return empty list with default config loadAfter will not be calle...
anber
1

votes
1

answer
57

Views

Datatables extermal paging - Clone just one Button

I am using jQuery/PHP datatables and I want to move or clone a single pagination button (the last page button only) to a div outside the Table. I tried this one but I wasn't able to get just the 'last' Button. $(document).ready(function() { $('#example').dataTable(); $('#mynewdiv').append($('.dataTa...
Bennek
1

votes
1

answer
113

Views

OFFSET and FETCH causing massive performance hit on a query - including when OFFSET = 0

I have a fairly complex SQL query that involves returning about 20 columns from a large number of joins, used to populate a grid of results in a UI. It also uses a couple of CTEs to pre-filter the results. I've included an approximation of the query below (I've commented out the lines that fix the p...
TheLogicMan
1

votes
1

answer
210

Views

Paging Library Invalidate Data Source

What's the simplest way to invalidate data retrieved by the paging library? I need to do that on logout. I've a DataSource.Factory and a DataSource that extends PageKeyedDataSource. Is it a good idea to call invalidate() on DataSource contructor? Will it work as expected?
Jumpa
1

votes
1

answer
33

Views

Property 'containerComponent' is missing in type '{}'

I'm using react to render HTML and I'm using PagingPanel Plugin from react-grid. However when I add this rule: import { PagingPanel } from '@devexpress/dx-react-grid'; And in my render() I add this rule: It gives me the following error: Type '{}' is not assignable to type 'PagingPanelProps'. Propert...
user10663763
1

votes
0

answer
111

Views

Invalidation of datasource PagedList Android

I need some insight on invalidation of datasource in a PagedList, like how it behaves and what should be done to attach a new datasource/PagedList. What I believe is that we cannot attach a new datasource, so do we need to attach a new PagedList to the recyclerView? If so how to make the new PagedLi...
doomtrooper
1

votes
0

answer
24

Views

Android: Get current page Token from PageKeyedDataSource

I am using paging library (part of android jetpack), and override PageKeyedDataSource. This class have three methods ,and i have to get the current page Token but did not find any a way to get current page token. override fun loadInitial(params: LoadInitialParams, callback: LoadInitialCallback) { up...
Hussnain Haidar
1

votes
1

answer
40

Views

Better way to change listId/query in data source paging

I can't find a better way to change listId of my VideosDataSource methods like load initial. I'm using view pager so it load 2 fragment at a time that's why i can't use getter/setter to set listId of my data source. here my data source class: class VideosDataSource( private val networkService: Netwo...
Hussnain Haidar
1

votes
0

answer
72

Views

When I invalidate() my data, the onChanged submitList is triggered with 0 items before loadInitial gets the data from firebase

I am using the paging library with Firebase, and set ValueEventListener on the repository to invalidate the data whenever a change happens. The problem is as soon as I trigger invalidate(), the Observer trigger onChanged and Adapter.submitList(items) gets items with 0 size before the new date is loa...
Wael Adel
1

votes
0

answer
42

Views

How to test Dao methods which return DataSource.Factory?

After shifting from SqliteOpenHelper to room in my app, I've trying to write tests for the DAO class. My DAO looks something like this: @Query('SELECT * FROM cards') fun getAllCards(): List @Insert(onConflict = OnConflictStrategy.REPLACE) fun insertCard(vararg cardData: CardData): List @Query('SELE...
Yashasvi
1

votes
0

answer
20

Views

paging library not showing anything in recyclerview

i'm trying to load bunch of list from room database, with paging library, but somehow that i don't really understand, the list never shown up i add a repository class between dao and viewmodel, not sure if its the problem but, i configure Paged.list and pagedlistbuilder in there i've also try to pu...
daya pangestu
1

votes
0

answer
155

Views

RecyclerView Pagination and ViewPager sharing data

I want to implement pagination for my recyclerview which fetches data from Firebase Realtime Database. On each item click, I want to open another activity which contains a viewpager and display the same data with the recyclerview. How can I do that? Can someone show me a proper way to solve this p...
Robotic Vn
1

votes
0

answer
34

Views

Room livedata with paging getting IndexOutOfBoundsException in some devices

I'm using paging library with Room livedata, in some devices sometimes i receive IndexOutOfBoundsException Index out of bounds - passed position = 75, old list size = 75 (always with size 75, none of my databases has a fixed size of 75) The problem is that the log is shown more like an internal erro...
Jordy Mendoza
1

votes
2

answer
1.2k

Views

Best way to page asp.net-mvc page with POST

I have an action method that that returns a PagedList after a form's POST request. I would like to add paging to this page, but all paging scenarios only seem to work with GET requests. Currently the only way of adding paging controls is adding a bunch of forms with one button for navigating the pag...
Boris Callens
1

votes
3

answer
1.3k

Views

PHP Date-Dependent Pagination

I have a site that stores a bunch of records in an sql database that i want to pull onto a page based on the date, which is stored as Y-m-d in sql. But, I want to paginate the results based on day. So for the index, i want to show all the results from the current day, for which i was going to use t...
J Siegal
1

votes
1

answer
1.5k

Views

Anyone have some TAP or SNPP examples?

Does anyone know of a good resource with some examples of using the Telocator Alphanumeric Protocol (TAP) and/or the Simple Network Paging Protocol (SNPP) in either C++ or C#? Thanks!
David Brown

View additional questions