PHP INTRO, debugging, html quotes, closing tags, security

December 12, 2012

updated 2014-07-25 PHP is perhaps the most widely-used general-purpose scripting language*, especially suited for Web development. It is, in fact, the programming component of the "LAMP" environment: Linux, Apache, MySql, Php. PHP is surprisingly more popular than Microsoft’s own ASP web scripting language! PHP runs lot faster than ASP on MS Windows and has more features and functionalities than Microsoft ASP. PHP is much...

Read more »

Cannot Uninstall Old Moodle (1.x to 2.6) Themes (unsupported)

February 22, 2017
Cannot Uninstall Old Moodle (1.x to 2.6) Themes (unsupported)

Cannot delete old themes! (in moodle 2.8 and beyond) Cannot uninstall Disabled themes! We deleted the theme folders from the {moodle}/themes/ folder years ago but despite every attempt to "uninstall" them, they still show up in the plugins overview list. error: core_plugin/err_uninstalling_unknown_plugin Of course, you have to turn on...

Read more »

if chrome or Firefox will not save id’s and passwords

December 29, 2016

"help: I tell chrome to save my password but it does not do it" It offers the option to do it but then, it does not. (since it offers to do it, the browser settings are certainly proper) There are some, not all, websites were Chrome, or Firefox, will...

Read more »

MySQL Debug: How to log all queries of an event

December 6, 2016

updated 12-14-2016 MySQL – DEBUG example: You are running a software package – which hides its queries so far down in so many included and-or overriding class-function (php?) files it is not worth any more effort trying to find the right one(s). The easiest method to find all the...

Read more »

How to create bootable USB’s in Fedora and boot them

November 15, 2016

how to create and use bootable USB flash chips. I have read to use the "disks" utility but I would always get an error when trying to boot the chip after creating it that way. "The best tool to create a Fedora USB stick is the Fedora Media Writer...

Read more »

Space bar not working in Fedora, keyboard hesitating

November 15, 2016

I just installed Fedora 24 on a new pc (Alienware) and with installing additional software and enhancing settings, I unexpectedly discovered that the space bar was no longer working. With checking, I discovered that the shift-spacebar did work, but that was all. I put the keyboard on another computer...

Read more »

Introduction to DNS

June 27, 2016

Domain Name (website name) A domain name is the human-friendly name that we are used to associating with an internet resource (website). For instance, "google.com" is a domain name. The URL "google.com" is associated with the servers owned by Google Inc. The domain name system allows us to reach...

Read more »

mysql: how to update replace all, case insensitive, text substrings

May 6, 2016

in this select statement, SELECT pageid, title, SUBSTRING(contents, POSITION("one two three" IN contents) -0, 13) AS pageContents FROM pagetable WHERE contents LIKE '%one two three%' ; ‘%one two three%’ is case insensitive however, the Position function used to display just that part of "contents" (as pageContents) IS case sensitive...

Read more »

how to switch from default FTP port in linux

April 20, 2016

updated 2016-07-26 how to change the FTP port (21) in Linux The default port for FTP is # 21. Don’t use FTP.   (use SFTP) It sends usernames and passwords in the clear, which isn’t secure. Instead, look at SFTP which uses the SSH protocol or vsFTPd (Very Secure...

Read more »

Sizing Images for Computers and Phones

November 18, 2015

Responsive Web Design – Images. One solution is to use the max-width property example: max-width: 100%; height: auto;   background images If the background-size property is set to "contain", the background image will scale, and try to fit the content area, and the image will keep its aspect ratio....

Read more »

how to force mobile phones into landscape mode

August 31, 2015

updated 2015-09-23 How to force horizontal or landscape layout on mobile devices How to force a mobile device into landscape-horizontal mode or view all without javascript. add this to your style sheet .css #container { display:block; } @media only screen and (orientation:portrait){ #container { height: 100vw; -webkit-transform: rotate(90deg); -moz-transform:...

Read more »

PHP: Deleting Files

July 14, 2015

