Forum: Database Design Jun 5th, 2009 |
| Replies: 1 Views: 476 Getting the row number depends on the DB you're using; Oracle supports this (via ROWNUM) but MySQL for example does not.
Your statement is invalid; if you want to update a row you should be doing:... |
Forum: Ruby Jan 8th, 2009 |
| Replies: 2 Views: 1,797 In your controller do you have
@user = User.find(:first)
or something similar? Could you post your controller code? |
Forum: Database Design Sep 15th, 2008 |
| Replies: 7 Views: 2,456 Why revive a 2 year old thread? |
Forum: Ruby Apr 15th, 2008 |
| Replies: 5 Solved: Hi Views: 3,148 Did your source file definitely have a .rb extension? Did anything at all appear in the output window? |
Forum: Ruby Jan 1st, 2008 |
| Replies: 3 Views: 3,153 Looking at your code I can't see whats wrong.
What happens if in your view you do
<% for st in @stocks -%>
<%= h(st.inspect) %><br />
<% end %> |
Forum: MySQL Sep 2nd, 2007 |
| Replies: 2 Views: 1,076 select id,
( cast(current_timestamp as date) - cast(return_date as date) ) * 3 as fine
from books
where
return_date > current_timestamp
This is how to do the select in postgresql however... |
Forum: C++ Jun 15th, 2007 |
| Replies: 8 Views: 2,474 Have you read the postgresql docs?
http://www.postgresql.org/docs/8.2/static/libpq.html |
Forum: JavaScript / DHTML / AJAX Jun 13th, 2007 |
| Replies: 17 Views: 12,622 Digg uses script.aculo.us; if jquery doesn't do what you need it may also be worth a shot.
http://script.aculo.us |
Forum: Ruby Jun 12th, 2007 |
| Replies: 2 Views: 3,149 You should find the method described here (http://www.kanthak.net/opensource/file_column/) suitable. It works for any file type. |
Forum: HTML and CSS May 20th, 2007 |
| Replies: 5 Views: 2,775 Matt is right; try to get used to closing a tag right after you open it then typing between them (this way you won't leave any tags unclosed). Some html editors do this for you (bluefish, quanta,... |
Forum: Windows Software May 13th, 2007 |
| Replies: 9 Views: 3,834 'Costs more money' does not automatically mean better. |
Forum: DaniWeb Community Feedback May 11th, 2007 |
| Replies: 7 Views: 1,146 LOL stands for 'Laugh Out Loud'
I think the pencil icon means that you are subscribed (or have contributed to) that particular thread. |
Forum: PHP May 11th, 2007 |
| Replies: 2 Views: 721 I'm no PHP expert but do you have to have a complete comparison for each item in the expression?
eg
if ( ($variable == "GBP") || ($variable == "EUR") ){
$display = "my text here";
} |
Forum: Geeks' Lounge May 8th, 2007 |
| Replies: 71 Views: 8,096 Teens statistically are more likely to have an accident due to inexperience on the road but its wrong to say all teens are bad drivers.
I'm 24 now, I have 6 years no claims and my insurance is... |
Forum: Ruby Apr 23rd, 2007 |
| Replies: 5 Views: 5,848 "w+" is a mode string; it truncates the file (or creates a new one if it doesn't exist)
|f| is a block. Basically it means that in the following code f refers to the file.
A quick example of a... |
Forum: Ruby Apr 22nd, 2007 |
| Replies: 5 Views: 5,848 For some reason the rubycentral site seems to be down so the original (http://www.rubycentral.com/book/ospace.html) article I'd link to isn't available, however it's in the google cache... |
Forum: Database Design Apr 18th, 2007 |
| Replies: 2 Views: 9,485 UNIQUE is a constraint applied to tables that ensures that all values in the given columns are unique. If you try to insert a existing value the you will get an error (along the lines of 'insert... |
Forum: Ruby Apr 16th, 2007 |
| Replies: 29 Views: 10,345 The rails framework is based on Basecamp |
Forum: Ruby Apr 12th, 2007 |
| Replies: 3 Views: 13,228 You need to give more information. What do you want to be selected and when?
If you want a default value put
t.column :favourite_colour_id, :integer, :default => 1
in your migration.
If you... |
Forum: Python Apr 11th, 2007 |
| Replies: 6 Views: 1,964 Vim is all you will ever need. |
Forum: HTML and CSS Apr 11th, 2007 |
| Replies: 5 Views: 1,563 I don't think it is possible; javascript has no control over the cursor. |
Forum: Web Browsers Mar 28th, 2007 |
| Replies: 5 Views: 1,697 Or you could just use Firefox or Opera? |
Forum: Ruby Mar 8th, 2007 |
| Replies: 2 Views: 5,431 quick example using action_mailer.
If you don't have it already gem install 'action_mailer'
require 'action_mailer'
ActionMailer::Base.server_settings = {
:address =>... |
Forum: Window and Desktop Managers Feb 27th, 2007 |
| Replies: 3 Views: 5,791 Do you have a c compiler installed?
if not do :
sudo apt-get install build-essential |
Forum: MS SQL Feb 19th, 2007 |
| Replies: 13 Views: 27,638 duplicate of what? all duplicates? why don't you have a unique identifier? do you have any validation? why are you here? why am i answering you? |
Forum: Oracle Feb 7th, 2007 |
| Replies: 3 Views: 5,320 Your problem is that you are not specifying a column to join on.
What do the two tables have in common? What is it about a record in table A that means it should be placed next to a record in... |
Forum: *nix Software Jan 30th, 2007 |
| Replies: 3 Views: 2,206 What version of wine are you using?
Does autodetect in winecfg work? |
Forum: Pascal and Delphi Jan 18th, 2007 |
| Replies: 9 Views: 4,331 Does TDate not provide the functionality you require? |
Forum: Existing Scripts Jan 15th, 2007 |
| Replies: 5 Views: 7,597 What exactly was the problem you're having with FCKEditor?
Of the open-source ones FCKEditor and TinyMCE seem to be the best for general development and Kupu is geared at Zope/Plone and that... |
Forum: *nix Software Dec 8th, 2006 |
| Replies: 2 Views: 2,090 right click file -> properties -> open with -> select firefox (if its not there click add and find it)
also check out the preferred applications option in desktop -> preferences menu.
dunno why... |
Forum: IT Professionals' Lounge Sep 30th, 2006 |
| Replies: 10 Views: 4,298 if you can't find it try
whereis irssi
or
locate irssi |
Forum: Pascal and Delphi Sep 7th, 2006 |
| Replies: 2 Views: 3,360 |
Forum: MySQL Aug 22nd, 2006 |
| Replies: 3 Views: 43,320 select *
from table
where date >= [start date] and date <= [end date]
or (i'm not 100% sure if this works in mysql but it does in postgres!)
select *
from table
where date between [start... |
Forum: Windows NT / 2000 / XP Aug 21st, 2006 |
| Replies: 4 Views: 1,260 this (http://windirstat.info/) open source app may be of use to you.
similar programs for mac (http://www.derlien.com/) and linux (http://www.methylblue.com/filelight/) |
Forum: Python Aug 15th, 2006 |
| Replies: 3 Views: 2,566 |
Forum: Windows 95 / 98 / Me Jul 31st, 2006 |
| Replies: 7 Views: 1,637 It actually boots linux from the CD. It won't touch your Windows install but will simply mount your hard drive as a desktop icon. From there you just need to navigate to my documents (or wherever... |
Forum: Windows 95 / 98 / Me Jul 31st, 2006 |
| Replies: 7 Views: 1,637 My advice would be to get hold of a knoppix (http://www.knoppix.com) cd, obviously as your computer is in a state you may need a friend with broadband to download and burn it.
You can then boot... |
Forum: MySQL Jul 24th, 2006 |
| Replies: 8 Views: 10,691 No problem. I when you said 'i have two servers' I assumed you were talking about work.
If you're starting I recommend this (http://php.about.com/od/learnphp/p/learn_php_free.htm). Also, the php... |
Forum: MySQL Jul 24th, 2006 |
| Replies: 8 Views: 10,691 $connection = mysql_connect(IP_ADDRESS_OF_DATABASE_SERVER:PORT_YOU_SET_MYSQL_TO_LISTEN_ON, DB_USER, DB_PASS)
or die("Query failed : " . mysql_error());
$db = mysql_select_db(DB_NAME,... |
Forum: MySQL Jul 23rd, 2006 |
| Replies: 8 Views: 10,691 Just set the host parameter of the mysql_connect function to the IP address of the other server. You'll also need to open the MySQL port (3306) on the other server if it's closed |