Jump to content

Wikipedia:Reference desk/Archives/Computing/2009 October 19

From Wikipedia, the free encyclopedia
Computing desk
< October 18 << Sep | October | Nov >> October 20 >
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.


October 19

[edit]

Way to Shorten Load Times (Java)

[edit]

In a program that I am currently working on, I am loading a lot of data from text files. Is there something I can do in Java so that I do not have to load the data from the text files every time I run the program? Nkot (talk) 04:47, 19 October 2009 (UTC)[reply]

I don't know anything about Java, but I know how to ask programming questions, and you haven't provided enough information. Please post the actual code used to load the text files, and give us some idea of how big each text file is. If you're loading the Bible it's probably gonna be slow regardless...218.25.32.210 (talk) 07:29, 19 October 2009 (UTC)[reply]
That's really unnecessary in this case. Please don't bite the questioners - and if you don't know the answer - then don't answer. SteveBaker (talk) 12:28, 19 October 2009 (UTC)[reply]
Depending on the type of your data you could put it into a caching database, convert it into binary, or compress it. It might also be acceptable to keep it on a memory-based filesystem, eg tmpfs (this is very fast, with obvious drawbacks). --194.197.235.240 (talk) 08:28, 19 October 2009 (UTC)[reply]
One trick is to write an offline program that reads your data and writes it out as Java source code - eg into a pre-initialised array. You run that program just once (or whenever your data changes). Then you take the output of that program and compile it into your final Java program and voila! The data is already loaded when your program starts up. However, this may not save you a lot of time because the data still has to be pulled off disk before your program can start running...but it may save you time in looking up filenames and parsing the data. SteveBaker (talk) 12:28, 19 October 2009 (UTC)[reply]
Another thing to consider is whether you need all the data all the time. If you just need chunks of it, it may make sense to put it in a database.--Phil Holmes (talk) 13:38, 19 October 2009 (UTC)[reply]
If the data in the text file were some sort of structured data, I'd create a class with appropriate fields and then read the data into some container of objects of that class. If the objects were related to each other, some container like a tree or linked list might be useful, but if it were unrelated data, an array of some sort would probably do. If the data in the text file was not structured, but rather just like a big paragraph of text that you wanted to search, I'd probably read it into something like a StringBuffer, which is a class that already comes with Java. Good luck!20.137.18.50 (talk) 14:55, 19 October 2009 (UTC)[reply]
Make sure you are using Java's BufferedReader to read files from disk - this can save orders of magnitude by allowing the JVM to dynamically buffer (pre-load) the file in the fastest way possible while you use it. The Sun Java Tutorial has a good example of how to do this. Adding the single piece of code to wrap your FileReader with a BufferedReader can easily speed file access times by a factor of 1000x. (See Data buffer for conceptual explanation about why, and Java's IO documentation for details of Java's implementation). If your files are extremely large, consider a Memory Mapped File. I have used this to read binary files up to 9 terabytes; large files require some special buffer management. Nimur (talk) 15:17, 19 October 2009 (UTC)[reply]
I did something similar in the past. I sped up the process by writing a program that loaded all the data into array structures. Then, I serialized those array structures into strings and saved them to a file. Loading the serialized text back into arrays in the main program was MUCH faster than loading the data from the original data files. -- kainaw 17:47, 19 October 2009 (UTC)[reply]

Thanks, for the great answers! Nkot (talk) 04:55, 21 October 2009 (UTC)[reply]

How to search Google Scholar filtering out articles that are subscription blocked?

[edit]

Is there any keyword-colon-keyword (like filetype:pdf) in Google Scholar to only give result links that are not articles that require any membership or payment to read? I realize that this would filter out a large portion of the results. 20.137.18.50 (talk) 11:46, 19 October 2009 (UTC)[reply]

Filetype:pdf seems to give you only things you can access without subscription. It's probably not comprehensive (there are probably things you can access that aren't PDF, and are thus screened out), but it does probably give you a good number of them. --Mr.98 (talk) 12:46, 19 October 2009 (UTC)[reply]
You might consider searching the databases directly - for example, Elsevier (who publish many many journals and scholarly works) has an advanced product browser and advanced search features. I find that this is much faster than Google if I already know the publication I'm seeking. This will let you categorically exclude journals which are pay-subscription (etc.) Nimur (talk) 15:20, 19 October 2009 (UTC)[reply]
use http://arxiv.org/ 71.161.59.133 (talk) 22:31, 19 October 2009 (UTC)[reply]

