Tag Archives: MAMP

PC Html/Doc to Pdf via Mac TextEdit Primer Tutorial

Found this tutorial very interesting. It can be wasteful to overlook simple things. Take, for example the humble Mac application called TextEdit. From now on, am going to call it “The Broker”. The reason is, it is a simple application probably intended as a Text Editor (but Apple calls it a Word Processor, and now understand them to be correct) by real trade (here my personal Mac favourite is TextWrangler), but over time being the Mac OS X flagship for flexibility, so over time … am guessing? … it has been given some really cute features. It reads *.htm* HTML files, it reads *.doc* Microsoft Word document files … not perfectly, for the more complicated scenarios but really very well for text items, for example. Well, that is good, but it also Exports PDF … so finally we have a tutorial about one of the big ticket protocol-type items of the net, the PDF file. We need Wikipedia while we take a bex! Portable Document Format (PDF) is a file format used to represent documents in a manner independent of application software, hardware, and operating systems.[1] Each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fonts, graphics, and other information needed to display it. In 1991, Adobe Systems co-founder John Warnock outlined a system called “Camelot”[2] that evolved into PDF. While Adobe Systems made the PDF specification available free of charge in 1993, PDF remained a proprietary format, controlled by Adobe, until it was officially released as an open standard on July 1, 2008, and published by the International Organization for Standardization as ISO 32000-1:2008.[3][4] In 2008, Adobe published a Public Patent License to ISO 32000-1 granting royalty-free rights for all patents owned by Adobe that are necessary to make, use, sell and distribute PDF compliant implementations.[5] Okay, today we do some imperfect conversions, warts and all, but you have to see how good using humble old TextEdit (free with a Mac laptop, for example) “The Broker” can be to write out some PDF, and so have another way in to useful (local MAMP web server (in the case of this tutorial, but the woorrrld is your oyster))) web work (because PDF=”useful web work” … it is well supported for web and mobile apps). The last slide of tutorial (and of picture above) sums up what this tutorial’s aim is: Overview (starting at PC): … Continue reading →

Posted in Data Integration, eLearning, Networking, Operating System, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , | 30 Comments

MySql Stored Procedures Primer Tutorial

Today’s tutorial follows up on phpMyAdmin interface to MySql and PHP Primer Tutorial in that we again use the brilliant phpMyAdmin to oversee the results of some PHP code which uses MySql calls to create tables called POINT and CIRCLE used to store information defining a circle, and then it creates three MySql stored procedures in the database to help add circle data with the single MySql statement that goes CALL AddCircle(x, y, radius); via the use of those stored procedures. Let’s see below what Wikipedia says about Stored Procedures generally. A stored procedure is a subroutine available to applications that access a relational database system. A stored procedure (sometimes called a proc, sproc, StoPro, StoredProc, sp or SP) is actually stored in the database data dictionary. Typical use for stored procedures include data validation (integrated into the database) or access control mechanisms. Furthermore, stored procedures can consolidate and centralize logic that was originally implemented in applications. Extensive or complex processing that requires execution of several SQL statements is moved into stored procedures, and all applications call the procedures. One can use nested stored procedures by executing one stored procedure from within another. Stored procedures are similar to user-defined functions (UDFs). The major difference is that UDFs can be used like any other expression within SQL statements, whereas stored procedures must be invoked using the CALL statement.[1] Here is some downloadable PHP programming source code which shows the results of the MySql SQL requests made and can be renamed to ourmysqlstoredprocedure.php as required. Here is some downloadable supervisory PHP programming source code which gathers the MySql SQL requests made and can be renamed to ourmysql_storedprocedure.php as required. If you want to develop your own live usage (have provided a live usage link here which will not work but you can use if you are a beginner, to get used to mysql errors, which will occur after you hit either button of the link (these errors indicate bad MySql connection details which are the same reason the database dropdown is not full of options), or you can use this link to see the raw MySql SQL involved in piecing this tutorial together) of these two PHP source codes then you could fix up the hard codings for MySql host/username/password up the top of ourmysql_storeprocedure.php (where you may notice that the default host in the code is localhost:8889 which is the default … Continue reading →

Posted in Database, eLearning, Tutorials | Tagged , , , , , , , | 1 Comment

PHP and MySql via MAMP Primer Tutorial

PHP is a server-side language hankering to do database and file management at the server? Unfortunately this can not be done with a handkerchief alone, as you will also need a database like MySql. What else is needed? A framework to act as a web server, and for our purposes on this tutorial, on a Mac laptop, we are going to use MAMP. So we will first show you the MAMP environment for PHP and MySql where we are talking about URLs like http://localhost:8888/ ( or http://127.0.0.1:8888/ ). Then we will show you a MySql database and table that we will access later via PHP. Then we will show you two simple PHP scripts to ask for requirements from the MySql database, and one to report on the results of running that SQL query on that MySql database. Grasp these concepts and a lot of functionality opens up. Imagine what you could do with Ajax techniques. Enjoy the tutorial. A great book for this subject is Professional PHP Programming by Jesus Castagnetto, Harish Rawat, Sascha Schumann, Chris Scollo, Deepak Veliath Link to downloadable source code of PHP above is ourmysql_test.php and ourmysqltest.php which you need to rename in order to try. Here is a lifesaver of a link, perhaps. If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , | 1 Comment

MAMP Mac Framework for PHP/MySql Tutorial

Transcript: Are you writing PHP with MySql bits, as well, maybe? I like your style! Do you have a testing environment, or do you load everything live straight away? For simple things, the latter is tempting, but it is not great, and for complex things it is definitely not a good idea. It is amazing what you forget to take into account that can be sorted out using a local webserver to test your code. For PC as far as local webservers go you have EasyPHP (which is great), Cassini or WAMP. For Mac, MAMP is great, and am going to show you bits of it below. These types of products are sometimes known as PHP Frameworks. MAMP has phpMyAdmin … need I advertise more?! Let’s go … we’ll start by looking for a place to download MAMP … and then skip to screens showing its features after you have installed it … the place where you should store your PHP is off the /Applications/MAMP/htdocs path (which equates to http://localhost:8888 (if 8888 is set as your port) … will show you a scenario of something I am working on now at the end … … stop press … MAMP PRO is not totally free software … but just plain MAMP is … have not seen the need to have MAMP PRO myself and just run MAMP myself … okay, let’s look at its features … good, huh … this is an example of how to use … If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , | Leave a comment