Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Noosphere (talk | contribs) at 15:15, 24 May 2011 (→‎License type of magazine code listings?: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


May 19

Non-compressed GIF image

The article GIF#Non-compressed GIF notes that a GIF image file can be constructed by packing the image data with 8-bit indices to the root color table, packed as 9-bit codes with zero MSBs. It works for a small 3x5 image example. Can this be done with large images? I would like to use such a GIF file as a canvass on which pixels are individually addressable for read and write. I encounter these difficulties:

  • Is there a limit to how many indices (pixels) can be represented?
  • Does the clear code 101 100H need to be repeated, if so how often?
  • Data for a large image will be divided into sub-blocks no larger than 1+255 bytes. I chose to write the first byte FCH to be followed by 252 bytes, which contain exactly 224 9-bit codes.

I am doing something wrong because I do not get pixels to show beyond the first sub-block. Cuddlyable3 (talk) 11:10, 19 May 2011 (UTC)[reply]

OT post deleted with explanation given to poster. Cuddlyable3 (talk) 18:54, 19 May 2011 (UTC)[reply]
I sympathize with the desire to create uncompressed files, since they are easier to read in, process with a program, and write back out. However, a GIF file doesn't seem like a good choice for this, as you have to "trick" it into not compressing. I use PPM ASCII format to do the same thing, and it works well, although, of course, you can expect some huge uncompressed files. Since no index is used in PPM, each pixel is defined by it's RGB values. This also allows more than 256 colors per pic (a limitation of an 8-bit index). StuRat (talk) 19:16, 19 May 2011 (UTC)[reply]
OP here. I actually want to have the limited-but-precisely-controlled palette of a GIF file. File size is not a problem because I shall eventually turn the non-compressed GIF to properly compressed GIF. More background info,. There was a past time when people made non-compressed GIFs to avoid a Unisys patent, so maybe someone knows how. Cuddlyable3 (talk) 20:37, 19 May 2011 (UTC)[reply]
Of course, you still CAN limit yourself to 256 colors with a PPM, you just aren't FORCED to do so. (In my case, since I do eventually convert them into an animated GIF, I do limit them to 256 colors, while still a series of PPMs.) StuRat (talk) 20:51, 19 May 2011 (UTC)[reply]
According to your explanation, you want "uncompressed" animated GIFs, which does limit your options. In a 256-color GIF there are initially 258 LZW symbols defined: one for each color, one to clear the LZW state, and one for end-of-stream. Each LZW symbol is encoded in ⌈log2 n⌉ bits, where n is the number of LZW symbols in the table. After each symbol, the table length increases by one. Therefore, if you want the symbol length to remain at 9 bits, you must emit a clear code after every 253 pixels (at most). Your 224-symbol blocks could consist of 223 pixels and one clear code. By the way, the clear code is 100h; 101h is end-of-stream. Maybe that's your bug. -- BenRG (talk) 20:23, 19 May 2011 (UTC)[reply]
The bug that was in my question (corrected by striking) is not in my code. I make the first of the 224 codes in each sub-block 100H. Cuddlyable3 (talk) 20:37, 19 May 2011 (UTC)[reply]
Are you sure they were asking about animated GIFs, as opposed to a single pane ? StuRat (talk) 20:26, 19 May 2011 (UTC)[reply]
I am asking about only a static image GIF here. If that image is destined to be a frame of an animated GIF, I would certainly compress the animated GIF. Cuddlyable3 (talk) 20:43, 19 May 2011 (UTC)[reply]
It sounds like you're handling the clear codes correctly, which means I don't know what's wrong with your code. If you don't need GIF's animation features then I think you'd be better off with, for example, PPM or BMP or TGA or TIFF, even if the GIF animation software you're using doesn't support those formats. It only takes a single line of code to convert to GIF using ImageMagick after you've finished tweaking the input file. -- BenRG (talk) 17:10, 20 May 2011 (UTC)[reply]
Resolved
 – There is a working example uncompressed gif here. Cuddlyable3 (talk) 11:08, 27 May 2011 (UTC)[reply]

Mobile phones in proximity connect as walkie-talkies?

Is it conceivable that mobile phones (particularly Android-running) in proximity could connect directly to each other to talk at no cost to the user, without any special or additional hardware? --129.215.47.59 (talk) 16:44, 19 May 2011 (UTC)[reply]

Yes, this is how sharing data via bluetooth works, for example. ¦ Reisio (talk) 17:05, 19 May 2011 (UTC)[reply]
So they'd have to be within a few meters of each other, then? The signals would be sent using the bluetooth transmitter, rather than the transmitter which communicates with mobile telephone masts? --129.215.47.59 (talk) 17:23, 19 May 2011 (UTC)[reply]
"for example". Most (all?) of these phones also have "wireless hotspot" features, which effectively makes them into wireless routers, which wouldn't be using bluetooth. ¦ Reisio (talk) 05:16, 20 May 2011 (UTC)[reply]
For the record, cellular band radios are not permitted for use as walkie-talkies. (These radios operate in a controlled spectrum, in the United States, this is governed by the NTIA, and you can see their frequency allocation chart). If a device wishes to support point-to-point radio, it will need additional electronic circuitry so that it can transmit on a different frequency. Many devices do support multi-band radios, and some even do support cellular telephony. Such devices are not usually sold as "cellular telephones." A good example of such a device is the radio system in a commercial taxi-cab in the United States - it is often both a point-to-point VHF or UHF transceiver and a cellular telephone (... two or more radios in one single package). Nimur (talk) 15:29, 20 May 2011 (UTC)[reply]
There is an app called "Virtual Walkie Talkie". It requires WiFi access, and, unless you want to set up your own server on your local network, internet access as well. Note that you can use one of the phones as a server, so you don't need additional hardware; it just makes it easier. -- 188.99.196.147 (talk) 20:37, 20 May 2011 (UTC)[reply]

Google Chrome inserts an extra line break when adding a comment to a talk page

Does anyone know why Google Chrome inserts an extra line break when adding a comment to a talk page? For example, when I typed this,[1] I had only one blank line between my post and the previous one. By the time I submitted it, it changed into 2 blank lines which I fixed in my next edit.[2] Does anyone else have this problem or know how to fix it? A Quest For Knowledge (talk) 17:01, 19 May 2011 (UTC)[reply]

Sounds like a bug in our JS, I'd talk to WP:VP/T ¦ Reisio (talk) 17:07, 19 May 2011 (UTC)[reply]
Yeah, I'd noticed this too.  ajmint  (talkedits) 18:37, 19 May 2011 (UTC)[reply]


May 20

16Gb Optical Multimode Fiber

Good Morning, Wikipedia!

  I'm now looking for OM fiber which will carry 16Gb Fibre Channel for atleast 50 meters. Are OM3 and/or OM4 capable of these speeeds?

  Thanks as always. Rocketshiporion 01:25, 20 May 2011 (UTC)[reply]

You should ask your networking hardware manufacturer, as it may depend strongly on the implementation details, but at 50m I would expect either OM3 or OM4 to be physically capable of carrying 16 Gbps. Dragons flight (talk) 01:49, 20 May 2011 (UTC)[reply]
The cable I'm looking at is the Hewlett-Packard 50m PremierFlex OM3+ LC/LC Optical Cable (BK843A). None of the resellers' salespeople can answer the question, and HP Technical Support referred me back to the above webpage. Rocketshiporion 04:58, 21 May 2011 (UTC)[reply]

secure website (https) on a public network

Resolved

If you are on a secure website (https) on a public network, is it secure? That is, no one can see or capture what you type? Bubba73 You talkin' to me? 03:32, 20 May 2011 (UTC)[reply]

It means what you send over HTTPS (what you input and submit) is theoretically protected. It does not mean what you type is protected. ¦ Reisio (talk) 05:17, 20 May 2011 (UTC)[reply]
So, if I am on a public network, connect to an HTTPS site, I am where no one can see me, can someone (e.g. the owner of the network) intercept passwords, credit card numbers, etc? Bubba73 You talkin' to me? 05:27, 20 May 2011 (UTC)[reply]
The person who controls the computer can plant software to record everything you do on it. If SSL is used properly then information should be protected between when it leaves the source computer and when it arrives at the destination computer, but unless you control the source computer there is no way to be sure there isn't something malicious being done to spy on you there. Dragons flight (talk) 05:55, 20 May 2011 (UTC)[reply]
Yes, I'm talking about using my laptop on a public network somewhere (usually wireless). I have confidence that my computer is OK. So it is securely encoded before it leaves my laptop. Bubba73 You talkin' to me? 06:19, 20 May 2011 (UTC)[reply]
Yes; you are safe from attack. If you don't particularly trust the website to properly secure all its information over a connection (and I sure as hell don't: Facebook and Twitter, I'm talking about you [3]), I recommend installing NoScript and turning on HTTPS enforcement[4]. The only other way someone can get your information is if the certificate companies themselves have a breach (which has happened at times... it's a long story), but that's more likely a problem of governments spying on you, which they could do from anywhere. Magog the Ogre (talk) 06:38, 20 May 2011 (UTC)[reply]