Yahoo! account

[edit]

I have a Yahoo! account and I use an e-mail address ending in "@yahoo.com". Here's what I want to ask. How can I change the secret questions I have to answer in case I forget my password? I haven't forgotten the password or how to answer those questions, but I want to select new questions, or at least select new answers to the current ones. Thank you. --88.203.248.162 (talk) 12:11, 19 October 2009 (UTC)[reply]

Google google. Though, truth be told, you ought to just fill in the secret question with random characters, or some sort of standard response that is NOT related to the question. The info in them is usually pretty easy for people who know you to find (where you went to elementary school, what town you were born, etc.), and those are often the people you'd rather are NOT going through your e-mail accounts. Take a tip from Sarah Palin on that one! --Mr.98 (talk) 14:09, 19 October 2009 (UTC)[reply]

System freezes at Hardware Test stability (PC Wizard)

[edit]

Hello there, I have PC Wizard running on my system to check health of my system. But I noticed there's problem with Hardware test compatibility in PC Wizard. Whenever I press Hardware Test Compatibility (both hardware or processor) button, system freezes. I can't move mouse or keyboard. Screen just freezes. But it's not happening all the time. Sometimes there's no freezing during this test (I can move mouse or keyboard). I thought it was software. So I reinstall it but nothing happened. No overheating at all. Why this is happening? My specs are: C2Q 9400, XFX 750i SLI, PSU 750W, Ram ddr2 800MHz 4GB, Samsung Sata HD 320 GB, OS XP SP2. Thank you--119.30.36.42 (talk) 13:14, 19 October 2009 (UTC)[reply]

It's software with a percentage of low-level code that interrogates your hardware directly. It's entirely possible that it has a bug or did something unexpected that froze your computer. I wouldn't worry about it unless you are getting random freezes in other software all the time - then it's time to do some not-so-fun troubleshooting. Sandman30s (talk) 19:33, 19 October 2009 (UTC)[reply]

Download WP to cellphone?

[edit]

I know someone who has the top million(or 10,000 or something) WP articles downloaded onto his phone. What kind of phone do you need for this and how do you do it? Thanks. Aaadddaaammm (talk) 13:41, 19 October 2009 (UTC)[reply]

Are you sure it is actually "downloaded"? Wikipedia has/had a mobile version so perhaps our friend is using that version with their phone's internet browser? I don't know the mobile version's URL, but perhaps someone familiar with that version knows. Astronaut (talk) 14:27, 19 October 2009 (UTC)[reply]
The official English Wikipedia mobile version can be found at http://mobile.wikipedia.org/ - though many phones can just as well display the main wikipedia version. Nimur (talk) 15:09, 19 October 2009 (UTC)[reply]
There is a DVD version Wikipedia:Wikipedia CD Selection. With the right phone I guess you could adapt this. I would understand why someone may want to use that if you have high data charges. Edit: Ah nevermind. I would guess your friend has this [1]. Note it isn't free. I see the foundation also has some interest in this, see m:Offline readers. From that and Wikipedia talk:Version 1.0 Editorial Team I'm guessing there is currently no easy way to do something like that free due to the lack of any good readers amongst other things Nil Einne (talk) 13:34, 20 October 2009 (UTC)[reply]

Please help me with some html scripts?

[edit]

I am trying to impliment some scripts on an html page to make an advanced menu system. However, i'm quite new to these things. I went to a website which describes how to impliment the behavior i want, but my modifications to this scripting seem not to work. Can someone please help me either fix the code i have or help to write new code? it would be much appreciated!

The site where i got the code is: http://www.dhtmlgoodies.com/index.html?whichScript=show_hide_content_slide

With how it operates shown here: http://www.dhtmlgoodies.com/scripts/show-hide-content-slide/show-hide-content-slide.html

My website code, with this script implimented how i THINK it should work is here: http://pastebin.com/m30e59528

