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

# Telerik.Web.UI.RadImageGalleryItem

## Inheritance Hierarchy

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

## Methods

###  get_imageUrl

Returns the URL of the image.

#### Parameters

#### Returns

`None`

###  get_itemIndex

Gets the index of the particular item.

#### Parameters

#### Returns

`None`

###  get_owner

Gets the parent of the current object.

#### Parameters

#### Returns

`None`

###  get_thumbnailElement

Returns the related thumbnail element.

#### Parameters

#### Returns

`None`

###  get_thumbnailUrl

Returns the URL of the thumbnail.

#### Parameters

#### Returns

`None`

###  get_title

Gets the title of the image.

#### Parameters

#### Returns

`None`

###  get_width

Returns the width of the image.

#### Parameters

#### Returns

`None`


text:
const parseOptions = require('./lib/parseOptions')
const parseModulesMap = require('./lib/parseModulesMap')
const makePackageNames = require('./lib/makePackageNames')
const requireModules = require('./lib/requireModules')
const zipObject = require('lodash.zipobject')

module.exports = function autoRequire (options) {
  options = parseOptions(options)
  const schema = options.schema
  const globaly = options.globaly
  const map = parseModulesMap(schema, options.as)
  const packageNames = makePackageNames(map.packages)
  const modules = requireModules(map.fullPaths)
  const collection = zipObject(packageNames, modules)
  if (options.toRoot) {
    options.toRoot.map(module => {
      Object.keys(collection[module]).map(key => {
        collection[key] = collection[module][key]
      })

      delete collection[module]
    })
  }
  if (globaly) {
    Object.keys(collection).forEach(name => {
      Object.defineProperty(global, name, {
        set: () => {
          throw new Error(`${name} is already defined`)
        },
        get: () => collection[name]
      })
    })
  }
  return collection
}

redpajama_set_name: RedPajamaGithub


text:
namespace mash {
namespace wm {

class RootWindowController;
class WindowTitleObserver;

class UserWindowControllerImpl : public mojom::UserWindowController,
                                 public mus::WindowObserver,
                                 public mus::WindowTreeConnectionObserver {
 public:
  UserWindowControllerImpl();
  ~UserWindowControllerImpl() override;

  mojom::UserWindowObserver* user_window_observer() const {
    return user_window_observer_.get();
  }

  void Initialize(RootWindowController* root_controller);

 private:
  // A helper to get the container for user windows.
  mus::Window* GetUserWindowContainer() const;

  // mus::WindowObserver:
  void OnTreeChanging(const TreeChangeParams& params) override;

  // mus::WindowTreeConnectionObserver:
  void OnWindowTreeFocusChanged(mus::Window* gained_focus,
                                mus::Window* lost_focus) override;

  // mojom::UserWindowController:
  void AddUserWindowObserver(mojom::UserWindowObserverPtr observer) override;
  void FocusUserWindow(uint32_t window_id) override;

  RootWindowController* root_controller_;
  mojom::UserWindowObserverPtr user_window_observer_;
  scoped_ptr<WindowTitleObserver> window_title_observer_;

  DISALLOW_COPY_AND_ASSIGN(UserWindowControllerImpl);
};

}  // namespace wm
}  // namespace mash

#endif  // MASH_WM_USER_WINDOW_CONTROLLER_IMPL_H_


text:
package manager

import (
	"encoding/json"
	"fmt"
	"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/log"
	"math"
	"runtime"
	"strconv"
	"strings"
	"time"

	"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/cache"
	ds "github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/deliveryservice"
	"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/enum"
	"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/http_server"
	"github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/peer"
	todata "github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/trafficopsdata"
	towrap "github.com/Comcast/traffic_control/traffic_monitor/experimental/traffic_monitor/trafficopswrapper"
)

type JSONEvents struct {
	Events []Event `json:"events"`
}

type CacheState struct {
	Value bool `json:"value"`
}

type ApiPeerStates struct {
	Peers map[enum.TrafficMonitorName]map[enum.CacheName][]CacheState `json:"peers"`
}

// TODO make fields nullable, so error fields can be omitted, letting API callers still get updates for unerrored fields
type CacheStatus struct {
	Type                  *string  `json:"type,omitempty"`
	Status                *string  `json:"status,omitempty"`
	LoadAverage           *float64 `json:"load_average,omitempty"`
	QueryTimeMilliseconds *int64   `json:"query_time_ms,omitempty"`
	BandwidthKbps         *float64 `json:"bandwidth_kbps,omitempty"`
	ConnectionCount       *int64   `json:"connection_count,omitempty"`
}

func StartDataRequestManager(dr <-chan http_server.DataRequest, opsConfig OpsConfigThreadsafe, toSession towrap.ITrafficOpsSession, localStates peer.CRStatesThreadsafe, peerStates peer.CRStatesPeersThreadsafe, combinedStates peer.CRStatesThreadsafe, statHistory StatHistoryThreadsafe, dsStats DSStatsThreadsafe, events EventsThreadsafe, staticAppData StaticAppData, healthPollInterval time.Duration, lastHealthDurations DurationMapThreadsafe, fetchCount UintThreadsafe, healthIteration UintThreadsafe, errorCount UintThreadsafe, toData todata.TODataThreadsafe, localCacheStatus CacheAvailableStatusThreadsafe, lastKbpsStats StatsLastKbpsThreadsafe) {
	go dataRequestManagerListen(dr, opsConfig, toSession, localStates, peerStates, combinedStates, statHistory, dsStats, events, staticAppData, healthPollInterval, lastHealthDurations, fetchCount, healthIteration, errorCount, toData, localCacheStatus, lastKbpsStats)
}

func dataRequestManagerListen(dr <-chan http_server.DataRequest, opsConfig OpsConfigThreadsafe, toSession towrap.ITrafficOpsSession, localStates peer.CRStatesThreadsafe, peerStates peer.CRStatesPeersThreadsafe, combinedStates peer.CRStatesThreadsafe, statHistory StatHistoryThreadsafe, dsStats DSStatsThreadsafe, events EventsThreadsafe, staticAppData StaticAppData, healthPollInterval time.Duration, lastHealthDurations DurationMapThreadsafe, fetchCount UintThreadsafe, healthIteration UintThreadsafe, errorCount UintThreadsafe, toData todata.TODataThreadsafe, localCacheStatus CacheAvailableStatusThreadsafe, lastKbpsStats StatsLastKbpsThreadsafe) {
	for {
		select {
		case req := <-dr:
			defer close(req.Response)

			var body []byte
			var err error

			switch req.Type {
			case http_server.TRConfig:
				cdnName := opsConfig.Get().CdnName
				if toSession == nil {
					err = fmt.Errorf("Unable to connect to Traffic Ops")
				} else if cdnName == "" {
					err = fmt.Errorf("No CDN Configured")
				} else {
					body, err = toSession.CRConfigRaw(cdnName)
				}
				if err != nil {
					err = fmt.Errorf("TR Config: %v", err)
				}
			case http_server.TRStateDerived:
				body, err = peer.CrstatesMarshall(combinedStates.Get())
				if err != nil {
					err = fmt.Errorf("TR State (derived): %v", err)
				}
			case http_server.TRStateSelf:
				body, err = peer.CrstatesMarshall(localStates.Get())
				if err != nil {
					err = fmt.Errorf("TR State (self): %v", err)
				}
			case http_server.CacheStats:
				// TODO: add support for ?hc=N query param, stats=, wildcard, individual caches
				// add pp and date to the json:
				/*
					pp: "0=[my-ats-edge-cache-1], hc=[1]",
					date: "Thu Oct 09 20:28:36 UTC 2014"
				*/
				params := req.Parameters
				hc := 1
				if _, exists := params["hc"]; exists {
					v, err := strconv.Atoi(params["hc"][0])
					if err == nil {
						hc = v
					}
				}
				body, err = cache.StatsMarshall(statHistory.Get(), hc)
				if err != nil {
					err = fmt.Errorf("CacheStats: %v", err)
				}
			case http_server.DSStats:
				body, err = json.Marshal(ds.StatsJSON(dsStats.Get())) // TODO marshall beforehand, for performance? (test to see how often requests are made)
				if err != nil {
					err = fmt.Errorf("DsStats: %v", err)
				}
			case http_server.EventLog:
				body, err = json.Marshal(JSONEvents{Events: events.Get()})
				if err != nil {
					err = fmt.Errorf("EventLog: %v", err)
				}
			case http_server.PeerStates:
				body, err = json.Marshal(createApiPeerStates(peerStates.Get()))
			case http_server.StatSummary:
				body = []byte("TODO implement")
			case http_server.Stats:
				body, err = getStats(staticAppData, healthPollInterval, lastHealthDurations.Get(), fetchCount.Get(), healthIteration.Get(), errorCount.Get())
				if err != nil {
					err = fmt.Errorf("Stats: %v", err)
				}
			case http_server.ConfigDoc:
				opsConfigCopy := opsConfig.Get()
				// if the password is blank, leave it blank, so callers can see it's missing.
				if opsConfigCopy.Password != "" {
					opsConfigCopy.Password = "*****"
				}
				body, err = json.Marshal(opsConfigCopy)
				if err != nil {
					err = fmt.Errorf("Config Doc: %v", err)
				}
			case http_server.APICacheCount: // TODO determine if this should use peerStates
				body = []byte(strconv.Itoa(len(localStates.Get().Caches)))
			case http_server.APICacheAvailableCount:
				body = []byte(strconv.Itoa(cacheAvailableCount(localStates.Get().Caches)))
			case http_server.APICacheDownCount:
				body = []byte(strconv.Itoa(cacheDownCount(localStates.Get().Caches)))
			case http_server.APIVersion:
				s := "traffic_monitor-" + staticAppData.Version + "."
				if len(staticAppData.GitRevision) > 6 {
					s += staticAppData.GitRevision[:6]
				} else {
					s += staticAppData.GitRevision
				}
				body = []byte(s)
			case http_server.APITrafficOpsURI:
				body = []byte(opsConfig.Get().Url)
			case http_server.APICacheStates:
				body, err = json.Marshal(createCacheStatuses(toData.Get().ServerTypes, statHistory.Get(), lastHealthDurations.Get(), localStates.Get().Caches, lastKbpsStats.Get(), localCacheStatus))
			case http_server.APIBandwidthKbps:
				serverTypes := toData.Get().ServerTypes
				kbpsStats := lastKbpsStats.Get()
				sum := float64(0.0)
				for cache, data := range kbpsStats.Caches {
					if serverTypes[cache] != enum.CacheTypeEdge {
						continue
					}
					sum += data.Kbps
				}
				body = []byte(fmt.Sprintf("%f", sum))
			default:
				err = fmt.Errorf("Unknown Request Type: %v", req.Type)
			}

			if err != nil {
				errorCount.Inc()
				log.Errorf("Request Error: %v\n", err)
			} else {
				req.Response <- body
			}
		}
	}
}

