This file contains hidden or 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
| int = 12; | |
| boolean b = i == (3 | 6 | 5 | 7 | 32); |
This file contains hidden or 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
| public class BitTest { | |
| public static void main(String[] args) { | |
| // Der Ausdruck (3 | 6 | 5 | 7 | 32) einzeln aufgelöst: | |
| // (3 | 6) -> 7 | |
| System.out.println("( 3 | 6) == 7, ist " + ( 3 | 6)); | |
| // (7 | 5) -> 7 | |
| System.out.println("( 7 | 5) == 7, ist " + (7 | 5)); | |
This file contains hidden or 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.net.URI; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.SeekableByteChannel; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.nio.file.StandardOpenOption; | |
| public class NioBufferTest { |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <math.h> | |
| #include <assert.h> | |
| void main() | |
| { | |
| int i, x; | |
| printf ( "\n2^x für OS/2." ); | |
| printf ( "\nCopyright (C) 1995 von Ralf Bensmann" ); | |
| printf ( "\nErstellt in GNU C/C++ für OS/2."); |
This file contains hidden or 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
| (apply str (map #(char (Integer. %)) (re-seq #"\d+" "+++ 83|111|102|116|119|97|114|101|106|111|98|115| +++ ..."))) |
This file contains hidden or 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
| grep _enable /etc/defaults/periodic.conf | sed 's#YES#NO#g' > /etc/periodic.conf |
This file contains hidden or 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
| #!bin/bash | |
| set -o nounset | |
| virtualserver=$1 | |
| sed -i -e 's/^[#]\(.*Log .*\)/\1/g' ${virtualserver} |
This file contains hidden or 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
| #!bin/bash | |
| set -o nounset | |
| virtualserver=$1 | |
| sed -i -e 's/\(^[^#].*Log .*\)/#\1/g' ${virtualserver} |
This file contains hidden or 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
| // Find resources in e.g. META-INF/resources/tpl/ | |
| Set<String> res = getServletContext().getResourcePaths("/tpl/"); | |
| if (null != res) { | |
| for (String s : res) { | |
| System.out.println(s); | |
| } | |
| } |
This file contains hidden or 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
| @Grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version = '0.5.0') | |
| import groovyx.net.http.* | |
| def postBody = new File('req.xml').text | |
| def http = new HTTPBuilder('http://localhost:8080/odisee/document/generate') | |
| try { | |
| http.post(path: "generate", body: postBody, requestContentType: groovyx.net.http.ContentType.XML) { resp -> | |
| assert resp.statusLine.statusCode == 200 | |
| println resp.statusLine |