text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--

  Copyright 2003 - 2014 The eFaps Team

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  Author:          The eFaps Team
  Revision:        $Rev$
  Last Changed:    $Date$
  Last Changed By: $Author$

-->
<ui-form xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>7db6a9cc-0ad7-4b43-8d2c-771ec2d3de30</uuid>
    <file-application>eFapsApp-Sales</file-application>
    <file-revision>$Rev$</file-revision>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <name>Sales_Conciliation4AutomaticForm</name>
        <field character="Group" name="nameGroup">
            <property name="GroupCount">2</property>
            <property name="ModeCreate">READONLY</property>
        </field>
        <field name="name4create">
            <property name="ModeCreate">EDITABLE</property>
            <property name="Attribute">Name</property>
            <property name="Required">true</property>
            <property name="ModeEdit">NONE</property>
            <property name="ModeView">NONE</property>
        </field>
        <field name="name">
            <property name="Attribute">Name</property>
            <property name="ModeEdit">EDITABLE</property>
        </field>
        <field name="date">
            <property name="Columns">12</property>
            <property name="Attribute">Date</property>
            <property name="Required">true</property>
            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
        </field>
        <field character="Group" name="rateGroup">
            <property name="GroupCount">2</property>
            <property name="ModeCreate">NONE</property>
        </field>
        <field name="amount">
            <property name="Attribute">RateNetTotal</property>
            <property name="ModeEdit">READONLY</property>
            <property name="Required">true</property>
        </field>
        <field name="status">
            <property name="ModeCreate">NONE</property>
            <property name="ModeEdit">NONE</property>
            <property name="Attribute">Status</property>
        </field>
        <field character="Group" name="createGroup">
            <property name="GroupCount">2</property>
        </field>
        <field name="creator">
            <property name="SelectAlternateOID">linkto[Creator].oid</property>
            <property name="Attribute">Creator</property>
            <property name="HRef">${COMMONURL}/MenuTree.jsp</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="ShowTypeIcon">true</property>
        </field>
        <field name="created">
            <property name="Attribute">Created</property>
            <property name="ModeSearch">EDITABLE</property>
        </field>
        <field character="Group" name="modifyGroup">
            <property name="GroupCount">2</property>
        </field>
        <field name="modifier">
            <property name="SelectAlternateOID">linkto[Modifier].oid</property>
            <property name="Attribute">Modifier</property>
            <property name="HRef">${COMMONURL}/MenuTree.jsp</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="ShowTypeIcon">true</property>
        </field>
        <field name="modified">
            <property name="Attribute">Modified</property>
            <property name="ModeSearch">EDITABLE</property>
        </field>
        <field name="note">
            <property name="Columns">80</property>
            <property name="Rows">5</property>
            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="Attribute">Note</property>
        </field>
        <field name="report">
            <property name="HideLabel">true</property>
            <property name="ModeEdit">NONE</property>
            <property name="UIType">SNIPPLET</property>
            <trigger event="UI_FIELD_VALUE" method="generateReport"
                name="Sales_ConciliationForm.report.UI_FIELD_VALUE"
                program="org.efaps.esjp.sales.report.ConciliationReport"/>
        </field>
    </definition>
</ui-form>


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.xuweiwei.myulib.containers.ContainerGridViewActivity">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <GridView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/gridView"
            android:numColumns="auto_fit"
            android:columnWidth="80dp"
            android:stretchMode="columnWidth" />
    </LinearLayout>
</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
package ch.redacted.data.model;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * Created by sxo on 16/02/17.
 */

public class Artist {

    @SerializedName("status")
    public String status;
    @SerializedName("response")
    public Response response;

    public static class Tags implements Comparable<Tags> {
        @SerializedName("name")
        public String name;
        @SerializedName("count")
        public int count;

        @Override
        public int compareTo(Tags tags) {
            if (this.count > tags.count)
                return -1;
            else if (this.count == tags.count){
                return 0;
            }
            else {
                return 1;
            }
        }
    }

    public static class SimilarArtists {
    }

    public static class Statistics {
        @SerializedName("numGroups")
        public int numGroups;
        @SerializedName("numTorrents")
        public int numTorrents;
        @SerializedName("numSeeders")
        public int numSeeders;
        @SerializedName("numLeechers")
        public int numLeechers;
        @SerializedName("numSnatches")
        public int numSnatches;
    }

    public static class Torrent {
        @SerializedName("id")
        public int id;
        @SerializedName("groupId")
        public int groupId;
        @SerializedName("media")
        public String media;
        @SerializedName("format")
        public String format;
        @SerializedName("encoding")
        public String encoding;
        @SerializedName("remasterYear")
        public int remasterYear;
        @SerializedName("remastered")
        public boolean remastered;
        @SerializedName("remasterTitle")
        public String remasterTitle;
        @SerializedName("remasterRecordLabel")
        public String remasterRecordLabel;
        @SerializedName("scene")
        public boolean scene;
        @SerializedName("hasLog")
        public boolean hasLog;
        @SerializedName("hasCue")
        public boolean hasCue;
        @SerializedName("logScore")
        public int logScore;
        @SerializedName("fileCount")
        public int fileCount;
        @SerializedName("freeTorrent")
        public boolean freeTorrent;
        @SerializedName("size")
        public long size;
        @SerializedName("leechers")
        public int leechers;
        @SerializedName("seeders")
        public int seeders;
        @SerializedName("snatched")
        public int snatched;
        @SerializedName("time")
        public String time;
        @SerializedName("hasFile")
        public int hasFile;
    }

    public static class Torrentgroup {
        @SerializedName("groupId")
        public int groupId;
        @SerializedName("groupName")
        public String groupName;
        @SerializedName("groupYear")
        public int groupYear;
        @SerializedName("groupRecordLabel")
        public String groupRecordLabel;
        @SerializedName("groupCatalogueNumber")
        public String groupCatalogueNumber;
        @SerializedName("tags")
        public List<String> tags;
        @SerializedName("releaseType")
        public int releaseType;
        @SerializedName("groupVanityHouse")
        public boolean groupVanityHouse;
        @SerializedName("hasBookmarked")
        public boolean hasBookmarked;
        @SerializedName("torrent")
        public List<Torrent> torrent;
    }

    public static class Requests {
        @SerializedName("requestId")
        public int requestId;
        @SerializedName("categoryId")
        public int categoryId;
        @SerializedName("title")
        public String title;
        @SerializedName("year")
        public int year;
        @SerializedName("timeAdded")
        public String timeAdded;
        @SerializedName("votes")
        public int votes;
        @SerializedName("bounty")
        public long bounty;
    }

    public static class Response {
        @SerializedName("id")
        public int id;
        @SerializedName("name")
        public String name;
        @SerializedName("notificationsEnabled")
        public boolean notificationsEnabled;
        @SerializedName("hasBookmarked")
        public boolean hasBookmarked;
        @SerializedName("image")
        public String image;
        @SerializedName("body")
        public String body;
        @SerializedName("vanityHouse")
        public boolean vanityHouse;
        @SerializedName("tags")
        public List<Tags> tags;
        @SerializedName("similarArtists")
        public List<SimilarArtists> similarArtists;
        @SerializedName("statistics")
        public Statistics statistics;
        @SerializedName("torrentgroup")
        public List<Torrentgroup> torrentgroup;
        @SerializedName("requests")
        public List<Requests> requests;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cercospora iochromatis Pat.

### Remarks
null


text:
<?php

namespace Hackzilla\TicketMessage\Entity\Traits\TicketFeature;

use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;

trait MessageAttachmentTrait
{
    /**
     * NOTE: This field is not persisted to database!
     *
     * @var File
     *
     * @Vich\UploadableField(mapping="ticket_message_attachment", fileNameProperty="attachmentName")
     */
    protected $attachmentFile;

    /**
     * @var string
     */
    protected $attachmentName;

    /**
     * @var int
     */
    protected $attachmentSize;

    /**
     * @var string
     */
    protected $attachmentMimeType;

    /**
     * {@inheritdoc}
     */
    public function setAttachmentFile(File $file = null)
    {
        $this->attachmentFile = $file;

        return $this;
    }

    /**
     * {@inheritdoc}
     */
    public function getAttachmentFile()
    {
        return $this->attachmentFile;
    }

    /**
     * {@inheritdoc}
     */
    public function setAttachmentName($name)
    {
        $this->attachmentName = $name;

        return $this;
    }

    /**
     * {@inheritdoc}
     */
    public function getAttachmentName()
    {
        return $this->attachmentName;
    }

    /**
     * {@inheritdoc}
     */
    public function setAttachmentSize($size)
    {
        $this->attachmentSize = $size;

        return $this;
    }

    /**
     * {@inheritdoc}
     */
    public function getAttachmentSize()
    {
        return $this->attachmentSize;
    }

    /**
     * {@inheritdoc}
     */
    public function setAttachmentMimeType($mimeType)
    {
        $this->attachmentMimeType =  $mimeType;

        return $this;
    }

    /**
     * {@inheritdoc}
     */
    public function getAttachmentMimeType()
    {
        return $this->attachmentMimeType;
    }
}


text:
package org.entitypedia.games.common.repository;

import org.entitypedia.games.common.model.GameUser;

/**
 * @author Aliaksandr Autayeu
 */
public interface IGameUserDAO<T extends GameUser> extends ITypedDAO<T, Long> {

    T getUserByUID(String uid);
}


text:
'use strict';

const utils = require('./lib/utils');

const shell = require('shelljs');

const co = require('co');

shell.config.silent = true;

co(function *() {
  shell.cd('../../');

  //check logic
  utils.check('dir');

  utils.check('git');

  utils.check('node');

  // copy logic
  yield utils.copy('.gitconfig');

  yield utils.copy('clienthooks.js');

  // make logic
  utils.make('.clienthooks');

  // newline logic
  utils.newline();
});


text:
ember-marketplace
=================


text:
package com.book.vero.c3_15_broadcast2_receive_system;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.BatteryManager;
import android.support.v4.view.animation.FastOutLinearInInterpolator;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
/**
用真机调试
 */
public class MainActivity extends AppCompatActivity {
    private TextView screenTv;
    private TextView batteryTv;
    private TextView powerTv;
    private TextView netTv;
    private TextView headSetTv;
    MyReceiver receiver;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
        IntentFilter filter=new IntentFilter();
        filter.addAction(Intent.ACTION_SCREEN_OFF);
        filter.addAction(Intent.ACTION_BATTERY_CHANGED);
        filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
        filter.addAction(Intent.ACTION_POWER_CONNECTED);
        filter.addAction(Intent.ACTION_HEADSET_PLUG);
        filter.addAction("android.net.conn.CONNECTIVITY_CHANGE");

        receiver=new MyReceiver();
        registerReceiver(receiver,filter);
    }

    class MyReceiver extends BroadcastReceiver{

