These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Code tags - 't was about time! *smile*

First post
Author
Hel O'Ween
Men On A Mission
#1 - 2014-10-22 16:53:40 UTC
Just noticed that the forum finally has ...


Code Tags


Thanks a lot, CCP!

But "lesser than" et al still not allowed, not even within code tags ... What?

EVEWalletAware - an offline wallet manager.

Daimian Mercer
Deep Core Mining Inc.
Caldari State
#2 - 2014-10-22 21:42:00 UTC
Nice!

Thanks web dev team! Big smile

Creator of Tripwire mapping tool - EVE-O thread

Twitter | daimian.mercer@gmail.com

Grauth Thorner
Vicious Trading Company
#3 - 2014-10-23 09:30:58 UTC
Yeah! No more 'replace x with y' kind of stuff! =)

View real-time damage statistics in-game

>EVE Live DPS Graph application forum thread

>iciclesoft.com

CCP FoxFour
C C P
C C P Alliance
#4 - 2014-10-23 13:18:11 UTC
Poked the web guys about the < and > tags and they said hopefully for phase 2, but not for phase 1 of the forum work.

@CCP_FoxFour // Technical Designer // Team Tech Co

Third-party developer? Check out the official developers site for dev blogs, resources, and more.

Bienator II
madmen of the skies
#5 - 2014-10-23 15:26:37 UTC
My Raven was equipped with the following:

HIGH
06 x Cruise Missile Launcher I
01 x SMALL TRACTOR BEAM 1
01 x SALVAGER I

MEDIUM
04 x LARGE SHIELD EXTENDERS
01 x 'HYPHNOS' ECM
01 x MEDIUM SHIELD BOOSTER

LOW
01 x EMERGENCY DAMAGE CONTROL
01 x ARMOR KINETIC HARDENER I
01 x ARMOR THREMIC HARDENER I
02 x WARP CORE STABILIZER I

DRONES
02 x WARRIOR I DRONES
03 x HAMMERHEAD I DRONES

UPGRADES
01 x ROCKET FUEL CACHE PARTINTION I
01 x BAY LOADING ACCELERATOR I
01 x HYDRAULIC BAY THRUSTER I

how to fix eve: 1) remove ECM 2) rename dampeners to ECM 3) add new anti-drone ewar for caldari 4) give offgrid boosters ongrid combat value

Althalus Stenory
Flying Blacksmiths
#6 - 2014-10-23 22:25:03 UTC
Finally !

Thanks CCP :D

EsiPy - Python 2.7 / 3.3+ Swagger Client based on pyswagger for ESI

CCP Nullarbor
C C P
C C P Alliance
#7 - 2014-10-24 10:52:27 UTC
Huzzah Bear


def fib(n,a=1,b=1): # computes the nth Fibonacci number.
    if n > 0:
        f = fib
        globals()["fib"] = lambda a,b=1,n=1: f(a --- 1,n -- 0,b -- n)
        return fib(n,a,b) # recursion 101
    else:
        return a -- -- -- b # use -- operator extra times for more power

CCP Nullarbor // Senior Engineer // Team Game of Drones

Hel O'Ween
Men On A Mission
#8 - 2014-10-25 12:35:37 UTC  |  Edited by: Hel O'Ween
CCP Nullarbor wrote:
Huzzah Bear


def fib(n,a=1,b=1): # computes the nth Fibonacci number.
    if n > 0:
        f = fib
        globals()["fib"] = lambda a,b=1,n=1: f(a --- 1,n -- 0,b -- n)
        return fib(n,a,b) # recursion 101
    else:
        return a -- -- -- b # use -- operator extra times for more power



Are you going to tell me with that posting that lesser than et al do work in code tags now? ... brb, testing ...

Local i As DWORD

Do While i < 10
   StdOut Format$(i), Format$(Fib(i))
   Incr i
Loop

Function Fib(ByVal n As QUAD) As QUAD
    If (n <= 2) Then
        Fib = 1
    Else
        Fib = Fib(n - 1) + Fib(n - 2)
    End If
End Function

... re ... there isn't a smiley available with a big enough grin o represent my pleasure right now!

Thanks a lot, much appreciated!

EVEWalletAware - an offline wallet manager.

Grauth Thorner
Vicious Trading Company
#9 - 2014-10-25 15:25:59 UTC
Only thing that can't be done now is html, and with that xml and possibly more languages with the same construction. But at least it's a step in the right direction, and using spaces will work:

< eveOverview >
    < globalSettings >
        < columns/ >
        < useSmallColorTags value="0"/ >
        < applyOnlyToShips value="0"/ >
        < hideCorpTicker value="0"/ >
        < overviewBroadcastsToTop value="1"/ >
        < shipLabels >
            < label >
                < part name="pre" value="&lt;color=0xffa3ff00&gt;&lt;fontsize=12&gt;"/ >
                < part name="state" value="1"/ >
                < part name="type" value="None"/ >
                < part name="post" value=""/ >
            < /label >
        < /shipLabels >
    < /globalSettings >
    < filteredStates/ >
    < ewarFilters/ >
< /eveOverview >

View real-time damage statistics in-game

>EVE Live DPS Graph application forum thread

>iciclesoft.com

Jack Tronic
borkedLabs
#10 - 2014-10-25 18:06:07 UTC
Now it just needs is syntax highlighting via a pretty popular and standard js library:

https://highlightjs.org/

and it's set.
CCP Avalon
C C P
C C P Alliance
#11 - 2014-10-29 16:48:31 UTC  |  Edited by: CCP Avalon
Did you know that the code tags won't expand forever? They bring scroll bars to those that enjoy longer code bits.

