basic

Basic Object Oriented inheritance question

Consider the following source code. I have two classes CBar and CFoo. CFoo inherits from CBar. The output of this source code is Bar Foo Bar I was expecting Bar Foo Foo Where did I go wrong? What I was thinking was that since the CFoo object has a Speak function that overrides the CBar speak function. When I call The Speak()...

PHP using dirname(__FILE__) on non-dedicated server?

Hi, What I trying to do is to define a constant variable in a config file: DEFINE("PATH", dirname(__FILE__) . "/"); So that, when I want to "include" or redirect, I could do this: include(PATH . "filename.php"); or header("location: " . PATH . "logout/php"); But when I try doing an echo of PATH, I get this result: /home/myDOMA...

using both basic and Integrated authentication

We would like to use Integrated Windows Authentication if a user accesses our SharePoint site from within our organization, and Basic Authentication (using SSL) when someone tries to authenticate from outside our organization. Reading, it seems IE will try Windows Auth no matter what and ignore Basic Auth from outside our organization. ...

How can I join a string repeatedly?

Hello everyone. I want to do something like: string s1 set to null s2: "abc" repeat 10 times s1=s1+s2 How can I do this in objective-c? ...

Is there a way to access DHR on the Apple 2 from Applesoft Basic

When using Applesoft Basic on the Apple 2 with an 80 column card, is there a way to create DHR graphics using only POKE? I have found a number of solutions using third party extensions such as Beagle Graphics, but I really want to implement it myself. I've searched my Nibble magazine collection, and basic books, but have been unable to...

iPhone sdk basic element\button animation

Hello veteran xcoders, I just wanna know if there exists simple drawer (move up and down certain pixels)like animation for generic iPhone button as animated action or not? How one can approach to implement that. Can someone guide me.Thanks for your effort in advance. ...

PHP: HTTP Basic - Log off.

I would to set it up where if someone sends in a request "logout" it will automatically take them to a page saying "successful log out". If the customer tries to press the back button or go to the restricted area, it will ask for HTTP auth again. What I have so far is this: example.com/restricted/index.php: <?php session_start(...

beginner question: add/subtract to value rather than just be that value

Hello! Using the Openframeworks library in C++, I have the radius of a glow (max_distance) that is determined by the stretch of the mouse dragging across the screen (mouseDragX). It works fine. But rather than every time I resize it (by dragging the mouse), I want it not to start at 0 and follow the mouse drag directly. max_distance =...

What would this look like as pseudocode?

I'm trying to implement this: from https://docs.google.com/viewer?url=http://www.tinaja.com/glib/bezdist.pdf&amp;pli=1 The following BASIC program uses the method of finding distance. The program also searches for the minimum squared distance between points and a curve. REM BEZIER.BAS JIM 20DEC92 12:37 DATA 2,3,5,8,8,14,11,17,14,17,16,...

Python in OpenOffice 3

Hello, I have a heap of Lotus 123 spreadsheets (not written by me) with Lotus Scripts in them doing an awful lot of leg work (moving data from one spreadsheet to another, and other things like that). I am making the consideration of moving it all away from Lotus 98 and going to something a little more open, like OpenOffice. I was wonde...

Variable substitution faster than in-line integer in Vic-20 basic?

The following two (functionally equivalent) programs are taken from an old issue of Compute's Gazette. The primary difference is that program 1 puts the target base memory locations (7680 and 38400) in-line, whereas program 2 assigns them to a variable first. Program 1 runs about 50% slower than program 2. Why? I would think that the e...

Basic Ruby SQL Problem Error undefined method `[]'

I think I'm being stupid. rc = Mysql.new('CENSORED_HOST','username','password','db') release = rc.query('select * from wp_ribcage_releases where release_id = 1 limit 1') puts release["release_title"] rc.close And I am getting the following error: ribcage-connect.rb:17: undefined method `[]' for #<Mysql::Result:0x1011ee900> (NoMetho...

any base64 decoding algorithm in BASIC

I am programming a small micro controller in BASIC. Basically it received some BASE64 encoded data and I need to decode it at my end using BASIC. I was wondering if there is any way to do that? ...

Choose For Random Strings In Commodore 64 BASIC

I have this variable declarations on my program: X="MAGENTA" Y="CYAN" Z="TAN" A="KHAKI" Now what I want is to randomly choose one of these and PRINT it. But how to do this? ...

Whats the difference between "<>" and "!="?

Normally I would use !=, then when I saw this sign <> it means not equal to as well. After that, I went to search on Google, what's the difference between <> and !=. But I could not find the answer. Anyone care to explain? Edit: Thanks for the answers guys =) ...