Wikipedia:Reference desk/Archives/Computing/2015 December 7

= December 7 =

.HTaccess-Drupal question
When I open the main .HTaccess file in a Drupal 8 installment I see 10 (s) [And some other things]. On the contrary when I open the Apache modules list at WAMP, I see about 25 modules.


 * 1) I know that each represents a reference to an Apache module (I hope this is assumption is true, ist it?).
 * 2) Why are only ten of the Apache modules (and most notably Rewrite_module) are referenced by the .HTaccess and not all of the modules I've seen at the Apache list? Thanks. Ben-Yeudith (talk) 07:02, 7 December 2015 (UTC)


 * The .htaccess is a hidden file inside the Web content folders. Itself and its settings are essential for security to prevent readout secrets by direct accessing files located in a known folder structure drupal uses. -- Hans Haase (有问题吗) 12:20, 7 December 2015 (UTC)


 * I know this - I've edited the question. I need answers to the two questions I presented. In great plea, Ben-Yeudith (talk) 18:23, 7 December 2015 (UTC)

Which programming languages allow trailing commas?

 * Question moved from WP:RD/L Tevildo (talk) 09:13, 7 December 2015 (UTC)

Is there any website that lists which programming languages allow trailing commas and which do not? Something like Comparison of programming languages.

Googling "LANGAUGE_X trailing comma" helps, but it's would be too tedious for dozens of languages, plus it can't be automated; for example the Google results page for "fortran trailing comma" doesn't have the answer on any of the excerpts, so you would need actually visit and read each of the result links.

There's a redirect trailing comma on WP, but sadly that's no longer working.

To keep things simple, let's restrict things to the 50 most popular (by some arbitrary standard) languages out there. 731Butai (talk) 07:50, 7 December 2015 (UTC)
 * That redirect should be redirecting to Computer Programming/Coding Style. The last version at Wikipedia, that included that section is here. Maybe that helps. -- Edgars2007  (talk/contribs) 09:41, 7 December 2015 (UTC)


 * It isn't simply a matter of allowing trailing commas. You also need to know when you can have a trailing comma and what the trailing comma specifically means. 209.149.113.52 (talk) 17:31, 7 December 2015 (UTC)

Varying PDF file sizes
If you create a PDF of an A4 page directly from Acrobat, you get a file size of about 1MB per page. However if you activate your scanner via NAPS2 (not anithere pdf scanner) software or similatr packages, you get about 100kB per page. What is happening here. What is the extra data that NAPS2 discards?--178.110.28.209 (talk) 11:20, 7 December 2015 (UTC)


 * PDF Versions habe specified picture formats. PDF Exprot filters have settigs to specifiy the export and the PDF compatibility to older versions and sometimes you can restrict picture compression settings. When the older JPG standar is spcified, a newer could not be decoded by the pdf viewer. A recencoding of the embedded pictures is performed by the PDF export. -- Hans Haase (有问题吗) 12:14, 7 December 2015 (UTC)


 * I created a blank PDF in Adobe Acrobat Professional 9.4 by going to File &rarr; Create PDF &rarr; From blank page and saved the file. The page was roughly A4 in size. The file was only 6 KB. So, there must be something in that A4 page that you didn't mention -- maybe a high-resolution photo? When you scan a page using NAPS2, you must be scanning it at a low resolution or using high compression. If you need to reduce the file size of a PDF in Adobe Acrobat Professional, you can go to Document &rarr; Reduce File Size.&mdash;Best Dog Ever (talk) 00:59, 8 December 2015 (UTC)
 * Yeah well the A4 page did have some music notation on it. Im trying to reduce it from around 1M to around 100k.--178.110.28.209 (talk) 02:31, 8 December 2015 (UTC)
 * Ideally you should preserve the content as vector data rather than raster which will normally give the smallest file size provided it isn't too complex and you use ZIP compression. But this isn't possible if your source is a printed page or scan. (You'd need to OCR it and I don't know if there are good OCR programs for OCRing sheet music.) In that case, if the sheet is black and white (1 bit/monochrome, not gray scale), converting it to such with either JBIG2 or CCITT group 4 compression should work well. If you're using black and white, you shouldn't generally make resolution too low. Nil Einne (talk) 19:35, 8 December 2015 (UTC)

Computer battery
Hello,

