Search Results

Search found 1639 results on 66 pages for 'signature'.

Page 7/66 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Using Interfaces in an action signature of ASP.NET MVC controller

    - by Dmitry Borovsky
    Hello, I want to use interface in Action signature. So I've tried make own ModelBinder by deriving DefaultModelBinder: public class InterfaceBinder<T> : DefaultModelBinder where T: new() { protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return base.CreateModel(controllerContext, bindingContext, typeof(T)); } } public interface IFoo { string Data { get; set; } } public class Foo: IFoo /*other interfaces*/ { /* a lot of other methods and properties*/ public Bar Data{get;set;} string IFoo.Data { get{return Data.ToString()}; set{Data = new Bar(value)}; } } public class MegaController: Controller { public ActionResult Process([ModelBinder(typeof(InterfaceBinder<Foo>))]IFoo foo){/*bla-bla-bla*/} } But it doesn't work. Does anybody have idea how release this behaviour? And yes, I know that I can make my own implementation of IModelBinder, but I'm looking for easier way.

    Read the article

  • How created method with signature as List

    - by London
    Hi all, I'm very new to Java programming language so this is probably dumb question but I have to ask it because I can't figure it out on my own. Here is the deal. I want to create method which extracts certain object type from a list. So the method should receive List as argument, meaning list should contain either Object1 or Object2. I've tried like this : public Object1 extractObject(List<?>){ //some pseudo-code ... loop trough list and check if list item is instance of object one return that instance } The problem with declaring method with List<?> as method argument is that I receive compilation error from eclipse Syntax error on token ">", VariableDeclaratorId expected after this token. How do I set the method signature properly to accept object types either Object1 or Object2 ? Thank you

    Read the article

  • signature output operator overload

    - by coubeatczech
    hi, do you know, how to write signature of a function or method for operator<< for template class in C++? I want something like: template <class A class MyClass{ public: friend ostream & operator<<(ostream & os, MyClass<A mc); } ostream & operator<<(ostream & os, MyClass<A mc){ // some code return os; } But this just won't compile. Do anyone know, how to write it correctly?

    Read the article

  • Regex to match a Java method signature

    - by nitesh
    I am having this particular requirement where a method has to be identified by different regular expressions for different components. For example, there need to be a regex for return parameter, one for method name, one for argument type and one for argument name. I was able to come up with an expression till this step as follows - ([^,]+) ([^,]+)\((([^,]+) ([^,]+))\) It works well for a method signature like - ReturnType foo(Arg parameter) The regular expression identifies ReturnType, foo, Arg and parameter separately. Now the problem is that a method can have no/one/multiple arguments separated by commas. I am not able to get a repeating expression for this. Help will be appreciated.

    Read the article

  • Groovy: Dynamically addings methods with a specific signature.

    - by Reverend Gonzo
    So, I need to dynamically create (or inject) methods into an object that have a specific return type and method signature, because a Java tool we're using will be finding this methods via Reflection and checks for void type. Method names will be determined at runtime. Using metaClass. = { ... } however adds a closure which doesn't show up as a regular method (even if it can be used as one) and also has a return type. I can't modify the method finding code, and it it not Groovy-aware. I can't use methodMissing() or invokeMethod() because the method needs to actually exist. If I could overload class.getMethods() I think it would be possible, but I can't figure out how. Is there any way to do this in Groovy?

    Read the article

  • An unusual type signature

    - by Travis Brown
    In Monads for natural language semantics, Chung-Chieh Shan shows how monads can be used to give a nicely uniform restatement of the standard accounts of some different kinds of natural language phenomena (interrogatives, focus, intensionality, and quantification). He defines two composition operations, A_M and A'_M, that are useful for this purpose. The first is simply ap. In the powerset monad ap is non-deterministic function application, which is useful for handling the semantics of interrogatives; in the reader monad it corresponds to the usual analysis of extensional composition; etc. This makes sense. The secondary composition operation, however, has a type signature that just looks bizarre to me: (<?>) :: (Monad m) => m (m a -> b) -> m a -> m b (Shan calls it A'_M, but I'll call it <?> here.) The definition is what you'd expect from the types; it corresponds pretty closely to ap: g <?> x = g >>= \h -> return $ h x I think I can understand how this does what it's supposed to in the context of the paper (handle question-taking verbs for interrogatives, serve as intensional composition, etc.). What it does isn't terribly complicated, but it's a bit odd to see it play such a central role here, since it's not an idiom I've seen in Haskell before. Nothing useful comes up on Hoogle for either m (m a -> b) -> m a -> m b or m (a -> b) -> a -> m b. Does this look familiar to anyone from other contexts? Have you ever written this function?

    Read the article

  • Vista Startup Repair cannot repair my Toshiba Laptop (L300D)

    - by tdot
    I installed some updates, and now the computer doesn't boot up, it just keep's telling me to go to repair, which doesn't fix the problem. I see the BSOD on startup, but it flashes by too quick. (I also don't have Vista on DVD to do a reinstall if I need to) This is what I get from the Startup Repair details Problem Event Name StartupRepair V2 Problem Signature 01: External Media Problem Signature 02: 6.0.6001.18000.6.0.6001.18000 Problem Signature 03: 2 Problem Signature 04: 131074 Problem Signature 05: BadDriver Problem Signature 06: NoBootFailure Problem Signature 07: 0 Problem Signature 08: 0 Problem Signature 09: unknown Problem Signature 10: 1168 OS Version: 6.0.6001.2.1.0.256.1 Local ID: 1033 Any help will be appreciated. Thanks.

    Read the article

  • Hyper-V Manager: right-clicking on remote VM crashes MMC snap-in

    - by Greg Bray
    I have a Windows Server 2008 R2 Enterprise SP1 machine that I log into and use to manage virtual machines running on multiple Hyper-V servers on our domain. Sometimes, when I right-click on a remote VM, the Hyper-V Manager will crash and display the following error message: If I use the Actions menu on the lower right, it works just fine, but for some reason right-clicking causes MMC to stop working. Is there any way to fix this issue? Here are the full details of the error message. Description: Stopped working Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: mmc.exe Problem Signature 02: 6.1.7600.16385 Problem Signature 03: 4a5bc808 Problem Signature 04: Microsoft.Virtualization.Client Problem Signature 05: 6.1.0.0 Problem Signature 06: 4ce7c9e3 Problem Signature 07: 342 Problem Signature 08: 1f Problem Signature 09: System.OverflowException OS Version: 6.1.7601.2.1.0.274.10 Locale ID: 1033 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt

    Read the article

  • Hyper-V Manager right clicking on remote VM causes MMC error

    - by Greg Bray
    I have a Windows 2008 R2 Enterprise Server with SP1 that I log into and use to manage virtual machines running on multiple HyperV servers on our domain. Sometimes when I right click on a remote VM the HyperV Manager will crash and display the following error message: If I use the Actions menu on the lower right it works just fine, but for some reason right clicking cause MMC to stop working. Is there any way to fix this issue? Here are the full details of the error message. Description: Stopped working Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: mmc.exe Problem Signature 02: 6.1.7600.16385 Problem Signature 03: 4a5bc808 Problem Signature 04: Microsoft.Virtualization.Client Problem Signature 05: 6.1.0.0 Problem Signature 06: 4ce7c9e3 Problem Signature 07: 342 Problem Signature 08: 1f Problem Signature 09: System.OverflowException OS Version: 6.1.7601.2.1.0.274.10 Locale ID: 1033 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt

    Read the article

  • Digitally Sign Parts of a XML document

    - by Eros
    I have an XML document having structure similar to the following <envelop> <header>blaa</header> <message>blaa blaa</message> <footer></footer> </envelop> I want to digitally sign the header and message elements and add the signature to the footer element. How can I sign the elements and then later verify the signature (using .net c#) ?

    Read the article

  • Delegates and ParamArray - Workaround Suggestions?

    - by M.A. Hanin
    Some predefined methods contain a ParamArray in their signature. Delegates, however, cannot contain a ParamArray in their signature. Main question: Assume you wish to create a delegation mechanism for a specific method which requires a ParamArray. How would you work around this constraint? "Bonus" question: Assume you wish to create a generalized delegation mechanism for all methods which require ParamArray, how would you do that?

    Read the article

  • Facebook Invalid OAuth access token signature trying to post an attachment to group wall from PHP

    - by Volodymyr B
    I am an administrator (manager role) of a Facebook Group. I created an app, and stored its id and secret. I want my app to be able to post something on the Facebook group's feed. But when I attempt to post, I get the error 190 Invalid OAuth access token signature, even though I able to successfully obtain the access_token with publish_stream and offline_access scopes. It has the form of NNNNNNNNNNNNNNN|XXXXXXXXXXXXXXXXXXXXXXXXXXX, where N is a number (15) and X is a letter or a number (27). What should I do more to get this accomplished? Here is the code I am using: public static function postToFB($message, $image, $link) { //Get App Token $token = self::getFacebookToken(); // Create FB Object Instance $facebook = new Facebook(array( 'appId' => self::fb_appid, 'secret' => self::fb_secret, 'cookie' => true )); //$token = $facebook->getAccessToken(); //Try to Publish on wall or catch the Facebook exception try { $attachment = array('access_token' => $token, 'message' => $message, 'picture' => $image, 'link' => $link, //'name' => '', //'caption' => '', 'description' => 'More...', //'actions' => array(array('name' => 'Action Text', 'link' => 'http://apps.facebook.com/xxxxxx/')) ); $result = $facebook->api('/'.self::fb_groupid.'/feed/', 'post', $attachment); } catch (FacebookApiException $e) { //If the post is not published, print error details echo '<pre>'; print_r($e); echo '</pre>'; } } Code which returns the token //Function to Get Access Token public static function getFacebookToken($appid = self::fb_appid, $appsecret = self::fb_secret) { $args = array( 'grant_type' => 'client_credentials', 'client_id' => $appid, 'client_secret' => $appsecret, 'redirect_uri' => 'https://www.facebook.com/connect/login_success.html', 'scope' => 'publish_stream,offline_access' ); $ch = curl_init(); $url = 'https://graph.facebook.com/oauth/access_token'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); try { $data = curl_exec($ch); } catch (Exception $exc) { error_log($exc->getMessage()); } return json_encode($data); } If I uncomment $token = $facebook->getAccessToken(); in the posting code, it gives me yet another error (#200) The user hasn't authorized the application to perform this action. The token I get using developers.facebook.com/tools/explorer/ is of another form, much longer and with it I am able to post to the group page feed. How do I do it without copy/paste from Graph API Explorer and how do I post as a group instead of posting as a user? Thanks.

    Read the article

  • Digitally sign MS Office (Word, Excel, etc..) and PDF files on the server

    - by Sébastien Nussbaumer
    I need to digitally sign MS Office and PDF files that are stored on a server. I really mean a digital signature that is integrated in the document, according to each specific file formats. This is the process I had in mind : Create a hash of the file's content Send the hash to a custom written java applet in the browser The user encrypts the hash with his/her private key (on an usb token via PKCS#11 for example), thus effectively signing the file. The applet then sends the signature to the server On the server I would then incorporate the signature in the file's (MS Office and PDF files can do that without changing the file's content, probably by just setting some metadata field) What is cool is that you never have to download and upload the complete file to the server again. What is even cooler, the customer doesn't need Office or PDF Writer to sign the files. Parts 2, 3 and 4 are OK for me, my company bought all the JAVA technology I need for that for a previous project I worked on. Problem : I can't seem to find any documentation/examples to do parts 1 and 5 for Office files . Are my google skills failing me this time ? Do you have any pointers to documentation or examples for doing that for MS Office files ? The underlying technology isn't that important to me : I can use Java, .Net, COM, any working technology is OK ! Note : I'm 95% sure I can nail points 1 and 5 for PDF files using iText Thanks ** Edit : If I can't do that with hashes and must download the complete file to the client, it's also possible. But then I still need the documentation to be able to sign Office file... in java this time (from an applet)

    Read the article

  • Visual Studio 2012 crashes everytime I try to debug with error CLR20r3

    - by Chris
    Everytime I try to debug one of my apps I get the below error message. Anyone have any ideas? I tried running Visual Studio in safe mode but I get the same thing. I also tried to repair the install and completely reinstall it with no luck :(. The full Problem Signature is this: Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: devenv.exe Problem Signature 02: 11.0.50727.1 Problem Signature 03: 5011ecaa Problem Signature 04: Microsoft.IntelliTrace.Package.11.0.0 Problem Signature 05: 11.0.50727.1 Problem Signature 06: 5011dad8 Problem Signature 07: 311 Problem Signature 08: 1f1 Problem Signature 09: System.AccessViolationException OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    Read the article

  • Visual C# Express 2010 Beta 2 install fails [closed]

    - by RCIX
    I'm trying to install Microsoft Visual C# Express 2010 Beta 2 on my machine but it's not working. It blazes through what should be a 150 MB download then fails installing the very first item after about 5 seconds. I had VS 2010 Beta 1 installed but removed it beforehand. Any tips for installing it right? The problem signature is as follows: Problem signature: Problem Event Name: VSSetup Problem Signature 01: Microsoft Visual C# 2010 Express Beta 2 - ENU Problem Signature 02: 10.0.21006.01 Problem Signature 03: 10.0.21006.1 Problem Signature 04: 1 Problem Signature 05: GFN_MID Chained VC 90 Runtime for x86 Problem Signature 06: Repair_I_Interactive_Error Problem Signature 07: 0x0 Problem Signature 08: unknown Problem Signature 09: unknown OS Version: 6.1.7600.2.0.0.256.1 Locale ID: 1033

    Read the article

  • Get timestamp from Authenticode Signed files in .NET

    - by SlavaGu
    We need to verify that binary files are signed properly with digital signature (Authenticode). This can be achieved with signtool.exe pretty easily. However, we need an automatic way that also verifies signer name and timestamp. This is doable in native C++ with CryptQueryObject() API as shown in this wonderful sample: How To Get Information from Authenticode Signed Executables However we live in a managed world :) hence looking for C# solution to the same problem. Straight approach would be to pInvoke Crypt32.dll and all is done. But there is similar managed API in System.Security.Cryptography.X509Certificates Namespace. X509Certificate2 Class seems to provide some information but no timestamp. Now we came to the original question how can we get that timestamp of a digital signature in C Sharp?

    Read the article

  • Mathematical attack on the Digital Signature Algorithm

    - by drelihan
    Does anybody know the mathematics behind an attack on DSA where modulus p has p-1 made up of only small factors. In reality, this would not happen as the key generator would guarantee that this is not so. There is much information on the web on generating good input paramters for DSA so that it is hard to crack but no information on how you find X if modulus p has p-1 made up of only small factors.

    Read the article

  • abstract method signature, inheritance, and "Do" naming convention

    - by T. Webster
    I'm learning about design patterns and in examples of code I've seen a convention where the abstract class declares a method, for example: public abstract class ServiceBase { ... public virtual object GetSomething(); and then protected abstract object DoGetSomething(); My question is on why these two methods exist, since they appear to serve the same purpose. Is this so that the base class GetSomething() method logic cannot be overridden by inherited classes? But then again, the method is marked virtual, so it can be overridden anyway. What is the usefulness here in requiring derived class implementers to implement the abstract method when the virtual method can be called anyway?

    Read the article

  • Class inheriting from several Interfaces having same method signature

    - by Manish
    Say, I have three interfaces: public interface I1 { void XYZ(); } public interface I2 { void XYZ(); } public interface I3 { void XYZ(); } A class inheriting from these three interfaces: class ABC: I1,I2, I3 { // method definitions } Questions: If I implement like this: class ABC: I1,I2, I3 { public void XYZ() { MessageBox.Show("WOW"); } } It compiles well and runs well too! Does it mean this single method implementation is sufficient for inheriting all the three Interfaces? How can I implement the method of all the three interfaces and CALL THEM? I know it can done using explicit implementation but I'm not able to call them. :(

    Read the article

  • Canonicalizing XML in Ruby

    - by whazzmaster
    I'm working on a SAML gateway using Ruby/Rails and I'm attempting to write some code that validates the xml digital signature of the incoming SAML response against the x509 cert of the originating service. My problem: the signature depends on a canonicalized version of the XML that is hashed and then signed and I'm having trouble finding a ruby lib/gem that will canonicalize XML per the spec. I found a super old gem on rubyforge that is a mess but I'd be more interested if something like nokogiri supported this kind of functionality (from the nokogiri docs, it doesn't). I've googled extensively but thought I'd ask around here to see if anyone has any good insights before I go and try to write my own version or rework the existing c14n-r library.

    Read the article

  • Find strong name signature without calling LoadAssembly

    - by Todd Kobus
    When reading a Windows PE file directly, I can't seem to find the strong name of a delay signed assembly. I can get to the CLR Header and read all the CLR header entries including the flags and the StrongNameSignature field. Unfortunately in a delay signed assembly the StrongNameSignature is zeroed out. Is the information in the MetaData directory specified within the CLR header? If so does anyone have an example of how to read this table? I am not interested in calling SN.exe or loading the assembly.

    Read the article

  • The applications digital signature cannot be verfied , do you want to run the application

    - by Kamal
    Hi Every one , I have a Key Store and from the Key store i get the Certificate , and i sign the applet jar with the certificate that got . I am also importing my certificate to the "Trusted Certificates " , It says import sucess full but the certificate is not shown in the Trusted certificates. On running the applet (html applet) , i am getting the certificate , but that certificate could not be verified . Please any one help me with inputs .!!

    Read the article

  • Line for signature in markdown

    - by JBarberU
    I'm writing a document using markdown, which I'm exporting to a PDF using pandoc. At the end of the document I need to have space for signatures on a printed copy of the PDF. I've tried to find how to draw a line with a fixed width, but so far I only got to escaping the underscore character, which doesn't feel quite right. It's as if I'm missing something, this couldn't possibly be that unusual to want to do. Any help or pointers are greatly appreciated.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >