class

C++ Multiple Callback funtions problem

Hi, I have a dll which requires me to set a callback function for it (actually it's a camera sdk and it will callback my function when it receives a picture). I wanna have multiple (user input) cameras but I can't. Since I should make unknown number of callback functions. the easy way is to make a class (camera) which have a function f...

C# class not public

I am trying to make a class so when I do the following inside a file: Functions LoginFunctions = new Functions(); LoginFunctions.loadFunctions(); It will create my object which I need, and make it public so every form which calls the class will be able to use it. The class file is below. namespace App { public class Functions ...

How is non-standard worksheet.object created in this Excel VBA

The following VBA 6 in Excel 2000 code Resides in a form that has text boxes, comboboxes and buttons One of them is txtUsername, another is txtPassword --I inherited this code With shtName .Unprotect "thepassword" .range("somenamedrange").Value = cboComboBox.Value .txtUsername.Text = txtUsername.Text .txtPassword.Text = txtPassword.Te...

How do I get the concrete name (e.g. "<module_name>"."<class_name">) of a class reference in Python?

This is what I have so far: def get_concrete_name_of_class(klass): """Given a class return the concrete name of the class. klass - The reference to the class we're interested in. """ # TODO: How do I check that klass is actually a class? # even better would be determine if it's old style vs new style # at the same time and handle thin...

How to assign same class object declared in 2 different namespaces

I have a webservice project with a class (let's refer to it as webservice.classA). I have another class project producing a dll which references that class in its own namespace and instantiates an instance of it (lets call the dlls namespace dllnamespace). In another project I want to access the member in the dll e.g. using webservic...

gettext works in one file and not the other?

Hi. I have a little trouble getting gettext to work. I made a simple test file where I call the translate.php and echo T_("XXXXX") and It get translated, but when I try to use echo T_ in a function it doesn't work.. translate.php: <?php error_reporting(E_ALL | E_STRICT); // define constants define('PROJECT_DIR', realpath('./fun...

Android: how do you get a view reference from a class that DOES NOT extend Activity?

Hi, I want to have a class "Utils", that will have several methods used all over my code. For example, I have a top bar with a textview and two ImageButtons that must display different texts and icons on different activities. I find myself writing stuff like this on every activity (TextView) topBarText = (TextView) findViewById(R.id....

Parse error when concat'ing a defined variable and string in a class!

Hi guys, I have defined a variable in a separate config file: define('URL', 'someurl.co.uk'); However, when I try to use it to concat with a string inside a class: class AdminEmail extends Email { private $from = "jsmith".URL; I get the following error: Parse error: parse error, expecting `','' or `';'' But if I echo it ou...

Newbie question: how do I create a class to hold data in Visual Basic Studio?

Hey all, I'm really sorry. This must seem like an incredibly stupid question, but unless I ask I'll never figure it out. I'm trying to write a program to read in a csv file in Visual Basic (tried and gave up on C#) and I asked a friend of mine who is much better at programming than I am. He said I should create a class to hold the data...

XPath select an image by classname

Hi, I have an xml sheet with some data and some images that i want to collect only a part using xslt. However, there is one image with a particular classname that i would like to collect especially. For example, the xml says: <img class="itemImage" height="130" src="image.png" width="195"/> How do I get the src attribute of this im...

Initialization of object static members

Static members confuse me sometimes. I understand how to initialize a simple built in type such as int with something along the lines of int myClass::statVar = 10;, which you place in a .cpp file, but I have something of the following sort: class myClass { public: // Some methods... protected: static RandomGenerator itsGenerator; } ...

python , how to find class object from child entity ?

my code is following in python. class A(object): b = B() def d(self): print "Hi" class B(): def C(self): self.__self__.d()#edit ::: i need to call d() method here. i know __self__ is wrong # do knowledge for B being variable inside object A needed ? i.e # passing parent object via init is needed as show...

How can i prevent to set property that client can access over web service proxy?

I have a web service that i typed on c#. I have added a class to this web service. This class has two properties. One of them has getter and setter and the other has just one getter or has private setter. class ClassName{ public string propGetSet{get;set;} public string propGet{ get; private set; } } class WebSer : WebService{...

Why and when there are things I can not do in CLASS SCOPE in C# ?

hi, well... I'm confused about what can I do and what I can't do in CLASS SCOPE. For example ========================= class myclass { int myint = 0; myint = 5; *// this doesnt work. Intellisense doesn't letme work with myint... why?* void method() { myint = 5; *//this works. but why inside a method?* } } ========...

C++ Base class destrutor order problem

Does anyone know any trick I could use to keep the Derived class until the base class destructor have been called? i.e: #include <iostream.h> class Base { public: Base(){ cout<<"Constructor: Base"<<endl;} virtual ~Base(){ cout<<"Destructor : Base"<<endl;} }; class Derived: public Base { //Doing a lot of ...

How can I tell the value of of a class attribute via jquery?

Hello, I have an element with a class, the class has a set width. Later I change the width with $('#elm').width(100); now, even later, I want to go back to the original value. Is there a way to get what the original value is from the class definition itself rather than store a bunch of globals with the values I need. Thanks, Justin ...

How to get the parent base class object super.getClass()

Hi, I have a little problem with Java (being a C++ programmer). I have 2 related classes: public class Patient() { ... } public class PatientPersistent extends Patient { ... public void foo() { System.out.println(super.getClass().toString()); } } This will output: class org.example.smartgwt.server.model.PatientPersi...

Div ID fade code

Hi, I'm a newbie on jQuery. Can somebody help me with my 2days problem. I just in need of a sample code for a fading effect, slideshow. Here's the style. This will be 3 Divs with same class The first div, will show for 6secs then fades out for 2secs before the first fades out the second div will fade in for 2secs this again will sho...

Can we have a .cs file in a namespace , but without a class?

in a C# assembly, can we have a file for example File1.cs that is in the same namespace as that assembly but it does Not have a class? so for example something like this: namespace something.otherthing { public enum E1 { ..... } public enum E2 { ... } } I think this should be Wrong? but we could do that in VB 6.0 but in ...

class scope question in PHP

scope issue in PHP classes: Why does this work? class index extends Application { function ShowPage() { $smarty = new Smarty(); // construct class $smarty->assign('name', 'Ned'); // then call a method of class $smarty->display('index.tpl'); } } $index_inst...