        @Override
        public void onReceive(Context context, Intent intent) {
            switch (intent.getAction()){
                case Intent.ACTION_SCREEN_OFF:
                        screenTv.setText("屏幕刚才被关闭了");
                    break;
                case Intent.ACTION_BATTERY_CHANGED:
                            int b=intent.getIntExtra(BatteryManager.EXTRA_LEVEL,0);
                            batteryTv.setText(b+"%");
                    break;
                case Intent.ACTION_POWER_DISCONNECTED:
                        powerTv.setText("电源断开了");
                    break;
                case Intent.ACTION_POWER_CONNECTED:
                        powerTv.setText("电源连接了");
                    break;
                case Intent.ACTION_HEADSET_PLUG:
                    if(intent.getIntExtra("state",0)==1){
                        headSetTv.setText("耳机插入了!");
                    }
                    if(intent.getIntExtra("state",0)==0){
                        headSetTv.setText("耳机拔出了!");
                    }

                    break;
                case "android.net.conn.CONNECTIVITY_CHANGE":
                    String re="网络连接:";

                    //方式1
//                    boolean no_Net=intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);//false
//                    int type=intent.getIntExtra(ConnectivityManager.EXTRA_NETWORK_TYPE, 0);
//
//                    if (type==ConnectivityManager.TYPE_MOBILE){
//                        re+=" type:MOBILE,";
//                    }else if (type==ConnectivityManager.TYPE_WIFI){
//                        re+=" type:WIFI,";
//                    }
//                    if (no_Net){
//                        re+=" 状态:no";
//                    }else if (!no_Net){
//                        re+=" 状态:yes";
//                    }

                    //方式2,(推荐)
                    ConnectivityManager manager= (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
                    NetworkInfo info=manager.getActiveNetworkInfo();
                    if (info!=null){

                        if (info.getType()==ConnectivityManager.TYPE_MOBILE&&info.isAvailable()){
                            re+="type:mobile,状态:yes";
                        }
                        if (info.getType()==ConnectivityManager.TYPE_WIFI&&info.isAvailable()){
                            re+="type:WIFI,状态:yes";
                        }
                    }
                    else {
                        re+="没有网络";
                    }
                    netTv.setText(re);
                    break;
            }
        }
    }

    public void init(){
        screenTv= (TextView) findViewById(R.id.screenTv);
        batteryTv= (TextView) findViewById(R.id.batteryTv);
        powerTv= (TextView) findViewById(R.id.powerTv);
        netTv= (TextView) findViewById(R.id.netTv);
        headSetTv=(TextView)findViewById(R.id.headSetTv);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unregisterReceiver(receiver);

    }
}


text:
import _CatalogView from './catalog/CatalogView';
import _HomeView from './home/HomeView';
import _controller from './transitions/controller';

export var CatalogView = _CatalogView;
export var HomeView = _HomeView;
export var controller = _controller;


text:
describe Flexibee::Node, vcr: true do
  before do
    VCR.use_cassette 'tree/api_response' do
      @node ||= @flexibee.tree.all.first
      @node_last ||= @flexibee.tree.all.last
    end
  end

  describe '#initialize' do
    it 'gets basic node response' do
      expect(@node).to be_an(Flexibee::Node)
      expect(@node_last).to be_an(Flexibee::Node)
    end
  end

  describe '#id' do
    it 'gets node id' do
      expect(@node.id).to eql(1)
      expect(@node_last.id).to eql(125)
    end
  end

  describe '#updated_at' do
    it 'gets node updated_at' do
      expect(@node.updated_at).to eql('2015-05-28T09:40:11.971+02:00')
      expect(@node_last.updated_at).to eql('2015-12-07T13:41:33.290+01:00')
    end
  end

  describe '#code' do
    it 'gets node code' do
      expect(@node.code).to eql('STR_CEN')
      expect(@node_last.code).to eql('Dárkové poukazy')
    end
  end

  describe '#name' do
    it 'gets node name' do
      expect(@node.name).to eql('Strom ceníku')
      expect(@node_last.name).to eql('Dárkové poukazy')
    end
  end

  describe '#level' do
    it 'gets node level' do
      expect(@node.level).to eql(1)
      expect(@node_last.level).to eql(4)
    end
  end

  describe '#order' do
    it 'gets node order' do
      expect(@node.order).to eql(1)
      expect(@node_last.order).to eql(14)
    end
  end

  describe '#route' do
    it 'gets node route' do
      expect(@node.route).to eql('1/')
      expect(@node_last.route).to eql('1/1/3/14/')
    end
  end

  describe '#short_description' do
    it 'gets node short_description' do
      expect(@node.short_description).to be_empty
      expect(@node_last.short_description).to be_empty
    end
  end

  describe '#keywords' do
    it 'gets node keywords' do
      expect(@node.keywords).to be_empty
      expect(@node_last.keywords).to be_empty
    end
  end

  describe '#description' do
    it 'gets node description' do
      expect(@node.description).to be_empty
      expect(@node_last.description).to be_empty
    end
  end

  describe '#tree_ref' do
    it 'gets node tree_ref' do
      expect(@node.tree_ref).to eql('/c/woodies/strom-koren/1.json')
      expect(@node_last.tree_ref).to eql('/c/woodies/strom-koren/1.json')
    end
  end

  describe '#parent_id' do
    it 'gets node parent_id' do
      expect(@node.parent_id).to eql(0)
      expect(@node_last.parent_id).to eql(10)
    end
  end

  describe '#parent_ref' do
    it 'gets node parent_ref' do
      expect(@node.parent_ref).to be_nil
      expect(@node_last.parent_ref).to eql('/c/woodies/strom/10.json')
    end
  end

  describe '#descendants' do
    it 'gets descendants of current node' do
      VCR.use_cassette 'node/api_response_descendants' do
        expect(@node.descendants).to all( be_an(Flexibee::Node) )
        expect(@node.descendants).to all( have_attributes(parent_id: @node.id) )
        expect(@node.descendants).to all( have_attributes(level: @node.level+1) )

        expect(@node_last.descendants).to be_empty
      end
    end
  end

  describe '#parent' do
    it 'gets parent of the node' do
      VCR.use_cassette 'node/api_response_parent' do
        expect(@node.parent).to be_nil

        expect(@node_last.parent).to be_an(Flexibee::Node)
        expect(@node_last.parent.level).to eql(@node_last.level-1)
        expect(@node_last.parent_id).to eql(@node_last.parent_id)
      end
    end
  end
end


text:
"""Email pipeline for scanner summary."""

import collections

# pylint: disable=line-too-long
from google.cloud.security.common.util import log_util
from google.cloud.security.common.util.email_util import EmailUtil
from google.cloud.security.common.gcp_type import resource_util
from google.cloud.security.notifier.pipelines import base_notification_pipeline as bnp
# pylint: enable=line-too-long

LOGGER = log_util.get_logger(__name__)

class EmailScannerSummaryPipeline(bnp.BaseNotificationPipeline):
    """Email pipeline for scanner summary."""

    # TODO: See if the base pipline init() can be reused.
    def __init__(self, sendgrid_key):  # pylint: disable=super-init-not-called
        """Initialize.

        Args:
            sendgrid_key (str): The SendGrid API key.
        """
        self.email_util = EmailUtil(sendgrid_key)

    def _compose(  # pylint: disable=arguments-differ
            self, all_violations, total_resources):
        """Compose the scan summary.

        Build a summary of the violations and counts for the email.
        resource summary:
            {
                RESOURCE_TYPE: {
                    'pluralized_resource_type': '{RESOURCE_TYPE}s'
                    'total': TOTAL,
                    'violations': {
                        RESOURCE_ID: NUM_VIOLATIONS,
                        RESOURCE_ID: NUM_VIOLATIONS,
                        ...
                    }
                },
                ...
            }
        Args:
            all_violations (list): List of violations.
            total_resources (dict): A dict of the resources and their count.

        Returns:
            int: total_violations, an integer of the total violations.
            dict: resource_summaries, a dict of resource to violations.
                {'organization':
                    {'pluralized_resource_type': 'Organizations',
                     'total': 1,
                     'violations': OrderedDict([('660570133860', 67)])},
                 'project':
                    {'pluralized_resource_type': 'Projects',
                     'total': 41,
                     'violations': OrderedDict([('foo1_project', 111),
                                                ('foo2_project', 222),
                                                ('foo3_project', 333)])}}
        """
        resource_summaries = {}
        total_violations = 0

        for violation in sorted(all_violations,
                                key=lambda v: v.get('resource_id')):
            resource_id = violation.get('resource_id')
            resource_type = violation.get('resource_type')
            if resource_type not in resource_summaries:
                resource_summaries[resource_type] = {
                    'pluralized_resource_type': resource_util.pluralize(
                        resource_type),
                    'total': total_resources[resource_type],
                    'violations': collections.OrderedDict()
                }

            # Keep track of # of violations per resource id.
            if (resource_id not in
                    resource_summaries[resource_type]['violations']):
                resource_summaries[resource_type]['violations'][resource_id] = 0

            resource_summaries[resource_type]['violations'][resource_id] += 1
            total_violations += 1

        return total_violations, resource_summaries

    def _send(  # pylint: disable=arguments-differ
            self, csv_name, output_filename, now_utc, violation_errors,
            total_violations, resource_summaries, email_sender,
            email_recipient):
        """Send a summary email of the scan.

        Args:
            csv_name (str): The full path of the local csv filename.
            output_filename (str): The output filename.
            now_utc (datetime): The UTC datetime right now.
            violation_errors (iterable): Iterable of violation errors.
            total_violations (int): The total violations.
            resource_summaries (dict): Maps resource to violations.
                {'organization':
                    {'pluralized_resource_type': 'Organizations',
                     'total': 1,
                     'violations': OrderedDict([('660570133860', 67)])},
                 'project':
                    {'pluralized_resource_type': 'Projects',
                     'total': 41,
                     'violations': OrderedDict([('foo1_project', 111),
                                                ('foo2_project', 222),
                                                ('foo3_project', 333)])}}
            email_sender (str): The sender of the email.
            email_recipient (str): The recipient of the email.
        """
        # Render the email template with values.
        scan_date = now_utc.strftime('%Y %b %d, %H:%M:%S (UTC)')
        email_content = EmailUtil.render_from_template(
            'scanner_summary.jinja', {
                'scan_date':  scan_date,
                'resource_summaries': resource_summaries,
                'violation_errors': violation_errors,
            })

        # Create an attachment out of the csv file and base64 encode the
        # content.
        attachment = EmailUtil.create_attachment(
            file_location=csv_name,
            content_type='text/csv',
            filename=output_filename,
            disposition='attachment',
            content_id='Scanner Violations'
        )
        scanner_subject = 'Policy Scan Complete - {} violation(s) found'.format(
            total_violations)
        self.email_util.send(
            email_sender=email_sender,
            email_recipient=email_recipient,
            email_subject=scanner_subject,
            email_content=email_content,
            content_type='text/html',
            attachment=attachment)

    def run(  # pylint: disable=arguments-differ
            self, csv_name, output_filename, now_utc, all_violations,
            total_resources, violation_errors, email_sender, email_recipient):
        """Run the email pipeline

        Args:
            csv_name (str): The full path of the local csv filename.
            output_filename (str): String of the output filename.
            now_utc (datetime): The UTC datetime right now.
            all_violations (list): The list of violations.
            total_resources (dict): A dict of the resources and their count.
            violation_errors (iterable): Iterable of violation errors.
            email_sender (str): The sender of the email.
            email_recipient (str): The recipient of the email.
        """
        total_violations, resource_summaries = self._compose(
            all_violations, total_resources)

