Questions tagged [resources]

Assets (like memory, disk space, CPU power or alike) necessary for effective operation or physical files (like images, configuration files or other) to provide some externalized enrichment to an application.

Typically resources are materials or other assets that are transformed to produce benefit and in the process may be consumed or made unavailable

9303 questions
62
votes
10 answers

Find Unused Resources in a .NET Solution

How do you go about finding unused icons, images, strings in .resx files that may have become 'orphaned' and are no longer required?
mrpbody
  • 1,016
  • 1
  • 9
  • 9
61
votes
19 answers

How to access static resources when mapping a global front controller servlet on /*

I've mapped the Spring MVC dispatcher as a global front controller servlet on /*. home org.springframework.web.servlet.DispatcherServlet
Rahul Garg
  • 8,410
  • 8
  • 33
  • 28
61
votes
14 answers

Android: How to add R.raw to project?

How I could add R.raw class to my android project? Now I haven't /res/raw folder at all (and class as well). And I can't find any tools in eclipse to do that. So how to add R.raw?
Ksice
  • 3,277
  • 9
  • 43
  • 67
61
votes
4 answers

Memory usage of Docker containers

I am using Docker to run some containerized apps. I am interested in measuring how much resources they consume (as far as regarding CPU and Memory usage). Is there any way to measure the resources consumed by Docker containers like RAM & CPU…
Paris
  • 6,323
  • 7
  • 31
  • 49
60
votes
8 answers

How to get access to raw resources that I put in res folder?

In J2ME, I've do this like that: getClass().getResourceAsStream("/raw_resources.dat"); But in android, I always get null on this, why?
Arkaha
  • 1,582
  • 3
  • 17
  • 19
58
votes
4 answers

List all embedded resources in a folder

In my solution a had a folder with a few files. All this files have the Build Action "Embedded Resource". With this code I can get a file: assembly.GetManifestResourceStream(assembly.GetName().Name + ".Folder.File.txt"); But is there any way to get…
San
  • 868
  • 1
  • 9
  • 18
57
votes
5 answers

W/System: A resource failed to call release

When using the console of AndroidStudio on my app it shows: W/System: A resource failed to call release. Sometimes it is said multiple times. I know what it means but I've checked the almost 2k lines of code multiple times but I'm clueless what I'm…
Emiliho Stifler
  • 681
  • 1
  • 5
  • 5
57
votes
8 answers

How do I add a resources folder to my Java project in Eclipse

I want to have a place to store my image files to use in my Java project (a really simple class that just loads an image onto a panel). I have looked everywhere and cannot find how to do this. How do I do this? I have tried adding a new folder to…
redeagle47
  • 1,355
  • 4
  • 14
  • 26
53
votes
2 answers

Embed Text File in a Resource in a native Windows Application

I have a C++ Windows program. I have a text file that has some data. Currently, the text file is a separate file, and it is loaded at runtime and parsed. How is it possible to embed this into the binary as a resource?
Oliver Zheng
  • 7,831
  • 8
  • 53
  • 59
53
votes
4 answers

Useful Android system resources

Android comes with lots of system resources (android.R) that can be used to save you time and make your application lighter. For example, I recently discovered that Android provides localized strings for Yes (android.R.string.yes), No…
hpique
  • 119,096
  • 131
  • 338
  • 476
52
votes
12 answers

Are Locks AutoCloseable?

Are Locks auto-closeable? That is, instead of: Lock someLock = new ReentrantLock(); someLock.lock(); try { // ... } finally { someLock.unlock(); } ...can I say: try (Lock someLock = new ReentrantLock()) { someLock.lock(); //…
fredoverflow
  • 256,549
  • 94
  • 388
  • 662
52
votes
6 answers

Android Resources converting to string TypedValue warning

Ok I'm looking right past something here.. Every time I'm in my app and I change activities, logcat reports series of warnings: 02-04 14:42:36.524: WARN/Resources(1832): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f08002b} 02-04…
DJC
  • 3,243
  • 3
  • 27
  • 31
51
votes
5 answers

Is it safe to yield from within a "with" block in Python (and why)?

The combination of coroutines and resource acquisition seems like it could have some unintended (or unintuitive) consequences. The basic question is whether or not something like this works: def coroutine(): with open(path, 'r') as fh: …
cdleary
  • 69,512
  • 53
  • 163
  • 191
51
votes
8 answers

Any easy way to use icons from resources?

I have an C# app. I need to add an icon to that app so i added an icon resource. Adding resource went fine, but is there any way to use my (resource) icon as form icon WITHOUT adding additional code? When i try to use design-time "icon" property of…
guest86
  • 2,894
  • 8
  • 49
  • 72
51
votes
10 answers

String xml file in Flutter

In flutter string text are directly set to the TextField widget like: new Text('Hello, How are you?') Is correct way ? or we can maintain all string in one file and use it like: Hello, How are you? Is it possible…
Magesh Pandian
  • 8,789
  • 12
  • 45
  • 60