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 »

how to create and run a remote gnome (X11) session on one fedora-centos-redhat pc from another

July 27, 2016

on the remote server, make sure x11vnc is installed: yum install x11vnc log across to remote server with “-Y” to create the .Xauthority file: $ ssh -Y root@111.112.113.114 root@111.112.113.114's password: Last login: Tue Jul 26 16:42:35 2016 from 21.22.23.24.cableone.net /usr/bin/xauth: creating new authority file /root/.Xauthority [05:36:10 root@server2...

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-08-04 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.x: exclude my-moodle from admin

November 16, 2014

How to exclude admin, administrators, from my-moodle The moodle Administrator is no longer excluded from the my-moodle module. there was a “my moodle” exception for the admin in moodle before version 2. in ~/moodle199/index.php you could turn on “MyMoodle” for users and there was an exception for administrators, that...

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 2014-07-18, 2014-10-10 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...

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

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.” from www.stackoverflow.com If...

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 »

How to easily Set Up your Fedora-Linux Home Network

May 19, 2013
How to easily Set Up your Fedora-Linux Home Network

updated 2015-09-20 How To copy and share files between Fedora computers and share a printer How to set up a home network on Fedora 15, 16, 17, 18, 19, 20, 21, 22 (or Ubuntu 9.10 to 11+) with a router. (At the begining of this article, I was still...

Read more »

Flash takes over your camera and microphone and writes permanent cookies!

May 4, 2013

REMOVE FLASH! Flash takes control of your webcam and mike. without permission! Web sites advertisers can now silently access your camera and/or microphone and write up to 13 copies of a new type of cookie that was quietly introduced “last year” = 2009. It’s officially called the Local Shared...

Read more »

basic loops in PHP

February 10, 2013

Loops execute a block of code a specified number of times, or while a specified condition is true. for for ($i = 1; $i $mon) { echo $key . ” – ” . $mon . ““; } output: 0 – January 1 – February … 11 – December $characters...

Read more »

Dual desktop computer monitors in Fedora 17+…F22+…

February 5, 2013
Dual desktop computer monitors in Fedora 17+…F22+…

updated 07-20-2016 How to set up dual or triple desktop computer monitors in Fedora 17+ Go to “System Settings” >> Display . . . to see-arrange your monitors. My laptop handled 2 monitors with only a hassle of being only able to put the external monitor on the right...

Read more »