Search Results

Search found 3137 results on 126 pages for 'digital signature'.

Page 79/126 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • ASP.NET Web API crash MSVCR90.dll

    - by user858931
    I have a web api app developed on VS2010. The application calls an external program to run and it runs just fine if I execute in VS2010. But then when I deploy the web api to IIS 7 and 7.5, in some cases, it crashes. Below is the details I got from Event Viewer/Appliation: Fault bucket , type 0 Event Name: BEX Response: Not available Cab Id: 0 Problem signature: P1: TestProgram.exe P2: 1.0.4728.17141 P3: 50c76dea P4: MSVCR90.dll P5: 9.0.30729.6161 P6: 4dace5b9 P7: 0003024a P8: c0000417 P9: 00000000 P10: Attached files: These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_InferenceGenerat_95abb43ace91480da6b8f27f9937db667bc58f_7bb1549d Analysis symbol: Rechecking for solution: 0 Report Id: da8f304e-44c0-11e2-b4e8-0026b97a5242 Report Status: 0 Any idea why it happens and how to fix it? Thanks.

    Read the article

  • problems with Haskell's Number Types

    - by mindeavor.
    I have the following haskell code: fac n = product [1..n] taylor3s w0 f f' f'' t h = w1 : taylor3s w1 f f' f'' (t+h) h where hp i = h^i / fac i w1 = w0 + (hp 1) * f t w0 + (hp 2) * f' t w0 + (hp 3) * f'' t w0 taylor_results = take 4 $ taylor3s 1 f f' f'' 1 0.25 where f t x = t^4 - 4*x/t f' t x = 4*t^3 - 4*(f t x)/t + 4*x/t^2 f'' t x = 12*t^2 - 4*(f' t x)/t + 8*(f t x)/t^2 - 8*x/t^3 taylor_results is supposed to be a use case of taylor3s. However, there is something wrong with the number type inferencing. When I try to compile, this is the error I get: practice.hs:93:26: Ambiguous type variable `a' in the constraints: `Integral a' arising from a use of `taylor3s' at practice.hs:93:26-51 `Fractional a' arising from a use of `f' at practice.hs:93:37 Possible cause: the monomorphism restriction applied to the following: taylor_results :: [a] (bound at practice.hs:93:0) Probable fix: give these definition(s) an explicit type signature or use -XNoMonomorphismRestriction Can someone help me with understanding what the problem is?

    Read the article

  • Handling a binary operation that makes sense only for part of a hierarchy.

    - by usersmarvin_
    I have a hierarchy, which I'll simplify greatly, of implementations of interface Value. Assume that I have two implementations, NumberValue, and StringValue. There is an average operation which only makes sense for NumberValue, with the signature NumberValue average(NumberValue numberValue){ ... } At some point after creating such variables and using them in various collections, I need to average a collection which I know is only of type NumberValue, there are three possible ways of doing this I think: Very complicated generic signatures which preserve the type info in compile time (what I'm doing now, and results in hard to maintain code) Moving the operation to the Value level, and: throwing an unsupportedOperationException for StringValue, and casting for NumberValue. Casting at the point where I know for sure that I have a NumberValue, using slightly less complicated generics to insure this. Does anybody have any better ideas, or a recommendation on oop best practices?

    Read the article

  • Need to interface to a C++ DLL

    - by Pedro
    Hi, I need to call a C++ API from C#. I have been able to call the API, but the char[] parameters do not seem to be marshalling correctly. Here's the C++ signature: Create2ptModel(double modelPowers[2], double modelDacs[2], int pclRange[2], double targetPowers[32], double *dacAdjustFactor, unsigned short powerRampFactors[32], BOOL bPCLDacAdjusted[32], char calibrationModel[32], char errMsg[1024]) and this is how I am trying to call it from C# [DllImport("AlgorithmsLib.dll", EntryPoint = "_Create2ptModel@36", ExactSpelling = true, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)] private static extern AlgorithmStatus Create2ptModel( double[] modelPowers, double[] modelDacs, int[] pclRange, double[] targetPowers, ref double dacAdjustFactor, ushort[] powerRampFactors, bool[] bPCLDacAdjusted, /**/char[] calibrationModel, char[] errMsg/**/); Any idea of how I can marshall it correctly? Thanks in advance!

    Read the article

  • How to programmatically register a component that depends on a list of already registered components

    - by Chris Carter
    I'm programmatically registering a group of services that all implement the same interface, IRule. I have another service that looks like this: public class MyService { private IEnumerable<IRule> _rules; public MyService(IEnumerable<IRule> rules){ _rules = rules; } } Hammett posted something that looked like what I wanted, http://hammett.castleproject.org/?p=257. I changed the signature to IRule[] and tried the ArrayResolver trick in the post but that didn't work for me(note, it didn't break anything either). Anyone know how to programmatically register a component like the code I posted above?

    Read the article

  • Does Core Data automatically validate new values when they are set?

    - by mystify
    In this question, someone asked how to write a validation method for Core Data. I did that, and it looks cool. But one thing doesn't happen: The validation. I can easily set any "bad" value and this method doesn't get called automatically. What's the concept behind this? Must I always first call the validation method before setting any value? So would I write setter methods which call the appropriate validation method first? And if yes, what's the point of following a strict convention in how to write the validation method signature? I guess there's also some automatic way of validation, then. How to activate this?

    Read the article

  • In scala can I pass repeated parameters to other methods?

    - by Fred Haslam
    Here is something I can do in java, take the results of a repeated parameter and pass it to another method: public void foo(String ... args){bar(args);} public void bar(String ... args){System.out.println("count="+args.length);} In scala it would look like this: def foo(args:String*) = bar(args) def bar(args:String*) = println("count="+args.length) But this won't compile, the bar signature expects a series of individual strings, and the args passed in is some non-string structure. For now I'm just passing around arrays. It would be very nice to use starred parameters. Is there some way to do it?

    Read the article

  • Java static source analysis/parsing (possibly with antlr), what is a good tool to do this?

    - by Berlin Brown
    I need to perform static source analysis on Java code. Ideally, I want the system to work out of the box without much modification from me. For example, I have used Antlr in the past, but I spent a lot of time building grammar files and still didn't get what I wanted. I want to be able to parse a java file and have return the character position of say: Character position start and end of a Java block comment Character position start and end of a Java class file Character position start and end of a Java method declaration, signature, and implementation. It looks like Antlr will do that, but I have yet to finish a grammar that actually gives me the positions of the code I need. Does anyone have that complete Antlr grammar and Java code to give the character positions of the parts in the Java source.

    Read the article

  • Convert Python 3.x snippet to C#/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

  • Using ManagementClass.Getinstances() from IronPython

    - by Leo Bontemps
    I have an IronPython script that looks for current running processes using WMI. The code looks like this: import clr clr.AddReference('System.Management') from System.Management import ManagementClass from System import Array mc = ManagementClass('Win32_Processes') procs = mc.GetInstances() That last line where I call the GetInstances() method raises the following error: Traceback (most recent call first): File "<stdin>", line 1, in <module> SystemError: Not Found I am not understanding what's not being found?!? I believe that I may need to pass an instance of ManagementOperationObserver and of EnumerationOptions to GetInstance() however, I don't understand why that is, since the method with the signature Getinstance() is available in ManagementClass.

    Read the article

  • grailsApplication not getting injected in a service , Grails 2.1.0

    - by vijay tyagi
    I have service in which i am accessing few configuration properties from grailsApplication I am injecting it like this class MyWebService{ def grailsApplication WebService webService = new WebService() def getProxy(url, flag){ return webService.getClient(url) } def getResponse(){ def proxy = getProxy(grailsApplication.config.grails.wsdlURL, true) def response = proxy.getItem(ItemType) return response } } When i call getProxy() method, i see this in tomcat logs No signature of method: org.example.MyWebService.getProxy() is applicable for argument types: (groovy.util.ConfigObject, java.lang.Boolean) values: [[:], true] Possible solutions: getProxy(), getProxy(java.lang.String, boolean), setProxy(java.lang.Object) which means grailsApplication is not getting injected into the service, is there any alternate way to access configuration object ? according to burtbeckwith's post configurationholder has been deprecated, can't think of anything else. Interestingly the very same service works fine in my local IDE(GGTS 3.1.0), that means locally grailsApplication is getting injected, but when i create a war to deploy to a standalone tomcat, it stops getting injected.

    Read the article

  • Prevent Java from parsing the command line parameters

    - by User1
    Would like to make anapplication in Java that will not automatically parse parameters used on the command-line. Currently, java requires public static void main(string[]) as the entry point signature. I would like just a single string that I parse myself. Can this be done at all? Here's an example: java MyProgram.class Hello World I would want it to give me Hello World without requiring quotes around that string. I would even settle for java giving me the entire java MyProgram.class Hello World. I'm thinking this is something beyond Java and has more to do with the shell.

    Read the article

  • Why I have to redeclare a virtual function while overriding [C++]

    - by Neeraj
    #include <iostream> using namespace std; class Duck { public: virtual void quack() = 0; }; class BigDuck : public Duck { public: // void quack(); (uncommenting will make it compile) }; void BigDuck::quack(){ cout << "BigDuckDuck::Quack\n"; } int main() { BigDuck b; Duck *d = &b; d->quack(); } Consider this code, the code doesn't compiles. However when I declare the virtual function in the subclass, then it compiles fine. The compiler already has the signature of the function which the subclass will override, then why a redeclaration is required? Any insights.

    Read the article

  • Recursive algorithm for coalescing / collapsing list of dates into ranges.

    - by Dycey
    Given a list of dates 12/07/2010 13/07/2010 14/07/2010 15/07/2010 12/08/2010 13/08/2010 14/08/2010 15/08/2010 19/08/2010 20/08/2010 21/08/2010 I'm looking for pointers towards a recursive pseudocode algorithm (which I can translate into a FileMaker custom function) for producing a list of ranges, i.e. 12/07/2010 to 15/07/2010, 12/08/2010 to 15/08/2010, 19/08/2010 to 20/08/2010 The list is presorted and de-deuplicated. I've tried starting from both the first value and working forwards, and the last value and working backwards but I just can't seem to get it to work. Having one of those frustrating days... It would be nice if the signature was something like CollapseDateList( dateList, separator, ellipsis ) :-)

    Read the article

  • Typeclass instances for unnamed types in Scala

    - by ncreep
    How would one encode the following constraint in Scala (pseudocode)? def foo(x: T forSome { type T has a Numeric[T] instance in scope }) = { val n= implicitly[...] // obtain the Numeric instance for x n.negate(x) // and use it with x } In words: I need a type class instance for my input argument, but I don't care about the argument's type, I just need to obtain the instance and use it on my argument. It doesn't have to be an existential type, but I need to avoid type parameters in the def's signature. Thanks.

    Read the article

  • Why are configuration arrays acceptible parameters in PHP and Javascript?

    - by RenderIn
    In most other OO languages it would be sacrilege to have each function receive a single associative array of Objects rather than enumerating each in the method signature. Why is it acceptable and commonly used in most popular frameworks for both of these languages to do this? Is there some justification beyond wishing to have concise method signatures? I do see a benefit in this -- that the API could remain unchanged as new, optional parameters are added. But Javascript and PHP already allow for optional parameters in their method signatures. If anything, it seems like Java or another OO language would benefit from this more... and yet I rarely see this pattern there. What gives?

    Read the article

  • C++ error - returning a char array

    - by Yosy
    Consider the following code: char CeaserCrypt(char str[256],int key) { char encrypted[256],encryptedChar; int currentAsci; encrypted[0] = '\0'; for(int i = 0; i < strlen(str); i++) { currentAsci = (int)str[i]; encryptedChar = (char)(currentAsci+key); encrypted[i] = encryptedChar; } return encrypted; } Visual Studio 2010 gives an error because the function returns an array. What should I do? My friend told me to change the signature to void CeaserCrypt(char str[256], char encrypted[256], int key). But I don't think that is correct. How can I get rid of the compile error?

    Read the article

  • is there a flag "M_FAST" in FreeBSD kernel for Malloc Call ?

    - by KaluSingh Gabbar
    if you know there is one, can you let me know what its for ? if not please say so : ) thanks. Signature : void * malloc(unsigned long size, struct malloc_type type, int flags); for example. other flags are... M_ZERO Causes the allocated memory to be set to all zeros. M_WAITOK Indicates that it is OK to wait for resources. If the request cannot be immediately fulfilled, the current process is put to sleep to wait for resources to be released by other processes. The malloc(), realloc(), and reallocf() functions cannot return NULL if M_WAITOK is specified.** This is the root of my confusion EDIT: The clarification for M_FAST is made in my answer below.

    Read the article

  • Which to use - "operator new" or "operator new[]" - to allocate a block of raw memory in C++?

    - by sharptooth
    My C++ program needs a block of uninitialized memory. In C I would use malloc() and later free(). In C++ I can either call ::operator new or ::operator new[] and ::operator delete or operator delete[] respectively later. Looks like both ::operator new and ::operator new[] have exactly the same signature and exactly the same behavior. The same for ::operator delete and ::operator delete[]. The only thing I shouldn't do is pairing operator new with operator delete[] and vice versa - undefined behavior. Other than that which pair do I choose and why?

    Read the article

  • how do you set a property of a control to an address of a function in xaml?

    - by ambog36
    Hi, I have a control that has a "Filter" property that expects a function that defines how the contents of the control should be filtered. so far i am setting the filter in code behind as such: MyControl.Filter = AddressOf Filters.MyFilter In this example MyFilter is a shared function in the Filters class with the following signature: Public Shared Function MyFilter(ByVal obj As Object, ByVal text As String) As Boolean I would like to set this in xaml. I was thinking of setting the Filters.MyFilter as a static resource and setting it that way: ...Filter="{StaticResource myFilter}"/ but i cant set Filters.MyFilter as a static resource. Any ideas on how to achieve this? Thanks,

    Read the article

  • In Visual Studio 2010, intellisense isn't showing for long method signatures

    - by sohtimsso1970
    The problem is exactly as asked in the question title. When I'm typing in the text editor and referencing a public method that has a long signature (lots of parameters, usually 10 or more) the intellisense just stops working. It will sometimes flicker; other times it will not show at all. Only seen this happen with C#, but I don't use anything else. It might happen in VB too. Don't know. Anyone else seeing this? I've Googled for an hour but can't seem to iron it out. I've restarted VS, rebooted the machine, enabled/disabled intellisense in Tools - Options. NOTHING works.

    Read the article

  • How can I double-enhance a class with cglib?

    - by artemb
    Hi there! Here's the code: Patient patient = factory.createPatient(); Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(patient.getClass()); enhancer.setCallback(new DefaultMethodInterceptor(patient)); patient = (Patient) enhancer.create(); assertThat(patient.getFirstName()).isNotNull(); Enhancer enhancer2 = new Enhancer(); enhancer2.setSuperclass(patient.getClass()); enhancer2.setCallback(new DefaultMethodInterceptor(patient)); patient = (Patient) enhancer2.create(); assertThat(patient.getFirstName()).isNotNull(); It fails on the last assert with net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null ... Caused by: java.lang.reflect.InvocationTargetException ... Caused by: java.lang.ClassFormatError: Duplicate method name&signature in class file my/package/entity/Patient$$EnhancerByCGLIB$$ca1e6685$$EnhancerByCGLIB$$f52743be I ask this because I want to enhance Hibernate's entities, but sometimes it returns already enhanced ones by itself and my second enhancement fails. How can I avoid this?

    Read the article

  • Functional equivalent of if (p(f(a), f(b)) a else b

    - by oxbow_lakes
    I'm guessing that there must be a better functional way of expressing the following: def foo(i: Any) : Int if (foo(a) < foo(b)) a else b So in this example f == foo and p == _ < _. There's bound to be some masterful cleverness in scalaz for this! I can see that using BooleanW I can write: p(f(a), f(b)).option(a).getOrElse(b) But I was sure that I would be able to write some code which only referred to a and b once. If this exists it must be on some combination of Function1W and something else but scalaz is a bit of a mystery to me! EDIT: I guess what I'm asking here is not "how do I write this?" but "What is the correct name and signature for such a function and does it have anything to do with FP stuff I do not yet understand like Kleisli, Comonad etc?"

    Read the article

  • Is the FoldLeft function available in R?

    - by JSmaga
    Hi, I would like to know if there is an implementation of the foldLeft function (and foldRight?) in R. The language is supposed to be "rather" functional oriented and hence I think there should be something like this, but I could not find it in the documentation. To me, foldLeft function applies on a list and has the following signature: foldLeft[B](z : B)(f : (B, A) => B) : B It is supposed to return the following result: f(... (f(f(z, a0), a1) ...), an) if the list is [a0, a1, ..., an]. (I use the definition of the Scala List API) Does anybody know if such a function exists in R?

    Read the article

  • Simple haskell splitlist

    - by js7354
    I have the following function which takes a list and returns two sublists split at a given element n. However, I only need to split it in half, with odd length lists having a larger first sublist splitlist :: [a] -> Int -> ([a],[a]) splitlist [] = ([],[]) splitlist l@(x : xs) n | n > 0 = (x : ys, zs) | otherwise = (l, []) where (ys,zs) = splitlist xs (n - 1) I know I need to change the signature to [a] - ([a],[a]), but where in the code should I put something like length(xs) so that I don't break recursion? Thank you.

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >