Questions tagged [boilerplate]

In computer programming, boilerplate is the term used to describe sections of code that have to be included in many places with little or no alteration. It is more often used when referring to languages which are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs.

524 questions
8
votes
2 answers

Java BuilderTestPattern - how to avoid boilerplate?

I have a lot of value objects in my project. I'm using project lombok to eliminate some boilerplate, so my value objects look like the following one: @Value @Accessors(fluent = true) public class ValueObject { private final String firstProp; …
slnowak
  • 1,839
  • 3
  • 23
  • 37
8
votes
2 answers

How to use the .clearfix class?

I think I'm misunderstanding the concept of the .clearfix class. Maybe somebody can help me out. I'm looking for a way to use float and clear without messing up my markup. So I thought, that's where .clearfix can be used for. Inside of an empty…
kraftwer1
  • 5,253
  • 10
  • 36
  • 54
8
votes
3 answers

CodeIgniter + HTML5 Boilerplate + Twitter Bootstrap

I'm trying to start a new project, and was looking for the "ultimate" package to kick-start off with for PHP/MySQL/HTML5 development. Tried CodeIgniter first, which was great. Then discovered Twitter Bootstrap, and integrated that in nicely.…
carlinyuen
  • 279
  • 1
  • 4
  • 17
7
votes
1 answer

What is the correct boilerplate for explicit relative imports?

In PEP 366 - Main module explicit relative imports which introduced the module-scope variable __package__ to allow explicit relative imports in submodules, there is the following excerpt: When the main module is specified by its filename, then…
Géry Ogam
  • 6,336
  • 4
  • 38
  • 67
7
votes
2 answers

puffadder (Lombok's alternative for Python) not maintained?

I am looking for some Python library similar to Java's Lombok. I found puffadder 0.1, from 2016, but now that I tried to install it with pip, it does not…
xCovelus
  • 578
  • 1
  • 9
  • 20
7
votes
6 answers

Howto create software package in Unix/Linux?

How can we create a software package, so that after extracting our software tar ball user can do the typical steps? $ gunzip < mycode.tar.gz | tar xvf - $ ./configure $ make $ make install
neversaint
  • 60,904
  • 137
  • 310
  • 477
7
votes
5 answers

Ways to make use of 'using' directives in C# less tedious

Good programming practice these days tends to mean splitting your stuff up into lots of assemblies and namespaces (for example, see S#arp Architecture, MVC, etc.). However a side-effect of that is that you have to stick a whole bunch of 'using '…
codeulike
  • 22,514
  • 29
  • 120
  • 167
7
votes
1 answer

Boilerplate typedefs for STL-compatible container

Is there, within the standard library or Boost, some kind of utility base class for populating a custom STL-compatible Sequence with the required typedefs (size_type, value_type, etc...). I'm thinking of something like boost::iterator_facade, but…
Emile Cormier
  • 28,391
  • 15
  • 94
  • 122
7
votes
1 answer

Android Studio: how to use the fbc live template

Android Studio has support for macros—which they like to call live templates—which is nice, but nobody anywhere bothers to explain how to use them, least of all Android Studio. It is obvious that the "fbc" live template was designed to make…
enigmaticPhysicist
  • 1,518
  • 16
  • 21
7
votes
2 answers

Transform one case class into another when the argument list is the same

I have a lot of similar case classes which mean different things but have the same argument list. object User { case class Create(userName:String, firstName: String, lastName: String) case class Created(userName:String, firstName: String,…
7
votes
1 answer

Magento - Migrate features from rwd to boilerplate theme

I installed boilerplate from GitHub theme in my magento project, looks very good, some areas like my account and check section are very professional, but i prefer some little features from rwd project. now i trying to get the right top section from…
7
votes
6 answers

AngularJS Multi-Page App Site Boilerplate Site Structure Advice

I am looking for some guidance with creating an AngularJs multi-page app served by a Laravel Backend. All web app tutorials on the net point to creating SPAs and I am just getting started with Angular - so please go easy on me. ProductPage example -…
Gravy
  • 12,264
  • 26
  • 124
  • 193
7
votes
8 answers

Alternative to django form processing boilerplate?

The suggested pattern for processing a form in a view seems overly complex and non-DRY to me: def contact(request): if request.method == 'POST': # If the form has been submitted... form = ContactForm(request.POST) # A form bound to the…
John
  • 29,546
  • 11
  • 78
  • 79
6
votes
2 answers

Double slash at beginning of javascript include

I have been looking at the html5 boilerplate and noticed that the jquery include url starts with a double slash. The url is //ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js Why is the http: missing?
David
  • 61
  • 1
  • 2
6
votes
5 answers

Boilerplate Javascript scripts/plugins?

I've been really enjoying getting into Paul Irish's HTML5 Boilerplate which gives best practices for html5, javascript, css and even server side stuff with the likes of a boilerplate .htaccess file. However, the Javascript file that comes is empty-…
iagdotme
  • 1,033
  • 2
  • 21
  • 38