w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to get installed applications in Android and no system apps?
final PackageManager pm = getPackageManager(); List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); Using PackageInfo: private boolean isSystemPackage(PackageInfo packageInfo) { return ((packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ResolveInfo: private boolean isSystemPackage(ResolveInfo resolveInfo) { return ((resolveInfo.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } Using ApplicationInfo: private boolean isSystemPackage(ApplicationInfo applicationInfo) { return ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0); } This filters the system package. See this question. Credits: Nelson Ramirez and Kenneth Evans.

Categories : Android

How to delete other applications cache from our android app?
I used the following code and now I'm able to clear all application's cache without rooting, it's working perfectly for me, private static final long CACHE_APP = Long.MAX_VALUE; private CachePackageDataObserver mClearCacheObserver; btnCache.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { clearCache(); } });//End of btnCache Anonymous class void clearCache() { if (mClearCacheObserver == null) { mClearCacheObserver=new CachePackageDataObserver(); } PackageManager mPM=getPackageManager(); @SuppressWarnings("rawtypes") final Class[] classes= { Long.TYPE, IPackageDataObserver.class }; Long localLong=Long.valueOf(CACHE_APP); try { Method localMethod=

Categories : Android

Windows Phone: How to get list of installed applications & install/remove applications remotely
AirWatch is a software for entreprise deployment. It's simply built upon Windows Phone's company hub. http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206943(v=vs.105).aspx

Categories : C#

Android: how to clear app cache and keep user data via adb?
You can add the following line to your code. "android.permission.CLEAR_APP_CACHE" android.permission.DELETE_CACHE_FILES" Ordinary SDK applications cannot hold the DELETE_CACHE_FILES permission. While you can hold CLEAR_APP_CACHE, there is nothing in the Android SDK that allows you to clear an app's cache.

Categories : Android

Android : How to clear cache by program without affecting database?
we can avoid clearing database caches. Here is my answer for above question public boolean deleteDir(File dir) { if (dir != null && dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { if(!dir.getAbsolutePath().contains("/yourDataBaseName")){ { //clear all files except your database directory boolean success = deleteDir(new File(dir, children[i])); if (!success) { return false; } } } } // The directory is now empty so delete it return dir.delete(); }

Categories : Android

Set the path of the symfony2 cache files during cache:clear
You could create a custom Symfony environment called "deploy" for your deployment and then override the different cache folders. Once you have your new environment (named "deploy" in the example below), you could override the method getCacheDir of the class app/AppKernel.php to something like this public function getCacheDir() { if ($this->environment === "deploy") { return '/the/path/to/your/symfony/cache/'.$this->environment; } else { return $this->rootDir.'/cache/'.$this->environment; } } Make sure the environment is only accessible locally by trusted users.

Categories : Symfony2

imageNamed and imageWithContentsOfFile cache image: Anyway to clear cache?
Is it possible that you are adding multiple separate UIImageViews? I.e. you are adding a local variable named detailImageView to your superview one time when this method is called, and then later on you call this method again and a new local variable UIImageView named detailImageView is added to the superview on top of the old one? If this is this case, you should see [self.view.subviews count] increasing as the method is called multiple times, adding multiple UIImageViews. In that case, you need to remove the old UIImageView before adding a new one.

Categories : IOS

How To Clear Image cache or any cache in AFNetworking?
https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ Does AFNetworking have any caching mechanisms built-in? AFNetworking takes advantage of the caching functionality already provided by NSURLCache and any of its subclasses. We recommend you try out Pete Steinberger's fork of SDURLCache, which provides disk caching, which is not otherwise implemented by NSURLCache on iOS. You may find it useful to set ignoreMemoryOnlyStoragePolicy to YES for the SDURLCache instance, which will ensure that images will be cached to disk more consistently for offline use (which, as reported in the SDURLCache README, iOS 5 supports, but only for http, so it still remains a good option if you want to support iOS 4 or https) I would also see this question: How To Dis

Categories : IOS

GTK+ installed with brew is not found when I try to compile other applications
I had smiliar issues with after brew install gtk+. Specifically, I got: Package xcb-shm was not found in the pkg-config search path. Perhaps you should add the directory containing `xcb-shm.pc' to the PKG_CONFIG_PATH environment variable Package 'xcb-shm', required by 'cairo', not found app.c:1:10: fatal error: 'gtk/gtk.h' file not found #include <gtk/gtk.h> ^ 1 error generated. make: *** [app] Error 1 while running make for my app and this command solved my problem: export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig The extended answer on this problem has been already answered here: http://stackoverflow.com/a/23988317/4694621. This might be an issue since gtk+ depends on these libraries (source): Glib Pango ATK GDK GdkPixbuf Cairo

Categories : Osx

Finding out installed Metro applications on a machine
I wish I could comment...Is this an option? IEnumerable<Windows.ApplicationModel.Package> packages = (IEnumerable<Windows.ApplicationModel.Package>)packageManager.FindPackagesForUser(""); http://msdn.microsoft.com/en-us/library/windows/apps/windows.management.deployment.packagemanager.aspx

Categories : C#

Returning a set of installed applications without system apps
Check out the comment from @Wand Maker for this question: How to get installed applications in Android and no system apps? I think you need to use PackageManager to find out all the apps that support intent-filter with action "android.intent.action.MAIN" and category "android.intent.category.LAUNCHER" – Wand Maker Jul 6 at 15:23 You can do this by using PackageManager.queryIntentActivities (http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int)) E.g. Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> activities = getPackageManager().queryIntentActivities(intent, 0);

Categories : Java

Cannot get access token from OAuth Google API for installed applications
See edits above for the answer to this. Essentially it boiled down to Socket objects in ExtendScript not supporting SSL. The solution above shows a workaround by using ExtendScript system.callSystem() method to get at cURL on OSX and a VBScript on Windows.

Categories : Javascript

Google api console : 3 Client ID for installed applications with same package and different sha1 key
Simply generate a ClientID for your app. Thenk you'll see that under the "Client ID for installed applications" table there is a "Create another client ID..." button. Use it to add another client ID for the same app with different SHA1. The only negative consequence is that you have to provide your package name, icon and project name for every clientID, so if something has to be changed it has to be changed for every clientID

Categories : Android

Can't clear UIWebView cache
You seem to have tried almost everything. I'm aware you are rejecting the cookies. Yet, Why dont you try this? This worked for me... NSHTTPCookie *aCookie; for (aCookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:aCookie]; }

Categories : IOS

How to clear the Flash cache?
I recommend, example in chrome: Open an incognito window Click the Chrome menu on the browser toolbar. Select New incognito window. A new window will open with the incognito icon in the corner. You can continue browsing as normal in the other window. You can also use the keyboard shortcuts Ctrl+Shift+N (Windows, Linux, and Chrome OS) and ⌘-Shift-N (Mac) to open an incognito window. Windows 8 users: To switch between windows, click the window switcher on the top right corner.

Categories : Visual Studio 2010

PHP simplexml_load_file() clear cache
As far as I know, PHP does not provide any kind of cache for HTTP downloads. My educated guess is that either your ISP or the remote site implement some kind of aggressive server-side caching technology (a proxy or an HTTP accelerator like Varnish). That's should not be difficult to test: load the same URL twice with a regular browser (Firefox, Chrome, whatever). Clear the browser cache if necessary. The scenario can be more complex (your browser might be using a proxy or the remote cache might verify certain HTTP headers) but that should be the first check.

Categories : PHP

Clear CMake's internal cache
The problem was with pkg-config settings. I hadn't removed the old .pc file and adjusted the PKG_CONFIG_PATH. pkg-config was using the opencv.pc file present in /usr/local/lib/pkgconfig rather than the one present in /usr/lib/pkgconfig. There isn't any cache that cmake uses internally, i think.

Categories : Caching

Clear the file stat cache in R?
file.exists does not cache the result of the stat call, so there is no equivalent of PHP's clearstatcache. (Aside: that also means excessive use of calling file.exists, or any stat function, might degrade performance.) As of R 3.0.1, file.exists uses an internal method. If you follow it through the source you will eventually end up with a call to R_FileExists, in sysutils.c: Rboolean R_FileExists(const char *path) { struct stat sb; return stat(R_ExpandFileName(path), &sb) == 0; } (On Windows it instead uses a call to _stat64 which I've just confirmed also does not do caching.)

Categories : R

Clear Firefox cache in Selenium IDE
Disclaimer: I've never had to do this before (clearing the cookies has always been sufficient for me), but from what I can see, this is functionality that is lacking in the current builds of Selenium, although from recent changelogs, it looks like the developers are making a push to make a standard way of doing this. In 2.33 of iedriverserver, They have the following changenote: Introduced ability to clean browser cache before launching IE. This version introduces the ie.ensureCleanSession capability, which will clear the browser cache, history, and cookies before launching IE. When using this capability, be aware that this clears the cache for all running instances of Internet Explorer. Using this capability while attempting to run multiple instances of the IE

Categories : Firefox

Javascript clear cache image
Try <img src = "http://www.mysite.com/general/showimage.php?arquivo=/directory/temp1.jpeg&k=123041"> Your first parameter begin after ?, and any subsequent should be added using &

Categories : PHP

How can I force the STL memory cache to clear?
There's no guarantee that your application will free the memory back to the OS. It's still available for your application to use but the OS may not reclaim it for general use until your application exits.

Categories : C++

Clear cache on CodeIgniter using wildcard
There is a helper that does this, you can find it here. how is cache created $path = $CI->config->item('cache_path'); $cache_path = ($path == '') ? APPPATH.'cache/' : $path; . . . $uri = $CI->config->item('base_url'). $CI->config->item('index_page'). $CI->uri->uri_string(); $cache_path .= md5($uri); helper itself <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); if ( ! function_exists('delete_cache')) { function delete_cache($uri_string) { $CI =& get_instance(); $path = $CI->config->item('cache_path'); $cache_path = ($path == '') ? APPPATH.'cache/' : $path; $uri = $CI->config->item('base_url'). $CI->config->item('index_page').

Categories : Codeigniter

Clear Cache App: Why it doesn't work?
here's my suggestion of how to fix your errors. i could make it even better, but it should work just fine. cache.setOnPreferenceClickListener(new OnPreferenceClickListener() { clearCache(getApplicationContext()); } and here are the functions , fixed: public static void clearCache(final Context context) { final File cache=context.getCacheDir(); final File appDir=new File(cache.getParent()); if(appDir.exists()) { // you might be able to change this whole code block to just "deleteDir(appDir)" final String[] children=appDir.list(); for(final String childFilePath : children) if(!childFilePath.equals("lib")) { deleteDir(new File(appDir,childFilePath)); Log.i("TAG","**************** File /data/data/APP_PACKAGE/"+childFilePath+" DE

Categories : Java

.htaccess - How to clear browser cache?
Some people with this "issue" This and this pages gave me an idea and I want to share it. :). My directory structure is this: website/ |- libs/ |- css/ |- js/ |- imgs/ |- system/ |- site/ |- .htacces |- index.php so, we can use the .htacces file to "fool" the browser like this: RewriteRule ^libs.v[0-9]{1,}(.*) libs/$1 RewriteRule ^(.*).v[0-9]{1,}.css$ $1.css And, on htmlfiles use this: <link rel="stylesheet" type="text/css" media="all" href="path/to/libs/css/style.v2.css" /> <script type="text/javascript" src="path/to/libs/js/javascripts.v1.js"></script> <img src="path/to/libs/imgs/logo.v5.png" alt="Logo" /> or <link rel="stylesheet" type="text/css" media="all" href="path/to/libs.v1/css/style.css" /> <script t

Categories : PHP

clear cache using java code
You solved the first issue correctly, by adding its dependency commons-logging. The second one is, as stated, a warning and not an error (but nevertheless, I'd consider it a very serious warning, as the used defaults are quite probably not good for your application). It means that you forgot to add ehcache.xml, ehcache's configuration file, to the classpath. Add that file and the message will go away. Also note that the ehcache version you seem to be using (1.2.3) is very old, it was released in 2006. The current version is 2.7, and it can be downloaded here. Instructions for Maven based projects are also on that page.

Categories : Java

How to clear IIS Windows Authentication cache in C#
It stores both certificate data and also user passwords. Open a command prompt, or enter the following in the run command rundll32.exe keymgr.dll,KRShowKeyMgr Windows 7 will open window to delete all stored values. See this if it helps you http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/A_448-How-to-DELETE-Windows-Local-Domain-Cached-Credentials.html http://www.roelvanlisdonk.nl/?p=825

Categories : C#

iOS (iPhone) clear images from application cache
Lit sounds like you are adding images to your Xcode project and copying them to the app. Then you removed them from Xcode and observe that they aren't removed from the app. In this case, clean the project. Xcode isn't very good at removing files from an already built app when the source file is removed from the project.

Categories : Iphone

How to properly clear the cache on Awesomium.NET WPF 1.7.1 while running
A WebSession.ClearCache has been added in v1.7.2.

Categories : C#

Where to clear the client side cache when using amplify js and MVC
I don't know how your application is structured, but based on your question I suppose you could set a Session variable, and if it's the first time that the user is acessing your page you clear the localStorage. TempData would fit in this scenario too, because you could set a variable that will exist just in the first request. For example: Session["firstRequest"] = true; or TempData["firstRequest"] = true; You can set this variables at Session_OnStart() event, or in your Controller.

Categories : Asp Net Mvc

Symfony All blank pages after cache clear
You seem to have run cache:clear as root user without the --no-warmup flag. Now symfony has warmed the cache after clearing it using the root account which would result in the newly created cache files being owned by your root user. Depending on your umask the webserver-user now might not have r+w access to these files. Make sure your webserver-user / cgi-user has read and write access to your cache folder or give the ownership back to this user. sudo chown webserver_user:webserver_group -R app/cache sudo chmod 770 -R app/cache # or use acl to permit read/write to your webserver-user

Categories : PHP

Django Heroku Clear Cache on deploy
You have next options: I always thought it was possible (and foreman locally worked for me with &&. Write your command python manage.py clear_cache and use it before launching server in Procfile: web: python manage.py clear_cache && gunicorn... If you use CircleCI you can edit your circle.yml file to clear cache after deployment If you wrote fabfile you can include python manage.py clear_cache after deployment. clear_cache command example: ` from django.core.management.base import BaseCommand from django.core.cache import cache class Command(BaseCommand): """ Command to clear cache """ help = "Clear cache" def handle(self, *args, **options): cache.clear()

Categories : Django

How to clear or manipulate cache.db data ios application
BOOL isNotFirstTimeRun = [[NSUserDefaults standardUserDefaults] boolForKey:@"isnotfirsttimerun"]; if (!isNotFirstTimeRun) { // Clear the cache if this is a first time run [[NSURLCache sharedURLCache] removeAllCachedResponses]; // Set the flag to true and synchronize the user defaults NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:YES forKey: @"isnotfirsttimerun"]; [defaults synchronize]; } That did the job for me in didFinishLaunchingWithOptions.

Categories : IOS

Ways to clear cache from outside rails 3 application?
The best way would be to expire it yourself like this:- expire_page :controller => 'javascripts', :action => 'dynamic_states', :format => 'js' expire page caching for a given controller's action. Also, make note that page caching and action caching are going to be removed from Rails 4.

Categories : Ruby On Rails

Symfony2 - to see changes in twig have to clear cache every-time
I had faced this problem multiple times. If your website was accessing by so many user and you clear the cache. i am sure your website was down for couple for minutes until the new cache generated. So clear cache on production server should not be a regular activity. There are couple of solution or tricks to overcome from this problem: find the time when your website has low traffic. May be sometime in the night and then clear the cache. When you want to clear a cache, setup a replica of a production server then plan to switch the public domain ip to the new replica for the timing so that user cant face the downtime and once you cleared the cache on a actually production server. switch the public domain ip back to the production server. if you do some changes in the templates i.e.tw

Categories : PHP

Clear Apache cache for a specific image
This whole question is very confused. Apache cache? ...No, the cache is in your browser, not in Apache. Sessions adding timestamps to image URLs? ...No, the querystring with the timestamp must be added to the HTML using server-side script (such as PHP, for example). It has nothing whatsoever to do with browser sessions. (And actually it's generally much better to use the file last-modified time rather than the current timestamp, BTW). There are a number of ways to achieve the effect you want, each with its own benefits and drawbacks depending on your situation. You may want to read my answer here.

Categories : PHP

clear jboss cache using java code
You have three bugs in your code. First, you don't need to query getCacheNames(); you're already passing in the name of the cache you're wanting to clear, and you're just throwing away the results in st. Next, there's no such method as CacheManager#getCache(String); it's getCache(String, boolean) throws Exception, and you need to be passing s, false and handling the (far too broad Exception). Finally, you never check whether the cache actually exists; if someone passes in a name representing a nonexistent cache, cache will be null, and you'll get an NPE when you try to flush() it.

Categories : Java

Sql Server 2008 Clear Select statement cache?

Categories : SQL

Hint to clear your browser's cache when script fails
Did you get any warnings in your browser console? Every time you use a new class you haven't used before, you have to run (./generate.py source). If you find that cumbersome read more about the source-all and source-hybrid jobs: v2.1.1: http://manual.qooxdoo.org/2.1.1/pages/tool/generator/generator_default_jobs.html#source v3.0 (not yet released): http://manual.qooxdoo.org/3.0/pages/tool/generator/default_jobs_actions.html#source

Categories : Misc

Webdriver & .Net - TimeZoneInfo.ClearCachedData() does not clear TimeZone cache
This is because the static field will be initialized once and then keep it's value. You have since removed the static part, you didn't need to necessarily do that. Just make it a property so that it's value is generated on every access: public static string Today { get { return DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); } } NUnit's GUI and TeamCity will launch the whole suite in one thread. So the static field you had originally will literally be loaded only once and keep it's value.

Categories : Dotnet

Universal image loader - clear cache manually
check this from here http://stackoverflow.com/a/7763725/1023248 may help you.. @Override protected void onDestroy() { // closing Entire Application android.os.Process.killProcess(android.os.Process.myPid()); Editor editor = getSharedPreferences("clear_cache", Context.MODE_PRIVATE).edit(); editor.clear(); editor.commit(); trimCache(this); super.onDestroy(); } public static void trimCache(Context context) { try { File dir = context.getCacheDir(); if (dir != null && dir.isDirectory()) { deleteDir(dir); } } catch (Exception e) { // TODO: handle exception } } public static boolean deleteDir(File dir) { if (dir != null && dir.isDirectory()) { String[] children = dir.list(); for (int i = 0; i < children.length; i++) { boolean succes

Categories : Java

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.