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
5
votes
3 answers

PHP Get all numerical/anonymous keys in an array

I have a multidimensional array, I am interested in getting all the elements (one level deep) that don't have named keys. i.e. Array { ['settings'] {...} ['something'] {...} [0] {...} // I want this one ['something_else'] {...} [1] {...}…
Dominic
  • 62,658
  • 20
  • 139
  • 163
5
votes
2 answers

foreach over anonymous types

using System; using System.Linq; using System.Text; using System.Net; using System.IO; namespace LearningJustCode { class Program { static void Main(string[] args) { Update(); } static void…
dannyrosalex
  • 1,794
  • 4
  • 16
  • 25
5
votes
4 answers

Anonymous SMTP Service

Does anyone know of a free, anonymous smtp service? I want to give users of my app the ability to occasionally send me an anon email without having to configure a server of enter their email account. I guess I could setup a gmail account for this…
James Cadd
  • 12,136
  • 30
  • 85
  • 134
4
votes
2 answers

Send anonymous emails C#

Hi I want to send password validation to my users using c#, and I wish to protect my mail box getting spammed. How do I do that? Been trying to this and it's not working: SmtpClient smtpClient = new SmtpClient("smtp.gmail.com",…
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
4
votes
2 answers

Access an Anonymous or Local Inner Class Within an Anonymous or Local Inner Class

Okay, so I know how to access the outer class that encloses an inner class, whether its anonymous or inner. But my question is, how to access the outer class if it itself is an inner class? Some code to help: public final class LocationPage extends…
9ee1
  • 1,078
  • 1
  • 10
  • 25
4
votes
1 answer

Problems with single anonymous access aspx in Sharepoint 2010

I got a SharePoint Project which already works with anonymous Access. Now I added an aspx-page which is used for streaming images. That aspx-page is added into a virtual directory Layouts\ Whenever I try to access that aspx-file Sharepoint does not…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
4
votes
4 answers

Anonymous class, Inheritance, and overriding

public class A { public A() { foo(); } private void foo() { System.out.print("A::foo "); goo(); } public void goo() { System.out.print("A::goo "); } } public class B extends A { public B()…
Numerator
  • 1,389
  • 3
  • 21
  • 40
4
votes
1 answer

Error defining an unnamed structure in c++

I'm having a problem with my code, even my professor has no idea why this is the case. He wants me to define the structure with using Persontype= struct{}; and not a normal definition of a structure. I don't understand why or what is the…
4
votes
2 answers

Syntax of anonymous type without explicit keys (`new { identifier }`)?

In this question I saw an anonymous type expression with an unfamiliar syntax: new { MyObjectID = g.Key, totalSum } At first I thought it (, totalSum }) was a syntax error as no key is specified, but it compiles and works in C#3.0. I have verified…
user166390
4
votes
2 answers

mysql data masking

Hi I'd like to a take a production database and use it in a private, development environment. But, I'd like to anonymize the data. I've been searching for an hour, but everything I find is for Oracle or SQL Server... nothing for mysql. I have…
Todd M
  • 1,012
  • 1
  • 15
  • 25
4
votes
2 answers

Not getting the user's name when anonymous linking with google account

I have two way method for signing-in, one is normal Google sign-in and other is Anonymous Sign-in. In my google sign-in there is no problem and everything works fine even the user's credentials are also coming great including name, email and…
Alok
  • 8,452
  • 13
  • 55
  • 93
4
votes
1 answer

Not able to assign fun to variable in a erlang module

I am playing around with example code from Programming with Erlang. I am struck with funs. help me understand whats going wrong with below code. -export([totalcost/1]). Costeach = fun(X) -> {W,Q} = X, shop:cost(W)*Q end. sum(H|T) -> H +…
Mahantesh
  • 79
  • 8
4
votes
1 answer

Map2 in elm with lambda

I would like to change this: add a b = a + b List.map2 add [1,2] [3,4] With something like this: List.map2 (\(a , b ) -> a + b) [1,2] [3,4] Possible?
Fi3
  • 429
  • 6
  • 17
4
votes
2 answers

Anonymous macros in Clojure

In Common LISP you can do the following (macro lambda (x) (list (quote car) (list (quote cdr) x))) It looks like this is not possible (an anonymous macro) in Clojure. Is this true? Why was this left out?
hawkeye
  • 34,745
  • 30
  • 150
  • 304
4
votes
1 answer

SPARQL anonymous variable name, for a variable whose value I don't care about

Does SPARQL have "don't care" variables? Let's say I want all items that have a end time, but I don't care what the end time actually is: ?item wdt:P582 ?iWillNeverNeedThisVariable. Is there a more elegant way to write this, by not naming this…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373