Questions tagged [extending]

302 questions
2
votes
3 answers

Resolving urls to different views for different types of user profiles in Django

I'm adding a new type of user profile to site and this new type of user(say new_type) should not be able to reach the same views like the existings users. My question is: how can i use different types of views according to user type using the same…
altunyurt
  • 2,821
  • 3
  • 38
  • 53
2
votes
5 answers

Extending a class in C++ using header files

I found found out that to extend a class I would have to do this: class x : public extendsThis { // rest here }; So, I create 2 classes, in two seperate files: - particle.h - class particle : public program { }; - program.h - class program { …
Zilarion
  • 302
  • 1
  • 4
  • 15
2
votes
2 answers

Extending embedded Python in C++ - Design to interact with C++ instances

There are several packages out there that help in automating the task of writing bindings between C\C++ and other languages. In my case, I'd like to bind Python, some options for such packages are: SWIG, Boost.Python and Robin. It seems that the…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
2
votes
2 answers

Matching within matches by extending an existing Regex

I'm trying to see if its possible to extend an existing arbitrary regex by prepending or appending another regex to match within matches. Take the following example: The original regex is cat|car|bat so matching output is cat car bat I want to add…
Halfcard
  • 33
  • 4
2
votes
1 answer

Usefulness of extending jQuery core

I discovered a method of extending the core jQuery init function (which is what gets called anytime you use the $() or jQuery() function). This is not possible using the ordinary proxy pattern but the following code makes it work: var origInit =…
Matt Browne
  • 12,169
  • 4
  • 59
  • 75
2
votes
0 answers

How to change RTC stream and component ownership using plain java api?

I need to change the ownership of components and stream. I am trying to find out any API for this. Please help. Here I have one code snippet with me but I don't know how it will work. IScmService scmService = null; IRepositoryItemService…
Rinkal Garg
  • 173
  • 9
2
votes
2 answers

Problem with accessing superclass methods in method redefinitions

I am having a bit trouble to understand when "super" can be called and when not. In the below example the super method leads to a no superclass error. class Bacterium def eats puts "Nam" end end class Bacterium def eats super # -> no…
medihack
  • 16,045
  • 21
  • 90
  • 134
2
votes
7 answers

How to get item templates working in visual studio 2017

I got visual studio 2017 enterprise trial, I have installed it twice thinking it was something wrong with the installation, but still everything I export an item template it doesn't get imported into visual studio, I see it inside the exported…
doubletoker
  • 41
  • 1
  • 5
2
votes
1 answer

extending a module when module is using "module.exports"

I've read a few pages on extending a module.They revolve around using a functional form of a module and I get how to do it (from https://toddmotto.com/mastering-the-module-pattern/) var Module = (function () { return { publicMethod: function…
DKebler
  • 1,216
  • 1
  • 15
  • 27
2
votes
1 answer

Extending a C++ application with python

I have a legacy (but still internally maintained) application written in C++ which handles some hardware, interacts with databases, receives commands via serial line or socket... in short it does a non-trivial amount of work. This application runs…
ZioByte
  • 2,690
  • 1
  • 32
  • 68
2
votes
1 answer

Sitecore add insert new option to droplink field

I'm using sitecore and Content Authors want to improve their experience by adding "Insert new" option to a droplink field (instead of going to the datasource location and create a new item, and then select the new item from the droplink). Do I need…
Snapper
  • 686
  • 1
  • 13
  • 29
2
votes
0 answers

Creating Extended Python Type Object within Embedded Interpreter C/C++

I'm trying to define a new python type object using the documentation found here https://docs.python.org/3/extending/newtypes.html. At the moment I am just following the basics section defining a new type with the same names as used in the…
Geom3trik
  • 25
  • 4
2
votes
0 answers

PHP: extending class method without inheritance

I'm trying to separate additional functional to other files, that can be included at runtime or no. I think it's a good way to build modular architecture, but I can't find ways to implement it without inheritance. The deal is that I have base…
2
votes
5 answers

inheritance of an implemented class

This is probably a simple question, please bear with me since I'm used to Java... Lets say we have an interface: class IDoable { virtual void do() = 0; }; Another class: class Base : public IDoable { //... virtual void do() { ...…
Koen Demonie
  • 539
  • 1
  • 7
  • 24
2
votes
0 answers

Extending AngularJS plugins

For a project I had to add custom behavior to UI Bootstrap's Datepicker. I had to add new key-value pairs to the datepickerConfig constant, had to do some simple changes in the DatepickerController, add a new directive and change some…
orszaczky
  • 13,301
  • 8
  • 47
  • 54