Wikipedia:Reference desk/Computing: Difference between revisions

Content deleted Content added
 
Line 1:
<noinclude>{{Wikipedia:Reference desk/header|WP:RD/C|WP:CHD}}
<noinclude>
{{Wikipedia:Reference desk/header|WP:RD/C|WP:CHD}}
[[Category:Non-talk pages that are automatically signed]]
[[Category:Pages automatically checked for incorrect links]]
Line 9 ⟶ 8:
</noinclude>
 
= February 25 =
= August 19 =
 
== Shortest video game ==
== Putting an App Icon on the Home Screen ==
 
[[A Short Hike]] (as the name suggests) can be beaten within a few hours. What other games are like that? [[User:JuniperChill|JuniperChill]] ([[User talk:JuniperChill|talk]]) 19:18, 19 August 2025 (UTC)
I have a Samsung Galaxy J7, running Android version 8.1.0. What I want to do is to add another application icon to the home screen. The icon for it is currently in the Applications window that I can open by clicking on the Applications window icon, but I want to display it on a page of the home screen. At this time the application is Spotify, and I want to be able to launch Spotify and Maps conveniently at the same time. However, I think that my question is more general, and is how to put an icon for an application on the home screen that is installed but isn't on the home screen.
[[User:Robert McClenon|Robert McClenon]] ([[User talk:Robert McClenon|talk]]) 01:15, 25 February 2020 (UTC)
:You should be able to move the app to your home screen by dragging it. Long-press if necessary or tap, hold, and move your finger; the home screen(s) should appear and allow you to release your finger and drop the app onto it. [[User:Elizium23|Elizium23]] ([[User talk:Elizium23|talk]]) 01:18, 25 February 2020 (UTC)
:Yep, long press and hold the icon in the start menu (I guess that's what's called the Applications window). After a second or two the home screens should appear in the background, then you can drag the icon where you want it. You can also long press an empty space on the home screen and you'll get a popup menu allowing you to add stuff like app shortcuts. [[Special:Contributions/93.136.117.148|93.136.117.148]] ([[User talk:93.136.117.148|talk]]) 02:29, 25 February 2020 (UTC)
::Long-press (hold down) was it. Thanks. [[User:Robert McClenon|Robert McClenon]] ([[User talk:Robert McClenon|talk]]) 15:14, 26 February 2020 (UTC)
 
