Questions tagged [extending]

302 questions
3
votes
3 answers

SASS extend from root only

I recently encountered a.. "thing" in the land of SASS. And maybe you guys know a trick or something alike to "fix" it. I've got this class .icon. It contains some basic styling for my icons (Used for an iconfont). These icons can then be placed in…
3
votes
0 answers

How to write custom typehandlers in PyBindGen?

Documentation of PyBindGen says that it is easy to write custom typehandlers for your own data types. However, I didn't find any good examples of writing them. Examples, which are supplied with pybindgen are too basic to understand the details and…
yesint
  • 145
  • 9
3
votes
0 answers

Copy C structure to Python List

I am new to Python. I have written a C code extending Python to get certain values from another C module. The values are got as C Structures. I need to return C structure to Python. For this I think, copying C structure to Python list would be…
3
votes
4 answers

Classes and Sub-classes - how do you track them?

Me and my fellow students (1st year CS) are struggling with the issue classes and sub-classes. We have a test, in which one of the questions checks the understanding of Classes, sub-classes, Legal and illegal casting between them etc. The questions…
Barak Yaari
  • 418
  • 7
  • 17
3
votes
2 answers

Extending PHPUnit_Framework_TestCase while using dataProviders

I'm fairly new to using PHPUnit and I'm trying to use it more effectively by using data providers. I can get data providers to work when writing a normal test case, however I find that I'm rewriting my setup code for across several testcases. So…
Jordan
  • 183
  • 1
  • 10
3
votes
1 answer

Proxying jQuery.init. Awkward behaviour

I'm trying to use jQuery.fn.extend to override jQuery.fn.init with my own implementation which is going to behave differently from the original implementation but is going to need to call the original implementation at certain places to do the real…
SBhojani
  • 499
  • 1
  • 4
  • 19
3
votes
1 answer

JavaScript prototype extending

I'm trying to extend an Abstract object. var Abstract = function() { code = 'Abstract'; }; Abstract.prototype.getCode = function() { return code; }; Abstract.prototype.getC = function() { return c; }; var ItemA = function() { code = 'ItemA'; c =…
Dovydas Bartkevičius
  • 1,721
  • 13
  • 19
3
votes
2 answers

Discover the public methods of a shared library

In addition to Extend a dynamic linked shared library? I would like to find out, how I can get a list of all public methods of a shared library with closed source. I have tried nm -D libfoo.so readelf -s libfoo.so but there I'm missing…
Martin L.
  • 3,006
  • 6
  • 36
  • 60
3
votes
1 answer

PHP5 OOP: Accessing changed parent properties

This is my first question, and something which has got me stumped. I'm not sure if this is something simple and I'm overlooking it or something not possible. Below is a very simplified version of my original code. The end goal is to have the output…
2
votes
1 answer

Extending symfony mailer class in FOSUserBundle

Does anyone know how you can extend the Mailer class in the FOSUserBundle? I am implementing a very basic parental email check (all the validation is done on the form to force a parent's email to be entered), if the parent email field is populated…
chrishey
  • 451
  • 6
  • 11
2
votes
5 answers

How to add additional event handler in jQuery or plain javascript?

I have my own object with onShow() function, which is called (by me) when object is shown. I can override this function by assignment o.onShow = function() { // something }; But it removes previous version of a function. So, if I wish to conserve…
Dims
  • 47,675
  • 117
  • 331
  • 600
2
votes
1 answer

jpa AttributeOverride in multiple embeded properties

Could someone help me to set the proper way to override a column name in an extended entity. Embedeable: @Embedable Email @Column(name = "email_adress") private string email; Parent entity: @Entity AddressBook @Embedded @AttributeOverrides( { …
jessarah
  • 351
  • 1
  • 4
  • 13
2
votes
3 answers

Extending widgets in Jquery UI with redefining parent methods

I try to extend UI dialog according to documentation (UI version 1.8.16): (function($) { $.widget('ui.mydialog', $.extend(true, $.ui.dialog.prototype, { _create: function() { return $.Widget.prototype._create.apply(this,…
Darkside
  • 659
  • 8
  • 20
2
votes
1 answer

Docker - Extending a container with another image?

At my company, we have hardened containers created by the security team, and I would like to extend the hardened container with another docker image. For example, if we have a hardened Debian container, and I want to add Apache, how do I do this? I…
benishky
  • 901
  • 1
  • 11
  • 23
2
votes
1 answer

Thymeleaf Element Model processing

How do I properly process HTML tag and its body in my own Element Model Processor? For example, I have the following HTML structure:
Pavel Polyakoff
  • 191
  • 1
  • 13