class

Problems with classes (super new)

Hi, I've problems to figure it out what's happening in the following exercise, I'm learning Smalltalk, so I'm newbie. Class A>>new ^super new initialize. A>>initialize a:=0. Class B>>new: aParameter |instance| instance := super new. instance b: instance a + aParameter. ^instance B>>initialize b:=0. The problem says wha...

penalty for "inlined" classes

Hi All Visual studio allow you to create "inlined" classes (if I am not mistaken with the name). So class header and implementation all in one file. H. file contain definitions and declarations of the class and functions, there is no .cpp file at all. So I was wondering if there is any penalty for doing it that way? any disadvantages...

Converting PHP pagination to jQuery?

Hey, I have been trying to get this pagination class that I am using to be more ajaxy - meaning when I click on the page number like page [2] the data loads, but I want to load in the data without going to a different page (HTTP request in the background, with no page reloads). Being new to both php and jquery, I am a little unsure on h...

Generate annotation along with schema from class

Hi, Do you know if we can add comments in the class and when we generate schema from it using xsd.ece, it should place annotations in the schema> ...

Is there a way to loop through and execute all of the functions in a Python class?

I have class Foo(): function bar(): pass function foobar(): pass Rather than executing each function one by one as follows: x = Foo() x.bar() x.foobar() is there a built-in way to loop through and execute each function in the sequence in which they are written in the class? ...

User Controls Importing Problem (asp.net)(vb)

I have this class that contains vars for db connection; Imports Microsoft.VisualBasic Imports System.Data.SqlClient Imports System.Web.Configuration Public Class DBVars Public Shared s As String Public Shared con As String = WebConfigurationManager.ConnectionStrings("NMMUDevConnectionStr").ToString() Public Shared c As New S...

Is there any class generator for bltoolkit?

Is there any class generator for bltoolkit? ...

Jquery class changing works, but doesn't effect another function like it should

So I have content boxes that close and expand when you click an arrow. The content box has two classes for telling whether it is open or closed (.box_open, .box_closed). A hover function is assigned to box_open so when it is open and you hover over the header, the arrow appears. However, I don't want this to happen when the box is closed...

Append class="external" to external links.

What is the php code to append class="external" to links that are posted and are not the domain. For example my site is www.mysite.com and you post a link to www.mysite.com/news and a link to www.yoursite.com How do I set it so only non "mysite.com" links have the class specified? ...

C++ Class Inheritance architecture - preventing casting

I have a structure of base class and a couple of inherited classed. Base class should be pure virtual class, it should prevent instantiation. Inherited classes can be instantiated. Code example below: class BaseClass { public: BaseClass(void); virtual ~BaseClass(void) = 0; }; class InheritedClass : public BaseClass { public: ...

Changing classes on multiple divs when selecting specific radio buttons

Hey everyone I got a javascript problem I can't seem to find a specific solution for on the web. What I want to be able to do is select one of the radio buttons and have that change the class of #home-right to either .rackmount or .shipping and add the class of .displaynone to the type of dimensions I don't want shown. <div id="home-rig...

Adding new functionality to an application using on-the-fly class generation

Is it possible to generate subclasses at runtime or while an application is running? If so, how is this achieved and what precautions should be taken to prevent a rogue object wreaking havoc inside an application? Edit: Title modified from "Class generation on the fly". ...

C#: Dynamically instantiate different classes in the same statement?

Here is a simplified version of what I'm trying to do: Without having multiple if..else clauses and switch blocks, can I mimic the behavior of Javascript's eval() shudder to instantiate a class in C#? // Determine report orientation -- Portrait or Landscape // There are 2 differently styled reports (beyond paper orientation) string re...

Declare two classes from eachother.

I'm writing a app in NetBeans. I have two classes MyApp_View and MyApp_Functions. The MyApp_View class starts like this public class MyApp_View extends FrameView { MyApp_Functions My_functions = new MyApp_Functions(); public MyApp_View(SingleFrameApplication app) { super(app); In MyApp_Functions I have MyApp_View my_view = new...

The android.provider.Contacts.People is deprecated! Any similar class that I can use to extract the address of the contacts?

How do I extract the address of the contacts stored in the Android emulator? ...

Problem's running unittest test suite OO

Hello, I have a test suite to perform smoke tests. I have all my script stored in various classes but when I try and run the test suite I can't seem to get it working if it is in a class. The code is below: (a class to call the tests) from alltests import SmokeTests class CallTests(SmokeTests): def integration(self): sel...

C# Visual Studio UML Class Diagram Generator

I was wondering if there was a software that would generate UML class diagrams from my project files (C#) in Visual Studio 2008 Professional? Like a plugin of sorts? Thanks in advance. p.s. I have checked previous posts and did not see anything useful on the first glance. EDIT: I found Class Diagram item! but open to more tips. EDIT:...

Swap image with jquery and show zoom image

Hi there, On my site I have an Classic ASP page that shows 4 thumbnail product images that when clicked on swap the main image. This part is working okay. However, on the main image I'm also trying to use the jQZoom script. The zoom script works for the most part, except that the zoomed image always displays the zoom of the first image...

Pointer-like behavior in Java

I got the following: class A{ int foo; } class B extends A{ public void bar(); } I got a instance of A and want to convert it to an instance of B without losing the reference to the variable foo. For example: A a = new A(); a.foo = 2; B b = a; <-- what I want to do. //use b b.foo = 3; //a.foo should now b...

Basic Custom String Class for C++

EDIT: I don't want to delete the post because I have learned a lot very quickly from it and it might do someone else good, but there is no need for anyone else to spend time answering or viewing this question. The problems were in my programming fundamentals, and that is something that just can't be fixed in a quick response. To all w...