Jump to content

Wikipedia:Reference desk/Archives/Computing/2020 May 14

From Wikipedia, the free encyclopedia
Computing desk
< May 13 << Apr | May | Jun >> May 15 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 14

[edit]

MS Word rare letter shortcuts

[edit]

I'm talking about letters like é, ø, ã, ż. If I go to Insert Symbol and select that letter, for many keys Word used to show me special keyboard combinations you can use to insert that letter, like Ctrl+', E and Ctrl+/, O. These were MS Word's hotkeys, I'm not talking about dead keys on my keyboard layout. Now I went to Insert Symbol and it only shows me the Alt code even for letters with the hotkeys (which still work). Does anyone have a list of these shortcuts? 93.136.73.59 (talk) 00:47, 14 May 2020 (UTC)[reply]

What version of Word? Elizium23 (talk) 00:52, 14 May 2020 (UTC)[reply]
I've got 2016 here. No idea when they disappeared. In fact I could swear they were still in 2016 a few years ago, but obviously aren't today. 93.136.73.59 (talk) 01:26, 14 May 2020 (UTC)[reply]
Does this help? It claims to be for Outlook, but mentions Word too. Elizium23 (talk) 00:54, 14 May 2020 (UTC)[reply]
Yeah that's it. I thought there would be more of them. 93.136.73.59 (talk) 01:26, 14 May 2020 (UTC)[reply]
Keep in mind that this method dates from 2007 or earlier, probably from a time when it was not so easy to install and employ various input methods and keyboard layouts. This was simply a crutch to help users get by in various European languages until the input methods matured. Elizium23 (talk) 03:21, 14 May 2020 (UTC)[reply]

Why glibc malloc uses sbrk

[edit]

According to the Glibc wiki, malloc in the Gnu C Library uses two kinds of heaps: one created after the data segment by extending it with sbrk, and others created with anonymous mmap calls (for threads other than the main thread, or when more space is needed than is below the lowest mmap). What are the advantages of this, versus using mmap for all heaps? I could see at least three advantages of always using mmap:

  1. Performance would be improved slightly by eliminating branches.
  2. The code that calls sbrk could be eliminated, shrinking glibc's memory footprint.
  3. Some legacy applications directly call sbrk; if malloc did not touch the legacy heap, and the address space was always large enough for both, then the two forms of memory management could be mixed so that a refactoring to use malloc could be more incremental.

NeonMerlin 02:55, 14 May 2020 (UTC)[reply]

Well, the short answer is that glibc IS a legacy application. Elizium23 (talk) 03:22, 14 May 2020 (UTC)[reply]
It looks like some of the comments in malloc.c might answer your questions: [1]. Regarding your third point, brk/sbrk have never been part of the C standard library itself, unlike malloc; they're Unix-specific functions. Any code using them is by definition platform-dependent and can't assume they'll play nicely together with other library functions that alter process memory. --47.146.63.87 (talk) 09:19, 14 May 2020 (UTC)[reply]

External SSD

[edit]

I am developing a fairly complicated C++ project and I need a disk of external memory. The natural choice seems to be a SSD. Couple of weeks ago I bought at Amazon a 2T external hard drive and began testing it. It was printed on the little block: 2TB but in reality my Windows 10 found only 3.8 GB. I requested a return immediately and they processed it right away. Now I am looking for a replacement. This is what I found. Almost all 2TB and greater hard drives are internal and I need it to be external. I found an incredible 8 TB INTERNAL hard drive at a very attractive price. It is Seagate Barracuda. I've had barracudas before.

I wonder if I could find an adapter to connect the drive to a USB cable? Is the idea realistic?

Thank you, AboutFace 22 (talk) 16:45, 14 May 2020 (UTC)[reply]

