Why revive a 2 year old thread?
EnderX commented: Quick response, accurate information. Quite nice. +1
Why revive a 2 year old thread?
i already installed ruby and in ruby directory contain fxri and Scite.
well, i m do small ex in fxri...
what is Scite for? what different about fxri and Scite? why i can't compile code in Scite?
i find compile in tools of Scite but it was disable.
example i write code in Scite :5.times { print "Odelay!" }
when i tried to compiled i can't do this perform. there are compile, Build,Go etc in tools option that i cannot perform to click, it was disable. i m confused.
But this code running great in fxri. so why i can't do compiled in Scite?
please helpThank you.
Did your source file definitely have a .rb extension? Did anything at all appear in the output window?
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 %>
It may give a clue as to what's wrong.
I have a Database which is dealing with a book library system. I have a table which has a has a field dealing with the ReturnDate of a book. I was wondering if it is possible to do a SELECT statement that would return the the fines due on an overdrawn book at the database level instead of me having to do it in a Java environment.
In words what I want done:
IF (ReturnDate > CURDATE())
(ReturnDate - CURDATE()) * FineThanks in advance
Paidi
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 the syntax is going to be slightly different in MySQL (i think you should use now() instead of current_timestamp but I can't remember)
Shes running 32 bit Vista Hoe Premium...
Don't let her know that you're saying such things on the internet!
/i am immature.
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, notepad++).
'Costs more money' does not automatically mean better.
All right, I'll admit it - I'm ancient enough to be from the "old" school. In my case, this means I am a textual learner - I don't relate well to visuals.
Searching though the FAQs, I was delighted (and very appreciative) to find the list of Smilies - what they look like and - most importantly - what most of them actually mean! The one English acronym that puzzles me still is LOL - does this mean "lots of love" or "lots of laughs" or "lots of luck" or none of the above?
However, there are a number of different icons that show up to the left of the Threads in each forum. To me, these icons are meaningless - and they don't seem to relate to the optional icons that can be chosen when posting an entry.
For example, I posted a new thread in the Delphi/Pascal forum, and it shows up with something that looks (to me) like a pencil. What does that icon mean?
Question: is there a list of all of these icons and their meanings?
briskal
LOL stands for 'Laugh Out Loud'
I think the pencil icon means that you are subscribed (or have contributed to) that particular thread.
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";
}
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 still over a grand!
Thanks, these sites really helped a lot and answered my questions, but the last one also brought up one little one: in the second example the programmer used
File.open('game', 'w+') do |f|
What does the string
'w+'
do and
|f|
do please? Thanks once again for any help.
"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 simple block:
>> 5.times do |i|
?> puts i.to_s
>> end
0
1
2
3
4
=> 5
Hey, I'm learning Ruby and I've just about got it sorted. I have just one (or maybe more) question(s): What is marshal.dump and does it allow you to save data to a file outside of the Ruby program? If not, how do I create saved data (ie. character attributes inside a text-based game)? Thanks for answers!
For some reason the rubycentral site seems to be down so the original article I'd link to isn't available, however it's in the google cache.
Hi everyone,
What is the difference between UNIQUE and DISTINCT? It seems that they do the same thing.
Thanks,
Nick
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 violates unique constraint').
The DISTINCT command is used to return one instance of each value, for example if you have a table of names
select * from names;
forename
--------
Joe
Rory
David
Lee
Joe
Andrew
Andrew
David
select distinct forename from names;
forename
--------
Joe
Rory
David
Lee
Andrew
Uh, oh it would appear there is already a good ruby on rails PMS here: http://www.basecamphq.com/
The rails framework is based on Basecamp
can we use collection_select with :selected option if yes ,plz let me know.if not than plz tell me how to use select instead of collection_select and where to write query in select if i dont want to find all records.
thnx in advance.
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 are loading an existing record (for editing) the correct value should already be selected in the select box.
If you are still stuck please paste your controller and view code.
Hi all;
My question is which IDE do you recommend for editing Python codes on WindowsXP???
I've installed its interpreter(2.5) but I don't have any idea about the IDE.(except ActivePython)
Thanks for your helps...
Vim is all you will ever need.
Hi,
My question is on weather it is possible to move the mouse on a page after it has touched something. For example: Lets say some one moused over an image, after which the mouse would move down across a certain part of the page.
If it is possible how would I go around to doing that?
Thanks,
I don't think it is possible; javascript has no control over the cursor.
I have an Intel Pentium 166MHz w/MMX computer with 64 MB RAM and I use Windows 98. While attempting to renew my Norton Antivirus subscription online, the following message appeared: "Your browser is not supported because it is not considered secure enough to conduct an online transaction. Please upgrade your browser and then begin your session again." I use IE. Can anyone tell me how to upgrade it? Is that even possible with my old Windows 98 platform? Any help is greatly appreciated. Thanks.
janda5 :rolleyes:
Or you could just use Firefox or Opera?
how to send a mail using ruby..?plz help me
quick example using action_mailer.
If you don't have it already gem install 'action_mailer'
require 'action_mailer'
ActionMailer::Base.server_settings = {
:address => "your.smtp.server",
:port => 25,
:domain => 'yourdomain',
:user_name => "your_user_name",
:password => "shhhsecret",
:authentication => :login
}
class Emailer < ActionMailer::Base
def test_email(user_email)
subject "Free C1Alis"
from "system@example.com"
recipients user_email.address
body "Get large, #{user_email.name}!"
end
end
@email_addresses = [ { :name => "Bobby Ewing", :address => "bobby@dallas.com" }, { :name => "Ewing, JR", :address => "jr@dallas.com" } ]
@email_addresses.each do |e|
Emailer.deliver_test_email(e)
end
I have a problem ; that i can't compile and Run my C files in Ubuntu , so how can i do this??
Do you have a c compiler installed?
if not do :
sudo apt-get install build-essential
how to delete duplicate record in a table by using SQL query
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?
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 table B?
Usually on a join you would say something like
select pos.*
from person per
join posession pos [b]on pos.person_id = per.id[/b]
where per.id = 5
By not specifying what to join it links every tuple in table A to every one in table B, so you have A*B tuples returned.
If there is nothing in common between the tables (as I suspect if they are identical) the correct way of displaying the data would be to use a UNION.
select * from tableA
union
select * from tableB
This will give you A+B records back
I am trying to run a program in wine, and I need it to recognize my flash-drive's existance. Any help would be appreciated.
I did set e:: -> /dev/sda1 a couple of times, I also tried mounting it and e:: -> /media/usb-disk but to no avail. Once again, any help at all would be highly appreciated.
What version of wine are you using?
Does autodetect in winecfg work?
Does TDate not provide the functionality you require?
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 kind of stuff.
There are a few proprietary ones (a quick google will no-doubt find them) but I'd try the open ones first - you have nothing to lose that way and I'm sure one of them will do the job
Not really, just that I need to screw up my friend's computer at work. We're always attacking each other on the computer, but this time it's gone too far. He put a script on my computer so that every time I log on, the computer restarts, or logs off, making it imposible to log in. I have ways around it though, but I need something to mess up his computer bad enough so he can't figure it out and I have to help him, but not too bad so I don't get fired. Are there any suggestions for screwing his computer?
I wouldnt go around sabotaging computers; if I tried that here I'd be reminded not to forget my coat on the way out.
Ubuntu Linux (6.06 LTS):
I have Firefox installed as well as Epiphany, and Firefox will not open when opening HTML and bookmark files. I try to open an HTML file off of my desktop, and it opens Epiphany, even after changing the default browser to Firefox.
Help!
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 you want to change tho epiphany is faster, less memory intensive and fits in with gnome better :P
Ok, sorry for that, I will try to be more specific. I have installed it, but I cant find how to start it, i searched for it in the directorys you said but I still cant find it.
if you can't find it try
whereis irssi
or
locate irssi
I'm currently trying to create a program in delphi to call up a webpage; the page is written in php and records some data about its contents for record-keeping in my system. I'd like to be able to write the program so that when it opens it does the following:
1. Opens the webpage. I can do this, I found the code to open an application via ShellApi some time ago and it works just as well for a web url as for a file path.
2. Closes the webpage. I only really need to run the page once to do the job, and if the program can close the page afterwards it should. Again, I found some code on how to do this, so that's not really a problem, although I may need to build in a delay; as currently written, it doesn't like to close the page. This isn't critical though, it's merely my own personal aesthetics.
3. Closes the program itself. I know you can close a program with a single form (all this one has) by using the form.close procedure, except that this doesn't work when the statement is included in the form.formcreate procedure, and that's where I'm hoping to call it from.
Is it even possible to code my program so it fits this set of instructions, or should I start looking for a workaround?
Thanks in advance,
-EnderX
application.terminate;
Hello,
I was wondering if there anyway to Select rows where the date column falls into a certain range?
For example, heres a table
The date field is generated automatically by MySQL with the DATE function Heres the table: [user] . [wins]. [date] bobby.......4..... 2006-08-21 boby1.......3..... 2006-08-22 boby2.......6..... 2006-08-24 boby3.......1..... 2006-08-29
Now I need to filter this data out so that I can have the end user browse weekly results. I'm stuck on a SELECT syntax statement that can pull any rows from any dates ranging from 8-21 to 8-27 (Monday to Sunday this month).
If this was the case, the last row , boby3 who has 1 wins on 08-29 will not be displayed for this current week's result.
I already have this which ranks users OVERALL season wins:
SELECT user, sum(wins) from results GROUP BY user ORDER by winsDoes anyone know any referrences regarding this issue?
Thanks for reading this,
Bobby
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 date] and [end date]
>cls
when its hot i'd generally have a beer. my fridge currently is full of staropramen, leffe and some badger ale
at work i'll have either coffee or tea (yorkshire). i don't drink machine coffee or tea, or anything with non-liquid milk for that matter.
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 you store your stuff) and copy it somewhere safe for the time being. Once you've got your important things off you're probably best formatting the machine.
If you work in a company with an IT dept they'll already have a copy of knoppix around - most people I know do
It looks like this: http://www.linuxsoft.cz/img2/gamesknoppix/4.0.2/m05.png
When I start windows in regular or safe mode I get "explorer has caused and invalid page error in module browseui.dll", and that's as far as it goes. I've re-installed windows and got to the point where it was basically working but then all of the sudden it goes back. I've tried 8 times (not exaggerating) and I just can't get past that one point. I would just reformat but I've got several professional files on there that I really need to put onto disk. Any suggestions would be appreciated!
If all else fails, can I take my harddrive to someone to access and copy the files? I want to buy a new one anyway, my work files are the only thing dragging this on....
Thanks
My advice would be to get hold of a knoppix 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 the OS without affecting your windows install, Knoppix then mounts the windows drive and puts the shortcut on your desktop - this will allow you to salvage your important files (put them on a usb drive or save them in your webmail account or something).
I don't know how much RAM you have, Knoppix may be a big sluggish with less than 128mb (but it should still work).
Thanks a lot, that helps.
I am still learning php and my sql, heck I am still in high school and taught everything myself so I know I will make mistakes and not know many things. Also I need people who tell me i dont know this and that because that is what motivates me to learn:lol: ...
Thanks again
No problem. I when you said 'i have two servers' I assumed you were talking about work.
If you're starting I recommend this. Also, the php docs are always going to be useful as are the MySQL (and no doubt Apache) ones.
$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, $connection)
or die("Query failed : " . mysql_error());
I shouldn't be telling a programmer what 'host' means. Seriously; learn to walk before you run.
Try reading this
I have two servers and one of them have mysql db and one doesnt so is it possible to use mysql db in my other server while hosting my website on another. also if there is how would you do it with php.
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
Hello everyone,
I have a fresh install of dapper drake and I would like to change two things from the default behavior:
1) How do you change to a "single click" desktop?
2) Can this system "remember" the last logged in username and go straight to the password prompt?
Any pointers in the right direction will be appreciated.
1) in gconf-editor go into apps->nautilus->preferences and change click_policy to "single"
2) system->administration->login window; click the security tab, then tick enable automatic login and put your name in the box
I am having a problem with the resolution of my suse. I just installed it and everything seemed to be installed correctly. I reboot my machine and went through grub and chose the suse linux. At first, the splash screen, looked fine. Then it got to the login page, and it was all messed up, way out of proportion, but I could still login, even though I couldn't really see what I was doing b/c everything was so enlarged. When it logged in it still stayed the same. I tried fixing it by changing the background settings but I couldn't even see what I was doing. I can open my terminal though and see what I am writing. Does anybody know how to fix this? or should I try reinstalling it?
Thanks
what resolution should you have?
if you go into (off the top of my head... not used SuSE for a while!) YaST, then under one of the options (hardware, i think) should be Display/Graphics/Monitor or something of the sort.
That should launch SAX2 which is has options to change your resolution settings.
i bet what happened is you came from another site that had a certificate your browser trusted, then to come to daniweb you cleared everything after the https:// but didnt notice there was an 's' and typed daniweb.com on the end
the fact the certificate is not trusted just means that you don't have their certificate in your list of trusted ones, not that it is untrustable etc - you just have to import the cert if you decide to trust the company
if you use firefox it will display secure sites (https) as having a yellow address bar (ie only puts a small padlock on teh status bar)