|
| |
| | Singleton - Wikipedia, the free encyclopedia |
 | | In computer programming, a singleton is a common design pattern. |  | | In variable-width encoding schemes for computer character sets, a singleton is a character encoded with one unit, as opposed to characters encoded with multiple-unit sequences. |  | | A singleton is also a variable that is only used once in a program, usually indicating a programming mistake. |
|
http://en.wikipedia.org/wiki/Singleton
(409 words)
|
|
| |
| | Exploring the Singleton Design Pattern (Building Distributed Applications) |
 | | In most cases, it is very easy to develop a singleton without a parent class, and adding sub-classing functionality adds a new level of complexity that is generally not needed anyway. |  | | If the member variable is null, then the execution enters a critical section block where the member variable is double checked again. |  | | In each preceding code example, the original implementation for a singleton has undergone changes over time to address issues that have been discovered with each new implementation of the pattern. |
|
http://msdn.microsoft.com/library/en-us/dnbda/html/singletondespatt.asp?...
(2839 words)
|
|
| |
| | Being Scott Densmore : Why Singletons are Evil |
 | | I agree singletons are the source of many problems that start in design and end in debugging. |  | | The main two problems I have with it are that it directly couples code to the singleton object, and it does it in a hidden way. |  | | Since singletons, statics, and SOAs are all direct dependencies, without the benefit of an interface on top of them, I always try to interpose a shim class over them. |