        self._send(csv_name, output_filename, now_utc, violation_errors,
                   total_violations, resource_summaries, email_sender,
                   email_recipient)


text:
module Selenium
  module WebDriver
    class Manager
      #
      # @api private
      #

      def initialize(bridge)
        @bridge = bridge
      end

      #
      # Add a cookie to the browser
      #
      # @param [Hash] opts the options to create a cookie with.
      # @option opts [String] :name A name
      # @option opts [String] :value A value
      # @option opts [String] :path ('/') A path
      # @option opts [String] :secure (false) A boolean
      # @option opts [String] :same_site (Strict or Lax) currently supported only in chrome 80+ versions
      # @option opts [Time,DateTime,Numeric,nil] :expires (nil) Expiry date, either as a Time, DateTime, or seconds since epoch.
      #
      # @raise [ArgumentError] if :name or :value is not specified
      #

      def add_cookie(opts = {})
        raise ArgumentError, 'name is required' unless opts[:name]
        raise ArgumentError, 'value is required' unless opts[:value]

        opts[:path] ||= '/'
        opts[:secure] ||= false

        same_site = opts.delete(:same_site)
        opts[:sameSite] = same_site if same_site

        obj = opts.delete(:expires)
        opts[:expiry] = seconds_from(obj).to_i if obj

        @bridge.add_cookie opts
      end

      #
      # Get the cookie with the given name
      #
      # @param [String] name the name of the cookie
      # @return [Hash, nil] the cookie, or nil if it wasn't found.
      #

      def cookie_named(name)
        convert_cookie(@bridge.cookie(name))
      end

      #
      # Delete the cookie with the given name
      #
      # @param [String] name the name of the cookie to delete
      #

      def delete_cookie(name)
        @bridge.delete_cookie name
      end

      #
      # Delete all cookies
      #

      def delete_all_cookies
        @bridge.delete_all_cookies
      end

      #
      # Get all cookies
      #
      # @return [Array<Hash>] list of cookies
      #

      def all_cookies
        @bridge.cookies.map { |cookie| convert_cookie(cookie) }
      end

      def timeouts
        @timeouts ||= Timeouts.new(@bridge)
      end

      #
      # @api beta This API may be changed or removed in a future release.
      #

      def logs
        @logs ||= Logs.new(@bridge)
      end

      #
      # Create a new top-level browsing context
      # https://w3c.github.io/webdriver/#new-window
      # @param type [Symbol] Supports two values: :tab and :window.
      #  Use :tab if you'd like the new window to share an OS-level window
      #  with the current browsing context.
      #  Use :window otherwise
      # @return [String] The value of the window handle
      #
      def new_window(type = :tab)
        case type
        when :tab, :window
          result = @bridge.new_window(type)
          unless result.key?('handle')
            raise UnknownError, "the driver did not return a handle. " \
                                "The returned result: #{result.inspect}"
          end
          result['handle']
        else
          raise ArgumentError, "invalid argument for type. Got: '#{type.inspect}'. " \
                               "Try :tab or :window"
        end
      end

      #
      # @api beta This API may be changed or removed in a future release.
      #

      def window
        @window ||= Window.new(@bridge)
      end

      private

      SECONDS_PER_DAY = 86_400.0

      def datetime_at(int)
        DateTime.civil(1970) + (int / SECONDS_PER_DAY)
      end

      def seconds_from(obj)
        case obj
        when Time
          obj.to_f
        when DateTime
          (obj - DateTime.civil(1970)) * SECONDS_PER_DAY
        when Numeric
          obj
        else
          raise ArgumentError, "invalid value for expiration date: #{obj.inspect}"
        end
      end

      def strip_port(str)
        str.split(':', 2).first
      end

      def convert_cookie(cookie)
        {
          name: cookie['name'],
          value: cookie['value'],
          path: cookie['path'],
          domain: cookie['domain'] && strip_port(cookie['domain']),
          expires: cookie['expiry'] && datetime_at(cookie['expiry']),
          same_site: cookie['sameSite'],
          secure: cookie['secure']
        }
      end
    end # Options
  end # WebDriver
end # Selenium


text:
<!DOCTYPE html>

		<title>three.js webgl - postprocessing - Screen Space Ambient Occlusion</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link type="text/css" rel="stylesheet" href="main.css">

			three.js - screen space ambient occlusion

				Your browser does not support WEBGL_depth_texture.

				This demo will not work.


text:
package org.mafagafogigante.dungeon.schema.rules;

import org.mafagafogigante.dungeon.game.Id;

import com.eclipsesource.json.JsonValue;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class IdSetJsonRule extends StringJsonRule {

  private final Set<Id> idSet;

  IdSetJsonRule(@NotNull Collection<Id> ids) {
    idSet = new HashSet<>(ids);
  }

  @Override
  public void validate(JsonValue value) {
    super.validate(value);
    try {
      Id id = new Id(value.asString());
      if (!idSet.contains(id)) {
        throw new IllegalArgumentException(value + " is not in the set of valid ids.");
      }
    } catch (IllegalArgumentException invalidValue) {
      throw new IllegalArgumentException(value + " is not a valid Dungeon id.");
    }
  }

}


text:
    <input type="text" placeholder="Name" data-ng-model="NewGenre.Name" />

    <button type="submit" data-ng-click="SaveNewGenre()">Save Genre</button>

New Genre View


text:
namespace ash {
namespace {

// A point gets removed from the collection if it is older than
// |kPointLifeDurationMs|.
const int kPointLifeDurationMs = 200;

// When no move events are being received we add a new point every
// |kAddStationaryPointsDelayMs| so that points older than
// |kPointLifeDurationMs| can get removed.
// Note: Using a delay less than the screen refresh interval will not
// provide a visual benefit but instead just waste time performing
// unnecessary updates. 16ms is the refresh interval on most devices.
// TODO(reveman): Use real VSYNC interval instead of a hard-coded delay.
const int kAddStationaryPointsDelayMs = 16;

}  // namespace

// A class to hide and lock mouse cursor while it is alive.
class LaserPointerController::ScopedLockedHiddenCursor {
 public:
  ScopedLockedHiddenCursor() : cursor_manager_(Shell::Get()->cursor_manager()) {
    DCHECK(cursor_manager_);
    // Hide and lock the cursor.
    cursor_manager_->HideCursor();
    cursor_manager_->LockCursor();
  }
  ~ScopedLockedHiddenCursor() {
    // Unlock the cursor.
    cursor_manager_->UnlockCursor();
  }

 private:
  wm::CursorManager* const cursor_manager_;
};

LaserPointerController::LaserPointerController() {
  Shell::Get()->AddPreTargetHandler(this);
}

LaserPointerController::~LaserPointerController() {
  Shell::Get()->RemovePreTargetHandler(this);
}

void LaserPointerController::AddObserver(LaserPointerObserver* observer) {
  observers_.AddObserver(observer);
}

void LaserPointerController::RemoveObserver(LaserPointerObserver* observer) {
  observers_.RemoveObserver(observer);
}

void LaserPointerController::SetEnabled(bool enabled) {
  if (enabled == is_enabled())
    return;

  FastInkPointerController::SetEnabled(enabled);
  if (!enabled) {
    DestroyPointerView();
    // Unlock mouse cursor when disabling.
    scoped_locked_hidden_cursor_.reset();
  }
  NotifyStateChanged(enabled);
}

views::View* LaserPointerController::GetPointerView() const {
  return laser_pointer_view_widget_
             ? laser_pointer_view_widget_->GetContentsView()
             : nullptr;
}

void LaserPointerController::CreatePointerView(
    base::TimeDelta presentation_delay,
    aura::Window* root_window) {
  laser_pointer_view_widget_ = LaserPointerView::Create(
      base::Milliseconds(kPointLifeDurationMs), presentation_delay,
      base::Milliseconds(kAddStationaryPointsDelayMs),
      Shell::GetContainer(root_window, kShellWindowId_OverlayContainer));
}

void LaserPointerController::UpdatePointerView(ui::TouchEvent* event) {
  LaserPointerView* laser_pointer_view = GetLaserPointerView();

  if (IsPointerInExcludedWindows(event)) {
    // Destroy the |LaserPointerView| since the pointer is in the bound of
    // excluded windows.
    DestroyPointerView();
    return;
  }

  // Unlock mouse cursor when switch to touch event.
  scoped_locked_hidden_cursor_.reset();

  laser_pointer_view->AddNewPoint(event->root_location_f(),
                                  event->time_stamp());
  if (event->type() == ui::ET_TOUCH_RELEASED) {
    laser_pointer_view->FadeOut(base::BindOnce(
        &LaserPointerController::DestroyPointerView, base::Unretained(this)));
  }
}

void LaserPointerController::UpdatePointerView(ui::MouseEvent* event) {
  LaserPointerView* laser_pointer_view = GetLaserPointerView();
  if (event->type() == ui::ET_MOUSE_MOVED) {
    if (IsPointerInExcludedWindows(event)) {
      // Destroy the |LaserPointerView| and unlock the cursor since the cursor
      // is in the bound of excluded windows.
      DestroyPointerView();
      scoped_locked_hidden_cursor_.reset();
      return;
    }

    if (!scoped_locked_hidden_cursor_) {
      scoped_locked_hidden_cursor_ =
          std::make_unique<ScopedLockedHiddenCursor>();
    }
  }

  laser_pointer_view->AddNewPoint(event->root_location_f(),
                                  event->time_stamp());
  if (event->type() == ui::ET_MOUSE_RELEASED) {
    laser_pointer_view->FadeOut(base::BindOnce(
        &LaserPointerController::DestroyPointerView, base::Unretained(this)));
  }
}

void LaserPointerController::DestroyPointerView() {
  laser_pointer_view_widget_.reset();
}

bool LaserPointerController::CanStartNewGesture(ui::LocatedEvent* event) {
  // Ignore events over the palette.
  // TODO(llin): Register palette as a excluded window instead.
  aura::Window* target = static_cast<aura::Window*>(event->target());
  gfx::Point screen_point = event->location();
  wm::ConvertPointToScreen(target, &screen_point);
  if (palette_utils::PaletteContainsPointInScreen(screen_point))
    return false;
  return FastInkPointerController::CanStartNewGesture(event);
}

bool LaserPointerController::ShouldProcessEvent(ui::LocatedEvent* event) {
  // Allow clicking when laser pointer is enabled.
  if (event->type() == ui::ET_MOUSE_PRESSED ||
      event->type() == ui::ET_MOUSE_RELEASED) {
    return false;
  }

  return FastInkPointerController::ShouldProcessEvent(event);
}

void LaserPointerController::NotifyStateChanged(bool enabled) {
  for (LaserPointerObserver& observer : observers_)
    observer.OnLaserPointerStateChanged(enabled);
}

LaserPointerView* LaserPointerController::GetLaserPointerView() const {
  return static_cast<LaserPointerView*>(GetPointerView());
}

}  // namespace ash


text:
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;

using Todoist.Net.Models;

namespace Todoist.Net.Services
{
    /// <summary>
    /// Contains methods for projects management which can be executed in a transaction.
    /// </summary>
    /// <seealso cref="CommandServiceBase" />
    /// <seealso cref="Todoist.Net.Services.IProjectCommandService" />
    internal class ProjectsCommandService : CommandServiceBase, IProjectCommandService
    {
        internal ProjectsCommandService(IAdvancedTodoistClient todoistClient)
            : base(todoistClient)
        {
        }

