pty 882 Posting Pro

Hi,
I am trying to understand MySQL as i am new to this and i have a few queries I am having problems with and I was wondering if anyone can help me with it.. How would you solve this problem using the Select, from, where etc commands.
For example if you were to Find out what the average cost of all the books in a book table is, how would you write it.. and also how to find out which book cost the MOST in a book table, how would you write it.. I have tried to write what i have thought but its not giving me any answer at all.. I am using MySQL query.. Thank you so much in advance for your help

You should be using the avg and max functions.

So to get the average price

select avg(price) from books;

or the most expensive

select title, max(price) from books group by title order by max desc

/you may need to alter these slightly for mysql - i use postgresql these days

pty 882 Posting Pro

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?

pty 882 Posting Pro

maximum no of column in a table

If you have any where near that many columns you've done something wrong.

pty 882 Posting Pro

LOL, then I rather be without games

I got steam/cs working no problem using the latest wine in ubuntu.

wine SteamInstall.exe then followed the install wizard.

Only thing i had to change was ALSA/OSS settings then it worked fine

What version of wine are you using?

pty 882 Posting Pro

What color is yours?

I've had my 2G iPod for 4 and a half years now and its still going - battery only lasts about 4 hours from its original 8. When I got it hardly anyone knew what it was. Now every tom dick and harry has one; even people who are not interested in technology/gadgets.

All the other MP3 players I've tried just don't feel as well made, have more difficult navigation and worse UI. The 'extra features' like radio, various recording options and stuff don't interest me.

As a mac user iPod just fits in seamlessly.

A few years ago when I was a student I'd mess round and tweak with everything; now so long as it works and I don't have to mess round with it I'm happy. Amazing how priorities change once you have to actually do some work :)

pty 882 Posting Pro

Once upon a time I've seen a software that handles company telephone calls, gives different privilages to different staffs and record informations concerned about telephone call.

Now I'm thinking to develop such type of software. But dear colleagues I need to know something from you. Does such software requires assembly language? or Can I perform it using vb.net or any other higher level software without lower level language?

Regards,

Ben.

Sorry, I'm jumping to conclusions here but:
a) You are probably not clever enough to write it.
b) Asterisk probably does (most of) what you want and is open source.

Love pty

pty 882 Posting Pro

Oops take out teh puts (i tested it in irb with system ls printing the output)

#!/usr/bin/ruby

loop do
  system("wget http://....")
  sleep 1
end
pty 882 Posting Pro

I have to make a cluster of 64-nodes to boot from a network instead of booting from their hard drives, the nodes must initialize themselves from the netwrok(Server) and then boot from their repective hardrives.(m talking abt a linux cluster here)

Can any one help me in this?
or Suggest any useful links?


Thanks,
Rida

http://www.knoppix.net/wiki/Cluster_Live_CD

pty 882 Posting Pro

Hii everybody,
I'm working on a charting Senior project for my graduation and i'd like anyone to help me finding an open source code for drawing business stock charts in VB.net, PHP or HTML languages
Thank you for being helpfull :)

Is this the sort of thing you're after?

http://gnuplot.sourceforge.net/demo_4.1/finance.html

pty 882 Posting Pro

give this a go (untested but it should work)

#!/usr/bin/ruby

loop do
  puts(system("wget http://...."))
  sleep 1
end

just modify the wget to suit your needs

pty 882 Posting Pro

Please i kind of need a quick help on how to plot polynomial graphs using c++.

http://www.gnuplot.info/

Have fun.

pty 882 Posting Pro

I don't think there is anything wrong with updating two tables using two statements.

If you wrap them in a transaction you will ensure that you don't only update one (ie if one fails neither are committed).

pty 882 Posting Pro

Two good sources to learn from:

Ruby Central

ROR on Wikipedia

Also :

Try ruby in your browser!

Why's Poignant Guide (a lighthearted and fun introduction to the language

pty 882 Posting Pro

I didn't read the whole thread so I dunno if this has already been mentioned but I use pokerroom.com's java client. Its pretty decent

