Questions tagged [extending]

302 questions
0
votes
1 answer

Return an array of floats in C++ to Python

I'm fairly sure I'm not looking in the right places, because information on this topic has been remarkably hard to come by. I have a small function in C++ that Python will invoke and that create a small array of floats and return them to Python. …
eriophora
  • 999
  • 1
  • 8
  • 20
0
votes
2 answers

Objective-C - Adding some properties without extending class, is there a way?

Here is the problem :( While I am working with Spritekit nodes I need some settings to be accessible inside SKSpriteNode, SKLabelNode classes etc... Settings are stored in pretty basic types (string, array, floats).SpriteNode have property "name"…
Whirlwind
  • 14,286
  • 11
  • 68
  • 157
0
votes
1 answer

AES Encrypting a password field in django using a snippet from djangosnippets

I am attempting to use this snippet: http://www.djangosnippets.org/snippets/1095/ on a model I am building- I am defining things as: first = models.TextField() last = models.TextField() email = models.EmailField(default=None) screen =…
Thock
  • 177
  • 1
  • 9
0
votes
1 answer

Python Pygame Line increasing in size

Alright, so I am making a game where a character moves around the screen and shoots enemies. He hes a cannon on top of him ( a line ;) ) but this is where I am having the problem. In the class cannon (below) I rotate the line around the player and…
Andy
  • 263
  • 1
  • 11
0
votes
1 answer

How to add reusable field to Scala Enumeration?

I would like to extend Scala's implementation of Enumeration with a custom field, say label. That new field should be accessible via the values of that enumeration. Furthermore, that custom field should be part of various implementations of…
Martin
  • 1,875
  • 1
  • 20
  • 28
0
votes
2 answers

Extending Edittext to change appeareance

I'm considering make my own EditText for a Game with a personal appeareance. As I see if I extend Edittext class, I have to override the onDraw method and make my own Canvas. In the other side I have considered the option of make a CompoundView with…
pianista
  • 108
  • 8
0
votes
1 answer

Extending a WPF window in codebehind between projects

I have a XAML/cs class (EditorWindow) that derives from Window and implements some special functions. I also have a subclass in just a .cs file that derives from EditorWindow (public class DetailedEditorWindow:EditorWindow). If both of these are in…
JasonX
  • 503
  • 7
  • 21
0
votes
2 answers

C++ Redefining variables of a namespace?

I've got two questions. Question 1: Can someone provide an example of how to define/redefine a variable in a namespace. I've provided my own guess for you to base an your answer from. // namespace.hpp namespace example { static string version; …
Honor
  • 63
  • 2
  • 9
0
votes
3 answers

php PDO extending

I'm not trying to create my own PDO class, just extend it so I can insert a try catch statement in my own execute function (myexecute) so I do not have to write the code every time. Firstly, is this a good ideas? or should I just scrap it? so I want…
0
votes
2 answers

Referencing to DOMDocument method from DOMElement

I have written below classes to make certain DOM operations easier. I want the Easy_Dom_Element's functions to be able to accept both a string and an element as input though. To do that I have to access DOMDocument's createElement method. The call…
NotABlueWhale
  • 795
  • 7
  • 18
0
votes
1 answer

Customizing / extending / monkey patching Django Auth Backend

I am using django-auth-ldap to connect to an LDAP server for authentication. django-auth-ldap provides the setting AUTH_LDAP_REQUIRE_GROUP, which can be used to allow access only for users placed in a specific group. This works fine, but the option…
soerface
  • 6,417
  • 6
  • 29
  • 50
0
votes
1 answer

How to extend My custom library to my controller

I want my Custom_library class extend to My_custom_controller. Is it possible?
Adnan
  • 571
  • 5
  • 15
0
votes
1 answer

Abstract class extends multiple types of activities Java and Android

I am newbie in Java and Android programming. I just created simple app with login form and registration form. My login form and registration form works right now. I created abstract SignedActivity class which extends from Activity class. I want each…
1daemon1
  • 1,001
  • 3
  • 11
  • 29
0
votes
1 answer

Can you extend a generic class in C#

Let's say I have this class public Holder : IHolder { private mystring; private myobj; public Holder(T obj, string str) { mystring = str; myobj = obj; } } Then I want to have Holder< T> extend T, so that I…
Anders Miltner
  • 253
  • 3
  • 12
0
votes
1 answer

How to extend a media query with a class

I try to switch the display mode via javascript. Assuming i have the html element with a class "display_mobile" i tried: @media only screen and (max-width: 767px), html.display_mobile { /* mobile mode definitions */ } but this does not works. Any…