Search Results

Search found 1620 results on 65 pages for 'anonymous cow'.

Page 36/65 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • GWT - Reusing Callback Class

    - by moorsu
    My custom callback class implements AsyncCallback (like MyAsyncCallback implements AsyncCallback) and planning use single instance of MyAsyncCallback for multiple rpc method executions. Is this approach safe?. Or should have to create new instance of MyAsyncCallback for every interaction from browser to server?. I am kind of tired of seeing so many anonymous AsyncCallback code blocks. Thanks for your input

    Read the article

  • How to make a private property?

    - by mystify
    I tried to make a private property in my *.m file: @interface MyClass (Private) @property (nonatomic, retain) NSMutableArray *stuff; @end @implementation MyClass @synthesize stuff; // not ok Compiler claims that there's no stuff property declared. But there's a stuff. Just in an anonymous category. Let me guess: Impossible. Other solutions?

    Read the article

  • "Directly accessing" return values without referencing

    - by undocumented feature
    Look at this ruby example: puts ["Dog","Cat","Gates"].1 This will output Cat as ruby allows me to directly access the "anonymous" array created. If I try this in PHP, however: echo array("Dog","Cat,"Gates")[1] This won't work. What is this called, not only concerning arrays but all functions? Where else is it possible? Feel free to change the question title when you know how this "feature" is called.

    Read the article

  • Store request.headers in a serialized model attribute

    - by Horace Loeb
    Here's my model: class Comment < ActiveRecord::Base serialize :request_headers end But when I try to do @comment.request_headers = request.headers I get a TypeError (can't dump anonymous class Class) exception. Another way to ask my question: how can I convert request.headers into a Hash? It uses a Hash under the covers so this should be easy, no?

    Read the article

  • What's the deal with reftype { } ?

    - by friedo
    I recently saw some code that reminded me to ask this question. Lately, I've been seeing a lot of this: use Scalar::Util 'reftype'; if ( reftype $some_ref eq reftype { } ) { ... } What is the purpose of calling reftype on an anonymous hashref? Why not just say eq 'HASH' ?

    Read the article

  • Updating an atom with a single value

    - by mikera
    I have a number of atoms in my code where a common requirement is to update them to a new value, regardless of the current value. I therefore find myself writing something like this: (swap! atom-name (fn [_] (identity new-value))) This works but seems pretty ugly and presumably incurs a performance penalty for constructing the anonymous closure. Is there a better way?

    Read the article

  • How do I change the auto complete behavior in the VS 2010 editor?

    - by pinkmuppet
    How do I stop VS 2010 (RC) from autocompleting html helpers with new object { ... } when I just want to pass in an anonymous type? Backspacing is driving me crazy. e.g., VS wants: <%=Html.ActionLink("Register", "Register", new object { controller = "Account" }) %> I know the helper is declared expecting object, which is why it does this, but can I change this behavior just for mvc helpers?

    Read the article

  • how to specify literal value in linq union

    - by lowlyintern
    I have the following SQL query, note I want the literal value '0' in the second field in the second SELECT statement from the ItemSale table. How do I express this in LINQ? I get the error message 'Invalid anonymous type member declarator'. SELECT BranchNumber,QuantitySold FROM Department UNION SELECT BranchNumber,0 FROM ItemSale How to express the '0' in LINQ? var unionQuery = (from dept in Department select new { dept.BranchNumber, dept.QuantitySold, }) .Concat(from item in ItemSale select new { item.BranchNumber, 0 });

    Read the article

  • How to avoid nested functions when using AJAX?

    - by Fletcher Moore
    Sequential Asynchronous calls are gross. Is there a more readable solution? The problem is this is hard to follow: ajaxOne(function() { // do something ajaxTwo(function() { // do something ajaxThree() }); }); where the anonymous functions are callbacks that are called on server response. I'm using a third party API to make the AJAX calls, so I need a generic solution.

    Read the article

  • How do I "DoEvents" in WPF?

    - by SLC
    I've read that the C# version is as follows: Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, new Action(delegate { })); However I cannot figure out how to put the empty delegate into VB.NET, as VB.NET does not appear to support anonymous methods. Ideas? Edit: Possibly this? Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, New Action(Sub() End Sub))

    Read the article

  • What´s the easiest way for a user authentication in SharePoint 2010

    - by user312084
    Hi, does anybody have a manuel that describes the steps to create an anonymous user authentication in SharePoint 2010 (Website for the internet with no authentication). For editing an admin has to log in with forms authentication. Can I hold the admin somewhere in the web.config with membership provider ? Or do I need to install SQL Server somewhere for that task ? Thanx a lot. Stephan

    Read the article

  • How can I serve up color-coded Java code using PHP?

    - by Eric
    I'd like to embed code from my SVN repository into my website, using PHP. The SVN has public anonymous access, so the PHP code should be fine reading it. The code on said SVN is java, and so far I've had no luck finding a syntax-highlighter to make the code more readable. Ideally I'd like one that uses CSS classes so that I can change the colors to match the look of the website. Could someone point me to a PHP library that highlights Java code?

    Read the article

  • Method-Object pairs in Java

    - by John Manak
    I'd like to create a list of method-object pairs. Each method is a function returning a boolean. Then: foreach(pair) { if method evaluates to true { do something with the object } } One way of modelling this that I can think of is to have a class Constraint with a method isValid() and for each constraint produce an anonymous class (overriding the isValid() method). I feel like there could be a nicer way. Can you think of any?

    Read the article

  • Extending a Java Swing class in Clojure

    - by mikera
    I'm trying to extend a Java Swing component in Clojure, i.e. I want to extend a javax.swing.JComponent and add some custom methods implemented in pure Clojure in addition to all the standard inherited methods. I've tried using "proxy" which works great if I just want a single instance (in the same way as an anonymous inner class). However I'd really like a named class so that I can generate an arbitrary number of instances. What's the recommended way of doing this?

    Read the article

  • how to run if(!User.IsAuthenticated) or access Profile.values in App_Code? c# .NET

    - by korben
    i'm trying to run a conditional statement in a class i'm placing in my App_Code folder the condition is whether the person is logged in or not. I normally have two ways to do this in my masterpage and ASPX's if (!User.IsAuthenticated) or if(Profile.username = "anonymous") however neither of these things seem available to me in the .cs i'm making. anyone know what i'm missing? maybe a using namespace up top?

    Read the article

  • How to make an private property?

    - by mystify
    I tried to make a private property in my *.m file: @interface MyClass (Private) @property (nonatomic, retain) NSMutableArray *stuff; @end @implementation MyClass @synthesize stuff; // not ok Compiler claims that there's no stuff property declared. But there's a stuff. Just in an anonymous category. Let me guess: Impossible. Other solutions?

    Read the article

  • Creating temporary user accounts - Django

    - by RadiantHex
    Hi folks, I need to setup temporary User models for each visitors, where the visitors are obviously tied by session data. I might not be aware of it, but does Django support attaching data to Anonymous users? The only way, I am currently aware of, is to use the session dictionary part of the request object. Help would be very much appreciated!

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >