This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author awan < nawa (at) yahoo (dot) com > | |
* | |
*/ | |
/** | |
* Function to build SQL /Importing SQL DATA | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$regions = array( | |
'Africa' => DateTimeZone::AFRICA, | |
'America' => DateTimeZone::AMERICA, | |
'Antarctica' => DateTimeZone::ANTARCTICA, | |
'Asia' => DateTimeZone::ASIA, | |
'Atlantic' => DateTimeZone::ATLANTIC, | |
'Australia' => DateTimeZone::AUSTRALIA, | |
'Europe' => DateTimeZone::EUROPE, | |
'Indian' => DateTimeZone::INDIAN, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 20170805 Added a few lines to stop a Refresh of a page from showing errors. | |
* | |
* | |
* This is a PHP library that handles calling reCAPTCHA. | |
* - Documentation and latest version | |
* https://developers.google.com/recaptcha/docs/php | |
* - Get a reCAPTCHA API Key | |
* https://www.google.com/recaptcha/admin/create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ViewChild } from '@angular/core'; | |
import { App, Platform, AlertController } from 'ionic-angular'; | |
import { SplashScreen } from '@ionic-native/splash-screen'; | |
import { StatusBar } from '@ionic-native/status-bar'; | |
import { TabsPage } from '../pages/tabs/tabs'; | |
import { WelcomePage } from '../pages/welcome/welcome'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
@Component({ | |
template: `<ion-nav [root]="rootPage"></ion-nav>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will change a string of text link from (for example): | |
<a href="http://helloworld.com">Cool link</a> | |
to | |
helloworld.com | |
// Just exports the URL as text - with no link. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To process the following Billboard XML from the RCS Zetta radio playout system (as outputted through a MC v15 XML schema | |
using glue) in PHP, I do a conversion trick to make it actually usable in the XML processor. | |
Firstly, I pre-process all of the XML like this: | |
// dirty hack to fix the naming of xml fields. | |
$rawXML = str_replace("l:Link", "l_Link", $rawXML); | |
$rawXML = str_replace("s:Album", "s_Album", $rawXML); | |
$rawXML = str_replace("s:Song", "s_Song", $rawXML); | |
$rawXML = str_replace("t:Spot", "t_Spot", $rawXML); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Country Map Example</title> | |
</head> | |
<body> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/jquery-jvectormap.min.css" type="text/css"> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I added this suppliment to my configDB file, as it's included in every page that either logs in or requires a db connection. | |
/** | |
* A Compatibility library with PHP 5.5's simplified password hashing API. | |
* | |
* @author Anthony Ferrara <[email protected]> | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License | |
* @copyright 2012 The Authors | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Firstly, I didn’t create all of this. I’ve just making it easy to understand with a full example. | |
You can read more of it here, but only because of archive.org. https://web.archive.org/web/20160106095540/http://designaeon.com/2012/07/read-mp3-tags-without-downloading-it/ | |
To begin, download this library from here: http://getid3.sourceforge.net/ | |
When you open the zip folder, you’ll see ‘getid3’. Save that folder in to your working folder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finding the integer values of a plottable for ScottPlot when you know the name/label of it | |
// For use with https://github.com/swharden/ScottPlot | |
formsPlot1.plt.PlotVLine(label: "green", lineWidth: 3, x: position, draggable: true, dragLimitLower: 0, dragLimitUpper: Global.samples[filename_value]); | |
String plotname = ""; | |
int plottablescount = formsPlot1.plt.GetSettings(false).plottables.Count; | |
for (int i = 0; i < plottablescount; i++) |
OlderNewer