Howdy, Stranger!

We are about to switch to a new forum software. Until then we have removed the registration on this forum.

In this Discussion

How to format text and code on the new forum



  • edited July 2015
    if(stuff >= 42){
  • edited September 2015


            void setup(){
  • edited September 2015


        void setup(){
  • it might be worth a recap:

    leave a line above and below the code

    select it

    hit ctrl-o (or mac equivalent). this should shift everything right by 4 spaces.

    avoid /* */ comments, use /** */ instead

    split any urls in the code - "http://" + ""

    @ symbols are also troublesome.

  • Ctrl O works on the Mac. At least in Firefox

  • edited September 2015

    As I mentioned other times, in order to overcome the @ glitch,
    we can place a space between the symbol & its word: @ Override void exit() {}.
    An even better fix is replace @ w/ its corresponding HTML code@: @Override void exit() {}

  • Often in mac when said ctrl, users successfully "translates" it to command (apple key). Not in this case. It is ctrl that is to be pressed. (command - o is open anyway...).

  • edited September 2015

    Any regular PC user knows what is the CTRL key! ;))
    And being trapped in a walled Apple garden is no excuse not to know about that! [-(

  • (but i didn't know what the mac equiv of the PC's ctrl-o was. it might've been command-o, might've been control-o. probably expensive either way.)

  • That's what I meant, for any usual stuff, ctrl-o (open)/ ctrl-s (save) / ctrl-c (copy)... In a Mac you do command-o / command-s / command-c ...

    But not in the case of formatting text here... : -P

  •     void setup() {
          println("Hello, world!");
  •  void draw() {
       case 0:  drawScreenZero(); break;
         case 1:  drawScreenOne(); break;
          case 2:  drawScreenTwo(); break;
             default:  drawScreenZero();break;
            if(hasFinished()&&currentScreen<2) {

    ok just testing the format....

  • None of my code formats as code, so can smeone please fix it so the big C actually formats code?

  • Hm...?

    Insert code with multiple lines

    2 empty lines before and after the entire block

    Select / mark entire block (with mouse)

    Hit ctrl-o

    It's just important that every line has at least 4 spaces indent

  • edited November 2017

    @SemiProcess -- even if you can't highlight+CTRL+o, you can manually put four spaces in front of each code line. I'm going to type two ENTERs, then type four spaces -- that will make the next lines code:

    // two line breaks before the code starts
    // four spaces in front of each line
    if( spacesInFrontOfThisLine = 4 ){
      // indented lines have more than 4 spaces -- 6, 8, etc.
  • and the C works as long as you highlight the code before you press it

    // this
    // is 
    // a
    // test

    if it's a single line (or nothing) you'll get backticks, blocks of code get indented by 4 characters, which is correct.

  • (i find the ctrl-o easier than the C anyway because my hands are already on the keyboard)

  • edited January 2017
    boolean checkRow(int nY, int cN) {
      boolean bo = false;
      for (int c = 0; c < 9; c++) {
        //  println(c);
        bo = false;
        if (cN != num[nY][c]) {
          //   println(cN +"!="+ num[nY][c]);
          bo = true;
          return bo;
        } else {
          bo = false;
          return bo;

    this is a test ;)

  • edited January 2017


    Link : Google
  • Didn't work for me.

  • edited January 2017


  • `void setup() { fullScreen(); noStroke(); fill(0); }

    void draw() { background(204); if (mousePressed) { if (mouseX < width/2) { rect(0, 0, width/2, height); // Left } else { rect(width/2, 0, width/2, height); // Right } } }`

  • edited February 2017

    Test two.


  • edited February 2017


    Hi Blah
    hi bah
  • So tables don't work.

  • edited February 2017

    Try two

    Tables Are Cool
    col 3 is right-aligned $1600
    col 2 is centered $12
    zebra stripes are neat $1
  • Why don't tables work?!

    Anyone know how to make tables work??

  • edited February 2017


  • edited February 2017

    @Lord_of_the_Galaxy -- this Vanilla forum is rendering markdown tables correctly as HTML -- this is the rendered source of your table above:

      <th align="center">Are</th>
      <th align="right">Cool</th>
      <td>col 3 is</td>
      <td align="center">right-aligned</td>
      <td align="right">$1600</td>
      <td>col 2 is</td>
      <td align="center">centered</td>
      <td align="right">$12</td>
      <td>zebra stripes</td>
      <td align="center">are neat</td>
      <td align="right">$1</td>

    However, the CSS has stripped all styling from them -- no borders, spacing, etc. I think in order for comment tables to work visually, the forum would need to add defined styles for any table nested below a class="Message" or class="Comment".

  • You're right @jeremydouglass. I just hope they set that sometime though, tables would be useful sometimes.

  • Hi I'm about to post some code dealing with video libraries - I need to include some small video files. Is there a preferred hosing service for this forum? I'd like to avoid the issue of links dying when you look at older posts.

  • @chrios1001, If it's indeed small, post your whole code & data in a repo site like GitHub for example:

  • edited April 2017


  • edited November 2017


  • import gab.opencv.*;
    import org.opencv.core.Core;
    import org.opencv.imgproc.Imgproc;
    import org.opencv.core.Mat;
    import org.opencv.core.Point;
    import org.opencv.core.MatOfPoint2f;
    import org.opencv.core.CvType;
    import org.opencv.core.Size;
    import org.opencv.core.Scalar;
    import org.opencv.core.Rect;


  • void setup() {
Sign In or Register to comment.