resources

What's the difference between Resource and Content in a WPF application.

I recently learned that Embedded Resource means that assets are saved to an external .resx file. Setting assets to Resource makes them join the .exe file simply. Now, I'm confused of when to use Content and Resource. Any info? ...

Py2exe: Embed static files in exe file itself and access them

Hi all, I found a solution to add files in library.zip via: Extend py2exe to copy files to the zipfile where pkg_resources can load them. I can access to my file when library.zip is not include the exe. I add a file : text.txt in directory: foo/media in library.zip. And I use this code: import pkg_resources import zipfile from cStrin...

EJB / Resource injection references - passing to Pojo's

In JBoss 4.x, @EJB / @Resource annotations can only be used in EJBs. If you use a stateless bean or an MDB as an entry point, you can inject your resources using the annotations. However, if you have Pojo's that perform business logic and need to use these resources, they can not be injected via annotations. I am passing the reference...

Is it smart to put every small icon in one .NET ImageList control?

I'm developing a VB.NET WinForms application, and I'm using lots of small 16x16 32bit icons everywhere; most of which are nested behind tabs or otherwise invisible. I'm putting all of them in one big ImageList control, it seems easier to manage them from there. My question is, is this smart? I'm using the imagelist even in buttons, and ...

iPhone: rename resource on copy to bundle?

Hi all, I have an iPhone project (Xcode, Objective C++) with two targets - A and B. I want these targets to have different launch screens. The launch screen has a hard-coded name Default.png. I made Default_A.png and Default_B.png. At first, I tried to add both images to the project in separate folders (folders, not groups) under the s...

Visual Studio 2008 Resource Editor

Hi, I am on VC++; What is the unit used in Resource Editor? It does not seem to be pixel.. Than how to use pixel, or is there a option to use pixel? Here is a screen shot... ...

What is the opposite of the Loaded event in Silverlight?

I am writing an app in Silverlight 3 using the Application Navigation template. So each page has a Loaded event, however I don't see a Closing event or an Unloaded event. Does this concept even exist in SL3? For instance, how do I dispose of resources when this particular page closes and I navigate to another page in my app? ...

Netbeans "Build" vs. "Source" resource problem

The text for my buttons is being saved by default as a resource. But then when I click "run," the resource file it loads is the one in the "build" part of the project, not the "source" part. And they aren't the same! For instance, one button I call "create chart". If I do "Clean and Build" it loads correctly, but after that, any changes...

Can I have some advice about globalization in .net for a multi-language CMS?

I am building a CMS that will support 7 different languages/cultures. For images that cannot be changed through the CMS I think I am going to use different resource files. As for the content I was thinking of separate databases. If the user needs to change the current culure I have a drop down that stores the chosen culture in a cooki...

PHP/GD - Finding Image Resource Type

Having only a valid GD image resource is it possible to find out the type of the original image? For instance: $image = ImageCreateFromPNG('http://sstatic.net/so/img/logo.png'); Can I get the original image type (PNG) having only the $image variable available? ...

vc++ localization support in resource editor automatically

Hi; I am developing a multilingual software which is compiled with MultiByte Character Set compile option. What would you suggest to support multiple languages without using an external resource dll etc. Rather, there is an option "Language" for resource types, Also "String Table" in resource editor has this option. So If I set a langua...

Overlaying images from stream in VB.NET

I'd like to overlay a number of images (PNG, same size for all, with transparency). So far, my code is as follows. bg = New Bitmap(My.Resources.blue) g = Graphics.FromImage(bg) overlay = New Bitmap(tree.Image) g.DrawImage(overlay, 0, 0) Now, I would like to overlay one more image, but this is based on a user's input f...

Overlays using streams resizes an image in VB.Net?

Hi everyone As a follow up to this thread I found that the overlay function was working fine. However, it seems that if I use the overlay function while reading an image from a stream, that it would enlarge the picture before overlaying it. ie: overlay = New Bitmap(stream) g.DrawImage(overlay, 0, 0) Seems to enlarge the image befor...

Retrieve property from classpath inside POM

For my current project I want to integrate a maven plug-in for database migrations. For this plug-in to work, however, I have to obtain the database settings inside my POM. My database settings are currently placed inside a hibernate.properties file, positioned in a directory that is marked as maven resource. For a variety of reasons I d...

How to set up Velocity to find templates in the file system on Windows?

I have a very simple Velocity application that works on Linux and MacOS and fails on Windows. The problem is with the resource locations. I just give it "/" to allow it to recognize file system paths, but on Windows that fails to work for "c:/....." pathnames. I suspect that there is a simpler solution to this, but what? velocityEngine...

Online jquery shell/parser

Is there a jquery shell/parser emulation online where i can input simple jquery commands on a pasted HTML snippet and see it's effects or capture it's outputs. It would be of real help in understanding basic jquery functions rather than opening up a new html file up and writing code from scratch. cheers ...

Can you recover from a "Resource 1 not found"? in Delphi 2010

A fairly complex project was muddling along with lots of work done last night when I decided to turn in. But thinking about adding some gestures got me up after three hours of sleep and I went at the code again, which was a mistake. I added the gesture manager and then sleepily hit the F1 key to look up the help on gestures. Coming back ...

Loading external source code and using them internally (by re-compiling or something)

Hi, Is there a way in using externally stored sourcecode and loading it into a Java programm, so that it can be used by it? I would like to have a program that can be altered without editing the complete source code and that this is even possible without compiling this every time. Another advantage is, that I can change parts of the co...

Eclipse/Java - Values in R.string.* return int?

I thought I'd be classy and use the string.xml file to define some constant strings for things like exception messages. In strings.xml I hit Add, chose the "String" option (not 'String Array'), then gave it a name and value. I was surprised to see that this code doesn't work: throw new Exception(R.string.MyExceptionMessage); And tha...

Looking for a resource which provides django templates

Hello all, I'm pretty handy with django and python but I'm terrible at the "visual" aspect of the web-design. Even after quite a bit of google-ing I haven't been able to find any sort of resource that has download-able templates complete with css, images, etc. that could be used to set up a basic website easily. I'm looking for example...