anonymous

Where to put constant strings in C++: static class members or anonymous namespaces

I need to define some constant strings that will be used only by one class. It looks like I have three options: Embed the strings directly into locations where they are used. Define them as private static constant members of the class: (Code formatting is buggy after enumerations.) //A.h class A { private: static const st...

Django anonymous user in model

I have a model defined as below: class Example(models.Model): user = models.ForeignKey(User, null=True) other = models.CharField(max_length=100) The problem is Django refuses to assign django.contrib.auth.models.AnonymousUser directly to Example.user as null field so everytime I have to check if request.user.is_authenticated()...

Problems with passing an anonymous temporary function-object to a templatized constructor.

I am trying to attach a function-object to be called on destruction of a templatized class. However, I can not seem to be able to pass the function-object as a temporary. The warning I get is (if the comment the line xi.data = 5;): warning C4930: 'X<T> xi2(writer (__cdecl *)(void))': prototyped function not called (was a variab...

Pass a function as parameter in jQuery?

Hello, I would like to pass to a jQuery function a regular function, instead of the usual anonymous function, but I'm not sure how such a thing could be done. Instead of this: function setVersion(feature) { $.post("some.php", { abc:"abc" }, function(data){ // do something here }, "json"); } I would like to...

Contribution claiming for anonymous contributors

Hi, I'm curious what would be an effective way to allow users to claim their anonymous contributions (done without registration or log-in) to a site that allows such contributions? What kind of info can I collect about anonymous contributors that will help identify them? IP is the only thing that comes to mind (but what if they log in f...

How do I restrict the creation of an anonymous subclass (Java)

Sorry the question wasn't properly stated by me earlier. I try to implent the Factory Pattern. A better example: It is an abstract class Human with a function create. Based on the arguments that is passed to create it decides whether to return an instance of its subclass Man or an instance of subclass Woman. So you call create with: Hum...

Is there a way to concact C# anonymous types?

For example var hello = new { Hello = "Hello" }; var world = new { World = "World" }; var helloWorld = hello + world; Console.WriteLine(helloWorld.ToString()); //outputs {Hello = Hello, World = World} Is there any way to make this work? ...

how to allow unamed user in svn authz file?

I have a subversion server running with apache. It authenticates users using LDAP in apache configuration and uses SVN authorizations to limit user access to certain repositories. This works perfectly. Apache DAV svn SVNParentPath /srv/svn SVNListParentPath Off SVNPathAuthz Off AuthType Basic AuthName "Subversion Repository" AuthBasicP...

Is it possible to submit an Infopath browser enabled form to a Sharepoint Form Library anonymously?

I have a question regarding submision of Infopath browser enabled forms. I have a a browser enabled form that needs to be opened and submitted by anonymous users. I followed this article: http://blog.metrostarsystems.com/2009/06/04/anonymously-submit-infopath-form-to-sharepoint-library/ but when I click the submit button i get an err...

Translate file access mode setup tasks from IIS 6 to IIS 7

I have an installer that installs and sets up an intranet web site 'ABC' under the Default Web Site. The ABC site directory is set up to have anonymous access enabled and Windows authentication disabled, so all the pages under the site inherit that access behavior. However, one page that lets users logon with Windows authentication has t...

Working with anonymous modules in Ruby

Suppose I make a module as follows: m = Module.new do class C end end Three questions: Other than a reference to m, is there a way I can access C and other things inside m? Can I give a name to the anonymous module after I've created it (just as if I'd typed "module ...")? How do I delete the anonymous module when I'm done with ...

C# delegate compiler optimisation

I have started to use anonymous delegates a lot in C# and I have begun to wonder how efficient the complier or runtime is in removing them from the code that is actually run and I haven't seen this detailed anywhere? Is it clever enough at all to inline them and collapse recursive uses that could be statically deduced? ...

Using Windows Integrated Auth & Anonymous after jakarta redirect on IIS7

I have an application we bought that I need to integrate, and it uses jakarta connection to get to the application from IIS. So, the basic operation is: user goes to the url Gets redirected to the application SSO is enabled, so redirected back to IIS for fetching of domain credentials Back to application If username is blank show lo...

.NET4: How to apply dynamic binding to anonymous delegates with returns?

class MyClass { public event Action<string> OnAction; public event Func<string, int> OnFunc; } class Program { static void Main(string[] args) { MyClass mc = new MyClass(); /// I need to handle arbitrary events. /// But I see no way to create anonymous delegates in runtime /// with arbitr...

Problematically pass a url to an anonymous proxy like http://www.trycatchme.com

hi, I'm using .net httpwebrequest &/or webclient class How can i Problematically pass a url to an anonymous proxy like http://www.trycatchme.com and get back a result <form method="post" action="/index.php"> <input id="address_bar" type="text" name="q" value="http://www." onfocus="this.select()" /> <input id="surf_button" type=...

Dynamic/Anonymous type, returning anonymous types!

this is not a question as i think its discussion, i know you cant return an anonymous type across methods, when i first used anonymous types i thought it would be really nice to be able to return it across methods and when .net 4 came out and with the edition of the dynamic types i thought there might be a hope in returning an anonymous ...

Use of anonymous function shows up as unknown type

When I attempt to use an anonymous function in PHP (As an available callback), there are no syntactical errors or the like but when I attempt to execute the callback, it errors out outputting that the function must be named. gettype returns a null value. Anyone have any experience with this? http://pastie.org/1088386 ...

How to create a custom front page redirect for anonymous user?

I have a web site at what-i.com that uses Drupal Commons profile. I have created a custom theme called 'whati' and placed it in /sites/all/themes folder. My page-front.tpl.php is supposed to drive my front page. It has an if-else statements for 2 scenarios: logged in and non-logged in users. For logged in users, everything works great:...

Enabling anonymous access in SharePoint 2010 not working

CENTRAL ADMIN I have created a web application using claims based authentication. I have allowed anonymous access on the default zone. Anonymous policy is set to none in central admin for the default zone. I have added no additional users in 'User Policy'. SITE COLLECTION LEVEL Site settings -> Site Permissions -> Anonymous Access ->...

How can I enable anonymous posting question and answer in OSQA?

Hi all, I am wondering about how to enable anonymous posting question and answer in OSQA website, like stackoverflow.com does. If the OSQA does not support this feature yet, can you please give me a short brief on how can I implement a such feature like that. Thanks and best regards. ...