: "50 Games Like" aims to be a weighted-category based games recomendation engine. Just based on ''A Short Hike'', it lists [https://www.50gameslike.com/games-like/a-short-hike these games]. But that's based on ''all'' the categories ''A Short Hike'' is in ("cute", "adventure", "exploration", etc.). If you just want "short" games, you click on just the category button and it gives you [https://www.50gameslike.com/best-games-by-type/short short games in all genres] (which aren't like ''A Short Hike'', except in shortness). Subjectively, it looks more useful than Steam's recommendation engine, which gives me some fairly bonkers suggestions ("you liked FTL, so you might like Doom Eternal"). -- [[User:Finlay McWalter|Finlay McWalter]]'''··–·'''[[User talk:Finlay McWalter|Talk]] 19:40, 19 August 2025 (UTC)
= February 26 =
:Finlay's answer is excellent, but I can't help mention that the original ''[[Portal (video game)|Portal]]'' game is both famously short and considered one of the best games of all time. If shortness is the prime criteria, you could do worse. But apart from the duration, it's nothing like ''A Short Hike''. [[User:Matt Deres|Matt Deres]] ([[User talk:Matt Deres|talk]]) 12:40, 20 August 2025 (UTC)
::Guess that means that ''A Short Hike'' is unique in its shortness, cosiness, and adventure. ''[[Lil Gator Game]]'' is quite close in terms of layout and that the player can climb but idk about its length since I haven't played the latter, but have played the former. I was mostly focusing on shortness, hence the title of the discussion. [[User:JuniperChill|JuniperChill]] ([[User talk:JuniperChill|talk]]) 19:37, 20 August 2025 (UTC)
:Check out https://howlongtobeat.com/user/a19xys/lists/25829/%5B-Short-%26-Good-(-5h)-%5D, perhaps. [[User:Aaron Liu|<span class="skin-invert" style="color:#0645ad">Aaron Liu</span>]] ([[User talk:Aaron Liu#top|talk]]) 23:37, 20 August 2025 (UTC)
:@[[User:JuniperChill|JuniperChill]] In Far Cry 4, if you just sit at the table and wait for Pagan Min to return, it is a very short video game. Less than 15 minutes. [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 00:56, 21 August 2025 (UTC)
::Well, consuming the crab rangoon can't be so bad it's considered an "adventure", can it? [[User:Aaron Liu|<span class="skin-invert" style="color:#0645ad">Aaron Liu</span>]] ([[User talk:Aaron Liu#top|talk]]) 01:04, 21 August 2025 (UTC)
:::@[[User:Aaron Liu|Aaron Liu]] Traveling to a country far away, ending up in a firefight in which some people get killed, seeing a murder close-up (over a simple miscommunication), getting invited to the palace of the dictator of said country as a VIP guest, bringing moms ashes to their final resting place and learning about your tragic family history is quite an adventure (although some would just call that Tuesday). [[User:Polygnotus|Polygnotus]] ([[User talk:Polygnotus|talk]]) 13:40, 21 August 2025 (UTC)
 
= August 20 =
== Brother DCP-7030 driver for ubuntu ==
 
== Which year American staté the bill on count ==
After following the installation instructions over and over again, I can't seem to install it [[User:Thegooduser|<span style="color: teal">'''Thegooduser'''</span>]] [[User talk:Thegooduser|<span style="color: maroon">'''Life Begins With a Smile :)'''</span>]] <span style="color:red">🍁</span> 00:51, 26 February 2020 (UTC)
 
We need to know that year [[Special:Contributions/41.114.142.143|41.114.142.143]] ([[User talk:41.114.142.143|talk]]) 05:21, 20 August 2025 (UTC)
== Problems using the wikipedia dump bz2 file ==
 
:I can't understand the question. ―<span style="font-family:Poppins, Helvetica, Sans-serif;">[[User:Panamitsu|Panamitsu]]</span> [[User_talk:Panamitsu|(talk)]] 06:41, 20 August 2025 (UTC)
Please see '''[[Wikipedia:Reference desk/Miscellaneous#Problems using the wikipedia dump bz2 file|this post]]''' on the Miscellaneous desk. [[Special:Contributions/2606:A000:1126:28D:8095:BB24:F64A:E5FC|2606:A000:1126:28D:8095:BB24:F64A:E5FC]] ([[User talk:2606:A000:1126:28D:8095:BB24:F64A:E5FC|talk]]) 03:21, 26 February 2020 (UTC)
:Are you sure this question is about computing, which includes information technology, electronics, software and hardware? Otherwise, please post it at a more fitting section of the reference desk. If the question is about history, politics or economics, the appropriate section is [[Wikipedia:Reference desk/Humanities|Reference desk/Humanities]]. Also, do not repost your question as it is now. Please rephrase it, so that we have a chance to understand the question. &nbsp;&ZeroWidthSpace;‑‑[[User talk:Lambiam#top|Lambiam]] 13:21, 20 August 2025 (UTC)
:Google AI says: The United States passed the Coinage Act of 1792, which established the U.S. dollar as the unit of currency and mandated that public accounts and court proceedings use this standard, making it the first "bill on count" in the sense of the financial unit. [[User:Shantavira|Shantavira]]|[[User talk:Shantavira|<sup>feed me</sup>]] 17:45, 23 August 2025 (UTC)
::{{small|I am unaware of ''[[wikt:count#Noun|count]]'' having a sense "dollar" (or any financial unit). &nbsp;&ZeroWidthSpace;‑‑[[User talk:Lambiam#top|Lambiam]] 13:09, 24 August 2025 (UTC)}}
:::<small>AI is aware of all sorts of imaginary stuff.</small> [[User:Shantavira|Shantavira]]|[[User talk:Shantavira|<sup>feed me</sup>]] 07:54, 25 August 2025 (UTC)
 
= February 27 =
 
== Opening different URLs using different browsers in Windows 10 ==
 
In Windows 10, is there an easy way to implement a solution so that different URLs can be opened using different browsers based on configured rules? This only needs to be done when URLs are opened using the default handler. <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/134.242.92.97|134.242.92.97]] ([[User talk:134.242.92.97#top|talk]]) 22:41, 27 February 2020 (UTC)</small> <!--Autosigned by SineBot-->
:You can read about some options [https://superuser.com/questions/1302877/windows-how-to-launch-different-browsers-based-on-url here]. [[User:Ruslik0|Ruslik]]_[[User Talk:Ruslik0|<span style="color:red">Zero</span>]] 20:25, 1 March 2020 (UTC)
 
= February 28 =
 
== MediaWikiSeptember back1 up ==
 
== Estimating nodes in a tree for depth-first search ==
Sorry, this is a run on from my previous question here (now archived) but I wondered if there was a relatively simple way of doing the above? I mean, I'd really like the answer to be something in the realms of "Yeah, copy the folders to an external" or something; but things are rarely that easy :) and i'm prepared to not understand the answer. But any advice would be greatly appreciated! Happy Friday, all. [[User:Serial Number 54129|<span style="color:black">'''——'''</span>]][[Special:Contributions/Serial Number 54129|<span style="color:black">''SN''</span>]][[User talk:Serial Number 54129|<span style="color:#8B0000">54129</span>]] 11:04, 28 February 2020 (UTC)
:Is this ([[mw:Manual:Backing up a wiki]]) any use? - [[User:X201|X201]] ([[User talk:X201|talk]]) 11:29, 28 February 2020 (UTC)
::Well, yes, {{u|X201}}, thanks :) it rather says complicatedly what I hoped could be spelt out more simply! Have a good weekend! [[User:Serial Number 54129|<span style="color:black">'''——'''</span>]][[Special:Contributions/Serial Number 54129|<span style="color:black">''SN''</span>]][[User talk:Serial Number 54129|<span style="color:#8B0000">54129</span>]] 12:00, 29 February 2020 (UTC)
 
I need to traverse a large tree with a depth-first search. I need an estimate of the number of nodes to get an idea if it is feasible to do it. What I have in mind is to start the search but at each node, select one edge at random. Keep track of the branching factor at each level. Then repeat this maybe 10<sup>5</sup> times and get an average branching factor at each level. Then multiply the branching factors to get an estimate of the total number of nodes.
= February 29 =
==Short descriptions, Wikidata, and SQL/SPARQL==
Hi, I would like to know how to search for items on Wikidata with descriptions longer than, say, 150 characters; I've noticed that the very long ones tend to be unsuitable for use as short descriptions on Wikipedia. ([https://en.wikipedia.org/w/index.php?title=Death_panel&diff=923671571&oldid=916291801 example] [https://en.wikipedia.org/w/index.php?title=As_One_(opera)&diff=943051892&oldid=943051797 example]) I've tried writing something based on the [https://quarry.wmflabs.org/query/1255 quarry query] for descriptions of length 1, but had absolutely no success. (My knowledge of SQL is very minimal.) I would be grateful for any assistance or pointers. Cheers, [[User:Genericusername57|gnu]][[User talk:Genericusername57|<span style="color:#ff7000">57</span>]] 15:34, 29 February 2020 (UTC)
:Doesn't LENGTH(term_text) > 150 work? [[Special:Contributions/2602:24A:DE47:B270:A096:24F4:F986:C62A|2602:24A:DE47:B270:A096:24F4:F986:C62A]] ([[User talk:2602:24A:DE47:B270:A096:24F4:F986:C62A|talk]]) 00:49, 1 March 2020 (UTC)
::I tried that a while ago; when I submit the query, it runs for a long time and eventually times out without completing. Cheers, [[User:Genericusername57|gnu]][[User talk:Genericusername57|<span style="color:#ff7000">57</span>]] 01:04, 1 March 2020 (UTC)
:::There is probably no index on the term length, i.e. it's doing a linear scan. Your options: 1) create index or ask someone to create one (it will be even slower than the linear scan, but will allow future such queries to run fast); 2) get your timeout increased or get someone with higher limits to run the query for you; or 3) download the db to your own machine and run the queries on your own db instance. The last is the best if you want to muck with the data a lot, but of course it's more work and takes resources (your own machine or VM, basically). [[Special:Contributions/173.228.123.39|173.228.123.39]] ([[User talk:173.228.123.39|talk]]) 00:56, 2 March 2020 (UTC)
 
Should this give a reasonable estimate of the total number of nodes? [[User:Bubba73|Bubba73]] <sup>[[User talk:Bubba73|You talkin' to me?]]</sup> 22:18, 1 September 2025 (UTC)
= March 2 =
 
= September 2 =
== (Web) development novice ==
 
== What does ''illegal'' mean in the context of HTML? ==
I'm a CS dropout with a bit of programming experience but not much. It's also been years since I coded anything. I consider myself pretty good at working out the logic side of things but I usually get stuck when trying to figure out the best way to do something or if there is a standard way of achieving a certain result. I want to get back into coding by starting a web development project and already I am unsure how to achieve a desired result.
 
To use it in a sentence (no pun intended), it's illegal to place a div inside an inline tag. – [[User:MrPersonHumanGuy|MrPersonHumanGuy]] ([[User talk:MrPersonHumanGuy|talk]]) 01:15, 2 September 2025 (UTC)
A basic website usually has for example a logo/home page link, a navigation bar, a footer, and the content of the particular page. So a basic way of doing this would be to include the logo, navigation bar, and footer on each page. However, for a (dynamic) site that is constantly adding content this seems less than ideal.
:It violates the specs of the HTML syntax, is not correct HTML, and may be expected to cause renderers to behave erratically. [[User:Aaron Liu|<span class="skin-invert" style="color:#0645ad">Aaron Liu</span>]] ([[User talk:Aaron Liu#top|talk]]) 03:05, 2 September 2025 (UTC)
 
So I was thinking maybe of having a template php page which includes the logo, nav bar, etc. but then would also have some php code that would include the required content.
 
I don't want to be given the answer (at least for now) as I'd rather figure it out for myself but am I along the right lines? If not maybe a bit of a nudge in the right direction. What sort of problems would this approach present?
 
--[[User:Polyknot|Polyknot]] ([[User talk:Polyknot|talk]]) 05:33, 2 March 2020 (UTC)
 
:Are you using a PHP-dependent content management framework or system such as [[Drupal]] or [[WordPress]]? If not, than now is perhaps a good time to switch to [[Django]]/[[Python (programming language)|Python]]. The learning curve is not very steep, there are excellent tutorials, the community is very helpful to novices, and in the end you will probably enjoy the greater flexibility. &nbsp;--[[User talk:Lambiam|Lambiam]] 08:01, 2 March 2020 (UTC)
 
:You can use the include function in PHP to include whatever you like. So, you can create a file that makes the navigation bar, such as "nav.inc". Then, include it where you want it: include("nav.inc"); You can have files that include other files. For example, all the stuff that comes before the main contant might be in a file named "top.inc". That file includes the header, styles, css, title bar, nav, etc... Then, everything after the content might be in "bottom.inc". So, your web page becomes include("top.inc"); include("mycontent.inc"); include("bottom.inc");. The content one is where you handle dynamic content. Normally, you query a database, get content, and format it properly. But, you could just as well include a text file. Warning: You will find zealots that claim switching from one programming to another programming language will solve all your problems, including obesity, acne, and erectile dysfunction. The rule is always the same: The language you know is the best language to use. [[Special:Contributions/135.84.167.41|135.84.167.41]] ([[User talk:135.84.167.41|talk]]) 12:41, 2 March 2020 (UTC)
 
==How do I eliminate this standard error?==
Here is a kata/programming practice exercise that I recently did:
 
https://www.codewars.com/kata/55b3425df71c1201a800009c/train/python
 
Here is my own solution to this kata:
 
<pre>
def findMedian(list):
list = sorted(list)
length = len(list)
if length % 2 == 1:
halfLen = int(length / 2)
median = list[halfLen]
elif length % 2 == 0:
num1 = int(length / 2) - 1
num2 = int(length / 2)
median = int((list[num1] + list[num2]) / 2)
return median
 
def findRange(list):
list = sorted(list)
range = list[-1] - list[0]
return range
 
def findMean(list):
list = sorted(list)
sum = 0
for i in range(0,len(list)):
sum += list[i]
i += 1
mean = sum/len(list)
return int(mean)
 
def convertFormat(num):
num = int(num)
hours = int(num / 3600)
minutes = int((num % 3600) / 60)
seconds = ((num % 3600) % 60)
return format(hours,'02d')+"|"+format(minutes,'02d')+"|"+format(seconds,'02d')
 
def stat(strg):
lisst = strg.split(', ')
lyst = []
for item in lisst:
lyst.append(item.split('|'))
numSec = []
for i in range(0,len(lyst)):
numSec.append([int(lyst[i][0])*3600, int(lyst[i][1])*60, int(lyst[i][2])])
numSecTotal = []
for i in range(0,len(numSec)):
numSecTotal.append(numSec[i][0]+numSec[i][1]+numSec[i][2])
numSecTotal = sorted(numSecTotal)
formattedMedian = convertFormat(findMedian(numSecTotal))
formattedRange = convertFormat(findRange(numSecTotal))+" "
formattedMean = convertFormat(findMean(numSecTotal))+" "
str = "Range: "+formattedRange+"Average: "+formattedMean+"Median: "+formattedMedian
return str
</pre>
 
This website actually accepted my solution as valid--which is why this solution of mine (by Futurist110, aka myself) is visible here:
 
https://www.codewars.com/kata/55b3425df71c1201a800009c/solutions/python/all/newest
 
However, when I clicked on the "Train Again" button and attempted to once again submit this solution with minor modifications, I got this error message in spite of my program passing all of the tests for it on this website:
 
<pre>
STDERR
Traceback (most recent call last):
File "main.py", line 75, in <module>
randomTests()
File "main.py", line 73, in randomTests
test.assert_equals(stat(a), stat1221(a))
File "/home/codewarrior/solution.py", line 41, in stat
numSec.append([int(lyst[i][0])*3600, int(lyst[i][1])*60, int(lyst[i][2])])
ValueError: invalid literal for int() with base 10: ''
</pre>
 
What exactly in this program do I actually need to fix in order to eliminate this error message--and just how exactly do I fix the relevant part of this computer program of mine? Any thoughts on this? [[User:Futurist110|Futurist110]] ([[User talk:Futurist110|talk]]) 22:53, 2 March 2020 (UTC)
 
 
*It looks like you are passing an empty string to the int() function, maybe because of badly formatted input data. Rather than try to debug it for you, I'll suggest a way to debug it yourself: put try/except around the line where the error is happening, and print the relevant values in the event that the exception triggers. So in this case, replace line 41 with:
<syntaxhighlight lang="python">
try:
numSec.append([int(lyst[i][0])*3600, int(lyst[i][1])*60, int(lyst[i][2])])
except ValueError as e:
print (e, i, lyst[i])
raise
</syntaxhighlight>
 
Use the printed info to either figure out what is wrong, or figure out what other info you need to diagnose the error, then modify the program again to get the additional info. It will often take quite a few iterations of that to diagnose a bug. Debuggers can avoid some of that, but print-based tracing is something every programmer has to do some of the time.
 
Unrelated: I notice in your findMean function, you sort the list unnecessarily. I'd have just written sum(list) / len(list). [[Special:Contributions/173.228.123.39|173.228.123.39]] ([[User talk:173.228.123.39|talk]]) 01:58, 3 March 2020 (UTC)
 
= March 3 =
 
== Place that pairs in-demand tasks with learning ==
 
Dear volunteers,
 
I am starting a project. The fundamental principle behind the project is that highest quality education is available online, and it is not being utilized to its full potential.
I want to make a place where concrete things that need to be done will be matched to the learning path towards skills required to get them done.
This learning path will be accompanied by freely available online resources.
 
Sites like upwork exist, but they merely present the things that need to be done. They are not learner friendly. You need to have already established knowledge in order to participate.
What I want is a place with a higher focus on learning. So, instead of only presenting a task that needs to be done, every task would have an automatically generated learning
path attached. Furthermore, each user would have a profile. As the user learns, the profile gets updated. The profiles would show what the individual has learned, and would serve as means of certification.
 
Two other students are working on this along with me. The project is in the planning and prototyping stage.
 
I have 3 questions.
 
1. Does a place doing anything akin to this already exist?
 
2. We have nothing in terms of financial or mentorship support. I understand that we would need to work for it, but are there any opportunities to get any sort of support? (We are from Croatia, if that means anything)
 
3. Do you see any major pitfalls that would make the type of thing I described impossible?
 
Thank you for your time.
[[User:Ribaricplusplus|Ribaricplusplus]] ([[User talk:Ribaricplusplus|talk]]) 17:36, 3 March 2020 (UTC)