Basically what i want is to have it so that when the user clicks "Emote-Icons", the table marked as class "dhtml goodies answer" would show up. In a more advanced fashion, i will have two other tables, and if somehow it could be so that when the user clicks another one of the links in the top table, any other tables shown are hidden and the appropriate one shows up, this would be fantastic!

Thank you all for your time!

137.81.112.223 (talk) 14:38, 19 October 2009 (UTC)[reply]

Place it in a html file on your computer, and open it in your web browser. I advise testing it with firefox with Firebug installed, as that has lots of tools to help you debug the page if there's something wrong with the script. Don't use Internet Explorer for that as it's impossible, or at least very hard and annoying. The initShowHideDivs function will be slow as it searches every <div> on the page - it's not an issue for small pages, but complex pages may be slow. You could give the table an id attribute and use getElementById, which would be faster as it will get that one item directly. You might also like JQuery for javascript shineyness. --h2g2bob (talk) 22:12, 19 October 2009 (UTC)[reply]

Outlook drag & drop into Windows Explorer

[edit]

Outlook enables the user to drag & drop into an email into a Windows Explorer folder, and creates a .MSG file with a filename based on the subject line. Is there anywhere where the rules of this behaviour can be tweaked - for instance, to create a .HTML file instead, or to change the basis of the filenaming? (In my case, Outlook 11 under Vista, apparantly.) thanks --Tagishsimon (talk) 16:06, 19 October 2009 (UTC)[reply]

Fan noise in Xaser VI (Full tower case)

[edit]

I suddenly noticed, my xaser vi's top exhaust fan is making noise during boot up. It stays for 2 to 3 minutes then everything becomes normal. I checked the fan. No dust or other things that's causing this problem. I also checked system temperature.

No overheating at all.

Why this is happening?

My specs are:

C2D 9400 XFX 750i SLI PSU 750W Ram 4 GB 800 MHz

Thanks in advance--119.30.36.40 (talk) 18:37, 19 October 2009 (UTC)[reply]

Does it spin faster when everything becomes normal? This is normal behaviour from better quality fans; they auto-adjust their speed depending on heat generated or amount of sustained CPU activity. Sandman30s (talk) 19:37, 19 October 2009 (UTC)[reply]
That's right. Normally those smart power-managment features don't kick in immediately (they're mediated by OS/driver services) so many machines boot insanely loud (hello Dell server) and mostly run pretty quietly. But of Sandman30s is getting unusual buzzing sounds, that may be noise from the fan bearing. Blowing out the fan (with a can of compressed gas) may fix it, but often the cheapo bearing is dying and one has to replace the fan (and if it's a PSU fan, that means replacing the whole PSU). This seems to be the only PC component that ever fails for me; perhaps I shed an unusual volume of skin. -- Finlay McWalterTalk 19:45, 19 October 2009 (UTC)[reply]

Old PDAs

[edit]

I'm unfamiliar with PDAs, and rather old-fashioned. I do not like rechargeable batteries, and I do not like Wireless. Which old PDA models have the best spec (the most memory, best screen etc) while still having a USB and not a Wireless connection please, and still having replaceable (in other words ordinary) batteries? Note that early PDA models have only serial connectors and not USB - its only USB I want. I am not sure which is the best operating system to try to get, with the idea of using some freeware programs and languages on it. Thanks very much for all help. 78.144.243.47 (talk) 19:47, 19 October 2009 (UTC)[reply]

I have an old Palm III that does all that. Pros: It has USB communications through the optional cradle, and runs forever on 2 AAA batteries. Cons: Black & white screen and only 2 MB of memory. It doesn't sound like a high spec, but if all you are doing is storing contacts, diary, appointments and running apps like a calculator and some games like checkers, backgammon it is perfectly adaquate for the job. Astronaut (talk) 22:35, 19 October 2009 (UTC)[reply]
Hah. I was also going to mention the PalmIII. I had one and it's great. I only recently stopped using it. However, I think my cradle was serial. (There exist serial->USB adapters if that becomes an issue.)
OS is a matter of preference, really. I enjoy the PalmOS devices, I find the user-interface intuitive in the sense that while it's not like Windows, it somehow makes perfect sense to me as a pen-and-paper replacement.
If you mean programming languages, I don't know what the on-device development is like on WinCE machines, I know that it was a pain finding a good C compiler for my palm device. APL (talk) 02:12, 20 October 2009 (UTC)[reply]

