Available MyCodes
#1
Spoiler

A spoiler to hide text, images or videos inside.

Usage

Code:
[spoiler]Content here[/spoiler]


Result

Spoiler: show
Content here


Unix

Looks like you're in a classic Unix/Linux terminal with green text.

Usage

Code:
[unix]Content here[/unix]


Result

Terminal

Content here



Header h1 to h6

Proper formatted headers h1 to h6 as you know them from HTML.

Usage

Code:
1
2
3
4
5
6
[h1]Content[/h1]
[h2]Content[/h2]
[h3]Content[/h3]
[h4]Content[/h4]
[h5]Content[/h5]
[h6]Content[/h6]


Result

Content


Content


Content


Content


Content

Content



Mention Users

Tag users in posts and shoutbox shouts to get their attention. Tagged users will receive an alert (if they have alerts for mentions enabled).

Usage

Code:
@username 
or @"complex username" 
or @`username`
or @'username'


Result

The tagged user will receive an alert and the tagged name will be linked to the users profile with their rank color/style.

Like: @Hidden Refuge

#2

Syntax Highlighting



C

Code:
[c]Code ...[/c]


Example:

C Code
1
2
3
4
5
6
7
/* C Program to print a sentence. */
#include <stdio.h>
int main()
{
   printf("C Programming"); /* printf() prints the content inside quotation */
   return 0;
}


C++/C#

Code:
[cpp]Code ...[/cpp]


Example:

C++ Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// AddTwoNumbers.cc
// Computes the sum of two numbers inputed at the keyboard.

#include <iostream>
using namespace std;

int main()
{
  int a, b, total ;
   
   cout << "Input numbers to be added: " << endl;
   cin >> a >> b ;
   total = a + b ;
   cout << "The sum is " << total << endl;
   return 0;
}



Java

Code:
[java]Code ...[/java]


Example:

Java Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class FindEvenOrOddNumber {
 
        public static void main(String[] args) {
               
                //create an array of 10 numbers
                int[] numbers = new int[]{1,2,3,4,5,6,7,8,9,10};
               
                for(int i=0; i < numbers.length; i++){
                       
                        /*
                         * use modulus operator to check if the number is even or odd. 
                         * If we divide any number by 2 and reminder is 0 then the number is
                         * even, otherwise it is odd.
                         */
                         
                         if(numbers[i]%2 == 0)
                                System.out.println(numbers[i] + " is even number.");
                         else
                                System.out.println(numbers[i] + " is odd number.");
                               
                }
               
        }
}



Javascript

Code:
[js]Code ...[/js]


Example:

Javascript Code
document.getElementById("demo").innerHTML = "Hello Dolly.";



Batch/Shell Script

Code:
[bat]Code ...[/bat]


Example:

Batch Script
@echo off
REM Next command opens Microsoft Word
start /d "C:\Program Files\Microsoft Word" WINWORD.EXE



SQL

Code:
[sql]Code ...[/sql]


Example:

SQL Code
CREATE TABLE example_timestamp (
         id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
         data VARCHAR(100),
         cur_timestamp TIMESTAMP(8)
);



Visual Basic

Code:
[vb]Code ...[/vb]


Example:

Visual Basic Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Function calMax(x, y, z As Variant)

If x > y And x > z Then

calMax = Str(x)
ElseIf y > x And y > z Then
calMax = Str(y)
ElseIf z > x And z > y Then

calMax = Str(z)

End If

End Function

Private Sub Command1_Click()
Dim a, b, c
a = Val(Txt_Num1.Text)
b = Val(Txt_Num2.Text)
c = Val(Txt_Num3.Text)

Lbl_Display.Caption = calMax(a, b, c)

End Sub

Private Sub Label5_Click()

End Sub



HTML

Code:
[html]Code ...[/html]


Example:

HTML Code
1
2
3
4
5
6
7
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>



PHP

Code:
[php]Code ...[/php]


Example:

PHP Code:
<?php if (isset($gender) && $gender=="female") echo "checked";?>



XML

Code:
[xml]Code ...[/xml]


Example:

XML Code
1
2
3
4
5
6
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>



INI

Code:
[ini]Code ...[/ini]


Example:

INI
[special_fields] 
required = "email,realname,Mesg" 
csvfile = "contacts.csv" 
csvcolumns = "email,realname,Mesg,Date,Time"





Users browsing this thread: 1 Guest(s)

Switch to mobile version

Sponsors: Ftpit - ZXPlay - GalaxyHostPlus - Verelox- HostUS - HostMada - Host4Fun - Evolution-Host - NodeBlade - HostDare - VPSMost


BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo