Skip to content

Instantly share code, notes, and snippets.

http://ibatisnet.sourceforge.net/DevGuide.html#d0e366
<!—Oracle SEQUENCE Example -->
<insert id="insertProduct-ORACLE"
parameterClass="product"> <selectKey resultClass="int"
keyProperty="id" > SELECT STOCKIDSEQUENCE.NEXTVAL AS ID FROM DUAL
</selectKey> insert into PRODUCT (PRD_ID,PRD_DESCRIPTION) values
(#id#,#description#) </insert>
<parameterMap id=”insert-product-param” class=”product”>
-Dcatalina.home="/Library/apache-tomcat-5.5.33/" -Djava.endorsed.dirs="/Library/apache-tomcat-5.5.33/common/endorsed" -Dcatalina.base="/Library/apache-tomcat-5.5.33/" -Djava.io.tmpdir="/Library/apache-tomcat-5.5.33/temp" -Xms768m -Xmx768m -XX:PermSize=768m -XX:MaxPermSize=768m
-Dcatalina.home="/Library/apache-tomcat-5.5.33" -Djava.endorsed.dirs="/Library/apache-tomcat-5.5.33/common/endorsed" -Dcatalina.base="/Library/apache-tomcat-5.5.33" -Djava.io.tmpdir="/Library/apache-tomcat-5.5.33/temp" -Xms768m -Xmx768m -XX:PermSize=768m -XX:MaxPermSize=768m -Dwtp.deploy="/Library/apache-tomcat-5.5.33/webapps" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
@luisartola
luisartola / gist:3033852
Created July 2, 2012 15:42
Functional programming
new_reservation.onlye(tralari, tralara).to_json
class FullReservation > Hash
def with_changed_timeslice(timeslice)
  end
end
module TimesliceShaped
def shift
end
function doSomething(callable $x) {
return $x();
}
doSomething(function () { });
doSomething("function_name");
doSomething(['class', 'staticMethodName']);
doSomething([$object, 'methodName']);
doSomething($invokableObject);
public enum Operation {
PLUS("+"){
double apply (double x, double y) { return x + y;}
},
MINUS("-"){
double apply (double x, double y) { return x - y;}
};
private final String symbol;
@luisartola
luisartola / BonificacionesTotales.java
Created August 22, 2012 08:58
Ibatis Snippets - Building Inmutable Data Types
package com.dnt.erleaTxingudi.ura.app;
public class BonificacionTotales {
protected String canon;
protected String bonificado;
public BonificacionTotales(String canon, String bonificado) {
this.canon = canon;
this.bonificado = bonificado;
@luisartola
luisartola / gist:3497781
Created August 28, 2012 12:56 — forked from igorw/gist:3369858
Silex Rest Api Test
<?php
use Silex\WebTestCase;
class RestApiTest extends WebTestCase
{
public function createApplication()
{
...
}
@luisartola
luisartola / instalacion
Created August 30, 2012 07:27
Sql Server
opción de instalar sql server sin checks
/ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck
@luisartola
luisartola / php-closure-mapper.php
Created September 10, 2012 06:54
PHP Patterns
<?php
$mapper = function($method){
return function ($class) use ($method) {
return $class->$method;
};
};
@luisartola
luisartola / FooController.php
Created September 14, 2012 06:55 — forked from igorw/FooController.php
Silex convention-based controllers
<?php
// src/Foobar/Controller/FooController.php
namespace Foobar\Controller;
class FooController
{
public function helloAction($request)
{