Jump to content

Wikipedia:Reference desk/Archives/Computing/2008 April 28

From Wikipedia, the free encyclopedia
Computing desk
< April 27 << Mar | April | May >> April 29 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


April 28

[edit]

is this a virus?

[edit]

hello

I found this link on an imageboard but Im scared it might be a virus (some ppl said it was). I dont have any good scanning tools so could someone who knows what there doing please check it for me. Ive just reinstalled and really dont need to end up with a trojan rite now. thanks -anon —Preceding unsigned comment added by 189.61.80.239 (talk) 01:26, 28 April 2008 (UTC)[reply]

It'll be unlikely you'll find any candidates who would be willing to run the file (since it's an .exe file). Probably best if you don't run it either. - Akamad (talk) 04:07, 28 April 2008 (UTC)[reply]
I advise that you avoid sites called "EvilShare.Com" altogether. Supposedly what does this program in question do? What made you want to click on it in the first place? Also keep in mind that any info you received could be misleading or outright false (as are with most viruses and trojans). — Kjammer   08:44, 28 April 2008 (UTC)[reply]
Also, if I run it with m ClamXAV and it reports negative, that does not mean that the file is COMPLETELY safe. I don't think the file would harm me directly but the results I give may be inaccurate The program might be a new one. I agree with Kjammer on this one. Please avoid it if possible. Kushal 12:06, 28 April 2008 (UTC)[reply]
It's a password-protected self-extracting RAR archive. No way to tell what's in it. --Carnildo (talk) 20:56, 28 April 2008 (UTC)[reply]
I wonder how long it will take to unlock it with brute-force search (in an automated way). Kushal 02:08, 29 April 2008 (UTC)[reply]
lol. warez? -212.227.114.82 (talk) 23:47, 28 April 2008 (UTC)[reply]
I found this link on an imageboard
this link on an imageboard
an imageboard

'Nuff said. Ziggy Sawdust 16:28, 29 April 2008 (UTC)[reply]

Database languages vs general programming languages

[edit]

I am trying to understand the differences between Database- and General programming languages and could not find comparison and contrast papers with Google or Wikipedia. They are probably overlapping (progressively), but I am guessing at that. Does anyone have an explanation of the fundamental differences? Zaqry (talk) 01:45, 28 April 2008 (UTC)[reply]

What do you mean by "database language"? Are you referring to the scripting capabilities of common databases, such as Oracle and Postgres? Are you referring to languages that nearly meld the database into the programming language, such as Mumps? Are you referring to something completely different, such as calling SQL a "database programming language"? It is difficult to provide an answer that you want without knowing what you are asking. -- kainaw 02:48, 28 April 2008 (UTC)[reply]

My question is naive:

I am aware that calculations on finite data sets are commonly done in spreadsheets and that large and growing data sets are often stored in databases and operated on with a "database language" or "database programming language". I have used a few "office" database programs over the years but only for very brief periods. Recently, I have used Matlab for some unrelated data analysis programming. A related question: Would a programmer ever use a general programming language to manage a "database" and not bother with a "database programming language"?

Does this clarify my question? Zaqry (talk) 03:41, 28 April 2008 (UTC)[reply]

Usually you use specify types of query languages to get data from the database. For example, let's say I was making a PHP driven website that used a MySQL database. That means that the website itself will be written in PHP, a scripting language, and that language then will occasionally say to the database, "give me these records that I want." The way it says that is in SQL. It's not so much a programming language as a query language; you couldn't make an entire program out of SQL, it's just a very convenient way to query data stored in certain types of databases (and is quite powerful, in terms of being able to read and modify the database). If you look up PHP and MySQL hybrids in particular (as they are quite common) you'll see how it works—the SQL query language is just a string of text (SELECT * FROM myTable WHERE myField=myValue, etc.) that is passed to a database object, usually, and the database object returns results depending on the query you've passed to it. --69.110.41.71 (talk) 06:10, 28 April 2008 (UTC)[reply]

Thank you. I am realizing that languages are often combined. I worked in a robot experiment where the programmers combined "C" and TCL to run the robot. When analyzing data with Matlab, the data were in files and opened one-at-a-time or sequentially in loops. Maybe a scaled up operation would use a database and associated "language" to access those "files" in different ways, and feed the computational analysis in Matlab (or some other language). Zaqry (talk) 07:25, 28 April 2008 (UTC)[reply]

SQL is a query language, not a programming language. It is used to work with data inside databases. Of course, some databases do not use SQL. They use their own query language. MS Access uses JetSQL - which is not SQL. You can use SQL by itself to work the data. Most databases have a client program that allows you to type SQL statements and work directly with the database. However, most projects involve putting data in a database and creating some form of report on the data. A separate program (written in some programming language such as C, C++, Perl, PHP, Fortran...) is normally used to validate the data, normalize the data, place the data in the database, and then pull out numbers for a pretty report. The report itself is commonly in a markup language such as HTML or PDF. As you can see, while all of these are languages (query languages, programming languages, markup languages...) you cannot arbitrarily call a query language a programming language. It just confuses things - especially since many databases have built-in programming languages for running programs inside the databases when the data is altered. -- kainaw 12:25, 28 April 2008 (UTC)[reply]
"...many databases have built-in programming languages for running programs inside the databases when the data is altered" Are these called "database programming languages"? Zaqry (talk) 17:13, 28 April 2008 (UTC)[reply]
No. They are normally called "procedural languages" due to Oracle's usage of the name "PL/SQL" and Postgres then adopting "PL/pgSQL". The difference is that you can write programs in external programming languages and use them inside the database. Those are normally compiled as libraries or modules that you can call from your SQL statement. It is a confusion area where the differences are very tiny, requiring language to be very exact. Usage of "database programming language" is the most confusing because it is difficult to tell if it is SQL, PL, or some language that has a built-in database on the backend. -- kainaw 17:48, 28 April 2008 (UTC)[reply]
Embedding SQL is quite common. That's where you use a general programming language which contains SQL statements that are then submitted to a DB. There can be some fancy interface running the program, maybe over a web site, that then uses the embedded SQL to go out and select records from the DB, and possibly also modify, store, create or delete them. For example, an online clothing retailer might have a pic with people wearing their retailer's clothes. If you pick on an item in the pic, the general programming language identifies the item's ID number then submits an SQL query to the database for the full info. This info is returned to the general purpose programming language which then displays it to the user. StuRat (talk) 21:37, 28 April 2008 (UTC)[reply]

First OOP language - Python ?

[edit]

I am looking for a first object-oriented programming language for someone (not myself) who has not done any programming before, but is computer-literate, knows their way around a spreadsheet, and is a quick learner with a very logical mind. Criteria are:

  • Low cost, low maintenance and ability to get real results quickly are important.
  • Just a sandbox application, so long-term support, standardisation etc. not an issue.
  • Should not encourage too many bad habits, just in case the learner goes on to do some serious programming - but should not be too pedantic either.
  • Learner prefers to self-teach, so wide availability of learning materials, on-line documentation, source code examples and templates would be good.
  • Learning environment will be MS Windows, but not planning to do anything very OS-specific or low-level.

Does Python tick these boxes ? (I have read Python and Comparison of programming languages) Gandalf61 (talk) 13:02, 28 April 2008 (UTC)[reply]

Many universities use Java for this. You can get results quickly (popping up a window is relatively easy). Everything is object-oriented - even a Hello World program. The syntax is very close to C/C++. So, if the user wants to step over to the C/C++ world it is primarily a matter of just learning about memory management. The big drawback is that Java is bloated and slow. I believe it is licensing that requires you to package the entire JRE for any Java application as opposed to only including what you need. But, if you are just learning, it doesn't matter. Also, you can download and use Eclipse, a free IDE for Java that, if I'm not mistaken, is written in Java. -- kainaw 13:27, 28 April 2008 (UTC)[reply]
Isn't Python good enough for learning programming oneself? I understand that a tiny fraction of the operating systems (OS X and some distros of Linux) do come with Python IDE preinstalled. (Please let me know if I am mistaken.) Kushal 20:48, 28 April 2008 (UTC)[reply]
I use Python all the time, because I find Python very easy and fast to code in. I never really got to grips with Java, so I can't say much about that. I would say C is a very useful language to know - it teaches you how a computer thinks about the world, but it requires a lot of effort to code anything useful in it (but if you're inclined towards C, give Allegro a look). Most programming languages have a free version, so that's not really an issue.
A huge advantage with python is its interactive shell: you can test a module or a line of code and see if it works. I don't use an IDE for, but I use a text editor with syntax highlighting. Python deals with OOP in a slightly different way than C and Java, but I think still covers all the OOP concepts. But it also has some very nice functional programming ideas in it, like list comprehension, which make tranforming lists of data easy.
Python's official documentation is pretty dire in my opinion - download a copy of Dive into Python or getting a book out your local library is a good idea. It's also less strictly typed than C and Java, which is a mixed blessing.
Almost all Linux distributions come with Python pre-installed. OS-X is Unix-like so it may well be on there. Incidentally, OLPC uses python very heavily. --h2g2bob (talk) 22:46, 28 April 2008 (UTC)[reply]
I do not disagree that Python is good for simply learning to program, I do disagree that it is good for learning object-oriented programming with the end-goal of programming in the mainstream C++ language. You can write fully functioning code in Python and never know much about object-oriented programming. The syntax has little in common with C++. So, you may very well end up being a great Python programmer, but never reaching the end goal of being a great C++ object-oriented programmer, which is what I believe the questioner wants. Of course, I could be completely wrong. -- kainaw 00:31, 29 April 2008 (UTC)[reply]
Thanks to everyone for your responses. I am going to go with Python, because the interperter provides an interactive learning environment, and I like the "batteries included" and "everything is an object" language philosophies. Gandalf61 (talk) 09:28, 30 April 2008 (UTC)[reply]

I needs help with Lunar Magic

[edit]

Okay, i made my own custom ROM file, made an IPS patch with Snestool and used it on the original file, and it still doesnt work with zsnes. Any suggestions on what i might be doing wrong?the juggresurection IstKrieg! 14:12, 28 April 2008 (UTC)[reply]

What exactly did you "customise"?F (talk) 12:53, 2 May 2008 (UTC)[reply]

Warcraft:Orcs vs. Humans

[edit]

I play Warcraft on Windows 98, but I can't seem to get any sound. I have to pick my sound card from a list, but my sound card isn't on there. IS there any way to get sound short of buying one of the sound cards on that list? --AtTheAbyss (talk) 14:41, 28 April 2008 (UTC)[reply]

Have you read the offical techsupport on this [1]? Algebraist 15:29, 28 April 2008 (UTC)[reply]
Try installing DosBox and play it in there, then you can both get sound and dump that horribly outdated OS with something nicer or much nicer. --antilivedT | C | G 05:12, 29 April 2008 (UTC)[reply]
Actually, the windows 98 is the replacement for my Windows XP computer, which died. I got the windows 98 for free, and I plan on using mostly for internet when I get the UToledoNet hooked up...if I ever can. --66.213.36.2 (talk) 15:07, 29 April 2008 (UTC)[reply]
Are you the OP? If Windows 98 does everything you need then it's fine, but otherwise the fact that it's free is meaningless - you need something that does. If you had a Windows XP computer which died then I suppose you have a spare copy of XP, and Linux is free so you can either dual-boot it with 98 or replace it entirely.
I'm not sure if DosBox works on Windows 98, but if it does it should solve all of your problems.
Did you try picking a few cards from the list and seeing if they work? This is a possibility if they are similar enough to yours. What card do you have, by the way? -- Meni Rosenfeld (talk) 17:52, 29 April 2008 (UTC)[reply]
I bought the computer (the XP) refurbished, so I don't have teh XP disk. It was never taken out of the box though before I got it; the person who bought it originally sent it back, so I got a $1500-$2000 for $500 odd bucks. That's worth not having the disk (or it was when the XP computer worked). And I did pick soundblaster and it worked! Thanks guys and gals! --AtTheAbyss (talk) 13:26, 30 April 2008 (UTC)[reply]

