Code and Examples to accompany my answers and questions on the StackOverflow website.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Code and examples to go with my answers and questions on the stackoverflow website.

Currently I have several answers where I use code examples. In some cases a live version is profided using jsfiddle or ideone, etc, but I thought it might be a good idea to have all of this information together in one place as well.

<script src=""></script> <script src=""></script> <script> /* var sUrl = ''; // @TODO: The location.hash needs to be checked to see if another file has been asked for. $.get(sUrl, function(p_sResult) { var sHtml; // Clicks on any link to local/relative markdown files need to be // caught and handled through AJAX, also the location.hash should be // updated to reflect this. sHtml = marked(p_sResult); $('.container').html(sHtml); }); */ addMenu(); // For this specific purpose things could be taken even further than this... // // Any code block that use PHP could be caught and posted to the IDEone // API and the result could be added to the page. Or we could run the // script locally, save the output, commit that to the repo and use that // to display with the answer... // // For graphviz examples we could also use /* Retrieve a list of available answers */ function addMenu() { function foo(p_sCallback) { $.getJSON('' , function(p_oResponse, p_sStatus, p_oXHR) { $.getJSON('' + p_oResponse[0].object.sha , function(p_oResponse, p_sStatus, p_oXHR) { $.each(p_oResponse.tree, function(p_i, p_oTree){ if(p_oTree.type === 'tree') { p_sCallback(p_oTree.path); } }); } ); } ); } $('.container').append($('

Available Answers

')); var $List = $('.container').append($('
    ')); foo(function(p_sPath){ if (p_sPath.indexOf('question.') === 0) { var sContent = '
  • ' + p_sPath+ '<\/a><\/li>' $List.append(sContent); } }); }; </script>