Snipplrhttp://snipplr.com/tags/pattern
Recent snippets posted on Snipplr.comen-usFri, 25 May 2018 03:59:22 GMT(C#) How to Add Rectangle or Line Object to An Existing PDF File using .NET - sherazamhttp://snipplr.com/view/147619/how-to-add-rectangle-or-line-object-to-an-existing-pdf-file-using-net/
This technical tip shows how .NET developers can add line object to an Existing PDF File inside their .NET applications. Aspose.Pdf for .NET supports the feature to add graph objects (for example graph, line, rectangle etc.) to PDF documents. You also get the leverage to add Line object where you can also specify the dash pattern, color and other formatting for Line element. The legacy Aspose.Pdf.Generator provides the feature to set DashLengthInBlack and DashLengthInWhite properties where dash pattern for line object can be defined. Similar features can be accomplished while using DOM approach. ]]>Wed, 20 Jul 2016 19:02:40 GMThttp://snipplr.com/view/147619/how-to-add-rectangle-or-line-object-to-an-existing-pdf-file-using-net/(Java) Delegation pattern - kolepephttp://snipplr.com/view/146255/delegation-pattern/
In software engineering, the delegation pattern is a design pattern in object-oriented programming where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object. ]]>Tue, 01 Mar 2016 09:33:28 GMThttp://snipplr.com/view/146255/delegation-pattern/(Java) Traits pattern - kolepephttp://snipplr.com/view/146152/traits-pattern/
Traits both provide a set of methods that implement behaviour to a class and require that the class implement a set of methods that parameterize the provided behaviour.
A trait is kind of a â€œmicro interfaceâ€ that describes some characteristic of a class design that can be found in many different components throughout the system. By referring to the traits instead of the implementing class itself you can keep the system decoupled and modular. ]]>Wed, 17 Feb 2016 11:56:18 GMThttp://snipplr.com/view/146152/traits-pattern/(Java) Strategic Pattern v3 - jasonhuehttp://snipplr.com/view/98502/strategic-pattern-v3/
Strategic Pattern v3 ]]>Fri, 24 Apr 2015 12:08:20 GMThttp://snipplr.com/view/98502/strategic-pattern-v3/(Java) Strategic Pattern v2 - jasonhuehttp://snipplr.com/view/98501/strategic-pattern-v2/
strategic pattern with spring testing ]]>Fri, 24 Apr 2015 11:59:34 GMThttp://snipplr.com/view/98501/strategic-pattern-v2/(Fortran) Divisor pattern - chema_arhttp://snipplr.com/view/80145/divisor-pattern/
This is a piece of code to print out a divisor pattern given a number n. It is a basic exercise of programming. It should be improved protecting the code. ]]>Wed, 22 Oct 2014 18:02:05 GMThttp://snipplr.com/view/80145/divisor-pattern/(Fortran) Triangle pattern - chema_arhttp://snipplr.com/view/80144/triangle-pattern/
This is a piece of code to draw a triangle pattern in the upper diagonal elements. It is a basic exercise of programming. ]]>Wed, 22 Oct 2014 18:00:34 GMThttp://snipplr.com/view/80144/triangle-pattern/(JavaScript) JavaScript Basic Decorator Pattern - timsommerhttp://snipplr.com/view/66521/javascript-basic-decorator-pattern/
In this section we're going to explore the decorator - a structural design pattern that promotes code reuse and is a flexible alternative to subclassing. This pattern is also useful for modifying existing systems where you may wish to add additional features to objects without the need to change the underlying code that uses them.
Traditionally, the decorator is defined as a design pattern that allows behavior to be added to an existing object dynamically. The idea is that the decoration itself isn't essential to the base functionality of an object otherwise it would be baked into the 'superclass' object itself. ]]>Fri, 03 Aug 2012 18:49:50 GMThttp://snipplr.com/view/66521/javascript-basic-decorator-pattern/(JavaScript) Javascript Singleton Pattern - timsommerhttp://snipplr.com/view/66421/javascript-singleton-pattern/
In conventional software engineering, the singleton pattern can be implemented by
creating a class with a method that creates a new instance of the class if one doesn't exist. In the event of an instance already existing, it simply returns a reference to that object. ]]>Mon, 30 Jul 2012 21:28:49 GMThttp://snipplr.com/view/66421/javascript-singleton-pattern/(CSS) Transparent Background Pattern - shanglehttp://snipplr.com/view/65431/transparent-background-pattern/
adds a checkered background to images, so images with transparency are revealed.
based upon: http://lea.verou.me/css3patterns/#checkerboard ]]>Thu, 07 Jun 2012 01:12:39 GMThttp://snipplr.com/view/65431/transparent-background-pattern/(PHP) php color-scheme viewer - DanielFGrayhttp://snipplr.com/view/60373/php-colorscheme-viewer/
]]>Mon, 31 Oct 2011 16:41:52 GMThttp://snipplr.com/view/60373/php-colorscheme-viewer/(JavaScript) Mediator pattern (HB Stone) - ultranauthttp://snipplr.com/view/60350/mediator-pattern-hb-stone/
Somewhat tweaked ]]>Sun, 30 Oct 2011 12:15:40 GMThttp://snipplr.com/view/60350/mediator-pattern-hb-stone/(JavaScript) JS sandbox pattern implementation - ultranauthttp://snipplr.com/view/60088/js-sandbox-pattern-implementation/
http://stackoverflow.com/questions/3628649/javascript-self-contained-sandbox-events-and-client-side-stack ]]>Sun, 23 Oct 2011 13:54:27 GMThttp://snipplr.com/view/60088/js-sandbox-pattern-implementation/(ActionScript 3) sunflower pattern - hejaaahttp://snipplr.com/view/57547/sunflower-pattern/
]]>Wed, 03 Aug 2011 05:08:55 GMThttp://snipplr.com/view/57547/sunflower-pattern/(JavaScript) Fresh JavaScript file (With namespaced, closured module pattern) - geekyjohnhttp://snipplr.com/view/57085/fresh-javascript-file-with-namespaced-closured-module-pattern/
A JavaScript starter with a namespace and closure ]]>Sun, 24 Jul 2011 22:35:21 GMThttp://snipplr.com/view/57085/fresh-javascript-file-with-namespaced-closured-module-pattern/(Python) Google Scraper - eristoddlehttp://snipplr.com/view/56087/google-scraper/
]]>Mon, 04 Jul 2011 18:11:33 GMThttp://snipplr.com/view/56087/google-scraper/(JavaScript) Javascript revealing module pattern template - coprolithttp://snipplr.com/view/50765/javascript-revealing-module-pattern-template/
"Javascript module pattern emulates the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding/namespacing particular parts from the global scope."
When inheritance is not needed and a only few instances is needed (Keep in mind that each instance places a new copy of each function in memory!) ]]>Thu, 17 Mar 2011 08:40:45 GMThttp://snipplr.com/view/50765/javascript-revealing-module-pattern-template/(HTML) Module pattern HTML - shodan_ukhttp://snipplr.com/view/49276/module-pattern-html/
Authour: Mike Rumble (@rumble) ]]>Sun, 20 Feb 2011 07:13:47 GMThttp://snipplr.com/view/49276/module-pattern-html/(CSS) Super module CSS - shodan_ukhttp://snipplr.com/view/49275/super-module-css/
Authour: Mike Rumble (@rumble) ]]>Sun, 20 Feb 2011 07:11:16 GMThttp://snipplr.com/view/49275/super-module-css/(HTML) Simple module HTML pattern - shodan_ukhttp://snipplr.com/view/49108/simple-module-html-pattern/
]]>Thu, 17 Feb 2011 03:54:32 GMThttp://snipplr.com/view/49108/simple-module-html-pattern/