resources

Any way to reuse Bindings in WPF?

I'm getting to the point in a WPF application where all of the bindings on my controls are getting quite repetitive and also a little too verbose. Also if I want to change this binding I would have to change it in various places instead of just one. Is there any way to write the source part of the binding once such as in a resource and...

Sharing asp.net resource files between web applications

I have multiple projects that need to share resource files (.resx) Suggestions have been made to move resource files to a separate assembly and have web projects reference it. Is there an example of how to do this? Do I create a new Class Library project and move App_GlobalResource folder inside of that? I don't think that will work b...

System.Windows.Application.GetResourceStream returns null

If I debug a WPF-application with Catalog.xaml as Content, I can't get the resource stream of it - GetResourceStream returns null: var uri = new Uri("/Assembly;component/Catalog.xaml", UriKind.Relative); var foo = System.Windows.Application.GetResourceStream(uri); foo is null. What am I doing wrong? ...

How to force WPF UI element to use resources from the theme, ignoring app's resources

Is there a way to make a WPF element use (explicitly or implicitly) the resources located in themes even if app.xaml provides resources with the same 'key'-s? I have all of the default controls restyled, and all those styles are merged to the app's ResourceDictionary. Now I have one single XAML file that has a single element which I'd l...

Manage view state with multiple combined REST resources

Say for example I would write a forum which would look like this in the browser: - original post - Re: original post - Re^2: original post - Re^2: original post + Re: original post _______________________________________________________________________________ Text of the selected post. The tree view would be one resourc...

Cannot get resource from android application

I am buiding an Android app, and I have a problem to get resource from string.xml. I need to have an URL in String.xml that will be used several times through the app. I tried Resources.getText("my_url"), but this does not work. Eclipse complains when I use this. Do you think this is the best way to do ? ...

RESTful view counter

I would like to count the access to a resource, but HTTP GET should not modify a resource. The counter should be displayed with the resource. A similar case would be to store the last access. What is the REST way to realize a view counter? ...

Test data sources in Android unit testing

I want to test parsing of data returned from server. I thought I might create several test XML files and then feed them to the sax parser which uses my custom data handler (as in the application that I test). But where should I put those test XMLs? I tried with [project_root]/res/xml, but then I get the error: android.content.res.Re...

Most Resource-Efficient Way to Deploy Multiple Rails Apps on a Single Server

I have a Virtual Dedicated Server that I use to host small websites that aren't large enough to justify their own dedicated slice. I am a Rails developer and am currently using an Ubuntu/Nginx/Mongrel Cluster/SQLite stack to deploy these applications. I feel that the memory being consumed by each Mongrel instance is too high. I am won...

Loading Resources Once in Java

Hi, I have a project in Java requiring to load large files (corpus for NLP) for every execution. Let's call it method load(), and this is only called once, and the method process(String text) can be called multiple times where these belong to the class Tagger. My problem is that whenever I need to tweak some code except for class Tagge...

US Government APIs?

I'm working on an app to provide an easy way for people to track the status of a bill [and various other political information]. I love the idea of OpenCongress, for instance, which surfaces summary information on legislation as it navigates the political process, but I'd like it if it had a tag-based search system and some other rich s...

Zend-studio does not recognize my Zend_form class insde my admin module

In my application all works fine. But in zend studio, I got an alert saying that my Admin_Form_... does not exist. If I put this form in root of application folder (application/forms) I can use autocompletion and my class is regonized. But if I put in a module specific directory, it is as if my class didn't exists. What should I do to ...

Trying to use a ResourceDictionary, but styles in it come up as not found

I have a Silverlight class library, called MyClassLibrary. In it, I have a user control, called MyControl. Within the control I define user resources: <UserControl.Resources> <Style x:Key="ComboBoxStyle" TargetType="ComboBox"> (lots of xaml) </Style> </UserControl.Resources> The control consumes the style like this: ...

Accessing a resource within a jar (working in Netbeans but not on command line)

I have a jar file with bundled resources (language model binary files) that need loading at run time. The directory structure within the jar is tagger/app.class tagger/models/stop/SentDetect.bin.gz where SentDetect.bin.gz is a binary whos path is loaded into a thirdparty class (SentDetector) as a String parameter, i.e. URL url = this...

Is there a way to create a subfolder in the resources folder in Xcode?

This might be an overly simple question, but I am a beginner at programming for the iPhone with Xcode. My project uses a lot of picture files for UIImageView animation arrays. I add all of the pictures into my resource file but the resources folder is getting a bit unwieldy. Is there a way to add subfolders in resources that do not ch...

java- jar file cannot find resources

Hello everyone! I 'm working on a java application and in the program I use some files such as images, a local database and an .htm file (used as help file). I have tried to make the access to these resources, location independent. So I've made in the package that contains my source files, a subfolder named resources and I've put ther...

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 don't want to write the file to a temporary location and execute it there. I'm searching for a solution where I can execute it in memory. (It's not a .NET assembly.) ...

LoadString, static library and executables

My project is set up so all the framework code and modules are compiled to a static .lib (let's call it framework.lib), and many test projects use framework.lib and compile to executable files. For error handling, I'm trying to put the resource strings in framework.rc (part of the framework.lib project) and load the strings in the exe...

Visual Studio resource editor: there can only be one string table?

I created a string table in my .rc file containing my English strings - now I need to add another string table for a different language. If I try to do: Add Resource... -> String Table -> New I get the error: "there cannot be more than one instance of this type". I know I can open up the .rc file in notepad and add language in th...

Embedding an application manifest into a VB6 exe

I have recently gone through a bunch of standalone utility apps written in VB6 to make sure that registry virtualization is turned off for Windows Vista and above. I created a standalone manifest file for each exe, set the requestedExecutionLevel appropriately (some of them need to modify HKEY_LOCAL_MACHINE registry keys, others do not),...