pty 882 Posting Pro

hhey any body knows how to upload a file or image in database and retrieve it,i know i have to use file column and rmagcik but dont know how to apply them,can anybody tell me step by step implementation.

thanx in advance,

This tutorial explains how (I presume you're using rails and not radicore or something else)

If I were you I'd only store the location of the file in the database and store teh actual file on the filesystem - it will help your database performance.

pty 882 Posting Pro

Thanks for the new forum.

I think it may be worth relocating this thread to it (its regarding Rails with Lighttpd

http://www.daniweb.com/techtalkforums/thread49454.html

pty 882 Posting Pro
ALTER PROCEDURE UpdateAccounts
@contactID int,
@accountID int
AS
begin transaction
  UPDATE [Contact Account ]
  SET [Account ID] = @accountID
  WHERE [Contact ID] = @contactID

  UPDATE [Other table]
  SET [Account ID] = @accountID
  WHERE [Contact ID] = @contactId
commit transaction
pty 882 Posting Pro

The only 3D I ever thought was a nice feature for websites was for real-estate; virtual tours through homes.

A 3D store sounds like something I probably would've used VRML for. Does anyone even use vrml anymore?

Now the 3d buzz is around Second Life. This sounds like something someone would make there.

For the record I don't like 3d stuff unless I get to shoot people (counterstrike 1.6!!!). SL is clunky. VRML is clunkier.

pty 882 Posting Pro

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

pty 882 Posting Pro

I just tried to install AIM and got this error

libstdc++-libc6.1-1.so.2 is needed by aim-1.5.286-1.i386

any ideas?
I ran this cmd: ln -s /usr/lib/libstdc++-libc6.1-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
Not sure what it did, but the installation still won't work

Instead of the official AIM client use Gaim (it will already be installed on FC6).

For Radeon drivers have a look at this: http://www.fedorafaq.org/#radeon

It should get you up and running.

To be honest, if you get stuck maybe try Sabayon Linux, its Gentoo based but comes with ATi drivers preinstalled and uses the same installer as Fedora.

pty 882 Posting Pro

I suspect you are writing rather small systems programs, things most end-users will not see.

I can write a complete working non-trivial MS-Windows application in about 5 minutes with Visual Studio 2005 (actually, the IDE will generate it). How many days/weeks/years does it take you to write the same application in pure assembly?

Exactly

If I click some button in your application and it does XYZ, whether it does it in 0.01 seconds or 0.0001 makes little difference to Johnny end-user. It all seems instant. This is not where the bottlenecks are.

So I could spend a fraction of the time writing an application in something like VB.net or whatever, it may run slower and be less efficient with the processor BUT in the grand scheme of things it has negligible impact on worker/user efficiency.

From a company's point of view the answer is to write programs that are easily maintainable, flexible, portable and quite efficient and rather than making the program ultra efficient which costs developer time they'll throw extra hardware at it because its generally cheaper with more predictable results.

I've said it before and I'll say it again, people would be mad to write a large, complex application in assembly language.

Steve Gibson uses it as someone mentioned. For those who don't know he writes small utilities that highlight potential vulnerabilities in things or diagnostic utilities. His applications may be complex but they are not large and generally his applications …

pty 882 Posting Pro

@pty:

Who told you so?

Me. I did it for a couple of modules at uni. It was fun to learn and create simple programs but thats it.

Obviously you will blow the trumpet of it as you are linked to some IDE. I'm not saying its a bad thing. In some cases (as I've mentioned before) its very good and fast, but for every day development it just isn't productive.

pty 882 Posting Pro

I have thought of going with a Fedora version. The only problem I may end up running into is, the book we have is Red Hat 9. Are there a lot of differences between the two, especially pertaining to command lines? If not, I would probably benifit more from learning Fedora anyways.

The computer lab at the school has Fedora, and our prof. said if he counts a question wrong, but we know it will work in Fedora, to show him and he'd count it right.

I'm no longer a Redhat/Fedora user; the last incarnation I used heavily was FC4 which as I remember wasn't too different to RH9. Generally the fast paced development seems to be in the desktop environments and associated applications etc, under the hood the changes are more subtle and the tools mentioned in the book are very very likely to still be included in FC.

You're right though, it does make more sense to learn with the latest tools.

pty 882 Posting Pro

I hava a table that stores payment information, with invoicenumber int and part varchar, where part can be (1/1, 1/2, 2/2, 1/3, 2/3, 3/3, etc)

The thing is not all payments are related to invoices, so I have many null value for invoicenumber.

Is it posible to create a UNIQUE INDEX on (invoicenumber, part) that ignores NULL values on invoicenumber?

tks for any help

AFAIK MSSQL does not support partial indexes (like PostgreSQL, Teradata, Oracle etc).

You may be able to get the functionality you require using a indexed view.

pty 882 Posting Pro

This is completely wrong! Assembly language is very easy ;) and can be used to develop any kind of application. Have a look at this article and visit the WinAsm Studio site for a lot of free open source tools written in Assembly.

