Questions tagged [recycle]

338 questions
3
votes
0 answers

Android: How to reuse a recycled Bitmap?

When I don't need Bitmaps anymore, I usally recycle them by calling bitmap.recycle() However, there are a couple of situations in which I need to use the recycled Bitmap again, so usually I just load it again: if(bitmap.isRecylced()) bitmap =…
vauge
  • 801
  • 4
  • 14
  • 30
3
votes
2 answers

Android - Different items in GridView not showing up

I am working on app which has a GridView of images but the last item in GridView is a button that loads more item into Grid. But i am facing a strange issue and that is Button shows up sometime and sometime it doesn't specially when i scroll up and…
Varundroid
  • 9,135
  • 14
  • 63
  • 93
3
votes
1 answer

WPF Listview Virtualization mode gives issues while binding

I have created a new class (derived from listview). This listview is part of a view, which has a viewmodel. This viewmodel has two main properties - 1)myView(ICollectionView)...and isWritable(bool). Each listview item (row inside listview) has a…
Relativity
  • 6,690
  • 22
  • 78
  • 128
3
votes
2 answers

Can you recycle a vector of Domino objects?

I have made a vector of objects that are Domino ViewEntries (they could be Documents or any Domino object for that matter). This is not a ViewEntryCollection nor a DocumentCollection. The list object is a Vector (it could even be an ArrayList). I am…
angryITguy
  • 9,332
  • 8
  • 54
  • 82
3
votes
1 answer

Is it faster to reset a collection of properties or create a new instance?

I have a Matrix which I recycle and use for drawing DisplayObject instances onto a Bitmap. At the moment, I reset the Matrix before I render each item, like this: _matrix.a = 1; _matrix.b = 0; _matrix.c = 0; _matrix.d = 1; _matrix.tx = 0; _matrix.ty…
Marty
  • 39,033
  • 19
  • 93
  • 162
2
votes
1 answer

ASP.NET Session Recycles

In an ASP.NET website we are storing sessions in SQL Server. All is working fine except that sessions frequently recycle. I've a timeout period set to 30 minutes but some times it recycles within a few minutes. We've a dedicated server, and website…
Obaid
  • 2,563
  • 17
  • 15
2
votes
1 answer

Recycling views, listview inside scrollview

I am aware of recycling of views in LiveView, I am also aware that we cannot have a listview as a child of scroll view, which just scrambles the scrolling up. I know the work around of using LinearLayout or any other viewgroup and add components to…
Shardul
  • 27,760
  • 6
  • 37
  • 35
2
votes
2 answers

How to avoid recycling while trying to replace values from a vector in a dataframe column

This question arose, while working on this question Replace list names if they exist I have this manipulated iris dataset with two vectors: new_name <- c("new_setoas", "new_virginica") to_select <- c("setosa", "virginica") iris %>% …
TarJae
  • 72,363
  • 6
  • 19
  • 66
2
votes
4 answers

Creating a matrix using recycling

I am asked as an exercise to use recycling to initiate a 4 by 5 matrix where the first three rows are 0's and the fourth row has 4, 8, 12, 16, 20. I understand that recycling is defined as if the lengths of the two vectors in a mathematical…
james black
  • 122
  • 7
2
votes
1 answer

R, function that turns numeric input into a recycled numeric output bounded by a upper limit

How can I write a function f(v, n) (or use a base R function) that turns a numeric vector v into another based on n, a recycling factor (in lack of a better word). For instance: f(v = c(1,2,3,4,5), n = 1) #would yield c(1,2,3,4,5) f(v =…
user3375672
  • 3,728
  • 9
  • 41
  • 70
2
votes
3 answers

data.table efficient recycling V2

This is a follow-up to this question : data.table efficient recycling The difference here is that the number of future years for each line is not necessarily the same .. I frequently use recycling in data.table, for exemple when I need to make…
2
votes
3 answers

data.table efficient recycling

I frequently use recycling in data.table, for exemple when I need to make projections future years. I repeat my original data fro each future year. This can lead to something like that : library(data.table) dt <- data.table(cbind(1:500000,…
2
votes
0 answers

OnClickListener in Listview strange behaviour when click fast

My post refers to this question: OnClickListener in Listview populated with a CursorAdapter. When I click fast and a lot of time on the same button in my ListView, after a moment my app behaves as if I clicked on another row... It is like if the…
Gilbou
  • 5,244
  • 6
  • 24
  • 27
2
votes
1 answer

Android - Recycling listview elements automatically?

I created a listview that has a custom SimpleCursorAdapter. I want to place a header in the first element in the list. 8 views fit on the screen at a time. When I scroll down to the ninth view, the header of the 1st element appears. At least I…
Dennis_M
  • 340
  • 1
  • 4
  • 10
2
votes
2 answers

Android - Unable to check all the CheckBoxes in a custom listview because of recycling issue?

I have a custom listview adapter with a imageview, textview and a checkbox. and i also have a button and a checkbox in my main layout(not in listview). What here i want is to check all these listview checkboxes at once when i check my main layout's…
Varundroid
  • 9,135
  • 14
  • 63
  • 93