Kategorie-Archiv: Programmieren

Node.js example using connect module


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

1. Install Node.js / npm
2. Install connect module using npm:

node1

3. Create static file server (server.js)

node2

4. Create html index.html File in directory:

node3

5. Start the server:

node4

6. Test Server:

node5

 

Source
https://github.com/woppr/nodejs.git

jsoup Example


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

Example how to access HTML elements in Java.

HTML Code
http://woppr.de/html

<html>
<head>
<title>My HTML page</title>
</head>
<body>
<div id="1">
<h1>Inhalt div 1</h1>
</div>
<div id="2">
<h1>Inhalt div 2</h1>
</div>
</body>
</html>

Eclipse

jsoup_eclipse

Code

jsoup_code

Source
http://jsoup.org/cookbook/extracting-data/dom-navigation

Source Code (git)

https://github.com/woppr/jsoup_example

https://github.com/woppr/jsoup_example.git

Einfaches Log4j Beispiel


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

Folgendes Beispiel zeigt wie Log4j zum Logging in Java verwendet werden kann.
Achtung: Es wird Version 1.2.xx von Log4j benötigt. Version 2.0 funktioniert nicht!

Zunächst muss Log4j (1.2.17.jar) im Build Path hinzugefügt werden:

log4j1

 

  • Anlegen einer Dummyklasse (LoggingTest)
  • Importtieren der benötigten Klassen
    • import org.apache.log4j.Logger;
    • import org.apache.log4j.PropertyConfigurator.
  • Erzeugen eines Logger Objektes.

log4j2

Zur Konfiguration wird ein Konfigurationsfile verwendet (log4j.properties).

Das Konfigurationsfile (log4j.properties) im Root Verzeichnis des Projektes ablegen:

log4j3

Beispiel Konfigurationsfile (log4j.properties):

log4j4

Anhand der Einstellungen im .properties Files wird in der Console folgende Ausgabe erzeugt:

log4j5

Im Root Verzeichnis des Projektes wird die Datei sample.log mit denselben Einträgen erzeugt:

log4j6

 

Sourcecode:

Log4J_Example

OpenID Login with google and PHP


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

Example implementation how to use google OpenID for a login to a Website.
http://woppr.de/openid/google.php

Prerequisite:
LightOpenID PHP 5 library for openid authentication (openid.php)

Google, completely ignores optional parameters, and for the required ones, it supports, according to it’s website:

  • namePerson/first (first name)
  • namePerson/last (last name)
  • contact/country/home
  • contact/email
  • pref/language

Code:

 
<?php
# Logging in with Google accounts requires setting special identity, so this example shows how to do it.
require 'openid.php';
try {
    $openid = new LightOpenID('woppr.de');
    if(!$openid->mode) {
        if(isset($_GET['login'])) {
            $openid->identity = 'https://www.google.com/accounts/o8/id';
 
            $openid->required = array('namePerson/first', 'namePerson/last', 'contact/email');
 
            header('Location: ' . $openid->authUrl());
        }
?>
<form action="?login" method="post">
    <button>Login with Google</button>
</form>
<?php
    } elseif($openid->mode == 'cancel') {
        echo 'User has canceled authentication!';
    } else {
        if($openid->validate()) {
		$returnVariables = $openid->getAttributes();
		echo 'User ' . $openid->identity . ' has logged in with this email address ' . $returnVariables['contact/email'] . ' Name: ' . $returnVariables['namePerson/first'] . ' ' . $returnVariables['namePerson/last'];
		} else {
		echo 'User has not logged in.';
		}
 
    }
} catch(ErrorException $e) {
    echo $e->getMessage();
}

Hacked By GeNErAL


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

~!Hacked By GeNErAL alias Mathis!~

Hacked By GeNErAL

 

Greetz : Kuroi’SH, RxR, K3L0T3X

\!/Just for Fun ~Hacked By GeNErAL\!/