How do I find out what battery I need to buy i.e. the same as the one I currently possess? Its a Toshiba company PC; Laptop. -- Space Ghost (talk) 19:56, 7 December 2015 (UTC)


 * Toshiba has done battery recalls, so they have a good web page showing how to identify your battery here. 209.149.113.52 (talk) 20:19, 7 December 2015 (UTC)


 * You can either buy a genuine battery for your laptop model, or a generic battery. In both cases, the battery is advertised as compatible with a series of models. --Denidi (talk) 13:53, 8 December 2015 (UTC)

I don't know what to say... This is what I found after viewing the battery, C33101713BLA KC2012.03 - the first bit is on the left and the second bit is on the right, a barcode is at the top of it.

I'm incapable of buying it from the internet, I do wish to view the costing so that I can bargain here where I'm with the shopkeeper(s).

I've inserted the embolden info in google, nothing came up...

Space Ghost (talk) 19:56, 8 December 2015 (UTC)
 * If you the laptop's model number then you can search for "Toshiba &lt;model&gt; battery"; sites that sell replacement batteries will list them both by battery number and model number. LongHairedFop (talk) 20:11, 8 December 2015 (UTC)
 * How do I search for that? I only have the laptop. No receipt of purchase, no cover box of it either. -- Space Ghost (talk) 06:54, 9 December 2015 (UTC)
 * Turn your laptop over and look for a sticker similar to the one shown on this web page. I'll use that sticker as an example, although you probably have a different model.
 * For this purpose, I would ignore the "part no.", even though that web page identifies it as a "model-part number". I'd note the TECRA A11-S3531 above the part no., and do a Google search for tecra a11-s3531 battery.
 * That search gives these results, listing various places to buy a compatible replacement battery for a Toshiba Tecra A11-S3531 laptop.
 * Wherever you buy the battery, triple-check that it is compatible with your model before you pay, or you may be stuck with an expensive paperweight. &#8213; Mandruss  &#9742;  08:26, 9 December 2015 (UTC)
 * Got the idea and found it too. I know the price now. Thank you very much. -- Space Ghost (talk) 18:57, 9 December 2015 (UTC)

Thanks all. -- Space Ghost (talk) 18:57, 9 December 2015 (UTC)

Please view this and this, the difference between the two is, first one is 4800mAh and the second one is 5200mAh, does it mean more battery power storage capacity? Current one i.e. 4800mAh gave 4 and half hours - now its giving 15 mins btw - the more capacity the better of course. How do I analyse this? Does it even matter? -- Space Ghost (talk) 18:57, 9 December 2015 (UTC)
 * Actually the first one says 4200mAh, not 4800mAh. In theory, the second one should last about 24% longer between charges. I lack enough first-hand experience to judge the reliability of those numbers, however. There's also the question of quality, and I suspect there are unacceptably cheap laptop batteries like anything else. I also lack the first-hand experience to judge that, so I usually depend on Amazon.com and their buyer reviews to take care of me. If you can't order online, I can't be of much help in that area. &#8213; Mandruss  &#9742;  22:04, 9 December 2015 (UTC)
 * Okay. Once again, thank you very much. Regards. -- Space Ghost (talk) 20:07, 10 December 2015 (UTC)

OCR-A characters intended use
What were the characters listed at Dedicated OCR-A characters meant for? Did they ever serve a purpose? &mdash; Sebastian 22:27, 7 December 2015 (UTC)


 * Those are command characters. They can be used for whatever you really want them to be used for. You often see them on material designed specifically to be scanned by a computer. So, assume I am designing a new parking ticket to be read by a computer. I might use the hook character followed by the time of the ticket. The computer knows that the hook means "the time follows." I might then use the bow tie followed by the date, so the computer knows that after the bow tie (actually, I call it the ocr asterisk) is the date. If you look at a bank check, you will likely see OCR command characters at the bottom to identify the start of the routing number and start of the account number. 209.149.113.52 (talk) 13:34, 8 December 2015 (UTC)
 * I think the characters on checks are Magnetic_ink_character_recognition fonts, which seem very similar but a little different to OCR-A. See short description here . Probably we could use an article on E13-B font, rather than just a redirect to MICR. SemanticMantis (talk) 14:16, 8 December 2015 (UTC)
 * Thanks to both of you. I'll bring up the suggestion to split the article at Talk:Magnetic ink character recognition. &mdash; Sebastian 20:18, 8 December 2015 (UTC)