Search Results

Search found 14344 results on 574 pages for 'path'.

Page 114/574 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • Logging a certain event only once in ruby

    - by Andrew Grimm
    Are there any logging frameworks in ruby that allow you to log a specific event type only once? logger = IdealLogger.new logger.log(:happy_path, "We reached the happy path") # => logs this message logger.log(:happy_path, "We reached the happy path yet again") # => Doesn't log this logger.log(:sad_path, "We've encountered a sad path!") # => logs this message Also, is there a term for the concept of logging a certain event type only once?

    Read the article

  • Problem with commit in sharpsvn

    - by zhangxiaoning
    Hi,I'm a programmer in china. I want to commit the changes of a working copy in my computer to the repository. The repository is in an URL and i´m doing this now: using (SvnClient client = new SvnClient()){ string path = @"C:\testdelete\test.java"; client.Delete(path); client.Authentication.Clear(); // Clear predefined handlers client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args) { args.UserName = "username"; args.Password = "password"; }; var uri = client.GetUriFromWorkingCopy(path); if (uri != null) { SvnCommitArgs args = new SvnCommitArgs(); args.ThrowOnError = true; args.ThrowOnCancel = true; client.Commit(path, args);//here throw a SvnOperationCanceledException } } But it doesn´t work,Why?Thanks!

    Read the article

  • Message Handlers and the WeakReference issue

    - by user1058647
    The following message Handler works fine receiving messages from my service... private Handler handler = new Handler() { public void handleMessage(Message message) { Object path = message.obj; if (message.arg1 == 5 && path != null) //5 means its a single mapleg to plot on the map { String myString = (String) message.obj; Gson gson = new Gson(); MapPlot mapleg = gson.fromJson(myString, MapPlot.class); myMapView.getOverlays().add(new DirectionPathOverlay(mapleg.fromPoint, mapleg.toPoint)); mc.animateTo(mapleg.toPoint); } else { if (message.arg1 == RESULT_OK && path != null) { Toast.makeText(PSActivity.this, "Service Started" + path.toString(), Toast.LENGTH_LONG).show(); } else { Toast.makeText(PSActivity.this,"Service error" + String.valueOf(message.arg1), Toast.LENGTH_LONG).show(); } } }; }; However, even though it tests out alright in the AVD (I'm feeding it a large KML file via DDMS) the "object path = message.obj;" line has a WARNING saying "this Handler class should be static else leaks might occur". But if I say "static Handler handler = new Handler()" it won't compile complaining that I "cannot make a static reference to a non-static field myMapView. If I can't make such references, I can't do anything useful. This led me into several hours of googling around on this issue and learning more about weakReferences than I ever wanted to know. The often found reccomendation I find is that I should replace... private Handler handler = new Handler() with static class handler extends Handler { private final WeakReference<PSActivity> mTarget; handler(PSActivity target) { mTarget = new WeakReference<PSActivity>(target); } But this won't compile still complaining that I can't make a static reference to a non-dtatic field. So, my question a week or to ago was "how can I write a message handler for android so my service can send data to my activity. Even though I have working code, the question still stands with the suffix "without leaking memory". Thanks, Gary

    Read the article

  • How to Load assembly to AppDomain with all references recursively?

    - by abatishchev
    I want to load to new AppDomin some assembly which has a complex references tree (MyDll.dll - Microsoft.Office.Interop.Excel.dll - Microsoft.Vbe.Interop.dll - Office.dll - stdole.dll) As far as I understood, when an assembly is been loaded to AppDomain, it's references would not be loaded automatically, and I have to load them manually. So when I do: string dir = @"SomePath"; // different from AppDomain.CurrentDomain.BaseDirectory string path = System.IO.Path.Combine(dir, "MyDll.dll"); AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation; setup.ApplicationBase = dir; AppDomain domain = AppDomain.CreateDomain("SomeAppDomain", null, setup); domain.Load(AssemblyName.GetAssemblyName(path)); and got FileNotFoundException: Could not load file or assembly 'MyDll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. I think the key word is one of its dependencies. Ok, I do next before domain.Load(AssemblyName.GetAssemblyName(path)); foreach (AssemblyName refAsmName in Assembly.ReflectionOnlyLoadFrom(path).GetReferencedAssemblies()) { domain.Load(refAsmName); } But got FileNotFoundException again, on another (referenced) assembly. How to load all references recursively? Have I to create references tree before loading root assembly? How to get an assembly's references without loading it?

    Read the article

  • form:select items problem in spring mvc portlet

    - by dhaval
    I have a set of drop-down control which I want to render with my custom tag library. The following is the code of the tag lib: <spring:bind path="${path}"> <c:choose> <c:when test="${readOnly}"> <span class="readOnly">${status.value}</span> </c:when> <c:otherwise> <form:select path="${path }" itemLabel="${label }" itemValue="${value }" items="${itemList}"> </form:select> </c:otherwise> </c:choose> And this is the code I have written in the JSP file: <tag:conditionalListControl path="model.selectedCountry" readOnly="false" label="name" value="id" listItems="model.countryList" className="simple" /> Upon execution the paring returns the following error: [jsp:165] javax.servlet.jsp.JspException: Type [java.lang.String] is not valid for option items But if i change the items="${itemList}" to items="${model.countryList}" which is the list I want to display, it works fine without any problem and also bind to required variables on form submit. But i don't want to hard code any variables in the tag lib. Any suggestions???

    Read the article

  • Can you use regular expressions in struts-config.xml?

    - by rquinn
    I'm trying to route these two url's to different Actions. We are using Struts 1.2: /abc-def/products /abc-def I tried putting this action first: <action path="/abc*/products" type="com.business.exampleAction"> <forward name="success" path="/go"/> </action> and then this one after: <action path="/abc*" type="com.business.differentExampleAction"> <forward name="success" path="/goElsewhere"/> </action> but it always goes to the second action (differentExampleAction in this case). I've tried various iterations for the , like . or (.*), but haven't found anything that actually works yet. From what I've read, it seems like the only regular-expression-like characters allowed in struts-config are the wildcard symbols (* and **), but I hope I am wrong.

    Read the article

  • Calling a non-activeX DLL in a VB6 application in Vista/Win7

    - by user1490330
    I have a VB6 app that utilizes a non-activeX DLL (non-registering). It's declared via the classic Public Declare Function "Function Name" Lib "Library.DLL" syntax. On my dev machine (XP) it works fine but when I deploy to Vista or Win7 I'm constantly greeted with a Run Time Error 48 - File Not Found for the DLL in question. I have tried copying that DLL to every directory I can think of including every environment path on the test machine and the app path too. These are all 32-bit test environments so it's not a SysWow64 issue. Possibly throwing a wrench into the mix is the fact that the application in question is an Outlook COM Addin. I managed to install VB6 on Win7 and was able to run a tiny sample app that utilizes this DLL (outside of the Outlook process) so I know it works PROVIDED the DLL is located in App path. If I call App.Path from my DLL when I run it on the test environment it shows, to no surprise, my installation directory however the DLL is there. I tried turning off UAC. I tried making the App.Path directory permissions open to everyone, still no dice.

    Read the article

  • How to get the Drive Letter for the DevicePath

    - by new
    Dear All, I am using Win32 API. Really i do not understand how to get the drive letter for DevicePath of a USB stick . can you pls explain it to me ( what i have is SP_DEVICE_INTERFACE_DETAIL_DATA DevicePath using this Device path i get VID AND PID of the usb device my device path looks like below "\?\usb#vid_1a8d&pid_1000#358094020874450#{a5dcbf10-6530-11d2-901f-00c04fb951ed}" Is there any way to to map DRIVE LETTER to my DEVICE PATH so please help me to map drive letter to DevicePath ) Thanks for any help.

    Read the article

  • Python accessing modules from package that is distributed over different directories

    - by chaindriver
    Hi, I have a question regarding one single module that is distributed over multiple directories. Let's say I have these two file and directories: ~/lib/python xxx __init__.py util __init__.py module1.py module2.py ~/graphics/python xxx __init__.py misc __init__.py module3.py module4.py So then in my Python modules, I did this: import sys pythonlibpath = '~/lib/python' if pythonlibpath not in sys.path: sys.path.append(pythonlibpath) import xxx.util.module1 which works. Now, the problem is that I need xxx.misc.module3, so I did this: import sys graphicslibpath = '~/graphics/python' if graphicslibpath not in sys.path: sys.path.append(graphicslibpath) import xxx.misc.module3 but I get this error: ImportError: No module named misc.module3 It seems like it somehow still remembers that there was a xxx package in ~/lib/python and then tries to find misc.module3 from there. How do I get around this issue?

    Read the article

  • Deny access to run certain installed software for users

    - by clyfe
    I have a list of installed software, obtained from WMI class select * from Win32_Product. I'd like to deny execution rights for some users on certain software like so: find the path to installed software recursively remove execution rights I find the path to installed software from Win32_Product InstallLocation column. But the PROBLEM is that not all rows in Win32_Product have a value for InstallLocation. What can I do to overcome this? Is there somewhere in registry where I can find this path?

    Read the article

  • error of grails project from svn : GroovyObject cannot be resolved

    - by atian25
    when i check out a new grails project from svn, i got some error: 1.The project was not built since its build path is incomplete. Cannot find the class file for groovy.lang.GroovyObject. Fix the build path then try building this project 2.The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files i had config the grails path, and it can run-app well. but,still error warning.

    Read the article

  • How to correctly bind an object to a WPF DataGrid?

    - by mbadawi23
    I'm trying to get a WPF DataGrid to work from a user control I'm building. Things seems to work fine. But I noticed this message in the Output window in the IDE: System.Windows.Data Error: 39 : BindingExpression path error: 'Name' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Object' (HashCode=18165668); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String') System.Windows.Data Error: 39 : BindingExpression path error: 'Department' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Object' (HashCode=18165668); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

    Read the article

  • Bash PWD Shortening

    - by dlibby00
    I'm looking for a bash function that will shorten long path names to keep my PS1 variable from getting excessively long. Something along the lines of: /this/is/the/path/to/a/really/long/directory/i/would/like/shortened might end up as: /t../i../t../p../to/a/r../l../d../i/w../like/shortened something that the took the path and a maximum acceptable number of characters to shorten to would be perfect for my .bashrc file.

    Read the article

  • Unable to import userlibrary

    - by abc
    <?xml version="1.0" encoding="MacRoman" standalone="no"?> <eclipse-userlibraries version="2"> <library name="USC_KFS_LIB" systemlibrary="false"> <archive path="/java/lib/JUnit/junit.jar"/> <archive path="/java/lib/Log4j/log4j-1.2.14.jar"/> <archive path="/java/lib/TOMCAT/jsp-api.jar"/> <archive path="/java/lib/TOMCAT/servlet-api.jar"/> </library> This is the content of my file when i try to import this file as user library it works in my machine a while not in machine b. both have same configuration .

    Read the article

  • Cant fetch production db results using Google app engine remote_api

    - by Alon
    Hey, im trying to work out with /remote_api with a django-patch app engine app i got running. i want to select a few rows from my online production app locally. i cant seem to manage todo so, everything authenticates fine, it doesnt breaks on imports, but when i try to fetch something it just doesnt print anything. Placed the test python inside my local app dir. #!/usr/bin/env python # import os import sys # Hardwire in appengine modules to PYTHONPATH # or use wrapper to do it more elegantly appengine_dirs = ['myworkingpath'] sys.path.extend(appengine_dirs) # Add your models to path my_root_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, my_root_dir) from google.appengine.ext import db from google.appengine.ext.remote_api import remote_api_stub import getpass APP_NAME = 'Myappname' os.environ['AUTH_DOMAIN'] = 'gmail.com' os.environ['USER_EMAIL'] = '[email protected]' def auth_func(): return (raw_input('Username:'), getpass.getpass('Password:')) # Use local dev server by passing in as parameter: # servername='localhost:8080' # Otherwise, remote_api assumes you are targeting APP_NAME.appspot.com remote_api_stub.ConfigureRemoteDatastore(APP_NAME, '/remote_api', auth_func) # Do stuff like your code was running on App Engine from channel.models import Channel, Channel2Operator myresults = mymodel.all().fetch(10) for result in myresults: print result.key() it doesnt give any error or print anything. so does the remote_api console example google got. when i print the myresults i get [].

    Read the article

  • Change URL Submitted to Depending on Form Selection

    - by Chris
    I have a form which I need to submit to one of three different URLs depending on a selection made in the form. I suspect the easiest solution is to use jQuery to insert the appropriate path before the rest of the form parameters as the selection is made, but not sure on what the code would be. Any pointers greratly appreciated! <form id="myForm" action='/booking/default-path' accept-charset='utf-8' method='get'> <select name="paramA" id="paramA"> <option id="optionA" value="A" selected="selected">Option A</option> <option id="optionB" value="B">Option B</option> </select> <select name="currency" id="currency"> <option id="GBP" value="GBP" selected="selected">British Pounds</option> <option id="EUR" value="EUR">Euros</option> <option id="USD" value="USD">US Dollars</option> </select> <input type="submit" value="submit" id="submit" name="submit" /> </form> Where the three different URLs would be: ../booking/default-path-gbp?...[params here]... ../booking/default-path-eur?...[params here]... ../booking/default-path-usd?...[params here]... I know it would be a lot easier to incorporate the parameter in the usual way and just use one submission URL root, but unfortunately I'm submitting to an eComms system out of my control and am stuck with having to find a solution to this. Should be easy I think, but not sure where to start, jQuery used elsewhere, so would prefer to use this framework in any solutions.

    Read the article

  • As3 split strangeness

    - by coulix
    Hello coders, Super simple example: var Path:String="E:\SWF Security\Acess Current Path\Access SWF URL.swf" var Path1:Array = Path.split("\\") // Split using the backslash as delimiter (No limit the number of returned tokens) trace(Path1) What do you expect path1 to be ? E: ? No its E:SWF SecurityAcess Current PathAccess SWF URL.swf and i have no idea why.

    Read the article

  • How can I delete video stored in the photo library ?

    - by srikanth rongali
    I have saved video in to the photo library. -(void)exportVideo:(id)sender { NSString *path = [DOCUMENTS_FOLDER stringByAppendingString:@"/air.mp4"]; NSLog(@"Path:%@", path); NSLog(@"Export Button CLicked"); UISaveVideoAtPathToSavedPhotosAlbum(path, self, @selector(video:didFinishSavingWithError: contextInfo:), nil); } - (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo { NSLog(@"Finished saving video with error: %@", error); } Now I need to delete the video i have stored programmatically. How can I delete the video ? Are there any functions for it? Thank You.

    Read the article

  • How to refactor models without breaking WPF views?

    - by Tim Murphy
    I've just started learning WPF and like the power of databinding it presents; that is ignoring the complexity and confusion for a noob. My concern is how do you safely refactor your models/viewmodels without breaking the views that use them? Take the following snippet of a view for example: <Grid> <ListView ItemsSource="{Binding Contacts}"> <ListView.View> <GridView> <GridViewColumn Header="First Name" DisplayMemberBinding="{Binding Path=FirstName}"/> <GridViewColumn Header="Last Name" DisplayMemberBinding="{Binding Path=FirstName}"/> <GridViewColumn Header="DOB" DisplayMemberBinding="{Binding Path=DateOfBirth}"/> <GridViewColumn Header="# Pets" DisplayMemberBinding="{Binding Path=NumberOfPets}"/> <GridViewColumn Header="Male" DisplayMemberBinding="{Binding Path=IsMale}"/> </GridView> </ListView.View> </ListView> </Grid> The list is bound to the Contacts property, IList(Of Contact), of the windows DataSource and each of the properties for a Contact is bound to a GridViewColumn. Now if I change the name of the NumberOfPets property in the Contact model to PetCount the view will break. How do I prevent the view breaking?

    Read the article

  • Alternative to 'publish' in visual studio

    - by acidzombie24
    I am working on an app with configurable files. When i publish i notice 1) I get an installer which i dont think i can opt out of 2) I dont know where the install path is and if i change the config files the application will not install (maybe not run either if i edit them in the right place?) So what alternatives do i have? I would like some event i can run which builds in release mode then copies the release.exe and any config/media file and move it to path/deploy/prj/ so i can zip it or share it instead of a path in my sensitive path/src area (bonus is i can share deploy if i want all projects to be available (and no source)) Using visual studio 2010 -edit- also i need some data in src/relatedprj/bin/*, to be copied into the root

    Read the article

  • How to get MS Word templates directory for another user?

    - by Steve
    I'm using the following code to get the path where Word stores its templates: WordTemplatePath:=WordApp.Options.DefaultFilePath[$00000002]; The problem is that this returns the path for the actual, logged-in user. Is there a way to get the path for another user of the same Windows instance? I need it so my installer program can install the templates used by my program for other users as well.

    Read the article

  • UIImagePNGRepresentation issues?

    - by disorderdev
    I want to load images from UIImagePickerController, then save the selected photo to my app's document directory. UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *data1 = UIImagePNGRepresentation(image); NSString *fileName = "1.png"; NSString *path = //get Document path, then add fileName BOOL succ = [data1 writeToFile:path atomically:YES]; but after I save the image to my document, I found that, the image was rotated 90 degree, then I change the method UIImagePNGRepresentation to UIImageJPEGRepresentation, this time it's fine, anyone know what's the problem?

    Read the article

  • Django: Site-Wide URL Prefix

    - by Tom
    I've built a Django site that will live at the root when it's live. Right now it's functioning perfectly at the IP address. For testing purposes, the client has pointed a proxy url at it, but the url has /folder/path in it, so none of the URL patterns match. I put (/folder/path)? into all the url patterns so they now respond, but all of the links are broken because I'm using the {% url %} tag and while the url patterns will match the optional path, they don't include it in that tag. Clearly I can just hard-code /folder/path into all of my urls (well, into all of the url includes) until testing is complete, but is there a better way to do this?

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >