Logo: Multimusen

Multimusen

Tutorials: WordPress, PHP, database and Linux

Adminer – a lightweight alternative to PhpMyAdmin

June 30th, 2016 by

PhpMyAdmin is powerfull but the GUI is messy. Adminer is a lightweight alternative. You have to download the files and place them in your folder.


# sudo apt-get isntall adminer
# sudo ln -s /usr/share/adminer/ adminer

The first line will install the files. They are saved in /usr/share/adminer. Therefore we need a symbolic link to the folder, which is made in the second line of code.

SQL count(): The Most Popular Cake

May 20th, 2016 by

So how do yo find the most popular cake in the Shire Bakery? Here’s an idea.

PhpMyAdmin: the most popular caske

PhpMyAdmin: the most popular caske

-- Show the best cookie
-- See: Ben Forta Chap. 16
SELECT COUNT( cakes.cake ) AS 'popular', cakes.cake, costumers.who
FROM cakes, costumers, likes
-- sort out the cardinalities (relations)
WHERE cakes.cakes_id = likes.cakes_id
AND costumers.costumers_id = likes.costumers_id

-- group by the cake 
group by cakes.cake

-- and sort (most popular and downwards)
order by popular desc

SQL: Many-to-Many and One-to-Many

May 19th, 2016 by

Here’s a short tutorial on how to solve some basic SQL cardinalities. First have a look at the ER-diagram for the database and the resulting tables in PhpMyAdmin.

Many to many and one to many

Many to many and one to many

The ER-Diagram transformed to tables in PhpMyAdmin

The ER-Diagram transformed to tables in PhpMyAdmin

Many-to-Many

Many to many cardinalities may be solved like this:


SELECT cake, who
FROM cakes, costumers, likes
WHERE costumers.costumers_id = likes.costumers_id
AND cakes.cakes_id = likes.cakes_id

Note that there are two where clauses combined via AND.

One-to-Many

This cardinality is more easy:


SELECT inventory .* , costumers.who
FROM inventory, costumers
WHERE inventory.costumers_id = costumers.costumers_id

In the “many” table you simply connect via the “one” table’s id.

You can download and try out the samples from my Github Repository oneToMany_ManyToMany.

Read On

These samples are inspired by Ben Forta’s “MySQL Crash Course” Ch. 15 – 16.

p5.js

March 28th, 2016 by

The p5.js is a JavaScript implementation of the Java based Processing language used by many artists and programmers for crossplatform animations. Most of the things you can do in Processing is possible via p5.js. In order to use it in a WordPress production you must linkt to the script in the theme code. Alternatively you can use a plugin.

Another solution for WordPress is to use an iframe in code tags:


Here are many interesting samples, have a look.

Portfolio Lecture

March 11th, 2016 by

@ University of Regina March 11th 2016

Definition

An artist’s portfolio is an edited collection of their best artwork intended to showcase an artist’s style or method of work. A portfolio is used by artists to show employers their versatility by showing different samples of current work. Typically, the work reflects an artist’s best work or a depth in one specific area of work. (Wikipedia)

Definition Electronic portfolio

An electronic portfolio (also known as an eportfolio, e-portfolio, digital portfolio, or online portfolio)[1] is a collection of electronic evidence assembled and managed by a user, usually on the Web. Such electronic evidence may include inputted text, electronic files, images, multimedia, blog entries, and hyperlinks. E-portfolios are both demonstrations of the user’s abilities and platforms for self-expression, and, if they are online, they can be maintained dynamically over time. (wikipedia)

Smashing Magazine

Creative Bloq

Howto

WordPress

Jquery From Zero to Hero

February 26th, 2016 by

A four hour Jquery crash course from Microsoft.

Jquery first fiddle

February 25th, 2016 by

Here is a very, very short Jquery introduction on Jsfiddle.



After a while the document ready function becomes boring. However there is a shorthand version:

$(function() {
    // ... your code ...
});
© "The Maat Theme for WordPress" by Per Thykjær Jensen. The source code is copyrighted under the GPLv3 Licence. The content is licenced under Creative Commons: share alike, no commercial exploit.