I've got some Java code with SQL statements written as Java strings (please no OR/M flamewars, the embedded SQL is what it is - not my decision).
I've broken the SQL statements semantically into several concatenated strings over several lines of code for ease of maintenance. So instead of something like:
String query = "SELECT FOO, BAR...
CSS code formatting question: I have an old habit of adding a single space before the { starts a new CSS rule, like this:
body {
font-size: 16px
}
the whitespaces like this one between body and { add up throughout the css.
Ideally, i'd prefer writing my rules like so (and thus saving whitespace):
body{
font-size: 16px
}
Actua...
I'm hoping this is simple. I'm not a CSS guy.
I'm trying to make some code look a little better on a blog and I have the following <code> CSS style.
code {
display: block;
white-space:normal;
background-color: #eeeeee;
font: 1em, 'Courier New', Courier, Fixed;
padding: 7px;
margin: 7px...
I know it's not directly related to programming, but what better place then stackoverflow right?
So code folding is an awesome feature which I love, but does anyone know if there is a way to get Xcode to remember where you have certain sections collapsed whenever you open a file?
BTW, I'm coding ruby on rails using git version control...
I have been searching online with little success for a way to force php to output a newline after a closing php tag ?> so that my HTML will be rendered as I see it before its parsed by PHP so that it will look neat and tidy when viewing the html source code for a page.
I want to stop it from removing the newline and causing the next lin...
Whenever I run the IntelliJ autoformatter - it converts this:
@Autowired private CustomerDao customerDao;
into this:
@Autowired
private CustomerDao customerDao;
How can I stop it from doing that?
...
Is there a tool, option or script to insert a custom template into the header of every existing source file within an Eclipse project?`
Some background information
I have very recently open-sourced a small application written for a university assignment. Initially the source files did not require any explicit license or author inform...
There is js file with a lot of code in unreadable format (all code in one line):
JS file
Is there a tool to format to a "normal" view?
...
Lets assume I have this long insert statement
insert into table1 (id, name, phone, very_long_col_name, ...)
values (1, 'very long name indeed...', '555-555-5555', 1, ...)
As you can see above, it gets hard to tell values from their column since their length is uneven
I'm looking for something (e.g. command line util) to ...
Dears,
I need to format SQL statement for Oracle Db. I have a sql statement and I don't want to change the case. For Eg.
CREATE TABLE DPAuditTrailDetail
(
ID NUMBER (19, 0) DEFAULT 0 NOT NULL,
AuditTrail NUMBER (19, 0) DEFAULT 0 NOT NULL,
sysObjectField NUMBER (19, 0) DEFAULT 0 NOT NULL,
OldValue ...
How would you go about formatting a long line such as this? I'd like to get it to no more than 80 characters wide:
logger.info("Skipping {0} because its thumbnail was already in our system as {1}.".format(line[indexes['url']], video.title))
Is this my best option?
url = "Skipping {0} because its thumbnail was already in our system as...
How do I adjust the # of spaces added/removed by Eclipse when I hit Tab or Shift+Tab, for a given filetype? I am working on reStructuredText files (.rst) and want 2 spaces for those instead of 4.
...
In C++ Builder, how can I make sure that even correctly nested code like:
void func () {
...
..
)
C++ Builder correctly nested only doing so:
void func ()
{
...
...
}
This is very stressful, because I always have to correct by hand. So how can I make which indents code as well in the first instance?
...
Greetings,
in one of my applications I provide a simple code editor based on a QTextEdit widget and the QSyntaxHighlighter. I was wondering if there is function, library or generally a way to allow the user to have his/her code re-formatted and intented within the application?
Websites like this allow you to re-format and intent JavaSc...
When auto-formatting JSP files in Eclipse using Ctrl+Shift+F, it is trying to fit as many tags on a line as possible and then the tag that doesn't fit it will break and place the attributes on the next line.
This is created very messy code, example below.
<div class="type-text"><label for="echo">Project Name: </label> <s:textfi...
I want to compare side by side some C files with kdiff3 (the tool is what matters the less), but some parts have been "reformatted" in one of the files, thus giving false positives in the differences.
Kdiff3 allows you to run a preprocessor on the input files, and I thought that using "indent" (or similar tools like astyle or uncrustify...
I'm extremely frustrated with the Eclipse formatting rules for a series of qualified invocations (i.e., the Builder pattern style). For example, here is my preferred formatting for some code that creates a new Apache Commons CLI Options object:
Options options = new Options()
.addOption(OPTION_HELP_SHORT, OPTION_HELP, false, "pr...
Is there a component anyone knows of that will take XML and display it has a color coded string so you can read it easily?
My app runs mostly from the dynamic XML that is loads. It would be great for debugging if I could click a button in the app to show me the XML it loaded in a readable format.
Thanks!
...
Is it possible to auto-format your code in Dreamweaver like in Visual Studio (ctrl+k+d)
...
Hi there,
Admittedly not a programming question, but I don't really know where else to ask this...
I'm planning to start a blog to post the stuff I'm working on, which is mostly about Expression Trees & Mathematics. Hopefully this will help me focus on the problem at hand instead of going off every possible tangent that comes up.
I wo...