tagged [resources]

C# - reading and displaying HTML from resources

C# - reading and displaying HTML from resources .NET 4, VS 2010, C#, MVC 3. In my resource file, I have: I'm reading it from the view via Razor: But my p's stay p's - in other words, they don't get re...

29 Aug at 14:29

How to clear an ImageView in Android?

How to clear an ImageView in Android? I am reusing `ImageView`s for my displays, but at some point I don't have values to put it. So how to clear an `ImageView` in Android? I've tried: None of them ha...

How can I get color-int from color resource?

How can I get color-int from color resource? Is there any way to get a color-int from a color resource? I am trying to get the individual red, blue and green components of a color defined in the resou...

6 Aug at 10:57

Resource leak: 'in' is never closed

Resource leak: 'in' is never closed Why does Eclipse give me the warming "Resource leak: 'in' is never closed" in the following code? ``` public void readShapeData() { Scanner in = new Scanner(Sys...

Load image from resources

Load image from resources I want to load the image like this: Because I don't want to do ``` void info(string channel) { switch(channel) { case "chan1": channelPic.Image = Properties.Res...

27 Nov at 20:18

DataAnnotation with custom ResourceProvider

DataAnnotation with custom ResourceProvider I have created a `ResourceProvider` to pull localization information from a database. I now want to use `DataAnnotation` to add validation to the model. `Da...

22 Jan at 15:52

Access global resources in an asp.net control

Access global resources in an asp.net control This is what I use to access a `App_LocalResources`. How do I access a resource in `App_GlobalResources`? SOLUTION: Create a resource called `Globalresour...

15 Feb at 21:20

Why can't I use resources as ErrorMessage with DataAnnotations?

Why can't I use resources as ErrorMessage with DataAnnotations? Why can't I do like this? What is the error message telling me? > An attribute argument must be a constant expression , typeof express...

format statement in a string resource file

format statement in a string resource file I have strings defined in the usual strings.xml Resource file like this: Is it possible to define format strings such as the one below in the strings.xml res...

16 Dec at 09:59

What's the difference between a Resource and an Embedded Resource in a C# application?

What's the difference between a Resource and an Embedded Resource in a C# application? When should I use one or the other? I'd like all of the files I use in my app (images, sound, xml file, etc.) to ...

How do you obtain a Drawable object from a resource id in android package?

How do you obtain a Drawable object from a resource id in android package? I need to get a Drawable object to display on an image button. Is there a way to use the code below (or something like it) to...

How to create and use resources in .NET

How to create and use resources in .NET How do I create a resource that I can reference and use in various parts of my program easily? My specific problem is that I have a NotifyIcon that I want to ch...

28 Apr at 05:57

List all embedded resources in a folder

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: But is there any way ...

7 Jul at 16:25

ResourceManager.GetString() method returns wrong string from different assemblies

ResourceManager.GetString() method returns wrong string from different assemblies I have 2 resource files, one with english and another foreign. When I call from the .Designer.cs file it is always ret...

4 Oct at 15:30

Read text file from C# Resources

Read text file from C# Resources I need to read a file from my resources and add it to a list. my code: Ive searched for this an

30 Mar at 19:44

Android XML Percent Symbol

Android XML Percent Symbol I have an array of strings in which the `%` symbol is used. Proper format for using the `%` is `%`. When I have a string in that array with multiple `%` it gives me ...

10 Sep at 10:29

How to execute an executable embedded as resource

How to execute an executable embedded as resource Is it possible to execute an exe file that is included in the project as a resource? Can I fetch the file as a byte array and execute it in memory? I ...

1 Feb at 11:6

Get OS-level system information

Get OS-level system information I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows. Has anyone been able to...

13 Dec at 21:58

Get a resource using getResource()

Get a resource using getResource() I need to get a resource image file in a java project. What I'm doing is: The directory structure is the following: The fact is that I always get as the f

1 Aug at 10:33

Is there a way to get the source code from an APK file?

Is there a way to get the source code from an APK file? The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months. All I ha...

Any easy way to use icons from resources?

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 ...

13 Apr at 23:16

What is the single most influential book every programmer should read?

What is the single most influential book every programmer should read? If you could go back in time and tell yourself to read a specific book at the beginning of your career as a developer, which book...

26 Sep at 15:39

Release resources in .Net C#

Release resources in .Net C# I'm new to C# and .NET, ,and have been reading around about it. I need to know why and when do I need to release resources? Doesn't the garbage collector take care of ever...

4 May at 09:13

C# attribute text from resource file?

C# attribute text from resource file? I have an attribute and i want to load text to the attribute from a resource file. But I keep getting "An attribute argument must be a constant expression, typeof...

12 Dec at 15:8

How to use ClassLoader.getResources() correctly?

How to use ClassLoader.getResources() correctly? How can I use `ClassLoader.getResources()` to find recursivly resources from my classpath? E.g. - finding all resources in the `META-INF` "directory": ...