|
http://blogs.msdn.com/scottdensmore/archive/2004/05/25/140827.aspx
(2331 words)
|
|
| |
| | Programming: Singleton vs. global variable |
 | | As far as I understand the difference of the singleton and my approach is that if you use a singleton you are not able to create multiple instances (hence the name of the pattern?). |  | | The underlying point of common design principles (globals are bad, classes are good, singletons are good, goto's are bad etc. etc.) is often to get programmers to design code that is as easy as possible to maintain, both in the long run, and by completely different people. |  | | For a singleton pattern, the program usually calls a "getInstance" class method in the singleton class itself to get a reference to the one instance of it. |
|
http://www.experts-exchange.com/Programming/Q_21304716.html
(1781 words)
|
|
| |
| | [No title] |
 | | Using a Singleton [GOF] would provide an easy way for software deep in the system to access the information via a well-known global object, but the information to be accessed is unique to each user thus a normal singleton cannot be used. |  | | The Virtual Singleton is a global variable which holds an object which acts as a gateway to per-session information about the current user which is stored in a dictionary indexed by the current session, process or thread. |  | | It would have a class variable which points to the “current” instance which might be of the same class (approach 2) or an interface-compatible class (approach 1). |
|
http://jerry.cs.uiuc.edu/~plop/plop98/final_submissions/P64.doc
(2587 words)
|
|
| |
| | Singleton variable - Wikipedia, the free encyclopedia |
 | | A singleton variable, in computer programming, is variable that is referred to only once in a piece of code, probably because of a programming mistake. |  | | This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL. |  | | To be useful, a variable must be set and read from, in that order. |
|
http://en.wikipedia.org/wiki/Singleton_variable
(163 words)
|
|
| |
| | :: View topic - Singleton variable checking - code |
 | | Without singleton variable checks this error would (assuming "OtherParam" was not an asserted fact or clause of arity 0) cause the clause to fail, and if it were part of a large program, it could potentially take a long time to track down the source of the error. |  | | I can't change the way (re)consult works, however the following code can be used to perform singleton variable checking over your prolog files. |  | | The code simply performs a syntactic check of a prolog program looking for "singleton" variables - variables that appear only once in any given clause. |
|
http://forum.amzi.com/viewtopic.php?p=358
(1033 words)
|
|
| |
| | Global Variables in Java with the Singleton Pattern |
 | | Class variables are initialized when the class is first loaded and since there is no static initializer attached, _instance will have an initial value of null. |  | | The class variable _instance is also declared private so that it cannot be accessed or modified by anything other than the Singleton class. |  | | The Singleton class can be used to aggregate any number of objects. |
|
http://www.developer.com/net/cplus/print.php/626151
(1415 words)
|
|
| |
| | [No title] |
 | | Imputation techniques were used for some of the variables where lack of data was problematic for the purpose of estimating models of the license allocation process. |  | | These data generally support the theory that greater minority and female participation occurs when the stations are most valuable and where the presence of minorities and females can bolster the probability of winning a license. |  | | Statistical significance is indicated in the table by 1, 2 or 3 asterisks ‘*’ depending upon whether significance is evident at the 1%, 5% or 10% confidence level. |
|
http://www.fcc.gov/opportunity/meb_study/broadcast_lic_study_pt3.txt
(12874 words)
|
|
| |
| | Concurrency Abstracts |
 | | Flat iteration is a variation on the original binary version of the Kleene star operation P*Q, obtained by restricting the first argument to be a sum of atomic actions. |  | | Prefix iteration is a variation on the original binary version of the Kleene star operation P*Q, obtained by restricting the first argument to be an atomic action. |  | | We fit various basic phenomena of computation, and of behavior in general, to the phase space perspective. |
|
http://boole.stanford.edu/abstracts.html
(9620 words)
|
|
| |
| | Simply Singleton |
 | | The singleton implemented in Example 1 is easy to understand. |  | | Singletons maintain a static reference to the sole singleton instance and return a reference to that instance from a static |  | | The other solution is to put your singleton class in an explicit package, so classes in other packages (including the default package) cannot instantiate singleton instances. |
|
http://www.javaworld.com/javaworld/jw-04-2003/jw-0425-designpatterns.html
(901 words)
|
|
| |
| | Creating a real singleton class in Delphi 5 |
 | | This pointer is usually stored in a variable while the object is in use. |  | | A singleton is a class that supports the creation of just one object. |  | | If you intend to use a singleton in a multithreaded program, treat the object as you would any variable you share between threads. |
|
http://community.borland.com/article/0,1410,22576,00.html
(1430 words)
|
|
| |
| | epowiki: Singleton Pattern |
 | | By using a singleton when you get a pointer to an object you know the object is valid and ready for use. |  | | The double check * singleton algorithm is used. |  | | This wrapper * can be autogenerated so is not made part of the object. |
|
http://www.possibility.com/epowiki/Wiki.jsp?page=SingletonPattern
(667 words)
|
|
| |
| | design:singleton_pattern [phpPatterns] |
 | | The singleton pattern applies to the situation where you need a single, global instance of a class. |  | | The easiest way to understand a singleton pattern is by example. |  | | But first we have to overcome a small problem in PHP - the lack of static class variables (something that’s coming in the Zend 2 engine. |
|
http://www.phppatterns.com/docs/design/singleton_pattern
(573 words)
|
|
| |
| | Implementing the Singleton Pattern in C# |
 | | Implementing the Singleton Pattern in C# Implementing the Singleton Pattern in C# The singleton pattern is one of the best-known patterns in software engineering. |  | | There are various different ways of implementing the singleton pattern in C#. |  | | as some versions of this implementation do, I lock on the value of a static variable which is private to the class. |
|
http://www.yoda.arachsys.com/csharp/singleton.html
(1768 words)
|
|
| |
| | GameDev.net - A Singleton Texture Manager for OpenGL |
 | | This is all because the class is still a Singleton, and to be such, all of the data must be stored in one place: the Singleton pointer. |  | | We simply cannot create an instance of this class as a member variable for one of the main systems of our game and hope we put it in a place where it will have the most effectiveness. |  | | By keeping a pointer itself as a static variable, the Singleton object isn't 're-created' with every instance of the class. |
|
http://www.gamedev.net/reference/articles/article1439.asp
(995 words)
|
|
| |
| | [No title] |
 | | ;;; ;;; But if the ellipsis node is matched against an empty list, then we have to ;;; grovel the subpattern to figure out how many pattern variables there are ;;; because there are no sub-expressions to match against the sub-pattern. |  | | Returns T and a list of the parts ;;; that correspond to the pattern variables if it matches, or NIL and NIL if ;;; not. |  | | ) (bind ((?var (first x)) (?def (third x))) (iterate repeat ((depth (second x))) (if (zerop depth) (expression (or ?var ?def)) (bind ((?guts (repeat (1- depth)))) (expression (map (method (?var) ?guts) ?var)))))) x)) variables))) (expression (bind ((matches bindings (match-pattern ?pattern ?temp #f))) (when matches (bind ((result (apply (method (?vars...) (bind ((?vars... |
|
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/clisp/hackers/wlott/dylan/dynenv/expr.dylan
(1479 words)
|
|
| |
| | Prolog tutorial 2 |
 | | This is a little bit like declaring a variable in a C function and never using it - it's not strictly wrong, but it might indicate an error. |  | | Lastly, to get some more practice with writing knowledge bases we look at the family tree example (one of the "standard" Prolog examples). |  | | This week we just want to get some more practice with writing and querying knowledge bases, and look a little closer at how Prolog works. |
|
http://www.compapp.dcu.ie/~alex/LOGIC/tut2.html
(630 words)
|
|
| |
| | Static member variable - Singleton Pattern required? |
 | | In other words - Is the code below OK, or: Should I just put a test in getDataSource() to see if dataSource == null, and if so initialise it. |  | | Re: Static member variable - Singleton Pattern required? |
|
http://www.talkaboutprogramming.com/group/comp.lang.java.programmer/messages/685743.html
(208 words)
|
|
| |
| | resin-interest: Re: Singleton Class in Resin |
 | | In reply to: David Forslund: "Re: Singleton Class in Resin" |  | | Reply: David Forslund: "Re: Singleton Class in Resin" |
|
http://www.caucho.com/support/resin-interest/0107/0405.html
(215 words)
|
|
| |
| | Re: Class variable and singleton problem |
 | | You can find an example on why this probably a good idea in test.rb located in the sample directory of Ruby's source tree - grep for "Titans" - (just image the morass of extra rules you would need to define to resolve this example if you start of with a simple ``intuitive'' lookup rule). |  | | > All I see at the moment is that the rule introduces a (to me) > unintuitive special case for singleton methods: in Mark's > example, o is effectively a subclass of A, so it seems > strange it can't directly access its class vars. |  | | > (See the ongoing ruby-talk discussion about objects with > singleton methods still being examples of their 'original' class..) > > Thanks again for taking the time to explain. |
|
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/1672
(308 words)
|
|
| |
| | Is it possible to reuse the Singleton instance variable and getInstance method in subclasses |
 | | This would be an example of the state pattern, where the state is either "the user has selected to draw Rectangles" or "the user has selected to draw Ovals" and those two states are implemented as Singletons. |  | | Anyway, below is a code example of what I would like to be able to do. |  | | Is it possible to reuse the Singleton instance variable and getInstance method in subclasses |
|
http://www.codecomments.com/message509453.html
(186 words)
|
|
| |
| | Java Expert Solutions |
 | | Until recently, he worked for Second Nature Interactive, a software development company, where he served as a Senior Game Writer. |  | | Krishna Sankar has been a computer professional since 1980. |  | | He also works as a freelance game writer, authoring materials for various roleplaying games. |
|
http://www.webbasedprogramming.com/Java-Expert-Solutions
(2565 words)
|
|
| |
| | [No title] |
 | | For effeciency, pick off the case where the two // classes are == and we cache the result of the last lookup. |  | | )); *************** *** 54,61 **** // // First scan across the types using merge-type to build up the members // and singletons list. |  | | rcs-header: $Header: /users/rgs/hackers/ccomp2/runtime/print/RCS/print.dylan,v 1.10 1996/02/21 02:39:22 wlott Exp $ //====================================================================== // *************** *** 962,969 **** let singletons = type.union-singletons; local method print-singletons (stream :: |
|
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/gwydion-14/rgs/src/tmp4.diffs
(7902 words)
|
|
| |
| | Re: Class variable and singleton problem |
 | | In this example, look up for @@x in meth starts from C (nearest class), then A. The reason is to make scope resolution as static as possible. |  | | Hi, In message "Re: Class variable and singleton problem" on 03/11/11, george.marrows@ps.ge.com writes: |  | | thought that class variable look up followed the inheritance hierarchy, not |
|
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/1667
(91 words)
|
|
| |
| | singleton variable - OneLook Dictionary Search |
 | | singleton variable : Free On-line Dictionary of Computing [home, info] |  | | singleton variable : FOLDOP - Free On Line Dictionary Of Philosophy [home, info] |  | | Tip: Click on the first link on a line below to go directly to a page where "singleton variable" is defined. |
|
http://onelook.com/cgi-bin/cgiwrap/bware/dofind.cgi?word=singleton+variable
(85 words)
|
|
| |
| | SWI-Prolog mailing list: [SWIPL] Singleton variable warnings |
 | | But in complex code with if-then-else clauses and many variables its quite easy to create a situation analogous to def/2. |  | | Also, is it possible to make singleton warnings act as exceptions so that I can get my make files to fail when singletons are detected? |  | | I like singleton warnings; they almost always indicate I have made a mistake. |
|
http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/old/2936.html
(182 words)
|
|
| |
| | Frequently Asked Questions |
 | | Singleton is a variable that appears only once in a program clause and therefore there is no reason to have a name (it could have been anonymous " |  | | However, you are prompt with this warning because you might have mispelled the name of the variable. |  | | What do I do if I get "Action (h for help)" ? |
|
http://aetos.it.teithe.gr/~ailp/faq.htm
(357 words)
|
|
| |
| | The Pregnancy Institute - PUCP |
 | | (397) A recent evaluation of NST to detect UCA's relied on the classic variable deceleration pattern. |  | | Knotting in singletons is a sequence of events which creates a loop of cord counter to the twist (torque) applied by fetal movements (which may be due to blood flow disturbances). |  | | The results of these studies suggest it is possible to identify UCA prenatally and manage it. |
|
http://www.preginst.com/pucp.html
(13577 words)
|
|
| |
| | Compiling ALE Programs |
 | | The reason for this is that variables that only occur once are useless in that they do not enforce any structure sharing. |  | | Usually a singleton variable indicates a typing error, such as typing |  | | There is little use for singleton variables in ALE outside of the Prolog goals in morphological rules and some macro parameters. |
|
http://www.cs.toronto.edu/~gpenn/ale/guide/node9.html
(1494 words)
|
|
| |
| | Full Text Bug Listing |
 | | BUS error when trying to delete object at line 382 in $ACE_ROOT/ace/OS.cpp in
~ACE_Cleanup_Info_Node() [next_ member variable]. |  | | I
have an ACE_Task derived object (RFActiveORB) that has as a member variable orb_
[a CORBA::ORB_var]. |  | | The RFActiveORB::open() method sets the orb_ variable via
orb_ = CORBA::ORB_init(argv_->argc(), argv_->argv(), orbName.c_str());
Ok, so far so good. |
|
http://deuce.doc.wustl.edu/bugzilla/long_list.cgi?buglist=908
(618 words)
|
|
| |
| | [No title] |
 | | write_singleton_warnings([vv(VarName,'$VAR'(N))Rest], Occurences, P, A) :- atom_codes(VarName, CharList), (CharList = [95_] -> % variable Var begins with an "_" true % (underscore), so its OK, ignore it!. |  | | % This captures clauses with no variables to be checked, % (for example ground clauses, or clauses that contain % only underscores as variables), where VariableList is % variable and no singleton test is needed. |  | | NHL, 'singleton check'((NH :- B), VariableList), fail ; true) ; Clause = (':-'(_)) -> true ; Clause = ('?-'(_)) -> true ; /* FACT */ 'singleton check'((Clause :- true),VariableList)). |
|
http://www.dfki.uni-kl.de/km/java/java/XSB/cmplib/singlton.P
(294 words)
|
|
| |
| | LComparator class Reference |
 | | Don't know why this is protected rather than private, consider that a dodgy bit of original PowerPlant design. |  | | This is typically reimplemented with a different static variable in subclasses so each has their own Get factory function and Singleton variable. |  | | Singleton pointer to a comparator obtained with GetComparator. |
|
http://www.oofile.com.au/pp2mfc_ref/html/a00149.html
(182 words)
|
|
| |
| | How control calling threads instances of same variable in Singleton? |
 | | Note that the call to threadLocal.get() in the main thread is very important, because otherwise the child threads of main will just get a null initial value: |  | | In this singleton I have a variable (or property) that is set by calling threads. |  | | Every calling thread (to the singleton's method) gets a separate instance (although all sub-threads of that calling thread are also considered to be of the same thread) |
|
http://saloon.javaranch.com/27/001160.html
(404 words)
|
|
| |
| | SIP from FOLDOC |
 | | Previous: singleton variable, Single Virtual Storage, siod, SIPB, SIPLAN, SIPP |  | | Previous: single sourcing, singleton variable, Single Virtual Storage, siod, SIPB |  | | Previous: single sourcing, singleton variable, Single Virtual Storage, siod, SIPB, SIPLAN |
|
http://www.instantweb.com/d/dictionary/foldoc.cgi?query=SIP
(126 words)
|
|
| |
| | [No title] |
 | | Lemma Singleton_th2 : (X : Ens)(Look_at (Singleton X)) -> (is_nonempty (Singleton X)). |  | | Proof [X, A : Ens][i : (IN X A)] [l : (Look_at (Singleton X))] (autout_00216 X A i). |  | | Lemma Singleton_th1 : (X, A : Ens)(IN X A) -> (Look_at (Singleton X)) -> (SUB (Singleton X) A). |
|
http://math.unice.fr/~carlos/preprints/startA.v
(4640 words)
|
|
| |
| | Publications |
 | | Incorporating Human Needs into Assistive Technology Design, R.A. Cooper, Ch. |  | | Cooper RA, The Contribution of Selected Anthropometric and Physiological Variables to 10K Performance-A Preliminary Study, Journal of Rehabilitation Research and Development, Vol.29, No.3, pp.29-34, 1992. |  | | Cooper RA, Dvorznak MJ, Rentschler AJ, Boninger ML, Technical Note: Displacement between the Seating Surface and Hybrid Test Dummy during Transitions with a Variable Configuration Wheelchair, Journal of Rehabilitation Research and Development, Vol. |
|
http://www.herlpitt.org/bobby/publications.htm
(7800 words)
|
|
| |
| | CSE 340 - Principles of Programming Languages |
 | | Logically, such variables can always be replaced by an anonymous variable (underscore), so Quintus thinks you MIGHT have made a mistake when it sees a singleton variable. |  | | This means that a clause was found in which a variable occurs exactly once. |  | | Note that the correct version of the clause won't have a singleton variable. |
|
http://www.eas.asu.edu/~cse340/prolognotes.html
(581 words)
|
|
| |
| | singleton application |
 | | package provide singleton namespace eval ::singleton { namespace export \ init \ done # "global" array(s) variable Singleton } # singleton::init -- # # Initialize a Tcl process to be a singleton using sockets. |  | | Somehow you have to use distinct sockets for distinct users. |  | | # proc singleton::done { port } { variable Singleton close $Singleton($port,serverSocket) unset Singleton($port,serverSocket) unset Singleton($port,onConnect) } # singleton::done # singleton::Connect -- # # What to do when a new client tries to connect (that is, when # another process calls init with the same port). |
|
http://wiki.tcl.tk/singleton
(1182 words)
|
|
| |
| | eclipse-users: Re: Question about singleton variable names |
 | | On Quinta, Julho 18, 2002, at 09:28, J.R. van Ossenbruggen wrote: > Hi all, > > With the flag variable_names=check_singletons, Eclipse warns about > singleton variables, ignoring variables starting with '_'. |  | | Is there a way to suppress the > underscored > variables in read_term(+Stream, ?Term, [singletons(S))? |  | | > > However, read_term(+Stream, ?Term, [singletons(S)), returns > also the variable names starting with '_' (e.g. |
|
http://www.icparc.ic.ac.uk/eclipse/archive/eclipse-users/0337.html
(263 words)
|
|
| |
| | Index (openMDX/Core API) |
 | | Predicate implementation that returns true if all the predicates return true. |  | | and create methods when a client attempts to create the second instance of a singleton. |
|
http://www.openmdx.org/openmdx/core/1.5/java/index-all.html
(1041 words)
|
|
| |
| | Index () |
 | | Class SeverMessage is a singleton that contains messages sends by the system in all languages suported by server. |  | | Implementation of the singleton pattern : only instance of the concrete user state |
|
http://franck.fleurey.free.fr/VirtualMeeting/javadoc/index-all.html
(1829 words)
|
|
| |
| | The Mercury Project: mercury-reviews Jun 02 By Thread |
 | | Re: [m-rev.] for review: fix singleton variable warning problem Fergus Henderson |  | | Re: [m-rev.] for review: fix singleton variable warning problem Peter Ross |  | | Re: [m-rev.] for review: fix singleton variable warning problem Simon Taylor |
|
http://ceres.cs.mu.oz.au/mailing-lists/mercury-reviews/mercury-reviews.0206
(1760 words)
|
|
| |
| | Neowin.net -> Creating a Object from a class automatically. |
 | | static Test singleton; //static variable to trace instance of class |  | | I'm pretty sure the C++ code I gave above would be close to working, just need to adjust syntax slightly. |  | | another thing people do is construct/init the object when declaring global variable |
|
http://www.neowin.net/forum/index.php?showtopic=220912
(522 words)
|
|
| |
| | Variable naming/numbering |
 | | This predicate is provided as a way to name the variable lists obtained returned by |  | | to avoid a clash when binding a variable of |  | | list is neither a variable nor a variable binding option |
|
http://www.ncst.ernet.in/apgdst/pgpfac/prolog/Html/manual027.html
(244 words)
|
|
| |
| | No match for singleton+variable |
 | | Nearby terms: Singer Peter « singleton « singleton variable « singular proposition » Sinn - Bedeutung » skepticism » Skinner Burrhus Frederic |  | | Last modified: Sat Feb 17 16:22:35 GMT 2001 |
|
http://www.swif.uniba.it/lei/foldop/foldoc.cgi?singleton%2Bvariable
(50 words)
|
|
|