Search Results

Showing results 1 to 40 of 45
Search took 0.01 seconds.
Search: Posts Made By: pty
Forum: Database Design Jun 5th, 2009
Replies: 1
Views: 476
Posted By pty
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
Posted By pty
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
Posted By pty
Why revive a 2 year old thread?
Forum: Ruby Apr 15th, 2008
Replies: 5
Solved: Hi
Views: 3,148
Posted By pty
1
Re: Hi
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
Posted By pty
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
Posted By pty
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
Solved: c and postgres
Views: 2,474
Posted By pty
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
Posted By pty
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
Solved: mpeg uploading
Views: 3,149
Posted By pty
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
Posted By pty
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
Posted By pty
'Costs more money' does not automatically mean better.
Forum: DaniWeb Community Feedback May 11th, 2007
Replies: 7
Views: 1,146
Posted By pty
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
Posted By pty
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
Posted By pty
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
Posted By pty
"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
Posted By pty
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
Posted By pty
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
Solved: Team effort?
Views: 10,345
Posted By pty
The rails framework is based on Basecamp
Forum: Ruby Apr 12th, 2007
Replies: 3
Views: 13,228
Posted By pty
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
Posted By pty
Vim is all you will ever need.
Forum: HTML and CSS Apr 11th, 2007
Replies: 5
Views: 1,563
Posted By pty
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
Posted By pty
Or you could just use Firefox or Opera?
Forum: Ruby Mar 8th, 2007
Replies: 2
Solved: send mail
Views: 5,431
Posted By pty
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
Solved: C in Ubuntu
Views: 5,791
Posted By pty
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
Posted By pty
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
Posted By pty
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
Posted By pty
What version of wine are you using?

Does autodetect in winecfg work?
Forum: Pascal and Delphi Jan 18th, 2007
Replies: 9
Views: 4,331
Posted By pty
Does TDate not provide the functionality you require?
Forum: Existing Scripts Jan 15th, 2007
Replies: 5
Views: 7,597
Posted By pty
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
Posted By pty
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
Solved: Start Irssi?
Views: 4,298
Posted By pty
if you can't find it try


whereis irssi


or


locate irssi
Forum: Pascal and Delphi Sep 7th, 2006
Replies: 2
Views: 3,360
Posted By pty
application.terminate;
Forum: MySQL Aug 22nd, 2006
Replies: 3
Views: 43,320
Posted By pty
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
Posted By pty
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
Posted By pty
Forum: Windows 95 / 98 / Me Jul 31st, 2006
Replies: 7
Views: 1,637
Posted By pty
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
Posted By pty
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
Posted By pty
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
Posted By pty
$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
Posted By pty
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
Showing results 1 to 40 of 45

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC