collapse

* Recent Posts

"Christ Is King" by Altair
[Today at 01:09:34 am]


Re: Cill Shift Schedule by SunflowerP
[Yesterday at 11:04:57 pm]


Re: Stellar Bling: The Good, the Bad, the OMG! by SunflowerP
[March 21, 2024, 11:21:37 pm]


Re: Spring Has Sprung! 2024 Edition by SunflowerP
[March 21, 2024, 10:24:10 pm]


Stellar Bling: The Good, the Bad, the OMG! by Altair
[March 21, 2024, 02:52:34 pm]

Author Topic: Playing with BBCode a bit  (Read 3010 times)

SunflowerP

  • Host
  • *
  • Join Date: Jun 2011
  • Location: Calgary AB
  • Posts: 9909
  • Country: ca
  • Don't teach your grandmother to suck eggs!
    • View Profile
    • If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough
  • Religion: Eclectic religious Witchcraft
  • Preferred Pronouns: sie/hir/hirs/hirself
Playing with BBCode a bit
« on: May 29, 2016, 03:10:18 pm »
Code: [Select]
[URL=http://ecauldron.com/forum/forum.php]forum, forum[/URL]
I'm the AntiFa genderqueer commie eclectic wiccan Mod your alt-right bros warned you about.
I do so have a life; I just live part of it online!
“Selfishness is not living as one wishes to live, it is asking others to live as one wishes to live.” - Oscar Wilde
"Nobody's good at anything until they practice." - Brina (Yewberry)
My much-neglected blog "If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough"

SunflowerP

  • Host
  • *
  • Join Date: Jun 2011
  • Location: Calgary AB
  • Posts: 9909
  • Country: ca
  • Don't teach your grandmother to suck eggs!
    • View Profile
    • If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough
  • Religion: Eclectic religious Witchcraft
  • Preferred Pronouns: sie/hir/hirs/hirself
Re: Playing with BBCode a bit
« Reply #1 on: May 29, 2016, 03:13:36 pm »
Quote from: SunflowerP;192032


 
That did not do what I wanted it to do. Hmm.

[URL=http://ecauldron.com/forum/forum.php]woozle[/URL]

[SPECIAL]lalala[/SPECIAL]
I'm the AntiFa genderqueer commie eclectic wiccan Mod your alt-right bros warned you about.
I do so have a life; I just live part of it online!
“Selfishness is not living as one wishes to live, it is asking others to live as one wishes to live.” - Oscar Wilde
"Nobody's good at anything until they practice." - Brina (Yewberry)
My much-neglected blog "If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough"

SunflowerP

  • Host
  • *
  • Join Date: Jun 2011
  • Location: Calgary AB
  • Posts: 9909
  • Country: ca
  • Don't teach your grandmother to suck eggs!
    • View Profile
    • If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough
  • Religion: Eclectic religious Witchcraft
  • Preferred Pronouns: sie/hir/hirs/hirself
Re: Playing with BBCode a bit
« Reply #2 on: May 29, 2016, 03:15:10 pm »
Quote from: SunflowerP;192033
That did not do what I wanted it to do. Hmm.

[URL=http://ecauldron.com/forum/forum.php]woozle[/URL]

That one did, though, or near enough. Yay!
« Last Edit: May 29, 2016, 03:15:58 pm by SunflowerP »
I'm the AntiFa genderqueer commie eclectic wiccan Mod your alt-right bros warned you about.
I do so have a life; I just live part of it online!
“Selfishness is not living as one wishes to live, it is asking others to live as one wishes to live.” - Oscar Wilde
"Nobody's good at anything until they practice." - Brina (Yewberry)
My much-neglected blog "If You Ain't Makin' Waves, You Ain't Kickin' Hard Enough"

RandallS

  • Site Admin
  • *
  • Join Date: Jun 2011
  • Location: NE Ohio
  • Posts: 10311
  • Country: us
    • View Profile
  • Religion: Hellenic Pagan
Re: Playing with BBCode a bit
« Reply #3 on: June 03, 2016, 08:32:43 am »
Quote from: SunflowerP;192032
Code: [Select]
[URL=http://ecauldron.com/forum/forum.php]forum, forum[/URL]

the code bbcode is meant for displaying programming code in a box (that scrolls if the code is long).

Code: [Select]
#include
#include

int main()
{
    double a, b, c, determinant, root1,root2, realPart, imaginaryPart;

    printf("Enter coefficients a, b and c: ");
    scanf("%lf %lf %lf",&a, &b, &c);

    determinant = b*b-4*a*c;

    // condition for real and different roots
    if (determinant > 0)
    {
    // sqrt() function returns square root
        root1 = (-b+sqrt(determinant))/(2*a);
        root2 = (-b-sqrt(determinant))/(2*a);

        printf("root1 = %.2lf and root2 = %.2lf",root1 , root2);
    }

    //condition for real and equal roots
    else if (determinant == 0)
    {
        root1 = root2 = -b/(2*a);

        printf("root1 = root2 = %.2lf;", root1);
    }

    // If roots is not
    else
    {
        realPart = -b/(2*a);
        imaginaryPart = sqrt(-determinant)/(2*a);
        printf("root1 = %.2lf+%.2lfi and root2 = %.2f-%.2fi", realPart, imaginaryPart, realPart, imaginaryPart);
    }

    return 0;
}
Randall
RetroRoleplaying [Blog]: Microlite74/75/78/81, BX Advanced, and Other Old School Tabletop RPGs
Microlite20: Lots of Rules Lite Tabletop RPGs -- Many Free

RandallS

  • Site Admin
  • *
  • Join Date: Jun 2011
  • Location: NE Ohio
  • Posts: 10311
  • Country: us
    • View Profile
  • Religion: Hellenic Pagan
Re: Playing with BBCode a bit
« Reply #4 on: June 03, 2016, 08:36:14 am »
Quote from: SunflowerP;192034
That one did, though, or near enough. Yay!

And the php BBCode works like the code BBCode but is mean to display syntax-colored php code (including the HTML):


<html>
<
body>

<?
php
// This is a single-line comment

# This is also a single-line comment

/*
This is a multiple-lines comment block
that spans over multiple
lines
*/

// You can also use comments to leave out parts of a code line
$x /* + 15 */ 5;
echo 
$x;
?>

</body>
</html>

Randall
RetroRoleplaying [Blog]: Microlite74/75/78/81, BX Advanced, and Other Old School Tabletop RPGs
Microlite20: Lots of Rules Lite Tabletop RPGs -- Many Free

Tags:
 

* Who's Online

  • Dot Guests: 195
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Please Donate!

The Cauldron's server is expensive and requires monthly payments. Please become a Bronze, Silver or Gold Donor if you can. Donations are needed every month. Without member support, we can't afford the server.

* Shop & Support TC

The links below are affiliate links. When you click on one of these links you will go to the listed shopping site with The Cauldron's affiliate code. Any purchases you make during your visit will earn TC a tiny percentage of your purchase price at no extra cost to you.

* In Memoriam

Chavi (2006)
Elspeth (2010)
Marilyn (2013)

* Cauldron Staff

Host:
Sunflower

Message Board Staff
Board Coordinator:
Darkhawk

Assistant Board Coordinator:
Aster Breo

Senior Staff:
Aisling, Allaya, Jenett, Sefiru

Staff:
Ashmire, EclecticWheel, HarpingHawke, Kylara, PerditaPickle, rocquelaire

Discord Chat Staff
Chat Coordinator:
Morag

'Up All Night' Coordinator:
Altair

Cauldron Council:
Bob, Catja, Chatelaine, Emma-Eldritch, Fausta, Jubes, Kelly, LyricFox, Phouka, Sperran, Star, Steve, Tana

Site Administrator:
Randall

SimplePortal 2.3.6 © 2008-2014, SimplePortal