C++ make error

I'm a FORTRAN programmer trying to compile C++, so please have patience with me. This is a sample program provided on CD with the book "Teach Yourself Game Programming in 24 Hours", by Michael Morrison (author). I click on the build.bat file provided, and get the following error:

C:\Borland\BCPP\Chap02\Skeleton> make -f Skeleton.mak
Skeleton.mak:8: *** missing separator.  Stop.

Here's the Skeleton.mak file:

 APP      = Skeleton
 EXEFILE  = $(APP).exe
 OBJFILES = $(APP).obj 
 RESFILES = $(APP).res
 LIBFILES =
 DEFFILE  =

 .AUTODEPEND
 BCC32   = bcc3
 ILINK32 = ilink32
 BRC32   = brc32

 CFLAGS  = -c -tWM- -w -w-par -w-inl -W -a1 -Od
 LFLAGS  = -aa -V4.0 -c -x -Gn
 RFLAGS  = -X -R 
 STDOBJS = c0w32.obj
 STDLIBS = import32.lib cw32.lib

 $(EXEFILE) : $(OBJFILES) $(RESFILES)
  $(ILINK32) $(LFLAGS) $(OBJFILES) $(STDOBJS), $(EXEFILE), , \
  $(LIBFILES) $(STDLIBS), $(DEFFILE), $(RESFILES)

 clean:
  del *.obj *.res *.tds *.map

Line 8 appears to be ".AUTODEPEND". Is there a missing separator at or around that line ? What kind of separator are they talking about ? I tried deleting that line, at which point it complained about a missing separator at line 19. I can provide any additional code or info needed to help debug this. Any help would be much appreciated. StuRat (talk) 08:34, 20 May 2011 (UTC)[reply]

"Missing separator" is the make-file error message when you use spaces, instead of tabs. You must use tabs, not spaces - this is a detail of Makefiles. If you think you typed a tab, check to be absolutely sure that your text-editor is not "auto-converting" tabs to spaces, for example. Here's the GNU Make error-reference. I don't know whether Borland uses its own version of Make. (To be honest, I strongly dis-recommend Borland's C++ compiler. Use GCC, or if you intend to use Windows-tools only, download the free version of Microsoft Visual Studio, available free from Microsoft. Any book which is advocating Borland tools is very outdated. For perspective: you're using Borland 3, which barely supports 32-bit processors). If you plan to work in this environment, you should expect serious compatibility problems with any operating system newer than Windows 3.1. Nimur (talk) 16:39, 20 May 2011 (UTC)[reply]
I tried adding tabs everywhere there are spaces, and that didn't help. I'm actually using Borland 5.5.1. The Skeleton.mak file came on the CD, I didn't type it in. Perhaps the issue is using a 3.2 make file with version 5.5.1 of the Borland compiler ? StuRat (talk) 17:44, 20 May 2011 (UTC)[reply]
Well, unfortunately Borland's toolchain is entirely defunct; and you're already in possession of a reference-textbook describing how to use it, so I think at this point my ideas are exhausted. As I hinted above, you should use a reasonable toolchain, unless you enjoy fighting with antiquated and proprietary software. There is absolutely no reason to use that tool: it is not free (you paid for it as part of your book fee!); it is not open-source software; it is not supported by any commercial company; it is not used by any open-source community; and it is known to have compatibility issues with modern systems. Free, open-source replacements are available; zero-cost proprietary replacements are available; and for-fee software with support service is also available. I strongly recommend you use the gcc toolchain. Nimur (talk) 18:49, 20 May 2011 (UTC)[reply]
I'm willing to try GCC. How do I download it ? When I do web searches I get pointed to FTP mirror sites containing many sub-folders with random names: [5]. Is G++ the same as C++ ? Do I want the ".tar.gz" or ".tar.bz2" version ? I have no idea how to download from there. Is there a site with a proper download manager ? StuRat (talk) 19:09, 20 May 2011 (UTC)[reply]
Start by reading our article on GCC. Then, download Minimalist GNU/GCC for Windows ("mingw" or "mingw32"): here's the Getting Started guide and installation instructions, and here's a direct link to the executable installer for it.
If you want a GCC development environment, skip those steps and download Dev-C++, which will install both a C++ text-editor and the mingw/gcc compiler.
g++ is a short-name for the C++ compiler provided as part of gcc. Officially, "GCC" stands for "GNU Compiler Collection." When you run the command gcc, the compiler will auto-detect what language it should use (C, C++, Pascal, FORTRAN, or any of the dozens of other languages GCC can compile). When you run the command g++ you are instructing GCC that your code is "C++" (with caveats), and that it should not try to auto-detect the language. Nimur (talk) 20:43, 20 May 2011 (UTC)[reply]
GCC is traditionally a Unix-world tool and the primary releases are source code only. You need to search for "gcc windows" or something. You'd want either MinGW or Cygwin. You might find the MinGW distribution easier to use, but I'm not sure since I've only ever used Cygwin. Or you might prefer an IDE like Code::Blocks, which comes with a bundled MinGW toolchain. Or you could use Visual C++ 2010 Express. Or you could stick with Borland 5.5.1 (which is freeware, contrary to what Nimur said). It is probably fine, and there are obvious advantages to sticking with the toolchain that's bundled with the book—although the fact that the Makefile bundled with the book doesn't work with the toolchain that's bundled with the book makes me wonder.
A more important question is whether you should use this book. The computer sections of bookstores are littered with overlong, poorly bound, badly written teach-yourself books, of which this appears to be a typical example. And nobody writes Windows games using Windows GDI, which is what this book seems to use. I think you would be better off with free online tutorials, such as the ones at http://www.sdltutorials.com/ (SDL) or http://nehe.gamedev.net/ (OpenGL). Most of these tutorials use C++. If you ditch the book then you should ditch Borland C++ also. -- BenRG (talk) 20:42, 20 May 2011 (UTC)[reply]
Ditto, on BenRG's comments. NeHe is very popular, and libSDL is excellent for game designers and also for general-purpose multimedia programming. (Re-reading my post, I did not make this clear: I recommended ditching the environment, but meant the not just the toolchain. Also toss out any of its cruft libraries and outdated source-code provided by this book, and probably the book itself, in favor of modern, standard, and preferably free-software). Nimur (talk) 20:58, 20 May 2011 (UTC)[reply]

UPDATE:

1) I've installed both MinGW and Cygwin. Both compiled, but only MinGW ran successfully by popping up a window. Cygwin just hanged. Any idea why there would be a difference ?

2) Now for the next problem. While that very basic test program compiles, when I try to compile a program that does anything useful, I get tons of errors, mostly of the "undefined reference" variety. Since the author included the executables, we can assume that the code itself is good. So, there must be some systemic incompatibility between that code and the compiler or environment. Any idea what ?

3) I was planning on including the errors, but, for some reason, cut and paste seems to be disabled in the MinGW shell window (I can't highlight text). I'd hate to have to type in all those error messages by hand. Any idea how I can fix this ? StuRat (talk) 16:36, 21 May 2011 (UTC)[reply]

"Undefined symbol" is a linker error. The most common linker errors are either: (a) you did not specify the location of a required library; or, (b) you specified the correct location of an incompatible library.
If you used the make script you posted before, your "STDLIBS" (standard libraries, import32.lib cw32.lib) were provided by Borland, so they are probably incompatible with code compiled using gcc.
If you are using other libraries, and still receiving undefined symbol errors, check your linker arguments. The library path is specified by the gcc linker command line arguments):
-L ..\path\to\those\libraries\ -limport32.lib -lcw32.lib
(capital L for the directory, lowercase l for the library file-names). Even if properly linked, the Borland libraries will probably fail anyway, for two reasons: first, those libraries are binary format compiled by Borland (they are part of the Borland suite), and are probably incompatible with any other compiled code (due to symbol-name conventions and function/call-stack conventions). Unless you enjoy mangling binary objects, you probably can't fix this problem. Secondly (but more fixable), gcc ld requires a filename of the format libUsefulTool.a, which you specify using the command argument -lUsefulTool.
You probably will not be able to link Borland libraries while you are using another toolchain. If your source-code heavily depends on those libraries, you may be out of luck and must replace or rewrite the code. This is ultimately the reason that BenRG and myself both recommended ditching the entire book - its sample source code is nonportable. Nimur (talk) 16:00, 22 May 2011 (UTC)[reply]
OK, I am convinced. I will most likely ditch the book, Borland, and, for that matter, all of C++, and stick with FORTRAN, where I've never run into such intractable problems. StuRat (talk) 05:08, 23 May 2011 (UTC)[reply]

USB to MIDI

I've got a keyboard (of the musical variety) that I want to connect up to my computer so I can play virtual instruments. I also have a Proteus sound module that I want to play using the keyboard but at the moment I can't.

The keyboard is a pretty standard Yamaha PSR E413 that I bought last year and it has a USB port on the back. In the old days things were so simple - get a cable with a 5 pin DIN on both ends and away you go. This new-fangled USB thing has complicated things considerably. My sound module only has DIN sockets and while I can connect the keyboard to my computer using an ordinary USB cable, the drivers are very proprietary and won't work on my machine.

It appears that there are cables around that connect USB to MIDI but they are the wrong way round for what I am trying to do - these connect DIN sockets on a keyboard to USB on a computer. The USB plug is a USB A type and the socket on the keybaord is a USB B type. Would it work if I got a USB A/USB adapter and connected it to one of those cables? I am guessing the answer is probably not.

Is there some kind of magic box I can buy that takes a USB input and converts the signals to something more generic (getting round the drivers issue) and then connects to the computer?

For the sound module, is there some kind of magic box that will take USB MIDI signals and output them to DIN plugs/sockets?

I think the latter would be more useful. My computer doesn't have DIN sockets but I know you can buy devices that do the reverse of what I want, converting MIDI to USB.

Going from DIN to USB seems like a backward step for me! Am I going to have to buy an old keyboard so I can get one that has DIN sockets? I would have thought there would be some kind of standard for implementing MIDI via USB. —Preceding unsigned comment added by GaryReggae talk:GaryReggae|talk]] • contribs) 11:55, 20 May 2011 (UTC)[reply]

If you can't even successfully connect the keyboard to your computer with the "very proprietary" drivers then I suspect you're out of luck. Presumably the protocol it's using over the USB connection is also proprietary, and I don't think there's much chance of being able to translate it to standard MIDI messages by any sort of "magic box". If you really can't get the keyboard to talk to the computer (have you googled for updated versions of the drivers/ versions appropriate to the computer?) then I really think you will have to bite the bullet and get another kb with "proper" MIDI DIN sockets. Since you already have the sound module then you could just get a MIDI controller kb, i.e. one with no sounds of its own. For example, googling for "midi controller" have me this 88-key keyboard] for £132 (about US$214) - if you can make do with 4 or 5 octaves then it would be a lot less (as most of the cost is in the key mechanisms), or have a look on eBay etc. Good luck! AndrewWTaylor (talk) 16:00, 20 May 2011 (UTC)[reply]
Thanks. On further research into this, it appears that most keyboards do have DIN MIDI sockets and the keyboard I have got is unusual in only having a USB socket. So yes, it appears that I will have to get a new keyboard that does have DIN sockets. I will have another go at getting it to work but otherwise I only have five octaves at the moment so I will look for a basic keyboard. Thanks again! GaryReggae (talk) 23:03, 20 May 2011 (UTC)[reply]

Tablets that will fit in the pocket of my lab coat

Dear Wikipedians:

I would like to buy a tablet that will fit in the pocket of my lab coat so that when I go see patients I will have the power of many medical books with me. Unfortunately the iPad is too big and won't fit. Is there any tablet that will fit the pocket of my lab coat?

Thanks,

142.76.1.62 (talk) 15:25, 20 May 2011 (UTC)[reply]

iPhone. The iPhone is not usually called a "tablet," but the word "tablet" is not usually applied to iPad, either. The iPad is officially called an "iPad." As an owner of a device, you can call it whatever you like. I call my iPads "nimur." (We have a serious crisis of identity in my home). Nimur (talk) 15:43, 20 May 2011 (UTC)[reply]
The clairvoyance interface being down for its Friday afternoon nap, I suppose we might ask to be informed as to the dimensions of the pocket of your lab coat. (And come to that, what's the point of a medical man or woman without a briefcase of exotic drugs, spatulas, ear & eye peering apparatus, &c. Can't the tablet be stored with these.) --Tagishsimon (talk) 15:49, 20 May 2011 (UTC)[reply]
Funnily enough iPad says "This article is about the line of tablet computers designed and marketed by Apple Inc." and "The iPad (pronounced /ˈaɪpæd/ eye-pad) is a line of tablet computers designed" and has 33 instances of the word tablet including in the title of a number of refs. Comparison of tablet PCs and Tablet computer both feature the iPad, in the later case as the lead image... Apple may not like to call their devices tablets the same as not liking to call their computers "personal computers", it doesn't stop the rest of the world applying standard terms to similar devices. Incidentally "Comparison of tablet PCs" may be of use to the OP although it only has one 5" tablet, the Dell Streak. I'm quite sure there are more then that but it it's a useful starting point. Of course if a 5" tablet is still too big, a smart phone may really be the best bet. Edit: There is evidentally a 4" tablet [6] although it's basically a smartphone without the phone components. Nil Einne (talk) 16:44, 20 May 2011 (UTC)[reply]
Incredible that our article uses such terminology. Now, I am not technically an authoritative or official source of information about iPads; but then again, neither is the Wikipedia article; it is editable by anyone. The authoritative website, of course, is http://apple.com/ipad - and there is absolutely no discussion of "tablet" anywhere on there. In fact, previously, the page included the text "It's not a tablet, it's iPad 2." I prefer to describe iPad as a vector processing supercomputer with touch interface. Nimur (talk) 18:40, 20 May 2011 (UTC) [reply]
If you allow them to do so, pretty much every company would describe their product as "totally unique" and insist that it can't possibly be classified with any of it's competitors (for another example, Dove (toiletries) insists that their product isn't soap, but is a "beauty bar": [7]). It's our job to wade through that marketing BS and describe things as they really are. StuRat (talk) 18:57, 20 May 2011 (UTC)[reply]
As I said above, you can call any device anything you like. The ultimate question here is what the original poster is looking for: a "small tablet" is not often called a "tablet," because "tablet" is weakly defined. So, if they're looking for a "small, mobile, touch-screen information processing and viewing device," rather than a "tablet," but they have decided that an iPad is too large, an iPhone or an iPod Touch may be a suitable replacement. Nimur (talk) 19:11, 20 May 2011 (UTC) [reply]
Depending on the size of your pockets, a nice 7in tablet might be just what you need. The Galaxy Tab fits comfortably into some pockets. APL (talk) 23:57, 21 May 2011 (UTC)[reply]

Thank you all for contributing. I went to the store today and found out that the new Blackberry Playbook is both powerful and fits in my lab coat. Therefore I have purchased it. 70.31.153.88 (talk) 00:26, 22 May 2011 (UTC)[reply]

Resolved

GRUB legacy and multiple Linux partitions

Hi, I would like to use GRUB legacy to alternately boot multiple Linux partitions.

/dev/sda1 - First  Linux installation, GRUB package is installed, GRUB code in MBR points here
/dev/sda2 - Second Linux installation, GRUB package is installed, but grub-install was not run
/dev/sda3 - Third  Linux installation, GRUB package is installed, but grub-install was not run

All three partitions contain a /boot/grub/menu.lst. The menu.lst in /dev/sda1 currently contains default 2 as well as two additional entries after the automagic kernels list. These two entries consist of a root(hd0,1) resp. root(hd0,2) and a configfile /boot/grub/menu.lst. That way, it currently boots /dev/sda2 unless something else is selected manually.

What I'd like to do is make it toggle between /dev/sda2 and /dev/sda3 on each reboot, but all my experiments using default saved and various combinations of savedefault n failed. Also, commands like grub-reboot-once or scripting echo "savedefault --default=n --once"|grub --batch fail; either it always boots item #0 or the item specified as default in the menu.lst on /dev/sda1. I also tried mounting and chrooting into sda1 and running the grub commands from there; that didn't work either.

So what is the proper way to make the box boot sda2 on the first reboot, sda3 on the second, sda2 again on the third, etc? -- 188.99.196.147 (talk) 21:03, 20 May 2011 (UTC)[reply]

You could just have a shell script alter menu.lst on bootup (depending on conditions, if you like). ¦ Reisio (talk) 17:59, 21 May 2011 (UTC)[reply]
As Agent Smith said: Tell me, Mr. Anderson... what good is a phone call... if you're unable to speak? - A script would only run after the other partition booted; if something causes the boot to fail, there's no way of falling back to the other partition. -- 88.67.158.241 (talk) 21:23, 21 May 2011 (UTC)[reply]
No way besides selecting the other one from the GRUB screen at bootup. (OK actually there are a number of other ways, but let's be dramatic.) ¦ Reisio (talk) 04:02, 23 May 2011 (UTC)[reply]
Okay, let me clarify: The script you suggested provides no automated fallback. User interaction is required - and that's what I'm trying to avoid. -- 78.43.60.13 (talk) 08:46, 23 May 2011 (UTC)[reply]

Managed Extensions for C++ arrays

For my sins, I'm having to do some fairly simple coding using Managed Extensions for C++. It's not proving too painful so far, but I've hit a bit of a sticky point regarding multidimensional arrays. In the old days, I could do something like:

void oldFunction(int*);

void mainFunction()
{
    int aiWorkingData[10][10];
    
    aiWorkingData[5][2] = 7;

    oldFunc(aiWorkingData[5]);
}

But, now, it seems as though I have to do:

System::Void newFunction(int []);


System::Void mainFunction()
{
    int aiWorkingData __gc[,];
    int aiTemp __gc[];
    int i;

    aiWorkingData = new int __gc[10,10];
    aiTemp = new int__gc[10];

    aiWorkingData[5,2] = 8;
    
    for (i = 0; i < 10; i++)
    {
        aiTemp[i] = aiWorkingData[5,i];
    }
    newFunction(aiTemp);
    for (i = 0; i < 10; i++)
    {
        aiWorkingData[5,i] = aiTemp[i];
    }
}

I'm sure I'm doing something wrong, but it's not obvious what I should be doing instead. Any help would be most appreciated. Tevildo (talk) 21:18, 20 May 2011 (UTC)[reply]

Is it just me, or has the background to the page suddenly changed to a shade of pink? If so, where do I complain about it? Tevildo (talk) 21:22, 20 May 2011 (UTC)[reply]
Is today deprecated-Microsoft-platforms day? What in the world are you doing with Managed C++ that you can't do with CLI/C++ in .NET? ME was EOL`ed some five years ago; you should have upgraded to CLI by 2006. Unless you have a very good reason for using deprecated build-tools and deprecated language extensions (such as, "I am a software archaeologist creating a museum exhibit of a C++ development shop during the Bush II era,") you're asking for trouble. Nimur (talk) 21:45, 20 May 2011 (UTC) [reply]
A valid point, of course - I'm adding some functionality to an old piece of code which it would take too much time to rewrite from scratch (and I'm not really a programmer in the first place, as you may be able to deduce). But it needs to be working for Monday - I can do it using the loops if I have to, I was just wondering if there's a more elegant method. Tevildo (talk) 21:51, 20 May 2011 (UTC)[reply]
Multidimensional arrays are specified in C++ with a fixed ABI (according to ISO C++), but some compilers don't trust the standard (because so many other compilers don't use the standard). So technically, your earlier code is an unsafe operation and doesn't guarantee portability. (You can't guarantee that the one-dimensional array accesses the data sequentially, because you don't really know how the 2-D array is laid out in memory). VC++'s probably giving you a compiler error for that reason. Official Microsoft array documentation does not specify a multidimensional array layout ABI; so, you should use your second method. "Unelegant," but also unambiguous. Nimur (talk) 22:42, 20 May 2011 (UTC)[reply]
Thanks for the info. And Bush I would be more accurate - most of the stuff downstairs is still in VB3. Tevildo (talk) 23:22, 20 May 2011 (UTC)[reply]
Nimur, nothing that you just said makes any sense. C arrays are stored in row-major order with no row/column headers or other overhead. This layout is used by absolutely every C and C++ compiler that has ever existed. Tevildo's C code is legal and unambiguous (aside from array elements other than [5][2] being left undefined).
Tevildo, I've never used Managed C++, but it must support arrays of arrays (as distinguished from multidimensional arrays). I can only guess the syntax, but perhaps it's this:
                    int aiWorkingData __gc[] __gc[] = new int __gc[] __gc[10];

                    for (i = 0; i < 10; i++)
                        aiWorkingData[i] = new int __gc[10];

                    aiWorkingData[5][2] = 7;

                    newFunction(aiWorkingData[5]);
-- BenRG (talk) 12:05, 21 May 2011 (UTC)[reply]
BenRG, your sample code will initialize a one-dimensional array of pointers to other arrays allocated on the heap, which is not identical to a row-major order. In other words, there's zero guarantee that your individual sub-arrays are anywhere near each other: in your line:
   aiWorkingData[i] = new int __gc[10];   // aiWorkingData[i] now contains a pointer to a new array
...they are laid out in memory whereever new allocated them. In addition, in Managed C++, you have paid a memory overhead because you have duplicated the array metadata and also store an additional array of pointers to one-dimensional arrays. That is functional but it is not identical to the original code. This was my whole point above.
As a closing note, do not store pointers (or anything you allocated with "new") to an "int" - use an array of the appropriate pointer type. If your target machine runs a 64-bit managed C++ engine, and your code was compiled for a 32-bit target, you have just corrupted memory. Nimur (talk) 15:09, 22 May 2011 (UTC)[reply]
Okay, I think I've figured out the confusion. You assumed that oldFunction might access the whole 10×10 array, not just row 5. I assumed that it would access only row 5. The OP made the same assumption I did, judging by the second code snippet. My array-of-arrays code wasn't meant to simulate a C array, just to solve what I think is the OP's problem.
My code doesn't store a pointer into an int, unless I guessed the syntax wrong. The result of storing a pointer into an int would be a compile-time error, not memory corruption.
"Multidimensional arrays are specified in C++ with a fixed ABI (according to ISO C++), but some compilers don't trust the standard (because so many other compilers don't use the standard)" is wrong any way I read it. It's wrong if it refers to C arrays because the memory layout of C arrays is specified and universally observed. It's wrong if it refers to any other array type because their memory layout isn't specified. ISO C++ doesn't define an ABI.
"So technically, your earlier code is an unsafe operation and doesn't guarantee portability" is wrong if oldFunction only accesses row 5. But as far as I can tell from N1124, accessing data outside row 5 with an expression like p[10] (where int* p = aiWorkingData[5]) does invoke undefined behavior, even though the standard guarantees that &p[10] == &aiWorkingData[6][0]. -- BenRG (talk) 20:17, 22 May 2011 (UTC)[reply]

App security

Hi, I am very cautious about what software I load onto my (Windows) PC for all the obvious reasons. I would only ever install software from well established companies that I'm 100% confident about. I would never install anything from an unknown or dubious source and let it have free rein over my PC. So, I'm curious now about how the current craze for downloading apps to "smartphones", tablets etc. works (I don't own any of those devices). As far as I can gather, many of these apps seem to be small "thow away" or "fun" programs, often not written by known or reputable companies, but by some unknown individual or individuals of unknown credentials. Are people downloading these apps more risk-tolerant than me, or is there some stronger in-built protection in the relevant operating systems, compared to Windows, that limits the access that apps have, and prevents them doing damage, spying on one, etc.? 86.176.213.179 (talk) 23:54, 20 May 2011 (UTC)[reply]

Well the only sort of 'security' is provided by Apple in the form of the App Store. People at Apple test it to make sure there are no malicious code on it. I'm not sure about the other stores however. General Rommel (talk) 00:25, 21 May 2011 (UTC)[reply]
That must be quite hard to do, I would have thought, in all but the most tiny apps. My experience, admittedly from another era, is that it is incredibly hard to understand what other people's programs are doing just by looking at the source (which is what I assume the testers must do, since any sort of post-installation delayed activation, as well as probably all sorts of other checks on location, usage patterns etc., could presumably defeat a tester who simply ran the program). And that's even when the programs are written relatively straightforwardly without any attempt to deceive. If someone was deliberately trying to obfuscate the code to conceal bad things, well, I'm not sure if I would trust a tester to spot that. Maybe they have better techniques than I'm imagining... 86.176.213.179 (talk) 01:42, 21 May 2011 (UTC)[reply]
I'm going to call [citation needed] on General Rommel's claim that "People at Apple test it to make sure there are no malicious code on it". I am under the impression that somebody launches the app and plays with it for like a minute to see whether it crashes, and if it passes this "test" then it can get launched. If there are user reports after-the-fact that it's malicious, it would get taken down at that time. Comet Tuttle (talk) 16:41, 23 May 2011 (UTC)[reply]
Android provides a fine-grained security model (although it's not that fine grained). When you install an app, it shows the permissions the app needs, and you can refuse to install. Android apps are mostly compiled to Dalvik bytecodes which are JITted and run in an individual sandbox environment (which makes it difficult for a bad app to mess with other apps or the system). So it's somewhat safer downloading and running a random app than it would be downloading and installing a random Windows program (but that's a low benchmark). In practice I fear most people don't read (or understand) the permissions they're granting, and I wonder what proportion of users do due diligence in checking the provenance of the app and the actual reputation of its makers. -- Finlay McWalterTalk 01:02, 21 May 2011 (UTC)[reply]


May 21

Emoji

How can I add Emoji to my Apple MacBook pro please? —Preceding unsigned comment added by 85.211.157.87 (talk) 06:54, 21 May 2011 (UTC)[reply]

I'm not familiar with them, but the emoji article has something about them being encoded in the Unicode standard v6.0 at the behest of Google and Apple. Maybe you can find relevant links from the article. Astronaut (talk) 19:07, 21 May 2011 (UTC)[reply]

Yeah, well, thanks thanks for that, but it is all a bit beyond this slow witted 80 year old, so perhaps I will go without!--85.211.225.59 (talk) 18:09, 22 May 2011 (UTC)[reply]

Printing a content list of a folder in Windows 7

I want to be able to print the list of files and folders I can see in Explorer - for example the content of "My Documents" or "My Pictures", for that matter any arbitrary folder/directory. Windows Explorer does not allow for either directly printing or creating a text document. It used to be easy to do with simple Dos command before the current crop of M$ coders were embryos! Roger (talk) 08:50, 21 May 2011 (UTC)[reply]

Open a "DOS box", aka Command Prompt, navigate to the folder you want, dir > list.txt, then open list.txt in (say) Notepad and print from there. AndrewWTaylor (talk) 10:29, 21 May 2011 (UTC)[reply]
Thanks! (even though I feel a bit stupid). Now to try to explain the procedure to my 73 year old father over the phone. He's been using computers since he first bought a Comodore CBM8032 but still doesn't understand elementary terminology such as "browse". Roger (talk) 11:01, 21 May 2011 (UTC)[reply]
This page explains how to set up a batch file to do the job, which may or may not help you... AndrewWTaylor (talk) 11:08, 21 May 2011 (UTC)[reply]
Thanks again. Maybe I can set up a batch file in such a way that I can simply email it to Dad with instructions at the "click here" level of sophistication. He wants a list of all his photos in "My Pictures" so that he can delete the many (as in thousands of) duplicates. Roger (talk) 11:18, 21 May 2011 (UTC)[reply]
If you only want to do a single (or few) such listings, and you can literally see them on the screen in explorer - all at the same time (ie without scrolling):
  • Alt-PrintScreen to copy an image to the clipboard. (PrintScreen alone is the whole screen, Alt-PrintScreen is the currently active window.)
  • Ctrl-Esc Run Wordpad (this is for XP - you may need to modify for 7)
  • Paste
  • Print
There may (should!) be a simpler way to print the screen or clipboard from "out-of-the-box" Windows, but I'm not aware of one. Mitch Ames (talk) 11:21, 21 May 2011 (UTC)[reply]
Maybe there's a better way. Last month I asked about free software to find duplicates and similar files. I got some promising replies. VisPics seems to do what I wanted, though I found the user interface is not the most intuitive to use. Astronaut (talk) 19:14, 21 May 2011 (UTC)[reply]

Four Anon Questions

Ii want to know that 1) how can i create a gif image that shows a picture of person slowly converts to a animals picture. please tell me. 2) i want to know that is there any way in ms excel 2007 time written in hour format converts to decimal. for example 01:15:00 min to 1.25 hour. 3) i want to create a logo/monogram for my company. please give me some idea. my company name is saturnking. how can i create one.... —Preceding unsigned comment added by 180.215.120.11 (talk) 14:17, 21 May 2011 (UTC)[reply]

i want know that is there any website/pdf/word/excel document available that can teach me tally 9. if available please provide link or send it to me on saturnking.weebly.com or to my email email address removed. please help me and god will help you. —Preceding unsigned comment added by 180.215.120.11 (talk) 14:24, 21 May 2011 (UTC)[reply]

1. See the Software section in Morphing.
2. This works for me: =(TEXT(LEFT(A1,4),"####")&TEXT(MID(A1,FIND(":",A1)+1,2)/60,".##")&RIGHT(TEXT(RIGHT(A1,2)/60/60*10,".##"),2))+0
3. How about Saturn with a crown?
4. There is a lot of Tally 9 documentation at their documentation repository here. -- kainaw 14:36, 21 May 2011 (UTC)[reply]
1. Once you have the intermediate images from the morphing mentioned above, I imagine the output files would need to be a turned into an Animated GIF. Many graphics programs can do this, though the comparison of raster graphics editors doesn't say which ones do.
2. A better Excel formula would be HOUR(A1)+((MINUTE(A1)*60)+SECOND(A1))/3600 which doesn't rely on character string slicing, but instead uses Excel's time functions to turn a time into a number. Make sure you format the time in cell A1 as time and format the cell with the formula as general or number.
3. Can't think of anything better then a Saturn with a crown.
4. We also have an article on Tally Solutions which you might find useful. Astronaut (talk) 19:00, 21 May 2011 (UTC)[reply]
3) That could be either Saturn, the planet, or Saturn (god). However, the planet is probably more recognizable. StuRat (talk) 21:46, 21 May 2011 (UTC)[reply]
4) This site offers free online tutorials (which I have not tested) about Tally 9. Cuddlyable3 (talk) 23:38, 21 May 2011 (UTC)[reply]
Excel stores date and time values internally as day numbers. If the time you want to convert is formatted as an Excel time value in cell A1, you can use =A1*24 and format that as a number to get the hour value. If the time is stored as text, use =VALUE(A1)*24 --Bavi H (talk) 04:15, 22 May 2011 (UTC)[reply]

Folder on Desktop Refuses to Move (Vista)

Resolved

I have a folder on my desktop, and no matter what I do, I can't get it to move somewhere else, as I keep getting the 'permissions' dialogue box. When I go inside the folder and try to move individual components, I am told that these components are in use by another program (and that, in fact, it has nothing to do with permissions, admin rights, or ownership). This is wonderful to know, but our dear friend Bill doesn't seem to think I'd find it useful to know what program this is. I have admin rights on this computer, and have ownership of the folder. Now, how do I find out which program is supposedly using the contents of this folder? FWIW, I have tried using an unlocker program, and it reported that there was nothing to unlock (no 'handles', or something). --KägeTorä - (影虎) (TALK) 14:35, 21 May 2011 (UTC)[reply]

I haven't used Windows in many many years, but there used to be a program called procexp.exe (hopefully Windows still has it). Run that. Select "find" from the menu and type in part of one of the file names that claims to be in use. The process explorer will show which process is using the file. Then, you can kill that process. I assume it is the Windows indexing service. -- kainaw 14:41, 21 May 2011 (UTC)[reply]
Cheers, but procexp.exe doesn't seem to exist on Vista (at least, it can't be found when I try to use it from 'Run'). --KägeTorä - (影虎) (TALK) 14:53, 21 May 2011 (UTC)[reply]
Process explorer is actually a download from Sysinternals. It's not included with Vista, but it runs under it. --Sigma 7 (talk) 15:00, 21 May 2011 (UTC)[reply]

Fixed. It was a disk image that Daemon Tools Lite had been neglecting to fully unmount, while at the same time telling me it had unmounted it. Cheers. --KägeTorä - (影虎) (TALK) 14:59, 21 May 2011 (UTC)[reply]

ImDisk ¦ Reisio (talk) 18:02, 21 May 2011 (UTC)[reply]

Types of boot sectors

The article concerning boot sectors overlooks the fact that there are other types of boot sectors than a master boot record. I know that a GUID Partition Table is one of these. Are there any others? --Melab±1 20:49, 21 May 2011 (UTC)[reply]

The definition of a boot sector is technically any sector at all that has 0xAA55 as its final two bytes. The master boot record is the normal boot sector for a hard drive. For drives that cannot be partitioned (like USB drives), you will find a volume boot record. Because the boot sector can contain code, it is common to have a multi-OS selection program in the boot sector. -- kainaw 21:05, 21 May 2011 (UTC)[reply]
But, the GPT standard was designed to supersede MBRs. If you look under gParted and select "New partition table", MBR is listed as one of the options along with GPT and BSD disklabel. Whatever category those fall under, what other types are there? --Melab±1 02:33, 22 May 2011 (UTC)[reply]
So can anyone explain that? --Melab±1 19:19, 22 May 2011 (UTC)[reply]
I can't pick out a clear question. Are we supposed to be listing all known variants of the boot sector for PCs? Or comparing the PC boot sector to the booting procedure of other architectures? Or is it really about partition tables? The DOS MBR puts some partition information in the boot sector, but that's not universal, so if you want to know about partition table formats you shouldn't ask about boot sectors. Even in the PC world, floppies can have a boot sector but they usually aren't partitioned. 67.162.90.113 (talk) 23:22, 22 May 2011 (UTC)[reply]
List of known boot sector standards/layouts that are not MBRs. --Melab±1 01:53, 23 May 2011 (UTC)[reply]
I know that a GUID Partition Table is one of them. And, can an MBR possibly be larger than 512 bytes if a custom BIOS was used? --Melab±1 19:04, 23 May 2011 (UTC)[reply]
Pick any OS that can run on PC and it probably has its own boot sector, which it will probably call an "MBR", though it may not resemble the DOS MBR. Pick any other architecture and it'll have its own boot procedure which may or may not be based on a magic sector. OpenFirmware doesn't load a boot sector; it can load an OS from a file stored in a filesystem anywhere on disk. Then there's network boot with TFTP... and El Torito... boot methods would form a pretty big list. 67.162.90.113 (talk) 22:22, 23 May 2011 (UTC)[reply]

Windows Command Prompt window title

Resolved

Is there a command I can issue, within the Command Prompt window, to change the title of that window (as it appears on the title bar) ? StuRat (talk) 21:41, 21 May 2011 (UTC)[reply]

