Search Results

Search found 8021 results on 321 pages for 'resource monitoring'.

Page 30/321 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • WPF Resource Dictionary in a separate assembly

    - by Gustavo Cavalcanti
    I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right? After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml? Thanks for your help! Gustavo

    Read the article

  • Insert an event on Google Resource Calendar using the latest google-php-client-api

    - by user3781583
    Created a Project Enabled Calendar API Created an OAuth2.0 Service Account Downloaded the keyfile .p12 and saved it locally (not using a server with a public IP address) Shared my Resource Calendar with the Email address created in the Service Account (with Manage Sharing rights) Entered Client ID for the service account and authorized http://www.googleapis.com/auth/calendar Environment lamp setup on localhost. <?php require_once 'google-api-php-client/src/Google/Client.php'; require_once 'google-api-php-client/src/Google/Service/Calendar.php'; session_start(); const CLIENT_ID = 'XXXXXX.apps.googleusercontent.com'; //Service CLIENT ID const SERVICE_ACCOUNT_NAME = '[email protected]'; const KEY_FILE = 'google-api-php-client/src/Google/Reservation Service-XXXXXXX.p12'; $client = new Google_Client(); $client->setApplicationName("Appointment"); if (isset($_SESSION['token'])) { $client->setAccessToken($_SESSION['token']); } $key = file_get_contents(KEY_FILE); $client->setClientId(CLIENT_ID); $client->setAssertionCredentials(new Google_Auth_AssertionCredentials( SERVICE_ACCOUNT_NAME, array('https://www.googleapis.com/auth/calendar'), $key)); //Save token in session if ($client->getAccessToken()) { $_SESSION['token'] = $client->getAccessToken(); } $cal = new Google_Service_Calendar($client); $event = new Google_Service_Calendar_Event(); $event->setSummary('This is a Test event'); $event->setLocation('Test Location'); $start = new Google_Service_Calendar_EventDateTime(); $start->setDateTime('2014-08-20T10:30:00.000-05:00'); $event->setStart($start); $end = new Google_Service_Calendar_EventDateTime(); $end->setDateTime('2014-08-20T12:30:00.000-05:00'); $event->setEnd($end); $cal->events->insert('[email protected]', $event); ?> getting the following error: Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling POST https://www.googleapis.com/calendar/v3/calendars/XXXXXXX%40resource.calendar.google.com/events: (403) Forbidden' in /google-api-php-client/src/Google/Http/REST.php:79 Stack trace: #0 /google-api-php-client/src/Google/Http/REST.php(44): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request)) #1 /google-api-php-client/src/Google/Client.php(503): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request)) #2 /google-api-php-client/src/Google/Servic/Resource.php(195): Google_Client-execute(Object(Google_Http_Request)) #3 /google-api-php-client/src/Google/Service/Calendar.php(1459): Google_Service_Resource-call('insert', Array, 'Google_Service_...') #4 /calendar.php(53): Google_S in /google-api-php-client/src/Google/Http/REST.php on line 79 A few people had the same issue, I am sharing the calendar with the service account. Any help will be appreciated.

    Read the article

  • Using embedded resources in Silverlight (4) - other cultures not being compiled

    - by Andrei Rinea
    I am having a bit of a hard time providing localized strings for the UI in a small Silverlight 4 application. Basically I've put a folder "Resources" and placed two resource files in it : Statuses.resx Statuses.ro.resx I do have an enum Statuses : public enum Statuses { None, Working } and a convertor : public class StatusToMessage : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (!Enum.IsDefined(typeof(Status), value)) { throw new ArgumentOutOfRangeException("value"); } var x = Statuses.None; return Statuses.ResourceManager.GetString(((Status)value).ToString(), Thread.CurrentThread.CurrentUICulture); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } in the view I have a textblock : <TextBlock Grid.Column="3" Text="{Binding Status, Converter={StaticResource StatusToMessage}}" /> Upon view rendering the converter is called but no matter what the Thread.CurrentThread.CurrentUICulture is set it always returns the default culture value. Upon further inspection I took apart the XAP resulted file, taken the resulted DLL file to Reflector and inspected the embedded resources. It only contains the default resource!! Going back to the two resource files I am now inspecting their properties : Build action : Embedded Resource Copy to output directory : Do not copy Custom tool : ResXFileCodeGenerator Custom tool namespace : [empty] Both resource (.resx) files have these settings. The .Designer.cs resulted files are as follows : Statuses.Designer.cs : //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace SilverlightApplication5.Resources { 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()] internal class Statuses { // ... yadda-yadda Statuses.ro.Designer.cs [empty] I've taken both files and put them in a console application and they behave as expected in it, not like in this silverlight application. What is wrong?

    Read the article

  • GWT 2.X No resource found for key

    - by Han Fastolfe
    I've developed a GWT app using i18n internationalization. In Host/Dev mode it works fine, but launching GWT compile gives this error: No resource found for key xxx, like below. Compiling module ...rte.RTE Scanning for additional dependencies: file:/home/.../client/i18n/RTEValidationMessages.java Computing all possible rebind results for '...client.i18n.RTEMessages' Rebinding ...client.i18n.RTEMessages Invoking com.google.gwt.dev.javac.StandardGeneratorContext@e7dfd0 Processing interface ...client.i18n.RTEMessages Generating method body for txtIndirizzo3() [ERROR] No resource found for key 'txtIndirizzo3' Messages are loaded with late binding. public class RTEValidationMessages { private RTEMessages additionalMessages; public RTEValidationMessages() { additionalMessages = GWT.create(RTEMessages.class); } } Deleting the method which gives the error, results in another random method with error, say not the method before or after in the interface ...client.i18n.RTEMessages. Help is greatly appreciated.

    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

  • m2eclipse resource filtering

    - by drewzilla
    I've having problems with resource filtering using m2eclipse Maven support in Eclipse. It seems that filtering only takes place on resources that have changed. This is fundamentally flawed because, if I have a file that references properties (e.g. ${my.property}, if the value of the property changes, the filtering will only be performed if the referencing file is also modified - if I only change the property value (in my pom.xml), the filtering is not applied to the files that that reference it. So, if I make a change to a property in my pom file, the filtering is not applied. However, if I then go to the file that references that property (e.g. a Spring config file) then edit and save it, the filtering is applied. I did read somewhere that: "m2eclipse skips filtering if there were no resource changes during incremental build" I'm using m2eclipse 0.10.x Has anyone else come across this? Thanks, Andrew

    Read the article

  • Using a .txt file Resource in VB

    - by Tony C
    Right now i have a line of code, in vb, that calls a text file, like this: Dim fileReader As String fileReader = My.Computer.FileSystem.ReadAllText("data5.txt") data5.txt is a resource in my application, however the application doesn't run because it can't find data5.txt. I'm pretty sure there is another code for finding a .txt file in the resource that i'm overlooking, but i can't seem to figure it out. So does anyone know of a simple fix for this? or maybe another whole new line of code? Thanks in advance!

    Read the article

  • Ruby on Rails - differentiating plural vs singular resource in a REST API

    - by randombits
    I'm working on building the URLs for my REST API before I begin writing any code. Rails REST magic is fantastic, but I'm slightly bothered the formatting of a URL such as: http://myproject/projects/5 where Project is my resource and 5 is the project_id. I think if a user is looking to retrieve all of their projects, then a respective HTTP GET http://myproject/projects makes sense. However if they're looking to retrieve information on a singular resource, such as a project, then it makes sense to have http://myproject/project/5 vs http://myproject/projects/5. Is it best to avoid this headache, or do some of you share a similar concern and even better - have a working solution?

    Read the article

  • LNK1106 with big binary resource

    - by E Dominique
    I have a rather huge .dat-file (896MB) included as a BIN resource in my project. Now I get a LNK1106 link error ("fatal error LNK1106: invalid file or disk full: cannot seek to 0x382A3920".) I use Visual Studio 2005 under Windows XP, and have tried on a 4GB RAM machine with high Virtual Memory settings and lots of disk space. I have tried a number of different optimization flags, but to no avail. Does anyone have a clue? EDIT: I have narrowed it down to a specific size of the compiled resource. If the .res file is 544078588 bytes (about 518.9MB) or larger, the error occurs. If it is smaller it works just fine. Still no solution, though...

    Read the article

  • HTML5 Cache manifest file itself is not cached, and called at each resource load

    - by Mic
    We have a web app that runs on the iPhone.The manifest file is ok, and the resources(html, css, js) are cached correctly.The page sits in the home screen. The trouble is, when the page loads a resource from the cache, there is as well a GET call to the server to read the Cache Manifest file.The server is configured to send the correct header (max-age=31536000; public, etc...) and caches well all other files except the cache manifest itself. Is this a normal behavior? It looks there is a slight lag, because of that call, for each resource load.Any idea, if these multiple calls can get a status 304 or even better avoided?

    Read the article

  • Localize node texts in treeview using resource files

    - by Obalix
    For a project I need a tree view that allows the user to select a module, which then is displayed in a content area. The project relies heavily on localization and this is provided by the resource files. Now I discovered today, that the text that are assigned to preset tree view nodes are not contained in the resource files. So the question is whether there is a way of doing this, short of mapping the elemenst in code. I.e. assigning a name to the node, running over all nodes and pulling the resources from the resouce manager based on the node name. This is what I am currently doing, however, it just doesn't "feel" right: private void TranslateNodes(TreeNodeCollection treeNodeCollection) { var rm = Resources.ResourceManager; foreach (TreeNode node in treeNodeCollection) { node.Text = rm.GetString(node.Name + "_Text"); this.TranslateNodes(node.Nodes); } } Thanks!

    Read the article

  • Getting a Spring resource

    - by Javi
    Hello, I'm trying to read a css file with the Resources provided by Spring. My application looks like this: src src/com herer my classes inside packages WebContent WebContent/resources/style/myCSS.css -- the css I want to read WebContent/WEB-INF -- here is my application-context.xml I can get the css and read it by doing something like this: UrlResource file = new UrlResource("http://localhost:8080/myApp/resources/style/myCSS.css"); but it depends on the server and aplication names. I've tried to do it by other implementations of Resource Interface, but the file is not found cause I can't find out how to wite the path. I've tried with this: FileSystemResource file = new FileSystemResource("/WebContent/resources/style/myCSS.css"); I also tried with wildcards, but it doesn't find the file either. ApplicationContext ctx = new FileSystemXmlApplicationContext("classpath*:/WEB-INF/application-context-core.xml"); Resource file = ctx.getResource("file:**/myCSS.css"); How should I write the path to get the css. Thanks.

    Read the article

  • xval get message from resource file

    - by Rob
    I'm working on a CMS system which uses a resource file to get information and errormessages from. The client side validation is working without problems, only it's not getting the errormessage from the resource file. While debugging i figured out xval seems to get the errormessages from a javascript file where the messages are set hard-coded. Is there some way to override this? Below the code which should make the relation to the resourcefile en specify the error when the field is left empty. [Property] [Required(ErrorMessageResourceType = typeof(CMSMessages), ErrorMessageResourceName = "EnterValidMoney")] public virtual Double ShippingCost { get; set; }

    Read the article

  • Relative paths in spring classpath resource

    - by Mike Q
    Hi all, I have a bunch of spring config files, all of which live under the META-INF directory in various subpackages. I have been using import like the following... <import resource="../database/schema.xml"/> So a relative path from the source file. This works fine when I am working with a local build outside of a jar file. But when I package everything up in a jar then I get an error that it cannot resolve the URL resource. If I change the above to an absolute path (with classpath:) then it works fine. Is there any way to use relative paths with ".." in when the configs are packaged in a jar or am I restricted to descending relative paths and absolute paths only? Thanks.

    Read the article

  • What is the "opposite" of request serialization called?

    - by Adam Lindberg
    For example, if a request is made to a resource and another identical request is made before the first has returned a result, the server returns the result of the first request for the second request as well. This to avoid unnecessary processing on the resource. This is not the same thing as caching/memoization since it only concerns identical requests ongoing in parallel. Is there a term for the reuse of results for currently ongoing requests to a resource for the purpose of minimizing processing?

    Read the article

  • MFC resource.h command/message IDs

    - by ak
    Hi I'm working on an MFC application, that got pretty messy over years and over different teams of developers. The resource.h file, which contains all command/message mappings grew pretty big over time, and has lots of problems (like duplicate IDs). I am not proficient with MFC, so the question might sound pretty stupid... MSDN docs mention that Command IDs and Message IDs should not be less than WM_USER and WM_APP correspondingly. I saw that most of the command IDs in resource.h generated by Visual Studio begin around 100. Shouldn't this cause some interfering with MFC/Windows commands and messages, that overlap with the application defined IDs? For example, I have a command ID : #define ID_MY_ID 101 and there is a windows command that has the same ID. When MC send this command to the APP, it's handled like an application defined ID_MY_ID, and the app is taking unnecessary actions. Is it a possible scenario? Also, is there some third party tool that helps to profile the project resources?

    Read the article

  • Setting the default value of a C# Optional Parameter

    - by Jaxidian
    Whenever I attempt to set the default value of an optional parameter to something in a resource file, I get a compile-time error of Default parameter value for 'message' must be a compile-time constant. Is there any way that I can change how the resource files work to make this possible? public void ValidationError(string fieldName, string message = ValidationMessages.ContactNotFound) In this, ValidationMessages is a resource file.

    Read the article

  • RenderTargetBitmap + Resource'd VisualBrush = incomplete image

    - by Will
    I've found a new twist on the "Visual to RenderTargetBitmap" question! I'm rendering previews of WPF stuff for a designer. That means I need to take a WPF visual and render it to a bitmap without that visual ever being displayed. Got a nice little method to do it like to see it here it goes private static BitmapSource CreateBitmapSource(FrameworkElement visual) { Border b = new Border { Width = visual.Width, Height = visual.Height }; b.BorderBrush = Brushes.Black; b.BorderThickness = new Thickness(1); b.Background = Brushes.White; b.Child = visual; b.Measure(new Size(b.Width, b.Height)); b.Arrange(new Rect(b.DesiredSize)); RenderTargetBitmap rtb = new RenderTargetBitmap( (int)b.ActualWidth, (int)b.ActualHeight, 96, 96, PixelFormats.Pbgra32); // intermediate step here to ensure any VisualBrushes are rendered properly DrawingVisual dv = new DrawingVisual(); using (var dc = dv.RenderOpen()) { var vb = new VisualBrush(b); dc.DrawRectangle(vb, null, new Rect(new Point(), b.DesiredSize)); } rtb.Render(dv); return rtb; } Works fine, except for one leeetle thing... if my FrameworkElement has a VisualBrush, that brush doesn't end up in the final rendered bitmap. Something like this: <UserControl.Resources> <VisualBrush x:Key="LOLgo"> <VisualBrush.Visual> <!-- blah blah --> <Grid Background="{StaticResource LOLgo}"> <!-- yadda yadda --> Everything else renders to the bitmap, but that VisualBrush just won't show. The obvious google solutions have been attempted and have failed. Even the ones that specifically mention VisualBrushes missing from RTB'd bitmaps. I have a sneaky suspicion this might be caused by the fact that its a Resource, and that lazy resource isn't being inlined. So a possible fix would be to, somehow(???), force resolution of all static resource references before rendering. But I have absolutely no idea how to do that. Anybody have a fix for this?

    Read the article

  • Memory consumption of resource manager

    - by Quang Anh
    I'm writing a resource manager, which is required to be fast and has small memory foot-print. For example, I have an resource class class Abc { string m_name; string m_path; string handle; void SomeFunctions(); } And so on. Now I create and List and add 5000 items to it. How much memory will it consume? One more question: Can I find items base on handle number only, which is the int part of the Tuple?

    Read the article

  • Replacing Resource files on new BlackBerry app version

    - by Jeff
    Hello, I am maintaining an existing BlackBerry application (implemented as a MIDlet). The application contains a number of data files that get bundled with the app as resources. Some of these data files need to be updated for a new version of the app. When the user goes to install a new version of the application (via URL of Jad file), it prompts them with the following message "Persistent data exists for the application. Would you like to retain this data? " If the user selects "Yes", it looks like the app continues to use the old resource files. This is so surprising to me. First of all, am I losing my mind or will an upgrade really not overwrite existing resource files? Is there any way I can force it to? Thanks, Jeff

    Read the article

  • Override .Net Resource file in Calling Application

    - by Blatfrig
    I have an asp.net 2.0 web application that is calling class library. A fairly common scenario to be sure. The class library is making use of a number of resource files and a ResourceManager object to set localised strings. This works absolutely fine in most circumstances based on the user's browser settings. However there are some circumstances under which I wish to overrride the resource string in the class library from within the web application. Is this possible? if so how?

    Read the article

  • Using a Resource as an Attribute to a HTML Element in ASP.net

    - by Michael Stum
    I would like to have this piece of code in my .aspx file: <input class="ms-ButtonHeightWidth" type="button" name="BtnOK" id="Button2" value="Close" onclick="javascript:HandleOKButtonClick()" accesskey="<%$Resources:wss,okbutton_accesskey%>" /> Unfortunately, ASP.net doesn't seem to like that: An error occurred during the processing of /_layouts/MyPage/Info.aspx. Literal expressions like '<%$Resources:wss,okbutton_accesskey%>' are not allowed. Use <asp:Literal runat="server" Text="<%$Resources:wss,okbutton_accesskey%>" /> instead That doesn't work in this situation as that would mean nesting the Literal between the quotes of the accesskey attribute, which causes a "The tag contains duplicate 'ID' attributes" error. Is there a way to use a string from a resource without having to change the input to an asp:Button? I guess there has to be a way using <%=, but I don't know how I would address the resource itself?

    Read the article

  • Catching an error for a child resource in Ruby on Rails

    - by randombits
    What is the best way to add errors to render if a child resource is really what's having issues and not the parent resource? In english what I mean is the following.. imagine the following code: @foo = Foo.new foochild = Foochild.new // break foochild somehow @foo << foochild @foo.save now when I do: format.xml { render :xml => @foo.errors } I don't get anything about how foochild broke, meaning the error message is useless to the user. How does one go about fixing this?

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >