Use your widget sidebars in the admin Design tab to change this little blurb here. Add the text widget to the Blurb Sidebar!
Filed under: Software | No Comments »
C#
String test = @”Shall I compare thee to a summer’s day?
Thou art more lovely and more temperate.”
Java
String test = “Shall I compare thee to a summer’s day?” +
“Thou art more lovely and more temperate.”
Isn’t that just annoying?
Filed under: Software | No Comments »
Upon recieving a requirement to do a bunch of bulk inserts into hibernate, some quick googling found this thread, which was soooo enlighting.
not.
“
Filed under: Software | No Comments »
Put this magical code in all maven plugin executions that use database operations
Here are two examples: and I probably sprinkled it too liberally
<execution>
<id>create-schema</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<skip>${maven.database.skip}</skip>
<autocommit>true</autocommit>
<fileset>
<basedir>${basedir}</basedir>
<includes>
<include>src/main/resources/sql/create_tables.sql</include>
</includes>
</fileset>
<print>true</print>
</configuration>
</execution>
<artifactId>hibernate3-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>2.2</version>
<executions>
<execution>
<id>generate-drop-ddl</id>
<phase>compile</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
<configuration>
<componentProperties>
<skip>${maven.database.skip}</skip>
<outputfilename>
${pom.artifactId}-dropGEN.ddl
</outputfilename>
<drop>true</drop>
<create>false</create>
<configurationfile>/target/classes/hibernate.cfg.xml</configurationfile>
</componentProperties>
</configuration>
</execution>
To Run:
mvn -Dmaven.database.skip=true
Filed under: Uncategorized | 4 Comments »
- Don’t use HTML comments. In MVC, there is not supposed to be any logic in views – so cut the comments, they just clutter the markup.
- Wrap your lines in a consistent manner. It’s hard to consistently be scrolling off to the right. It might work on your 30″, but a lot of programmers use big fonts to combat eye strain
- Whitespace schmiteface. Whitespace, like HTML comments, just clutters your markup.
- Use include files for as much stuff as possible. It’ll make it easier to find a bit of code for another developer, as well as make your markup more modular.
- EDIT: I couldn’t think of a fifth step
Filed under: Uncategorized | No Comments »
This new workout plan has been hot like a California Forest fire.
- Sit down. Bump some hiphop.
- Shake it like it owes you money.
- There is no third step.
Filed under: Uncategorized | No Comments »
If you have experienced a slow eclipse in debugging mode: delete those breakpoints!
- Why? Don’t ask me.
- How? Wrong person.
- But….Seriously man, just delete your breakpoints.
Filed under: Uncategorized | No Comments »
Let’s see what stackoverflow says, huh?
A function should have a singular purpose that is easily defined.
so I usually look for under 25-30 lines. It’s pretty subjective, though. If it feels long, then it’s too long.
I wouldn’t worry so much about lines of code as keeping your function to one single task or idea. It is true that a long function can still keep to a single task, but that is less of a smell and less important to split up then a function that is trying to do several different things.
Here’s my question: is it possible to have a method that has a logical purpose but is too short?
Not really.
So why not just break things out as much as possible until your methods are reasonably short aka 10 lines?
Filed under: Uncategorized | No Comments »
Posture – Hold your head almost as far back as it can go – this means your head is above your body, not in front of it and the back of neck muscles don’t have to work so hard. Your head weight (5-7 kg, some bigger than others!;-)) is then supported straight down onto your spine. It takes quite some effort to hold this position all day (and it looks a little odd), but it is really important, and really makes a difference. Also you need to arch your back, shoulders back, to give both your lower back, and also your neck the concave shapes (lordosis) they are supposed to have. Less trapped nerves / slipped disks.
From stackoverflow
Filed under: Uncategorized | No Comments »
Here’s a good link about using eclipse mouseless.
However, there’s one great key missing – ALT + LEFT/RIGHT
This way, when you hit F3 to go to a function declaration to see what it does, you can hit ALT + LEFT to get back to the function you were previously looking at.
I’ve also been using a firefox addon called Mouseless Browsing – which is quite effective if you have a mousepad at browsing the web without a mouse.