Hacked By GeNErAL! !

Create range for selecting values in abap


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036
DATA:   r_values TYPE RANGE OF ztest123-value,
        r_values_line LIKE LINE OF r_values.
 
    r_values_line-SIGN = 'I'.  "I = include, E = exclude
    r_values_line-OPTION = 'EQ'.   "EQ, BT, NE ....
    r_values_line-LOW = '123'.  
    r_values_line-HIGH = '124'.
    append r_values_line to r_values.

 http://www.sapdev.co.uk/tips/tips_range.htm

Execute ABAP code only for a specific user


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036
REPORT  ztest123_codeforuser.
 
IF sy-uname = 'USER123'.
 
  WRITE: / 'Code for specific user !!! '.
 
ENDIF.

Catch divide by zero exception in abap


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036
REPORT  zmstest_divide_zero_exc.
 
START-OF-SELECTION.
 
  DATA : num TYPE i VALUE 5 .
 
  TRY.
      num = num / 0 .
    CATCH cx_sy_zerodivide .
      WRITE:/5 'Division by 0 caught' .
 
  ENDTRY.

Simplytel verbrauchtes Datenvolumen anzeigen


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

Folgendes Skript erweitert den EGN (Einzelgesprächsnachweis) von Simplytel um zusätzliche Statistiken, wie das monatliche Datenvolumen.
Benötigt wird hierzu Firefox und das Firefox-Addon Greasemonkey.

Nach der Installation von Greasemonkey kann das Userscript installiert werden:
Simplytel-EGN-Userscript

Beim Aufrufen der EGN-Gesamtübersicht sollten nun zusätzliche Informationen angezeigt werden:

Eigene Schriftart auf Homepage einbinden


Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 1997

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2009

Warning: Illegal string offset 'status_txt' in /www/htdocs/w00cea89/woppr/wp-content/plugins/share-and-follow/share-and-follow.php on line 2036

Im folgenden Beispiel möchte ich zeigen wie eine eigene Schriftart in einer HTML-Datei eingebunden werden kann. Verwendet habe ich hierzu die Schriftart Waltograph. Das Resultat kann hier angesehen werden: Beispiel HTML-Datei mit eigenem Fonts.
Funktion wurde unter folgende Browsern getestet .

Browser: Ergebnis:
Firefox 3.6.12 funktionsfähig
Internet Explorer 8 Nicht funktionsfähig
Opera 10.10 funktionsfähig
Google Chrome 7.0.517.44 funktionsfähig

Code der CSS-Datei:

/* CSS Document */
@font-face {
  	font-family: "Waltograph";
  	src: url(waltograph42.otf) format("opentype");
}
body {
   padding:0;
   margin:0;
   text-align:center;
   font-family:Verdana, Arial, Helvetica;
   color:#666666;
   font-size:15px;
}
.meinFonts {
   padding:0;
   margin:0;
   text-align:center;
   font-family:'Waltograph',Verdana, Arial, Helvetica;
   color:#FF0000;
   font-size:30px;
}

Code der HTML-Datei:

<html>
  <head>
    <title>Hello HTML</title>
    <link rel="stylesheet" type="text/css" href="eigener_font.css">
  </head>
  <body>
    <div class="meinFonts">Da steh ich nun, ich armer Tor! und bin so klug als wie zuvor;</div>
    <p>heiße Magister, heiße Doktor gar, und ziehe schon an die zehen Jahr herauf,</p>
 
    <p>herab und quer und krumm meine Schüler an der Nase herum – </p>
    <p>und sehe, dass wir nichts wissen können!</p>
    <div class="meinFonts">Das will mir schier das Herz verbrennen!“</div>
  </body>
</html>

Hier noch die einzelnen Dateien zum Download:
Der verwendete Fonts: Waltograph
Lizenz des Fonts: Waltograph License
CSS-Datei: CSS
HTML-Seite: Beispiel HTML-Datei