Recent Updates Page 2 Toggle Comment Threads | Keyboard Shortcuts

  • Christofian 11:02 pm on January 21, 2012 Permalink
    Tags: , google docs,   

    Google can create equations easily. Use this url:,s,FFFFFF00&chco=000000&chl=\frac{5}{10}*2x^3y^2

    replace the get variable chl with your equation. To create fractions include this: \frac{firstnumber}{secnumber} There’s probably more.

    Found by publishing a google doc with an equation in it, and getting the url of the image that contained the equation in the published google doc.

  • Christofian 4:09 am on January 13, 2012 Permalink
    Tags: ,   

    Don’t like google’s personalized results being the default selection? Just add this qet variable to the url:

  • Christofian 9:09 pm on January 2, 2012 Permalink
    Tags: How to handel multiple items in forms (such as multiple email addresses)

  • Christofian 6:12 pm on December 31, 2011 Permalink

    Foreach and arrays 

    I had a mysql query, and I needed to store the data for later. So, I:

    1.created an array

    $array = array();

    2. as I looped through the mysql data, I added that data to the array

    $array[] = $mysqldata;

    3. I then later used a foreach to loop through the array:

    foreach($array  as $data) { //this code looped through $array, and each time it get's data from the array it assignes it to $data
    echo $data;

    Bonus: foreaching through two arrays:

    foreach(array_combine($array, $array1)  as $data => $data1) {
    echo $data;
    echo $data1;

    Extra Bonus: foreaching with three arrays:

    foreach (array_map(NULL, $array1, $array2, $array3) as $x) {
      list($array1, $array2, $array3) = $x;
    echo $array1;
    echo $array2;
    echo $array3;
  • Christofian 12:54 am on December 31, 2011 Permalink

    Get Post Count Of WP_Query 

    $the_query_new = new WP_Query(array('post_type' => 'grade', 'assignment' => $theassignmentID));
    $points3 = $the_query_new->found_posts;

    create a new wp_query, then do


    That will give you the number of posts that the wp_query finds.

  • Christofian 1:23 am on December 30, 2011 Permalink

    To “sort” dates in php, see here:

    Use strtotime ( to convert 06-07-2012 to a unix time format that php can sort.

    Update: difference between mm-dd and dd-mm:

  • Christofian 10:09 pm on December 29, 2011 Permalink
    Tags: javascript

    How to draw a line between two divs.

  • Christofian 10:06 pm on December 28, 2011 Permalink

    this is pretty cool:

    echo "hi";
    echo "hey"; // */

    Now, I can quickly comment and comment that line of code by removing the topmost /*. See here

    echo "hi";
    echo "hey"; // */
  • Christofian 3:44 pm on December 28, 2011 Permalink
    Tags: ,

    viewforum.php & viewtopic.php

    Find: page_header
    Edit the line so it looks like: page_header($topic_data[’topic_title’]);


    Edit the content of the title tags so it looks like: {PAGE_TITLE} @ {SITENAME}

  • Christofian 7:51 pm on December 27, 2011 Permalink

    PHPBB Popular Posts 

    This is an mysql query to get a list of the popular posts in phpbb. Created Because of

    Version #1

    SELECT * FROM `phpbb_topics` ORDER BY ABS( ( ( `phpbb_topics`.`topic_views` *-1 ) - (`phpbb_topics`.`topic_replies` *5 ) ) / ( `phpbb_topics`.`topic_time`) )

    NOTE: replace


    with your topics table.
    NOTE To WordPress.Com: You should make it so that the sourcecode shortcode supports mysql 🙂

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc