Search Results

Search found 58 results on 3 pages for 'resourcemanager'.

Page 1/3 | 1 2 3  | Next Page >

  • How to use ResourceManager in a "website" mode ?

    - by Erick
    I am trying here to do a manual translation for the application I am working with. (There is already a working LocalizationModule but it's working dodgy, so I can't use <asp:Localize /> tags. Normally with ResourceManager you are supposed to be using it as Namespace.Folder.Resourcename (in an application). Currently I am translating an existing asp.net "website" (not web application so no namespace here....). The resources are located into a folder name "Locales/resources" which contains "fr-ca.resx" and "en-us.resx". So I used a code with something like this : public static string T(string search) { System.Resources.ResourceManager resMan = new System.Resources.ResourceManager( "Locales", System.Reflection.Assembly.GetExecutingAssembly(), null ); var text = resMan.GetString(search, System.Threading.Thread.CurrentThread.CurrentCulture); if (text == null) return "null"; else if (text == string.Empty) return "empty"; else return text; } and inside the page I have something like this <%= Locale.T("T_HOME") %> When I refresh I have this : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Locales.resources" was correctly embedded or linked into assembly "App_Code.9yopn1f7" at compile time, or that all the satellite assemblies required are loadable and fully signed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Locales.resources" was correctly embedded or linked into assembly "App_Code.9yopn1f7" at compile time, or that all the satellite assemblies required are loadable and fully signed. Source Error: Line 14: System.Resources.ResourceManager resMan = new System.Resources.ResourceManager( "Locales", System.Reflection.Assembly.GetExecutingAssembly(), null ); Line 15: Line 16: var text = resMan.GetString(search, System.Threading.Thread.CurrentThread.CurrentCulture); Line 17: Line 18: if (text == null) Source File: c:\inetpub\vhosts\galerieocarre.com\subdomains\dev\httpdocs\App_Code\Locale.cs Line: 16 I even tried to load the resource with Locales.fr-ca or only fr-ca nothing quite work here.

    Read the article

  • Java Localization & ResourceManager

    - by Gopalakrishnan Subramani
    I want to add resources to my netbeans project but I don't know where to add or how to get the added resource via ResourceManager so that I can localize the text. I could not find any dummy guide to add the resource files and read the localized strings using resource manager. What is the format of the resource file? It is .properties or a xml file? Can you help me?

    Read the article

  • ResourceManager and not supported platform

    - by wince
    I use ResourceManager for UI localization of my WinCE 5 software. I have some resource files with text strings on different languages Resourse.resx Resourse.de-DE.resx Resourse.ru-RU.resx When I want to display UI in English I call: Resourse.Culture = new CultureInfo("en-US"); label1.Text = Resourse.LabelText; in German: Resourse.Culture = new CultureInfo("de-DE"); label1.Text = Resourse.LabelText; in Russian: Resourse.Culture = new CultureInfo("ru-RU"); label1.Text = Resourse.LabelText; but here I get PlatformNotSupportedException. I know that my WinCE does not contain Russian and I cannot modify OS to appened this, so my question is how I can say to ResourceManger to use Resourse.ru-RU.resx when I set Culture = new CultureInfo("ru-RU") ?

    Read the article

  • .net Globalization and ResourceManager

    - by Andrew Bullock
    I've got a console app and i need to globalize some of the hardcoded message strings. I've got two assemblies: MyProgram.Console (Console app) MyProgram.Core (class lib) In MyProgram.Core I've made a Language.en-GB.resx and set it as an Embedded Resource. In the resource I've created a key/value pair: "SomeKey" : "SomeValue" When I build my application I get: bin/MyProgram.Console.exe bin/MyProgram.Core.dll bin/en-BG/MyProgram.Core.resources.dll How do I address these resource key/values? Currently I'm trying this from a class within MyProgram.Core: var mgr = new ResourceManager(GetType().Assembly.GetName().Name, Assembly.GetExecutingAssembly()); mgr.GetString("SomeKey", new Culture("en-GB")); But I keep getting: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyProgram.Core.resources" was correctly embedded or linked into assembly "MyProgram.Core" at compile time, or that all the satellite assemblies required are loadable and fully signed. What am I doing wrong? I've tried every combination I can think of for the baseName argument to the ResourceManagers ctor. Thanks

    Read the article

  • Unexpected start of already-primary server processes when heartbeat on secondary is stopped.

    - by vorik
    Hi, I've got an active-passive Heartbeat cluster with Apache, MySQL, ActiveMQ and DRBD. Today, I wanted to perform hardware-maintenance on the secondary node (node04), so I stopped the heartbeat service before shutting it down. Then, the primary node (node03) received a shutdown notice from the secondary node (node04). This logging comes from the primary node: node03 heartbeat[4458]: 2010/03/08_08:52:56 info: Received shutdown notice from 'node04.companydomain.nl'. heartbeat[4458]: 2010/03/08_08:52:56 info: Resources being acquired from node04.companydomain.nl. harc[27522]: 2010/03/08_08:52:56 info: Running /etc/ha.d/rc.d/status status heartbeat[27523]: 2010/03/08_08:52:56 info: Local Resource acquisition completed. mach_down[27567]: 2010/03/08_08:52:56 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired mach_down[27567]: 2010/03/08_08:52:56 info: mach_down takeover complete for node node04.companydomain.nl. heartbeat[4458]: 2010/03/08_08:52:56 info: mach_down takeover complete. harc[27620]: 2010/03/08_08:52:56 info: Running /etc/ha.d/rc.d/ip-request-resp ip-request-resp ip-request-resp[27620]: 2010/03/08_08:52:56 received ip-request-resp drbddisk OK yes ResourceManager[27645]: 2010/03/08_08:52:56 info: Acquiring resource group: node03.companydomain.nl drbddisk Filesystem::/dev/drbd0::/data::ext3 mysql apache::/etc/httpd/conf/httpd.conf LVSSyncDaemonSwap::master monitor activemq tivoli-cluster MailTo::[email protected]::DRBDFailureDrisAcc MailTo::[email protected]::DRBDFailureDrisAcc 1.2.3.212 ResourceManager[27645]: 2010/03/08_08:52:56 info: Running /etc/ha.d/resource.d/drbddisk start Filesystem[27700]: 2010/03/08_08:52:57 INFO: Running OK ResourceManager[27645]: 2010/03/08_08:52:57 info: Running /etc/ha.d/resource.d/mysql start mysql[27783]: 2010/03/08_08:52:57 Starting MySQL[ OK ] apache[27853]: 2010/03/08_08:52:57 INFO: Running OK ResourceManager[27645]: 2010/03/08_08:52:57 info: Running /etc/ha.d/resource.d/monitor start monitor[28160]: 2010/03/08_08:52:58 ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/activemq start activemq[28210]: 2010/03/08_08:52:58 Starting ActiveMQ Broker... ActiveMQ Broker is already running. ResourceManager[27645]: 2010/03/08_08:52:58 ERROR: Return code 1 from /etc/ha.d/resource.d/activemq ResourceManager[27645]: 2010/03/08_08:52:58 CRIT: Giving up resources due to failure of activemq ResourceManager[27645]: 2010/03/08_08:52:58 info: Releasing resource group: node03.companydomain.nl drbddisk Filesystem::/dev/drbd0::/data::ext3 mysql apache::/etc/httpd/conf/httpd.conf LVSSyncDaemonSwap::master monitor activemq tivoli-cluster MailTo::[email protected]::DRBDFailureDrisAcc MailTo::[email protected]::DRBDFailureDrisAcc 1.2.3.212 ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/IPaddr 1.2.3.212 stop IPaddr[28329]: 2010/03/08_08:52:58 INFO: ifconfig eth0:0 down IPaddr[28312]: 2010/03/08_08:52:58 INFO: Success ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/MailTo [email protected] DRBDFailureDrisAcc stop MailTo[28378]: 2010/03/08_08:52:58 INFO: Success ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/MailTo [email protected] DRBDFailureDrisAcc stop MailTo[28433]: 2010/03/08_08:52:58 INFO: Success ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/tivoli-cluster stop ResourceManager[27645]: 2010/03/08_08:52:58 info: Running /etc/ha.d/resource.d/activemq stop activemq[28503]: 2010/03/08_08:53:01 Stopping ActiveMQ Broker... Stopped ActiveMQ Broker. ResourceManager[27645]: 2010/03/08_08:53:01 info: Running /etc/ha.d/resource.d/monitor stop monitor[28681]: 2010/03/08_08:53:01 ResourceManager[27645]: 2010/03/08_08:53:01 info: Running /etc/ha.d/resource.d/LVSSyncDaemonSwap master stop LVSSyncDaemonSwap[28714]: 2010/03/08_08:53:02 info: ipvs_syncmaster down LVSSyncDaemonSwap[28714]: 2010/03/08_08:53:02 info: ipvs_syncbackup up LVSSyncDaemonSwap[28714]: 2010/03/08_08:53:02 info: ipvs_syncmaster released ResourceManager[27645]: 2010/03/08_08:53:02 info: Running /etc/ha.d/resource.d/apache /etc/httpd/conf/httpd.conf stop apache[28782]: 2010/03/08_08:53:03 INFO: Killing apache PID 18390 apache[28782]: 2010/03/08_08:53:03 INFO: apache stopped. apache[28771]: 2010/03/08_08:53:03 INFO: Success ResourceManager[27645]: 2010/03/08_08:53:03 info: Running /etc/ha.d/resource.d/mysql stop mysql[28851]: 2010/03/08_08:53:24 Shutting down MySQL.....................[ OK ] ResourceManager[27645]: 2010/03/08_08:53:24 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd0 /data ext3 stop Filesystem[29010]: 2010/03/08_08:53:25 INFO: Running stop for /dev/drbd0 on /data Filesystem[29010]: 2010/03/08_08:53:25 INFO: Trying to unmount /data Filesystem[29010]: 2010/03/08_08:53:25 ERROR: Couldn't unmount /data; trying cleanup with SIGTERM Filesystem[29010]: 2010/03/08_08:53:25 INFO: Some processes on /data were signalled Filesystem[29010]: 2010/03/08_08:53:27 INFO: unmounted /data successfully Filesystem[28999]: 2010/03/08_08:53:27 INFO: Success ResourceManager[27645]: 2010/03/08_08:53:27 info: Running /etc/ha.d/resource.d/drbddisk stop heartbeat[4458]: 2010/03/08_08:53:29 WARN: node node04.companydomain.nl: is dead heartbeat[4458]: 2010/03/08_08:53:29 info: Dead node node04.companydomain.nl gave up resources. heartbeat[4458]: 2010/03/08_08:53:29 info: Link node04.companydomain.nl:eth0 dead. heartbeat[4458]: 2010/03/08_08:53:29 info: Link node04.companydomain.nl:eth1 dead. hb_standby[29193]: 2010/03/08_08:53:57 Going standby [foreign]. heartbeat[4458]: 2010/03/08_08:53:57 info: node03.companydomain.nl wants to go standby [foreign] Soo... What just happened here??? Heartbeat on node04 stopped and told node03, which was the active node at the time. Somehow, node03 decided to start the cluster processes that were already running. (For the processes that are not critical, I always return a 0 from the startupscript so it does not stops the entire cluster when a non-essential part fails.) When starting ActiveMQ, it returns status 1 because it is already running. This fails the node and shuts everything down. As heartbeat is not running on the secondary node, it cannot failover to there. When I tried to run ha_takeover to restart the resources, absolutely nothing happened. Only after I restarted heartbeat on the primary node the resources could be started (after a delay of 2 minutes). These are my questions: Why does heartbeat on the primary node try to start the cluster processes again? Why did ha_takeover not work? What can I do to prevent this from happening? Server configuration: DRBD: version: 8.3.7 (api:88/proto:86-91) GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by [email protected], 2010-01-20 09:14:48 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate B r---- ns:0 nr:6459432 dw:6459432 dr:0 al:0 bm:301 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0 uname -a Linux node04 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux haresources node03.companydomain.nl \ drbddisk \ Filesystem::/dev/drbd0::/data::ext3 \ mysql \ apache::/etc/httpd/conf/httpd.conf \ LVSSyncDaemonSwap::master \ monitor \ activemq \ tivoli-cluster \ MailTo::[email protected]::DRBDFailureDrisAcc \ MailTo::[email protected]::DRBDFailureDrisAcc \ 1.2.3.212 ha.cf debugfile /var/log/ha-debug logfile /var/log/ha-log keepalive 500ms deadtime 30 warntime 10 initdead 120 udpport 694 mcast eth0 225.0.0.3 694 1 0 mcast eth1 225.0.0.4 694 1 0 auto_failback off node node03.companydomain.nl node node04.companydomain.nl respawn hacluster /usr/lib64/heartbeat/dopd apiauth dopd gid=haclient uid=hacluster Thank you very much in advance, Ger Apeldoorn

    Read the article

  • How to retrieve path for a file embedded in Resources (Resource Manager) - .net C#

    - by curiousone
    Hi, I am trying to retrieve file path for a html file that is embedded in resource (resx file) in VS2008 C# project. I want to give path of this file to native webbrowser control (PIEHtml) to be able to navigate (DTM_NAVIGATE) in my application. I know I can pass the string to this control using DTM_ADDTEXTW but since html text size is so big, I dont want to pass string to the control. I need to somehow extract the file path for this html file embedded inside resource manager. I tried using but this does not give the file path of html inside assembly: private ResourceManager resManager = new ResourceManager("AppName.FolderName.FileName", System.Reflection.Assembly.GetExecutingAssembly()); this.lbl.Text = resManager.GetString("StringInResources"); and also read Retrieving Resources in Satellite Assemblies but it did not solve my problem. Can somebody please provide info as to how to achieve this ? thanks,

    Read the article

  • How to retrieve path for a file embedded in Resources (Resource Manager)

    - by curiousone
    I am trying to retrieve file path for a html file that is embedded in resource (resx file) in VS2008 C# project. I want to give path of this file to native webbrowser control (PIEHtml) to be able to navigate (DTM_NAVIGATE) in my application. I know I can pass the string to this control using DTM_ADDTEXTW but since html text size is so big, I dont want to pass string to the control. I need to somehow extract the file path for this html file embedded inside resource manager. I tried using but this does not give the file path of html inside assembly: private ResourceManager resManager = new ResourceManager("AppName.FolderName.FileName", System.Reflection.Assembly.GetExecutingAssembly()); this.lbl.Text = resManager.GetString("StringInResources"); and also read Retrieving Resources in Satellite Assemblies but it did not solve my problem. Can somebody please provide info as to how to achieve this ?

    Read the article

  • How to create resource manager in ASP.NET

    - by Bart
    Hello, I would like to create resource manager on my page and use some data stored in my resource files. (default.aspx.resx and default.aspx.en.resx) The code looks like this: System.Resources.ResourceManager myResourceManager = System.Resources.ResourceManager.CreateFileBasedResourceManager("resource", Server.MapPath("App_LocalResources") + Path.DirectorySeparatorChar, null); if (User.Identity.IsAuthenticated) { Welcome.Text = myResourceManager.GetString("LoggedInWelcomeText"); } else { Welcome.Text = myResourceManager.GetString("LoggedOutWelcomeText"); } but when i compile and run it on my local server i get this type of error: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: resource locationInfo: fileName: resource.resources Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName: resource locationInfo: fileName: resource.resources Source Error: Line 89: else Line 90: { Line 91: Welcome.Text = myResourceManager.GetString("LoggedOutWelcomeText"); Line 92: } Line 93: can you please assist me with this issue?

    Read the article

  • Heartbeat won't successfully start up resources from a cold boot when a failed node is present

    - by Matthew
    I currently have two ubuntu servers running Heartbeat and DRBD. The servers are directory connected with a 1000Mbps crossover cable on eth1 and have access to an IP camera LAN on eth0. Now, let's say that one node is down and the remaining functional node is booting after having been shut down. The node that is still functioning won't start up heartbeat and provide access to the drbd resource from a cold boot. I have to manually restart heartbeat by sudo service heartbeat restart to get everything up and running. How can I get it to start fine from a cold start, when only one server is present? Here is the ha.cf: debug /var/log/ha-debug logfile /var/log/ha-log logfacility none keepalive 2 deadtime 10 warntime 7 initdead 60 ucast eth1 192.168.2.2 ucast eth0 10.1.10.201 node EMserver1 node EMserver2 respawn hacluster /usr/lib/heartbeat/ipfail ping 10.1.10.22 10.1.10.21 10.1.10.11 auto_failback off Some material from the syslog: harc[4604]: 2012/11/27_13:54:49 info: Running /etc/ha.d//rc.d/status status mach_down[4632]: 2012/11/27_13:54:49 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired mach_down[4632]: 2012/11/27_13:54:49 info: mach_down takeover complete for node emserver2. Nov 27 13:54:49 EMserver1 heartbeat: [4586]: info: Initial resource acquisition complete (T_RESOURCES(us)) Nov 27 13:54:49 EMserver1 heartbeat: [4586]: info: mach_down takeover complete. IPaddr[4679]: 2012/11/27_13:54:49 INFO: Resource is stopped Nov 27 13:54:49 EMserver1 heartbeat: [4605]: info: Local Resource acquisition completed. harc[4713]: 2012/11/27_13:54:49 info: Running /etc/ha.d//rc.d/ip-request-resp ip-request-resp ip-request-resp[4713]: 2012/11/27_13:54:49 received ip-request-resp IPaddr::10.1.10.254 OK yes ResourceManager[4732]: 2012/11/27_13:54:50 info: Acquiring resource group: emserver1 IPaddr::10.1.10.254 drbddisk::r0 Filesystem::/dev/drbd1::/shr::ext4 nfs-kernel-server IPaddr[4759]: 2012/11/27_13:54:50 INFO: Resource is stopped ResourceManager[4732]: 2012/11/27_13:54:50 info: Running /etc/ha.d/resource.d/IPaddr 10.1.10.254 start IPaddr[4816]: 2012/11/27_13:54:50 INFO: Using calculated nic for 10.1.10.254: eth0 IPaddr[4816]: 2012/11/27_13:54:50 INFO: Using calculated netmask for 10.1.10.254: 255.255.255.0 IPaddr[4816]: 2012/11/27_13:54:50 INFO: eval ifconfig eth0:0 10.1.10.254 netmask 255.255.255.0 broadcast 10.1.10.255 IPaddr[4804]: 2012/11/27_13:54:50 INFO: Success ResourceManager[4732]: 2012/11/27_13:54:50 info: Running /etc/ha.d/resource.d/drbddisk r0 start Filesystem[4965]: 2012/11/27_13:54:50 INFO: Resource is stopped ResourceManager[4732]: 2012/11/27_13:54:50 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /shr ext4 start Filesystem[5039]: 2012/11/27_13:54:50 INFO: Running start for /dev/drbd1 on /shr Filesystem[5033]: 2012/11/27_13:54:51 INFO: Success ResourceManager[4732]: 2012/11/27_13:54:51 info: Running /etc/init.d/nfs-kernel-server start Nov 27 13:55:00 EMserver1 heartbeat: [4586]: info: Local Resource acquisition completed. (none) Nov 27 13:55:00 EMserver1 heartbeat: [4586]: info: local resource transition completed. Nov 27 13:57:46 EMserver1 heartbeat: [4586]: info: Heartbeat shutdown in progress. (4586) Nov 27 13:57:46 EMserver1 heartbeat: [5286]: info: Giving up all HA resources. ResourceManager[5301]: 2012/11/27_13:57:46 info: Releasing resource group: emserver1 IPaddr::10.1.10.254 drbddisk::r0 Filesystem::/dev/drbd1::/shr::ext4 nfs-kernel-server ResourceManager[5301]: 2012/11/27_13:57:46 info: Running /etc/init.d/nfs-kernel-server stop ResourceManager[5301]: 2012/11/27_13:57:46 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /shr ext4 stop Filesystem[5372]: 2012/11/27_13:57:46 INFO: Running stop for /dev/drbd1 on /shr Filesystem[5372]: 2012/11/27_13:57:47 INFO: Trying to unmount /shr Filesystem[5372]: 2012/11/27_13:57:47 INFO: unmounted /shr successfully Filesystem[5366]: 2012/11/27_13:57:47 INFO: Success ResourceManager[5301]: 2012/11/27_13:57:47 info: Running /etc/ha.d/resource.d/drbddisk r0 stop ResourceManager[5301]: 2012/11/27_13:57:47 info: Running /etc/ha.d/resource.d/IPaddr 10.1.10.254 stop IPaddr[5509]: 2012/11/27_13:57:47 INFO: ifconfig eth0:0 down IPaddr[5497]: 2012/11/27_13:57:47 INFO: Success Nov 27 13:57:47 EMserver1 heartbeat: [5286]: info: All HA resources relinquished. Nov 27 13:57:48 EMserver1 heartbeat: [4586]: info: killing /usr/lib/heartbeat/ipfail process group 4603 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBFIFO process 4589 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBWRITE process 4590 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBREAD process 4591 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBWRITE process 4592 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBREAD process 4593 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBWRITE process 4594 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBREAD process 4595 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBWRITE process 4596 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBREAD process 4597 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBWRITE process 4598 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: killing HBREAD process 4599 with signal 15 Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4589 exited. 11 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4596 exited. 10 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4598 exited. 9 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4590 exited. 8 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4595 exited. 7 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4591 exited. 6 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4592 exited. 5 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4593 exited. 4 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4597 exited. 3 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4594 exited. 2 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: Core process 4599 exited. 1 remaining Nov 27 13:57:49 EMserver1 heartbeat: [4586]: info: emserver1 Heartbeat shutdown complete. Here is some more from the log ResourceManager[2576]: 2012/11/28_16:32:42 info: Acquiring resource group: emserver1 IPaddr::10.1.10.254 drbddisk::r0 Filesystem::/dev/drbd1::/shr::ext4 nfs-kernel-server IPaddr[2602]: 2012/11/28_16:32:42 INFO: Running OK Filesystem[2653]: 2012/11/28_16:32:43 INFO: Running OK Nov 28 16:32:52 EMserver1 heartbeat: [1695]: WARN: node emserver2: is dead Nov 28 16:32:52 EMserver1 heartbeat: [1695]: info: Dead node emserver2 gave up resources. Nov 28 16:32:52 EMserver1 ipfail: [1807]: info: Status update: Node emserver2 now has status dead Nov 28 16:32:52 EMserver1 heartbeat: [1695]: info: Link emserver2:eth1 dead. Nov 28 16:32:53 EMserver1 ipfail: [1807]: info: NS: We are still alive! Nov 28 16:32:53 EMserver1 ipfail: [1807]: info: Link Status update: Link emserver2/eth1 now has status dead Nov 28 16:32:55 EMserver1 ipfail: [1807]: info: Asking other side for ping node count. Nov 28 16:32:55 EMserver1 ipfail: [1807]: info: Checking remote count of ping nodes. Nov 28 16:32:57 EMserver1 heartbeat: [1695]: info: Heartbeat shutdown in progress. (1695) Nov 28 16:32:57 EMserver1 heartbeat: [2734]: info: Giving up all HA resources. ResourceManager[2751]: 2012/11/28_16:32:57 info: Releasing resource group: emserver1 IPaddr::10.1.10.254 drbddisk::r0 Filesystem::/dev/drbd1::/shr::ext4 nfs-kernel-server ResourceManager[2751]: 2012/11/28_16:32:57 info: Running /etc/init.d/nfs-kernel-server stop ResourceManager[2751]: 2012/11/28_16:32:57 info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd1 /shr ext4 stop Filesystem[2829]: 2012/11/28_16:32:57 INFO: Running stop for /dev/drbd1 on /shr Filesystem[2829]: 2012/11/28_16:32:57 INFO: Trying to unmount /shr Filesystem[2829]: 2012/11/28_16:32:58 INFO: unmounted /shr successfully Filesystem[2823]: 2012/11/28_16:32:58 INFO: Success ResourceManager[2751]: 2012/11/28_16:32:58 info: Running /etc/ha.d/resource.d/drbddisk r0 stop ResourceManager[2751]: 2012/11/28_16:32:58 info: Running /etc/ha.d/resource.d/IPaddr 10.1.10.254 stop IPaddr[2971]: 2012/11/28_16:32:58 INFO: ifconfig eth0:0 down IPaddr[2958]: 2012/11/28_16:32:58 INFO: Success Nov 28 16:32:58 EMserver1 heartbeat: [2734]: info: All HA resources relinquished. Nov 28 16:32:59 EMserver1 heartbeat: [1695]: info: killing /usr/lib/heartbeat/ipfail process group 1807 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBFIFO process 1777 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBWRITE process 1778 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBREAD process 1779 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBWRITE process 1780 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBREAD process 1781 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBWRITE process 1782 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBREAD process 1783 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBWRITE process 1784 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBREAD process 1785 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBWRITE process 1786 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: killing HBREAD process 1787 with signal 15 Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1778 exited. 11 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1779 exited. 10 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1780 exited. 9 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1781 exited. 8 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1782 exited. 7 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1783 exited. 6 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1784 exited. 5 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1785 exited. 4 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1786 exited. 3 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1787 exited. 2 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: Core process 1777 exited. 1 remaining Nov 28 16:33:01 EMserver1 heartbeat: [1695]: info: emserver1 Heartbeat shutdown complete. If I restarted heartbeat at this point... the resources heartbeat controls would start up fine.... please help!

    Read the article

  • Torchlight Black Screen and doesn't show up

    - by Lelouch Reyiz
    When I open it in full screen I get a black screen that covers whole screen,in windowed mode middle of screen.Here is a video: https://copy.com/fvrGw7QIJ8Z0 Terminal Output: alperen@alperen-Inspiron-N5010 /usr/local/games/Torchlight $ ./Torchlight.bin.x86_64 Creating resource group General Creating resource group Internal Creating resource group Autodetect SceneManagerFactory for type 'DefaultSceneManager' registered. Registering ResourceManager for type Material Registering ResourceManager for type Mesh Registering ResourceManager for type Skeleton MovableObjectFactory for type 'ParticleSystem' registered. OverlayElementFactory for type Panel registered. OverlayElementFactory for type BorderPanel registered. OverlayElementFactory for type TextArea registered. Registering ResourceManager for type Font ArchiveFactory for archive type FileSystem registered. ArchiveFactory for archive type Zip registered. FreeImage version: 3.13.1 This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz DDS codec registering Registering ResourceManager for type HighLevelGpuProgram Registering ResourceManager for type Compositor MovableObjectFactory for type 'Entity' registered. MovableObjectFactory for type 'Light' registered. MovableObjectFactory for type 'BillboardSet' registered. MovableObjectFactory for type 'ManualObject' registered. MovableObjectFactory for type 'BillboardChain' registered. MovableObjectFactory for type 'RibbonTrail' registered. Loading library lib64/OGRE/RenderSystem_GL Installing plugin: GL RenderSystem OpenGL Rendering Subsystem created. Plugin successfully installed Loading library lib64/OGRE/Plugin_ParticleFX Installing plugin: ParticleFX Particle Emitter Type 'Point' registered Particle Emitter Type 'Box' registered Particle Emitter Type 'Ellipsoid' registered Particle Emitter Type 'Cylinder' registered Particle Emitter Type 'Ring' registered Particle Emitter Type 'HollowEllipsoid' registered Particle Affector Type 'LinearForce' registered Particle Affector Type 'ColourFader' registered Particle Affector Type 'ColourFader2' registered Particle Affector Type 'ColourImage' registered Particle Affector Type 'ColourInterpolator' registered Particle Affector Type 'Scaler' registered Particle Affector Type 'Rotator' registered Particle Affector Type 'DirectionRandomiser' registered Particle Affector Type 'DeflectorPlane' registered Plugin successfully installed Loading library lib64/OGRE/Plugin_OctreeSceneManager Installing plugin: Octree & Terrain Scene Manager Plugin successfully installed *-*-* OGRE Initialising *-*-* Version 1.6.5 (Shoggoth) terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr Error: signal: 6 ./Torchlight.bin.x86_64(_ZN10LinuxUtils13crash_handlerEi+0x25)[0x17eb6f5] /lib/x86_64-linux-gnu/libc.so.6(+0x37000)[0x7fc647877000] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fc647876f89] /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fc64787a398] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x155)[0x7fc6481826b5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5e836)[0x7fc648180836] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5e863)[0x7fc648180863] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5eaa2)[0x7fc648180aa2] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt20__throw_out_of_rangePKc+0x67)[0x7fc6481d25d7] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbe3d3)[0x7fc6481e03d3] ./Torchlight.bin.x86_64(_ZN11CFileSystem21buildMassiveDataGroupEv+0x453)[0x1617805] ./Torchlight.bin.x86_64(_ZN11CFileSystemC1Eb+0x14be)[0x16145ae] ./Torchlight.bin.x86_64(_ZN22CMasterResourceManagerC1EP9CSettings+0x41a)[0xfe1d0a] ./Torchlight.bin.x86_64(_ZN5CGame5setupEb+0x79a)[0x73ceaa] ./Torchlight.bin.x86_64(_ZN5CGame5beginEPv+0x28d)[0x73b839] ./Torchlight.bin.x86_64(main+0x649)[0x146dbe4] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fc647861ec5] ./Torchlight.bin.x86_64[0x739ca9]

    Read the article

  • CultureManager issue

    - by Serge
    I have a bug I don't understand. While the following works fine: Resources.Classes.AFieldFormula.DirectFieldFormula this one throws an exception: new ResourceManager(typeof(Resources.Classes.AFieldFormula)).GetString("DirectFieldFormula"); Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"Resources.Classes.AFieldFormula.resources\" was correctly embedded or linked into assembly \"MygLogWeb\" at compile time, or that all the satellite assemblies required are loadable and fully signed. How comes? Resource designer.cs file: //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18408 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Resources.Classes { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class AFieldFormula { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal AFieldFormula() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MygLogWeb.Classes.AFieldFormula", typeof(AFieldFormula).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to Direct field. /// </summary> public static string DirectFieldFormula { get { return ResourceManager.GetString("DirectFieldFormula", resourceCulture); } } } }

    Read the article

  • Why is it so hard to share resource files (resx) with my Silverlight client?

    - by Jordan
    I'm trying to share a resource file (.resx file) from my web (RIA Service?Silverlight Host) to client (Silverlight) by linking the resource file into my client. When I try to access resources using the ResourceManager object I get the following error: System.Resources.MissingManifestResourceException was caught Message=Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "PPCa.Modules.ProjectManager.Client.ViewModels.ResourceStrings.resources" was correctly embedded or linked into assembly "PPCa.Modules.ProjectManager.Client" at compile time, or that all the satellite assemblies required are loadable and fully signed. StackTrace: at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName) at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at System.Resources.ResourceManager.GetString(String name) at PPCa.Modules.ProjectManager.Web.Helpers.ResourceHelper.GetEnumText[TResource](ProjectStatus a_projectStatus) InnerException: Edit: When I say I was linking the resource file, I mean I am using the 'Add as Link' option when adding the existing resx file to my project.

    Read the article

  • Could not find any resources appropriate for the specified culture or the neutral culture.

    - by Captain Comic
    I have created an assembly and later renamed it. Then i started getting runtime errors when calling toolsMenuName = resourceManager.GetString(resourceName); The resourceName variable is "enTools" at runtime. Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Jfc.TFSAddIn.CommandBar.resources" was correctly embedded or linked into assembly "Jfc.TFSAddIn" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code: string resourceName; ResourceManager resourceManager = new ResourceManager("Jfc.TFSAddIn.CommandBar", Assembly.GetExecutingAssembly()); CultureInfo cultureInfo = new CultureInfo(_applicationObject.LocaleID); if(cultureInfo.TwoLetterISOLanguageName == "zh") { System.Globalization.CultureInfo parentCultureInfo = cultureInfo.Parent; resourceName = String.Concat(parentCultureInfo.Name, "Tools"); } else { resourceName = String.Concat(cultureInfo.TwoLetterISOLanguageName, "Tools"); } // EXCEPTION IS HERE toolsMenuName = resourceManager.GetString(resourceName); I can see the file CommandBar.resx included in the project, i can open it and can see the "enTools" string there.

    Read the article

  • loaded resources looks ugly

    - by Xaver
    I have the TreeView class using in my project. I use icons for it.First i load icons so: ImageList^ il = gcnew ImageList(); il->Images->Add(Image::FromFile("DISK.ico")); il->Images->Add(Image::FromFile("FILE.ico")); il->Images->Add(Image::FromFile("FOLDER.ico")); treeView1->ImageList = il; All was good. But i dont like that if i delete my icons from directory of project. there is error in my project. I decide to add icons in .resx file. Now icons loading look so: ImageList^ il = gcnew ImageList(); Resources::ResourceManager^ resourceManager = gcnew Resources::ResourceManager ("FilesSaver.Form1", GetType()->Assembly); Object^ disk = resourceManager->GetObject("DISK"); il->Images->Add(reinterpret_cast<Image^>(disk)); Object^ file = resourceManager->GetObject("FILE"); il->Images->Add(reinterpret_cast<Image^>(file)); Object^ folder = resourceManager->GetObject("FOLDER"); il->Images->Add(reinterpret_cast<Image^>(folder)); treeView1->ImageList = il; And why icons in the TreeView looks ugly (they look lighter and have a big black border). Why did this happen?

    Read the article

  • Shared pointers causing weird behaviour

    - by Setzer22
    I have the following code in SFML 2.1 Class ResourceManager: shared_ptr<Sprite> ResourceManager::getSprite(string name) { shared_ptr<Texture> texture(new Texture); if(!texture->loadFromFile(resPath+spritesPath+name)) throw new NotSuchFileException(); shared_ptr<Sprite> sprite(new Sprite(*texture)); return sprite; } Main method: (I'll omit most of the irrelevant code shared_ptr<Sprite> sprite = ResourceManager::getSprite("sprite.png"); ... while(renderWindow.isOpen()) renderWindow.draw(*sprite); Oddly enough this makes my sprite render completely white, but if I do this instead: shared_ptr<Sprite> ResourceManager::getSprite(string name) { Texture* texture = new Texture; // <------- From shared pointer to pointer if(!texture->loadFromFile(resPath+spritesPath+name)) throw new NotSuchFileException(); shared_ptr<Sprite> sprite(new Sprite(*texture)); return sprite; } It works perfectly. So what's happening here? I assumed the shared pointer would work just as a pointer. Could it be that it's getting deleted? My main method is keeping a reference to it so I don't really understand what's going on here :S EDIT: I'm perfectly aware deleting the sprite won't delete the texture and this is generating a memory leak I'd have to handle, that's why I'm trying to use smart pointers on the first place...

    Read the article

  • Read values from resx files?

    - by Nimesh
    How to read strings from the MyResource.resx file from c#. I am not calling this from the asp.net page, rather i am calling from my bussiness logic. Assembly assembly = this.GetType().Assembly; ResourceManager resourceManager = new ResourceManager("MessagesResource", assembly); resourceManager.GetString("SCHEME_UNQ"); here i am getting exception, Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MessagesResource.resources" was correctly embedded or linked into assembly "App_Web_eerdggo8" at compile time, or that all the satellite assemblies required are loadable and fully signed. How can i fix this issue????

    Read the article

  • ASP.NET MVC localization DisplayNameAttribute alternatives: a better way

    - by Brian Schroer
    In my last post, I talked bout creating a custom class inheriting from System.ComponentModel.DisplayNameAttribute to retrieve display names from resource files: [LocalizedDisplayName("RememberMe")] public bool RememberMe { get; set; } That’s a lot of work to put an attribute on all of my model properties though. It would be nice if I could intercept the ASP.NET MVC code that analyzes the model metadata to retrieve display names to make it automatically get localized text from my resource files. That way, I could just set up resource file entries where the keys are the property names, and not have to put attributes on all of my properties. That’s done by creating a custom class inheriting from System.Web.Mvc.DataAnnotationsModelMetadataProvider: 1: public class LocalizedDataAnnotationsModelMetadataProvider : 2: DataAnnotationsModelMetadataProvider 3: { 4: protected override ModelMetadata CreateMetadata( 5: IEnumerable<Attribute> attributes, 6: Type containerType, 7: Func<object> modelAccessor, 8: Type modelType, 9: string propertyName) 10: { 11: var meta = base.CreateMetadata 12: (attributes, containerType, modelAccessor, modelType, propertyName); 13:   14: if (string.IsNullOrEmpty(propertyName)) 15: return meta; 16:   17: if (meta.DisplayName == null) 18: GetLocalizedDisplayName(meta, propertyName); 19:   20: if (string.IsNullOrEmpty(meta.DisplayName)) 21: meta.DisplayName = string.Format("[[{0}]]", propertyName); 22:   23: return meta; 24: } 25:   26: private static void GetLocalizedDisplayName(ModelMetadata meta, string propertyName) 27: { 28: ResourceManager resourceManager = MyResource.ResourceManager; 29: CultureInfo culture = Thread.CurrentThread.CurrentUICulture; 30:   31: meta.DisplayName = resourceManager.GetString(propertyName, culture); 32: } 33: } Line 11 calls the base CreateMetadata method. Line 17 checks whether the metadata DisplayName property has already been populated by a DisplayNameAttribute (or my LocalizedDisplayNameAttribute). If so, it respects that and doesn’t use my custom localized text lookup. The GetLocalizedDisplayName method checks for the property name as a resource file key. If found, it uses the localized text from the resource files. If the key is not found in the resource file, as with my LocalizedDisplayNameAttribute, I return a formatted string containing the property name (e.g. “[[RememberMe]]”) so I can tell by looking at my web pages which resource keys I haven’t defined yet. It’s hooked up with this code in the Application_Start method of Global.asax: ModelMetadataProviders.Current = new LocalizedDataAnnotationsModelMetadataProvider();

    Read the article

  • Loading SpriteFont through a different class than Game.cs

    - by MintyAnt
    I am trying to load up a single SpriteFont to print some debug information. In our current game, we load up both Textures and Music through a ResourceManager. They are both loaded with a filestream, and thus do not require Content.Load SoundEffect soundEffect = SoundEffect.FromStream( fs ); Since this ResourceManager does not inherit from Game or is like Game.cs, I cannot use the usual method: SpriteFont spriteFont = Content.Load<SpriteFont>(resource.Key.Item2); Anyone have any idea how I can either: -Load the SpriteFont a different way -Create my own Contentmanager

    Read the article

  • C# XP Sound QuickFix

    - by ikurtz
    I have this: ThreadPool.QueueUserWorkItem(new WaitCallback(FireAttackProc), fireResult); and FireAttackProc: private void FireAttackProc(Object stateInfo) { // Process Attack/Fire (local) lock (_procLock) { // build status message String status = "(Away vs. Home)"; // get Fire Result state info FireResult fireResult = (FireResult)stateInfo; // update home grid with attack information GameModel.HomeCellStatusSet(fireResult.FireGridLocation, Cell.cellState.Lock); this.Invoke(new Action(delegate() { RefreshHomeGrid(); })); status = status + "(Attack Coordinate: (" + GameModel.alphaCoords(fireResult.FireGridLocation.Column) + "," + fireResult.FireGridLocation.Row + "))(Result: "; // play audio data if true if (audio) { String Letters; Stream stream; SoundPlayer player; Letters = GameModel.alphaCoords(fireResult.FireGridLocation.Column); stream = Properties.Resources.ResourceManager.GetStream("_" + Letters); player = new System.Media.SoundPlayer(stream); player.PlaySync(); Letters = fireResult.FireGridLocation.Row.ToString(); stream = Properties.Resources.ResourceManager.GetStream("__" + Letters); player = new System.Media.SoundPlayer(stream); player.PlaySync(); stream.Dispose(); player.Dispose(); } if (audio) { SoundPlayer fire = new SoundPlayer(Properties.Resources.fire); fire.PlaySync(); fire.Dispose(); } // deal with hit/miss switch (fireResult.Hit) { case true: this.Invoke(new Action(delegate() { GameModel.HomeCellStatusSet(fireResult.FireGridLocation, Cell.cellState.Hit); status = status + "(Hit)"; })); if (audio) { SoundPlayer hit = new SoundPlayer(Properties.Resources.firehit); hit.PlaySync(); hit.Dispose(); } break; case false: this.Invoke(new Action(delegate() { GameModel.HomeCellStatusSet(fireResult.FireGridLocation, Cell.cellState.Miss); status = status + "(Miss)"; })); GameModel.PlayerNextTurn = NietzscheBattleshipsGameModel.GamePlayers.Home; if (audio) { SoundPlayer miss = new SoundPlayer(Properties.Resources.firemiss); miss.PlaySync(); miss.Dispose(); } break; } // refresh home grid with updated data this.Invoke(new Action(delegate() { RefreshHomeGrid(); })); GameToolStripStatusLabel.Text = status + ")"; // deal with ship destroyed if (fireResult.ShipDestroyed) { status = status + "(Destroyed: " + GameModel.getShipDescription(fireResult.DestroyedShipType) + ")"; if (audio) { Stream stream; SoundPlayer player; stream = Properties.Resources.ResourceManager.GetStream("_home"); player = new System.Media.SoundPlayer(stream); player.PlaySync(); player.Dispose(); stream.Dispose(); string ShipID = fireResult.DestroyedShipType.ToString(); stream = Properties.Resources.ResourceManager.GetStream("_" + ShipID); player = new System.Media.SoundPlayer(stream); player.PlaySync(); player.Dispose(); stream.Dispose(); stream = Properties.Resources.ResourceManager.GetStream("_destroyed"); player = new System.Media.SoundPlayer(stream); player.PlaySync(); player.Dispose(); stream.Dispose(); } } // deal with win condition if (fireResult.Win) { if (audio) { Stream stream; SoundPlayer player; stream = Properties.Resources.ResourceManager.GetStream("_home"); player = new System.Media.SoundPlayer(stream); player.PlaySync(); player.Dispose(); stream = Properties.Resources.ResourceManager.GetStream("_loses"); player = new System.Media.SoundPlayer(stream); player.PlaySync(); player.Dispose(); } GameModel.gameContracts = new GameContracts(); } // update status message if (fireResult.Hit) { if (!fireResult.Win) { status = status + "(Turn: Away)"; LockGUIControls(); } } // deal with turn logic if (GameModel.PlayerNextTurn == NietzscheBattleshipsGameModel.GamePlayers.Home) { this.Invoke(new Action(delegate() { if (!fireResult.Win) { status = status + "(Turn: Home)"; AwayTableLayoutPanel.Enabled = true; } })); } // deal with win condition if (fireResult.Win) { this.Invoke(new Action(delegate() { status = status + "(Game: Home Loses)"; CancelToolStripMenuItem.Enabled = false; NewToolStripMenuItem.Enabled = true; LockGUIControls(); })); } // display completed status message GameToolStripStatusLabel.Text = status + ")"; } } The issue is this: Under Vista/win7 the sound clips in the FireAttackProc plays. But under XP the logic contained within FireAttackProc gets executed but none of the sound clips play. Is there a quick solution to this so the sound will play under XP? I ask for a quick solution because i am happy being able to execute fully in Vista/Win7 but would be great if there was a quick solution so it would be XP compitable also. Thank you.

    Read the article

  • Globalization, Localization And Why My Application Stopped Launching

    - by Paulo Morgado
    When I was localizing a Windows Phone application I was developing, I set the argument on the constructor of the AssemblyCultureAttribute for the neutral culture (en-US in this particular case) for my application. As it was late at night (or early in the dawn ) I went to sleep and, on the next day, the application wasn’t launching although it compiled just fine. I’ll have to confess that it took me a couple of nights to figure out what I had done to my application. Have you figured out what I did wrong? The documentation for the AssemblyCultureAttribute states that: The attribute is used by compilers to distinguish between a main assembly and a satellite assembly. A main assembly contains code and the neutral culture's resources. A satellite assembly contains only resources for a particular culture, as in [assembly:AssemblyCultureAttribute("de")]. Putting this attribute on an assembly and using something other than the empty string ("") for the culture name will make this assembly look like a satellite assembly, rather than a main assembly that contains executable code. Labeling a traditional code library with this attribute will break it, because no other code will be able to find the library's entry points at runtime. So, what I did was marking the once main assembly as a satellite assembly for the en-US culture which made it impossible to find its entry point. To set the the neutral culture for the assembly resources I should haveused (and eventually did) the NeutralResourcesLanguageAttribute. According to its documentation: The NeutralResourcesLanguageAttribute attribute informs the ResourceManager of the application's default culture, and also informs the ResourceManager that the default culture's resources are found in the main application assembly. When looking up resources in the same culture as the default culture, the ResourceManager automatically uses the resources located in the main assembly instead of searching for a satellite assembly. This improves lookup performance for the first resource you load, and can reduce your working set.

    Read the article

  • Changes in resolving .resx in Visual Studio 2010?

    - by MADMap
    Hi, I'm working on a quite simple Webpage (MVC2), using localisation based on ResourceFiles. I have the MVC2 Project and the Resources in a seperate Assembly. The Resources contains 3 languages (Resource.resx, Resource.de.resx, Resource.en.resx, Resource.ja.resx) and I'm querying them via the ResourceManager. Call from the .aspx <% Resources.Res resman = new Resources.Res(); %> <%=resman.GetString("String1", new System.Globalization.CultureInfo("en")) %><br /> <%=resman.GetString("String1", new System.Globalization.CultureInfo("ja")) %><br /> <%=resman.GetString("String1", new System.Globalization.CultureInfo("de")) %><br /> ResourceManager: public class Res { private readonly ResourceManager Manager = Resources.Resource1.ResourceManager; public string GetString(string id, CultureInfo info) { return Manager.GetString(id, info); } } And for the compiled Version in VS2008 I get smth like this: String1EN String1JA String1DE Compiled in Visual Studio 2008, this works fine: but I'm having Troubles if I compile the Solution in Visual Studio 2010 (also 3.5 as TargetFramework). There the result shows smth like: String1DEFAULT String1JA String1DEFAULT I don't know what it can be: is this still a bug from the VS2010 RC or am I doing smth. wrong here?

    Read the article

  • Using BWSAL with BWAPI JBridge

    - by pek
    I've been busting my head to find out how to use BWSAL with JBridge... I just can't figure it out.. I'm not that good in C++.. The best I could do is compile the latest JBridge from the repo... But I can't seem to get BSWAL working... What do I need? Compiling JBrigde doesn't seem to have BWSAL in.. I found the directory that BWSAL exists but there is no solution file to build.. I downloaded the latest BWSAL, found the solution file, but have no idea what to do... Compiling it will create an AIModule.dll but if I use this, the JBridge won't work... What I'm trying to do is to simply use BuildingPlacer.getBuildLocationNear... Whenever I call this method a NullPointerException is thrown: java.lang.NullPointerException at org.bwapi.bridge.model.Game.canBuildHere(Game.java:286) at org.bwapi.bridge.sal.BuildingPlacer.canBuildHere(BuildingPlacer.java: 46) at org.bwapi.bridge.sal.BuildingPlacer.canBuildHereWithSpace(BuildingPlacer.java: 60) at org.bwapi.bridge.sal.BuildingPlacer.getBuildLocationNear(BuildingPlacer.java: 121) at com.pekalicious.starplanner.ResourceManager.isInitialReady(ResourceManager.java: 87) at com.pekalicious.starplanner.ResourceManager.update(ResourceManager.java: 37) at com.pekalicious.starplanner.StrategicManager.update(StrategicManager.java: 51) at com.pekalicious.starplanner.StarPlannerBridgeBot.onFrame(StarPlannerBridgeBot.java: 36) How do I make this work? I really need this.. Please. Thank you.

    Read the article

  • Resource Managers - Are they any good?

    - by The Communist Duck
    Hey. I've seen many a time in source code, things like this [well, this is more of a pseudo C++ idea of mine] type defshared_ptr ResourcePtr;// for ease ResourcePtr sound1 = resourceManager.Get("boom.ogg"); sound1-Play(); ResourcePtr sprite = resourceManager.Get("sprite.png"); I was just wondering how useful a class like this was, something that: Loaded media files Stored them in memory Did this at the start of a level - loading screen. Cleaned up Rather than having a system of: Resources are held by entities only, or loose. Responsible for own load into memory. The first is a 'manager' as such; something I feel indicates it's wrong to use. However, it allows for something like a vector of resource names to be passed, rather than having to scramble around finding everything that needs to be loaded.

    Read the article

  • MonoTouch: using embedded resx files on iPhone build

    - by bright
    I'm able to load and access resx files in Simulator builds of my iPhone app built using MonoTouch. The resx file entry in the csproj file looks like: <ItemGroup> <EmbeddedResource Include="MapMenu\Resources\MapMenu.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>MapMenu.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> The .resx file itself has an entry like this: <data name="Main_Menu" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Main Menu.mm;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> </data> and the generated MapMenu.Designer.cs file has this: internal static string Main_Menu { get { return ResourceManager.GetString("Main_Menu", resourceCulture); } } As mentioned above, calling the Main_Menu accessor works fine on the simulator. On the device, however, it produces: <Notice>: Unhandled Exception: System.MissingMethodException: No constructor found for System.Resources.RuntimeResourceSet::.ctor(System.IO.UnmanagedMemoryStream) <Notice>: at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 <Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 <Notice>: at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0 <Notice>: at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) [0x00000] in <filename unknown>:0 <Notice>: at System.Resources.ResourceManager.GetString (System.String name, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 <Notice>: at MapMenu.Resources.MapMenu.get_Main_Menu () [0x00000] in <filename unknown>:0 Did a few sanity checks, and am wondering at this point if this really is missing functionality in Monotouch. Thanks,

    Read the article

1 2 3  | Next Page >