text:
<compilationUnit>
  <typeDeclaration>
    <classOrInterfaceDeclaration>
      <classDeclaration>
        <normalClassDeclaration>
          <modifiers>
            <PUBLIC startline="1" startpos="0">public</PUBLIC>
          </modifiers>
          <CLASS startline="1" startpos="7">class</CLASS>
          <IDENTIFIER startline="1" startpos="13">Unicode</IDENTIFIER>
          <classBody>
            <LBRACE startline="1" startpos="21">{</LBRACE>
            <classBodyDeclaration>
              <memberDecl>
                <methodDeclaration>
                  <modifiers>
                    <PUBLIC startline="2" startpos="1">public</PUBLIC>
                    <STATIC startline="2" startpos="8">static</STATIC>
                  </modifiers>
                  <VOID startline="2" startpos="15">void</VOID>
                  <IDENTIFIER startline="2" startpos="20">main</IDENTIFIER>
                  <formalParameters>
                    <LPAREN startline="2" startpos="24">(</LPAREN>
                    <formalParameterDecls>
                      <normalParameterDecl>
                        <variableModifiers />
                        <type>
                          <classOrInterfaceType>
                            <IDENTIFIER startline="2" startpos="25">String</IDENTIFIER>
                          </classOrInterfaceType>
                          <LBRACKET startline="2" startpos="31">[</LBRACKET>
                          <RBRACKET startline="2" startpos="32">]</RBRACKET>
                        </type>
                        <IDENTIFIER startline="2" startpos="34">args</IDENTIFIER>
                      </normalParameterDecl>
                    </formalParameterDecls>
                    <RPAREN startline="2" startpos="38">)</RPAREN>
                  </formalParameters>
                  <block>
                    <LBRACE startline="2" startpos="40">{</LBRACE>
                    <blockStatement>
                      <statement>
                        <expression>
                          <conditionalExpression>
                            <conditionalOrExpression>
                              <conditionalAndExpression>
                                <inclusiveOrExpression>
                                  <exclusiveOrExpression>
                                    <andExpression>
                                      <equalityExpression>
                                        <instanceOfExpression>
                                          <relationalExpression>
                                            <shiftExpression>
                                              <additiveExpression>
                                                <multiplicativeExpression>
                                                  <unaryExpression>
                                                    <unaryExpressionNotPlusMinus>
                                                      <primary>
                                                        <IDENTIFIER startline="3" startpos="2">System</IDENTIFIER>
                                                        <DOT startline="3" startpos="8">.</DOT>
                                                        <IDENTIFIER startline="3" startpos="9">out</IDENTIFIER>
                                                        <DOT startline="3" startpos="12">.</DOT>
                                                        <IDENTIFIER startline="3" startpos="13">println</IDENTIFIER>
                                                        <identifierSuffix>
                                                          <arguments>
                                                            <LPAREN startline="3" startpos="20">(</LPAREN>
                                                            <expressionList>
                                                              <expression>
                                                                <conditionalExpression>
                                                                  <conditionalOrExpression>
                                                                    <conditionalAndExpression>
                                                                      <inclusiveOrExpression>
                                                                        <exclusiveOrExpression>
                                                                          <andExpression>
                                                                            <equalityExpression>
                                                                              <instanceOfExpression>
                                                                                <relationalExpression>
                                                                                <shiftExpression>
                                                                                <additiveExpression>
                                                                                <multiplicativeExpression>
                                                                                <unaryExpression>
                                                                                <unaryExpressionNotPlusMinus>
                                                                                <primary>
                                                                                <literal>
                                                                                <stringLiteral>
                                                                                <STRINGLITERAL startline="3" startpos="21">"\ua041\uab41\uad91\u0001"</STRINGLITERAL>
                                                                                </stringLiteral>
                                                                                </literal>
                                                                                </primary>
                                                                                </unaryExpressionNotPlusMinus>
                                                                                </unaryExpression>
                                                                                </multiplicativeExpression>
                                                                                </additiveExpression>
                                                                                </shiftExpression>
                                                                                </relationalExpression>
                                                                              </instanceOfExpression>
                                                                            </equalityExpression>
                                                                          </andExpression>
                                                                        </exclusiveOrExpression>
                                                                      </inclusiveOrExpression>
                                                                    </conditionalAndExpression>
                                                                  </conditionalOrExpression>
                                                                </conditionalExpression>
                                                              </expression>
                                                            </expressionList>
                                                            <RPAREN startline="3" startpos="47">)</RPAREN>
                                                          </arguments>
                                                        </identifierSuffix>
                                                      </primary>
                                                    </unaryExpressionNotPlusMinus>
                                                  </unaryExpression>
                                                </multiplicativeExpression>
                                              </additiveExpression>
                                            </shiftExpression>
                                          </relationalExpression>
                                        </instanceOfExpression>
                                      </equalityExpression>
                                    </andExpression>
                                  </exclusiveOrExpression>
                                </inclusiveOrExpression>
                              </conditionalAndExpression>
                            </conditionalOrExpression>
                          </conditionalExpression>
                        </expression>
                        <SEMI startline="3" startpos="48">;</SEMI>
                      </statement>
                    </blockStatement>
                    <blockStatement>
                      <statement>
                        <expression>
                          <conditionalExpression>
                            <conditionalOrExpression>
                              <conditionalAndExpression>
                                <inclusiveOrExpression>
                                  <exclusiveOrExpression>
                                    <andExpression>
                                      <equalityExpression>
                                        <instanceOfExpression>
                                          <relationalExpression>
                                            <shiftExpression>
                                              <additiveExpression>
                                                <multiplicativeExpression>
                                                  <unaryExpression>
                                                    <unaryExpressionNotPlusMinus>
                                                      <primary>
                                                        <IDENTIFIER startline="4" startpos="2">System</IDENTIFIER>
                                                        <DOT startline="4" startpos="8">.</DOT>
                                                        <IDENTIFIER startline="4" startpos="9">out</IDENTIFIER>
                                                        <DOT startline="4" startpos="12">.</DOT>
                                                        <IDENTIFIER startline="4" startpos="13">println</IDENTIFIER>
                                                        <identifierSuffix>
                                                          <arguments>
                                                            <LPAREN startline="4" startpos="20">(</LPAREN>
                                                            <expressionList>
                                                              <expression>
                                                                <conditionalExpression>
                                                                  <conditionalOrExpression>
                                                                    <conditionalAndExpression>
                                                                      <inclusiveOrExpression>
                                                                        <exclusiveOrExpression>
                                                                          <andExpression>
                                                                            <equalityExpression>
                                                                              <instanceOfExpression>
                                                                                <relationalExpression>
                                                                                <shiftExpression>
                                                                                <additiveExpression>
                                                                                <multiplicativeExpression>
                                                                                <unaryExpression>
                                                                                <unaryExpressionNotPlusMinus>
                                                                                <primary>
                                                                                <literal>
                                                                                <charLiteral>
                                                                                <CHARLITERAL startline="4" startpos="21">'\u0085'</CHARLITERAL>
                                                                                </charLiteral>
                                                                                </literal>
                                                                                </primary>
                                                                                </unaryExpressionNotPlusMinus>
                                                                                </unaryExpression>
                                                                                </multiplicativeExpression>
                                                                                </additiveExpression>
                                                                                </shiftExpression>
                                                                                </relationalExpression>
                                                                              </instanceOfExpression>
                                                                            </equalityExpression>
                                                                          </andExpression>
                                                                        </exclusiveOrExpression>
                                                                      </inclusiveOrExpression>
                                                                    </conditionalAndExpression>
                                                                  </conditionalOrExpression>
                                                                </conditionalExpression>
                                                              </expression>
                                                            </expressionList>
                                                            <RPAREN startline="4" startpos="29">)</RPAREN>
                                                          </arguments>
                                                        </identifierSuffix>
                                                      </primary>
                                                    </unaryExpressionNotPlusMinus>
                                                  </unaryExpression>
                                                </multiplicativeExpression>
                                              </additiveExpression>
                                            </shiftExpression>
                                          </relationalExpression>
                                        </instanceOfExpression>
                                      </equalityExpression>
                                    </andExpression>
                                  </exclusiveOrExpression>
                                </inclusiveOrExpression>
                              </conditionalAndExpression>
                            </conditionalOrExpression>
                          </conditionalExpression>
                        </expression>
                        <SEMI startline="4" startpos="30">;</SEMI>
                      </statement>
                    </blockStatement>
                    <blockStatement>
                      <statement>
                        <expression>
                          <conditionalExpression>
                            <conditionalOrExpression>
                              <conditionalAndExpression>
                                <inclusiveOrExpression>
                                  <exclusiveOrExpression>
                                    <andExpression>
                                      <equalityExpression>
                                        <instanceOfExpression>
                                          <relationalExpression>
                                            <shiftExpression>
                                              <additiveExpression>
                                                <multiplicativeExpression>
                                                  <unaryExpression>
                                                    <unaryExpressionNotPlusMinus>
                                                      <primary>
                                                        <IDENTIFIER startline="5" startpos="2">System</IDENTIFIER>
                                                        <DOT startline="5" startpos="8">.</DOT>
                                                        <IDENTIFIER startline="5" startpos="9">out</IDENTIFIER>
                                                        <DOT startline="5" startpos="12">.</DOT>
                                                        <IDENTIFIER startline="5" startpos="13">println</IDENTIFIER>
                                                        <identifierSuffix>
                                                          <arguments>
                                                            <LPAREN startline="5" startpos="20">(</LPAREN>
                                                            <expressionList>
                                                              <expression>
                                                                <conditionalExpression>
                                                                  <conditionalOrExpression>
                                                                    <conditionalAndExpression>
                                                                      <inclusiveOrExpression>
                                                                        <exclusiveOrExpression>
                                                                          <andExpression>
                                                                            <equalityExpression>
                                                                              <instanceOfExpression>
                                                                                <relationalExpression>
                                                                                <shiftExpression>
                                                                                <additiveExpression>
                                                                                <multiplicativeExpression>
                                                                                <unaryExpression>
                                                                                <unaryExpressionNotPlusMinus>
                                                                                <primary>
                                                                                <literal>
                                                                                <charLiteral>
                                                                                <CHARLITERAL startline="5" startpos="21">'\u2028'</CHARLITERAL>
                                                                                </charLiteral>
                                                                                </literal>
                                                                                </primary>
                                                                                </unaryExpressionNotPlusMinus>
                                                                                </unaryExpression>
                                                                                </multiplicativeExpression>
                                                                                </additiveExpression>
                                                                                </shiftExpression>
                                                                                </relationalExpression>
                                                                              </instanceOfExpression>
                                                                            </equalityExpression>
                                                                          </andExpression>
                                                                        </exclusiveOrExpression>
                                                                      </inclusiveOrExpression>
                                                                    </conditionalAndExpression>
                                                                  </conditionalOrExpression>
                                                                </conditionalExpression>
                                                              </expression>
                                                            </expressionList>
                                                            <RPAREN startline="5" startpos="29">)</RPAREN>
                                                          </arguments>
                                                        </identifierSuffix>
                                                      </primary>
                                                    </unaryExpressionNotPlusMinus>
                                                  </unaryExpression>
                                                </multiplicativeExpression>
                                              </additiveExpression>
                                            </shiftExpression>
                                          </relationalExpression>
                                        </instanceOfExpression>
                                      </equalityExpression>
                                    </andExpression>
                                  </exclusiveOrExpression>
                                </inclusiveOrExpression>
                              </conditionalAndExpression>
                            </conditionalOrExpression>
                          </conditionalExpression>
                        </expression>
                        <SEMI startline="5" startpos="30">;</SEMI>
                      </statement>
                    </blockStatement>
                    <blockStatement>
                      <statement>
                        <expression>
                          <conditionalExpression>
                            <conditionalOrExpression>
                              <conditionalAndExpression>
                                <inclusiveOrExpression>
                                  <exclusiveOrExpression>
                                    <andExpression>
                                      <equalityExpression>
                                        <instanceOfExpression>
                                          <relationalExpression>
                                            <shiftExpression>
                                              <additiveExpression>
                                                <multiplicativeExpression>
                                                  <unaryExpression>
                                                    <unaryExpressionNotPlusMinus>
                                                      <primary>
                                                        <IDENTIFIER startline="6" startpos="2">System</IDENTIFIER>
                                                        <DOT startline="6" startpos="8">.</DOT>
                                                        <IDENTIFIER startline="6" startpos="9">out</IDENTIFIER>
                                                        <DOT startline="6" startpos="12">.</DOT>
                                                        <IDENTIFIER startline="6" startpos="13">println</IDENTIFIER>
                                                        <identifierSuffix>
                                                          <arguments>
                                                            <LPAREN startline="6" startpos="20">(</LPAREN>
                                                            <expressionList>
                                                              <expression>
                                                                <conditionalExpression>
                                                                  <conditionalOrExpression>
                                                                    <conditionalAndExpression>
                                                                      <inclusiveOrExpression>
                                                                        <exclusiveOrExpression>
                                                                          <andExpression>
                                                                            <equalityExpression>
                                                                              <instanceOfExpression>
                                                                                <relationalExpression>
                                                                                <shiftExpression>
                                                                                <additiveExpression>
                                                                                <multiplicativeExpression>
                                                                                <unaryExpression>
                                                                                <unaryExpressionNotPlusMinus>
                                                                                <primary>
                                                                                <literal>
                                                                                <charLiteral>
                                                                                <CHARLITERAL startline="6" startpos="21">'\u2029'</CHARLITERAL>
                                                                                </charLiteral>
                                                                                </literal>
                                                                                </primary>
                                                                                </unaryExpressionNotPlusMinus>
                                                                                </unaryExpression>
                                                                                </multiplicativeExpression>
                                                                                </additiveExpression>
                                                                                </shiftExpression>
                                                                                </relationalExpression>
                                                                              </instanceOfExpression>
                                                                            </equalityExpression>
                                                                          </andExpression>
                                                                        </exclusiveOrExpression>
                                                                      </inclusiveOrExpression>
                                                                    </conditionalAndExpression>
                                                                  </conditionalOrExpression>
                                                                </conditionalExpression>
                                                              </expression>
                                                            </expressionList>
                                                            <RPAREN startline="6" startpos="29">)</RPAREN>
                                                          </arguments>
                                                        </identifierSuffix>
                                                      </primary>
                                                    </unaryExpressionNotPlusMinus>
                                                  </unaryExpression>
                                                </multiplicativeExpression>
                                              </additiveExpression>
                                            </shiftExpression>
                                          </relationalExpression>
                                        </instanceOfExpression>
                                      </equalityExpression>
                                    </andExpression>
                                  </exclusiveOrExpression>
                                </inclusiveOrExpression>
                              </conditionalAndExpression>
                            </conditionalOrExpression>
                          </conditionalExpression>
                        </expression>
                        <SEMI startline="6" startpos="30">;</SEMI>
                      </statement>
                    </blockStatement>
                    <RBRACE startline="7" startpos="1">}</RBRACE>
                  </block>
                </methodDeclaration>
              </memberDecl>
            </classBodyDeclaration>
            <RBRACE startline="8" startpos="0">}</RBRACE>
          </classBody>
        </normalClassDeclaration>
      </classDeclaration>
    </classOrInterfaceDeclaration>
  </typeDeclaration>
