Huge congrats Dani, the new DaniWeb is not only looking slick and on-trend but actually *feeling* so much better to use, more powerful and more professional. I'm loving it so far! A BIG thank you from me for all the hard work you've put into this.

Member Avatar
Member Avatar
+0 forum 6

If you visit the Member Search page, the hamburger navigation menu top left is missing. You have to go back to the home page instead. Is this intentional?

Member Avatar
Member Avatar
+0 forum 4

Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them. I don’t want at this stage work on a big separate project as I've already got plenty to work on, rather do small exercises to help me understand the concept. So, I was thinking, maybe I can create a small program that output the characteristics of either an employee or a client of an organisation, perhaps loop through them, just to better understand relationships between classes. So, …

Member Avatar
Member Avatar
+0 forum 31

Hello Dear DaniWeber's. I've been away for some time, and have recently made the transition from VB to C# (Finally). Using C# has opened my eyes to many things that I had either not fully understood, or had a lazy attitude towards. I find myself visiting the core of OOP and indeed polymorhism. Previousley I had used inheriting and implementing very loosley, maybe not even fully understanding their concepts and am now visiting each area and making sure I can implement things such as Interfaces and Abstract classes properly. In short, I'm trying to adopt a more professional approach to …

Member Avatar
Member Avatar
+0 forum 9

Hi All, Interfaces cannot be instantiated. Could you please explain why the following is valid: interface MyInterface{} MyInterface[] myInterface = new MyInterface[]{"a", "b"}; Cheers!

Member Avatar
Member Avatar
+0 forum 2

I found a bit of code which im unsure about in this poorly documented project im on. To be honest I havent got a clue what is going here. public void TestMethod(ISystemScriptingInterface system, ScriptEventArgs eventArgs) { var databaseScriptingInterface = system.GetInterface("database") as IDatabaseScriptingInterface; if (databaseScriptingInterface == null) { throw system.GetException(LocalisedSystemText.InternalServerError(), "Database scripting interface was not found", "Test Class", "Running test method", " Scripting.DatabaseInterfaceNotFound"); } if (databaseScriptingInterface != null) { } } Does any one know what is going on or can give me some good reading material to understand this better Cheers.

Member Avatar
Member Avatar
+0 forum 2

Why do we use interface references to call methods of an object? For example: class Program : Iabc, Idef { static void Main(string[] args) { Console.WriteLine("Hello interfaces"); Program refProgram = new Program(); Iabc refiabc = refProgram; refiabc.xyz(); Idef refidef = refProgram; refidef.pqr(); Console.ReadLine(); } public void pqr() { Console.WriteLine("In pqr"); } public void xyz() { Console.WriteLine("In xyz"); } } The interface reference refiabc is pointing to the refProgram reference which is pointing to the Program object. refiabc then calls xyz() Why do we do this (use interface references that point to a central reference that points to an object) instead …

Member Avatar
Member Avatar
+0 forum 4

Hello All, I have searched every forum and google etc but nothing directed me in right path. Requirement: I am using a COM object which can be initialized only once. But, when I try with webapi the first run goes fine and the rest fails as the COM object does not allow initialization for second time. With the below code, I notice that the new COMClass(); is being triggered everytime there is a GET request. Is there a way I can define the COMClass object to be executed only once and can be re-used by all the GET requests? namespace …

Member Avatar
Member Avatar
+0 forum 6

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace interfejsi interface Figura { String Plostina (); String Perimeter (); } } using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace interfejsi { class Kvadar : Figura { int a,b,c; public String Perimetar(int a, int b, int c) { return (a + b + c).ToString(); } public String Plostina(int a, int b, int c) { return (a * b * c).ToString(); } } }

Member Avatar
Member Avatar
+0 forum 2

What is the difference between `CoffeeInterface<Beverage> cup1 = new Coffee<Beverage>()` and `Coffee<Beverage> cup2 = new Coffee<Beverage>()` `Coffee` is a class that extends the `CoffeeInterface` Is `cup1` an object or can it be used as one. Are there any differences betweeen `cup1` and `cup2`?

Member Avatar
Member Avatar
+0 forum 4

interface Interface1 { public int method1(); public int method2(); } public class Salary implements Interface1 { public static void main(String args[]) { int sa[]=Integer.parseInt(arg[0]); float pf,hra,da,tax,net; public int method1() { System.out.println("salary="+sa); try{ if(sa>250000) { pf=sa*5/100; hra=sa*10/100; da=sa*8/100; tax=sa*10/100; net=sa+tax; System.out.println("Net salary of an employee"+net); } } catch(Exception e) { System.out.println("I/O error"); } } public int method2() { System.out.println("salary="+sa); if(sa>500000) { pf=sa*5/100; hra=sa*10/100; da=sa*8/100; tax=sa*20/100; net=sa+tax; System.out.println("Net salary of an employee"+net); } else { System.out.println("No deduction"); } } Salary s=new Salary(); s.method1(); s.method2(); } } **I'm getting 4 errors in this program....and they are** line no.12 : illegal start of expression …

Member Avatar
Member Avatar
+0 forum 7

To integrate our data base with other site, I've got a xml coding (given below) but they require a JSP output steps and tips to achive that would be appriciated. TIA. <?php include('db_connect.php');?> <?php $query=mysql_query("select * from tbl_seat")or die(mysql_error()); $xml="<libraray>\n\t\t"; while($data=mysql_fetch_array($query)) { $xml .= "<From>".$data['fromloc']."</From>\n\t\t"; $xml .= "<To>".$data['toloc']."</To>\n\t\t"; $xml .= "<Date_of_Journey>".$data['date']."</Date_of_Journey>\n\t\t"; $xml .= "<Bustype>".$data['bustype']."</Bustype>\n\t\t"; $xml .= "<Boarding_point>".$data['boarding']."</Boarding_point>\n\t\t"; $xml .= "<Dropping_point>".$data['dropping']."</Dropping_point>\n\t\t"; $xml .= "<Seats>".$data['seats']."</Seats>\n\t\t"; $xml .= "<Fare>".$data['fare']."</Fare>\n\t\t"; } $xml.="</libraray>\n\r"; $xmlobj=new SimpleXMLElement($xml); $xmlobj->asXML("saffari.xml"); ?>

Member Avatar
Member Avatar
+0 forum 1

Hello, I got a error 'Does not implement interface member' I search around the net and try a lots of solutions, both did not works for me. How can I fix this problem ? 'Browser.CoreServer' does not implement interface member 'browser.iDataConnection.tcpclient' ... namespace Browser { public interface iDataConnection { TcpClient tcpclient { get; set; } StreamReader streamReader_connect { get; set; } StreamWriter streamWriter_connect { get; set; } NetworkStream networkStream_connect { get; set; } } public class CoreServer : iDataConnection <-- Error at this line { iDataConnection dc = new CoreServer(); } public partial class Browser : Form {} }

Member Avatar
Member Avatar
+0 forum 3

Hello I am trying to create a class that called Lootable and create subclasses such as trunk, locker, etc. that will contain items that can be looted, they will inherit their lootability from the Lootable class. I am thinking of using the ArrayList for this. I have thought of different ways to go about this and have written some code but I am having some difficulties. This is for and assignment and my app idea goes somewhat beyond the requirements of the lesson and no I do not expect someone to due this for me I would however like some …

Member Avatar
Member Avatar
+0 forum 7

Hello, I have a difficulty with changing interface from ordinary one to generic one. Could you suggest me how I can achieve this goal, please? This is the way how I initialize API, based on user's choice from configuration which implementation of interface should be chosen: /// MyServiceApplication.MyServiceApplication.cs GeneralSystemAPI.Initialize(); This is code behind Initialize(): /// MyServiceApplication.GeneralSystemAPI.cs namespace MyServiceApplication { internal static class GeneralSystemAPI { internal static void Initialize() { //... CompanyAPI = FirstSystemAPI.Tools.GetCompanyAPI(); } internal static ICompanyAPI CompanyAPI {get; private set;} internal static void Destroy() { CompanyAPI = null; } } } And code behind GetCompanyAPI() for given implementation of …

Member Avatar
Member Avatar
+0 forum 2

I want to know about website interface design. Please advice me.....

Member Avatar
Member Avatar
+0 forum 3

Hello Community, I was wondering if it is possible to access and use an api from my website?

Member Avatar
Member Avatar
+0 forum 2

I wonder how to interface octave with c++ I already have m-file that can run on octave but I want to run a C++ program that can get/send command from/to octave Anyone can guid me? Is there any link for the tutorial or example code?

Member Avatar
Member Avatar
+0 forum 3

following the article title, I'm dealing with octave, it goes right on command line. but I need to build GUI for my program to easier interface with people. then I chose Java to build GUI. my problem is to connect my GUI java to Octave. Anybody has ideas to do that?

Member Avatar
Member Avatar
+1 forum 2

hello. i got a project to do using oracle pl/sql and i want to add a interface (preferably, web) so there aren't just some plain sql scripts. some text boxes, buttons, etc. so it looks nice :D. any suggestions? thank you.

Member Avatar
Member Avatar
+0 forum 2

Enroller.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace HRSYSTEMPROJECT { class Enroller : IEnroll { #region IEnroll Members public String Enroll(String a,String b ,String c,String d,String e) { return a; return b; return c; return d; return e; } internal string[] Enroll() { throw new NotImplementedException(); } #endregion } } Interface IEnroll.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace HRSYSTEMPROJECT { public interface IEnroll { String Enroll(); } }

Member Avatar
Member Avatar
+0 forum 8

How can I attach the OCX of WMP to my dialog based application? I want to use the methods of IWMPControls interface such as play() and pause(). I want to call these method by clicking the button given in the dialog box. Its Urgent...

Member Avatar
+0 forum 0

hello ! recently i complete my project management application in .net , now i want to make a attractive main form , i google alot and searching attractive interfaces of application of same domain. i want to you to guid me or if possible then give some links . you know when a person want to create a web site then he can get ideas from soooooo many sites ,templates , etc , and after all this he can create something attractive , but in case of desktop application it is very difficult to design attractive interface . every thing …

Member Avatar
+0 forum 0

Suppose i have a class that implements an interface, the interface is not implementing anything currently. This class and interface are bundled together in the same java program. So i have another program, and through a dependency i want to get that information from that class i spoke of in the first program. How would i set up my interfaces to do this? Currently i have that class just implementing both it's local interface, and my other one on the second program. Is this correct. so that i could have a class in the second program pull out that information? …

Member Avatar
Member Avatar
+0 forum 4

Hello all, been a while since I've asked a question. I'm working on a project just to practice and for fun and I've run into a snag. I'm working on a painting type program and I'm trying to get a generic Buffer class for the images so I can use it for single float values like an alpha channel, or for a whole java.awt.Color. I'm setting up an interface for what the buffers will hold so that in any case I could call `buffer.setPixel(x,y,buffer.getPixel(x,y).add(new ColorValue());` This is the interface I would like for BufferValue<T>: /* * Copyright © 2012 William …

Member Avatar
Member Avatar
+0 forum 6

So i have a java program running as a lib on a server. I need to just simply run a method within that library. In order to do so through J2EE, i need to get a call from a JSP -> EJB ->ResourceAdapter->Method. So i have the Reasource Adapter and method figured out. The resoruce adapter has an interface that listens for messages or calls when deployed to a server. So basically i'm wondering about the bean. How do i get it to connect to that interface on the Resource Adapter? The interface on the RA has code like this: …

Member Avatar
+0 forum 0

#//Here is my simple class for MyCar# public class MyCar { private int odometer; private int speed; private int gear; public MyCar() //send values to member variables in this default constructor { odometer = 0; speed = 0; gear = 0.0; } public MyCar(int od, int sp, int gr) //constructor passing values; { odometer = od; speed = sp; gear = gr; } //accessors public int getOdometer() //accessors have no parameters { return odometer; } public int getSpeed() { return speed; } public int getGear() { return gear; } //mutators public void changeOdometer(int od) { odometer = odometer + od; …

Member Avatar
Member Avatar
+0 forum 1

HELP ME PLEASE. I AM A 1ST YR COLLEGE STUDENT :/ Define an interface Filter as follows: public interface Filter { boolean accept(Object x); } Modify the implementation of the DataSet class to use both a Measurer and a Filter object. Only objects that the filter accepts should be processed. Demonstrate your modification by having a data set process a collection of bank accounts, filtering out all accounts with balances less than $1,000. Refer to the source code below: [CODE]/** Computes the average of a set of data values. */ public class DataSet { private double sum; private Object maximum; …

Member Avatar
Member Avatar
+0 forum 12

[CODE]import java.lang.*; import java.io.*; import java.util.*; interface Batm { final static int minbal=500; abstract void withdrawl(); } class Bal implements Batm { int amt,cbal; Bal(int amt,int cbal) { this.amt=amt; this.cbal=cbal; } void withdrawl() { if(cbal>minbal) { cbal=cbal-amt; System.out.println(amt+" "+"withdrawn"); } else { System.out.println("bal nt sufficient"); } } } class Atm { public static void main(String args[])throws IOException { Bal b=new Bal(2000,5000); b.withdrawl(); } } [/CODE] m getting an error dat attempting to assign weaker access privilges.can not implement withdrawl in bal in batm

Member Avatar
Member Avatar
+0 forum 6

Code attached in the attachment is not my own and was supplied by an instructor. I am to create a word morphing game. The computer will provide a starting word and an ending word. I am to enter a new word, that either adds or removes a letter from the previous word. An example of game play would be: [ICODE]ending word: iced starting word: grade next word: grace next word: race next word: ruce ERROR! word not found in dictionary, please continue from the word race next word: ace next word: ice next word: iced Congratulations you did it![/ICODE] The …

Member Avatar
Member Avatar
+0 forum 7

The End.