Wikipedia:Reference desk/Archives/Computing/2007 January 17

Computing desk
< January 16 << Dec | January | Feb >> January 18 >
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 17

edit
edit

I installed in our company intranet the MediaWiki: 1.8.2. I added various articles with link to files on file servers in out intranet using the standard wikitext tag for external links

"[file://\\server\share\dir\filename.ext Anchor Text]". Most users are not familar with the Wikitext synthax, so I installed FCKEditor V0.7.2 (2006) based on the instructions found at the MediaWiki Site [1].

Now are all external links to files on pages in the old Wikitext format rendered as plain text and not as link as if it is done when you use the "<nowiki>" tag. I am looking for solutions from config settings (wiki/editor) or code changes. I can't link to the files via "http://" or "ftp://". Conversion to full HTML (for FCKEditor) is also not an option.

Thanks you. --roy<sac> Talk! .oOo. 02:10, 17 January 2007 (UTC)[reply]

You might want to take a look here for getting help with your mediawiki installation. You'll probably have more luck :) Oskar 18:41, 17 January 2007 (UTC)[reply]
Thanks Oskar. I probably should, but I also wanted to test the Reference Desk a bit. The issue is not time critical and I got everything to work already, except this last little thing with the file links. Cheers! --roy<sac> Talk! .oOo. 05:14, 18 January 2007 (UTC)[reply]

UV Cathode Light?

edit

Does anyone know where to find UV cathode lights that plug that would plug into wall sockets. I can find many that plug into 4 pin molex connectors, but I was interested in setting one of these up outside of a PC. —The preceding unsigned comment was added by 24.231.205.94 (talk) 05:45, 17 January 2007 (UTC).[reply]

They may not exist. I purchased a reasonably strong 12v power supply from an electronics store and hacked apart the cable to use a cold cathode light in my entertainment center. --Mdwyer 00:29, 21 January 2007 (UTC)[reply]

Turning on a power supply

edit

Is there a way to turn on a power supply that is not connected to a computer at all? Perhaps one that is connected to only one component. —Preceding unsigned comment added by 24.231.205.94 (talkcontribs)

For AT-style computers, power supplies were attached directly to a switch, so you could turn those on and off without any other components. For ATX-style computers, power supplies are not attached to a switch, and have to be powered on or off by the motherboard (which usually has a jumper for a switch to connect to). So if you have an ATX power supply, you might need to hook up a (dummy) motherboard up to it. --Spoon! 06:56, 17 January 2007 (UTC)[reply]
For ATX PSU just connect the green wire with any of black wires. As long as these wires will be connected, PSU should be on. -213.175.91.220 08:38, 17 January 2007 (UTC)[reply]
As colors on cables sometimes differ: green normally is 5V_STANDBY, black is GND. The color of the standby voltage cable in particular has been known to have colors that differ from the standard on some manufacturers' power supplies. TERdON 12:36, 17 January 2007 (UTC)[reply]
If you have an ATX PSU, and you don't want to poke around with patch wires, you can get a tester for about ten bucks. grendel|khan 21:52, 25 January 2007 (UTC)[reply]

CorelDRAW fill problem

edit

I am trying to get a train tunnel image done for a Wikipedia article, I am using CorelDRAW 12. I have managed to draw the tunnel cross section, but am having trouble filling it in with a colour. I can fill in an ordinary shape (eg a circle) just fine, but I can't fill in the tunnel. I have tried "combining" and "welding" the tunnel cross section, but still it is impossible to fill with colour. I made the cross section from a circle and a few lines and the shape looks closed to me (seemingly the nodes meet up ok), it looks a bit like this - but I can't manage to fill in the outline, as they have done with green in the example. I tried searching for help with this problem but found nothing - maybe it is something simple that I am missing. Thanks for any ideas.--Commander Keane 07:42, 17 January 2007 (UTC)[reply]