</compilationUnit>


text:
package com.google.gerrit.client.reviewdb;

import com.google.gwtorm.client.Access;
import com.google.gwtorm.client.OrmException;
import com.google.gwtorm.client.PrimaryKey;
import com.google.gwtorm.client.Query;
import com.google.gwtorm.client.ResultSet;

public interface AccountGroupMemberAccess extends
    Access<AccountGroupMember, AccountGroupMember.Key> {
  @PrimaryKey("key")
  AccountGroupMember get(AccountGroupMember.Key key) throws OrmException;

  @Query("WHERE key.accountId = ?")
  ResultSet<AccountGroupMember> byAccount(Account.Id id) throws OrmException;

  @Query("WHERE key.groupId = ?")
  ResultSet<AccountGroupMember> byGroup(AccountGroup.Id id) throws OrmException;
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title></title>


text:
set -e

srcroot=${srcroot:-$(dirname $(readlink -f "$0"))}

. "$srcroot/bootstrap-lib.sh"

chmod 755 /

adduser --home-dir /home/leela --shell /bin/sh leela || true
mkdir -p /home/leela
chown leela. /home/leela

rpm_install wget
if [ "$arch" = "i386" ]
then rpm_install_url epel-release http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
elif [ "$arch" = "amd64" ]
then rpm_install_url epel-release http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
fi
rpm_install cmake28 git rpmdevtools rpm-build pkgconfig


text:
> Source code for a Dropbox Paper template example.

[![Preview](https://user-images.githubusercontent.com/6137112/32421182-c55c3a76-c263-11e7-80ce-be7cb35efcc9.png)](https://codesandbox.io/s/github/francoischalifour/medium-zoom/tree/master/examples/dropbox-paper-template?view=preview)

## Usage

* Install dependencies: `yarn`
* Run: `yarn start`


text:
SOURCE /home/pcgeller/weirdo/dns.sql
SOURCE /home/pcgeller/weirdo/flows.sql
SOURCE /home/pcgeller/weirdo/proc.sql


text:
<!DOCTYPE html>

<meta charset="utf-8" />

Hello World!

	<form>
		<button id="button1" >End game</button>
	</form>


text:
package org.cirdles.squid.gui.dialogs;

import javafx.scene.control.Alert;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import javafx.stage.StageStyle;
import javafx.stage.Window;

import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.util.Optional;
import java.util.regex.Pattern;

/**
 * @author James Bowring
 */
public class SquidMessageDialog extends Alert {

    public SquidMessageDialog() {
        super(null);
    }

    //http://stackoverflow.com/questions/26341152/controlsfx-dialogs-deprecated-for-what/32618003#32618003
    public SquidMessageDialog(Alert.AlertType alertType, String message, String headerText, Window owner) {
        super(alertType);
        initOwner(owner);
        setTitle("Squid3 Alert");
        setContentText((message == null) ? "Unknown error ..." : message);
        setHeaderText(headerText);
        initStyle(StageStyle.DECORATED);
        int countOfNewLines = 1;
        if (message != null) {
            for (int i = 0; i < message.length(); i++) {
                countOfNewLines = countOfNewLines + (int) ((Character.compare(message.charAt(i), '\n') == 0) ? 1 : 0);
            }
        }
        getDialogPane().setPrefSize(750, 150 + countOfNewLines * 20);
        getDialogPane().setStyle(getDialogPane().getStyle() + ";-fx-font-family: SansSerif Bold;-fx-font-size: 15");
    }

    /**
     * @param message
     * @param owner
     */
    public static void showWarningDialog(String message, Window owner) {
        Alert alert = new SquidMessageDialog(Alert.AlertType.WARNING, message, "Squid3 warns you:", owner);
        alert.showAndWait();
    }

    /**
     * @param message
     * @param owner
     */
    public static void showInfoDialog(String message, Window owner) {
        Alert alert = new SquidMessageDialog(
                Alert.AlertType.INFORMATION,
                message,
                "Squid3 informs you:", owner);
        alert.showAndWait();
    }

    public static boolean showChoiceDialog(String message, Window owner) {
        Alert alert = new SquidMessageDialog(
                Alert.AlertType.CONFIRMATION,
                message,
                "Squid3 informs you:", owner);
        alert.getButtonTypes().setAll(ButtonType.NO, ButtonType.OK);
        Optional<ButtonType> result = alert.showAndWait();

        return (result.get() == ButtonType.OK);
    }

    public static void showSavedAsDialog(File file, Window owner) {
        if (file == null) {
            Alert dialog = new SquidMessageDialog(Alert.AlertType.WARNING,
                    "Path is null!",
                    "Check permissions ...",
                    owner);
            dialog.showAndWait();
        } else {
            Alert dialog = new SquidMessageDialog(Alert.AlertType.CONFIRMATION,
                    showLongfilePath(file.getAbsolutePath()),
                    (file.isDirectory() ? "Files saved in:" : "File saved as:"),
                    owner);
            ButtonType openButton = new ButtonType((file.isDirectory() ? "Open Directory" : "Open File"), ButtonBar.ButtonData.APPLY);
            dialog.getButtonTypes().setAll(openButton, ButtonType.OK);

            dialog.showAndWait().ifPresent(action -> {
                if (action == openButton) {
                    try {
                        Desktop.getDesktop().open(file);
                    } catch (IOException e) {
                    }
                }
            });
        }
    }

    public static String showLongfilePath(String path) {
        String retVal = "";
        String fileSeparatorPattern = Pattern.quote(File.separator);
        String[] pathParts = path.split(fileSeparatorPattern);
        for (int i = 0; i < pathParts.length; i++) {
            retVal += pathParts[i] + (i < (pathParts.length - 1) ? File.separator : "") + "\n";
            for (int j = 0; j < i; j++) {
                retVal += "  ";
            }
        }

        return retVal;
    }

}


text:
<TITLE>Review for Ulee's Gold (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Ulee's Gold (1997)

reviewed by
Seth Bookey

Ulee's Gold (1997)

In a summer with movies filled with explosions, chases, and stunts, it is
interesting to see a movie centered around a quiet beekeeper who faces an
equal amount of danger with grace and patience.

Peter Fonda might have gone down in film history best known for being
Henry Fonda's son and having been in a film that influenced a generation
(Easy Rider); but now he will have made an indellible impression on
anybody who sees Ulee's Gold. Fonda has mentioned in interviews that
he emulated his father when preparing for this role.

Ulysses Jackson spends his days and years as he always has; living in
central Florida, looking after his bees and keeping his family business
within the family. Ulee is raising two granddaughters--Casey and Penny.
Their father Jimmy is in jail and their mother, Helen, has left them to do
God only knows what in Orlando.

Life is humming along as it needs to until the sins of the son are visited
on the father as well as the rest of the clan. Ulysses winds up leaving
his bees at the most crucial time of the season when he is asked to go
retrieve Helen (Christine Dunford) from Orlando, where Eddie and
Ferris--two criminal associates of Jimmy's--have loaded her up on drugs,
or have taken advantage of her condition, and have discovered that Ulee
can find something they want. They make it clear that they will do harm to
the family if he doesn't comply.

Of course, all of this is a red herring. Much like The 39 Steps, Ulee
learns that no man is an island. Ulee is forced to realize that sometimes,
you need to accept help, and help others. Shut down since his wife
Penelope has died, Ulee finds that he is going to have to trust someone,
and that someone is his tenant Connie Hope (Patricia Richardson), a doctor
who helps detox his daughter-in-law. Even while a dangerous situation
exists, Ulee continues his backbreaking labors, but gets help from his
granddaughters and even his daughter-in-law, slowly, one by one

Great performances are turned out by all. It was great to see Patricia
Richardson do something beyond the limitations of her role as Tim Allen's
wife on Home Improvement. Especially wonderful is Vanessa Zima as the
younger granddaughter, Penny. An rather wonderful scene is her description
to her mother of how the bees are sometimes scared and fly off, and have
to be brought back. Watch for it.

The movie makes some wonderful use of dissolves and jump cuts; they really
accentuate the monotony and continuity of the life Ulee leads in swampy
rural Florida. If the film has any fault, it is sparing the expenses on
sound. Some dialogue seems to get lost between regional dialect and/or
mumbling. Other than that, writer/director Victor Nunez.

P.S.: You get two extra points if you can think of a classical story in
which Ulysses must leave the stalwart Penelope to help find the lost
Helen.

Copyright 1997 Seth J. Bookey, New York, NY 10021

http://www.geocities.com/Athens/Acropolis/8588/kino.html

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
<?php
namespace ApplicationTest\User;

use Psr\Log\LoggerInterface;

use Domain\Repository\UserRepositoryInterface;
use Domain\Service\IdentityGenerator;
use Domain\Service\HashingService;
use Domain\ValueObject\HashedPassword;

use Application\User\CreateUserInterface;
use Application\User\CreateUserRequest;
use Application\User\CreateUserResponse;
use Application\User\CreateUser;

class CreateUserTest extends \PHPUnit_Framework_TestCase
{
    private $users;
    private $hasher;
    private $hash;
    private $logger;
    private $request;

    protected function setUp()
    {
        $this->users = $this->getMockBuilder(UserRepositoryInterface::class)
            ->disableOriginalConstructor()
            ->getMock()
        ;

        $this->hasher = $this->getMockBuilder(HashingService::class)
            ->disableOriginalConstructor()
            ->getMock()
        ;

        $this->logger = $this->getMockBuilder(LoggerInterface::class)
            ->disableOriginalConstructor()
            ->getMock()
        ;

        $this->hash = $this->getMockBuilder(HashedPassword::class)
            ->disableOriginalConstructor()
            ->getMock()
        ;

        $this->request = $this->getMockBuilder(CreateUserRequest::class)
            ->disableOriginalConstructor()
            ->getMock()
        ;
    }

    /**
     * @group application
     */
    public function testCanBeConstructed()
    {
        $service = new CreateUser(
            $this->users,
            $this->hasher,
            $this->logger
        );

        self::assertInstanceOf(CreateUserInterface::class, $service);
    }

    /**
     * @group application
     */
    public function testCanBeInvokedWithRequest()
    {
        /* $this->request
            ->expects($this->once())
            ->method('email')
            ->will($this->returnValue('vasildakov@gmail.com'))
        ;

        $this->request
            ->expects($this->once())
            ->method('password')
            ->will($this->returnValue('vasildakov'))
        ;

        $this->hasher
            ->expects($this->once())
            ->method('__invoke')
            ->with('vasildakov')
            ->will($this->returnValue($this->hash))
        ;

        $service = new CreateUser(
            $this->users,
            $this->hasher,
            $this->logger
        );

        $response = $service($this->request);

        self::assertInstanceOf(CreateUserResponse::class, $response); */
    }
}


text:
(function() {
  var Promise, Role, RoleMapping, debug, isAdminUserFn, isArray, isRoleIn, registerAdminRole;

  Promise = require('bluebird');

  isArray = require('util-ex/lib/is/type/array');

  debug = require('debug')('loopback:security:role:super');

  registerAdminRole = function(Role, aRoleName, aIsAdminUserFn) {
    debug('register role resolver: %s', aRoleName);
    return Role.registerResolver(aRoleName, function(role, context, done) {
      var reject, resolve, vUserId;
      reject = function(err) {
        if (err) {
          return done(err);
        } else {
          return process.nextTick(function() {
            if (done) {
              done(null, false);
            }
          });
        }
      };
      resolve = function(result) {
        if (result == null) {
          result = true;
        }
        return process.nextTick(function() {
          if (done) {
            done(null, result);
          }
        });
      };
      vUserId = context.getUserId();
      debug('check the userId %s has the %s', vUserId, role);
      if (!vUserId) {
        reject();
      } else {
        aIsAdminUserFn(vUserId, aRoleName, function(err, result) {
          debug('isAdminUser: %s', result);
          if (err) {
            reject(err);
          } else {
            resolve(result);
          }
        });
      }
    });
  };

  isRoleIn = function(aAcls, aRoleName) {
    var acl, i, len;
    for (i = 0, len = aAcls.length; i < len; i++) {
      acl = aAcls[i];
      if (acl.principalType === 'ROLE' && acl.principalId === aRoleName) {
        return true;
      }
    }
    return false;
  };

  Role = null;

  RoleMapping = null;

  isAdminUserFn = function(aUserId, aRoleName, done) {
    return Role.findOne({
      where: {
        name: aRoleName
      }
    }).then(function(role) {
      return RoleMapping.findOne({
        where: {
          principalId: aUserId,
          roleId: role.id
        }
      });
    }).then(function(roleMapping) {
      done(null, !!roleMapping);
    })["catch"](function(err) {
      return done(err);
    });
  };

  module.exports = function(aApp, aOptions) {
    var Model, i, len, loopback, vAcls, vIsAdminUser, vModels, vName, vResult, vRoleName;
    loopback = aApp.loopback;
    Role = loopback.Role;
    RoleMapping = loopback.RoleMapping;
    vRoleName = (aOptions && aOptions.role) || '$admin';
    vIsAdminUser = (aOptions && aOptions.isAdminUserCallback) || isAdminUserFn;
    vModels = aOptions && aOptions.models;
    if (vModels === false) {
      vModels = [];
    }
    if (isArray(vModels)) {
      vResult = {};
      for (i = 0, len = vModels.length; i < len; i++) {
        vName = vModels[i];
        Model = aApp.models[vName];
        if (Model) {
          vResult[vName] = Model;
        }
      }
      vModels = vResult;
    } else {
      vModels = aApp.models;
    }
    Role = aApp.models.Role;
    registerAdminRole(Role, vRoleName, vIsAdminUser);
    for (vName in vModels) {
      Model = vModels[vName];
      vAcls = Model.settings.acls;
      if (!vAcls) {
        vAcls = Model.settings.acls = [];
      }
      if (!isRoleIn(vAcls, vRoleName)) {
        debug('enable superuser for Model %s', vName);
        vAcls.push({
          principalType: 'ROLE',
          principalId: vRoleName,
          permission: 'ALLOW'
        });
      }
    }
  };

}).call(this);

//# sourceMappingURL=admin-role.js.map


text:
define([], function(){
    return {
        // Enter your language definition here in the format:
        //
        // key: 'translation'
    };
});


text:
layout: page
title: About
---

Hello! I'm Abdi, I'm a [Data Scientist at Red Ninja Studios](http://www.redninja.co.uk), where I work on the [LiFE Project](http://www.redninja.co.uk/8mins2savelives/2017/04/24/the-core-of-any-disruptive-technology-are-real-people-red-ninja-lead-partners-of-life/).

 I have a background in Particle Physics research, and worked on the LHCb experiment at The European Organisation for Nuclear Research (CERN). You can learn more about my research [here](http://hep.ph.liv.ac.uk/~abdi).

I'm currently seeking new oppurtunities, my CV is [here](http://abdi.io/cv.html), or download a PDF version
[here](http://abdi.io/content/docs/Abdi_Noor_CV.pdf).


text:
+++
categories = ["experiment", "hpc"]
tags = ["config", "cuda", "parallel-computing", "gpu", "gcc"]
date = "2020-06-26"
title = "Installing CUDA 10.2 in Ubuntu 20.04"
type = "posts"
+++

Around last week I just bought a GPU for my PC. Actually, I intended to use it for speed up Persona 5 run on RPCS3. But it turned out the bottleneck is in the CPU itself. ~~And then I cried and rolled in the corner.~~ Suddenly, while playing with barely enough 30fps and 720p, I remembered having some side projects about RL. Okay 10series, it's time to work.

I started by downloading and installing latest version of CUDA toolkit (11.0) without driver. Thanks to Pop! OS for providing proprietary graphic drivers. After a while, I runned `nvidia-smi` that shows CUDA version 10.2. I expect it to be minimum CUDA version supported and ignore it.

After finishing installation and compiling samples successfully, the simplest sample `deviceQuery` showed an error.
```
code=35(cudaErrorInsufficientDriver)
```
Then, I looked again on [CUDA compatibility page](https://docs.nvidia.com/deploy/cuda-compatibility/index.html) and found out at least driver version 450.36 to run CUDA 11. Meanwhile my graphic uses driver version 440.84. Ok, fine.

Right there I downloaded again CUDA 10.2 (the second latest with supported driver version) and reran the installation. And then tried to compile and run samples again. Guess what? Now, the GCC version is not supported. What the funny!

After few searches, looks like the old CUDA 10.2 (it was released in late 2018) only knew GCC 8 and current Linux mainline (especially for my Pop 20.04) uses `build-essential` with GCC 9.3. But, it's bit too risky to downgrade GCC to 8. やばい

Looks like my luck still remains. I found similiar issues with somebody's library and they also reluctant to downgrade the GCC version because the ABI for C++ Boost they used did not provide backward compatibility. They're looking what issues may happened when they ran the CUDA 10.2 with GCC 9. They didn't find anything major and continue editing. After some modification, it turned out work perfectly fine. The samples then compiled and worked safe and sound.

For anyone encounter the same problem, here's the patch I use

{{< highlight diff >}}
--- /usr/local/cuda-10.2/include/crt/host_config.h      2020-06-26 14:53:37.947817611 +0000
+++ /usr/local/cuda-10.2/include/crt/host_config.h      2020-06-26 14:54:08.204086102 +0000
@@ -133,11 +133,11 @@

 #if defined(__GNUC__)

-#if __GNUC__ > 8
+#if __GNUC__ > 9

-#error -- unsupported GNU version! gcc versions later than 8 are not supported!
+#error -- unsupported GNU version! gcc versions later than 9 are not supported!

-#endif /* __GNUC__ > 8 */
+#endif /* __GNUC__ > 9 */

 #if defined(__clang__) && !defined(__ibmxl_vrm__) && !defined(__ICC) && !defined(__HORIZON__) && !defined(__APPLE__)
--- /usr/include/c++/9/bits/stl_function.h      2020-06-26 18:39:20.692976417 +0000
+++ /usr/include/c++/9/bits/stl_function.h      2020-06-26 18:37:56.744398062 +0000
@@ -414,7 +414,7 @@
       operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW
       {
 #if __cplusplus >= 201402L
-#ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(__CUDACC__)
        if (__builtin_is_constant_evaluated())
 #else
        if (__builtin_constant_p(__x > __y))
@@ -433,7 +433,7 @@
       operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW
       {
 #if __cplusplus >= 201402L
-#ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(__CUDACC__)
        if (__builtin_is_constant_evaluated())
 #else
        if (__builtin_constant_p(__x < __y))
@@ -452,7 +452,7 @@
       operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW
       {
 #if __cplusplus >= 201402L
-#ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(__CUDACC__)
        if (__builtin_is_constant_evaluated())
 #else
        if (__builtin_constant_p(__x >= __y))
@@ -471,7 +471,7 @@
       operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW
       {
 #if __cplusplus >= 201402L
-#ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if defined(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED) && !defined(__CUDACC__)
        if (__builtin_is_constant_evaluated())
 #else
        if (__builtin_constant_p(__x <= __y))
{{< /highlight >}}


text:
<md-dialog layout="column" style="max-width:50%;max-height:50%;">
    <md-toolbar flex="noshrink" layout-align="center center">

Player Character List

    </md-toolbar>
    <md-dialog-content class="md-padding" layout="row">

            <md-button ng-show="currentChar.dlOption" class="md-raised md-primary" ng-click="dlport()">Download</md-button>

                    {{charServer.name}} Characters

                        {{char.pcName}}

    </md-dialog-content>
</md-dialog>


text:
'use strict';

import WinJS = require('vs/base/common/winjs.base');
import Touch = require('vs/base/browser/touch');
import Events = require('vs/base/common/eventEmitter');
import Mouse = require('vs/base/browser/mouseEvent');
import Keyboard = require('vs/base/browser/keyboardEvent');
import { INavigator } from 'vs/base/common/iterator';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
import Event from 'vs/base/common/event';
import { IAction, IActionItem } from "vs/base/common/actions";
import { Color } from "vs/base/common/color";

export interface ITree extends Events.IEventEmitter {

	emit(eventType: string, data?: any): void;

	onDOMFocus: Event<void>;
	onDOMBlur: Event<void>;
	onHighlightChange: Event<void>;
	onDispose: Event<void>;

	/**
	 * Returns the tree's DOM element.
	 */
	getHTMLElement(): HTMLElement;

	/**
	 * Lays out the tree.
	 * Provide a specific height to save an (expensive) height computation.
	 */
	layout(height?: number): void;

	/**
	 * Notifies the tree that is has become visible.
	 */
	onVisible(): void;

	/**
	 * Notifies the tree that is has become hidden.
	 */
	onHidden(): void;

	/**
	 * Sets the input of the tree.
	 */
	setInput(element: any): WinJS.Promise;

	/**
	 * Returns the tree's input.
	 */
	getInput(): any;

	/**
	 * Sets DOM focus on the tree.
	 */
	DOMFocus(): void;

	/**
	 * Returns whether the tree has DOM focus.
	 */
	isDOMFocused(): boolean;

	/**
	 * Removes DOM focus from the tree.
	 */
	DOMBlur(): void;

	/**
	 * Refreshes an element.
	 * Provide no arguments and it will refresh the input element.
	 */
	refresh(element?: any, recursive?: boolean): WinJS.Promise;

	/**
	 * Refreshes all given elements.
	 */
	refreshAll(elements: any[], recursive?: boolean): WinJS.Promise;

	/**
	 * Expands an element.
	 * The returned promise returns a boolean for whether the element was expanded or not.
	 */
	expand(element: any): WinJS.Promise;

	/**
	 * Expands several elements.
	 * The returned promise returns a boolean array for whether the elements were expanded or not.
	 */
	expandAll(elements?: any[]): WinJS.Promise;

	/**
	 * Collapses an element.
	 * The returned promise returns a boolean for whether the element was collapsed or not.
	 */
	collapse(element: any, recursive?: boolean): WinJS.Promise;

	/**
	 * Collapses several elements.
	 * Provide no arguments and it will recursively collapse all elements in the tree
	 * The returned promise returns a boolean for whether the elements were collapsed or not.
	 */
	collapseAll(elements?: any[], recursive?: boolean): WinJS.Promise;

	/**
	 * Toggles an element's expansion state.
	 */
	toggleExpansion(element: any): WinJS.Promise;

	/**
	 * Toggles several element's expansion state.
	 */
	toggleExpansionAll(elements: any[]): WinJS.Promise;

	/**
	 * Returns whether an element is expanded or not.
	 */
	isExpanded(element: any): boolean;

	/**
	 * Returns a list of the currently expanded elements.
	 */
	getExpandedElements(): any[];

	/**
	 * Reveals an element in the tree. The relativeTop is a value between 0 and 1. The closer to 0 the more the
	 * element will scroll up to the top.
	 */
	reveal(element: any, relativeTop?: number): WinJS.Promise;

	/**
	 * Returns the relative top position of any given element, if visible.
	 * If not visible, returns a negative number or a number > 1.
	 * Useful when calling `reveal(element, relativeTop)`.
	 */
	getRelativeTop(element: any): number;

	/**
	 * Returns a number between 0 and 1 representing how much the tree is scroll down. 0 means all the way
	 * to the top; 1 means all the way down.
	 */
	getScrollPosition(): number;

	/**
	 * Sets the scroll position with a number between 0 and 1 representing how much the tree is scroll down. 0 means all the way
	 * to the top; 1 means all the way down.
	 */
	setScrollPosition(pos: number): void;

	/**
	 * Returns the total height of the tree's content.
	 */
	getContentHeight(): number;

	/**
	 * Sets the tree's highlight to be the given element.
	 * Provide no arguments and it clears the tree's highlight.
	 */
	setHighlight(element?: any, eventPayload?: any): void;

	/**
	 * Returns the currently highlighted element.
	 */
	getHighlight(includeHidden?: boolean): any;

	/**
	 * Returns whether an element is highlighted or not.
	 */
	isHighlighted(element: any): boolean;

	/**
	 * Clears the highlight.
	 */
	clearHighlight(eventPayload?: any): void;

	/**
	 * Selects an element.
	 */
	select(element: any, eventPayload?: any): void;

	/**
	 * Selects a range of elements.
	 */
	selectRange(fromElement: any, toElement: any, eventPayload?: any): void;

	/**
	 * Deselects a range of elements.
	 */
	deselectRange(fromElement: any, toElement: any, eventPayload?: any): void;

	/**
	 * Selects several elements.
	 */
	selectAll(elements: any[], eventPayload?: any): void;

	/**
	 * Deselects an element.
	 */
	deselect(element: any, eventPayload?: any): void;

	/**
	 * Deselects several elements.
	 */
	deselectAll(elements: any[], eventPayload?: any): void;

	/**
	 * Replaces the current selection with the given elements.
	 */
	setSelection(elements: any[], eventPayload?: any): void;

	/**
	 * Toggles the element's selection.
	 */
	toggleSelection(element: any, eventPayload?: any): void;

	/**
	 * Returns the currently selected elements.
	 */
	getSelection(includeHidden?: boolean): any[];

	/**
	 * Returns whether an element is selected or not.
	 */
	isSelected(element: any): boolean;

	/**
	 * Selects the next `count`-nth element, in visible order.
	 */
	selectNext(count?: number, clearSelection?: boolean, eventPayload?: any): void;

	/**
	 * Selects the previous `count`-nth element, in visible order.
	 */
	selectPrevious(count?: number, clearSelection?: boolean, eventPayload?: any): void;

	/**
	 * Selects the currently selected element's parent.
	 */
	selectParent(clearSelection?: boolean, eventPayload?: any): void;

	/**
	 * Clears the selection.
	 */
	clearSelection(eventPayload?: any): void;

	/**
	 * Sets the focused element.
	 */
	setFocus(element?: any, eventPayload?: any): void;

	/**
	 * Returns whether an element is focused or not.
	 */
	isFocused(element: any): boolean;

	/**
	 * Returns focused element.
	 */
	getFocus(includeHidden?: boolean): any;

	/**
	 * Focuses the next `count`-nth element, in visible order.
	 */
	focusNext(count?: number, eventPayload?: any): void;

	/**
	 * Focuses the previous `count`-nth element, in visible order.
	 */
	focusPrevious(count?: number, eventPayload?: any): void;

	/**
	 * Focuses the currently focused element's parent.
	 */
	focusParent(eventPayload?: any): void;

	/**
	 * Focuses the first child of the currently focused element.
	 */
	focusFirstChild(eventPayload?: any): void;

	/**
	 * Focuses the second element, in visible order.
	 */
	focusFirst(eventPayload?: any): void;

	/**
	 * Focuses the nth element, in visible order.
	 */
	focusNth(index: number, eventPayload?: any): void;

	/**
	 * Focuses the last element, in visible order.
	 */
	focusLast(eventPayload?: any): void;

	/**
	 * Focuses the element at the end of the next page, in visible order.
	 */
	focusNextPage(eventPayload?: any): void;

	/**
	 * Focuses the element at the beginning of the previous page, in visible order.
	 */
	focusPreviousPage(eventPayload?: any): void;

	/**
	 * Clears the focus.
	 */
	clearFocus(eventPayload?: any): void;

	/**
	 * Adds the trait to elements.
	 */
	addTraits(trait: string, elements: any[]): void;

	/**
	 * Removes the trait from elements.
	 */
	removeTraits(trait: string, elements: any[]): void;

	/**
	 * Toggles the element's trait.
	 */
	toggleTrait(trait: string, element: any): void;

	/**
	 * Returns whether the element has the trait or not.
	 */
	hasTrait(trait: string, element: any): boolean;

	/**
	 * Returns a navigator which allows to discover the visible and
	 * expanded elements in the tree.
	 */
	getNavigator(fromElement?: any, subTreeOnly?: boolean): INavigator<any>;

	/**
	 * Apply styles to the tree.
	 */
	style(styles: ITreeStyles): void;

	/**
	 * Disposes the tree
	 */
	dispose(): void;
}

export interface IDataSource {

	/**
	 * Returns the unique identifier of the given element.
	 * No more than one element may use a given identifier.
	 */
	getId(tree: ITree, element: any): string;

	/**
	 * Returns a boolean value indicating whether the element has children.
	 */
	hasChildren(tree: ITree, element: any): boolean;

	/**
	 * Returns the element's children as an array in a promise.
	 */
	getChildren(tree: ITree, element: any): WinJS.Promise;

	/**
	 * Returns the element's parent in a promise.
	 */
	getParent(tree: ITree, element: any): WinJS.Promise;

	/**
	 * Returns whether an element should be expanded when first added to the tree.
	 */
	shouldAutoexpand?(tree: ITree, element: any): boolean;
}

export interface IRenderer {

	/**
	 * Returns the element's height in the tree, in pixels.
	 */
	getHeight(tree: ITree, element: any): number;

	/**
	 * Returns a template ID for a given element. This will be used as an identifier
	 * for the next 3 methods.
	 */
	getTemplateId(tree: ITree, element: any): string;

	/**
	 * Renders the template in a DOM element. This method should render all the DOM
	 * structure for an hypothetical element leaving its contents blank. It should
	 * return an object bag which will be passed along to `renderElement` and used
	 * to fill in those blanks.
	 *
	 * You should do all DOM creating and object allocation in this method. It
	 * will be called only a few times.
	 */
	renderTemplate(tree: ITree, templateId: string, container: HTMLElement): any;

	/**
	 * Renders an element, given an object bag returned by `renderTemplate`.
	 * This method should do as little as possible and ideally it should only fill
	 * in the blanks left by `renderTemplate`.
	 *
	 * Try to make this method do as little possible, since it will be called very
	 * often.
	 */
	renderElement(tree: ITree, element: any, templateId: string, templateData: any): void;

	/**
	 * Disposes a template that was once rendered.
	 */
	disposeTemplate(tree: ITree, templateId: string, templateData: any): void;
}

export interface IAccessibilityProvider {

	/**
	 * Given an element in the tree, return the ARIA label that should be associated with the
	 * item. This helps screen readers to provide a meaningful label for the currently focused
	 * tree element.
	 *
	 * Returning null will not disable ARIA for the element. Instead it is up to the screen reader
	 * to compute a meaningful label based on the contents of the element in the DOM
	 *
	 * See also: https://www.w3.org/TR/wai-aria/states_and_properties#aria-label
	 */
	getAriaLabel(tree: ITree, element: any): string;
}

export /* abstract */ class ContextMenuEvent {

	private _posx: number;
	private _posy: number;
	private _target: HTMLElement;

	constructor(posx: number, posy: number, target: HTMLElement) {
		this._posx = posx;
		this._posy = posy;
		this._target = target;
	}

	public preventDefault(): void {
		// no-op
	}

	public stopPropagation(): void {
		// no-op
	}

	public get posx(): number {
		return this._posx;
	}

	public get posy(): number {
		return this._posy;
	}

	public get target(): HTMLElement {
		return this._target;
	}
}

export class MouseContextMenuEvent extends ContextMenuEvent {

	private originalEvent: Mouse.IMouseEvent;

	constructor(originalEvent: Mouse.IMouseEvent) {
		super(originalEvent.posx, originalEvent.posy, originalEvent.target);
		this.originalEvent = originalEvent;
	}

	public preventDefault(): void {
		this.originalEvent.preventDefault();
	}

	public stopPropagation(): void {
		this.originalEvent.stopPropagation();
	}
}

export class KeyboardContextMenuEvent extends ContextMenuEvent {

	private originalEvent: Keyboard.IKeyboardEvent;

	constructor(posx: number, posy: number, originalEvent: Keyboard.IKeyboardEvent) {
		super(posx, posy, originalEvent.target);
		this.originalEvent = originalEvent;
	}

	public preventDefault(): void {
		this.originalEvent.preventDefault();
	}

	public stopPropagation(): void {
		this.originalEvent.stopPropagation();
	}
}

export interface IController {

	/**
	 * Called when an element is clicked.
	 */
	onClick(tree: ITree, element: any, event: Mouse.IMouseEvent): boolean;

	/**
	 * Called when an element is requested for a context menu.
	 */
	onContextMenu(tree: ITree, element: any, event: ContextMenuEvent): boolean;

	/**
	 * Called when an element is tapped.
	 */
	onTap(tree: ITree, element: any, event: Touch.GestureEvent): boolean;

	/**
	 * Called when a key is pressed down while selecting elements.
	 */
	onKeyDown(tree: ITree, event: Keyboard.IKeyboardEvent): boolean;

	/**
	 * Called when a key is released while selecting elements.
	 */
	onKeyUp(tree: ITree, event: Keyboard.IKeyboardEvent): boolean;

	/**
	 * Called when a mouse button is pressed down on an element.
	 */
	onMouseDown?(tree: ITree, element: any, event: Mouse.IMouseEvent): boolean;

	/**
	 * Called when a mouse button goes up on an element.
	 */
	onMouseUp?(tree: ITree, element: any, event: Mouse.IMouseEvent): boolean;
}

export enum DragOverEffect {
	COPY,
	MOVE
}

export enum DragOverBubble {
	BUBBLE_DOWN,
	BUBBLE_UP
}

export interface IDragOverReaction {
	accept: boolean;
	effect?: DragOverEffect;
	bubble?: DragOverBubble;
	autoExpand?: boolean;
}

export const DRAG_OVER_REJECT: IDragOverReaction = { accept: false };
export const DRAG_OVER_ACCEPT: IDragOverReaction = { accept: true };
export const DRAG_OVER_ACCEPT_BUBBLE_UP: IDragOverReaction = { accept: true, bubble: DragOverBubble.BUBBLE_UP };
export const DRAG_OVER_ACCEPT_BUBBLE_DOWN = (autoExpand = false) => ({ accept: true, bubble: DragOverBubble.BUBBLE_DOWN, autoExpand });
export const DRAG_OVER_ACCEPT_BUBBLE_UP_COPY: IDragOverReaction = { accept: true, bubble: DragOverBubble.BUBBLE_UP, effect: DragOverEffect.COPY };
export const DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY = (autoExpand = false) => ({ accept: true, bubble: DragOverBubble.BUBBLE_DOWN, effect: DragOverEffect.COPY });

export interface IDragAndDropData {
	update(event: Mouse.DragMouseEvent): void;
	getData(): any;
}

export interface IDragAndDrop {

	/**
	 * Returns a uri if the given element should be allowed to drag.
	 * Returns null, otherwise.
	 */
	getDragURI(tree: ITree, element: any): string;

	/**
	 * Returns a label to display when dragging the element.
	 */
	getDragLabel?(tree: ITree, elements: any[]): string;

	/**
	 * Sent when the drag operation is starting.
	 */
	onDragStart(tree: ITree, data: IDragAndDropData, originalEvent: Mouse.DragMouseEvent): void;

	/**
	 * Returns a DragOverReaction indicating whether sources can be
	 * dropped into target or some parent of the target.
	 */
	onDragOver(tree: ITree, data: IDragAndDropData, targetElement: any, originalEvent: Mouse.DragMouseEvent): IDragOverReaction;

	/**
	 * Handles the action of dropping sources into target.
	 */
	drop(tree: ITree, data: IDragAndDropData, targetElement: any, originalEvent: Mouse.DragMouseEvent): void;
}

export interface IFilter {

	/**
	 * Returns whether the given element should be visible.
	 */
	isVisible(tree: ITree, element: any): boolean;
}

export interface IElementCallback {
	(tree: ITree, element: any): void;
}

export type ICallback = () => void;

export interface ISorter {

	/**
	 * Compare two elements in the viewer to define the sorting order.
	 */
	compare(tree: ITree, element: any, otherElement: any): number;
}

// Events

export interface ISelectionEvent {
	selection: any[];
	payload?: any;
}

export interface IFocusEvent {
	focus: any;
	payload?: any;
}

export interface IHighlightEvent {
	highlight: any;
	payload?: any;
}

// Options

export interface ITreeConfiguration {
	dataSource: IDataSource;
	renderer?: IRenderer;
	controller?: IController;
	dnd?: IDragAndDrop;
	filter?: IFilter;
	sorter?: ISorter;
	accessibilityProvider?: IAccessibilityProvider;
}

export interface ITreeOptions extends ITreeStyles {
	twistiePixels?: number;
	showTwistie?: boolean;
	indentPixels?: number;
	verticalScrollMode?: ScrollbarVisibility;
	alwaysFocused?: boolean;
	autoExpandSingleChildren?: boolean;
	useShadows?: boolean;
	paddingOnRow?: boolean;
	ariaLabel?: string;
	keyboardSupport?: boolean;
}

export interface ITreeStyles {
	listFocusBackground?: Color;
	listActiveSelectionBackground?: Color;
	listActiveSelectionForeground?: Color;
	listFocusAndSelectionBackground?: Color;
	listFocusAndSelectionForeground?: Color;
	listInactiveSelectionBackground?: Color;
	listHoverBackground?: Color;
	listDropBackground?: Color;
	listFocusOutline?: Color;
}

export interface ITreeContext extends ITreeConfiguration {
	tree: ITree;
	options: ITreeOptions;
}

export interface IActionProvider {

	/**
	 * Returns whether or not the element has actions. These show up in place right to the element in the tree.
	 */
	hasActions(tree: ITree, element: any): boolean;

	/**
	 * Returns a promise of an array with the actions of the element that should show up in place right to the element in the tree.
	 */
	getActions(tree: ITree, element: any): WinJS.TPromise<IAction[]>;

	/**
	 * Returns whether or not the element has secondary actions. These show up once the user has expanded the element's action bar.
	 */
	hasSecondaryActions(tree: ITree, element: any): boolean;

	/**
	 * Returns a promise of an array with the secondary actions of the element that should show up once the user has expanded the element's action bar.
	 */
	getSecondaryActions(tree: ITree, element: any): WinJS.TPromise<IAction[]>;

	/**
	 * Returns an action item to render an action.
	 */
	getActionItem(tree: ITree, element: any, action: IAction): IActionItem;
}


text:
using namespace llvm;

//===----------------------------------------------------------------------===//
//                              Generic Code
//===----------------------------------------------------------------------===//

/// Initialize - this method must be called before any actual lowering is
/// done.  This specifies the current context for codegen, and gives the
/// lowering implementations a chance to set up their default sections.
void TargetLoweringObjectFile::Initialize(MCContext &ctx,
                                          const TargetMachine &TM) {
  Ctx = &ctx;
  InitMCObjectFileInfo(TM.getTargetTriple(),
                       TM.getRelocationModel(), TM.getCodeModel(), *Ctx);
}

TargetLoweringObjectFile::~TargetLoweringObjectFile() {
}

static bool isSuitableForBSS(const GlobalVariable *GV, bool NoZerosInBSS) {
  const Constant *C = GV->getInitializer();

  // Must have zero initializer.
  if (!C->isNullValue())
    return false;

  // Leave constant zeros in readonly constant sections, so they can be shared.
  if (GV->isConstant())
    return false;

  // If the global has an explicit section specified, don't put it in BSS.
  if (!GV->getSection().empty())
    return false;

  // If -nozero-initialized-in-bss is specified, don't ever use BSS.
  if (NoZerosInBSS)
    return false;

  // Otherwise, put it in BSS!
  return true;
}

/// IsNullTerminatedString - Return true if the specified constant (which is
/// known to have a type that is an array of 1/2/4 byte elements) ends with a
/// nul value and contains no other nuls in it.  Note that this is more general
/// than ConstantDataSequential::isString because we allow 2 & 4 byte strings.
static bool IsNullTerminatedString(const Constant *C) {
  // First check: is we have constant array terminated with zero
  if (const ConstantDataSequential *CDS = dyn_cast<ConstantDataSequential>(C)) {
    unsigned NumElts = CDS->getNumElements();
    assert(NumElts != 0 && "Can't have an empty CDS");

    if (CDS->getElementAsInteger(NumElts-1) != 0)
      return false; // Not null terminated.

    // Verify that the null doesn't occur anywhere else in the string.
    for (unsigned i = 0; i != NumElts-1; ++i)
      if (CDS->getElementAsInteger(i) == 0)
        return false;
    return true;
  }

  // Another possibility: [1 x i8] zeroinitializer
  if (isa<ConstantAggregateZero>(C))
    return cast<ArrayType>(C->getType())->getNumElements() == 1;

  return false;
}

MCSymbol *TargetLoweringObjectFile::
getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
                        MachineModuleInfo *MMI) const {
  return Mang->getSymbol(GV);
}

void TargetLoweringObjectFile::emitPersonalityValue(MCStreamer &Streamer,
                                                    const TargetMachine &TM,
                                                    const MCSymbol *Sym) const {
}

/// getKindForGlobal - This is a top-level target-independent classifier for
/// a global variable.  Given an global variable and information from TM, it
/// classifies the global in a variety of ways that make various target
/// implementations simpler.  The target implementation is free to ignore this
/// extra info of course.
SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV,
                                                       const TargetMachine &TM){
  assert(!GV->isDeclaration() && !GV->hasAvailableExternallyLinkage() &&
         "Can only be used for global definitions");

  Reloc::Model ReloModel = TM.getRelocationModel();

  // Early exit - functions should be always in text sections.
  const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
  if (GVar == 0)
    return SectionKind::getText();

  // Handle thread-local data first.
  if (GVar->isThreadLocal()) {
    if (isSuitableForBSS(GVar, TM.Options.NoZerosInBSS))
      return SectionKind::getThreadBSS();
    return SectionKind::getThreadData();
  }

  // Variables with common linkage always get classified as common.
  if (GVar->hasCommonLinkage())
    return SectionKind::getCommon();

  // Variable can be easily put to BSS section.
  if (isSuitableForBSS(GVar, TM.Options.NoZerosInBSS)) {
    if (GVar->hasLocalLinkage())
      return SectionKind::getBSSLocal();
    else if (GVar->hasExternalLinkage())
      return SectionKind::getBSSExtern();
    return SectionKind::getBSS();
  }

  const Constant *C = GVar->getInitializer();

  // If the global is marked constant, we can put it into a mergable section,
  // a mergable string section, or general .data if it contains relocations.
  if (GVar->isConstant()) {
    // If the initializer for the global contains something that requires a
    // relocation, then we may have to drop this into a writable data section
    // even though it is marked const.
    switch (C->getRelocationInfo()) {
    case Constant::NoRelocation:
      // If the global is required to have a unique address, it can't be put
      // into a mergable section: just drop it into the general read-only
      // section instead.
      if (!GVar->hasUnnamedAddr())
        return SectionKind::getReadOnly();

      // If initializer is a null-terminated string, put it in a "cstring"
      // section of the right width.
      if (ArrayType *ATy = dyn_cast<ArrayType>(C->getType())) {
        if (IntegerType *ITy =
              dyn_cast<IntegerType>(ATy->getElementType())) {
          if ((ITy->getBitWidth() == 8 || ITy->getBitWidth() == 16 ||
               ITy->getBitWidth() == 32) &&
              IsNullTerminatedString(C)) {
            if (ITy->getBitWidth() == 8)
              return SectionKind::getMergeable1ByteCString();
            if (ITy->getBitWidth() == 16)
              return SectionKind::getMergeable2ByteCString();

            assert(ITy->getBitWidth() == 32 && "Unknown width");
            return SectionKind::getMergeable4ByteCString();
          }
        }
      }

      // Otherwise, just drop it into a mergable constant section.  If we have
      // a section for this size, use it, otherwise use the arbitrary sized
      // mergable section.
      switch (TM.getDataLayout()->getTypeAllocSize(C->getType())) {
      case 4:  return SectionKind::getMergeableConst4();
      case 8:  return SectionKind::getMergeableConst8();
      case 16: return SectionKind::getMergeableConst16();
      default: return SectionKind::getMergeableConst();
      }

    case Constant::LocalRelocation:
      // In static relocation model, the linker will resolve all addresses, so
      // the relocation entries will actually be constants by the time the app
      // starts up.  However, we can't put this into a mergable section, because
      // the linker doesn't take relocations into consideration when it tries to
      // merge entries in the section.
      if (ReloModel == Reloc::Static)
        return SectionKind::getReadOnly();

      // Otherwise, the dynamic linker needs to fix it up, put it in the
      // writable data.rel.local section.
      return SectionKind::getReadOnlyWithRelLocal();

    case Constant::GlobalRelocations:
      // In static relocation model, the linker will resolve all addresses, so
      // the relocation entries will actually be constants by the time the app
      // starts up.  However, we can't put this into a mergable section, because
      // the linker doesn't take relocations into consideration when it tries to
      // merge entries in the section.
      if (ReloModel == Reloc::Static)
        return SectionKind::getReadOnly();

      // Otherwise, the dynamic linker needs to fix it up, put it in the
      // writable data.rel section.
      return SectionKind::getReadOnlyWithRel();
    }
  }

  // Okay, this isn't a constant.  If the initializer for the global is going
  // to require a runtime relocation by the dynamic linker, put it into a more
  // specific section to improve startup time of the app.  This coalesces these
  // globals together onto fewer pages, improving the locality of the dynamic
  // linker.
  if (ReloModel == Reloc::Static)
    return SectionKind::getDataNoRel();

  switch (C->getRelocationInfo()) {
  case Constant::NoRelocation:
    return SectionKind::getDataNoRel();
  case Constant::LocalRelocation:
    return SectionKind::getDataRelLocal();
  case Constant::GlobalRelocations:
    return SectionKind::getDataRel();
  }
  llvm_unreachable("Invalid relocation");
}

/// SectionForGlobal - This method computes the appropriate section to emit
/// the specified global variable or function definition.  This should not
/// be passed external (or available externally) globals.
const MCSection *TargetLoweringObjectFile::
SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,
                 const TargetMachine &TM) const {
  // Select section name.
  if (GV->hasSection())
    return getExplicitSectionGlobal(GV, Kind, Mang, TM);

  // Use default section depending on the 'type' of global
  return SelectSectionForGlobal(GV, Kind, Mang, TM);
}

// Lame default implementation. Calculate the section name for global.
const MCSection *
TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
                                                 SectionKind Kind,
                                                 Mangler *Mang,
                                                 const TargetMachine &TM) const{
  assert(!Kind.isThreadLocal() && "Doesn't support TLS");

  if (Kind.isText())
    return getTextSection();

  if (Kind.isBSS() && BSSSection != 0)
    return BSSSection;

  if (Kind.isReadOnly() && ReadOnlySection != 0)
    return ReadOnlySection;

  return getDataSection();
}

/// getSectionForConstant - Given a mergable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
const MCSection *
TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const {
  if (Kind.isReadOnly() && ReadOnlySection != 0)
    return ReadOnlySection;

  return DataSection;
}

/// getTTypeGlobalReference - Return an MCExpr to use for a
/// reference to the specified global variable from exception
/// handling information.
const MCExpr *TargetLoweringObjectFile::
getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
                        MachineModuleInfo *MMI, unsigned Encoding,
                        MCStreamer &Streamer) const {
  const MCSymbolRefExpr *Ref =
    MCSymbolRefExpr::Create(Mang->getSymbol(GV), getContext());

  return getTTypeReference(Ref, Encoding, Streamer);
}

const MCExpr *TargetLoweringObjectFile::
getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding,
                  MCStreamer &Streamer) const {
  switch (Encoding & 0x70) {
  default:
    report_fatal_error("We do not support this DWARF encoding yet!");
  case dwarf::DW_EH_PE_absptr:
    // Do nothing special
    return Sym;
  case dwarf::DW_EH_PE_pcrel: {
    // Emit a label to the streamer for the current position.  This gives us
    // .-foo addressing.
    MCSymbol *PCSym = getContext().CreateTempSymbol();
    Streamer.EmitLabel(PCSym);
    const MCExpr *PC = MCSymbolRefExpr::Create(PCSym, getContext());
    return MCBinaryExpr::CreateSub(Sym, PC, getContext());
  }
  }
}


text:
layout: archive
permalink: /blog
---

{% for post in site.posts %}
  {% include post-preview.html %}
{% endfor %}


text:
    <meta charset="utf-8"  http-equiv="Content-Type" Content="application/x-plist;">
    <title>加勒比海盗企业内部发布渠道</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="shortcut icon" href="img/favicon_16.ico"/>
    <link rel="bookmark" href="img/favicon_16.ico"/>

    <link rel="stylesheet" href="css/site.min.css">

            <button data-target="#menu1" data-toggle="collapse" class="navbar-toggle" type="button">
              Toggle navigation

            </button>

首页

最新

>>帮助


text:
package com.github.acquized.retile.listeners;

import com.github.acquized.retile.ProjectRetile;
import com.github.acquized.retile.api.RetileAPIException;
import com.github.acquized.retile.notifications.Notifications;
import com.github.acquized.retile.reports.Report;

import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;

import java.util.concurrent.TimeUnit;

import static com.github.acquized.retile.i18n.I18n.tl;

public class PostLogin implements Listener {

    @EventHandler
    public void onPost(PostLoginEvent e) {
        ProxyServer.getInstance().getScheduler().schedule(ProjectRetile.getInstance(), () -> {
            if(e.getPlayer().hasPermission("projectretile.report.receive.offline")) {
                Report[] reports;
                try {
                    reports = ProjectRetile.getInstance().getApi().getWaitingReports();
                } catch (RetileAPIException ex) {
                    ProjectRetile.getInstance().getLog().error("Could not get Waiting Queue Reports.", ex);
                    return;
                }
                if(reports.length != 0) {
                    e.getPlayer().sendMessage(tl("ProjectRetile.Notifications.Report.Offline.Info"));
                }
            }
            if(e.getPlayer().hasPermission("projectretile.report.receive")) {
                Notifications.getInstance().setReceiving(e.getPlayer());
            }
        }, 2, TimeUnit.SECONDS); // Delayed because of UUID Delays
    }

}


text:
RestoreTrashcan.rb
==================

Usage
-----

1. Ensure that Ruby is installed
2. Install the `rest-client` library by running `gem install rest-client`
3. Edit `RestoreTrashcan.rb`:
   - Change the value of the `artifactory` variable to the url of your
     Artifactory server
   - Change the values of the `user_name` and `password` variables to the
     username and password of an admin user on your Artifactory server
4. Run `ruby RestoreTrashcan.rb`

This script will restore all artifacts from the trash, one artifact at a time.
If this is interrupted at any point, running the command again will start where
the process left off. The script will print one line for each artifact it has
attempted to restore, with the artifact's path and the response code from the
server. In the event of an error code, the response body will also be printed,
and the script will continue to the next artifact.


text:
package javax.naming.directory;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.NoSuchElementException;
import java.util.Vector;

import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;

/**
 * @author Tom Tromey (tromey@redhat.com)
 * @date June 20, 2001
 * @since 1.3
 */
public class BasicAttribute implements Attribute
{
  private static final long serialVersionUID = 6743528196119291326L;

  /** The ID of this attribute.  */
  protected String attrID;
  /** True if this attribute's values are ordered.  */
  protected boolean ordered;
  /** Values for this attribute.  */
  protected transient Vector<Object> values;

  // Used by cloning.
  private BasicAttribute ()
  {
  }

  public BasicAttribute (String id)
  {
    this (id, false);
  }

  public BasicAttribute (String id, boolean ordered)
  {
    attrID = id;
    this.ordered = ordered;
    values = new Vector<Object> ();
  }

  public BasicAttribute (String id, Object value)
  {
    this (id, value, false);
  }

  public BasicAttribute (String id, Object value, boolean ordered)
  {
    attrID = id;
    this.ordered = ordered;
    values = new Vector<Object> ();
    values.add (value);
  }

  public void add (int index, Object val)
  {
    if (! ordered && contains (val))
      throw new IllegalStateException ("value already in attribute");
    values.add (index, val);
  }

  public boolean add (Object val)
  {
    if (! ordered && contains (val))
      throw new IllegalStateException ("value already in attribute");
    return values.add (val);
  }

  public void clear ()
  {
    values.clear ();
  }

  public Object clone ()
  {
    BasicAttribute c = new BasicAttribute ();
    c.attrID = attrID;
    c.ordered = ordered;
    c.values = (Vector<Object>) values.clone ();
    return c;
  }

  public boolean contains (Object val)
  {
    for (int i = 0; i < values.size (); ++i)
      {
	if (equals (val, values.get (i)))
	  return true;
      }

    return false;
  }

  public boolean equals (Object obj)
  {
    if (! (obj instanceof BasicAttribute))
      return false;
    BasicAttribute b = (BasicAttribute) obj;

    if (ordered != b.ordered
	|| ! attrID.equals (b.attrID)
	|| values.size () != b.values.size ())
      return false;

    for (int i = 0; i < values.size (); ++i)
      {
	boolean ok = false;
	if (ordered)
	  ok = equals (values.get (i), b.values.get (i));
	else
	  {
	    for (int j = 0; j < b.values.size (); ++j)
	      {
		if (equals (values.get (i), b.values.get (j)))
		  {
		    ok = true;
		    break;
		  }
	      }
	  }

	if (! ok)
	  return false;
      }

    return true;
  }

  public Object get ()
    throws NamingException
  {
    if (values.size () == 0)
      throw new NoSuchElementException ("no values");
    return get (0);
  }

  public Object get (int index)
    throws NamingException
  {
    return values.get (index);
  }

  public NamingEnumeration<?> getAll ()
    throws NamingException
  {
    return new BasicAttributeEnumeration ();
  }

  public DirContext getAttributeDefinition ()
    throws OperationNotSupportedException, NamingException
  {
    throw new OperationNotSupportedException ();
  }

  public DirContext getAttributeSyntaxDefinition ()
    throws OperationNotSupportedException, NamingException
  {
    throw new OperationNotSupportedException ();
  }

  public String getID ()
  {
    return attrID;
  }

  public int hashCode ()
  {
    int val = attrID.hashCode ();
    for (int i = 0; i < values.size (); ++i)
      {
	Object o = values.get (i);
	if (o == null)
	  {
	    // Nothing.
	  }
	else if (o instanceof Object[])
	  {
	    Object[] a = (Object[]) o;
	    for (int j = 0; j < a.length; ++j)
	      val += a[j].hashCode ();
	  }
	else
	  val += o.hashCode ();
      }

    return val;
  }

  public boolean isOrdered ()
  {
    return ordered;
  }

  public Object remove (int index)
  {
    return values.remove (index);
  }

  public boolean remove (Object val)
  {
    for (int i = 0; i < values.size (); ++i)
      {
	if (equals (val, values.get (i)))
	  {
	    values.remove (i);
	    return true;
	  }
      }

    return false;
  }

  public Object set (int index, Object val)
  {
    if (! ordered && contains (val))
      throw new IllegalStateException ("value already in attribute");
    return values.set (index, val);
  }

  public int size ()
  {
    return values.size ();
  }

  public String toString ()
  {
    String r = attrID;
    for (int i = 0; i < values.size (); ++i)
      r += ";" + values.get (i).toString ();
    return r;
  }

  // This is used for testing equality of two Objects according to our
  // local rules.
  private boolean equals (Object one, Object two)
  {
    if (one == null)
      return two == null;

    if (one instanceof Object[])
      {
	if (! (two instanceof Object[]))
	  return false;

	Object[] aone = (Object[]) one;
	Object[] atwo = (Object[]) two;

	if (aone.length != atwo.length)
	  return false;

	for (int i = 0; i < aone.length; ++i)
	  {
	    if (! aone[i].equals (atwo[i]))
	      return false;
	  }

	return true;
      }

    return one.equals (two);
  }

  private void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    int size = s.readInt();
    values = new Vector<Object>(size);
    for (int i=0; i < size; i++)
      values.add(s.readObject());
  }

  private void writeObject(ObjectOutputStream s) throws IOException
  {
    s.defaultWriteObject();
    s.writeInt(values.size());
    for (int i=0; i < values.size(); i++)
      s.writeObject(values.get(i));
  }

  // Used when enumerating this attribute.
  private class BasicAttributeEnumeration implements NamingEnumeration
  {
    int where = 0;

    public BasicAttributeEnumeration ()
    {
    }

    public void close () throws NamingException
    {
    }

    public boolean hasMore () throws NamingException
    {
      return hasMoreElements ();
    }

    public Object next () throws NamingException
    {
      return nextElement ();
    }

    public boolean hasMoreElements ()
    {
      return where < values.size ();
    }

    public Object nextElement () throws NoSuchElementException
    {
      if (where == values.size ())
	throw new NoSuchElementException ("no more elements");
      return values.get (where++);
    }
  }
}