func createCacheStatuses(cacheTypes map[enum.CacheName]enum.CacheType, statHistory map[enum.CacheName][]cache.Result, lastHealthDurations map[enum.CacheName]time.Duration, cacheStates map[enum.CacheName]peer.IsAvailable, lastKbpsStats ds.StatsLastKbps, localCacheStatusThreadsafe CacheAvailableStatusThreadsafe) map[enum.CacheName]CacheStatus {
	conns := createCacheConnections(statHistory)
	statii := map[enum.CacheName]CacheStatus{}
	localCacheStatus := localCacheStatusThreadsafe.Get()

	for cacheName, cacheType := range cacheTypes {
		cacheStatHistory, ok := statHistory[cacheName]
		if !ok {
			log.Warnf("createCacheStatuses stat history missing cache %s\n", cacheName)
			continue
		}

		if len(cacheStatHistory) < 1 {
			log.Warnf("createCacheStatuses stat history empty for cache %s\n", cacheName)
			continue
		}

		log.Debugf("createCacheStatuses NOT empty for cache %s\n", cacheName)

		var loadAverage *float64
		procLoadAvg := cacheStatHistory[0].Astats.System.ProcLoadavg
		if procLoadAvg != "" {
			firstSpace := strings.IndexRune(procLoadAvg, ' ')
			if firstSpace == -1 {
				log.Warnf("WARNING unexpected proc.loadavg '%s' for cache %s\n", procLoadAvg, cacheName)
			} else {
				loadAverageVal, err := strconv.ParseFloat(procLoadAvg[:firstSpace], 64)
				if err != nil {
					log.Warnf("proc.loadavg doesn't contain a float prefix '%s' for cache %s\n", procLoadAvg, cacheName)
				} else {
					loadAverage = &loadAverageVal
				}
			}
		}

		var queryTime *int64
		queryTimeVal, ok := lastHealthDurations[cacheName]
		if !ok {
			log.Warnf("cache not in last health durations cache %s\n", cacheName)
		} else {
			queryTimeInt := int64(queryTimeVal / time.Millisecond)
			queryTime = &queryTimeInt
		}

		var kbps *float64
		kbpsVal, ok := lastKbpsStats.Caches[enum.CacheName(cacheName)]
		if !ok {
			log.Warnf("cache not in last kbps cache %s\n", cacheName)
		} else {
			kbps = &kbpsVal.Kbps
		}

		var connections *int64
		connectionsVal, ok := conns[enum.CacheName(cacheName)]
		if !ok {
			log.Warnf("cache not in connections %s\n", cacheName)
		} else {
			connections = &connectionsVal
		}

		var status *string
		statusVal, ok := localCacheStatus[enum.CacheName(cacheName)]
		if !ok {
			log.Warnf("cache not in statuses %s\n", cacheName)
		} else {
			statusString := statusVal.Status + " - "
			if localCacheStatus[enum.CacheName(cacheName)].Available {
				statusString += "available"
			} else {
				statusString += "unavailable"
			}
			status = &statusString
		}

		cacheTypeStr := string(cacheType)
		statii[enum.CacheName(cacheName)] = CacheStatus{Type: &cacheTypeStr, LoadAverage: loadAverage, QueryTimeMilliseconds: queryTime, BandwidthKbps: kbps, ConnectionCount: connections, Status: status}
	}
	return statii
}

func createCacheConnections(statHistory map[enum.CacheName][]cache.Result) map[enum.CacheName]int64 {
	conns := map[enum.CacheName]int64{}
	for server, history := range statHistory {
		for _, result := range history {
			val, ok := result.Astats.Ats["proxy.process.http.current_client_connections"]
			if !ok {
				continue
			}

			v, ok := val.(float64)
			if !ok {
				continue
			}

			conns[server] = int64(v)
			break
		}
	}
	return conns
}

func cacheDownCount(caches map[enum.CacheName]peer.IsAvailable) int {
	count := 0
	for _, available := range caches {
		if !available.IsAvailable {
			count++
		}
	}
	return count
}

func cacheAvailableCount(caches map[enum.CacheName]peer.IsAvailable) int {
	return len(caches) - cacheDownCount(caches)
}

func createApiPeerStates(peerStates map[enum.TrafficMonitorName]peer.Crstates) ApiPeerStates {
	apiPeerStates := ApiPeerStates{Peers: map[enum.TrafficMonitorName]map[enum.CacheName][]CacheState{}}

	for peer, state := range peerStates {
		if _, ok := apiPeerStates.Peers[enum.TrafficMonitorName(peer)]; !ok {
			apiPeerStates.Peers[enum.TrafficMonitorName(peer)] = map[enum.CacheName][]CacheState{}
		}
		peerState := apiPeerStates.Peers[enum.TrafficMonitorName(peer)]
		for cache, available := range state.Caches {
			peerState[enum.CacheName(cache)] = []CacheState{CacheState{Value: available.IsAvailable}}
		}
		apiPeerStates.Peers[enum.TrafficMonitorName(peer)] = peerState
	}
	return apiPeerStates
}

type Stats struct {
	MaxMemoryMB         uint64 `json:"Max Memory (MB)"`
	GitRevision         string `json:"git-revision"`
	ErrorCount          uint64 `json:"Error Count"`
	Uptime              uint64 `json:"uptime"`
	FreeMemoryMB        uint64 `json:"Free Memory (MB)"`
	TotalMemoryMB       uint64 `json:"Total Memory (MB)"`
	Version             string `json:"version"`
	DeployDir           string `json:"deploy-dir"`
	FetchCount          uint64 `json:"Fetch Count"`
	QueryIntervalDelta  int    `json:"Query Interval Delta"`
	IterationCount      uint64 `json:"Iteration Count"`
	Name                string `json:"name"`
	BuildTimestamp      string `json:"buildTimestamp"`
	QueryIntervalTarget int    `json:"Query Interval Target"`
	QueryIntervalActual int    `json:"Query Interval Actual"`
	SlowestCache        string `json:"Slowest Cache"`
	LastQueryInterval   int    `json:"Last Query Interval"`
}

func getLongestPoll(lastHealthTimes map[enum.CacheName]time.Duration) (enum.CacheName, time.Duration) {
	var longestCache enum.CacheName
	var longestTime time.Duration
	for cache, time := range lastHealthTimes {
		if time > longestTime {
			longestTime = time
			longestCache = cache
		}
	}
	return longestCache, longestTime
}

func getStats(staticAppData StaticAppData, pollingInterval time.Duration, lastHealthTimes map[enum.CacheName]time.Duration, fetchCount uint64, healthIteration uint64, errorCount uint64) ([]byte, error) {
	longestPollCache, longestPollTime := getLongestPoll(lastHealthTimes)
	var memStats runtime.MemStats
	runtime.ReadMemStats(&memStats)

	var s Stats
	s.MaxMemoryMB = memStats.TotalAlloc / (1024 * 1024)
	s.GitRevision = staticAppData.GitRevision
	s.ErrorCount = errorCount
	s.Uptime = uint64(time.Since(staticAppData.StartTime) / time.Second)
	s.FreeMemoryMB = staticAppData.FreeMemoryMB
	s.TotalMemoryMB = memStats.Alloc / (1024 * 1024) // TODO rename to "used memory" if/when nothing is using the JSON entry
	s.Version = staticAppData.Version
	s.DeployDir = staticAppData.WorkingDir
	s.FetchCount = fetchCount
	s.SlowestCache = string(longestPollCache)
	s.IterationCount = healthIteration
	s.Name = staticAppData.Name
	s.BuildTimestamp = staticAppData.BuildTimestamp
	s.QueryIntervalTarget = int(pollingInterval / time.Millisecond)
	s.QueryIntervalActual = int(longestPollTime / time.Millisecond)
	s.QueryIntervalDelta = s.QueryIntervalActual - s.QueryIntervalTarget
	s.LastQueryInterval = int(math.Max(float64(s.QueryIntervalActual), float64(s.QueryIntervalTarget)))

	return json.Marshal(s)
}


text:
module Firecord
  module Record
    class Serializer
      def initialize(value, type)
        @value = value
        @type = type
      end

      def value
        @value.nil? ? @value : send(@type)
      end

      private

      %w(string datetime).each do |type|
        define_method(type) do
          @value.to_s
        end
      end

      def private_key
        @value
      end

      def integer
        @value.respond_to?(:to_i) ? @value.to_i : nil
      end

      def float
        @value.respond_to?(:to_f) ? @value.to_f : nil
      end
    end
  end