Regards,

Antonis Kyprianou

Assembly is very useful in some cases but writing large complex applications in it is crazy. It takes longer and is more difficult to write and is harder to debug than higher level languages and apart from in places that need a lot of optimisation it doesn't offset the extra time spent in development.

pty 882 Posting Pro

Hey guys,

I'm in a Linux class right now; never used Linux before. I was given a copy of RH9 with my book and have it installed but can't load my nic on it. I go to terminal and type /sbin/ifconfig eht0 up which works. But then I try to use the dhcpcd command and it says command not found? could someone give me a hand? I have a Dell laptop with integrated nic.

Out of interest how old is your Laptop? RH9 is about 4-5 years old (2002 - 2003?). It may be worth getting hold of a later version (after Redhat 9 the releases were known as Fedora Core - Fedora Core 6 is the latest).

I realise it is dodging the problem but I'd imagine FC6 will automatically set up any Dell NIC automatically.

You can get it free here. If you don't have broadband there are links on distrowatch.com to companies who will send the disks for about $5-10.

I've been in the position before where I couldn't get something working and usually these things are fixed in later versions.

pty 882 Posting Pro

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?

pty 882 Posting Pro

I keep my eye on a few (aside from the ones on Daniweb) including:

Miguel De Icaza, Michael Robertson, Guardian Technology

I don't like blogs without focus and just read ones about technology/IT.

I spend most of my time on Digg, Reddit, /. and the Reg and more and more of the content linked is from blogs.

pty 882 Posting Pro

Can someone help.
I need to find the sco openserver licence version on our server.
I tried going into "scoadmin" .... it only gives the licence number... not the version number. I know we are on Openserver 5 but Ima not sure whether it is version 5.2 or 5.4.....

:confused:

scoadmin --version

or

scoadmin -v

I don't know if thats what you're looking for, not really a SCO expert. Don't see much point in learning either cos IBM are going descend on them before long

pty 882 Posting Pro

Righteo. I know viruses are very rare on mac OSX but lately I have been experiencing problems. Sometimes the fan will be running really fast & loud like there's no tomorrow when I'm not doing anything particularly amazing, just browsing the net. It never used to do that.

Normally the mac switches the fan on when I'm using my software programme (In Design, Illustrator, Photoshop) I thought perhaps I had some kind of bug messing interfering. I've noticed that it has crashed a few times too, something it's never done before. I wondered whether it may have something to do with downloading music files from Limewire but I don't think it should as I'm notified if I'm downloading a corrupt file.

If you're on Tiger it could be spotlight indexing in the background (I get that with beagle on linux from time to time).

If its Limewire thats slowing stuff down (could well be, the win version was infested with spyware nasties) I recommend tomato torrent. Low resouce usage and nice and simple. From what I remember Limewire was kind of crappy on Windows (but been a good few years since I used it)

pty 882 Posting Pro

Hello, Sagar here.