        internal ProjectsCommandService(ICollection<Command> queue)
            : base(queue)
        {
        }

        /// <summary>
        /// Adds a new project.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <returns>The ID of the project.</returns>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="project"/> is <see langword="null"/></exception>
        public async Task<ComplexId> AddAsync(Project project)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            var command = CreateAddCommand(CommandType.AddProject, project);
            await ExecuteCommandAsync(command).ConfigureAwait(false);

            return project.Id;
        }

        /// <summary>
        /// Archive a project and its descendants.
        /// </summary>
        /// <param name="id">The project ID.</param>
        /// <returns>Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.</returns>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <remarks>Only available for Todoist Premium users.</remarks>
        public Task ArchiveAsync(ComplexId id)
        {
            var command = CreateEntityCommand(CommandType.ArchiveProject, id);

            return ExecuteCommandAsync(command);
        }

        /// <summary>
        /// Delete an existing project and all its descendants.
        /// </summary>
        /// <param name="id">The project ID.</param>
        /// <returns> Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation. </returns>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        public Task DeleteAsync(ComplexId id)
        {
            var command = CreateEntityCommand(CommandType.DeleteProject, id);

            return ExecuteCommandAsync(command);
        }

        /// <summary>
        /// Unarchive a project.
        /// No ancestors will be unarchived along with the unarchived project.
        /// Instead, the project is unarchived alone, loses any parent relationship (becomes a root project), and is placed at the end of the list of other root projects.
        /// </summary>
        /// <param name="id">The project ID.</param>
        /// <returns> Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation. </returns>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <remarks>Only available for Todoist Premium users.</remarks>
        public Task UnarchiveAsync(ComplexId id)
        {
            var command = CreateEntityCommand(CommandType.UnarchiveProject, id);

            return ExecuteCommandAsync(command);
        }

        /// <summary>
        /// Updates the project.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <returns>Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.</returns>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="project"/> is <see langword="null"/></exception>
        public Task UpdateAsync(Project project)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }

            var command = new Command(CommandType.UpdateProject, project);

            return ExecuteCommandAsync(command);
        }

        /// <summary>
        /// Updates parent project relationships of the project asynchronous.
        /// </summary>
        /// <param name="moveArgument">The move entry.</param>
        /// <returns>
        /// Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.
        /// </returns>
        /// <exception cref="ArgumentNullException"><paramref name="moveArgument" /> is <see langword="null" /></exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        public Task MoveAsync(MoveArgument moveArgument)
        {
            if (moveArgument == null)
            {
                throw new ArgumentNullException(nameof(moveArgument));
            }

            return ExecuteCommandAsync(new Command(CommandType.MoveProject, moveArgument));
        }

        /// <summary>
        /// Update the orders and indents of multiple projects at once asynchronous.
        /// </summary>
        /// <param name="reorderEntries">The reorder entries.</param>
        /// <returns>
        /// Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.
        /// </returns>
        /// <exception cref="ArgumentNullException"><paramref name="reorderEntries" /> is <see langword="null" /></exception>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="T:System.ArgumentException">Value cannot be an empty collection.</exception>
        public Task ReorderAsync(params ReorderEntry[] reorderEntries)
        {
            if (reorderEntries == null)
            {
                throw new ArgumentNullException(nameof(reorderEntries));
            }

            if (reorderEntries.Length == 0)
            {
                throw new ArgumentException("Value cannot be an empty collection.", nameof(reorderEntries));
            }

            return ExecuteCommandAsync(new Command(CommandType.ReorderProjects, new ReorderProjectsArgument(reorderEntries)));
        }
    }
}


text:
<!DOCTYPE html>
<html>
<head>
  <title>staleelementhandling_test</title>
  <script src="webdriver-bootstrap.js"></script>
  <script src="testbase.js"></script>
  <script>
    function setUpPage() {
      openTestWindow();
    }

    function tearDownPage() {
      closeTestWindow();
    }

    function setUp(driver) {
      switchToTestWindow(driver);
    }

function testOldPage(driver) {
  driver.get(TEST_PAGE.simpleTestPage);
  var element = driver.findElement({id: 'links'});
  driver.get(TEST_PAGE.xhtmlTestPage);
  element.click();
  driver.catchExpectedError('Element should be stale');
}

function testShouldNotCrashWhenCallingGetSizeOnAnObsoleteElement(driver) {
  driver.get(TEST_PAGE.simpleTestPage);
  var element = driver.findElement({id: 'links'});
  driver.get(TEST_PAGE.xhtmlTestPage);
  element.getSize();
  driver.catchExpectedError('Element should be stale');
}

function testDynamicallyRemovingAnElementFromTheDomCausesAStaleReference(
    driver) {
  driver.get(TEST_PAGE.javascriptPage);
  var toDelete = driver.findElement({id: 'deleted'});
  assertThat(toDelete.isDisplayed(), is(true));
  driver.findElement({id: 'delete'}).click();
  toDelete.isDisplayed();
  driver.catchExpectedError(
      'Element should be stale at this point');
}
  </script>
</head>
<body>
</body>
</html>


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

<TITLE>
SsoConnection (VMware vSphere Web Services SDK JAXWS Java Samples Documentation)
</TITLE>

<META NAME="date" CONTENT="2013-08-19">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.vmware.connection

Class SsoConnection

java.lang.Object
  com.vmware.connection.SsoConnection

All Implemented Interfaces:
Connection

public class SsoConnection
extends java.lang.Object
implements Connection

Demonstrates SSO with vCenter's SSO service. This only demonstrates simple BearerToken logins.

See Also:
AcquireHoKTokenByUserCredentialSample

Nested Class Summary

 class
SsoConnection.SSOLoginException

          thrown when a login has failed for a reason

 class
SsoConnection.SSOLogoutException

          thrown on logout when something fails

Field Summary

 java.lang.String
certFileName

          You may optionally specify the system property sso.cert.file=/fully/qualified/path
 to load your SSL cert from a file.

 java.lang.String
pkeyFileName

          You may optionally specify the system property sso.pkey.file=/fully/qualified/path
 to load your SSL private key from a file.

static java.lang.String
SSO_URL

Constructor Summary

SsoConnection()

Method Summary

 Connection
connect()

 Connection
disconnect()

          properly disconnect the connection and set stale objects to "null" to help the garbage collector
 in resource constrained environments.

 void
generate()

          generates a new key & cert and caches them for next time.

 java.lang.String
getDefaultSsoUrl()

          Generates a default SSO URL to use if none was supplied on the command line.

 java.util.Map
getHeaders()

          the cached headers gleaned from the last connection atttempt

 java.lang.String
getHost()

 java.lang.String
getPassword()

 java.lang.Integer
getPort()

 com.vmware.vim25.ServiceContent
getServiceContent()

 java.lang.String
getServiceInstanceName()

 com.vmware.vim25.ManagedObjectReference
getServiceInstanceReference()

          A service instance reference used to boot strap the client

 java.net.URL
getSsoUrl()

          Will attempt to return the SSO URL you set from the command line, if you forgot or didn't set one it
 will call getDefaultSsoUrl to attempt to calculate what the URL should have been.

 java.lang.String
getUrl()

 java.net.URL
getURL()

          gets the URL used for this connection

 java.lang.String
getUsername()

 com.vmware.vim25.UserSession
getUserSession()

 com.vmware.vim25.VimPortType
getVimPort()

 com.vmware.vim25.VimService
getVimService()

 boolean
isConnected()

          returns true if the connection is open, and hasn't timed out.

 void
loadUserCert()

          Load a cached key & cert from the file system if no X509Certificate is present on the
 file system, calls "generate"

 org.w3c.dom.Element
login()

          returns the token used for login to SSO

 void
setPassword(java.lang.String password)

 com.vmware.vim25.VimService
setupVimService(org.w3c.dom.Element token,
                com.vmware.sso.client.soaphandlers.SSOHeaderHandler... handlers)

          sets up a VIM service registering handlers and handler resolvers.

 void
setUrl(java.lang.String url)

 void
setUsername(java.lang.String username)

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SSO_URL

public static final java.lang.String SSO_URL

See Also:
Constant Field Values

pkeyFileName

public final java.lang.String pkeyFileName

You may optionally specify the system property sso.pkey.file=/fully/qualified/path
 to load your SSL private key from a file.

See Also:
SecurityUtil

certFileName

public final java.lang.String certFileName

You may optionally specify the system property sso.cert.file=/fully/qualified/path
 to load your SSL cert from a file.

See Also:
SecurityUtil

Constructor Detail

SsoConnection

public SsoConnection()

Method Detail

getSsoUrl

public java.net.URL getSsoUrl()
                       throws java.net.MalformedURLException

Will attempt to return the SSO URL you set from the command line, if you forgot or didn't set one it
 will call getDefaultSsoUrl to attempt to calculate what the URL should have been.

Returns:
the URL for the SSO services

Throws:

java.net.MalformedURLException

getDefaultSsoUrl

public java.lang.String getDefaultSsoUrl()

Generates a default SSO URL to use if none was supplied on the command line. This will
 attempt to use the system properties sso.host sso.port and
 sso.path to construct a URL for the SSO server. These properties are all optional.

 If no value is set sso.host will default to the url of the WS server (assuming SSO and WS are hosted
 on the same IP)

 If no value is set sso.port will default to 7444

 If no value is set, sso.path will default to /ims/STSService which may not be correct.

Returns:
the URL to the SSO server to try

setUrl

public void setUrl(java.lang.String url)

Specified by:
setUrl in interface Connection

getUrl

public java.lang.String getUrl()

Specified by:
getUrl in interface Connection

getHost

public java.lang.String getHost()

Specified by:
getHost in interface Connection

getPort

public java.lang.Integer getPort()

Specified by:
getPort in interface Connection

setUsername

public void setUsername(java.lang.String username)

Specified by:
setUsername in interface Connection

getUsername

public java.lang.String getUsername()

Specified by:
getUsername in interface Connection

setPassword

public void setPassword(java.lang.String password)

Specified by:
setPassword in interface Connection

getPassword

public java.lang.String getPassword()

Specified by:
getPassword in interface Connection

getVimService

public com.vmware.vim25.VimService getVimService()

Specified by:
getVimService in interface Connection

getVimPort

public com.vmware.vim25.VimPortType getVimPort()

Specified by:
getVimPort in interface Connection

getServiceContent

public com.vmware.vim25.ServiceContent getServiceContent()

Specified by:
getServiceContent in interface Connection

getUserSession

public com.vmware.vim25.UserSession getUserSession()

Specified by:
getUserSession in interface Connection

getServiceInstanceName

public java.lang.String getServiceInstanceName()

Specified by:
getServiceInstanceName in interface Connection

getHeaders

public java.util.Map getHeaders()

the cached headers gleaned from the last connection atttempt

Specified by:
getHeaders in interface Connection

Returns:

getServiceInstanceReference

public com.vmware.vim25.ManagedObjectReference getServiceInstanceReference()

A service instance reference used to boot strap the client

Specified by:
getServiceInstanceReference in interface Connection

Returns:
the top level ServiceInstanceReference

login

public org.w3c.dom.Element login()

returns the token used for login to SSO

Returns:
token to use for Single Sign On security

setupVimService

public com.vmware.vim25.VimService setupVimService(org.w3c.dom.Element token,
                                                   com.vmware.sso.client.soaphandlers.SSOHeaderHandler... handlers)

sets up a VIM service registering handlers and handler resolvers. Takes an arbitrary number of handlers.

Parameters:
token - - service token
handlers - - arbitrary number of handlers

Returns:
a properly configured VimService object
See Also:
VimService

connect

public Connection connect()

Specified by:
connect in interface Connection

loadUserCert

public void loadUserCert()

Load a cached key & cert from the file system if no X509Certificate is present on the
 file system, calls "generate"

generate

public void generate()

generates a new key & cert and caches them for next time.

isConnected

public boolean isConnected()

returns true if the connection is open, and hasn't timed out. Connections time-out every 30 minutes.

Specified by:
isConnected in interface Connection

Returns:
true if a good, non-stale connection

disconnect

public Connection disconnect()

properly disconnect the connection and set stale objects to "null" to help the garbage collector
 in resource constrained environments.

Specified by:
disconnect in interface Connection

Returns:

getURL

public java.net.URL getURL()

gets the URL used for this connection

Specified by:
getURL in interface Connection

Returns:

      Overview
      Package
    Class
      Tree
      Deprecated
      Index

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
============
Pushing data
============

You can submit data either with the telnet protocol on port 4242 or the rest protocol on port 8080 (ports can be changed in the kairosdb.properties file).  Other mechanisms exist for getting data into KairosDB.  A list of plugins and external projects can be found on the `external projects page`_.

	**Note:** Of the two default protocols only the rest protocol handles custom data types.

