Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Code Formatting Expand / Collapse
Author
Message
Posted Tuesday, March 17, 2009 11:12 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 4:55 PM
Points: 31,278, Visits: 15,736
New code formatting has been released on SSC. Please feel free to check it out and comment.

Use the [ code ][ /code ] shortcuts to the right for enclosing code items.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #677710
Posted Tuesday, March 17, 2009 11:18 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, November 17, 2014 12:50 PM
Points: 13,872, Visits: 9,598
It seems to be dropping blank lines in the format. Maybe I'm doing something wrong, but it seems to be doing so.

Line one, followed by a blank line

Line two

That has a blank line between the two, in the edit screen. Makes it a bit harder to view longer code pieces.

I like the line-wrap though! Very cool! No more left-right scroll because someone had a piece of code 10000-characters wide!


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #677718
Posted Tuesday, March 17, 2009 12:15 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, October 16, 2014 5:52 AM
Points: 2,551, Visits: 2,594
I really loved the colored output, it makes real easy to read the code. But there seems to be some problem with the text "ADD" as it adds itself twice to the output (i.e. "ADDADD" is being shown, 1 with blue color and other with pink color).

ALTER TABLE [dbo].[type_of_fraud] 
ADD [matchfile_autoload] char(01) NOT NULL
CONSTRAINT DF_No_matchfile_autoload DEFAULT('N')

Edit:
And also, it would be better if you can make the font size same as the normal text.


--Ramesh

Post #677781
Posted Tuesday, March 17, 2009 1:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 6, 2014 1:00 PM
Points: 5,333, Visits: 25,277
Steve
A great improvement ..... for posting as well as reading what code others have posted.



If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #677820
Posted Tuesday, March 17, 2009 1:35 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:42 PM
Points: 10,340, Visits: 13,341
Definitely an improvement. I haven't seen the issues mentioned yet though. This has been a light day for me posting code. I've mainly added links.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #677831
Posted Wednesday, March 18, 2009 6:16 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, October 20, 2014 5:17 AM
Points: 1,274, Visits: 1,985
While I like the color highlighting and wordwrap, there's something distinctly odd with it.

I use IE6 (Company Policy) and the code backgroup tends to come out as random gray/white horizontal stripes, occasionally solid gray (which is what I suspect it should be.

Also when I looked at my recent posts page, I get some very odd behaviour. It looks like the code blocks are overlaid all over the messages. See attached partial screenshot.



Derek

  Post Attachments 
ssc screenshot.bmp (9 views, 734.35 KB)
Post #678331
Posted Wednesday, March 18, 2009 7:10 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Monday, November 17, 2014 12:50 PM
Points: 13,872, Visits: 9,598
Another (minor) thing is that it seems to ignore "nvarchar". "Varchar" ends up blue, but "nvarchar" ends up black.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #678386
Posted Wednesday, March 18, 2009 8:30 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 40,385, Visits: 36,827
Steve Jones - Editor (3/17/2009)
New code formatting has been released on SSC.


Ooooohhhh..... Nice!

Jack Corbett (3/17/2009)
This has been a light day for me posting code. I've mainly added links.


I don't think I've posted any code this week yet.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #678542
Posted Wednesday, March 18, 2009 8:44 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:48 AM
Points: 12,921, Visits: 32,285
seems to hate less-than and greater-than symbols:
this line has the ampersand-LT-semicolon:
salesMonth <=@month and YTD = 0 OR salesMonth = @month and YTD <> 0
this is as you'd type it
 salesMonth   0

strips the middle portion of the code out assuming an HTML tag.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #678556
Posted Wednesday, March 18, 2009 8:45 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 4:55 PM
Points: 31,278, Visits: 15,736
Thanks for the notes. I'm logging some bugs.

- The ADDADD thing, we had that with some other keywords and cleaned them up. We missed this one.
- Blank lines, noted
- background - We have code tags, it's possible some are missing. If that's the case, you'd get the solid gray. Other code items are made with the alternating greenbar type formatting of white and light gray. We can make it solid.
- Font size, noted. Not sure if I want it the same or smaller to stand out.








Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #678558
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse