Wikipedia:Reference desk/Archives/Computing/2007 January 18
Computing desk | ||
---|---|---|
< January 17 | << Dec | January | Feb >> | January 19 > |
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. |
January 18
editpixel software
editIs there any software (*free*) that can calculate the number of pixels in an image of a certain color? I don't want trials or demos or cracks (warez). --hello, i'm a member | talk to me! 00:40, 18 January 2007 (UTC)
- First thought I have is maybe a script for the Gimp? There might be one out there that can do what you're looking for. --Brad Beattie (talk) 01:06, 18 January 2007 (UTC)
- I may have misunderstood your question, but the number of pixels in any image file is just its dimensions multiplied together. So, for instance, a 1024x786 picture will have 804864 pixels in it, which is about 0.8 Megapixels. You can get the dimensions of any image in Windows by right-clicking on it, selecting "Properties" and then looking through the tabs until you find the info (on Windows 2000 it's in the "Summary" tab, but it will be somewhere else on Windows XP, which I currently don't have access to). — QuantumEleven 09:06, 18 January 2007 (UTC)
- I think you have. From what I understand, "Member" wants a program or other solution that will count how many pixels in a certain image have, say, a specific shade of blue. Harryboyles 10:21, 18 January 2007 (UTC)
- Open in The Gimp (which is Free Software). Click Dialogs, Histogram. Highlight a range of colour shades - there are "count" pixels inside the selection and "pixels" pixels total. --h2g2bob 18:36, 18 January 2007 (UTC)
Most common words
editWhat is the easiest way to find the most common words in a large text file (Windows), I can move the text around to excel or word or anything, but I don't see a tool for doing this. Thanks, Xcfrommars 01:10, 18 January 2007 (UTC)
- There are many different ways to do it. Without knowing your specific level of experience with those apps, the best start is probably for you to search for:
"word frequency" (excel or word)
- in your favorite search engine or on Usenet. This will turn up many links. NoClutter 01:26, 18 January 2007 (UTC)
- I started dabbling in python programming language and after about 2 days of learning and playing around wrote my 1st program which did exactly this, it wasn't hard. I actually ran it on the entire text of Frankenstein. Worked like a charm, a list of every single word and how many times it was used, then you can put it back in excel and sort it alpha or frequency. :) Jump on my user page if you are really interested in doing this. Vespine 06:05, 18 January 2007 (UTC)
Acer problems
editHiya all! I recently acquired an Acer Aspire without a cd-drive. I put in an old one and started to suffer problems. My fan kept turning on and off, the screen wouldn't turn on and the computer kept beeping-none of this happened before. So I took the cd-drive out but the problems persist. Any idea what is wrong? Cheers! Lenadi 01:18, 18 January 2007 (UTC)
Did you knock out any of the wires or anything when you put in the cd-drive/took it out? The problem could lie with the fact that you may have messed up some electrical configuration/power cable. (It happens). Root2 01:34, 18 January 2007 (UTC)
- Sounds like the cd-drive may be sucking up more power than can be supplied. The weirdest problems are always with the power supply. --Zeizmic 12:51, 18 January 2007 (UTC)
Microsoft Excel
editIs there any way to restore a deleted column in an Excel document after it has been deleted? 24.128.226.22 01:44, 18 January 2007 (UTC)
- Only by clicking undo - but if it has been saved and closed, the undo will not work, unfortunately. :( --BenC7 02:24, 18 January 2007 (UTC)
Facebook: Can I see who is viewing my account?
editOut of pure curiosity, I am interested in who looks at my facebook profile. Is there any hack/mod/way to see who clicks on my profile? I know that facebook has fixed all recent glitchables, like adding html code in certain areas to create myspace-like backgrounds...but is there any way to have a profile view tracker? Thanks! 140.180.21.169 04:01, 18 January 2007 (UTC)
- I don't believe that's possible, sorry. Chris M.
- C'mon, there has to be SOME way...okay and if not, I'm also curious...say you were to devise some way to track this...what would be the most feasible way to do so? Tracking IP addresses and linking to computer information? Using facebook's own information covertly? I guess I'm asking, how do most tracking programs do their job? 140.180.21.169 04:20, 18 January 2007 (UTC)
- The only way would be to have access to Facebook's servers. It would involve reading which IP is accessing a particular user's pages, and reporting that to another page/system. However, that only tells you when the page was last accessed. There is no way to tell how long someone has it up on their screen.
- Plus, that only tells you the IP. You'd have to do some personal digging to find out who that belonged to, which likely involves a subpoena to the ISP in question.
- In short, the only way is if the folks who run Facebook offer that service themselves. Which is not likely to happen, as the sheer overhead involved would likely bog down their servers for little gain. -- Kesh 04:49, 18 January 2007 (UTC)
- I highly doubt that all of the XSS holes have been fixed. But I do have an idea for "most feasible" method. The cookie header information for your session (inexplicably including your email address) is sent externally to advertisers like advertising.com and atdmt.com with each page request so you could work out a deal with those shameless ad companies to give you their log data for your profile page :) Or raid their data centers or something.. --frothT 07:08, 18 January 2007 (UTC)
- I've never used facebook, but is there any way to display an image (or any other sort of file) which is stored off-site? If you could do that, it would be pretty simple to harvest that sort of information. --140.247.240.75 21:45, 18 January 2007 (UTC)
- All the images easily displayed on facebook are uploaded, and thus impossible to use for tracking purposes. Were it possible to, through some careless coding on Facebook's part, embed an HTML reference to an offsite picture on a server whose IP logs you were able to access, the call to the image might give you the user's IP, or it might just give you Facebook's own. The point is probably moot, since user-editable fields are unlikely to let HTML through.
Database software ease-of-use
editWhy is database software always so much harder to use than word processors, spreadsheets or any of the other staples of an office suite? Is there any full-featured database software specifically designed to be intuitive for novices to use? NeonMerlin 04:46, 18 January 2007 (UTC)
- Databases are built around manipulating the information they're given, rather than just making it look pretty like a word processor does. It takes planning to create a database that will do what you want it to. The easiest database programs are going to be things like Filemaker Pro or Microsoft Access, which give you a nice front-end to arrange items in, and drag-and-drop scripting. If you need something more powerful, you're going to be sacrificing ease-of-use. Either way, it's going to take some learning. The best thing might be to download one of the demos for those programs, and follow their tutorials to get the feel for it. -- Kesh 04:53, 18 January 2007 (UTC)
- You could argue that using a word processor is an electronic offshoot of writing on a piece of paper, so the concept is much easier to grasp. When you are creating a database you are creating something entirely virtual, which takes a different way of thinking and advanced planning. You could argue that an Excel sheet could be a simple database (after all, what's a database other than a large collection of data?), but dedicated database programs are designed to give you the power to manipulate very large and complex datasets, so for very simple datasets they may seem overly complex. — QuantumEleven 09:01, 18 January 2007 (UTC)
- The best physical analogy for a database that I have found is in cardfiles, such as the sort you might store addresses on. The problem is that what you are really doing in a relational database of any complexity is creating a number of cardfiles which are all related and reference one another, can be manipulated at the same time and with great speed. But as a starting metaphor it works pretty well, which is why Filemaker Pro probably arranges their interface around it. --140.247.240.75 21:43, 18 January 2007 (UTC)
- Databases are usually a pain in the neck because data usually requires the creation of both a data structure from scratch (the tables) as well as an interface (the forms, the front-end, etc.). Both of these are time consuming tasks which require considerable advanced computer knowledge to correctly, especially if your forms are more complicated than simple data-entry fields (i.e. if you have to do any scripting). There are some programs which try to make this "easier", but that usually means that they use very simplistic (non-relational) database formats and are not very flexible. Additionally, I don't think most people think in terms of databases, which require a very specific sensibility about how to best divide information into discrete categories. Someone who is an old hand at database programming can tell you immediately how to set up some tables to do a certain function, what types of fields you need, etc., but this is in my experience never intuitive to people new to databases. (I say this as someone who has been a SQL and Access programmer for some 10 years now, and who has spent a lot of time trying to teach people the basics of database organization.) --140.247.240.75 21:41, 18 January 2007 (UTC)
- You might be looking for knowledge mapping software, which is a "natural" form of database. TheBrain is a good example of such. Droud 23:33, 19 January 2007 (UTC)
How many?
editHow many e-mails on the Internet are being sent each day (average)?--69.236.29.100 05:22, 18 January 2007 (UTC)
- Our Email article doesn't have an answer. I suspect this would be very hard to guess, since there are so many factors involved, like emails from and over corporate networks, automated emails, spam emails with thousands of recipients, all that kind of stuff. Whatever it is the number must be huge, I wouldn't be surprised if on average every man woman and child on the planet was getting 10 emails a day. But that is in no way authoritative.
- I agree - the average number of emails per person must be at least 10. I personally get well over 3,000 emails a day (and if I'm lucky, one of them is not spam). So, with a 10/day average, my email account covers 299 other people who don't get any email. I'm sure there are many others who have it worse, like [email protected] or [email protected]. --Kainaw (talk) 06:35, 18 January 2007 (UTC)
database management
edit1. what are the 4 main references between a file processing system and a DBMS?
2. Pls. explain the differences between PHYSICAL and LOGICAL DATA INDEPENDENCE.
3.
- Do your own homework - or at least rephrase it so that it doesn't look like a homework question. --Kainaw (talk) 06:33, 18 January 2007 (UTC)
- And that's not out of anal requirements, it's as a service to wikipedian volunteers and to show that you aren't just totally disregarding our guidelines --frothT 07:02, 18 January 2007 (UTC)
- And even if you did get an answer here, it might be different from what your specific instructor is expecting, based on whatever course materials you should be studying. NoClutter 22:24, 18 January 2007 (UTC)
- The answer could also be incorrect, on purpose. You have to wonder... Droud 23:37, 19 January 2007 (UTC)
- And even if you did get an answer here, it might be different from what your specific instructor is expecting, based on whatever course materials you should be studying. NoClutter 22:24, 18 January 2007 (UTC)
- And that's not out of anal requirements, it's as a service to wikipedian volunteers and to show that you aren't just totally disregarding our guidelines --frothT 07:02, 18 January 2007 (UTC)
Defective hard disk/drive?
editI've been using an internal hard disk for some time, but recently I tried to force a manual defragmentation (I'm on Windows). After a few seconds, this returned an error (Failed to start, etc ...). Checking the Event Log, I discovered that the "disk" driver had been throwing bad block errors like crazy. They'd usually come in twos or threes about 3 or four minutes apart. This has been going on (If the Event Log tells the truth and nothing else) since November 16th. Now, I know this means that I need to look at getting a replacement for it before it croaks, but does anyone know about how long I have, so to speak? 68.39.174.238 15:27, 18 January 2007 (UTC) (Note: This is not the operating system drive, just a data holding drive)
- Maybe try a little scandisk to see if it helps? yandman 16:37, 18 January 2007 (UTC)
- Scandisk (The c—p new Windows NT version) does nothing. 68.39.174.238 17:09, 18 January 2007 (UTC)
- FYI, most of the useful (pre-NT) scandisk functions have been taken up by chkdsk. I suspect you may already know this (since you sound fairly well-informed), but if not the relevant command here would probably be chkdsk c: /r /x. Replace c with the appropriate drive letter, /r attempts to repair the disk, and /x will unmount the drive to prevent access conflicts. ~ 69.41.32.12
- I heartily recommend SpinRite which will fix almost anything, short of the disk being physically damaged. Oskar 17:11, 18 January 2007 (UTC)
- That's not the (problem?), the disk still works and everything can be accessed, what I'm interested in is the likelyhood of proximate failure. I can get a new drive fairly soon, but is it "teetering on the brink"? If that's the case, I'd like to know so I can take (near) immediate action. 68.39.174.238 23:29, 18 January 2007 (UTC)
- What you want is a utility that will read the "SMART" information off the disk. SMART monitors the drive and can predict when problems are becoming severe. There's a number of programs available to do so. -- Kesh 23:40, 18 January 2007 (UTC)
- That's not the (problem?), the disk still works and everything can be accessed, what I'm interested in is the likelyhood of proximate failure. I can get a new drive fairly soon, but is it "teetering on the brink"? If that's the case, I'd like to know so I can take (near) immediate action. 68.39.174.238 23:29, 18 January 2007 (UTC)
- Any kind of disk failure is a recipe for eventual disaster, get a new hard drive ASAP --frothT 03:43, 19 January 2007 (UTC)
I agree with the above. Any type of funny business with disk drives is a plea for help! --Zeizmic 13:25, 19 January 2007 (UTC)
With respect to all of you: I'm going to get a new disk drive today if I can, a SMART monitor I'm checking out doesn't report anything really wrong, and I'm going to run SR6 on the old one when I'm through here in a minute. Thanx. Now, I have one last question: Is the disk drive in question good for anything now that it's throwing all these errors? 68.39.174.238 15:17, 19 January 2007 (UTC)
- It's good for anything where it doesn't matter if the data vanishes tomorrow. Things like a local copy of Wikipedia, or rips of your CD collection, or temporary storage of things you're about to burn to a DVD. --Carnildo 21:47, 19 January 2007 (UTC)
- "A local copy of Wikipedia" ? I don't think that's useful for much of anything, and I don't have a CD collection or a DVD writer. Would a swapfile work? Also, I ran SR6 as suggested, it turned up a 3 errors and fixed them, and now I'm running a "random stress-test" on it and have gotten two more event log errors. 68.39.174.238 02:19, 21 January 2007 (UTC)
Question regarding PHP
editHi im new to using php. I have a script that takes a table from a mysql database and displays it in html in a web browser. A scheduled printout of what the browser displays needs to be performed every day.
I'd like to know if theres a php function that automatically sends the output to be printed as it would appear in a browser without any human interaction?
Preferably id like to be able to do this without writing to external text files.
Any help is appretiated!
- Sends the output... where? To a printer? To an e-mail address? Whose printer? On the computer that hosts the PHP script, or elsewhere? That needs to be clarified, as the answer hinges on that. Generally speaking you will require something other than PHP to do the printing, i.e. it could output the data to HTML (or to a PDF, or whatever) and then some other program would have to open the HTML or PDF and send it to the printer.
- The easiest way to do this that I can think of is to have a computer set up to check a given directory for files, print whatever is there as soon as something goes in there and then delete the file. PHP would then have to find a way to put the file into that directory, which could be accomplished a number of ways (it could connect via FTP, it could send it via e-mail, etc.). But all of this would require some scripting other than PHP as well to work.
- As to how to make the PHP run automatically once a day or so, I believe you have to set it up a with a cron command of some sort, though I really know little about that other than I think that is the place to look. If you google "PHP cron" you'll see a number of tutorials as to how to get a script to run periodically without human interaction. --140.247.240.75 21:36, 18 January 2007 (UTC)
Yes, the computer that hosts the php script is to send the output to a network printer. Sounds like the cron command could come in handy. Thanks for your help.
AJAX wiki?
editDoes anybody know of a wiki software that employs AJAX, possibly even making it possible to do limited editing directly in the article WYSIWYG-style? TERdON 18:19, 18 January 2007 (UTC)
- Isn't that what wiki.com uses/d? 68.39.174.238 15:18, 19 January 2007 (UTC)
Remove Duplicate MP3 Files
editWhat is the best way to delete duplicate mp3 files before I put them on my Zune. I don't have any money for fancy programs. Any help would be appreciated. Thanks!
- Duplicate mp3 files? Just copy and paste... Sorry if i don't understand ur question... --|K.Z|Z.K| Do not vandalize... 03:53, 19 January 2007 (UTC)
I do believe your question is how to keep from putting the same song on twice. The easiest (and free) way I know of doing this is to import your library into iTunes. Once the songs are imported, go to View-->>Show Duplicates. Then, delete one of each of the file pairs shown. Go to your iTunes library, and move the remaining songs onto your portable music device. I am sorry this is slightly complicated, but it is designed to work with the iPod. Still, it works. Freedomlinux 06:59, 27 January 2007 (UTC)
decoder and encoder circuits in mediaplayer
editHello sir/mam, I want to know how encoder and decoder circuits are used in mediaplayers.I also want to know about their other applications. Hoping for an immediate answer from your side. Thank you, Niraj Brahmkhatri
Please be more specific. What exactly do you want to know? Encoder and Decoder circuits in mediaplayer do the exact same thing that they do in modems, in network cards, in graphic cards, in just about any thing that sends and retrieves data. The encode and decode data, that is make them transmittable via the ether. There are no other applications for encoders and decoders than to, well, encode and decode. Aetherfukz 15:54, 24 January 2007 (UTC)
Problems with video player.
editI am having problems viewing certain media videos on the net. The only time it happens is when I try to watch documentries from Kevin Sites in the Hot Zone through Yahoo. I get a green screen but I can hear the audio. I have problems no where else. I have tried downloading codeks and even downloading an updated version of Windows Media Player. Is there something I am missing> I assume other people can watch it. Thanks!
- You need a different codec then. Try just using VLC. --frothT 18:51, 18 January 2007 (UTC)
Cyber Squatting
editI recently purchased the domain names .net, .org, .biz and a couple others that were similar to a company that competes with my business. They obviosly have the .com. I begin to recieve emails that were supposed to be sent to them, but were instead sent to the .net. Being a good person I forwarded these on to them. My question is what is the best way to go about selling them these additional domain names. I would assume they have an interest. I asked with one of the forwarded emails if they had an interest and they did not respond. Am I being stupid?
- This is against the terms of your contract with ICANN, and I believe they have a board that your competitor can report you to and get all of those domains transfered to your competitor at your expense. Bad idea. --frothT 18:50, 18 January 2007 (UTC)
- Yeah, have you seen Cyber squatting? It's basically extorsion and something was done about it. If I were you I'd cut my losses and maybe donate those names, because it is quite possible you didn't hear a reply on account of your messages being passed to the company lawyers. Vespine 00:46, 19 January 2007 (UTC)
- Just maybe.... we are being hasty and s/he had a valid reason for getting the other domains beforehand? If so it wouldn't be so wrong to offer them for sale, but then again I suspect what the others said is right from the way you posed the question. Mathmo Talk 00:08, 29 January 2007 (UTC)
Problems with HashMap keys
editI'm having problems with HashMap keys in Java. The Map interface says two objects will be considered the same key if their equals() method returns true for each other. However, this seems not to be enough. It seems that the objects must return identical values from their hashCode() method, and return true from their equals() method.
I tested this with a custom class as the HashMap key. It overrides both hashCode() and equals(), with System.out.println() calls in both. It looks like HashMap first calls hashCode(), and if it returns a different value from an existing key, it won't even bother calling equals(). Otherwise, it calls equals(), and if it also returns true, it concludes that it has found the right key.
To me, this doesn't look consistent with the description of the Map interface. And I'm even using Sun's own Java implementation, version 1.5 or 5.0 or whatever it's called nowadays. Not GNU's or Microsoft's, but the one from Sun themselves. JIP | Talk 19:45, 18 January 2007 (UTC)
- Part of the contract of
Object.hashCode()
requires that if .equals() returns true for two things, then their .hashCode() must be the same. (The converse is not required.) So whenever you override .equals(), you must also make sure to override .hashCode() in a way that satisfies the contract. --Spoon! 20:54, 18 January 2007 (UTC)
- If it helps illuminate the situation at all, consider a
HashMap
with a few thousand keys in it. Is the map supposed to ignore the distinct hash code from your object (which is supposed to help it narrow down which keys might match) and go and test against the thousands of extant keys withequals()
? If so, why do you even provide hash codes? (See hashtable if you don't know the answer to that.) --Tardis 21:44, 18 January 2007 (UTC)
- If it helps illuminate the situation at all, consider a
- Thanks for the answers. That makes sense. But it still looks like it's contradictory to what is said in the Map interface, where it says that it is enough for the keys to compare true with equals(). JIP | Talk 07:18, 19 January 2007 (UTC)
- To quote the docs on the Map interface:
- Many methods in Collections Framework interfaces are defined in terms of the equals method. For example, the specification for the containsKey(Object key) method says: "returns true if and only if this map contains a mapping for a key k such that (key==null ? k==null : key.equals(k))." This specification should not be construed to imply that invoking Map.containsKey with a non-null argument key will cause key.equals(k) to be invoked for any key k. Implementations are free to implement optimizations whereby the equals invocation is avoided, for example, by first comparing the hash codes of the two keys. (The Object.hashCode() specification guarantees that two objects with unequal hash codes cannot be equal.)
- In particular, notice the bold part. I'd imagine the only reason they refer to equals() is that this would be what must be used ultimately, as two identical hash codes don't have to refer to two identical objects. --Pidgeot (t) (c) (e) 17:16, 19 January 2007 (UTC)
- To quote the docs on the Map interface:
- Thanks again. I just concentrated too much on the part above "(key==null ? k==null : key.equals(k))" and though it was the only test the implementation was required, and allowed, to make. I guess there's not much point of a hash map which doesn't use the hash codes. The hash code comparison is done first to determine where the key is even supposed to be, but even if it is found there, there must be a separate equals() check, because identical hash codes do not guarantee equality. There can be Map implementations that aren't hash maps, or use hash codes. One example which comes immediately to mind is an implementation that stores the keys in a simple, ordered list. This means that searching for a key is an O(n) operation, whereas in a hash map it is O(log n), if I'm not mistaken. JIP | Talk 18:00, 21 January 2007 (UTC)
- Hashtables (and thus
HashMap
s) have (on average) lookup(!). Binary search trees have the lookup you're thinking of; sometimes they're better anyway because they don't require hashcodes (just a total order operator) and you can automatically iterate over elements in sorted order. --Tardis 16:33, 22 January 2007 (UTC)
- Hashtables (and thus
Timer Sever Suggestion
editI work at a public library and the software used to manage the computers available to patrons (CyberStar Timer Server) is horribly buggy, crashes, and freezes up all the time. Have any suggestions for a cafe timer sever type program that could used to manage the time used for around 12 PCs? I've found some but they all seem so expensive and loaded with features we don't need - any simple, cheap, software you can recommend?
- I have a different suggestion, why not use those electrical plug timers normally used to control lights ? I'd just use them to control the power to the monitors, so they don't actually lose anything when the monitor goes blank. That way, if they forgot to save their term paper, or whatever, they can beg the librarian on duty for another minute so they can save it. You could have all the monitors plugged into extension cords that go to the librarian's desk, where the outlet timers are used. Of course, the patrons could unplug the monitors from the extension cords and plug them in elsewhere, if there are extra plugs available and easily accessible. I don't think most people would do that though, as that's "crossing a line". StuRat 02:46, 19 January 2007 (UTC)
Excel to Inkscape
edit10 brownie points to whomever can come up with the easiest way to get an Excel chart into Inkscape as a vector graphic (bitmap options don't count, since I'd have to redraw the chart). Options I have considered:
- Cutting-and-pasting said chart into Illustrator, exporting as SVG, opening in Inkscape (downside: requires using Illustrator, which I don't want to do even though I have it, as it is not on the computer I will be doing this on most of the time)
- Opening Excel data into Openoffice.org Calc, creating a graph there, exporting to SVG, opening in Inkscape (downside: Calc doesn't support round data points that are vectors. That's a real down-side to me, because that means if I want to have round data points, which I usually do, I have to replot them all manually in Inkscape. Which makes one wonder why I'd want to be using Calc in the first place. Calc's graphing tools generally suck, as well, and give less flexibility than Excel, which itself also does suck.)
OK — with those out of the way, any other ideas? Inkscape currently doesn't import PDFs, so I can't export to PDF and re-import it (unless I do the Illustrator approach again). I really like to touch up my graphs in Inkscape (as Excel's formatting leaves a lot to be desired), but getting things into Inkscape is a royal pain in the ass at the moment, and if anybody can come up with a clever solution I'd be very happy. --140.247.240.75 21:10, 18 January 2007 (UTC)
- This guy thinks you should just use Inkscape. Is that an option? Anchoress 13:17, 19 January 2007 (UTC)
- Sometimes, but with complicated data sets I would rather a program do it rather than trying to calculate it all myself. For some plots it is reasonable, for some it is not. I might as well just import it as a bitmap and trace over it if that's what I was going to do, which doesn't speed things up for me at all. --24.147.86.187 15:58, 19 January 2007 (UTC)
- OK, that site finally worked for me, and I don't think it is helpful. It basically says that to use an Excel graph in LaTeX you need to convert it to EPS or PDF format first. But Inkscape can't read EPS or PDF, last I checked. If it could read PDF well then it wouldn't be such an issue, since I could just print the graph to a PDF. But alas, I cannot. --24.147.86.187 23:22, 20 January 2007 (UTC)
Syntax Highlighting Editor - how can I colour words??
editI'm developing a java 'Syntax Highlighting Editor' - it spots some language keywords as soon as they are typed in and colours them. The data on how they should be coloured comes from a config file I openend and saved in a dedicated data structure. I need to know: 1) how to format words 2) how to colour a word in a text editor 3) which method I should use to manage the event 'press a key in an editor'--Raggiante 23:08, 18 January 2007 (UTC)
- First, just so you know, there are many editors that support what you want already. (Obviously, if you want to make a better mousetrap, go right ahead. Just don't think it's not available.) As for your questions:
- I have no idea what you mean here, except perhaps that you don't know how to format the config file. Since you don't have an unreasonably large amount of data to store, you should just use a human-readable plain text file, perhaps something as simple as a keyword on each line. However, you might want to make it a bit more complicated (perhaps have a "Keywords" header, then the keywords, then "End keywords") because you can then extend the file format more easily. You might also want to look into such things as regular expressions to define your highlighted constructs more powerfully.
- How to apply a color to a word depends entirely on how you're displaying it; some media (e.g., black and white printers) don't support it at all, while others (e.g., the "intelligent" computer terminals) recognize escape sequences in the text you send them and apply them. Other times you have a programmatic interface that supports operations like "render text here" and "set current color" and you have to combine those in the obvious way. As a guess, you're writing this editor in Java (since even if you meant the editor is for Java you must be interested in the language) and want it to be graphical; then I'd suggest looking at the online API documentation, particularly the relevant Swing classes.
- You're asking about the fundamentals of event-driven programming, which you should read about. Then, again, look at the relevant documentation. --Tardis 03:18, 20 January 2007 (UTC)
Digital clock strangeness
editI have a 1985 Cosmo time E-508A LCD alarm clock. It's been acting in the most strange and unusuall manner that I was wondering if anyone knew what the symptoms meant. Basically, when it gets power after an outage, it blinks 12:00 (Normal), but when it's been set to the correct time, either stays constant (Normal) and later starts blinking again (The correct time, not 12:00), or wont stop blinking when it's set (Again, it'll show the correct time, but it'll flash at the same time). Finally, it just stopped counting at all, rather just displaying a certain time. Anyone have any idea what the root cause of this is (Bad component, loose connection)? 68.39.174.238 23:37, 18 January 2007 (UTC)
- I'd go with a loose connection. They typically have either a battery or a capacitor so they don't lose the time during short outages, but they aren't nearly as accurate on backup power, so blink to tell you to check the time. If it starts blinking for no apparent reason, I'd say that means there was a short power outage, probably caused by a loose connection. If the loose connection gets worse, it may keep time worse and worse, then stop, then go blank. To be honest, if you've gotten 22 years out of a digital clock, you should probably just consider yourself lucky it lasted that long and go get a replacement. If you're really attached to the clock, I suppose you can have a qualified electrician unplug it, take the cover off, and look for any loose connections. They may be able to solder it together so you can get another 22 years out of it. StuRat 02:28, 19 January 2007 (UTC)
- I've done so myself and discovered the reason: the capacitor plague has claimed another victim! The bottom plug was cracked and has spewed stickly dried electrolyte all over the place! 68.39.174.238 15:20, 19 January 2007 (UTC)
- I see. You could clean it up with a cotton swab and some alcohol, then replace the capacitor, if you really want to salvage the clock. StuRat 00:34, 20 January 2007 (UTC)
iTunes DRM
editI love the iTunes music store because they have the largest collection of high-quality songs and it works great with my iPod. However, I absolutely hate --and can't stand-- DRM of any kind. I want to be able to use my music the way I wan't on any device or computer I own. Pretty much like the freedome I get from store-bought CDs. Is there any SIMPLE software that will convert iTunes songs I buy to regular MP3s on the original "authorized" computer at a decent quality? If it can be done in batches that's a plus.
- hymn (software) might work... 68.39.174.238 01:25, 19 January 2007 (UTC)
- This is what you want. I feel exactly the way you do. By the way, that software rips the AAC data stream, you still need to convert it with audacity --frothT 01:38, 19 January 2007 (UTC)
- There's a free software called SUPER that might work. You can convert it into any format you want, although the quality is very bad if u pick a low bitrate. The website is here. [1] Note: It says u need a fast computer but u can ignore that. I have a computer from the 90's and it still works. Download is at the bottom, after u go through all the info. Hope it helps! --|K.Z|Z.K| Do not vandalize... 03:48, 19 January 2007 (UTC)
- You could always just burn your files to CD (RW would be best, 'cos you can wipe it and use it again), and then rip the CD. You might lose a bit of quality though. --saxsux 13:37, 26 January 2007 (UTC)
- A "bit"? Seeing as iTunes songs are themselves not terribly high bitrate, this sounds like an insanely bad idea.--Frenchman113 on wheels! 15:59, 28 January 2007 (UTC)