This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
import javax.persistence.EntityManagerFactory; | |
import javax.persistence.spi.PersistenceProvider; | |
import javax.persistence.spi.PersistenceUnitInfo; | |
import org.hibernate.ejb.Ejb3Configuration; | |
import org.hibernate.ejb.HibernatePersistence; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Logger; | |
import javassist.ClassPool; | |
import javassist.CtClass; | |
import javassist.CtConstructor; | |
import javassist.CtField; | |
import javassist.CtMethod; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Gambio to XTC image converter - PHP pseudocode - not tested | |
// Gambio product table | |
$sql = "SELECT id, products_name FROM gambio.products_description" | |
$rows = mysql_fetch_assoc(mysql_query($sql)) | |
foreach ($rows as $row) { | |
// match string, e.g "printer (white)" | |
if (preg_match("/^(.*)\((.*)\)(.*)$", $row['products_name'], $arrMatches)) { | |
$color = $arrMatches[2]; // third element contains color | |
// do something with color, e.g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domaene de.ckl.blog | |
entity Gruppe { | |
attribute id: int not-null primary-key | |
attribute name: string | |
reference has-many: BenutzerInGruppe with-alias:"BenutzerInGruppen" | |
} | |
entity BenutzerInGruppe { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar de.ckl.Mydsl with org.eclipse.xtext.common.Terminals | |
generate mydsl "http://www.ckl.de/Mydsl | |
Model: | |
(domains+=Domain)*; | |
Operation: | |
(OperationContainer | OperationCreate | OperationList | OperationEdit | OperationDelete) | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<db-workflow> | |
<defaults> | |
<var key="server">test</var> | |
<var key="test">${server}_name</var> | |
</default> | |
<workflows> | |
<workflow name="update"> | |
<vars> | |
<ask_for var="server" /> | |
<ask_for var="user" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="db-worklflow" default="update"> | |
<property name="db.server">remote_db_server</property> | |
<property name="db.database"></property> | |
<property name="db.username">root</property> | |
<property name="db.password">root</property> | |
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | |
<target name="sql_execute_command" description="Executes exactly one SQL command and returns it output as 'latest_sql_result'"> | |
<if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"> | |
<monitordconfig version="1.0"> | |
<name>monitord</name> | |
<logfile>/var/log/monitord.log</logfile> | |
<loglevel>DEBUG</loglevel> | |
<soundcard num="1"> | |
<device>plughw:Loopback,0,0</device> | |
<status>1</status> | |
<baud>48000</baud> | |
<name>Loopback</name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cp = require('child_process'), | |
dns = require('dns'); | |
/** server.js */ | |
// *does* work | |
dns.resolve4('www.google.com', function(err, addresses) { | |
console.log("Resolved from service.js"); | |
console.log(addresses); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gitorious config/authentication.yml with Active Directory support | |
# This is based on https://gitorious.org/gitorious/mainline/merge_requests/181 | |
production: | |
# Disable database authentication altogether | |
#disable_default: true | |
# additional methods, an array of hashes | |
methods: | |
- adapter: Gitorious::Authentication::LDAPAuthentication |
OlderNewer