Skip to content

Instantly share code, notes, and snippets.

{
"id": "C2BD986B24B1CB24C32577DD003D915A",
"version": "C32577DD:0045A59D",
"modified": "20101116T195822,00+00",
"created": "20101116T195822,00+00",
"priority" : 0,
"author": "Леонов О.В.",
"editable": true,
@turumbay
turumbay / gist:866576
Created March 11, 2011 21:05
test.for.posterous
{
final HashMap nstjsons = new HashMap();
final Configuration config = new Configuration(nstjsons);
config.setSupressAtAttributes(false);
mof = new MappedXMLOutputFactory(config);
mif = new MappedXMLInputFactory(config);
convention = new MappedNamespaceConvention(config);
}
XStream xstream = new XStream(new HierarchicalStreamDriver() {
private final MappedXMLOutputFactory mof;
private final MappedXMLInputFactory mif;
private final MappedNamespaceConvention convention;
{
final HashMap nstjsons = new HashMap();
final Configuration config = new Configuration(nstjsons);
config.setSupressAtAttributes(false);
mof = new MappedXMLOutputFactory(config);
mif = new MappedXMLInputFactory(config);
@turumbay
turumbay / pom.xml
Created March 11, 2011 21:23
jena with dependencies
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.turumbay.rest</groupId>
<artifactId>jena-with-dependencies</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<dependencies>
package ru.turumbay.jena;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
public class VCardExample {
public static void main(String... args) {
Model model = ModelFactory.createDefaultModel();
model.setNsPrefix("vcard", VCard.NS);
model.createResource("http://turumbay.ru/me")
@turumbay
turumbay / gist:887216
Created March 25, 2011 17:22
lotusscript howto: sign hotspots in rich text fields
Declare Function NSFNoteSignHotspots Lib "nnotes.dll" ( Byval hNote As Long, Byval dwFlags As Long , Byval retfSigned As Integer) As Integer
Declare Function NSFNoteUpdate Lib "nnotes.dll" (Byval hNote As Long, Byval flags As Integer) As Integer
'' USAGE:
'' Dim signer As New HotSpotSigner(doc)
'' Call signer.sign()
Class HotSpotSigner
Private t_doc As NotesDocument
Private t_db As NotesDatabase