I have an image that is captured from an inclination(approx 20 degrees). There are circles in that image which appear ellipses due to oblique view. So I want to apply corrections and want a 3D rotation of taht image. Can anyone help please ??? Thanks

Regards
Sagar
:?:

If you want automated image processing I suggest ImageMagick

pty 882 Posting Pro

You don't need AV on Mac OSX.

To install software you have to enter a password. So long as you think before putting your password in the little box your computer will be safe.

pty 882 Posting Pro

cms or blog? make your mind up.

if its more blogging stuff you want try wordpress (lots of users, lots of plugins, easy to set up)

for more full blow cms stuff i'd recommend joomla and plone

pty 882 Posting Pro

Hi
By mistake, I hit "reply" on an email sent BCC to my Hotmail . It's really going to hurt someone else. Any chance of retrieving it?
(As you can tell, I'm not an IT genius, but really need the help !)
Thank you

Nothing you can do really.

pty 882 Posting Pro

Hi!
I have just worked out why it didn't work... the editor wants the code all on one line... strangely the output from the editor is not on one line... hmmm...

I also changed code for editor to:

<script type="text/javascript">
<?php 
print "var oFCKeditor = new FCKeditor('FCKeditor1');
  oFCKeditor.BasePath = '/FCKeditor/';
  oFCKeditor.Value = '";
  include('../test/test.html');
  print "';
  oFCKeditor.Create();"; ?>
</script>

Ah, nice one. I wouldn't have thought it'd cause a problem

pty 882 Posting Pro

Well. the resultant productivity of an editor has got to be a combination of its ease of use and its functionality... and unless I'm in the dark here, I know of no features in VI that make it any more than a text editor - please correct me if it does have mystical hidden features.
But even if it does; it is certainly not easy or friendly to use. I used it for a very short time and only to edit configuration files... then I pressed some key combination and it opens everything in write-lock mode =P
I'd rather use MSDOS edit, it's got a nice old-school color scheme and drop down menus ^_-

Give vimtutor a try - it gets installed with vim on most distros and gives you a quick rundown of the goodies.

vim is the most productive editor I have ever used; I use it every day and would feel lost without it.

pty 882 Posting Pro

Hi,

im running this website,,,worked so hard on it for about 5 months straight. i got it finally up and runnin, and the first 3 months went smooth.

all of a sudden my MySQL DB drops...every table inside...just GONE.

my site went down and error messages were received throughout my entire perl application.

Is there anyway I can see if this was an attack? Was it a problem on my host side ( i have asked them but no response yet)?

I've been programming with PERL for about 5 years and know how to prevent SQL Injections.

Or I could be wrong...who knows. But another reason why i dont think its my programming side is that the user I connect to my database with, does not have any "DROP, or DELETE" privileges...so I don't know how my ENTIRE database tables have dropped.

J/w , what should I do and what procedures can I run to find out what went wrong. This is my first time experiencing such a thing.

Thanks,
Bobby

Have you checked the logs?

Is this db on your own machine or hosted?

Did you take a backup?

pty 882 Posting Pro

What is wxGlade?

wxGlade is a interface builder for wxWidgets.

They copied the look/layout from Gnome's Glade (which designs GTK GUIs)

pty 882 Posting Pro
pty 882 Posting Pro

I have been dumped 23 times

If you were THAT bad looking you wouldn't have had chance to be dumped that many times.

pty 882 Posting Pro

In my opinion all things that can be ordered should be treated the same, so you'd have a table of orders, a table of items (this can include cars), and a table of categories (cars, parts, gifts etc)

orders --< order_lines --- items >--- categories

orders: order_id, customer_id, date
order_lines: order_line_id, order_id, item_id
items: item_id, name, description, weight, price
categories: category_id, name, description


From a data point of view this should be cleaner; if you need to store different information about items you can always add another table in with info specific to that category (ie engine size, number of seats etc)

pty 882 Posting Pro

Okay, I am extrememly new to all of this, but I need some serious help!

My sister accidently bumped the plug to my computer out of the socket, causing my computer to powerdown, of course. This isn't the first improper powerdown, but for some reason, my desktop won't load anymore.

Everything starts off fine. I am running Linux 5.0.59 which I am told is also called Five-0?! I have a Mirus computer but I'm not really sure of all the specifications, as I bought it from a friend. I had it checked out by the tech guys at my college and they were rather impressed. I know there's a Sempron AMD processor. But I was also told that this shouldn't matter with a problem like this.

My computer loads on the usual blue screen giving me the option to
1 run Linspire 5.0.59 on /dev/hda1
2 Redetect
3 Diagnostics

I have chosen Redetect and Diagnostics out of curiousity, but nothing seems to be wrong. Both run a long line of text that I do not understand, ending with red text that says 'Detect script /etc/devices/det_order/D05detect_modules

When I run startup as usual, I get the light blue Linspire screen with a status bar at the bottom. The bar fills about 25% of the way and freezes. I have left the machine on for hours and there's no further progress.

Any ideas?

Would booting with the original Linux CD affect anything?

PLEASE EMAIL jnall321@gmail.com

Thanks

Hi, I'm afraid I'm not …

pty 882 Posting Pro

In no particular order :

  • Nick Drake - Bryter Layter
  • REM - Automatic For The People
  • Marvin Gaye - Whats Goin' On
  • A Tribe Called Quest - The Low End Theory
  • The Stone Roses - The Stone Roses

I have a varied taste and there are at least 15 others that almost get into the top 5 and my top 5 would probably vary day to day.

pty 882 Posting Pro

Does TDate not provide the functionality you require?

pty 882 Posting Pro

VB express is free
VB6 costs like £10 for working model
and i gotthe whole of VS 2005 Standard edition on an acedemic licence for £40

Delphi is priced similarlay (personal is free, Delphi 5 (which came out at roughly the same time as VB6 costs peanuts) and the latest educational licences of Delphi cost about 50 quid.

We are straying from the thread; having used both though (am sure other people who have used both environments will agree) that with Delphi it is easier to produce good code and it gets you into good habbits, not to mention the fact that its a LOT faster and has proper OO capabilities, a better UI than VB6 (MS poached the guy who lead the project to make VS and .net) and is just generally a better product/language/way of life.

pty 882 Posting Pro

I just tried AbiWord for the Mac (been using it for years on Linux) and it is impressive; looks just like a Mac app should.

Anyway to set it to Finnish just open it (it defaults to US English), click file -> new from template and find the one that ends in fi_FI

Then click file, save as, and save the empty file in your documents folder as 'normal' as a template file (awt)

Now just copy to Library/Application Support/AbiSuite/templates and every time you open a document it will be in Finnish.

You can change the interface to Finnish in the preferences and voila.

pty 882 Posting Pro

and VB is?

pty 882 Posting Pro

I'm not terribly familiar with OpenOffice/NeoOffice's more foriegn features, but NeoOffice should support just about everything that OpenOffice supports. Quote from the website:


So as long as you were using OpenOffice 2.0.3 or earlier, NeoOffice will include a Finnish spellcheck.

Abiword should support Finnish no problem; I checked on their site and they don't provice any extra files for the Mac so I presume it uses the built-in OSX checker.

I'll check when I get in from work - Linux only here I'm afraid

pty 882 Posting Pro

Hello everyone. After 15 months without a job I have been offered a trial run in a......flour mill (water wheel included, but they don't use it). If I get the job I'll as close as matters be "Living off the land", something that has become somewhat rare in my country. I'll finally be able to follow my hippy ideals :p . Nice one, hey?

Steven.

Did you ever see the kids tv show Camberwick Green?

Windy Miller just used to set his mill going then drink cider until he was slightly bladdered and lie asleep outside his mill all afternoon, they probably would deem it unsuitable for kids these days actually.

Made me want to be a miller.

pty 882 Posting Pro

I guess the last contract I worked on left a bad VB6 related taste in my mouth.

If you want to start with something like that I'd recommend Delphi - at least it will get you into good habbits and your code may have a chance of not looking slightly spaghettiish