end


text:
#include "hal/rtc_api.h"

#include "platform/mbed_critical.h"
#include "platform/mbed_rtc_time.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"

static SingletonPtr<PlatformMutex> _mutex;

#if DEVICE_RTC

static void (*_rtc_init)(void) = rtc_init;
static int (*_rtc_isenabled)(void) = rtc_isenabled;
static time_t (*_rtc_read)(void) = rtc_read;
static void (*_rtc_write)(time_t t) = rtc_write;

#elif DEVICE_LPTICKER

#include "drivers/LowPowerTimer.h"

#define US_PER_SEC 1000000

static SingletonPtr<mbed::LowPowerTimer> _rtc_lp_timer;
static uint64_t _rtc_lp_base;
static bool _rtc_enabled;

static void _rtc_lpticker_init(void)
{
    _rtc_lp_timer->start();
    _rtc_enabled = true;
}

static int _rtc_lpticker_isenabled(void)
{
    return (_rtc_enabled == true);
}

static time_t _rtc_lpticker_read(void)
{
    return _rtc_lp_timer->read_high_resolution_us() / US_PER_SEC + _rtc_lp_base;
}

static void _rtc_lpticker_write(time_t t)
{
    _rtc_lp_base = t;
}

static void (*_rtc_init)(void) = _rtc_lpticker_init;
static int (*_rtc_isenabled)(void) = _rtc_lpticker_isenabled;
static time_t (*_rtc_read)(void) = _rtc_lpticker_read;
static void (*_rtc_write)(time_t t) = _rtc_lpticker_write;

#else /* DEVICE_LPTICKER */

static void (*_rtc_init)(void) = NULL;
static int (*_rtc_isenabled)(void) = NULL;
static time_t (*_rtc_read)(void) = NULL;
static void (*_rtc_write)(time_t t) = NULL;
#endif /* DEVICE_LPTICKER */

#ifdef __cplusplus
extern "C" {
#endif
#if defined (__ICCARM__)
time_t __time32(time_t *timer)
#else
time_t time(time_t *timer)
#endif

{
    _mutex->lock();
    if (_rtc_isenabled != NULL) {
        if (!(_rtc_isenabled())) {
            set_time(0);
        }
    }

    time_t t = (time_t) -1;
    if (_rtc_read != NULL) {
        t = _rtc_read();
    }

    if (timer != NULL) {
        *timer = t;
    }
    _mutex->unlock();
    return t;
}

void set_time(time_t t)
{
    _mutex->lock();
    if (_rtc_init != NULL) {
        _rtc_init();
    }
    if (_rtc_write != NULL) {
        _rtc_write(t);
    }
    _mutex->unlock();
}

void attach_rtc(time_t (*read_rtc)(void), void (*write_rtc)(time_t), void (*init_rtc)(void), int (*isenabled_rtc)(void))
{
    _mutex->lock();
    _rtc_read = read_rtc;
    _rtc_write = write_rtc;
    _rtc_init = init_rtc;
    _rtc_isenabled = isenabled_rtc;
    _mutex->unlock();
}

#ifdef __cplusplus
}
#endif


text:
<?php
if (basename($_SERVER['SCRIPT_FILENAME']) == basename($_SERVER['REQUEST_URI'])){
	exit();
}
if ($_SESSION['usrlvl'] < 3){
	exit();
}
// Define page categories
$categories = array( 'dashboard.php' => 'Dashboard',
					       'apps.php'=> 'Apps',
					   'logging.php' => 'Logs',
					  'settings.php' => 'Settings',
					     'users.php' => 'Users');
if (@!$_GET['SETTING']) {
	$includeSetting = "dashboard.php";
	$humanName = "Dashboard";
}else{
	foreach ($categories as $page => $name) {
		if ($_GET['SETTING'] == substr($page, 0,-4)) {
			$includeSetting = $page;
			$humanName = $name;
		}
	}
}
echo "<h1>".$humanName."</h1>";
#pass POST data through this page, include backend page to process app start/resets
include('admin/ui/sidebar.php');
include('admin/ui/admincpmodules/'.$includeSetting);
#show dashboard
#calls for past week in iframe
#app reset buttons action self method post
?>


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const user_dao_1 = require("./user.dao");
const user_1 = require("../../models/user");
class UserDAO_MySQL extends user_dao_1.UserDAO {
    constructor(connection) {
        super(connection);
    }
    all(callback) {
        let users = [];
        this.getConnection().getConnection(function (err, connection) {
            connection.query('SELECT * FROM `photoApp`.`users`;', function (error, results, fields) {
                connection.release();
                for (let r of results) {
                    users.push(new user_1.User(r.id, r.name, r.username, r.password, r.email, r.avatar_path, r.id_type));
                }
                callback(users, error);
            });
        });
    }
    findOne(username, callback) {
        let query = "SELECT `users`.`id`, `users`.`name`, `users`.`username`, `users`.`password`, `users`.`email`, `users`.`avatar_path`, `users`.`id_type` FROM `photoApp`.`users` WHERE `users`.`username` = "
            + this.getConnection().escape(username)
            + ";";
        this.getConnection().getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    return callback(null, error);
                }
                if (results.length <= 0)
                    return callback(null, { error: "No found" });
                let user = new user_1.User(results[0].id, results[0].name, results[0].username, results[0].password, results[0].email, results[0].avatar_path, results[0].id_type);
                callback(user, error);
            });
        });
    }
    findOneById(userId, callback) {
        let query = "SELECT `users`.`id`, `users`.`name`, `users`.`username`, `users`.`password`, `users`.`email`, `users`.`avatar_path`, `users`.`id_type` FROM `photoApp`.`users` WHERE `users`.`id` = "
            + this.getConnection().escape(userId)
            + ";";
        this.getConnection().getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    return callback(null, error);
                }
                if (results.length <= 0)
                    return callback(null, { error: "No found" });
                let user = new user_1.User(results[0].id, results[0].name, results[0].username, results[0].password, results[0].email, results[0].avatar_path, results[0].id_type);
                callback(user, error);
            });
        });
    }
    Insert(name, username, password, email, avatar_path, callback) {
        let user = new user_1.User(0, name, username, password, email, avatar_path, 1);
        let conn = this.getConnection();
        user_1.User.hashPassword(user.password, function (pass, error) {
            if (error) {
                return callback(null, error);
            }
            user.password = pass;
            var query = "INSERT INTO `photoApp`.`users` (`name`, `username`, `password`, `email`, `avatar_path`) VALUES ( "
                + conn.escape(user.name) + ", "
                + conn.escape(user.username) + ", "
                + conn.escape(user.password) + ", "
                + conn.escape(user.email) + ", "
                + conn.escape(user.avatar_path) + " );";
            conn.getConnection(function (err, connection) {
                connection.query(query, function (error, results, fields) {
                    connection.release();
                    if (error) {
                        console.log(error);
                        console.log("User.Insert - Error whit user" + user.name);
                        return callback(null, error);
                    }
                    user.id = results.insertId;
                    callback(user, error);
                });
            });
        });
    }
    Update(id, name, username, email, avatar_path, callback) {
        let user = new user_1.User(id, name, username, "NA", email, avatar_path, 1);
        let conn = this.getConnection();
        var query = "UPDATE `photoApp`.`users` SET "
            + "`name` = " + conn.escape(user.name) + ", "
            + "`email` = " + conn.escape(user.email) + ", "
            + "`avatar_path` = " + conn.escape(user.avatar_path) + " "
            + "WHERE "
            + "`id` = " + conn.escape(user.id) + " AND "
            + "`username` = " + conn.escape(user.username) + ";";
        conn.getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    console.log(error);
                    console.log("User.Update - Error whit user" + user.name);
                    return callback(null, error);
                }
                callback(user, error);
            });
        });
    }
    UpdatePassword(id, password, new_password, callback) {
        if (!user_1.User.testPassword(new_password)) {
            return callback(false, { error: "Error data security!" });
        }
        let conn = this.getConnection();
        user_1.User.hashPassword(new_password, function (pass, error) {
            if (error) {
                return callback(false, error);
            }
            var query = "UPDATE `photoApp`.`users` SET "
                + "`password` = " + conn.escape(pass) + " "
                + "WHERE "
                + "`id` = " + conn.escape(id) + ";";
            conn.getConnection(function (err, connection) {
                connection.query(query, function (error, results, fields) {
                    connection.release();
                    if (error) {
                        console.log("User.UpdatePassword - Error whit user" + id);
                        callback(null, error);
                    }
                    callback(true, error);
                });
            });
        });
    }
    CanSeePhotos(id, callback) {
        let conn = this.getConnection();
        var query = "SELECT type_user.canSeePhotos FROM photoApp.users, photoApp.type_user WHERE users.id_type = type_user.id AND "
            + "users.id = " + conn.escape(id) + ";";
        conn.getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    console.log(error);
                    console.log("User.CanSeePhotos - Error whit user - " + id);
                    return callback(null, error);
                }
                else if (results.length === 0) {
                    console.log("User.CanSeePhotos - Error whit user" + id);
                    return callback(null, { error: "Error data security!" });
                }
                callback(!!results[0].canSeePhotos, error);
            });
        });
    }
    isSameType(id1, id2, callback) {
        let conn = this.getConnection();
        var query = "SELECT u2.* FROM photoApp.users u1, photoApp.users u2 WHERE "
            + "u1.id = " + conn.escape(id1) + " AND "
            + "u2.id = " + conn.escape(id2) + " AND "
            + "u1.id_type = u2.id_type;";
        conn.getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    console.log(error);
                    console.log("User.isSameType - Error whit user - " + id1 + " and " + id2);
                    return callback(null, error);
                }
                else if (results.length === 0) {
                    return callback(false, error);
                }
                callback(true, error);
            });
        });
    }
    CanEditType(id, callback) {
        let conn = this.getConnection();
        var query = "SELECT type_user.canEditType FROM photoApp.users, photoApp.type_user WHERE users.id_type = type_user.id AND "
            + "users.id = " + conn.escape(id) + ";";
        conn.getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    console.log(error);
                    console.log("User.CanEditType - Error whit user - " + id);
                    return callback(null, error);
                }
                else if (results.length === 0) {
                    console.log("User.CanEditType - Error whit user" + id);
                    return callback(null, { error: "Error data security!" });
                }
                callback(!!results[0].canEditType, error);
            });
        });
    }
    UpdateType(id, new_type, callback) {
        let conn = this.getConnection();
        var query = "UPDATE `photoApp`.`users` JOIN `photoApp`.`type_user` ON "
            + "users.id = " + conn.escape(id) + " AND "
            + "type_user.id = " + conn.escape(new_type) + " "
            + "SET users.id_type = type_user.id;";
        conn.getConnection(function (err, connection) {
            connection.query(query, function (error, results, fields) {
                connection.release();
                if (error) {
                    console.log(error);
                    console.log("User.UpdateType - Error whit user" + id);
                    return callback(null, error);
                }
                else if (results.affectedRows == 0) {
                    console.log("User.UpdateType - Error whit user" + id);
                    return callback(null, { error: "Error data on Update!" });
                }
                callback(new_type, error);
            });
        });
    }
}
exports.UserDAO_MySQL = UserDAO_MySQL;


text:
'use strict';
Object.defineProperty(exports, '__esModule', {
  value: true
});

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();

exports['default'] = createCollection;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _immutable = require('immutable');

var _immutable2 = _interopRequireDefault(_immutable);

var _createRawStore = require('./create-raw-store');

var _createRawStore2 = _interopRequireDefault(_createRawStore);

var _axn = require('axn');

var _axn2 = _interopRequireDefault(_axn);

function ievery(fn) {
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = this.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var _step$value = _slicedToArray(_step.value, 2);

      var key = _step$value[0];
      var value = _step$value[1];

      var result = fn(value, key, this);
      if (!result) return false;
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator['return']) {
        _iterator['return']();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  return true;
}

function imap(fn) {
  var result = [];
  var _iteratorNormalCompletion2 = true;
  var _didIteratorError2 = false;
  var _iteratorError2 = undefined;

  try {
    for (var _iterator2 = this.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      var _step2$value = _slicedToArray(_step2.value, 2);

      var key = _step2$value[0];
      var value = _step2$value[1];

      result.push(fn(value, key, this));
    }
  } catch (err) {
    _didIteratorError2 = true;
    _iteratorError2 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion2 && _iterator2['return']) {
        _iterator2['return']();
      }
    } finally {
      if (_didIteratorError2) {
        throw _iteratorError2;
      }
    }
  }

  return result;
}

function createCollectionOf(createStore) {
  for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }

  var action = (0, _axn2['default'])();
  var emptyAction = (0, _axn2['default'])();
  var map = new Map();
  var writing = false;
  function collection(newValue) {
    var state = undefined;
    if (newValue === undefined) {
      state = _immutable2['default'].OrderedMap(imap.call(map, function (store, key) {
        return store.isEmpty() ? false : [key, store()];
      }).filter(Boolean));
    } else if (newValue === null) {
      state = _immutable2['default'].OrderedMap();
      try {
        writing = true;
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = map.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var _step3$value = _slicedToArray(_step3.value, 2);

            var store = _step3$value[1];

            store(null);
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3['return']) {
              _iterator3['return']();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      } finally {
        writing = false;
      }
      action([undefined, state]);
      emptyAction(true);
    } else {
      state = _immutable2['default'].OrderedMap(newValue);
      try {
        writing = true;
        var _iteratorNormalCompletion4 = true;
        var _didIteratorError4 = false;
        var _iteratorError4 = undefined;

        try {
          for (var _iterator4 = state.entries()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
            var _step4$value = _slicedToArray(_step4.value, 2);

            var key = _step4$value[0];
            var value = _step4$value[1];

            var store = collection.at(key);
            store(value);
          }
        } catch (err) {
          _didIteratorError4 = true;
          _iteratorError4 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion4 && _iterator4['return']) {
              _iterator4['return']();
            }
          } finally {
            if (_didIteratorError4) {
              throw _iteratorError4;
            }
          }
        }

        var _iteratorNormalCompletion5 = true;
        var _didIteratorError5 = false;
        var _iteratorError5 = undefined;

        try {
          for (var _iterator5 = map.entries()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
            var _step5$value = _slicedToArray(_step5.value, 2);

            var key = _step5$value[0];
            var store = _step5$value[1];

            if (!state.has(key) && !store.isEmpty()) {
              store(null);
            }
          }
        } catch (err) {
          _didIteratorError5 = true;
          _iteratorError5 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion5 && _iterator5['return']) {
              _iterator5['return']();
            }
          } finally {
            if (_didIteratorError5) {
              throw _iteratorError5;
            }
          }
        }
      } finally {
        writing = false;
      }
      action([undefined, state]);
      emptyAction(collection.isEmpty());
    }
    return state;
  }
  collection.isFynxStore = true;
  collection.listen = action.listen.bind(action);
  collection.listenOnce = action.listenOnce.bind(action);
  collection.unlisten = action.unlisten.bind(action);
  collection.isEmpty = function () {
    return ievery.call(map, function (store) {
      return store.isEmpty();
    });
  };
  collection.isEmpty.listen = emptyAction.listen.bind(emptyAction);
  collection.isEmpty.listenOnce = emptyAction.listenOnce.bind(emptyAction);
  collection.isEmpty.unlisten = emptyAction.unlisten.bind(emptyAction);
  collection.toJSON = function () {
    return imap.call(map, function (store, key) {
      return [key, store.toJSON()];
    });
  };
  collection.fromJSON = function (data) {
    if (Array.isArray(data)) data.forEach(function (_ref) {
      var _ref2 = _slicedToArray(_ref, 2);

      var key = _ref2[0];
      var value = _ref2[1];
      return collection.at(key).fromJSON(value);
    });else if (!data || typeof data !== 'object') collection(null);else Object.keys(data).forEach(function (key) {
      return collection.at(key).fromJSON(data[key]);
    });
  };
  collection.at = function (key) {
    if (!map.has(key)) {
      var store = createStore.apply(undefined, args);
      map.set(key, store);
      store.listen(function (value) {
        return writing ? action([key, value]) : value;
      });
    }
    return map.get(key);
  };
  collection.has = function (key) {
    return Boolean(map.has(key) && !map.get(key).isEmpty());
  };
  collection.get = function (key) {
    return collection.at(key)();
  };
  collection.set = function (key, value) {
    return collection.at(key)(value);
  };
  return collection;
}

function createCollection() {
  for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    args[_key2] = arguments[_key2];
  }

  return createCollectionOf.apply(undefined, [_createRawStore2['default']].concat(args));
}

createCollection.of = createCollectionOf;
module.exports = exports['default'];


text:
require 'vagrant'

module VagrantPlugins
  module VCloud
    class Config < Vagrant.plugin('2', :config)
      # login attributes

      # The vCloud Director hostname
      #
      # @return [String]
      attr_accessor :hostname

      # The Organization Name to log in to
      #
      # @return [String]
      attr_accessor :org_name

      # The username used to log in
      #
      # @return [String]
      attr_accessor :username

      # The password used to log in
      #
      # @return [String]
      attr_accessor :password

      # WIP on these

      # Catalog Name where the item resides
      #
      # @return [String]
      attr_accessor :catalog_name

      # Catalog Item to be used as a template
      #
      # @return [String]
      attr_accessor :catalog_item_name

      # Chunksize for upload in bytes (default 1048576 == 1M)
      #
      # @return [Integer]
      attr_accessor :upload_chunksize

      # Virtual Data Center to be used
      #
      # @return [String]
      attr_accessor :vdc_name

      # Virtual Data Center Network to be used
      #
      # @return [String]
      attr_accessor :vdc_network_name

      # Virtual Data Center Network Id to be used
      #
      # @return [String]
      attr_accessor :vdc_network_id

      # IP allocation mode
      #
      # @return [String]
      attr_accessor :ip_allocation_mode

      # IP subnet
      #
      # @return [String]
      attr_accessor :ip_subnet

      # DNS
      #
      # @return [Array]
      attr_accessor :ip_dns

      # Bridge Mode
      #
      # @return [Bool]
      attr_accessor :network_bridge

      # Port forwarding rules
      #
      # @return [Hash]
      attr_reader :port_forwarding_rules

      # Name of the edge gateway [optional]
      #
      # @return [String]
      attr_accessor :vdc_edge_gateway

      # Public IP of the edge gateway [optional, required if :vdc_edge_gateway
      # is specified]
      #
      # @return [String]
      attr_accessor :vdc_edge_gateway_ip

      # Name of the vApp prefix [optional, defaults to 'Vagrant' ]
      #
      # @return [String]
      attr_accessor :vapp_prefix

      # Name of the VM [optional]
      #
      # @return [String]
      attr_accessor :name

      ##
      ## vCloud Director config runtime values
      ##

      # connection handle
      attr_accessor :vcloud_cnx

      # org object (Hash)
      attr_accessor :org

      # org id (String)
      attr_accessor :org_id

      # vdc object (Hash)
      attr_accessor :vdc

      # vdc id (String)
      attr_accessor :vdc_id

      # catalog object (Hash)
      attr_accessor :catalog

      # catalog id (String)
      attr_accessor :catalog_id

      # catalog item object (Hash)
      attr_accessor :catalog_item

      # vApp Name (String)
      attr_accessor :vAppName

      # vApp Id (String)
      attr_accessor :vAppId

      # VM memory size in MB (Integer)
      attr_accessor :memory

      # VM number of cpus (Integer)
      attr_accessor :cpus

      # NestedHypervisor (Bool)
      attr_accessor :nested_hypervisor

      def validate(machine)
        errors = _detected_errors

        # TODO: add blank?
        errors << I18n.t('vagrant_vcloud.config.hostname') if hostname.nil?
        errors << I18n.t('vagrant_vcloud.config.org_name') if org_name.nil?
        errors << I18n.t('vagrant_vcloud.config.username') if username.nil?
        errors << I18n.t('vagrant_vcloud.config.password') if password.nil?

        unless ip_dns.nil?
          unless ip_dns.kind_of?(Array)
            errors << I18n.t('vagrant_vcloud.config.ip_dns')
          end
        end

        if catalog_name.nil?
          errors << I18n.t('vagrant_vcloud.config.catalog_name')
        end

        if vdc_name.nil?
          errors << I18n.t('vagrant_vcloud.config.vdc_name')
        end

        if vdc_network_name.nil?
          errors << I18n.t('vagrant_vcloud.config.vdc_network_name')
        end

        { 'vCloud Provider' => errors }
      end
    end
  end
