Questions tagged [extend]

Cause a unit of code (a class in POO, a style class in CSS ...) to cover a wider area.

Cause a unit of code (a class in POO, a style class in CSS ...) to cover a wider area.

1544 questions
-1
votes
1 answer

Not able to merge dictionaries into a list

So I have this piece of code to generate some response for api response. @app.route("/api/topFour",methods = ['POST']) def top(): parser = request.get_json() user_id = parser["user_id"] item = {} answer = [] parameters =…
-1
votes
2 answers

Access extended class from parent class in PHP

I have two classes, class A and class B, i am trying to access class B through a function in class A. At the moment i am able to do this by creating a new instance of class B inside of the function in class A, but i want to know if there is a way to…
K.D
  • 147
  • 1
  • 12
-1
votes
2 answers

Extend a list with another one. Why this behaviour?

I have a 2 elements list which I want to extend with the elements of another one. playing around in Jupyter I found this strange behaviour that I can not understand. # this is my first list columnslist=['app','SUM'] ['app','SUM'] # it is going to…
JFerro
  • 3,203
  • 7
  • 35
  • 88
-1
votes
1 answer

'append' works but 'extend' fails to work in this case

I was trying to add a value to each of the elements in a list. Here's the code: c = [1,2,3] d= [] for i in range(len(c)): d.append(c[i]+3) print (d) The code just works fine. But if I change it to 'extend' as follows: c = [1,2,3] d= [] for i in…
Dennis
  • 175
  • 1
  • 3
  • 8
-1
votes
1 answer

MySQL joining , extending the result

I have two tables Table name: place Columns: placeid, name Data: 1, My Favourite Donut Place Table name: category Columns: categoryid, name, placeid Data: 1, Donuts, 1 2, Coffee, 1 3, Hot Chocolate, 1 I join the two like this: select…
-1
votes
3 answers

Creating a class to wrap Properties

I want to create a class that wraps Properties and specifically hides the file I/O operations. I have come up with the abridged code below. This is intended to read the properties from a file at a fixed location outside of the class path. It also…
dazz
  • 119
  • 2
  • 14
-1
votes
3 answers

implem is not abstract and does not override abstract method FinalScore() in extending interfaces

program 1 interface java{ public void setHomeTeam(String name); public void setVisitingTeam(String name); } program 2 interface extension extends java { public String HomeTeamScored(); public String VisitingTeamScored(); public…
Tsuna
  • 21
  • 6
-1
votes
2 answers

HTML Extend layout not working

i`m using layout page called home.blade.php .here is the code.
Dasun
  • 602
  • 1
  • 11
  • 34
-1
votes
2 answers

Magento 1.9 extend core class

I would like to extend core product class and add some functionality. I made file app\code\local\ast\Catalog\etc\config.xml 0.0.1
mr ras
  • 1
  • 1
-1
votes
1 answer

jQuery extend() in extend()

These are my jQuery plugin parameters so far: function lightbox( options ) { // setting default parameters var params = $.extend( { // show/hide & enable/disable options keyNav : true, // boolean objClickNav:…
Maarten Wolfsen
  • 1,625
  • 3
  • 19
  • 35
-1
votes
2 answers

How to extend a class inside a namespace in javascript?

var sl = sl || {} sl.Shape = function(){ this.x = 0; this.y = 0; }; sl.Shape.prototype.move = function(x,y){ this.x += x; this.y += y; }; sl.Rectangle = function(){ sl.Shape.call(this); this.z = 0; }; The next line produces…
Daniela
  • 234
  • 2
  • 13
-1
votes
1 answer

Java ClassNotFoundException for subclass of existing class

I have a server project in which I need to send an object via the server from one computer to another. The object is a SpecificGame, which extends Game. The server knows that the object it received is of type Game, but does not have access to…
-1
votes
2 answers

Trying to reuse code, but can't extend two classes, alternative?

I know I cannot extend from two classes, but what is the alternative for my case? I am using a base class, parser, that parser the page of my CMS. This class contains all the basic functions needed to filter the data retrieved from the database and…
PIDZB
  • 903
  • 1
  • 15
  • 38
-1
votes
1 answer

How get root with Extend in stylus without mixin

I'm learn stylus and i need to get root-element properties for his sub-classes: .daddy-element (this is a root) main: prop &.sublclass (need "main: prop" here) another: prop in sass we have $root: &, what stylus can in…
Eugene Balashov
  • 105
  • 1
  • 13
-1
votes
2 answers

Super thinks it is not the first constructor in a statement

I can't seeem to get this code to work. I have several different classes listed out, and they extend each other. The code for the box super, however, tends to not think it is the first constructor. public class Rectangle3 { // instance variables…
1 2 3
99
100