Posted on Leave a comment

CodeLobster Debugging in PHP

CodeLobster IDE
    Tools, Preferences
        Debuggers, PHP
            C:\Users\philh\Inet
            http://localhost/
            9003
            CLOBSTER
            x xDebug auto start
            Project URL: http://localhost/myapp/
            Project Home: http://localhost/myapp/
        PHP Settings
            Path to php.exe: C:\Xampp\php\

———— php.ini —————-
; add .. to path
include_path = “.;..;C:\xampp\php\PEAR;”

; CodeLobster IDE
[xdebug]
xdebug.remote_enable = 1;
zend_extension = “c:\Xampp\php\ext\php_xdebug.dll”; path to php_xdebug extension
xdebug.remote_host = localhost; 127.0.0.1 for some configuration
xdebug.remote_port = 9003;
xdebug.max_nesting_level = 256; required for some frameworks
xdebug.remote_handler = “dbgp”;
xdebug.remote_autostart = 1;
xdebug.mode = develop, debug, profile;

Posted on Leave a comment

Adding Custom Ringtone to Android Device

Start Audacity or other music editor, 
    select the right part of the song
    (part not in ringtone),
    Edit, Delete
Export as MP3 to a folder such as Music\RingTones

Copy mp3 files to phone
    Connect phone to computer with USB.
    Slide down on phone for notification to

        Android System - USB charging this device

    and change to file transfer.
    Explorer, This PC, select your android device
    Copy mp3 to Music folder on android.

    Settings
        Sound
            Phone Ringtone
                Scroll to bottom
                    +Add ringtone
                        navigate to Music and select

Posted on Leave a comment

Adding Custom Ringtone to iPhone

Start iTunes on PC
Find Song
right click, Select "Song Info"
Options, set start and stop
    0:00  0:08 or whatever

File (Menu)
    Convert - Create AAC Version
    A new file should appear below the original

File
    Show in Windows Explorer
        Change Extension to .m4r

        If no extension displayed
        change Explorer options to 
        display extensions.

    Right click the file and Select Copy
        (for later)

Connect iPhone with USB cable to computer.
On iPhone click "Trust" if that option is offered.

Back in iTunes, click on the phone icon at the top
    Might have to wait for icon to appear

Click on Tones at the bottom left
    Paste the .m4r files from copy above into the 
    Tones window.  (Ctrl-V)

    I had to wait awhile for
    iTunes to do some background bookkeeping
    before the paste worked.

Click Sync in the lower right of iTunes.  Then Done.
On the iPhone, go to Settings, Sounds.  The new
    sound is there at the top of the list.
Posted on Leave a comment

Steps to Create a Weaver Slider (Image Carousel)

Download the WordPress plugin “Weaver Show Sliders”.
Dashboard, Weaver Slider Post, New Slider Post
Media, select some images, click on “Create Gallery” (upper left), “Create a new Gallery” (lower right).
Set the columns, size. Set “media file” to show only images when clicked instead of embedded in a page. Insert into slider post with “Insert Gallery”.

Name the post and remember the name, say “Sun City Photos”. Push “Publish”.

Dashboard, Weaver Posts and Sliders Options, Sliders tab, “Enter name for new/duplicate slider”.
Enter a name: “Sun City Photos”. Push “Create New Slider”.
Scroll down to “Required Options”, “Slider Post Slug”, select “sun-city-photos”.
Save Slider Options.
In another page, use the “Add [show_slider]” button to select “Sun City Photos”.

Publish and view.  You should see an image carousel that slides automatically and has buttons to navigate.

Posted on Leave a comment

Song Transpose App for Windows

Use Transpose to transpose and format song files written in plain text format with an editor such as Notepad. You can create HTML or RTF (Word) format files with options for font size, single or double columns, chord names in bold print, and extra line space between lines. It is assumed that lines of chord names are above lines of lyrics. E.g.,

|D      Bm     |Em      A#7  A7 | 
At last,            my love has 

Here’s the website with more info and download.

Song Transpose

Posted on Leave a comment

WordPress Child Themes

To avoid editing theme files, you can create a child theme very easily. Here’s an example using the Weaver Xtreme theme. Create wp-content/themes/weaver-xtreme-child/ and files style.css and functions.php.

1) wp-content/themes/weaver-xtreme-child/style.css
2) wp-content/themes/weaver-xtreme-child/functions.php

Start style.css with the following header modified to match your situation.

/*
 Theme Name: Weaver Xtreme Child
 Theme URI: http://fordwebtech.com/blog/wp-content/themes/weaver-xtreme-child/
 Description: Weaver Xtreme Child Theme
 Author: Phil Ford
 Author URI: http://fordwebtech.com/blog
 Template: weaver-xtreme
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain: weaver-xtreme-child
 */

Add custom css and php functions to the two files. Finally, activate the new Weaver Xtreme child theme which will now show up in the main dashboard theme picker.

 

Posted on Leave a comment

Max Buttons for WordPress

Here’s a nice button for WordPress using the Max Button plugin…

Max Button

[maxbutt*n name="MaxButton"]

Use the “MaxButtons” menu item in the dashboard to access the control panel. Define buttons with lots of options including the link URL. Give it a name (e.g., “MaxButton” above) and place it in posts or pages with the short code. The text “maxbutt*n” is really maxbutton, but changed so as not to trigger the short code in this post.

Posted on Leave a comment

Installing Apache and PHP

Download Apache from ApacheLounge

http://www.apachelounge.com/download/
httpd-2.2.24-win32.zip
Install in C:/Apache/
Select CGI mode during install

Apache running PHP as CGI (vs module)
httpd.conf

<Directory “c:/php”>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

AddType application/x-httpd-php .php
ScriptAlias /php/ “c:/php/”
Action application/x-httpd-php “/php/php-cgi.exe”

DirectoryIndex index.php index.html index.htm default.htm

http://php.net/downloads.php

PHP 5.3.26
http://windows.php.net/download/#php-5.3
VC9 x86 Non Thread Safe (for IIS) – “Installer”
php-5.3.26-nts-Win32-VC9-x86.msi
VC9 x86 Thread Safe (for Apache as CGI)
php-5.3.26-Win32-VC9-x86.msi
Install in C:/PHP/

PHP.INI

[Zend]
zend_extension=”c:\php\ext\php_xdebug.dll”
xdebug.remote_enable = on
[xdebug]
zend_extension=”c:\php\ext\php_xdebug.dll”
xdebug.remote_enable=On
xdebug.profiler_enable=0ff

include_path = “.;c:/inet/htdocs/Wwb/aShare”

http://xdebug.org/download.php

XDebug 2.1.1 PHP 5.3 VC9 TS (32 bit) (for Apache)
XDebug 2.1.1 PHP 5.3 VC9 (32 bit) (for IIS)

Posted on Leave a comment

C# Programming Notes

Microsoft Visual Studio 2012

View the UI Form Designer

View, Solution Explorer
Right-click on Form class (“Form1.cs”)
Select “View Designer”

If error prevents display, close designer window with error message,
reopen (see above)

Add new class

Project, Add Class

Add general purpose classes from other projects

File, Add, New Project (or Existing Project) e.g., \C#l\Utility1

Add various cs files to that project, one for each class
e.g., Reg.cs, CString.cs, Trial.cs

Solution Explorer

References, Right click, “Add Reference”
Solutions, Project, select the new project (.csproj)

pass by reference

add “ref” to both caller and method
mymethod(ref string istr) { …
x.mymethod(ref mystr);

Make classes public unless they’re only support for other classes in assembly (“internal”)

Override and virtual

mark methods to override as “virtual” and subclassed methods “override”