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...
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()...
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...
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...
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...
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...
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?
...
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...
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...
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...
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 ...
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?
...
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...
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...
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=...
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 ...
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
...
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:...
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 ->...
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.
...