Wikipedia:Reference desk/Archives/Computing/2009 February 1
Computing desk | ||
---|---|---|
< January 31 | << Jan | February | Mar >> | February 2 > |
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. |
February 1
[edit]how do you type in a filepath and other stuff on a mac
[edit]How do you accomplish the following things on a mac:
- you know the path to a "folder" on your machine and you want to type it in, instead of visually navigating through a bunch of finder GUI windows
- specify the root drive while typing in a path (i.e., what is the mac equivalent of c:\mydocs\shoppinglist.txt)
- get the dock bar to show up using the keyboard if you have it on auto-hide
- get the windows on your desktop to do the msft windows trick "cascade windows" or "tile windows vertically"
- navigate the icons in the system preference window using the keyboard (up and down arrows seem to work, but left and right does nothing)
Any solutions whatsoever are welcome, including but not limited to going out and downloading some third party software to get these done. dr.ef.tymac (talk) 00:40, 1 February 2009 (UTC)
- Open finder, hit Cmd-Shift-G, or Go -> Go to Folder
- As with other normal POSIX OSs, the "root" is '/' . So, applications are at /Applications, for instance. Individual partitions can be directly accessed from /Volumes
- By default Option-Command-D. The hotkey can be set in the Keyboard & Mouse system preferences pane
- Holding down Option, clicking Window, and clicking "Arrange in Front" does something similar, but it's per-application only. Not sure otherwise. There is expose, but I know that's not exactly what you're wanting.
- You could tab to the search bar at the top-right and type in what you want. Dunno otherwise.
- -- Consumed Crustacean (talk) 01:28, 1 February 2009 (UTC)
Issue with sending/receiving text over UDP connection in Java
[edit]Greetings! I am having an issue with a simple UDP based client/server Java program. The source code and their output can be found here, but I shall summarize the code, and the issues I am having here.
The server program, WriteServer, listens for any UDP packet on a port that is entered in the console when the program is executed. Upon receiving this packet, the server transmits a 'greeting' of sorts back to the client. The server then waits for a message from the client, and converts the string that is contained within the datagram to uppercase, then sends it back to the client.
The client code, ReadClient, takes a message from the user, the name of the machine to connect to, and the port to contact, all entered upon the code's launch. The client then sends a single packet to the server to initiate communication, then listens for, and then displays a greeting message that the server transmits. After that, the client then sends the message that was collected upon the code's launch, and then waits for a packet containing the uppercase message that the server sent back as 'confirmation' of transmission.
The code seems to work on the surface, at least when run on the same machine. However, there are issues. First, the client program has a string of boxes displayed to the right of the text, however, I am going to assume the boxes are just null characters. I am not quite sure how to get rid of those.
The second and third issues I shall lump together. When the client transmits the message given to it, the server seems to acknowledge this, as I am seeing a string of boxes that matches the length of the message. However, the message transmitted should be displayed within the server's console, and likewise, the message transformed into uppercase should be displayed in the client, however it is only displayed as a string of boxes within the client.
I am not quite sure what exactly is going wrong with this code relating to the transformation of the strings to bytes, and back to strings. I have tried running this code multiple times, however I haven't had any luck with getting it to work. I have also tried making a separate packet to receive each of the packets on the client/server side, even though I don't think that is a necessity.
I would appreciate any help that is provided, and I hope everyone has an utterly wonderful day! ~Shawna 137.155.187.56 (talk) 03:33, 1 February 2009 (UTC)
- You've got a pair of lines like this in ReadClient.java:
(1) byte[] retMsgBytes = new byte[rcvPacket.getLength()]; (2) retMsgBytes = rcvPacket.getData();
- That basically says (1) create a reference named retMsgBytes and have it point to a newly-allocated array of bytes, and then (2) throw away that newly-allocated array of bytes, and have retMsgBytes instead point to the results of getData(). Why not skip the allocation and combine the two statements into the following?
(1) byte[] retMsgBytes = rcvPacket.getData();
- As a side effect, it will fix your problem, which arises from forgetting step (2) in WriteServer.java. --Sean 15:13, 2 February 2009 (UTC)
- Worked like a charm, Sean. Thank you very much, and I hope you have a wonderful day! ~Shawna 137.155.187.45 (talk) 20:45, 2 February 2009 (UTC)
Javascript and 'onMouseMove' events.
[edit]I've been playing with writing a browser-based game in JavaScript (using 'canvas' graphics) recently. I want to use a full-color shape instead of the mouse cursor - so I'm using 'onMouseMove' events and redrawing the shape as needed. Everything works as programmed - but the timing is terrible.
The cursor will alternately track smoothly for about a half second - then freeze for another half second. Suspecting performance problems, I started trimming the game code back and back until I had NOTHING but a simple sprite redraw in the 'onMouseMove' event...and the result is the same.
I know my sprite redraws are fast enough because during the half second where everything works OK they track nicely. If I were to draw an 'X' in the onMouseMove function and then move the mouse rapidly from left to right, I'd get something like:
XXXXXX XXXXX XXXXXX XXXXXXX XXXXXXX
I'm doing this in FireFox on OpenSuse 11.0 64bit on a really fast computer - but I've seen the same behavior on other systems too.
Is there something inherent in the scheduling of browsers that makes this inevitable - or is there some 'trick' to make this work OK?
SteveBaker (talk) 05:56, 1 February 2009 (UTC)
- My understanding is that different browsers' versions of Javascripts have some things they do well and some things they do horribly. (See this article from a couple years ago.) I would not be surprised if one got different performance with different machines for something like this. It used to be—and might still be, for all I know—that Firefox is actually one of the slowest when it comes to Javascript activities if one doesn't take into account the fact that IE just up and dies if you try to do complicated string manipulation. The only "trick" I can think of is to not do the development in Javascript, but to do it in Actionscript or something that is a little more robust and standardized in its implementations... but that's not much of a trick, I admit. --98.217.14.211 (talk) 14:51, 1 February 2009 (UTC)
- It's not really about the performance of JavaScript itself - the smooth reporting of mouse events goes away for HALF A SECOND - that's not about JavaScript performance - it's about scheduling or something. When it runs, I get dozens of mouse position updates, processing though a dozen lines of stripped-down JavaScript code in a tiny fraction of a second with no problems - then NOTHING for an entire half second. I want portability - Actionscript won't cut it for me. SteveBaker (talk) 01:40, 2 February 2009 (UTC)
- (Well... Actionscript can probably run easily on maybe 95% of all computers out there.. but anyway...) Hmm. Have you tried it with other browsers? The question is whether or not this is something Javascript specific or browser specific. It sounds browser specific to me. (And again, browsers have specific Javascript issues/advantages. There's no reason to assume they'd have equal performance, scheduling, etc.)
- From a strictly programmatic standpoint... what if instead of using OnMouseMove you instead had a timer that turned on and ran at some very fast rate whenever you entered the canvas, and the timer function triggered something that checked up the mouse position, etc.? It's a hack, obviously, your own MouseMove alternative, but it might be worth cobbling together a little test version to see if it gets around the scheduling issues... --98.217.14.211 (talk) 02:49, 3 February 2009 (UTC)
Google maps
[edit]In google maps, when you search for a place, it puts a "lollipop" as a marker on the point it has found. Is it possible to ( how do you ) remove said lollipop? The only means I have found of doing it is to look for a prominent place a little way away, to search for that - thus putting the lollipop there - and scroll back to the part of the map I am interested in. But that seems completely wrong. -- SGBailey (talk) 11:09, 1 February 2009 (UTC)
- It goes away if you click "My Maps". Google have been changing the interface over the last few months so it's not clear whether that disappearance is a bug or deliberate. It would be nice to have a 'Hide lollipops' button in the top-right menu though. SteveBaker (talk) 13:08, 1 February 2009 (UTC)
- You can also clear the search box and hit enter (ie search for nothing) — Matt Eason (Talk • Contribs) 16:24, 1 February 2009 (UTC)
- Thanks -- SGBailey (talk) 19:37, 1 February 2009 (UTC)
Hide active programs
[edit]I share a computer with my little brother and whenever he gets on he messes with my active running programs, such as utorrent and boinc and he constantly restarts the computer when installing games. I need a way that I can hide these programs from view, even from the system tray, but they will keep running in the background and will automatically run when the computer is turned on. —Preceding unsigned comment added by 194.80.240.66 (talk) 14:56, 1 February 2009 (UTC)
- Open taskmanager and kill explorer.exe. This will hide your taskbar, open programs, system tray, and icons. To get programs to open at startup, go to start, all programs, startup (I'm on Windows 7, this may be different for previous OSs) and drag a shortcut of the program into this folder. Ζρς ι'β' ¡hábleme!
- If you kill explorer.exe that basically makes the computer unusable, and OP states it is also being used by someone else. Also, when the pc is restarted explorer.exe will be back. —Preceding unsigned comment added by 82.43.88.87 (talk) 19:50, 1 February 2009 (UTC)
- Theres a couple of different ways you can go about doing this... You could download Microsoft Virtual PC, and use that to essentially 'give' him his own computer to do what he wants. Another thing you could try is to set up Virtual desktop which would allow you to switch over to his desktop when he wants to play. But i think the simplest and quickest way to deal with that is to set up multiple users. That way when he wants to play you can just switch users. I hope this helped – Elliott 19:22, 1 February 2009 (UTC)
- I don't know if this is revelvant but on MS Windows, if you type
msconfig
is the Run... window and click the startup tab, you can prevent apps from starting up.-- penubag (talk) 20:06, 1 February 2009 (UTC) - Autoruns is very good to control programs that start at startup of the computer (on Windows) SF007 (talk) 03:24, 2 February 2009 (UTC)
Regarding tracking of information
[edit]Is it possible to track the websites that have been browsed using the IP address? —Preceding unsigned comment added by 59.92.71.98 (talk) 16:00, 1 February 2009 (UTC)
- Not usually without access to their ISP logs (which could be subpoenaed, for example, if it was relevant to a criminal case). The exception to this is that websites that share a common cookie or otherwise share IP information amongst themselves can tell when a given IP visits those sites that are in on the sharing. This comes up in case of advertising servers—if you frequent sites that use the same ad software (like DoubleClick) then DoubleClick and its affiliates will be able to know quite a lot about your browsing habits. But I interpret your question to be, basically, "if I have someone's IP address, can I see what pages they have visited," and in that case the answer is usually "no" for most "I"'s of the world. --98.217.14.211 (talk) 17:06, 1 February 2009 (UTC)
Mouse decision
[edit]I suppose this is not a technical question... but i would like to know what you (the reader) thinks is a better mouse. A trackball or an Optical mouse. This will help me decide what my next mouse should be. Thank you. – Elliott 22:25, 1 February 2009 (UTC)
- Optical mice are so cheap these days (I've seen them under $5) that you might as well get one anyway. Trackballs are good for some kinds of stuff - bad at others - but it's a very personal thing. Some people love them - others hate them - so there is no objective test other than to buy one and see. But if that turns out to be a bad thing, it's not gonna cost you much to buy an optical mouse to replace it. SteveBaker (talk) 00:49, 2 February 2009 (UTC)
- I disagree. Sure, you can buy a mouse for some ridiculously low price, but I would recommend you purchase a "good" mouse instead of a "cheap" mouse. The net price difference may be $50, but with even occasional computer use the mouse will pay for itself several times over. Particular features that *I* find useful are high precision, wireless, forward/back buttons, and an ergonomic shape. Visit one of those "big box electronic" retailers and find a mouse or trackball that works for you—it'll be money well spent. – 74 04:37, 2 February 2009 (UTC)
- Personally, I love Microsoft Wireless Entertainment Desktop 8000. --Andreas Rejbrand (talk) 11:47, 2 February 2009 (UTC)
- I disagree. Sure, you can buy a mouse for some ridiculously low price, but I would recommend you purchase a "good" mouse instead of a "cheap" mouse. The net price difference may be $50, but with even occasional computer use the mouse will pay for itself several times over. Particular features that *I* find useful are high precision, wireless, forward/back buttons, and an ergonomic shape. Visit one of those "big box electronic" retailers and find a mouse or trackball that works for you—it'll be money well spent. – 74 04:37, 2 February 2009 (UTC)
- The best mouse ever is the IBM 3-button travel wheel mouse :) I guess it's a personal preference but I don't understand how people can use those trackball mice. People actually play FPS games using those! σ_ο .froth. (talk) 17:40, 2 February 2009 (UTC)
- I pwn noobs with my trackball. :) -----J.S (T/C/WRE) 21:34, 2 February 2009 (UTC)
- I find ordinary mice are quicker for general use; but trackballs are a lot better for small movements and dragging, and they often have extra buttons that you can redefine for things like dragging or double-clicking. So I use a small optical mouse most of the time, but when I have to do precise work I plug in a trackball or use MouseKeys. Also, if you have to use computers other than your own it's probably best if you don't get completely out of practice with ordinary mice... AJHW (talk) 11:38, 3 February 2009 (UTC)
- I have switched to a trackball several years ago due to very limited desk space I had back then, and have used one (actually the same one) ever since. Wouldn't switch back to an ordinary mouse. For me it's just more convenient to use, but I remember the first two weeks I had it - I was literally afraid to use the computer because I couldn't come to grips with the trackball. --Ouro (blah blah) 11:14, 4 February 2009 (UTC)
- Wait, trackballs better for dragging? How do you spin the ball if your index finger is holding down the mouse button? Do you use both hands? .froth. (talk) 18:10, 4 February 2009 (UTC)
- My trackball's got the buttons on either side of the ball (like this) so I hold the button down with my thumb and roll the ball with my finger. I don't know how people can use the trackballs that you have to roll with your thumb... but then I am left-handed! AJHW (talk) 21:54, 4 February 2009 (UTC)
- That's the exact mouse I'm using right now. One of the major advantages of using it is the it sits in my lap; I have practically zero desk space for moving a normal mouse around, and having a trackball makes (lack of) space irrelevant. I gotten very used to the style of using my thumb to move the track ball around, and I can play FPS games quite nicely. - SigmaEpsilon → ΣΕ 22:41, 4 February 2009 (UTC)
- Mine is a Trackman marble by Logitech. The thumb rolls the ball, and the fingers control the buttons. With practice this can get very comfortable as it requires less coordination of the hand to control the cursor. --Ouro (blah blah) 07:19, 5 February 2009 (UTC)
- That's the exact mouse I'm using right now. One of the major advantages of using it is the it sits in my lap; I have practically zero desk space for moving a normal mouse around, and having a trackball makes (lack of) space irrelevant. I gotten very used to the style of using my thumb to move the track ball around, and I can play FPS games quite nicely. - SigmaEpsilon → ΣΕ 22:41, 4 February 2009 (UTC)
- My trackball's got the buttons on either side of the ball (like this) so I hold the button down with my thumb and roll the ball with my finger. I don't know how people can use the trackballs that you have to roll with your thumb... but then I am left-handed! AJHW (talk) 21:54, 4 February 2009 (UTC)