Just whipped out my Coreldraw. If you create a freehand curve, you have to use the node tool (right under the funny arrow), click on the first node, shift-click on the second, right click, and press 'join'. This converts the open curve (which you can't fill) to a closed curve, which you can. --Zeizmic 17:59, 17 January 2007 (UTC)[reply]
Yes that did the trick, thanks Zeizmic!--Commander Keane 05:44, 18 January 2007 (UTC)[reply]

Considering Purchasing Wireless Print Server

edit

I'm considering purchasing a wireless print server however I'm confused by the lack of product selection on the market. Are there any substantial problems with this technology that I should know about before I make the purchase? Is there a reason why most of the prices I'm seeing are in the $100 range, meanwhile routers cost as little as $35. Should I instead just be buying a brand new printer with built-in wireless capability (even though I have a pretty decent all-in-one printer)? Maybe I'm just missing something, but I was just surprised that I couldn't find many of these for more reasonable prices at places like Newegg, TigerDirect, and Amazon. Anyhow, any comments and/or recommendations are greatly appreciated.

Thanks, Jon —The preceding unsigned comment was added by 65.31.137.54 (talk) 09:08, 17 January 2007 (UTC).[reply]

I have the most minimal USB-wired Ethernet print server, and they are expensive for tiny little things, and hard to get. That's what happens with low-volume electronics. Some wireless routers have a 'free' USB print server. Nobody buys stand-alone wireless print servers (present company excluded :). --Zeizmic 18:12, 17 January 2007 (UTC)[reply]

Insertion in linked list

edit

I am learning C, and I am having trouble with the singly linked list. Elements are created and inserted in a loop, but when the loop returns to define another element, the old address is reused, which is highly undesirable, because changing a value at this address changes 2 values.

The program below inserts 0, 1 and 2 in a linked list, and the second insertion is overwritten by the third. I would appreciate if someone could point out my error. I suspect it has less to do with the linked list and more to do with variable scope. 130.225.96.2 12:01, 17 January 2007 (UTC)[reply]

struct listelem{
  int data;
  struct listelem* nextElem;
};

int main(){
  struct listelem a;
  struct listelem* plast =&a; //Pointer to last element in list. 
  a.data=0;
  int i;
  for(i=1;i<=2;i++) {  //Executed twice, with i=1,i=2
    struct listelem b; //Both get the same address for b,
    printf("&b=%p\n",&b); //as shown in this line
    plast->nextElem=&b; //This saves the address of b outside the scope
    plast=&b;
    b.data=i; //The first time b.data is written is lost.
  }
  printf("Should be 0,1,2, but is %d,%d,%d\n",a.data, (a.nextElem)->data, (a.nextElem->nextElem)->data);
}

Output:

&b=0xbf8c5320
&b=0xbf8c5320
Should be 0,1,2, but is 0,2,2
(I reformatted your code and output.) Ignore all the pointers for a moment — both the ones in listelem and the ones in main(). Then we see that you have effectively declared int a.data and (in the loop) int b.data. You should not expect these two storage locations to store three numbers! You are almost right that the problem is one of scoping; it's actually one of variable lifetime. The statement struct listelem b; in the loop should not be thought of as creating an object but rather defining a period of time (here, the extent of one iteration of the loop) during which an object exists. b is in fact created, but it is fated to be destroyed when its iteration of the loop finishes. (a is fated too: it dies when main() returns. If you have more than one function in your program, this matters a lot.) Even if the "two" bs got different addresses, the first one would not exist after its iteration completed. (To demonstrate this with your program, call some complicated function (like, say, fopen()) after your loop but before printing. Then all your data except that in a — which is actually just garbage on the stack then — will be most likely replaced by data used during the function call.) The solution here — the creation of objects with indefinite lifetimes and (closely related) in arbitrary numbers known only at run time — is called dynamic memory allocation; in C one uses malloc(). --Tardis 17:12, 17 January 2007 (UTC)[reply]
Thanks a lot, that solved the problem. I replaced the declaration with pb=malloc(sizeof(struct listelem)); (and made corresponding changes) and it appears to work. 130.225.96.2 09:12, 18 January 2007 (UTC)[reply]
Or simply, your structs are declared as automatic variables, and are deallocated at the end of the block: sub esp, 8, add esp, 8 --wj32 talk | contribs 01:30, 19 January 2007 (UTC)[reply]

Downloading file without visiting the page

edit

Is there a way to download a realvideo file, for which I only have the URL (i.e., no hyperlink that links to the page; needs to be typed into the address bar), but without having the browser trying to visit the file as though it were a page and automatically downloading it into a temp directory? An example URL would be: http://ocw.mit.edu/ans7870/8/8.01/f99/videolectures/wl99lec1-80k.rm

It is not a streaming video. Of course, I could put it here and click "save target as", but that would be a bit convoluted, considering that I will want to do this repeatedly. BenC7 12:20, 17 January 2007 (UTC)[reply]

You can create a HTML file on your hard drive, load that into the browser (file:///hello.html) and right click from there. There are also many command line programs that fetch a given url; wget comes to mind. Weregerbil 15:24, 17 January 2007 (UTC)[reply]
Or you can put this as your URL in a new tab (or window):
 javascript:document.write('<a href="http://ocw.mit.edu/ans7870/8/8.01/f99/videolectures/wl99lec1-80k.rm">Test</a>');
You can then right-click the link and save it as you desire, or open it automatically. The URL can be modified, of course. Just do not include single quotes between (' and ') - escape them using \'. x42bn6 Talk 17:49, 17 January 2007 (UTC)[reply]
Thought of another way: at least in some browsers it is possible to configure what the browser does with each file type - open in the browser, open with an external application, or save to a file. E.g. in Firefox "Tools -> Options -> Content -> Manage."
When I want to save a long list of URLs I write a shell script (.bat file in Windows) that fetches them using a wget-like program. Weregerbil 17:56, 17 January 2007 (UTC)[reply]
Thanks guys. BenC7 02:22, 18 January 2007 (UTC)[reply]

Pausing output in Linux

edit

Greetings. I'm a fairly new Linux user, and I'm wondering if there is any easy way to "pause" long output from a command so that it doesn't get "scrolled away"? I've been piping the commands to "head" (so like "ls --all | head", with variants), but that's not really a good long-term solution. Any tips? Oskar 18:37, 17 January 2007 (UTC)[reply]

Shift+PgUp and Shift+PgDn normally do the trick. Otherwise, pipe to less or more. --h2g2bob 18:56, 17 January 2007 (UTC)[reply]
Pipe the output into either more or less. more is a simple pager, and less does things like let you move backwards and forwards. --Transfinite 19:00, 17 January 2007 (UTC)[reply]
Thank you, works perfectly! I knew there was a command for it :) Oskar 19:07, 17 January 2007 (UTC)[reply]

Another option is to just let it fly by, then scroll back and read the relevant bits. To do this, you must have a window with a scroll bar and enough lines in it to capture your output. If I recall correctly, the command is something like "xterm -sb -sl 3000 &", to create an X terminal with a scroll bar and 3000 lines in the buffer as a spawned subprocess. I use 3000 because that's about the limit where one pixel on the scroll bar equals one page of scrolling. In other words, if you go much beyond that, it will tend to scroll backwards more than a page at a time, and you will miss things. StuRat 19:50, 17 January 2007 (UTC)[reply]

That's what I do if I'm in GNOME, but sometimes I'm accessing the terminal outside of the graphical environment. That's when I need the paging thing :P Oskar 17:09, 18 January 2007 (UTC)[reply]

TI 89 Titanium help request

edit

How would I download the TI Reader to my TI89 Titanium? I've already got the TI connect software in working order, and the computer does recognize and communicate with the calculator, but I haven't been able to transfer any apps to the calculator. (If it's any help to repliers, the computer OS is Windows XP, and the calculator OS is Version 3.10, 07/18/2005, Advanced Mathematics Software, Hardware Version 4.00). Alphabetagamma 05:26, 18 January 2007 (UTC)[reply]

Are there any other programs like Skype?

edit

So today I fired up the ol' Skype and it turns out you need Skype Credit to make calls (I thought this wasn't starting until tomorrow). Basically, are there any other computer applications that will allow you to make free calls across the USA? Thanks! NIRVANA2764 22:07, 17 January 2007 (UTC)[reply]

Wow! I knew they had to start turning the screws sooner or later. The only other alternative for a 'free' service is to insert spam (like Google!). --Zeizmic 23:56, 17 January 2007 (UTC)[reply]
Yahoo Instant Messenger and Google Talk have "call" features, they require a microphone, but (last I checked) were free. Root2 01:36, 18 January 2007 (UTC)[reply]
Only to other users on that service. YIM charges for calling phones too, and I don't think GT supports calling phones at all. -- Kesh 02:31, 18 January 2007 (UTC)[reply]
Try other VoIP services --frothT 01:47, 18 January 2007 (UTC)[reply]
Skype has always charged for calling to phones I thought, while Skype to Skype is free. --Wirbelwindヴィルヴェルヴィント (talk) 07:59, 18 January 2007 (UTC)[reply]
I recommend using Adcalls Which currently allows you to make completely free calls to numbers in the United States of America, Canada, Puerto Rico, Virgin Islands and China. - Aug Leopold 00:04, 22 January 2007 (UTC)[reply]