Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 241: Line 241:


:For some reason I don't quite understand, constructing or destructing a vector of type T will sometimes create/destroy a T object. This causes and endless loop in your case. The simplest fix seems to be to let default trees be leaves, which makes more sense anyway [[Special:Contributions/192.176.1.90|192.176.1.90]] ([[User talk:192.176.1.90|talk]]) <!--Template:Undated--><small class="autosigned">—Preceding [[Wikipedia:Signatures|undated]] comment added 14:53, 31 May 2018 (UTC)</small> <!--Autosigned by SineBot-->
:For some reason I don't quite understand, constructing or destructing a vector of type T will sometimes create/destroy a T object. This causes and endless loop in your case. The simplest fix seems to be to let default trees be leaves, which makes more sense anyway [[Special:Contributions/192.176.1.90|192.176.1.90]] ([[User talk:192.176.1.90|talk]]) <!--Template:Undated--><small class="autosigned">—Preceding [[Wikipedia:Signatures|undated]] comment added 14:53, 31 May 2018 (UTC)</small> <!--Autosigned by SineBot-->
::Doesn't work. It just cause another infinite loop. Different from last time, but still inscrutable. Anyway, I already have a constructor taking <code>int</code> to create leaf, but not shown. That default constructor just fits more with the rest of my code. [[Special:Contributions/14.177.103.250|14.177.103.250]] ([[User talk:14.177.103.250|talk]]) 04:18, 1 June 2018 (UTC)


: I suppose putting a vector into a union is calling for problems. Why don't you just put a vector of children as an ordinary member and implement the <code>TreeNode::isALeaf()</code> predicate with a simple inline test for <code>children.empty()</code>??? Then no need to explicitly call consrtuctor and destructor, which may easily go wrong. --[[User:CiaPan|CiaPan]] ([[User talk:CiaPan|talk]]) 15:53, 31 May 2018 (UTC)
: I suppose putting a vector into a union is calling for problems. Why don't you just put a vector of children as an ordinary member and implement the <code>TreeNode::isALeaf()</code> predicate with a simple inline test for <code>children.empty()</code>??? Then no need to explicitly call consrtuctor and destructor, which may easily go wrong. --[[User:CiaPan|CiaPan]] ([[User talk:CiaPan|talk]]) 15:53, 31 May 2018 (UTC)

Revision as of 04:18, 1 June 2018

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 25

400 Bad Request

Sometimes when I am trying to browse a particular on-line newspaper web page using a Samsung Galaxy 7J, I get the error message:

400 Bad Request

Request Header or Cookie Too Large

nginx

I see that an HTTP 400 is an apparent client error, and I agree that the error is on my Samsung, because I can view the page just fine using a Dell with Windows 10. (Once upon a time, there was a common saying among IT people, when I was one, to any of various errors on small computing devices, which was "Get a Real Computer", and getting a real computer does avoid the problem.) Restarting the Samsung doesn't solve the problem, but sometimes a few hours does. Does anyone have any insight as to whether this can be avoided or worked around? Robert McClenon (talk) 03:09, 25 May 2018 (UTC)[reply]

  • That stinks of a browser, not OS or hardware, problem. Which browser do you use? Does clearing its cookies solve the problem at least temporarily?
Also, is the URL causing that error message mobile-specific (i.e. on the "mobile version" of the website, which should in an ideal world differ from the desktop version only in graphical elements, but probably does not)? TigraanClick here to contact me 09:16, 25 May 2018 (UTC)[reply]
The URLs that are causing the error are also available on a real computer. Robert McClenon (talk) 02:44, 28 May 2018 (UTC)[reply]
I am using Chrome (the mobile version) as my browser. How do I clear cookies on mobile Chrome? Robert McClenon (talk) 02:13, 26 May 2018 (UTC)[reply]
Tap the 3 dots, tap settings, tap security, tap clear browsing history. — Preceding unsigned comment added by 174.193.149.75 (talk) 18:28, 26 May 2018 (UTC)[reply]
I got to Settings and I don't see Security. Robert McClenon (talk) 02:44, 28 May 2018 (UTC)[reply]
I tried Privacy, which allows me to clear cookies, and that does work. Thank you. Robert McClenon (talk) 02:04, 30 May 2018 (UTC)[reply]

The Dog Who Digs Search Software

On earlier versions of Windows, in particular on XP, there was a search thingy that would search the contents of the C: drive and display a dog digging, and it would search for a string or boolean combination of strings. Is there a version of this, or another essentially equivalent software tool, available for Windows 10? For that matter, if I really can do a full-text search of all files in a directory on my C: drive or a flash E: drive without buying something extra, that would be even better, but I assume I am supposed to pay for it.

Other suggestions for search software are still welcome.

Robert McClenon (talk) 03:26, 25 May 2018 (UTC)[reply]

I highly recommend FileLocator Pro. There's a free "lite" version, which itself is quite good, and may or may not be enough for your needs, but personally I think the extra features of the Pro version are well worth paying for. You can try the Pro version free for 30 days. 14.2.224.5 (talk) 05:41, 25 May 2018 (UTC)[reply]
Is there some trick to installing it? Do I need to turn off my anti-virus software? Robert McClenon (talk) 03:12, 28 May 2018 (UTC)[reply]
I've never had any problems installing it on Windows 7, but I've not tried it on 10. It's probably best to contact their support people. You can try the portable version (under "Other Downloads" at the bottom of the Downloads page) without having Admin rights or needing to install it. Other than Explorer integration, the portable version offers the same functionality. 14.2.224.5 (talk) 23:32, 29 May 2018 (UTC)[reply]
I just installed it on Windows 10 without problems. (Windows Defender is running, but there is no third-party anti-virus installed.) 106.68.252.192 (talk) 13:28, 30 May 2018 (UTC)[reply]
Personally, I use Super Finder XT (when I want a GUI) or grep under Cygwin. I've found the inbuilt Windows 10 search to be very unreliable (the index isn't always updated). --TrogWoolley (talk) 10:50, 25 May 2018 (UTC)[reply]
I have never been able to get the Windows 10 search to find text for me. Robert McClenon (talk) 02:45, 28 May 2018 (UTC)[reply]
See my question below. I installed Super Finder XT. How do I enter the search parameters? Robert McClenon (talk) 03:12, 28 May 2018 (UTC)[reply]

(EC) If you just type whatever text you want to find in the search bar and it's an indexed location, it should just work most of the time. (I.E. the limitations of Windows indexed searching aside, your experience of it never working is not normal.)