Voyager game

[edit]

I was playing Star Trek Voyager Elite Force the other day. When your in the virtual voyager mode, if you shoot crew members after a short while the game ends and you end up in the brig, even with godmode on. How can I continue on my murderous rampage for longer? xxx User:Hyper Girl 15:53, 28 April 2008 (UTC)[reply]

Xbox 360 Arcade Model

[edit]

Hi - I am currently considering getting myself a 360-Arcade and would like to know a few more things about the Arcade...I have looked at the official site (http://www.xbox.com/en-US/hardware/compare101.htm?WT.svl=nav) and found out that most of the stuff that is 'missing' from this cheaper model is stuff I don't plan on using - headset/network cable (just an ethernet cable?)/av cable (HD - I don't have a hd tv)/HDMI digital cable/old xbox game compatibility. I'm just looking for one that will play all current-gen 360 titles, I don't plan on owning many games - probably just GTA 4, NHL and then just cycling through the 1-player games such as Bioshock/Vegas 2 etc. Oh and I never play online. I know wikipedia ain't the greatest place to ask this question but if there are any 'fatal' flaws i've not seen i'm sure you guys would say. Just wondering if for my 'needs' this model is any good. It's a lot cheaper for me if it is! ny156uk (talk) 16:16, 28 April 2008 (UTC)[reply]

iPod manager

[edit]

I have a new pc with Vista and I had iTunes on the old machine. The problem is that I lost the iTunes CD so I need something for the new pc. Is there any freeware that you guys might recommend? I'm only interested in uploading songs to the iPod and creating playlists. Zain Ebrahim (talk) 17:31, 28 April 2008 (UTC)[reply]

If you still want to use iTunes you can just download it here, no CD necessary. — Matt Eason (Talk &#149; Contribs) 17:48, 28 April 2008 (UTC)[reply]

Winamp will do it if you wish to move away from iTunes, but only with an older 5.5G or older iPod. The Classic, and the Touch won't work with it. —Preceding unsigned comment added by 212.219.8.231 (talk) 13:06, 30 April 2008 (UTC)[reply]

As matt pointed out, iTunes IS freeware. If you are planning on mainly using your music player to manage your iPod, I'd recommend sticking with iTunes. --Shaggorama (talk) 18:36, 2 May 2008 (UTC)[reply]

InnoDB Index making things slower

[edit]

I posted this post on the mysql forums, and in an attempt to gain better understanding, I'm asking here (since no one responded over there).

I've been working with large databases lately and I am working on optimizing them to the max. All of my production databases are in 3NF or 2NF. My main problem is with the number of rows, ie 5 million +, on 3-4 column tables.

In my ventures, I tested using an index on an innodb table versus not using on on a myisam table. For small tables, an index was preferred. However, I have noticed some pecularities that have left me flabbergasted. Below is a snippet of a test case I ran.

The following was run on a zone in solaris 10. Nothing else (other than basic services) are running on this box. The table named emailmonitor.mailstats was used to quickly get me date strings (it already had 1.3 million dates in it). the Value column is nothing special. Please note the table names when looking at the time stamps & other commands, as they are similar.


==BEGIN MYSQL==
mysql> create table ino_index(id int primary key auto_increment, date char(14), value int) engine=InnoDB;
mysql> create table ino_no_index(id int primary key auto_increment, date char(14), value int) engine=InnoDB;
mysql> insert into ino_index select null,date,23 from emailmonitor.mailstats;
mysql> insert into ino_no_index select null,date,23 from emailmonitor.mailstats;
mysql> select count(*) from ino_no_index;
+----------+
| count(*) |
+----------+
|   139877 |
+----------+
mysql> create index date_index on ino_index(date);
mysql> show index from ino_no_index;
+--------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table        | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+--------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| ino_no_index |          0 | PRIMARY  |            1 | id          | A         |      140183 |     NULL | NULL   |      | BTREE      |         |
+--------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
1 row in set (0.01 sec)

mysql> show index from ino_index;
+-----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table     | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| ino_index |          0 | PRIMARY    |            1 | id          | A         |      140183 |     NULL | NULL   |      | BTREE      |         |
| ino_index |          1 | date_index |            1 | date        | A         |       46727 |     NULL | NULL   | YES  | BTREE      |         |
+-----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+

mysql> explain select AVG(value),date from ino_no_index group by date order by date;
+----+-------------+--------------+------+---------------+------+---------+------+--------+---------------------------------+
| id | select_type | table        | type | possible_keys | key  | key_len | ref  | rows   | Extra                           |
+----+-------------+--------------+------+---------------+------+---------+------+--------+---------------------------------+
|  1 | SIMPLE      | ino_no_index | ALL  | NULL          | NULL | NULL    | NULL | 140429 | Using temporary; Using filesort |
+----+-------------+--------------+------+---------------+------+---------+------+--------+---------------------------------+
1 row in set (0.00 sec)
mysql> explain select AVG(value),date from ino_index group by date order by date;
+----+-------------+-----------+-------+---------------+------------+---------+------+--------+-------+
| id | select_type | table     | type  | possible_keys | key        | key_len | ref  | rows   | Extra |
+----+-------------+-----------+-------+---------------+------------+---------+------+--------+-------+
|  1 | SIMPLE      | ino_index | index | NULL          | date_index | 15      | NULL | 140258 |       |
+----+-------------+-----------+-------+---------------+------------+---------+------+--------+-------+
mysql> select AVG(value),date from ino_index group by date order by date;
[...]
19652 rows in set (2.58 sec)
[[and then i repeated 4 times:]]
19652 rows in set (2.53 sec)
19652 rows in set (2.66 sec)
19652 rows in set (2.68 sec)
19652 rows in set (2.71 sec)

mysql> select AVG(value),date from ino_no_index group by date order by date;
19652 rows in set (2.05 sec)
[[and then i repeated 4 times:]]
19652 rows in set (2.05 sec)
19652 rows in set (1.92 sec)
19652 rows in set (1.92 sec)
19652 rows in set (1.92 sec)
==END MYSQL==



SO, as you can see, these are certainly not desirable results. It seems that using an index for the date column has slowed things down. These results scale to the much larger tables i'm working with. I also ran the select queries with SQL_NO_CACHE and the results were the same.

Can anyone provide some insight as to why this is happening?204.154.43.246 (talk) 19:05, 28 April 2008 (UTC)[reply]

An index is primarily helpful if you use a WHICH clause on that column or columns, especially if it will only return a small portion of the results. This is because, without that index, it will be necessary to look at every row to see if it matches the WHICH clause. It does intuitively seem that the GROUP BY and ORDER BY clauses would also benefit from an index on that column, but not as much, since it's still necessary to retrieve every row. It appears, however, in this case, that any benefit is less than the additional overhead involved in carrying the index. StuRat (talk) 21:14, 28 April 2008 (UTC)[reply]
It's not much in the way of insight or objective data, but I have noticed myself that grouping functions (at least if they are operating on an entire table) are a lot slower for InnoDB tables than for MyISAM, while many other operations (single SELECTs, INSERTs, etc.) seem to be faster or about the same. I'm also curious to see any info people have about the reasons behind this. I understand some of the theoretical issues surrounding indexing from a data structures point of view, but I don't know much of the database design nitty-gritty nor am I sure where to start looking. --Prestidigitator (talk) 21:16, 28 April 2008 (UTC)[reply]

Time Magazine search engine

[edit]

Fifty years ago today, Walter O'Malley was on the cover of Time (http://www.time.com/time/covers/0,16641,19580428,00.html ). When I put Walter O'Malley in the search engine at http://www.time.com/time/ the cover story is missing from the results, which leads me to believe something is wrong with the logic and many articles are missing. I am able to find the cover story at http://www.time.com/time/magazine/article/0,9171,868429,00.html by clicking on the "Read the Cover Story" link for the cover image. However, I am trying to research Walter O'Malley online for his wikipedia article and feel that if I could figure out the error in the logic (probably related to the apostrophe) I might be able to find many other articles.--TonyTheTiger (t/c/bio/WP:CHICAGO/WP:LOTM) 20:40, 28 April 2008 (UTC)[reply]

You can skip the defective and substandard search engines at individual sites (Wikipedia included) by going to Google and specifying the web site to search. I did the following www.google.com search and found the cover as my first hit:
"Walter O'Malley" site:www.time.com
StuRat (talk) 21:03, 28 April 2008 (UTC)[reply]
More Google tips here --h2g2bob (talk) 22:11, 28 April 2008 (UTC)[reply]
Awesome.--TonyTheTiger (t/c/bio/WP:CHICAGO/WP:LOTM) 23:52, 29 April 2008 (UTC)[reply]