text:
#ifndef P_LIBTWINE_H_
# define P_LIBTWINE_H_                  1

# include <stdio.h>
# include <stdlib.h>
# include <ctype.h>
# include <dlfcn.h>
# include <errno.h>
# include <string.h>
# include <pthread.h>
# include <unistd.h>
# include <sys/types.h>
# include <sys/param.h>
# include <sys/stat.h>
# include <fcntl.h>
# include <curl/curl.h>
# include <libcluster.h>

# include "libsupport.h"

# define TWINE_USE_DEPRECATED_API       1

# include "libtwine-internal.h"

# define DEFAULT_MQ_URI                 "amqp://~0.0.0.0/amq.direct"

# define DEFAULT_CONFIG_PATH            SYSCONFDIR "/twine.conf"
# define DEFAULT_CONFIG_SECTION_NAME    "defaults"
# define DEFAULT_CONFIG_SECTION         DEFAULT_CONFIG_SECTION_NAME ":"
# define DEFAULT_CONFIG_SECTION_LEN     9

# define MIME_TURTLE                    "text/turtle"
# define MIME_NTRIPLES                  "application/n-triples"
# define MIME_NQUADS                    "application/n-quads"
# define MIME_NQUADS_OLD                "text/x-nquads"
# define MIME_RDFXML                    "application/rdf+xml"
# define MIME_TRIG                      "application/trig"
# define MIME_PLAIN                     "text/plain"
# define MIME_N3                        "text/n3"

typedef int (*twine_plugin_init_fn)(void);
typedef int (*twine_plugin_cleanup_fn)(void);

typedef enum
{
	TCB_NONE,
	TCB_INPUT,
	TCB_BULK,
	TCB_UPDATE,
	TCB_PROCESSOR,
	/* Legacy callback types */
	TCB_LEGACY_MIME,
	TCB_LEGACY_BULK,
	TCB_LEGACY_UPDATE,
	TCB_LEGACY_GRAPH
} twine_callback_type;

struct twine_legacy_mime_struct
{
	char *type;
	char *desc;
	twine_processor_fn fn;
};

struct twine_legacy_bulk_struct
{
	char *type;
	char *desc;
	twine_bulk_fn fn;
};

struct twine_legacy_graphproc_struct
{
	twine_preproc_fn fn;
	char *name;
};

struct twine_legacy_update_struct
{
	twine_update_fn fn;
	char *name;
};

struct twine_callback_struct
{
	twine_callback_type type;
	void *module;
	void *data;
	union
	{
		struct
		{
			char *type;
			char *desc;
			TWINEINPUTFN fn;
		} input;

		struct
		{
			char *type;
			char *desc;
			TWINEBULKFN fn;
		} bulk;

		struct
		{
			char *name;
			TWINEPROCESSORFN fn;
		} processor;

		struct
		{
			char *name;
			TWINEUPDATEFN fn;
		} update;

		struct twine_legacy_mime_struct legacy_mime;
		struct twine_legacy_bulk_struct legacy_bulk;
		struct twine_legacy_update_struct legacy_update;
		struct twine_legacy_graphproc_struct legacy_graph;
	} m;
};

struct twine_context_struct
{
	TWINE *prev;
	TWINELOGFN logger;
	librdf_world *world;
	TWINECONFIGFNS config;
	char *appname;
	size_t appnamelen;
	char *keybuf;
	size_t keybuflen;
	int sparql_debug;
	char *sparql_uri;
	char *sparql_query_uri;
	char *sparql_update_uri;
	char *sparql_data_uri;
	int allow_internal;
	int is_daemon;
	int plugins_enabled;
	CLUSTER *cluster;
	int cluster_enabled;
	CLUSTERJOB *job;
	void *plugin_current;
	struct twine_callback_struct *callbacks;
	size_t cbcount;
	size_t cbsize;
};

extern TWINE *twine_;

int twine_rdf_init_(TWINE *context);
int twine_rdf_cleanup_(TWINE *context);

int twine_graph_cleanup_(twine_graph *graph);
int twine_graph_process_(const char *name, twine_graph *graph);

int twine_plugin_init_(TWINE *context);
int twine_plugin_unload_all_(TWINE *context);
int twine_plugin_allow_internal_(TWINE *context, int);
struct twine_callback_struct *twine_plugin_callback_add_(TWINE *context, void *data);

int twine_workflow_init_(TWINE *context);
int twine_workflow_process_(twine_graph *graph);

int twine_preproc_process_(twine_graph *graph);
int twine_postproc_process_(twine_graph *graph);

int twine_sparql_init_(TWINE *context);

int twine_cluster_init_(TWINE *context);
int twine_cluster_ready_(TWINE *context);
int twine_cluster_done_(TWINE *context);

/* This can't be called twine_config_init_() because that's a legacy API */
int twine_config_setup_(TWINE *context);
int twine_config_ready_(TWINE *context);

#endif /*!P_LIBTWINE_H_*/


text:
package com.bluedot.commons.messages;

public interface MessageReceiver
{

	String getURN();

	void notify(Message message);

}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SyntacticDocs.Services
{
    public interface ISmsSender
    {
        Task SendSmsAsync(string number, string message);
    }
}


text:
<!DOCTYPE html>

  <title>Your page title here</title>
  <meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="blog-posts-stylesheet.css">

Intro to Version Control for the Noob

Makin' Copieeesss

08/01/2015

        Version control software, like Git, allows for collaboration between developers and provides a safeguard against introducing bugs into projects by storing previously working versions of the project that can be reverted to should
        something go wrong. This is acheived through branching, or making different versions that branch off of the working copy or master. The newer
        versions with added features, bug fixes, additions/deletions, etc., are only merged into the master copy if approved by someone on the team.

        The key to successful version control is keeping the master copy clean and bug-free. The master copy is the main
        branch where all approved branches (versions) are merged into. A collaborator begings by first making a copy of this
        master branch to store locally on their machines. Once they have made their changes locally, they "push" their
        modified version to GitHub for review by their team. Once approved, their version is merged into the master branch.

        This brings us to Git and GitHub. It's important to know that Git is software, and can be used for many projects
        other than code (spreadsheets, text documents, photos) with or without collaborators. But if you ARE collaborating on a project using Git, you and
        your team will need a place where your project(s) can be stored and accessed by your different team members. GitHub is once such place.

        Here's a quick and dirty overview of the workflow process using Git and GitHub:

Create a local Repo

Find the Repository (project) you'll be working on on GitHub.

Make an initial branch (copy) of this repo within GitHub using Fork

Now that you have the branch created online, you'll want to store it locally on your compter by using clone

Copy the URL of your forked repository

Fire up your terminal and paste this url after typing in the git command git clone

Now you have a local repository to work on.

Tracking Changes

Open terminal and cd to your saved repo.

Open your text editor and find your repo.

Make your changes in your text editor and save.

Back in terminal, type git status.

This will dsplay your changes to be added, which is a preliminary step to commit. "Adds" appear in green.</
          li>

Type in git statusagain. You'll see that your change is now yellow. This means it is ready to be committed.

Important: all "commits" need accompanying comments. To commit your change type git commit -m "your comment here".

Pushing and Pull Requests

Create a feature-branch by typing: git checkout -b feature-branch

Merge the two branches: git merge master

Push your changes to GitHub: git push origin feature-branch.

Go to GitHub and click and find the feature-branch you just pushed.

Click "Pull Request."

Click "Create Pull Request."

Click "Merge Pull Request."

Delete feature-branch.


text:
---

copyright:
  years: 2015, 2016
lastupdated: "2017-02-24"

---

{:shortdesc: .shortdesc}
{:new_window: target="_blank"}
{:codeblock: .codeblock}

#Systemzugriff
{: #system_access}

In diesen Abschnitten werden verschiedene Methoden der Erstellung und Verwaltung einer Serviceinstanz sowie verschiedene Möglichkeiten des Zugriffs und der Einrichtung des Zugriffs auf Ihre Systeme beschrieben.
{: shortdesc}

## REST-API-Nutzung in WebSphere Application Server in {{site.data.keyword.Bluemix_notm}}
{: #restapi_usage}

In WebSphere Application Server in {{site.data.keyword.Bluemix_notm}} werden Instanzen auf eine der folgenden Weisen erstellt, bereitgestellt, verwaltet und gelöscht:

* Über das {{site.data.keyword.Bluemix_notm}}-Katalog- und -Service-Dashboard in der {{site.data.keyword.Bluemix_notm}}-Benutzerschnittstelle.
* Durch die Erstellung einer Anwendung oder eines Scripts, die bzw. das die REST-konformen APIs nutzt.

Durch die Verwendung der mit Swagger 2.0 kompatiblen REST-APIs können Clients auf dieselben Funktionen zugreifen, die auch über das Portal und das Dashboard verfügbar sind. Weitere Informationen zu den unterstützten REST-APIs und Ressourcen finden Sie in der [REST-API-Dokumentation](https://wasaas-broker.ng.bluemix.net/wasaas-broker/api#/){: new_window} von WebSphere Application Server in {{site.data.keyword.Bluemix_notm}}. Für Beispielcode, der die Verwendung der REST-APIs darstellt, laden Sie die mittels Git gehosteten [REST-API-Beispiele](https://github.com/IBM-Bluemix/WebSphere-for-Bluemix-API-Usage){: new_window} für WebSphere Application Server in {{site.data.keyword.Bluemix_notm}} herunter.

**Hinweis:** Abhängig von der erstellten T-Shirt-Größe ist der Service nach der Erstellung einer Serviceinstanz möglicherweise nicht sofort einsatzbereit. Es wird empfohlen, das Feld **Status** der zurückgegebenen JSON-Daten abzufragen, um den aktuellen Status der Serviceinstanz festzustellen.

**Anmerkung:** Die in den [REST-API-Beispielen](https://github.com/IBM-Bluemix/WebSphere-for-Bluemix-API-Usage){: new_window} referenzierte **apiEndpoint**-URL zeigt auf die Region 'USA - Süden'. Bei der Arbeit mit anderen Regionen müssen Sie sicherstellen, dass Ihre Anwendung die enstprechende **apiEndpoint**-URL referenziert.

*Tabelle 1. API-Endpunkt-URLs für Implementierung der REST-API*

| **Regionsname** | **Geografischer Standort** | **Regionspräfix** | **API-Endpunkt-URL** |
|:-------------:|:----------:|:--------------:|:-------------:|
| USA - Süden | Dallas, TX, US | ng | https://wasaas-broker.ng.bluemix.net/wasaas-broker/api  |
| Vereinigtes Königreich | London, England | eu-gb | https://wasaas-broker.eu-gb.bluemix.net/wasaas-broker/api  |
| Sydney | Sydney, Australien | au-syd | https://wasaas-broker.au-syd.bluemix.net/wasaas-broker/api  |
| Frankfurt | Frankfurt, Deutschland | eu-de | https://wasaas-broker.eu-de.bluemix.net/wasaas-broker/api  |

## Service-Dashboard
{: #service_dashboard}

Nach der Erstellung der Serviceinstanz werden Sie zum Service-Dashboard weitergeleitet. Sie können jederzeit zum Service-Dashboard zurückkehren, indem Sie im Dashboard Ihrer Organisation auf das Servicesymbol klicken.
Über das Service-Dashboard haben Sie Zugriff auf Folgendes:

* Einen Link zu dieser Dokumentation.
* Einen Link zum Herunterladen der erforderlichen OpenVPN-Konfigurationsdateien.
* Die Möglichkeit, die virtuelle Maschine zu starten und zu stoppen. Die VM ist ursprünglich gestartet.
* Den Hostnamen.
* Den Namen des Benutzers mit Administratorberechtigungen und das Administratorkennwort.
* Einen privaten SSH-Schlüssel.
* Den Namen des Benutzers mit Administratorberechtigungen und das Administratorkennwort für WebSphere®.
* Die URLs für Admin Center und Admin Console.

**Hinweis**: Aufgrund einer bestimmten Menge an Rechen-, Speicher- und E/A-Ressourcen werden für Clients Gebühren für die Summe der virtuellen Maschinen im Status GESTOPPT mit einer reduzierten Rate von 5 % berechnet. Clients werden mit einer festen Anzahl von Instanzen im Status GESTOPPT mit maximal 10 IP-Adressen oder 64 GB Speicherplatz verwaltet.

## OpenVPN für WebSphere Application Server in Bluemix-Instanzen einrichten
{: #setup_openvpn}

Für den Zugriff auf virtuelle Maschinen in WebSphere Application Server in Bluemix ist OpenVPN erforderlich. Die Installation und Ausführung muss mit Administratorberechtigungen erfolgen.

### Befolgen Sie die folgenden Anweisungen zur Einrichtung von OpenVPN in Windows:

1. Laden Sie über den Link für den [openVPN-Windows-Download](http://swupdate.openvpn.org/community/releases/) Folgendes herunter:
  * [openvpn-install-2.3.4-I001-x86_64.exe](https://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I001-x86_64.exe){: new_window} für 64-Bit oder
  * [openvpn-install-2.3.4-I001-i686.exe](https://swupdate.openvpn.org/community/releases/openvpn-install-2.3.4-I001-i686.exe){: new_window} für 32-Bit.
2. Stellen Sie sicher, dass Sie die [Ausführung als Windows-Administrator](https://technet.microsoft.com/en-us/magazine/ff431742.aspx){: new_window} durchführen und openVPN installiert ist.
3. Laden Sie die VPN-Konfigurationsdateien über den OpenVPN-Download-Link der WebSphere Application Server in Bluemix-Instanz im Service-Dashboard herunter. Extrahieren Sie alle vier Dateien aus der komprimierten Datei in das Verzeichnis **{OpenVPN-Ausgangsverzeichnis}\config**. Beispiel:

    C:\Program Files\OpenVPN\Config

  {: codeblock}

4. Starten Sie das OpenVPN-Clientprogramm "OpenVPN GUI". Stellen Sie sicher, dass Sie zum Starten des Programms die Option zum [Ausführen als Windows-Administrator](https://technet.microsoft.com/en-us/magazine/ff431742.aspx){: new_window} ausgewählt haben. Ansonsten kann möglicherweise keine Verbindung hergestellt werden.

### Befolgen Sie die folgenden Anweisungen zur Einrichtung von OpenVPN in Linux:
1. Befolgen Sie für die Installation von OpenVPN die[Anweisungen](https://openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html){: new_window}.
  * Wenn Sie RPM Package Manager manuell herunterladen und installieren müssen, wechseln Sie zum Abschnitt zum [Herunterladen von OpenVPN für UNIX/Linux](https://openvpn.net/index.php/access-server/download-openvpn-as-sw.html){: new_window}. Hierbei benötigen Sie möglicherweise Unterstützung von Ihrem Linux-Administrator.
3. Laden Sie die VPN-Konfigurationsdateien über den OpenVPN-Download-Link der WebSphere Application Server in Bluemix-Instanz im Service-Dashboard herunter. Extrahieren Sie die Dateien in das Verzeichnis, in dem Sie den OpenVPN-Client starten möchten. Alle vier Dateien müssen sich im selben Verzeichnis befinden.
3. Starten Sie das OpenVPN-Clientprogramm. Öffnen Sie ein Terminalfenster und wechseln Sie in das Verzeichnis, in dem sich die Konfigurationsdateien befinden. Führen Sie den folgenden Befehl als Root aus:

      $ openvpn --config vt-wasaas-wasaas.ovpn

  {: codeblock}

### Befolgen Sie die folgenden Anweisungen zur Konfiguration von OpenVPN in Mac:
1. Eine Möglichkeit besteht darin, [Tunnelblick](https://tunnelblick.net/){: new_window} (ein Open-Source-Softwareprodukt) zu installieren.
2. Extrahieren Sie die VPN-Konfigurationsdateien über den WebSphere-Service. In Tunnelblick werden Sie dazu aufgefordert, Ihr Administratorkennwort für Mac einzugeben; die Konfiguration wird der Gruppe von VPNs, die Sie zum Herstellen einer Verbindung verwenden können, hinzugefügt.
3. Stellen Sie eine Verbindung zum VPN-Netz her und greifen Sie anschließend auf die virtuelle Maschine zu. Nach dem ersten Zugreifen wird die Konfiguration in [Tunnelblick](https://tunnelblick.net/){: new_window} im Cache gespeichert und Sie können eine Verbindung über Tunnelblick herstellen. Für einen einfachen Zugriff können Sie in der oberen Menüleiste ein entsprechendes Symbol einfügen.

## Mithilfe von SSH auf VMs in WebSphere Application Server in Bluemix zugreifen
{: #using_ssh}

In diesen Anweisungen wird vorausgesetzt, dass Sie OpenSSH als Client verwenden. OpenSSH ist in der Regel unter Linux oder unter Windows in Cygwin verfügbar. Es kann auch so installiert werden, dass es in der Windows-Eingabeaufforderung ausgeführt werden kann.

Geben Sie den folgenden Befehl ein, um die Installation von OpenSSH zu prüfen:
  ```
      $ ssh -V
  ```
  {: codeblock}

Die folgende Nachricht ist ein Beispiel für die Antwort:
  ```
      OpenSSH_6.6p1, OpenSSL 1.0.1g 7 Apr 2014
  ```
  {: codeblock}

Befolgen Sie die folgenden Anweisungen zur Einrichtung von SSH-Zugriff auf Ihre WebSphere Application Server in Bluemix-VMs:

1. Lesen Sie die Warnung, die angezeigt wird, wenn Sie das erste Mal eine Verbindung herstellen: "The authenticity of host x.x.x.x cannot be established." Diese Nachricht ist normal. Wählen Sie bei der entsprechenden Eingabeaufforderung 'yes' aus. Der öffentliche Schlüssel wurde für den Benutzer 'virtuser' nun auf Ihrer VM installiert.
2. Melden Sie sich mithilfe des privaten Schlüssels als 'virtuser' an. Die besten Ergebnisse erzielen Sie mit dieser Authentifizierungsmethode.
3. Kopieren Sie den Inhalt des privaten Schlüssels in eine Datei.
4. Führen Sie den folgenden Befehl aus:

    $ ssh virtuser@169.53.246.xxx -i /path/privateKeyFileName

  {: codeblock}

5. Für eine vollständige Berechtigung des Tys 'sysadmin' müssen Sie mithilfe des folgenden Befehls den 'virtuser' nach 'root' wechseln:

    $ sudo su root

  {: codeblock}

6. Für den Fall, dass beim Zugreifen auf das System mit dem privaten SSH-Schlüssel Probleme auftreten, wird das Rootkennwort bereitgestellt. Melden Sie sich mithilfe des folgenden Befehls als Root an und geben Sie das Kennwort an.

    $ ssh root@169.53.246.x

  {: codeblock}

7. Unabhängig davon, ob Sie mit dem privaten SSH-Schlüssel oder dem Rootkennwort auf das System zugreifen, sollten Sie das Rootkennwort unverzüglich ändern.
8. Sie können Ihre SSH-Befehle vereinfachen, indem Sie im Verzeichnis %HOME%\.ssh eine Datei mit dem Namen "config" erstellen. Beispiel:

   Host VM1
      Hostname 169.53.246.xxx
      User virtuser
      IdentityFile /path/privateKeyFileName

  {: codeblock}

9. Führen Sie "ssh VM1" aus, um als Benutzer virtuser eine Verbindung herzustellen.

## Systempfade
{: #system_paths}

* Die Liberty Profile-Befehle können über */opt/IBM/WebSphere/Liberty/bin* abgesetzt werden.
* Die Position des Liberty Profile-Serverprofils ist */opt/IBM/WebSphere/Profiles/Liberty/servers/server1*.
* Die klassischen WebSphere Application Server-Befehle können über */opt/IBM/WebSphere/AppServer/bin* abgesetzt werden.
* Die klassische WebSphere Application Server-Profilposition für den Server ist */opt/IBM/WebSphere/Profiles/DefaultAppSrv01/servers/server1*.

## Links zu Admin Center und Admin Console verwenden
{: #console_links}

Wenn Sie auf den Link zu Admin Center oder Admin Console klicken, wird möglicherweise eine Warnung zu einer nicht vertrauenswürdigen Verbindung angezeigt. Der Wortlaut der Nachricht kann je nach Browser unterschiedlich sein. Das gilt auch für die Schritte zum Umgehen oder Beheben der Warnung.

Da Sie die von {{site.data.keyword.IBM}} bereitgestellten Links verwenden, können Sie diese Meldung ohne Bedenken ignorieren und eine Verbindung herstellen. Wenn in Ihrem Browser angeboten wird, eine Sicherheitsausnahme zu speichern, können Sie damit am einfachsten verhindern, dass diese Warnung künftig erneut angezeigt wird.

Sie können das eingehende Unterzeichnerzertifikat auch exportieren und anschließend als Trusted-Root-Zertifikat in Ihren Browser importieren. Für diese Option müssen Sie in der Datei *hosts*, in der die IP-Adresse der VM dem allgemeinen Namen des Zertifikatsausstellers zugeordnet ist, einen entsprechenden Eintrag vornehmen. Dieser Name hat das folgende Format: wl<pureapplication.ibmcloud.com. Wenn Sie in der URL nun den Hostnamen anstelle der IP-Adresse verwenden, können Sie eine saubere Verbindung herstellen. Anschließend müssen Sie über den Hostnamen statt über die IP-Adresse in der URL auf das Admin Center oder die Administrationskonsole zugreifen.

Kunden installieren häufig eigene Stammzertifikate für Anwendungen, die sie externalisieren. Weitere Informationen finden Sie im IBM Knowledge Center von [WebSphere Application Server](http://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/tsec_securecomm.html?cp=SSEQTP_8.5.5%2F1-11-2-6&lang=en){: new_window} oder von [Liberty Core](http://www.ibm.com/support/knowledgecenter/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/ae/twlp_sec_comm.html?lang=en){: new_window}.

## Firewall-Ports
{: #firewall_ports}

Möglicherweise ist es erforderlich, an der Firewall Ports zu öffnen, um den Zugriff auf Anwendungen und Datenbanken zuzulassen.
  * Auf jedem Knoten von WebSphere Application Server in Bluemix finden Sie im Verzeichnis WAS_HOME/virtual/bin das Script openFirewallPorts.sh.
  * Auf jedem Host eines Liberty-Verbunds finden Sie im Verzeichnis WAS_HOME/virtual/bin das Script openFirewallPorts.sh.

Syntax:
  ```
      $ openFirewallPorts.sh -ports <PORT>:<PROTOCOL>,... -persist true|false
  ```
  {: codeblock}

* PORT ist eine Portnummer.
* PROTOCOL ist entweder TCP oder UDP.
* -persist ist entweder auf 'true' oder 'false' eingestellt.

Wenn Sie mehrere Ports angeben möchten, müssen Sie diese mit einem Komma (,) voneinander trennen.

**Anmerkung**: 'sport' und 'dport' des Ports werden in den Abschnitten INPUT und OUTPUT der Firewall geöffnet. Dieses Script muss mithilfe von 'sudo' als Root ausgeführt werden. Sie können auch IP-Tabellen (iptables) direkt ändern.

## Web-Server konfigurieren
{: #configure_webserver}

Bei der Bereitstellung einer Zelle oder eines Verbunds erhalten Sie eine vorkonfigurierte Umgebung. Im Falle einer klassischen Network Deployment-Zelle erhalten Sie beispielsweise die folgende Umgebung:

* Einen Deployment Manager, der zu Entwicklungs- und Testzwecken mit IBM HTTP Server kollokiert wird.

* Einen in Deployment Manager integrierten angepassten Knoten.

* Der Deployment Manager, der IHS-Server und der Knotenagent befinden sich bei der Erstbereitstellung im Status 'Gestartet'.

Wenn der Web-Server alle Benutzeranforderungen verarbeiten soll, muss das Plug-in nach der Bereitstellung der Anwendung möglicherweise generiert und weitergegeben werden.

**Störungen vermeiden:** Stellen Sie sicher, dass die folgenden vorausgesetzten Tasks ausgeführt wurden, bevor Sie das Plug-in generieren und weitergeben:

* Stellen Sie in einer lokalen Windows-, Linux- oder MAC-Umgebung sicher, dass [openVPN](systemAccess.html#setup_openvpn) konfiguriert und gestartet ist und Sie mit der entsprechenden Region verbunden sind.

* Klicken Sie im Service-Dashboard von WebSphere Application Server in {{site.data.keyword.Bluemix_notm}} auf **Administrationskonsole öffnen** und melden Sie sich mit 'wsadmin' und dem im Service-Dashboard angegebenen Administratorkennwort an.

* In der Administrationskonsole müssen Sie einen Anwendungsserver (z. B. ***server1***) erstellen, da ein leerer angepasster Knoten in den Deployment Manager integriert ist.

* Starten Sie den erstellten Server.

* Stellen Sie während der Anwendungsinstallation sicher, dass die Module der Anwendung dem gestarteten Server und dem Web-Server zugeordnet werden (z. B. ***webserver1***).

Bei den folgenden allgemeinen Schritten wird davon ausgegangen, dass die vorausgesetzten Tasks ausgeführt wurden:

1. Generieren Sie das Plug-in in der Administrationskonsole mithilfe der Option 'Umgebung':
   1. Wählen Sie 'Umgebung > Globale Webserver-Plug-in-Konfiguration aktualisieren' aus.
   2. Klicken Sie auf **OK** oder auf **Überschreiben**, um eine neue Plug-in-Konfigurationsdatei zu generieren.
2. Kopieren Sie das Plug-in im Deployment Manager in die Web-Server-Konfiguration:

  ```
   cp /opt/IBM/WebSphere/Profiles/DefaultDmgr01/config/cells/plugin-cfg.xml /opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml
  ```
  {: codeblock}
3. Bearbeiten Sie **httpd.conf** in **IHS_HOME/conf** (z. B. */opt/IBM/WebSphere/HTTPServer/conf*) und stellen Sie sicher, dass die folgenden beiden Zeilen vorhanden sind:

    ```
    LoadModule was_ap22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so
    WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml
    ```
    {: codeblock}
4. Öffnen Sie die Ports mit den folgenden beiden Befehlen:

  ```
   export serverPorts=2810:TCP,2810:UDP,8880:TCP,8880:UDP,9101:TCP,9101:UDP,9061:TCP,9061:UDP,9080:TCP,9080:UDP,9354:TCP,9354:UDP,9044:TCP,9044:UDP,9443:TCP,9443:UDP,5060:TCP,5060:UDP,5061:TCP,5061:UDP,11005:TCP,11005:UDP,11007:TCP,11007:UDP,9633:TCP,9633:UDP,7276:TCP,7276:UDP,7286:TCP,7286:UDP,5558:TCP,5558:UDP,5578:TCP,5578:UDP

   sudo /opt/IBM/WebSphere/AppServer/virtual/bin/openFirewallPorts.sh -ports $serverPorts -persist true
  ```
    {: codeblock}
5. Stoppen und starten Sie den Web-Server mit den folgenden beiden Befehlen:
    ```
    sudo /opt/IBM/WebSphere/HTTPServer/bin/apachectl -k stop
    sudo /opt/IBM/WebSphere/HTTPServer/bin/apachectl -k start
    ```
    {: codeblock}
8. Greifen Sie über das Plug-in auf die Anwendung zu:
  ```
   http://169.53.246.xxx/contextRoot/
  ```
  {: codeblock}

**Anmerkung:** Die hier beschriebenen Schritte stellen nur eine Möglichkeit unter vielen zur Konfiguration eines Web-Servers dar. Weitere Unterstützung finden Sie im [IBM Knowledge Center](https://www.ibm.com/support/knowledgecenter/search/configure%20web%20server?scope=SSAW57_9.0.0){: new_window}.

**Anmerkung:** Wenn Sie nicht auf die Anwendung zugreifen können, gibt es in der Firewall wahrscheinlich ein Portzugriffsproblem. Deshalb muss möglicherweise einer der folgenden Server erneut gestartet werden: Anwendungsserver, Knotenagent, Web-Server oder Deployment Manager. Darüber hinaus besteht die Möglichkeit, dass Sie auf das Service-Dashboard von WebSphere Application Server in {{site.data.keyword.Bluemix_notm}} zugreifen und die einzelnen virtuellen Maschinen erneut starten müssen.

## SSL-Konfiguration
{: #ssl_configuration}

Der klassische WebSphere Application Server und Liberty Profile sind mit dem Protokoll [SSL_TLSv2](https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.security.component.80.doc/security-component/jsse2Docs/protocols.html){: new_window} konfiguriert. Modifizieren Sie zum Ändern des Protokolls die folgenden Dateien:

Für den klassischen WebSphere Application Server:

1. Öffnen Sie **security.xml** in '/opt/IBM/WebSphere/Profiles/*profilname*/config/cell/*zellenname*' zur Bearbeitung und ändern Sie die folgende Zeile:

  ```
  sslProtocol="SSL_TLSv2"
  ```
{: codeblock}

2. Öffnen Sie **ssl.client.props** in '/opt/IBM/WebSphere/Profiles/*profilname*/properties' zur Bearbeitung und ändern Sie die folgende Zeile:

  ```
  com.ibm.ssl.protocol=SSL_TLSv2
  ```
{: codeblock}

Für Liberty Profile:

1. Öffnen Sie **server.xml** in '/opt/IBM/WebSphere/Profiles/Liberty/servers/server1' zur Bearbeitung und ändern Sie die folgende Zeile im SSL-Konfigurationselement 'defaultSSLConfig':

  ```
  sslProtocol="SSL_TLSv2"
  ```
{: codeblock}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>statsmodels.nonparametric.kernel_regression.KernelReg.r_squared — statsmodels v0.10.2 documentation</title>
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />

    <link rel="shortcut icon" href="../_static/statsmodels_hybi_favico.ico"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="statsmodels.nonparametric.kernel_regression.KernelReg.sig_test" href="statsmodels.nonparametric.kernel_regression.KernelReg.sig_test.html" />
    <link rel="prev" title="statsmodels.nonparametric.kernel_regression.KernelReg.fit" href="statsmodels.nonparametric.kernel_regression.KernelReg.fit.html" />
<link rel="stylesheet" href="../_static/examples.css" type="text/css" />
<link rel="stylesheet" href="../_static/facebox.css" type="text/css" />

Navigation

          index

          modules |

          next |

          previous |

Install
  |

Support
  |

Bugs
  |

Develop
  |

Examples
  |

FAQ
  |

Nonparametric Methods nonparametric |

statsmodels.nonparametric.kernel_regression.KernelReg |

statsmodels.nonparametric.kernel_regression.KernelReg.r_squared¶

method

KernelReg.r_squared()[source]¶

Returns the R-Squared for the nonparametric regression.

Notes

For more details see p.45 in [2]
The R-Squared is calculated by:

\[R^{2}=\frac{\left[\sum_{i=1}^{n}
(Y_{i}-\bar{y})(\hat{Y_{i}}-\bar{y}\right]^{2}}{\sum_{i=1}^{n}
(Y_{i}-\bar{y})^{2}\sum_{i=1}^{n}(\hat{Y_{i}}-\bar{y})^{2}},\]

where \(\hat{Y_{i}}\) is the mean calculated in fit at the exog
points.

Previous topic

statsmodels.nonparametric.kernel_regression.KernelReg.fit

Next topic

statsmodels.nonparametric.kernel_regression.KernelReg.sig_test

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>

        © Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.
      Created using Sphinx 2.2.1.


text:
package metrics

import (
	"context"
	"errors"
	"fmt"
	"strings"
	"unicode/utf8"

	"agones.dev/agones/pkg/util/runtime"
	"contrib.go.opencensus.io/exporter/stackdriver"
	"go.opencensus.io/stats"
	"go.opencensus.io/tag"
)

var (
	logger = runtime.NewLoggerWithSource("metrics")

	keyName       = MustTagKey("name")
	keyNamespace  = MustTagKey("namespace")
	keyFleetName  = MustTagKey("fleet_name")
	keyType       = MustTagKey("type")
	keyStatusCode = MustTagKey("status_code")
	keyVerb       = MustTagKey("verb")
	keyEndpoint   = MustTagKey("endpoint")
	keyEmpty      = MustTagKey("empty")
)

func recordWithTags(ctx context.Context, mutators []tag.Mutator, ms ...stats.Measurement) {
	if err := stats.RecordWithTags(ctx, mutators, ms...); err != nil {
		logger.WithError(err).Warn("error while recoding stats")
	}
}

// MustTagKey creates a new `tag.Key` from a string, panic if the key is not a valid.
func MustTagKey(key string) tag.Key {
	t, err := tag.NewKey(key)
	if err != nil {
		panic(err)
	}
	return t
}

func parseLabels(s string) (*stackdriver.Labels, error) {
	res := &stackdriver.Labels{}
	if s == "" {
		return res, nil
	}
	pairs := strings.Split(s, ",")
	for _, p := range pairs {
		keyValue := strings.Split(p, "=")
		if len(keyValue) != 2 {
			return nil, fmt.Errorf("invalid labels: %s, expect key=value,key2=value2", s)
		}
		key := strings.TrimSpace(keyValue[0])
		value := strings.TrimSpace(keyValue[1])

		if key == "" {
			return nil, errors.New("invalid key: can not be empty")
		}

		if value == "" {
			return nil, fmt.Errorf("invalid value for key %s: can not be empty", key)
		}

		if !utf8.ValidString(key) {
			return nil, fmt.Errorf("invalid key: %s, must be a valid utf-8 string", key)
		}

		if !utf8.ValidString(value) {
			return nil, fmt.Errorf("invalid value: %s, must be a valid utf-8 string", value)
		}

		res.Set(key, value, "")
	}
	return res, nil
}


text:
<?php
/**
 * @var \app\modules\store\models\StoreOrder $order
 * @var \app\modules\store\models\StoreOrderProduct[] $orderItems
 * @var \app\modules\store\models\StoreOrderProduct $orderItem
 */
use app\modules\store\models\StoreProduct;
use yii\helpers\Html;
use yii\helpers\Url;

?>

<?php
echo Html::tag('p', 'Новый заказ на сайте #' . $order->id);

echo Html::beginTag('table', ['style' => 'border: 1px solid black; width:100%; border-collapse:collapse;']);
echo Html::beginTag('thead');
echo Html::beginTag('tr');
echo Html::tag('td', 'Артикул', ['style' => 'border: 1px solid black;']);
echo Html::tag('td', 'Название', ['style' => 'border: 1px solid black;']);
echo Html::tag('td', 'Кол-во, шт', ['style' => 'border: 1px solid black;']);
echo Html::tag('td', 'Цена, грн.', ['style' => 'border: 1px solid black;']);
echo Html::tag('td', 'Общая цена, грн.', ['style' => 'border: 1px solid black;']);
echo Html::endTag('tr');
echo Html::endTag('thead');
foreach ($orderItems as $orderItem) {

    $price = $orderItem->product->getPrice();
    $label = Html::a(
        $orderItem->product->label,
        Url::to(
            StoreProduct::getProductUrl(['alias' => $orderItem->product->alias]),
            true
        )
    );

    echo Html::beginTag('tr');
    echo Html::tag('td', $orderItem->sku, ['style' => 'border: 1px solid black;']);
    echo Html::tag('td', $label, ['style' => 'border: 1px solid black;']);
    echo Html::tag('td', $orderItem->qnt, ['style' => 'border: 1px solid black;']);
    echo Html::tag('td', $price, ['style' => 'border: 1px solid black;']);
    echo Html::tag('td', $price * $orderItem->qnt, ['style' => 'border: 1px solid black;']);
    echo Html::endTag('tr');
}
echo Html::endTag('table');
echo Html::tag('p', 'Всего: ' . $order->sum. ' грн.');
echo Html::tag('p', Html::tag('strong', 'Информация о заказе:'));

echo Html::tag('p', 'Имя: ' . $order->name);
echo Html::tag('p', 'Телефон: ' . $order->phone);
echo Html::tag('p', 'Email: ' . $order->email);
echo Html::tag('p', 'Оплата: ' . \common\models\StoreOrder::getPaymentType($order->payment_type));
echo Html::tag('p', 'Доставка: ' . \common\models\StoreOrder::getDeliveryType($order->delivery_type));
echo Html::tag('p', 'Улица: ' . $order->street);
echo Html::tag('p', 'Дом: ' . $order->house);
echo Html::tag('p', 'Квартира: ' . $order->apartment);
echo Html::tag('p', 'Склад Новой почты: ' . $order->nova_poshta_storage);
echo Html::tag('p', 'Комментарий: ' . $order->comment);


text:
package com.github.automain.vo;

public class BreadcrumbVO {

    // 父级菜单ID
    private Long parentId;

    // 菜单名称
    private String menuName;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    @Override
    public String toString() {
        return "BreadcrumbVO{" +
                "parentId=" + parentId +
                ", menuName='" + menuName + '\'' +
                '}';
    }
}


text:
package organisations

import (
	"fmt"
	"reflect"
	"testing"

	"github.com/Financial-Times/annotations-rw-neo4j/annotations"
	"github.com/Financial-Times/neo-utils-go/neoutils"
	"github.com/Financial-Times/up-rw-app-api-go/rwapi"
	"github.com/jmcvetta/neoism"
	"github.com/stretchr/testify/assert"
)

const (
	fullOrgUUID                = "4e484678-cf47-4168-b844-6adb47f8eb58"
	privateOrgUUID             = "9e01380d-ac20-48a4-b187-88dc57f37e48"
	minimalOrgUUID             = "33f93f25-3301-417e-9b20-50b27d215617"
	oddCharOrgUUID             = "5bb679d7-334e-4d51-a676-b1a10daaab38"
	dupeLeiIdentifierOrgUUID   = "fbe74159-f4a0-4aa0-9cca-c2bbb9e8bffe"
	dupeOtherIdentifierOrgUUID = "4b89a949-a032-4114-9a8c-f59c37170d65"
	parentOrgUUID              = "de38231e-e481-4958-b470-e124b2ef5a34"
	industryClassificationUUID = "c3d17865-f9d1-42f2-9ca2-4801cb5aacc0"
	fsIdentifier               = "identifierValue"
	fsIdentifierMinimal        = "identifierMinimalValue"
	fsIdentifierOther          = "identifierOtherValue"
	fsIdentifierAnother        = "anotherIdentifierValue"
	leiCodeIdentifier          = "leiCodeIdentifier"
	tmeIdentifier              = "tmeIdentifier"
	tmeIdentifierAnother       = "tmeIdentifierAnother"
)

var uuidsToClean = []string{fullOrgUUID, privateOrgUUID, minimalOrgUUID, oddCharOrgUUID, dupeLeiIdentifierOrgUUID, dupeOtherIdentifierOrgUUID, industryClassificationUUID, parentOrgUUID, contentUUID}

var fullOrg = organisation{
	UUID: fullOrgUUID,
	Type: PublicCompany,
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{fullOrgUUID},
		TME:               []string{tmeIdentifier},
		FactsetIdentifier: fsIdentifier,
		LeiCode:           leiCodeIdentifier,
	},
	ProperName:             "Proper Name",
	PrefLabel:              "Pref label",
	LegalName:              "Legal Name",
	ShortName:              "Short Name",
	HiddenLabel:            "Hidden Label",
	FormerNames:            []string{"Old Name, inc.", "Older Name, inc."},
	TradeNames:             []string{"Old Trade Name, inc.", "Older Trade Name, inc."},
	LocalNames:             []string{"Oldé Name, inc.", "Tradé Name"},
	Aliases:                []string{"alias1", "alias2", "alias3"},
	ParentOrganisation:     parentOrgUUID,
	IndustryClassification: industryClassificationUUID,
}

var privateOrg = organisation{
	UUID: privateOrgUUID,
	Type: Organisation,
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{privateOrgUUID},
		TME:               []string{tmeIdentifierAnother},
		FactsetIdentifier: fsIdentifierAnother,
		LeiCode:           leiCodeIdentifier,
	},
	ProperName:             "Proper Name Ltd.",
	LegalName:              "Legal Name Ltd.",
	ShortName:              "Short Name Ltd.",
	HiddenLabel:            "Hidden Label Ltd.",
	FormerNames:            []string{"Old Name Ltd., Ltd.", "Older Name, Ltd.."},
	TradeNames:             []string{"Old Trade Name Ltd., Ltd..", "Older Trade Name Ltd., Ltd.."},
	LocalNames:             []string{"Oldé Name Ltd., Ltd..", "Tradé Name Ltd."},
	Aliases:                []string{"alias1", "alias2", "alias3"},
	IndustryClassification: industryClassificationUUID,
}

var minimalOrg = organisation{
	UUID: minimalOrgUUID,
	Type: Organisation,
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{minimalOrgUUID},
		FactsetIdentifier: fsIdentifierMinimal,
		TME:               []string{},
	},
	ProperName: "Minimal Org Proper Name",
}

var dupeLeiIdentifierOrg = organisation{
	UUID: dupeLeiIdentifierOrgUUID,
	Type: Company,
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{dupeLeiIdentifierOrgUUID},
		FactsetIdentifier: fsIdentifierOther,
		LeiCode:           leiCodeIdentifier,
		TME:               []string{},
	},
	ProperName: "Dupe Identifier Proper Name",
}

var dupeOtherIdentifierOrg = organisation{
	UUID: dupeOtherIdentifierOrgUUID,
	Type: Company,
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{dupeOtherIdentifierOrgUUID},
		TME:               []string{tmeIdentifier},
		FactsetIdentifier: fsIdentifierOther,
	},
	ProperName: "Dupe Identifier Proper Name",
}

var oddCharOrg = organisation{
	UUID:       oddCharOrgUUID,
	Type:       Company,
	ProperName: "TBWA\\Paling Walters Ltd.",
	AlternativeIdentifiers: alternativeIdentifiers{
		UUIDS:             []string{oddCharOrgUUID},
		FactsetIdentifier: fsIdentifier,
		LeiCode:           leiCodeIdentifier,
		TME:               []string{},
	},
	ParentOrganisation: parentOrgUUID,
	ShortName:          "TBWA\\Paling Walters",
	FormerNames:        []string{"Paling Elli$ Cognis Ltd.", "Paling Ellis\\/ Ltd.", "Paling Walters Ltd.", "Paling Walter/'s Targis Ltd."},
	HiddenLabel:        "TBWA PALING WALTERS LTD",
}

func TestWriteNewOrganisation(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))

	storedOrg, _, err := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err)
	assert.NotEmpty(storedOrg)
}

func TestWriteWillUpdateOrg(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(minimalOrg, "TEST_TRANS_ID"))

	storedOrg, _, _ := cypherDriver.Read(minimalOrgUUID, "TEST_TRANS_ID")

	assert.Empty(storedOrg.(organisation).HiddenLabel, "Minimal org should not have a hidden label value.")

	updatedOrg := organisation{
		UUID: minimalOrgUUID,
		Type: Organisation,
		AlternativeIdentifiers: alternativeIdentifiers{
			FactsetIdentifier: fsIdentifier,
			TME:               []string{},
			UUIDS:             []string{},
		},
		ProperName:  "Updated Name",
		HiddenLabel: "No longer hidden",
	}

	assert.NoError(cypherDriver.Write(updatedOrg, "TEST_TRANS_ID"))

	storedUpdatedOrg, _, _ := cypherDriver.Read(minimalOrgUUID, "TEST_TRANS_ID")

	assert.Equal(updatedOrg, storedUpdatedOrg, "org should have been updated")
	assert.NotEmpty(storedUpdatedOrg.(organisation).HiddenLabel, "Updated org should have a hidden label value")
}

func TestWritesOrgsWithEscapedCharactersInfields(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(oddCharOrg, "TEST_TRANS_ID"))

	storedOrg, found, err := cypherDriver.Read(oddCharOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err, "Error finding organisation for uuid %s", oddCharOrgUUID)
	assert.True(found, "Didn't find organisation for uuid %s", oddCharOrgUUID)

	assert.True(reflect.DeepEqual(oddCharOrg, storedOrg), fmt.Sprintf("organisations should be the same \n EXPECTED  %+v \n ACTUAL  %+v", oddCharOrg, storedOrg))
}

// This currently can happen as we currently don't support the lifecycle of an organisation
// For example "Bobs Burgers Ltd." spends money on applying for an LEI code and then floats and effectively becomes a
// new organisation "Bobs Burgers Plc." and rather than spend money again on getting an LEI just uses the one it applied
// for as "Bobs Burgers Ltd." Until we deal with this lifecycle we should retain the relationship to both orgs
func TestWritesTwoOrgsWithTheSameLegalEntityIdentifier(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))
	assert.NoError(cypherDriver.Write(privateOrg, "TEST_TRANS_ID"))

	_, found, err := cypherDriver.Read(privateOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err, "Error finding organisation for uuid %s", privateOrgUUID)
	assert.True(found, "Didn't find organisation for uuid %s", privateOrgUUID)

	_, found2, err2 := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err2, "Error finding organisation for uuid %s", fullOrgUUID)
	assert.True(found2, "Didn't find organisation for uuid %s", fullOrgUUID)
}

func TestReadOrganisation(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))

	storedOrg, found, err := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err, "Error finding organisation for uuid %s", fullOrgUUID)
	assert.True(found, "Didn't find organisation for uuid %s", fullOrgUUID)

	assert.True(reflect.DeepEqual(fullOrg, storedOrg), fmt.Sprintf("organisations should be the same \n EXPECTED  %+v \n ACTUAL  %+v", fullOrg, storedOrg))
}

func TestDeleteNothing(t *testing.T) {
	assert := assert.New(t)
	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	defer cleanDB(db, t, assert, uuidsToClean)

	cypherDriver := getCypherDriver(db)
	res, err := cypherDriver.Delete(fullOrgUUID, "TEST_TRANS_ID")

	assert.NoError(err)
	assert.False(res)
}

func TestDeleteWillRemoveNodeAndAllAssociatedIfNoExtraRelationships(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.Nil(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))

	found, err := cypherDriver.Delete(fullOrgUUID, "TEST_TRANS_ID")
	assert.NoError(err)
	assert.True(found, "Didn't find organisation for uuid %s", fullOrgUUID)

	o, found, err := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")

	assert.Equal(organisation{}, o, "Found organisation %v which should have been deleted", o)
	assert.False(found, "Found organisation for uuid %v which should have been deleted", fullOrgUUID)
	assert.NoError(err, "Error trying to find organisation for uuid %v", fullOrgUUID)
	assert.Equal(false, doesThingExistAtAll(fullOrgUUID, db, t, assert), "Found thing which should have been deleted with uuid %v", fullOrgUUID)
}

func TestDeleteWillMaintainExternalRelationshipsOnThingNodeIfRelationshipsExist(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.Nil(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))

	//add external relationship(one not maintained by this service)
	v2AnnotationsRW := annotations.NewCypherAnnotationsService(cypherDriver.conn)
	writeJSONToService(v2AnnotationsRW, "./test-resources/singleAnnotationForFullOrg.json", contentUUID, assert)
	found, err := cypherDriver.Delete(fullOrgUUID, "TEST_TRANS_ID")
	assert.True(found, "Didnt manage to delete organisation for uuid %v", fullOrgUUID)
	assert.NoError(err, "Error deleting organisation for uuid %v", fullOrgUUID)

	o, found, err := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")

	assert.Equal(organisation{}, o, "Found organisation %v which should have been deleted", o)
	assert.False(found, "Found organisation for uuid %v which should have been deleted", fullOrgUUID)
	assert.NoError(err, "Error trying to find organisation for uuid %v", fullOrgUUID)
	assert.Equal(true, doesThingExistWithIdentifiers(fullOrgUUID, db, t, assert), "Found no trace of organisation which had relationships and thus should still exist as a thing %v", fullOrgUUID)
}

// Temporary solution, until the organisation lifecycle will be correctly managed.
func TestToCheckYouCanCreateOrganisationWithDuplicateLeiIdentifier(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)
	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))
	err := cypherDriver.Write(dupeLeiIdentifierOrg, "TEST_TRANS_ID")
	assert.Nil(err)

	_, found, err := cypherDriver.Read(fullOrgUUID, "TEST_TRANS_ID")
	assert.NoError(err, "Error finding organisation for uuid %s", fullOrgUUID)
	assert.True(found, "Didn't find organisation for uuid %s", fullOrgUUID)

	_, found, err = cypherDriver.Read(dupeLeiIdentifierOrgUUID, "TEST_TRANS_ID")
	assert.NoError(err, "Error finding organisation for uuid %s", dupeLeiIdentifierOrgUUID)
	assert.True(found, "Didn't find organisation for uuid %s", dupeLeiIdentifierOrgUUID)
}

// The uniqueness constraint is valid for tme, factset and upp identifiers/*
func TestToCheckYouCanNotCreateOrganisationWithDuplicateIdentifier(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)
	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))
	err := cypherDriver.Write(dupeOtherIdentifierOrg, "TEST_TRANS_ID")
	assert.Error(err)
	assert.IsType(rwapi.ConstraintOrTransactionError{}, err)
}

func TestCount(t *testing.T) {
	assert := assert.New(t)

	db := getDatabaseConnectionAndCheckClean(t, assert, uuidsToClean)
	cypherDriver := getCypherDriver(db)
	defer cleanDB(db, t, assert, uuidsToClean)

	assert.NoError(cypherDriver.Write(minimalOrg, "TEST_TRANS_ID"))
	assert.NoError(cypherDriver.Write(fullOrg, "TEST_TRANS_ID"))

	count, err := cypherDriver.Count()
	assert.NoError(err)
	assert.Equal(2, count)
}

func doesThingExistAtAll(uuid string, db neoutils.NeoConnection, t *testing.T, assert *assert.Assertions) bool {
	result := []struct {
		Uuid string `json:"thing.uuid"`
	}{}

	checkGraph := neoism.CypherQuery{
		Statement: `
			MATCH (a:Thing {uuid: "%v"}) return a.uuid
		`,
		Parameters: neoism.Props{
			"uuid": uuid,
		},
		Result: &result,
	}

	err := db.CypherBatch([]*neoism.CypherQuery{&checkGraph})
	assert.NoError(err)
	assert.Empty(result)

	if len(result) == 0 {
		return false
	}

	return true
}

func doesThingExistWithIdentifiers(uuid string, db neoutils.NeoConnection, t *testing.T, assert *assert.Assertions) bool {

	result := []struct {
		UUID string `json:"UUID"`
	}{}

	checkGraph := neoism.CypherQuery{
		Statement: `
			MATCH (a:Thing {uuid: {Uuid}})-[:IDENTIFIES]-(:Identifier)
			RETURN distinct a.uuid as UUID
		`,
		Parameters: neoism.Props{
			"Uuid": uuid,
		},
		Result: &result,
	}

	err := db.CypherBatch([]*neoism.CypherQuery{&checkGraph})
	assert.NoError(err)
	assert.NotEmpty(result)

	if len(result) == 0 {
		return false
	}

	return true
}


text:
class GURL;

namespace weblayer {

class TabObserver {
 public:
  // The URL bar should be updated to |url|.
  virtual void DisplayedUrlChanged(const GURL& url) {}

  // Triggered when the render process dies, either due to crash or killed by
  // the system to reclaim memory.
  virtual void OnRenderProcessGone() {}

  // Called when the title of this tab changes. Note before the page sets a
  // title, the title may be a portion of the Uri.
  virtual void OnTitleUpdated(const std::u16string& title) {}

 protected:
  virtual ~TabObserver() {}
};

}  // namespace weblayer

#endif  // WEBLAYER_PUBLIC_TAB_OBSERVER_H_


text:
from __future__ import unicode_literals

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('legislative', '0011_auto_20171117_1533'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='bill',
            options={'ordering': ['-legislative_session__name', 'identifier']},
        ),
        migrations.AlterModelOptions(
            name='billsponsorship',
            options={'ordering': ['-sponsored_at', '-primary']},
        ),
    ]


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Login extends CI_Controller {

	public function __construct() {
		parent::__construct();
		ini_set('date.timezone','Asia/Shanghai');
		$this->load->model('login_model');
	}

	public function index($flag = null) {
		$this->cismarty->assign('flag',$flag);//url路径
		$this->cismarty->display('login.html');
	}

	public function check_login(){
		$rs = $this->login_model->check_login();
		if($rs > 0){
			redirect('/index');
		}else{
			redirect('/login/index/'.$rs);
		}
	}

	//注销登陆
	public function logout(){
		$this->session->sess_destroy();
		redirect(site_url('login'));
	}
}


text:
title: Telerik.Web.StringBuilder
page_title: Client-side API Reference
description: Client-side API Reference
slug: Telerik.Web.StringBuilder
---

# Telerik.Web.StringBuilder

## Inheritance Hierarchy

* *[Telerik.Web.StringBuilder]({%slug Telerik.Web.StringBuilder%})*

## Methods

###  append

Appends the specified value to the end of the current string value

#### Parameters

##### value `String`

The value to append

#### Returns

`Telerik.Web.StringBuilder`

###  get_buffer

Returns the internal string buffer

#### Parameters

#### Returns

`Array`

###  toString

Returns the current appended content as a single string

#### Parameters

#### Returns

`String`


text:
package com.pinal.credencys.appintroexample;

import android.Manifest;
import android.app.DatePickerDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.Toast;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;

public class AddFund extends AppCompatActivity {

    EditText fname,date;
    String spn;
    RadioGroup rg;
    RadioButton r1;
    String p1,p2,p3,p4,p5,p6,p7,time,p8;

    Json js;
    private int myear,mmonth,mdate;
    ArrayList<String> worldlist;
    ArrayList<String> data1;
    PreferenceHelper pf;
    ArrayList<HashMap<String, String>> data;
    ProgressDialog pd;
    String id,name,village,mobile;
    Button btnSubmit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_fund);

        id =pf.getPreferences(AddFund.this,"r_id");
        name =pf.getPreferences(AddFund.this,"r_name");
        village =pf.getPreferences(AddFund.this,"r_address");
        mobile =pf.getPreferences(AddFund.this,"r_num");

        fname=(EditText)findViewById(R.id.edtFname);
        date=(EditText)findViewById(R.id.edtDate);

        date.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

                final Calendar c = Calendar.getInstance();

                mmonth = c.get(Calendar.MONTH);
                mdate = c.get(Calendar.DAY_OF_MONTH);
                myear = c.get(Calendar.YEAR);

                DatePickerDialog dp = new DatePickerDialog(AddFund.this, new DatePickerDialog.OnDateSetListener() {

                    @Override
                    public void onDateSet(DatePicker view, int year, int monthOfYear,
                                          int dayOfMonth) {
                        // TODO Auto-generated method stub

                        date.setText(year + "/" + (monthOfYear + 1) + "/" + dayOfMonth);
                    }
                }, myear, mmonth, mdate);

                dp.show();

            }

        });

        btnSubmit=(Button)findViewById(R.id.btnSubmit);

        btnSubmit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                p1 = fname.getText().toString();

                p7=date.getText().toString();

                long date = System.currentTimeMillis();

                SimpleDateFormat sdf = new SimpleDateFormat(" h:mm a");
                time = sdf.format(date);
                Toast.makeText(getApplication(), time,Toast.LENGTH_LONG).show();

                if(p1.equals("")) {

                    fname.setError("Enter Amount");
                }

                else {

                    Insert in = new Insert();
                    in.execute();

                }
            }
        });
    }

    class Insert extends AsyncTask<Void, Void, Void> {

        String s = "http://pinal3291.site88.net/fund.php?amount=" + Uri.encode(p1) + "&date=" + Uri.encode(p7)+"&u_id=" + Uri.encode(id)+ "&village=" + Uri.encode(village)+ "&mobile=" + Uri.encode(mobile)+ "&name=" + Uri.encode(name);

        int success;
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pd = new ProgressDialog(AddFund.this);
            pd.setMessage("please wait");
            pd.setCancelable(true);
            pd.setIndeterminate(false);
            pd.show();
        }

        @Override
        protected Void doInBackground(Void... params) {

            js = new Json();

            Log.d("Async task", "Done");

            String json = js.getdata(s);
            Log.d("Login attempt", js.toString());

            System.out.println(json);
            return null;

        }

        @Override
        protected void onPostExecute(Void aVoid) {
            super.onPostExecute(aVoid);

            if (pd.isShowing()) {
                pd.dismiss();

                Toast.makeText(getApplicationContext(), "Inserterd Sucess", Toast.LENGTH_LONG).show();

                Intent i3=new Intent(getApplicationContext(),AddChild.class);
                startActivity(i3);
                finish();
            }
        }
    }

}


text:
import * as runtimeDom from '@vue/runtime-dom';
import { initCustomFormatter, warn, registerRuntimeCompiler } from '@vue/runtime-dom';
export * from '@vue/runtime-dom';
import { compile } from '@vue/compiler-dom';
import { isString, NOOP, extend, generateCodeFrame } from '@vue/shared';

function initDev() {
    {
        initCustomFormatter();
    }
}

// This entry is the "full-build" that includes both the runtime
if ((process.env.NODE_ENV !== 'production')) {
    initDev();
}
const compileCache = Object.create(null);
function compileToFunction(template, options) {
    if (!isString(template)) {
        if (template.nodeType) {
            template = template.innerHTML;
        }
        else {
            (process.env.NODE_ENV !== 'production') && warn(`invalid template option: `, template);
            return NOOP;
        }
    }
    const key = template;
    const cached = compileCache[key];
    if (cached) {
        return cached;
    }
    if (template[0] === '#') {
        const el = document.querySelector(template);
        if ((process.env.NODE_ENV !== 'production') && !el) {
            warn(`Template element not found or is empty: ${template}`);
        }
        // __UNSAFE__
        // Reason: potential execution of JS expressions in in-DOM template.
        // The user must make sure the in-DOM template is trusted. If it's rendered
        // by the server, the template should not contain any user data.
        template = el ? el.innerHTML : ``;
    }
    const opts = extend({
        hoistStatic: true,
        onError: (process.env.NODE_ENV !== 'production') ? onError : undefined,
        onWarn: (process.env.NODE_ENV !== 'production') ? e => onError(e, true) : NOOP
    }, options);
    if (!opts.isCustomElement && typeof customElements !== 'undefined') {
        opts.isCustomElement = tag => !!customElements.get(tag);
    }
    const { code } = compile(template, opts);
    function onError(err, asWarning = false) {
        const message = asWarning
            ? err.message
            : `Template compilation error: ${err.message}`;
        const codeFrame = err.loc &&
            generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
        warn(codeFrame ? `${message}\n${codeFrame}` : message);
    }
    // The wildcard import results in a huge object with every export
    // with keys that cannot be mangled, and can be quite heavy size-wise.
    // In the global build we know `Vue` is available globally so we can avoid
    // the wildcard object.
    const render = (new Function('Vue', code)(runtimeDom));
    render._rc = true;
    return (compileCache[key] = render);
}
registerRuntimeCompiler(compileToFunction);

export { compileToFunction as compile };


text:
package org.apache.commons.configuration2.io;

import java.net.URL;
import java.util.Objects;

/**
 *

 * A class describing the location of a file.
 *

 *

 * An instance of this class provides information for locating and accessing a file. The file location can be defined
 *

 *

 *
as a URL; this identifies a file in a unique way

 *
as a combination of base path and file name; if this variant is used, there may be an additional location step
 * required in order to identify the referenced file (for instance, the file name may be interpreted as the name of a
 * resource to be loaded from class path).

 *

 *

 * In addition, other properties are available which are also needed for loading or saving a file, like the underlying
 * {@link FileSystem}. The encoding to be used when accessing the represented data is also part of the data contained in
 * an instance; if no encoding is set explicitly, the platform's default encoding is used.
 *

 * Instances of this class are immutable and thus can be safely shared between arbitrary components. {@link FileHandler}
 * also uses an instance to reference the associated file. Instances are created using a builder.
 * {@link FileLocatorUtils} offers convenience methods for obtaining such a builder.
 *

 *
 * @since 2.0
 */
public final class FileLocator {
    /**
     * A typical builder implementation for creating {@code FileLocator} objects. An instance of this class is
     * returned by the {@code fileLocator()} method of {link FileLocatorUtils}. It can be used to define the various
     * components of the {@code FileLocator} object. By calling {@code create()} the new immutable {@code FileLocator}
     * instance is created.
     */
    public static final class FileLocatorBuilder {
        /** The base path. */
        private String basePath;