end


text:
include Warden::Test::Helpers
Warden.test_mode!

feature 'Admin - Dashboard', :devise do

    before(:all) do
      @user = FactoryGirl.create(:user, :admin)
    end

    before(:each) do
      login_as(@user, :scope => :user)
    end

    after(:each) do
      Warden.test_reset!
    end

# Number of students with completed applications, that is, students with N applications, where N is the number of courses contained within the student's course batch.
  scenario 'completed applications count' do
  #create users with completed
    test_users = FactoryGirl.create_list(:user,  5, :completed_application)
    #check the numbers
    visit upmin_path
    expect(page).to have_css(".completed-count", text: test_users.count)
  end

# Number of students with incomplete applications, that is, students with more than 1 and less than N applications, where N is the number of courses contained within the student's course batch.
scenario 'incompleted applications count' do
    test_users = FactoryGirl.create_list(:user,  5, :incompleted_application)
    #check the numbers
    visit upmin_path
    expect(page).to have_css(".incompleted-count", text: test_users.count)
end

# Number of "idle students", that is, students that haven't submitted any application
scenario 'idle students count' do
  #create idle
      test_users = FactoryGirl.create_list(:user,  5, :idle)
      #check the numbers
      visit upmin_path
      # count +1 because of user used to log in
      expect(page).to have_css(".idle-count", text: User.idle.count)
end

# The control panel is shown below the dashboard, and it shows a link to each of the
# following URLs: /admin/upload-students,
#/admin/upload-courses,
#/admin/upload-results,
# /admin/download-applications,
#/public/idle-students and
#/public/incomplete-applications
scenario 'control panel links' do
  visit upmin_path
  expect(page).to have_link("Upload students", :href=>"/admin/upload/new/users")
  expect(page).to have_link("Upload courses", :href=>"/admin/upload/new/courses")
  expect(page).to have_link("Upload results", :href=>"/admin/upload/new/results")
  expect(page).to have_link("Download applications", :href=>"/admin/downolad/applications")
  expect(page).to have_link("Idle students", :href=>"/public/students/idle")
  expect(page).to have_link("Incomplete applications", :href=>"/public/applications/incomplete")
end

end


text:
package com.github.cassandrasshutils.command.impl;

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Cluster.Builder;
import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;
import com.github.cassandrasshutils.command.CQLDao;
import com.github.cassandrasshutils.command.domain.Server;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Dao for interacting with Cassandra via CQL. This class isn't to be
 * particularly efficient, just useful enough to perform administrative
 * functions.
 *
 * @author jeffrey
 */
public class CQLDaoImpl implements CQLDao
{

    /**
     * Logger for this class.
     */
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * Servers we are executing the commands against. If you want to execute a
     * command against a particular node only pass the specific server in the
     * list.
     */
    private List<Server> servers;

    /**
     * CQL session we are using to connect with.
     */
    private Session session;

    /**
     * Cassandra cluster we are connected to.
     */
    private Cluster cluster;

    /**
     * Constructor.
     *
     * @param servers Servers we are executing the commands against. If you want
     * to execute a command against a particular node only pass the specific
     * server in the list.
     */
    public CQLDaoImpl(List<Server> servers)
    {
        this.servers = servers;
        Builder clusterBuilder = Cluster.builder();
        logger.debug("Establishing a CQL Dao for the following servers:");
        for (Server s : servers)
        {
            logger.debug("\t" + s.toString());
            clusterBuilder.addContactPoint(s.getIp());
        }
        this.cluster = clusterBuilder.build();
        this.session = cluster.connect();
    }

    /**
     * Constructor.
     *
     * @param session Established CQL session you wish to use to run the query.
     */
    public CQLDaoImpl(Session session)
    {
        logger.debug("Establishing a CQL Dao with pre-existing session.");
        this.session = session;
    }

    /**
     * Executes a CQL command. Reminder: this isn't intended to be efficient;
     * it's for periodic administrative functions only.
     *
     * @param command Command to execute.
     * @return ResultSet with the resulting response, if applicable to the
     * command.
     */
    @Override
    public synchronized ResultSet executeCQLCommand(String command)
    {
        logger.info("Executing CQL command: " + command);
        return session.execute(command);
    }

    /**
     * Gets information about our keyspaces in this cluster.
     *
     * @return A List of KeyspaceMetadata for this cluster; each item should
     * represent one keyspace.
     */
    @Override
    public synchronized List<KeyspaceMetadata> getKeyspaces()
    {
        return cluster.getMetadata().getKeyspaces();
    }
}


text:
package org.jhove2.persist;

import java.util.List;
import java.util.Set;

import org.jhove2.core.JHOVE2Exception;
import org.jhove2.core.Message;
import org.jhove2.core.format.FormatIdentification;
import org.jhove2.core.reportable.Reportable;
import org.jhove2.core.source.Source;
import org.jhove2.module.Module;

/**
 * Interface to manage persistence of Source objects, and accessors and mutators
 * for member fields that themselves are persisted objects
 * @author smorrissey
 *
 */
public interface SourceAccessor  {

	/**
	 * Persists the Source object (may be no-op, if SourceAccessor is for in-memory JHOVE2)
	 * @param source Source to be persisted
	 * @return Source object that was persisted
	 * @throws JHOVE2Exception
	 */
	public Source persistSource(Source source) throws JHOVE2Exception;

	/**
	 * Add child Source to Source
	 * Must ensure that childSource.getParentSource() will return parentSource
	 * After method completes, it should be the case that, for Source s1, s2, and c1,
	 * if s1.getChildren().contains(c1)==true, && s2.getChildren().contains(c1)==true, then
	 * s1==s2
	 * @param parentSource Source to which child Source is to be attached
	 * @param childSource Source to be added to parent
	 * @return Child source
	 * @throws JHOVE2Exception
	 */
	public Source addChildSource(Source parentSource, Source childSource) throws JHOVE2Exception;

    /** Add an extra properties {@link org.jhove2.core.reportable.Reportable}
     * to be associated with the source unit.  Extra properties are those not
     * known at the time the source unit is instantiated but which are not
     * associated with a particular {@link org.jhove2.module.format.FormatModule}.
     * @param source     Source to which the properties are added
     * @param properties Extra properties reportable
     * @return Source with extra properties added
     * @throws JHOVE2Exception
     */
    public Source addExtraProperties(Source source, Reportable properties) throws JHOVE2Exception;

	/**
	 * Get child Sources of a Source
	 * @param parentSource whose children are to be returned
	 * @return List of child Sources
	 * @throws JHOVE2Exception
	 */
	public List<Source> getChildSources(Source parentSource) throws JHOVE2Exception;

	/**
	 * Get count of child Sources for a Source
	 * @param parentSource Source for which count of child Sources is to be returned
	 * @return int count of child Sources
	 * @throws JHOVE2Exception
	 */
	public int getNumChildSources(Source parentSource) throws JHOVE2Exception;
	/**
	 * Remove Source from list of a Source's children
	 * Must ensure that, after completion of method, parentSource.getChildren().contains(childSource)==false
	 * and childSource.getParentSource()==null
	 * @param parentSource Source from which child Source is to be deleted
	 * @param childSource Source to be deleted from Parent;s list of children
	 * @return Child source deleted from parent's list of children
	 * @throws JHOVE2Exception
	 */
	public Source deleteChildSource(Source parentSource, Source childSource) throws JHOVE2Exception;
	/**
	 * Add module to a Source
	 * Must ensure that module.getParentSource() will return source
	 * After method completes, it should be the case that, for Source s1, s2, and module m1,
	 * if s1.getModules().contains(m1)==true, && s2.getModules().contains(m1)==true, then
	 * s1==s2
	 * @param source Source to which module is to be added
	 * @param module Module to be added
	 * @return Module added to Source
	 * @throws JHOVE2Exception
	 */
	public Module addModule(Source source, Module module) throws JHOVE2Exception;