Yes, just type title blah (where blah is the title you wish to use. Nanonic (talk) 22:51, 21 May 2011 (UTC)[reply]
Wow, as simple as that. I was picturing embedded control characters, etc. Thanks ! StuRat (talk) 23:02, 21 May 2011 (UTC)[reply]

May 22

COM port to PS/2 converter

Dear Wikipedians:

Today I searched my garage and found a couple of ancient COM port (serial port) mouse that I used many years ago. I'd like to use them again. However, my computer only comes with PS/2 port or USB port, so I'm wondering if there exists some sort of COM to PS/2 or USB converter?

And, on a related and more importantly, I would like to re-use some of my old PS/2 mice with my laptop. Since my laptop only has USB ports, I'm wondering if there is some sort of PS/2 to USB converter? (I have a couple of USB to PS/2 converters, but they work oppositely to what I intend in this scenario).

Thanks,

70.31.153.88 (talk) 00:33, 22 May 2011 (UTC)[reply]

Try this for COM-to-USB and this for PS2-to-USB adpaters. Rocketshiporion 02:16, 22 May 2011 (UTC)[reply]
That's exactly what I am looking for, thank you so much Rocketshiporion! 70.31.153.88 (talk) 02:44, 22 May 2011 (UTC)[reply]
For a very old device you'd want to be careful. Most or all PS2 to USB adapters (and also COM to PS2) are completely passive. They only work because the device is designed to be able to work with them. If your device is relatively recent, say within the past 8 years it would probably work with a PS2 to USB adapter but there's no guarantee if it didn't come with one or otherwise specify it will work. The COM to USB should be fine since I'm not aware passive adapters were common. Nil Einne (talk) 04:41, 22 May 2011 (UTC)[reply]
Resolved

Purple links

For reasons I cannot fully explain, hyperlinks' turning purple when visited sends me into near apoplexy. I have succeeded in disabling that feature in firefox, but I hate firefox. I've recently switched to Opera, and even though the settings page tells me I've changed the color of visited links to the same blue as non-visited, it's clearly a lie. The only way I am able to keep all links blue is to use private tabs. This isn't a huge problem, but private tabs cannot be recovered (if I accidentally close the tab or browser, for example) so it's mildly annoying. Is there any other way to force Opera to render all links the same blue? (If there's a way to do it in Chrome I'd appreciate knowing how to do that as well.) Thanks! 68.35.40.154 (talk) 00:48, 22 May 2011 (UTC)[reply]

I didn't understand what apoplexy meant, so I linked it General Rommel (talk) 01:08, 22 May 2011 (UTC)[reply]
One thought, maybe you should adjust the colors on your monitor, so you have less red. This might prevent that particular purple from showing up anywhere. StuRat (talk) 03:08, 22 May 2011 (UTC)[reply]
Many sites, including Wikipedia, use their own stylesheets to override the default link colour settings provided by your browser. Maybe you could look at the accessibility settings of your browser - I know Internet Explorer will let you use your own stylesheet, though I'm unsure whether that is read before or after the site's own stylesheets. Alternatively, there is something called Greasemonkey which lets you modify sites before before they make it to your screen. If it is just the particular purple used by Wikipedia that bothers you, you could sign up for a username and then you could set your own custom CSS and Javascript. Astronaut (talk) 08:02, 22 May 2011 (UTC)[reply]

What makes you hate Firefox? ¦ Reisio (talk) 04:06, 23 May 2011 (UTC)[reply]

A problem with Windows Media...

Lately, I have a problem on my computer.

When I record a video with CamStudio, and then I play it on Windows Media Player, it just shows a picture from the video and while the sound of the video is playing, there's still a picture from the video, meaning that the video isn't working. Also, when I put a CamStudio video on Windows Live Movie Maker, it just shows a gray space with a yellow "!" sign and the video and the sound are not playing. Is there anything I could do to solve the problem? —Preceding unsigned comment added by Sirdrink13309622 (talkcontribs) 07:18, 22 May 2011 (UTC)[reply]

Connecting to the internet by using Samsung champ as modem.

I have Samsung champ GT-3303 mobile phone and supported USB/data cable with Samsung kies software and a computer in good condition with win7 installed in it.

now my question goes here--

1) i just want to know that is there any way by which i can use my phone as modem and connect to internet in my computer, as i can connect to internet by using Nokia 3110 as modem and software Nokia PC suite. Gopal (http://www.gopalmishra.weebly.com) 180.215.121.179 (talk) 09:01, 22 May 2011 (UTC)[reply]

2) I had forgotton my windows vista buisness startup password and i does not have password reset disk. i want to start windows and change the password. what should i do. is there any way to break the password. please help —Preceding unsigned comment added by 180.215.121.179 (talk) 09:19, 22 May 2011 (UTC)[reply]


In the first sentence you say you have Windows 7 (genuine I presume) and now you say you lost your password for Vista, please clarify. Is this another request? General Rommel (talk) 09:49, 22 May 2011 (UTC)[reply]


it is just my next question 180.215.121.199 (talk) 06:32, 23 May 2011 (UTC)[reply]

Chrome compared with Firefox

Can Chrome, or any of the other browsers such as Opera or Safari etc, do anything that Firefox cannot do? Thanks 92.15.21.174 (talk) 14:31, 22 May 2011 (UTC)[reply]

Chrome can render HTML using WebKit, and Firefox can not do this. (Safari can, though). This is the mechanism by which a page's code is translated into the text, pictures, fonts, and positioning on screen. Truthfully, if you don't already know what that means, you probably won't really care; but for the curious, here is our article, Comparison of layout engines (HTML). Additionally, Chrome implements its JavaScript interpreter with the V8 engine, instead of the SpiderMonkey engine; again, this is a distinction that only affects the pedantic JavaScript programmer. It is also claimed that Chrome is faster, better, and so on; but such metrics are highly dependent on your individual system and settings. Chrome can also run on the ChromeOS, which is something that no other web browser can do. Nimur (talk) 15:22, 22 May 2011 (UTC)[reply]
Those aren't really abilities: (except for ChromeOS, which is neither here nor there) those are just names of the underlying systems. There are a few cool features that each browser has that no other browser has: Firefox 4 has app tabs, Chrome has tab-to-search-site-specific-search engines, etc. But we live in a wonderful era where, for the most part, your browser only affects how you do things, not what we can do. Paul (Stansifer) 21:13, 23 May 2011 (UTC)[reply]
Dude :p ¦ Reisio (talk) 04:10, 23 May 2011 (UTC)[reply]

Chrome can track you and send every url you type into the address bar or visit to Google. I don't think Firefox can do that, unless you use the integrated Google search box on the toolbar 82.43.89.63 (talk) 15:28, 22 May 2011 (UTC)[reply]

Yeah, that's probably the most significant difference. The GoogleUpdate.exe app that's installed with most Google software also gives them the power to install pretty much anything they want without your consent. ¦ Reisio (talk) 04:10, 23 May 2011 (UTC)[reply]
To be fair, Firefox also sends the contents of every URL you enter in the address bar (or click on via a link) directly to Google. Google helps Mozilla to perform this benevolent service for the purpose of protecting you from malicious websites that want to track your browsing habits and/or take control of your computer by hosting a website that tracks your browsing habits and takes control of your computer. If you would like to disable this feature, you can edit the "Safe Browsing" features in your about:config in Firefox. You can also read the Google Safe Browsing Service legal and privacy policy as it applies to Firefox. Nimur (talk) 03:10, 24 May 2011 (UTC)[reply]

fortran PURE functions

Resolved

Hi,i must be missing something obvious, i have a module file where i declared all the functions and subroutines PURE (removing all write and stop statements and adding intent to all parameters). I have:
pure function (A) that calls a pure subroutine (B) (No complaints from compilers)
that subroutine (B) then calls several other pure functions/subroutines (C,D,E). Now C,D,E dont call any other procedures, but all are declared PURE and have intents set. But gfortran 4.5 and ifort 11.1 both complain that there not PURE,

gfortran -> Error: Function reference to 'getphase' at (1) is to a non-PURE procedure within a PURE procedure
Ifort -> error #7137: Any procedure referenced in a PURE procedure, including one referenced via a defined operation or assignmnent, must be explicitly declared PURE.
[GETPHASE]
PHASE = GETPHASE(HJD,V(19),V(20))

BUT gfortran 4.1 and ifort 9.1 both accept the code without complaining (Yes i know there old).

The function in question (from previously lets call it C) :

     PHASE = GETPHASE(HJD,V(19),V(20))

     PURE DOUBLE PRECISION FUNCTION GETPHASE (HJD,PERIOD,TZERO)
            ! Returns phase from given time and orbital ephemeris
      IMPLICIT NONE
      DOUBLE PRECISION,INTENT(IN) :: HJD,PERIOD,TZERO

      GETPHASE = (HJD - TZERO) / PERIOD
      GETPHASE = GETPHASE - int(GETPHASE)
      if ( GETPHASE < 0.0d0 ) GETPHASE = GETPHASE + 1.0d0

      END FUNCTION GETPHASE

So what am i missing that makes this function non-pure? Thanks --86.186.152.48 (talk) 15:34, 22 May 2011 (UTC)[reply]

I don't know if Fortran follows this definition, but a pure function is one (a) that has no side-effects, and (b) whose return value only depends on the arguments. It looks like (b) holds to me (but I'm no Fortran expert), since it doesn't seem to refer to any variables other than its parameters. A possible violation of (a) is the division operation: whatever happens when you divide by zero is probably a side-effect, though I have no idea whether the Fortran typechecker actually respects this, or what you can do to get around it. Paul (Stansifer) 16:29, 22 May 2011 (UTC)[reply]

