Comment by TerranRich on How can I indicate to screen readers which of a...
Don't you think it might be confusing for a blind user, for example, hearing "easy moderate difficult selected"? Isn't there something...more that I can do?
View ArticleComment by TerranRich on How can I indicate to screen readers which of a...
Would this be preferable over using aria-hidden="true" on the other two options instead?
View ArticleComment by TerranRich on Drupal 8 installation setup shows older PHP version...
Weird, that shows PHP Version 7.1.14-1+ubuntu16.04.1+deb.sury.org+1. So, how do I get rid of older versions so that this doesn't happen?
View ArticleComment by TerranRich on Drupal 8 installation setup shows older PHP version...
I don't have cPanel. I just have Apache and the command line interface. So, by "change some config files", what exactly do you mean?
View ArticleComment by TerranRich on Writing a loop that increments by a value other than...
This is my preferred method, because not only is it simple, but it doesn't involve the alteration/creation of any new variables, just to do the math. It just checks the result of a simple operation....
View ArticleComment by TerranRich on How would I add my own blurb to text that users copy...
Thank you! Yes, this is what I was looking for. Sometimes I struggle to find just the right search term(s) to find what I need.
View ArticleComment by TerranRich on How to add extra info to copied web text
@vsync I believe this just adds functionality just before the copying takes place (which is done by the system when the user initiates it).
View ArticleComment by TerranRich on How do I pass an HTML `data-` string attribute into...
Since that is true, @JamesCoyle, I guess all I can hope for is a SASS function/mixin that takes in a string, and call it with each color name. E.g. @include generate-bg-color('brown');, etc.
View ArticleComment by TerranRich on In VS Code, is there a way to open all files that...
Don't know why this is chosen as the selected answer, as the Source Control section in VSCode does not specifically have a place that shows all files with merge conflicts.
View ArticleComment by TerranRich on Mautic APIs Basic Authentication is returning code 0...
Did you ever resolve this? I'm experiencing this issue currently.
View ArticleComment by TerranRich on Send custom e-mail with special properties from...
Sorry, but I don't see sendToContact() being used in your second example. "So you have to call it like this" implies that we are calling the function defined above.
View ArticleComment by TerranRich on Postman (getpostman.com) - nested array
Also, for anybody coming across this answer years later like I did: Postman does not like single-quotes around JSON variable names, only double-quotes!
View ArticleComment by TerranRich on list every font a user's browser can display
This should be the accepted answer to this question. I'm building a simple notepad web app and this is a great solution for displaying fonts that a user can select for the text edit area. +1
View ArticleNested SQL, finding which forums have posts of a certain type
I have a SQL statement that I'm trying to run, but it's throwing an error:SELECT fp.forum_id, COUNT(fp.forum_id) AS num_postsFROM forums_posts fpGROUP BY fp.forum_idWHERE ( SELECT COUNT(p.post_id) AS...
View ArticleAnswer by TerranRich for Inserting multiple elements into another element in...
Here is one solution I thought of a few minutes after posting the question:[title_elem, days_of_week_elem, ...].each(function(obj){ calendar_elem.insert({ bottom: obj });});But I was hoping for a...
View ArticleInserting multiple elements into another element in PrototypeJS?
In PrototypeJS, is there a more efficient way to insert multiple Element objects into an element? Here is the code I have now:var calendar_elem = new Element('div', {'id': 'my_calendar'}).insert({...
View ArticleRegular Expression Negative Lookahead/Lookbehind to Exclude HTML from...
I have a feature on my site where search results have the search query highlighted in results. However, some of the fields that the site searched through has HTML in it. For example, let's say I had a...
View ArticleJOINing tables while ignoring duplicates
So, let's say I have a hash/relational table that connects users, teams a user can join, and challenges in which teams participate (teams_users_challenges), as well as a table that stores entered data...
View ArticleWhere could I find a complete Zen Cart reference for getting item and...
I've been searching everywhere and there seems to be very little about Zen Cart... at least anything much deeper than "install and go". I'm skinning (templating) a Zen Cart store, but the design I want...
View ArticleLimiting Parallel/Simultaneous Downloads - How to know if download was...
I have a simple file upload service, written out in PHP, which also includes a script that controls download speeds by sending limited-sized packets when a user requests a download from this site.I...
View ArticleWhat is the best way to store the data for a Mahjong tile set?
I am planning a kids' version of Mahjong Solitaire (starting with just the Turtle board layout and working my way from there). I am trying to wrap my head around how to store the data for each layer of...
View ArticlePersistent login using cookies and session variables
I've been researching the best (and safest) ways to implement persistent logins on my website, and I've come up with the following:When a user logs in, a cookie is created containing the user's...
View ArticleAnswer by TerranRich for How to search mulitple value seperated by commas in...
Use the FIND_IN_SET MySQL string function, like so:SELECT * FROM searchTest WHERE FIND_IN_SET('test2', keyword) > 0
View ArticleINSERT a row only if @@hostname equals a certain value
Is it possible to use a WHERE clause somehow (or any other way) in an INSERT query so it only works if the @@hostname variable is a certain value? For example:INSERT INTO table_name (field_1,...
View ArticleWhat is the most logical way to store the relationships between wrestlers,...
Necessary Background InfoI know the title is specific to my project, so allow me to explain the background of my problem.I run a website that stores and displays entrance theme listings for various...
View ArticleHow to create a magic square in PHP?
I'd like to try my hand at creating a Magic Square in PHP (i.e. a grid of numbers that all add up to the same value), but I really don't know where to start. I know of the many methods that create...
View ArticleHow do I refer to a child class variable from an inherited parent class...
Say I have two classes:class ParentClass{ public function getSomething() { return $this->variable_name; }}class ChildClass extends ParentClass{ private $variable_name = 'something specific to child...
View ArticleHow do I cancel a file upload started by ajaxSubmit() in jQuery?
I have code similar to the following:UploadWidget.prototype.setup_form_handling = function() { var _upload_widget = this; $('form#uploader') .unbind('trigger-submit-form') // This might be our...
View ArticleHow do I account for daylight savings time when retrieving current time in PHP?
When getting the time via PHP script (time()), during Daylight Savings Time it seems to return a time value that is one hour off. Is there any way to get the correct time, accounting for Daylight...
View ArticleJavaScript atan2() function not giving expected results
Normally, polar coordinates go from 0 to π to 2π (just before 2π really, as it equals 0 again). However, when using the JavaScript atan2() function, I'm getting a different, weird range:Cartesian X |...
View ArticleAnswer by TerranRich for How do you remove older multiples of PHP installed...
Here's how I did it, after the very helpful comments from apokryfos and Jeffwa above:sudo a2dismod php7.0sudo a2enmod php7.1service apache2 restartAnd that seemed to work! Thanks all.
View ArticleHow do you remove older multiples of PHP installed in Apache?
I am trying to run Drupal 8 on one of my servers, but during the in-browser installation of Drupal it's giving me a different PHP version (7.0.23) than when I run php -v on the command line...
View ArticleIs it possible to place the entirety of jQuery into a new variable?
I have a website where we load jQuery 3.2.1. In order for one of our widgets to work (provided by a third-party company), it requires jQuery 1.11.0, which is loaded in a separate <script> tag by...
View ArticleHow can I use Amazon's API in PHP to search for books? [closed]
I'm working on a Facebook app for book sharing, reviewing, and recommendations. I've scoured the web, searched Google using every search phrase I could think of, but I could not find any tutorials on...
View ArticleHow can I indicate to screen readers which of a series of words is the...
On a web page, I have a bit of text indicating the level of difficulty of something. Among the choices are easy, moderate, and difficult.It is displayed like so:The indicated difficulty level is...
View ArticleAnswer by TerranRich for Drupal 8 installation setup shows older PHP version...
So I figured it out:Runing sudo a2dismod php7.1 then sudo a2enmod php7.2 seems to work perfectly (after a restart of Apache).
View ArticleHow would I add my own blurb to text that users copy and paste from my website?
For example, when I select a block of text from a lyrics website (MetroLyrics), then paste it somewhere else, there is a blurb of text added that advertises the website I copied the text from:Hast du...
View ArticleAnswer by TerranRich for How do I pass an HTML `data-` string attribute into...
For anyone else who happens across this question, here is how I ended up resolving my issue.Instead of relying on data- attributes, I just relied on class names instead. Whenever I want an element with...
View ArticleWhat's the best way to simulate a DOS or Terminal screen in a web page?
I'm finding this hard to even conceptualize. The easy way would be to have a large textarea element taking up most of the screen, with a small text input element below it. The player would type in...
View ArticleHow would I find all sets of N single-digit, non-repeating numbers that add...
Let's say I want to find all sets of 5 single-digit, non-repeating numbers that add up to 30... I'd end up with [9,8,7,5,1], [9,8,7,4,2], [9,8,6,4,3], [9,8,6,5,2], [9,7,6,5,3], and [8,7,6,5,4]. Each of...
View ArticleHow do I store content in Drupal 9 about wrestlers and their entrance themes...
I am building a site in Drupal 9 that will, ideally, list the entrance themes of professional wrestlers. I am having trouble figuring out the architecture of such a site given the following...
View Article