As sort of indicated by TrogWoolley, Since Windows Vista, the built in search tool has been designed around the assumption you allow indexing of whatever you want to search especially for full content searches. So if you haven't allowed indexing of the location you're trying to 'full text search' this may be the issue. While it is possible to do a content search in non indexed locations (but it isn't the default, you need to enable it under advanced options after searching), personally I've found it's simply not advisable. Even with simple file name etc searches, I've found non indexed locations are very annoying to search. To be fair, I tend to have lots of data and even other tools can be annoying to use but I do strongly suggest you use indexing if you want to search file contents.

As TrogWoolley said, the index isn't always perfect although when it works it's likely to be far faster. Maybe one key limitation is that IMO the way even content Windows knows has been updated or new but not yet re-/indexed is handled is IMO poor and doesn't make it clear to the end user that they may be missing stuff for this reason.

Also I said 'file contents' rather than full text search. The Windows indexed search is obviously not a simple full text search. Notably it will only index the file contents of file types it's set up to index. See [1] for example. On the flip side, it does understand files like DocX, PDF etc where a simple pure text search will fail although I'm not suggesting this is only something Windows search does or you need indexing to do this. (It's possible to add Ifilter plugins to support file types Indexing Service.) Other than the design around indexing, perhaps another key change is that IIRC pre Windows Vista Windows would index/search file contents of files it didn't think it understood as if they were simple text whereas modern Windows will not.

Nil Einne (talk) 03:26, 28 May 2018 (UTC)[reply]

May 27

How can I accomplish this in Microsoft Excel 2016? Operating with values of time.

How can I accomplish this in Microsoft Excel 2016? This question concerns the proper operating with (and formatting of) time in Excel. Let's say that in Cell Number A1, I have a value of time. And in Cell Number B1, I want to specify a certain amount of time to add to (or subtract from) that initial time. And, in Cell Number C1, I want the resulting value. This is somewhat confusing (to me), since I am using the word "time" liberally, whereas I assume that Excel is much more precise. So, to clarify with an example:

  • Cell Number A1: I input the time of day. (Example: 11:52 AM)
  • Cell Number B1: I input the number of minutes that I want to add or subtract. (Example: 27 minutes)
  • Cell Number C1: I want a formula that gives the correct result. (In this example: 12:19 PM)

So, how exactly would I format each Cell? And what exactly would I have to type into each Cell?

The Excel functions of "time" are very confusing to me, for many reasons (e.g., the way that Excel considers time, processes time, labels time, etc.) Very confusing. Hence, my questions.

And, again, I understand that in Cell Number A1 and Cell Number B1, I am using the same word, "time", even though I am referring to completely different concepts. That is: Cell Number A1 means "time of day", while Cell Number B1 means "number of minutes".

Thanks! Joseph A. Spadaro (talk) 16:26, 27 May 2018 (UTC)[reply]

In A1 enter 11:52:00. In B1 enter 00:27:00 (zero hours, 27 minutes, zero seconds). In C1 enter = A1+B1. Simples.--Phil Holmes (talk) 17:27, 27 May 2018 (UTC)[reply]
@Phil Holmes: Thanks. But, that doesn't seem to quite work (to do what I want). Maybe my question was not clear. So, let me ask some follow-up questions. I want my "output" to look like this:
Cell Number A1: 11:52 AM
Cell Number B1: 27
Cell Number C1: 12:19 PM
Is there a way to get that output? What I end up getting are values that looks like this:
Cell Number A1: 11:52:00
Cell Number B1: 00:27:00
Cell Number C1: 12:19:00
Also, is there an easier way for me to enter the input, without having to type all of those leading and trailing "zeros" and such? Thanks. Joseph A. Spadaro (talk) 15:37, 28 May 2018 (UTC)[reply]
Also, what about the "subtraction" of minutes? I cannot get that to work, either. Thanks. Joseph A. Spadaro (talk) 16:01, 28 May 2018 (UTC)[reply]
What do you want to happen if the result is past the end of the day? For example, if you add 30 minutes to 11:45 PM? I would have thought both A1 and C1 would be date+time but you've only specified time, so the result is not guaranteed to be a valid time. CodeTalker (talk) 18:08, 27 May 2018 (UTC)[reply]
@CodeTalker:Thanks. I don't care about the day or date. Just the time itself. See my comments above. That shows the output that I am seeking. Thanks. Joseph A. Spadaro (talk) 15:37, 28 May 2018 (UTC)[reply]
Using "Format Cells" you should format A1 as "h:mm AM/PM", format B1 as hh:mm and C1 as "h:mm AM/PM". You need to type in A1 as 11:52, B1 as 00:27 and C1 is calculated. CambridgeBayWeather, Uqaqtuq (talk), Sunasuttuq 00:43, 29 May 2018 (UTC)[reply]

Thanks, all. Joseph A. Spadaro (talk) 04:39, 31 May 2018 (UTC)[reply]

Economics of Bitcoin Mining

As I understand it, it has become more difficult to make money through mining Bitcoin, both because the rewards (as measured in Bitcoin) are lower and because the blockchains have become longer. This article indicates that the cost to mine a Bitcoin in the United States is $4,758, although the cost is lower in some other countries.

If the Bitcoin rewards for mining fell below the marginal cost of mining (which I assume is lower than the figure in the MarketWatch article), does that mean that the necessary blockchain validation would not be carried out, with potentially catastrophic implications for the viability of Bitcoin? To what extent would this concern be addressed by reductions in the cost of mining, as fewer people choose to engage in mining? John M Baker (talk) 23:32, 27 May 2018 (UTC)[reply]

To simplify (so don't get anal about details that don't matter)... To mine a bitcoin, you have a computer solve a math problem. The problems are currently very hard to solve. The reason is that there are too many people mining bitcoins. When a bitcoin is successfully mined, the time to mine it is calculated. If it was solved too quickly, the next problem is harder to make it take longer. If it took too long to solve, the next problem will be easier to make it solve quicker. So, if it becomes unprofitable to mine bitcoins, less people will mine them. It will take longer to solve the problem. The next problem will be easier, meaning it will take less resources to mine and therefore be cheaper to mine. So, people will start mining again. 71.85.51.150 (talk) 00:11, 28 May 2018 (UTC)[reply]
What is the mechanism for adjusting the difficulty of the math problems? John M Baker (talk) 00:52, 28 May 2018 (UTC)[reply]
Bitcoin#Mining seems reasonably clear, and the refs probably contain a more detailed answer. TigraanClick here to contact me 09:18, 28 May 2018 (UTC)[reply]

The bitcoin blockchain is large, about 130 GB today and may reach 1.5 - 1.6 TB in Jan. 2021. However a bitcoin miner does not need to store the whole blockchain (though he may do so as a "full node") because it is a collective function of the bitcoin network to keep all parts of the chain accessible on demand. A short or long blockchain hardly affects the miner's proof-of-work task which is essentially to provide 32 bits of a 640-bit message that can demonstrate a SHA-256 hash-of-hash value below a threshold set (to adjust difficulty) by the network. Corrected "hash-of-hash". DroneB (talk) 12:57, 31 May 2018 (UTC)[reply]

Thanks to those who responded, and particularly DroneB. John M Baker (talk) 14:54, 30 May 2018 (UTC)[reply]

May 28

Building apps

I'm trying to build some apps by myself. I started with Android Studio because it has views for both design and code of each activity (meaning, a screen to move elements around the cell phone screen, and a screen with the actual code). I have some basic knowledge about coding, but I'm not an expert either. So, I don't need those "build apps without coding" software (which have their disadvantages, such as the software keeping part of the owership, I'm limited to their built-in options, and ultimately I do not improve my coding skills), but the design view is a good feature during my early stages. With just the coding view, I'm going a bit blind, unaware if what I'm coding actually works and if it works as I intend it to.

Problem is, I'm unable to test my software. My PC does not meet the requirements to create a virtual device, and for some reason I can't use my actual cell phone for testing the app either. I'm getting a bit tired to seek about error codes everywhere while being still in the "hello world!" stage, and perhaps I should try some other software. Can you suggest me some other one? Cambalachero (talk) 01:51, 28 May 2018 (UTC)[reply]

Android Studio is an excellent choice for your development because it provides an IDE with a virtual device (Emulator) to run and debug apps. Some references that will help are the Wikipedia article, a Beginner's tutorial, Your first Android project, a video tutorial and a video on its latest features. DroneB (talk) 12:53, 31 May 2018 (UTC)[reply]

Super Finder XT

On 27 May, I asked about software to search for a file. I was advised that one person uses Super Finder XT. I succeeded in loading Super Finder XT. However, maybe I am doing something stupid, or stupidly failing to do something. I can't find, in the user interface, where to enter the text that I am trying to search for. Robert McClenon (talk) 03:09, 28 May 2018 (UTC)[reply]

I don't know about that program, but on Windows I use Everything, from http://www.voidtools.com/. It works very well. I don't know why Microsoft can't do something like that or buy it to include in Windows. Bubba73 You talkin' to me? 16:19, 28 May 2018 (UTC)[reply]
When I use it, I click on Advanced Mode on the tool bar and that gives me the option to search text. There are also date options. There are screen shots available on the fsl home site. (It won't let me link to it here) --TrogWoolley (talk) 22:35, 28 May 2018 (UTC)[reply]
User:TrogWoolley - Maybe I have a different version installed than you do. I see Advanced, which gives me date options, but I don't see anywhere to just enter a text string. I think that I will give up, but am not sure whether to give up on this Reference Desk or on the tool. Thank you anyway, but I really can't get it to work. Robert McClenon (talk) 02:37, 30 May 2018 (UTC)[reply]

May 29

The effect of cryptocurrency "mining" levels of a cyrptocurrency's value

I dunno which desk this question belongs in, but given that it mostly involves computers, I'm guessing here.

How much is a cyrptocurrency's value affected by the levels at which it is being "mined"? As new "mining" power comes online of a given cryptocurrency, does its value drop?

To give an example, a lot of cryptocurrency mining is done in Iceland. If these mining computers were knocked out (say by a temporary blackout on the Icelandic power grid), what sort of effect would it have, in the immediate or short term, on cryptocurrency prices?

How much of a given cryptocurrency's value is affected by the levels at which it is being "mined", vis-a-vis the levels of which its non-mining holders are buying or selling it? Eliyohub (talk) 14:02, 29 May 2018 (UTC)[reply]

As explained a few questions ago... Mining of cryptocurrency is self-regulated so it remains constant. Say you want your cryptocurrency to mine a new "coin" once a day. The mining process is regulated so it produces one coin a day give or take. If millions of new mining computers go online, the problem gets harder. If millions of computers go offline, the problem gets easier. Overall, the mining rate stays the same. 209.149.113.5 (talk) 16:05, 29 May 2018 (UTC)[reply]
The value of a cryptocurrency is upheld not by national fiat nor by any commodity, only by individual buyers' confidence in its continuing utility as a medium of exchange and investment. About 200,000 transactions daily of bitcoin are carried out by unregulated traders who each offer buy and sell prices in competition. The reported bitcoin price is seen as volatile because trading is quickly affected by news reports and sensations. However the rate of supply by mining of new bitcoins is constant by design, about 80% of the bitcoins that will ever be mined are now in circulation, and in 2140 mining will cease. The cessation is expected and will not be sensational; Bitcoin trading can continue unaffected. An individual bitcoin miner has almost negligible influence on the global value of bitcoin because he is merely one more who can compete against a multitude of traders by offering an attractive sell price. DroneB (talk) 12:52, 30 May 2018 (UTC)[reply]

Stop Wikipedia forcing me onto mobile site - Chrome on Android

I have an Android phone, and use Chrome on it for browsing the web. I have saved the link to my watchist onto the home page, so I can quickly access it on my phone. Unfortunately, when I tap the icon to open it, Wikipedia forces me onto the mobile site (en.m.wikipedia.org) and I have to edit out the m and then re-request desktop site in order to avoid the bloody awful mobile version. I do not seem to have this problem with other websites I have saved in this way. Can anyone help me to fix this? DuncanHill (talk) 20:31, 29 May 2018 (UTC)[reply]

  1. You could try out User:TheDJ/responsiveContent and see if that makes the mobile version acceptable to you. (It requires you to be logged-in.)
  2. You could spoof your User-Agent. (Tech-human translation: when your phone requests contents from the WP server, it sends along some information about which browser etc. they use, which the server uses to decide to send you to the mobile site; you can ask your phone to lie to the server and say you're on desktop so that you get the desktop version.) I have not tested it but [2] may work. (Make sure to only spoof for the WP website, else the rest of the web might behave funny.)
Neither of those is a real answer to the question but either could be acceptable for you. TigraanClick here to contact me 08:48, 30 May 2018 (UTC)[reply]
I have found that clicking the word "Desktop" at the bottom of the page resets the cookie that tells Wikipedia to force mobile mode. 209.149.113.5 (talk) 12:29, 30 May 2018 (UTC)[reply]
Thanks. The Responsive Content thing says it doesn't really benefit mobile users (and it only works with Vector, which is not favoured by me), the spoofing thing seems a bit technical for me! I hadn't noticed the desktop thing at the bottom of the page, thank you. It's just a fag that when I bookmark the desktop url Wikipedia decides that it knows better than me and sends me to the mobile url. DuncanHill (talk) 22:39, 31 May 2018 (UTC)[reply]

What is considered to be a backdoor?

Hello. I'm writing a WP article about backdoors. So I wonder what is safe to call a backdoor on Wikipedia. I mean that if someone call something a backdoor, another one may say "It's not a backdoor, it's just a service account fot technical support", or "it's not a backdoor, it's just a mandatory telemetry you have aggreed/must aggree with according to our EULA" or "it's not a backdoor, it's just a useful feature". So what kind of security- and privacy-undermining functionality, like accounts with hardcoded credentials or authentication bypasses in artifically-crafted solutions, or malware preinstalled by vendor, is it safe to call a backdoor on Wikipedia? — Preceding unsigned comment added by KOLANICH (talkcontribs) 22:14, 29 May 2018 (UTC)[reply]

@KOLANICH: We have the article Backdoor_(computing). Does that help? RudolfRed (talk) 22:21, 29 May 2018 (UTC)[reply]
@RudolfRed: It doesn't. It doesn't have a list of definitions what is considered to be a backdoor even if some entities may claim it is not. I mean, if I wrote "Hardcoded credentials found in a product X of a vendor Y is a backdoor", someone would have asked if I have a proof for that hardcoded credentials are really a backdoor, not a "tech support password", and I will not have: security companies usually put descriptions of backdoors (where they explicitly call them to be backdoors) into their blogs (and some people consider them as a non-reliable source only because it is a blog), but in CVEs backdoors are usually not called backdoors, but "authentication bypass" or "hardcoded credentials". So we need a proof that a backdoor is a backdoor not involving any "reliable source" saying explicitly that it is a backdoor. One of the solution is a some list of common backdoor types explicitly calling that anything matching the definitions in the list is a backdoor. KOLANICH (talk) 07:06, 30 May 2018 (UTC)[reply]
@KOLANICH: First of all, may I suggest the Help Desk for future questions of that nature, since this is about editing Wikipedia?
Thank you for the suggestion.
In such cases where there is a real controversy about the use of a certain term, such that saying X is Y in Wikipedia's voice (i.e. "X is Y") would not be supported by the whole of reliable sources, we nevertheless have enough sourcing to say X is described as Y by Z (i.e. "according to Z, X is Y"). You must be careful to only include relevant opinions though (e.g. don't put "Joe, baker in Arkansas, thinks it is flat (ref to Joe's blog)" in the article Shape of the Earth), see WP:DUEWEIGHT (and more generally the whole of WP:NPOV) for details.
In the case at hand, a blog post from a reputable security company is probably enough to support an attributed statement (e.g. "According to Norton, FooTech's implementation of BarAlgorithm is backdoored (ref to Norton blog)"). TigraanClick here to contact me 08:34, 30 May 2018 (UTC)[reply]
@Tigraan: Could you take a look at Draft:List_of_vendor-shipped_backdoors ? Not all the rows are attributed to well-known security companies (Kaspersky, DrWeb, McAfee, Eset, Avira, Rapid7, etc), I wonder if I should remove them, or keep and just modify the text somehow? KOLANICH (talk) 21:27, 30 May 2018 (UTC)[reply]
Have those vulnerabilities been mentioned in the media? Often, a backdoor of some kind is mentioned in the news once it is discovered. You don't need a major security company to make note of it. 209.149.113.5 (talk) 12:00, 31 May 2018 (UTC)[reply]
  • @KOLANICH: First of all, please avoid replying inside someone's replies, it makes it hard to follow the conversation if someone then answers to the answer etc.
As it stands, Draft:List_of_vendor-shipped_backdoors is probably not going to mainspace. Its very existence is questionable per WP:OR / WP:LSC, but maybe it could be saved (for instance by deciding only to list the vulns that have been specifically described as backdoors by at least one or at least two reputable security companies/researchers); however, the current content is not appropriate:
  1. The title and the general tone are questionable when it comes to WP:NPOV since it seems intended to name and shame vendors (no matter what your intention was, what counts is what the reader sees).
  2. The section "about this list" is about as unencyclopedic as you can get (the most egregious example being if you find an earlier date please replace it, or the editorsplaining of how we use references). It should probably be ditched altogether (if the list cannot be understood without it, it means the list must be made easier to read).
  3. In the list itself, the date is going to be a nightmare to maintain, though I am not sure how to proceed (that is certainly valuable information). I see no point in providing vendor's countries (especially if that info is just pulled from the linked wp article). I am not convinced four columns for brand/OEM/firmware/component are needed (just put the level(s) that secondary sources blame as the cause of the vuln).
  4. No clear inclusion criterion (cf. above).
TigraanClick here to contact me 12:19, 31 May 2018 (UTC)[reply]
Not quite to shame (some individuals (including pets) can be shamed, everything else has no shame), but just a list of states and companies somehow related to backdoors. The columns for stages of supply chain are because (unfortunately) we cannot know for sure who to blame for a backdoor, so we don't try to do it in the article and just give the info. It's up to reader to draw any conclusions from it. For example that flag of China appears in the list more frequently may mean nothing, because most of devices are manufactured and even developed in China nowadays, so Pr(China|backdoor)/Pr(China) may be even lower than for other states. In fact the original version of the list contained only a single column where one of the companies from the columns in the current version was put. I have added more columns for neutrality. The purpose of the list was to determine the relationship between states and conditional probability of inserting of a backdoor to drive consumer decisions. I don't mean that the article is original research (since I have tried to be neutral and just retelling third-parties findings combined with publicly available information), there we just stockpiling data.
Unfortunately, I don't know how to throw the section "about this list" away.
Firstly it describes the "date" column. In fact I'd like to have the date the backdoor was introduced in that column, but it's nearly impossible to achieve. So the content of that column is quite arbitrary, the meaning of it is quite simple "according to the sources and public information, the backdoor was present at least before this date, and we want the date in this column to be as lower, as possible, to get a better estimate for the backdoor planting date". This column may be useful because it gives us some estimate on the amount of time it takes to discover a backdoor, and some estimate on the history of cyberwarfare: if we assume that the backdoors are put because states make companies to put them, then we get some estimate on the date a state started to use this tactics in cyberwarfare.
The similar problems we have with the flags. I would prefer to have there the flag of the state having the most possibilities to cause the planting of the backdoor, but it's impossible to know from public info. So we put there a flag of the state which (former) citizens have created the product because the ones who created a product have influence on what a product will be and because (former) citizens are the ones who the most vulnerable to pressure by that state.
KOLANICH (talk) 19:36, 31 May 2018 (UTC)[reply]

May 30

Two problems with Microsoft Edge/Windows 10: Why does window not really go away when I click on the red X? Why does back button go all the way back to the beginning?

Occasionally I will simply click on the back button and get sent all the way back to whatever the first site was.

And there is another problem that I seem to have with Edge. I will click on the red X and think the window is gone, but if there was audio, I keep hearing that audio. Sometimes I will turn off the computer and the window I thought was gone will be back when I turn the computer back on. — Preceding unsigned comment added by Vchimpanzee (talkcontribs) 20:50, 30 May 2018 (UTC)[reply]

May 31

C++ recursive tagged union problem

#include <iostream>
#include <vector>

struct Tree {
	bool is_leaf;
	union {
		int leaf;
		std::vector<Tree> children;
	};
	Tree(): is_leaf(false), children() {/*std::cout << "default constructor called\n";*/}
	Tree(const Tree& t) {/*std::cout << "copy constructor called\n";*/ *this = t;}
	Tree operator= (const Tree& t) {
		/*std::cout << "copy assignment called\n";*/
		if (is_leaf = t.is_leaf) {leaf = t.leaf;}
		else {children = t.children;}
		/*std::cout << " copy assignment ends\n";*/
		return *this;
	}
	~Tree() {
		/*std::cout << "destructor called\n";*/
		if (!is_leaf) {children.~vector();}
		/*std::cout << " destructor ends\n";*/
	}
};

int main() {
	Tree t;
	Tree u(t);
}

I am trying to implement a tree-like data structure in C++. Basically a Tree is either a data-containing leaf node or consists of one or more children subtree. I supposed a tagged union would best fit this situation. Because I used vector — which has non-trivial special member functions — to store the list of children, I had to provide the special member functions of Tree myself (pre-C++11 doesn't even allow it). I don't know how to do this properly so I just go with what mekes sense in my mind. The above code, when ran, has a runtime error but I couldn't figure out how it happens. Here is the output when uncommented:

default constructor called
copy constructor called
copy assignment called
destructor called
destructor called
destructor called

Then the error occurs. I have tried removing the if line in the destructor but then it just prints

...
destructor called
 destructor ends
destructor called
 destructor ends
...

infinitely. Replacing *this = t with "proper" construction doesn't help either.

I tried to run through a debugger but still don't know how and why the destructor was called. Currently I am in a state of utter confusion, don't know what part of C++ I'm missing or what to search now (I tried googling but no avail. And returning to cppreference just confuse me more). Please help. In case it matters, I'm using MinGW on Windows 10.

The original code is much longer and more complicated but this is a seperate minimum working example to ease debugging for me (and you).14.177.103.250 (talk) 08:32, 31 May 2018 (UTC)[reply]

For some reason I don't quite understand, constructing or destructing a vector of type T will sometimes create/destroy a T object. This causes and endless loop in your case. The simplest fix seems to be to let default trees be leaves, which makes more sense anyway 192.176.1.90 (talk) —Preceding undated comment added 14:53, 31 May 2018 (UTC)[reply]
Doesn't work. It just cause another infinite loop. Different from last time, but still inscrutable. Anyway, I already have a constructor taking int to create leaf, but not shown. That default constructor just fits more with the rest of my code. 14.177.103.250 (talk) 04:18, 1 June 2018 (UTC)[reply]
I suppose putting a vector into a union is calling for problems. Why don't you just put a vector of children as an ordinary member and implement the TreeNode::isALeaf() predicate with a simple inline test for children.empty()??? Then no need to explicitly call consrtuctor and destructor, which may easily go wrong. --CiaPan (talk) 15:53, 31 May 2018 (UTC)[reply]
...or, instead of including a vector of nodes keep a pointer to a vector (defaulting to nullptr) and create a vector if necessary with explicit call to new:
	void TreeNode::AddAChild (TreeNode* node) {
		if (childrenptr == nullptr)
			childrenptr = new vector<TreeNode>;
		childrenptr->push_back (node);
	}

	bool TreeNode::IsALeaf() { return childrenptr == nullptr || childrenptr->empty(); }
and, of course, appropriate deletion routine:
	TreeNode::~TreeNode() {
		delete childrenptr;
	}
Or maybe you can use a smart pointer to take care automatically of destructing and deleting the optional object at appropriate time. --CiaPan (talk) 16:10, 31 May 2018 (UTC)[reply]
TreeView class [3] AboutFace 22 (talk) 16:49, 31 May 2018 (UTC)[reply]
@AboutFace 22: Not all trees belong to the Windows environment... --CiaPan (talk) 17:05, 31 May 2018 (UTC)[reply]

How could computers run 20 years ago with so little RAM?

If I'm correct RAM between the years '95 to '99, for a home computer, was usually something from 32MB to 128MB . However, back then, people already had browsers, PDFs, Word and Excel. How could they run with so little RAM? What's going wrong with today's computers? From the point of view of the user experience, how were things like for the users of the '90s compared to our present day? Are my 4GB RAM idle most of the time, when I'm just navigating the web, writing a text or doing similar stuff? --Doroletho (talk) 16:46, 31 May 2018 (UTC)[reply]

I'm sure there will be many comments about programs getting larger, but much of it is the operating system, which is stored in RAM. Every operating system has a minimum RAM requirement. That has been going up with every new version. It is based on what people have. The more RAM computers get, the more the operating system will need. 209.149.113.5 (talk) 17:15, 31 May 2018 (UTC)[reply]
Software was written much more compactly and efficiently in those days, and it had fewer bells and whistles and other add-ons that take up so much memory in modern computers. Going back further, I remember a timetabling program that ran in 128KB of RAM on a BBC computer. I made some very minor modifications to the program, but it took me a long time to decipher the very compact coding. There were modules that were loaded into memory from disk as and when needed. Dbfirs 17:22, 31 May 2018 (UTC)[reply]
  • They didn't have web browsers, or if they did, they were a lot smaller footprint. If they were browsing the web, they probably had one window open and tabbed browsing within windows hadn't appeared yet.
Also, Windows '95 is only just appearing in that timescale, so there might still be some 16 bit Windows 3.11 about.
These days, programs adapt dynamically to eat whatever is available to them. This laptop is 8GB, but a web browser (any) will still consume 2/3rd of that. Andy Dingley (talk) 18:35, 31 May 2018 (UTC)[reply]
They didn't have web browsers? Hofhof (talk) 18:43, 31 May 2018 (UTC)[reply]
They were available, very few people were using them until 1997. Few until 1999. Andy Dingley (talk) 19:09, 31 May 2018 (UTC)[reply]
NCSA Mosaic was released on 23 Jan 1993. LongHairedFop (talk) 20:14, 31 May 2018 (UTC)[reply]
  • "How were things like for the users of the '90s?" Slower, less capable, less automatic, less parallel. less resolution,…. Spell checkers were usually on demand instead of Word 95 doing it in the background or nowadays with autocorrect and grammar checkers. Games just have more in them, requiring bigger and faster machines
"Are my 4GB RAM idle most of the time?" Yes and no. For most things humans do at any one time, it is overkill. If you have hundreds of tabs with pages playing video ads or calculating bitcoin for someone and all the other apps you have open, you probably max things out. "Memory is free until you run out." The software stack is so big and there is resistance to reducing it so it keeps growing. The original Mac had 128K and could do WYSIWYG text editing, with occasional floppy swapping. Try landing on the moon in 1969 with only 4KB of RAM. StrayBolt (talk) 23:09, 31 May 2018 (UTC)[reply]
One thing about the Apollo Guidance Computer is that it had (I think) dozens of small programs for different phases of the mission. Bubba73 You talkin' to me? 03:57, 1 June 2018 (UTC)[reply]
They used to have a lot less memory than that. I used two computers that had 64KB (KB, not MB). Then I had the common 640KB. Programs were smaller and they dealt with less data. The minimum size that I could write for a DOS program in the 1980s was about 9KB. Now the minimum size for a Windows program is several megabytes - close to 500 times larger. I remember WordStar word processor for DOS being with 29KB or 39KB. See Software bloat. Bubba73 You talkin' to me? 02:17, 1 June 2018 (UTC)[reply]

How can I force Windows to show me files it's hiding?

I'm running Windows 7. I've just downloaded Python for Windows and the setup program put the executable in a directory called

C:\Users\TheUser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.6\

When I try to look for that directory with either Explorer or the Command Prompt shell, it doesn't appear in the listing either Explorer or the shell "dir" command shows.

For example the directory C:\Users\TheUser\AppData\ doesn't appear at all (let alone its subdirectories).

Why is that? And how can I force Windows to display a true listing of the contents of directories instead of it hiding some directories and files?

Thanks. Basemetal 21:05, 31 May 2018 (UTC)[reply]

Windows 7
Select the Start button, then select Control Panel > Appearance and Personalization.
Select Folder Options, then select the View tab.
Under Advanced settings, select Show hidden files, folders, and drives, and then select OK. AboutFace 22 (talk) 22:25, 31 May 2018 (UTC)[reply]
Great. Thanks. It worked for Explorer. That does the job for all my practical requirements. Thanks. But I'm curious: the Command Prompt still refuses to show me those "hidden files, folders, and drives". Is there any way to change that? Thanks. Basemetal 22:57, 31 May 2018 (UTC)[reply]

What does the .tar.gz.sig file do?

I'm running Windows 7. I'm trying to get source code of a program residing in this directory and I can see it is in the form of a tar archive (extension .tar.gz). Next to it there is a very small file with extension .tar.gz.sig. Can anyone tell me what it does? Do I need to download it also in order to unpack the archive? And one other question on tar: Is tar only used to compress source code or could there be executables in that tar archive? I'm looking for source code only. Thanks. Basemetal 21:17, 31 May 2018 (UTC)[reply]

It's probably a digital signature made using PGP or possibly GPG. You don't need it, if you trust that the .tar.gz file is genuine. But if you have it, then you can verify the signature to make sure no one has tampered with the .tar.gz file on its way to you.
(Could such an attacker also have tampered with the .sig file? Sure. But they can't generate a valid signature. Provided of course that you believe the public key you have for the signer.) --Trovatore (talk) 21:45, 31 May 2018 (UTC)[reply]

how can a script kill its own offspring?

How can I write a bash script that does this?

command &
command &
command &
sleep 3600
kill everything spawned above

That is, let each of the spawned commands run (mostly sleeping) for an hour, then stop. —Tamfang (talk) 21:41, 31 May 2018 (UTC)[reply]

kill them using their job number:
  kill %1 
  kill %2
  kill %3
--Finlay McWalter··–·Talk 22:58, 31 May 2018 (UTC)[reply]
Are these numbers local to the script? Before this script runs, %1 could easily be something else. —Tamfang (talk) 23:39, 31 May 2018 (UTC)[reply]
Each shell process has its own job list. You can source a script into an existing shell (and even pass it arguments!), but if you run it normally (via shebang or manual bash foo.sh) it's separate. --Tardis (talk) 03:14, 1 June 2018 (UTC)[reply]

June 1