Search Results

Search found 9 results on 1 pages for 'beautification'.

Page 1/1 | 1 

  • Spring - adding BindingResult to newly created model attribute

    - by Max
    My task is - to create a model attribute by given request parameters, to validate it (in same method) and to give it whole to the View. I was given this code: //Create the model attribute by request parameters Promotion promotion = Promotions.get(someRequestParam); //Add the attribute to the model modelMap.addAttribute("promotion", promotion); if (!promotion.validate()) { BindingResult errors = new BeanPropertyBindingResult(promotion, "promotion"); errors.reject("promotion.invalid"); //TODO: This is the part I don't like model.put(BindingResult.MODEL_KEY_PREFIX + "promotion", errors); } This thing sure works, but that part with creating key with MODEL_KEY_PREFIX and attribute name looks very hackish and not a Spring style to me. Is there a way to make the same thing prettier?

    Read the article

  • Create creative diagrams or find someone creative

    - by devdude
    This question might be slightly non-techy/dev, but I am sure many of you had a similar problem. We code, write test-cases, put comments in source-code (!), put messages in svn commit, write comments in tracked issues. We create ERD/class/usecase/.. diagrams with whatever tool. We might write user-manuals, wikis, guidelines,.. Not everyones cup of tea, but usually practice makes a good tech writer (I experienced that). Now comes the point: Once in a while we need to supply system overview diagrams, drawings of architecure,.. that look appealing to non-technical people, and no, we dont have a marketing department with designers waiting for our input or a $$$$ design company doing our corporate design. If I try to do that, it a) takes forever b) I might not have the tools and c) looks like crap and not like something I want to see in a slideshow. Whats your experience or recipe ? Is there something like RENT-A-DESIGNER ? cheers

    Read the article

  • Stand-alone Java code formatter/beautifier/pretty printer?

    - by Greg Mattes
    I'm interested in learning about the available choices of high-quality, stand-alone source code formatters for Java. The formatter must be stand-alone, that is, it must support a "batch" mode that is decoupled from any particular development environment. Ideally it should be independent of any particular operating system as well. So, a built-in formatter for the IDE du jour is of little interest here (unless that IDE supports batch mode formatter invocation, perhaps from the command line). A formatter written in closed-source C/C++ that only runs on, say, Windows is not ideal, but is somewhat interesting. To be clear, a "formatter" (or "beautifier") is not the same as a "style checker." A formatter accepts source code as input, applies styling rules, and produces styled source code that is semantically equivalent to the original source code. A style checker also applies styling rules, but it simply reports rule violations without producing modified source code as output. So the picture looks like this: Formatter (produces modified source code that conforms to styling rules) Read Source Code → Apply Styling Rules → Write Styled Source Code Style Checker (does not produce modified source code) Read Source Code → Apply Styling Rules → Write Rule Violations Further Clarifications Solutions must be highly configurable. I want to be able to specify my own style, not simply select from a canned list. Also, I'm not looking for a general purpose pretty-printer written in Java that can pretty-print many things. I want to style Java code. I'm also not necessarily interested in a grand-unified formatter for many languages. I suppose it might be nice for a solution to have support for languages other than Java, but that is not a requirement. Furthermore, tools that only perform code highlighting are right out. I'm also not interested in a web service. I want a tool that I can run locally. Finally, solutions need not be restricted to open source, public domain, shareware, free software, commercial, or anything else. All forms of licensing are acceptable.

    Read the article

  • Most idiomatic way to print a time difference in Java?

    - by Zombies
    I'm familiar with printing time difference in milliseconds: long time = System.currentTimeMillis(); //do something that takes some time... long completedIn = System.currentTimeMillis() - time(); But, is there a nice way print a complete time in a specified format (eg: HH:MM:SS) either using Apache Commons or even the dreaded platform API's Date/Time objects? In other words, what is the shortest, simplest, no nonsense way to write this in Java?

    Read the article

  • Regex for beautify text

    - by Jensen
    HI, I would like to create a function that beautify my text. For this I use a regex who remplace some characters, but it not run. Can you give me the regular expression for this : Replace the first letter by a caps Replace any underscore _ by a space So for example: the_pack_2 will be The pack 2. Thx

    Read the article

  • Html Table styles

    - by Hulk
    Can any body point me to the links which has some table beautification code like the one mentioned and easy to implement http://24ways.org/2005/tables-with-style Thanks..

    Read the article

1