To delete all files of a particular extension, or in fact, delete a group with any wildcard, echo `rm -f path/to/*.jpg`; # note the backquotes, not single nor double quotes or foreach (glob("*.jpg") as $filename) { echo "$filename size " . filesize($filename) . "\n"; unlink($filename); } sometimes, the function...

Read more »

GeForce vs. Radeon Graphics cards on Fedora 17-22

June 13, 2015

Updated 2015-09-23 NVIDIA GeForce GTX vs. AMD Radeon graphics cards. Fedora 17 to 22 I was running Fedora 17 until this year. In 2012 (F17 released May 2012) I custom-built a new pc and included a graphics card GeForce GTX 660 – which did speed up my pc significantly....

Read more »

Goodbye Flash plug-in!

December 5, 2014

updated 2016-09-11 by PAUL WAGENSEIL Jun 17, 2016 You Should Disable Adobe Flash Player Now: Here’s How a large chunk of the malware attacking web browsers worldwide is dependent on Flash Player flaws. – tomsguide.com/us/disable-flash-how-to,news-21335.html … the Flash plugin is entirely unnecessary nowadays and serves only as a ...

Read more »

moodle 2 & 3: exclude my-moodle from admin

November 16, 2014

updated 2017-02-04 How to exclude admin, administrators, from the my-moodle dashboard The moodle Administrator is no longer excluded from the my-moodle module. Starting with moodle 2.0, if we activate the my-moodle front page for students, administrators get thrown into it also upon logging in. in ~/moodle199/index.php you could turn...

Read more »

moodle database access functions

July 21, 2014

Access denied One of the dramatic proofs that OOP is NOT an improvement. In fact OOP programming is at least 3 times more expensive, time consuming, than structured programming. It is a step backward. If you try to use a standard php – mysql function call, you get "Access...

Read more »

TAKE jpg webcam PHOTO with HTML5

July 5, 2014
TAKE jpg webcam PHOTO with HTML5

updated 2016-03-03 How to take-upload your visitors webcam photo How to upload a jpg photo on your website with your visitors webcam html5 webcam getUserMedia examples and demo How to take a jpg webcam photo with html5 One of the really cool things that has come from HTML5 is...

Read more »

moodle: A query to see where lessons come from

June 18, 2014

updated 2016-12-08 to see where-how the modules for each "Topic" are stored and kept in order SELECT cs.id, cs.course, cs.section, cs.sequence, cm.id AS cm_id, cm.module, cm.instance FROM mdl_course_sections AS cs JOIN mdl_course_modules AS cm ON FIND_IN_SET(cm.id, cs.sequence) WHERE cs.course = 40 AND cs.sequence '' AND cs.visible = 1 AND...

Read more »

how to add and edit reports in zencart

May 16, 2014

updated 2014-06-21 How To Create Your Own Reports in ZenCart I have done google searches on how to create my own reports in zencart and searches on how to edit the reports that are there and got no worthwhile information. There is a plugin zencart offers under "Admin Tools",...

Read more »

MySQL: Some complex syntax

February 17, 2014

updated 2016-10-17 note: "Using comma separated lists in a database field is an anti-pattern and should be avoided at all costs." "properly normalize the table structure" "I strongly advise that you fix your current database structure so you are not storing the data in a comma separated list." –...

Read more »

Moodle: config.php, for debugging and flexible control

December 13, 2013

If you do not hard-code anything that is not necessary, you can avoid having multiple copies of files. If you have a test copy of moodle in a different folder (ex: mdl-test), add an if statement to handle it. if (stripos(dirname(__file__), 'mdl-test') ) {$CFG->dbname = 'mdl_backup'; } else {$CFG->dbname...

Read more »

Moodle: State required identity questions for on-line classes

November 24, 2013
Moodle: State required identity questions for on-line classes

U.S. State required security-identity questions for approval of online ‘certificated’ classes. State requirement for proof of identity while taking online classes State required proof of identity in an online classroom A few years ago, several states, including Nevada, Idaho, Florida and, N.Carolina, passed into law the additional, on-line education,...

Read more »