28 Topics

Member Avatar for
Member Avatar for khair.ullah

Hello every one . I have a piece code in VB.net which work perfectly. but now i convert that code to C# Which give me the follwing error. "No suitable Method found to override" my VB.Net Code is Here Protected Overrides Sub onload(ByVal e As EventArgs) startPosX = Screen.PrimaryScreen.WorkingArea.Width - …

Member Avatar for Kavitha_2
0
379
Member Avatar for davecoventry

I have a link in my web page: <div class="site-logo"> <h1 class="site-title"> <a href="http://10.0.0.201/wp/" title="Document &amp; Draft" rel="home">Document &amp; Draft</a> </h1> <h2 class="site-description">For power CAD users</h2> </div> The "site-logo" class is as follows: .site-logo{ display: block; text-align: left; color: #9FA32E; font-family: "Trebuchet MS",Arial,Helvetica,Sans-Serif; font-size: 42px; text-decoration: none; } I'm expecting …

Member Avatar for JorgeM
0
862
Member Avatar for William Hemsworth
Member Avatar for Labdabeta

Hello, I am having a particularly nasty case of "What is the syntax?" while working on an event driven library. Basically this is what I want: class Object {// private: public: virtual bool onEvent(Event e)=0;//all objects have to react to events Object operator|(const Object &o) { // I want to …

Member Avatar for Labdabeta
0
305
Member Avatar for cleve23

Hi From the below code,the example is calling the dog object through the animal reference.But i do not understand why don't it call directly through the dog class as the reference? Thanks class Animal{ public void move(){ System.out.println("Animals can move"); } } class Dog extends Animal{ public void move(){ super.move(); …

Member Avatar for JamesCherrill
0
201
Member Avatar for Mathias_1

I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << …

0
164
Member Avatar for cleve23

Hi Below is a code sample i copied from the book that i am reading.But i need explanation on why creating a reference to the figure(Eg: Figure figref;) when each reference for the individual class is already been declared. Like if i need the area of the rectangle,i could have …

Member Avatar for stultuske
0
169
Member Avatar for XerX

Hi, I am having a problem overriding methods in a subclass when they contain private methods from the master class. The is the master: package blabla; public class Person { private String firstName; private String secondName; private String familyName; public Person() { firstName = ""; secondName = ""; familyName = …

Member Avatar for JamesCherrill
0
234
Member Avatar for fonzi

Hey guys I'm having a bit of touble assigning the toString to a string from an index of an array list, any help would be appreciated. @Override public String indentedToString(int level) { String answer = " "; answer = super.indentedToString(level); answer += "Value " + this.list.toString() + "\n"; for(int i …

Member Avatar for fonzi
0
261
Member Avatar for Sumal

I wanted to convert this segment of code into something slightly different package expression; import java.util.*; public class Expression{ /* * Strings used for storing expression. */ String s, x; /* * Term evaluator for number literals. */ double term(){ double ans = 0; StringBuffer temp = new StringBuffer(); while( …

Member Avatar for JamesCherrill
0
208
Member Avatar for kaizen202

In my project, I have created around 12 custom controls(checkbox,radiobutton,editbox,progressbar,scrollbar,button etc...). Custom painting is done in all controls for the extended look and feel using Pen,Brushes,Graphics, GraphicPath,Images,Region and Bitmaps ect. After the use of these objects, I have disposed the objects using the Dispose() method. I am using these controls …

Member Avatar for kaizen202
0
402
Member Avatar for sblass92

Lets say I have a class A and I also have classes B and C that inherit from class A class A { virtual void foo()=0; //stuff } class B : class A { void foo(); //more specific stuff } class C : class A { void foo(); //more specific …

Member Avatar for sblass92
0
340
Member Avatar for rahul.ch

class Dog { public void bark() { System.out.println("Dog bark"); } } class Hound extends Dog { public void bark() { System.out.println("Hound bark"); } public void sniff() { System.out.println("Hound sniff"); } } public class CastingMethodCall { public static void main(String r[]) { ((Dog)new Hound()).bark(); //((Dog)new Hound()).sniff(); } } On executing above, …

Member Avatar for JamesCherrill
0
255
Member Avatar for rahul.ch

General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case …

Member Avatar for JamesCherrill
0
202
Member Avatar for sciwizeh

Hello, thought I'd ask before getting too deep into code to make sure I understand this properly. As described in the Gamma et. al. book the Visitor Pattern looks something like this: interface Visitor{ public void visitX(X x); public void visitY(Y y); public void visitZ(Z z); } interface Visited { …

Member Avatar for JamesCherrill
0
1K
Member Avatar for speakon

Hello. I have this question: "Amend the subclass of Holiday called Premier with an overridden equals method. Test this method in an orchestrating class with objects of Premier that contain the same data values and with objects that contain different data values." I have searched high and low for a …

Member Avatar for JamesCherrill
0
280
Member Avatar for DavidKroukamp

Hey all, I have been wanting to make a cool game in jave such as a fighting game starting off simple with drwing stick figures :). But i was wondering why there are so many java games created in Japplet why not use swing- i know there are games out …

Member Avatar for DavidKroukamp
0
189
Member Avatar for aliasadsahu

[CODE]class Animal { private String type; Animal theAnimal = null; // Declare a variable of type Animal public Animal(String aType) { type = new String(aType); } public String toString() { return "This is a " + type; } } class Dog extends Animal{ private String name; // Name of a …

Member Avatar for JamesCherrill
0
120
Member Avatar for surajrai

Hi, I have seen in couple of places the code where ToString() method has been overriden. Like : class Employee : IComparable<Employee> { public int Salary { get; set; } public string Name { get; set; } public int CompareTo(Employee other) { if (this.Salary == other.Salary) { return this.Name.CompareTo(other.Name); } …

Member Avatar for darkagn
0
543
Member Avatar for Tortura

Hey, following Problem: I have two classes Measurement and its subclass DC_Measurement. Measurement has a method called: [CODE]public virtual SetPoint[,] createSetPointArray()[/CODE] DC_Measurement: [CODE]public override DCSetPoint[,] createSetPointArray()[/CODE] DCSetPoint is also a subclass of SetPoint. I read that this is possible. Now I use in my mainWindow following code which contains an …

Member Avatar for Tortura
0
154
Member Avatar for cool_zephyr

hello..i've made a structure given below and the objects of that struct are stored in an arraylist [code] struct node { public int x; public int y; public int cost; public object parent; } [/code] now when i'm adding a new object this type..i want to check if the arraylist …

Member Avatar for cool_zephyr
0
6K
Member Avatar for galhajaj

Hi :) i am new in C# and i am a little confused with the abstruct, virtual and override terms in C#... why they are good for? i tried to google it but i got more confused... for example - i am making a chess program and i made a …

Member Avatar for Mitja Bonca
0
176
Member Avatar for speedy94519

Hello, I have a question about the code below [CODE] // Checks the vertex a if (this.a != ((Triangle)o).a) { return false; } [/CODE] So In a method called Triangle i declared an instance variable like this: [CODE] private java.awt.Point a [/CODE] What I think this code is doing is …

Member Avatar for jon.kiparsky
0
149
Member Avatar for Alkaline8214

In class my teacher ran a program similar to this one. When I attempt to run this from home I get a message saying "No main classes found". I know there should be a main in the program but he ran a similar program without it. Just trying to get …

Member Avatar for Alkaline8214
0
214
Member Avatar for rje7

[code] public class Animal { public void eat() { System.out.println("I eat like a generic Animal."); } public static void main(String[] args) { } } class Fish extends Animal { @Override public void eat() { System.out.println("I eat like a fish!"); } } class Goldfish extends Fish { @Override public void eat() …

Member Avatar for javaAddict
0
163
Member Avatar for jackparsana

Hi, Please help me tod this.. how can i change Overriding The Default Text color in IE browser? I can change in ff, and Safari. but Not in this.. help me. thanks in advance. jack.

Member Avatar for Borzoi
0
157
Member Avatar for zeuz

Hi everyone My intention is to enable NTLM authentification when using the native PHP SOAP client, Most of the code is copied from an php.net manual example and it is said to be working. I'm trying to override the __doRequest function in the SoapClient class and let it use cURL. …

0
133
Member Avatar for Menster

Hi guys, Bit of a strange problem here. I've been working on a CMS for a client where they can preview work that they've done in a div-tag which is inside the "Admin" template for the back-end. My problem is this: After the user styles all of their content accordingly …

Member Avatar for MJ Pieterse
0
162

The End.