Code Monkey home page Code Monkey logo

stackoverflow's Introduction

permalink
/

StackOverflow

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="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="https://rawgithub.com/chjj/marked/master/lib/marked.js"></script> <script> /* var sUrl = 'readme.md'; // @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 http://oodavid.com/gviz/ /* Retrieve a list of available answers */ function addMenu() { function foo(p_sCallback) { $.getJSON('https://api.github.com/repos/potherca-blog/StackOverflow/git/refs/heads' , function(p_oResponse, p_sStatus, p_oXHR) { $.getJSON('https://api.github.com/repos/potherca-blog/StackOverflow/git/trees/' + 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>
  • Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.