A great client for testing data in and out is [http://code.google.com/p/rest-client/]

--------------------------
Submitting data via telnet
--------------------------

The format of the data is
::

	put <metric name> <time stamp> <value> <tag> <tag>... \n

**Metric name** must be one word and is limited to alpha numerics with "-_.".

**Time stamp** can either be in milliseconds or in seconds since Jan 1, 1970 (unix epoch) - seconds are for backwards compatibility with the original opentsdb.  The Cassandra datastore supports milliseconds.

	**Note:** The REST API only supports a timestamp in milliseconds.

**Value** can either be a long or double value.

**Tag** is in the form of key=value.

Be aware that the data sent must be followed by a line feed character.

Here is a simple shell script that inserts data using netcat.
::

	#!/bin/bash

	# Current time in milliseconds
	now=$(($(date +%s%N)/1000000))
	metric=load_value_test
	value=42
	host=10.92.4.4

	echo "put $metric $now $value host=A" | nc -w 30 $host 4242

------------------------
Submitting data via rest
------------------------

The url for submitting data is http://localhost:8080/api/v1/datapoints
::

	[{
	    "name": "archive.file.tracked",
	    "timestamp": 1349109376,
	    "type": "long",
	    "value": 123,
	    "tags":{"host":"test"}
	},
	{
	    "name": "archive.file.search",
	    "timestamp": 999,
	    "type": "double",
	    "value": 32.1,
	    "tags":{"host":"test"}
	}]

In the case of the rest api the timestamp is always treated as milliseconds since Jan 1, 1970.  If you are writing to HBase it is truncated off to the second.

See the :doc:`REST API documentation <restapi/AddDataPoints>` for more details

-----------------
Graphite protocol
-----------------

KairosDB now supports the Graphite plaintext and pickle protocol as explained `here <https://graphite.readthedocs.org/en/latest/feeding-carbon.html>`_.  This lets you integrate KairosDB with existing applications that push data to Graphite.  Please see the `external projects page`_ for a link to the plugin.

.. _external projects page: https://github.com/proofpoint/kairosdb/wiki/External-projects,-libraries-and-stuff.


text:
% Convert an integer to string, but add optional 0's in the front to make
% the string equal to a predefined width.
% E.g.
% if num=10, width=3, then str = '010';
% if num=10, width=2, then str = '10';
% if num=10, width=1, then str = '10';
% Author: Xiong Xiao, Temasek Lab @ NTU, Singapore.
% Created: 09 Jun 2013
% Last Modified: 09 Jun 2013
function str = num2str_fixed_width(num, width)

str = num2str(num);
if length(str)>width
    fprintf('Warning: string width is larger than predefined value!\n');
elseif length(str)<width
    while 1
        str = ['0' str];
        if length(str)==width
            break;
        end
    end
end


text:
z3overlay
========

An overlay for the OCaml Z3 binding.

[Z3](https://github.com/Z3Prover/z3) is an SMT solver developed by microsoft. A new ocaml binding is available in the branch [`unstable`](https://github.com/Z3Prover/z3/tree/unstable).

This package contains an overlay to this new official binding.

This overlays allows to track the type of terms in the typesystem, allowing the OCaml typechecker to check the validity of Z3 formulas and making the model extraction easier.

## Howto

You can see an example of use in [`test/simple.ml`](test/simple.ml). Here is a taste:
```ocaml
(** We hide the context by instanciating a functor: *)
module Z = ZZ3.Make(struct let ctx = Z3.mk_context [] end)

(** The result of the functor is safe for opening (contains only types and modules. *)
open Z

(** We create a solver for future usage. *)
let solver = Solver.make ()

(** We create new SMT variables and specify their types. *)
let x = Symbol.declare Real "x" in
let y = Symbol.declare Real "y" in

(** We can define SMT formulas using an OCaml-like syntax.
    [!] transforms a symbol into a term.
*)
let t = T.( !x + !y >= int 3 )

(** We assert the formula in the SMT solver. *)
let () = Solver.add ~solver sum t

(** We can now solve it and extract the result: *)
let model = match Solver.check ~solver [] with
  | Unsat _ | Unkown _ -> failwith "Oh noees"
  | Sat (lazy model) -> model

(** Finally we easily get back the values in the model as inferred by Z3
    without any casting! *)
let val_x = Model.get_value ~model x
let val_y = Model.get_value ~model y
```

## Install

The dependencies are:

- Z3
- zarith

### The official bindings
To install the official bindings, execute
```
python2 scripts/mk_make.py --ml
cd build
make -j4
```
Go [take a coffee](https://xkcd.com/303/) and then:
```
sudo make install
make ocamlfind_install
```

Alternatively, one can only do `make ocamlfind_install` and directs `LD_LIBRARY_PATH` to the directory containing `libz3.so` (probably `` `ocamlfind printconf destdir`/stublibs``).

### z3overlay
Once the official bindings are installed, install this package simply by `make && make install`.

### Tests

Tests are available under `test/` and built with `configure --enable-tests` and `make test`.

## Optimizing SMT solver.

A branch containing an optimizing solver for z3 is available in z3's [`opt`](https://github.com/Z3Prover/z3/tree/opt) branch. z3overlay's [`opt`](https://github.com/termite-analyser/z3overlay/tree/opt) contains an adaptation for Z3overlay.


text:
class CloudComposeException(Exception):
    def __init__(self,*args,**kwargs):
        Exception.__init__(self,*args,**kwargs)


text:
'use strict';

var Service = require('./service');

var thermal = new Service({
  name: 'thermal',
  topic: '/sensors/thermal',
  op: 'subscribe',
  msgType: 'pandora_sensor_msgs/ThermalMeanMsg',
  serverTopic: 'sensors/thermal'
}, function(msg) {
  return msg.thermal_mean;
});

thermal.start();


text:
package ui

import (
	"math"

	"github.com/hajimehoshi/ebiten/v2/internal/atlas"
	"github.com/hajimehoshi/ebiten/v2/internal/buffered"
	"github.com/hajimehoshi/ebiten/v2/internal/clock"
	"github.com/hajimehoshi/ebiten/v2/internal/debug"
	"github.com/hajimehoshi/ebiten/v2/internal/graphics"
	"github.com/hajimehoshi/ebiten/v2/internal/graphicsdriver"
	"github.com/hajimehoshi/ebiten/v2/internal/hooks"
	"github.com/hajimehoshi/ebiten/v2/internal/mipmap"
)

var (
	NearestFilterShader = &Shader{shader: mipmap.NearestFilterShader}
	LinearFilterShader  = &Shader{shader: mipmap.LinearFilterShader}
)

type Game interface {
	NewOffscreenImage(width, height int) *Image
	NewScreenImage(width, height int) *Image
	Layout(outsideWidth, outsideHeight float64) (screenWidth, screenHeight float64)
	Update() error
	DrawOffscreen() error
	DrawFinalScreen(scale, offsetX, offsetY float64)
}

type context struct {
	game Game

	updateCalled bool

	offscreen *Image
	screen    *Image

	screenWidth     float64
	screenHeight    float64
	offscreenWidth  float64
	offscreenHeight float64

	isOffscreenDirty bool

	skipCount int
}

func newContext(game Game) *context {
	return &context{
		game: game,
	}
}

func (c *context) updateFrame(graphicsDriver graphicsdriver.Graphics, outsideWidth, outsideHeight float64, deviceScaleFactor float64, ui *userInterfaceImpl) error {
	// TODO: If updateCount is 0 and vsync is disabled, swapping buffers can be skipped.
	return c.updateFrameImpl(graphicsDriver, clock.UpdateFrame(), outsideWidth, outsideHeight, deviceScaleFactor, ui, false)
}

func (c *context) forceUpdateFrame(graphicsDriver graphicsdriver.Graphics, outsideWidth, outsideHeight float64, deviceScaleFactor float64, ui *userInterfaceImpl) error {
	n := 1
	if graphicsDriver.IsDirectX() {
		// On DirectX, both framebuffers in the swap chain should be updated.
		// Or, the rendering result becomes unexpected when the window is resized.
		n = 2
	}
	for i := 0; i < n; i++ {
		if err := c.updateFrameImpl(graphicsDriver, 1, outsideWidth, outsideHeight, deviceScaleFactor, ui, true); err != nil {
			return err
		}
	}
	return nil
}

func (c *context) updateFrameImpl(graphicsDriver graphicsdriver.Graphics, updateCount int, outsideWidth, outsideHeight float64, deviceScaleFactor float64, ui *userInterfaceImpl, forceDraw bool) (err error) {
	if err := theGlobalState.error(); err != nil {
		return err
	}

	ui.beginFrame()
	defer ui.endFrame()

	// The given outside size can be 0 e.g. just after restoring from the fullscreen mode on Windows (#1589)
	// Just ignore such cases. Otherwise, creating a zero-sized framebuffer causes a panic.
	if outsideWidth == 0 || outsideHeight == 0 {
		return nil
	}

	debug.Logf("----\n")

	if err := buffered.BeginFrame(graphicsDriver); err != nil {
		return err
	}
	defer func() {
		// All the vertices data are consumed at the end of the frame, and the data backend can be
		// available after that. Until then, lock the vertices backend.
		err1 := graphics.LockAndResetVertices(func() error {
			if err := buffered.EndFrame(graphicsDriver); err != nil {
				return err
			}
			return nil
		})
		if err == nil {
			err = err1
		}
	}()

	// ForceUpdate can be invoked even if the context is not initialized yet (#1591).
	if w, h := c.layoutGame(outsideWidth, outsideHeight, deviceScaleFactor); w == 0 || h == 0 {
		return nil
	}

	// Ensure that Update is called once before Draw so that Update can be used for initialization.
	if !c.updateCalled && updateCount == 0 {
		updateCount = 1
		c.updateCalled = true
	}
	debug.Logf("Update count per frame: %d\n", updateCount)

	// Update the game.
	for i := 0; i < updateCount; i++ {
		if err := hooks.RunBeforeUpdateHooks(); err != nil {
			return err
		}
		if err := c.game.Update(); err != nil {
			return err
		}
		// Catch the error that happened at (*Image).At.
		if err := theGlobalState.error(); err != nil {
			return err
		}
		ui.resetForTick()
	}

	// Draw the game.
	if err := c.drawGame(graphicsDriver, forceDraw); err != nil {
		return err
	}

	return nil
}

func (c *context) drawGame(graphicsDriver graphicsdriver.Graphics, forceDraw bool) error {
	if (c.offscreen.imageType == atlas.ImageTypeVolatile) != theGlobalState.isScreenClearedEveryFrame() {
		w, h := c.offscreen.width, c.offscreen.height
		c.offscreen.MarkDisposed()
		c.offscreen = c.game.NewOffscreenImage(w, h)
	}

	// Even though updateCount == 0, the offscreen is cleared and Draw is called.
	// Draw should not update the game state and then the screen should not be updated without Update, but
	// users might want to process something at Draw with the time intervals of FPS.
	if theGlobalState.isScreenClearedEveryFrame() {
		c.offscreen.clear()
	}

	// isOffscreenDirty is updated when an offscreen's drawCallback.
	c.isOffscreenDirty = false
	if err := c.game.DrawOffscreen(); err != nil {
		return err
	}

	const maxSkipCount = 3

	if !forceDraw && !theGlobalState.isScreenClearedEveryFrame() && !c.isOffscreenDirty {
		if c.skipCount < maxSkipCount {
			c.skipCount++
		}
	} else {
		c.skipCount = 0
	}

	// If the offscreen is not updated and the framebuffers don't have to be updated, skip rendering to save GPU power.
	if c.skipCount < maxSkipCount {
		if graphicsDriver.NeedsClearingScreen() {
			// This clear is needed for fullscreen mode or some mobile platforms (#622).
			c.screen.clear()
		}

		c.game.DrawFinalScreen(c.screenScaleAndOffsets())

		// The final screen is never used as the rendering source.
		// Flush its buffer here just in case.
		c.screen.flushBufferIfNeeded()
	}

	return nil
}

func (c *context) layoutGame(outsideWidth, outsideHeight float64, deviceScaleFactor float64) (int, int) {
	owf, ohf := c.game.Layout(outsideWidth, outsideHeight)
	if owf <= 0 || ohf <= 0 {
		panic("ui: Layout must return positive numbers")
	}

	c.screenWidth = outsideWidth * deviceScaleFactor
	c.screenHeight = outsideHeight * deviceScaleFactor
	c.offscreenWidth = owf
	c.offscreenHeight = ohf

	sw := int(math.Ceil(c.screenWidth))
	sh := int(math.Ceil(c.screenHeight))
	ow := int(math.Ceil(c.offscreenWidth))
	oh := int(math.Ceil(c.offscreenHeight))

	if c.screen != nil {
		if c.screen.width != sw || c.screen.height != sh {
			c.screen.MarkDisposed()
			c.screen = nil
		}
	}
	if c.screen == nil {
		c.screen = c.game.NewScreenImage(sw, sh)
	}

	if c.offscreen != nil {
		if c.offscreen.width != ow || c.offscreen.height != oh {
			c.offscreen.MarkDisposed()
			c.offscreen = nil
		}
	}
	if c.offscreen == nil {
		c.offscreen = c.game.NewOffscreenImage(ow, oh)
		c.offscreen.drawCallback = func() {
			c.isOffscreenDirty = true
		}
	}

	return ow, oh
}

func (c *context) adjustPosition(x, y float64, deviceScaleFactor float64) (float64, float64) {
	s, ox, oy := c.screenScaleAndOffsets()
	// The scale 0 indicates that the screen is not initialized yet.
	// As any cursor values don't make sense, just return NaN.
	if s == 0 {
		return math.NaN(), math.NaN()
	}
	return (x*deviceScaleFactor - ox) / s, (y*deviceScaleFactor - oy) / s
}

func (c *context) screenScaleAndOffsets() (scale, offsetX, offsetY float64) {
	scaleX := c.screenWidth / c.offscreenWidth
	scaleY := c.screenHeight / c.offscreenHeight
	scale = math.Min(scaleX, scaleY)
	width := c.offscreenWidth * scale
	height := c.offscreenHeight * scale
	offsetX = (c.screenWidth - width) / 2
	offsetY = (c.screenHeight - height) / 2
	return
}


text:
This is Task 02 of the Eudyptula Challenge
------------------------------------------

Now that you have written your first kernel module, it's time to take
off the training wheels and move on to building a custom kernel.  No
more distro kernels for you.  For this task you must run your own
kernel.  And use git!  Exciting, isn't it?  No?  Oh, ok...

The tasks for this round are:
  - Download Linus's latest git tree from git.kernel.org (you have to
    figure out which one is his.  It's not that hard, just remember what
    his last name is and you should be fine.)
  - Build it, install it, and boot it.  You can use whatever kernel
    configuration options you wish to use, but you must enable
    CONFIG_LOCALVERSION_AUTO=y.
  - Show proof of booting this kernel.  Bonus points if you do it on a
    "real" machine, and not a virtual machine (virtual machines are
    acceptable, but come on, real kernel developers don't mess around
    with virtual machines, they are too slow.  Oh yeah, we aren't real
    kernel developers just yet.  Well, I'm not anyway, I'm just a
    script...)  Again, proof of running this kernel is up to you, I'm
    sure you can do well.

Hint, you should look into the 'make localmodconfig' option, and base
your kernel configuration on a working distro kernel configuration.
Don't sit there and answer all 1625 different kernel configuration
options by hand, even I, a foolish script, know better than to do that!

After doing this, don't throw away that kernel, git tree, and
configuration file.  You'll be using it for later tasks.  A working
kernel configuration file is a precious thing, all kernel developers
have one they have grown and tended to over the years.  This is the
start of a long journey with yours.  Don't discard it like was a broken
umbrella, it deserves better than that.


text:
export default {
	html: `
	<button>Click Me</button>

Icon B

	`,

	async test({ assert, target, window }) {
		const btn = target.querySelector('button');
		const clickEvent = new window.MouseEvent('click');

		await btn.dispatchEvent(clickEvent);

		assert.htmlEqual(
			target.innerHTML,
			`
			<button>Click Me</button>

Icon A

			`
		);

		await btn.dispatchEvent(clickEvent);

		assert.htmlEqual(
			target.innerHTML,
			`
			<button>Click Me</button>

Icon B

			`
		);
	}
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="LOCAL" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-3.3" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/apiservice" />
            <option value="$PROJECT_DIR$/common" />
            <option value="$PROJECT_DIR$/eventposter" />
            <option value="$PROJECT_DIR$/feizhai" />
            <option value="$PROJECT_DIR$/library" />
            <option value="$PROJECT_DIR$/usermodule" />
            <option value="$PROJECT_DIR$/utils" />
            <option value="$PROJECT_DIR$/widget" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>


text:
alter table veteran add column is_sensitive BOOLEAN NOT NULL DEFAULT 0;

alter table template add column is_graphical BOOLEAN NOT NULL DEFAULT 0;


text:
package com.eduworks.cruncher.net;

import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.NoRouteToHostException;
import java.net.URL;
import java.util.Map;

import com.eduworks.lang.threading.EwThreading;
import org.json.JSONException;
import org.json.JSONObject;

import com.eduworks.resolver.Context;
import com.eduworks.resolver.Cruncher;

public class CruncherHttpStatus extends Cruncher
{

    private static final String REQUEST_METHOD = "GET";
    private static final int CONNECT_TIMOUT = 15000;

    @Override
    public Object resolve(Context c, Map<String, String[]> parameters, Map<String, InputStream> dataStreams) throws JSONException
    {
        String url = getAsString("url", c, parameters, dataStreams);
        if (url == null || url.trim().isEmpty())
            return "INVALID URL";
        String ret = null;
        try
        {
            URL u = new URL(url);
            HttpURLConnection conn = (HttpURLConnection) u.openConnection();
            conn.setRequestMethod(REQUEST_METHOD);
            conn.setInstanceFollowRedirects(false);
            conn.setConnectTimeout(CONNECT_TIMOUT);
            conn.setReadTimeout(CONNECT_TIMOUT);
            conn.connect();
            String rc = String.valueOf(conn.getResponseCode());
            conn.disconnect();
            ret = rc;
        }
        catch (NoRouteToHostException e)
        {
            ret = "NO ROUTE TO HOST";
        }
        catch (java.net.UnknownHostException uhe)
        {
            ret = "UNKNOWN HOST";
        }
        catch (java.net.SocketTimeoutException ste)
        {
            ret = "TIMED OUT (" + CONNECT_TIMOUT + "ms)";
        }
        catch (Exception e)
        {
            ret = "CONNECTION EXCEPTION (" + CONNECT_TIMOUT + "ms): " + e.toString();
        }
        return ret;
    }

    @Override
    public String getDescription()
    {
        return "Returns the HTTP status of the given URL.";
    }

    @Override
    public String getReturn()
    {
        return "String";
    }

    @Override
    public String getAttribution()
    {
        return ATTRIB_NONE;
    }

    @Override
    public JSONObject getParameters() throws JSONException
    {
        return jo("url", "String", "?reliable", "Boolean");
    }

}


text:
require 'test_helper'
require 'logger'

CONNECT_STRING = "relp_version=0\nrelp_software=librelp,1.4.0,http://librelp.adiscon.com\ncommands=syslog"
CONNECT_RESPONSE = "200 OK\nrelp_version=0\nrelp_software=ruby-relp,1.0.0,https://github.com/ViaQ/Relp\ncommands=syslog"

class TestRelpSession < MiniTest::Test
  def setup
    @logger = Logger.new STDERR
    @logger.level = Logger::DEBUG
    @callback = Minitest::Mock.new
    @server = Relp::RelpServer.new(1234, @callback, logger: @logger)
    @server_thread = Thread.new { @server.run }
    @client = Client.new 1234, @logger
  end

  def teardown
    @callback.verify
    @client.send_data('0 close 0')
    @client.socket.close
    @server.server_shutdown
    @server_thread.join
  end

  def connect
    @msg_number = 1
    @client.send_data("#{@msg_number} open #{CONNECT_STRING.length} #{CONNECT_STRING}")
    data = @client.recv_data
    assert_equal("#{@msg_number} rsp #{CONNECT_RESPONSE.length} #{CONNECT_RESPONSE}", data)
  end

  def syslog(msg)
    @msg_number += 1
    @client.send_data("#{@msg_number} syslog #{msg.length} #{msg}")
    resp = @client.recv_data
    assert_equal("#{@msg_number} rsp 6 200 OK", resp)
  end

  def test_connect
    connect
  end

  def test_send
    connect
    @callback.expect(:call, nil, [ "test", "127.0.0.1" ])
    syslog("test")
  end

  def test_multi_send
    connect
    @callback.expect(:call, nil, [ "test", "127.0.0.1" ])
    @callback.expect(:call, nil, [ "foo", "127.0.0.1" ])
    @callback.expect(:call, nil, [ "bar", "127.0.0.1" ])
    syslog("test")
    syslog("foo")
    syslog("bar")
  end

end


text:
<krpano><!-- krpano 1.0.8.15 - Default Virtual Tour Skin -->

	<!-- Global Skin settings (can be overridden in the 'outer' xml) -->
	<skin_settings bingmaps="false" bingmaps_key="" gyro="true" thumbswidth="120" thumbsheight="80" thumbspadding="10" thumbscrop="0|40|240|160"/>

	<progress showload="none" showwait="none"/>

	<!-- Skin Layout -->

	<layer name="skin_control_bar" keep="true" type="container" bgcolor="0x000000" bgalpha="0.0" align="leftbottom" width="100%" height="40" x="0" y="20" y_shown="0" y_hidden="-42" zorder="3">
		<layer name="skin_btn_gyro" url="vtourskin.png" crop="0|384|64|64" align="bottom" x="140" y="4" scale="0.5" ondown="skin_buttonglow(get(name)); skin_showmap(false);" onclick="switch(plugin[skin_gyro].enabled);" onup="skin_buttonglow(null);" visible="false" devices="HTML5"/>
		<layer name="skin_btn_fs" url="vtourskin.png" crop="0|576|64|64" align="rightbottom" scale="0.5" ondown="skin_buttonglow(get(name));" onup="skin_buttonglow(null);" onclick="switch(fullscreen);" devices="Flash"/>	</layer>

	<layer name="skin_buttonglow" keep="true" url="vtourskin.png" crop="64|384|64|64" align="center" x="0" y="1" alpha="0.0" visible="false" enabled="false"/>
	<layer name="skin_thumbborder" keep="true" url="vtourskin_thumbborder.png" visible="false" enabled="false" align="lefttop" scale="0.5" ox="-2" oy="-2"/>
	<layer name="skin_logo" keep="true" url="" align="righttop" x="5" y="5" capture="false" accuracy="1" state="small" onclick="if(state == 'small', skin_openlogo(); , skin_closelogo('now'); opened_onclick(); );"/>

	<plugin name="skin_gyro" keep="true" url="" html5_url="%SWFPATH%/plugins/gyro.js" devices="HTML5" enabled="false" camroll="true" friction="0" velastic="0" onavailable="set(layer[skin_btn_gyro].visible,true); skin_onresize();"/>

	<!-- Skin Events -->

	<events name="skin_events" keep="true" onxmlcomplete="skin_startup(); set(events[skin_events].onxmlcomplete,null);" onnewpano="skin_showloading(true); skin_update_scene_infos();" onremovepano="skin_showloading(true);" onloadcomplete="skin_showloading(false);" onresize="skin_onresize();"/>

	<events name="skin_events" devices="Flash" onenterfullscreen="set(layer[skin_btn_fs].crop, '64|576|64|64');" onexitfullscreen="set(layer[skin_btn_fs].crop, '0|576|64|64');"/>

	<!-- Skin Hotspot Style (the hotspots need a 'linkedscene' attribute to be clickable)-->
	<style name="skin_hotspotstyle" url="vtourskin_hotspot.png" scale="0.5" edge="top" oy="0" onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );"/>

	<!-- Small screen layout for mobile devices (override/extend settings) -->

	<krpano devices="Mobile">
		<layer name="skin_scroll_window" y="64" y_shown="64" y_hidden="-4">
			<layer name="skin_scroll_layer">
				<layer name="skin_topborder" height="24"/>
				<layer name="skin_title" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:26px;"/>
				<layer name="skin_scroll_container">
					<layer name="skin_thumbs" height="200"/>
					<layer name="skin_map">
						<maptypecontrol scale="1.5"/>
					</layer>
				</layer>
			</layer>
		</layer>

		<layer name="skin_control_bar" height="64" y="0" y_shown="0" y_hidden="-68">
			<layer name="skin_btmborder" visible="false"/>
			<layer name="skin_btn_prev" scale="1" y="0" align="left" x="0"/>
			<layer name="skin_btn_next" scale="1" y="0" align="left" x="80"/>
			<layer name="skin_btn_thumbs" scale="1" y="0" align="left" x="160"/>
			<layer name="skin_btn_map" scale="1" y="0" align="left" x="240"/>
			<layer name="skin_btn_lt" visible="false"/>
			<layer name="skin_btn_rt" visible="false"/>
			<layer name="skin_btn_up" visible="false"/>
			<layer name="skin_btn_dn" visible="false"/>
			<layer name="skin_btn_in" visible="false"/>
			<layer name="skin_btn_ou" visible="false"/>
			<layer name="skin_btn_gyro" scale="1" y="0" align="left" x="320"/>
			<layer name="skin_btn_hide" scale="1" x="5"/>
			<layer name="skin_btn_show" scale="1" x="0" y="-58"/>
		</layer>

		<layer name="skin_loadingtext" css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-style:italic; font-size:44px;"/>
		<layer name="skin_buttonglow" scale="2.0"/>
		<layer name="skin_thumbborder" scale="1"/>
	</krpano>

	<!-- Additional layout changes for Android Flashplayer Mobiles - different fullscreen button layout, zooming buttons, smaller loading text size -->

	<krpano devices="Mobile+Android+Flash">
		<layer name="skin_scroll_window">
			<layer name="skin_scroll_layer">
				<layer name="skin_title" width="100%" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:20px;"/>
			</layer>
		</layer>

		<layer name="skin_control_bar">
			<layer name="skin_btn_fs" scale="1" align="right" x="70" y="0"/>
			<layer name="skin_btn_show" x="-10" y="-40"/>
		</layer>

		<layer name="skin_loadingtext" css="text-align:center; color:#FFFFFF; font-family:Arial; font-weight:bold; font-style:italic; font-size:30px;"/>

		<layer name="skin_androidzoom_buttons" keep="true" type="container" width="60" height="160" align="right">
			<layer name="skin_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" crop="9|512|46|64" align="center" x="0" y="-40" zorder="2" ondown="if(layer[skin_map].state == 'hidden',set(fov_moveforce,-1));skin_buttonglow(get(name));" onup="if(layer[skin_map].state == 'hidden',set(fov_moveforce,0),layer[skin_map].zoomin());skin_buttonglow(null);"/>
			<layer name="skin_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" crop="73|512|46|64" align="center" x="0" y="+40" zorder="2" ondown="if(layer[skin_map].state == 'hidden',set(fov_moveforce,+1));skin_buttonglow(get(name));" onup="if(layer[skin_map].state == 'hidden',set(fov_moveforce,0),layer[skin_map].zoomout());skin_buttonglow(null);"/>
		</layer>
	</krpano>

	<!-- Skin Actions -->

	<action name="skin_startup">
		skin_addthumbs();
		skin_onresize();
		skin_updatescroll();

		copy(usegyro, skin_settings.gyro);
		if(isdesktop, set(usegyro, false));
		if(isflash, set(usegyro, false));
		if(usegyro, copy(plugin[skin_gyro].url, plugin[skin_gyro].html5_url); );

		if(skin_settings.bingmaps == true,
			set(layer[skin_btn_map].visible, true);
			copy(layer[skin_map].key, skin_settings.bingmaps_key);
			if(isflash, copy(layer[skin_map].url, layer[skin_map].flash_url), copy(layer[skin_map].url, layer[skin_map].html5_url));
		  ,
			if(ismobile, copy(layer[skin_btn_gyro].x, layer[skin_btn_map].x) );
		  );
	</action>

	<action name="skin_addthumbs">
		copy(thumbwidth, skin_settings.thumbswidth);
		copy(thumbheight, skin_settings.thumbsheight);
		copy(thumbpadding, skin_settings.thumbspadding);
		copy(thumbcrop, skin_settings.thumbscrop);

		if(ismobile,
			mul(thumbwidth,2);
			mul(thumbheight,2);
			mul(thumbpadding,2);
		  );

		add(thumbxoffset, thumbwidth, thumbpadding);
		mul(thumbxcenter, thumbxoffset, 0.5);
		mul(thumbbarwidth, thumbxoffset, scene.count);
		add(thumbbarwidth, thumbpadding);
		add(thumbbarheight, thumbpadding, thumbheight);
		add(thumbbarheight, thumbpadding);
		copy(layer[skin_thumbs].height, thumbbarheight);
		copy(layer[skin_thumbs].width, thumbbarwidth);

		for(set(i,0), i LT scene.count, inc(i),
			txtadd(thumbname,'skin_thumb_',get(i));
			addlayer(get(thumbname));
			copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
			set(layer[get(thumbname)].keep, true);
			set(layer[get(thumbname)].parent, 'skin_thumbs');
			set(layer[get(thumbname)].align, lefttop);
			copy(layer[get(thumbname)].crop, thumbcrop);
			copy(layer[get(thumbname)].width, thumbwidth);
			copy(layer[get(thumbname)].height, thumbheight);
			mul(thumbx, i, thumbxoffset);
			add(thumbx, thumbpadding);
			copy(layer[get(thumbname)].x, thumbx);
			copy(layer[get(thumbname)].y, thumbpadding);
			add(scene[get(i)].thumbx, thumbx, thumbxcenter);
			copy(scene[get(i)].thumby, thumbpadding);
			set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
			set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); loadscene(get(linkedscene), null, MERGE, BLEND(0.5)); );
		  );
	</action>

	<action name="skin_addmapspots">
		for(set(i,0), i LT scene.count, inc(i),
			if(scene[get(i)].lat,
				txtadd(spotname, 'spot', get(i));
				txtadd(spotevent, 'activatespot(',get(spotname),'); loadscene(', get(scene[get(i)].name), ',null,MERGE,BLEND(1)); skin_updatescroll(); delayedcall(0.5,skin_showmap(false));');
				copy(scene[get(i)].mapspotname, spotname);
				addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotevent));
			  );
		  );
		activatespot(spot0);
		zoomToSpotsExtent();
	</action>

	<action name="skin_onresize">
		mul(mh, stageheight, -1);
		if(layer[skin_thumbs].state == 'visible', add(mh,layer[skin_thumbs].height); );
		if(layer[skin_map].state == 'visible', sub(hh,stageheight,20); sub(hh,layer[skin_control_bar].height); sub(hh,32); copy(layer[skin_map].height, hh); add(mh,hh); );
		set(layer[skin_scroll_layer].y, get(mh));

		ifnot(ismobile, if(stagewidth LT 480, skin_showbuttons(false), skin_showbuttons(true)); );
	</action>

	<action name="skin_showbuttons">
		set(layer[skin_btn_lt].visible, %1);
		set(layer[skin_btn_rt].visible, %1);
		set(layer[skin_btn_up].visible, %1);
		set(layer[skin_btn_dn].visible, %1);
		set(layer[skin_btn_in].visible, %1);
		set(layer[skin_btn_ou].visible, %1);
		if(%1 == true,
			if(plugin[skin_gyro].available == true, set(layer[skin_btn_gyro].visible, %1) );
			if(isflash, set(layer[skin_btn_fs].visible, %1) );
		  ,
			set(layer[skin_btn_gyro].visible, %1);
			set(layer[skin_btn_fs].visible, %1);
		  );
	</action>

	<action name="skin_updatescroll">
		if(layer[skin_thumbs].loaded,
			set(cursceneindex, 0);
			if(xml.scene, copy(cursceneindex, scene[get(xml.scene)].index));
			layer[skin_thumbs].setcenter(get(scene[get(cursceneindex)].thumbx), get(scene[get(cursceneindex)].thumby));
		  );
	</action>

	<action name="skin_update_scene_infos">
		txtadd(layer[skin_title].html, get(title), ' - ', get(scene[get(xml.scene)].title) );
		delayedcall(0.1, set(layer[skin_title].visible,true) );

		if(scene[get(xml.scene)].index GT 0,
			set(layer[skin_btn_prev].enabled, true);
			set(layer[skin_btn_prev].alpha, 1.0);
		  ,
			set(layer[skin_btn_prev].enabled, false);
			set(layer[skin_btn_prev].alpha, 0.3);
		  );

		sub(lastsceneindex, scene.count, 1);
		if(scene[get(xml.scene)].index LT lastsceneindex,
			set(layer[skin_btn_next].enabled, true);
			set(layer[skin_btn_next].alpha, 1.0);
		  ,
			set(layer[skin_btn_next].enabled, false);
			set(layer[skin_btn_next].alpha, 0.3);
		  );

		txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(scene[get(xml.scene)].index));
		set(layer[skin_thumbborder].visible, true);

		if(scene[get(xml.scene)].mapspotname,
			layer[skin_map].activatespot(get(scene[get(xml.scene)].mapspotname));
			layer[skin_map].pantospot(get(scene[get(xml.scene)].mapspotname));
		  );
	</action>

	<action name="skin_nextscene">
		add(newsceneindex, scene[get(xml.scene)].index, %1);
		if(newsceneindex GE 0,
			if(newsceneindex LT scene.count,
				txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(scene[get(xml.scene)].index));
				layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx), get(scene[get(newsceneindex)].thumby));
				loadscene(get(newsceneindex), null, MERGE, BLEND(0.5));
			  );
		  );
	</action>

	<action name="skin_showloading">
		set(layer[skin_loadingtext].visible, %1);
	</action>

	<action name="skin_buttonglow">
		if(%1 != null,
			set(layer[skin_buttonglow].parent, %1);
			set(layer[skin_buttonglow].visible, true);
			tween(layer[skin_buttonglow].alpha, 0.7, 0.07);
		  ,
			tween(layer[skin_buttonglow].alpha, 0.0, 0.1, default, set(layer[skin_buttonglow].parent, null); set(layer[skin_buttonglow].visible, false); );
		  );
	</action>

	<action name="skin_hideskin">
		if(layer[skin_map].state != 'hidden', skin_showmap(false); wait(0.4); );
		if(layer[skin_thumbs].state != 'hidden', skin_showthumbs(false); wait(0.25); );

		tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window].y_hidden), 0.5, easeOutQuint);
		tween(layer[skin_control_bar].y, get(layer[skin_control_bar].y_hidden), 0.5, easeOutQuint);

		set(layer[skin_btn_show].visible,true);
		tween(layer[skin_btn_show].alpha, 1, 0.25, easeOutQuint);
	</action>

	<action name="skin_showskin">
		tween(layer[skin_scroll_window].y, get(layer[skin_scroll_window].y_shown), 0.5, easeOutQuint);
		tween(layer[skin_control_bar].y, get(layer[skin_control_bar].y_shown), 0.5, easeOutQuint);

		set(layer[skin_btn_show].visible,false);
		tween(layer[skin_btn_show].alpha,0,0);
	</action>

	<action name="skin_showthumbs">
		if(%1 == null, if(layer[skin_thumbs].state == 'hidden', set(show,true), set(show,false)); , set(show,%1); );
		mul(mh, layer[skin_scroll_layer].pixelheight, -1);
		if(layer[skin_scroll_layer].y == -100%, copy(layer[skin_scroll_layer].y,mh));
		if(show,
			set(layer[skin_thumbs].state, 'visible');
			add(mh, layer[skin_thumbs].height);
			tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
			set(layer[skin_thumbs].visible, true);
			tween(layer[skin_thumbs].alpha, 1.0, 0.25);
			tween(layer[skin_map].alpha, 0.0, 0.25, default, set(layer[skin_map].visible,false));
		  ,
			set(layer[skin_thumbs].state, 'hidden');
			tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_thumbs].visible, false););
		  );
	</action>

	<action name="skin_showmap">
		if(%1 == null, if(layer[skin_map].state == 'hidden', set(show,true), set(show,false)); , set(show,%1); );
		mul(mh, layer[skin_scroll_layer].pixelheight, -1);
		if(layer[skin_scroll_layer].y == -100%, copy(layer[skin_scroll_layer].y,mh));
		if(show,
			tween(layer[skin_logo].alpha, 0.0, 0.25, default, set(layer[skin_logo].visible,false));
			tween(layer[skin_thumbs].alpha, 0.0, 0.25, default, set(layer[skin_thumbs].visible,false));
			set(layer[skin_map].visible, true);
			tween(layer[skin_map].alpha, 1.0, 0.25);
			set(layer[skin_map].state, 'visible');
			sub(hh,stageheight,20);
			sub(hh,layer[skin_control_bar].height);
			sub(hh,32);
			add(mh,hh);
			copy(layer[skin_map].height, hh);
			tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint);
		  ,
			set(layer[skin_map].state, 'hidden');
			set(layer[skin_logo].visible, true); tween(layer[skin_logo].alpha, 1.0, 0.25);
			tween(layer[skin_scroll_layer].y, get(mh), 0.5, easeOutQuint, set(layer[skin_map].visible,false) );
		  );
	</action>

	<action name="skin_openlogo">
		if(layer[skin_logo].state == 'small',
			set(layer[skin_logo].state, 'opening');
			copy(backup_logo_align, layer[skin_logo].align);
			copy(backup_logo_x, layer[skin_logo].x);
			copy(backup_logo_y, layer[skin_logo].y);
			copy(backup_logo_scale, layer[skin_logo].scale);
			layer[skin_logo].changeorigin(center);
			tween(layer[skin_logo].x, 0, 0.5, easeOutQuint);
			tween(layer[skin_logo].y, 0, 0.5, easeOutQuint);
			tween(layer[skin_logo].scale, 1, 0.5, easeOutQuint);
			delayedcall(0.5, set(layer[skin_logo].state, 'opened') );
			delayedcall(0, set(events[skin_events].onmouseup, delayedcall(0, skin_closelogo()) ) );
		  );
	</action>

	<action name="skin_closelogo">
		if(layer[skin_logo].state == 'opened',
			set(layer[skin_logo].state, 'closing');
			layer[skin_logo].changeorigin(get(backup_logo_align));
			if(%1 == 'now',
				stoptween(layer[skin_logo].x, layer[skin_logo].y, layer[skin_logo].scale);
				copy(layer[skin_logo].x, backup_logo_x);
				copy(layer[skin_logo].y, backup_logo_y);
				copy(layer[skin_logo].scale, backup_logo_scale);
				set(layer[skin_logo].state, 'small');
			  ,
				tween(layer[skin_logo].x, get(backup_logo_x), 0.5, easeOutQuint);
				tween(layer[skin_logo].y, get(backup_logo_y), 0.5, easeOutQuint);
				tween(layer[skin_logo].scale, get(backup_logo_scale), 0.5, easeOutQuint);
				delayedcall(0.5, set(layer[skin_logo].state, 'small'));
			  );
			set(events[skin_events].onmouseup, null);
		  );
	</action>

