resources

Link a compiled .res file with CMake

妖精的绣舞 提交于 2020-01-03 11:27:01
问题 I'm trying to link a compiled .res file with cmake but I can't seem to find out much info on how to do it. The closest I have got is SET(RESOURCE_FILE resource.res) file(GLOB src_files "src/*.h" "src/*.cpp" "${RESOURCE_FILE}" ) add_executable(exename ${src_files}) and then manually linking the .res file thru the IDE (i.e. in visual studio dropping the .res file in the Linker additional dependencies). This means I have to reset the additional dependency every time I change the cmake file.

Wrong Java resource bundle loaded

烈酒焚心 提交于 2020-01-03 10:18:10
问题 In my application, I'm using java resource bundle for the translation of its labels. I currently have two files: resources.properties with labels in English (default language) resources_fr.properties with labels in French Then, I load the bundle properties with the following command: ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, locale); ... where locale is the user's locale. When I'm working with a French web browser, that's ok, I'm getting all my messages in French, as my locale is

dimens.xml in values folder for 7“ and 10” tablet, how to?

无人久伴 提交于 2020-01-03 09:09:22
问题 I have tried with: values-mpdi, values-land-mpdi, values-hpdi and values-land-hdpi which works fine in phone's screens, the problem is that it could happen that a 7" tablet takes the value from values-mdpi and a 10" tablet too, but the result is not the same, I guess because of the screen size (although is the same resolution and similar density) so I tried: values-sw600dp-hdpi values-sw600dp-port-hdpi values-sw600dp-mdpi values-sw600dp-port-mdpi values-sw720dp-hdpi values-sw720dp-port-hdpi

dimens.xml in values folder for 7“ and 10” tablet, how to?

强颜欢笑 提交于 2020-01-03 09:09:05
问题 I have tried with: values-mpdi, values-land-mpdi, values-hpdi and values-land-hdpi which works fine in phone's screens, the problem is that it could happen that a 7" tablet takes the value from values-mdpi and a 10" tablet too, but the result is not the same, I guess because of the screen size (although is the same resolution and similar density) so I tried: values-sw600dp-hdpi values-sw600dp-port-hdpi values-sw600dp-mdpi values-sw600dp-port-mdpi values-sw720dp-hdpi values-sw720dp-port-hdpi

Application.LoadComponent cannot find resource

独自空忆成欢 提交于 2020-01-03 08:08:26
问题 I have a xaml file in my project at Ns1\Ns2\myfile.xaml . It's build action is set to Page, with a custom tool of MSBuild:Compile. I'm trying to load this file in a static constructor: namespace Ns1.Ns2 { internal class MyClass { static() { var obj = Application.LoadComponent(new Uri("/myfile.xaml", UriKind.Relative)); } } } However, when I try to run this code, it fails with an exception cannot locate resource 'myfile.xaml' . If I change the URI to an absolute URI: var obj = Application

Application.LoadComponent cannot find resource

别等时光非礼了梦想. 提交于 2020-01-03 08:08:09
问题 I have a xaml file in my project at Ns1\Ns2\myfile.xaml . It's build action is set to Page, with a custom tool of MSBuild:Compile. I'm trying to load this file in a static constructor: namespace Ns1.Ns2 { internal class MyClass { static() { var obj = Application.LoadComponent(new Uri("/myfile.xaml", UriKind.Relative)); } } } However, when I try to run this code, it fails with an exception cannot locate resource 'myfile.xaml' . If I change the URI to an absolute URI: var obj = Application

Runnable jar runs fine with java -jar, but problems with double-click

故事扮演 提交于 2020-01-03 05:04:07
问题 I am using the eclipse IDE and I just exported my project using 'export->Runnable Jar'. In my code, I have loaded a map using URL map1url = this.getClass().getResource("map01.txt"); and later inputmap = new File(map1url.getFile()); and then scanned its data using Scanner sc = null; try { sc = new Scanner(inputmap); } catch (FileNotFoundException e) { e.printStackTrace(); } Now, when I package the map01.txt into the jar, and double click it, it runs, but can't find the map01.txt. When I use

Android Resource not found exception

旧街凉风 提交于 2020-01-03 04:40:07
问题 So I am not such a newbie in Programming, Java or Android developing, but I got a strange issue: I have made an application, quite advanced, and have it on market. For now I have over 1000 installs and I have around 4 or 5 crash reports for a ResourceNotFoundException. The strangest thing is that the line it crashes on is on setContentView(R.layout.some_custom_layout) In code I am always referring to resourced by someTxtView.setText(R.string.some_string) So I am wondering if I used mContext

Firefox plugin for a web developer that shows all resources (js, css, html) as a single unified file?

六眼飞鱼酱① 提交于 2020-01-03 03:37:08
问题 I'm developing with a really complex cms system, and sometimes I need to know if something was sent to my html rendering. Since this is a huge cms system, I have at least 30 resources linked to a page (js, css), and going through each one, clicking and searching for a string is not the best way to do it. I would like to have a plugin that gets all the resources from a page, merges them as text, so i can search only once. Is this possible? Does something like this exists? (I know Firebug can

updating a string table with UpdateResource

六月ゝ 毕业季﹏ 提交于 2020-01-03 02:49:12
问题 I asked the question here - updating STRING TABLE via UpdateResource (adding multiple strings) And now I am asking again, as this time I can add alot more detail to the question. I've been trying this for the past day or something to no real avail. What I want the outcome to be is like this (I manually added the strings in MSVS): As you can see, multiple entries, and it's "clean" and can be easily accessed by the program! Right now, my source: wstring buffer[5] = {L" Meow",L" I",L" Am",L" A"