Auto-generate setters/getters with Qt Creator
Do a right click on your member then Refactor then Generate Getter and Setter member function and you’re done 🙂 On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
Do a right click on your member then Refactor then Generate Getter and Setter member function and you’re done 🙂 On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
KeyHolder holder = new GeneratedKeyHolder(); getJdbcTemplate().update(new PreparedStatementCreator() { @Override public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement ps = connection.prepareStatement(sql.toString(), Statement.RETURN_GENERATED_KEYS); ps.setString(1, person.getUsername()); ps.setString(2, person.getPassword()); ps.setString(3, person.getEmail()); ps.setLong(4, person.getRole().getId()); return ps; } }, holder); Long newPersonId = holder.getKey().longValue(); Note that in newer versions of Postgres you need to use connection.prepareStatement(sql.toString(), new String[] { “idcompte” /* … Read more
For IntelliJ 12: Position caret above a method name, type /** and press Enter to let IntelliJ IDEA automatically generate JavaDoc stubs for this method. See here
Make that “three single comment-markers” In C# it’s /// which as default spits out: /// <summary> /// /// </summary> /// <returns></returns> Here’s some tips on editing VS templates.
AFAIK, private is the default everywhere in C# (meaning that if I don’t write public, protected, internal, etc. it will be private by default). (please correct me if wrong). This is not true. Types defined within a namespace (classes, structs, interfaces, etc) will be internal by default. Also, members within different types have different default … Read more