	/**
	 * Remove a Module from a Source
	 * Must ensure that, after completion of method, source.getModules().contains(module)==false
	 * and module.getParentSource()==null
	 * @param source Source from which Module is to be removed
	 * @param module Module to be removed
	 * @return Module that was removed
	 * @throws JHOVE2Exception
	 */
	public Module deleteModule(Source source, Module module) throws JHOVE2Exception;

	/**
	 * Get list of Modules that have processed a Source
	 * @param source Source processed by Modules
	 * @return List of Modules which processed Source
	 * @throws JHOVE2Exception
	 */
	public List<Module> getModules (Source source) throws JHOVE2Exception;
	/**
	 * Get count of Modules that have processed a Source
	 * @return count of Modules that have processed a Source
	 * @throws JHOVE2Exception
	 */
	public int getNumModules(Source source) throws JHOVE2Exception;

	public Source addMessage(Source source, Message message) throws JHOVE2Exception;
	/**
	 * Adds presumptive format to Source
	 * @param Source to which format is to be added
	 * @param format to be added
	 * @return Source with format added
	 * @throws JHOVE2Exception
	 */
	public Source addPresumptiveFormat(Source source, FormatIdentification fi) throws JHOVE2Exception;
	/**
	 * Adds presumptive formats to Source
	 * @param Source to which formats are to be added
	 * @param List of formats to be added
	 * @return Source with formats added
	 * @throws JHOVE2Exception
	 */
	public Source addPresumptiveFormats(Source source, Set<FormatIdentification> fis) throws JHOVE2Exception;
	/**
	 * Starts Source's TimerInfo timer
	 * @param source with TimerInfo to be started
	 * @return source with TimerInfo started
	 * @throws JHOVE2Exception
	 */
	public Source startTimerInfo (Source source) throws JHOVE2Exception;
	/**
	 * Stops Source's TimerInfo timer
	 * @param source with TimerInfo to be stopped
	 * @return source with TimerInfo stopped
	 * @throws JHOVE2Exception
	 */
	public Source endTimerInfo (Source source) throws JHOVE2Exception;
	/**
	 * Get parent Source for a Source
	 * @param childSource Source whose parent is being requested
	 * @return parent Source, or null if there is no Parent
	 * @throws JHOVE2Exception
	 */
	public Source getParentSource(Source childSource) throws JHOVE2Exception;
	/**
	 * Utility method to ensure parentId and parent Source are kept in sync by SourceAccessor
	 * @param childSource being assigned new parent
	 * @param oldId sourceId of old parent
	 * @param newId sourceId of new parent
	 * @throws JHOVE2Exception
	 */
	public void verifyNewParentSourceId(Source childSource, Long oldId, Long newId)throws JHOVE2Exception;

}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/privacy/dlp/v2/dlp.proto

package com.google.privacy.dlp.v2;

public interface OutputStorageConfigOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.OutputStorageConfig)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Store findings in an existing table or a new table in an existing
   * dataset. If table_id is not set a new one will be generated
   * for you with the following format:
   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
   * for generating the date details.
   * For Inspect, each column in an existing output table must have the same
   * name, type, and mode of a field in the `Finding` object.
   * For Risk, an existing output table should be the output of a previous
   * Risk analysis job run on the same source table, with the same privacy
   * metric and quasi-identifiers. Risk jobs that analyze the same table but
   * compute a different privacy metric, or use different sets of
   * quasi-identifiers, cannot store their results in the same table.
   *

   *
   * .google.privacy.dlp.v2.BigQueryTable table = 1;
   *
   * @return Whether the table field is set.
   */
  boolean hasTable();
  /**
   *
   *
   *

   * Store findings in an existing table or a new table in an existing
   * dataset. If table_id is not set a new one will be generated
   * for you with the following format:
   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
   * for generating the date details.
   * For Inspect, each column in an existing output table must have the same
   * name, type, and mode of a field in the `Finding` object.
   * For Risk, an existing output table should be the output of a previous
   * Risk analysis job run on the same source table, with the same privacy
   * metric and quasi-identifiers. Risk jobs that analyze the same table but
   * compute a different privacy metric, or use different sets of
   * quasi-identifiers, cannot store their results in the same table.
   *

   *
   * .google.privacy.dlp.v2.BigQueryTable table = 1;
   *
   * @return The table.
   */
  com.google.privacy.dlp.v2.BigQueryTable getTable();
  /**
   *
   *
   *

   * Store findings in an existing table or a new table in an existing
   * dataset. If table_id is not set a new one will be generated
   * for you with the following format:
   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
   * for generating the date details.
   * For Inspect, each column in an existing output table must have the same
   * name, type, and mode of a field in the `Finding` object.
   * For Risk, an existing output table should be the output of a previous
   * Risk analysis job run on the same source table, with the same privacy
   * metric and quasi-identifiers. Risk jobs that analyze the same table but
   * compute a different privacy metric, or use different sets of
   * quasi-identifiers, cannot store their results in the same table.
   *

   *
   * .google.privacy.dlp.v2.BigQueryTable table = 1;
   */
  com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder();

  /**
   *
   *
   *

   * Schema used for writing the findings for Inspect jobs. This field is only
   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
   * from the `Finding` object. If appending to an existing table, any columns
   * from the predefined schema that are missing will be added. No columns in
   * the existing table will be deleted.
   * If unspecified, then all available columns will be used for a new table or
   * an (existing) table with no schema, and no changes will be made to an
   * existing table that has a schema.
   * Only for use with external storage.
   *

   *
   * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3;
   *
   * @return The enum numeric value on the wire for outputSchema.
   */
  int getOutputSchemaValue();
  /**
   *
   *
   *

   * Schema used for writing the findings for Inspect jobs. This field is only
   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
   * from the `Finding` object. If appending to an existing table, any columns
   * from the predefined schema that are missing will be added. No columns in
   * the existing table will be deleted.
   * If unspecified, then all available columns will be used for a new table or
   * an (existing) table with no schema, and no changes will be made to an
   * existing table that has a schema.
   * Only for use with external storage.
   *

   *
   * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3;
   *
   * @return The outputSchema.
   */
  com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema();

  public com.google.privacy.dlp.v2.OutputStorageConfig.TypeCase getTypeCase();
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Asteridium aperatum Pat.

### Remarks
null


text: A C# written Minecraft server


text:
<?php
include("bundles/projectbundlefrontend/include/config.php");
include("bundles/projectbundlefrontend/include/conneXion.php");
?>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title> Feed Back - Industrial Training Project</title>

    <link href="<?php echo $view['assets']->getUrl('bundles/projectbundlefrontend/css/bootstrap.min.css') ?>" rel="stylesheet">

    <link href="<?php echo $view['assets']->getUrl('bundles/projectbundlefrontend/css/ict_style.css') ?>" rel="stylesheet">

    <link href="<?php echo $view['assets']->getUrl('bundles/projectbundlefrontend/font-awesome-4.1.0/css/font-awesome.min.css') ?>" rel="stylesheet" type="text/css">

            <?php include("bundles/projectbundlefrontend/include/inc_project_header.php");?>

            <?php include("bundles/projectbundlefrontend/include/inc_project_navigator.php");?>

Feed Back

<a href="<?php echo $view['router']->generate('projectbundle_front_end_homepage'); ?>">Home

Feed Back

Send us a Message

                <form name="sentMessage" id="contactForm" method="post" action="<?php echo $view['router']->generate('link-update'); ?>" novalidate>

                            Full Name:
                            <input type="text" name="fname" class="form-control" id="name" required data-validation-required-message="Please enter your name.">

                            Phone Number:
                            <input type="tel" name="phnum" class="form-control" id="phone" required data-validation-required-message="Please enter your phone number.">

                            Email Address:
                            <input type="email" name="email" class="form-control" id="email" required data-validation-required-message="Please enter your email address.">

                            Link Breakage(If any):
                            <select name="selLink" id="selLink" class="form-control">
                                <option value="0">Please Select if any link breakage</option>
                  <?php $sql="SELECT Id, Title FROM woman_program ORDER BY Title";
			  $result=mysql_query($sql);
			  while($row=mysql_fetch_array($result)){?>

                  <option value="<?php print $row['Id'];?>" class="form-control"><?php print $row['Title'];?></option>
                  <?php }?>
                </select>

                            Message:
                            <textarea rows="10" cols="100" class="form-control" name="txtMessage" id="message" required data-validation-required-message="Please enter your message" maxlength="999" style="resize:none"></textarea>

                    <button type="submit" class="btn btn-primary">Send Message</button>
                </form>

  <?php include("bundles/projectbundlefrontend/include/inc_footer.php");?>

    <?php include("bundles/projectbundlefrontend/include/inc_foot_jquery.php");?>


text:
This folder is a general pipeline for TensorFlow 2 (eager) model training,
validation, and testing.

`trainvali.py` and `test.py` are the main scripts with the
training/validation/testing loops. `config/` contains the example configuration
files, from which the pipeline parses arguments. The NLT model is specified in
`models/nlt.py`, and the NLT data loader is specified in `datasets/nlt.py`.

## Setup

