Sometimes I post sourcecode accompanying my posts which are long and makes the length of the post unnecessarily long. The wordpress.com sourcecode shortcode has an option collapse which you can make “true” to collapse the sourcecode box when the page loads. If you post a long code, when the code box is expanded it will be inconvenient to scroll through the page and read. Also sometimes you might not want to collapse the codebox when the page loads. For this I have a solution. Add vertical bars to the codebox using the div tags.
In this way the length of the code portion in the page remains fixed and to read the code one requires just to scroll in the code box. Checkout what I am talking about in some of the code posts, for example in the posts here and here. Here is how it is done. Continue reading
Categories
- Computer Science (62)
- C Language (16)
- Coding Discussions (29)
- Linux / Unix Shell (16)
- Others (4)
- Overview (3)
- Entertainment (4)
- GNU+Linux+FOSS (41)
- Humor (17)
- Writings (5)
- Computer Science (62)
Tags
api array bash boot C++ casual combinatorics counting C program fedora firefox gcc gimp google graphics grub html id3 implementation defined behaviour internet ipod linux numerical octave poll prime number Programming R random number recursion shift operators skype undefined behavior video wallpaper wordpress workflowStackOverflow
Area51 Stackexchange Proposals to Follow
Top 10
- Read multiple arguments in bash script
- Floating point math operations in bash
- Implement stack using a queue
- C Language Constructors and Destructors with GCC
- Recursive Solution to Towers of Hanoi
- Little and Big Endian conversion
- Bash Script : Print lines of a file in reverse order
- Simpson's 1/3rd Rule
- Choose login manager GDM or KDM in Fedora
- Generating random numbers from Normal distribution in C
Recent Comments
Polls








