caching

Android ArrayAdapter & ListView slowness

梦想与她 提交于 2020-01-06 04:09:09
问题 To display & load images in my ListView I've created a custom ArrayAdapter, however it is really slow. Every time I scroll through the list it loads the images again. Is there a caching mechanism which will cache my Views so I don't need to refill them every time? I know about the ViewHolder method, however this still is slow or am I just using it wrong? My code: public class ImageArrayAdapter extends ArrayAdapter<HashMap<String, String>> { private int resourceId = 0; private LayoutInflater

Android ArrayAdapter & ListView slowness

坚强是说给别人听的谎言 提交于 2020-01-06 04:09:09
问题 To display & load images in my ListView I've created a custom ArrayAdapter, however it is really slow. Every time I scroll through the list it loads the images again. Is there a caching mechanism which will cache my Views so I don't need to refill them every time? I know about the ViewHolder method, however this still is slow or am I just using it wrong? My code: public class ImageArrayAdapter extends ArrayAdapter<HashMap<String, String>> { private int resourceId = 0; private LayoutInflater

My CSS doesn't change, why?

ε祈祈猫儿з 提交于 2020-01-06 04:04:06
问题 So after many weeks, I got back to coding and I've got a problem. The project I was working on contains the basic stuff of a PHP site and now I'm trying to re-design my homepage. The problem is, that everytime I delete or change something in the CSS, the design never changes as if it's like frozen or something, and it happens for every page. When I delete the link to the CSS in my HTML, the design goes away. Here's the code: var scrolled=0; $(document).ready(function() { $("#master").click

Distributed caching solution for WCF service

僤鯓⒐⒋嵵緔 提交于 2020-01-06 03:49:46
问题 We have typical ASP.NET application with a web app & a phone client app which talks to a WCF Service which uses a SQL Server database. Currently we have only once instance of WCF service hosted in IIS but may decide to deploy to a webfarm in future. We would like to cache relational data in a cache in WCF service side, that way both web app and phone app can benefit from it. WCF service is purely stateless and we need to keep it that way. With those constraints, what are available

Where should my windows app store cache and tempfiles?

六眼飞鱼酱① 提交于 2020-01-06 03:22:15
问题 Where should a windows application store cache data and temporary file data ? I understand that System.Windows.Forms.Application.StartupPath + @"\" + "Cache"; is not a good idea since the program is going to probably be installed in Program Files\MyProgram\ for all users and users may not have access to writing to that folder. 回答1: Use this: System.IO.Path.GetTempPath(); Closely related issue: How to get temporary folder for current user 来源: https://stackoverflow.com/questions/5420234/where

Can an inserted <script> tag be run multiple times without using eval in JavaScript?

左心房为你撑大大i 提交于 2020-01-06 02:32:10
问题 I have to use a plugin which bundles js files inside html files (gadgets). For one use case I need to drop and re-instantiate a gadget to run updated code. So say I have foo.html : <html> <head> <script src="foo.js"></script> </head> <body>...</body> </html> and foo.js which is the file being injected into my actual document's head: alert("hello"); Problem is I can only cachebust the html file dynamically and declare my gadget as foo.html?x=123 , but the JS file I'm after will still be foo.js

Android webview check if page is in cache

十年热恋 提交于 2020-01-06 01:29:05
问题 in my app i'm using a webview to load a website for mobile devices. I've set up the webview for caching successfully. But if the device is offline and the user wants to visit a page which wasn't visited before it cannot be shown. This is clear because for a non visited page there is no counterpart in the cache. Therefore the webview shows the "Page not available" page. So to my question: Is it possible to check if a page exists in the cache before loading it in the webview? kind regards

Parse.com Query: Cache is always empty (iOS)

柔情痞子 提交于 2020-01-05 14:25:42
问题 I'm writing an iOS-App using Parse.com as a backend. In the - (PFQuery)queryForTable method of my PFQueryTableViewController I'm retrieving a set of data from Parse, but I'm unable to cache this query in order to support functionality when the device is currently offline. The method looks as followed: - (PFQuery *)queryForTable { PFQuery *query = [PFQuery queryWithClassName:self.parseClassName]; [query whereKey:@"city" equalTo:[[NSUserDefaults standardUserDefaults] objectForKey:@"city"]]; //

how to cache 1000s of large C++ objects

帅比萌擦擦* 提交于 2020-01-05 13:09:43
问题 Environment: Windows 8 64 bit, Windows 2008 server 64 bit Visual Studio (professional) 2012 64 bits list L; //I have 1000s of large CMyObject in my program that I cache, which is shared by different threads in my windows service program. For our SaaS middleware product, we cache in memory 1000s of large C++ objects (read only const objects, each about 4MB in size), which runs the system out of memory. Can we associate a disk file (or some other persistent mechanism that is OS managed) to our

how to cache 1000s of large C++ objects

十年热恋 提交于 2020-01-05 13:09:02
问题 Environment: Windows 8 64 bit, Windows 2008 server 64 bit Visual Studio (professional) 2012 64 bits list L; //I have 1000s of large CMyObject in my program that I cache, which is shared by different threads in my windows service program. For our SaaS middleware product, we cache in memory 1000s of large C++ objects (read only const objects, each about 4MB in size), which runs the system out of memory. Can we associate a disk file (or some other persistent mechanism that is OS managed) to our