New instance of class in different namespace PHP

Here is my file structure (Laravel 5.2) /app/http/middleware/Site.php (file one) /resources/views/layouts/Automotive/text/DefaultText.php (file two) I have the first file namespaced at App\Http\Middleware I want to create a new instance of class ...
more »

2017-09-08 18:09 (1) Answers

Values Always Null

I am attempting to access the values of text boxes from a different class. The text boxes exist in winform1.cs and I want to access them in testing.cs At the top of testing.cs I have instantiated winform1 wf = new winform1(); which allows me to see...
more »

2017-08-28 21:08 (1) Answers

How do I create a proper Java instance?

I have created a public class helloworld and I am trying to create an object for class Abc. I have used "new" keyword to create an instance for Abc class.But still I am getting an error "non-static variable this cannot be referenced from a static con...
more »

2017-05-22 10:05 (4) Answers

Instantiate New Object

I am new to Java so this is probably a stupid question, but why when I run the following code does name and age not change to "Bob" and 25. I don't get any errors in the system, but it looks like it is not changing them from what they are in the sys...
more »

2017-03-14 20:03 (3) Answers

Generic class with Memory?

This question has been edited from its original version Hi everyone, following your comments, I have modified my original class. The objective of this class is to store two sets of values: The first one is the "applied" one. If the user request th...
more »

2017-03-03 20:03 (0) Answers

Class property array, can't use $this to set value

In the class below, when instantiated, I receive the following error: '$this' (T_VARIABLE) in your code on line 12 'default_timestamp' => $this->_time, I'm confused because when the object is instantiated, I assume $_time is accessible for use, how...
more »

2017-02-26 05:02 (1) Answers

Java Class Instantiation Order

I got this code : public class Sgl { private static Sgl sgl = new Sgl(); private static int count = 0; public static Sgl getSgl() { return sgl; } public static int getCount() { return count; } private Sgl(){System.out.pri...
more »

2017-02-12 20:02 (0) Answers

Ada Generics: Stack vs Heap Clarification

So I have an assignment that says: Please use generic instantiations of packages/classes. Space for each BMR (matrix) must be allocated in the system stack within the generic package/template, probably during generic instantiation! You specificall...
more »

2017-02-05 08:02 (1) Answers

call python3 class with methods

I have a file named: This file contains the following class: Im trying to call my class BrickSetSpider, with its methods, and ultimately return the value of parse_page_urls when running this program like python However, when i ...
more »

2017-01-29 17:01 (2) Answers

PHP how to dynamically instantiate a class

I am new to PHP, and I tried to dynamically instantiate a class like this: $var = new \App\$str; But I keep getting this error: unexpected variable $str after '\', expected: identifier. I know it is possible, but I am just not sure what the ex...
more »

2017-01-24 11:01 (1) Answers

Python class - chaining instance methods

I've started to build my class in this fashion (more like a regular function): ex 1 class Child(Parent): def __init__(self,user): Parent.__init__(self, user) search = filter = api.filter(search) ...
more »

2017-01-03 20:01 (4) Answers