@AboutFace 22: You would need to get an enclosure for the drive, since you need to not only connect it to your computer but also have a way to give it power and cooling. I think if you look more you will find an external drive that works for you. On Amazon, I see quite a few external SSD drives that are 1 or more TB in size. RudolfRed (talk) 16:50, 14 May 2020 (UTC)[reply]
@RudolfRed, thank you, never thought of the things you mentioned. Very useful. AboutFace 22 (talk) 17:23, 14 May 2020 (UTC)[reply]
(edit conflict) The differing definitions of "TB" are normal. First there is the definition of the "T". If 1KB is 1,000 bytes then 1TB is 1,000,000,000 bytes. If 1KB is 1,024 bytes then 1TB is 1,073,741,824 bytes. Then there is the difference between raw capacity and formatted capacity. A file with a size of exactly 1MB needs extra bytes for the filename, attributes, error correcting, etc. And the amount of capacity left for your data will be different for FAT16, FAT32, NTFS, EXT3, etc. And a 100 byte file might use up 512 bytes, 4096 bytes, or even more depending on the way it is formatted.
Nobody sells actual external drives. They sell internal drives in an enclosure makes them external. You can buy, say a 3.5" SATA enclosure and put whatever 3.5" SATA drive you want want in it. Or you can buy one that already has the drive installed.
Finally, the enclosure needs to have a connection that your computer has. USB 2.0 is everywhere, but is slow, eSata is faster but your computer most likely doesn't have an eSata port, so you might have to by a card -- and if you have a laptop you can't even do that. USB 3.0 is faster and will work with a USB 2.0 port (at USB 2.0 speeds).
For the drive you picked [ https://www.amazon.com/dp/B00LS5NFQ2/ ] this enclosure [ https://www.amazon.com/dp/B013WODZH0/ ] would be a good choice. If your PC doesn't have USB 3.0 and does have an empty PCIE slot, get one of these [ https://www.amazon.com/dp/B071P5C6CS/ ] as well. But I wouldn't buy the barracuda if I were you. I would get one of these instead [ https://www.amazon.com/dp/B003J5JB12/] it will still work great with the enclosure I listed but it will be faster and more able to take rough handling. I have seen external rotating drives fail when dropped six inches while running. --Guy Macon (talk) 17:37, 14 May 2020 (UTC)[reply]
Umm, 1 TB is 1000000000000bytes or 1099511627776bytes. Whether tera- or tibi-, it is not easy to see how a newly bought 2 TB disk could have only about 2‰ of that amount available for storage.  --Lambiam 23:43, 15 May 2020 (UTC)[reply]
People relabel things and sell them for more money. Or possibly it had been used and some totally silly reformatting done.
All the best: Rich Farmbrough (the apparently calm and reasonable) 23:00, 17 May 2020 (UTC).[reply]
"The differing definitions of TB" accounts for about a 10% variation, say from 2TB to 1800GB. "The difference [from] formatted capacity" would be something of the same order. Neither one explains where 3.2GB came from. --76.71.5.208 (talk) 21:43, 14 May 2020 (UTC)[reply]
You will also want to make sure your USB 3.x enclosure is connected by a USB 3.x cable to a USB 3.x port on your computer. Otherwise speed drops down to USB 2.0's 30 MB/s. Also if you ever decide on an external SSD, there's no point in buying anything fancier than SATA because you won't be able to get the extra speed out of it. 93.142.75.127 (talk) 19:17, 14 May 2020 (UTC)[reply]
This claim is complicated. For external drives i.e. 3.5", sure these are more or less internal drives with special labels (and with various features that people may find annoying e.g. PWDIS). For portable drives i.e. 2.5" ones I don't know if you can say they are just internal drives. I mean sure the main part of the drive is an internal drive so they are similar to internal drives with enclosures. But some of them have circuit boards which make them USB native. There is no SATA involved unless it's completely internally. (I think most are just specialised circuit boards with built in bridge chips but I've never paid much attention. I'm not entirely sure how circuit board communicates with the drive, but it seems possible that someone would make one that doesn't really use SATA.) There are occasional reports of the same thing for some rare 3.5" but IIRC I've never seen a photo or anything which proves these are real or not just based on confusion or misinformation. Since shucking external and portable drives is common because of they are normally cheaper, people tend to notice when this sort of stuff happens. Nil Einne (talk) 05:45, 15 May 2020 (UTC)[reply]
To confirm what Nil Einne says above, the faulty disk I purchased (see below) had no SATA interface internally, just a circuit board with a USB 3.0 interface. Martin of Sheffield (talk) 09:50, 15 May 2020 (UTC)[reply]
You say the natural choice seems to be a SSD, but all the drives you've mentioned are disk hard drives, not solid state drives. Nothing wrong with that if lower price and higher capacity are your priorities; I'm just wondering why you stated that. In a nutshell: hard drives are cheaper, bigger, slower; SSDs are faster but more expensive. Both can be internal or external. As Guy Macon stated, the only thing you need to make an "internal" drive "external" is an enclosure to stick the drive in, and you can buy them anywhere. Unless you really need multi-terabyte amounts of storage, or the cost is a real problem, I really suggest you go with an SSD. The speed improvement is quite substantial, and the price of SSDs has come down so much they're not that much more expensive anymore. Also in any case, as the previous commenter brought up, for an external drive you'll want to connect it with USB 3.0+ or Thunderbolt for much faster use. For a desktop computer, even if it doesn't have a USB 3 port already, you can probably add one with a cheap PCI Express card.
Some people might be tempted to mention that SSDs have a finite number of writes, but in modern drives you will basically never hit the limit unless you really put the drive under constant use for a long time. And also, it doesn't matter now, but I'm wondering if the drive you returned was actually defective. The 3.8 GB limit makes me suspicious because it's a bit special. FAT32 has a limit of 4 GiB on file size. Did you get that capacity value from looking at the drive in Windows Explorer, or did you try to write a file larger than that and have it fail? If the latter, the actual issue was likely that the drive came pre-formatted as FAT32 because this is more widely compatible. This will be true for a lot of drives you might buy, so you will want to reformat them as NTFS if so. Do a Web search for "windows ntfs format drive" for guides. --47.146.63.87 (talk) 19:42, 14 May 2020 (UTC)[reply]
Agreed, but it definitely depends on how much space he needs. A cheap 2TB SSD is still about 4x as expensive as a good 2TB HDD, while with an 8TB SSD we're going into 4 figure territory. SSDs are great, but above several hundred GB they get mighty expensive. 93.142.75.127 (talk) 20:29, 14 May 2020 (UTC)[reply]

There are tons of external hard drives from Seagate and others. Here are Seagate's. They are typically cheaper per GB than internal drives, thus the practice of "shucking" (buying an external drive, removing and throwing away the enclosure, and using the drive inside as an internal drive) to save money. Lots of times though, shucking is impossible since the drive inside the enclosure has the USB interface built onto its circuit board instead of the SATA interface that an internal drive would use. These drives are made in high volume and are very cost sensitive, so yes, they do make different versions of the circuit board depending on how the drive is intended to be used. Note "hard drive" normally means spinning magnetic platters, while SSD is flash chips. HDD's above 2TB are very common and cheap, but SSD's that large are expensive. Expect to pay $20-30/TB for large HDD's and maybe $100/TB for SSD. If you will frequently be rewriting data, avoid HDD's with names like "backup" or "archive" since they tend to use shingled magnetic recording (SMR), which lowers cost per TB but slows down random access writing. They write at normal speed when the space being written to is empty, but are slower at overwriting data that is already there. They read back at normal speed in both cases. 2601:648:8202:96B0:3567:50D5:8BFF:4588 (talk) 19:52, 14 May 2020 (UTC)[reply]

I wish I'd seen this a month or so back. I use USB drives for backup and bought another one at a reasonable price a couple of months ago. Performance was dire. The drive was Toshiba DTB410 1TB disk p/n HDTB410MK3AA and I now wonder if it is a shingled disk. After various tests it was clearly incapable of being used for backup purposes (I use Amanda and it writes backup files in the range 0.1 - 160 GiB). See [2] for the full gory history. It found its way into my incinerator a couple of weeks ago, about all it was fit for. Martin of Sheffield (talk) 20:11, 14 May 2020 (UTC)[reply]
There's no realistic chance a 1TB drive is shigled. Far more likely it was simply defective. This is actually not surprising since hard drive deaths still follow a bathtub curve, and especially after it's been shipped around the world with probable mishandling, this is likely time when it may be dead. Nil Einne (talk) 05:07, 15 May 2020 (UTC)[reply]
OK, thanks, Martin of Sheffield (talk) 09:50, 15 May 2020 (UTC)[reply]
As others have said, in drive terminology, 2TB = 2,000,000,000,000 bytes. But a terabyte is commonly . = 2.199E12, 9.95% more. But you need room for more data than you have on your internal drive, right? Bubba73 You talkin' to me? 23:56, 14 May 2020 (UTC)[reply]
Bubba73, 1,0004 bytes is a terabyte and 240 bytes is a tebibyte; they are named differently for a reason. Elizium23 (talk) 06:10, 15 May 2020 (UTC)[reply]
That term isn't used much. A Google search had 384,000 hits whereas a search for terabyte had 10,500,000 hits. Bubba73 You talkin' to me? 06:18, 15 May 2020 (UTC)[reply]
Did you search for the abbreviations too? Did you search technical documentation and server systems where disk space and memory are counted and monitored? Elizium23 (talk) 06:26, 15 May 2020 (UTC)[reply]
No, I didn't. Bubba73 You talkin' to me? 06:32, 15 May 2020 (UTC)[reply]
From terabyte< "Despite the introduction of these standardized binary prefixes, the terabyte is still also commonly used in some computer operating systems, ..." Bubba73 You talkin' to me? 06:35, 15 May 2020 (UTC)[reply]
From observation there is a division between the Linux based world (2^30 = 1 TiB) and the Microsoft world (2^30 = 1 TB). Non-technical literature tends to follow popular usage, so tends to abuse decimal prefixes (a usage banned by the standards bodies). Unfortunately, for the last 20 years WP has been in the luddite camp and doesn't permit binary prefixes. Martin of Sheffield (talk) 09:50, 15 May 2020 (UTC)[reply]
It appears that you prefer the IEC (International Electrotechnical Commission) standard for binary prefixes over the JEDEC (Joint Electron Device Engineering Council) standard for the specification of computer memory and storage. Calling those of us who prefer the JEDEC standard names is hardly helpful. --Guy Macon (talk) 16:47, 15 May 2020 (UTC)[reply]
ISO/IEC 80000 is a part if the International System of Quantities and defines the binary prefixes. Have a look at JEDEC memory standards where you will see a quote from JEDEC Standard 100B.01, page 8:

The definitions of kilo, giga, and mega based on powers of two are included only to reflect common usage. IEEE/ASTM SI 10-1997 states "This practice frequently leads to confusion and is deprecated." Further confusion results from the popular use of the megabyte representing 1 024 000 bytes to define the capacity of the 1.44-MB high-density diskette. An alternative system is found in Amendment 2 to IEC 60027-2: Letter symbols to be used in electrical technology – Part 2.

It appears therefore that JEDEC now prefers the ISO definitions. BTW, I didn't call any specific person any "names", rather the inability of WP to modernise. Martin of Sheffield (talk) 18:18, 15 May 2020 (UTC)[reply]

Why are emails very very very wide?

[edit]

Since I've been at home, I've been doing some things slightly differently, but apparently I have to keep copying and pasting text to where I edit on Wikipedia (which is plain text but risks my accidentally saving and having to request revision deletion since the content is copyrighted. But with a computer that can have fewer windows open at once, if I copy and paste from one email to another, sometimes I get a very, very, very wide email that I never asked for. I don't see the "plain text" option for the email and, in fact, with some email services that might actually cause this to happen. And with what I'm trying to accomplish, plain text might not give me the result I wanted anyway.— Vchimpanzee • talk • contributions • 16:56, 14 May 2020 (UTC)[reply]

Could you clarify what you're asking? You start off on emails, but don't mention your email reader, and then go into Wikipedia editing by a route I don't understand. Are you copying email texts into Wikipedia for some reason? If so, is there something about Notepad or Wordpad (or Word) that doesn't work for you? Matt Deres (talk) 18:59, 14 May 2020 (UTC)[reply]
My email reader is me. I write them and I read them. I don't even know where or if Notepad would or wouldn't work but if I add something else it could slow my computer down.
I copy and paste text from one email, which I sent myself, to another, which I created. This goes back to when I wanted to be able to access the information on any computer without having to carry something around. Copying and pasting without something like Notepad or Word, even if I knew how to use those, has unpredictable results, but this screen where I am typing right now does not. Sometimes if I go directly from one email to another there are undesirable characters in the new email. And like I said, sometimes the new email gets very, very, very wide. As for why I have to use different email addresses, I have a standard way of keeping up with the information. This is actually all explained somewhere on my user page.— Vchimpanzee • talk • contributions • 19:10, 14 May 2020 (UTC)[reply]
Vchimpanzee, your "email reader" is the client software you use to send and receive email. Example, Outlook, mutt, GMail web interface.
Regarding cut and paste, although I am having trouble understanding you, have you tried "Shift-Ctrl-V" to paste? This will paste unformatted text, when the formatting may be getting in your way. Elizium23 (talk) 11:15, 15 May 2020 (UTC)[reply]
Other things you can try are downloading the mail as an attachment or "Show original" showing the text of the e-mail message and saving that as a file. If you saved the text as a file, then you could open it in the editor of your choice without going through the tedious step of cut-and-paste. Elizium23 (talk) 11:17, 15 May 2020 (UTC)[reply]
All of this just sounds too complicated. I send and receive email by typing "hotmail.com" or "gmx.com" at the top of the screen. I was just hoping for an explanation of the very wide email. I never heard of Shift-Ctrl-V but if I could remember to do that, I'd remember to paste in a place with plain text like this one.— Vchimpanzee • talk • contributions • 15:50, 15 May 2020 (UTC)[reply]
Ah, so you use web interfaces to read and send email. So far, so good.
As for the very wide emails, it's hard to say exactly what is going on, without seeing the content, but if you mean that a horizontal scrollbar appears and you have to scroll left and right: in general, this happens when there is non-breaking text or graphics. You know that HTML entity we use in articles: &nbsp; - that's a non-breaking space. Now if the text you're pasting includes a long string of text with these in it, where it would normally break the lines and format it for the width of you screen, or a very large graphic, that is wider than your web browser, in order to render these "faithfully" then your horizontal scrollbar pops up and it makes you scroll around. There may be CSS that does this, it may be because someone exported from MS Word into an HTML thing, who knows the genesis of the non-breaking entities. The struggle is real. Elizium23 (talk) 18:02, 15 May 2020 (UTC)[reply]
I'm not aware of anything that could have caused it. I think it has also happened when I tried to copy and paste in Hotmail when I figured out how to do plain text. Which is why I don't switch to plain text with Hotmail.— Vchimpanzee • talk • contributions • 19:30, 15 May 2020 (UTC)[reply]
Whether it's something that only affects you while you're writing the e-mail, or the receiver gets a deformed e-mail as well, it's a problem caused by your webmail interface. Without having to guess at what Hotmail is up to, you can very likely rectify it by using a dedicated e-mail client with IMAP or POP3 support, such as Thunderbird, Claws Mail, mutt etc. (assuming your e-mail provider, ie. Hotmail supports IMAP and/or POP3) 93.136.65.195 (talk) 00:26, 16 May 2020 (UTC)[reply]
I thought Hotmail disappeared eight years ago?--Shantavira|feed me 09:28, 16 May 2020 (UTC)[reply]
I don't get to choose what I do. When I go to the library, I have to use what they have. There's something on my computer at home, but using that gave me the results I described with Hotmail. And yes, Hotmail still exists, or at least I use a Hotmail address.— Vchimpanzee • talk • contributions • 17:04, 16 May 2020 (UTC)[reply]
Well, I bid you good luck then. Using Hotmail in this day and age after all their hacks and password leaks, and on a public machine no less... 93.136.69.56 (talk) 02:28, 17 May 2020 (UTC)[reply]