</krpano>


text:
/**
 * @author jjacobson93
 * @date 4/22/2016
 */

import React, {Component} from 'react';
import Navbar from './components/navbar';
import Content from './components/content';

class App extends Component {
    render() {
        return (
            <div>
                <Navbar />
                <Content />
            </div>
        );
    }
}

export default App;


text:
<title>Phing API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link>

tasks/ext/dbdeploy/DbmsSyntaxMsSql.php

              Show:
              inherited

                          Classes

\DbmsSyntaxMsSql

              Table of Contents

Utility class for generating necessary server-specific SQL commands

@author   Luke Crouch at SourceForge (http://sourceforge.net)

Package

phing.tasks.ext.dbdeploy

Version

$Revision: 552 $

\DbmsSyntaxMsSql
jump to top

Package: phing\tasks\ext\dbdeploy
Utility class for generating necessary server-specific SQL commands

@author   Luke Crouch at SourceForge (http://sourceforge.net)

Parent(s)

\DbmsSyntax

Version

$Revision: 552 $

Methods

generateTimestamp(

          )

        :
          void

Documentation was generated by DocBlox 0.17.1.


text:
<?php

/**
 * Exception thrown for HTTP 4xx client errors.
 */
class Aplazame_Sdk_Api_ApiClientException extends LogicException implements Aplazame_Sdk_Api_AplazameExceptionInterface {

	/**
	 *
	 * @param Aplazame_Sdk_Http_ResponseInterface $response
	 *
	 * @return Aplazame_Sdk_Api_ApiClientException
	 */
	public static function fromResponse( Aplazame_Sdk_Http_ResponseInterface $response ) {
		$responseBody = (string) $response->getBody();
		if ( empty( $responseBody ) ) {
			return new self( $response->getStatusCode(), $response->getReasonPhrase() );
		}

		$decodedBody = json_decode( $responseBody, true );
		if ( ! isset( $decodedBody['error'] ) ) {
			return new self( $response->getStatusCode(), $response->getReasonPhrase() );
		}

		$error = $decodedBody['error'];

		return new self( $response->getStatusCode(), $error['message'], $error['type'], $error );
	}

	/**
	 *
	 * @var string
	 */
	private $type;

	/**
	 *
	 * @var array
	 */
	private $error;

	/**
	 *
	 * @param string $statusCode
	 * @param string $message
	 * @param string $type
	 * @param array  $error
	 */
	public function __construct( $statusCode, $message, $type = '', array $error = array() ) {
		parent::__construct( $message, $statusCode );

		$this->type  = $type;
		$this->error = $error;
	}

	public function getStatusCode() {
		return $this->getCode();
	}

	/**
	 *
	 * @return string
	 */
	public function getType() {
		return $this->type;
	}

	/**
	 *
	 * @return array
	 */
	public function getError() {
		return $this->error;
	}
}