basic

How do I change the image of a HTML button on mouse over etc

How do you point to various images for various button states? Onmouseover, etc. ...

How to beautify the URL?

I am sick of this kind of URL: www.domain.com/something/?id=person&photos=photoID&variable1=others&... I am using apache, learning to write .htaccess now. Can anyone show me the basic code for this one? Ugly: www.domain.com/something/?id=person&photos=photoID Goal: www.domain.com/something/person/photoID ...

How to drop columns using Rails migration

What's the syntax for dropping a database table column through a Rails migration? ...

strcmp equivelant for integers (intcmp) in PHP

So we got this function in PHP strcmp(string $1,string $2) // returns -1,0, or 1; We Do not however, have an intcmp(); So i created one: function intcmp($a,$b) { if((int)$a == (int)$b)return 0; if((int)$a > (int)$b)return 1; if((int)$a < (int)$b)return -1; } This just feels dirty. What do you all think? this is par...

Java basic authorization with URLConnection

Hello! I'm opening a connection to WebService with an URLConnection class. I also set request property for basic authorization like this: c.setRequestProperty("Authorization", "Basic " + usernameAndPasswordEncoded); Where c is an object of type URLConnection. So this is client side of WebService call. Now on server side I need to ge...

How to echo out table rows from the db (php)

i want to echo out everything from a particular query. If echo $res I only get one of the strings. If I change the 2nd mysql_result argument I can get the 2nd, 2rd etc but what I want is all of them, echoed out one after the other. How can I turn a mysql result into something I can use? I tried: $query="SELECT * FROM MY_TABLE"; $res...

Are Fortran, Cobol, Basic and Forth high level programming languages?

Are Fortran, Cobol, Basic and Forth high level programming languages? And if not, what where the first high level programming languages? What where the first object-oriented languages? ...

OpenOffice Calc Macro: Run shell command and return output as result of custom function

I would like to write a custom OpenOffice function that runs a shell command and puts the result into the cell from which it was invoked. I have a basic macro working, but I can't find a way to capture the command's output. Function MyTest( c1 ) MyTest = Shell("bash -c "" echo hello "" ") End Function The above always returns 0....

Delphi - COM/OLE starting example needed

Hi! 10 years have ellapsed since I used COM/OLE, and I forget 90% of them. Now we need to make a COM object to access some data from PHP/Python (this is specific thing, the php ODBC don't access the output params of a DataBase - like stored proc output), and my idea the I realize a minimal object with one method, and PHP/Python can call...

HTTP Basic Auth via URL in Firefox does not work?

I know that normally you can login to sites that require HTTP basic authentication with Selenium by passing the username and password in the URL, e.g.: selenium.open("http://myusername:[email protected]/mypath"); I've been running a Selenium test with Firefox 2 or 3 and there I still get the "Authentication Required" dialog...

Difference between an variable set to nil and 0

if (myFloat == nil){ \\Do Method } In the above situation, the method will run only if myFloat is nil. Will it also run if myFloat was set to 0? ...

Login Form For Http Basic Auth

Hello everyone, I am running a Perl application named bitlfu.For login it is using something like Apache HTTP Basic Auth but not a form.I want to make form for the login with username and password filed. I have tried JavaScript and PHP with no results till now. So I need help! PS: this kind of url works http://user:[email protected] ...

Don't know the name of the control I want (textBox+Scrollbar), on silverlight

Hello, I'm learning Silverlight and I want a control that lets the user enter a number but also that has 2 buttons like a scrollbar and when one of the buttons is pushed the value decrements/increments accordingly. Sorry I guess it should be pretty easy, the book I have is pretty basic (I'll get another one when I get a chance) Like th...

FTPKit (realbasic) only uploading 38bytes

Hay All, I'm kind of new to Realbasic, but I've managed to use FTPKit to connect to my server, however if i create a FTPQueue object and add some files to that to upload, only 38bytes is being sent. My loggedIn() event looks like this Dim q as FTPQueue = new FTPQueue q.UploadFile( "/Users/myuser/Desktop/Junk/a.jpeg", "/httpdocs/a.jpeg...

Randomly Assigning Positions

Hey, Here's my basic problem. Let's say I have 50 employees working on a certain day, and I want my program to randomly distribute them to a "position" (I.e.: front desk, phones, etc) based on what they have been trained on. The program already knows what each employee has been trained on. What is the best method pragmatically to go thro...

Help: ZX81 BASIC "Peek" function...

I need a way to find if the character ('<') has hit a wall (Black pixel Graphic) -On a ZX81 game. I'm been looking at another game... which uses code if peek(peek 16398 +256*peek 16399) = code "**blackpixel graphic**" then ... Which seems to work for them... Is this correct code? I'm not really knowledgable with addresses and gett...

Help with casio fx-9860G

I need help writing custom functions for my casio fx-9860g I have done this before in my Texas Calc but Im not sure there is a way to it with casio calculators... say, for instance, I want to write a simple function like so: public int triple(int x) { return 3x; } I understand this is quite a simple function but I want a way to store...

What the hell happened to TI? And what are the alternatives?

When I was in the sixth grade, my parents purchased for me a TI-86 graphing calculator. I recall that it was purchased on the same day that "Titanic" on DVD went on sale in the United States. In the years that followed I learned that although the device is advertised as a graphing calculator, it really is a pocket-sized portable compute...

How do I fix this BASIC compilation error?

I have a problem compiling a program I made in BASIC. It's a DOS simulator that I was making in attempts to see if it is posssible to write an operating system entirly in BASIC. Every time I try to compile, I get these messages: !SYNTAX ERROR IN LINE 15, COLUMN 50 UNEXPECTED E EXPECTING : OR END OF LINE What do I change to sovle thi...

Basic CMake Question - Linking Fails

I'm configuring my project for CMake and am having linking problems - the project files all compile successfully, then it says it is linking and reports all sorts of symbols not found. These symbols are mostly provided by my own code, while some of them are provided by BerkeleyDB, which is being properly located and included. Here is...