resources

Format exception messages using InvariantCulture or CurrentCulture?

When throwing exceptions, I often pass in a formatted string that exposes details about the problem that has occurred. I always specify a formatting provider if possible (which is good practice because otherwise you may forget to decide which culture is appropriate and as the default is the current culture, that can lead to many bugs). ...

Suggestions to learn any programming language after Matlab

I've taken a course in C++ in my freshman year in undergrad. However once it was over I never employed it in any project or use. I am familiar with some average topics in C++ prior to where 'link list' starts. Once I got the opportunity to do my first project after Sophomore year, I was suggested by my prof. to learn Matlab which is wide...

Booking resources in SharePoint

We need to automate booking of technicians through SharePoint. We have different number of technicians available each day. The users can look at the calendar to see availability, after they select a time when a technician is available they are presented with form asking for some details. Submit a form books a technician and sends an emai...

Silverlight 4 and Page.Resources Binding

Hi All, In my SL4 application, I have a Class called Images which has two properties (ImagePath, ImageName) and a method getImages() which retruns ObservableCollection list of all Images. I need to create a Resource on my Page so that when a DataTemplate is loaded dynamically it can have access to the Images in one of its ComboBox field....

Adding Updating and Deleting Key Value From Resource File Programmatically

I was dealing with Resource Files in .NET, Currently I adds each key, value pair manually and want to automate most of the things. Is it possible to add, update and delete any key value pair from existing resource file. ...

How can I distinguish 'Meta data change' from 'File change'

Hi Everyone! My Resource(XML file)'s listener has two type of events as following. IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_BUILD When POST_CHANGE occurs, My plugin will parse the Resource(XML file). And when PRE_BUILD occurs, My plugin will add Problem Mark as following IMarker marker = file.createMarker(PR...

ElementName not working when assigning DataTemplate from code behind?

I am trying to access Control using ElementName from DataTemplate that is used in different UserControl (Resources) than defined (in xaml). Imagine this situation: MyUserControl.xaml with following DataTemplate in resources: <UserControl.Resources> <DataTemplate x:Key="SomeTemplate"> <TextBlock Text="{Binding Text, ElementNam...

Suggestions for deploying openSSL dlls

I made a simple application that uses Indy and requires OpenSSL dlls. I am not going to write an installer for it, so I have 2 options: 1) deploy it by copying the application exe + libeay32.dll + ssleay32.dll in the same folder 2) put libeay32.dll and ssleay32.dll in the exe resources and extract them to the applicationpath on progra...

How to see resource file content in Visual Studio when created pro programmatically

I created a resource file programmatically. File got created successfully. But when I tries to open it in Visual Studio or notepad it shows me some encoded characters. I was expecting to get an XML. Here is what I was expecting and getting. What I did in coding is ResourceWriter rw = new ResourceWriter("Resource.en.resx"); r...

Learning about the x86 Instruction Set

What are good resources for learning about the x86 instruction set? I'm a total beginner, and have no real understanding of registers, interrupts, address modes etc, so perhaps a generic book on ISAs would be better first. I really have no clue, to be honest. My ultimate goal is to be fluent in x86 assembly. ...

Android: retrieving all Drawable resources from Resources object

In my Android project, I want to loop through the entire collection of Drawable resources. Normally, you can only retrieve a specific resource via its ID using something like: InputStream is = Resources.getSystem().openRawResource(resourceId) However, I want to get all Drawable resources where I won't know their ID's beforehand. Is ...

WPF window template resource

Hi guys! I am trying to define a window template that can be used by windows in other assemblies. I define a window template and store it in resource dictionary in some assembly. After, I use this template in other assembly on window definition in XAML. It looks that the template is accepted and I can see updated window in VS-2010 design...

Android ImageButton setImageResource from variable

I want to setImageResource for an ImageButton programatically, based on a variable. For eg: if size=5, I want to setImageResource to R.drawable.five if size=6, I want to setImageResource to R.drawable.six Unfortunately, I have too many of these, so an if-else or switch gets tiring. Is there a way to achieve something like: R.dr...

Encrypting files in resource constrained mobile devices

So the basic question is in encrypting files in resource constrained devices. I have used a rather dangerous approach to use two FileStreams, where FileStream 1 is reading from the file and copying it to a byte array The contents of the byte array is encrypted. FileStream 2, writes the bytes back to the same file. This works fine b...

WPF+MVVM: How to display VM via resource dictionary

At the moment I am creating new instance of both View and ViewModel and assign view.DataContext = vm in the application in the handler of 'Startup' application event In the http://msdn.microsoft.com/en-us/magazine/dd419663.aspx in the "Applying a View to a ViewModel" chapter I've read that it would be a good idea to bind ViewModel objec...

[.NET] Get all available cultures from a .resx file group

I need to programatically list the available cultures in a resx file group, but the ResourceManager class doesn't seem to help. I may have : Labels.resx Labels.fr-FR.resx Labels.ro-RO.resx and so on However, how can I find these three (or how many would there be) cultures at runtime? ...

How to estimate size of Windows CE run-time image

I am developing an application, and need to estimate how much resources (RAM and ROM) it will need to run on a device. I have been looking online, but couldn't find any good tip on how to do this. The system in question is an industrial system. The application itself will need to have a .NET Compact framework, and following components b...

android - application displaying videos

how do i display videos retrieved from resources in my android application ...

Reuse tips for Android

Android resources and their automatically generated references simplify the development of one app a great deal. But they also complicate the reuse of Android activities in multiple projects, and in general of any component that uses resources. Library projects are a limited alternative. A project can depend on many library projects, bu...

getResourceAsStream fails under new environment?

Hallo, i have following line of code: InputStream passoloExportFileInputStream = getClass().getClassLoader().getResourceAsStream("/com/thinkplexx/lang/de/general.xml"); and i know that jar with com/thinkplexx/lang/de/general.xml is in classpath. It worked under "previous environment", which is maven2 build. Now, i evaluate maven3 a...