Search Results

Search found 1746 results on 70 pages for 'bom signature'.

Page 45/70 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • same Linq for two tables

    - by Diana
    I need to do something like this, My two tables have the same signature, but different class so It suppose to work but it is not working. var myTable; if (booleanVariable == true) { myTable = table1; } else { myTable = table2; } var myLinq1 = from p in myTable join r in myOtherTable select p; In this case, I have to initialize myTable I have tried also, var myTable= table2; if (booleanVariable == true) { myTable = table1; } var myLinq1 = from p in myTable join r in myOtherTable select p; then var is type table2, then it can't be changed to table1 type. I need help, I don't want to make a copy paste of all the code. the linq query is huge, and it s nested with 5 or 6 queries. also I have to do this on 12 different methods. Thanks a lot for your help.

    Read the article

  • MS Detours Library, detouring non win api function

    - by flavour404
    Hi, I want to use the windows detours library to detour a non win api function. The function is part of the Qt library (QtGui4.dll). I am wondering how I would set up the function signature for : void QPainter::drawText ( const QPointF & position, const QString & text ) I had a go with this and it received my usual share of errors, a little explanation of requirements would be interesting as well: void (QPainter * real_drawText)(const QPointF & position, const QString & text) = drawText This is what they look like for TextOut, under the windows API: BOOL (WINAPI * Real_TextOut)(HDC a0, int a1, int a2, LPCWSTR a3, int a4) = TextOutW; BOOL WINAPI Mine_TextOut(HDC hdc,int X,int Y,LPCWSTR text,int textLen) { BOOL rv = Real_TextOut(hdc, X, Y, text, textLen); HWND hWindow = WindowFromDC(hdc); SendTextMessage(hWindow, text); return rv; } Thanks.

    Read the article

  • Why don't Domain class static methods work from inside a grails "service"?

    - by ?????
    I want a grails service to be able to access Domain static methods, for queries, etc. For example, in a controller, I can call IncomingCall.count() to get the number of records in table "IncomingCall" but if I try to do this from inside a service, I get the error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'incomingStatusService': Invocation of init method failed; nested exception is groovy.lang.MissingMethodException: No signature of method: static ms.wdw.tropocontrol.IncomingCall.count() is applicable for argument types: () values: [] How do these methods get injected? There's no magic def statement in a controller that appears to do this. Or is the problem that Hibernate isn't available from my Service class?

    Read the article

  • Cheap windows driver signing for 64 bit Windows 7

    - by kayahr
    I need to install the libusb-win32 driver on Windows 7 64 bit machines. This driver is open source so it is not digitally signed so I want to do this my self but I wonder if this can be done WITHOUT paying lot of money. Is it possible to use a certificate which is NOT signed by Verisign or GlobalSign? Maybe self-signed or by using StartSSL instead? And if yes, how do I do it? According to this howto I have to use a "cross-certificate" (And there are only six available on the Microsoft list and most of them are for CAs which are no longer active) I don't care if the user is confronted with a warning message. I can even accept if the user has to install a special CA certificate first. I only require that the driver runs without manually disabling the signature check on each windows startup.

    Read the article

  • A controller method that calls a different method on the same controller

    - by justSteve
    I have a controller method: public ActionResult Details(int id) { Order order = OrderFacade.Instance.Load(id); return View(order); } that is used for 95% of possible invocations. For the other 5% i need to manipulate the value of id before passing to the facade. I'd like to create a separate method within this same controller that executes that manipulation and then calls this (Details) method. What would the signature of that method look like? What is the syntax to call the main Details method? public ??? ManipulatorMethod(int id) { [stuff that manipulates id] [syntax to call Details(manipulatedID)] } mny thx

    Read the article

  • Create Java method from a string?

    - by drozzy
    Is it possible in Java, to declare a method with a string instead of an identifier? For example can I do something like the following: class Car{ new Method("getFoo", { return 1+1; }); } //Use it Car car = new Car(); car.getFoo(); EDIT: I am adding a Purpose WHY I need this. In order to not hardcode method names when using Jersey and it's UriBuilder, which requires a method name: https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/core/UriBuilder.html See path() method with signature: public abstract UriBuilder path(java.lang.Class resource, java.lang.String method) throws java.lang.IllegalArgumentException I hope my question is clear, if not - let me know and I can clarify it.

    Read the article

  • Grails: Querying Associations causes groovy.lang.MissingMethodException

    - by Paul
    Hi, I've got an issue with Grails where I have a test app with: class Artist { static constraints = { name() } static hasMany = [albums:Album] String name } class Album { static constraints = { name() } static hasMany = [ tracks : Track ] static belongsTo = [artist: Artist] String name } class Track { static constraints = { name() lyrics(nullable: true) } Lyrics lyrics static belongsTo = [album: Album] String name } The following query (and a more advanced, nested association query) works in the Grails Console but fails with a groovy.lang.MissingMethodException when running the app with 'run-app': def albumCriteria = tunehub.Album.createCriteria() def albumResults = albumCriteria.list { like("name", receivedAlbum) artist { like("name", receivedArtist) } // Fails here maxResults(1) } Stacktrace: groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (tunehub.LyricsService$_getLyrics_closure1_closure2) values: [tunehub.LyricsService$_getLyrics_closure1_closure2@604106] Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), any(groovy.lang.Closure), trim() at tunehub.LyricsService$_getLyrics_closure1.doCall(LyricsService.groovy:61) at tunehub.LyricsService$_getLyrics_closure1.doCall(LyricsService.groovy) (...truncated...) Any pointers?

    Read the article

  • Type problem when including tuple

    - by Person
    I'm using Visual Studio 2008 with Feature Pack 1. I have a typedef like this typedef std::tr1::tuple<std::string, std::string, int> tileInfo with a function like this const tileInfo& GetTile( int x, int y ) const. In the implementation file the function has the exact same signature (with the added class name qualifier) and I am getting a redefinition: different type modifiers error. It seems to be looking for an int& instead of a tileInfo& When I mouse over the type of the function in the header, i.e. tileInfo& it brings up a little bar saying static const int tileInfo. I think this may be the problem, but I'm not sure what to do. Any help is appreciated, thanks.

    Read the article

  • Attaching user data to AXObserver

    - by Ben Packard
    I am using an AXObserver to monitor when a window is closed. In the callback, I am just raising an NSNotification. All working well. What is the correct syntax for attaching some user data as refcon? The working call looks like this: err6 = AXObserverAddNotification(observerTable, tableRef, kAXUIElementDestroyedNotification, nil); and the callback specified when I create the observer has the signature: static void cbTableClosed (AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *refcon) I want to replace refcon with an object of my own, but don't know how to change either line. The obvious objective-c type changes through up warnings.

    Read the article

  • WCF Rest services for use with the repository pattern?

    - by mark smith
    Hi there, I am considering moving my Service Layer and my data layer (repository pattern) to a WCF Rest service. So basically i would have my software installed locally (WPF client) which would call the Service Layer that exists via a Rest Service... The service layer would then call my data layer using a WCF Rest Service also OR maybe just call it via the DLL assembly I was hoping to understand what the performance would be like. Currently I have my datalayer and servicelayer installed locally via DLL Assemblies locally on the pc. Also i presume the WCF REST services won't support method overloading hance the same name but with a different signature?? I would really appreciate any feedback anyone can give. Thanks

    Read the article

  • Twitter oauth/request_token failing sometimes

    - by Techpriester
    Hello there. I'm implementing Twitters OAuth for Adobe AIR in Javascript. My problem is, that out of 100 requests to api.twitter.com/oauth/request_token about 30 fail with the usual error message: Failed to validate oauth signature and token The other 70% of requests produce a correct response, so I believe that my algorithm for signing is correct. I've read about invalid timestamps in a lot of forums and mailing lists but that is not the problem. My timestamps are correct. I also checked, if the nonces are unique, so that's not the cause either. Any ideas why this is happening?

    Read the article

  • What's the standard behaviour for an out parameter when a TryXxxx method returns false?

    - by Matt Lacey
    Assuming a method with the following signature bool TryXxxx(object something, out int toReturn) What is it acceptable for toReturn to be if TryXxxx returns false? In that it's infered that toReturn should never be used if TryXxxx fails does it matter? If toReturn was a nulable type, then it would make sense to return null. But int isn't nullable and I don't want to have to force it to be. If toReturn is always a certain value if TryXxxx fails we risk having the position where 2 values could be considered to indicate the same thing. I can see this leading to potential possible confusion if the 'default' value was returned as a valid response (when TryXxxx returns true). From an implementation point if view it looks like having toReturn be a[ny] value is easiest, but is there anything more important to consider?

    Read the article

  • Check if there are any repeated elements in an array recursively

    - by devoured elysium
    I have to find recursively if there is any repeated element in an integer array v. The method must have the following signature: boolean hasRepeatedElements(int[] v) I can't see any way of doing that recursively without having to define another method or at least another overload to this method (one that takes for example the element to go after or something). At first I thought about checking for the current v if there is some element equal to the first element, then creating a new array with L-1 elements etc but that seems rather inefficient. Is it the only way? Am I missing here something?

    Read the article

  • Haskell maps returning a monad

    - by sabauma
    The lookup function in Data.Map and Data.IntMap currently return values wrapped in Maybe with the type signature lookup :: Ord k => k -> Map k a -> Maybe a It used to have the more general type of lookup :: (Monad m, Ord k) => k -> Map k a -> m a I realize the former likely reduces the need of extra type specification, but the latter would make it much more general and allow lookup to be used in list comprehensions. Is there any way to mimic this behavior with the newer version, or would I have to use an older version of the library?

    Read the article

  • How to tell a method has a varargs argument using reflection?

    - by Anthony Kong
    Here is a sample code package org.example; import java.lang.reflect.Method; class TestRef { public void testA(String ... a) { for (String i : a) { System.out.println(i); } } public static void main(String[] args){ Class testRefClass = TestRef.class; for (Method m: testRefClass.getMethods()) { if (m.getName() == "testA") { System.out.println(m); } } } } The output is public void org.example.TestRef.testA(java.lang.String[]) So the signature of the method is reported to take a array of String. Is there any mean in the reflection library I can tell that the method is originally declared to take a varargs?

    Read the article

  • J2ME's extra annoying HTTP permission prompt

    - by Hans Malherbe
    Some phones only prompt the user for permission the first time a connection is made. Others pop up the permission prompt whenever the MIDlet attempts to make a HTTP connection! What are the options if we want to suppress the prompt? Can we sign the JAR using only one CA (Certificate Authority) and have it work on all devices? Do we have to pay for a signature on every release? Is it an option to create our own CA certificate and tell our customers to install it on there device? Alternatively, it seems that plain socket connections do not suffer so. Is there a free implementation of HTTP on top of TCP for J2ME?

    Read the article

  • DllImport Based on OS Platform

    - by Ngu Soon Hui
    I have a mixture of unmanaged code ( backend) and managed code ( front end), as such, I would need to call the unmanaged code from my managed code, using interop techniques and DllImport attribute. Now, I've compiled two versions of unmanaged code, for both 32 and 64 bit OS; they are named service32.dll and service64.dll respectively. So, in my .Net code, I would have to do a DllImport for both dlls: [DllImport(@"service32.dll")] //for 32 bit OS invocation public static void SimpleFunction(); [DllImport(@"service64.dll")] //for 64 bit OS invocation public static void SimpleFunction(); And call them depending on which platform my application is running on. The issue now is that for every unmanaged function, I have to declared it twice, one for 32 bit OS and one for 64 bit OS. This is a duplication of work, and everytime I change the signature of an unmanaged function, I have to modified it in two places. Is there anyway that I can change the argument in DllImport so that the correct dll will be invoked automagically, depending on the platform?

    Read the article

  • Java - how to tell class of an object?

    - by lkm
    Given a method that accepts as a parameter a certain supertype. Is there any way, within that method, to determine the actual class of the object that was passed to it? I.e. if a subtype of the allowable parameter was actually passed, is there a way to find out which type it is? If this isn't possible can someone explain why not (from a language design perspective)? Thanks Update: just to make sure I was clear void doSomething(MyType myType) { //determine if myType is MyType OR one of its subclasses } Since the method signature specifies the parameter as being MyType, then how can one tell if the object is actually a subtype of MyType (and which one).

    Read the article

  • How can I implement the same behavior as Dictionary.TryGetValue

    - by pblasucci
    So, given then following code type MyClass () = let items = Dictionary<string,int>() do items.Add ("one",1) items.Add ("two",2) items.Add ("three",3) member this.TryGetValue (key,value) = items.TrygetValue (key,value) let c = MyClass () let d = Dictionary<string,int> () d.Add ("one",1) d.Add ("two",2) d.Add ("three",3) And the following test code let r1,v1 = d.TryGetValue "one" let r2,v2 = c.TryGetValue "one" The r1,v1 line works fine. The r2,v2 line bombs; complaining c.TryGetValue must be given a tuple. Interestingly, in each line the signature of TryGetValue is different. How can I get my custom implementation to exhibit the same behavior as the BCL version? Or, asked another way, since F# has (implicitly) the concept of tuple parameters, curried parameters, and BCL parameters, and I know how to distinguish between curried and tuple-style, how can I force the third style (a la BCL methods)? Let me know if this is unclear.

    Read the article

  • How to pass associative Array parameter from javascript to ActiveX object?

    - by Rory
    I'd like to pass an associative array (or simply an object with property names & values) to my ActiveXObject. I can't find anyone who has successfully and simply passed complex data from javascript to an ActiveX object. My ActiveX object is being loaded in IE, and it's mine so I can change the method signature & code to whatever will work. I also have control over the structure of the javascript. Without a simple way of doing this I'm thinking of url-encoding the data and sending it as a string. But that does seem a little silly if it's possible just to pass an object. The ActiveX object is coded in C# if that makes any difference...

    Read the article

  • Reverting back to previous ADT plugin

    - by sdfwer
    Now I was wondering if anyone has been able to accomplish reverting to a previous ADT plugin. The reason for this is because I am using an open source jar and I am getting the following errors on my LogCat such as: unable to resolve virtual method unable to find class referenced in signature unable to resolve new-instance The effect of this causes an error on running my android application on the debugger. I was using android ADT 15 before now I am updated to 17. Please help on finding a solution to resolve the issue. Edit* Forgot to add in The error "java.lang.NoClassDefFoundError". In simple terms it can't find classes or methods the attached jar even though it allows it.

    Read the article

  • Haskell Write Computation result to file

    - by peterwkc
    Hello to all, i have function which create a tuple after computation but i would like to write it to file. I know how to write file using writeFile but did not know how to combine computation and monads IO together in the type signature This is my code. invest :: ([Char]->Int->Int->([Char], Int) ) -> [Char]->Int->Int->([Char], Int) invest myinvest x y = myinvest x y myinvest :: [Char]->Int->Int->([Char], Int) myinvest w x y | y > 0 = (w, x + y) | otherwise = error "Invest amount must greater than zero" where I have a function which computes the maximum value from list but i want to these function receive input from file then perform the computation of maximum value. maximuminvest :: (Ord a) => [a] -> a maximuminvest [] = error "Empty Invest Amount List" maximuminvest [x] = x maximuminvest (x:xs) | x > maxTail = x | otherwise = maxTail where maxTail = maximuminvest xs Please help. Thanks.

    Read the article

  • [LINQ noob] Please help me convert this Python 3.x snippet to .net LINQ.

    - by Hamish Grubijan
    I want to sort elements of a HashSet<string> and join them by a ; character. Python interpreter version: >>> st = {'jhg', 'uywer', 'nbcm', 'utr'} >>> strng = ';'.join(sorted(s)) >>> strng 'ASD;anmbh;ashgg;jhghjg' C# signature of a method I seek: private string getVersionsSorted(HashSet<string> versions); I can do this without using Linq, but I really want to learn it better. Many thanks!

    Read the article

  • C++ inheritance and member function pointers

    - by smh
    In C++, can member function pointers be used to point to derived (or even base) class members? EDIT: Perhaps an example will help. Suppose we have a hierarchy of three classes X, Y, Z in order of inheritance. Y therefore has a base class X and a derived class Z. Now we can define a member function pointer p for class Y. This is written as: void (Y::*p)(); (For simplicity, I'll assume we're only interested in functions with the signature void f() ) This pointer p can now be used to point to member functions of class Y. This question (two questions, really) is then: Can p be used to point to a function in the derived class Z? Can p be used to point to a function in the base class X?

    Read the article

  • Android: Best way/library to write an app that simply gets/sets your Facebook status, sends Facebook

    - by D.
    I have the Android Facebook-Connect library running in my emulator and I'm able to set my status with the Facebook API I have setup. However, I don't know where to go from there? Am I supposed to use the session key that this library allows me to get and make some Facebook API calls? I haven't found any code examples to even see what the proper syntax is. Am I better off using another library? I tried fbrocket with limited luck(I get a "server error 104 - Incorrect signature"). Thanks for any help.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >