Top "Wrapper" questions

A wrapper is an OOP technique where an object encapsulates (wraps) another object, resource (dynamically allocated memory, OS file/widow handle, socket, thread mutex, etc) or a set of subroutines, hiding/protecting it and providing another (possibly easier to use) interface.

Simple PDO wrapper

My web application currently has do execute simple queries: simple CRUD operations, counting,... A few months ago, someone recommended me …

php database pdo wrapper
Using Streams with primitives data types and corresponding wrappers

While playing around with Java8's Streams-API, I stumbled over the following: To convert an array of primitive wrapper classe …

java wrapper java-8 primitive-types java-stream
Does C++11 have wrappers for dynamically-allocated arrays like Boost's scoped_array?

I often need to deal with dynamically-allocated arrays in C++, and hence rely on Boost for scoped_array, shared_array, …

c++11 memory-management boost wrapper smart-pointers
PHP equivalent for a python decorator?

I want to be able to wrap a PHP function by another function, but leaving its original name/parameter list …

php python function decorator wrapper
How to wrap class in java and save interface?

I have class like: MyClass extends MyAbstractClass implement myInterface1, myInterface2,... I need create new class with additional fields: MyType1 field1; …

java class wrapper inheritance
Invoice::setDueDate() must implement interface DateTimeInterface, Xero API using calcinai

I am following this wrapper I have this error: Catchable fatal error: Argument 1 passed to XeroPHP\Models\Accounting\Invoice::setDueDate() …

php wrapper xero-api
Using the MediaInfo.dll within C# project

I am attempting to use the MediaInfo.dll within an MVC4 project designed in c# but I am having difficulty …

c# asp.net-mvc-4 media wrapper mediainfo
How != and == operators work on Integers in Java?

The following code seemed really confusing to me since it provided two different outputs.The code was tested on jdk 1.7. …

java integer wrapper operator-keyword equals-operator
How do I access the original element from the jQuery wrapper

Assuming I have this: var wrap = $("#someId"); I need to access the original object that I would get by var …

javascript jquery wrapper
Python: Exception decorator. How to preserve stacktrace

I am writing a decorator to apply to a function. It should catch any exception, and then raise a custom …

python exception wrapper decorator