Well that was silly, found the problem GETPHASE had been declared as a variable--86.186.152.48 (talk) 17:28, 22 May 2011 (UTC)[reply]

OK, I will mark it resolved. StuRat (talk) 17:39, 22 May 2011 (UTC)[reply]

bluetooth mic by plugin, not pairing

I want a bluetooth microphone which does not need pairing. It is in two parts: one part is a simple plug (the size of a USB drive) which you plug into the microphone socket. The other part is the microphone itself, which is battery powered and wireless. It's connected to the other part.

Does such a thing exist? Just a microphone, preferably not a complete handsfree kit. 81.98.97.252 (talk) 21:01, 22 May 2011 (UTC)[reply]

sound emanating from data service center

What quality and quantity of sound would emanate from a 23-acre data service center? --Anna Lands (talk) 23:35, 22 May 2011 (UTC)[reply]

See Data center. The main source of noise is going to be the cooling systems (24/7) and whatever backup power source is used for when the electricity goes out - such a large site might have something more efficient and quieter than the usual diesel generators, or it might have one diesel generator per building. There's also going to be some traffic noise, although the number of employees attending the site daily is going to be a lot less than a general industrial site of the same size. Tevildo (talk) 00:18, 23 May 2011 (UTC)[reply]
See this. You are going to be hearing a hell of a lot of air conditioning. I've been by this one in particular and from the outside all you hear is the hum of a lot of fans. Inside, the buzzing of all the computers is deafening to my ears, but others claim they don't hear a thing. -- kainaw 02:02, 23 May 2011 (UTC)[reply]

May 23

copy from one desktop to another?

Is there a way to copy things on one Windows desktop (shortcuts, folders, etc) to another over a local network? Bubba73 You talkin' to me? 03:09, 23 May 2011 (UTC)[reply]

Yes, the files that show up on the desktop come from two folders, %USERPROFILE%\Desktop and %ALLUSERSPROFILE%\Desktop. %USERPROFILE% and %ALLUSERSPROFILE% are environment variables. You can see their values on a particular computer for a particular user by opening a command prompt and typing set. See also Special Folders. -- BenRG (talk) 03:55, 23 May 2011 (UTC)[reply]
Well, the other computer won't let me into the userprofile, so I'll have to do it the hard way. Bubba73 You talkin' to me? 18:47, 23 May 2011 (UTC)[reply]

Can't copy EXE files to Windows 7 computer

I can't copy *.EXE or *.HLP files to a Windows 7 computer, either over a home network or an external drive. It says to contact the administrator, but that is me, and my user account has admin privlidges. I can copy them by renaming the file extension, copying. and then renaming back to the original, but that is impractical. How can I copy these files (easily)? Bubba73 You talkin' to me? 03:51, 23 May 2011 (UTC)[reply]

That's strange. What error message do you get (other than "contact the administrator")? -- BenRG (talk) 03:56, 23 May 2011 (UTC)[reply]
Now it is not doing it. Bubba73 You talkin' to me? 04:37, 23 May 2011 (UTC)[reply]
Could it be that the first time, you were using a web browser to download the files to your system, and the second time you were just using the Windows desktop? Comet Tuttle (talk) 16:34, 23 May 2011 (UTC)[reply]
No, I was trying to copy from an old computer to a new one. First over the network, then using an external HD. Bubba73 You talkin' to me? 16:36, 23 May 2011 (UTC)[reply]

Network Neighborhood icon missing

In Windows XP SP3, how can I restore the icon, or, failing that, access the network in some other way ? StuRat (talk) 05:13, 23 May 2011 (UTC)[reply]

On my XP system, I can go to Start, then it shows "network places". Bubba73 You talkin' to me? 05:57, 23 May 2011 (UTC)[reply]


Command Prompt Commands

i just want to know that is there any website/page/document or any thing from where i can get the commands/codes/keys/words that are used in c-prompt. for e.g.-- format,shutdown,exit,run,calc,chkdsk —Preceding unsigned comment added by 180.215.121.199 (talk) 06:28, 23 May 2011 (UTC)[reply]

Try typing HELP inside the command prompt window for a list of all commands. Then type HELP followed by a command for more detail. StuRat (talk) 06:35, 23 May 2011 (UTC)[reply]
You may need to type in /? instead of help if looking for a command that is not included. General Rommel (talk) 09:16, 23 May 2011 (UTC)[reply]

This site has a good list with detailed information on each command AvrillirvA 10:20, 23 May 2011 (UTC) —Preceding unsigned comment added by AvrillirvA (talkcontribs) [reply]

If you're referring to the Windows CLI, http://commandwindows.com is an excellent resource for all things command-line related. Rocketshiporion 20:48, 23 May 2011 (UTC)[reply]

color code for network connection between wimax adaptor and PC

My Wimax Internet connection equipment has an adaptor connected to PC via a cable with RJ45 connectors. The service provider gave me a cable short of my requirement. So, I need to get a cable of my required length. Can somebody point me to the color code specification for this connection? Thanks in advance. --Bluesdatum (talk) 07:23, 23 May 2011 (UTC)[reply]

There isn't a color code for ethernet cables (cat 5). However some companys' network administrators have an ad-hock color code for their own use, to tell them if the cable is carrying VoIP, normal data, the executive network etc. CS Miller (talk) 08:07, 23 May 2011 (UTC)[reply]
Also (perhaps) relevant is that it probably isn't actually RJ45, which is a phone jack standard. Cat5 uses 8P8C connectors, which look very similar. Both articles mention the naming confusion, which is perpetuated in many product specs and descriptions. SemanticMantis (talk) 19:57, 23 May 2011 (UTC)[reply]

Are cell-phones soft-modems?

When using a cell-phone over USB, are they soft-modems? Quest09 (talk) 12:55, 23 May 2011 (UTC)[reply]

If you mean when they're used in a tethering configuration (in the arguably rather limited sense described at softmodem) then no; the processing of the UMTS, GPRS, etc. data connection is done by the phone's own processor, just as if the phone was serving the data to an app running on it rather than over its USB connection. -- Finlay McWalterTalk 15:08, 23 May 2011 (UTC)[reply]

iPhone 3Gs spontaneously deleted books in iBooks I hadn't read in quite a while

The books were backed up on my PC. I wasn't in the middle of a sync or even connected to a computer. I opened up iBooks and didn't touch the edit button. I wasn't touching any button. Then suddenly the icons for two books just disappeared right before my eyes. I thought maybe it was a display glitch, so I tried closing out of iBooks and even turning the phone off and on again, but the books are gone. The only thought I have is that I haven't opened either in a long time, and the phone must know that they are backed up, but clearing out long-idle books to save memory seems like a bad idea because the system ought not to assume that I won't want to read a book again after a few years of idleness and don't have my computer nearby to re-sync. Or was this probably a flat-out fault in operation? 20.137.18.50 (talk) 16:19, 23 May 2011 (UTC)[reply]

It is rather unsettling to have a device where someone else, far away from you, can put his fingers on. Just imagine that you came home just to discover that the bookseller was there earlier and took away some books from the shelf! 80.26.37.77 (talk) 16:54, 23 May 2011 (UTC)[reply]
Hmm - you might want to check Kindle#Remote_content_removal for precedent for this sort of thing. I'm not saying that Apple remotely deleted the books, but anything is possible. Exxolon (talk) 19:51, 23 May 2011 (UTC)[reply]

May 24

Free Offline map software

Google maps and Open Street Map are great online tools. But say I am going to have a laptop out in the field, but no internet connection, what are my options? I see you can download open map data, but I'm not sure where to go from there. I am looking to have an New Orleans area street map that I can use offline. Any ideas? Thanks! -Andrew c [talk] 02:43, 24 May 2011 (UTC)[reply]

