| package com.gueck.dogdash; | |
| public class AutocloseableDemo { | |
| private static class CreateException extends RuntimeException {} | |
| private static class CloseException extends RuntimeException {} | |
| private static class OperationException extends RuntimeException {} |
| http://camel.apache.org/jetty.html | |
| incorrect: | |
| <bean id="jetty" class="org.apache.camel.component.jetty.JettyHttpComponent"> | |
| <property name="socketConnectorProperties"> | |
| <properties> | |
| <property name="acceptors" value="4"/> | |
| <property name="maxIdleTime" value="300000"/> | |
| </properties> | |
| </property> |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from sqlalchemy import create_engine | |
| from sqlalchemy.engine import reflection | |
| from datetime import datetime | |
| engine = create_engine('mysql://username:@localhost/foobar') | |
| insp = reflection.Inspector.from_engine(engine) |
| #!/bin/bash | |
| # Fix glitching mouse with VirtualBox + Ubuntu 12.10: | |
| # https://bbs.archlinux.org/viewtopic.php?id=145960&p=2 | |
| # https://www.virtualbox.org/ticket/10853 | |
| # https://bugs.freedesktop.org/show_bug.cgi?id=54353 | |
| xinput set-prop "VirtualBox mouse integration" "Coordinate Transformation Matrix" 0.5 0 0 0 0.5 0 0 0 1.0 | |
| xinput set-prop "VirtualBox mouse integration" "Coordinate Transformation Matrix" 1.0 0 0 0 1.0 0 0 0 1.0 |
| package scalate | |
| import org.fusesource.scalamd.{MacroDefinition, Markdown} | |
| import java.util.regex.Matcher | |
| import org.fusesource.scalate.wikitext.Pygmentize | |
| import org.fusesource.scalate._ | |
| import util.Log | |
| import net.sourceforge.plantuml.{FileFormat, FileFormatOption, SourceStringReader} | |
| import java.io.ByteArrayOutputStream | |
| import java.nio.charset.StandardCharsets |
| public class Foo { | |
| public void test1() { | |
| long timeout = System.currentTimeMillis() + 500; | |
| int i = 0; | |
| while (System.currentTimeMillis() < timeout) { | |
| System.out.println(i++); | |
| try {Thread.sleep(50);} catch (Exception ex) {} | |
| } | |
| } |
Ethical professional developers optimize for business results per unit of resources over product or project lifecycles, balanced risk profiles over project portfolios, and the ablity to scale investment into a given project both up and down as the business environment changes.
Let's break this down.
The virtue of a professional acting ethically is that this allows for trust in working relations between colleagues and organizations, which in turn makes working together significantly more efficient, as there is significantly less need to verify and control. The profession of software development has plenty of in-house codes of conduct, as well as the codified ACM "Software Engineering Code of Ethics and Professional Practice".
Many of the everyday ethical questions break down to the form: should I do A which is best for me, B which is best for my employer, or C which is best for the client. Very rarely you add D, best for our society, when C is clearly detrimental to the society. Unless D is releva
| package gumi.spring; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import org.aopalliance.intercept.MethodInvocation; | |
| import org.apache.commons.logging.Log; | |
| import org.springframework.aop.interceptor.AbstractTraceInterceptor; | |
| import org.springframework.expression.Expression; | |
| import org.springframework.expression.ExpressionParser; | |
| import org.springframework.expression.spel.standard.SpelExpressionParser; |
| @Autowired | |
| private ExampleDao dao; | |
| model.put("examples", dao.findAll()); | |
| model.put("comedies", dao.findByNameLike("%y%")); |