        /** The encoding. */
        private String encoding;

        /** The file name. */
        private String fileName;

        /** The file system. */
        private FileSystem fileSystem;

        /** The location strategy. */
        private FileLocationStrategy locationStrategy;

        /** The URL. */
        private URL sourceURL;

        /** The URL connection options. */
        private URLConnectionOptions urlConnectionOptions;

        /**
         * Creates a new instance of {@code FileLocatorBuilder} and initializes the builder's properties from the passed in
         * {@code FileLocator} object.
         *
         * @param src the source {@code FileLocator} (may be null)
         */
        FileLocatorBuilder(final FileLocator src) {
            if (src != null) {
                initBuilder(src);
            }
        }

        /**
         * Specifies the base path of the new {@code FileLocator}.
         *
         * @param path the base path
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder basePath(final String path) {
            basePath = path;
            return this;
        }

        /**
         * Creates a new immutable {@code FileLocatorImpl} object based on the properties set so far for this builder.
         *
         * @return the newly created {@code FileLocator} object
         */
        public FileLocator create() {
            return new FileLocator(this);
        }

        /**
         * Specifies the encoding of the new {@code FileLocator}.
         *
         * @param enc the encoding
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder encoding(final String enc) {
            encoding = enc;
            return this;
        }

        /**
         * Specifies the file name of the new {@code FileLocator}.
         *
         * @param name the file name
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder fileName(final String name) {
            fileName = name;
            return this;
        }

        /**
         * Specifies the {@code FileSystem} of the new {@code FileLocator}.
         *
         * @param fs the {@code FileSystem}
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder fileSystem(final FileSystem fs) {
            fileSystem = fs;
            return this;
        }

        /**
         * Initializes the properties of this builder from the passed in locator object.
         *
         * @param src the source {@code FileLocator}
         */
        private void initBuilder(final FileLocator src) {
            basePath = src.getBasePath();
            fileName = src.getFileName();
            sourceURL = src.getSourceURL();
            urlConnectionOptions = src.getURLConnectionOptions();
            encoding = src.getEncoding();
            fileSystem = src.getFileSystem();
            locationStrategy = src.getLocationStrategy();
        }

        /**
         * Specifies the {@code FileLocationStrategy} to be used when the referenced file is to be located.
         *
         * @param strategy the {@code FileLocationStrategy}
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder locationStrategy(final FileLocationStrategy strategy) {
            locationStrategy = strategy;
            return this;
        }

        /**
         * Specifies the source URL of the new {@code FileLocator}.
         *
         * @param url the source URL
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder sourceURL(final URL url) {
            this.sourceURL = url;
            return this;
        }

        /**
         * Specifies the source URL connection options of the new {@code FileLocator}.
         *
         * @param urlConnectionOptions the source URL connection options.
         * @return a reference to this builder for method chaining
         */
        public FileLocatorBuilder urlConnectionOptions(final URLConnectionOptions urlConnectionOptions) {
            this.urlConnectionOptions = urlConnectionOptions;
            return this;

        }
    }

    /** The base path. */
    private final String basePath;

    /** The encoding. */
    private final String encoding;

    /** The file name. */
    private final String fileName;

    /** The file system. */
    private final FileSystem fileSystem;

    /** The file location strategy. */
    private final FileLocationStrategy locationStrategy;

    /** The source URL. */
    private final URL sourceURL;

    /** The source URL connection options. */
    private final URLConnectionOptions urlConnectionOptions;

    /**
     * Creates a new instance of {@code FileLocatorImpl} and initializes it from the given builder instance
     *
     * @param builder the builder
     */
    public FileLocator(final FileLocatorBuilder builder) {
        fileName = builder.fileName;
        basePath = builder.basePath;
        sourceURL = builder.sourceURL;
        urlConnectionOptions = builder.urlConnectionOptions;
        encoding = builder.encoding;
        fileSystem = builder.fileSystem;
        locationStrategy = builder.locationStrategy;
    }

    /**
     * Compares this object with another one. Two instances of {@code FileLocatorImpl} are considered equal if all of their
     * properties are equal.
     *
     * @param obj the object to compare to
     * @return a flag whether these objects are equal
     */
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof FileLocator)) {
            return false;
        }
        final FileLocator other = (FileLocator) obj;
        return Objects.equals(basePath, other.basePath) && Objects.equals(encoding, other.encoding) && Objects.equals(fileName, other.fileName)
            && Objects.equals(fileSystem, other.fileSystem) && Objects.equals(locationStrategy, other.locationStrategy)
            && Objects.equals(sourceURL, other.sourceURL) && Objects.equals(urlConnectionOptions, other.urlConnectionOptions);
    }

    /**
     * Gets the base path stored in this locator or null if it is undefined.
     *
     * @return the base path
     */
    public String getBasePath() {
        return basePath;
    }

    /**
     * Gets the encoding stored in this locator or null if it is undefined.
     *
     * @return the encoding
     */
    public String getEncoding() {
        return encoding;
    }

    /**
     * Gets the file name stored in this locator or null if it is undefined.
     *
     * @return the file name
     */
    public String getFileName() {
        return fileName;
    }

    /**
     * Gets the {@code FileSystem} to be used for accessing the file referenced by this locator or null if it is
     * undefined.
     *
     * @return the {@code FileSystem}
     */
    public FileSystem getFileSystem() {
        return fileSystem;
    }

    /**
     * Gets the {@code FileLocationStrategy} to be used for locating the referenced file. If no specific
     * {@code FileLocationStrategy} has been set, result is null. This means that the default strategy should be
     * used.
     *
     * @return the {@code FileLocationStrategy} to be used
     */
    public FileLocationStrategy getLocationStrategy() {
        return locationStrategy;
    }

    /**
     * Gets the URL pointing to the referenced source file or null if it is undefined.
     *
     * @return the source URL
     */
    public URL getSourceURL() {
        return sourceURL;
    }

    /**
     * Gets the URLConnectionOptions
     *
     * @return the URLConnectionOptions
     */
    public URLConnectionOptions getURLConnectionOptions() {
        return urlConnectionOptions;
    }

    /**
     * Returns a hash code for this object.
     *
     * @return a hash code for this object
     */
    @Override
    public int hashCode() {
        return Objects.hash(basePath, encoding, fileName, fileSystem, locationStrategy, sourceURL, urlConnectionOptions);
    }

    @Override
    public String toString() {
        return "FileLocator [basePath=" + basePath + ", encoding=" + encoding + ", fileName=" + fileName + ", fileSystem=" + fileSystem + ", locationStrategy="
            + locationStrategy + ", sourceURL=" + sourceURL + ", urlConnectionOptions=" + urlConnectionOptions + "]";
    }
}


text:
Client implementation of the transparent JCR-RMI layer.

This package contains the default client implementation of the
transparent JCR-RMI layer. The classes in this package can be used
to make a remote JCR-RMI service seem like a local JCR repository.

The contents of this package is designed using two design patterns,
Factory and Adapter. All the ClientObject subclasses implement the
Adapter pattern to adapt a remote JCR-RMI reference to the corresponding
local JCR interface. The Factory pattern is used to centralize the
creation and configuration of all adapter instances.

Looking up a JCR-RMI client

The ClientRepositoryFactory class provides a convenient mechanism for
looking up a remote JCR-RMI repository. The factory can be used either
directly or as a JNDI object factory.

The following example shows how to use the ClientRepositoryFactory
directly:

    String name = ...; // The RMI URL of the repository

    ClientRepositoryFactory factory = new ClientRepositoryFactory();
    Repository repository = factory.getRepository(name);

The ClientRepositoryFactory can also be used via JNDI. The following
example settings and code demonstrate how to configure and use the
transparent JCR-RMI layer in a Tomcat 5.5 web application:

context.xml:
    <Resource name="jcr/Repository" auth="Container"
              type="javax.jcr.Repository"
              factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
              url="..."/>

web.xml:
    <resource-env-ref>
      <description>The external content repository</description>
      <resource-env-ref-name>jcr/Repository</resource-env-ref-name>
      <resource-env-ref-type>javac.jcr.Repository</resource-env-ref-type>
    </resource-env-ref>

...SomeServlet.java:
    Context initial = new InitialContext();
    Context context = (Context) initial.lookup("java:comp/env");
    Repository repository = (Repository) context.lookup("jcr/Repository");

Note that in the example above only the context.xml configuration file
contains a direct references to the JCR-RMI layer. All other parts of the
web application can be implemented using the standard JCR interfaces.


text:
@interface LZColletionHeader : UICollectionReusableView

@end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>com.microsoft.azure.iothub.transport Class Hierarchy (IoT Hub Java Client 1.0.0-preview.1.0.0 API)</title>
<meta name="date" content="2015-09-21">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package com.microsoft.azure.iothub.transport

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

com.microsoft.azure.iothub.transport.IotHubCallbackPacket

com.microsoft.azure.iothub.transport.IotHubOutboundPacket

com.microsoft.azure.iothub.transport.IotHubReceiveTask (implements java.lang.Runnable)

com.microsoft.azure.iothub.transport.IotHubSendTask (implements java.lang.Runnable)

Interface Hierarchy

com.microsoft.azure.iothub.transport.IotHubTransport

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2015. All rights reserved.


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.ovirt.engine.core</groupId>
    <artifactId>beans</artifactId>
    <version>3.1.0</version>
  </parent>

  <artifactId>scheduler</artifactId>
  <packaging>ejb</packaging>

  <name>engine scheduler bean</name>

  <dependencies>
    <dependency>
      <groupId>${engine.groupId}</groupId>
      <artifactId>utils</artifactId>
      <version>${engine.version}</version>
    </dependency>

    <!-- external dependencies -->
    <dependency>
      <groupId>org.jboss.spec.javax.ejb</groupId>
      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
    </dependency>

    <dependency>
      <groupId>org.quartz-scheduler</groupId>
      <artifactId>quartz</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <additionalClasspathElements>
            <additionalClasspathElement>${basedir}/src/test/java</additionalClasspathElement>
          </additionalClasspathElements>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
          <ejbVersion>3.1</ejbVersion>
          <generateClient>true</generateClient>
          <archive>
            <manifest>
              <addClasspath>false</addClasspath>
            </manifest>
            <manifestEntries>
              <Dependencies>org.slf4j</Dependencies>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.teemo.swipetoloadlayoutdemo">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".activity.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".activity.SwipeActivity" />
        <activity android:name=".activity.SHActivity" />
    </application>

</manifest>


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.DocAsCode.Build.Common
{
    using System;
    using System.Collections.Generic;
    using System.Collections.Immutable;
    using System.Linq;

    using Microsoft.DocAsCode.Common;
    using Microsoft.DocAsCode.DataContracts.Common;
    using Microsoft.DocAsCode.Plugins;
    using Microsoft.DocAsCode.Common.EntityMergers;

    using YamlDotNet.Core;

    public abstract class ApplyOverwriteDocument : BaseDocumentBuildStep
    {
        private readonly MergerFacade _merger;

        private readonly IModelAttributeHandler _handler;

        protected ApplyOverwriteDocument()
        {
            _merger = new MergerFacade(GetMerger());
            _handler = new CompositeModelAttributeHandler(
                new UniqueIdentityReferenceHandler(),
                new MarkdownContentHandler()
                );
        }

        protected virtual IMerger GetMerger()
        {
            return new DictionaryMerger(
                new KeyedListMerger(
                    new ReflectionEntityMerger()));
        }

        public override void Postbuild(ImmutableList<FileModel> models, IHostService host)
        {
            if (models.Count > 0)
            {
                ApplyOverwrites(models, host);
            }
        }

        protected virtual void ApplyOverwrites(ImmutableList<FileModel> models, IHostService host)
        {
            foreach (var uid in host.GetAllUids())
            {
                var ms = host.LookupByUid(uid);
                var od = ms.Where(m => m.Type == DocumentType.Overwrite).ToList();
                var articles = ms.Except(od).ToList();
                if (articles.Count == 0 || od.Count == 0)
                {
                    continue;
                }

                ApplyOverwrite(host, od, uid, articles);
            }
        }

        protected abstract void ApplyOverwrite(IHostService host, List<FileModel> overwrites, string uid, List<FileModel> articles);

        protected void ApplyOverwrite<T>(
            IHostService host,
            List<FileModel> overwrites,
            string uid,
            List<FileModel> articles,
            Func<FileModel, string, IHostService, IEnumerable<T>> getItemsFromOverwriteDocument,
            Func<FileModel, string, IHostService, IEnumerable<T>> getItemsToOverwrite)
            where T : class, IOverwriteDocumentViewModel
        {
            // Multiple UID in overwrite documents is allowed now
            var ovms = (from fm in overwrites
                        from content in getItemsFromOverwriteDocument(fm, uid, host)
                        select new
                        {
                            model = content,
                            fileModel = fm
                        }).ToList();

            if (ovms.Count == 0)
            {
                return;
            }

            // 1. merge all the overwrite document into one overwrite view model
            var ovm = ovms.Skip(1).Aggregate(ovms[0].model, (accum, item) => Merge(accum, item.model, item.fileModel));

            // 2. apply the view model to articles matching the uid
            foreach (
                var pair in
                    from model in articles
                    from item in getItemsToOverwrite(model, uid, host)
                    select new { model, item })
            {
                var vm = pair.item;
                Merge(vm, ovm, ovms[0].fileModel);

                foreach (var overwriteDocumentModel in overwrites.Select(overwrite => GetOverwriteDocumentModelsByUid(overwrite, uid)).SelectMany(o => o))
                {
                    pair.model.LinkToUids = pair.model.LinkToUids.Union(overwriteDocumentModel.LinkToUids);
                    pair.model.LinkToFiles = pair.model.LinkToFiles.Union(overwriteDocumentModel.LinkToFiles);
                    pair.model.FileLinkSources = pair.model.FileLinkSources.ToDictionary(i => i.Key, i => i.Value.ToList())
                        .Merge(overwriteDocumentModel.FileLinkSources.Select(i => new KeyValuePair<string, IEnumerable<LinkSourceInfo>>(i.Key, i.Value)))
                        .ToImmutableDictionary(p => p.Key, p => p.Value.ToImmutableList());
                    pair.model.UidLinkSources = pair.model.UidLinkSources.ToDictionary(i => i.Key, i => i.Value.ToList())
                        .Merge(overwriteDocumentModel.UidLinkSources.Select(i => new KeyValuePair<string, IEnumerable<LinkSourceInfo>>(i.Key, i.Value)))
                        .ToImmutableDictionary(p => p.Key, p => p.Value.ToImmutableList());
                }
            }
        }

        protected IEnumerable<T> Transform<T>(FileModel model, string uid, IHostService host) where T : class, IOverwriteDocumentViewModel
        {
            var overwrites = ((List<OverwriteDocumentModel>)model.Content).Where(s => s.Uid == uid);
            return overwrites.Select(s =>
            {
                try
                {
                    var placeholderContent = s.Conceptual;
                    s.Conceptual = null;
                    var item = s.ConvertTo<T>();
                    var context = new HandleModelAttributesContext
                    {
                        EnableContentPlaceholder = true,
                        Host = host,
                        PlaceholderContent = placeholderContent,
                        FileAndType = model.OriginalFileAndType,
                    };

                    _handler.Handle(item, context);
                    if (!context.ContainsPlaceholder)
                    {
                        item.Conceptual = placeholderContent;
                    }
                    return item;
                }
                catch (YamlException ye)
                {
                    throw new DocumentException($"Unable to deserialize YAML header from \"{s.Documentation.Path}\" Line {s.Documentation.StartLine} to TYPE {typeof(T).Name}: {ye.Message}", ye);
                }
            });
        }

        private static List<OverwriteDocumentModel> GetOverwriteDocumentModelsByUid(FileModel overwriteFileModel, string uid)
        {
            return ((IEnumerable<OverwriteDocumentModel>)overwriteFileModel.Content).Where(o => o.Uid == uid).ToList();
        }

        private T Merge<T>(T baseModel, T overrideModel, FileModel model) where T : class, IOverwriteDocumentViewModel
        {
            try
            {
                _merger.Merge(ref baseModel, overrideModel);
            }
            catch (Exception e)
            {
                throw new DocumentException($"Error merging overwrite document from {model.OriginalFileAndType}: {e.Message}", e);
            }

            return baseModel;
        }
    }
}