TensorFlow versions are specified in `../environment.yml`. The cuDNN version we
used is 7.6, and the CUDA version 10.1 (for TensorFlow-cuDNN/CUDA version
compatibility, see
[this Stack Overflow answer](https://stackoverflow.com/a/50622526/2106753)).

1. Clone this repository:
    ```
    cd "$ROOT"
    git clone https://github.com/google/neural-light-transport.git
    ```

1. Install a Conda environment with all dependencies:
    ```
    cd "$ROOT"/neural-light-transport
    conda env create -f environment.yml
    conda activate nlt
    ```

1. Make sure Python can locate third-party libraries:
    ```
    export PYTHONPATH="$ROOT"/neural-light-transport/third_party/:$PYTHONPATH
    export PYTHONPATH="$ROOT"/neural-light-transport/third_party/xiuminglib/:$PYTHONPATH
    ```

### Tips

* The IPython dependency in `environment.yml` is for `IPython.embed()` alone.
  If you are not using that to insert breakpoints during debugging, you can
  take it off. That said, it should not hurt to just leave it there.
* We would caution you against installing TensorFlow with Conda in this project.
  As seen in `environment.yml`, we ended up using pip instead for all three
  TensorFlow-related installations after much struggle with the version
  compatibility issues while installing with Conda.

## Training

Run the training and validation pipeline:
```
CUDA_VISIBLE_DEVICES="$GPU" \
    python "$ROOT"/neural-light-transport/nlt/trainvali.py \
    --config='dragon_specular.ini'
```

To visualize the losses and get handy links to the visualization webpages:
```
tensorboard --logdir "$EXPERIMENT_DIR" --bind_all
```
The visualization webpages (whose links can be found under the "TEXT" tab
in TensorBoard) include animated comparisons of the NLT predictions against
the diffuse bases and ground truth.

### About Distributed Training

The distributed training feature should work, but was not heavily tested.
Therefore, you may be better off just using a single GPU by making only, say,
GPU 3 visible:
```
CUDA_VISIBLE_DEVICES='3' python ...
```

### Tips

* Even if eager execution is used throughout, the data pipeline still runs in
  the graph mode (by design). This may complicate debugging the data pipeline
  in that you may not be able to insert breakpoints. Take a look at
  `debug/dataset.py`, where we call the dataset functions outside of the
  pipeline, insert breakpoints there, and debug.
* For easier debugging, consider commenting off `@tf.function` for
  `distributed_train_step()` in `trainvali.py`, but be sure to use this
  decorator for speed during training.
* This training plus validation pipeline is in fact general, so you can use it
  for totally different models and/or datasets: simply add them to `models/`
  and/or `datasets/` and follow the same API.

## Testing

Run the testing pipeline:
```
CUDA_VISIBLE_DEVICES="$GPU" \
    python "$ROOT"/neural-light-transport/nlt/nlt_test.py \
    --ckpt="$ROOT"'/output/train/lr:1e-3_mgm:-1/checkpoints/ckpt-43'
```
which runs inference with the given checkpoint on all test data, and eventually
produces a video visualization whose frames correspond to different camera-light
configurations.


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/D:/reactNative/ReactNativeBaseFramework/android/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-xlarge-land/values-xlarge-land.xml -->
    <eat-comment/>
    <dimen name="abc_search_view_text_min_width">256dip</dimen>
</resources>


text:
<?php

namespace Symfony\Component\Validator\Constraints;

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;

/**
 * @author Bernhard Schussek <bschussek@gmail.com>
 *
 * @api
 */
class CollectionValidator extends ConstraintValidator
{
    /**
     * {@inheritdoc}
     */
    public function validate($value, Constraint $constraint)
    {
        if (!$constraint instanceof Collection) {
            throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Collection');
        }

        if (null === $value) {
            return;
        }

        if (!is_array($value) && !($value instanceof \Traversable && $value instanceof \ArrayAccess)) {
            throw new UnexpectedTypeException($value, 'array or Traversable and ArrayAccess');
        }

        // We need to keep the initialized context when CollectionValidator
        // calls itself recursively (Collection constraints can be nested).
        // Since the context of the validator is overwritten when initialize()
        // is called for the nested constraint, the outer validator is
        // acting on the wrong context when the nested validation terminates.
        //
        // A better solution - which should be approached in Symfony 3.0 - is to
        // remove the initialize() method and pass the context as last argument
        // to validate() instead.
        $context = $this->context;

        foreach ($constraint->fields as $field => $fieldConstraint) {
            // bug fix issue #2779
            $existsInArray = is_array($value) && array_key_exists($field, $value);
            $existsInArrayAccess = $value instanceof \ArrayAccess && $value->offsetExists($field);

            if ($existsInArray || $existsInArrayAccess) {
                if (count($fieldConstraint->constraints) > 0) {
                    if ($context instanceof ExecutionContextInterface) {
                        $context->getValidator()
                            ->inContext($context)
                            ->atPath('['.$field.']')
                            ->validate($value[$field], $fieldConstraint->constraints);
                    } else {
                        // 2.4 API
                        $context->validateValue($value[$field], $fieldConstraint->constraints, '['.$field.']');
                    }
                }
            } elseif (!$fieldConstraint instanceof Optional && !$constraint->allowMissingFields) {
                $this->buildViolationInContext($context, $constraint->missingFieldsMessage)
                    ->atPath('['.$field.']')
                    ->setParameter('{{ field }}', $this->formatValue($field))
                    ->setInvalidValue(null)
                    ->setCode(Collection::MISSING_FIELD_ERROR)
                    ->addViolation();
            }
        }

        if (!$constraint->allowExtraFields) {
            foreach ($value as $field => $fieldValue) {
                if (!isset($constraint->fields[$field])) {
                    $this->buildViolationInContext($context, $constraint->extraFieldsMessage)
                        ->atPath('['.$field.']')
                        ->setParameter('{{ field }}', $this->formatValue($field))
                        ->setInvalidValue($fieldValue)
                        ->setCode(Collection::NO_SUCH_FIELD_ERROR)
                        ->addViolation();
                }
            }
        }
    }
}


text:
(function() {
function foo(x) {
  %TurbofanStaticAssert(1 * x == x + 0);
};
%PrepareFunctionForOptimization(foo);
foo(121);
foo(122);
%OptimizeFunctionOnNextCall(foo);
foo(123);
})();


text:
<?php

namespace Ephemit\EvenementBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Ephemit\EvenementBundle\Form\CreerEvenementType;
use Ephemit\EvenementBundle\Entity\Evenement;
use Ephemit\EvenementBundle\Entity\Document;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use FOS\UserBundle\Model\UserInterface;
use Symfony\Component\HttpFoundation\Response;
use Ephemit\EvenementBundle\Form\ProtectionPageType;
use Ephemit\EvenementBundle\Form\ProtectionPageAdminType;

class EvenementController extends Controller
{
    public function creerAction()
    {
        $user = $this->container->get('security.context')->getToken()->getUser();
        /*if (!is_object($user) || !$user instanceof UserInterface)
        {
                throw new AccessDeniedException('This user does not have access to this section.');
        }*/
        $em = $this->getDoctrine()->getManager();
        $event = new Evenement();
        $formEvent = $this->createForm(new CreerEvenementType(), $event);

        $request = $this->get('request');

        $helper = $this->container->get('oneup_uploader.templating.uploader_helper');
        $endpoint = $helper->endpoint('gallery');

        if ($request->getMethod() == 'POST') {
            $formEvent->bind($request);
            if($formEvent->isValid()){
                $today = new \DateTime('now');
                $post = $request->request->get('ephemit_evenement_creer');

                if($post['publicpass']!=''){
                    $publicpass = sha1($post['publicpass']);
                    $event->setPublicpass($publicpass);
                }
                $adminpass1 = sha1($post['adminpass1']);
                $adminpass2 = sha1($post['adminpass2']);

                $time = time();
                $rand = rand(0, 100);
                $cle = $time*$rand;

                $event->setCle(md5($cle));

                $event->setAdminpass1($adminpass1);
                $event->setAdminpass2($adminpass2);
                $event->setDateCreation($today);
                $em->persist($event);

                /*documents*/
                foreach($post['documents'] as $document){
                    $doc = new Document();
                    $doc->setEvent($event);
                    $doc->setNom($document['nom']);
                    $doc->setNomOriginal($document['nomOriginal']);

                    $em->persist($doc);
                }

                $em->flush();

                $tabRetour= array();
                $tabRetour['code'] = 0;

                $reponse = new Response(json_encode($tabRetour));
                $reponse->headers->set('Content-Type', 'application/json');
                return $reponse;
            }
        }

        return $this->render('EphemitEvenementBundle:Evenement:creer.html.twig', array(
            'formEvent'=>$formEvent->createView()
        ));
    }

    public function listeAction(){
        $user = $this->container->get('security.context')->getToken()->getUser();
        if (!is_object($user) || !$user instanceof UserInterface)
        {
                throw new AccessDeniedException('This user does not have access to this section.');
        }

        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $listEvent = $repoEvent->findAll();

        $favoris = $user->getFavoris();

        return $this->render('EphemitEvenementBundle:Evenement:liste.html.twig', array(
            'listEvent'=>$listEvent,
            'favoris'=>$favoris
        ));
    }

    public function supprimerAction($id){
        $user = $this->container->get('security.context')->getToken()->getUser();
        if (!is_object($user) || !$user instanceof UserInterface)
        {
                throw new AccessDeniedException('This user does not have access to this section.');
        }
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $event = $repoEvent->findOneById($id);

        $request = $this->get('request');
        $em = $this->getDoctrine()->getManager();

        if ($request->getMethod() == 'POST') {

            $em->remove($event);
            $em->flush();

            $tabRetour= array();
            $tabRetour['code'] = 0;
            $reponse = new Response(json_encode($tabRetour));
            $reponse->headers->set('Content-Type', 'application/json');
            return $reponse;
        }

        return $this->render('EphemitEvenementBundle:Evenement:supprimer-evenement.html.twig', array(
            'event'=>$event
        ));
    }

    public function modifierAction($cle){

        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $event = $repoEvent->findOneByCle($cle);

        $formEvent = $this->createForm(new CreerEvenementType(), $event);
        $request = $this->get('request');
        $em = $this->getDoctrine()->getManager();
        if ($request->getMethod() == 'POST') {
            $formEvent->bind($request);
            if($formEvent->isValid()){
                $em->persist($event);
                $em->flush();

                $tabRetour= array();
                $tabRetour['code'] = 0;

                $reponse = new Response(json_encode($tabRetour));
                $reponse->headers->set('Content-Type', 'application/json');
                return $reponse;
            }
        }
        return $this->render('EphemitEvenementBundle:Evenement:modifier-evenement.html.twig', array(
            'event'=>$event,
            'formEvent'=>$formEvent->createView()
        ));
    }

    public function ajouterFavorisAction($id){
        $user = $this->container->get('security.context')->getToken()->getUser();
        if (!is_object($user) || !$user instanceof UserInterface)
        {
                throw new AccessDeniedException('This user does not have access to this section.');
        }
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $event = $repoEvent->findOneById($id);

        $user->addFavori($event);
        $em = $this->getDoctrine()->getManager();
        $em->persist($user);
        $em->flush();

        $tabRetour= array();
        $tabRetour['code'] = 0;
        $reponse = new Response(json_encode($tabRetour));
        $reponse->headers->set('Content-Type', 'application/json');
        return $reponse;
    }

    public function pageAction($cle){
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $page = $repoEvent->findOneByCle($cle);
        $formPass = $this->createForm(new ProtectionPageType());

        $documents = $page->getDocuments();
        $arrayExtImg = array('jpg','jpeg','png','gif');
        $arrayImg = array();
        $arrayPJ = array();

        foreach($documents as $doc){
            $ext = explode('.', $doc->getNom());
            if(in_array($ext[1], $arrayExtImg)){
                $arrayImg[] = $doc;
            }
            else{
                $arrayPJ[] = $doc;
            }
        }

        if($page->getPublicpass() != null){
            $protect = true;

            $request = $this->get('request');

            if ($request->getMethod() == 'POST') {
                $formPass->bind($request);
                if($formPass->isValid()){
                    $post = $request->request->get('ephemit_protection_page');
                    $pass = $post['publicpass'];
                    if($page->getPublicpass() == sha1($pass)){
                        $protect = false;
                    }
                }
            }
        }
        else{
            $protect = false;
        }
        return $this->render('EphemitEvenementBundle:Evenement:page.html.twig', array(
            'page'=>$page,
            'protect'=>$protect,
            'formPass'=>$formPass->createView(),
            'arrayImg'=>$arrayImg,
            'arrayPJ'=>$arrayPJ
        ));
    }

    public function gererAction($cle){
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $page = $repoEvent->findOneByCle($cle);
        $formPassAdmin = $this->createForm(new ProtectionPageAdminType());

        $request = $this->get('request');
        $valid = false;

        if ($request->getMethod() == 'POST') {
            $formPassAdmin->bind($request);
            if($formPassAdmin->isValid()){
                $post = $request->request->get('ephemit_protection_page_admin');
                $adminpass1 = $post['adminpass1'];
                $adminpass2 = $post['adminpass2'];
                if(($page->getAdminPass1() == sha1($adminpass1)) && ($page->getAdminPass2() == sha1($adminpass2))){
                    $valid = true;
                }
                else{
                    $valid = false;
                }
            }
        }
        return $this->render('EphemitEvenementBundle:Evenement:gerer.html.twig', array(
            'page'=>$page,
            'formPassAdmin'=>$formPassAdmin->createView(),
            'valid'=>$valid
        ));
    }

    public function adminPageAction($cle){
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $page = $repoEvent->findOneByCle($cle);

        return $this->render('EphemitEvenementBundle:Evenement:admin-page.html.twig', array(
            'page'=>$page
        ));
    }

    public function apercuAction($cle){
        $repoEvent = $this->getDoctrine()->getRepository('EphemitEvenementBundle:Evenement');
        $page = $repoEvent->findOneByCle($cle);

        return $this->render('EphemitEvenementBundle:Evenement:apercu-page.html.twig', array(
            'page'=>$page
        ));
    }
}


text:
using Aspose.Email.Outlook.Pst;

/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Email for .NET
   API reference when the project is build. Please check https://Docs.nuget.org/consume/nuget-faq
   for more information. If you do not wish to use NuGet, you can manually download
   Aspose.Email for .NET API from http://www.aspose.com/downloads,
   install it and then add its reference to this project. For any issues, questions or suggestions
   please feel free to contact us using http://www.aspose.com/community/forums/default.aspx
*/

namespace Aspose.Email.Examples.CSharp.Email.Outlook
{
    class ConvertOSTToPST
    {
        public static void Run()
        {
            // ExStart:ConvertOSTToPST
            string dataDir = RunExamples.GetDataDir_Outlook();

            // Load the Outlook file
            string path = dataDir + "PersonalStorage.pst";

            // Get the Display Name of the file
            using (PersonalStorage ost = PersonalStorage.FromFile(path))
            {
                ost.SaveAs(dataDir + "ConvertOSTToPST_out.pst", FileFormat.Pst);
            }
            // ExEnd:ConvertOSTToPST
        }
    }
}


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Interface opennlp.tools.util.model.ArtifactSerializer (Apache OpenNLP Tools 1.6.0 API)</title>
<meta name="date" content="2015-06-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
opennlp.tools.util.model.ArtifactSerializer

Packages that use ArtifactSerializer

Package
Description

opennlp.tools.namefind

Package related to finding proper names and numeric amounts.

opennlp.tools.parser

Package containing common code for performing full syntactic parsing.

opennlp.tools.parser.lang.en

opennlp.tools.parser.lang.es

opennlp.tools.postag

Package related to part-of-speech tagging.

opennlp.tools.util

Package containing utility data structures and algorithms used by multiple other packages.

opennlp.tools.util.featuregen

This package contains classes for generating sequence features.

opennlp.tools.util.model

Uses of ArtifactSerializer in opennlp.tools.namefind

Methods in opennlp.tools.namefind that return types with arguments of type ArtifactSerializer

Modifier and Type
Method and Description

static Map<String,ArtifactSerializer>
TokenNameFinderModel.createArtifactSerializers()

Create the artifact serializers.

Method parameters in opennlp.tools.namefind with type arguments of type ArtifactSerializer

Modifier and Type
Method and Description

protected void
TokenNameFinderModel.createArtifactSerializers(Map<String,ArtifactSerializer> serializers)

Uses of ArtifactSerializer in opennlp.tools.parser

Method parameters in opennlp.tools.parser with type arguments of type ArtifactSerializer

Modifier and Type
Method and Description

protected void
ParserModel.createArtifactSerializers(Map<String,ArtifactSerializer> serializers)

Uses of ArtifactSerializer in opennlp.tools.parser.lang.en

Classes in opennlp.tools.parser.lang.en that implement ArtifactSerializer

Modifier and Type
Class and Description

static class
HeadRules.HeadRulesSerializer

Uses of ArtifactSerializer in opennlp.tools.parser.lang.es

Classes in opennlp.tools.parser.lang.es that implement ArtifactSerializer

Modifier and Type
Class and Description

static class
AncoraSpanishHeadRules.HeadRulesSerializer

Uses of ArtifactSerializer in opennlp.tools.postag

Methods in opennlp.tools.postag that return types with arguments of type ArtifactSerializer

Modifier and Type
Method and Description

Map<String,ArtifactSerializer>
POSTaggerFactory.createArtifactSerializersMap()

Method parameters in opennlp.tools.postag with type arguments of type ArtifactSerializer

Modifier and Type
Method and Description

protected void
POSModel.createArtifactSerializers(Map<String,ArtifactSerializer> serializers)

Uses of ArtifactSerializer in opennlp.tools.util

Methods in opennlp.tools.util that return types with arguments of type ArtifactSerializer

Modifier and Type
Method and Description

Map<String,ArtifactSerializer>
BaseToolFactory.createArtifactSerializersMap()

Creates a Map with pairs of keys and ArtifactSerializer.

Uses of ArtifactSerializer in opennlp.tools.util.featuregen

Classes in opennlp.tools.util.featuregen that implement ArtifactSerializer

Modifier and Type
Class and Description

static class
BrownCluster.BrownClusterSerializer

static class
WordClusterDictionary.WordClusterDictionarySerializer

Methods in opennlp.tools.util.featuregen that return types with arguments of type ArtifactSerializer

Modifier and Type
Method and Description

static Map<String,ArtifactSerializer<?>>
GeneratorFactory.extractCustomArtifactSerializerMappings(InputStream xmlDescriptorIn)

Map<String,ArtifactSerializer<?>>
ArtifactToSerializerMapper.getArtifactSerializerMapping()

Uses of ArtifactSerializer in opennlp.tools.util.model

Classes in opennlp.tools.util.model that implement ArtifactSerializer

Modifier and Type
Class and Description

class
ClassSerializer

Deprecated.

class
FeatureGeneratorFactorySerializer

Deprecated.

class
GenericModelSerializer

Methods in opennlp.tools.util.model that return ArtifactSerializer

Modifier and Type
Method and Description

protected ArtifactSerializer
BaseModel.getArtifactSerializer(String resourceName)

Methods in opennlp.tools.util.model that return types with arguments of type ArtifactSerializer

Modifier and Type
Method and Description

protected static Map<String,ArtifactSerializer>
BaseModel.createArtifactSerializers()

Method parameters in opennlp.tools.util.model with type arguments of type ArtifactSerializer

Modifier and Type
Method and Description

protected void
BaseModel.createArtifactSerializers(Map<String,ArtifactSerializer> serializers)

Registers all ArtifactSerializer for their artifact file name extensions.

static void
GenericModelSerializer.register(Map<String,ArtifactSerializer> factories)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2015 The Apache Software Foundation. All rights reserved.