code-formatting Questions
1
Solved
What is the equivalent of Ctrl + K + D (Visual Studio) in Sql Server Management Studio which is use to format the code ?
Langton asked 12/9, 2011 at 8:55
5
Solved
Is it accepted practice to commit even when you're just changing things like whitespace, code formatting, etc.?
Slippy asked 6/2, 2010 at 19:49
0
There are two competing requirements
1) I want to pretty print so that I can read and understand code written by my peers
2) I don't want to check in the pretty printed code to source control bec...
Dragrope asked 10/9, 2011 at 15:52
3
Solved
How can we write the following statement to improve readability?
Promotion.joins(:category).where(["lft>=? and rgt<=?", c.lft, c.rgt]).joins(:shops).where(:promotions_per_shops => { :shop...
Superbomb asked 9/9, 2011 at 9:58
1
Solved
Is there a way (using ANT), it is possible to automatically reformat code to follow certain conventions?
I have several developers working on a program and would like to guarantee that code forma...
Rapscallion asked 8/9, 2011 at 18:44
8
Solved
This code looks dirty and I can't figure out how to format it so that I can read it, understand it, and look clean at the same time.
if(center==2 && ((((y-height/2)==j) && ((x+widt...
Zolly asked 30/8, 2011 at 5:58
4
Solved
My biggest gripe with HTML is that line breaks add a tiny bit of space between elements. (jsFiddle.)
This can screw up layouts where child elements are sized to exactly fit their parents.
I read ...
Sidelong asked 25/8, 2011 at 6:6
2
I do PHP/Javascript development in NetBeans, and I really like the environment, except for one thing - in Javascript, when I press ENTER after a statement, and type the opening brace, it is indente...
Vertebral asked 13/1, 2011 at 23:45
1
Solved
What's the difference between these two methods of reading an input file?
1) Using 'ifstream.get()'
and
2) Using a vector<char> with ifstreambuf_iterator<char> (less understood by me...
Manning asked 15/6, 2011 at 20:11
2
Solved
I want to indent the following piece of code.
How would a lisper indent this?
I am especially confused about where to put newlines.
(defn primes [n]
(letfn [(sieve [table removal]
(assoc table r...
Bracci asked 13/6, 2011 at 20:25
3
Solved
I have a set of singleton classes and I want to avoid boilerplate code. Here is what I have now:
public class Mammal {
protected Mammal() {}
}
public class Cat extends Mammal {
static protected...
Horsey asked 10/6, 2011 at 15:55
4
I'd like Visual Studio to continue automatically formatting my .cs files, but is there a way to prevent it auto-formatting C# code in between the <% %> tags in ASP.NET MVC views because it re...
Incomplete asked 30/9, 2010 at 22:3
2
Solved
Given a source file with bad indentation, incorrect white space management, and so on. How do I reformat the code such a file and apply the Ruby's style guide (if present)?
Supposal asked 17/5, 2011 at 21:26
2
Solved
Resharper's code formatting is generally fine, but it seems completely broken when dealing with very long lines. For example look at this piece of code:
I do want some kind of line wrapping, but...
Pieeyed asked 29/3, 2011 at 18:26
2
Solved
When I ctrl+shift+f up the project code, its doing its job just fine, everywhere.
But its messing the CSS, specially those filter parts and adding bunch of spaces.
Also how do I specify som...
Irruptive asked 25/2, 2011 at 8:27
1
Solved
I have started using Code Contracts and have found that it makes it difficult to immediately spot the 'guts' of a method.
Take this (very simple) example:
public static void UserAddNew(string dom...
Dialyser asked 15/2, 2011 at 8:35
3
Solved
does any tool (VS extension, or maybe Resharper supports this...) exist
which can orginize code in my class in some specified way? Like this :
public static fields/properties
private static fields...
Stringboard asked 21/1, 2011 at 15:36
3
Solved
Greetings Overflowers,
Problem (names of variables are aligned by not their types):
public abstract class Filter {
private long id;
protected String expression;
}
how can I align fields autom...
Saran asked 31/12, 2010 at 13:39
3
Solved
I love Visual Studio's ability to auto format (CTRL + K,D). However, in HTML if you have something like:
<h1><%# Eval("SomeField") %></h1>
It gets formatted this way:
<h1&...
Persuasive asked 15/7, 2009 at 23:42
1
Our project has hundreds of comments within XML files. Some of these are just dividers like this:
<!--
=========================================================================================...
Feverfew asked 20/11, 2010 at 4:16
15
Solved
Code Complete says it is good practice to always use block identifiers, both for clarity and as a defensive measure.
Since reading that book, I've been doing that religiously. Sometimes it seems e...
Robinette asked 21/7, 2009 at 18:42
4
Solved
$ cat temp.pl
use strict;
use warnings;
print "1\n";
print "hello, world\n";
print "2\n";
print "hello,
world\n";
print "3\n";
print "hello, \
world\n";
$ perl temp.pl
1
hello, world
2
hello,
w...
Betthezel asked 21/10, 2010 at 6:15
2
Solved
Possible Duplicate:
why results varies upon placement of curly braces in javascript code
We have company policies that dictate that in PHP opening curly braces should be on their own ...
Timeout asked 18/10, 2010 at 15:8
2
I'd like to write a code beautifier and i thought of using Ruby to do it. Could someone show me a place to get started? I've seen a lot of code beautifiers online but I've never come across a...
Gombosi asked 11/10, 2010 at 6:29
2
Solved
How do I change the basic Resharper indentation options? I have noticed that Resharper's indentation settings differ from VS 2010's--VS uses four spaces for an indent, and it's hard to tell what Re...
Monopetalous asked 24/9, 2010 at 21:46
© 2022 - 2024 — McMap. All rights reserved.