I'm pretty sure OpenStreetMap is often used by those with GPS devices etc and this isn't surprising since it was clearly designed and licenced to be a product people can use in such circumstances rather then just an online map. Our own article mentions a ton of software including for desktop OSes and some with the specific mention of offline (although likely a bunch fo software there has offline support even if it isn't mentioned). [8] probably has more Nil Einne (talk) 05:39, 24 May 2011 (UTC)[reply]
Well those lists of programs are a bit overwhelming, and some seem fairly advanced with command line stuff. I've tried two. One couldn't load downloaded map data (or I was doing something wrong) and one didn't appear to be offline (as the map stop loading and zooming when I unplugged the cable). So I was hoping a specific program could be recommended, or one that has a good tutorial or something like that. I appreciate your response though. Thanks for your time. -Andrew c [talk] 14:39, 24 May 2011 (UTC)[reply]

Simplest possible internet multi-player game

Would it be possible to communicate between two or more computers, via the Internet, to play games written in either C or Fortran ? For a basic example, let's say it's a tic-tac-toe game, and all that we need to pass back and forth is the moves. How could this be done ? StuRat (talk) 06:21, 24 May 2011 (UTC)[reply]

Absolutely! Both of those languages have libraries that would allow them to communicate with each other on the Internet.
Explaining how is such a broad question that it's difficult to know where to start. But Basically the simplest thing to do would be to have each user input the other's IP address, and choose to be either X or O. Then After PlayerX placed his X the program would send a TCP/IP packet containing the location of that X. The other program would be waiting for that packet and would display the X on the game-board shown to playerO. Then the process repeats in the other direction. A game that simple, each copy of the program could independently check for the end-game, or it could be decided that ProgramO's copy is in charge of doing that and sending a message to the other one.
It obviously can get a lot more complicated than this. (I believe that Quake was written largely in C.) APL (talk) 07:13, 24 May 2011 (UTC)[reply]
OK, I would actually like to do this, in Fortran. What library functions would allow me to do so ? How are things like dynamic I/P addresses and LANs, at one or both ends, handled ? StuRat (talk) 08:36, 24 May 2011 (UTC)[reply]
If you Google "Fortran TCP/IP" you'll get lots and lots of examples of how to open TCP/IP sockets. For dynamic IPs, you'll need more clever programming, perhaps even a game server with a static IP that can sit in the middle of your two players and coordinate their plays. --Mr.98 (talk) 12:12, 24 May 2011 (UTC)[reply]
QuakeC may be of interest here. Dismas|(talk) 07:49, 24 May 2011 (UTC)[reply]
In practice, you don't even need to use the Internet, or even a local network, to make this work. You can start by programming the game using 2 copies of the same .exe on the same computer, with 127.0.0.1 as the IP address. You could make the first copy listen on a particular port, and the program try to send a packet to that port. If it gets a response, it knows it's already running.--Phil Holmes (talk) 08:09, 24 May 2011 (UTC)[reply]
Are you talking about ways to locally test such a program before doing a full Internet test to another computer ? StuRat (talk) 08:38, 24 May 2011 (UTC)[reply]
That is what 127.0.0.1 achieves, Can a TCP/IP session connect to its own port though? It should work of you send and receive from different ports numbers. Graeme Bartlett (talk) 09:54, 24 May 2011 (UTC)[reply]
I wrote you a little single-player networked (client-server) game (mostly for my own amusement, I confess). It's in Python, but all the socket calls would be the same in C (I just can't be bothered with all extra typing).
Python example
#!/usr/bin/python
import random, socket

words = ['cat', 'dog', 'mouse', 'rabbit', 'snake'] # possible words
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # we're going to be a TCP/IP socket server
sock.bind(('', 7777)) # We'll take connections on any interface, on TCP port number 7777
sock.listen(1) # listen for inbound connections

while True: # loop forever, waiting for a single connection at a time
    conn, addr = sock.accept() # wait for a connection
    answer = words[random.randint(0,len(words)-1)] # make up a word for the player to guess
    remaining = 3 # reset the guess counter
    while True:
        conn.send( "I'm thinking of a %d letter word, you have %d tries to guess it\n>" % (len(answer),remaining))
        data = conn.recv(1024) # receive some input from the player
        if not data: break # client disconnected
        guess=data.strip() # chuck away whitespace
        if len(guess)==0: continue # blank input
        if guess==answer:
            conn.send("success!\n")
            break

        remaining -= 1
        if remaining==0:
            conn.send('wrong, you lose\n')
            break

        conn.send('wrong, try again\n')
   
    conn.close() # close down this connection and go back to waiting for a new one
You'd connect to that with a telnet client (in e.g. port 7777). Turning that into a multi-player game isn't very hard - multi-player client-server games are much the same as single-player, except with multiple concurrent connections and with a shared, persistent world state (in this trivial case, answer and remaining are the world state). -- Finlay McWalterTalk 12:32, 24 May 2011 (UTC)[reply]
A screenshot of Celestia, somewhere near Daphnis. You can see that Daphnis appears to cut through one of Saturn's rings. Lanthanum-138 (talk) 07:07, 24 May 2011 (UTC)[reply]

I was messing around with Celestia version 1.6.0 on Windows XP, and something appears wrong with Daphnis (S/2005 S 1), a satellite of Saturn. Daphnis appears to cut through one of Saturn's rings, which I'm pretty sure it doesn't. What's going on? Is it a bug? Lanthanum-138 (talk) 07:06, 24 May 2011 (UTC)[reply]

I would guess that some type of image post-processing was only done on a portion of the pic, which should have been done on the entire pic, but was interrupted. StuRat (talk) 08:34, 24 May 2011 (UTC)[reply]
Our article says it does orbit in the ring plane in the Keeler Gap, so perhaps this gap is represented as being filled in in this software. Graeme Bartlett (talk) 09:50, 24 May 2011 (UTC)[reply]

Eye-Track Mind Reader

How the hell does this work? It worked for me but does it work for everyone?--Shantavira|feed me 07:16, 24 May 2011 (UTC)[reply]

Presumably they just picked a common name so a fair portion of the people would be freaked out by it. StuRat (talk) 08:32, 24 May 2011 (UTC)[reply]
...and those that are not feel compelled to forward to any friend called John. That's a relief.--Shantavira|feed me 09:19, 24 May 2011 (UTC)[reply]
My name's not John, so it didn't work for me...... :( I watched it three or four times, and it still didn't get my name right..... --KägeTorä - (影虎) (TALK) 13:04, 24 May 2011 (UTC)[reply]

Command to list all available shells

There is a command which directly lists all available shells in Linux/Mac OS X. I can't remember it right now. Can anybody help out? Thanks - DSachan (talk) 09:04, 24 May 2011 (UTC)[reply]

cat /etc/shells
will list all the shells that are acceptable to chsh (change shell). CS Miller (talk) 09:10, 24 May 2011 (UTC)[reply]
Thanks, it works. - DSachan (talk) 09:17, 24 May 2011 (UTC)[reply]

Office Word 2007 Problem

A client emailed a document to me today. The doc was in Word 2003 format. Normally, I have no problem opening docs in Word 2003 format, but for some reason, this one opened up as a single blank page, yet giving me the character count of 9,000+ characters. Also, I noticed that the icon of the document (on my desktop) looks more like the icon of an .xml or .rtf file, and not the usual Word 2003 icon. I don't know if the inability to display the icon, and the inability to display the contents within Word 2007 are related or not, as I am able to display other Word 2003 documents with no trouble. However, these Word 2003 docs also have this .xml/.rtf icon. Maybe I have two seperate issues here, or maybe not. In any case, can anyone help? Cheers. --KägeTorä - (影虎) (TALK) 12:37, 24 May 2011 (UTC)[reply]

I would try opening the document in a plain-text editor such as Notepad to see what it "really" looks like. AndrewWTaylor (talk) 14:46, 24 May 2011 (UTC)[reply]

Capturing 802.11 traffic

Could it be that some wlan cards are not able to? (even if they have monitor mode). 80.26.37.77 (talk) 12:40, 24 May 2011 (UTC)[reply]

Some wlan cards don't implement promiscuous mode. I have at least one that reports nothing if placed in promiscuous mode, but for which Wireshark can trace local traffic (but then that doesn't really need the card's help, only the network stack's). From Wireshark's FAQ here: "some network interfaces might not support promiscuous mode, and some drivers might not allow promiscuous mode to be turned on" -- Finlay McWalterTalk 12:49, 24 May 2011 (UTC)[reply]
I suspect that you save a considerable amount of power by not operating in promiscuous mode; only a very minimal front-end parser must be active, and discards all traffic that isn't addressed to your machine. That way, your wireless system doesn't waste any energy processing "junk mail." Most users aren't going to packet-sniff, so sacrificing that capability to save battery life is a reasonable engineering-tradeoff. If you have a particular need to analyze network traffic, you should invest in specific network hardware and a corresponding software stack that allows you to configure such low-level details. Nimur (talk) 14:51, 24 May 2011 (UTC)[reply]

Image background from white becomes black

Hi, images with a white or checkerd background, such as this one [9], when copied and pasted on a programme, like MS paint or MS powerpoint, come out with a completely black background, and I can't find a way to change it. Is there a reason it does it, and how do you change it? p.s. I'm using the images in accordance to the trademark policy, for a small PowerPoint presentation. --Amendola90 (talk) 15:09, 24 May 2011 (UTC)[reply]

That image doesn't have a white or chequered background, it has a transparent background. So, in a program that properly supports the Portable Network Graphics format, it will show whatever is underneath. If that's the case, you can put a solid white box behind it (with say Powerpoint's drawing tools) and then position it on top. I'd be a bit concerned that a given program doesn't properly support PNG transparency, however. Older versions of Microsoft's IE browser didn't (but later ones do). I don't know about Paint or Powerpoint, and I rather suspect it'll depend on you using an up-to-date version of them. -- Finlay McWalterTalk 15:12, 24 May 2011 (UTC)[reply]

License type of magazine code listings?

Many computer magazines used to contain program snippets (and sometimes even entire programs) within their pages.[10] Yet very rarely was any sort of license specified. Could that code be assumed to be in the public domain? Would, say, including some of that code in a library and redistributing it be kosher? -- noosphere 15:15, 24 May 2011 (UTC)[reply]