Wikipedia:Reference desk/Computing: Difference between revisions
→PAL and NTSC: new section |
|||
Line 226: | Line 226: | ||
:You can look into the [https://github.com/wikimedia/mediawiki-extensions-CategoryTree/blob/master/modules/ext.categoryTree/ext.categoryTree.js mediawiki code] that actually does this. [[User:Ruslik0|Ruslik]]_[[User Talk:Ruslik0|<span style="color:red">Zero</span>]] 18:04, 9 April 2022 (UTC) |
:You can look into the [https://github.com/wikimedia/mediawiki-extensions-CategoryTree/blob/master/modules/ext.categoryTree/ext.categoryTree.js mediawiki code] that actually does this. [[User:Ruslik0|Ruslik]]_[[User Talk:Ruslik0|<span style="color:red">Zero</span>]] 18:04, 9 April 2022 (UTC) |
||
::I don't mean to change the JavaScript currently used by the community. Just to act on the output in the personal level. [[Special:Contributions/79.180.118.152|79.180.118.152]] ([[User talk:79.180.118.152|talk]]) 18:18, 9 April 2022 (UTC) |
::I don't mean to change the JavaScript currently used by the community. Just to act on the output in the personal level. [[Special:Contributions/79.180.118.152|79.180.118.152]] ([[User talk:79.180.118.152|talk]]) 18:18, 9 April 2022 (UTC) |
||
== PAL and NTSC == |
|||
Does PAL and NTSC have to do with the DVD/Blu-ray player or television? [[Special:Contributions/86.143.101.46|86.143.101.46]] ([[User talk:86.143.101.46|talk]]) 21:48, 9 April 2022 (UTC) |
Revision as of 21:48, 9 April 2022
of the Wikipedia reference desk.
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.
April 2
Wi-FI hotspot not connecting to tablet, and turning itself off
I use an Android smartphone as a Wi-Fi hotspot. I connect my Android tablet computer via the mobile (cell) phone to access the internet, like editing on WP.
- Occasionally it will NOT connect. It seems to 'come good' on its own in about 24 hours.
- One odd 'symptom' is, despite setting my phone hot spot to "Keep Wi-Fi hotspot on" to "always", it keeps turning itself, OFF! ¯\_(ツ)_/¯
- I've even removed all security, so I don't need to bother with a password/PIN/Wi-Fi Protected Setup (WPS) or similar, but the same issue occurs.
- I also tried turning both devices off, then on again which seemed to have worked last time (it was also ~ 24 hours later) but this time, no luck.
- A person at a local phone store was rather unhelpful in suggesting it was because my phone was old (~3-4 years?) and the phone companies do this deliberately to make you 'upgrade'.
Any ideas? Regards 220 of ßorg 04:19, 2 April 2022 (UTC)
- Some possible issues I can think of:
- Some kind of battery-saving mode is enabled, causing it to occasionally turn off the radio. Double-check that 'Battery Saver' or similar settings are off.
- Some devices (I think this largely applies to iPhone, but some Androids may do it too?) hide the SSID after you leave the hotspot settings. Try going to the hotspot settings, turning it on, then connecting your computer to the hotspot while the settings are still open.
- Disable Wi-Fi on the phone before enabling the hotspot. It's possible that it's connecting to a Wi-Fi network automatically, then turning off your hotspot.
- If you set a data limit, this may cause the hotspot feature to automatically turn off. Consider disabling this if it's enabled.
- This is a bit unlikely, as Androids usually turn themselves off entirely when overheating, but perhaps it's getting too hot and disabling it? Anecdotal, but mine gets fairly hot when tethering, and does this sometimes.
- I hope this helps. If you're willing to share the model of the phone, this may be useful.
- Sunmist (talk) 06:23, 2 April 2022 (UTC)
- Phone is a ZTE 'Blade' B112, from the Australian 'Boost Mobile' company.
- Re. your third point, the phone Wi-Fi was off. The tablet did try connecting to other hotspots etc, and did connect successfully to at least one yesterday, but it would also 'connect' to my phone, say "No internet" then 'save' that 'network'.
- 4th point, the phone notifies if a set limit is exceeded, but stays connected.
- I think I had already tried everything else you suggested. The phone is getting quite warm at times, but I can't see a connection there. 220 of ßorg 03:51, 3 April 2022 (UTC)
- Phone is a ZTE 'Blade' B112, from the Australian 'Boost Mobile' company.
- I previously found that using the phone as a wi-fi hotspot worked poorly and using Bluetooth tethering instead worked better. (On my phone, these are parallel options under "Hotspot and tethering", which itself is under "Sim card and mobile network". I'm not entirely sure what the difference is, because I imagine Bluetooth is used in either case.) Card Zero (talk) 14:01, 2 April 2022 (UTC)
- @Sunmist and Card Zero: Thanks for the replies and ideas, which I did not get back here to read before the issue apparently ... resolved itself nearly 2 hours ago. (After about 2½ days) I had been using the phone to access WP, just turned the tablets Wi-Fi on, and sometime later noticed the hotspot was working ! ¯\_(ツ)_/¯
- I might try the Bluetooth route, but, I have a set of Bluetooth earphones, and have only been able to get them to 'pair', to the tablet not phone, once. 220 of ßorg 03:51, 3 April 2022 (UTC)
April 3
Jigsaw Algorithm
I have a calendar jigsaw using some pentominos and some quadrominos (if that 4-word is right).
The board which is not a regular shape and where each "item" is a square, looks like
Ja Fe Mr Ap My Jn Jl Au Se Oc No De 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Su Mo Tu We Th Fr Sa
I have 10 pieces vaguely named after letters of the alphabet. The can be rotated and turned over.
vvv iiii zz rr l pp u u ss ttt SSS v z r l pp uuu ss t SS v zz r l p t ll
The jigsaw requires fitting the pieces to the board to leave only the month, date and day exposed. I indicate these with "*", so the solution that i used for April 1st was:
2022-04-01 Fr ppp*zz ppssvz *ssSvzz ilSSvvv ilStrrr ilStttr illtuuu u*u
You will observe I have removed excess spaces from the above, so it doesn't "look" a square grid. As far as I know all dates are doable and many in several ways.
My question is: "What sort of algorithm would solve this in reasonable time - I don't want to try anything 80 factorial (10 pieces, 2 sides, 4 orientations) times." In general I can solve them manually in about 10 minutes.
Thanks. -- SGBailey (talk) 12:03, 3 April 2022 (UTC)
- I suspect that with the current typical processor speeds a depth-first search with backtracking will find a solution in a reasonable time, since most of the time the search will hit the end of a dead-end alley pretty soon. Since there are complications near the top of the board (month name, day number, irregularity) and the bottom of the board (irregularity, day name), I'd number the 47 cells to be covered taking turns from the top-left cell and from the bottom-right cell, as shown here for the case of Ap 1 Fr:
00 02 04 ** 06 08 10 12 14 16 18 20 ** 22 24 26 28 30 32 34 36 38 40 42 44 46 45 43 41 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 09 07 05 03 ** 01
- (As is usual in algorithms, the numbering starts with 0, so we get 00 through 46.) When the next free cell in this ordering cannot be covered by an omino, the algorithm should backtrack to the previous node. If you can use recursion, this can be coded up relatively simple. --Lambiam 16:21, 3 April 2022 (UTC)
- Because of various symmetries, these ominoes give a maximal branching factor (at the top node) of 58, not 80. Also, you cannot reuse the same omino, so 58! is far too pessimistic. If I'm not mistaken, without any backtracking there are 2·44·85·10! = 60881161420800 combinations to be considered. While humungous if you are not the NSA, this is a far cry from 80! = 71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000. --Lambiam 16:41, 3 April 2022 (UTC)
- So if I am understanding the suggestions right, it is:
[ List the 58 piecevariations then recurse and backtrack seeing if the topmost piece orientation can be placed at the "current square", noting which subsquare of the picevariation was used. If ok, try the next square. etc. If not ok, try the next piecevariation. If not ok and reached end of piecevariation list then rewind one and try again. ]
Coding this will take me a while but we'll see. Thanks (ps there are only 7*366 = 2562 jigsaws to do.) -- SGBailey (talk) 18:44, 3 April 2022 (UTC)
- To get you started, here is the algorithm in pseudo code:
solve(board, untried): if is_full(board): # yeah, a solution! return board set empty_cell ← lowest_numbered_empty_cell(board) for piece in untried: for z in orientations(piece): if oriented(z, piece) fits board while covering empty_cell: set s ← solve(board union (oriented(z, piece)), untried except piece) if s ≠ null: return s return null
- This function should be called with the first parameter representing a board with 47 empty cells, and the second parameter a set of 10 pieces {v,i,z,r,l,p,u,s,t,S}. It uses some auxiliary functions whose meaning is hopefully obvious. To implement this, you have to decide on data structures for representing the board and the pieces, which can be done as lists of sorted coordinate pairs (i,j). (If they are sorted, when trying to fit a piece, if empty_cell is an even-numbered cell the first cell of the piece should cover empty_cell, but when empty_cell is an odd-numbered cell the last cell of the piece should cover it.) To save time, rather than computing the oriented pieces on the fly, they should be pre-computed. --Lambiam 20:16, 3 April 2022 (UTC)
Thanks. -- SGBailey (talk) 06:06, 4 April 2022 (UTC)
Sensitivity of Dragging and Dropping
I am using a 2017 Windows 10 desktop computer that isn't ready for Windows 11. I am finding that the sensitivity of the mouse to dragging and dropping is too sensitive, so that a lot of mouse moves that I do turn into drags and drops, where something that I wasn't trying to move, such as a tab in Firefox or a phrase on a PDF, are being dragged and think that they are ready to be dropped. Dropping a tab in Firefox creates a new window, which may not be what I intended. Dropping a phrase from a PDF does nothing, because the PDF is read-only, but it distracts from moving the mouse. What I want to do is to decrease the sensitivity of the mouse to starting a drag and drop. I looked up how to turn off Dragging and Dropping, which can be done by editing parameters in the Registry Editor; but it turns out that turning off dragging and dropping turns off a lot of useful capabilities, so I turned it back on. How do I control the sensitivity with which it starts dragging something? Robert McClenon (talk) 16:29, 3 April 2022 (UTC)
- First here's an answer to your question: Change Drag and Drop Sensitivity in Windows. But are you sure this is what you want? The sensitivity is the distance which it's possible to move the mouse, with the button held down, before the item underneath is picked up and dragging begins. Usually this is four pixels. You might test this by attempting delicate mouse movements and seeing how far you can get before the icon (or whatever) that you clicked on moves. One consideration is that some software may re-implement dragging, perhaps with a distance threshold of zero, so you may want to be sure that the problem is system-wide (perhaps specific software is your real problem, not the system setting). But is it possible that you're getting unintended mouse clicks, rather than having a specific problem with dragging? I don't mean to question your personal experience, but something like an over-sensitive mouse button is an easy explanation, whereas explaining how the system drag threshold could have been somehow set to zero is harder. When you say "mouse moves that I do turn into drags", that suggests clicks are being triggered accidentally. The obvious question: have you tried a new mouse? Oh, and another thought: is there possibly an unused secondary input device, such as a trackpad, which might be interfering? If you'd said "laptop" rather than "desktop", this would have been my guess. I suppose there might be a keyboard key for left-click (manufacturers come up with all kinds of original things) and it might be stuck. Card Zero (talk) 16:57, 3 April 2022 (UTC)
- User:Card Zero - I think that for less than $30 a new mouse is worse trying. Thank you. Robert McClenon (talk) 23:17, 3 April 2022 (UTC)
- Or (assuming it's wireless) perhaps try changing the batteries? Card Zero (talk) 23:50, 3 April 2022 (UTC)
- User:Card Zero - I think that for less than $30 a new mouse is worse trying. Thank you. Robert McClenon (talk) 23:17, 3 April 2022 (UTC)
Yubikeys in banking
Why are banks (of all companies) rarely implementing an MFA based on Yubikeys and instead often use SMS authentication? Is it expensive to implement? They don't want to halfway force clients into spending money on third-party companies and convey the idea that SMS is not 100% safe? They don't think bank accounts are a main target for phishing attempts? --Bumptump (talk) 23:43, 3 April 2022 (UTC)
- While SMS is the most common, I don't know of it's correct to say it's rare for banks to use other means. In the past, it wasn't uncommon for banks to use security token backed 2FA either for all customers or for customers who chose the option, albeit generally with proprietary systems specific to the particularly bank (the devices may be somewhat universal but you generally can't use one for two banks or even for two bank accounts) from companies like VASCO [1], RSA Security etc. These devices generally had LCD screens sometimes with number pads which could be used for PIN protection or to generate a code linked to the transaction. Earlier versions of these devices often predated 2008. Nowadays banks are often moving away from such devices and instead using smart phone apps for their 2FA generally protected with a PIN or biometrics. Nil Einne (talk) 01:41, 4 April 2022 (UTC)
- Presume MFA is Multi-factor authentication, also 2FA for Two-factor authentication. A YubiKey appears to be some form of hardware dongle. SMS is normal phone text. -- SGBailey (talk) 06:13, 4 April 2022 (UTC)
- My wife was part of a study on two-factor authorization for her company, which was a hospital, not a bank. Yubikey was one of the products they checked and they found that customers were absolutely opposed to purchasing a Yubikey device to access their medical records. The lawyers questioned if it would be legal because there are access to health records laws and regulations that prohibit hospitals from making it difficult to access health records. With Yubikey, it was a cost that had to paid to a company that the customers did not know and did not trust for a device that the customers would not know how to use and would certainly lose very quickly. The comittee opted for two choices: Zenkey and SMS. Both only require a cell phone. Zenkey was developed as a joint effort by the cell phone companies in the United States and is very good at identifying a specific cell phone, not just a phone claiming to have ownership of a certain phone number. After multiple rounds of legal questions and customer surveys, they went with SMS messaging. The reality is that anything other than SMS messaging is perceived as an insurmountable hurdle and the customers do not believe that every SMS message is hacked all of the time. So, the risk is minimal. Similarly, I worked with Piggly Wiggly on a system to replace physical loyalty cards with a fingerprint scanner. It is very rare for people to lose their fingers, so it is very secure and easy. Just scan your thumb at checkout and you get all your rewards. Customers found it very scary that Piggly Wiggly was scanning fingerprints. Were they sending all that data to law enforcement so they could track criminals? Was the FBI using it to track people? Legal also questioned the legality of using biometrics, even with customer consent. So, that entire project failed and, in the end, Piggly Wiggly went bankrupt. I believe that both of these examples show that the general public does not see a security threat in the current system and there are many legal issues to consider. In reality, the only problem is that SMS databases are not required to be encrypted and SMS transmissions are not required to be encrypted. They can be. Many years ago, I worked on a contract for Verizon. They were encrypting the SMS database and if the phone accepted it (basically, if it was not an Apple phone), they encrypted the SMS communication to the phone. They could have turned off encryption between then and now, but the point is that they have the technology and they can turn it on. If SMS is encrypted in transmission and at rest, the entire SMS security argument falls apart. 97.82.165.112 (talk) 12:21, 4 April 2022 (UTC)
- It's not clear to me how your SMS encryption system works. If it requires the end user to remove a password or keep a key then I guess this might mostly prevent compromise without user error but seems to significantly affect user acceptance. However if it's on the side of the providers, it wouldn't seem to prevent SMS compromise. AFAIK, the most common method to do so is by tricking the provider into authorising a SIM swap for the number, whether with the same provider or even with another provider via number portability (but I think this is less common since it generally means you are effectively even if indirectly dealing with two providers). See e.g. [2] [3] [4] [5] [6] The SMSes may encrypted but they're still heading to a device controlled by an attacker. Nil Einne (talk) 12:55, 4 April 2022 (UTC
- I was not discussing SIM cloning or swapping. I was discussing the two arguments that I far more often hear. First, there is the claim that the SMS database on the provider's end is not encrypted. So, all you have to is get into their computer network and you can open the database and see every SMS message. Second, there is the claim that SMS is sent plain-text over the air. So, all you need is an antenna and you can read every SMS message in your area. Encryption solves both of those problems, even if they are not real problems founded on actual practice. 97.82.165.112 (talk) 13:34, 4 April 2022 (UTC)
- While I can't speak for the OP, when I hear informed people concerned about SMS security or say we should abandon SMS because of the security risks, it's more commonly about real world problems, rather than mostly theoretical ones. E.g. this blog post from Microsoft [7] which got a lot of attention [8] does mention in the clear issues indeed sorta before other issues, which IMO is overprioritising them, however it doesn't seem to suggest they're the main concern. Nil Einne (talk) 13:49, 4 April 2022 (UTC)
- I can only speak for my provider, Verizon. If anyone, including myself, were to attempt to transfer my number to another SIM, it would require that person to login to my account using a PIN sent via SMS to my phone. Then, once logged in, the person has to get another PIN from the website. Then, the person has to give that new PIN to the agent doing the transfer. It is not automated. It is done manually. Finally, once that is all completed, the original phone receives one last SMS message stating that the number has been transferred and then the transfer takes place. I will receive an email telling me about it and I will receive a letter in the mail explaining what happened. The only way to shortcut any of it is to purchase a phone directly from Verizon through my account. Then, they know the SIM of the new phone and are expecting a request to transfer the number. In theory, someone could steal my phone, hack my email, and get all my credentials to login to my account so they can do the transfer to another phone. But, it would be much easier to try and get me to hand over my bank account details so they can simply submit a draft to my account. 97.82.165.112 (talk) 14:12, 5 April 2022 (UTC)
- While I can't speak for the OP, when I hear informed people concerned about SMS security or say we should abandon SMS because of the security risks, it's more commonly about real world problems, rather than mostly theoretical ones. E.g. this blog post from Microsoft [7] which got a lot of attention [8] does mention in the clear issues indeed sorta before other issues, which IMO is overprioritising them, however it doesn't seem to suggest they're the main concern. Nil Einne (talk) 13:49, 4 April 2022 (UTC)
(EC) I'd note though that although there is a lot of concern over SMS compromise, I'm not actually sure it's as big a deal as the OP thinks for bank security. The first article I linked which while only talking about SIM swaps, mentions rapid growth but we're only talking about $68 million and 1600 customers. These are cases reported to the FBI and the real numbers are likely a lot higher. Still I wonder how large that is compared to other methods like especially social engineering victims. This may entail tricking a victim into installing malware on their devices, using a reverse proxy or even approving transfers themselves. And malware may also be installed without social engineering with software bugs.
Note that as some of the sources say, SMS is particularly vulnerable to malware because viewing and mirroring SMS is something most devices allow with appropriate permissions. By comparison, app security is generally higher, since modern smart phone OSes often allow the app to prevent any sort of screen mirroring or screenshotting with no possible override. "Rooted" phones can generally override such restrictions, one reason smart phone apps often try to disallow people using them on rooted phones. But they're not perfect and some phones may be rooted even without user input. And even if you need user input, if you can trick someone into installing malware, you may be able to trick them into rooting the phone although it's probably a fair amount less likely. If you app isn't compromised (directly or via the OS being compromised), you may also require the user to approve the specific transfer, so reverse proxying probably won't work without heavy social engineering. And likewise I'm assuming it increases the chance social engineering attempts will fail e.g. with a refund scam and similar. (Proper SMS systems help too since they also should tell the customer what the code is for, however as mentioned malware generally negates this. And I expect it's easy to distract a victim into not noticing what the SMS said than it is to get them to approve a transfer on the app.)
I'm not that familiar with how Yubikeys works but I assume it provides limited protection against well implemented reverse proxying. It may offer greater protection against malware, at the very least perhaps only being workable when the user is using the Yubikey device. The bank security tokens are similar although key pad ones can provide greater protection. Notably even with reverse proxying or malware, the customer may need to be making a transfer for you to have any chance of compromising it, or successfully socially engineering the customer into doing something which isn't normal. On the first point, if the bank only asks for you to generate a code based on a number they provide than you can potentially use any transfer to fool the customer. However I'm fairly sure I remember one system which required you to enter the last X digits of the bank account. With such a system you either need to be lucky enough to have an account with matching digits to one a customer is making or use social engineering.
It's perhaps worth noting that while a lot of fraud happens, banks do spent a fair amount trying to prevent it and have their own internal systems to try and detect it that go beyond 2FA. I don't know about legal issues, but do think user acceptance is a big factor why they're not likely to abandon SMS. However I doubt they're hiding the risks, indeed they may talk about them when you ask you to consider security tokens or apps. And getting back to my first point, it seems easily possible that for banks, while SMS security is a concern, it's only a small one compared to all the other risks.
Nil Einne (talk) 13:43, 4 April 2022 (UTC)
- OTOH based on [9], at least on bank in NZ still accepts card based 2FA..... Nil Einne (talk) 10:15, 5 April 2022 (UTC)
- I was not discussing SIM cloning or swapping. I was discussing the two arguments that I far more often hear. First, there is the claim that the SMS database on the provider's end is not encrypted. So, all you have to is get into their computer network and you can open the database and see every SMS message. Second, there is the claim that SMS is sent plain-text over the air. So, all you need is an antenna and you can read every SMS message in your area. Encryption solves both of those problems, even if they are not real problems founded on actual practice. 97.82.165.112 (talk) 13:34, 4 April 2022 (UTC)
- It's not clear to me how your SMS encryption system works. If it requires the end user to remove a password or keep a key then I guess this might mostly prevent compromise without user error but seems to significantly affect user acceptance. However if it's on the side of the providers, it wouldn't seem to prevent SMS compromise. AFAIK, the most common method to do so is by tricking the provider into authorising a SIM swap for the number, whether with the same provider or even with another provider via number portability (but I think this is less common since it generally means you are effectively even if indirectly dealing with two providers). See e.g. [2] [3] [4] [5] [6] The SMSes may encrypted but they're still heading to a device controlled by an attacker. Nil Einne (talk) 12:55, 4 April 2022 (UTC
April 5
ionice and drop permissions
What's the proper way to start a process ionice'd as realtime but with the resulting process starting as a specific normal user instead of as root? 96.232.39.129 (talk) 00:39, 5 April 2022 (UTC)
- The
ionice
program affects scheduling of I/O in Linux. See the Linux General Commands Manual [10] . Philvoids (talk) 17:31, 5 April 2022 (UTC)- Where we read "Realtime [...] This scheduling class is not permitted for an ordinary (i.e., non-root) user." Card Zero (talk) 18:09, 5 April 2022 (UTC)
ionice -c1 su linus -c /bin/whoami
will run whoami
with real-time IO as user linus
LongHairedFop (talk) 18:36, 5 April 2022 (UTC)
- Exactly what I was looking for, thanks. 96.232.39.129 (talk) 10:31, 7 April 2022 (UTC)Resolved
April 6
Learn coding as a beginner
Not knowing JavaScript, how to handle api calls, create applications on GitHub, create bots, create Lua modules etc. puts an huge full stop over whatever cool ideas I have. Although, I sometimes read hundreds of codes and am able to understand the syntax, sometimes the specific things I wanna don't have an existing code in the entire project. Any place I can go and learn coding as an almost beginner, that guides me from the basics to the advanced level step by step? I really want to learn this thing. Thanks! ---CX Zoom(he/him) (let's talk|contribs) 14:36, 6 April 2022 (UTC)
- You could try some of the several Coding bootcamps, MOOCs, or books you could get your hand on. Try some books from a reputable publisher like O'Reilly Media, No Starch Press, Packt among others. There are also loads of material freely available on the web, many with dubious quality (incomplete, not consistent, typos, or plainly wrong).
- Your choice depends on how much time, physical presence and money you want to commit. And on your learning style.
- Whatever you decide to do, you'll have to sit in front of a computer and try to code whatever exercise you are given or problems you find interesting. Bumptump (talk) 22:20, 6 April 2022 (UTC)
- Since a lot of what people do with JavaScript is about Web stuff, background knowledge of that is also useful; this intro on Mozilla Developer Network looks promising. There's also some stuff at r/learnjavascript under "Resources" that looks good. I've seen people recommend JavaScript: The Good Parts by Douglas Crockford. --47.147.118.55 (talk) 04:12, 7 April 2022 (UTC)
- I guess I should stop for a minute before hitting "Submit"... Bots are not generally something that people write in JavaScript, because the language is not necessarily the most well-suited for them. You can make any programming language do anything with enough effort, but a good workman knows which tools are best for the job. An experienced programmer will generally have some familiarity with numerous programming languages. You do, however, need to start somewhere, and JavaScript is a pretty good "first language". But it's always been primarily designed for Web development, so don't be surprised that things that aren't Web development are more of a hassle in the language, and you are going to want to learn more than one language if you want to become a good all-around programmer. Lua is a completely different language that has nothing to do with JavaScript, though Lua is also a good, flexible, powerful language, designed with an eye towards being embedded in other programs. Lua wouldn't make a bad second language to learn. Python would be also be a good second or third choice. After that if you want to stretch your brain, might I suggest Forth or Scheme, to get a taste of different programming language paradigms and how differently one can think about software and software design. For Scheme, you can't go wrong giving the venerable SICP a whirl, with the text available for free, --47.147.118.55 (talk) 04:27, 7 April 2022 (UTC)
I'd suggest first developing some fluency with code by writing some simple interactive text apps (maybe games) that don't do a lot of graphics, dependencies, API calls, etc. Then you will have better footing for dealing with the other stuff. Python is considered a good first language these days. I don't like Javascript very much for that purpose. Web searching "Python for beginners" finds lots of intro tutorials.
Being able to code is like speaking a natural language (e.g. Italian) or playing a musical instrument. It's more a matter of practice and developing your instincts, than of knowledge per se. Intricacies of API's and tool chains OTOH are more like studying chemistry in a book written in Italian. That is more about knowledge. It helps to have some basic footing in the language before working on more knowledge-intensive stuff. 2602:24A:DE47:B8E0:1B43:29FD:A863:33CA (talk) 21:03, 7 April 2022 (UTC)
- There are at least two skills involved. One is a sufficient knowledge of some programming language (or perhaps machine code), which includes the syntax (how do you combine symbols into something your computer will accept?) and semantics (and then, what does it do?). But there is another, language-independent skill: the ability to analyze a problem and to decompose it in smaller and smaller problems, until they can be directly addressed with the available tools. Here is a relatively simple problem: given two sequences of characters a and b, determine whether a is a subsequence of b. For example, "bad" is a subsequence of "inebriated". It is conceivable that someone is fluent in Python yet at a loss when asked to write a program for this task. Now a concrete suggestion. The book Bite-Size Python: An Introduction to Python Programming is intended to be accessible for children, so it does not require any prior knowledge. The user reviews are generally positive; 98% rate this 4 or 5 stars out of 5. While written for kids, one reviewer gushes, "This book is PERFECT for all ages." Another writes, "Very useful introduction to Python, which is aimed at children but would be equally good for any adult looking at programming in Python for the first time." (I have no interest in pushing this particular text, and have not examined it in any detail.) --Lambiam 16:42, 9 April 2022 (UTC)
April 7
Reprogramming a keyboard key
I am running a desktop PC with Win7 with Excel 2003.
I would like to be able to type "Alt-Enter" with a single key press, and would be happy if that could be assigned to the numeric enter key - either only within Excel or, FWIW, within all programs on the PC. I would like to keep the Alpha Return key as the normal Return key.
Is this possible, and if so HOW?
Thanks -- SGBailey (talk) 10:43, 7 April 2022 (UTC)
- In general, I'd use Microsoft PowerToys for remapping the keys. In your case, since you are using Windows 7, which is not longer supported, I don't know if this would help. You could also consider upgrading from Win7 to Windows 10, if your PC can put up with it. It should be possible to do this for free, but I do not believe you can upgrade Office 2003 to a higher version for free. Bumptump (talk) 18:22, 7 April 2022 (UTC)
- The other option is AutoHotkey, which lets you do all kinds of fancy stuff. Also re: Office, you can try Libreoffice as an alternative to paying for a current version of Microsoft Office. --47.147.118.55 (talk) 22:39, 7 April 2022 (UTC)
- AutoHotKey appears to work. I created a script with NumpadEnter::!Enter (plus all their default stuff) and it seems to work. Thank you all. -- SGBailey (talk) 07:42, 8 April 2022 (UTC)
April 8
April 9
How can you attach a lanyard to a smartphone?
I remember old-ish phones had a notch with a bar where you could thread a loop and connect it to a lanyard. Then came the phones with a removable cover, where you inserted a kind of thin film inside the phone and closed the cover. This provided an attachment point for the loop for the lanyard.
Nowadays smartphone manufacturers somehow design their products in a way that you cannot easily attach a lanyard to them. It looks almost as if they wanted us to drop and break our phones.
Besides cumbersome solutions like putting the phone in a case or pouch, how can I add some sort of minimalist ring to hang the phone? Would some strap+glue be enough?--Bumptump (talk) 00:52, 9 April 2022 (UTC)
How to expose an entire category tree in MediaWiki?
In MediaWiki 1.36.1 I use Extension:CategoryTree to view all categories in a tree fashion.
I can expose the entire tree by clicking the vertical arrow button representing each collapsed entry but I seek an automatic way to show everything.
What would be a JavaScript way to do so?
Things I've tried and failed:
document.querySelectorAll(".CategoryTreeToggle").forEach( (element)=>{
element.setAttribute('data-ct-state', 'expanded');
element.style.display = "block";
});
document.querySelectorAll(".CategoryTreeToggle").forEach( (element)=>{
if (element.hasAttribute('data-ct-state', 'collapsed') ) {
element.click();
}
});
Thanks, 79.180.118.152 (talk) 10:57, 9 April 2022 (UTC)
- You can look into the mediawiki code that actually does this. Ruslik_Zero 18:04, 9 April 2022 (UTC)
- I don't mean to change the JavaScript currently used by the community. Just to act on the output in the personal level. 79.180.118.152 (talk) 18:18, 9 April 2022 (UTC)
PAL and NTSC
Does PAL and NTSC have to do with the DVD/Blu-ray player or television? 86.143.101.46 (talk) 21:48, 9 April 2022 (UTC)