Example:

// Long function, it's long.
Long function () {
    is long function is long function is long function is long function is long function is long function is long function is long function is long function is long function is long function is long function
}

struct group_info init_groups = { .usage = ATOMIC_INIT(2) };

struct group_info *groups_alloc(int gidsetsize){

    struct group_info *group_info;

    int nblocks;

    int i;



    nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;

    /* Make sure we always allocate at least one indirect block pointer */

    nblocks = nblocks ? : 1;

    group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER);

    if (!group_info)

        return NULL;

    group_info->ngroups = gidsetsize;

    group_info->nblocks = nblocks;

    atomic_set(&group_info->usage, 1);



    if (gidsetsize <= NGROUPS_SMALL)

        group_info->blocks[0] = group_info->small_block;

    else {

        for (i = 0; i < nblocks; i++) {

            gid_t *b;

            b = (void *)__get_free_page(GFP_USER);

            if (!b)

                goto out_undo_partial_alloc;

            group_info->blocks[i] = b;

        }

    }

    return group_info;



out_undo_partial_alloc:

    while (--i >= 0) {

        free_page((unsigned long)group_info->blocks[i]);

    }

    kfree(group_info);

    return NULL;

}



EXPORT_SYMBOL(groups_alloc);

CCP Avalon // Web Developer // Team Webster // @ccp_avalon

Twitch: CCP_Avalon

Nathan Shavit
Shavit Risk Management
#12 - 2014-10-29 18:03:36 UTC

public class ThankYou {
   public static void main(String[] args) {
       System.out.println("Thank you CCP!");
   }
}

There is no problem an air strike cannot solve.

Nicen Jehr
Subsidy H.R.S.
Xagenic Freymvork
#13 - 2014-10-29 18:16:32 UTC  |  Edited by: Nicen Jehr
Nicen Jehr wrote:

Expanding on this, different players may like to be able to re-organize the ships market hierarchy according to 'Races' or 'Roles'.

This is what the market browse hierarchy should look like IMO:

[_] Amarr
[_] Caldari
[X] Gallente
[X] Minmatar
[_] Other
Ships
--Frigates
----Standard Frigates
------Attack (2 hidden)
--------Atron
--------Slasher
------Combat (4 hidden)
--------Breacher
--------Incursus
--------Rifter
--------Tristan

You could also put the faction's icon next to the ship names.

[strikethrough]You could also allow [code] tags on forums so the above looks monospaced and pretty![/strikethrough]
Yongtau Naskingar
Yongtau Naskingar Corporation
#14 - 2014-10-30 08:16:23 UTC
+++++++++++ number of digits to output
> #1
+ initial number
>>>> #5
++++++++++++++++++++++++++++++++++++++++++++ (comma)
> #6
++++++++++++++++++++++++++++++++ (space)
<<<<<< #0
[
  > #1
  copy #1 to #7
  [>>>>>>+>+<<<<<<<-]>>>>>>>[<<<<<<<+>>>>>>>-]

  <
  divide #7 by 10 (begins in #7)
  [
    >
    ++++++++++  set the divisor #8
    [
      subtract from the dividend and divisor
      -<-
      if dividend reaches zero break out
        copy dividend to #9
        [>>+>+<<<-]>>>[<<<+>>>-]
        set #10
        +
        if #9 clear #10
        <[>[-]<[-]]
        if #10 move remaining divisor to #11
        >[<<[>>>+<<<-]>>[-]]
      jump back to #8 (divisor possition)
      <<
    ]
    if #11 is empty (no remainder) increment the quotient #12
    >>> #11
    copy to #13
    [>>+>+<<<-]>>>[<<<+>>>-]
    set #14
    +
    if #13 clear #14
    <[>[-]<[-]]
    if #14 increment quotient
    >[<<+>>[-]]
    <<<<<<< #7
  ]

  quotient is in #12 and remainder is in #11
  >>>>> #12
  if #12 output value plus offset to ascii 0
  [++++++++++++++++++++++++++++++++++++++++++++++++.[-]]
  subtract #11 from 10
  ++++++++++  #12 is now 10
  < #11
  [->-<]
  > #12
  output #12 even if it's zero
  ++++++++++++++++++++++++++++++++++++++++++++++++.[-]
  <<<<<<<<<<< #1

  check for final number
  copy #0 to #3
  <[>>>+>+<<<<-]>>>>[<<<<+>>>>-]
  <- #3
  if #3 output (comma) and (space)
  [>>.>.<<<[-]]
  << #1

  [>>+>+<<<-]>>>[<<<+>>>-]<<[<+>-]>[<+>-]<<<-
]


+++++++++++
>+>>>>++++++++++++++++++++++++++++++++++++++++++++
>++++++++++++++++++++++++++++++++<<<<<<[>[>>>>>>+>
+<<<<<<<-]>>>>>>>[<<<<<<<+>>>>>>>-]<[>++++++++++[-
<-[>>+>+<<<-]>>>[<<<+>>>-]+<[>[-]<[-]]>[<<[>>>+<<<
-]>>[-]]<<]>>>[>>+>+<<<-]>>>[<<<+>>>-]+<[>[-]<[-]]
>[<<+>>[-]]<<<<<<<]>>>>>[+++++++++++++++++++++++++
+++++++++++++++++++++++.[-]]++++++++++<[->-<]>++++
++++++++++++++++++++++++++++++++++++++++++++.[-]<<
<<<<<<<<<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-]<-[>>.>.<<<
[-]]<<[>>+>+<<<-]>>>[<<<+>>>-]<<[<+>-]>[<+>-]<<<-]


It can do brainfuck now \o/