Questions tagged [anonymous]

DO NOT USE! Please use a more specific tag such as [anonymous-function] or [anonymous-class].

The term anonymous has come to represent different aspects of development with the rise of the functional programming style and the use of anonymous on-demand applications.

In an effort to disambiguate this tag, it has been split into the following subcategories:

Category Description
Anonymous Classes An anonymous class is a local class without a name. An anonymous class is defined and instantiated in a single succinct expression using the new operator.
Anonymous Functions Anonymous functions use a block of code as a value, defining it as an inline function without a name.
Anonymous Methods An anonymous method is a procedure or function that does not have a name associated with it.
Anonymous Types Anonymous types are data types which dynamically add a set of properties into a single object without having to first explicitly define a type
Anonymous Users Anonymous users are individuals or systems that make use of a product or service, without formally registering account details and are instead associated with some token or identifier.

Former Tag Definition

For new questions, see [anonymous-class] and [anonymous-function].

Typically, a programming language construct like a function or class has a name associated with it -- a symbol that can be used to refer to the construct in some context. An anonymous function or class is one that, in contrast to normal practice, has no name. For example, in Java, you can create an anonymous class using a special syntax that defines a class and constructs an instance of it at the same time:

Runnable r = new Runnable() {
    public void run() {
        System.out.println("Running");
    }
};

The variable r holds a reference to an instance of a class which has no name in Java, but which implements the Runnable interface and can be used anywhere a Runnable instance is needed.

702 questions
-1
votes
2 answers

anonymous object, initialize object, static , final static , for improve performance?

In my android application I just want development tips, If i want to just set value/image only one time at onCreate(). 1 way) Which is best way, by initialize object. Or 2 way) using anonymous object. ((TextView)…
Bhavesh Jethani
  • 3,891
  • 4
  • 24
  • 42
-1
votes
2 answers

combine two field value in single field anonymous type linq

0I want to perform the linq select query for getting the anonymous type field which is a concatenation of two fields. (from c in ctx.Documents where c.FileName == doc.FileName select new { fileName = c.FileName + "" + c.UploadDate, value =…
Sachin Trivedi
  • 2,033
  • 4
  • 28
  • 57
-1
votes
3 answers

how to access function variable in anonymous function

I have a function as var emailExists = function (email) { mongoose.model('User', UserSchema). count({ email: email }, function (err, count) { if (err) console.log(err); return count;// how can i return this count …
Sami
  • 3,926
  • 1
  • 29
  • 42
-1
votes
1 answer

Using anon. namespace function in anon. namespace scope

I try do that: file.h namespace { void fun(); const bool nevermind = Register( fun ); } file.cpp namespace { void fun() { do_some_job(); } } Having linking error. Function void fun() is not found by linker. If I try do…
senfen
  • 877
  • 5
  • 21
-1
votes
1 answer

Return anonymous types from stored procedure

This question is just a duplicate of this question here: Returning anonymous types from stored procedure with LINQ2SQL But its been 4 years and no one has answered it, so I was hoping I could like..bump it up. I really need this answered, been…
UNOWN301
  • 29
  • 1
  • 2
-1
votes
2 answers

what's wrong with my Self-Executing Anonymous Function in javascript

I try to write a javascript Self-Executing Anonymous Function window.App = window.App || {} (function (global) { global.test = function () { console.log('test'); } })(App); $(function () { …
hh54188
  • 14,887
  • 32
  • 113
  • 184
-2
votes
3 answers

Instant Messaging feature for anonymous visitors to chat one on one with logged in users

My website is developed with PHP+MySQL. It allows users to login. I need to include an Instant Messaging feature to allow anonymous visitors to the site to chat one on one with users of the site who are logged in. Users must not be able to chat…
WhoMe
  • 94
  • 1
  • 1
  • 10
-2
votes
1 answer

What is the point of creating method reference from already exiting implementation of functional interface (like via anonymous class)?

interface Foo { T apply(T double1, T double2); } public class Test { static void calculate(Double double1, Double double2, Foo func) { double result = func.apply(double1, double2); System.out.println(result); …
Chandz
  • 21
  • 4
-2
votes
2 answers

How to Inner join two anonymous tables [SQL]

as the title states, Let's say i have three tables: person, autos, numbers. Created First table with: INNER JOIN of person and autos Second Table with: INNER JOIN of autos and numbers Question: Is it possible to INNER JOIN first and second table ?
Roman
  • 61
  • 6
-2
votes
2 answers

Persistence of sessions Symfony 3

I would like to "identify" anonymous user when they come on a website page to fill up a form. Indeed, for some stats, we need to know how many connections depending on how far the users are filling up the form. To identify those users I thought…
mlwacosmos
  • 4,391
  • 16
  • 66
  • 114
-2
votes
2 answers

How do you generate a function that warns about not enough arguments?

If you are dynamically generating functions with varying number of required arguments, how do you determine if the future number of supplied arguments to the function call are enough and/or how do you make sure your function warns for / about…
Bekim Bacaj
  • 5,707
  • 2
  • 24
  • 26
-2
votes
1 answer

How to add an ActionListener to an anonymous object?

How can i add ActionListeners to the MemoryFeld objects in the nested for-loop ? for(int i = 0; i < 4; i++){ for(int k = 0; k < 4; k++) grid.add(new MemoryFeld(teile[k][i])); } }
Snick
  • 1
-2
votes
1 answer

Declaring instance without variable name c++

After asking C++ Error linking in consumer file caused by static data field, I tried two different declarations for an instance of StateConservator: StateConservator cs(*pContainer, pDoc->GetConfiguration()); and StateConservator(*pContainer,…
sergiol
  • 4,122
  • 4
  • 47
  • 81
-2
votes
2 answers

Github : how to access public repository anonymously?

I'd like to download anonymously public repositories source code in my computer using java. So, I know how to download source code in repository using kohsuke-git-api. but, I didn't find how to access public repositories anonymously. (repositories…
Rect
  • 141
  • 5
  • 20
-2
votes
2 answers

C: Is an Anonymous Array Allocated on the Heap or Stack?

For example this code here: char *s = "Hello"; Where is "Hello" being stored? Is it stored the same in memory just anonymously?
SirIrk
  • 23
  • 1
1 2 3
46
47