Questions tagged [extending]
302 questions
28
votes
5 answers
Symfony2 extending DefaultAuthenticationSuccessHandler
I want to alter default authentication process just after authentication success. I made a service that is called after authentication success and before redirect.
namespace Pkr\BlogUserBundle\Handler;
use Doctrine\ORM\EntityManager;
use…

piotrekkr
- 2,785
- 2
- 21
- 35
20
votes
5 answers
Circular ArrayList (extending ArrayList)
So my program has a need of a type of circular ArrayList.
Only circular thing about it has to be the get(int index) method, this is the original:
/**
* Returns the element at the specified position in this list.
*
* @param index…

Karlovsky120
- 6,212
- 8
- 41
- 94
19
votes
4 answers
Adding a constructor prototype to a javascript object
I have several javascript objects like this:
var object = {
name: "object name",
description: "object description",
properties: [
{ name: "first", value: "1" },
{ name: "second", value: "2" },
{ name: "third",…

Wilt
- 41,477
- 12
- 152
- 203
19
votes
3 answers
Extending PHP static classes
I've been struggling in this area for days now, and I have reached a conclusion, but since the conclusion was not what I was looking for, before I give up, I'll try to see what other people say. Faith dies last...
Let's say we have a superclass…

treznik
- 7,955
- 13
- 47
- 59
18
votes
3 answers
Entity Framework 4, inheriting vs extending?
What are the advantages/disadvantages to each method?
I know I've read somewhere in either a book or on this site why using table inheritance is crappy for Entity Framework 4.
For instance, why not make one table which has an entityId, datecreated,…

SventoryMang
- 10,275
- 15
- 70
- 113
17
votes
6 answers
How to add a custom working Shipping Method in WooCommerce 3
I have successfully created a new shipping method and given it support for shipping zones. However when I come to select the method from the dropdown to add it to the zone it does not appear in the 'selected methods list'.
I recorded a screencast…

jhob101
- 432
- 2
- 6
- 15
14
votes
1 answer
How to extend an existing jQuery UI widget?
I am using jQuery v1.8.3 and jQuery UI v1.9.2. I would like to extend an existing jQuery UI widget (in my case the Autocomplete widget) by adding and overriding just some options and methods but keeping the others functionalities as those present in…

user12882
- 4,702
- 9
- 39
- 54
13
votes
4 answers
Copying Javascript getters/setters to another prototype object
// Base class
var Base = function() {
this._value = 'base';
};
Base.prototype = {
constructor: Base,
// By function
getValue: function() {
return this._value;
},
// By getter
get value() {
return…

Ben
- 5,117
- 2
- 27
- 26
13
votes
3 answers
Missing Python.h while trying to compile a C extension module
I'm following this tutorial on how to extend Python with C\C++ code.
The section named "Building the extension module with GCC for Microsoft Windows" fails for me with the following error:
fatal error: Python.h: No such file or directory
The…

Jonathan Livni
- 101,334
- 104
- 266
- 359
13
votes
2 answers
Extending entities in Symfony2 with Doctrine2
I'm having trouble finding a way to appropriately extend an Entity across bundles in Symfony2 using Doctrine2 as the ORM.
Currently there are three methods that I've found to extending entities in Symfony2 using Doctrine2 as the ORM. Mapped…

Jgarib
- 166
- 1
- 1
- 6
12
votes
2 answers
How to extend existing enumerations objects in Scala?
I'm wondering if you can extend already existing enumerations in Scala. For example:
object BasicAnimal extends Enumeration{
type BasicAnimal = Value
val Cat, Dog = Value
}
Can this be extended something like this:
object…

Henry
- 175
- 1
- 5
12
votes
3 answers
Scala, advanced generic extending
I'm trying to rewrite https://gist.github.com/319827 to Scala. But I can't compile it. What is the correct syntax?
Error I'm allways getting:
class type required but java.util.Comparator[_ >:
java.lang.Comparable[java.lang.Object]]…

v6ak
- 1,636
- 2
- 12
- 27
11
votes
3 answers
What is the purpose of extending an anonymous type in Scala?
I'm trying to get a better understanding of Scala, and I can't seem to find a valid usecase for code like the following:
class C extends { def m() { /* ... */ } }
What is the rationale for allowing such constructs?
Thanks!

Eyvind
- 5,221
- 5
- 40
- 59
10
votes
2 answers
Extending class for activity
I'm totally new to Android (Java) Development and I'm so excited about it! The developers guide of Google is fantastic and I learned a lot in a small time. It even keeps me awake during the night ;)
Today I went through making menu's and there's…

MartijnG
- 815
- 4
- 12
- 24
10
votes
1 answer
Straightforward Way to Extend Class in Node.js
I am moving a plain Javascript class into Node.js. In the plain Javascript I use:
class BlockMosaicStreamer extends MosaicStreamer{
}
I can't seem to find a simple way to implement this in Node.js. In my node project in BlockMosaicStreamer.js I…

Sara Fuerst
- 5,688
- 8
- 43
- 86