Sage Accpac ERP Systems

[edit]

I am considering taking a position to install and support SAGE ERP systems (CRM etc.)

I was wondering what kind of market share Sage has in this area. Is it a market leader that has stayed on the cutting edge of the technology? Or is it more of a floundering behemoth that stays in business because it's too costly to switch systems.

I ask because I'd like to know how valuable this installation/support experience is going to be. Am I likely to become more employable in the five to ten year time frame because of it?NByz (talk) 20:08, 19 October 2009 (UTC)[reply]

Searching Google for phrases that have been posted here

[edit]

I noticed that Google cannot search the current version of Wikipedia's Reference desk, but can search archived versions. For example, there are (as of Oct 19, 2009) no Google hits for a random phrase from the above question here. The exact phrase I searched for was "is it more of a floundering behemoth that stays in business because it's too costly". (I chose such a long combination of words to be sure that it would not appear on other sites.) However, if I search for a phrase taken, say, from here: Wikipedia:Reference desk/Archives/Computing/2009 September 12#Producing an optimal route on Google Maps, I get exactly one Google hit - from the very same archived page of the Reference desk. This time the phrase I searched for was "implementations of optimisation algorithms are a lot more expensive and rare than many other applications". Why is that so? That means if I ask something here, initially nobody will be able to find any answers I get, unless they know exactly where to look for, but seven days later everybody will find them by using Google (this may have been a stupid example, sorry for that). Why? 88.203.248.161 (talk) 20:46, 19 October 2009 (UTC)[reply]

Google's search index is stored on Google servers and is updated by spidering bots. Depending on the site in question, it doesn't monitor every page on a day-to-day basis. So it probably takes around a week on average for Google to update its index for the Ref Desk, which is pretty much what I would expect for something that is not a "news" site but changes on a pretty regular basis (as Wikipedia does). --98.217.71.237 (talk) 21:14, 19 October 2009 (UTC)[reply]
If you want to find out when the page was last indexed, you can click on the "cached" link that appears just below the search result of a page, and it will tell you. This page, for instance, was last indexed on October 11, so Google will not be able to find anything that appeared here since then. 83.250.228.169 (talk) 02:32, 20 October 2009 (UTC)[reply]

How to disable AT&T media net

[edit]

I have voice and text but I don't have data in my plan. The media net key on the LG CU575 like all other phones on Cingular/ATT is the central key that I am bound to push by accident sooner or later. I have to frantically push cancel to make sure no data goes through. Isn't there a way to tell AT&T to disable data completely so that I don't get the "service" of per KB download? Thank you. Kushal (talk) 21:29, 19 October 2009 (UTC)[reply]

Yes, go to your local ATT store and tell them you want to "opt out" of a data plan. That's what I did. Now whenever I try to get to the Internet, it tells me I'm "in an area that cannot handle data."--el Aprel (facta-facienda) 00:25, 20 October 2009 (UTC)[reply]
Thanks. Although my prompt says "Connection failed!" but same difference. :) Kushal (talk) 01:12, 20 October 2009 (UTC)[reply]

AT&T a-list terms: just legalese or should I be worried?

[edit]

At http://www.wireless.att.com/cell-phone-service/legal/plan-terms.jsp AT&T mentions that "AT&T reserves the right to block any A-List number and to reduce the amount of telephone numbers that can be used for A-List without notice." Is it standard legalese or should I be worried to not talk on this number too much? Should I ask AT&T if Google Voice numbers are excluded? Or is it just to make sure that the rural networks don't profit out of the new "unlimited" plan? Kushal (talk) 21:29, 19 October 2009 (UTC)[reply]

Anyone? Kushal (talk) 15:01, 20 October 2009 (UTC)[reply]
I would say yes, you should clarify any doubts you have with AT&T. I wouldn't say you have to be worried but it's always wise to clarify doubts Nil Einne (talk) 18:33, 22 October 2009 (UTC)[reply]