Search Results

Search found 523 results on 21 pages for 'invocation'.

Page 12/21 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • IWebBrowser2: how to force links to open in new window?

    - by Rob McAfee
    The MSDN documentation on WebBrowser Customization explains how to prevent new windows from being opened and how to cancel navigation. In my case, my application is hosting an IWebBrowser2 but I don't want the user to navigate to new pages within my app. Instead, I'd like to open all links in a new IE window. The desired behavior is: user clicks a link, and a new window opens with that URL. A similar question was asked and answered here and rather than pollute that answered post, it was suggested I open a new discussion. The members on the related post suggested I should be able to do this by trapping DISPID_BEFORENAVIGATE2, setting the cancel flag, and writing code to open a new window, but I've found out that the browser control gets lots of BeforeNavigate2 events that seem to be initiated by scripts on the main page. For example, amazon.com fires BeforeNavigate2 events like crazy, and they are not a result of link invocation. Replies appreciated!

    Read the article

  • Adding business logic to a domain class using a getter style method name

    - by Richard Paul
    I'm attempting to add a method to a grails domain class, e.g. class Item { String name String getReversedName() { name.reverse() } } When I attempt to load the application using grails console I get the following error: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory':Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a setter for property reversedName in class Item ... 18 more It looks like Hibernate is interpreting getReversedName() as a getter for a property, however in this case it is a derived field and hence should not be persisted. Obviously in my actual code the business logic I'm exposing is more complex but it isn't relevant to this question. I want to be able to call item.reversedName in my code/gsps. How can I provide property (getter) access to a method in a Grails domain class without Grails attempting to map it with Hibernate?

    Read the article

  • Apply dynamic list of templates to an argument

    - by Diego Martinez
    I need apply a variable sequence of templates to an argument. example 1: arg:tpl1():tpl2():...:tplN() Suppose that i have other multi valued argument, and each value is the name for a dynamic template invocation. ¿What is the better form of apply all the templates from the list to my argument? tplNames : {name | <(name)(arg)>} not works, just apply a template ever to the same innitial value of my argument, i need the same result of example 1 but in a dynamic way. Thank you!!

    Read the article

  • Javascript function question

    - by Raj
    I searched but couldn't find an answer to this seemingly easy question, so... Suppose I have a loop in which I need to set callbacks. My callback function looks like this: function callback(var1) { // code } Now my loop is something like this: for( //condition) { var x = something_different_each_time; document.getElementById('foo').addEventListener('click', function() { callback(x); }, false); } Now it looks like even if the loop runs n times, the anonymous function is compiled only once -- and hence every invocation of callback is called with the same argument (even though x varies in the loop every time). I must be missing something here.. any help is greatly appreciated! :)

    Read the article

  • Dynamically create labels in gas macros?

    - by pgod
    Hi everyone, I would like to dynamically create a set of labels in an assembly function using a gas macro. I would like to do something like this: .macro set_up_jumptab_entry prefix, from=0, to=10 .quad \prefix_\item .if \to-\from set_up_jumptab_entry \prefix,"(\from+1)",\to .endif .endm set_up_jumptab_entry myfunc 0 10 Here \prefix_\item would be something like myfunction_7. Now, I can find lots of examples of recursive invocation, but I haven't found one of just label concatenation involving passed-in macro arguments. Gas is quite poorly documented, so answering this question is difficult for me. Can you concatenate arguments to macros with other tokens to make single tokens? What's your favorite gas assembler reference?

    Read the article

  • View returned file from Webservice method

    - by gafda
    I already have a method in my webservice that returns a byte[] containing only the bytes of the file downloading. The invocation is something like: http://www.mysite.com/myWebservice.asmx with: string fileId = "123"; bytes[] fileContent = myWebservice.Download(fileId); What I wanted to do is be able to invoke this method or other (to be made) on a aspx webpage and be able to open a browser window containing the real content of the file. i.e. Most files are TXT and PDF. (Assuming the client has the PDF plugin that alows him\her to view PDF's on the browser.)

    Read the article

  • Fault exception trashes a register causing a crash in [NSInvocation invoke]

    - by Mike Weller
    I have an NSOperation which fetches some objects from a core data persistent store and sums up a few totals. Sometimes an object is deleted while the operation in in progress, so a core data fault exception occurs. I try/catch the exception while summing to ignore it because I just want to skip objects that cannot be faulted in. However, when one of these fault exceptions occurs (and I swallow it) there is a crash after the invocation returns in [NSInvocation invoke]. It's a bad memory access when dereferencing the value in r10 which according to GDB on a successful run points to one of these: (gdb) x 0x38388348 0x38388348 <OBJC_IVAR_$_NSInvocation._retdata>: 0x00000008 If a fault exception occured a value of 0x02 is in the register which causes the crash. A quick google search tells me that r10 should be saved by the callee, meaning it is not being restored by whatever code is changing it when this exception occurs. Can anybody explain this? I'm not an expert when it comes to these kinds of low-level details

    Read the article

  • Why can I not send more than one request?

    - by Doug
    function stateChanged(idname) { xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(idname).value = xmlhttp.responseText; } } } function openSend(php,idname) { stateChanged(idname); xmlhttp.open("GET",php,true); xmlhttp.send(); } function showHint() { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } openSend("time.php", "Time"); openSend("date1.php", "Date1"); openSend("date2.php", "Date2"); return; } These two say aborted (in Firebug) and doesn't return a value. Why is that? Is it because I can't send more than 1 request? openSend("time.php", "Time"); openSend("date1.php", "Date1"); If I can't, how could I achieve 3 requests with only one invocation?

    Read the article

  • How to track dealloc of an abstract object class (NSMutable...)

    - by Thomas Tempelmann
    I have a bug in my code caused by a premature freeing of a ObjC object. I seem not to be able to find it by just looking at my code. There's usually a simple trick to track the dealloc to any class: Implement dealloc, and set a breakpoint. This even usually works with standard objects, by subclassing them and making sure I instantiate the subclass instead of the standard class. However, this does not seem to work with NSMutableArray, and probably neither with similar NSMutable... classes. Some explanations for this can be found here: link text Any other ideas how to track the dealloc invocation of a particular class or object so that I can see the call stack? It's probably possible with DTrace. Any pointers without having to read the entire dtrace docs first?

    Read the article

  • How to figure out why ssh session does not exit sometimes?

    - by WilliamKF
    I have a C++ application that uses ssh to summon a connection to the server. I find that sometimes the ssh session is left lying around long after the command to summon the server has exited. Looking at the Centos4 man page for ssh I see the following: The session terminates when the command or shell on the remote machine exits and all X11 and TCP/IP connections have been closed. The exit status of the remote program is returned as the exit status of ssh. I see that the command has exited, so I imagine not all the X11 and TCP/IP connections have been closed. How can I figure out which of these ssh is waiting for so that I can fix my summon command's C++ application to clean up whatever is being left behind that keeps the ssh open. I wonder why this failure only occurs some of the time and not on every invocation? It seems to occur approximately 50% of the time. What could my C++ application be leaving around to trigger this?

    Read the article

  • Reusing of a PreparedStatement between methods?

    - by MRalwasser
    We all know that we should rather reuse a JDBC PreparedStatement than creating a new instance within a loop. But how to deal with PreparedStatement reuse between different method invocations? Does the reuse-"rule" still count? Should I really consider using a field for the PreparedStatement or should I close and re-create the prepared statement in every invocation? (Of course an instance of such a class would be bound to a Connection which might be a disadvantage) I am aware that the ideal answer might be "it depends". But I am looking for a best practice for less experienced developers that they will do the right choice in most of the cases.

    Read the article

  • How to know from a bash script if the user abruptly closes ssh session

    - by Figo
    I have a bash script that acts as the default shell for a user loging in trough ssh. It provides a menu with several options one of wich is sending a file using netcat. The netcat of the embedded linux I'm using lacks the -w option, so if the user closes the ssh connection without ever sending the file, the netcat command waits forever. I need to know if the user abruptly closes the connection so the script can kill the netcat command and exit gracefully. Things I've tried so far: Trapping the SIGHUP: it is not issued. The only signal issued i could find is SIGCONT, but I don't think it's reliable and portable. Playing with the -t option of the read command to detect a closed stdin: this would work if not for a silly bug in the embedded read command (only times out on the first invocation)

    Read the article

  • Does it mean JVM Suspended?

    - by Joe.wang
    When my application run . I got a message says : Ping: Timed out waiting for signal from JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. What does that mean? It seems it will block any web request from outside? because when I upload a file to it, it failed. help me .

    Read the article

  • Maintain a variable value between program runs

    - by Akshay J
    I have a simple c# console application that is scheduled after every 5 mins. Every invocation of the program requires the output of the last run. What I am doing right now is using a text file and store the result in it. next time when it runs it opens the text file and know the output of the previous run. Is there any other way to do it that wont require any such text file ? Like maintaining a session variable etc ?

    Read the article

  • Compilation Error related

    - by aparna
    Given: 11. public static void test(String str) { 12. int check = 4; 13. if (check = str.length()) { 14. System.out.print(str.charAt(check -= 1) +", "); 15. } else { 16. System.out.print(str.charAt(0) + ", "); 17. } 18. } and the invocation: 21. test("four"); 22. test("tee"); 23. test("to"); What is the result? A. r, t, t, B. r, e, o, C. Compilation fails. D. An exception is thrown at runtime. Answer: C Can you explain why the compilation fails please?

    Read the article

  • regular expression

    - by Altariste
    Hi, I need to find all invocations of some logging macros in the code. The macro invocation is of the form: DEBUG[1-5] ( "methodName: the logged message", arguments) But the new versions of the macros are prepending the name of the method automatically, so my task is to write a Python script that will remove the duplicate function names specified already by the programmer. I'm using the sub function from the re module. I plan to substitute the part indicated by || signs below : ||DEBUG[1-5] ("methodName: || the logged message", arguments) with simply DEBUG[1-5](" The problem is following: To find the expressions I want to substitute, I use the following regular expression: ((DEBUG | INFO | all other macros names )[1-5]*)\s*\(\"\w+: But it doesn't match the whole expression ( from DEBUG right to the colon ), but only the macro name, that is for example DEBUG5. Is my expression wrong or there is some quirk in the Python regex processing? ( maybe the fact that I use the DEBUG[1-5] as a subgroup has something to do with this? ) Help from anyone more knowledgable than me appreciated :).

    Read the article

  • XCode 5 says I got a duplicate, which I don't

    - by GoodMove
    The point is every time I try to run a C++ code in XCode 5 (the file s "File.cpp") xcode returns this: duplicate symbol _main ld: 1 duplicate symbol for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) And it only returns the error, when I got the following function whatever it contains: int main() { } I checked the folder, which XCode points to (where it says the duplicates are placed), but didn't find anything though. What am I supposed to do??? #include "File.h" using namespace std; void func (void){ cout << "Hello World!" << endl; }

    Read the article

  • How is Core Data detecting the conflicts, actually?

    - by brainfrog
    Apple says about -detectConflictsForObject: If on the next invocation of save: object has been modified in its persistent store, the save fails. This allows optimistic locking for unchanged objects. Conflict detection is always performed on changed or deleted objects. So what does this mean? If I simply modify an managed object and then save the context, there is always a conflict detection happening? Does this conflict detection simply compare the timestamps of the "records" to see if the "new" data is actually "old"? Is that a conflict?

    Read the article

  • Java Authenticator on a per connection basis?

    - by Martijn Laarman
    I'm building an Eclipse plugin that talks to a REST interface which uses Basic Authentication. When the authentication fails I would like to popup my plugin's settings dialog and retry. Normally I could use the static Authenticator.setDefault() to setup an authenticator for all HttpURLConnection's for this, but since I am writing a plugin I don't want to overwrite Eclipse's default Authenticator (org.eclipse.ui.internal.net.auth); I thought of setting my custom Authenticator before loading and putting Eclipse's default back afterwards, but I imagine this will cause all sorts of race issues with multithreading so I quickly lost that notion. Google searches yield all sorts of results basically telling me it's not possible: The Java URLConnection API should have a setAuthenticator(Authenticator) method for making it easier to use this class in multi-threaded context where authentication is required. Source If applications contains few third party plugins and each plugin use its own Authenticator what we should do? Each invocation of "Authenticator.setDefault()" method rewrite previously defined Authenticator... Source Are there any different approaches that might help me overcome this issue?

    Read the article

  • How can I pass in specific parameters to mstest in Visual Studio

    - by Eric Langland
    I'm trying to modify my test projuect to allow for remote invocation of an api we're building. Right now the tests are hard coded to run locally(against localhost), but I would like to be able to point the tests at any endpoint (even remote ones in production). Ideally there would be a place in the .testsettings for config values to be stored. Sadly this isn't the case. Or, being able to pass parameters to MSTest that the test would read...? Any ideas? Thanks in advance.

    Read the article

  • Create Static Library iOS Error

    - by bit-whacker
    This is FIrst time i try to create Cocoa Touch Static Library and follow these steps. Create New Project with Cocoa Touch Static Library named it By default i got single class with Demo.h and Demo.m. 2.Create a public function in .h and implement it in .m. 3.Select iOS Device and press cmd + B. 4.Copy Demo.a from products and the .h file drop it in my iOS App where i want to use it. 5.Then Import Demo.h and try to call the function that i wrote. Issue When try to Run the project showing this error. ld: warning: ignoring file /Users/Zenga/Documents/iOS/Static Library/myAppwithLib/Demo.a, file was built for archive which is not the architecture being linked (i386): /Users/Zenga/Documents/iOS/Static Library/myAppwithLib/Demo.a Undefined symbols for architecture i386: "_OBJC_CLASS_$_Demo", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) Please help if anyone have any idea about it.

    Read the article

  • How to Get the Method/Function Call Trace for a Specific Run?

    - by JackWM
    Given a Java or JavaScript program, after its execution, print out a sequence of calls. The calls are in invocation order. E.g. main() { A(); } A() { B(); C(); } Then the call trace should be: main -> A() -> B() -> C() Is there any tool that can profile and output this kind of information? It seems this is common a need for debugging or performance tuning. I noticed that some profilers can do this, but I prefer a simpler/easy-to-use one. Thanks!

    Read the article

  • Why can't i call Contains method from my array?

    - by xbnevan
    Arrrg!I am running into what i feel is a dumb issue with a simple script i'm writing in powershell. I am invoking a sql command that is calling a stored proc, with the results i put it a array. The results look something like this: Status ProcessStartTime ProcessEndTime ------ ---------------- -------------- Expired May 22 2010 8:31PM May 22 2010 8:32PM What i'm trying to do is if($s.Contains("Expired")) , report failed. Simple...? :( Problem i'm running into is it looks like Contains method is not being loaded as i get an error like this: Method invocation failed because [System.Object[]] doesn't contain a method named 'Contains'. At line:1 char:12 + $s.Contains <<<< ("Expired") + CategoryInfo : InvalidOperation: (Contains:String) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound So, what can i do to stop powershell from unrolling it to string? Actual ps script below - $s = @(Invoke-Sqlcmd -Query "USE DB GO exec Monitor_TEST_ps 'EXPORT_RUN',NULL,20 " ` -ServerInstance "testdb002\testdb_002") if ($s.Contains("Expired")) { Write-Host "Expired found, FAIL." } else { Write-Host "Not found, OK." }

    Read the article

  • iPhone to Java EE remoting

    - by Justin Simonelis
    Hi there! I was looking for some opinions on the best remote method invocation practices when developing iPhone applications that communicate with Java (java EE) servers. Many iphone applications these days typically talk to a server back end. I typically prefer to write my servers in java using some Spring libraries. So far I have not found or stuck to a definitive practice for iphone-java server communication. What are some technical solutions and libraries that you have used to implement this kind of client-server communication? One thing I always keep in mind is that I want the communication protocols to be simple so that multiple platforms can be added for example, in future adding Android and possibly Blackberry clients, that can use the same protocol to talk to the server.

    Read the article

  • Solution to compiler warning for generic varargs

    - by TJR
    A puzzle from this blog. Similar to SO1445233. Given the following source listing, explain why the compiler is producing a warning at invocation to the list method and give a solution for removing the warning without resorting to @SuppressWarnings annotation. public class JavaLanguagePuzzle3 { public static void main(String[] args) { list("1", 2, new BigDecimal("3.5")); } private static <T> List<T> list(T... items) { return Arrays.asList(items); } } Warning: Type safety: A generic array of Object&Serializable&Comparable<?> is created for a varargs parameter

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >