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
<? | |
/* | |
* | |
* | |
* ----- Please note, my syntax is constantly evolving as I type this out | |
* ----- This really is a 10% done thing, in it's conception. | |
* ----- By the time you're reading this, i've probably changed | |
* ----- around the code a bit, but it should give you a general | |
*- ---- idea |
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
<button class="replybutton" data-origional="123" data-parent="123">Reply</button> | |
<script> | |
$('.replybutton').on('click', function(){ | |
$(this).addClass('loading'); // a class that adds a no-repeat right-aligned background of a spinning giff... give it some padding so it appears 'in the button'. | |
if ($(this).is(":visible")) { | |
$("#post" + $(this).data("parent")).slideUp(); | |
} else { | |
$("#post" + $(this).data("parent")).hide(); | |
$("#post" + $(this).data("parent")).load("/reply?parentPost=" + $(this).data("parent") + "&originalPost=" + $(this).data("origional"), function () { |
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 | |
//////////////////////////////////// | |
// This is my answer to the following | |
// http://skilleo.me/challenge/2 | |
// | |
// | |
// Seems to crash it out =/ | |
//////////////////////////////////// |
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 | |
// | |
// | |
// http://skilleo.me/challenge/6 | |
// | |
// | |
function textAnalytics($a) { | |
/* Create the code to gather the text analytics here. */ | |
$return = ""; | |
// Number of words ----- Need to take one away for some reason, your counter is wrong. |
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 is extremely useful, I have a suggestion to get around the wp_site and wp_home situation though.... you can define that in your config. | |
define('WP_HOME', 'http://'.$_SERVER['SERVER_NAME']); | |
define('WP_SITEURL', 'http://'.$_SERVER['SERVER_NAME']); | |
?> |
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
<? | |
define('WP_HOME', 'http://'.$_SERVER['SERVER_NAME']); | |
define('WP_SITEURL', 'http://'.$_SERVER['SERVER_NAME']); | |
?> |
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 | |
$expectedTimeField = md5($_SESSION['captcha_field']."_timer"); | |
if ( | |
empty($_POST[$expectedTimeField]) // Timer field doesn't exist, fake it. | |
|| !is_numeric($_POST[$expectedTimeField]) // Timer is non-numeric, JS didn't exec, fake it. | |
|| ($_SESSION['captcha_time'] + 3000) < (time() + date("Z", time()) ) // They took less than 3 seconds, fake it. | |
) { |
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
$(".date_form").change(function() { | |
var year = $("#year").val(); | |
var month = $("#month").val(); | |
var day = $("#day").val(); | |
var birth_date = new Date(year, month, day); | |
var birth_year = birth_date.getFullYear(); | |
var birth_month = month; | |
var birth_day = day; | |
var baby_number = 0; |
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 | |
// IF you want it to include the days, follow the logic. | |
$time = "1:66"; | |
$timeArray = explode($time, ":"); | |
if (count($timeArray) == 3) { // there is something like "5:12:23"; | |
$seconds = ($timeArray[0] * 60 * 60) + ($timeArray[1] * 60) + $timeArray[2]; | |
} elseif(count($timeArray) == 2) { // there is something like "15:60"; | |
$seconds = ($timeArray[0] * 60) + $timeArray[1]; |
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 | |
class introduction extends CI_Controller | |
{ | |
var $data = []; | |
private function __construct() | |
{ | |
parent::__construct(); |
OlderNewer