text:
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;

namespace UIKitEnhancements
{
	[Register ("MainSplitViewController")]
	partial class MainSplitViewController
	{
		void ReleaseDesignerOutlets ()
		{
		}
	}
}


text:
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.send_tab_to_self;

import androidx.annotation.IntDef;

import org.chromium.base.metrics.RecordHistogram;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Class that captures all the metrics needed for Send Tab To Self on Android.
 */
public class SendTabToSelfMetrics {
    /**
     * Metrics captured when a user initiates and completes the sending flow.
     */
    public static class SendTabToSelfShareClickResult {
        @Retention(RetentionPolicy.SOURCE)
        @IntDef({ClickType.SHOW_ITEM, ClickType.CLICK_ITEM, ClickType.SHOW_DEVICE_LIST})
        @interface ClickType {
            // These values are used for UMA. Don't reuse or reorder values.
            // If you add something, update NUM_ENTRIES.This must be kept in sync with
            // send_tab_to_self_desktop_util.h
            int SHOW_ITEM = 0;
            int CLICK_ITEM = 1;
            int SHOW_DEVICE_LIST = 2;
            int NUM_ENTRIES = 3;
        }

        public static void recordClickResult(@ClickType int result) {
            RecordHistogram.recordEnumeratedHistogram(
                    "SendTabToSelf.AndroidShareSheet.ClickResult", result, ClickType.NUM_ENTRIES);
        }
    }

    /**
     * Metrics captured when a user completes the receiving flow.
     */
    public static class SendTabToSelfShareNotificationInteraction {
        @Retention(RetentionPolicy.SOURCE)
        @IntDef({InteractionType.OPENED, InteractionType.DISMISSED, InteractionType.SHOWN})
        @interface InteractionType {
            // These values are used for UMA. Don't reuse or reorder values.
            // If you add something, update NUM_ENTRIES. This must be kept in sync with
            // send_tab_to_self_metrics.h
            int OPENED = 0;
            int DISMISSED = 1;
            int SHOWN = 2;
            // Obsolete DISMISSED_REMOTELY = 3 because it is useless for sharing to one device.
            // Please skip value 3 when add new items.
            int NUM_ENTRIES = 3;
        }

        public static void recordClickResult(@InteractionType int result) {
            RecordHistogram.recordEnumeratedHistogram(
                    "SendTabToSelf.Notification", result, InteractionType.NUM_ENTRIES);
        }
    }
}


text:
'use strict';

var request = require('supertest');
var uuid = require('uuid');

var helpers = require('../helpers');

function isIdSiteRedirect(res) {
  var location = res && res.headers && res.headers.location;
  var error = new Error('Expected Location header with redirect to api.stormpath.com/sso, but got ' + location);

  if (location) {
    var match =  location.match(/api.stormpath.com\/sso/);
    return match ? null : error;
  }

  return error;
}

function prepeareIdSiteModel(client, currentHost, callbckUri, cb) {
  client.getCurrentTenant(function (err, tenant) {
    if (err) {
      throw err;
    }

    client.getResource(tenant.href + '/idSites', function (err, collection) {
      if (err) {
        throw err;
      }

      var idSiteModel = collection.items[0];
      if (idSiteModel.authorizedOriginUris.indexOf(currentHost) === -1) {
        idSiteModel.authorizedOriginUris.push(currentHost);
      }

      if (idSiteModel.authorizedRedirectUris.indexOf(callbckUri) === -1) {
        idSiteModel.authorizedRedirectUris.push(callbckUri);
      }

      idSiteModel.save(cb);
    });
  });
}

function revertIdSiteModel(client, currentHost, callbckUri, cb) {
  client.getCurrentTenant(function (err, tenant) {
    if (err) {
      throw err;
    }

    client.getResource(tenant.href + '/idSites', function (err, collection) {
      if (err) {
        throw err;
      }

      var idSiteModel = collection.items[0];
      idSiteModel.authorizedOriginUris = idSiteModel.authorizedOriginUris.filter(function (uri) {
        return !uri.match('0.0.0.0');
      });

      idSiteModel.authorizedRedirectUris = idSiteModel.authorizedRedirectUris.filter(function (uri) {
        return !uri.match('0.0.0.0');
      });

      idSiteModel.save(cb);
    });
  });
}

function getIdSiteCallbackUrl(host, config, app, accountData, done) {
  request(host).get(config.web.login.uri)
    .end(function (err, res) {
      request(res.headers.location).get('')
        .end(function (err, res) {
          if (err) {
            return done(err);
          }

          var jwt = res.headers.location.split('jwt=')[1];
          var origin = 'https://' + res.headers.location.split('/')[2];
          var appHref = app.get('stormpathApplication').href;

          request(appHref).get('?expand=idSiteModel')
            .set('Authorization', 'Bearer ' + jwt)
            .set('Origin', origin)
            .set('Referer', origin)
            .end(function (err, res) {
              if (err) {
                return done(err);
              }

              var nextJwt = res.headers.authorization.split('Bearer ')[1];
              request(appHref).post('/loginAttempts')
                .type('json')
                .send({
                  type: 'basic',
                  value: new Buffer(accountData.email + ':' + accountData.password).toString('base64')
                })
                .set('Authorization', 'Bearer ' + nextJwt)
                .set('Origin', origin)
                .set('Referer', origin)
                .end(function (err, res) {
                  if (err) {
                    return done(err);
                  }

                  var url = res.headers['stormpath-sso-redirect-location'];
                  done(url);
                });
            });
        });
    });
}

describe('id site', function () {
  var stormpathApplication, app, config, server, host, callbackUri;

  var accountData = {
    givenName: uuid.v4(),
    surname: uuid.v4(),
    email: uuid.v4() + '@test.com',
    password: uuid.v4() + uuid.v4().toUpperCase() + '!'
  };

  before(function (done) {
    var client = helpers.createClient().on('ready', function () {
      helpers.createApplication(client, function (err, _app) {
        if (err) {
          return done(err);
        }

        stormpathApplication = _app;

        stormpathApplication.createAccount(accountData, function (err) {
          if (err) {
            return done(err);
          }

          app = helpers.createStormpathExpressApp({
            application: {
              href: stormpathApplication.href
            },
            web: {
              login: {
                enabled: true
              },
              register: {
                enabled: true
              },
              idSite: {
                enabled: true
              }
            }
          });

          app.on('stormpath.ready', function () {
            config = app.get('stormpathConfig');
            server = app.listen(function () {
              var address = server.address().address === '::' ? 'http://localhost' : server.address().address;
              address = address === '0.0.0.0' ? 'http://localhost' : address;
              host = address + ':' + server.address().port;
              callbackUri = host + config.web.idSite.uri;
              prepeareIdSiteModel(app.get('stormpathClient'), host, callbackUri, done);
            });
          });
        });
      });
    });
  });

  after(function (done) {
    revertIdSiteModel(app.get('stormpathClient'), host, callbackUri, function () {
      helpers.destroyApplication(stormpathApplication, done);
    });
  });

  it('should redirect to idsite for login, if idsite is enabled', function (done) {
    request(host).get(config.web.login.uri)
      .expect(302)
      .expect(isIdSiteRedirect)
      .end(function (err, res) {
        request(res.headers.location)
          .get('')
          .expect('Location', new RegExp(/\/?jwt=/))
          .end(done);
      });
  });

  it('should redirect to idsite for register, if idsite is enabled', function (done) {
    request(host).get(config.web.register.uri)
      .expect(302)
      .expect(isIdSiteRedirect)
      .end(function (err, res) {
        request(res.headers.location)
          .get('')
          .expect('Location', new RegExp(/#\/register/))
          .end(done);
      });
  });

  it('should redirect to idsite for forgot password, if idsite is enabled', function (done) {
    request(host).get(config.web.forgotPassword.uri)
      .expect(302)
      .expect(isIdSiteRedirect)
      .end(function (err, res) {
        request(res.headers.location)
          .get('')
          .expect('Location', new RegExp(/#\/forgot/))
          .end(done);
      });
  });

  it.skip('should bind the id site callback hanlder, if idisite is enabled');
  it('should create a session on id site callback', function (done) {
    getIdSiteCallbackUrl(host, config, app, accountData, function (url) {
      request(url).get('')
        .expect('Set-Cookie', /access_token=.*refresh_token=.*/)
        .end(done);
    });
  });
});